@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.js CHANGED
@@ -7777,7 +7777,7 @@ var vi_default = {
7777
7777
  invalid_number: "\u0110\u1ECBnh d\u1EA1ng s\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7",
7778
7778
  upload_file_placeholder: "T\u1EA3i t\u1EC7p c\u1EE7a b\u1EA1n",
7779
7779
  "no-available": "Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn n\xE0o",
7780
- paid_amount: "S\u1ED1 ti\u1EC1n \u0111\xE3 \u0111\xF3ng",
7780
+ paid_amount: "S\u1ED1 ti\u1EC1n \u0111\xE3 tr\u1EA3",
7781
7781
  remanining_amount: "S\u1ED1 ti\u1EC1n c\xF2n l\u1EA1i",
7782
7782
  only_image_accept: "Ch\u1EC9 \u0111\u01B0\u1EE3c upload file h\xECnh \u1EA3nh",
7783
7783
  "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)",
@@ -12106,64 +12106,70 @@ var TableHead = (props) => {
12106
12106
  "data-type-co": col?.field?.type_co,
12107
12107
  "data-rtc-resizable": col?.name,
12108
12108
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12109
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
12110
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12111
- col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
12112
- (0, import_react_dom.createPortal)(
12113
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12114
- M,
12115
- {
12116
- style: {
12117
- padding: "6px 12px",
12118
- fontSize: "12px",
12119
- borderRadius: "4px",
12120
- maxWidth: "200px",
12121
- whiteSpace: "wrap",
12122
- fontWeight: 400,
12123
- textTransform: "none",
12124
- zIndex: "9999"
12125
- },
12126
- id: `field-help-${col?.field?.name}`,
12127
- content: col?.field?.help,
12128
- place: "top"
12129
- }
12130
- ),
12131
- document.body
12132
- ),
12133
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12134
- "span",
12135
- {
12136
- style: {
12137
- width: "12px",
12138
- height: "12px",
12139
- minWidth: "12px",
12140
- maxHeight: "12px",
12141
- fontSize: "8px"
12142
- },
12143
- "data-tooltip-id": `field-help-${col?.field?.name}`,
12144
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12145
- "svg",
12109
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
12110
+ "div",
12111
+ {
12112
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
12113
+ children: [
12114
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12115
+ col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
12116
+ (0, import_react_dom.createPortal)(
12117
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12118
+ M,
12119
+ {
12120
+ style: {
12121
+ padding: "6px 12px",
12122
+ fontSize: "12px",
12123
+ borderRadius: "4px",
12124
+ maxWidth: "200px",
12125
+ whiteSpace: "wrap",
12126
+ fontWeight: 400,
12127
+ textTransform: "none",
12128
+ zIndex: "9999"
12129
+ },
12130
+ id: `field-help-${col?.field?.name}`,
12131
+ content: col?.field?.help,
12132
+ place: "top"
12133
+ }
12134
+ ),
12135
+ document.body
12136
+ ),
12137
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12138
+ "span",
12146
12139
  {
12147
- xmlns: "http://www.w3.org/2000/svg",
12148
- width: "13",
12149
- height: "13",
12150
- viewBox: "0 0 13 13",
12151
- fill: "none",
12140
+ style: {
12141
+ width: "12px",
12142
+ height: "12px",
12143
+ minWidth: "12px",
12144
+ maxHeight: "12px",
12145
+ fontSize: "8px"
12146
+ },
12147
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
12152
12148
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12153
- "path",
12149
+ "svg",
12154
12150
  {
12155
- fillRule: "evenodd",
12156
- clipRule: "evenodd",
12157
- 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",
12158
- fill: "#C3C3C3"
12151
+ xmlns: "http://www.w3.org/2000/svg",
12152
+ width: "13",
12153
+ height: "13",
12154
+ viewBox: "0 0 13 13",
12155
+ fill: "none",
12156
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12157
+ "path",
12158
+ {
12159
+ fillRule: "evenodd",
12160
+ clipRule: "evenodd",
12161
+ 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",
12162
+ fill: "#C3C3C3"
12163
+ }
12164
+ )
12159
12165
  }
12160
12166
  )
12161
12167
  }
12162
12168
  )
