@zydon/common-csr 1.1.11 → 2.0.0

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 (155) hide show
  1. package/README.md +0 -0
  2. package/dist/{types/baseField.d.ts → baseField-97c8b770.d.ts} +3 -2
  3. package/dist/chunk-KHFLUPBJ.mjs +30 -0
  4. package/dist/chunk-N4W37KLS.mjs +10 -0
  5. package/dist/components/EditorField/index.d.ts +11 -4
  6. package/dist/components/EditorField/index.mjs +7 -0
  7. package/dist/components/SQLEditor/index.d.ts +13 -4
  8. package/dist/components/SQLEditor/index.mjs +1 -0
  9. package/dist/components/SQLEditorField/index.d.ts +10 -0
  10. package/dist/components/SQLEditorField/index.mjs +7 -0
  11. package/dist/components/editor/index.d.ts +65 -0
  12. package/dist/components/editor/index.mjs +1 -0
  13. package/dist/components/image/index.d.ts +26 -0
  14. package/dist/components/image/index.mjs +9 -0
  15. package/dist/components/nav-section/index.d.ts +281 -6
  16. package/dist/components/nav-section/index.mjs +19 -0
  17. package/dist/index.css +1 -0
  18. package/dist/index.d.ts +43 -4
  19. package/dist/index.mjs +3 -0
  20. package/dist/types-59de9124.d.ts +39 -0
  21. package/package.json +72 -57
  22. package/dist/App.d.ts +0 -3
  23. package/dist/App.d.ts.map +0 -1
  24. package/dist/components/Editor/EditorToolbar.d.ts +0 -8
  25. package/dist/components/Editor/EditorToolbar.d.ts.map +0 -1
  26. package/dist/components/Editor/index.d.ts +0 -5
  27. package/dist/components/Editor/index.d.ts.map +0 -1
  28. package/dist/components/Editor/styles.d.ts +0 -6
  29. package/dist/components/Editor/styles.d.ts.map +0 -1
  30. package/dist/components/EditorField/index.d.ts.map +0 -1
  31. package/dist/components/EditorField/props.d.ts +0 -5
  32. package/dist/components/EditorField/props.d.ts.map +0 -1
  33. package/dist/components/Filters/AdvancedRule/AdvancedMode/Itens.d.ts +0 -5
  34. package/dist/components/Filters/AdvancedRule/AdvancedMode/Itens.d.ts.map +0 -1
  35. package/dist/components/Filters/AdvancedRule/AdvancedMode/NewItem.d.ts +0 -5
  36. package/dist/components/Filters/AdvancedRule/AdvancedMode/NewItem.d.ts.map +0 -1
  37. package/dist/components/Filters/AdvancedRule/AdvancedMode/index.d.ts +0 -5
  38. package/dist/components/Filters/AdvancedRule/AdvancedMode/index.d.ts.map +0 -1
  39. package/dist/components/Filters/AdvancedRule/AdvancedMode/props.d.ts +0 -25
  40. package/dist/components/Filters/AdvancedRule/AdvancedMode/props.d.ts.map +0 -1
  41. package/dist/components/Filters/AdvancedRule/AdvancedMode/styles.d.ts +0 -17
  42. package/dist/components/Filters/AdvancedRule/AdvancedMode/styles.d.ts.map +0 -1
  43. package/dist/components/Filters/AdvancedRule/Preview/FormPreview.d.ts +0 -5
  44. package/dist/components/Filters/AdvancedRule/Preview/FormPreview.d.ts.map +0 -1
  45. package/dist/components/Filters/AdvancedRule/Preview/index.d.ts +0 -5
  46. package/dist/components/Filters/AdvancedRule/Preview/index.d.ts.map +0 -1
  47. package/dist/components/Filters/AdvancedRule/Preview/props.d.ts +0 -14
  48. package/dist/components/Filters/AdvancedRule/Preview/props.d.ts.map +0 -1
  49. package/dist/components/Filters/AdvancedRule/SimpleMode/Conditional.d.ts +0 -5
  50. package/dist/components/Filters/AdvancedRule/SimpleMode/Conditional.d.ts.map +0 -1
  51. package/dist/components/Filters/AdvancedRule/SimpleMode/Group.d.ts +0 -5
  52. package/dist/components/Filters/AdvancedRule/SimpleMode/Group.d.ts.map +0 -1
  53. package/dist/components/Filters/AdvancedRule/SimpleMode/index.d.ts +0 -5
  54. package/dist/components/Filters/AdvancedRule/SimpleMode/index.d.ts.map +0 -1
  55. package/dist/components/Filters/AdvancedRule/SimpleMode/props.d.ts +0 -34
  56. package/dist/components/Filters/AdvancedRule/SimpleMode/props.d.ts.map +0 -1
  57. package/dist/components/Filters/AdvancedRule/SimpleMode/styles.d.ts +0 -20
  58. package/dist/components/Filters/AdvancedRule/SimpleMode/styles.d.ts.map +0 -1
  59. package/dist/components/Filters/AdvancedRule/index.d.ts +0 -5
  60. package/dist/components/Filters/AdvancedRule/index.d.ts.map +0 -1
  61. package/dist/components/Filters/AdvancedRule/props.d.ts +0 -18
  62. package/dist/components/Filters/AdvancedRule/props.d.ts.map +0 -1
  63. package/dist/components/Filters/AdvancedRule/styles.d.ts +0 -14
  64. package/dist/components/Filters/AdvancedRule/styles.d.ts.map +0 -1
  65. package/dist/components/Filters/FilterRule/index.d.ts +0 -5
  66. package/dist/components/Filters/FilterRule/index.d.ts.map +0 -1
  67. package/dist/components/Filters/FilterRule/props.d.ts +0 -13
  68. package/dist/components/Filters/FilterRule/props.d.ts.map +0 -1
  69. package/dist/components/Filters/FilterRule/styles.d.ts +0 -4
  70. package/dist/components/Filters/FilterRule/styles.d.ts.map +0 -1
  71. package/dist/components/Filters/ListingRules/index.d.ts +0 -5
  72. package/dist/components/Filters/ListingRules/index.d.ts.map +0 -1
  73. package/dist/components/Filters/ListingRules/props.d.ts +0 -11
  74. package/dist/components/Filters/ListingRules/props.d.ts.map +0 -1
  75. package/dist/components/Filters/ListingRules/styles.d.ts +0 -6
  76. package/dist/components/Filters/ListingRules/styles.d.ts.map +0 -1
  77. package/dist/components/Filters/ManualRule/index.d.ts +0 -5
  78. package/dist/components/Filters/ManualRule/index.d.ts.map +0 -1
  79. package/dist/components/Filters/ManualRule/props.d.ts +0 -14
  80. package/dist/components/Filters/ManualRule/props.d.ts.map +0 -1
  81. package/dist/components/Image/getRatio.d.ts +0 -2
  82. package/dist/components/Image/getRatio.d.ts.map +0 -1
  83. package/dist/components/Image/index.d.ts +0 -5
  84. package/dist/components/Image/index.d.ts.map +0 -1
  85. package/dist/components/Image/props.d.ts +0 -8
  86. package/dist/components/Image/props.d.ts.map +0 -1
  87. package/dist/components/SQLEditor/index.d.ts.map +0 -1
  88. package/dist/components/SQLEditor/props.d.ts +0 -10
  89. package/dist/components/SQLEditor/props.d.ts.map +0 -1
  90. package/dist/components/SQLEditor/styles.d.ts +0 -8
  91. package/dist/components/SQLEditor/styles.d.ts.map +0 -1
  92. package/dist/components/SQLEditorEditorField/index.d.ts +0 -5
  93. package/dist/components/SQLEditorEditorField/index.d.ts.map +0 -1
  94. package/dist/components/SQLEditorEditorField/props.d.ts +0 -5
  95. package/dist/components/SQLEditorEditorField/props.d.ts.map +0 -1
  96. package/dist/components/index.d.ts +0 -17
  97. package/dist/components/index.d.ts.map +0 -1
  98. package/dist/components/nav-section/NavSectionHorizontal/NavItem.d.ts +0 -5
  99. package/dist/components/nav-section/NavSectionHorizontal/NavItem.d.ts.map +0 -1
  100. package/dist/components/nav-section/NavSectionHorizontal/NavList.d.ts +0 -10
  101. package/dist/components/nav-section/NavSectionHorizontal/NavList.d.ts.map +0 -1
  102. package/dist/components/nav-section/NavSectionHorizontal/index.d.ts +0 -5
  103. package/dist/components/nav-section/NavSectionHorizontal/index.d.ts.map +0 -1
  104. package/dist/components/nav-section/NavSectionHorizontal/styles.d.ts +0 -10
  105. package/dist/components/nav-section/NavSectionHorizontal/styles.d.ts.map +0 -1
  106. package/dist/components/nav-section/NavSectionMini/NavItem.d.ts +0 -5
  107. package/dist/components/nav-section/NavSectionMini/NavItem.d.ts.map +0 -1
  108. package/dist/components/nav-section/NavSectionMini/NavList.d.ts +0 -10
  109. package/dist/components/nav-section/NavSectionMini/NavList.d.ts.map +0 -1
  110. package/dist/components/nav-section/NavSectionMini/index.d.ts +0 -5
  111. package/dist/components/nav-section/NavSectionMini/index.d.ts.map +0 -1
  112. package/dist/components/nav-section/NavSectionMini/styles.d.ts +0 -10
  113. package/dist/components/nav-section/NavSectionMini/styles.d.ts.map +0 -1
  114. package/dist/components/nav-section/NavSectionVertical/NavItem.d.ts +0 -5
  115. package/dist/components/nav-section/NavSectionVertical/NavItem.d.ts.map +0 -1
  116. package/dist/components/nav-section/NavSectionVertical/NavList.d.ts +0 -10
  117. package/dist/components/nav-section/NavSectionVertical/NavList.d.ts.map +0 -1
  118. package/dist/components/nav-section/NavSectionVertical/index.d.ts +0 -5
  119. package/dist/components/nav-section/NavSectionVertical/index.d.ts.map +0 -1
  120. package/dist/components/nav-section/NavSectionVertical/styles.d.ts +0 -18
  121. package/dist/components/nav-section/NavSectionVertical/styles.d.ts.map +0 -1
  122. package/dist/components/nav-section/NavSectionVerticalWithButtons/NavItem.d.ts +0 -5
  123. package/dist/components/nav-section/NavSectionVerticalWithButtons/NavItem.d.ts.map +0 -1
  124. package/dist/components/nav-section/NavSectionVerticalWithButtons/NavList.d.ts +0 -13
  125. package/dist/components/nav-section/NavSectionVerticalWithButtons/NavList.d.ts.map +0 -1
  126. package/dist/components/nav-section/NavSectionVerticalWithButtons/index.d.ts +0 -5
  127. package/dist/components/nav-section/NavSectionVerticalWithButtons/index.d.ts.map +0 -1
  128. package/dist/components/nav-section/NavSectionVerticalWithButtons/styles.d.ts +0 -18
  129. package/dist/components/nav-section/NavSectionVerticalWithButtons/styles.d.ts.map +0 -1
  130. package/dist/components/nav-section/index.d.ts.map +0 -1
  131. package/dist/components/nav-section/types.d.ts +0 -39
  132. package/dist/components/nav-section/types.d.ts.map +0 -1
  133. package/dist/configs/config-global.d.ts +0 -20
  134. package/dist/configs/config-global.d.ts.map +0 -1
  135. package/dist/hooks/index.d.ts +0 -2
  136. package/dist/hooks/index.d.ts.map +0 -1
  137. package/dist/hooks/useActiveLink.d.ts +0 -7
  138. package/dist/hooks/useActiveLink.d.ts.map +0 -1
  139. package/dist/index.d.ts.map +0 -1
  140. package/dist/index.js +0 -98053
  141. package/dist/index.umd.cjs +0 -1379
  142. package/dist/main.d.ts +0 -2
  143. package/dist/main.d.ts.map +0 -1
  144. package/dist/style.css +0 -6
  145. package/dist/types/baseField.d.ts.map +0 -1
  146. package/dist/types/editor.d.ts +0 -12
  147. package/dist/types/editor.d.ts.map +0 -1
  148. package/dist/utils/cssStyles.d.ts +0 -78
  149. package/dist/utils/cssStyles.d.ts.map +0 -1
  150. package/dist/utils/highlight.d.ts +0 -7
  151. package/dist/utils/highlight.d.ts.map +0 -1
  152. package/dist/utils/index.d.ts +0 -3
  153. package/dist/utils/index.d.ts.map +0 -1
  154. package/dist/utils/rules.d.ts +0 -4
  155. package/dist/utils/rules.d.ts.map +0 -1
