@dashadmin/dash-components 1.3.25 → 1.3.26

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 (111) hide show
  1. package/dist/components/AuditLog/AuditLog.js +345 -1
  2. package/dist/components/AuditLog/index.js +4 -1
  3. package/dist/components/AutoCompleteArrayInput/AutoCompleteCheckBoxInput.js +630 -3
  4. package/dist/components/AutoCompleteArrayInput/AutocompleteCheckBoxArrayInput.js +53 -1
  5. package/dist/components/AutoCompleteArrayInputAutoSearch/AutoCompleteCheckBoxInput.js +647 -3
  6. package/dist/components/AutoCompleteArrayInputAutoSearch/AutocompleteCheckBoxArrayInput.js +53 -1
  7. package/dist/components/Json/Json.js +235 -1
  8. package/dist/components/JsonColorSelector/JsonColorSelector.js +1172 -1
  9. package/dist/components/JsonColorSelector/JsonColorSelectorEnhanced.js +863 -2
  10. package/dist/components/JsonColorSelector/JsonCssVarValues.js +738 -1
  11. package/dist/components/JsonColorSelector/components/ColorEditDialog.js +426 -1
  12. package/dist/components/JsonColorSelector/components/ColorPaletteItem.js +75 -1
  13. package/dist/components/JsonColorSelector/components/ImageColorExtractor.js +283 -1
  14. package/dist/components/JsonColorSelector/helpers/functions.js +101 -1
  15. package/dist/components/JsonColorSelector/useAsyncColorThief.js +105 -1
  16. package/dist/components/ListActive/ListActive.js +126 -1
  17. package/dist/components/ListActive/ListBoolean.js +124 -1
  18. package/dist/components/NotificationPreferences/NotificationPreferences.js +317 -1
  19. package/dist/components/NotificationPreferences/index.js +7 -1
  20. package/dist/components/SearchableSelects/RASearchableSelect.js +236 -1
  21. package/dist/components/SearchableSelects/RASearchableSelectCheckboxes.js +479 -1
  22. package/dist/components/SearchableSelects/RASearchableSelectChips.js +465 -1
  23. package/dist/components/SearchableSelects/RASearchableSelectChipsRecordContext.js +295 -1
  24. package/dist/components/SearchableSelects/SearchableSelect.js +202 -1
  25. package/dist/components/SearchableSelects/SearchableSelectCheckboxes.js +290 -1
  26. package/dist/components/SortableDataGrid/SortableDataGrid.js +72 -1
  27. package/dist/components/SortableDataGrid/SortableDataGridBody.js +167 -1
  28. package/dist/components/SortableDataGrid/SortableDataGridHeader.js +109 -1
  29. package/dist/components/SortableDataGrid/SortableDataGridRow.js +283 -1
  30. package/dist/components/Upload/SingleImageUploader.js +40 -1
  31. package/dist/components/custom/PackageCopyMethod.js +78 -1
  32. package/dist/components/custom/PackageRadioButtonGroup.js +45 -1
  33. package/dist/components/dialog/Basic.js +8 -1
  34. package/dist/components/dialog/Correct.js +14 -1
  35. package/dist/components/dialog/Error.js +14 -1
  36. package/dist/components/dialog/Info.js +14 -1
  37. package/dist/components/dialog/InfoV2.js +21 -1
  38. package/dist/components/dialog/NotFound.js +14 -1
  39. package/dist/components/dialog/QuickSearch.js +117 -1
  40. package/dist/components/notifications/NotificationsCenter.js +597 -1
  41. package/dist/components/notifications/index.js +24 -1
  42. package/dist/components/tables/PaginationComponent.js +36 -1
  43. package/dist/components/theme/AppLoadingFallback.js +38 -2
  44. package/dist/components/theme/ErrorBoundary.js +52 -1
  45. package/dist/components/theme/InitialLoader.js +13 -1
  46. package/dist/components/theme/NotFound.js +136 -1
  47. package/dist/components/theme/NotResults.js +38 -1
  48. package/dist/hooks/useDraggable.js +6 -1
  49. package/dist/hooks/useNotifications.js +8 -1
  50. package/dist/hooks/useQuickSearch.js +26 -1
  51. package/dist/index.js +66 -5567
  52. package/dist/utils/setNativeValue.js +17 -1
  53. package/package.json +149 -132
  54. package/src/components/AuditLog/AuditLog.tsx +476 -0
  55. package/src/components/AuditLog/index.ts +2 -0
  56. package/src/components/AutoCompleteArrayInput/AutoCompleteCheckBoxInput.tsx +917 -0
  57. package/src/components/AutoCompleteArrayInput/AutocompleteCheckBoxArrayInput.tsx +39 -0
  58. package/src/components/AutoCompleteArrayInputAutoSearch/AutoCompleteCheckBoxInput.tsx +916 -0
  59. package/src/components/AutoCompleteArrayInputAutoSearch/AutocompleteCheckBoxArrayInput.tsx +44 -0
  60. package/src/components/Json/Json.tsx +312 -0
  61. package/src/components/JsonColorSelector/JsonColorSelector.tsx +1435 -0
  62. package/src/components/JsonColorSelector/JsonColorSelectorEnhanced.tsx +1029 -0
  63. package/src/components/JsonColorSelector/JsonCssVarValues.tsx +863 -0
  64. package/src/components/JsonColorSelector/components/ColorEditDialog.tsx +491 -0
  65. package/src/components/JsonColorSelector/components/ColorPaletteItem.tsx +80 -0
  66. package/src/components/JsonColorSelector/components/ImageColorExtractor.tsx +328 -0
  67. package/src/components/JsonColorSelector/helpers/functions.tsx +123 -0
  68. package/src/components/JsonColorSelector/interfaces/interfaces.tsx +22 -0
  69. package/src/components/JsonColorSelector/useAsyncColorThief.tsx +97 -0
  70. package/src/components/ListActive/ListActive.tsx +106 -0
  71. package/src/components/ListActive/ListBoolean.tsx +96 -0
  72. package/src/components/NotificationPreferences/NotificationPreferences.tsx +463 -0
  73. package/src/components/NotificationPreferences/index.tsx +2 -0
  74. package/src/components/SearchableSelects/RASearchableSelect.tsx +300 -0
  75. package/src/components/SearchableSelects/RASearchableSelectCheckboxes.tsx +604 -0
  76. package/src/components/SearchableSelects/RASearchableSelectChips.tsx +558 -0
  77. package/src/components/SearchableSelects/RASearchableSelectChipsRecordContext.tsx +362 -0
  78. package/src/components/SearchableSelects/SearchableSelect.tsx +321 -0
  79. package/src/components/SearchableSelects/SearchableSelectCheckboxes.tsx +355 -0
  80. package/src/components/SortableDataGrid/SortableDataGrid.tsx +56 -0
  81. package/src/components/SortableDataGrid/SortableDataGridBody.tsx +175 -0
  82. package/src/components/SortableDataGrid/SortableDataGridHeader.tsx +171 -0
  83. package/src/components/SortableDataGrid/SortableDataGridRow.tsx +247 -0
  84. package/src/components/Upload/SingleImageUploader.tsx +55 -0
  85. package/src/components/custom/PackageCopyMethod.tsx +109 -0
  86. package/src/components/custom/PackageRadioButtonGroup.tsx +47 -0
  87. package/src/components/dialog/Basic.tsx +11 -0
  88. package/src/components/dialog/Correct.tsx +16 -0
  89. package/src/components/dialog/Error.tsx +15 -0
  90. package/src/components/dialog/Info.tsx +15 -0
  91. package/src/components/dialog/InfoV2.tsx +35 -0
  92. package/src/components/dialog/NotFound.tsx +18 -0
  93. package/src/components/dialog/QuickSearch.tsx +115 -0
  94. package/src/components/notifications/NotificationsCenter.tsx +792 -0
  95. package/src/components/notifications/index.ts +42 -0
  96. package/src/components/tables/PaginationComponent.tsx +17 -0
  97. package/src/components/theme/AppLoadingFallback.tsx +42 -0
  98. package/src/components/theme/ErrorBoundary.tsx +57 -0
  99. package/src/components/theme/InitialLoader.tsx +16 -0
  100. package/src/components/theme/NotFound.tsx +124 -0
  101. package/src/components/theme/NotResults.tsx +54 -0
  102. package/src/hooks/useDraggable.ts +11 -0
  103. package/src/hooks/useNotifications.ts +14 -0
  104. package/src/hooks/useQuickSearch.tsx +29 -0
  105. package/src/index.tsx +77 -0
  106. package/src/utils/setNativeValue.tsx +23 -0
  107. package/dist/color-thief-CTwGFhOB.js +0 -272
  108. /package/{dist → src}/components/AutoCompleteArrayInputAutoSearch/AutocompleteCheckBoxArrayAutoSearch.tsx.wip +0 -0
  109. /package/{dist → src}/components/JsonColorSelector/JsonColorSelector.tsx.bkup +0 -0
  110. /package/{dist → src}/components/SortableDataGrid/README.md +0 -0
  111. /package/{dist → src}/styles/index.less +0 -0
