@bikdotai/bik-component-library 0.0.742-beta.15 → 0.0.742-beta.16
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/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/helpers/MetaCustomProcessor.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),r=require("react"),a=require("../../../constants/Theme.js"),n=require("../../TypographyStyle.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const i=s=>{let{createdAt:i,dateFormat:o="D MMMM YY",dateFormatCalendar:l,appType:d}=s;const y=r.useMemo((()=>{if(null==i)return null;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("date-fns"),r=require("react"),a=require("../../../constants/Theme.js"),n=require("../../TypographyStyle.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const i=s=>{let{createdAt:i,dateFormat:o="D MMMM YY",dateFormatCalendar:l,appType:d="manifest"}=s;const y=r.useMemo((()=>{if(null==i)return null;let e;if("number"==typeof i)e=t.startOfDay(new Date(i));else if(i instanceof Date)e=t.startOfDay(i);else{if("string"!=typeof i)return null;e=t.startOfDay(new Date(i))}if("manifest"===d)return t.format(e,"MMM d, yyyy");const r=t.startOfDay(new Date);if(!t.isSameYear(r,e))return t.format(e,"EEEE, d MMMM yy");const a=t.differenceInDays(r,e);return a<1?(null==l?void 0:l.sameDay)?l.sameDay.replace(/\[|\]/g,""):"Today":1===a?"Yesterday":t.format(e,"EEEE, d MMMM yy")}),[i,o,l,d]);return y?"manifest"===d?e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10}},{children:e.jsx("span",Object.assign({style:{background:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px"}},{children:y}))})):e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"12px 0px 12px 8px"}},{children:[e.jsx("div",{style:{flex:1,height:"1px",backgroundColor:a.COLORS.stroke.primary}}),e.jsx("div",Object.assign({style:{border:`1px solid ${a.COLORS.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"}},{children:e.jsx(n.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:y}))})),e.jsx("div",{style:{flex:1,height:"1px",backgroundColor:a.COLORS.stroke.primary}})]})):null},o=s(r).default.memo(i);exports.Day=o,exports.default=o;
|
|
@@ -50,7 +50,7 @@ export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|
|
|
50
50
|
onLongPress?: (context?: any, message?: TMessage) => void;
|
|
51
51
|
onPress?: (context?: any, message?: TMessage) => void;
|
|
52
52
|
messageIdGenerator?: (message?: TMessage) => string;
|
|
53
|
-
|
|
53
|
+
appType?: string;
|
|
54
54
|
[key: string]: any;
|
|
55
55
|
}
|
|
56
56
|
export interface ScrollState {
|
|
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
|
|
|
36
36
|
value: {
|
|
37
37
|
operator: string;
|
|
38
38
|
dataType: import("../types").QueryBuilderConnectorType;
|
|
39
|
-
value?: string | number |
|
|
39
|
+
value?: string | number | string[] | number[] | Date | Date[] | undefined;
|
|
40
40
|
};
|
|
41
41
|
key: string;
|
|
42
42
|
refresh?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{startOfDay as r,
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{startOfDay as r,format as n,isSameYear as a,differenceInDays as i}from"date-fns";import s,{useMemo as o}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{BodyCaption as d}from"../../TypographyStyle.js";const p=s=>{let{createdAt:p,dateFormat:y="D MMMM YY",dateFormatCalendar:c,appType:m="manifest"}=s;const f=o((()=>{if(null==p)return null;let e;if("number"==typeof p)e=r(new Date(p));else if(p instanceof Date)e=r(p);else{if("string"!=typeof p)return null;e=r(new Date(p))}if("manifest"===m)return n(e,"MMM d, yyyy");const t=r(new Date);if(!a(t,e))return n(e,"EEEE, d MMMM yy");const s=i(t,e);return s<1?(null==c?void 0:c.sameDay)?c.sameDay.replace(/\[|\]/g,""):"Today":1===s?"Yesterday":n(e,"EEEE, d MMMM yy")}),[p,y,c,m]);return f?"manifest"===m?e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,marginBottom:10}},{children:e("span",Object.assign({style:{background:"transparent",color:"#b2b2b2",fontSize:12,fontWeight:600,padding:"2px 8px"}},{children:f}))})):t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"12px 0px 12px 8px"}},{children:[e("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}}),e("div",Object.assign({style:{border:`1px solid ${l.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"}},{children:e(d,Object.assign({style:{color:l.content.secondary}},{children:f}))})),e("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}})]})):null},y=s.memo(p);export{y as Day,y as default};
|
|
@@ -50,7 +50,7 @@ export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|
|
|
50
50
|
onLongPress?: (context?: any, message?: TMessage) => void;
|
|
51
51
|
onPress?: (context?: any, message?: TMessage) => void;
|
|
52
52
|
messageIdGenerator?: (message?: TMessage) => string;
|
|
53
|
-
|
|
53
|
+
appType?: string;
|
|
54
54
|
[key: string]: any;
|
|
55
55
|
}
|
|
56
56
|
export interface ScrollState {
|
|
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
|
|
|
36
36
|
value: {
|
|
37
37
|
operator: string;
|
|
38
38
|
dataType: import("../types").QueryBuilderConnectorType;
|
|
39
|
-
value?: string | number |
|
|
39
|
+
value?: string | number | string[] | number[] | Date | Date[] | undefined;
|
|
40
40
|
};
|
|
41
41
|
key: string;
|
|
42
42
|
refresh?: boolean | undefined;
|