@enyxs/wikex-components 0.11.49 → 0.11.51

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.
Files changed (103) hide show
  1. package/README.md +8 -0
  2. package/assets/partner-assets/21447-29585-imgGlobal.webp +0 -0
  3. package/assets/partner-assets/21447-29585-imgHinhAnhSanPhamGiaoDich2.webp +0 -0
  4. package/assets/partner-assets/21447-29585-imgImage1.webp +0 -0
  5. package/assets/partner-assets/21447-29585-imgImage3.webp +0 -0
  6. package/assets/partner-assets/21447-29585-imgImage5.webp +0 -0
  7. package/assets/partner-assets/21447-29585-imgImage7.webp +0 -0
  8. package/assets/partner-assets/21447-29585-imgPerspective13D.webp +0 -0
  9. package/assets/partner-assets/21447-29585-imgPerspective13D1.webp +0 -0
  10. package/assets/partner-assets/21447-29585-imgPerspective13D2.webp +0 -0
  11. package/assets/partner-assets/21447-29585-imgPerspective13D3.webp +0 -0
  12. package/assets/partner-assets/21447-29585-imgPerspective13D4.webp +0 -0
  13. package/assets/partner-assets/21447-29585-imgPerspective13D5.webp +0 -0
  14. package/assets/partner-assets/21447-29585-imgPerspective13D6.webp +0 -0
  15. package/assets/partner-assets/21447-29585-imgPerspective13D7.webp +0 -0
  16. package/assets/partner-assets/21447-29585-imgPerspective13D8.webp +0 -0
  17. package/assets/partner-assets/21447-29585-imgPerspective23D.webp +0 -0
  18. package/assets/partner-assets/21447-29644-imgImage.webp +0 -0
  19. package/assets/partner-assets/21447-29644-imgMap.webp +0 -0
  20. package/assets/partner-assets/21447-29794-imgImage12.webp +0 -0
  21. package/assets/partner-assets/21447-29794-imgRectangle34624392.webp +0 -0
  22. package/assets/partner-assets/21691-46223-imgGlobal.webp +0 -0
  23. package/assets/partner-assets/21691-46223-imgHinhAnhSanPhamGiaoDich2.webp +0 -0
  24. package/assets/partner-assets/21691-46223-imgImage1.webp +0 -0
  25. package/assets/partner-assets/21691-46223-imgImage3.webp +0 -0
  26. package/assets/partner-assets/21691-46223-imgImage5.webp +0 -0
  27. package/assets/partner-assets/21691-46223-imgImage7.webp +0 -0
  28. package/assets/partner-assets/21691-46223-imgPerspective13D.webp +0 -0
  29. package/assets/partner-assets/21691-46223-imgPerspective13D1.webp +0 -0
  30. package/assets/partner-assets/21691-46223-imgPerspective13D2.webp +0 -0
  31. package/assets/partner-assets/21691-46223-imgPerspective13D3.webp +0 -0
  32. package/assets/partner-assets/21691-46223-imgPerspective13D4.webp +0 -0
  33. package/assets/partner-assets/21691-46223-imgPerspective13D5.webp +0 -0
  34. package/assets/partner-assets/21691-46223-imgPerspective13D6.webp +0 -0
  35. package/assets/partner-assets/21691-46223-imgPerspective13D7.webp +0 -0
  36. package/assets/partner-assets/21691-46223-imgPerspective13D8.webp +0 -0
  37. package/assets/partner-assets/21691-46223-imgPerspective23D.webp +0 -0
  38. package/dist/chrome-model.js +27 -2
  39. package/dist/chrome-model.mjs +27 -2
  40. package/dist/consultation-model.d.mts +2 -1
  41. package/dist/consultation-model.d.ts +2 -1
  42. package/dist/consultation-model.js +12 -2
  43. package/dist/consultation-model.mjs +10 -1
  44. package/dist/consultations.d.mts +1 -0
  45. package/dist/consultations.d.ts +1 -0
  46. package/dist/consultations.js +9 -10
  47. package/dist/consultations.mjs +9 -10
  48. package/dist/fees-model.js +5 -2
  49. package/dist/fees-model.mjs +5 -2
  50. package/dist/fees.js +44 -29
  51. package/dist/fees.mjs +44 -29
  52. package/dist/index.d.mts +2 -1
  53. package/dist/index.d.ts +2 -1
  54. package/dist/index.js +2009 -2369
  55. package/dist/index.mjs +1484 -1849
  56. package/dist/manifest.json +63 -63
  57. package/dist/partner.js +177 -134
  58. package/dist/partner.mjs +178 -135
  59. package/dist/products.js +58 -44
  60. package/dist/products.mjs +58 -44
  61. package/dist/ui.d.mts +2 -1
  62. package/dist/ui.d.ts +2 -1
  63. package/dist/ui.js +26 -12
  64. package/dist/ui.mjs +26 -12
  65. package/package.json +151 -46
  66. package/assets/partner-assets/21447-29491-imgTangTruongVangTrongMangLuoiToanCau5.png +0 -0
  67. package/assets/partner-assets/21447-29585-imgGlobal.png +0 -0
  68. package/assets/partner-assets/21447-29585-imgHinhAnhSanPhamGiaoDich2.png +0 -0
  69. package/assets/partner-assets/21447-29585-imgImage1.png +0 -0
  70. package/assets/partner-assets/21447-29585-imgImage3.png +0 -0
  71. package/assets/partner-assets/21447-29585-imgImage5.png +0 -0
  72. package/assets/partner-assets/21447-29585-imgImage7.png +0 -0
  73. package/assets/partner-assets/21447-29585-imgPerspective13D.png +0 -0
  74. package/assets/partner-assets/21447-29585-imgPerspective13D1.png +0 -0
  75. package/assets/partner-assets/21447-29585-imgPerspective13D2.png +0 -0
  76. package/assets/partner-assets/21447-29585-imgPerspective13D3.png +0 -0
  77. package/assets/partner-assets/21447-29585-imgPerspective13D4.png +0 -0
  78. package/assets/partner-assets/21447-29585-imgPerspective13D5.png +0 -0
  79. package/assets/partner-assets/21447-29585-imgPerspective13D6.png +0 -0
  80. package/assets/partner-assets/21447-29585-imgPerspective13D7.png +0 -0
  81. package/assets/partner-assets/21447-29585-imgPerspective13D8.png +0 -0
  82. package/assets/partner-assets/21447-29585-imgPerspective23D.png +0 -0
  83. package/assets/partner-assets/21447-29644-imgImage.png +0 -0
  84. package/assets/partner-assets/21447-29644-imgMap.png +0 -0
  85. package/assets/partner-assets/21447-29794-imgImage12.png +0 -0
  86. package/assets/partner-assets/21447-29794-imgRectangle34624392.png +0 -0
  87. package/assets/partner-assets/21691-46108-imgTangTruongVangTrongMangLuoiToanCau5.png +0 -0
  88. package/assets/partner-assets/21691-46223-imgGlobal.png +0 -0
  89. package/assets/partner-assets/21691-46223-imgHinhAnhSanPhamGiaoDich2.png +0 -0
  90. package/assets/partner-assets/21691-46223-imgImage1.png +0 -0
  91. package/assets/partner-assets/21691-46223-imgImage3.png +0 -0
  92. package/assets/partner-assets/21691-46223-imgImage5.png +0 -0
  93. package/assets/partner-assets/21691-46223-imgImage7.png +0 -0
  94. package/assets/partner-assets/21691-46223-imgPerspective13D.png +0 -0
  95. package/assets/partner-assets/21691-46223-imgPerspective13D1.png +0 -0
  96. package/assets/partner-assets/21691-46223-imgPerspective13D2.png +0 -0
  97. package/assets/partner-assets/21691-46223-imgPerspective13D3.png +0 -0
  98. package/assets/partner-assets/21691-46223-imgPerspective13D4.png +0 -0
  99. package/assets/partner-assets/21691-46223-imgPerspective13D5.png +0 -0
  100. package/assets/partner-assets/21691-46223-imgPerspective13D6.png +0 -0
  101. package/assets/partner-assets/21691-46223-imgPerspective13D7.png +0 -0
  102. package/assets/partner-assets/21691-46223-imgPerspective13D8.png +0 -0
  103. package/assets/partner-assets/21691-46223-imgPerspective23D.png +0 -0
