@enyxs/wikex-components 0.11.23 → 0.11.25
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 +75 -21
- package/dist/fees.js.map +1 -1
- package/dist/fees.mjs +75 -21
- package/dist/fees.mjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +145 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +206 -115
- package/dist/index.mjs.map +1 -1
- package/dist/manifest.json +7 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -77,6 +77,10 @@ type CmsTextToolbarProps = {
|
|
|
77
77
|
declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
|
|
78
78
|
|
|
79
79
|
declare const CMS_ELEMENTS_FIELD = "__cmsElements";
|
|
80
|
+
declare const CMS_LIST_MARKERS: readonly ["disc", "circle", "square", "decimal", "lower-alpha", "lower-roman", "accent-triangle", "accent-disc", "accent-circle", "accent-square", "accent-decimal"];
|
|
81
|
+
type CmsListMarker = typeof CMS_LIST_MARKERS[number];
|
|
82
|
+
declare function cmsListMarkerType(marker: string): "ul" | "ol";
|
|
83
|
+
declare function cmsListAnchor(listId: string): string;
|
|
80
84
|
type CmsElementState = {
|
|
81
85
|
hidden: string[];
|
|
82
86
|
insertions: Array<{
|
|
@@ -111,4 +115,4 @@ declare const wikexCmsBlocks: {
|
|
|
111
115
|
definition: CmsComponentDefinition;
|
|
112
116
|
}[];
|
|
113
117
|
|
|
114
|
-
export { CMS_ELEMENTS_FIELD, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, CmsBlock, CmsComponentDefinition, type CmsElementState, CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
|
|
118
|
+
export { CMS_ELEMENTS_FIELD, CMS_LIST_MARKERS, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, CmsBlock, CmsComponentDefinition, type CmsElementState, type CmsListMarker, CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, applyCmsTextLayout, cmsListAnchor, cmsListMarkerType, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
|
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ type CmsTextToolbarProps = {
|
|
|
77
77
|
declare function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }: CmsTextToolbarProps): react.JSX.Element;
|
|
78
78
|
|
|
79
79
|
declare const CMS_ELEMENTS_FIELD = "__cmsElements";
|
|
80
|
+
declare const CMS_LIST_MARKERS: readonly ["disc", "circle", "square", "decimal", "lower-alpha", "lower-roman", "accent-triangle", "accent-disc", "accent-circle", "accent-square", "accent-decimal"];
|
|
81
|
+
type CmsListMarker = typeof CMS_LIST_MARKERS[number];
|
|
82
|
+
declare function cmsListMarkerType(marker: string): "ul" | "ol";
|
|
83
|
+
declare function cmsListAnchor(listId: string): string;
|
|
80
84
|
type CmsElementState = {
|
|
81
85
|
hidden: string[];
|
|
82
86
|
insertions: Array<{
|
|
@@ -111,4 +115,4 @@ declare const wikexCmsBlocks: {
|
|
|
111
115
|
definition: CmsComponentDefinition;
|
|
112
116
|
}[];
|
|
113
117
|
|
|
114
|
-
export { CMS_ELEMENTS_FIELD, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, CmsBlock, CmsComponentDefinition, type CmsElementState, CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, applyCmsTextLayout, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
|
|
118
|
+
export { CMS_ELEMENTS_FIELD, CMS_LIST_MARKERS, CMS_TEXT_FONTS, CMS_TEXT_LAYOUT_SUFFIX, CmsBlock, CmsComponentDefinition, type CmsElementState, type CmsListMarker, CmsRendererProps, type CmsRichText, type CmsTextLayout, type CmsTextMark, CmsTextTarget, CmsTextToolbar, type CmsTextToolbarProps, applyCmsTextLayout, cmsListAnchor, cmsListMarkerType, cmsTextLayoutStyle, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, parseCmsElements, parseCmsRichText, parseCmsTextLayout, patchCmsRichText, readCmsEditableText, rebaseCmsRichText, rebaseCmsTextLayouts, renderCmsRichText, safeCmsTextHref, siteChromeBlocks, wikexCmsBlocks, wikexCommodityBlocks, wikexComponents };
|
package/dist/index.js
CHANGED
|
@@ -31,11 +31,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
CMS_ELEMENTS_FIELD: () => CMS_ELEMENTS_FIELD,
|
|
34
|
+
CMS_LIST_MARKERS: () => CMS_LIST_MARKERS,
|
|
34
35
|
CMS_TEXT_FONTS: () => CMS_TEXT_FONTS,
|
|
35
36
|
CMS_TEXT_LAYOUT_SUFFIX: () => CMS_TEXT_LAYOUT_SUFFIX,
|
|
36
37
|
CmsTextToolbar: () => CmsTextToolbar,
|
|
37
38
|
FeesTable: () => FeesTable,
|
|
38
39
|
applyCmsTextLayout: () => applyCmsTextLayout,
|
|
40
|
+
cmsListAnchor: () => cmsListAnchor,
|
|
41
|
+
cmsListMarkerType: () => cmsListMarkerType,
|
|
39
42
|
cmsTextLayoutStyle: () => cmsTextLayoutStyle,
|
|
40
43
|
migrateWikexChromeContent: () => migrateWikexChromeContent,
|
|
41
44
|
minimalMarketingBlocks: () => minimalMarketingBlocks,
|
|
@@ -159,6 +162,32 @@ var InlineLink = import_styled_components.default.span.withConfig({
|
|
|
159
162
|
// src/shared/elements.tsx
|
|
160
163
|
var CMS_EMPTY_IMAGE = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'/%3E";
|
|
161
164
|
var CMS_ELEMENTS_FIELD = "__cmsElements";
|
|
165
|
+
var CMS_LIST_MARKERS = [
|
|
166
|
+
"disc",
|
|
167
|
+
"circle",
|
|
168
|
+
"square",
|
|
169
|
+
"decimal",
|
|
170
|
+
"lower-alpha",
|
|
171
|
+
"lower-roman",
|
|
172
|
+
"accent-triangle",
|
|
173
|
+
"accent-disc",
|
|
174
|
+
"accent-circle",
|
|
175
|
+
"accent-square",
|
|
176
|
+
"accent-decimal"
|
|
177
|
+
];
|
|
178
|
+
function cmsListMarkerType(marker) {
|
|
179
|
+
return [
|
|
180
|
+
"decimal",
|
|
181
|
+
"lower-alpha",
|
|
182
|
+
"lower-roman",
|
|
183
|
+
"accent-decimal"
|
|
184
|
+
].includes(marker) ? "ol" : "ul";
|
|
185
|
+
}
|
|
186
|
+
function cmsListAnchor(listId) {
|
|
187
|
+
return listId.startsWith("text.") ? listId.slice(5) : `list:${listId}`;
|
|
188
|
+
}
|
|
189
|
+
var LIST_ACCENT = "#f9bb3a";
|
|
190
|
+
var ACCENT_TRIANGLE = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='9' viewBox='0 0 8 9' fill='none'%3E%3Cpath d='M1.84745 0.186474L6.93777 3.33107C7.46843 3.66519 7.62566 4.27445 7.42912 4.78545C7.3505 4.98199 7.23258 5.15887 7.0557 5.29645C7.01639 5.3161 6.97708 5.35541 6.93777 5.37507L1.84745 8.51967C1.45438 8.75551 1.022 8.75551 0.668228 8.57863C0.275153 8.38209 -3.12842e-08 7.98901 -5.27615e-08 7.49767L-3.27671e-07 1.20847C-3.35403e-07 1.03158 0.0393072 0.874354 0.0982684 0.717124C0.373421 0.0882044 1.17922 -0.226255 1.84745 0.186474Z' fill='%23F9BB3A'/%3E%3C/svg%3E")`;
|
|
162
191
|
function parseCmsElements(value4) {
|
|
163
192
|
const result = {
|
|
164
193
|
hidden: [],
|
|
@@ -215,14 +244,7 @@ function parseCmsElements(value4) {
|
|
|
215
244
|
...list.type === "ul" || list.type === "ol" ? {
|
|
216
245
|
type: list.type
|
|
217
246
|
} : {},
|
|
218
|
-
...typeof list.marker === "string" &&
|
|
219
|
-
"disc",
|
|
220
|
-
"circle",
|
|
221
|
-
"square",
|
|
222
|
-
"decimal",
|
|
223
|
-
"lower-alpha",
|
|
224
|
-
"lower-roman"
|
|
225
|
-
].includes(list.marker) ? {
|
|
247
|
+
...typeof list.marker === "string" && CMS_LIST_MARKERS.includes(list.marker) ? {
|
|
226
248
|
marker: list.marker
|
|
227
249
|
} : {}
|
|
228
250
|
};
|
|
@@ -293,18 +315,20 @@ function CmsTextList({ field, type, children }) {
|
|
|
293
315
|
});
|
|
294
316
|
}
|
|
295
317
|
var NativeList = import_styled_components2.default.ul.withConfig({
|
|
296
|
-
componentId: "sc-
|
|
318
|
+
componentId: "sc-28cc1baf-0"
|
|
297
319
|
})([
|
|
298
|
-
`> li{display:list-item !important;padding-left:0 !important;}> li::before{content:none !important;}
|
|
299
|
-
]);
|
|
320
|
+
`> li{display:list-item !important;padding-left:0 !important;}> li::before{content:none !important;}&[data-cms-list-marker^="accent-"] > li::marker{color:`,
|
|
321
|
+
`;}&[data-cms-list-marker="accent-decimal"] > li::marker{font-weight:700;}&[data-cms-list-marker="accent-triangle"] > li{position:relative;padding-left:20px !important;}&[data-cms-list-marker="accent-triangle"] > li::before{position:absolute;top:0.5em;top:calc(0.5lh - 4.5px);left:0;width:8px;height:9px;background:`,
|
|
322
|
+
` no-repeat;content:"" !important;}`
|
|
323
|
+
], LIST_ACCENT, ACCENT_TRIANGLE);
|
|
300
324
|
function CmsTemplateList({ cmsAs, cmsId, children }) {
|
|
301
325
|
const context = (0, import_react.useContext)(ElementContext);
|
|
302
326
|
const templates = import_react.Children.toArray(children).filter(import_react.isValidElement);
|
|
303
327
|
const stored = context?.state.lists[cmsId];
|
|
304
328
|
const order = stored?.order ?? templates.map((_, index) => String(index));
|
|
305
329
|
const items = order.flatMap((id) => {
|
|
306
|
-
const
|
|
307
|
-
const template = templates[
|
|
330
|
+
const added2 = stored?.added[id];
|
|
331
|
+
const template = templates[added2?.template ?? Number(id)];
|
|
308
332
|
if (!template) return [];
|
|
309
333
|
const attributes = {
|
|
310
334
|
key: id,
|
|
@@ -316,7 +340,7 @@ function CmsTemplateList({ cmsAs, cmsId, children }) {
|
|
|
316
340
|
}
|
|
317
341
|
} : {}
|
|
318
342
|
};
|
|
319
|
-
if (!
|
|
343
|
+
if (!added2) return [
|
|
320
344
|
/* @__PURE__ */ (0, import_react.cloneElement)(template, attributes)
|
|
321
345
|
];
|
|
322
346
|
const text2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditableText, {
|
|
@@ -325,8 +349,8 @@ function CmsTemplateList({ cmsAs, cmsId, children }) {
|
|
|
325
349
|
font: "inherit",
|
|
326
350
|
display: "block"
|
|
327
351
|
},
|
|
328
|
-
field:
|
|
329
|
-
value: context?.content[
|
|
352
|
+
field: added2.field,
|
|
353
|
+
value: context?.content[added2.field] ?? "M\u1EE5c m\u1EDBi",
|
|
330
354
|
editable: context?.editable,
|
|
331
355
|
onChange: context?.onChange
|
|
332
356
|
});
|
|
@@ -337,19 +361,30 @@ function CmsTemplateList({ cmsAs, cmsId, children }) {
|
|
|
337
361
|
}, text2)
|
|
338
362
|
];
|
|
339
363
|
});
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
364
|
+
const added = cmsId.startsWith("text.") ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CmsAddedElements, {
|
|
365
|
+
field: cmsListAnchor(cmsId)
|
|
366
|
+
});
|
|
367
|
+
if (!items.length) return added;
|
|
368
|
+
const marker = stored?.marker;
|
|
369
|
+
const list = /* @__PURE__ */ (0, import_react.createElement)(stored?.type || marker ? NativeList : cmsAs, {
|
|
370
|
+
...stored?.type || marker ? {
|
|
343
371
|
as: cmsAs,
|
|
344
|
-
forwardedAs: stored?.type ?? (
|
|
372
|
+
forwardedAs: stored?.type ?? cmsListMarkerType(marker ?? ""),
|
|
373
|
+
"data-cms-list-marker": marker,
|
|
345
374
|
style: {
|
|
346
|
-
listStyleType:
|
|
375
|
+
listStyleType: marker === "accent-triangle" ? "none" : marker?.replace(/^accent-/, "") ?? (stored?.type === "ol" ? "decimal" : "disc")
|
|
347
376
|
}
|
|
348
377
|
} : {},
|
|
349
378
|
"data-cms-list-id": cmsId,
|
|
350
379
|
"data-cms-list-order": JSON.stringify(order),
|
|
351
380
|
"data-cms-list-template-count": templates.length
|
|
352
381
|
}, items);
|
|
382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
383
|
+
children: [
|
|
384
|
+
list,
|
|
385
|
+
added
|
|
386
|
+
]
|
|
387
|
+
});
|
|
353
388
|
}
|
|
354
389
|
|
|
355
390
|
// src/shared/text-block.tsx
|
|
@@ -664,6 +699,7 @@ function EditableImage({
|
|
|
664
699
|
}) {
|
|
665
700
|
const normalizedSrc = src.trim();
|
|
666
701
|
const hidden = useCmsElementHidden(field);
|
|
702
|
+
if (hidden) return null;
|
|
667
703
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
668
704
|
import_Box.default,
|
|
669
705
|
{
|
|
@@ -675,7 +711,7 @@ function EditableImage({
|
|
|
675
711
|
...sx
|
|
676
712
|
},
|
|
677
713
|
children: [
|
|
678
|
-
|
|
714
|
+
normalizedSrc ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
679
715
|
import_Box.default,
|
|
680
716
|
{
|
|
681
717
|
component: "img",
|
|
@@ -699,7 +735,7 @@ function EditableImage({
|
|
|
699
735
|
children: "Ch\u01B0a c\xF3 \u1EA3nh"
|
|
700
736
|
}
|
|
701
737
|
),
|
|
702
|
-
editable &&
|
|
738
|
+
editable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
703
739
|
import_Button.default,
|
|
704
740
|
{
|
|
705
741
|
"data-cms-image-field": field,
|
|
@@ -8373,37 +8409,59 @@ var feesTheme = {
|
|
|
8373
8409
|
]))
|
|
8374
8410
|
};
|
|
8375
8411
|
var EditorActions = import_styled_components12.default.div.withConfig({
|
|
8376
|
-
componentId: "sc-
|
|
8412
|
+
componentId: "sc-ecbebe61-0"
|
|
8377
8413
|
})([
|
|
8378
8414
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
8379
8415
|
]);
|
|
8380
8416
|
var EditGroup = import_styled_components12.default.div.withConfig({
|
|
8381
|
-
componentId: "sc-
|
|
8417
|
+
componentId: "sc-ecbebe61-1"
|
|
8382
8418
|
})([
|
|
8383
8419
|
`display:flex;flex-direction:column;gap:6px;`
|
|
8384
8420
|
]);
|
|
8385
8421
|
var HeaderGroup = (0, import_styled_components12.default)(EditGroup).withConfig({
|
|
8386
|
-
componentId: "sc-
|
|
8422
|
+
componentId: "sc-ecbebe61-2"
|
|
8387
8423
|
})([
|
|
8388
8424
|
`gap:8px;`
|
|
8389
8425
|
]);
|
|
8390
8426
|
var HeaderTitle = import_styled_components12.default.div.withConfig({
|
|
8391
|
-
componentId: "sc-
|
|
8427
|
+
componentId: "sc-ecbebe61-3"
|
|
8392
8428
|
})([
|
|
8393
8429
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
8394
8430
|
]);
|
|
8395
8431
|
var HeaderActions = import_styled_components12.default.div.withConfig({
|
|
8396
|
-
componentId: "sc-
|
|
8432
|
+
componentId: "sc-ecbebe61-4"
|
|
8397
8433
|
})([
|
|
8398
8434
|
`display:flex;align-items:center;min-height:24px;`
|
|
8399
8435
|
]);
|
|
8400
8436
|
var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTable).withConfig({
|
|
8401
|
-
componentId: "sc-
|
|
8437
|
+
componentId: "sc-ecbebe61-5"
|
|
8438
|
+
})([
|
|
8439
|
+
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
8440
|
+
`;--fees-stripe-background:`,
|
|
8441
|
+
`;--fees-text:`,
|
|
8442
|
+
`;:root[data-theme="dark"] &{--fees-row-background:#39393d;--fees-stripe-background:`,
|
|
8443
|
+
`;--fees-text:`,
|
|
8444
|
+
`;}&[data-editable] table{table-layout:auto;}table{table-layout:fixed;font-family:var(--font-manrope,Manrope),Arial,Helvetica,sans-serif;}th,td{box-sizing:border-box;overflow-wrap:anywhere;}thead > tr,thead > tr > th{background:`,
|
|
8445
|
+
`;}thead > tr > th{height:52px;padding:11.5px 8px;color:`,
|
|
8446
|
+
`;font-size:10px;font-weight:600;line-height:14px;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:12px;font-weight:500;line-height:16px;}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:`,
|
|
8447
|
+
`px;table-layout:fixed;}`,
|
|
8448
|
+
` thead > tr > th,tbody > tr > td{padding-left:6px;padding-right:6px;white-space:pre-line;overflow-wrap:anywhere;font-family:var(--font-inter,Inter),Arial,Helvetica,sans-serif;}thead > tr > th{height:40px;padding-top:9.5px;padding-bottom:9.5px;font-size:8px;line-height:10px;}tbody > tr > td{height:40px;padding-top:5.5px;padding-bottom:5.5px;font-size:10px;line-height:14px;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span,td > span{text-align:left;}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:`,
|
|
8449
|
+
`;}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);}}}`
|
|
8450
|
+
], ({ 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, ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
|
|
8451
|
+
th:nth-child(${index + 1}), td:nth-child(${index + 1}) {
|
|
8452
|
+
width: ${width}px;
|
|
8453
|
+
min-width: ${width}px;
|
|
8454
|
+
max-width: ${width}px;
|
|
8455
|
+
}
|
|
8456
|
+
`).join(""), ({ theme }) => theme.colors.accent.primary);
|
|
8457
|
+
var FeesCellContent = import_styled_components12.default.span.withConfig({
|
|
8458
|
+
componentId: "sc-ecbebe61-6"
|
|
8402
8459
|
})([
|
|
8403
|
-
|
|
8404
|
-
|
|
8460
|
+
`display:block;text-align:`,
|
|
8461
|
+
`;`
|
|
8462
|
+
], ({ $alignRight }) => $alignRight ? "right" : "left");
|
|
8405
8463
|
var EditorButton = import_styled_components12.default.button.withConfig({
|
|
8406
|
-
componentId: "sc-
|
|
8464
|
+
componentId: "sc-ecbebe61-7"
|
|
8407
8465
|
})([
|
|
8408
8466
|
`padding:7px 12px;border:1px solid `,
|
|
8409
8467
|
`;border-radius:6px;background:`,
|
|
@@ -8412,17 +8470,17 @@ var EditorButton = import_styled_components12.default.button.withConfig({
|
|
|
8412
8470
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
8413
8471
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8414
8472
|
var OrderActions = import_styled_components12.default.div.withConfig({
|
|
8415
|
-
componentId: "sc-
|
|
8473
|
+
componentId: "sc-ecbebe61-8"
|
|
8416
8474
|
})([
|
|
8417
8475
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
8418
8476
|
]);
|
|
8419
8477
|
var PositionLabel = import_styled_components12.default.label.withConfig({
|
|
8420
|
-
componentId: "sc-
|
|
8478
|
+
componentId: "sc-ecbebe61-9"
|
|
8421
8479
|
})([
|
|
8422
8480
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
8423
8481
|
]);
|
|
8424
8482
|
var PositionInput = import_styled_components12.default.input.withConfig({
|
|
8425
|
-
componentId: "sc-
|
|
8483
|
+
componentId: "sc-ecbebe61-10"
|
|
8426
8484
|
})([
|
|
8427
8485
|
`width:56px;padding:5px;border:1px solid `,
|
|
8428
8486
|
`;border-radius:4px;background:`,
|
|
@@ -8431,17 +8489,17 @@ var PositionInput = import_styled_components12.default.input.withConfig({
|
|
|
8431
8489
|
`;}`
|
|
8432
8490
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8433
8491
|
var ColumnRow = import_styled_components12.default.div.withConfig({
|
|
8434
|
-
componentId: "sc-
|
|
8492
|
+
componentId: "sc-ecbebe61-11"
|
|
8435
8493
|
})([
|
|
8436
8494
|
`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;}`
|
|
8437
8495
|
]);
|
|
8438
8496
|
var PaginationControls = (0, import_styled_components12.default)(FeesAndMarginPagination).withConfig({
|
|
8439
|
-
componentId: "sc-
|
|
8497
|
+
componentId: "sc-ecbebe61-12"
|
|
8440
8498
|
})([
|
|
8441
8499
|
`align-items:center;flex-wrap:wrap;gap:16px 24px;`
|
|
8442
8500
|
]);
|
|
8443
8501
|
var PageSizeLabel = import_styled_components12.default.div.withConfig({
|
|
8444
|
-
componentId: "sc-
|
|
8502
|
+
componentId: "sc-ecbebe61-13"
|
|
8445
8503
|
})([
|
|
8446
8504
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
8447
8505
|
`;font:inherit;font-size:13px;`
|
|
@@ -8469,12 +8527,12 @@ function Position({ value: value4, max, label, onMove }) {
|
|
|
8469
8527
|
});
|
|
8470
8528
|
}
|
|
8471
8529
|
var DeleteButton = (0, import_styled_components12.default)(EditorButton).withConfig({
|
|
8472
|
-
componentId: "sc-
|
|
8530
|
+
componentId: "sc-ecbebe61-14"
|
|
8473
8531
|
})([
|
|
8474
8532
|
`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;}`
|
|
8475
8533
|
]);
|
|
8476
8534
|
var CellEditorInput = import_styled_components12.default.textarea.withConfig({
|
|
8477
|
-
componentId: "sc-
|
|
8535
|
+
componentId: "sc-ecbebe61-15"
|
|
8478
8536
|
})([
|
|
8479
8537
|
`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:`,
|
|
8480
8538
|
`;}&:focus{outline:1px solid `,
|
|
@@ -8587,6 +8645,31 @@ var columnWidths = {
|
|
|
8587
8645
|
tradingHours: 160,
|
|
8588
8646
|
priceRange: 112
|
|
8589
8647
|
};
|
|
8648
|
+
var mobileColumnWidths = {
|
|
8649
|
+
name: 88,
|
|
8650
|
+
code: 60,
|
|
8651
|
+
exchange: 60,
|
|
8652
|
+
initialMargin: 90,
|
|
8653
|
+
tradingFee: 64,
|
|
8654
|
+
tickSize: 54,
|
|
8655
|
+
margin: 70,
|
|
8656
|
+
priceUnit: 88,
|
|
8657
|
+
contractSize: 110,
|
|
8658
|
+
settlement: 92,
|
|
8659
|
+
deliveryDay: 90,
|
|
8660
|
+
tradingHours: 120,
|
|
8661
|
+
priceRange: 70
|
|
8662
|
+
};
|
|
8663
|
+
var rightAlignedColumns = /* @__PURE__ */ new Set([
|
|
8664
|
+
"initialMargin",
|
|
8665
|
+
"tradingFee",
|
|
8666
|
+
"tickSize",
|
|
8667
|
+
"margin",
|
|
8668
|
+
"settlement",
|
|
8669
|
+
"priceRange",
|
|
8670
|
+
"priceUnit",
|
|
8671
|
+
"unit"
|
|
8672
|
+
]);
|
|
8590
8673
|
function FeesTable({ value: value4, editable = false, onChange, labels, size = "md", tagOrder = [], language = "vi" }) {
|
|
8591
8674
|
const [search, setSearch] = (0, import_react18.useState)("");
|
|
8592
8675
|
const [tag, setTag] = (0, import_react18.useState)("");
|
|
@@ -8707,7 +8790,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8707
8790
|
});
|
|
8708
8791
|
const columns = value4.columns.map((column, index) => ({
|
|
8709
8792
|
key: column.key,
|
|
8710
|
-
width: columnWidths[column.key] ?? 140,
|
|
8793
|
+
width: canEdit ? columnWidths[column.key] ?? 140 : index === 0 ? 178 : 170,
|
|
8711
8794
|
fixed: index === 0 ? "left" : void 0,
|
|
8712
8795
|
title: canEdit ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(HeaderGroup, {
|
|
8713
8796
|
children: [
|
|
@@ -8739,7 +8822,10 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8739
8822
|
})
|
|
8740
8823
|
})
|
|
8741
8824
|
]
|
|
8742
|
-
}) :
|
|
8825
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeesCellContent, {
|
|
8826
|
+
$alignRight: rightAlignedColumns.has(column.key),
|
|
8827
|
+
children: column.title
|
|
8828
|
+
}),
|
|
8743
8829
|
render: (_unused, row) => canEdit ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CellEditor, {
|
|
8744
8830
|
rows: Math.max(2, (row.cells[column.key] ?? "").split("\n").length),
|
|
8745
8831
|
value: row.cells[column.key] ?? "",
|
|
@@ -8750,7 +8836,10 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8750
8836
|
[column.key]: event.target.value
|
|
8751
8837
|
}
|
|
8752
8838
|
})
|
|
8753
|
-
}) :
|
|
8839
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeesCellContent, {
|
|
8840
|
+
$alignRight: rightAlignedColumns.has(column.key),
|
|
8841
|
+
children: row.cells[column.key] ?? ""
|
|
8842
|
+
})
|
|
8754
8843
|
}));
|
|
8755
8844
|
if (canEdit) columns.push({
|
|
8756
8845
|
key: "__tags",
|
|
@@ -8914,6 +9003,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8914
9003
|
]
|
|
8915
9004
|
}),
|
|
8916
9005
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AlignedFeesTable, {
|
|
9006
|
+
$mobileColumnWidths: columns.map((column) => mobileColumnWidths[column.key] ?? 88),
|
|
8917
9007
|
"data-editable": canEdit || void 0,
|
|
8918
9008
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Table, {
|
|
8919
9009
|
ariaLabel: english ? "Fees and margin table" : "B\u1EA3ng ph\xED v\xE0 k\xFD qu\u1EF9",
|
|
@@ -8923,7 +9013,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8923
9013
|
size,
|
|
8924
9014
|
empty: labels?.empty ?? "Kh\xF4ng t\xECm th\u1EA5y h\xE0ng h\xF3a",
|
|
8925
9015
|
scroll: {
|
|
8926
|
-
x: Math.max(1440, value4.columns.reduce((sum, column) => sum + (columnWidths[column.key] ?? 140), 0) +
|
|
9016
|
+
x: canEdit ? Math.max(1440, value4.columns.reduce((sum, column) => sum + (columnWidths[column.key] ?? 140), 0) + 300) : value4.columns.length * 170 + 8
|
|
8927
9017
|
}
|
|
8928
9018
|
})
|
|
8929
9019
|
}),
|
|
@@ -10741,7 +10831,7 @@ var benefits = [
|
|
|
10741
10831
|
];
|
|
10742
10832
|
var positionSlides = [
|
|
10743
10833
|
{
|
|
10744
|
-
image: "",
|
|
10834
|
+
image: "/landing-assets/mxv-certificate-wikex.webp",
|
|
10745
10835
|
imageWidth: 238,
|
|
10746
10836
|
imageHeight: 340,
|
|
10747
10837
|
mediaType: "image",
|
|
@@ -15006,7 +15096,7 @@ function PositionSection() {
|
|
|
15006
15096
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ExactText, { cmsAs: "p", children: t(`${key}.paragraphs.1`) })
|
|
15007
15097
|
] })
|
|
15008
15098
|
] }),
|
|
15009
|
-
|
|
15099
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15010
15100
|
PositionMedia,
|
|
15011
15101
|
{
|
|
15012
15102
|
slide,
|
|
@@ -15122,7 +15212,7 @@ function PositionSection() {
|
|
|
15122
15212
|
)
|
|
15123
15213
|
] })
|
|
15124
15214
|
] }),
|
|
15125
|
-
|
|
15215
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15126
15216
|
PositionMedia,
|
|
15127
15217
|
{
|
|
15128
15218
|
slide,
|
|
@@ -16085,6 +16175,7 @@ var heroImages = [
|
|
|
16085
16175
|
image("heroLabelTwoMobileImage", "Nh\xE3n minh h\u1ECDa 2 mobile", "/landing-assets/key_mock_2_mobile.webp")
|
|
16086
16176
|
];
|
|
16087
16177
|
var positionImages = [
|
|
16178
|
+
image("positionSlide1Image", "\u1EA2nh slide 1", "/landing-assets/mxv-certificate-wikex.webp"),
|
|
16088
16179
|
image("positionSlide2Image", "\u1EA2nh slide 2", "/landing-assets/slide_img_2.webp"),
|
|
16089
16180
|
image("positionSlide3Image", "\u1EA2nh slide 3", "/landing-assets/slide_img_3.webp"),
|
|
16090
16181
|
image("positionSlide4Image", "\u1EA2nh slide 4", "/landing-assets/slide_img_4.webp")
|
|
@@ -16697,7 +16788,7 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
16697
16788
|
const fontLabel = matchedFont?.[1] ?? fontName;
|
|
16698
16789
|
const selectedFont = layout.fontFamily ?? matchedFont?.[0] ?? "";
|
|
16699
16790
|
const tooltipProps = { slotProps: { popper: { sx: { zIndex: 1800 } } } };
|
|
16700
|
-
const inputSx = { width: 52, flexShrink: 0, "& .MuiInputBase-root": { height:
|
|
16791
|
+
const inputSx = { width: 52, flexShrink: 0, "& .MuiInputBase-root": { height: 30 }, "& input": { py: 0.5, px: 0.75, fontSize: 12 } };
|
|
16701
16792
|
const groupSx = { display: "flex", alignItems: "center", gap: 0.5 };
|
|
16702
16793
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
16703
16794
|
import_material.Box,
|
|
@@ -16708,7 +16799,7 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
16708
16799
|
"data-cms-text-toolbar": true,
|
|
16709
16800
|
sx: { display: "flex", flexDirection: "column", gap: 0.5, p: 0.75, border: "1px solid", borderColor: "divider", borderRadius: 1, bgcolor: "background.paper", boxShadow: 8, color: "text.primary", maxWidth: "100%" },
|
|
16710
16801
|
children: [
|
|
16711
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_material.Box, { sx: { ...groupSx, flexWrap: "wrap",
|
|
16802
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_material.Box, { sx: { ...groupSx, flexWrap: "wrap", rowGap: 0.75, pb: 0.75, borderBottom: "1px solid", borderColor: "divider" }, children: [
|
|
16712
16803
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
16713
16804
|
import_material.Select,
|
|
16714
16805
|
{
|
|
@@ -16718,7 +16809,7 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
16718
16809
|
inputProps: { "aria-label": "Font ch\u1EEF" },
|
|
16719
16810
|
renderValue: (value4) => value4 ? CMS_TEXT_FONTS[value4] : fontLabel,
|
|
16720
16811
|
MenuProps: { disableScrollLock: true, container: () => toolbarRef.current?.ownerDocument.body ?? null, sx: { zIndex: 1600 }, slotProps: { paper: { sx: { maxHeight: 320 } } } },
|
|
16721
|
-
sx: { width:
|
|
16812
|
+
sx: { width: "auto", maxWidth: 160, height: 30, fontSize: 12, "& .MuiSelect-select": { py: 0.5, pl: 1, pr: "24px !important", overflow: "hidden", textOverflow: "ellipsis" }, "& .MuiSelect-icon": { right: 2 } },
|
|
16722
16813
|
onChange: (event) => onLayoutChange({ fontFamily: event.target.value || void 0 }),
|
|
16723
16814
|
children: [
|
|
16724
16815
|
!selectedFont && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_material.MenuItem, { value: "", sx: { fontSize: 12 }, children: fontLabel }),
|
|
@@ -16757,7 +16848,7 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
16757
16848
|
type: "number",
|
|
16758
16849
|
value: lineHeight,
|
|
16759
16850
|
slotProps: { input: { startAdornment: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_material.InputAdornment, { position: "start", sx: { mr: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_material.SvgIcon, { sx: { fontSize: 17 }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3 4 0 7h2v10H0l3 3 3-3H4V7h2L3 4zm5 2h16v2H8zm0 5h16v2H8zm0 5h16v2H8z" }) }) }) }, htmlInput: { "aria-label": "Chi\u1EC1u cao d\xF2ng", min: 0.5, max: 5, step: 0.1 } },
|
|
16760
|
-
sx: { ...inputSx, width: 78, "& .MuiInputBase-root": { height:
|
|
16851
|
+
sx: { ...inputSx, width: 78, "& .MuiInputBase-root": { height: 30, pl: 0.75 } },
|
|
16761
16852
|
onChange: (event) => {
|
|
16762
16853
|
dirtyLineHeight.current = true;
|
|
16763
16854
|
setLineHeight(event.target.value);
|
|
@@ -16842,11 +16933,14 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
|
|
|
16842
16933
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16843
16934
|
0 && (module.exports = {
|
|
16844
16935
|
CMS_ELEMENTS_FIELD,
|
|
16936
|
+
CMS_LIST_MARKERS,
|
|
16845
16937
|
CMS_TEXT_FONTS,
|
|
16846
16938
|
CMS_TEXT_LAYOUT_SUFFIX,
|
|
16847
16939
|
CmsTextToolbar,
|
|
16848
16940
|
FeesTable,
|
|
16849
16941
|
applyCmsTextLayout,
|
|
16942
|
+
cmsListAnchor,
|
|
16943
|
+
cmsListMarkerType,
|
|
16850
16944
|
cmsTextLayoutStyle,
|
|
16851
16945
|
migrateWikexChromeContent,
|
|
16852
16946
|
minimalMarketingBlocks,
|