12163
- }
12164
- )
12165
- ] })
12166
- ] })
12169
+ ] })
12170
+ ]
12171
+ }
12172
+ )
12167
12173
  },
12168
12174
  "table-head-" + index4
12169
12175
  );
@@ -31246,54 +31252,229 @@ var FeeField = (props) => {
31246
31252
  ) + " VND";
31247
31253
  const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
31248
31254
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
31249
- value?.subtotals?.map((sub) => {
31255
+ value?.subtotals?.map((sub, idx) => {
31250
31256
  if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
31251
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
31252
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
31253
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
31254
- sub?.name,
31255
- ":"
31256
- ] }),
31257
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
31258
- ] }),
31257
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { children: [
31258
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31259
+ "div",
31260
+ {
31261
+ style: {
31262
+ display: "grid",
31263
+ gridTemplateColumns: "1fr 1fr",
31264
+ gap: "8px 16px",
31265
+ minWidth: "300px",
31266
+ maxWidth: "fit-content",
31267
+ marginLeft: "auto"
31268
+ },
31269
+ children: [
31270
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31271
+ "div",
31272
+ {
31273
+ style: {
31274
+ fontSize: "14px",
31275
+ lineHeight: "21px",
31276
+ textAlign: "right"
31277
+ },
31278
+ children: [
31279
+ sub?.name,
31280
+ ":"
31281
+ ]
31282
+ }
31283
+ ),
31284
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
31285
+ "div",
31286
+ {
31287
+ style: {
31288
+ fontSize: "14px",
31289
+ lineHeight: "21px",
31290
+ textAlign: "right",
31291
+ color: "rgb(73,80,87)",
31292
+ fontWeight: 600
31293
+ },
31294
+ children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND"
31295
+ }
31296
+ )
31297
+ ]
31298
+ }
31299
+ ),
31259
31300
  sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31260
31301
  "div",
31261
31302
  {
31262
- className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
31303
+ style: {
31304
+ display: "grid",
31305
+ gridTemplateColumns: "1fr 1fr",
31306
+ gap: "8px 16px",
31307
+ minWidth: "300px",
31308
+ maxWidth: "fit-content",
31309
+ marginLeft: "auto",
31310
+ marginTop: "8px"
31311
+ },
31263
31312
  children: [
31264
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
31265
- group?.group_name,
31266
- ":"
31267
- ] }),
31268
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
31313
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31314
+ "div",
31315
+ {
31316
+ style: {
31317
+ fontSize: "14px",
31318
+ lineHeight: "21px",
31319
+ textAlign: "right"
31320
+ },
31321
+ children: [
31322
+ group?.group_name,
31323
+ ":"
31324
+ ]
31325
+ }
31326
+ ),
31327
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
31328
+ "div",
31329
+ {
31330
+ style: {
31331
+ fontSize: "14px",
31332
+ lineHeight: "21px",
31333
+ textAlign: "right",
31334
+ color: "rgb(73,80,87)"
31335
+ },
31336
+ children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND"
31337
+ }
31338
+ )
31269
31339
  ]
31270
31340
  },
31271
31341
  `tax_groups_${group?.id}`
31272
31342
  ))
31273
- ] });
31343
+ ] }, `subtotal_${idx}`);
31274
31344
  }
31275
31345
  }),
