@bikdotai/bik-component-library 0.0.636--beta0.1 → 0.0.637

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;
@@ -16,5 +16,4 @@ export declare const DatePickerWrapper: React.FC<{
16
16
  maxDate?: Date;
17
17
  minDate?: Date;
18
18
  dateButtonType?: DateButtonType;
19
- enableAutoPosition?: boolean;
20
19
  }>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("react-calendar"),a=require("../../hooks/useOutside.js"),n=require("../../utils/DateUtils.js"),o=require("../../constants/Theme.js"),i=require("../../assets/icons/calendar.svg.js"),s=require("../TypographyStyle.js"),l=require("./DatePickerWrapper.styled.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,d=u(r);exports.DateButtonType=void 0,(c=exports.DateButtonType||(exports.DateButtonType={})).DEFAULT="default",c.LARGE="large";exports.DatePickerWrapper=r=>{let{val:u,onChange:c,calendarProps:p,disabled:O,pickerStyles:y,nativeID:g,maxDate:D,minDate:S,dateButtonType:L,dateButtonStyles:v}=r;const[C,b]=t.useState(!1),[f,j]=t.useState(!1),x=t.useRef(null),m=t.useRef(null);a.useOutside(m,(()=>{b(!1)})),t.useEffect((()=>{if(x.current&&m.current){const e=x.current.getBoundingClientRect(),t=m.current.offsetHeight,r=window.innerHeight-e.bottom;j(r<t)}}),[C]);const R=()=>{var e,t,r,a;return u?Array.isArray(u)?(null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.toString())&&(null===(t=null==u?void 0:u[1])||void 0===t?void 0:t.toString())?`${new Date(null===(r=null==u?void 0:u[0])||void 0===r?void 0:r.toString()).toLocaleDateString()}-${new Date(null===(a=null==u?void 0:u[1])||void 0===a?void 0:a.toString()).toLocaleDateString()}`:`${n.default.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(u.toString()).toLocaleDateString():(new Date).toLocaleDateString()};return e.jsxs(e.Fragment,{children:[e.jsxs(l.DateBtn,Object.assign({id:g,ref:x,bgColor:O?o.COLORS.background.base:o.COLORS.surface.standard,borderColor:o.COLORS.stroke.primary,onClick:()=>b(!C),dateButtonType:L||exports.DateButtonType.DEFAULT,style:v},{children:[L===exports.DateButtonType.LARGE?e.jsx(s.BodyPrimary,Object.assign({style:{color:O?o.COLORS.content.inactive:o.COLORS.content.primary,flex:1}},{children:R()})):e.jsx(s.BodySecondary,Object.assign({style:{color:O?o.COLORS.content.inactive:o.COLORS.content.primary,flex:1}},{children:R()})),e.jsx(i.default,{width:L===exports.DateButtonType.LARGE?24:20,height:L===exports.DateButtonType.LARGE?24:20,color:O?o.COLORS.content.inactive:o.COLORS.content.primary})]})),C&&!O&&e.jsx(l.PickerContainer,Object.assign({ref:m,style:Object.assign(Object.assign({},y),{top:f?"auto":"calc(100% + 8px)",bottom:f?"calc(100% + 8px)":"auto",position:"relative"}),contentPrimary:o.COLORS.content.primary,subDued:o.COLORS.surface.subdued,brandColor:o.COLORS.background.brand,bgColor:o.COLORS.surface.standard,borderColor:o.COLORS.stroke.primary},{children:e.jsx(d.default,Object.assign({tileClassName:["custom__tile"],className:["custom__calendar"],onChange:e=>{c(e),b(!1)},maxDate:D,minDate:S,value:u?Array.isArray(u)?2===u.length?[new Date(u[0]),new Date(u[1])]:null:new Date(u):null},p))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("react-calendar"),a=require("../../hooks/useOutside.js"),n=require("../../utils/DateUtils.js"),o=require("../../constants/Theme.js"),s=require("../../assets/icons/calendar.svg.js"),i=require("../TypographyStyle.js"),l=require("./DatePickerWrapper.styled.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,d=u(r);exports.DateButtonType=void 0,(c=exports.DateButtonType||(exports.DateButtonType={})).DEFAULT="default",c.LARGE="large";exports.DatePickerWrapper=r=>{let{val:u,onChange:c,calendarProps:O,disabled:y,pickerStyles:D,nativeID:p,maxDate:g,minDate:S,dateButtonType:L,dateButtonStyles:v}=r;const[C,j]=t.useState(!1),x=t.useRef(null),b=t.useRef(null);a.useOutside(b,(()=>{j(!1)}));const R=()=>{var e,t,r,a;return u?Array.isArray(u)?(null===(e=null==u?void 0:u[0])||void 0===e?void 0:e.toString())&&(null===(t=null==u?void 0:u[1])||void 0===t?void 0:t.toString())?`${new Date(null===(r=null==u?void 0:u[0])||void 0===r?void 0:r.toString()).toLocaleDateString()}-${new Date(null===(a=null==u?void 0:u[1])||void 0===a?void 0:a.toString()).toLocaleDateString()}`:`${n.default.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(u.toString()).toLocaleDateString():(new Date).toLocaleDateString()};return e.jsxs(e.Fragment,{children:[e.jsxs(l.DateBtn,Object.assign({id:p,ref:x,bgColor:y?o.COLORS.background.base:o.COLORS.surface.standard,borderColor:o.COLORS.stroke.primary,onClick:()=>j(!C),dateButtonType:L||exports.DateButtonType.DEFAULT,style:v},{children:[L===exports.DateButtonType.LARGE?e.jsx(i.BodyPrimary,Object.assign({style:{color:y?o.COLORS.content.inactive:o.COLORS.content.primary,flex:1}},{children:R()})):e.jsx(i.BodySecondary,Object.assign({style:{color:y?o.COLORS.content.inactive:o.COLORS.content.primary,flex:1}},{children:R()})),e.jsx(s.default,{width:L===exports.DateButtonType.LARGE?24:20,height:L===exports.DateButtonType.LARGE?24:20,color:y?o.COLORS.content.inactive:o.COLORS.content.primary})]})),C&&!y&&e.jsx(l.PickerContainer,Object.assign({ref:b,style:Object.assign({},D),contentPrimary:o.COLORS.content.primary,subDued:o.COLORS.surface.subdued,brandColor:o.COLORS.background.brand,bgColor:o.COLORS.surface.standard,borderColor:o.COLORS.stroke.primary},{children:e.jsx(d.default,Object.assign({tileClassName:["custom__tile"],className:["custom__calendar"],onChange:e=>{c(e),j(!1)},maxDate:g,minDate:S,value:u?Array.isArray(u)?2===u.length?[new Date(u[0]),new Date(u[1])]:null:new Date(u):null},O))}))]})};
@@ -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;
@@ -16,5 +16,4 @@ export declare const DatePickerWrapper: React.FC<{
16
16
  maxDate?: Date;
17
17
  minDate?: Date;
18
18
  dateButtonType?: DateButtonType;
19
- enableAutoPosition?: boolean;
20
19
  }>;
@@ -1 +1 @@
1
- import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as a}from"react";import i from"react-calendar";import{useOutside as l}from"../../hooks/useOutside.js";import s from"../../utils/DateUtils.js";import{COLORS as c}from"../../constants/Theme.js";import d from"../../assets/icons/calendar.svg.js";import{BodyPrimary as u,BodySecondary as m}from"../TypographyStyle.js";import{DateBtn as g,PickerContainer as p}from"./DatePickerWrapper.styled.js";var D;!function(t){t.DEFAULT="default",t.LARGE="large"}(D||(D={}));const y=y=>{let{val:v,onChange:b,calendarProps:f,disabled:h,pickerStyles:j,nativeID:S,maxDate:w,minDate:L,dateButtonType:A,dateButtonStyles:C}=y;const[k,x]=o(!1),[O,E]=o(!1),T=n(null),R=n(null);l(R,(()=>{x(!1)})),a((()=>{if(T.current&&R.current){const t=T.current.getBoundingClientRect(),e=R.current.offsetHeight,r=window.innerHeight-t.bottom;E(r<e)}}),[k]);const B=()=>{var t,e,r,o;return v?Array.isArray(v)?(null===(t=null==v?void 0:v[0])||void 0===t?void 0:t.toString())&&(null===(e=null==v?void 0:v[1])||void 0===e?void 0:e.toString())?`${new Date(null===(r=null==v?void 0:v[0])||void 0===r?void 0:r.toString()).toLocaleDateString()}-${new Date(null===(o=null==v?void 0:v[1])||void 0===o?void 0:o.toString()).toLocaleDateString()}`:`${s.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(v.toString()).toLocaleDateString():(new Date).toLocaleDateString()};return t(e,{children:[t(g,Object.assign({id:S,ref:T,bgColor:h?c.background.base:c.surface.standard,borderColor:c.stroke.primary,onClick:()=>x(!k),dateButtonType:A||D.DEFAULT,style:C},{children:[A===D.LARGE?r(u,Object.assign({style:{color:h?c.content.inactive:c.content.primary,flex:1}},{children:B()})):r(m,Object.assign({style:{color:h?c.content.inactive:c.content.primary,flex:1}},{children:B()})),r(d,{width:A===D.LARGE?24:20,height:A===D.LARGE?24:20,color:h?c.content.inactive:c.content.primary})]})),k&&!h&&r(p,Object.assign({ref:R,style:Object.assign(Object.assign({},j),{top:O?"auto":"calc(100% + 8px)",bottom:O?"calc(100% + 8px)":"auto",position:"relative"}),contentPrimary:c.content.primary,subDued:c.surface.subdued,brandColor:c.background.brand,bgColor:c.surface.standard,borderColor:c.stroke.primary},{children:r(i,Object.assign({tileClassName:["custom__tile"],className:["custom__calendar"],onChange:t=>{b(t),x(!1)},maxDate:w,minDate:L,value:v?Array.isArray(v)?2===v.length?[new Date(v[0]),new Date(v[1])]:null:new Date(v):null},f))}))]})};export{D as DateButtonType,y as DatePickerWrapper};
1
+ import{jsxs as t,Fragment as e,jsx as r}from"react/jsx-runtime";import{useState as o,useRef as a}from"react";import n from"react-calendar";import{useOutside as i}from"../../hooks/useOutside.js";import l from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import c from"../../assets/icons/calendar.svg.js";import{BodyPrimary as d,BodySecondary as m}from"../TypographyStyle.js";import{DateBtn as u,PickerContainer as g}from"./DatePickerWrapper.styled.js";var D;!function(t){t.DEFAULT="default",t.LARGE="large"}(D||(D={}));const p=p=>{let{val:y,onChange:v,calendarProps:b,disabled:f,pickerStyles:h,nativeID:S,maxDate:j,minDate:L,dateButtonType:w,dateButtonStyles:A}=p;const[C,k]=o(!1),O=a(null),x=a(null);i(x,(()=>{k(!1)}));const E=()=>{var t,e,r,o;return y?Array.isArray(y)?(null===(t=null==y?void 0:y[0])||void 0===t?void 0:t.toString())&&(null===(e=null==y?void 0:y[1])||void 0===e?void 0:e.toString())?`${new Date(null===(r=null==y?void 0:y[0])||void 0===r?void 0:r.toString()).toLocaleDateString()}-${new Date(null===(o=null==y?void 0:y[1])||void 0===o?void 0:o.toString()).toLocaleDateString()}`:`${l.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(y.toString()).toLocaleDateString():(new Date).toLocaleDateString()};return t(e,{children:[t(u,Object.assign({id:S,ref:O,bgColor:f?s.background.base:s.surface.standard,borderColor:s.stroke.primary,onClick:()=>k(!C),dateButtonType:w||D.DEFAULT,style:A},{children:[w===D.LARGE?r(d,Object.assign({style:{color:f?s.content.inactive:s.content.primary,flex:1}},{children:E()})):r(m,Object.assign({style:{color:f?s.content.inactive:s.content.primary,flex:1}},{children:E()})),r(c,{width:w===D.LARGE?24:20,height:w===D.LARGE?24:20,color:f?s.content.inactive:s.content.primary})]})),C&&!f&&r(g,Object.assign({ref:x,style:Object.assign({},h),contentPrimary:s.content.primary,subDued:s.surface.subdued,brandColor:s.background.brand,bgColor:s.surface.standard,borderColor:s.stroke.primary},{children:r(n,Object.assign({tileClassName:["custom__tile"],className:["custom__calendar"],onChange:t=>{v(t),k(!1)},maxDate:j,minDate:L,value:y?Array.isArray(y)?2===y.length?[new Date(y[0]),new Date(y[1])]:null:new Date(y):null},b))}))]})};export{D as DateButtonType,p as DatePickerWrapper};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.636--beta0.1",
3
+ "version": "0.0.637",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",