package/README.md CHANGED
@@ -55,6 +55,14 @@ The package has React, Material UI and Emotion as peer dependencies, so the host
55
55
 
56
56
  ## Release
57
57
 
58
+ ### 0.11.51
59
+
60
+ Promotes the tested sitelinks prerelease to a stable npm release. Includes crawlable header parent/submenu links, independent dropdown controls, safe footer category defaults, a semantic landing H1, and optional URL-based pagination. Existing CMS navigation data remains supported. Frontend and backend can pin this published version instead of the local prerelease tarball.
61
+
62
+ ### 0.11.50
63
+
64
+ Audit fixes. Partner art ships as WebP at 2× display size (npm tarball 32 MB → 1.6 MB). Each breakpoint downloads only its own variant, and below-the-fold art loads lazily. Saved `/partner-assets/*.png` overrides are mapped to the new `.webp` files. Every CMS-controlled href now goes through the `safeCmsTextHref` link policy. `#` links and disabled header items are never marked as the current page. Package blocks render `<div>` roots instead of `<main>`. The legacy `commodity-partner-registration` block submits `kind: partner` with a region. The complaints support form is disabled with a contact note, because no backend accepts it yet. The dead Lenis/Swiper code is removed. `i18next`, `lucide`, `morphicons` and `radix-ui` are now peer dependencies (UI peers are optional for model-only consumers), and `next` is bounded to `>=16 <17`. Exports use nested `types` conditions and add `./package.json` and `./chrome/model/styles.css`. Frontend and backend must pin the same published version.
65
+
58
66
  ### 0.11.49
59
67
 
