dinocollab-shared 1.2.25 → 1.2.26
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/notification/class.config.js +2 -0
- package/dist/notification/class.config.js.map +1 -0
- package/dist/notification/index.js +1 -1
- package/dist/notification/notify-detail.custom.js +2 -0
- package/dist/notification/notify-detail.custom.js.map +1 -0
- package/dist/notification/notify-detail.default.js +2 -0
- package/dist/notification/notify-detail.default.js.map +1 -0
- package/dist/notification/notify-detail.js +1 -1
- package/dist/notification/notify-detail.js.map +1 -1
- package/dist/notification/types.js +2 -0
- package/dist/notification/types.js.map +1 -0
- package/dist/types/notification/class.config.d.ts +18 -0
- package/dist/types/notification/class.config.d.ts.map +1 -0
- package/dist/types/notification/notify-detail.custom.d.ts +26 -0
- package/dist/types/notification/notify-detail.custom.d.ts.map +1 -0
- package/dist/types/notification/notify-detail.d.ts +1 -5
- package/dist/types/notification/notify-detail.d.ts.map +1 -1
- package/dist/types/notification/notify-detail.default.d.ts +23 -0
- package/dist/types/notification/notify-detail.default.d.ts.map +1 -0
- package/dist/types/notification/types.d.ts +8 -0
- package/dist/types/notification/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createClass as t,typeof as e,classCallCheck as n,defineProperty as r}from"../_virtual/_rollupPluginBabelHelpers.js";import{jsx as o}from"react/jsx-runtime";import i from"./notify-detail.custom.js";import s from"./notify-detail.default.js";import{ETypeContent as a}from"./types.js";var l=function(){return t(function t(e){n(this,t),r(this,"firtVersion","htmlContent"),r(this,"defaultVersion","1.0.0"),this.rawContent=e,this.parsedObj=this.parseContent()},[{key:"parseContent",value:function(){var t,n,r,o,i,s=void 0;if(!this.rawContent||""===this.rawContent.trim())return{type:a.Template,version:this.defaultVersion,html:""};try{if(!(i=JSON.parse(this.rawContent))||"object"!==e(i)||!i.version)throw new Error("No version found");s=i.version}catch(t){if("string"==typeof this.rawContent&&/<[^>]+>/.test(this.rawContent))return{type:a.Template,version:this.firtVersion,html:this.rawContent};i=this.rawContent}return"1.0.0"===s?{type:null===(t=i)||void 0===t?void 0:t.type,version:s,html:null===(n=i)||void 0===n?void 0:n.html}:{type:null===(r=i)||void 0===r?void 0:r.type,version:s,html:null===(o=i)||void 0===o?void 0:o.html}}},{key:"getContentByVersion",value:function(){return this.parseContent()}},{key:"renderComponent",value:function(t,e,n){var r=this.parseContent();switch(r.type){case a.Custom:return o(i,{data:t,onRead:e,onClose:n,html:r.html||""});case a.Template:default:return o(s,{data:t,onRead:e,onClose:n,html:r.html||""})}}}])}();export{l as NotifyContentConverter};
|
|
2
|
+
//# sourceMappingURL=class.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.config.js","sources":["../../src/notification/class.config.tsx"],"sourcesContent":["import NotifyDetailCustom from './notify-detail.custom'\r\nimport NotifyDetailDefault from './notify-detail.default'\r\nimport { ETypeContent, INotification } from './types'\r\n\r\nexport interface ConfigType {\r\n type: ETypeContent\r\n version?: string\r\n html?: string\r\n}\r\n\r\nexport class NotifyContentConverter {\r\n private rawContent: string\r\n private parsedObj: any\r\n private firtVersion = 'htmlContent'\r\n private defaultVersion = '1.0.0'\r\n\r\n constructor(content: string) {\r\n this.rawContent = content\r\n this.parsedObj = this.parseContent()\r\n }\r\n\r\n private parseContent(): ConfigType {\r\n let parsed: any\r\n let detectedVersion: string | undefined = undefined\r\n if (!this.rawContent || this.rawContent.trim() === '') {\r\n return {\r\n type: ETypeContent.Template,\r\n version: this.defaultVersion,\r\n html: ''\r\n }\r\n }\r\n try {\r\n parsed = JSON.parse(this.rawContent)\r\n if (parsed && typeof parsed === 'object' && parsed.version) {\r\n detectedVersion = parsed.version\r\n } else throw new Error('No version found')\r\n } catch {\r\n if (typeof this.rawContent === 'string' && /<[^>]+>/.test(this.rawContent)) {\r\n //first version html content\r\n return {\r\n type: ETypeContent.Template,\r\n version: this.firtVersion,\r\n html: this.rawContent\r\n }\r\n }\r\n parsed = this.rawContent\r\n }\r\n switch (detectedVersion) {\r\n case '1.0.0':\r\n return {\r\n type: parsed?.type,\r\n version: detectedVersion,\r\n html: parsed?.html\r\n }\r\n default:\r\n return {\r\n type: parsed?.type,\r\n version: detectedVersion,\r\n html: parsed?.html\r\n }\r\n }\r\n }\r\n\r\n getContentByVersion() {\r\n const obj = this.parseContent()\r\n return obj\r\n }\r\n\r\n renderComponent(data: INotification[], onRead?: (value: INotification) => void, onClose?: () => void): React.ReactNode {\r\n const obj = this.parseContent()\r\n switch (obj.type) {\r\n case ETypeContent.Custom:\r\n return <NotifyDetailCustom data={data} onRead={onRead} onClose={onClose} html={obj.html || ''} />\r\n case ETypeContent.Template:\r\n default:\r\n return <NotifyDetailDefault data={data} onRead={onRead} onClose={onClose} html={obj.html || ''} />\r\n }\r\n }\r\n}\r\n"],"names":["NotifyContentConverter","_createClass","content","_classCallCheck","_defineProperty","this","rawContent","parsedObj","parseContent","key","value","_parsed","_parsed2","_parsed3","_parsed4","parsed","detectedVersion","undefined","trim","type","ETypeContent","Template","version","defaultVersion","html","JSON","parse","_typeof","Error","_unused","test","firtVersion","data","onRead","onClose","obj","Custom","_jsx","NotifyDetailCustom","NotifyDetailDefault"],"mappings":"gSAUA,IAAaA,EAAsB,WAShC,OAAAC,EAHD,SAAAD,EAAYE,GAAeC,OAAAH,GAAAI,qBAHL,eAAaA,wBACV,SAGvBC,KAAKC,WAAaJ,EAClBG,KAAKE,UAAYF,KAAKG,cACxB,EAAC,CAAA,CAAAC,IAAA,eAAAC,MAEO,WAAY,IAAAC,EAAAC,EAAAC,EAAAC,EACdC,EACAC,OAAsCC,EAC1C,IAAKZ,KAAKC,YAAyC,KAA3BD,KAAKC,WAAWY,OACtC,MAAO,CACLC,KAAMC,EAAaC,SACnBC,QAASjB,KAAKkB,eACdC,KAAM,IAGV,IAEE,KADAT,EAASU,KAAKC,MAAMrB,KAAKC,cACO,WAAlBqB,EAAOZ,KAAuBA,EAAOO,QAE5C,MAAM,IAAIM,MAAM,oBADrBZ,EAAkBD,EAAOO,OAE5B,CAAC,MAAAO,GACA,GAA+B,iBAApBxB,KAAKC,YAA2B,UAAUwB,KAAKzB,KAAKC,YAE7D,MAAO,CACLa,KAAMC,EAAaC,SACnBC,QAASjB,KAAK0B,YACdP,KAAMnB,KAAKC,YAGfS,EAASV,KAAKC,UACf,CACD,MACO,UADCU,EAEG,CACLG,aAAIR,EAAEI,SAAM,IAAAJ,OAAA,EAANA,EAAQQ,KACdG,QAASN,EACTQ,aAAIZ,EAAEG,SAAM,IAAAH,OAAA,EAANA,EAAQY,MAGT,CACLL,aAAIN,EAAEE,SAAM,IAAAF,OAAA,EAANA,EAAQM,KACdG,QAASN,EACTQ,aAAIV,EAAEC,SAAM,IAAAD,OAAA,EAANA,EAAQU,KAGtB,GAAC,CAAAf,IAAA,sBAAAC,MAED,WAEE,OADYL,KAAKG,cAEnB,GAAC,CAAAC,IAAA,kBAAAC,MAED,SAAgBsB,EAAuBC,EAAyCC,GAC9E,IAAMC,EAAM9B,KAAKG,eACjB,OAAQ2B,EAAIhB,MACV,KAAKC,EAAagB,OAChB,OAAOC,EAACC,EAAmB,CAAAN,KAAMA,EAAMC,OAAQA,EAAQC,QAASA,EAASV,KAAMW,EAAIX,MAAQ,KAC7F,KAAKJ,EAAaC,SAClB,QACE,OAAOgB,EAACE,EAAoB,CAAAP,KAAMA,EAAMC,OAAQA,EAAQC,QAASA,EAASV,KAAMW,EAAIX,MAAQ,KAElG,IAAC,CAnEgC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{NotificationWidget,createNotificationWidget}from"./widget.js";
|
|
1
|
+
export{NotificationWidget,createNotificationWidget}from"./widget.js";export{EBtnPopupId,ETypeContent}from"./types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{defineProperty as e,inherits as t,createClass as n,classCallCheck as r,callSuper as a}from"../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i,Fragment as o}from"react/jsx-runtime";import{styled as l,Box as s}from"@mui/material";import{Component as d,createRef as c}from"react";import{EBtnPopupId as u}from"./types.js";import"react-quill/dist/quill.snow.css";var p=function(){function l(t){var n;return r(this,l),n=a(this,l,[t]),e(n,"contentRef",c()),e(n,"handleContentClick",function(e){var t,r,a=e.target;if("BUTTON"===a.tagName&&a.id)switch(a.id){case u.Close:return null===(t=(r=n.props).onClose)||void 0===t?void 0:t.call(r);case u.Readed:return n.handleRead()}}),e(n,"handleRead",function(){var e,t,r,a,i=n.props.data[n.state.indexSelected];null===(e=(t=n.props).onRead)||void 0===e||e.call(t,i),n.state.indexSelected>=n.props.data.length-1&&(null===(r=(a=n.props).onClose)||void 0===r||r.call(a))}),e(n,"getData",function(){var e=n.props.data,t=n.state.indexSelected,r=e[t];return r||0===t?r:void n.setState({indexSelected:0})}),n.state={indexSelected:0},n}return t(l,d),n(l,[{key:"componentDidMount",value:function(){var e;null===(e=this.contentRef.current)||void 0===e||e.addEventListener("click",this.handleContentClick)}},{key:"componentWillUnmount",value:function(){var e;null===(e=this.contentRef.current)||void 0===e||e.removeEventListener("click",this.handleContentClick)}},{key:"render",value:function(){return this.getData()?i(h,{children:i(m,{children:i("div",{ref:this.contentRef,dangerouslySetInnerHTML:{__html:this.props.html}})})}):i(o,{})}}])}(),m=l(s)(function(e){var t=e.theme;return{width:"100%",minHeight:"350px",maxHeight:"calc(100vh - 128px)",overflow:"auto",margin:"0 4px",padding:"0 8px",color:t.palette.grey[900],fontFamily:"var(--font-primary, 'Roboto', 'Arial', sans-serif)","--color-body":t.palette.grey[900],img:{maxWidth:"100%"}}}),h=l(s)(function(t){var n=t.theme;return e({backgroundColor:"transparent",width:"auto !important",maxWidth:"calc(100vw - 48px)",margin:"0 auto",overflowX:"hidden",overflowY:"auto",minHeight:"200px",display:"flex",flexDirection:"column",alignItems:"center",borderRadius:n.shape.borderRadius},n.breakpoints.up("md"),{width:n.breakpoints.values.md})});export{h as NotifyDetailStyled,p as default};
|
|
2
|
+
//# sourceMappingURL=notify-detail.custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify-detail.custom.js","sources":["../../src/notification/notify-detail.custom.tsx"],"sourcesContent":["import { Box, BoxProps, styled } from '@mui/material'\r\nimport { Component, ComponentType, createRef } from 'react'\r\nimport { EBtnPopupId, INotification } from './types'\r\nimport 'react-quill/dist/quill.snow.css'\r\n\r\ninterface IProps {\r\n data: INotification[]\r\n html: string\r\n onRead?: (value: INotification) => void\r\n onClose?: () => void\r\n}\r\n\r\ninterface IState {\r\n indexSelected: number\r\n}\r\n\r\nclass NotifyDetailCustom extends Component<IProps, IState> {\r\n private contentRef = createRef<HTMLDivElement>()\r\n\r\n constructor(props: IProps) {\r\n super(props)\r\n this.state = { indexSelected: 0 }\r\n }\r\n\r\n componentDidMount() {\r\n // Add event listener for clicks inside dangerouslySetInnerHTML content\r\n this.contentRef.current?.addEventListener('click', this.handleContentClick)\r\n }\r\n\r\n componentWillUnmount() {\r\n // Clean up event listener\r\n this.contentRef.current?.removeEventListener('click', this.handleContentClick)\r\n }\r\n\r\n handleContentClick = (event: MouseEvent) => {\r\n const target = event.target as HTMLElement\r\n // Check if clicked element is a button with specific ID\r\n if (target.tagName === 'BUTTON' && target.id) {\r\n // console.log('Button clicked with ID:', target.id)\r\n // Handle specific button IDs\r\n switch (target.id) {\r\n case EBtnPopupId.Close:\r\n return this.props.onClose?.()\r\n case EBtnPopupId.Readed:\r\n return this.handleRead()\r\n default:\r\n // console.log('Other button clicked:', target.id)\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n const data = this.getData()\r\n if (!data) return <></>\r\n return (\r\n <NotifyDetailStyled>\r\n <TextEditorWrapper>\r\n <div ref={this.contentRef} dangerouslySetInnerHTML={{ __html: this.props.html }} />\r\n </TextEditorWrapper>\r\n </NotifyDetailStyled>\r\n )\r\n }\r\n\r\n handleRead = () => {\r\n const data = this.props.data[this.state.indexSelected]\r\n this.props.onRead?.(data)\r\n if (this.state.indexSelected >= this.props.data.length - 1) this.props.onClose?.()\r\n }\r\n\r\n getData = () => {\r\n const { data } = this.props\r\n const { indexSelected } = this.state\r\n const item = data[indexSelected]\r\n if (!item && indexSelected !== 0) {\r\n this.setState({ indexSelected: 0 })\r\n return\r\n } else {\r\n return item\r\n }\r\n }\r\n}\r\n\r\nexport default NotifyDetailCustom\r\n\r\nconst TextEditorWrapper = styled(Box)(({ theme }) => ({\r\n width: '100%',\r\n minHeight: '350px',\r\n maxHeight: 'calc(100vh - 128px)',\r\n overflow: 'auto',\r\n margin: '0 4px',\r\n padding: '0 8px',\r\n color: theme.palette.grey[900],\r\n fontFamily: \"var(--font-primary, 'Roboto', 'Arial', sans-serif)\",\r\n '--color-body': theme.palette.grey[900],\r\n img: { maxWidth: '100%' }\r\n}))\r\n\r\nexport const NotifyDetailStyled: ComponentType<BoxProps> = styled(Box)(({ theme }) => ({\r\n backgroundColor: 'transparent',\r\n width: 'auto !important',\r\n maxWidth: 'calc(100vw - 48px)',\r\n margin: '0 auto',\r\n overflowX: 'hidden',\r\n overflowY: 'auto',\r\n minHeight: '200px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n borderRadius: theme.shape.borderRadius,\r\n [theme.breakpoints.up('md')]: { width: theme.breakpoints.values.md }\r\n}))\r\n"],"names":["NotifyDetailCustom","props","_this","_classCallCheck","_callSuper","_defineProperty","createRef","event","_this$props$onClose","_this$props","target","tagName","id","EBtnPopupId","Close","onClose","call","Readed","handleRead","_this$props$onRead","_this$props2","_this$props$onClose2","_this$props3","data","state","indexSelected","onRead","length","item","setState","_inherits","Component","_createClass","key","value","_this$contentRef$curr","this","contentRef","current","addEventListener","handleContentClick","_this$contentRef$curr2","removeEventListener","getData","_jsx","NotifyDetailStyled","children","TextEditorWrapper","ref","dangerouslySetInnerHTML","__html","html","styled","Box","_ref","theme","width","minHeight","maxHeight","overflow","margin","padding","color","palette","grey","fontFamily","img","maxWidth","_ref2","backgroundColor","overflowX","overflowY","display","flexDirection","alignItems","borderRadius","shape","breakpoints","up","values","md"],"mappings":"oXAgBMA,IAAAA,aAGJ,SAAAA,EAAYC,GAAa,IAAAC,EAEU,OAFVC,OAAAH,GACvBE,EAAAE,EAAAJ,KAAAA,GAAMC,IAAMI,EAAAH,EAHOI,aAAAA,KAA2BD,EAAAH,EAiB3B,qBAAA,SAACK,GAAqB,IAAAC,EAAAC,EACnCC,EAASH,EAAMG,OAErB,GAAuB,WAAnBA,EAAOC,SAAwBD,EAAOE,GAGxC,OAAQF,EAAOE,IACb,KAAKC,EAAYC,MACf,OAAyB,QAAzBN,GAAOC,EAAAP,EAAKD,OAAMc,eAAXP,IAAkBA,OAAlBA,EAAAA,EAAAQ,KAAAP,GACT,KAAKI,EAAYI,OACf,OAAOf,EAAKgB,gBAKnBb,EAAAH,EAAA,aAcY,WAAK,IAAAiB,EAAAC,EAAAC,EAAAC,EACVC,EAAOrB,EAAKD,MAAMsB,KAAKrB,EAAKsB,MAAMC,uBACxCN,GAAAC,EAAAlB,EAAKD,OAAMyB,cAAM,IAAAP,GAAjBA,EAAAH,KAAAI,EAAoBG,GAChBrB,EAAKsB,MAAMC,eAAiBvB,EAAKD,MAAMsB,KAAKI,OAAS,IAAqBN,QAAlBA,GAAAC,EAAApB,EAAKD,OAAMc,mBAAOM,GAAlBA,EAAAL,KAAAM,MAC7DjB,EAAAH,EAAA,UAES,WACR,IAAQqB,EAASrB,EAAKD,MAAdsB,KACAE,EAAkBvB,EAAKsB,MAAvBC,cACFG,EAAOL,EAAKE,GAClB,OAAKG,GAA0B,IAAlBH,EAIJG,OAHP1B,EAAK2B,SAAS,CAAEJ,cAAe,MArDjCvB,EAAKsB,MAAQ,CAAEC,cAAe,GAAGvB,CACnC,CAAC,OAAA4B,EAAA9B,EAN8B+B,GAM9BC,EAAAhC,EAAA,CAAA,CAAAiC,IAAA,oBAAAC,MAED,WAAiB,IAAAC,UAEfA,EAAIC,KAACC,WAAWC,eAAO,IAAAH,GAAvBA,EAAyBI,iBAAiB,QAASH,KAAKI,mBAC1D,GAAC,CAAAP,IAAA,uBAAAC,MAED,WAAoB,IAAAO,UAElBA,EAAIL,KAACC,WAAWC,eAAO,IAAAG,GAAvBA,EAAyBC,oBAAoB,QAASN,KAAKI,mBAC7D,GAAC,CAAAP,IAAA,SAAAC,MAmBD,WAEE,OADaE,KAAKO,UAGhBC,EAACC,EAAkB,CAAAC,SACjBF,EAACG,EACC,CAAAD,SAAAF,EAAA,MAAA,CAAKI,IAAKZ,KAAKC,WAAYY,wBAAyB,CAAEC,OAAQd,KAAKnC,MAAMkD,YAJ7DP,OAQpB,IAAC,IAuBGG,EAAoBK,EAAOC,EAAPD,CAAY,SAAAE,GAAA,IAAGC,EAAKD,EAALC,MAAK,MAAQ,CACpDC,MAAO,OACPC,UAAW,QACXC,UAAW,sBACXC,SAAU,OACVC,OAAQ,QACRC,QAAS,QACTC,MAAOP,EAAMQ,QAAQC,KAAK,KAC1BC,WAAY,qDACZ,eAAgBV,EAAMQ,QAAQC,KAAK,KACnCE,IAAK,CAAEC,SAAU,QAClB,GAEYtB,EAA8CO,EAAOC,EAAPD,CAAY,SAAAgB,GAAA,IAAGb,EAAKa,EAALb,MAAK,OAAAlD,EAAA,CAC7EgE,gBAAiB,cACjBb,MAAO,kBACPW,SAAU,qBACVP,OAAQ,SACRU,UAAW,SACXC,UAAW,OACXd,UAAW,QACXe,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,aAAcpB,EAAMqB,MAAMD,cACzBpB,EAAMsB,YAAYC,GAAG,MAAQ,CAAEtB,MAAOD,EAAMsB,YAAYE,OAAOC,IAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{inherits as e,createClass as t,classCallCheck as a,callSuper as i,defineProperty as r}from"../_virtual/_rollupPluginBabelHelpers.js";import{jsx as l,Fragment as n,jsxs as o}from"react/jsx-runtime";import"react-quill/dist/quill.snow.css";import{Component as s}from"react";import{styled as d,Box as c,Typography as h,Tooltip as p,IconButton as m,Divider as u,Button as f}from"@mui/material";import x from"@mui/icons-material/Close";import g from"@mui/icons-material/KeyboardArrowLeft";import v from"@mui/icons-material/KeyboardArrowRight";import{NotifyDetailStyled as C,notifyDetailClasses as y}from"./styled.js";var S=function(){function d(e){var t;return a(this,d),t=i(this,d,[e]),r(t,"renderControl",function(){return t.props.data.length<2?l(c,{}):o(R,{children:[l(m,{disabled:t.state.indexSelected<=0,onClick:t.handleClickLeft,children:l(g,{})}),o(h,{children:[t.state.indexSelected+1," / ",t.props.data.length]}),l(m,{disabled:t.state.indexSelected>=t.props.data.length-1,onClick:t.handleClickRight,children:l(v,{})})]})}),r(t,"handleClickLeft",function(){var e=t.state.indexSelected-1;e<0||t.setState({indexSelected:e})}),r(t,"handleClickRight",function(){var e=t.state.indexSelected+1;e>=t.props.data.length||t.setState({indexSelected:e})}),r(t,"handleRead",function(){var e,a,i,r,l=t.props.data[t.state.indexSelected];null===(e=(a=t.props).onRead)||void 0===e||e.call(a,l),t.handleClickRight(),t.state.indexSelected>=t.props.data.length-1&&(null===(i=(r=t.props).onClose)||void 0===i||i.call(r))}),r(t,"getData",function(){var e=t.props.data,a=t.state.indexSelected,i=e[a];return i||0===a?i:void t.setState({indexSelected:0})}),t.state={indexSelected:0},t}return e(d,s),t(d,[{key:"render",value:function(){var e=this.getData();return e?o(C,{className:y.root,children:[o("div",{className:y.header,children:[l(h,{variant:"h6",className:y.title,children:e.Title}),l(p,{title:"Close",children:l(m,{onClick:this.props.onClose,className:y.closeButton,children:l(x,{})})})]}),l(u,{flexItem:!0,variant:"middle",sx:{opacity:.3}}),l(k,{children:l("div",{className:"ql-editor",dangerouslySetInnerHTML:{__html:this.props.html||""}})}),l(u,{flexItem:!0,variant:"middle",sx:{opacity:.3}}),o("div",{className:y.footer,children:[this.renderControl(),o("div",{className:y.footerActions,children:[!e.IsRead&&l(f,{color:"inherit",onClick:this.props.onClose,sx:{textTransform:"unset"},children:"Remind me later"}),!e.IsRead&&l(f,{color:"primary",onClick:this.handleRead,sx:{textTransform:"unset",fontWeight:600},children:"Mark as read"}),e.IsRead&&l(f,{color:"primary",onClick:this.props.onClose,sx:{textTransform:"unset"},children:"Close"})]})]})]}):l(n,{})}}])}(),k=d(c)(function(e){var t=e.theme;return{width:"100%",minHeight:"350px",maxHeight:"calc(100vh - 128px)",overflow:"auto",margin:"0 4px",padding:"0 8px",color:t.palette.grey[900],fontFamily:"var(--font-primary, 'Roboto', 'Arial', sans-serif)","--color-body":t.palette.grey[900],"& .ql-toolbar.ql-snow":{display:"none"},"& .ql-container.ql-snow":{border:"none"},"& .ql-editor":{paddingLeft:0,paddingRight:0,height:"unset"},img:{maxWidth:"90%",height:"auto",marginLeft:"auto",marginRight:"auto",display:"block"}}}),R=d(c)({display:"flex",alignItems:"center",gap:"8px"});export{S as default};
|
|
2
|
+
//# sourceMappingURL=notify-detail.default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify-detail.default.js","sources":["../../src/notification/notify-detail.default.tsx"],"sourcesContent":["import 'react-quill/dist/quill.snow.css'\r\nimport { Component } from 'react'\r\nimport { Box, Button, styled, Typography, Divider, IconButton, Tooltip } from '@mui/material'\r\nimport CloseIcon from '@mui/icons-material/Close'\r\nimport KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'\r\nimport KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'\r\nimport { INotification } from './types'\r\nimport { notifyDetailClasses, NotifyDetailStyled } from './styled'\r\n\r\ninterface IProps {\r\n data: INotification[]\r\n html: string\r\n onRead?: (value: INotification) => void\r\n onClose?: () => void\r\n}\r\n\r\ninterface IState {\r\n indexSelected: number\r\n}\r\n\r\nclass NotifyDetailDefault extends Component<IProps, IState> {\r\n constructor(props: IProps) {\r\n super(props)\r\n this.state = { indexSelected: 0 }\r\n }\r\n\r\n render() {\r\n const data = this.getData()\r\n if (!data) return <></>\r\n return (\r\n <NotifyDetailStyled className={notifyDetailClasses.root}>\r\n <div className={notifyDetailClasses.header}>\r\n <Typography variant='h6' className={notifyDetailClasses.title}>\r\n {data.Title}\r\n </Typography>\r\n <Tooltip title='Close'>\r\n <IconButton onClick={this.props.onClose} className={notifyDetailClasses.closeButton}>\r\n <CloseIcon />\r\n </IconButton>\r\n </Tooltip>\r\n </div>\r\n <Divider flexItem variant='middle' sx={{ opacity: 0.3 }} />\r\n <TextEditorWrapper>\r\n <div className='ql-editor' dangerouslySetInnerHTML={{ __html: this.props.html || '' }} />\r\n </TextEditorWrapper>\r\n <Divider flexItem variant='middle' sx={{ opacity: 0.3 }} />\r\n <div className={notifyDetailClasses.footer}>\r\n {this.renderControl()}\r\n <div className={notifyDetailClasses.footerActions}>\r\n {!data.IsRead && (\r\n <Button color='inherit' onClick={this.props.onClose} sx={{ textTransform: 'unset' }}>\r\n {'Remind me later'}\r\n </Button>\r\n )}\r\n {!data.IsRead && (\r\n <Button color='primary' onClick={this.handleRead} sx={{ textTransform: 'unset', fontWeight: 600 }}>\r\n Mark as read\r\n </Button>\r\n )}\r\n {data.IsRead && (\r\n <Button color='primary' onClick={this.props.onClose} sx={{ textTransform: 'unset' }}>\r\n Close\r\n </Button>\r\n )}\r\n </div>\r\n </div>\r\n </NotifyDetailStyled>\r\n )\r\n }\r\n\r\n renderControl = () => {\r\n if (this.props.data.length < 2) return <Box />\r\n return (\r\n <FlexCenter>\r\n <IconButton disabled={this.state.indexSelected <= 0} onClick={this.handleClickLeft}>\r\n <KeyboardArrowLeftIcon />\r\n </IconButton>\r\n <Typography>\r\n {this.state.indexSelected + 1} / {this.props.data.length}\r\n </Typography>\r\n <IconButton disabled={this.state.indexSelected >= this.props.data.length - 1} onClick={this.handleClickRight}>\r\n <KeyboardArrowRightIcon />\r\n </IconButton>\r\n </FlexCenter>\r\n )\r\n }\r\n\r\n handleClickLeft = () => {\r\n const index = this.state.indexSelected - 1\r\n if (index < 0) return\r\n this.setState({ indexSelected: index })\r\n }\r\n\r\n handleClickRight = () => {\r\n const index = this.state.indexSelected + 1\r\n if (index >= this.props.data.length) return\r\n this.setState({ indexSelected: index })\r\n }\r\n\r\n handleRead = () => {\r\n const data = this.props.data[this.state.indexSelected]\r\n this.props.onRead?.(data)\r\n this.handleClickRight()\r\n if (this.state.indexSelected >= this.props.data.length - 1) this.props.onClose?.()\r\n }\r\n\r\n getData = () => {\r\n const { data } = this.props\r\n const { indexSelected } = this.state\r\n const item = data[indexSelected]\r\n if (!item && indexSelected !== 0) {\r\n this.setState({ indexSelected: 0 })\r\n return\r\n } else {\r\n return item\r\n }\r\n }\r\n}\r\n\r\nexport default NotifyDetailDefault\r\n\r\nconst TextEditorWrapper = styled(Box)(({ theme }) => ({\r\n width: '100%',\r\n minHeight: '350px',\r\n maxHeight: 'calc(100vh - 128px)',\r\n overflow: 'auto',\r\n margin: '0 4px',\r\n padding: '0 8px',\r\n color: theme.palette.grey[900],\r\n fontFamily: \"var(--font-primary, 'Roboto', 'Arial', sans-serif)\",\r\n '--color-body': theme.palette.grey[900],\r\n '& .ql-toolbar.ql-snow': { display: 'none' },\r\n '& .ql-container.ql-snow': { border: 'none' },\r\n '& .ql-editor': { paddingLeft: 0, paddingRight: 0, height: 'unset' },\r\n img: { maxWidth: '90%', height: 'auto', marginLeft: 'auto', marginRight: 'auto', display: 'block' }\r\n}))\r\n\r\nconst FlexCenter = styled(Box)({ display: 'flex', alignItems: 'center', gap: '8px' })\r\n"],"names":["NotifyDetailDefault","props","_this","_classCallCheck","_callSuper","_defineProperty","data","length","_jsx","Box","_jsxs","FlexCenter","children","IconButton","disabled","state","indexSelected","onClick","handleClickLeft","KeyboardArrowLeftIcon","Typography","handleClickRight","KeyboardArrowRightIcon","index","setState","_this$props$onRead","_this$props","_this$props$onClose","_this$props2","onRead","call","onClose","item","_inherits","Component","_createClass","key","value","this","getData","NotifyDetailStyled","className","notifyDetailClasses","root","header","variant","title","Title","Tooltip","closeButton","CloseIcon","Divider","flexItem","sx","opacity","TextEditorWrapper","dangerouslySetInnerHTML","__html","html","footer","renderControl","footerActions","IsRead","Button","color","textTransform","handleRead","fontWeight","styled","_ref","theme","width","minHeight","maxHeight","overflow","margin","padding","palette","grey","fontFamily","display","border","paddingLeft","paddingRight","height","img","maxWidth","marginLeft","marginRight","alignItems","gap"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inherits as e,createClass as t,classCallCheck as
|
|
1
|
+
import{inherits as e,createClass as t,classCallCheck as r,callSuper as a,defineProperty as s}from"../_virtual/_rollupPluginBabelHelpers.js";import{jsx as n,Fragment as i}from"react/jsx-runtime";import"react-quill/dist/quill.snow.css";import{Component as o}from"react";import{NotifyContentConverter as l}from"./class.config.js";var p=function(){function p(e){var t;return r(this,p),t=a(this,p,[e]),s(t,"getData",function(){var e=t.props.data,r=t.state.indexSelected,a=e[r];return a||0===r?a:void t.setState({indexSelected:0})}),t.state={indexSelected:0},t}return e(p,o),t(p,[{key:"render",value:function(){var e=this.getData();return e?new l(e.Content).renderComponent(this.props.data,this.props.onRead,this.props.onClose):n(i,{})}}])}();export{p as default};
|
|
2
2
|
//# sourceMappingURL=notify-detail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-detail.js","sources":["../../src/notification/notify-detail.tsx"],"sourcesContent":["import 'react-quill/dist/quill.snow.css'\r\nimport { Component } from 'react'\r\nimport {
|
|
1
|
+
{"version":3,"file":"notify-detail.js","sources":["../../src/notification/notify-detail.tsx"],"sourcesContent":["import 'react-quill/dist/quill.snow.css'\r\nimport { Component } from 'react'\r\nimport { INotification } from './types'\r\nimport { NotifyContentConverter } from './class.config'\r\n\r\ninterface IProps {\r\n data: INotification[]\r\n onRead?: (value: INotification) => void\r\n onClose?: () => void\r\n}\r\n\r\ninterface IState {\r\n indexSelected: number\r\n}\r\n\r\nclass NotifyDetail extends Component<IProps, IState> {\r\n constructor(props: IProps) {\r\n super(props)\r\n this.state = { indexSelected: 0 }\r\n }\r\n\r\n render() {\r\n const data = this.getData()\r\n if (!data) return <></>\r\n const notifyContent = new NotifyContentConverter(data.Content)\r\n return notifyContent.renderComponent(this.props.data, this.props.onRead, this.props.onClose)\r\n }\r\n\r\n getData = () => {\r\n const { data } = this.props\r\n const { indexSelected } = this.state\r\n const item = data[indexSelected]\r\n if (!item && indexSelected !== 0) {\r\n this.setState({ indexSelected: 0 })\r\n return\r\n } else {\r\n return item\r\n }\r\n }\r\n}\r\n\r\nexport default NotifyDetail\r\n"],"names":["NotifyDetail","props","_this","_classCallCheck","_callSuper","_defineProperty","data","indexSelected","state","item","setState","_inherits","Component","_createClass","key","value","this","getData","NotifyContentConverter","Content","renderComponent","onRead","onClose","_jsx"],"mappings":"uUAeMA,IAAAA,aACJ,SAAAA,EAAYC,GAAa,IAAAC,EAEU,OAFVC,OAAAH,GACvBE,EAAAE,EAAAJ,KAAAA,GAAMC,IAAMI,EAAAH,EAAA,UAWJ,WACR,IAAQI,EAASJ,EAAKD,MAAdK,KACAC,EAAkBL,EAAKM,MAAvBD,cACFE,EAAOH,EAAKC,GAClB,OAAKE,GAA0B,IAAlBF,EAIJE,OAHPP,EAAKQ,SAAS,CAAEH,cAAe,MAfjCL,EAAKM,MAAQ,CAAED,cAAe,GAAGL,CACnC,CAAC,OAAAS,EAAAX,EAJwBY,GAIxBC,EAAAb,EAAA,CAAA,CAAAc,IAAA,SAAAC,MAED,WACE,IAAMT,EAAOU,KAAKC,UAClB,OAAKX,EACiB,IAAIY,EAAuBZ,EAAKa,SACjCC,gBAAgBJ,KAAKf,MAAMK,KAAMU,KAAKf,MAAMoB,OAAQL,KAAKf,MAAMqB,SAFlEC,OAGpB,IAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../src/notification/types.ts"],"sourcesContent":["export enum ETypeContent {\r\n Template = 'template',\r\n Custom = 'custom'\r\n}\r\n\r\nexport enum EBtnPopupId {\r\n Close = 'button-popup-close',\r\n Readed = 'button-popup-readed'\r\n}\r\n\r\nexport type EAreaType = 'Header' | 'Popup'\r\n\r\nexport type ESendType = 'All' | 'User'\r\n\r\nexport interface INotificationUser {\r\n Id: string\r\n DisplayName: string\r\n}\r\n\r\nexport interface INotification {\r\n Id: string\r\n Title: string\r\n SubTitle: string\r\n Content: string\r\n DateExpired: string\r\n SendType: ESendType\r\n AreaType: EAreaType\r\n UserIds?: string[]\r\n Users?: INotificationUser[]\r\n IsRead?: boolean\r\n DateCreated: string\r\n}\r\n\r\nexport type ReadedFunction = (id: string, signal?: AbortSignal) => Promise<void>\r\n"],"names":["ETypeContent","EBtnPopupId"],"mappings":"IAAYA,EAKAC,GALZ,SAAYD,GACVA,EAAA,SAAA,WACAA,EAAA,OAAA,QACD,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACVA,EAAA,MAAA,qBACAA,EAAA,OAAA,qBACD,CAHD,CAAYA,IAAAA,EAGX,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ETypeContent, INotification } from './types';
|
|
3
|
+
export interface ConfigType {
|
|
4
|
+
type: ETypeContent;
|
|
5
|
+
version?: string;
|
|
6
|
+
html?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class NotifyContentConverter {
|
|
9
|
+
private rawContent;
|
|
10
|
+
private parsedObj;
|
|
11
|
+
private firtVersion;
|
|
12
|
+
private defaultVersion;
|
|
13
|
+
constructor(content: string);
|
|
14
|
+
private parseContent;
|
|
15
|
+
getContentByVersion(): ConfigType;
|
|
16
|
+
renderComponent(data: INotification[], onRead?: (value: INotification) => void, onClose?: () => void): React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=class.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.config.d.ts","sourceRoot":"","sources":["../../../src/notification/class.config.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAErD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,sBAAsB;IACjC,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,cAAc,CAAU;gBAEpB,OAAO,EAAE,MAAM;IAK3B,OAAO,CAAC,YAAY;IA0CpB,mBAAmB;IAKnB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS;CAUvH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { Component, ComponentType } from 'react';
|
|
3
|
+
import { INotification } from './types';
|
|
4
|
+
import 'react-quill/dist/quill.snow.css';
|
|
5
|
+
interface IProps {
|
|
6
|
+
data: INotification[];
|
|
7
|
+
html: string;
|
|
8
|
+
onRead?: (value: INotification) => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface IState {
|
|
12
|
+
indexSelected: number;
|
|
13
|
+
}
|
|
14
|
+
declare class NotifyDetailCustom extends Component<IProps, IState> {
|
|
15
|
+
private contentRef;
|
|
16
|
+
constructor(props: IProps);
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
componentWillUnmount(): void;
|
|
19
|
+
handleContentClick: (event: MouseEvent) => void;
|
|
20
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
handleRead: () => void;
|
|
22
|
+
getData: () => INotification | undefined;
|
|
23
|
+
}
|
|
24
|
+
export default NotifyDetailCustom;
|
|
25
|
+
export declare const NotifyDetailStyled: ComponentType<BoxProps>;
|
|
26
|
+
//# sourceMappingURL=notify-detail.custom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify-detail.custom.d.ts","sourceRoot":"","sources":["../../../src/notification/notify-detail.custom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAU,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAa,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAe,aAAa,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,iCAAiC,CAAA;AAExC,UAAU,MAAM;IACd,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,UAAU,MAAM;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,cAAM,kBAAmB,SAAQ,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACxD,OAAO,CAAC,UAAU,CAA8B;gBAEpC,KAAK,EAAE,MAAM;IAKzB,iBAAiB;IAKjB,oBAAoB;IAKpB,kBAAkB,UAAW,UAAU,UAetC;IAED,MAAM;IAYN,UAAU,aAIT;IAED,OAAO,kCAUN;CACF;AAED,eAAe,kBAAkB,CAAA;AAejC,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,QAAQ,CAapD,CAAA"}
|
|
@@ -11,11 +11,7 @@ interface IState {
|
|
|
11
11
|
}
|
|
12
12
|
declare class NotifyDetail extends Component<IProps, IState> {
|
|
13
13
|
constructor(props: IProps);
|
|
14
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
renderControl: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
handleClickLeft: () => void;
|
|
17
|
-
handleClickRight: () => void;
|
|
18
|
-
handleRead: () => void;
|
|
14
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
19
15
|
getData: () => INotification | undefined;
|
|
20
16
|
}
|
|
21
17
|
export default NotifyDetail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-detail.d.ts","sourceRoot":"","sources":["../../../src/notification/notify-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"notify-detail.d.ts","sourceRoot":"","sources":["../../../src/notification/notify-detail.tsx"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,UAAU,MAAM;IACd,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,UAAU,MAAM;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,cAAM,YAAa,SAAQ,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBACtC,KAAK,EAAE,MAAM;IAKzB,MAAM;IAON,OAAO,kCAUN;CACF;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import 'react-quill/dist/quill.snow.css';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { INotification } from './types';
|
|
4
|
+
interface IProps {
|
|
5
|
+
data: INotification[];
|
|
6
|
+
html: string;
|
|
7
|
+
onRead?: (value: INotification) => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface IState {
|
|
11
|
+
indexSelected: number;
|
|
12
|
+
}
|
|
13
|
+
declare class NotifyDetailDefault extends Component<IProps, IState> {
|
|
14
|
+
constructor(props: IProps);
|
|
15
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
renderControl: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
handleClickLeft: () => void;
|
|
18
|
+
handleClickRight: () => void;
|
|
19
|
+
handleRead: () => void;
|
|
20
|
+
getData: () => INotification | undefined;
|
|
21
|
+
}
|
|
22
|
+
export default NotifyDetailDefault;
|
|
23
|
+
//# sourceMappingURL=notify-detail.default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify-detail.default.d.ts","sourceRoot":"","sources":["../../../src/notification/notify-detail.default.tsx"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,UAAU,MAAM;IACd,IAAI,EAAE,aAAa,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,UAAU,MAAM;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,cAAM,mBAAoB,SAAQ,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAC7C,KAAK,EAAE,MAAM;IAKzB,MAAM;IA4CN,aAAa,gDAeZ;IAED,eAAe,aAId;IAED,gBAAgB,aAIf;IAED,UAAU,aAKT;IAED,OAAO,kCAUN;CACF;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export declare enum ETypeContent {
|
|
2
|
+
Template = "template",
|
|
3
|
+
Custom = "custom"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EBtnPopupId {
|
|
6
|
+
Close = "button-popup-close",
|
|
7
|
+
Readed = "button-popup-readed"
|
|
8
|
+
}
|
|
1
9
|
export type EAreaType = 'Header' | 'Popup';
|
|
2
10
|
export type ESendType = 'All' | 'User';
|
|
3
11
|
export interface INotificationUser {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/notification/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAA;AAEtC,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/notification/types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,oBAAY,WAAW;IACrB,KAAK,uBAAuB;IAC5B,MAAM,wBAAwB;CAC/B;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAA;AAEtC,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA"}
|