@@ -1,6 +1,42 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";const o=({message:t="Loading..."})=>r("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",gap:"16px",background:"linear-gradient(to bottom, var(--bodybg-primary), var(--bodybg-secondary))",color:"var(--text-color, @text-color--dark)"},children:[e("div",{style:{width:"60px",height:"60px",border:"4px solid rgba(255, 255, 255, 0.3)",borderTop:"4px solid #ffffff",borderRadius:"50%",animation:"spin 1s linear infinite"}}),e("h6",{style:{margin:0,fontSize:"1.25rem",fontWeight:500},children:t}),e("style",{children:`
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ const AppLoadingFallback = ({ message = "Loading..." }) => /* @__PURE__ */ jsxs(
3
+ "div",
4
+ {
5
+ style: {
6
+ display: "flex",
7
+ flexDirection: "column",
8
+ justifyContent: "center",
9
+ alignItems: "center",
10
+ minHeight: "100vh",
11
+ gap: "16px",
12
+ background: "linear-gradient(to bottom, var(--bodybg-primary), var(--bodybg-secondary))",
13
+ color: "var(--text-color, @text-color--dark)"
14
+ },
15
+ children: [
16
+ /* @__PURE__ */ jsx(
17
+ "div",
18
+ {
19
+ style: {
20
+ width: "60px",
21
+ height: "60px",
22
+ border: "4px solid rgba(255, 255, 255, 0.3)",
23
+ borderTop: "4px solid #ffffff",
24
+ borderRadius: "50%",
25
+ animation: "spin 1s linear infinite"
26
+ }
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx("h6", { style: { margin: 0, fontSize: "1.25rem", fontWeight: 500 }, children: message }),
30
+ /* @__PURE__ */ jsx("style", { children: `
2
31
  @keyframes spin {
3
32
  0% { transform: rotate(0deg); }
4
33
  100% { transform: rotate(360deg); }
5
34
  }
6
- `})]});var n=o;export{n as default};
35
+ ` })
36
+ ]
37
+ }
38
+ );
39
+ var AppLoadingFallback_default = AppLoadingFallback;
40
+ export {
41
+ AppLoadingFallback_default as default
42
+ };
@@ -1 +1,52 @@
1
- import{jsx as o,jsxs as n}from"react/jsx-runtime";import t from"react";class a extends t.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,e){console.error("Error:",r,e)}render(){return this.state.hasError?n("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",backgroundColor:"#121212",color:"#ffffff",flexDirection:"column",gap:"20px"},children:[o("h2",{children:"Error"}),o("p",{children:this.state.error?.message}),o("button",{onClick:()=>window.location.reload(),style:{padding:"10px 20px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},children:"Reload Page"})]}):this.props.children}}var i=a;export{i as default};
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ class ErrorBoundary extends React.Component {
4
+ constructor(props) {
5
+ super(props);
6
+ this.state = { hasError: false };
7
+ }
8
+ static getDerivedStateFromError(error) {
9
+ return { hasError: true, error };
10
+ }
11
+ componentDidCatch(error, errorInfo) {
12
+ console.error("Error:", error, errorInfo);
13
+ }
14
+ render() {
15
+ var _a;
16
+ if (this.state.hasError) {
17
+ return /* @__PURE__ */ jsxs("div", { style: {
18
+ display: "flex",
19
+ justifyContent: "center",
20
+ alignItems: "center",
21
+ height: "100vh",
22
+ backgroundColor: "#121212",
23
+ color: "#ffffff",
24
+ flexDirection: "column",
25
+ gap: "20px"
26
+ }, children: [
27
+ /* @__PURE__ */ jsx("h2", { children: "Error" }),
28
+ /* @__PURE__ */ jsx("p", { children: (_a = this.state.error) == null ? void 0 : _a.message }),
29
+ /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ onClick: () => window.location.reload(),
33
+ style: {
34
+ padding: "10px 20px",
35
+ backgroundColor: "#007bff",
36
+ color: "white",
37
+ border: "none",
38
+ borderRadius: "4px",
39
+ cursor: "pointer"
40
+ },
41
+ children: "Reload Page"
42
+ }
43
+ )
44
+ ] });
45
+ }
46
+ return this.props.children;
47
+ }
48
+ }
49
+ var ErrorBoundary_default = ErrorBoundary;
50
+ export {
51
+ ErrorBoundary_default as default
52
+ };
@@ -1 +1,13 @@
1
- import{jsx as t}from"react/jsx-runtime";const o=()=>t("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",background:"linear-gradient(to bottom, var(--bodybg-primary), var(--bodybg-secondary))",color:"var(--text-color, @text-color--dark)"},children:t("div",{children:"Loading..."})});var a=o;export{a as default};
1
+ import { jsx } from "react/jsx-runtime";
2
+ const InitialLoader = () => /* @__PURE__ */ jsx("div", { style: {
3
+ display: "flex",
4
+ justifyContent: "center",
5
+ alignItems: "center",
6
+ height: "100vh",
7
+ background: "linear-gradient(to bottom, var(--bodybg-primary), var(--bodybg-secondary))",
8
+ color: "var(--text-color, @text-color--dark)"
9
+ }, children: /* @__PURE__ */ jsx("div", { children: "Loading..." }) });
10
+ var InitialLoader_default = InitialLoader;
11
+ export {
12
+ InitialLoader_default as default
13
+ };
@@ -1 +1,136 @@
1
- import{jsx as o,jsxs as i}from"react/jsx-runtime";import*as a from"react";import{Button as w}from"@mui/material";import B from"@mui/icons-material/ErrorOutline";import{useNavigate as N}from"react-router";function x(){window.history.go(-1)}const y=({staticContext:r,history:d,location:t,match:e,...n})=>n,S=r=>{const{title:d,time:t=!1,redirect:e=null,disableCountdown:n=!1,disableGoBack:l=!1,customMessage:m,customButtonText:f,...p}=r,[g,h]=a.useState(t||0),c=N();a.useEffect(()=>{if(!n&&typeof t=="number"&&t>0){const v=setInterval(()=>{h(u=>{if(u<=1){const b=window.location.pathname;return c(`${e||"/"}?redirect=${encodeURIComponent(b)}`),0}return u-1})},1e3);return()=>clearInterval(v)}},[t,c,e,n]),a.useEffect(()=>{});const C=!n&&t&&t>0,s=l?null:{text:f||"Aceptar",action:x};return o("div",{className:"dash-app-module not-found",...y(p),children:i("div",{className:"dash-app-notfound",children:[o("div",{className:"dash-app-notfound-img",children:o(B,{sx:{fontSize:300}})}),i("div",{className:"dash-app-notfound-content",children:[o("h1",{children:"Oops!"}),o("span",{children:m||"No encontramos este enlace."}),C&&i("p",{style:{fontSize:"0.9em",color:"#666"},children:["Ser\xE1s redirigido en ",g," segundos..."]}),s&&o(w,{color:"primary",onClick:s.action,children:s.text})]})]})})};var I=S;export{I as default};
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import { jsx, jsxs } from "react/jsx-runtime";
33
+ import * as React from "react";
34
+ import { Button } from "@mui/material";
35
+ import ErrorOutline from "@mui/icons-material/ErrorOutline";
36
+ import { useNavigate } from "react-router";
37
+ function goBack() {
38
+ window.history.go(-1);
39
+ }
40
+ const sanitizeRestProps = (_a) => {
41
+ var _b = _a, {
42
+ staticContext,
43
+ history,
44
+ location,
45
+ match
46
+ } = _b, rest = __objRest(_b, [
47
+ "staticContext",
48
+ "history",
49
+ "location",
50
+ "match"
51
+ ]);
52
+ return rest;
53
+ };
54
+ const NotFound = (props) => {
55
+ const _a = props, {
56
+ title,
57
+ time = false,
58
+ redirect = null,
59
+ disableCountdown = false,
60
+ disableGoBack: disableGoBack = false,
61
+ customMessage: customMessage,
62
+ customButtonText: customButtonText
63
+ } = _a, rest = __objRest(_a, [
64
+ "title",
65
+ "time",
66
+ "redirect",
67
+ "disableCountdown",
68
+ // 🆕 Default to false (countdown enabled)
69
+ "disableGoBack",
70
+ // 🆕 Default to false (go back enabled)
71
+ "customMessage",
72
+ // 🆕 Optional custom message
73
+ "customButtonText"
74
+ ]);
75
+ const [countdown, setCountdown] = React.useState(time || 0);
76
+ const navigate = useNavigate();
77
+ React.useEffect(() => {
78
+ if (!disableCountdown && typeof time === "number" && time > 0) {
79
+ const timer = setInterval(() => {
80
+ setCountdown((prev) => {
81
+ if (prev <= 1) {
82
+ const currentPath = window.location.pathname;
83
+ navigate(`${redirect || "/"}?redirect=${encodeURIComponent(currentPath)}`);
84
+ return 0;
85
+ }
86
+ return prev - 1;
87
+ });
88
+ }, 1e3);
89
+ return () => clearInterval(timer);
90
+ }
91
+ }, [time, navigate, redirect, disableCountdown]);
92
+ React.useEffect(() => {
93
+ });
94
+ const shouldShowCountdown = !disableCountdown && time && time > 0;
95
+ const getButtonConfig = () => {
96
+ if (disableGoBack) {
97
+ return null;
98
+ }
99
+ return {
100
+ text: customButtonText || "Aceptar",
101
+ action: goBack
102
+ };
103
+ };
104
+ const buttonConfig = getButtonConfig();
105
+ return /* @__PURE__ */ jsx(
106
+ "div",
107
+ __spreadProps(__spreadValues({
108
+ className: "dash-app-module not-found"
109
+ }, sanitizeRestProps(rest)), {
110
+ children: /* @__PURE__ */ jsxs("div", { className: "dash-app-notfound", children: [
111
+ /* @__PURE__ */ jsx("div", { className: "dash-app-notfound-img", children: /* @__PURE__ */ jsx(ErrorOutline, { sx: { fontSize: 300 } }) }),
112
+ /* @__PURE__ */ jsxs("div", { className: "dash-app-notfound-content", children: [
113
+ /* @__PURE__ */ jsx("h1", { children: "Oops!" }),
114
+ /* @__PURE__ */ jsx("span", { children: customMessage || "No encontramos este enlace." }),
115
+ shouldShowCountdown && /* @__PURE__ */ jsxs("p", { style: { fontSize: "0.9em", color: "#666" }, children: [
116
+ "Ser\xE1s redirigido en ",
117
+ countdown,
118
+ " segundos..."
119
+ ] }),
120
+ buttonConfig && /* @__PURE__ */ jsx(
121
+ Button,
122
+ {
123
+ color: "primary",
124
+ onClick: buttonConfig.action,
125
+ children: buttonConfig.text
126
+ }
127
+ )
128
+ ] })
129
+ ] })
130
+ })
131
+ );
132
+ };
133
+ var NotFound_default = NotFound;
134
+ export {
135
+ NotFound_default as default
136
+ };
@@ -1 +1,38 @@
1
- import{jsx as t,jsxs as i}from"react/jsx-runtime";import*as o from"react";import{Card as c,CardContent as p,Typography as a}from"@mui/material";import f from"@mui/icons-material/Info";const s=o.memo(d=>{const{title:r,description:n,children:l}=d,e=o.useMemo(()=>({card:{p:0},cardContent:{display:"flex",flexDirection:"column",alignItems:"left",gap:2},header:{display:"flex",alignItems:"center",gap:2},icon:{fontSize:32}}),[]);return o.useEffect(()=>{console.log("Reloaded")},[]),t(c,{sx:e.card,children:i(p,{sx:e.cardContent,children:[i("div",{style:e.header,children:[t(f,{sx:e.icon}),r&&t(a,{variant:"h5",children:r})]}),n&&t(a,{variant:"body1",color:"text.secondary",children:n}),l]})})});s.displayName="NoResults";var g=s;export{g as default};
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Card, CardContent, Typography } from "@mui/material";
4
+ import InfoIcon from "@mui/icons-material/Info";
5
+ const NoResults = React.memo((props) => {
6
+ const { title, description, children } = props;
7
+ const styles = React.useMemo(() => ({
8
+ card: { p: 0 },
9
+ cardContent: {
10
+ display: "flex",
11
+ flexDirection: "column",
12
+ alignItems: "left",
13
+ gap: 2
14
+ },
15
+ header: {
16
+ display: "flex",
17
+ alignItems: "center",
18
+ gap: 2
19
+ },
20
+ icon: { fontSize: 32 }
21
+ }), []);
22
+ React.useEffect(() => {
23
+ console.log("Reloaded");
24
+ }, []);
25
+ return /* @__PURE__ */ jsx(Card, { sx: styles.card, children: /* @__PURE__ */ jsxs(CardContent, { sx: styles.cardContent, children: [
26
+ /* @__PURE__ */ jsxs("div", { style: styles.header, children: [
27
+ /* @__PURE__ */ jsx(InfoIcon, { sx: styles.icon }),
28
+ title && /* @__PURE__ */ jsx(Typography, { variant: "h5", children: title })
29
+ ] }),
30
+ description && /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "text.secondary", children: description }),
31
+ children
32
+ ] }) });
33
+ });
34
+ NoResults.displayName = "NoResults";
35
+ var NotResults_default = NoResults;
36
+ export {
37
+ NotResults_default as default
38
+ };
@@ -1 +1,6 @@
1
- import{useDraggable as g}from"@dashadmin/dash-utils";export{g as useDraggable};
1
+ import {
2
+ useDraggable
3
+ } from "dash-utils";
4
+ export {
5
+ useDraggable
6
+ };
@@ -1 +1,8 @@
1
- import{useNotifications as o}from"@dashadmin/dash-utils";import{useNotifications as s}from"@dashadmin/dash-utils";export{s as default,o as useNotifications};
1
+ import {
2
+ useNotifications
3
+ } from "dash-utils";
4
+ import { useNotifications as useNotifications2 } from "dash-utils";
5
+ export {
6
+ useNotifications2 as default,
7
+ useNotifications
8
+ };
@@ -1 +1,26 @@
1
- import{useQuickSearch as u}from"@dashadmin/dash-utils";import{useQuickSearch as a}from"@dashadmin/dash-utils";export{a as default,u as useQuickSearch};
1
+ import React, { useState } from "react";
2
+ const useQuickSearch = () => {
3
+ const quickSearchUseState = useState(null);
4
+ const sendQuickSearchEvent = (quickSearchString) => {
5
+ window.dispatchEvent(
6
+ new MessageEvent("quickSearch", { data: { value: quickSearchString } })
7
+ );
8
+ };
9
+ const eventHook = (e) => {
10
+ quickSearchUseState[1](e.data.value);
11
+ };
12
+ React.useEffect(() => {
13
+ window.addEventListener("quickSearch", eventHook);
14
+ return () => {
15
+ window.removeEventListener("quickSearch", eventHook);
16
+ };
17
+ }, []);
18
+ return {
19
+ quickSearchUseState,
20
+ sendQuickSearchEvent
21
+ };
22
+ };
23
+ var useQuickSearch_default = useQuickSearch;
24
+ export {
25
+ useQuickSearch_default as default
26
+ };