60
68
  Desktop header submenus open smoothly when moving straight from one submenu to another: the menu that just opened no longer closes itself because focus returned to the previous trigger. Escape and clicking outside still return focus to the trigger. Submenus fade and slide in (180 ms) and fade out (120 ms), with no motion when reduced motion is requested. No CMS schema or manifest changes. Frontend and backend must pin the same published version.
@@ -533,7 +533,8 @@ var translations = {
533
533
  "complaints.support.categories.trading": "H\u1ED7 tr\u1EE3 giao d\u1ECBch",
534
534
  "complaints.support.categories.payment": "H\u1ED7 tr\u1EE3 n\u1EA1p/r\xFAt ti\u1EC1n",
535
535
  "complaints.support.categories.other": "N\u1ED9i dung h\u1ED7 tr\u1EE3 kh\xE1c",
536
- "complaints.support.submit": "G\u1EEDi y\xEAu c\u1EA7u"
536
+ "complaints.support.submit": "G\u1EEDi y\xEAu c\u1EA7u",
537
+ "complaints.support.unavailable": "Bi\u1EC3u m\u1EABu h\u1ED7 tr\u1EE3 tr\u1EF1c tuy\u1EBFn ch\u01B0a \u0111\u01B0\u1EE3c k\u1EBFt n\u1ED1i. Vui l\xF2ng li\xEAn h\u1EC7 Hotline CSKH 0938427079 ho\u1EB7c email admin@wikex.vn."
537
538
  },
538
539
  en: {
539
540
  "language.current": "Current language: {{language}}",
@@ -1042,7 +1043,8 @@ var translations = {
1042
1043
  "complaints.support.categories.trading": "Trading support",
1043
1044
  "complaints.support.categories.payment": "Deposit/withdrawal support",
1044
1045
  "complaints.support.categories.other": "Other support request",
1045
- "complaints.support.submit": "Send request"
1046
+ "complaints.support.submit": "Send request",
1047
+ "complaints.support.unavailable": "Online support requests are not connected yet. Please contact customer care at 0938427079 or admin@wikex.vn."
1046
1048
  }
1047
1049
  };
1048
1050
 
@@ -1156,6 +1158,29 @@ function migrateWikexChromeContent(type, content) {
1156
1158
  delete result[key + "Color"];
1157
1159
  delete result[key + "TextLayout"];
1158
1160
  }
1161
+ if (type === "commodity-footer") for (const language of ["vi", "en"]) {
1162
+ const key = `${language}.footer.productLinks`;
1163
+ const items = parseChromeItems(result[key]);
1164
+ if (!items) continue;
1165
+ const categories = {
1166
+ "kim lo\u1EA1i": "metal",
1167
+ "metals": "metal",
1168
+ "metal": "metal",
1169
+ "n\xF4ng s\u1EA3n": "agriculture",
1170
+ "agriculture": "agriculture",
1171
+ "agricultural products": "agriculture",
1172
+ "c\xF4ng nghi\u1EC7p": "industrial",
1173
+ "nguy\xEAn li\u1EC7u c\xF4ng nghi\u1EC7p": "industrial",
1174
+ "industrial": "industrial",
1175
+ "industrial materials": "industrial",
1176
+ "n\u0103ng l\u01B0\u1EE3ng": "energy",
1177
+ "energy": "energy"
1178
+ };
1179
+ result[key] = JSON.stringify(items.map((item) => {
1180
+ const category = categories[item.label?.trim().toLocaleLowerCase("vi")];
1181
+ return category && /^\/(?:products|san-pham)\/?$/.test(item.href ?? "") ? { ...item, href: `${item.href.replace(/\/$/, "")}/?category=${category}` } : item;
1182
+ }));
1183
+ }
1159
1184
  return result;
1160
1185
  }
1161
1186
  // Annotate the CommonJS export names for ESM import in node:
@@ -507,7 +507,8 @@ var translations = {
507
507
  "complaints.support.categories.trading": "H\u1ED7 tr\u1EE3 giao d\u1ECBch",
508
508
  "complaints.support.categories.payment": "H\u1ED7 tr\u1EE3 n\u1EA1p/r\xFAt ti\u1EC1n",
509
509
  "complaints.support.categories.other": "N\u1ED9i dung h\u1ED7 tr\u1EE3 kh\xE1c",
510
- "complaints.support.submit": "G\u1EEDi y\xEAu c\u1EA7u"
510
+ "complaints.support.submit": "G\u1EEDi y\xEAu c\u1EA7u",
511
+ "complaints.support.unavailable": "Bi\u1EC3u m\u1EABu h\u1ED7 tr\u1EE3 tr\u1EF1c tuy\u1EBFn ch\u01B0a \u0111\u01B0\u1EE3c k\u1EBFt n\u1ED1i. Vui l\xF2ng li\xEAn h\u1EC7 Hotline CSKH 0938427079 ho\u1EB7c email admin@wikex.vn."
511
512
  },
