@eztrak/shared 0.17.0 → 0.17.1
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/{chunk-KJWCRX6F.mjs → chunk-4ASJWHN3.mjs} +3 -6
- package/dist/chunk-4ASJWHN3.mjs.map +1 -0
- package/dist/{chunk-HAW3AKJP.mjs → chunk-LS7AI4ER.mjs} +2 -2
- package/dist/{chunk-A5BBQ7X5.mjs → chunk-QOYMQFOB.mjs} +16 -2
- package/dist/chunk-QOYMQFOB.mjs.map +1 -0
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +16 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/{handleApiError-SHMjCJHj.d.mts → handleApiError-BIAaN76q.d.mts} +7 -0
- package/dist/{handleApiError-SHMjCJHj.d.ts → handleApiError-BIAaN76q.d.ts} +7 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +15 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-A5BBQ7X5.mjs.map +0 -1
- package/dist/chunk-KJWCRX6F.mjs.map +0 -1
- /package/dist/{chunk-HAW3AKJP.mjs.map → chunk-LS7AI4ER.mjs.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -432,6 +432,12 @@ function ensureConfirmAlertStyles() {
|
|
|
432
432
|
.ez-confirm-cancel:hover {
|
|
433
433
|
background: #f9fafb !important;
|
|
434
434
|
}
|
|
435
|
+
.ez-confirm-popup .swal2-input {
|
|
436
|
+
margin-top: var(--ez-confirm-input-mt, 0) !important;
|
|
437
|
+
margin-right: var(--ez-confirm-input-mr, 0) !important;
|
|
438
|
+
margin-bottom: var(--ez-confirm-input-mb, 1.25rem) !important;
|
|
439
|
+
margin-left: var(--ez-confirm-input-ml, 0) !important;
|
|
440
|
+
}
|
|
435
441
|
`;
|
|
436
442
|
document.head.appendChild(style);
|
|
437
443
|
}
|
|
@@ -469,7 +475,7 @@ function confirmationAlert(onConfirm, options = {}) {
|
|
|
469
475
|
hasInput ? "Confirmation Required" : "Delete this item"
|
|
470
476
|
);
|
|
471
477
|
const text = options.text;
|
|
472
|
-
const html = options.html;
|
|
478
|
+
const html = options.html ?? options.children;
|
|
473
479
|
const icon = pick(options.icon, vd.icon, "warning");
|
|
474
480
|
const iconHtml = pick(options.iconHtml, vd.iconHtml, void 0);
|
|
475
481
|
const iconColor = pick(options.iconColor, vd.iconColor, BRAND_ORANGE);
|
|
@@ -510,6 +516,10 @@ function confirmationAlert(onConfirm, options = {}) {
|
|
|
510
516
|
const width = options.width;
|
|
511
517
|
const borderRadius = cssSize(options.borderRadius, "1rem");
|
|
512
518
|
const buttonBorderRadius = cssSize(options.buttonBorderRadius, "0.5rem");
|
|
519
|
+
const inputMarginTop = cssSize(options.inputMarginTop, "0");
|
|
520
|
+
const inputMarginRight = cssSize(options.inputMarginRight, "0");
|
|
521
|
+
const inputMarginBottom = cssSize(options.inputMarginBottom, "1.25rem");
|
|
522
|
+
const inputMarginLeft = cssSize(options.inputMarginLeft, "0");
|
|
513
523
|
const onCancel = options.onCancel;
|
|
514
524
|
const useLoader = showLoaderOnConfirm || hasInput;
|
|
515
525
|
const inputHtml = html ?? (hasInput ? `
|
|
@@ -550,6 +560,10 @@ function confirmationAlert(onConfirm, options = {}) {
|
|
|
550
560
|
popup.style.setProperty("--ez-confirm-icon-bg", iconBgColor);
|
|
551
561
|
popup.style.setProperty("--ez-confirm-radius", borderRadius);
|
|
552
562
|
popup.style.setProperty("--ez-confirm-btn-radius", buttonBorderRadius);
|
|
563
|
+
popup.style.setProperty("--ez-confirm-input-mt", inputMarginTop);
|
|
564
|
+
popup.style.setProperty("--ez-confirm-input-mr", inputMarginRight);
|
|
565
|
+
popup.style.setProperty("--ez-confirm-input-mb", inputMarginBottom);
|
|
566
|
+
popup.style.setProperty("--ez-confirm-input-ml", inputMarginLeft);
|
|
553
567
|
if (width != null) {
|
|
554
568
|
popup.style.setProperty(
|
|
555
569
|
"--ez-confirm-width",
|
|
@@ -2029,10 +2043,7 @@ function Sidebar({
|
|
|
2029
2043
|
"div",
|
|
2030
2044
|
{
|
|
2031
2045
|
"data-sidebar-item": item.name,
|
|
2032
|
-
className:
|
|
2033
|
-
"has-sub-items max-w-full min-w-0 flex flex-col",
|
|
2034
|
-
collapsed ? "my-1" : "my-2"
|
|
2035
|
-
),
|
|
2046
|
+
className: "has-sub-items max-w-full min-w-0 flex flex-col",
|
|
2036
2047
|
children: [
|
|
2037
2048
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2038
2049
|
ToolTip,
|