@zydon/common 2.9.39 → 2.9.40
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-BBLPAVHA.js +8 -0
- package/dist/chunk-BBLPAVHA.js.map +1 -0
- package/dist/chunk-FCKDOHEL.js +16 -0
- package/dist/chunk-FCKDOHEL.js.map +1 -0
- package/dist/chunk-JYHO7CDG.js +9 -0
- package/dist/chunk-JYHO7CDG.js.map +1 -0
- package/dist/components/Analytics/Carts/index.d.ts +2 -1
- package/dist/components/Analytics/Carts/index.js +23 -23
- package/dist/components/Analytics/Carts/index.js.map +1 -1
- package/dist/components/Analytics/OrderProjection/index.d.ts +2 -1
- package/dist/components/Analytics/OrderProjection/index.js +29 -28
- package/dist/components/Analytics/OrderProjection/index.js.map +1 -1
- package/dist/components/Analytics/PartnerAnalysis/index.d.ts +2 -1
- package/dist/components/Analytics/index.d.ts +1 -0
- package/dist/components/Analytics/index.js +3 -3
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/DataView/index.d.ts +1 -1
- package/dist/hooks/useCartsFilters.d.ts +2 -1
- package/dist/hooks/useCartsFilters.js +1 -1
- package/dist/hooks/useOrderProjectionFilters.d.ts +2 -1
- package/dist/hooks/useOrderProjectionFilters.js +1 -1
- package/dist/hooks/useSnackbar.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/styles/index.d.ts +13 -13
- package/dist/types/carts.d.ts +2 -1
- package/dist/types/orderProjection.d.ts +2 -1
- package/dist/types/partnerAnalysis.d.ts +2 -1
- package/dist/types-15e95556.d.ts +15 -0
- package/dist/{useCartsFilters-9eb738ab.d.ts → useCartsFilters-44ddc83e.d.ts} +8 -20
- package/dist/{useOrderProjectionFilters-5c1162d5.d.ts → useOrderProjectionFilters-3722b749.d.ts} +13 -24
- package/dist/utils/orderProjection.d.ts +2 -1
- package/package.json +1 -1
- package/dist/chunk-5GXRPVV5.js +0 -9
- package/dist/chunk-5GXRPVV5.js.map +0 -1
- package/dist/chunk-KJJDGCL4.js +0 -8
- package/dist/chunk-KJJDGCL4.js.map +0 -1
- package/dist/{index-c8f1e6e7.d.ts → index-5a5e5dc8.d.ts} +12 -12
|
@@ -10,10 +10,11 @@ import * as _mui_material_styles from '@mui/material/styles';
|
|
|
10
10
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
11
11
|
import * as _mui_material from '@mui/material';
|
|
12
12
|
import * as _mui_material_Button from '@mui/material/Button';
|
|
13
|
-
import '../../../useOrderProjectionFilters-
|
|
13
|
+
import '../../../useOrderProjectionFilters-3722b749.js';
|
|
14
14
|
import '../../../types/analytics.js';
|
|
15
15
|
import '../../../utils/analytics.js';
|
|
16
16
|
import 'dayjs';
|
|
17
|
+
import '../../../types-15e95556.js';
|
|
17
18
|
|
|
18
19
|
interface ChartItem {
|
|
19
20
|
name: string;
|
|
@@ -10,6 +10,7 @@ import * as _mui_material_OverridableComponent from '@mui/material/OverridableCo
|
|
|
10
10
|
import * as _mui_material_Card from '@mui/material/Card';
|
|
11
11
|
import { ExportFormat } from '../../utils/analytics.js';
|
|
12
12
|
import { FilterDateState } from '../../types/analytics.js';
|
|
13
|
+
export { b as AnalyticsFilterOption, A as AnalyticsOptionsQuery, a as AnalyticsOptionsResult } from '../../types-15e95556.js';
|
|
13
14
|
|
|
14
15
|
interface AiSummaryProps {
|
|
15
16
|
brief?: string;
|
|
@@ -19,10 +19,10 @@ import { b } from '../../chunk-TXJ45CNA.js';
|
|
|
19
19
|
import { c as c$1, d } from '../../chunk-ERLI5GAP.js';
|
|
20
20
|
import { a as a$5 } from '../../chunk-LQRRMVFN.js';
|
|
21
21
|
import Wt from '@mui/material/AlertTitle';
|
|
22
|
-
import
|
|
22
|
+
import dt from '@mui/material/Button';
|
|
23
23
|
import tt from '@mui/material/Typography';
|
|
24
24
|
import I from '@mui/material/Stack';
|
|
25
|
-
import
|
|
25
|
+
import Rt from '@mui/material/Alert';
|
|
26
26
|
import { keyframes, styled, alpha } from '@mui/material/styles';
|
|
27
27
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
28
28
|
import { memo, useState, useCallback } from 'react';
|
|
@@ -41,7 +41,7 @@ var Ot=keyframes`
|
|
|
41
41
|
100% {
|
|
42
42
|
background-position: 200% 50%;
|
|
43
43
|
}
|
|
44
|
-
`,F=styled(
|
|
44
|
+
`,F=styled(Rt)(({theme:t})=>{let r=t.palette.primary.main,i=alpha(r,.1);return {position:"relative",backgroundColor:alpha(t.palette.primary.main,.01),border:"1px solid transparent",borderRadius:8,"&::before":{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:`linear-gradient(90deg, ${r} 0%, ${i} 50%, ${r} 100%)`,WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude",pointerEvents:"none"},overflow:"hidden","& .MuiAlert-message":{width:"100%"}}}),X=styled(F)({border:"1px solid transparent","&::before":{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:"1px",background:"linear-gradient(90deg, #e01cd5 0%, #1CB5E0 50%, #e01cd5 100%)",backgroundSize:"200% auto",WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude",pointerEvents:"none",animation:`${Ot} 2s linear infinite`}});var Lt=()=>jsxs(X,{icon:jsx(a$4,{icon:"AI_08_SOLID_ROUND",color:"primary.main"}),action:jsx(a$c,{variant:"text",width:100,height:30}),children:[jsx(Wt,{variant:"subtitle1",color:"text.primary",children:"Resumo inteligente"}),jsxs(I,{gap:.5,children:[jsx(a$c,{variant:"text",width:"100%",height:30}),jsx(a$c,{variant:"text",width:"80%",height:30})]})]}),Z=Lt;var Ht=()=>jsxs(I,{direction:"row",alignItems:"center",gap:1.5,children:[jsx(a$4,{icon:"AI_08_SOLID_ROUND",color:"primary.main",sx:{flexGrow:0}}),jsxs(I,{children:[jsx(tt,{variant:"subtitle1",color:"text.primary",children:"Resumo inteligente"}),jsx(tt,{variant:"body2",color:"text.secondary",children:"Gerado com base nos dados consolidados da p\xE1gina."})]})]}),w=Ht;var $t=t=>t,et=({detail:t,formatContent:r})=>{let i=r??$t,l=r!=null;return jsx(tt,{variant:"body2",color:"text.primary",children:l?jsx("span",{dangerouslySetInnerHTML:{__html:i(t)}}):t})},Gt=({open:t,toggleOpen:r,detail:i,formatContent:l})=>b("down","sm")?jsx(a,{open:t,onClose:r,headerTitle:jsx(w,{}),headerProps:{direction:"row-reverse",sx:{"& > :last-child":{minWidth:0,overflow:"hidden"}}},children:jsx(et,{detail:i,formatContent:l})}):jsx(a$1,{open:t,onClose:r,dialogTitle:jsx(w,{}),dialogTitleProps:{sx:{flex:1,overflow:"hidden"}},maxWidth:"md",fullWidth:!0,scroll:"paper",children:jsx(et,{detail:i,formatContent:l})}),rt=memo(Gt);var qt=({brief:t,detail:r,isLoading:i=!1,formatContent:l})=>{let[m,u]=a$2(!1);return !(!!t&&!!r)&&!i?null:jsxs(Fragment,{children:[jsx(a$3,{isLoading:i,loading:jsx(Z,{}),children:jsxs(F,{icon:jsx(a$4,{icon:"AI_08_SOLID_ROUND",color:"primary.main"}),action:jsx(dt,{variant:i?"contained":"text",color:"primary",size:"small",onClick:u,children:"Ver mais"}),children:[jsx(Wt,{variant:"subtitle1",color:"text.primary",children:"Resumo inteligente"}),jsx(tt,{variant:"body2",color:"text.secondary",children:t})]})}),jsx(rt,{open:m,toggleOpen:u,detail:r??"",formatContent:l})]})},Jt=qt;var nt=styled(dt)(({theme:t})=>({color:t.palette.text.secondary,"&:hover":{background:t.palette.action.hover}})),lt=styled(Xt)(({theme:t})=>({justifyContent:"flex-start",color:t.palette.text.secondary,fontWeight:400,"&:hover":{background:t.palette.action.hover}}));var Zt=({onExport:t,isExporting:r})=>{let{open:i,onOpen:l,onClose:m}=a$5(),u=e=>{t(e),m();};return jsxs(Fragment,{children:[jsx(nt,{variant:"text",startIcon:jsx(a$4,{icon:"DOWNLOAD"}),color:"primary",size:"small",onClick:l,disabled:r,children:r?"Exportando...":"Exportar"}),jsx(a$6,{open:i,onClose:m,disabledArrow:!0,sx:{p:1,width:180},children:Object.values(c$1).map((e,p)=>jsx(lt,{variant:"text",onClick:()=>u(e),loading:r,fullWidth:!0,"data-testid":`export-button-${p}`,children:e},p))})]})},jt=Zt;var mt=styled(c)(({theme:t})=>({"&.MuiDateRangeCalendar-root":{margin:-24},"& .MuiPickersCalendarHeader-label":{textTransform:"capitalize"},[t.breakpoints.down(400)]:{"& .MuiPickersCalendarHeader-root":{padding:t.spacing(0,7)},"& .MuiDayCalendar-header, & .MuiDayCalendar-weekContainer":{gap:0},"& .MuiPickersDay-root, & .MuiDateRangePickerDay-root":{width:32,height:32},"& .MuiDayCalendar-weekDayLabel":{width:32,height:32},"& .MuiDayCalendar-slideTransition":{minHeight:210}},[t.breakpoints.down(350)]:{"& .MuiPickersDay-root, & .MuiDateRangePickerDay-root":{width:28,height:28},"& .MuiDayCalendar-weekDayLabel":{width:28,height:28},"& .MuiDayCalendar-slideTransition":{minHeight:196}}}));var so=["D","S","T","Q","Q","S","S"],po=({value:t,onSave:r,onClose:i})=>{let l=b("down","sm"),m=useForm({defaultValues:{period:t.period,start_date:t.start_date?P(t.start_date).toDate():null,end_date:t.end_date?P(t.end_date).toDate():null}}),{handleSubmit:u,setValue:e$1,getValues:p}=m,[R,x]=useState(t.period),[pt,D]=useState(()=>[t.start_date?P(t.start_date).toDate():null,t.end_date?P(t.end_date).toDate():null]),v=useCallback(o=>{let a=b$1(o);x(o),D([a.start_date,a.end_date]),e$1("period",o),e$1("start_date",a.start_date),e$1("end_date",a.end_date);},[e$1]),ct=useCallback(o=>{if(D(o),o[0]&&e$1("start_date",o[0]),o[1]&&e$1("end_date",o[1]),o[0]&&o[1]){let a=e(o[0],o[1]);x(a),e$1("period",a);}},[e$1]),ft=useCallback(o=>{e$1("start_date",o);let a=p("end_date");if(o&&a){let c=[o,a];D(c);let y=e(c[0],c[1]);x(y),e$1("period",y);}},[p,e$1]),ut=useCallback(o=>{e$1("end_date",o);let a=p("start_date");if(a&&o){let c=[a,o];D(c);let y=e(c[0],c[1]);x(y),e$1("period",y);}},[p,e$1]),gt=useCallback(o=>{o&&typeof o=="string"&&v(o);},[v]),yt=useCallback(o=>{r(f(o));},[r]);return jsxs(a$7,{methods:m,onSubmit:u(yt),gap:3,children:[jsx(tt,{variant:"overline",color:"text.secondary",children:"Defina o per\xEDodo"}),jsxs(I,{display:"grid",gridTemplateColumns:"1fr 1fr",alignItems:"center",gap:1.5,children:[jsx(a$8,{name:"start_date",label:"Data inicial",size:"small",onChange:ft}),jsx(a$8,{name:"end_date",label:"Data final",size:"small",onChange:ut})]}),jsxs(a$9,{direction:{xs:"column",sm:"row"},alignItems:"center",justifyContent:{xs:"center",sm:"space-between"},gap:{xs:3,sm:0},overflow:"hidden",children:[l?jsx(a$a,{name:"period",value:R,onChange:gt,options:a$b,size:"small",disableClearable:!0,fullWidth:!0}):jsx(lo,{value:R,onChange:(o,a)=>v(a),children:Object.values(d).map(o=>jsx(io,{value:o,control:jsx(no,{size:"small"}),label:a$b.find(a=>a.value===o)?.label},o))}),jsx(ao,{orientation:"vertical",flexItem:!0,sx:{display:{xs:"none",sm:"block"}}}),jsx(mt,{value:pt,onChange:ct,calendars:1,showDaysOutsideCurrentMonth:!0,fixedWeekNumber:6,disableFuture:!0,dayOfWeekFormatter:o=>so[o.day()]})]}),jsx(I,{alignItems:"flex-end",children:jsxs(I,{direction:"row",alignItems:"center",gap:1.5,children:[jsx(dt,{variant:"outlined",color:"inherit",onClick:i,children:"Cancelar"}),jsx(dt,{variant:"contained",type:"submit",children:"Salvar"})]})})]})},co=po;
|
|
45
45
|
|
|
46
46
|
export { Jt as AiSummary, jt as ExportButton, co as FilterDate };
|
|
47
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -11,7 +11,7 @@ interface ImageContainerProps {
|
|
|
11
11
|
|
|
12
12
|
declare const Avatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<PropsWithChildren<ImageContainerProps & _mui_material_Avatar.AvatarOwnProps & _mui_material_Avatar.AvatarSlotsAndSlotProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
13
|
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
-
}, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "
|
|
14
|
+
}, "children" | "className" | "style" | "classes" | "sx" | "variant" | "slots" | "slotProps" | "sizes" | "alt" | "src" | "srcSet" | "imgProps"> & {
|
|
15
15
|
component?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
|
|
16
16
|
}>, "ref"> & react.RefAttributes<HTMLDivElement>>>;
|
|
17
17
|
|
|
@@ -90,7 +90,7 @@ declare const SelectionOverlay: _emotion_styled.StyledComponent<_mui_material_St
|
|
|
90
90
|
}, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
91
91
|
declare const SelectionCount: _emotion_styled.StyledComponent<_mui_material_Typography.TypographyOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
92
92
|
ref?: ((instance: HTMLSpanElement | null) => void) | react.RefObject<HTMLSpanElement> | null | undefined;
|
|
93
|
-
}, "fontFamily" | "children" | "pt" | "className" | "style" | "classes" | "sx" | "variant" | "border" | "boxShadow" | "
|
|
93
|
+
}, "typography" | "zIndex" | "fontFamily" | "fontWeight" | "children" | "pt" | "className" | "style" | "classes" | "sx" | "variant" | "border" | "boxShadow" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
94
94
|
declare const SelectionActions: _emotion_styled.StyledComponent<_mui_material_Stack.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
95
95
|
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
|
96
96
|
}, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material_Stack.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material_styles.Theme>, {}, {}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@mui/x-data-grid-premium/models/gridApiPremium';
|
|
3
3
|
import '@mui/x-data-grid-premium';
|
|
4
|
+
import '../types-15e95556.js';
|
|
4
5
|
import '../types/analytics.js';
|
|
5
|
-
export { U as UseCartsFiltersReturn,
|
|
6
|
+
export { U as UseCartsFiltersReturn, y as default } from '../useCartsFilters-44ddc83e.js';
|
|
6
7
|
import '../utils/carts.js';
|
|
7
8
|
import '../utils/analytics.js';
|
|
8
9
|
import '../types/pagination.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../types/analytics.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'dayjs';
|
|
4
|
-
|
|
4
|
+
import '../types-15e95556.js';
|
|
5
|
+
export { U as UseOrderProjectionFiltersReturn, N as default } from '../useOrderProjectionFilters-3722b749.js';
|
|
5
6
|
import '../utils/analytics.js';
|
|
6
7
|
import '../utils/partnerAnalysis.js';
|
|
@@ -12,7 +12,6 @@ declare const useSnackbar: () => {
|
|
|
12
12
|
custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
|
|
13
13
|
message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | (() => ReactNode) | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
14
14
|
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
|
|
15
|
-
cancel?: ReactNode | sonner.Action;
|
|
16
15
|
className?: string | undefined;
|
|
17
16
|
style?: react.CSSProperties | undefined;
|
|
18
17
|
position?: ("top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right") | undefined;
|
|
@@ -21,6 +20,7 @@ declare const useSnackbar: () => {
|
|
|
21
20
|
icon?: ReactNode;
|
|
22
21
|
duration?: number | undefined;
|
|
23
22
|
onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
|
|
23
|
+
cancel?: ReactNode | sonner.Action;
|
|
24
24
|
richColors?: boolean | undefined;
|
|
25
25
|
invert?: boolean | undefined;
|
|
26
26
|
closeButton?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomShadows } from './index-
|
|
2
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-
|
|
1
|
+
import { C as CustomShadows } from './index-5a5e5dc8.js';
|
|
2
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-5a5e5dc8.js';
|
|
3
3
|
export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
|
|
4
4
|
export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
import { S as SettingsState } from './settings-583c107c.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-
|
|
1
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-5a5e5dc8.js';
|
|
2
2
|
import '@mui/lab/TimelineConnector';
|
|
3
3
|
import '@mui/system';
|
|
4
4
|
import '@mui/lab/TimelineDot';
|
|
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
173
173
|
float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
|
|
174
174
|
floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
|
|
175
175
|
floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
|
|
176
|
-
fontFamily?:
|
|
176
|
+
fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
|
|
177
177
|
fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
|
|
178
178
|
fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
|
|
179
179
|
fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
|
|
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
197
197
|
fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
|
|
198
198
|
fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
|
|
199
199
|
fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
|
|
200
|
-
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly (
|
|
200
|
+
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
|
|
201
201
|
fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
|
|
202
202
|
forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
|
|
203
203
|
gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
|
|
@@ -460,9 +460,9 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
460
460
|
x?: readonly (string | (string & {}))[] | csstype.Property.X<string | number> | readonly NonNullable<csstype.Property.X<string | number> | undefined>[] | undefined;
|
|
461
461
|
y?: readonly (string | (string & {}))[] | csstype.Property.Y<string | number> | readonly NonNullable<csstype.Property.Y<string | number> | undefined>[] | undefined;
|
|
462
462
|
zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
|
|
463
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly (
|
|
463
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
|
|
464
464
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
465
|
-
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
465
|
+
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
466
466
|
animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
|
|
467
467
|
background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
|
|
468
468
|
border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
|
|
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
474
474
|
borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
|
|
475
475
|
borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
|
|
476
476
|
borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
|
|
477
|
-
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
477
|
+
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
478
478
|
borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
|
|
479
479
|
borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
|
|
480
480
|
borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
|
|
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
509
509
|
marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
|
|
510
510
|
marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
|
|
511
511
|
mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
|
|
512
|
-
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly (
|
|
512
|
+
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
513
513
|
motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
514
514
|
offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
515
515
|
outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
|
|
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
758
758
|
WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
|
|
759
759
|
WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
|
|
760
760
|
WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
761
|
-
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
762
|
-
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
761
|
+
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
762
|
+
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
763
763
|
MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
764
764
|
MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
765
765
|
MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
|
|
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
771
771
|
msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
|
|
772
772
|
msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
|
|
773
773
|
msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
774
|
-
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
774
|
+
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
775
775
|
WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
|
|
776
|
-
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
776
|
+
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
777
777
|
WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
|
|
778
778
|
WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
779
779
|
WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
780
780
|
WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
|
|
781
781
|
WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
|
|
782
782
|
WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
|
|
783
|
-
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly (
|
|
783
|
+
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
784
784
|
WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
|
|
785
785
|
WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
|
|
786
786
|
WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
861
861
|
MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
|
|
862
862
|
MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
|
|
863
863
|
msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
|
|
864
|
-
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly (
|
|
864
|
+
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
865
865
|
OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
|
|
866
866
|
OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
|
|
867
867
|
OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
|
|
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
871
871
|
OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
|
|
872
872
|
OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
|
|
873
873
|
OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
|
|
874
|
-
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly (
|
|
874
|
+
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
875
875
|
OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
|
|
876
876
|
OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
|
|
877
877
|
OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
|
package/dist/types/carts.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@mui/x-data-grid-premium';
|
|
3
3
|
import '@mui/x-data-grid-premium/models/gridApiPremium';
|
|
4
|
-
|
|
4
|
+
import '../types-15e95556.js';
|
|
5
|
+
export { g as Cart, t as CartDetail, n as CartDetailNewOrder, p as CartDetailPartner, b as CartDetailProps, o as CartDetailUser, r as CartItem, q as CartItemComplement, e as CartPartner, s as CartPaymentMethod, f as CartUser, i as Carts, u as CartsAdapters, x as CartsContextValue, v as CartsDateFilterSlotProps, c as CartsListProps, h as CartsPagination, C as CartsProviderProps, j as CartsRequest, w as CartsSlots, m as CartsSummary, d as CartsSummaryProps, k as CartsSummaryRequest, l as CartsSummaryValues, a as CartsValue } from '../useCartsFilters-44ddc83e.js';
|
|
5
6
|
import './analytics.js';
|
|
6
7
|
import './pagination.js';
|
|
7
8
|
import '../utils/carts.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
|
|
2
|
+
import '../types-15e95556.js';
|
|
3
|
+
export { D as Day, E as Event, c as EventStyles, G as GroupedEvent, l as OrderProjectionAdapters, n as OrderProjectionContextValue, g as OrderProjectionEvent, a as OrderProjectionProviderProps, k as OrderProjectionQueryResult, m as OrderProjectionSlots, O as OrderProjectionSummary, b as OrderProjectionValue, P as Partner, d as PartnerAddress, j as PartnerDetails, f as PartnerOrder, h as PartnerProfile, e as PartnerSaleSummary, i as PartnerSeller, R as Recurrence, S as SaleAnalysis } from '../useOrderProjectionFilters-3722b749.js';
|
|
3
4
|
import '../utils/partnerAnalysis.js';
|
|
4
5
|
import './analytics.js';
|
|
5
6
|
import '../utils/analytics.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { R as Recurrence } from '../useOrderProjectionFilters-
|
|
1
|
+
import { R as Recurrence } from '../useOrderProjectionFilters-3722b749.js';
|
|
2
2
|
import { AbcCurve } from '../utils/partnerAnalysis.js';
|
|
3
3
|
import './analytics.js';
|
|
4
4
|
import '../utils/analytics.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'dayjs';
|
|
7
|
+
import '../types-15e95556.js';
|
|
7
8
|
|
|
8
9
|
interface RankingItem {
|
|
9
10
|
partner_external_id: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface AnalyticsFilterOption {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
interface AnalyticsOptionsQuery {
|
|
6
|
+
search?: string;
|
|
7
|
+
skip: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface AnalyticsOptionsResult {
|
|
10
|
+
items: AnalyticsFilterOption[];
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
isFetching: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { AnalyticsOptionsQuery as A, AnalyticsOptionsResult as a, AnalyticsFilterOption as b };
|
|
@@ -3,6 +3,7 @@ import { ReactNode, MutableRefObject } from 'react';
|
|
|
3
3
|
import * as _mui_x_data_grid_premium_models_gridApiPremium from '@mui/x-data-grid-premium/models/gridApiPremium';
|
|
4
4
|
import { GridApiPremium } from '@mui/x-data-grid-premium/models/gridApiPremium';
|
|
5
5
|
import { DataGridPremiumProps, GridSortModel } from '@mui/x-data-grid-premium';
|
|
6
|
+
import { A as AnalyticsOptionsQuery, a as AnalyticsOptionsResult, b as AnalyticsFilterOption } from './types-15e95556.js';
|
|
6
7
|
import { FilterDateState } from './types/analytics.js';
|
|
7
8
|
import { Profile, CartStatus } from './utils/carts.js';
|
|
8
9
|
import { Pagination } from './types/pagination.js';
|
|
@@ -134,22 +135,9 @@ interface CartDetail {
|
|
|
134
135
|
status: CartStatus;
|
|
135
136
|
payment_method: CartPaymentMethod;
|
|
136
137
|
}
|
|
137
|
-
interface SelectedCartFilterOption {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
}
|
|
141
|
-
interface CartsOptionsQuery {
|
|
142
|
-
search?: string;
|
|
143
|
-
skip: boolean;
|
|
144
|
-
}
|
|
145
|
-
interface CartsOptionsResult {
|
|
146
|
-
items: SelectedCartFilterOption[];
|
|
147
|
-
isLoading: boolean;
|
|
148
|
-
isFetching: boolean;
|
|
149
|
-
}
|
|
150
138
|
interface CartsAdapters {
|
|
151
|
-
usePartnerOptions: (query:
|
|
152
|
-
useSellerOptions?: (query:
|
|
139
|
+
usePartnerOptions: (query: AnalyticsOptionsQuery) => AnalyticsOptionsResult;
|
|
140
|
+
useSellerOptions?: (query: AnalyticsOptionsQuery) => AnalyticsOptionsResult;
|
|
153
141
|
}
|
|
154
142
|
interface CartsDateFilterSlotProps {
|
|
155
143
|
value: FilterDateState;
|
|
@@ -200,10 +188,10 @@ declare const useCartsFilters: () => {
|
|
|
200
188
|
apiRef: react.MutableRefObject<_mui_x_data_grid_premium_models_gridApiPremium.GridApiPremium>;
|
|
201
189
|
dateFilter: FilterDateState;
|
|
202
190
|
handleDateFilterChange: (value: FilterDateState) => void;
|
|
203
|
-
selectedPartners:
|
|
204
|
-
setSelectedPartners: react.Dispatch<react.SetStateAction<
|
|
205
|
-
selectedSellers:
|
|
206
|
-
setSelectedSellers: react.Dispatch<react.SetStateAction<
|
|
191
|
+
selectedPartners: AnalyticsFilterOption[];
|
|
192
|
+
setSelectedPartners: react.Dispatch<react.SetStateAction<AnalyticsFilterOption[]>>;
|
|
193
|
+
selectedSellers: AnalyticsFilterOption[];
|
|
194
|
+
setSelectedSellers: react.Dispatch<react.SetStateAction<AnalyticsFilterOption[]>>;
|
|
207
195
|
selectedStatuses: CartStatus[];
|
|
208
196
|
setSelectedStatuses: react.Dispatch<react.SetStateAction<CartStatus[]>>;
|
|
209
197
|
selectedProfile: Profile | null;
|
|
@@ -216,4 +204,4 @@ declare const useCartsFilters: () => {
|
|
|
216
204
|
};
|
|
217
205
|
type UseCartsFiltersReturn = ReturnType<typeof useCartsFilters>;
|
|
218
206
|
|
|
219
|
-
export {
|
|
207
|
+
export { CartsProviderProps as C, UseCartsFiltersReturn as U, CartsValue as a, CartDetailProps as b, CartsListProps as c, CartsSummaryProps as d, CartPartner as e, CartUser as f, Cart as g, CartsPagination as h, Carts as i, CartsRequest as j, CartsSummaryRequest as k, CartsSummaryValues as l, CartsSummary as m, CartDetailNewOrder as n, CartDetailUser as o, CartDetailPartner as p, CartItemComplement as q, CartItem as r, CartPaymentMethod as s, CartDetail as t, CartsAdapters as u, CartsDateFilterSlotProps as v, CartsSlots as w, CartsContextValue as x, useCartsFilters as y };
|
package/dist/{useOrderProjectionFilters-5c1162d5.d.ts → useOrderProjectionFilters-3722b749.d.ts}
RENAMED
|
@@ -2,12 +2,9 @@ import { FilterDateState } from './types/analytics.js';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import dayjs__default from 'dayjs';
|
|
5
|
+
import { A as AnalyticsOptionsQuery, a as AnalyticsOptionsResult, b as AnalyticsFilterOption } from './types-15e95556.js';
|
|
5
6
|
import { Status } from './utils/partnerAnalysis.js';
|
|
6
7
|
|
|
7
|
-
interface SelectedFilterOption {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
}
|
|
11
8
|
interface OrderProjectionRequest {
|
|
12
9
|
last_seek_id?: string;
|
|
13
10
|
last_seek_name?: string;
|
|
@@ -15,6 +12,7 @@ interface OrderProjectionRequest {
|
|
|
15
12
|
start_date: string | null;
|
|
16
13
|
end_date: string | null;
|
|
17
14
|
partner_ids?: string[];
|
|
15
|
+
seller_ids?: string[];
|
|
18
16
|
event_types?: string[];
|
|
19
17
|
profile_ids?: string[];
|
|
20
18
|
classifications?: string[];
|
|
@@ -24,6 +22,7 @@ interface OrderProjectionSummaryRequest {
|
|
|
24
22
|
start_date: string | null;
|
|
25
23
|
end_date: string | null;
|
|
26
24
|
partner_ids?: string[];
|
|
25
|
+
seller_ids?: string[];
|
|
27
26
|
event_types?: string[];
|
|
28
27
|
profile_ids?: string[];
|
|
29
28
|
classifications?: string[];
|
|
@@ -139,19 +138,6 @@ interface PartnerDetails {
|
|
|
139
138
|
main_seller?: PartnerSeller;
|
|
140
139
|
address?: PartnerAddress;
|
|
141
140
|
}
|
|
142
|
-
interface OrderProjectionOption {
|
|
143
|
-
id: string;
|
|
144
|
-
name: string;
|
|
145
|
-
}
|
|
146
|
-
interface OrderProjectionOptionsQuery {
|
|
147
|
-
search?: string;
|
|
148
|
-
skip: boolean;
|
|
149
|
-
}
|
|
150
|
-
interface OrderProjectionOptionsResult {
|
|
151
|
-
items: OrderProjectionOption[];
|
|
152
|
-
isLoading: boolean;
|
|
153
|
-
isFetching: boolean;
|
|
154
|
-
}
|
|
155
141
|
interface OrderProjectionQueryResult<TData> {
|
|
156
142
|
data?: TData;
|
|
157
143
|
isLoading: boolean;
|
|
@@ -160,8 +146,9 @@ interface OrderProjectionQueryResult<TData> {
|
|
|
160
146
|
refetch: () => void;
|
|
161
147
|
}
|
|
162
148
|
interface OrderProjectionAdapters {
|
|
163
|
-
usePartnerOptions: (query:
|
|
164
|
-
useProfileOptions: (query:
|
|
149
|
+
usePartnerOptions: (query: AnalyticsOptionsQuery) => AnalyticsOptionsResult;
|
|
150
|
+
useProfileOptions: (query: AnalyticsOptionsQuery) => AnalyticsOptionsResult;
|
|
151
|
+
useSellerOptions?: (query: AnalyticsOptionsQuery) => AnalyticsOptionsResult;
|
|
165
152
|
useEventDetails: (eventId: string, options: {
|
|
166
153
|
skip: boolean;
|
|
167
154
|
}) => OrderProjectionQueryResult<OrderProjectionEvent>;
|
|
@@ -276,12 +263,14 @@ declare const useOrderProjectionFilters: () => {
|
|
|
276
263
|
handlePreviousWeek: () => void;
|
|
277
264
|
handleNextWeek: () => void;
|
|
278
265
|
handleToday: () => void;
|
|
279
|
-
selectedPartners:
|
|
280
|
-
setSelectedPartners: (value:
|
|
266
|
+
selectedPartners: AnalyticsFilterOption[];
|
|
267
|
+
setSelectedPartners: (value: AnalyticsFilterOption[]) => void;
|
|
281
268
|
selectedEventTypes: string[];
|
|
282
269
|
setSelectedEventTypes: (value: string[]) => void;
|
|
283
|
-
selectedProfiles:
|
|
284
|
-
setSelectedProfiles: (value:
|
|
270
|
+
selectedProfiles: AnalyticsFilterOption[];
|
|
271
|
+
setSelectedProfiles: (value: AnalyticsFilterOption[]) => void;
|
|
272
|
+
selectedSellers: AnalyticsFilterOption[];
|
|
273
|
+
setSelectedSellers: (value: AnalyticsFilterOption[]) => void;
|
|
285
274
|
selectedClassifications: string[];
|
|
286
275
|
setSelectedClassifications: (value: string[]) => void;
|
|
287
276
|
ascending: boolean;
|
|
@@ -294,4 +283,4 @@ declare const useOrderProjectionFilters: () => {
|
|
|
294
283
|
};
|
|
295
284
|
type UseOrderProjectionFiltersReturn = ReturnType<typeof useOrderProjectionFilters>;
|
|
296
285
|
|
|
297
|
-
export {
|
|
286
|
+
export { getDayColumnKey as A, getDateRange as B, CustomUnit as C, Day as D, Event as E, Frequency as F, GroupedEvent as G, getDaysInRange as H, getRecurrenceLabel as I, getPeriodInfo as J, getEventStyles as K, EVENT_TYPE_OPTIONS as L, MontlhyStrategy as M, useOrderProjectionFilters as N, OrderProjectionSummary as O, Partner as P, Recurrence as R, SaleAnalysis as S, UseOrderProjectionFiltersReturn as U, ViewMode as V, OrderProjectionProviderProps as a, OrderProjectionValue as b, EventStyles as c, PartnerAddress as d, PartnerSaleSummary as e, PartnerOrder as f, OrderProjectionEvent as g, PartnerProfile as h, PartnerSeller as i, PartnerDetails as j, OrderProjectionQueryResult as k, OrderProjectionAdapters as l, OrderProjectionSlots as m, OrderProjectionContextValue as n, DayOfWeek as o, EventType as p, ExternalOrigin as q, Period as r, SCROLL_END_THRESHOLD as s, MAX_INDIVIDUAL_EVENTS as t, MAX_VISIBLE_TOOLTIP_EVENTS as u, PARTNER_COLUMN_KEY as v, PARTNER_COLUMN_DEFAULT_WIDTH as w, PARTNER_COLUMN_MIN_WIDTH as x, DAY_COLUMN_MIN_WIDTH as y, PARTNER_COLUMN_MAX_RATIO as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import 'dayjs';
|
|
2
2
|
import '../types/analytics.js';
|
|
3
|
-
export { C as CustomUnit,
|
|
3
|
+
export { C as CustomUnit, y as DAY_COLUMN_MIN_WIDTH, o as DayOfWeek, L as EVENT_TYPE_OPTIONS, p as EventType, q as ExternalOrigin, F as Frequency, t as MAX_INDIVIDUAL_EVENTS, u as MAX_VISIBLE_TOOLTIP_EVENTS, M as MontlhyStrategy, w as PARTNER_COLUMN_DEFAULT_WIDTH, v as PARTNER_COLUMN_KEY, z as PARTNER_COLUMN_MAX_RATIO, x as PARTNER_COLUMN_MIN_WIDTH, r as Period, s as SCROLL_END_THRESHOLD, V as ViewMode, B as getDateRange, A as getDayColumnKey, H as getDaysInRange, K as getEventStyles, J as getPeriodInfo, I as getRecurrenceLabel } from '../useOrderProjectionFilters-3722b749.js';
|
|
4
4
|
import './analytics.js';
|
|
5
5
|
import 'react';
|
|
6
|
+
import '../types-15e95556.js';
|
|
6
7
|
import './partnerAnalysis.js';
|
package/package.json
CHANGED
package/dist/chunk-5GXRPVV5.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { r } from './chunk-UYYDORSQ.js';
|
|
2
|
-
import { b } from './chunk-TXJ45CNA.js';
|
|
3
|
-
import { useRef, useState, useMemo, useCallback } from 'react';
|
|
4
|
-
import D from 'dayjs';
|
|
5
|
-
|
|
6
|
-
var L=()=>{let u=b("down","sm"),P=b("down","md"),v=b("down","lg"),O=b("down","xl"),m=useRef(null),[g,f]=useState(()=>D()),[h,R]=useState([]),[S,T]=useState([]),[o,j]=useState([]),[r$1,w]=useState([]),[y,M]=useState(!0),[b$1,F]=useState("WEEK"),i=useMemo(()=>h.map(t=>t.id),[h]),l=useMemo(()=>S.map(t=>t.id),[S]),_=u?"DAY":b$1,a=useMemo(()=>u||_==="DAY"?1:P?3:v?4:O?5:7,[u,P,v,O,_]),n=useMemo(()=>r(g,a),[g,a]),E=useMemo(()=>({start_date:n.start_date,end_date:n.end_date,...i.length>0?{partner_ids:i}:{},...o.length>0?{event_types:o}:{},...l.length>0?{profile_ids:l}:{},...r$1.length>0?{classifications:r$1}:{},ascending:y}),[n.start_date,n.end_date,i,o,l,r$1,y]),k=useMemo(()=>({start_date:n.start_date,end_date:n.end_date,...i.length>0?{partner_ids:i}:{},...l.length>0?{profile_ids:l}:{},...o.length>0?{event_types:o}:{},...r$1.length>0?{classifications:r$1}:{}}),[n.start_date,n.end_date,i,l,o,r$1]),e=useCallback(()=>{m.current&&(m.current.scrollTop=0);},[]),A=useCallback(t=>{f(t),e();},[e]),q=useCallback(()=>{f(t=>t.subtract(a,"day")),e();},[e,a]),x=useCallback(()=>{f(t=>t.add(a,"day")),e();},[e,a]),V=useCallback(()=>{f(D()),e();},[e]),W=useCallback(t=>{R(t),e();},[e]),B=useCallback(t=>{j(t),e();},[e]),I=useCallback(t=>{T(t),e();},[e]),Y=useCallback(t=>{w(t),e();},[e]),H=useCallback(t=>{M(t),e();},[e]);return {scrollRef:m,baseDate:g,dateRange:n,visibleDays:a,handleBaseDateChange:A,handlePreviousWeek:q,handleNextWeek:x,handleToday:V,selectedPartners:h,setSelectedPartners:W,selectedEventTypes:o,setSelectedEventTypes:B,selectedProfiles:S,setSelectedProfiles:I,selectedClassifications:r$1,setSelectedClassifications:Y,ascending:y,setAscending:H,viewMode:_,setViewMode:F,params:E,summaryParams:k,scrollToTop:e}},J=L;
|
|
7
|
-
|
|
8
|
-
export { J as a };
|
|
9
|
-
//# sourceMappingURL=chunk-5GXRPVV5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useOrderProjectionFilters.ts"],"names":["useCallback","useMemo","useRef","useState","dayjs","useOrderProjectionFilters","isMobile","useResponsive_default","isTablet","isSmallDesktop","isDesktop","scrollRef","baseDate","setBaseDate","selectedPartners","setSelectedPartners","selectedProfiles","setSelectedProfiles","selectedEventTypes","setSelectedEventTypes","selectedClassifications","setSelectedClassifications","ascending","setAscending","viewMode","setViewMode","partnerIds","p","profileIds","effectiveViewMode","visibleDays","dateRange","getDateRange","params","summaryParams","scrollToTop","handleBaseDateChange","date","handlePreviousWeek","prev","handleNextWeek","handleToday","handleSelectedPartnersChange","value","handleSelectedEventTypesChange","handleSelectedProfilesChange","handleSelectedClassificationsChange","handleAscendingChange","useOrderProjectionFilters_default"],"mappings":"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","sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react';\nimport dayjs from 'dayjs';\n\nimport {\n OrderProjectionRequest,\n OrderProjectionSummaryRequest,\n SelectedFilterOption,\n} from 'hooks/useOrderProjectionFilters.types';\nimport useResponsive from 'hooks/useResponsive';\nimport { ViewMode } from 'utils/orderProjection';\nimport { getDateRange } from 'utils/orderProjection';\n\nconst useOrderProjectionFilters = () => {\n const isMobile = useResponsive('down', 'sm');\n const isTablet = useResponsive('down', 'md');\n const isSmallDesktop = useResponsive('down', 'lg');\n const isDesktop = useResponsive('down', 'xl');\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const [baseDate, setBaseDate] = useState(() => dayjs());\n const [selectedPartners, setSelectedPartners] = useState<SelectedFilterOption[]>(\n [],\n );\n const [selectedProfiles, setSelectedProfiles] = useState<SelectedFilterOption[]>(\n [],\n );\n const [selectedEventTypes, setSelectedEventTypes] = useState<string[]>([]);\n const [selectedClassifications, setSelectedClassifications] = useState<\n string[]\n >([]);\n\n const [ascending, setAscending] = useState<boolean>(true);\n const [viewMode, setViewMode] = useState<ViewMode>(ViewMode.WEEK);\n\n const partnerIds = useMemo(\n () => selectedPartners.map(p => p.id),\n [selectedPartners],\n );\n\n const profileIds = useMemo(\n () => selectedProfiles.map(p => p.id),\n [selectedProfiles],\n );\n\n const effectiveViewMode = isMobile ? ViewMode.DAY : viewMode;\n\n const visibleDays = useMemo(() => {\n if (isMobile || effectiveViewMode === ViewMode.DAY) return 1;\n if (isTablet) return 3;\n if (isSmallDesktop) return 4;\n if (isDesktop) return 5;\n return 7;\n }, [isMobile, isTablet, isSmallDesktop, isDesktop, effectiveViewMode]);\n\n const dateRange = useMemo(\n () => getDateRange(baseDate, visibleDays),\n [baseDate, visibleDays],\n );\n\n const params = useMemo<OrderProjectionRequest>(\n () => ({\n start_date: dateRange.start_date,\n end_date: dateRange.end_date,\n ...(partnerIds.length > 0 ? { partner_ids: partnerIds } : {}),\n ...(selectedEventTypes.length > 0\n ? { event_types: selectedEventTypes }\n : {}),\n ...(profileIds.length > 0 ? { profile_ids: profileIds } : {}),\n ...(selectedClassifications.length > 0\n ? { classifications: selectedClassifications }\n : {}),\n ascending,\n }),\n [\n dateRange.start_date,\n dateRange.end_date,\n partnerIds,\n selectedEventTypes,\n profileIds,\n selectedClassifications,\n ascending,\n ],\n );\n\n const summaryParams = useMemo<OrderProjectionSummaryRequest>(\n () => ({\n start_date: dateRange.start_date,\n end_date: dateRange.end_date,\n ...(partnerIds.length > 0 ? { partner_ids: partnerIds } : {}),\n ...(profileIds.length > 0 ? { profile_ids: profileIds } : {}),\n ...(selectedEventTypes.length > 0\n ? { event_types: selectedEventTypes }\n : {}),\n ...(selectedClassifications.length > 0\n ? { classifications: selectedClassifications }\n : {}),\n }),\n [\n dateRange.start_date,\n dateRange.end_date,\n partnerIds,\n profileIds,\n selectedEventTypes,\n selectedClassifications,\n ],\n );\n\n const scrollToTop = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollTop = 0;\n }\n }, []);\n\n const handleBaseDateChange = useCallback(\n (date: dayjs.Dayjs) => {\n setBaseDate(date);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n const handlePreviousWeek = useCallback(() => {\n setBaseDate(prev => prev.subtract(visibleDays, 'day'));\n scrollToTop();\n }, [scrollToTop, visibleDays]);\n\n const handleNextWeek = useCallback(() => {\n setBaseDate(prev => prev.add(visibleDays, 'day'));\n scrollToTop();\n }, [scrollToTop, visibleDays]);\n\n const handleToday = useCallback(() => {\n setBaseDate(dayjs());\n scrollToTop();\n }, [scrollToTop]);\n\n const handleSelectedPartnersChange = useCallback(\n (value: SelectedFilterOption[]) => {\n setSelectedPartners(value);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n const handleSelectedEventTypesChange = useCallback(\n (value: string[]) => {\n setSelectedEventTypes(value);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n const handleSelectedProfilesChange = useCallback(\n (value: SelectedFilterOption[]) => {\n setSelectedProfiles(value);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n const handleSelectedClassificationsChange = useCallback(\n (value: string[]) => {\n setSelectedClassifications(value);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n const handleAscendingChange = useCallback(\n (value: boolean) => {\n setAscending(value);\n scrollToTop();\n },\n [scrollToTop],\n );\n\n return {\n scrollRef,\n\n baseDate,\n dateRange,\n visibleDays,\n handleBaseDateChange,\n handlePreviousWeek,\n handleNextWeek,\n handleToday,\n\n selectedPartners,\n setSelectedPartners: handleSelectedPartnersChange,\n\n selectedEventTypes,\n setSelectedEventTypes: handleSelectedEventTypesChange,\n\n selectedProfiles,\n setSelectedProfiles: handleSelectedProfilesChange,\n\n selectedClassifications,\n setSelectedClassifications: handleSelectedClassificationsChange,\n\n ascending,\n setAscending: handleAscendingChange,\n\n viewMode: effectiveViewMode,\n setViewMode,\n\n params,\n summaryParams,\n\n scrollToTop,\n };\n};\n\nexport type UseOrderProjectionFiltersReturn = ReturnType<\n typeof useOrderProjectionFilters\n>;\n\nexport default useOrderProjectionFilters;\n"]}
|
package/dist/chunk-KJJDGCL4.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { c } from './chunk-UWTX4JMW.js';
|
|
2
|
-
import { a } from './chunk-HFDGIEZC.js';
|
|
3
|
-
import { useState, useMemo, useCallback } from 'react';
|
|
4
|
-
|
|
5
|
-
var x=()=>{let{apiRef:i}=a(),[e,_]=useState(c),[a$1,C]=useState([]),[u,F]=useState([]),[p,g]=useState([]),[t,h]=useState([]),[r,y]=useState(null),l=useMemo(()=>u.map(s=>s.id),[u]),o=useMemo(()=>p.map(s=>s.id),[p]),D=useMemo(()=>({start_date:e.start_date,end_date:e.end_date,...l.length>0?{partner_ids:l}:{},...o.length>0?{seller_ids:o}:{},...t.length>0?{statuses:t}:{},...r?{profile_type:r}:{},...a$1.length>0&&a$1[0].sort?{sort_by:a$1[0].field,ascending:a$1[0].sort==="asc"}:{}}),[e.start_date,e.end_date,l,o,t,r,a$1]),M=useMemo(()=>({start_date:e.start_date,end_date:e.end_date,...l.length>0?{partner_ids:l}:{},...o.length>0?{seller_ids:o}:{},...t.length>0?{statuses:t}:{},...r?{profile_type:r}:{}}),[e.start_date,e.end_date,l,o,t,r]),n=useCallback(()=>{i.current&&i.current.scrollToIndexes({rowIndex:0,colIndex:0});},[i]),P=useCallback(s=>{_(s),n();},[n]),R=useCallback(s=>{C(s),n();},[n]);return {apiRef:i,dateFilter:e,handleDateFilterChange:P,selectedPartners:u,setSelectedPartners:F,selectedSellers:p,setSelectedSellers:g,selectedStatuses:t,setSelectedStatuses:h,selectedProfile:r,setSelectedProfile:y,sortModel:a$1,handleSortModelChange:R,params:D,summaryParams:M,scrollToTop:n}},G=x;
|
|
6
|
-
|
|
7
|
-
export { G as a };
|
|
8
|
-
//# sourceMappingURL=chunk-KJJDGCL4.js.map
|