31276
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
31277
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
31278
- t3("total"),
31279
- ":"
31280
- ] }),
31281
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
31282
- ] }),
31283
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
31284
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
31285
- t3("paid_amount"),
31286
- ":"
31287
- ] }),
31288
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
31289
- ] }),
31290
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("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: [
31291
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
31292
- t3("remanining_amount"),
31293
- ":"
31294
- ] }),
31295
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
31296
- ] })
31346
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31347
+ "div",
31348
+ {
31349
+ style: {
31350
+ display: "grid",
31351
+ gridTemplateColumns: "1fr 1fr",
31352
+ gap: "8px 16px",
31353
+ minWidth: "300px",
31354
+ maxWidth: "fit-content",
31355
+ marginLeft: "auto",
31356
+ marginTop: "8px",
31357
+ paddingTop: "8px"
31358
+ },
31359
+ children: [
31360
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31361
+ "div",
31362
+ {
31363
+ style: {
31364
+ fontSize: "14px",
31365
+ lineHeight: "21px",
31366
+ textAlign: "right"
31367
+ },
31368
+ children: [
31369
+ t3("total"),
31370
+ ":"
31371
+ ]
31372
+ }
31373
+ ),
31374
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
31375
+ "div",
31376
+ {
31377
+ style: {
31378
+ fontSize: "20px",
31379
+ lineHeight: "21px",
31380
+ fontWeight: "bold",
31381
+ color: "rgb(73,80,87)",
31382
+ textAlign: "right"
31383
+ },
31384
+ children: totalAmount
31385
+ }
31386
+ )
31387
+ ]
31388
+ }
31389
+ ),
31390
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31391
+ "div",
31392
+ {
31393
+ style: {
31394
+ display: "grid",
31395
+ gridTemplateColumns: "1fr 1fr",
31396
+ gap: "8px 16px",
31397
+ minWidth: "300px",
31398
+ maxWidth: "fit-content",
31399
+ marginLeft: "auto",
31400
+ marginTop: "8px",
31401
+ paddingTop: "8px",
31402
+ borderTop: "1px solid #c4c4c4ee"
31403
+ },
31404
+ children: [
31405
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31406
+ "div",
31407
+ {
31408
+ style: {
31409
+ fontSize: "14px",
31410
+ lineHeight: "21px",
31411
+ textAlign: "right"
31412
+ },
31413
+ children: [
31414
+ t3("paid_amount"),
31415
+ ":"
31416
+ ]
31417
+ }
31418
+ ),
31419
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
31420
+ "div",
31421
+ {
31422
+ style: {
31423
+ fontSize: "18px",
31424
+ lineHeight: "21px",
31425
+ fontWeight: 600,
31426
+ color: "rgb(73,80,87)",
31427
+ textAlign: "right"
31428
+ },
31429
+ children: paid_amount
31430
+ }
31431
+ )
31432
+ ]
31433
+ }
31434
+ ),
31435
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31436
+ "div",
31437
+ {
31438
+ style: {
31439
+ display: "grid",
31440
+ gridTemplateColumns: "1fr 1fr",
31441
+ gap: "8px 16px",
31442
+ minWidth: "300px",
31443
+ maxWidth: "fit-content",
31444
+ marginLeft: "auto",
31445
+ marginTop: "8px"
31446
+ },
31447
+ children: [
31448
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
31449
+ "div",
31450
+ {
31451
+ style: {
31452
+ fontSize: "14px",
31453
+ lineHeight: "21px",
31454
+ textAlign: "right"
31455
+ },
31456
+ children: [
31457
+ t3("remanining_amount"),
31458
+ ":"
31459
+ ]
31460
+ }
31461
+ ),
31462
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
31463
+ "div",
31464
+ {
31465
+ style: {
31466
+ fontSize: "18px",
31467
+ lineHeight: "21px",
31468
+ fontWeight: 600,
31469
+ color: "rgb(73,80,87)",
31470
+ textAlign: "right"
31471
+ },
31472
+ children: remaining_amount
31473
+ }
31474
+ )
31475
+ ]
31476
+ }
31477
+ )
31297
31478
  ] });
31298
31479
  };
31299
31480