512
513
  en: {
513
514
  "language.current": "Current language: {{language}}",
@@ -1016,7 +1017,8 @@ var translations = {
1016
1017
  "complaints.support.categories.trading": "Trading support",
1017
1018
  "complaints.support.categories.payment": "Deposit/withdrawal support",
1018
1019
  "complaints.support.categories.other": "Other support request",
1019
- "complaints.support.submit": "Send request"
1020
+ "complaints.support.submit": "Send request",
1021
+ "complaints.support.unavailable": "Online support requests are not connected yet. Please contact customer care at 0938427079 or admin@wikex.vn."
1020
1022
  }
1021
1023
  };
1022
1024
 
@@ -1130,6 +1132,29 @@ function migrateWikexChromeContent(type, content) {
1130
1132
  delete result[key + "Color"];
1131
1133
  delete result[key + "TextLayout"];
1132
1134
  }
1135
+ if (type === "commodity-footer") for (const language of ["vi", "en"]) {
1136
+ const key = `${language}.footer.productLinks`;
1137
+ const items = parseChromeItems(result[key]);
1138
+ if (!items) continue;
1139
+ const categories = {
1140
+ "kim lo\u1EA1i": "metal",
1141
+ "metals": "metal",
1142
+ "metal": "metal",
1143
+ "n\xF4ng s\u1EA3n": "agriculture",
1144
+ "agriculture": "agriculture",
1145
+ "agricultural products": "agriculture",
1146
+ "c\xF4ng nghi\u1EC7p": "industrial",
1147
+ "nguy\xEAn li\u1EC7u c\xF4ng nghi\u1EC7p": "industrial",
1148
+ "industrial": "industrial",
1149
+ "industrial materials": "industrial",
1150
+ "n\u0103ng l\u01B0\u1EE3ng": "energy",
1151
+ "energy": "energy"
1152
+ };
1153
+ result[key] = JSON.stringify(items.map((item) => {
1154
+ const category = categories[item.label?.trim().toLocaleLowerCase("vi")];
1155
+ return category && /^\/(?:products|san-pham)\/?$/.test(item.href ?? "") ? { ...item, href: `${item.href.replace(/\/$/, "")}/?category=${category}` } : item;
1156
+ }));
1157
+ }
1133
1158
  return result;
1134
1159
  }
