@bikdotai/bik-component-library 0.0.583-beta.2 → 0.0.584-beta-tasks-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.
- package/dist/cjs/assets/icons/CheckSquareOffset.svg.js +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +3 -1
- package/dist/cjs/components/avatar/Avatar.d.ts +2 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.d.ts +0 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/esm/assets/icons/CheckSquareOffset.svg.js +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +3 -1
- package/dist/esm/components/avatar/Avatar.d.ts +2 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +0 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,n=e(require("react"));function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}var c=e=>n.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),t||(t=n.createElement("g",{stroke:"#616161",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.244,clipPath:"url(#CheckSquareOffset_svg__a)"},n.createElement("path",{d:"M2.5 9V3a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H8.5"}),n.createElement("path",{d:"M2.5 12 4 13.5 7.5 10"}))),r||(r=n.createElement("defs",null,n.createElement("clipPath",{id:"CheckSquareOffset_svg__a"},n.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))));exports.default=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("chart.js"),r=require("react-chartjs-2"),t=require("../../../TypographyStyle.js"),a=require("../../../../constants/Theme.js"),o=require("../LineChart/LineChart.styled.js"),l=require("./VerticalBarAndLinearGraph.styles.js");i.Chart.register(i.CategoryScale,i.LinearScale,i.BarElement,i.Tooltip);exports.VerticalBarAndLinearGraph=i=>{var n,s,c,d,x;const g=[0,0,0,0,0,0],p=-1===i.barAxis.data.findIndex((e=>0!==e)),b=-1===i.lineAxis.data.findIndex((e=>0!==e)),h={min:0,max:2e3,stepSize:200},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("chart.js"),r=require("react-chartjs-2"),t=require("../../../TypographyStyle.js"),a=require("../../../../constants/Theme.js"),o=require("../LineChart/LineChart.styled.js"),l=require("./VerticalBarAndLinearGraph.styles.js");i.Chart.register(i.CategoryScale,i.LinearScale,i.BarElement,i.Tooltip);exports.VerticalBarAndLinearGraph=i=>{var n,s,c,d,x;const g=[0,0,0,0,0,0],p=-1===i.barAxis.data.findIndex((e=>0!==e)),b=-1===i.lineAxis.data.findIndex((e=>0!==e)),h={min:0,max:2e3,stepSize:200},A=[{legend:i.barAxis.title,color:i.barAxis.graphColor},{legend:i.lineAxis.title,color:i.lineAxis.graphColor}],C={responsive:!0,plugins:{legend:{display:!1}},scales:{x:{title:{display:!!i.xAxis.title,text:i.xAxis.title,color:i.xAxis.titleColor,font:{size:a.FONTS.caption.fontSize}},grid:{display:!1,borderColor:a.COLORS.background.base},ticks:{fontSize:a.FONTS.caption.fontSize,color:null!==(n=i.xAxis.labelColor)&&void 0!==n?n:a.COLORS.content.secondary}},bar:{position:"left",title:{display:!!i.barAxis.title,text:i.barAxis.title,color:i.barAxis.titleColor,font:{size:a.FONTS.caption.fontSize}},grid:{borderColor:"white",color:a.COLORS.background.base},ticks:Object.assign({fontSize:a.FONTS.caption.fontSize,color:null!==(s=i.barAxis.labelColor)&&void 0!==s?s:a.COLORS.content.secondary},p?h:{})},line:{position:"right",title:{display:!!i.lineAxis.title,text:i.lineAxis.title,color:i.lineAxis.titleColor,font:{size:a.FONTS.caption.fontSize}},grid:{display:!1,borderColor:"white",color:a.COLORS.background.base},ticks:Object.assign({fontSize:a.FONTS.caption.fontSize,color:null!==(c=i.lineAxis.labelColor)&&void 0!==c?c:a.COLORS.content.secondary},b?h:{}),display:!0}},maintainAspectRatio:!1},S={labels:i.xAxis.forceShowXAxis?i.xAxis.data.map((e=>e.toString())):p&&b?["-","-","-","-","-","-"]:i.xAxis.data.map((e=>e.toString())),datasets:[{yAxisID:"line",type:"line",data:b?g:i.lineAxis.data,borderColor:i.lineAxis.graphColor||"rgba(0,0,0,0)",borderWidth:2,fill:!1,pointRadius:1},{yAxisID:"bar",type:"bar",data:p?g:i.barAxis.data,backgroundColor:i.barAxis.graphColor||"rgba(0,0,0,0)",barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:2}},{children:[e.jsx(o.LegendWrapper,Object.assign({position:"center"},{children:A.map(((i,r)=>{let{legend:a,color:l}=i;return a?e.jsxs(o.LegendContainer,{children:[e.jsx(o.LegendColor,{color:l}),e.jsx(t.SmallRegular,Object.assign({color:"#667085"},{children:a}))]},r):e.jsx(e.Fragment,{})}))})),e.jsxs(l.GraphContainerWrapper,{children:[i.chartHeading&&e.jsx("div",Object.assign({style:{marginBottom:24}},{children:e.jsx(t.TitleRegular,Object.assign({color:null!==(d=i.chartHeading.color)&&void 0!==d?d:a.COLORS.content.secondary},{children:i.chartHeading.heading}))})),e.jsx("div",Object.assign({style:{height:null!==(x=i.graphCanvasHeight)&&void 0!==x?x:500}},{children:e.jsx(r.Chart,{type:"bar",data:S,options:C})}))]})]}))};
|
|
@@ -14,7 +14,9 @@ export interface VerticalBarAndLinearGraphI {
|
|
|
14
14
|
tickColor?: string;
|
|
15
15
|
labelColor?: string;
|
|
16
16
|
chartHeading?: ChartHeadingI;
|
|
17
|
-
xAxis: AxisDetailsI
|
|
17
|
+
xAxis: AxisDetailsI & {
|
|
18
|
+
forceShowXAxis?: boolean;
|
|
19
|
+
};
|
|
18
20
|
lineAxis: AxisDetailsI;
|
|
19
21
|
barAxis: AxisDetailsI;
|
|
20
22
|
}
|
|
@@ -39,6 +39,7 @@ export declare const enum MESSAGE_CHANNELS {
|
|
|
39
39
|
FACEBOOK = "facebook",
|
|
40
40
|
EMAIL = "email",
|
|
41
41
|
SMTP = "smtp",
|
|
42
|
-
FACEBOOK_CATALOG = "facebook-catalog"
|
|
42
|
+
FACEBOOK_CATALOG = "facebook-catalog",
|
|
43
|
+
TASKS = "tasks"
|
|
43
44
|
}
|
|
44
45
|
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("./Avatar.styled.js"),i=require("./AvatarHelper.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),A=require("../../assets/icons/email-channel.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("./Avatar.styled.js"),i=require("./AvatarHelper.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),A=require("../../assets/icons/CheckSquareOffset.svg.js"),o=require("../../assets/icons/email-channel.svg.js"),S=require("../../assets/icons/facebook_channel.svg.js"),n=require("../../assets/icons/gmail.svg.js"),c=require("../../assets/icons/instagram-channel.svg.js"),E=require("../../assets/icons/whatsapp_color.svg.js");const l={[i.SIZE.SMALL]:16,[i.SIZE.MEDIUM]:20,[i.SIZE.INBOX]:24,[i.SIZE.LARGE]:32},d={[i.AVATAR_BACKGROUND.LIGHT]:a.COLORS.content.secondary,[i.AVATAR_BACKGROUND.DARK]:a.COLORS.surface.standard};var h;exports.MESSAGE_CHANNELS=void 0,(h=exports.MESSAGE_CHANNELS||(exports.MESSAGE_CHANNELS={})).INSTAGRAM="instagram",h.MESSENGER="messenger",h.WHATSAPP="whatsapp",h.GMAIL="gmail",h.LIVECHAT="livechat",h.GOOGLE_BUSINESS_CHAT="gbm",h.SHOPIFY="shopify",h.FACEBOOK="facebook",h.EMAIL="email",h.SMTP="smtp",h.FACEBOOK_CATALOG="facebook-catalog",h.TASKS="tasks";exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=l,exports.Avatar=h=>{const[u,p]=s.useState(!1),g=()=>{const s=(h.name||"").split(".").join(" ").split(" ").map((e=>e.charAt(0).toUpperCase())).slice(0,2).join("");return h.size===i.SIZE.SMALL?e.jsx(r.BodyTiny,Object.assign({style:{color:d[h.background]}},{children:s})):h.size===i.SIZE.MEDIUM||h.size===i.SIZE.INBOX?e.jsx(r.TitleSmall,Object.assign({style:{color:d[h.background]}},{children:s})):h.size===i.SIZE.LARGE?e.jsx(r.TitleMedium,Object.assign({style:{color:d[h.background]}},{children:s})):void 0};return e.jsxs("div",Object.assign({style:{position:"relative"}},{children:[e.jsxs(t.AvatarStyle,Object.assign({type:h.type===i.AVATAR_TYPES.IMAGE&&u&&h.useNameFallback&&h.name?i.AVATAR_TYPES.INITIALS:h.type,size:h.size,background:h.background},{children:[h.type===i.AVATAR_TYPES.IMAGE&&(h.useNameFallback&&!u?e.jsx("img",{alt:"",width:i.AVATAR_SIZE_MAP[h.size],height:i.AVATAR_SIZE_MAP[h.size],style:{borderRadius:"50%",objectFit:"contain"},src:h.photoUrl,onError:()=>{p(!0)}}):h.useNameFallback&&u&&h.name?e.jsx("div",{children:g()}):e.jsx("img",{alt:"",width:i.AVATAR_SIZE_MAP[h.size],height:i.AVATAR_SIZE_MAP[h.size],style:{borderRadius:"50%",objectFit:"contain"},src:h.photoUrl})),h.type===i.AVATAR_TYPES.INITIALS&&e.jsx("div",{children:g()}),h.type===i.AVATAR_TYPES.ICON&&h.icon&&e.jsx(h.icon,{width:l[h.size],height:l[h.size],color:d[h.background]})]})),h.inboxSettings&&e.jsx("div",Object.assign({style:{position:"absolute",left:"20px",top:"20px",width:14,height:14,borderRadius:"50%",display:"flex",justifyContent:"center",backgroundColor:h.inboxSettings.isSelected?h.inboxSettings.isComments?a.COLORS.content.primary:a.COLORS.background.brandLight:h.inboxSettings.isComments?a.COLORS.content.primary:a.COLORS.surface.standard,alignItems:"center"}},{children:(()=>{switch(h.channelName){case exports.MESSAGE_CHANNELS.EMAIL:case exports.MESSAGE_CHANNELS.SMTP:return e.jsx(o.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.FACEBOOK:case exports.MESSAGE_CHANNELS.FACEBOOK_CATALOG:case exports.MESSAGE_CHANNELS.MESSENGER:return e.jsx(S.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.INSTAGRAM:return e.jsx(c.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.WHATSAPP:return e.jsx(E.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.GMAIL:return e.jsx(n.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.TASKS:return e.jsx(A.default,{width:11,height:11})}})()}))]}))},exports.BACKGROUND_VS_TEXT_COLOR_MAP=d;
|
|
@@ -10,7 +10,6 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
|
|
|
10
10
|
tooltipContent?: string | undefined;
|
|
11
11
|
tooltipDirection?: Placement | undefined;
|
|
12
12
|
showTooltipArrow?: boolean | undefined;
|
|
13
|
-
containerStyle?: React.CSSProperties | undefined;
|
|
14
13
|
} & React.RefAttributes<{
|
|
15
14
|
openDropdown: boolean;
|
|
16
15
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),r=require("react"),t=require("react-popper"),n=require("../../dropShadow/DropShadow.js"),l=require("../../tooltips/Tooltip.js"),i=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(r).default.forwardRef(((d,p)=>{var{children:a,onDropdownVisbilityChange:c,version:u="1.0",tooltipContent:v,tooltipDirection:j,showTooltipArrow:w}=d,b=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const f=p,[h,D]=r.useState(!1),[O,g]=r.useState(null),[x,y]=r.useState(null),m=r.useRef(null),{styles:S,attributes:C}=t.usePopper(O,x,{placement:b.placement,strategy:b.strategy}),q=e=>{var o,r;"2.0"===u&&b.isMultiSelect&&e&&(null===(o=b.onSelect)||void 0===o||o.call(b,[...e])),D(!1),null===(r=null==b?void 0:b.onClose)||void 0===r||r.call(b)};r.useImperativeHandle(f,(()=>({openDropdown:h})),[]),r.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=h)}),[h]),r.useEffect((()=>{null==c||c(h)}),[h]);const _=()=>o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:{position:"relative"},ref:g},{children:[o.jsx(i.OverLapAbs,{ref:m,disabled:b.disabled,onClick:e=>{var o;null===(o=b.onDropdownOpen)||void 0===o||o.call(b),h?(D(!1),e.preventDefault()):b.disabled||D(!0)}}),a]})),h&&o.jsx(i.OpenDropdownContainer,Object.assign({ref:y,style:Object.assign(Object.assign({},S.popper),{zIndex:3})},C.popper,{children:o.jsx(n.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:o.jsx(s.OpenedDropdown,Object.assign({},b,{onSelect:e=>{var o;"2.0"===u&&b.isMultiSelect||(null===(o=b.onSelect)||void 0===o||o.call(b,e),D(!1))},onClose:q,version:u,headerRef:m}))}))}))]});return o.jsx(o.Fragment,{children:h||void 0===v?_():o.jsx(l.Tooltip,Object.assign({body:v,placement:j,hideArrow:!w},{children:o.jsx("div",{children:_()})}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("react"),require("../zeroState/ZeroState.js"),require("../TypographyStyle.js"),require("../../constants/Theme.js"),require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js");var r=require("../button/Button.js");require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var t=require("./DropdownButton.style.js");exports.DropdownButton=n=>e.jsxs(t.DropdownButtonStyle,Object.assign({type:n.buttonProps.buttonType,disabled:n.buttonProps.disabled},{children:[e.jsx(r.Button,Object.assign({},n.buttonProps,{style:{borderRadius:"0px",borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px",borderRight:"0px"}})),e.jsx("div",{className:"divider"}),e.jsx(o.DropdownPopover,Object.assign({},n.dropdownProps,{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../dropdown/DropdownPopover/index.js");require("../dropdown/Dropdown.js"),require("../dropdown/ChipDropdown.js"),require("react"),require("../zeroState/ZeroState.js"),require("../TypographyStyle.js"),require("../../constants/Theme.js"),require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js");var r=require("../button/Button.js");require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var t=require("./DropdownButton.style.js");exports.DropdownButton=n=>e.jsxs(t.DropdownButtonStyle,Object.assign({type:n.buttonProps.buttonType,disabled:n.buttonProps.disabled},{children:[e.jsx(r.Button,Object.assign({},n.buttonProps,{style:{borderRadius:"0px",borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px",borderRight:"0px"}})),e.jsx("div",{className:"divider"}),e.jsx(o.DropdownPopover,Object.assign({},n.dropdownProps,{children:e.jsx(r.Button,Object.assign({},n.buttonProps,{buttonText:"",TrailingIcon:n.iconProps,style:{borderRadius:"0px",borderTopRightRadius:"4px",borderBottomRightRadius:"4px"}}))}))]}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";var t,r;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},a.apply(this,arguments)}var n=n=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},n),t||(t=e.createElement("g",{stroke:"#616161",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.244,clipPath:"url(#CheckSquareOffset_svg__a)"},e.createElement("path",{d:"M2.5 9V3a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H8.5"}),e.createElement("path",{d:"M2.5 12 4 13.5 7.5 10"}))),r||(r=e.createElement("defs",null,e.createElement("clipPath",{id:"CheckSquareOffset_svg__a"},e.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))));export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t,Fragment as e}from"react/jsx-runtime";import{Chart as o,CategoryScale as r,LinearScale as a,BarElement as l,Tooltip as n}from"chart.js";import{Chart as s}from"react-chartjs-2";import{SmallRegular as c,TitleRegular as d}from"../../../TypographyStyle.js";import{FONTS as p,COLORS as
|
|
1
|
+
import{jsxs as i,jsx as t,Fragment as e}from"react/jsx-runtime";import{Chart as o,CategoryScale as r,LinearScale as a,BarElement as l,Tooltip as n}from"chart.js";import{Chart as s}from"react-chartjs-2";import{SmallRegular as c,TitleRegular as d}from"../../../TypographyStyle.js";import{FONTS as p,COLORS as x}from"../../../../constants/Theme.js";import{LegendWrapper as g,LegendContainer as b,LegendColor as h}from"../LineChart/LineChart.styled.js";import{GraphContainerWrapper as A}from"./VerticalBarAndLinearGraph.styles.js";o.register(r,a,l,n);const f=o=>{var r,a,l,n,f;const y=[0,0,0,0,0,0],m=-1===o.barAxis.data.findIndex((i=>0!==i)),C=-1===o.lineAxis.data.findIndex((i=>0!==i)),u={min:0,max:2e3,stepSize:200},j=[{legend:o.barAxis.title,color:o.barAxis.graphColor},{legend:o.lineAxis.title,color:o.lineAxis.graphColor}],S={responsive:!0,plugins:{legend:{display:!1}},scales:{x:{title:{display:!!o.xAxis.title,text:o.xAxis.title,color:o.xAxis.titleColor,font:{size:p.caption.fontSize}},grid:{display:!1,borderColor:x.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(r=o.xAxis.labelColor)&&void 0!==r?r:x.content.secondary}},bar:{position:"left",title:{display:!!o.barAxis.title,text:o.barAxis.title,color:o.barAxis.titleColor,font:{size:p.caption.fontSize}},grid:{borderColor:"white",color:x.background.base},ticks:Object.assign({fontSize:p.caption.fontSize,color:null!==(a=o.barAxis.labelColor)&&void 0!==a?a:x.content.secondary},m?u:{})},line:{position:"right",title:{display:!!o.lineAxis.title,text:o.lineAxis.title,color:o.lineAxis.titleColor,font:{size:p.caption.fontSize}},grid:{display:!1,borderColor:"white",color:x.background.base},ticks:Object.assign({fontSize:p.caption.fontSize,color:null!==(l=o.lineAxis.labelColor)&&void 0!==l?l:x.content.secondary},C?u:{}),display:!0}},maintainAspectRatio:!1},z={labels:o.xAxis.forceShowXAxis?o.xAxis.data.map((i=>i.toString())):m&&C?["-","-","-","-","-","-"]:o.xAxis.data.map((i=>i.toString())),datasets:[{yAxisID:"line",type:"line",data:C?y:o.lineAxis.data,borderColor:o.lineAxis.graphColor||"rgba(0,0,0,0)",borderWidth:2,fill:!1,pointRadius:1},{yAxisID:"bar",type:"bar",data:m?y:o.barAxis.data,backgroundColor:o.barAxis.graphColor||"rgba(0,0,0,0)",barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:2}},{children:[t(g,Object.assign({position:"center"},{children:j.map(((o,r)=>{let{legend:a,color:l}=o;return a?i(b,{children:[t(h,{color:l}),t(c,Object.assign({color:"#667085"},{children:a}))]},r):t(e,{})}))})),i(A,{children:[o.chartHeading&&t("div",Object.assign({style:{marginBottom:24}},{children:t(d,Object.assign({color:null!==(n=o.chartHeading.color)&&void 0!==n?n:x.content.secondary},{children:o.chartHeading.heading}))})),t("div",Object.assign({style:{height:null!==(f=o.graphCanvasHeight)&&void 0!==f?f:500}},{children:t(s,{type:"bar",data:z,options:S})}))]})]}))};export{f as VerticalBarAndLinearGraph};
|
|
@@ -14,7 +14,9 @@ export interface VerticalBarAndLinearGraphI {
|
|
|
14
14
|
tickColor?: string;
|
|
15
15
|
labelColor?: string;
|
|
16
16
|
chartHeading?: ChartHeadingI;
|
|
17
|
-
xAxis: AxisDetailsI
|
|
17
|
+
xAxis: AxisDetailsI & {
|
|
18
|
+
forceShowXAxis?: boolean;
|
|
19
|
+
};
|
|
18
20
|
lineAxis: AxisDetailsI;
|
|
19
21
|
barAxis: AxisDetailsI;
|
|
20
22
|
}
|
|
@@ -39,6 +39,7 @@ export declare const enum MESSAGE_CHANNELS {
|
|
|
39
39
|
FACEBOOK = "facebook",
|
|
40
40
|
EMAIL = "email",
|
|
41
41
|
SMTP = "smtp",
|
|
42
|
-
FACEBOOK_CATALOG = "facebook-catalog"
|
|
42
|
+
FACEBOOK_CATALOG = "facebook-catalog",
|
|
43
|
+
TASKS = "tasks"
|
|
43
44
|
}
|
|
44
45
|
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as r,AVATAR_BACKGROUND as o,AVATAR_TYPES as a,AVATAR_SIZE_MAP as n}from"./AvatarHelper.js";import{BodyTiny as c,TitleSmall as h,TitleMedium as l}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";import d from"../../assets/icons/CheckSquareOffset.svg.js";import g from"../../assets/icons/email-channel.svg.js";import p from"../../assets/icons/facebook_channel.svg.js";import A from"../../assets/icons/gmail.svg.js";import b from"../../assets/icons/instagram-channel.svg.js";import u from"../../assets/icons/whatsapp_color.svg.js";const S={[r.SMALL]:16,[r.MEDIUM]:20,[r.INBOX]:24,[r.LARGE]:32},f={[o.LIGHT]:m.content.secondary,[o.DARK]:m.surface.standard};var I;!function(e){e.INSTAGRAM="instagram",e.MESSENGER="messenger",e.WHATSAPP="whatsapp",e.GMAIL="gmail",e.LIVECHAT="livechat",e.GOOGLE_BUSINESS_CHAT="gbm",e.SHOPIFY="shopify",e.FACEBOOK="facebook",e.EMAIL="email",e.SMTP="smtp",e.FACEBOOK_CATALOG="facebook-catalog",e.TASKS="tasks"}(I||(I={}));const y=o=>{const[y,O]=s(!1),j=()=>{const e=(o.name||"").split(".").join(" ").split(" ").map((e=>e.charAt(0).toUpperCase())).slice(0,2).join("");return o.size===r.SMALL?t(c,Object.assign({style:{color:f[o.background]}},{children:e})):o.size===r.MEDIUM||o.size===r.INBOX?t(h,Object.assign({style:{color:f[o.background]}},{children:e})):o.size===r.LARGE?t(l,Object.assign({style:{color:f[o.background]}},{children:e})):void 0};return e("div",Object.assign({style:{position:"relative"}},{children:[e(i,Object.assign({type:o.type===a.IMAGE&&y&&o.useNameFallback&&o.name?a.INITIALS:o.type,size:o.size,background:o.background},{children:[o.type===a.IMAGE&&(o.useNameFallback&&!y?t("img",{alt:"",width:n[o.size],height:n[o.size],style:{borderRadius:"50%",objectFit:"contain"},src:o.photoUrl,onError:()=>{O(!0)}}):o.useNameFallback&&y&&o.name?t("div",{children:j()}):t("img",{alt:"",width:n[o.size],height:n[o.size],style:{borderRadius:"50%",objectFit:"contain"},src:o.photoUrl})),o.type===a.INITIALS&&t("div",{children:j()}),o.type===a.ICON&&o.icon&&t(o.icon,{width:S[o.size],height:S[o.size],color:f[o.background]})]})),o.inboxSettings&&t("div",Object.assign({style:{position:"absolute",left:"20px",top:"20px",width:14,height:14,borderRadius:"50%",display:"flex",justifyContent:"center",backgroundColor:o.inboxSettings.isSelected?o.inboxSettings.isComments?m.content.primary:m.background.brandLight:o.inboxSettings.isComments?m.content.primary:m.surface.standard,alignItems:"center"}},{children:(()=>{switch(o.channelName){case I.EMAIL:case I.SMTP:return t(g,{width:11,height:11});case I.FACEBOOK:case I.FACEBOOK_CATALOG:case I.MESSENGER:return t(p,{width:11,height:11});case I.INSTAGRAM:return t(b,{width:11,height:11});case I.WHATSAPP:return t(u,{width:11,height:11});case I.GMAIL:return t(A,{width:11,height:11});case I.TASKS:return t(d,{width:11,height:11})}})()}))]}))};export{S as AVATAR_SIZE_VS_ICON_SIZE_MAP,y as Avatar,f as BACKGROUND_VS_TEXT_COLOR_MAP,I as MESSAGE_CHANNELS};
|
|
@@ -10,7 +10,6 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
|
|
|
10
10
|
tooltipContent?: string | undefined;
|
|
11
11
|
tooltipDirection?: Placement | undefined;
|
|
12
12
|
showTooltipArrow?: boolean | undefined;
|
|
13
|
-
containerStyle?: React.CSSProperties | undefined;
|
|
14
13
|
} & React.RefAttributes<{
|
|
15
14
|
openDropdown: boolean;
|
|
16
15
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as
|
|
1
|
+
import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import t,{useState as l,useRef as i,useImperativeHandle as s,useEffect as p}from"react";import{usePopper as d}from"react-popper";import c from"../../dropShadow/DropShadow.js";import{Tooltip as a}from"../../tooltips/Tooltip.js";import{OverLapAbs as m,OpenDropdownContainer as v}from"../Common.styled.js";import{OpenedDropdown as u}from"../OpenedDropdown/components/OpennedDropdown.js";const h=t.forwardRef(((t,h)=>{var{children:w,onDropdownVisbilityChange:b,version:f="1.0",tooltipContent:j,tooltipDirection:D,showTooltipArrow:g}=t,y=o(t,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const O=h,[C,S]=l(!1),[x,A]=l(null),[R,T]=l(null),z=i(null),{styles:M,attributes:V}=d(x,R,{placement:y.placement,strategy:y.strategy}),_=o=>{var e,r;"2.0"===f&&y.isMultiSelect&&o&&(null===(e=y.onSelect)||void 0===e||e.call(y,[...o])),S(!1),null===(r=null==y?void 0:y.onClose)||void 0===r||r.call(y)};s(O,(()=>({openDropdown:C})),[]),p((()=>{(null==O?void 0:O.current)&&(O.current.openDropdown=C)}),[C]),p((()=>{null==b||b(C)}),[C]);const k=()=>n(r,{children:[n("div",Object.assign({style:{position:"relative"},ref:A},{children:[e(m,{ref:z,disabled:y.disabled,onClick:o=>{var e;null===(e=y.onDropdownOpen)||void 0===e||e.call(y),C?(S(!1),o.preventDefault()):y.disabled||S(!0)}}),w]})),C&&e(v,Object.assign({ref:T,style:Object.assign(Object.assign({},M.popper),{zIndex:3})},V.popper,{children:e(c,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(u,Object.assign({},y,{onSelect:o=>{var e;"2.0"===f&&y.isMultiSelect||(null===(e=y.onSelect)||void 0===e||e.call(y,o),S(!1))},onClose:_,version:f,headerRef:z}))}))}))]});return e(r,{children:C||void 0===j?k():e(a,Object.assign({body:j,placement:D,hideArrow:!g},{children:e("div",{children:k()})}))})}));h.displayName="DropdownPopover";export{h as DropdownPopover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{DropdownPopover as e}from"../dropdown/DropdownPopover/index.js";import"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"react";import"../zeroState/ZeroState.js";import"../TypographyStyle.js";import"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import{Button as r}from"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import{DropdownButtonStyle as
|
|
1
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{DropdownPopover as e}from"../dropdown/DropdownPopover/index.js";import"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"react";import"../zeroState/ZeroState.js";import"../TypographyStyle.js";import"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import{Button as r}from"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import{DropdownButtonStyle as p}from"./DropdownButton.style.js";const n=n=>o(p,Object.assign({type:n.buttonProps.buttonType,disabled:n.buttonProps.disabled},{children:[t(r,Object.assign({},n.buttonProps,{style:{borderRadius:"0px",borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px",borderRight:"0px"}})),t("div",{className:"divider"}),t(e,Object.assign({},n.dropdownProps,{children:t(r,Object.assign({},n.buttonProps,{buttonText:"",TrailingIcon:n.iconProps,style:{borderRadius:"0px",borderTopRightRadius:"4px",borderBottomRightRadius:"4px"}}))}))]}));export{n as DropdownButton};
|