@fctc/sme-widget-ui 2.4.0 → 2.4.2

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/widgets.mjs CHANGED
@@ -7714,7 +7714,7 @@ var vi_default = {
7714
7714
  invalid_number: "\u0110\u1ECBnh d\u1EA1ng s\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7",
7715
7715
  upload_file_placeholder: "T\u1EA3i t\u1EC7p c\u1EE7a b\u1EA1n",
7716
7716
  "no-available": "Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn n\xE0o",
7717
- paid_amount: "S\u1ED1 ti\u1EC1n \u0111\xE3 \u0111\xF3ng",
7717
+ paid_amount: "S\u1ED1 ti\u1EC1n \u0111\xE3 tr\u1EA3",
7718
7718
  remanining_amount: "S\u1ED1 ti\u1EC1n c\xF2n l\u1EA1i",
7719
7719
  only_image_accept: "Ch\u1EC9 \u0111\u01B0\u1EE3c upload file h\xECnh \u1EA3nh",
7720
7720
  "text-only": "Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp ch\u1EEF (kh\xF4ng ch\u1EE9a s\u1ED1 v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)",
@@ -12043,64 +12043,70 @@ var TableHead = (props) => {
12043
12043
  "data-type-co": col?.field?.type_co,
12044
12044
  "data-rtc-resizable": col?.name,
12045
12045
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12046
- children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
12047
- /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12048
- col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12049
- createPortal(
12050
- /* @__PURE__ */ jsx51(
12051
- M,
12052
- {
12053
- style: {
12054
- padding: "6px 12px",
12055
- fontSize: "12px",
12056
- borderRadius: "4px",
12057
- maxWidth: "200px",
12058
- whiteSpace: "wrap",
12059
- fontWeight: 400,
12060
- textTransform: "none",
12061
- zIndex: "9999"
12062
- },
12063
- id: `field-help-${col?.field?.name}`,
12064
- content: col?.field?.help,
12065
- place: "top"
12066
- }
12067
- ),
12068
- document.body
12069
- ),
12070
- /* @__PURE__ */ jsx51(
12071
- "span",
12072
- {
12073
- style: {
12074
- width: "12px",
12075
- height: "12px",
12076
- minWidth: "12px",
12077
- maxHeight: "12px",
12078
- fontSize: "8px"
12079
- },
12080
- "data-tooltip-id": `field-help-${col?.field?.name}`,
12081
- children: /* @__PURE__ */ jsx51(
12082
- "svg",
12046
+ children: /* @__PURE__ */ jsxs29(
12047
+ "div",
12048
+ {
12049
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
12050
+ children: [
12051
+ /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12052
+ col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12053
+ createPortal(
12054
+ /* @__PURE__ */ jsx51(
12055
+ M,
12056
+ {
12057
+ style: {
12058
+ padding: "6px 12px",
12059
+ fontSize: "12px",
12060
+ borderRadius: "4px",
12061
+ maxWidth: "200px",
12062
+ whiteSpace: "wrap",
12063
+ fontWeight: 400,
12064
+ textTransform: "none",
12065
+ zIndex: "9999"
12066
+ },
12067
+ id: `field-help-${col?.field?.name}`,
12068
+ content: col?.field?.help,
12069
+ place: "top"
12070
+ }
12071
+ ),
12072
+ document.body
12073
+ ),
12074
+ /* @__PURE__ */ jsx51(
12075
+ "span",
12083
12076
  {
12084
- xmlns: "http://www.w3.org/2000/svg",
12085
- width: "13",
12086
- height: "13",
12087
- viewBox: "0 0 13 13",
12088
- fill: "none",
12077
+ style: {
12078
+ width: "12px",
12079
+ height: "12px",
12080
+ minWidth: "12px",
12081
+ maxHeight: "12px",
12082
+ fontSize: "8px"
12083
+ },
12084
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
12089
12085
  children: /* @__PURE__ */ jsx51(
12090
- "path",
12086
+ "svg",
12091
12087
  {
12092
- fillRule: "evenodd",
12093
- clipRule: "evenodd",
12094
- d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12095
- fill: "#C3C3C3"
12088
+ xmlns: "http://www.w3.org/2000/svg",
12089
+ width: "13",
12090
+ height: "13",
12091
+ viewBox: "0 0 13 13",
12092
+ fill: "none",
12093
+ children: /* @__PURE__ */ jsx51(
12094
+ "path",
12095
+ {
12096
+ fillRule: "evenodd",
12097
+ clipRule: "evenodd",
12098
+ d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12099
+ fill: "#C3C3C3"
12100
+ }
12101
+ )
12096
12102
  }
12097
12103
  )
12098
12104
  }
12099
12105
  )
12100
- }
12101
- )
12102
- ] })
12103
- ] })
12106
+ ] })
12107
+ ]
12108
+ }
12109
+ )
12104
12110
  },
