@bikdotai/bik-component-library 0.0.749-beta.8 → 0.0.749
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/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/code-block/CodeBlock.js +1 -1
- package/dist/cjs/components/code-block/CodeBlock.styled.js +7 -6
- package/dist/cjs/components/code-block/CodeBlockHelper.js +1 -1
- package/dist/cjs/components/code-block/keywordMap.js +1 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/constants/dimensions.d.ts +25 -99
- package/dist/cjs/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/cjs/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.d.ts +1 -13
- package/dist/cjs/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/cjs/components/feature-announcements/types/feature.types.d.ts +0 -47
- package/dist/cjs/components/feature-announcements/types/props.types.d.ts +3 -25
- package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +0 -6
- package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNewPanel.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/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/code-block/CodeBlock.js +1 -1
- package/dist/esm/components/code-block/CodeBlock.styled.js +7 -6
- package/dist/esm/components/code-block/CodeBlockHelper.js +1 -1
- package/dist/esm/components/code-block/keywordMap.js +1 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
- package/dist/esm/components/feature-announcements/constants/dimensions.d.ts +25 -99
- package/dist/esm/components/feature-announcements/constants/dimensions.js +1 -1
- package/dist/esm/components/feature-announcements/styles/joyride.styles.d.ts +2 -2
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.d.ts +1 -13
- package/dist/esm/components/feature-announcements/styles/majorPopup.styles.js +1 -1
- package/dist/esm/components/feature-announcements/types/feature.types.d.ts +0 -47
- package/dist/esm/components/feature-announcements/types/props.types.d.ts +3 -25
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +0 -6
- package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
- package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/assets/icons/play.svg.js +0 -1
- package/dist/esm/assets/icons/play.svg.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { FeatureAnnouncement } from './feature.types';
|
|
3
3
|
import { FeatureAnnouncementRepository } from './repository.types';
|
|
4
4
|
import { RouterProps } from './router.types';
|
|
5
5
|
/**
|
|
@@ -14,27 +14,17 @@ export interface PopupBaseProps {
|
|
|
14
14
|
onPrevious: () => void;
|
|
15
15
|
onNext: () => void;
|
|
16
16
|
setIsClosing?: (isClosing: boolean) => void;
|
|
17
|
-
onSecondaryAction?: () => void;
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* Major update popup props
|
|
21
20
|
*/
|
|
22
21
|
export interface MajorUpdatePopupProps extends PopupBaseProps {
|
|
23
|
-
/**
|
|
24
|
-
* Aspect ratio for the image/video container
|
|
25
|
-
* @default '16:9'
|
|
26
|
-
*/
|
|
27
|
-
ratio?: '16:9' | '1:1' | '4:3';
|
|
28
|
-
/**
|
|
29
|
-
* Custom padding for the popup container
|
|
30
|
-
* @default '16px'
|
|
31
|
-
*/
|
|
32
|
-
padding?: string;
|
|
33
22
|
}
|
|
34
23
|
/**
|
|
35
24
|
* Minor update popup props
|
|
36
25
|
*/
|
|
37
|
-
export
|
|
26
|
+
export interface MinorUpdatePopupProps extends PopupBaseProps {
|
|
27
|
+
}
|
|
38
28
|
/**
|
|
39
29
|
* Video modal props
|
|
40
30
|
*/
|
|
@@ -50,16 +40,4 @@ export interface FeatureAnnouncementProviderProps extends FeatureAnnouncementRep
|
|
|
50
40
|
children: React.ReactNode;
|
|
51
41
|
module?: string;
|
|
52
42
|
router?: RouterProps;
|
|
53
|
-
/**
|
|
54
|
-
* Store ID for event tracking
|
|
55
|
-
*/
|
|
56
|
-
storeId?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when a major announcement popup is shown
|
|
59
|
-
*/
|
|
60
|
-
onAnnouncementShown?: (event: AnnouncementEvent) => void;
|
|
61
|
-
/**
|
|
62
|
-
* Callback fired when user interacts with an announcement (clicks a button)
|
|
63
|
-
*/
|
|
64
|
-
onAnnouncementInteracted?: (event: AnnouncementInteractionEvent) => void;
|
|
65
43
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonConfig, SecondaryButtonConfig } from '../feature-announcements/types/feature.types';
|
|
3
|
-
export type { ButtonConfig, SecondaryButtonConfig };
|
|
4
2
|
export interface WhatsNewContent {
|
|
5
3
|
id: string;
|
|
6
4
|
title: string;
|
|
@@ -14,10 +12,6 @@ export interface WhatsNewContent {
|
|
|
14
12
|
createdAt: any;
|
|
15
13
|
module: string[];
|
|
16
14
|
visibility: boolean;
|
|
17
|
-
primaryButton?: ButtonConfig;
|
|
18
|
-
secondaryButton?: SecondaryButtonConfig;
|
|
19
|
-
featureUpdateType?: 'Major' | 'Minor';
|
|
20
|
-
displayImage?: string;
|
|
21
15
|
}
|
|
22
16
|
export interface WhatsNewProviderProps {
|
|
23
17
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as
|
|
1
|
+
import{jsxs as t,jsx as i}from"react/jsx-runtime";import n from"../../assets/icons/whatsNew.svg.js";import{COLORS as e}from"../../constants/Theme.js";import{Tooltip as s}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as o}from"./WhatsNew.styles.js";const r=r=>{let{onClick:c,newContentCount:a=0,isOpen:d=!1,isLoading:l=!1,tooltip:h="What's new",testId:m="whats-new-button",iconWidth:p=32,iconHeight:g=32,customIcon:b}=r;return l?t("div",Object.assign({style:{margin:"0px 8px"}},{children:[i("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),i("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):i(o,Object.assign({count:a},{children:t("div",Object.assign({className:"main-icon-class "+(d?"icon-active":""),style:{color:d?e.content.brand:e.content.primary},onClick:c,"data-testid":m},{children:[i(s,Object.assign({body:h},{children:i("div",{children:b?i(b,{width:p,height:g,color:d?e.content.brand:e.content.primary}):i(n,{width:p,height:g})})})),a>0&&i("div",Object.assign({className:"notification--count"},{children:i("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};export{r as WhatsNewButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import{format as r,differenceInBusinessDays as s}from"date-fns";import{useState as a,useMemo as o}from"react";import i from"../../assets/icons/searchIcon.svg.js";import c from"../../assets/icons/whatsNew.svg.js";import{COLORS as d}from"../../constants/Theme.js";import{Button as l}from"../button/Button.js";import{VideoModal as h}from"../feature-announcements/VideoModal.js";import{SearchBar as m}from"../searchBar/searchBar.js";import{SideModal as u}from"../side-modal/SideModal.js";import{TitleMedium as g,TitleRegular as p,BodyPrimary as b,Caption as w,TitleSmall as f}from"../TypographyStyle.js";import{MainContainer as j,WhatsNewWrapper as y,MainCardContainer as C,BackgroundImageContainer as x}from"./WhatsNew.styles.js";const N=N=>{let{isOpen:O,onClose:v,content:k,isLoading:A=!1,title:D="What's new on BIK",searchPlaceholder:S="Search posts",emptyStateTitle:T="Nothing new!",emptyStateDescription:L="There are no new updates or features at the moment. Check back soon!",noResultsText:M="Sorry, no results found.",width:W="480px",onContentClick:B,renderCustomContent:U}=N;const[V,E]=a(""),[I,_]=a(!1),[P,R]=a(""),z=e=>{if(!e.createdAt)return!1;const t=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return s(new Date,t)<7},F=o((()=>{if(!V.trim())return k;const e=V.toLowerCase();return k.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[k,V]),H=0===k.length,K=0===F.length;return O?n(u,Object.assign({width:W,onClose:v,header:"",headerCustomComponent:e(g,Object.assign({color:d.background.inverse},{children:D})),headerStyle:{background:d.background.brandLight},hideFooter:!0},{children:[n(j,{children:[e("div",Object.assign({className:"mt-8"},{children:e(m,{width:"100%",isEnabled:!H,onChange:e=>{E(e)},onEnter:e=>{E(e)},placeholder:S,variant:"default",searchValue:V,onClickCross:()=>{E("")}})})),e(y,{children:H||K?n("div",Object.assign({className:"no--data--found"},{children:[e("div",Object.assign({className:"icon--wrapper"},{children:e(H?c:i,{width:32,height:32})})),H?n(t,{children:[e(p,{children:T}),e(b,Object.assign({color:d.content.secondary,className:"text--align",style:{maxWidth:300}},{children:L}))]}):K?e(b,Object.assign({color:d.content.secondary,className:"text--align",style:{maxWidth:300}},{children:M})):null]})):e("div",Object.assign({className:"scroller"},{children:F.map(((s,a)=>U?U(s):n(C,Object.assign({className:"padding--16 mb-mt-8"},{children:[e(x,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e("div",Object.assign({className:"mt-20 full--width"},{children:n("div",Object.assign({className:"created--at flex flex--row"},{children:[z(s)?e("div",Object.assign({className:"new--content--tag"},{children:e(w,{children:"New"})})):e(t,{}),e(w,Object.assign({style:{color:d.content.placeholder}},{children:s.createdAt?r(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e("div",Object.assign({className:"mt--8"},{children:e(f,{children:s.title})})),e("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e(l,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(R(e.productVideo),_(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),B&&B(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${a}`)))}))})]}),e(h,{isOpen:I,videoUrl:P,onClose:()=>{_(!1)}})]})):e(t,{})};export{N as WhatsNewPanel};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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=e(require("react"));function n(){return n=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},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 40 40"},e),t||(t=r.createElement("path",{fill:"#fff",d:"M10 6.34c0-1.308 1.44-2.107 2.55-1.413l21.855 13.66a1.667 1.667 0 0 1 0 2.826L12.55 35.073c-1.11.694-2.55-.104-2.55-1.413V6.34Z"})));exports.default=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as t from"react";var e;function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},r.apply(this,arguments)}var a=a=>t.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 40 40"},a),e||(e=t.createElement("path",{fill:"#fff",d:"M10 6.34c0-1.308 1.44-2.107 2.55-1.413l21.855 13.66a1.667 1.667 0 0 1 0 2.826L12.55 35.073c-1.11.694-2.55-.104-2.55-1.413V6.34Z"})));export{a as default};
|