@bikdotai/bik-component-library 0.0.670-beta.1 → 0.0.670
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/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +0 -11
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +0 -11
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -11,18 +11,14 @@ export type LineChartProps = {
|
|
|
11
11
|
legend?: string;
|
|
12
12
|
lineWidth?: number;
|
|
13
13
|
squareLegends?: boolean;
|
|
14
|
-
useSecondYAxis?: boolean;
|
|
15
14
|
}[];
|
|
16
15
|
labels: Array<string>;
|
|
17
16
|
scaleText?: {
|
|
18
17
|
x?: string;
|
|
19
18
|
y?: string;
|
|
20
19
|
yPrefix?: string;
|
|
21
|
-
y2?: string;
|
|
22
|
-
y2Prefix?: string;
|
|
23
20
|
xDrawBorder?: boolean;
|
|
24
21
|
yDrawBorder?: boolean;
|
|
25
|
-
y2DrawBorder?: boolean;
|
|
26
22
|
};
|
|
27
23
|
legends: Array<string>;
|
|
28
24
|
stepSize?: number;
|
|
@@ -43,12 +39,5 @@ export type LineChartProps = {
|
|
|
43
39
|
customYHeaders?: any;
|
|
44
40
|
legendsAndIconDirection?: 'row-reverse' | 'row';
|
|
45
41
|
headerIcons?: React.ReactNode[];
|
|
46
|
-
hasSecondYAxis?: boolean;
|
|
47
|
-
min2?: number;
|
|
48
|
-
max2?: number;
|
|
49
|
-
stepSize2?: number;
|
|
50
|
-
prefixCurrencyInY2Axis?: string;
|
|
51
|
-
useKFormat2?: boolean;
|
|
52
|
-
customY2Headers?: any;
|
|
53
42
|
};
|
|
54
43
|
export declare const LineChart: React.FC<LineChartProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("chart.js"),n=require("react"),l=require("react-chartjs-2"),r=require("../../../TypographyStyle.js"),i=require("../../../../constants/Theme.js"),o=require("../utils/calcPercentage.js"),a=require("./LineChart.styled.js");t.Chart.register(t.CategoryScale,t.LinearScale,t.PointElement,t.BarElement,t.LineElement,t.ArcElement,t.Filler,t.Title,t.Tooltip,t.Legend);exports.LineChart=t=>{let{scaleText:s,labels:d,canvasHeight:c,datas:u,maintainAspectRatio:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("chart.js"),n=require("react"),l=require("react-chartjs-2"),r=require("../../../TypographyStyle.js"),i=require("../../../../constants/Theme.js"),o=require("../utils/calcPercentage.js"),a=require("./LineChart.styled.js");t.Chart.register(t.CategoryScale,t.LinearScale,t.PointElement,t.BarElement,t.LineElement,t.ArcElement,t.Filler,t.Title,t.Tooltip,t.Legend);exports.LineChart=t=>{let{scaleText:s,labels:d,canvasHeight:c,datas:u,maintainAspectRatio:g=!1,stepSize:p,min:y,max:b,isZeroState:C,tension:v,isNewStyles:h,prefixCurrencyInYAxis:x,pointRadius:O,useKFormat:j,lineThickness:m,ticksLabelCallback:S,labelCallback:L,afterBodyCallBack:f,titleTooltipCallback:k,isInternationalStore:R,customYHeaders:w,headerIcons:q=[],legendsAndIconDirection:B="row"}=t;var F,T,I;const[E,z]=n.useState(null),A=n.useRef();n.useEffect((()=>{var e,t,n,l;if(null===(l=null===(n=null===(t=null===(e=A.current)||void 0===e?void 0:e.scales)||void 0===t?void 0:t.y)||void 0===n?void 0:n.ticks)||void 0===l?void 0:l.length){const e=38*A.current.scales.y.ticks.length;z(e)}}),[A]);const D=u.map((e=>({text:e.legend,color:e.lineColor?e.lineColor:e.dotted?i.COLORS.content.placeholder:i.COLORS.background.brand,square:e.squareLegends}))),$={labels:d,datasets:u.map(((e,t)=>{var n,l,r;return Object.assign(Object.assign({tension:null!=v?v:.4,fill:e.gradient?"start":0},((e,t)=>{const n={borderColor:e||(t?i.COLORS.content.placeholder:i.COLORS.background.brand)};return h?Object.assign({pointStyle:"circle",pointRadius:O||(d&&d.length>10?2.5:4),pointBorderColor:"transparent",pointBackgroundColor:e||(t?i.COLORS.content.placeholder:i.COLORS.background.brand)},n):Object.assign({pointRadius:null!=O?O:1},n)})(e.lineColor,e.dotted)),{borderDash:e.dotted?[8,3]:void 0,data:e.data,borderWidth:null!==(l=null!==(n=e.lineWidth)&&void 0!==n?n:m)&&void 0!==l?l:2,backgroundColor:e.gradient?e=>{const t=e.chart.ctx.createLinearGradient(0,0,0,E?E-75:150);return t.addColorStop(0,"#F1EEFB"),t.addColorStop(1,"rgba(127, 86, 217, 0)"),t}:null!==(r=e.backgroundColor)&&void 0!==r?r:"transparent",legend:e.legend})}))},P={maintainAspectRatio:g,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:null!=h&&h,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>i.COLORS.content.primaryInverse,backgroundColor:i.COLORS.content.primary,callbacks:{labelTextColor:()=>i.COLORS.content.primaryInverse,title:k,label:L,afterBody:f},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:C?0:y,max:C?10:b,ticks:{color:i.COLORS.content.secondary,callback:e=>{var t,n;return j?`${null!==(t=null==s?void 0:s.yPrefix)&&void 0!==t?t:""}${R?o.truncateValueForInternationalStore(e):o.truncateValueForIndianStore(e)}${null!=x?x:""}`:w&&Object.keys(w).length>0?w[e]:`${null!==(n=null==s?void 0:s.yPrefix)&&void 0!==n?n:""}${e}${null!=x?x:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:C?1:p,padding:h?24:0},title:{display:!!(null==s?void 0:s.y),text:null==s?void 0:s.y},grid:{color:i.COLORS.background.base,drawBorder:null===(F=null==s?void 0:s.yDrawBorder)||void 0===F||F}},x:{ticks:{callback:S,color:i.COLORS.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==s?void 0:s.x),text:null==s?void 0:s.x},grid:{display:!1,drawBorder:null!==(T=null==s?void 0:s.xDrawBorder)&&void 0!==T&&T}}}};return e.jsxs("div",Object.assign({style:Object.assign(Object.assign({},g?{}:{height:null!==(I=null!=c?c:E)&&void 0!==I?I:204}),{display:"flex",flexDirection:"column",gap:2,width:"100%"})},{children:[e.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"space-between",width:"100%",flexDirection:B}},{children:[e.jsx(a.LegendWrapper,{children:q.map(((t,n)=>e.jsx(a.LegendContainer,{children:t},n)))}),e.jsx(a.LegendWrapper,{children:D.map(((t,n)=>{let{text:l,color:i,square:o}=t;return l?e.jsxs(a.LegendContainer,{children:[e.jsx(a.LegendColor,{color:i,square:o,newStyle:h}),e.jsx(r.BodyTiny,Object.assign({color:"#667085"},{children:l}))]},n):e.jsx(e.Fragment,{})}))})]})),e.jsx("div",Object.assign({style:{flex:1}},{children:e.jsx(l.Line,{ref:A,options:P,data:$})}))]}))};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -11,18 +11,14 @@ export type LineChartProps = {
|
|
|
11
11
|
legend?: string;
|
|
12
12
|
lineWidth?: number;
|
|
13
13
|
squareLegends?: boolean;
|
|
14
|
-
useSecondYAxis?: boolean;
|
|
15
14
|
}[];
|
|
16
15
|
labels: Array<string>;
|
|
17
16
|
scaleText?: {
|
|
18
17
|
x?: string;
|
|
19
18
|
y?: string;
|
|
20
19
|
yPrefix?: string;
|
|
21
|
-
y2?: string;
|
|
22
|
-
y2Prefix?: string;
|
|
23
20
|
xDrawBorder?: boolean;
|
|
24
21
|
yDrawBorder?: boolean;
|
|
25
|
-
y2DrawBorder?: boolean;
|
|
26
22
|
};
|
|
27
23
|
legends: Array<string>;
|
|
28
24
|
stepSize?: number;
|
|
@@ -43,12 +39,5 @@ export type LineChartProps = {
|
|
|
43
39
|
customYHeaders?: any;
|
|
44
40
|
legendsAndIconDirection?: 'row-reverse' | 'row';
|
|
45
41
|
headerIcons?: React.ReactNode[];
|
|
46
|
-
hasSecondYAxis?: boolean;
|
|
47
|
-
min2?: number;
|
|
48
|
-
max2?: number;
|
|
49
|
-
stepSize2?: number;
|
|
50
|
-
prefixCurrencyInY2Axis?: string;
|
|
51
|
-
useKFormat2?: boolean;
|
|
52
|
-
customY2Headers?: any;
|
|
53
42
|
};
|
|
54
43
|
export declare const LineChart: React.FC<LineChartProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{Chart as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{Chart as n,CategoryScale as o,LinearScale as r,PointElement as i,BarElement as a,LineElement as s,ArcElement as d,Filler as c,Title as u,Tooltip as p,Legend as g}from"chart.js";import{useState as b,useRef as y,useEffect as m}from"react";import{Line as v}from"react-chartjs-2";import{BodyTiny as h}from"../../../TypographyStyle.js";import{COLORS as f}from"../../../../constants/Theme.js";import{truncateValueForInternationalStore as x,truncateValueForIndianStore as k}from"../utils/calcPercentage.js";import{LegendWrapper as C,LegendContainer as j,LegendColor as w}from"./LineChart.styled.js";n.register(o,r,i,a,s,d,c,u,p,g);const O=n=>{let{scaleText:o,labels:r,canvasHeight:i,datas:a,maintainAspectRatio:s=!1,stepSize:d,min:c,max:u,isZeroState:p,tension:g,isNewStyles:O,prefixCurrencyInYAxis:B,pointRadius:S,useKFormat:z,lineThickness:D,ticksLabelCallback:I,labelCallback:T,afterBodyCallBack:$,titleTooltipCallback:A,isInternationalStore:F,customYHeaders:R,headerIcons:q=[],legendsAndIconDirection:L="row"}=n;var P,E,H;const[W,Y]=b(null),Z=y();m((()=>{var e,t,l,n;if(null===(n=null===(l=null===(t=null===(e=Z.current)||void 0===e?void 0:e.scales)||void 0===t?void 0:t.y)||void 0===l?void 0:l.ticks)||void 0===n?void 0:n.length){const e=38*Z.current.scales.y.ticks.length;Y(e)}}),[Z]);const G=a.map((e=>({text:e.legend,color:e.lineColor?e.lineColor:e.dotted?f.content.placeholder:f.background.brand,square:e.squareLegends}))),K={labels:r,datasets:a.map(((e,t)=>{var l,n,o;return Object.assign(Object.assign({tension:null!=g?g:.4,fill:e.gradient?"start":0},((e,t)=>{const l={borderColor:e||(t?f.content.placeholder:f.background.brand)};return O?Object.assign({pointStyle:"circle",pointRadius:S||(r&&r.length>10?2.5:4),pointBorderColor:"transparent",pointBackgroundColor:e||(t?f.content.placeholder:f.background.brand)},l):Object.assign({pointRadius:null!=S?S:1},l)})(e.lineColor,e.dotted)),{borderDash:e.dotted?[8,3]:void 0,data:e.data,borderWidth:null!==(n=null!==(l=e.lineWidth)&&void 0!==l?l:D)&&void 0!==n?n:2,backgroundColor:e.gradient?e=>{const t=e.chart.ctx.createLinearGradient(0,0,0,W?W-75:150);return t.addColorStop(0,"#F1EEFB"),t.addColorStop(1,"rgba(127, 86, 217, 0)"),t}:null!==(o=e.backgroundColor)&&void 0!==o?o:"transparent",legend:e.legend})}))},N={maintainAspectRatio:s,responsive:!0,plugins:{legend:{display:!1},title:{display:!1},tooltip:{displayColors:null!=O&&O,titleFont:()=>({weight:"600",size:14,family:"inter"}),titleColor:()=>f.content.primaryInverse,backgroundColor:f.content.primary,callbacks:{labelTextColor:()=>f.content.primaryInverse,title:A,label:T,afterBody:$},bodyFont:()=>({weight:"400",size:14,family:"inter"})}},scales:{y:{beginAtZero:!0,min:p?0:c,max:p?10:u,ticks:{color:f.content.secondary,callback:e=>{var t,l;return z?`${null!==(t=null==o?void 0:o.yPrefix)&&void 0!==t?t:""}${F?x(e):k(e)}${null!=B?B:""}`:R&&Object.keys(R).length>0?R[e]:`${null!==(l=null==o?void 0:o.yPrefix)&&void 0!==l?l:""}${e}${null!=B?B:""}`},font:{family:"inter",size:12,weight:"400"},stepSize:p?1:d,padding:O?24:0},title:{display:!!(null==o?void 0:o.y),text:null==o?void 0:o.y},grid:{color:f.background.base,drawBorder:null===(P=null==o?void 0:o.yDrawBorder)||void 0===P||P}},x:{ticks:{callback:I,color:f.content.secondary,font:{family:"inter",size:12,weight:"400"}},title:{display:!!(null==o?void 0:o.x),text:null==o?void 0:o.x},grid:{display:!1,drawBorder:null!==(E=null==o?void 0:o.xDrawBorder)&&void 0!==E&&E}}}};return e("div",Object.assign({style:Object.assign(Object.assign({},s?{}:{height:null!==(H=null!=i?i:W)&&void 0!==H?H:204}),{display:"flex",flexDirection:"column",gap:2,width:"100%"})},{children:[e("div",Object.assign({style:{display:"flex",justifyContent:"space-between",width:"100%",flexDirection:L}},{children:[t(C,{children:q.map(((e,l)=>t(j,{children:e},l)))}),t(C,{children:G.map(((n,o)=>{let{text:r,color:i,square:a}=n;return r?e(j,{children:[t(w,{color:i,square:a,newStyle:O}),t(h,Object.assign({color:"#667085"},{children:r}))]},o):t(l,{})}))})]})),t("div",Object.assign({style:{flex:1}},{children:t(v,{ref:Z,options:N,data:K})}))]}))};export{O as LineChart};
|