12105
12111
  "table-head-" + index4
12106
12112
  );
@@ -31183,54 +31189,229 @@ var FeeField = (props) => {
31183
31189
  ) + " VND";
31184
31190
  const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
31185
31191
  return /* @__PURE__ */ jsxs60(Fragment25, { children: [
31186
- value?.subtotals?.map((sub) => {
31192
+ value?.subtotals?.map((sub, idx) => {
31187
31193
  if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
31188
- return /* @__PURE__ */ jsxs60(Fragment25, { children: [
31189
- /* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
31190
- /* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
31191
- sub?.name,
31192
- ":"
31193
- ] }),
31194
- /* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
31195
- ] }),
31194
+ return /* @__PURE__ */ jsxs60("div", { children: [
31195
+ /* @__PURE__ */ jsxs60(
31196
+ "div",
31197
+ {
31198
+ style: {
31199
+ display: "grid",
31200
+ gridTemplateColumns: "1fr 1fr",
31201
+ gap: "8px 16px",
31202
+ minWidth: "300px",
31203
+ maxWidth: "fit-content",
31204
+ marginLeft: "auto"
31205
+ },
31206
+ children: [
31207
+ /* @__PURE__ */ jsxs60(
31208
+ "div",
31209
+ {
31210
+ style: {
31211
+ fontSize: "14px",
31212
+ lineHeight: "21px",
31213
+ textAlign: "right"
31214
+ },
31215
+ children: [
31216
+ sub?.name,
31217
+ ":"
31218
+ ]
31219
+ }
31220
+ ),
31221
+ /* @__PURE__ */ jsx92(
31222
+ "div",
31223
+ {
31224
+ style: {
31225
+ fontSize: "14px",
31226
+ lineHeight: "21px",
31227
+ textAlign: "right",
31228
+ color: "rgb(73,80,87)",
31229
+ fontWeight: 600
31230
+ },
31231
+ children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND"
31232
+ }
31233
+ )
31234
+ ]
31235
+ }
31236
+ ),
31196
31237
  sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs60(
31197
31238
  "div",
31198
31239
  {
31199
- className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
31240
+ style: {
31241
+ display: "grid",
31242
+ gridTemplateColumns: "1fr 1fr",
31243
+ gap: "8px 16px",
31244
+ minWidth: "300px",
31245
+ maxWidth: "fit-content",
31246
+ marginLeft: "auto",
31247
+ marginTop: "8px"
31248
+ },
31200
31249
  children: [
31201
- /* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
31202
- group?.group_name,
31203
- ":"
31204
- ] }),
31205
- /* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
31250
+ /* @__PURE__ */ jsxs60(
31251
+ "div",
31252
+ {
31253
+ style: {
31254
+ fontSize: "14px",
31255
+ lineHeight: "21px",
31256
+ textAlign: "right"
31257
+ },
31258
+ children: [
31259
+ group?.group_name,
31260
+ ":"
31261
+ ]
31262
+ }
31263
+ ),
31264
+ /* @__PURE__ */ jsx92(
31265
+ "div",
31266
+ {
31267
+ style: {
31268
+ fontSize: "14px",
31269
+ lineHeight: "21px",
31270
+ textAlign: "right",
31271
+ color: "rgb(73,80,87)"
31272
+ },
31273
+ children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND"
31274
+ }
31275
+ )
31206
31276
  ]
31207
31277
  },
31208
31278
  `tax_groups_${group?.id}`
31209
31279
  ))
31210
- ] });
31280
+ ] }, `subtotal_${idx}`);
31211
31281
  }
31212
31282
  }),
31213
- /* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
31214
- /* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
31215
- t3("total"),
31216
- ":"
31217
- ] }),
31218
- /* @__PURE__ */ jsx92("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
31219
- ] }),
31220
- /* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
31221
- /* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
31222
- t3("paid_amount"),
31223
- ":"
31224
- ] }),
31225
- /* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
31226
- ] }),
31227
- /* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
31228
- /* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
31229
- t3("remanining_amount"),
31230
- ":"
31231
- ] }),
31232
- /* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
31233
- ] })
31283
+ /* @__PURE__ */ jsxs60(
31284
+ "div",
31285
+ {
31286
+ style: {
31287
+ display: "grid",
31288
+ gridTemplateColumns: "1fr 1fr",
31289
+ gap: "8px 16px",
31290
+ minWidth: "300px",
31291
+ maxWidth: "fit-content",
31292
+ marginLeft: "auto",
31293
+ marginTop: "8px",
31294
+ paddingTop: "8px"
31295
+ },
31296
+ children: [
31297
+ /* @__PURE__ */ jsxs60(
31298
+ "div",
31299
+ {
31300
+ style: {
31301
+ fontSize: "14px",
31302
+ lineHeight: "21px",
31303
+ textAlign: "right"
31304
+ },
31305
+ children: [
31306
+ t3("total"),
31307
+ ":"
31308
+ ]
31309
+ }
31310
+ ),
31311
+ /* @__PURE__ */ jsx92(
31312
+ "div",
31313
+ {
31314
+ style: {
31315
+ fontSize: "20px",
31316
+ lineHeight: "21px",
31317
+ fontWeight: "bold",
31318
+ color: "rgb(73,80,87)",
31319
+ textAlign: "right"
31320
+ },
31321
+ children: totalAmount
31322
+ }
31323
+ )
31324
+ ]
31325
+ }
31326
+ ),
31327
+ /* @__PURE__ */ jsxs60(
31328
+ "div",
31329
+ {
31330
+ style: {
31331
+ display: "grid",
31332
+ gridTemplateColumns: "1fr 1fr",
31333
+ gap: "8px 16px",
31334
+ minWidth: "300px",
31335
+ maxWidth: "fit-content",
31336
+ marginLeft: "auto",
31337
+ marginTop: "8px",
31338
+ paddingTop: "8px",
31339
+ borderTop: "1px solid #c4c4c4ee"
31340
+ },
31341
+ children: [
31342
+ /* @__PURE__ */ jsxs60(
31343
+ "div",
31344
+ {
31345
+ style: {
31346
+ fontSize: "14px",
31347
+ lineHeight: "21px",
31348
+ textAlign: "right"
31349
+ },
31350
+ children: [
31351
+ t3("paid_amount"),
31352
+ ":"
31353
+ ]
31354
+ }
31355
+ ),
31356
+ /* @__PURE__ */ jsx92(
31357
+ "div",
31358
+ {
31359
+ style: {
31360
+ fontSize: "18px",
31361
+ lineHeight: "21px",
31362
+ fontWeight: 600,
31363
+ color: "rgb(73,80,87)",
31364
+ textAlign: "right"
31365
+ },
31366
+ children: paid_amount
31367
+ }
31368
+ )
31369
+ ]
31370
+ }
31371
+ ),
31372
+ /* @__PURE__ */ jsxs60(
31373
+ "div",
31374
+ {
31375
+ style: {
31376
+ display: "grid",
31377
+ gridTemplateColumns: "1fr 1fr",
31378
+ gap: "8px 16px",
31379
+ minWidth: "300px",
31380
+ maxWidth: "fit-content",
31381
+ marginLeft: "auto",
31382
+ marginTop: "8px"
31383
+ },
31384
+ children: [
31385
+ /* @__PURE__ */ jsxs60(
31386
+ "div",
31387
+ {
31388
+ style: {
31389
+ fontSize: "14px",
31390
+ lineHeight: "21px",
31391
+ textAlign: "right"
31392
+ },
31393
+ children: [
31394
+ t3("remanining_amount"),
31395
+ ":"
31396
+ ]
31397
+ }
31398
+ ),
31399
+ /* @__PURE__ */ jsx92(
31400
+ "div",
31401
+ {
31402
+ style: {
31403
+ fontSize: "18px",
31404
+ lineHeight: "21px",
31405
+ fontWeight: 600,
31406
+ color: "rgb(73,80,87)",
31407
+ textAlign: "right"
31408
+ },
31409
+ children: remaining_amount
31410
+ }
31411
+ )
31412
+ ]
31413
+ }
31414
+ )
31234
31415
  ] });
31235
31416
  };
31236
31417
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",