@bikdotai/bik-component-library 0.0.504-beta.1 → 0.0.504

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
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 "../../../Types/QueryBuilderAPI.type";
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 "../../../Types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("chart.js"),a=require("chartjs-plugin-datalabels"),o=require("react-chartjs-2"),i=require("../../../TypographyStyle.js"),r=require("../../../../constants/Theme.js"),l=require("../utils/calcPercentage.js"),n=require("./HorizontalGraph.styles.js");function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=s(a);e.Chart.register(e.CategoryScale,e.LinearScale,e.BarElement,e.Tooltip,d.default);exports.HorizontalGraph=e=>{var a,s,d,c,x,p,g,u,b;const h=-1===e.xAxis.data.findIndex((t=>0!==t)),y={min:0,max:2e3,stepSize:null!==(a=e.xAxis.stepSize)&&void 0!==a?a:200},f={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:e.maintainAspectRatio,layout:{padding:{right:e.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!h,callbacks:{label:e.xAxis.toolTipCallback,footer:null===(s=e.tooltipConfig)||void 0===s?void 0:s.footerCallback},footerFont:null===(c=null===(d=e.tooltipConfig)||void 0===d?void 0:d.footerStyles)||void 0===c?void 0:c.footerFont},datalabels:{display:null!==(x=!h&&e.showTotal)&&void 0!==x&&x,anchor:"end",align:"end",clamp:!0,formatter:(t,e)=>{var a;const o=e.datasetIndex,i=e.chart.data.datasets;if(o!==i.length-1)return"";const r=e.dataIndex;let n=0;for(let t=0;t<i.length;t++)n+=null!==(a=i[t].data[r])&&void 0!==a?a:0;return n?l.truncateValueToK(n):""},color:r.COLORS.content.secondary}},scales:{y:{title:{display:!!e.yAxis.title,text:e.yAxis.title,color:e.yAxis.titleColor,font:{size:r.FONTS.caption.fontSize,color:e.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:r.COLORS.background.base},ticks:{fontSize:r.FONTS.caption.fontSize,color:null!==(p=e.yAxis.labelColor)&&void 0!==p?p:r.COLORS.content.secondary}},x:{title:{display:!!e.xAxis.title,text:e.xAxis.title,color:e.xAxis.titleColor,font:{size:r.FONTS.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:r.COLORS.background.base},ticks:Object.assign({callback:e.xAxis.ticksCallback,fontSize:r.FONTS.caption.fontSize,color:null!==(g=e.xAxis.labelColor)&&void 0!==g?g:r.COLORS.content.secondary},h?y:{max:e.xAxis.max,stepSize:e.xAxis.stepSize})}}},C={labels:e.yAxis.data.map((t=>t.toString())),datasets:[{data:h?[250,1e3,800,1500,300,600]:e.xAxis.data,backgroundColor:t=>(t=>{var a;const o=t.chart.ctx.createLinearGradient(0,0,0,200);let i="";if(h)i="rgba(0,0,0,0)";else if(e.barColorRGBA){const t=e.barColorRGBA;i=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(a=t.a)&&void 0!==a?a:"0.3"})`}return o.addColorStop(0,i||"rgba(146, 96, 237, 0.3)"),o.addColorStop(1,i||"rgba(146, 96, 237, 0.3)"),o})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t.jsxs(n.GraphContainerWrapper,Object.assign({padding:e.outerPadding},{children:[e.chartHeading&&t.jsx(i.TitleRegular,Object.assign({color:null!==(u=e.chartHeading.color)&&void 0!==u?u:r.COLORS.content.secondary},{children:e.chartHeading.heading})),t.jsx("div",Object.assign({style:{height:e.maintainAspectRatio?void 0:null!==(b=e.graphCanvasHeight)&&void 0!==b?b:500}},{children:t.jsx(o.Bar,{options:f,data:C})}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("chart.js"),a=require("chartjs-plugin-datalabels"),o=require("react-chartjs-2"),i=require("../../../TypographyStyle.js"),r=require("../../../../constants/Theme.js"),l=require("./HorizontalGraph.styles.js");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=n(a);e.Chart.register(e.CategoryScale,e.LinearScale,e.BarElement,e.Tooltip,s.default);exports.HorizontalGraph=e=>{var a,n,s,d,c,x,p,g,u;const b=-1===e.xAxis.data.findIndex((t=>0!==t)),h={min:0,max:2e3,stepSize:null!==(a=e.xAxis.stepSize)&&void 0!==a?a:200},y={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:e.maintainAspectRatio,layout:{padding:{right:e.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!b,callbacks:{label:e.xAxis.toolTipCallback,footer:null===(n=e.tooltipConfig)||void 0===n?void 0:n.footerCallback},footerFont:null===(d=null===(s=e.tooltipConfig)||void 0===s?void 0:s.footerStyles)||void 0===d?void 0:d.footerFont},datalabels:{display:null!==(c=!b&&e.showTotal)&&void 0!==c&&c,anchor:"end",align:"end",clamp:!0,formatter:(t,e)=>{var a;const o=e.datasetIndex,i=e.chart.data.datasets;if(o!==i.length-1)return"";const r=e.dataIndex;let l=0;for(let t=0;t<i.length;t++)l+=null!==(a=i[t].data[r])&&void 0!==a?a:0;return l?l<1e3?l:(l/1e3).toString().substring(0,4)+"k":""},color:r.COLORS.content.secondary}},scales:{y:{title:{display:!!e.yAxis.title,text:e.yAxis.title,color:e.yAxis.titleColor,font:{size:r.FONTS.caption.fontSize,color:e.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:r.COLORS.background.base},ticks:{fontSize:r.FONTS.caption.fontSize,color:null!==(x=e.yAxis.labelColor)&&void 0!==x?x:r.COLORS.content.secondary}},x:{title:{display:!!e.xAxis.title,text:e.xAxis.title,color:e.xAxis.titleColor,font:{size:r.FONTS.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:r.COLORS.background.base},ticks:Object.assign({callback:e.xAxis.ticksCallback,fontSize:r.FONTS.caption.fontSize,color:null!==(p=e.xAxis.labelColor)&&void 0!==p?p:r.COLORS.content.secondary},b?h:{max:e.xAxis.max,stepSize:e.xAxis.stepSize})}}},S={labels:e.yAxis.data.map((t=>t.toString())),datasets:[{data:b?[250,1e3,800,1500,300,600]:e.xAxis.data,backgroundColor:t=>(t=>{var a;const o=t.chart.ctx.createLinearGradient(0,0,0,200);let i="";if(b)i="rgba(0,0,0,0)";else if(e.barColorRGBA){const t=e.barColorRGBA;i=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(a=t.a)&&void 0!==a?a:"0.3"})`}return o.addColorStop(0,i||"rgba(146, 96, 237, 0.3)"),o.addColorStop(1,i||"rgba(146, 96, 237, 0.3)"),o})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t.jsxs(l.GraphContainerWrapper,Object.assign({padding:e.outerPadding},{children:[e.chartHeading&&t.jsx(i.TitleRegular,Object.assign({color:null!==(g=e.chartHeading.color)&&void 0!==g?g:r.COLORS.content.secondary},{children:e.chartHeading.heading})),t.jsx("div",Object.assign({style:{height:e.maintainAspectRatio?void 0:null!==(u=e.graphCanvasHeight)&&void 0!==u?u:500}},{children:t.jsx(o.Bar,{options:y,data:S})}))]}))};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
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 "../../../Types/QueryBuilderAPI.type";
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 "../../../Types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
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;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{truncateValueToK as g}from"../utils/calcPercentage.js";import{GraphContainerWrapper as x}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const b=a=>{var i,e,r,l,n,b,m,f,h;const u=-1===a.xAxis.data.findIndex((t=>0!==t)),y={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},A={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!u,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!u&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var a;const i=o.datasetIndex,e=o.chart.data.datasets;if(i!==e.length-1)return"";const r=o.dataIndex;let l=0;for(let t=0;t<e.length;t++)l+=null!==(a=e[t].data[r])&&void 0!==a?a:0;return l?g(l):""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(b=a.yAxis.labelColor)&&void 0!==b?b:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(m=a.xAxis.labelColor)&&void 0!==m?m:c.content.secondary},u?y:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},v={labels:a.yAxis.data.map((t=>t.toString())),datasets:[{data:u?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(u)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(x,Object.assign({padding:a.outerPadding},{children:[a.chartHeading&&o(d,Object.assign({color:null!==(f=a.chartHeading.color)&&void 0!==f?f:c.content.secondary},{children:a.chartHeading.heading})),o("div",Object.assign({style:{height:a.maintainAspectRatio?void 0:null!==(h=a.graphCanvasHeight)&&void 0!==h?h:500}},{children:o(s,{options:A,data:v})}))]}))};export{b as HorizontalGraph};
1
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Chart as a,CategoryScale as i,LinearScale as e,BarElement as r,Tooltip as l}from"chart.js";import n from"chartjs-plugin-datalabels";import{Bar as s}from"react-chartjs-2";import{TitleRegular as d}from"../../../TypographyStyle.js";import{COLORS as c,FONTS as p}from"../../../../constants/Theme.js";import{GraphContainerWrapper as g}from"./HorizontalGraph.styles.js";a.register(i,e,r,l,n);const x=a=>{var i,e,r,l,n,x,b,f,m;const h=-1===a.xAxis.data.findIndex((t=>0!==t)),u={min:0,max:2e3,stepSize:null!==(i=a.xAxis.stepSize)&&void 0!==i?i:200},y={indexAxis:"y",elements:{},responsive:!0,maintainAspectRatio:a.maintainAspectRatio,layout:{padding:{right:a.showTotal?50:0}},plugins:{legend:{display:!1},tooltip:{enabled:!h,callbacks:{label:a.xAxis.toolTipCallback,footer:null===(e=a.tooltipConfig)||void 0===e?void 0:e.footerCallback},footerFont:null===(l=null===(r=a.tooltipConfig)||void 0===r?void 0:r.footerStyles)||void 0===l?void 0:l.footerFont},datalabels:{display:null!==(n=!h&&a.showTotal)&&void 0!==n&&n,anchor:"end",align:"end",clamp:!0,formatter:(t,o)=>{var a;const i=o.datasetIndex,e=o.chart.data.datasets;if(i!==e.length-1)return"";const r=o.dataIndex;let l=0;for(let t=0;t<e.length;t++)l+=null!==(a=e[t].data[r])&&void 0!==a?a:0;return l?l<1e3?l:(l/1e3).toString().substring(0,4)+"k":""},color:c.content.secondary}},scales:{y:{title:{display:!!a.yAxis.title,text:a.yAxis.title,color:a.yAxis.titleColor,font:{size:p.caption.fontSize,color:a.yAxis.titleColor},padding:{bottom:10}},grid:{display:!1,borderColor:c.background.base},ticks:{fontSize:p.caption.fontSize,color:null!==(x=a.yAxis.labelColor)&&void 0!==x?x:c.content.secondary}},x:{title:{display:!!a.xAxis.title,text:a.xAxis.title,color:a.xAxis.titleColor,font:{size:p.caption.fontSize},padding:{top:10}},grid:{borderColor:"white",color:c.background.base},ticks:Object.assign({callback:a.xAxis.ticksCallback,fontSize:p.caption.fontSize,color:null!==(b=a.xAxis.labelColor)&&void 0!==b?b:c.content.secondary},h?u:{max:a.xAxis.max,stepSize:a.xAxis.stepSize})}}},A={labels:a.yAxis.data.map((t=>t.toString())),datasets:[{data:h?[250,1e3,800,1500,300,600]:a.xAxis.data,backgroundColor:t=>(t=>{var o;const i=t.chart.ctx.createLinearGradient(0,0,0,200);let e="";if(h)e="rgba(0,0,0,0)";else if(a.barColorRGBA){const t=a.barColorRGBA;e=`rgba(${t.r}, ${t.g}, ${t.b}, ${null!==(o=t.a)&&void 0!==o?o:"0.3"})`}return i.addColorStop(0,e||"rgba(146, 96, 237, 0.3)"),i.addColorStop(1,e||"rgba(146, 96, 237, 0.3)"),i})(t),barPercentage:.4,categoryPercentage:1,borderRadius:4}]};return t(g,Object.assign({padding:a.outerPadding},{children:[a.chartHeading&&o(d,Object.assign({color:null!==(f=a.chartHeading.color)&&void 0!==f?f:c.content.secondary},{children:a.chartHeading.heading})),o("div",Object.assign({style:{height:a.maintainAspectRatio?void 0:null!==(m=a.graphCanvasHeight)&&void 0!==m?m:500}},{children:o(s,{options:y,data:A})}))]}))};export{x as HorizontalGraph};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.504-beta.1",
3
+ "version": "0.0.504",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",