@dragonmastery/zinia-forms-core 0.5.7 → 0.5.8
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/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8976,6 +8976,7 @@ var EnumMultiSelectFilter = (props) => {
|
|
|
8976
8976
|
e.preventDefault();
|
|
8977
8977
|
e.stopPropagation();
|
|
8978
8978
|
closeDropdown();
|
|
8979
|
+
document.activeElement?.blur();
|
|
8979
8980
|
},
|
|
8980
8981
|
onMousedown: (e) => {
|
|
8981
8982
|
e.preventDefault();
|
|
@@ -10248,6 +10249,10 @@ function convertToDataType(metadataType) {
|
|
|
10248
10249
|
}
|
|
10249
10250
|
}
|
|
10250
10251
|
var FilterDrawer = (props) => {
|
|
10252
|
+
const handleClose = () => {
|
|
10253
|
+
props.onClose();
|
|
10254
|
+
document.activeElement?.blur();
|
|
10255
|
+
};
|
|
10251
10256
|
const injectedFilterOptionsState = inject(
|
|
10252
10257
|
ZINIA_DATA_TABLE_FILTER_OPTIONS_STATE_KEY,
|
|
10253
10258
|
void 0
|
|
@@ -10269,7 +10274,7 @@ var FilterDrawer = (props) => {
|
|
|
10269
10274
|
"div",
|
|
10270
10275
|
{
|
|
10271
10276
|
class: "absolute inset-0 bg-black/50 transition-opacity opacity-100 pointer-events-auto",
|
|
10272
|
-
onClick:
|
|
10277
|
+
onClick: handleClose
|
|
10273
10278
|
}
|
|
10274
10279
|
),
|
|
10275
10280
|
/* @__PURE__ */ jsxs(
|
|
@@ -10321,7 +10326,7 @@ var FilterDrawer = (props) => {
|
|
|
10321
10326
|
"button",
|
|
10322
10327
|
{
|
|
10323
10328
|
class: "btn btn-ghost btn-sm btn-circle hover:bg-base-300",
|
|
10324
|
-
onClick:
|
|
10329
|
+
onClick: handleClose,
|
|
10325
10330
|
"aria-label": "Close filters",
|
|
10326
10331
|
children: /* @__PURE__ */ jsx(
|
|
10327
10332
|
"svg",
|
|
@@ -10466,7 +10471,7 @@ var FilterDrawer = (props) => {
|
|
|
10466
10471
|
"button",
|
|
10467
10472
|
{
|
|
10468
10473
|
class: "btn btn-primary w-full btn-sm text-xs md:text-sm",
|
|
10469
|
-
onClick:
|
|
10474
|
+
onClick: handleClose,
|
|
10470
10475
|
"data-testid": `${props.tableName || "datatable"}-filter-drawer-apply`,
|
|
10471
10476
|
children: "Done"
|
|
10472
10477
|
}
|
|
@@ -10716,6 +10721,10 @@ var LoadingSkeletons = (props) => {
|
|
|
10716
10721
|
] });
|
|
10717
10722
|
};
|
|
10718
10723
|
var SortDrawer = (props) => {
|
|
10724
|
+
const handleClose = () => {
|
|
10725
|
+
props.onClose();
|
|
10726
|
+
document.activeElement?.blur();
|
|
10727
|
+
};
|
|
10719
10728
|
watch(
|
|
10720
10729
|
() => props.isOpen,
|
|
10721
10730
|
(isOpen) => {
|
|
@@ -10727,7 +10736,7 @@ var SortDrawer = (props) => {
|
|
|
10727
10736
|
}
|
|
10728
10737
|
);
|
|
10729
10738
|
if (!props.isOpen) return null;
|
|
10730
|
-
return /* @__PURE__ */ jsx(Teleport, { to: "body", children: /* @__PURE__ */ jsx("div", { class: "fixed inset-0 z-50 bg-black/50", onClick:
|
|
10739
|
+
return /* @__PURE__ */ jsx(Teleport, { to: "body", children: /* @__PURE__ */ jsx("div", { class: "fixed inset-0 z-50 bg-black/50", onClick: handleClose, children: /* @__PURE__ */ jsx(
|
|
10731
10740
|
"div",
|
|
10732
10741
|
{
|
|
10733
10742
|
class: "fixed bottom-0 left-0 right-0 bg-base-100 rounded-t-lg animate-slide-up",
|
|
@@ -10736,7 +10745,7 @@ var SortDrawer = (props) => {
|
|
|
10736
10745
|
children: /* @__PURE__ */ jsxs("div", { class: "p-4", children: [
|
|
10737
10746
|
/* @__PURE__ */ jsxs("div", { class: "flex items-center justify-between mb-4", children: [
|
|
10738
10747
|
/* @__PURE__ */ jsx("h3", { class: "text-lg font-semibold", children: "Sort Options" }),
|
|
10739
|
-
/* @__PURE__ */ jsx("button", { class: "btn btn-ghost btn-sm btn-circle", onClick:
|
|
10748
|
+
/* @__PURE__ */ jsx("button", { class: "btn btn-ghost btn-sm btn-circle", onClick: handleClose, children: "\u2715" })
|
|
10740
10749
|
] }),
|
|
10741
10750
|
/* @__PURE__ */ jsxs("div", { class: "space-y-2 max-h-96 overflow-y-auto", children: [
|
|
10742
10751
|
/* @__PURE__ */ jsxs(
|
|
@@ -10745,7 +10754,7 @@ var SortDrawer = (props) => {
|
|
|
10745
10754
|
class: `w-full text-left p-3 rounded-lg transition-colors ${!props.sortingField ? "bg-primary text-primary-content" : "hover:bg-base-200"}`,
|
|
10746
10755
|
onClick: () => {
|
|
10747
10756
|
props.onClearSort();
|
|
10748
|
-
|
|
10757
|
+
handleClose();
|
|
10749
10758
|
},
|
|
10750
10759
|
"data-testid": `${props.tableName || "datatable"}-sort-drawer-clear`,
|
|
10751
10760
|
children: [
|
|
@@ -10766,7 +10775,7 @@ var SortDrawer = (props) => {
|
|
|
10766
10775
|
class: `w-full text-left p-3 rounded-lg transition-colors ${props.sortingField === field && props.sortingDirection === "asc" ? "bg-primary text-primary-content" : "hover:bg-base-200"}`,
|
|
10767
10776
|
onClick: () => {
|
|
10768
10777
|
props.onSort(field, "asc");
|
|
10769
|
-
|
|
10778
|
+
handleClose();
|
|
10770
10779
|
},
|
|
10771
10780
|
"data-testid": `${props.tableName || "datatable"}-sort-drawer-${field}-asc`,
|
|
10772
10781
|
children: /* @__PURE__ */ jsxs("div", { class: "font-medium", children: [
|
|
@@ -10784,7 +10793,7 @@ var SortDrawer = (props) => {
|
|
|
10784
10793
|
class: `w-full text-left p-3 rounded-lg transition-colors ${props.sortingField === field && props.sortingDirection === "desc" ? "bg-primary text-primary-content" : "hover:bg-base-200"}`,
|
|
10785
10794
|
onClick: () => {
|
|
10786
10795
|
props.onSort(field, "desc");
|
|
10787
|
-
|
|
10796
|
+
handleClose();
|
|
10788
10797
|
},
|
|
10789
10798
|
"data-testid": `${props.tableName || "datatable"}-sort-drawer-${field}-desc`,
|
|
10790
10799
|
children: /* @__PURE__ */ jsxs("div", { class: "font-medium", children: [
|