1135
1160
  export {
@@ -1,5 +1,6 @@
1
1
  type RegistrationKind = 'consultation' | 'partner' | 'broker';
2
2
  declare const registrationRegions: Record<string, string>;
3
+ declare const registrationRegionsEnglish: Record<string, string>;
3
4
  declare const partnerTypes: Record<string, string>;
4
5
  declare const partnerExperiences: Record<string, string>;
5
6
  type BrokerProfile = {
@@ -44,4 +45,4 @@ type ConsultationList = {
44
45
  pageSize: number;
45
46
  };
46
47
 
47
- export { type BrokerProfile, type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions };
48
+ export { type BrokerProfile, type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions, registrationRegionsEnglish };
@@ -1,5 +1,6 @@
1
1
  type RegistrationKind = 'consultation' | 'partner' | 'broker';
2
2
  declare const registrationRegions: Record<string, string>;
3
+ declare const registrationRegionsEnglish: Record<string, string>;
3
4
  declare const partnerTypes: Record<string, string>;
4
5
  declare const partnerExperiences: Record<string, string>;
5
6
  type BrokerProfile = {
@@ -44,4 +45,4 @@ type ConsultationList = {
44
45
  pageSize: number;
45
46
  };
46
47
 
47
- export { type BrokerProfile, type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions };
48
+ export { type BrokerProfile, type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions, registrationRegionsEnglish };
@@ -24,7 +24,8 @@ __export(consultation_model_exports, {
24
24
  consultationCities: () => consultationCities,
25
25
  partnerExperiences: () => partnerExperiences,
26
26
  partnerTypes: () => partnerTypes,
27
- registrationRegions: () => registrationRegions
27
+ registrationRegions: () => registrationRegions,
28
+ registrationRegionsEnglish: () => registrationRegionsEnglish
28
29
  });
29
30
  module.exports = __toCommonJS(consultation_model_exports);
30
31
  var registrationRegions = {
@@ -35,6 +36,14 @@ var registrationRegions = {
35
36
  south: "Khu v\u1EF1c mi\u1EC1n Nam",
36
37
  mekong: "Khu v\u1EF1c mi\u1EC1n T\xE2y"
37
38
  };
39
+ var registrationRegionsEnglish = {
40
+ north: "Northern Vietnam",
41
+ "north-central": "North Central Vietnam",
42
+ central: "Central Vietnam",
43
+ highlands: "Central Highlands",
44
+ south: "Southern Vietnam",
45
+ mekong: "Mekong Delta"
46
+ };
38
47
  var partnerTypes = { individual: "C\xE1 nh\xE2n", broker: "M\xF4i gi\u1EDBi t\xE0i ch\xEDnh", professional: "Chuy\xEAn vi\xEAn m\xF4i gi\u1EDBi", other: "Kh\xE1c" };
39
48
  var partnerExperiences = { none: "Ch\u01B0a c\xF3 kinh nghi\u1EC7m", under1: "D\u01B0\u1EDBi 1 n\u0103m", oneTo3: "1\u20133 n\u0103m", over3: "Tr\xEAn 3 n\u0103m", other: "Kh\xE1c" };
40
49
  var consultationCities = { "ho-chi-minh-city": "TP. H\u1ED3 Ch\xED Minh", hanoi: "H\xE0 N\u1ED9i", other: "Kh\xE1c" };
@@ -45,5 +54,6 @@ var consultationCapitals = { "under-10m": "D\u01B0\u1EDBi 10 tri\u1EC7u", "10m-3
45
54
  consultationCities,
46
55
  partnerExperiences,
47
56
  partnerTypes,
48
- registrationRegions
57
+ registrationRegions,
58
+ registrationRegionsEnglish
49
59
  });
@@ -7,6 +7,14 @@ var registrationRegions = {
7
7
  south: "Khu v\u1EF1c mi\u1EC1n Nam",
8
8
  mekong: "Khu v\u1EF1c mi\u1EC1n T\xE2y"
9
9
  };
10
+ var registrationRegionsEnglish = {
11
+ north: "Northern Vietnam",
12
+ "north-central": "North Central Vietnam",
13
+ central: "Central Vietnam",
14
+ highlands: "Central Highlands",
15
+ south: "Southern Vietnam",
16
+ mekong: "Mekong Delta"
17
+ };
10
18
  var partnerTypes = { individual: "C\xE1 nh\xE2n", broker: "M\xF4i gi\u1EDBi t\xE0i ch\xEDnh", professional: "Chuy\xEAn vi\xEAn m\xF4i gi\u1EDBi", other: "Kh\xE1c" };
11
19
  var partnerExperiences = { none: "Ch\u01B0a c\xF3 kinh nghi\u1EC7m", under1: "D\u01B0\u1EDBi 1 n\u0103m", oneTo3: "1\u20133 n\u0103m", over3: "Tr\xEAn 3 n\u0103m", other: "Kh\xE1c" };
12
20
  var consultationCities = { "ho-chi-minh-city": "TP. H\u1ED3 Ch\xED Minh", hanoi: "H\xE0 N\u1ED9i", other: "Kh\xE1c" };
@@ -16,5 +24,6 @@ export {
16
24
  consultationCities,
17
25
  partnerExperiences,
18
26
  partnerTypes,
19
- registrationRegions
27
+ registrationRegions,
28
+ registrationRegionsEnglish
20
29
  };
@@ -3,6 +3,7 @@ import { RegistrationKind, ConsultationList, Consultation } from './consultation
3
3
  export { ConsultationSubmission } from './consultation-model.mjs';
4
4
 
5
5
  type ConsultationManagerProps = {
6
+ /** Broker registrations are no longer stored by the CMS (they go to the broker API), so `broker` renders like `consultation`. */
6
7
  kind?: RegistrationKind;
7
8
  data: ConsultationList;
8
9
  search: string;
@@ -3,6 +3,7 @@ import { RegistrationKind, ConsultationList, Consultation } from './consultation
3
3
  export { ConsultationSubmission } from './consultation-model.js';
4
4
 
5
5
  type ConsultationManagerProps = {
6
+ /** Broker registrations are no longer stored by the CMS (they go to the broker API), so `broker` renders like `consultation`. */
6
7
  kind?: RegistrationKind;
7
8
  data: ConsultationList;
8
9
  search: string;
@@ -64,8 +64,7 @@ function ConsultationManager({
64
64
  onDismissNotice
65
65
  }) {
66
66
  const isPartner = kind === "partner";
67
- const isBroker = kind === "broker";
68
- const title = isBroker ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c \u2014 Wikex VN" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n \u2014 Trang ch\u1EE7";
67
+ const title = isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c \u2014 Wikex VN" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n \u2014 Trang ch\u1EE7";
69
68
  const [editing, setEditing] = (0, import_react.useState)(null);
70
69
  const [deleting, setDeleting] = (0, import_react.useState)(null);
71
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 3, sx: { minWidth: 0 }, children: [
@@ -81,7 +80,7 @@ function ConsultationManager({
81
80
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Card, { sx: { p: 3 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TextField, { size: "small", fullWidth: true, label: "T\xECm theo t\xEAn, \u0111i\u1EC7n tho\u1EA1i ho\u1EB7c email", value: search, disabled: busy, onChange: (event) => onSearch(event.target.value) }) }) }),
82
81
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { "aria-busy": loading, sx: { opacity: loading ? 0.65 : 1 }, children: [
83
82
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Table, { "aria-label": title, sx: { minWidth: 1050 }, children: [
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", isBroker ? "Trang g\u1EEDi" : "Khu v\u1EF1c", isBroker ? "L\u1EDDi nh\u1EAFn" : isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Ng\xE0y c\u1EADp nh\u1EADt", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: title2 }, title2)) }) }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", "Khu v\u1EF1c", isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Ng\xE0y c\u1EADp nh\u1EADt", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: title2 }, title2)) }) }),
85
84
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableBody, { children: [
86
85
  data.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableRow, { children: [
87
86
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: [
@@ -92,8 +91,8 @@ function ConsultationManager({
92
91
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", children: item.phone }),
93
92
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: item.email })
94
93
  ] }),
95
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: isBroker ? item.sourcePath : isPartner ? registrationRegions[item.region] || "Ch\u01B0a cung c\u1EA5p" : city(item.city) }),
96
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: isBroker ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", sx: { whiteSpace: "pre-wrap" }, children: item.message || "Ch\u01B0a cung c\u1EA5p" }) : isPartner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: isPartner ? registrationRegions[item.region] || "Ch\u01B0a cung c\u1EA5p" : city(item.city) }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: isPartner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
97
96
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", children: partnerTypes[item.partner] || "Ch\u01B0a cung c\u1EA5p" }),
98
97
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", children: partnerExperiences[item.experience] || "Ch\u01B0a cung c\u1EA5p" })
99
98
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
@@ -143,13 +142,13 @@ function ConsultationManager({
143
142
  slotProps: { paper: { sx: { borderRadius: 3, m: { xs: 1.5, sm: 4 }, width: { xs: "calc(100% - 24px)", sm: "100%" }, maxHeight: "calc(100% - 32px)" } } },
144
143
  children: [
145
144
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.DialogTitle, { id: "registration-detail-title", sx: { px: { xs: 2.5, sm: 3 }, pt: 3, pb: 2 }, children: [
146
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "span", variant: "overline", color: "text.secondary", children: isBroker ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n" }),
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "span", variant: "overline", color: "text.secondary", children: isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n" }),
147
146
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: "row", spacing: 2, alignItems: "center", sx: { mt: 1 }, children: [
148
147
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Avatar, { sx: { width: 52, height: 52, bgcolor: "primary.lighter", color: "primary.dark", fontWeight: 700 }, children: editing?.name.trim().split(/\s+/).slice(-2).map((part) => part[0]).join("").toUpperCase() }),
149
148
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { minWidth: 0, flex: 1 }, children: [
150
149
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "span", variant: "h5", sx: { display: "block", overflowWrap: "anywhere" }, children: editing?.name }),
151
150
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { component: "span", variant: "body2", color: "text.secondary", children: [
152
- isBroker ? "\u0110\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "Wikex VN" : "Trang ch\u1EE7",
151
+ isPartner ? "Wikex VN" : "Trang ch\u1EE7",
153
152
  " \xB7 ",
154
153
  editing && date(editing.updatedAt)
155
154
  ] })
@@ -163,7 +162,7 @@ function ConsultationManager({
163
162
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: "Th\xF4ng tin li\xEAn h\u1EC7" }),
164
163
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
165
164
  { label: "\u0110i\u1EC7n tho\u1EA1i", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `tel:${editing.phone.replace(/[^+0-9]/g, "")}`, underline: "hover", color: "text.primary", children: editing.phone }) },
166
- ...!isBroker ? [{ label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) }] : [],
165
+ { label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) },
167
166
  { label: "Email", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `mailto:${editing.email}`, underline: "hover", color: "text.primary", children: editing.email }), full: true }