@@ -0,0 +1,19 @@
1
+ import { stylesMode, paper, varAlpha } from '@zydon/common/theme/styles';
2
+ import { forwardRef, cloneElement, useState, useCallback, useRef, useEffect, useMemo } from 'react';
3
+ import { Link, useLocation } from 'react-router-dom';
4
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
+ import T from '@mui/material/Box';
6
+ import Se from '@mui/material/ButtonBase';
7
+ import { styled, useTheme } from '@mui/material/styles';
8
+ import Le from '@mui/material/Tooltip';
9
+ import oe from '@zydon/common/components/Icon';
10
+ import be from '@mui/material/Collapse';
11
+ import ge from '@mui/material/ListSubheader';
12
+ import He from '@mui/material/Stack';
13
+ import Ae from '@zydon/common/components/Scrollbar';
14
+ import Be from '@mui/material/Paper';
15
+ import ze from '@mui/material/Popover';
16
+
17
+ var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var X={dark:"#282F37",light:"#EDEFF2"};function V(e,r){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":o.primary.light,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...r==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function pe(e){let{shape:r,spacing:o}=e;return {...V(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${r.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":X.light,"--nav-bullet-dark-color":X.dark}}function ce(e){let{shape:r,spacing:o}=e;return {...V(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${r.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function ve(e){let{shape:r,spacing:o}=e;return {...V(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${r.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var P={mini:ce,vertical:pe,horizontal:ve};var Y=forwardRef(({href:e,...r},o)=>jsx(Link,{ref:o,to:e,...r}));function _({path:e,icon:r,info:o,depth:a,render:n,hasChild:s,externalLink:l,enabledRootRedirect:i}){let m=a===1,v=!m,c=Number(a)>2,f=s&&!i?{component:"div"}:l?{href:e,target:"_blank",rel:"noopener"}:{component:Y,href:e},d=null;r&&n?.navIcon&&typeof r=="string"?d=n?.navIcon[r]:d=r;let h=null;if(o&&n?.navInfo&&Array.isArray(o)){let[S,b]=o,K=n.navInfo(b)[S];h=K?cloneElement(K):null;}else h=o;return {subItem:v,rootItem:m,subDeepItem:c,baseProps:f,renderIcon:d,renderInfo:h}}function R({open:e,active:r,disabled:o}){let a=t.item.root;return r?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function j({sx:e,open:r,children:o,...a}){return jsxs(ge,{disableSticky:!0,component:"div",className:t.subheader,sx:{gap:1,cursor:"pointer",alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:n=>n.spacing(2,1,1,1.5),fontSize:n=>n.typography.pxToRem(11),transition:n=>n.transitions.create(["color","padding-left"],{duration:n.transitions.duration.standard}),"&:hover":{pl:2,color:"var(--nav-subheader-hover-color)"},...e},...a,children:[jsx(oe,{width:16,icon:r?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",sx:{left:-4,opacity:0,position:"absolute",transition:n=>n.transitions.create(["opacity"],{duration:n.transitions.duration.standard})}}),o]})}function ee({sx:e,depth:r,children:o,...a}){return jsx(be,{sx:{...r+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function g({sx:e,children:r,disabled:o,...a}){return jsx(T,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:r})}function x({children:e,sx:r,...o}){return jsx(T,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...r},...o,children:e})}var H=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(Pe,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,arrow:!0,children:jsx(oe,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:b.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Pe=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...i.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...i.caption,marginLeft:n.spacing(.75)},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:n.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...i.title,flexGrow:1},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow,marginRight:n.spacing(-.5)},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var te=e=>{let r=e.split("?")[1];return r?new URLSearchParams(r).toString().length>0:!1};function U(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function re(e){try{let r=new URL(e,window.location.origin);return U(r.pathname)}catch{return e}}function y(e){return e.startsWith("http")}function N(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function $(e,r=!0){let o=U(N()),a=te(e);if(e.startsWith("#")||y(e))return !1;if(r||a){let l=o.includes(e),i=re(e);return l||a&&i===o}return o===e}function A({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){let l=useTheme(),i=N(),m=useRef(null),v=$(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&d();},[i]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(H,{ref:m,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:r,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:y(e.path),enabledRootRedirect:s,slotProps:r===1?n?.rootItem:n?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&n?.currentRole&&!e?.roles?.includes(n?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(ze,{disableScrollLock:!0,open:c,anchorEl:m.current,anchorOrigin:r===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:r===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...r===1&&{ml:-.75},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(Be,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...n?.paper},children:jsx(Ve,{data:e.children,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})}function Ve({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){return jsx(x,{sx:{gap:.5},children:e.map(l=>jsx(A,{data:l,render:o,depth:r+1,cssVars:a,slotProps:n,enabledRootRedirect:s},l.title))})}function rr({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s}){let l=useTheme(),i={...P.horizontal(l),...s};return jsx(Ae,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(He,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...i,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(x,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(De,{render:o,cssVars:i,items:m.items,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})})}function De({items:e,render:r,slotProps:o,enabledRootRedirect:a,cssVars:n}){return jsx(g,{children:jsx(x,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(A,{depth:1,data:s,render:r,cssVars:n,slotProps:o,enabledRootRedirect:a},s.title))})})}var F=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(Qe,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,arrow:!0,placement:"right",children:jsx(oe,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&b.subItem&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:"CHEVRON_RIGHT",className:t.item.arrow})]})}),Qe=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,textAlign:"center",flexDirection:"column",minHeight:"var(--nav-item-root-height)",padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...i.title,...u.noWrap,lineHeight:"16px",fontSize:n.typography.pxToRem(10),fontWeight:e?n.typography.fontWeightBold:n.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...i.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...i.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,color:n.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...i.title,...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow,marginRight:n.spacing(-.5)},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});function G({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){let l=useTheme(),i=N(),m=useRef(null),v=$(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&d();},[i]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(F,{ref:m,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:r,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:y(e.path),enabledRootRedirect:s,slotProps:r===1?n?.rootItem:n?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&n?.currentRole&&!e?.roles?.includes(n?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(ze,{disableScrollLock:!0,open:c,anchorEl:m.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...r>1&&{mt:-1},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(Be,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...n?.paper},children:jsx(no,{data:e.children,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})}function no({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n,cssVars:s}){return jsx(x,{sx:{gap:.5},children:e.map(l=>jsx(G,{data:l,render:r,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:n},l.title))})}var Hr=({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s})=>{let l=useTheme(),i={...P.mini(l),...s};return jsx(He,{component:"nav",className:t.mini.root,sx:{...i,...e},children:jsx(x,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(mo,{render:o,cssVars:i,items:m.items,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})},mo=({items:e,render:r,slotProps:o,enabledRootRedirect:a,cssVars:n})=>jsx(g,{children:jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(G,{depth:1,data:s,render:r,cssVars:n,slotProps:o,enabledRootRedirect:a},s.title))})});var q=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(fo,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsxs(T,{component:"span",className:t.item.texts,children:[jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,placement:"top-start",children:jsx(T,{component:"span",className:t.item.caption,children:n})})]}),o&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),fo=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium},caption:{...u.noWrap,...n.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...i.icon},[`& .${t.item.texts}`]:{...i.texts},[`& .${t.item.title}`]:{...i.title},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...i.icon},[`& .${t.item.texts}`]:{...i.texts},[`& .${t.item.title}`]:{...i.title},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});function J({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n}){let s=N(),l=$(e.path,!!e.children),[i,m]=useState(l);useEffect(()=>{l||c();},[s]);let v=useCallback(()=>{e.children&&m(f=>!f);},[e.children]),c=useCallback(()=>{m(!1);},[]),p=jsx(q,{render:r,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:l,disabled:e.disabled,hasChild:!!e.children,open:e.children&&i,externalLink:y(e.path),enabledRootRedirect:n,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[p,jsx(ee,{"data-group":e.title,in:i,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(go,{data:e.children,render:r,depth:o,slotProps:a,enabledRootRedirect:n})})]}):jsx(g,{disabled:e.disabled,children:p})}function go({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n}){return jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(J,{data:s,render:r,depth:o+1,slotProps:a,enabledRootRedirect:n},s.title))})}var In=({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s})=>{let l=useTheme(),i={...P.vertical(l),...s};return jsx(He,{component:"nav",className:t.vertical.root,sx:{...i,...e},children:jsx(x,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(Lo,{subheader:m.subheader,items:m.items,render:o,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})},Lo=({items:e,render:r,subheader:o,slotProps:a,enabledRootRedirect:n})=>{let[s,l]=useState(!0),i=useCallback(()=>{l(v=>!v);},[]),m=jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(J,{data:v,render:r,depth:1,slotProps:a,enabledRootRedirect:n},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(j,{"data-title":o,open:s,onClick:i,sx:a?.subheader,children:o}),jsx(be,{in:s,children:m})]}):m})};
18
+
19
+ export { ee as NavCollapse, g as NavLi, rr as NavSectionHorizontal, H as NavSectionHorizontalItem, Hr as NavSectionMini, F as NavSectionMiniItem, In as NavSectionVertical, q as NavSectionVerticalItem, x as NavUl, j as Subheader, X as bulletColor, t as navSectionClasses, P as navSectionCssVars, u as sharedStyles, R as stateClasses, _ as useNavItem };
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .lazy-load-image-background.blur{filter:blur(15px)}.lazy-load-image-background.blur.lazy-load-image-loaded{filter:blur(0);transition:filter .3s}.lazy-load-image-background.blur>img{opacity:0}.lazy-load-image-background.blur.lazy-load-image-loaded>img{opacity:1;transition:opacity .3s}pre{:is(code[as="code"]){.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f99157}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#6cc}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#69c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}}}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,43 @@
1
- export * from './components';
2
- export * from './hooks';
3
- export * from './utils';
4
- //# sourceMappingURL=index.d.ts.map
1
+ declare module '@mui/material/styles/createPalette' {
2
+ interface CommonColors {
3
+ whiteChannel: string;
4
+ blackChannel: string;
5
+ }
6
+ interface TypeText {
7
+ disabledChannel: string;
8
+ }
9
+ interface TypeBackground {
10
+ neutral: string;
11
+ neutralChannel: string;
12
+ }
13
+ interface SimplePaletteColorOptions {
14
+ lighter: string;
15
+ darker: string;
16
+ lighterChannel: string;
17
+ darkerChannel: string;
18
+ }
19
+ interface PaletteColor {
20
+ lighter: string;
21
+ darker: string;
22
+ lighterChannel: string;
23
+ darkerChannel: string;
24
+ }
25
+ }
26
+ declare module '@mui/material' {
27
+ interface Color {
28
+ ['50Channel']: string;
29
+ ['100Channel']: string;
30
+ ['200Channel']: string;
31
+ ['300Channel']: string;
32
+ ['400Channel']: string;
33
+ ['500Channel']: string;
34
+ ['600Channel']: string;
35
+ ['700Channel']: string;
36
+ ['800Channel']: string;
37
+ ['900Channel']: string;
38
+ }
39
+ }
40
+
41
+ declare const test: () => boolean;
42
+
43
+ export { test };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ var t=()=>!0;
2
+
3
+ export { t as test };
@@ -0,0 +1,39 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ import { EditorOptions, Editor, Extension } from '@tiptap/react';
3
+
4
+ type EditorProps = Partial<EditorOptions> & {
5
+ value?: string;
6
+ error?: boolean;
7
+ fullItem?: boolean;
8
+ resetValue?: boolean;
9
+ sx?: SxProps<Theme>;
10
+ placeholder?: string;
11
+ helperText?: React.ReactNode;
12
+ onChange?: (value: string) => void;
13
+ slotProps?: {
14
+ wrap: SxProps<Theme>;
15
+ };
16
+ };
17
+ type EditorToolbarProps = {
18
+ fullScreen: boolean;
19
+ editor: Editor | null;
20
+ onToggleFullScreen: () => void;
21
+ fullItem?: EditorProps['fullItem'];
22
+ };
23
+ type EditorToolbarItemProps = {
24
+ icon?: React.ReactNode;
25
+ label?: string;
26
+ active?: boolean;
27
+ disabled?: boolean;
28
+ };
29
+ type EditorCodeHighlightBlockProps = {
30
+ extension: Extension;
31
+ updateAttributes: (attributes: Record<string, any>) => void;
32
+ node: {
33
+ attrs: {
34
+ language: string;
35
+ };
36
+ };
37
+ };
38
+
39
+ export { EditorProps as E, EditorToolbarProps as a, EditorToolbarItemProps as b, EditorCodeHighlightBlockProps as c };
package/package.json CHANGED
@@ -1,81 +1,96 @@
1
1
  {
2
+ "version": "2.0.0",
2
3
  "name": "@zydon/common-csr",
3
4
  "description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
4
- "private": false,
5
- "version": "1.1.11",
6
- "type": "module",
7
- "scripts": {
8
- "dev": "vite",
9
- "build": "tsc && vite build",
10
- "preview": "vite preview",
11
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
12
- "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
13
- "format": "prettier --write \"**/*.*\""
5
+ "license": "MIT",
6
+ "author": "Zydon Tech",
7
+ "bugs": {
8
+ "url": "https://github.com/zydontecnologia"
14
9
  },
10
+ "homepage": "https://github.com/zydontecnologia",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "module": "./dist/index.mjs",
15
+ "types": "./dist/index.d.ts",
15
16
  "files": [
16
17
  "dist",
17
18
  "README"
18
19
  ],
20
+ "scripts": {
21
+ "build": "tsup",
22
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
23
+ "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
24
+ "format": "prettier --write \"**/*.*\""
25
+ },
19
26
  "exports": {
20
- ".": {
21
- "import": "./dist/index.js",
22
- "require": "./dist/index.umd.jcs"
27
+ "./components/*": {
28
+ "import": "./dist/components/*/index.mjs",
29
+ "types": "./dist/components/*/index.d.ts"
23
30
  },
24
- "./styles.css": "./dist/style.css"
25
- },
26
- "module": "./dist/index.js",
27
- "types": "./dist/index.d.ts",
28
- "dependencies": {
29
- "@codemirror/lang-sql": "^6.5.5",
30
- "@uiw/react-codemirror": "^4.21.21",
31
- "highlight.js": "^11.9.0",
32
- "react-ace": "^11.0.1",
33
- "react-lazy-load-image-component": "^1.6.0",
34
- "react-quill": "^2.0.0"
31
+ "./filters/*": {
32
+ "import": "./dist/components/filters/*/index.mjs",
33
+ "types": "./dist/components/filters/*/index.d.ts"
34
+ },
35
+ "./styles.css": "./dist/index.css"
35
36
  },
36
37
  "devDependencies": {
37
- "@emotion/react": "^11.11.3",
38
- "@emotion/styled": "^11.11.0",
39
- "@mui/material": "^5.15.6",
40
- "@mui/x-data-grid-premium": "^7.6.2",
41
- "@types/node": "^20.11.10",
42
- "@types/react": "^18.2.43",
43
- "@types/react-dom": "^18.2.17",
44
- "@types/react-lazy-load-image-component": "^1.6.3",
45
- "@typescript-eslint/eslint-plugin": "^6.14.0",
46
- "@typescript-eslint/parser": "^6.14.0",
47
- "@vitejs/plugin-react": "^4.2.1",
48
- "@zydon/common": "^1.3.99",
49
- "eslint": "^8.55.0",
38
+ "@emotion/react": "^11.13.0",
39
+ "@emotion/styled": "^11.13.0",
40
+ "@mui/material": "^5.16.6",
41
+ "@mui/x-data-grid-premium": "^7.12.1",
42
+ "@types/react": "^18.3.3",
43
+ "@types/react-dom": "^18.3.0",
44
+ "@types/react-lazy-load-image-component": "^1.6.4",
45
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
46
+ "@typescript-eslint/parser": "^6.4.1",
47
+ "@zydon/common": "^2.0.0",
48
+ "autoprefixer": "^10.4.20",
49
+ "eslint": "^8.47.0",
50
+ "eslint-config-prettier": "^9.0.0",
51
+ "eslint-plugin-prettier": "^5.0.0",
52
+ "eslint-plugin-react": "^7.33.2",
50
53
  "eslint-plugin-react-hooks": "^4.6.0",
51
- "eslint-plugin-react-refresh": "^0.4.5",
52
- "react": "^18.2.0",
53
- "react-dom": "^18.2.0",
54
- "react-hook-form": "^7.49.3",
55
- "react-router-dom": "^6.21.3",
56
- "typescript": "^5.2.2",
57
- "vite": "^5.0.8",
58
- "vite-plugin-dts": "^3.7.2",
59
- "vite-tsconfig-paths": "^4.3.1"
54
+ "eslint-plugin-react-refresh": "^0.4.3",
55
+ "eslint-plugin-simple-import-sort": "^12.1.1",
56
+ "postcss": "^8.4.40",
57
+ "postcss-import": "^16.1.0",
58
+ "prettier": "^3.0.2",
59
+ "react": "^18.3.1",
60
+ "react-dom": "^18.3.1",
61
+ "react-hook-form": "^7.52.2",
62
+ "react-router-dom": "^6.26.0",
63
+ "tsup": "6.6.0",
64
+ "typescript": "^5.5.4"
65
+ },
66
+ "dependencies": {
67
+ "@codemirror/lang-sql": "^6.7.0",
68
+ "@tiptap/core": "^2.5.9",
69
+ "@tiptap/extension-code-block": "^2.5.9",
70
+ "@tiptap/extension-code-block-lowlight": "^2.5.9",
71
+ "@tiptap/extension-image": "^2.5.9",
72
+ "@tiptap/extension-link": "^2.5.9",
73
+ "@tiptap/extension-placeholder": "^2.5.9",
74
+ "@tiptap/extension-text-align": "^2.5.9",
75
+ "@tiptap/pm": "^2.5.9",
76
+ "@tiptap/react": "^2.5.9",
77
+ "@tiptap/starter-kit": "^2.5.9",
78
+ "@uiw/react-codemirror": "^4.23.0",
79
+ "lowlight": "^3.1.0",
80
+ "react-ace": "^12.0.0",
81
+ "react-lazy-load-image-component": "^1.6.2"
60
82
  },
61
83
  "peerDependencies": {
62
84
  "@emotion/react": ">=11.x",
63
85
  "@emotion/styled": ">=11.x",
86
+ "@mui/lab": ">=5.x",
64
87
  "@mui/material": ">=5.x",
65
- "@mui/x-data-grid-premium": ">=6.x",
66
- "@zydon/common": ">=1.x",
88
+ "@mui/x-data-grid-premium": ">=7.x",
89
+ "@mui/x-date-pickers-pro": ">=7.x",
90
+ "@zydon/common": ">=2.x",
67
91
  "react": ">=18.x",
68
92
  "react-dom": ">=18.x",
69
93
  "react-hook-form": ">=7.x",
70
94
  "react-router-dom": ">=6.x"
71
- },
72
- "author": "Zydon Tech",
73
- "bugs": {
74
- "url": "https://github.com/zydontecnologia"
75
- },
76
- "homepage": "https://github.com/zydontecnologia",
77
- "license": "MIT",
78
- "publishConfig": {
79
- "access": "public"
80
95
  }
81
96
  }
package/dist/App.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare const App: () => import("react/jsx-runtime").JSX.Element;
2
- export default App;
3
- //# sourceMappingURL=App.d.ts.map
package/dist/App.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,GAAG,+CAMR,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -1,8 +0,0 @@
1
- export declare const formats: string[];
2
- type EditorToolbarProps = {
3
- id: string;
4
- isSimple?: boolean;
5
- };
6
- declare const EditorToolbar: ({ id, isSimple, ...other }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
7
- export default EditorToolbar;
8
- //# sourceMappingURL=EditorToolbar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/EditorToolbar.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO,UAwBnB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,aAAa,+BAAgC,kBAAkB,4CAwEpE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,5 +0,0 @@
1
- import { EditorProps } from '../../types/editor';
2
-
3
- declare const Editor: ({ id, error, value, onChange, simple, helperText, sx, ...other }: EditorProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Editor;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAKzB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,QAAA,MAAM,MAAM,qEAST,WAAW,4CA6Cb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledEditor: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
- export declare const StyledEditorToolbar: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,YAAY;;+JAwBtB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,6NA+H9B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EditorField/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,WAAW,0CAKd,gBAAgB,4CA0BlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseField } from '../../types/baseField';
2
- import { EditorProps as IEditorProps } from '../../types/editor';
3
-
4
- export type EditorFieldProps = BaseField<IEditorProps>;
5
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/EditorField/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ItensProps } from './props';
2
-
3
- declare const Itens: ({ label, itens, argumentsValues, fields, addItem, removeItem, insertItemSQL, }: ItensProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Itens;
5
- //# sourceMappingURL=Itens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Itens.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/AdvancedMode/Itens.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,QAAA,MAAM,KAAK,mFAQR,UAAU,4CA6EZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,5 +0,0 @@
1
- import { NewItensProps } from './props';
2
-
3
- declare const NewItem: ({ openPopover, handleClose, addItem }: NewItensProps) => import("react/jsx-runtime").JSX.Element;
4
- export default NewItem;
5
- //# sourceMappingURL=NewItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NewItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/AdvancedMode/NewItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,QAAA,MAAM,OAAO,0CAA2C,aAAa,4CAyDpE,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,5 +0,0 @@
1
- import { AdvancedModeProps } from './props';
2
-
3
- declare const AdvancedMode: ({ fieldsSelect, argumentsValues, onChangeArguments, sql, setSql, setFilterRule, }: AdvancedModeProps) => import("react/jsx-runtime").JSX.Element;
4
- export default AdvancedMode;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/AdvancedMode/index.tsx"],"names":[],"mappings":";AACA,OAAO,+BAA+B,CAAC;AACvC,OAAO,8CAA8C,CAAC;AACtD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,wCAAwC,CAAC;AAOhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,QAAA,MAAM,YAAY,sFAOf,iBAAiB,4CAoHnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,25 +0,0 @@
1
- import { Field } from '../props';
2
-
3
- export interface AdvancedModeProps {
4
- fieldsSelect: Field[];
5
- argumentsValues: string[];
6
- onChangeArguments: (value: string[]) => void;
7
- sql: string;
8
- setSql: (sql: string) => void;
9
- setFilterRule: (value: string) => void;
10
- }
11
- export interface ItensProps {
12
- label: string;
13
- itens?: string[];
14
- argumentsValues?: boolean;
15
- fields?: boolean;
16
- addItem?: (value: string) => void;
17
- insertItemSQL: (value: string) => void;
18
- removeItem?: (value: string) => void;
19
- }
20
- export interface NewItensProps {
21
- openPopover: HTMLElement | null;
22
- handleClose: () => void;
23
- addItem: (value: string) => void;
24
- }
25
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/AdvancedMode/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC"}
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const NewItemContainer: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
5
- export declare const ItemsContainer: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
- }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
8
- export declare const ItemContainer: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
10
- }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
11
- export declare const SQLContainer: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
13
- }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
14
- export declare const IconButtonItem: import('@emotion/styled').StyledComponent<import('@mui/material').IconButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
15
- ref?: ((instance: HTMLButtonElement | null) => void) | import('react').RefObject<HTMLButtonElement> | null | undefined;
16
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "size" | "disableFocusRipple" | "edge"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
17
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/AdvancedMode/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,gBAAgB;;qMAI1B,CAAC;AACJ,eAAO,MAAM,cAAc;;qMAOxB,CAAC;AAEJ,eAAO,MAAM,aAAa;;qMAkBvB,CAAC;AAEJ,eAAO,MAAM,YAAY;;qMAUtB,CAAC;AAEJ,eAAO,MAAM,cAAc;;uZAGzB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { FormPreviewProps } from './props';
2
-
3
- declare const FormPreview: ({ openPopover, handleClose, argumentsValues, filter, onExecute, }: FormPreviewProps) => import("react/jsx-runtime").JSX.Element;
4
- export default FormPreview;
5
- //# sourceMappingURL=FormPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormPreview.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/Preview/FormPreview.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,WAAW,sEAMd,gBAAgB,4CA8FlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,5 +0,0 @@
1
- import { PreviewProps } from './props';
2
-
3
- declare const Preview: ({ data, fields, isLoading, isError }: PreviewProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Preview;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/Preview/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,OAAO,yCAA0C,YAAY,4CA0BlE,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,14 +0,0 @@
1
- export interface PreviewProps {
2
- data?: object[];
3
- fields: string[];
4
- isError?: boolean;
5
- isLoading?: boolean;
6
- }
7
- export interface FormPreviewProps {
8
- openPopover: HTMLElement | null;
9
- handleClose: () => void;
10
- argumentsValues: string[];
11
- filter?: string;
12
- onExecute: (value: string) => void;
13
- }
14
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/Preview/props.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC"}
@@ -1,5 +0,0 @@
1
- import { ConditionalProps } from './props';
2
-
3
- declare const Conditional: ({ index, indexGroup, removeConditional, fieldsSelect, }: ConditionalProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Conditional;
5
- //# sourceMappingURL=Conditional.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Conditional.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/SimpleMode/Conditional.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C,QAAA,MAAM,WAAW,4DAKd,gBAAgB,4CAwElB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,5 +0,0 @@
1
- import { GroupProps } from './props';
2
-
3
- declare const Group: ({ index, removeGroup, fieldsSelect }: GroupProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Group;
5
- //# sourceMappingURL=Group.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/SimpleMode/Group.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,QAAA,MAAM,KAAK,yCAA0C,UAAU,4CAoD9D,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,5 +0,0 @@
1
- import { RuleListProps } from './props';
2
-
3
- declare const SimpleMode: ({ fieldsSelect }: RuleListProps) => import("react/jsx-runtime").JSX.Element;
4
- export default SimpleMode;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/SimpleMode/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,QAAA,MAAM,UAAU,qBAAsB,aAAa,4CAyDlD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,34 +0,0 @@
1
- import { Field } from '../props';
2
-
3
- export interface RuleListProps {
4
- fieldsSelect: Field[];
5
- sql: string;
6
- setSql: (sql: string) => void;
7
- }
8
- export interface SimpleModeFormProps {
9
- operator: 'and' | 'or';
10
- groups: groupForm[];
11
- }
12
- export interface groupForm {
13
- operator: 'and' | 'or';
14
- conditionals: [
15
- {
16
- field: string;
17
- conditional: '=' | '>' | '<' | '<=' | '>=' | '!=' | 'IS NULL' | 'IN' | 'LIKE' | 'NOT IN' | 'NOT LIKE' | 'IS NOT NULL';
18
- type: 'value' | 'field';
19
- value: string;
20
- }
21
- ];
22
- }
23
- export interface GroupProps {
24
- index: number;
25
- removeGroup: (index: number) => void;
26
- fieldsSelect: Field[];
27
- }
28
- export interface ConditionalProps {
29
- indexGroup: number;
30
- index: number;
31
- removeConditional: (index: number) => void;
32
- fieldsSelect: Field[];
33
- }
34
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../../src/components/Filters/AdvancedRule/SimpleMode/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE;QACZ;YACE,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EACP,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,SAAS,GACT,IAAI,GACJ,MAAM,GACN,QAAQ,GACR,UAAU,GACV,aAAa,CAAC;YAClB,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;YACxB,KAAK,EAAE,MAAM,CAAC;SACf;KACF,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,KAAK,EAAE,CAAC;CACvB;AACD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,KAAK,EAAE,CAAC;CACvB"}