@cleartrip/talos-chat-timestamp 1.1.0-TEST.0

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.
@@ -0,0 +1,4 @@
1
+ import { IChatTimestampProps } from "./type";
2
+ declare const ChatTimestamp: (props: IChatTimestampProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ChatTimestamp;
4
+ //# sourceMappingURL=ChatTimestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatTimestamp.d.ts","sourceRoot":"","sources":["../packages/components/chat-timestamp/src/ChatTimestamp.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,QAAA,MAAM,aAAa,UAAW,mBAAmB,4CAgBhD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as ChatTimestamp } from "./ChatTimestamp";
2
+ export * from "./type";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/chat-timestamp/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),i=require("@cleartrip/ct-design-components");exports.ChatTimestamp=function(n){var u=(null!=n?n:{}).createdAt,a=t.useMemo(function(){return new Date(Number(u)).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},[u]);return r.jsx(i.Typography,e.__assign({variant:"P3",color:"subheading"},{children:a}))};
2
+ //# sourceMappingURL=talos-chat-timestamp.browser.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-chat-timestamp.browser.cjs.js","sources":["../packages/components/chat-timestamp/src/ChatTimestamp.tsx"],"sourcesContent":[null],"names":["props","createdAt","formattedCreatedAt","useMemo","Date","Number","toLocaleTimeString","hour","minute","hour12","_jsx","jsx","Typography","__assign","variant","color","children"],"mappings":"yJAKsB,SAACA,GACX,IAAAC,GAAcD,QAAAA,EAAS,CAAE,GAAAC,UAE3BC,EAAqBC,EAAAA,QAAQ,WAC/B,OAAO,IAAIC,KAAKC,OAAOJ,IAAYK,mBAAmB,QAAS,CAC3DC,KAAM,UACNC,OAAQ,UACRC,QAAQ,GAEhB,EAAG,CAACR,IAEJ,OACIS,EAAAC,IAACC,EAAUA,WAAAC,WAAA,CAACC,QAAQ,KAAKC,MAAM,cAAY,CAAAC,SACtCd,IAGb"}
@@ -0,0 +1,2 @@
1
+ import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{Typography as i}from"@cleartrip/ct-design-components";var n=function(n){var o=(null!=n?n:{}).createdAt,m=e(function(){return new Date(Number(o)).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},[o]);return t(i,r({variant:"P3",color:"subheading"},{children:m}))};export{n as ChatTimestamp};
2
+ //# sourceMappingURL=talos-chat-timestamp.browser.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-chat-timestamp.browser.esm.js","sources":["../packages/components/chat-timestamp/src/ChatTimestamp.tsx"],"sourcesContent":[null],"names":["ChatTimestamp","props","createdAt","formattedCreatedAt","useMemo","Date","Number","toLocaleTimeString","hour","minute","hour12","_jsx","Typography","__assign","variant","color","children"],"mappings":"sKAKM,IAAAA,EAAgB,SAACC,GACX,IAAAC,GAAcD,QAAAA,EAAS,CAAE,GAAAC,UAE3BC,EAAqBC,EAAQ,WAC/B,OAAO,IAAIC,KAAKC,OAAOJ,IAAYK,mBAAmB,QAAS,CAC3DC,KAAM,UACNC,OAAQ,UACRC,QAAQ,GAEhB,EAAG,CAACR,IAEJ,OACIS,EAACC,EAAUC,EAAA,CAACC,QAAQ,KAAKC,MAAM,cAAY,CAAAC,SACtCb,IAGb"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('react');
6
+ var ctDesignComponents = require('@cleartrip/ct-design-components');
7
+
8
+ var ChatTimestamp = function (props) {
9
+ var createdAt = (props !== null && props !== void 0 ? props : {}).createdAt;
10
+ var formattedCreatedAt = react.useMemo(function () {
11
+ return new Date(Number(createdAt)).toLocaleTimeString("en-US", {
12
+ hour: "numeric",
13
+ minute: "2-digit",
14
+ hour12: true,
15
+ });
16
+ }, [createdAt]);
17
+ return (jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: "P3", color: "subheading" }, { children: formattedCreatedAt })));
18
+ };
19
+
20
+ exports.ChatTimestamp = ChatTimestamp;
21
+ //# sourceMappingURL=talos-chat-timestamp.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-chat-timestamp.cjs.js","sources":["../packages/components/chat-timestamp/src/ChatTimestamp.tsx"],"sourcesContent":[null],"names":["useMemo","_jsx","Typography","__assign"],"mappings":";;;;;;;AAKM,IAAA,aAAa,GAAG,UAAC,KAA0B,EAAA;AACrC,IAAA,IAAA,SAAS,GAAK,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,KAAA,CAAA,GAAA,KAAK,GAAI,EAAE,EAAA,SAAhB,CAAiB;IAElC,IAAM,kBAAkB,GAAGA,aAAO,CAAC,YAAA;AAC/B,QAAA,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC3D,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,MAAM,EAAE,IAAI;AACf,SAAA,CAAC,CAAC;AACP,KAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhB,IAAA,QACIC,cAAA,CAACC,6BAAU,EAAAC,cAAA,CAAA,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,EAAA,EAAA,QAAA,EACtC,kBAAkB,EAAA,CAAA,CACV,EACf;AACN;;;;"}
@@ -0,0 +1,19 @@
1
+ import { __assign } from 'tslib';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useMemo } from 'react';
4
+ import { Typography } from '@cleartrip/ct-design-components';
5
+
6
+ var ChatTimestamp = function (props) {
7
+ var createdAt = (props !== null && props !== void 0 ? props : {}).createdAt;
8
+ var formattedCreatedAt = useMemo(function () {
9
+ return new Date(Number(createdAt)).toLocaleTimeString("en-US", {
10
+ hour: "numeric",
11
+ minute: "2-digit",
12
+ hour12: true,
13
+ });
14
+ }, [createdAt]);
15
+ return (jsx(Typography, __assign({ variant: "P3", color: "subheading" }, { children: formattedCreatedAt })));
16
+ };
17
+
18
+ export { ChatTimestamp };
19
+ //# sourceMappingURL=talos-chat-timestamp.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-chat-timestamp.esm.js","sources":["../packages/components/chat-timestamp/src/ChatTimestamp.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAKM,IAAA,aAAa,GAAG,UAAC,KAA0B,EAAA;AACrC,IAAA,IAAA,SAAS,GAAK,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,KAAA,CAAA,GAAA,KAAK,GAAI,EAAE,EAAA,SAAhB,CAAiB;IAElC,IAAM,kBAAkB,GAAG,OAAO,CAAC,YAAA;AAC/B,QAAA,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC3D,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,MAAM,EAAE,IAAI;AACf,SAAA,CAAC,CAAC;AACP,KAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhB,IAAA,QACIA,GAAA,CAAC,UAAU,EAAA,QAAA,CAAA,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,EAAA,EAAA,QAAA,EACtC,kBAAkB,EAAA,CAAA,CACV,EACf;AACN;;;;"}