168
167
  ].map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { minWidth: 0, gridColumn: field.full ? "1 / -1" : void 0 }, children: [
169
168
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 0.5 }, children: field.label }),
@@ -171,8 +170,8 @@ function ConsultationManager({
171
170
  ] }, field.label)) })
172
171
  ] }),
173
172
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
174
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isBroker ? "L\u1EDDi nh\u1EAFn h\u1EE3p t\xE1c" : isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
175
- isBroker ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", sx: { whiteSpace: "pre-wrap", overflowWrap: "anywhere" }, children: editing.message || "Ch\u01B0a cung c\u1EA5p" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
174
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
176
175
  (isPartner ? [
177
176
  { label: "\u0110\u1ED1i t\xE1c", value: partnerTypes[editing.partner] || "Ch\u01B0a cung c\u1EA5p" },
178
177
  { label: "Kinh nghi\u1EC7m", value: partnerExperiences[editing.experience] || "Ch\u01B0a cung c\u1EA5p" }
@@ -39,8 +39,7 @@ function ConsultationManager({
39
39
  onDismissNotice
40
40
  }) {
41
41
  const isPartner = kind === "partner";
42
- const isBroker = kind === "broker";
43
- const title = isBroker ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c \u2014 Wikex VN" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n \u2014 Trang ch\u1EE7";
42
+ const title = isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c \u2014 Wikex VN" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n \u2014 Trang ch\u1EE7";
44
43
  const [editing, setEditing] = useState(null);
45
44
  const [deleting, setDeleting] = useState(null);
46
45
  return /* @__PURE__ */ jsxs(Stack, { spacing: 3, sx: { minWidth: 0 }, children: [
@@ -56,7 +55,7 @@ function ConsultationManager({
56
55
  /* @__PURE__ */ jsx(Card, { sx: { p: 3 }, children: /* @__PURE__ */ jsx(Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, children: /* @__PURE__ */ jsx(TextField, { size: "small", fullWidth: true, label: "T\xECm theo t\xEAn, \u0111i\u1EC7n tho\u1EA1i ho\u1EB7c email", value: search, disabled: busy, onChange: (event) => onSearch(event.target.value) }) }) }),
57
56
  /* @__PURE__ */ jsxs(Card, { "aria-busy": loading, sx: { opacity: loading ? 0.65 : 1 }, children: [
58
57
  /* @__PURE__ */ jsx(Box, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ jsxs(Table, { "aria-label": title, sx: { minWidth: 1050 }, children: [
59
- /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", isBroker ? "Trang g\u1EEDi" : "Khu v\u1EF1c", isBroker ? "L\u1EDDi nh\u1EAFn" : isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Ng\xE0y c\u1EADp nh\u1EADt", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ jsx(TableCell, { children: title2 }, title2)) }) }),
58
+ /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", "Khu v\u1EF1c", isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Ng\xE0y c\u1EADp nh\u1EADt", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ jsx(TableCell, { children: title2 }, title2)) }) }),
60
59
  /* @__PURE__ */ jsxs(TableBody, { children: [
61
60
  data.items.map((item) => /* @__PURE__ */ jsxs(TableRow, { children: [
62
61
  /* @__PURE__ */ jsxs(TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: [
@@ -67,8 +66,8 @@ function ConsultationManager({
67
66
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: item.phone }),
68
67
  /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: item.email })
69
68
  ] }),
70
- /* @__PURE__ */ jsx(TableCell, { children: isBroker ? item.sourcePath : isPartner ? registrationRegions[item.region] || "Ch\u01B0a cung c\u1EA5p" : city(item.city) }),
71
- /* @__PURE__ */ jsx(TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: isBroker ? /* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { whiteSpace: "pre-wrap" }, children: item.message || "Ch\u01B0a cung c\u1EA5p" }) : isPartner ? /* @__PURE__ */ jsxs(Fragment, { children: [
69
+ /* @__PURE__ */ jsx(TableCell, { children: isPartner ? registrationRegions[item.region] || "Ch\u01B0a cung c\u1EA5p" : city(item.city) }),
70
+ /* @__PURE__ */ jsx(TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: isPartner ? /* @__PURE__ */ jsxs(Fragment, { children: [
72
71
  /* @__PURE__ */ jsx(Typography, { variant: "body2", children: partnerTypes[item.partner] || "Ch\u01B0a cung c\u1EA5p" }),
73
72
  /* @__PURE__ */ jsx(Typography, { variant: "caption", children: partnerExperiences[item.experience] || "Ch\u01B0a cung c\u1EA5p" })
74
73
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -118,13 +117,13 @@ function ConsultationManager({
118
117
  slotProps: { paper: { sx: { borderRadius: 3, m: { xs: 1.5, sm: 4 }, width: { xs: "calc(100% - 24px)", sm: "100%" }, maxHeight: "calc(100% - 32px)" } } },
119
118
  children: [
120
119
  /* @__PURE__ */ jsxs(DialogTitle, { id: "registration-detail-title", sx: { px: { xs: 2.5, sm: 3 }, pt: 3, pb: 2 }, children: [
121
- /* @__PURE__ */ jsx(Typography, { component: "span", variant: "overline", color: "text.secondary", children: isBroker ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n" }),
120
+ /* @__PURE__ */ jsx(Typography, { component: "span", variant: "overline", color: "text.secondary", children: isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n" }),
122
121
  /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 2, alignItems: "center", sx: { mt: 1 }, children: [
123
122
  /* @__PURE__ */ jsx(Avatar, { sx: { width: 52, height: 52, bgcolor: "primary.lighter", color: "primary.dark", fontWeight: 700 }, children: editing?.name.trim().split(/\s+/).slice(-2).map((part) => part[0]).join("").toUpperCase() }),
124
123
  /* @__PURE__ */ jsxs(Box, { sx: { minWidth: 0, flex: 1 }, children: [
125
124
  /* @__PURE__ */ jsx(Typography, { component: "span", variant: "h5", sx: { display: "block", overflowWrap: "anywhere" }, children: editing?.name }),
126
125
  /* @__PURE__ */ jsxs(Typography, { component: "span", variant: "body2", color: "text.secondary", children: [
127
- isBroker ? "\u0110\u1ED1i t\xE1c m\xF4i gi\u1EDBi" : isPartner ? "Wikex VN" : "Trang ch\u1EE7",
126
+ isPartner ? "Wikex VN" : "Trang ch\u1EE7",
128
127
  " \xB7 ",
129
128
  editing && date(editing.updatedAt)
130
129
  ] })
@@ -138,7 +137,7 @@ function ConsultationManager({
138
137
  /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { mb: 2 }, children: "Th\xF4ng tin li\xEAn h\u1EC7" }),
139
138
  /* @__PURE__ */ jsx(Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
140
139
  { label: "\u0110i\u1EC7n tho\u1EA1i", value: /* @__PURE__ */ jsx(Link, { href: `tel:${editing.phone.replace(/[^+0-9]/g, "")}`, underline: "hover", color: "text.primary", children: editing.phone }) },
141
- ...!isBroker ? [{ label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) }] : [],
140
+ { label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) },
142
141
  { label: "Email", value: /* @__PURE__ */ jsx(Link, { href: `mailto:${editing.email}`, underline: "hover", color: "text.primary", children: editing.email }), full: true }
143
142
  ].map((field) => /* @__PURE__ */ jsxs(Box, { sx: { minWidth: 0, gridColumn: field.full ? "1 / -1" : void 0 }, children: [
144
143
  /* @__PURE__ */ jsx(Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 0.5 }, children: field.label }),
@@ -146,8 +145,8 @@ function ConsultationManager({
146
145
  ] }, field.label)) })
147
146
  ] }),
148
147
  /* @__PURE__ */ jsxs(Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
149
- /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isBroker ? "L\u1EDDi nh\u1EAFn h\u1EE3p t\xE1c" : isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
150
- isBroker ? /* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { whiteSpace: "pre-wrap", overflowWrap: "anywhere" }, children: editing.message || "Ch\u01B0a cung c\u1EA5p" }) : /* @__PURE__ */ jsxs(Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
148
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
149
+ /* @__PURE__ */ jsxs(Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
151
150
  (isPartner ? [
152
151
  { label: "\u0110\u1ED1i t\xE1c", value: partnerTypes[editing.partner] || "Ch\u01B0a cung c\u1EA5p" },
153
152
  { label: "Kinh nghi\u1EC7m", value: partnerExperiences[editing.experience] || "Ch\u01B0a cung c\u1EA5p" }
@@ -120,7 +120,8 @@ function normalizeFeesSearch(value) {
120
120
  }
121
121
  function filterFeesRows(data, search, tag) {
122
122
  const query = normalizeFeesSearch(search);
123
- return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
123
+ const keys = data.columns.filter((column) => !column.hidden).map((column) => column.key);
124
+ return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || keys.some((key) => normalizeFeesSearch(row.cells[key] ?? "").includes(query))));
124
125
  }
125
126
  function sortFeesRowsByName(rows, language = "vi") {
126
127
  const collator = new Intl.Collator(language, { sensitivity: "base", numeric: true });
@@ -251,7 +252,9 @@ function validateFeesTableValue(value, allowBackup) {
251
252
  apiValues[key] = value2;
252
253
  }
253
254
  }
254
- return { id: row.id, cells: { ...row.cells }, tags: [...row.tags], ...apiValues ? { apiValues } : {}, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
255
+ const cells = {};
256
+ for (const [key, cell] of Object.entries(row.cells)) if (keys.has(key)) Object.defineProperty(cells, key, { value: cell, enumerable: true, configurable: true, writable: true });
257
+ return { id: row.id, cells, tags: [...row.tags], ...apiValues ? { apiValues } : {}, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
255
258
  });
256
259
  if (value.dataSource !== void 0 && value.dataSource !== "manual" && value.dataSource !== "wikex-api") throw new Error("Ngu\u1ED3n d\u1EEF li\u1EC7u b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7.");
257
260
  if (value.lastSyncedAt !== void 0 && (typeof value.lastSyncedAt !== "string" || !/^\d{4}-\d{2}-\d{2}T/.test(value.lastSyncedAt) || !Number.isFinite(Date.parse(value.lastSyncedAt)))) throw new Error("Th\u1EDDi \u0111i\u1EC3m \u0111\u1ED3ng b\u1ED9 b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7.");
@@ -74,7 +74,8 @@ function normalizeFeesSearch(value) {
74
74
  }
75
75
  function filterFeesRows(data, search, tag) {
76
76
  const query = normalizeFeesSearch(search);
77
- return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
77
+ const keys = data.columns.filter((column) => !column.hidden).map((column) => column.key);
78
+ return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || keys.some((key) => normalizeFeesSearch(row.cells[key] ?? "").includes(query))));
78
79
  }
79
80
  function sortFeesRowsByName(rows, language = "vi") {
80
81
  const collator = new Intl.Collator(language, { sensitivity: "base", numeric: true });
@@ -205,7 +206,9 @@ function validateFeesTableValue(value, allowBackup) {
205
206
  apiValues[key] = value2;
206
207
  }
207
208
  }
208
- return { id: row.id, cells: { ...row.cells }, tags: [...row.tags], ...apiValues ? { apiValues } : {}, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
209
+ const cells = {};
210
+ for (const [key, cell] of Object.entries(row.cells)) if (keys.has(key)) Object.defineProperty(cells, key, { value: cell, enumerable: true, configurable: true, writable: true });
211
+ return { id: row.id, cells, tags: [...row.tags], ...apiValues ? { apiValues } : {}, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
209
212
  });
210
213
  if (value.dataSource !== void 0 && value.dataSource !== "manual" && value.dataSource !== "wikex-api") throw new Error("Ngu\u1ED3n d\u1EEF li\u1EC7u b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7.");
211
214
  if (value.lastSyncedAt !== void 0 && (typeof value.lastSyncedAt !== "string" || !/^\d{4}-\d{2}-\d{2}T/.test(value.lastSyncedAt) || !Number.isFinite(Date.parse(value.lastSyncedAt)))) throw new Error("Th\u1EDDi \u0111i\u1EC3m \u0111\u1ED3ng b\u1ED9 b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7.");