@elliemae/ds-comments 3.11.1-rc.1 → 3.12.0-next.1

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.
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/CommentCard.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useCallback, useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport DSButton from '@elliemae/ds-button';\nimport { DSReadMore } from '@elliemae/ds-read-more';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport {\n CommentCardWrapper,\n CommentCardHeader,\n CommentCardContent,\n CommentCardName,\n CommentCardData,\n CommentCardMenu,\n CommentCardLeft,\n} from './blocks';\nimport { getTime, getDisplayDate } from './helper';\n\nconst CommentCard = ({\n containerProps = {},\n name = '',\n date = new Date(),\n type = '',\n content = '',\n style = {},\n options = [],\n selection = { 'single-selection-internal-external': ['set-as-internal'] },\n customDropdownMenuProps = {\n focusOnOpen: true,\n },\n borderBottom,\n dateFormat = 'MM/DD/YYYY',\n timeFormat = 'hh:mm a',\n maxLines = 2,\n}) => {\n const ref = useRef();\n const displayDate = date ? getDisplayDate(date, dateFormat) : null;\n const displayTime = date ? getTime(date, timeFormat) : null;\n\n const handleCloseMenu = useCallback(() => {\n ref.current.focus();\n }, []);\n\n return (\n <CommentCardWrapper\n classProps={{ borderBottom }}\n tabIndex={0}\n {...containerProps}\n style={{ ...style, ...(containerProps.style || {}) }}\n >\n <CommentCardHeader classProps={{ borderBottom }}>\n <CommentCardLeft>\n <CommentCardName>{name}</CommentCardName>\n <CommentCardData>\n {displayDate}\n {displayTime && (\n <>\n <span>\u2022</span>\n {displayTime}\n </>\n )}\n {type && (\n <>\n <span>\u2022</span>\n {type}\n </>\n )}\n </CommentCardData>\n </CommentCardLeft>\n {options && options.length > 0 && (\n <CommentCardMenu>\n <DSDropdownMenu\n {...customDropdownMenuProps}\n onClose={handleCloseMenu}\n options={options}\n selection={selection}\n triggerComponent={<DSButton buttonType=\"text\" icon={<MoreOptionsVert />} innerRef={ref} />}\n zIndex={11} // https://jira.elliemae.io/browse/PUI-1664\n />\n </CommentCardMenu>\n )}\n </CommentCardHeader>\n <CommentCardContent>\n <div>\n <DSReadMore\n lines={maxLines}\n content={`${content} `}\n more=\"MORE\"\n less=\"LESS\"\n buttonType=\"text\"\n size=\"m\"\n ellipsis=\"... \"\n />\n </div>\n </CommentCardContent>\n </CommentCardWrapper>\n );\n};\n\nconst props = {\n /** props to inject to comment card wrapper */\n containerProps: PropTypes.shape({\n id: PropTypes.string,\n 'data-testid': PropTypes.string,\n }).description('props to inject to comment card wrapper'),\n /** form name */\n name: PropTypes.string.description('form name'),\n /** style object */\n style: PropTypes.object.description(' style object '),\n /** date object */\n date: PropTypes.instanceOf(Date).description('date object'),\n /** comment type string */\n type: PropTypes.string.description('comment type string'),\n /** comment content */\n content: PropTypes.string.description('comment content'),\n /** dropdown menu options */\n options: PropTypes.arrayOf(PropTypes.object).description('dropdown menu options'),\n /** dropdown selection */\n selection: PropTypes.object.description('dropdown selection'),\n /** pass down props to dropdown */\n customDropdownMenuProps: PropTypes.shape({\n focusOnOpen: PropTypes.bool,\n }).description('pass down props to dropdown'),\n /** toggle border bottom for card */\n borderBottom: PropTypes.bool.description('toggle border bottom for card'),\n /** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */\n dateFormat: PropTypes.oneOf(['MM/DD/YYYY', 'MM DD YYYY']).description(\n 'moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */\n timeFormat: PropTypes.oneOf(['hh:mm a', 'HH:mm']).description(\n 'moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /**\n * Max lines\n */\n maxLines: PropTypes.number.description('Max lines'),\n};\n\nCommentCard.propTypes = props;\nCommentCard.displayName = 'CommentCard';\nconst DSCommentCardWithSchema = describe(CommentCard);\nDSCommentCardWithSchema.propTypes = props;\n\nexport default CommentCard;\nexport { DSCommentCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,mBAA2C;AAC3C,0BAAoC;AACpC,uBAAqB;AACrB,0BAA2B;AAC3B,6BAA2B;AAC3B,sBAAgC;AAChC,oBAQO;AACP,oBAAwC;AAExC,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB,OAAO;AAAA,EACP,OAAO,IAAI,KAAK;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ,CAAC;AAAA,EACT,UAAU,CAAC;AAAA,EACX,YAAY,EAAE,sCAAsC,CAAC,iBAAiB,EAAE;AAAA,EACxE,0BAA0B;AAAA,IACxB,aAAa;AAAA,EACf;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AACb,MAAM;AACJ,QAAM,UAAM,qBAAO;AACnB,QAAM,cAAc,WAAO,8BAAe,MAAM,UAAU,IAAI;AAC9D,QAAM,cAAc,WAAO,uBAAQ,MAAM,UAAU,IAAI;AAEvD,QAAM,sBAAkB,0BAAY,MAAM;AACxC,QAAI,QAAQ,MAAM;AAAA,EACpB,GAAG,CAAC,CAAC;AAEL,SACE,6CAAC;AAAA,IACC,YAAY,EAAE,aAAa;AAAA,IAC3B,UAAU;AAAA,IACT,GAAG;AAAA,IACJ,OAAO,EAAE,GAAG,OAAO,GAAI,eAAe,SAAS,CAAC,EAAG;AAAA,IAEnD;AAAA,mDAAC;AAAA,QAAkB,YAAY,EAAE,aAAa;AAAA,Q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AAA,YACL,UAAS;AAAA,WACX;AAAA,SACF;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,8BAAU,MAAM;AAAA,IAC9B,IAAI,8BAAU;AAAA,IACd,eAAe,8BAAU;AAAA,EAC3B,CAAC,EAAE,YAAY,yCAAyC;AAAA,EAExD,MAAM,8BAAU,OAAO,YAAY,WAAW;AAAA,EAE9C,OAAO,8BAAU,OAAO,YAAY,gBAAgB;AAAA,EAEpD,MAAM,8BAAU,WAAW,IAAI,EAAE,YAAY,aAAa;AAAA,EAE1D,MAAM,8BAAU,OAAO,YAAY,qBAAqB;AAAA,EAExD,SAAS,8BAAU,OAAO,YAAY,iBAAiB;AAAA,EAEvD,SAAS,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,uBAAuB;AAAA,EAEhF,WAAW,8BAAU,OAAO,YAAY,oBAAoB;AAAA,EAE5D,yBAAyB,8BAAU,MAAM;AAAA,IACvC,aAAa,8BAAU;AAAA,EACzB,CAAC,EAAE,YAAY,6BAA6B;AAAA,EAE5C,cAAc,8BAAU,KAAK,YAAY,+BAA+B;AAAA,EAExE,YAAY,8BAAU,MAAM,CAAC,cAAc,YAAY,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AAAA,EAEA,YAAY,8BAAU,MAAM,CAAC,WAAW,OAAO,CAAC,EAAE;AAAA,IAChD;AAAA,EACF;AAAA,EAIA,UAAU,8BAAU,OAAO,YAAY,WAAW;AACpD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA0B,8BAAS,WAAW;AACpD,wBAAwB,YAAY;AAEpC,IAAO,sBAAQ;",
6
6
  "names": ["DSDropdownMenu", "DSButton"]
7
7
  }
@@ -46,95 +46,31 @@ module.exports = __toCommonJS(blocks_exports);
46
46
  var React = __toESM(require("react"));
47
47
  var import_ds_classnames = require("@elliemae/ds-classnames");
48
48
  const blockName = "comments";
49
- const WrapperArea = (0, import_ds_classnames.aggregatedClasses)("div")(
50
- blockName,
51
- "area",
52
- () => ({})
53
- );
54
- const WrapperComments = (0, import_ds_classnames.aggregatedClasses)("div")(
55
- blockName,
56
- "comments",
57
- ({ hasScroll }) => ({
58
- hasScroll,
59
- "not-scroll": !hasScroll
60
- })
61
- );
62
- const WrapperCommentsScroll = (0, import_ds_classnames.aggregatedClasses)("div")(
63
- blockName,
64
- "comments-scroll",
65
- ({ hasScroll }) => ({
66
- hasScroll,
67
- "not-scroll": !hasScroll
68
- })
69
- );
70
- const Counter = (0, import_ds_classnames.aggregatedClasses)("div")(
71
- blockName,
72
- "counter",
73
- () => ({})
74
- );
75
- const SubmitWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(
76
- blockName,
77
- "submit-wrapper",
78
- () => ({})
79
- );
80
- const SubmitExternal = (0, import_ds_classnames.aggregatedClasses)("div")(
81
- blockName,
82
- "submit-external",
83
- () => ({})
84
- );
85
- const SubmitButton = (0, import_ds_classnames.aggregatedClasses)("div")(
86
- blockName,
87
- "submit-btn",
88
- () => ({})
89
- );
90
- const CommentCardWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(
91
- blockName,
92
- "comment-card-wrapper",
93
- ({ borderBottom }) => ({ borderBottom })
94
- );
95
- const CommentCardHeader = (0, import_ds_classnames.aggregatedClasses)("div")(
96
- blockName,
97
- "comment-card-header",
98
- ({ borderBottom }) => ({ borderBottom })
99
- );
100
- const CommentCardContent = (0, import_ds_classnames.aggregatedClasses)("div")(
101
- blockName,
102
- "comment-card-content",
103
- () => ({})
104
- );
105
- const CommentCardLeft = (0, import_ds_classnames.aggregatedClasses)("div")(
106
- blockName,
107
- "comment-card-left",
108
- () => ({})
109
- );
110
- const CommentCardName = (0, import_ds_classnames.aggregatedClasses)("div")(
111
- blockName,
112
- "comment-card-name",
113
- () => ({})
114
- );
115
- const CommentCardData = (0, import_ds_classnames.aggregatedClasses)("div")(
116
- blockName,
117
- "comment-card-data",
118
- () => ({})
119
- );
120
- const CommentCardMenu = (0, import_ds_classnames.aggregatedClasses)("div")(
121
- blockName,
122
- "comment-card-menu",
123
- () => ({})
124
- );
125
- const CommentEmptyWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(
126
- blockName,
127
- "comment-empty",
128
- () => ({})
129
- );
130
- const CommentEmptyIcon = (0, import_ds_classnames.aggregatedClasses)("div")(
131
- blockName,
132
- "comment-empty-icon",
133
- () => ({})
134
- );
135
- const CommentEmptyLabel = (0, import_ds_classnames.aggregatedClasses)("div")(
136
- blockName,
137
- "comment-empty-label",
138
- () => ({})
139
- );
49
+ const WrapperArea = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "area", () => ({}));
50
+ const WrapperComments = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comments", ({ hasScroll }) => ({
51
+ hasScroll,
52
+ "not-scroll": !hasScroll
53
+ }));
54
+ const WrapperCommentsScroll = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comments-scroll", ({ hasScroll }) => ({
55
+ hasScroll,
56
+ "not-scroll": !hasScroll
57
+ }));
58
+ const Counter = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "counter", () => ({}));
59
+ const SubmitWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-wrapper", () => ({}));
60
+ const SubmitExternal = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-external", () => ({}));
61
+ const SubmitButton = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-btn", () => ({}));
62
+ const CommentCardWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-wrapper", ({ borderBottom }) => ({
63
+ borderBottom
64
+ }));
65
+ const CommentCardHeader = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-header", ({ borderBottom }) => ({
66
+ borderBottom
67
+ }));
68
+ const CommentCardContent = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-content", () => ({}));
69
+ const CommentCardLeft = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-left", () => ({}));
70
+ const CommentCardName = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-name", () => ({}));
71
+ const CommentCardData = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-data", () => ({}));
72
+ const CommentCardMenu = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-menu", () => ({}));
73
+ const CommentEmptyWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty", () => ({}));
74
+ const CommentEmptyIcon = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty-icon", () => ({}));
75
+ const CommentEmptyLabel = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty-label", () => ({}));
140
76
  //# sourceMappingURL=blocks.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'comments';\n\nexport const WrapperArea = aggregatedClasses('div')(\n blockName,\n 'area',\n () => ({}),\n);\n\nexport const WrapperComments = aggregatedClasses('div')(\n blockName,\n 'comments',\n ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n }),\n);\n\nexport const WrapperCommentsScroll = aggregatedClasses('div')(\n blockName,\n 'comments-scroll',\n ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n }),\n);\n\nexport const Counter = aggregatedClasses('div')(\n blockName,\n 'counter',\n () => ({}),\n);\n\nexport const SubmitWrapper = aggregatedClasses('div')(\n blockName,\n 'submit-wrapper',\n () => ({}),\n);\n\nexport const SubmitExternal = aggregatedClasses('div')(\n blockName,\n 'submit-external',\n () => ({}),\n);\n\nexport const SubmitButton = aggregatedClasses('div')(\n blockName,\n 'submit-btn',\n () => ({}),\n);\n\nexport const CommentCardWrapper = aggregatedClasses('div')(\n blockName,\n 'comment-card-wrapper',\n ({ borderBottom }) => ({ borderBottom }),\n);\n\nexport const CommentCardHeader = aggregatedClasses('div')(\n blockName,\n 'comment-card-header',\n ({ borderBottom }) => ({ borderBottom }),\n);\n\nexport const CommentCardContent = aggregatedClasses('div')(\n blockName,\n 'comment-card-content',\n () => ({}),\n);\n\nexport const CommentCardLeft = aggregatedClasses('div')(\n blockName,\n 'comment-card-left',\n () => ({}),\n);\n\nexport const CommentCardName = aggregatedClasses('div')(\n blockName,\n 'comment-card-name',\n () => ({}),\n);\n\nexport const CommentCardData = aggregatedClasses('div')(\n blockName,\n 'comment-card-data',\n () => ({}),\n);\n\nexport const CommentCardMenu = aggregatedClasses('div')(\n blockName,\n 'comment-card-menu',\n () => ({}),\n);\n\nexport const CommentEmptyWrapper = aggregatedClasses('div')(\n blockName,\n 'comment-empty',\n () => ({}),\n);\n\nexport const CommentEmptyIcon = aggregatedClasses('div')(\n blockName,\n 'comment-empty-icon',\n () => ({}),\n);\n\nexport const CommentEmptyLabel = aggregatedClasses('div')(\n blockName,\n 'comment-empty-label',\n () => ({}),\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,kBAAc,wCAAkB,KAAK;AAAA,EAChD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,sBAAkB,wCAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,OAAO;AAAA,IAClB;AAAA,IACA,cAAc,CAAC;AAAA,EACjB;AACF;AAEO,MAAM,4BAAwB,wCAAkB,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,OA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B,wCAAkB,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;",
4
+ "sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'comments';\n\nexport const WrapperArea = aggregatedClasses('div')(blockName, 'area', () => ({}));\n\nexport const WrapperComments = aggregatedClasses('div')(blockName, 'comments', ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n}));\n\nexport const WrapperCommentsScroll = aggregatedClasses('div')(blockName, 'comments-scroll', ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n}));\n\nexport const Counter = aggregatedClasses('div')(blockName, 'counter', () => ({}));\n\nexport const SubmitWrapper = aggregatedClasses('div')(blockName, 'submit-wrapper', () => ({}));\n\nexport const SubmitExternal = aggregatedClasses('div')(blockName, 'submit-external', () => ({}));\n\nexport const SubmitButton = aggregatedClasses('div')(blockName, 'submit-btn', () => ({}));\n\nexport const CommentCardWrapper = aggregatedClasses('div')(blockName, 'comment-card-wrapper', ({ borderBottom }) => ({\n borderBottom,\n}));\n\nexport const CommentCardHeader = aggregatedClasses('div')(blockName, 'comment-card-header', ({ borderBottom }) => ({\n borderBottom,\n}));\n\nexport const CommentCardContent = aggregatedClasses('div')(blockName, 'comment-card-content', () => ({}));\n\nexport const CommentCardLeft = aggregatedClasses('div')(blockName, 'comment-card-left', () => ({}));\n\nexport const CommentCardName = aggregatedClasses('div')(blockName, 'comment-card-name', () => ({}));\n\nexport const CommentCardData = aggregatedClasses('div')(blockName, 'comment-card-data', () => ({}));\n\nexport const CommentCardMenu = aggregatedClasses('div')(blockName, 'comment-card-menu', () => ({}));\n\nexport const CommentEmptyWrapper = aggregatedClasses('div')(blockName, 'comment-empty', () => ({}));\n\nexport const CommentEmptyIcon = aggregatedClasses('div')(blockName, 'comment-empty-icon', () => ({}));\n\nexport const CommentEmptyLabel = aggregatedClasses('div')(blockName, 'comment-empty-label', () => ({}));\n", "import * as React from 'react';\nexport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AAW,qBAAqB,OAAO,CAAC,EAAE;AAE3F,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,qBAAqB,OAAO,CAAC,EAAE;AAE3F,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,qBAAqB,OAAO,CAAC,EAAE;AAE3F,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,iBAAiB,OAAO,CAAC,EAAE;AAE3F,MAAM,uBAAmB,wCAAkB,KAAK,EAAE,WAAW,sBAAsB,OAAO,CAAC,EAAE;AAE7F,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,WAAW,uBAAuB,OAAO,CAAC,EAAE;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/CommentCard.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useCallback, useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport DSButton from '@elliemae/ds-button';\nimport { DSReadMore } from '@elliemae/ds-read-more';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport {\n CommentCardWrapper,\n CommentCardHeader,\n CommentCardContent,\n CommentCardName,\n CommentCardData,\n CommentCardMenu,\n CommentCardLeft,\n} from './blocks';\nimport { getTime, getDisplayDate } from './helper';\n\nconst CommentCard = ({\n containerProps = {},\n name = '',\n date = new Date(),\n type = '',\n content = '',\n style = {},\n options = [],\n selection = { 'single-selection-internal-external': ['set-as-internal'] },\n customDropdownMenuProps = {\n focusOnOpen: true,\n },\n borderBottom,\n dateFormat = 'MM/DD/YYYY',\n timeFormat = 'hh:mm a',\n maxLines = 2,\n}) => {\n const ref = useRef();\n const displayDate = date ? getDisplayDate(date, dateFormat) : null;\n const displayTime = date ? getTime(date, timeFormat) : null;\n\n const handleCloseMenu = useCallback(() => {\n ref.current.focus();\n }, []);\n\n return (\n <CommentCardWrapper\n classProps={{ borderBottom }}\n tabIndex={0}\n {...containerProps}\n style={{ ...style, ...(containerProps.style || {}) }}\n >\n <CommentCardHeader classProps={{ borderBottom }}>\n <CommentCardLeft>\n <CommentCardName>{name}</CommentCardName>\n <CommentCardData>\n {displayDate}\n {displayTime && (\n <>\n <span>\u2022</span>\n {displayTime}\n </>\n )}\n {type && (\n <>\n <span>\u2022</span>\n {type}\n </>\n )}\n </CommentCardData>\n </CommentCardLeft>\n {options && options.length > 0 && (\n <CommentCardMenu>\n <DSDropdownMenu\n {...customDropdownMenuProps}\n onClose={handleCloseMenu}\n options={options}\n selection={selection}\n triggerComponent={<DSButton buttonType=\"text\" icon={<MoreOptionsVert />} innerRef={ref} />}\n zIndex={11} // https://jira.elliemae.io/browse/PUI-1664\n />\n </CommentCardMenu>\n )}\n </CommentCardHeader>\n <CommentCardContent>\n <div>\n <DSReadMore\n lines={maxLines}\n content={`${content} `}\n more=\"MORE\"\n less=\"LESS\"\n buttonType=\"text\"\n size=\"m\"\n ellipsis=\"... \"\n />\n </div>\n </CommentCardContent>\n </CommentCardWrapper>\n );\n};\n\nconst props = {\n /** props to inject to comment card wrapper */\n containerProps: PropTypes.shape({\n id: PropTypes.string,\n 'data-testid': PropTypes.string,\n }).description('props to inject to comment card wrapper'),\n /** form name */\n name: PropTypes.string.description('form name'),\n /** style object */\n style: PropTypes.object.description(' style object '),\n /** date object */\n date: PropTypes.instanceOf(Date).description('date object'),\n /** comment type string */\n type: PropTypes.string.description('comment type string'),\n /** comment content */\n content: PropTypes.string.description('comment content'),\n /** dropdown menu options */\n options: PropTypes.arrayOf(PropTypes.object).description('dropdown menu options'),\n /** dropdown selection */\n selection: PropTypes.object.description('dropdown selection'),\n /** pass down props to dropdown */\n customDropdownMenuProps: PropTypes.shape({\n focusOnOpen: PropTypes.bool,\n }).description('pass down props to dropdown'),\n /** toggle border bottom for card */\n borderBottom: PropTypes.bool.description('toggle border bottom for card'),\n /** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */\n dateFormat: PropTypes.oneOf(['MM/DD/YYYY', 'MM DD YYYY']).description(\n 'moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */\n timeFormat: PropTypes.oneOf(['hh:mm a', 'HH:mm']).description(\n 'moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /**\n * Max lines\n */\n maxLines: PropTypes.number.description('Max lines'),\n};\n\nCommentCard.propTypes = props;\nCommentCard.displayName = 'CommentCard';\nconst DSCommentCardWithSchema = describe(CommentCard);\nDSCommentCardWithSchema.propTypes = props;\n\nexport default CommentCard;\nexport { DSCommentCardWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,aAAa,cAAc;AAC3C,SAAS,WAAW,gBAAgB;AACpC,OAAO,cAAc;AACrB,SAAS,kBAAkB;AAC3B,OAAO,oBAAoB;AAC3B,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,sBAAsB;AAExC,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB,OAAO;AAAA,EACP,OAAO,IAAI,KAAK;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ,CAAC;AAAA,EACT,UAAU,CAAC;AAAA,EACX,YAAY,EAAE,sCAAsC,CAAC,iBAAiB,EAAE;AAAA,EACxE,0BAA0B;AAAA,IACxB,aAAa;AAAA,EACf;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AACb,MAAM;AACJ,QAAM,MAAM,OAAO;AACnB,QAAM,cAAc,OAAO,eAAe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AAA,IAChD;AAAA,EACF;AAAA,EAIA,UAAU,UAAU,OAAO,YAAY,WAAW;AACpD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,0BAA0B,SAAS,WAAW;AACpD,wBAAwB,YAAY;AAEpC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,97 +1,33 @@
1
1
  import * as React from "react";
2
2
  import { aggregatedClasses } from "@elliemae/ds-classnames";
3
3
  const blockName = "comments";
4
- const WrapperArea = aggregatedClasses("div")(
5
- blockName,
6
- "area",
7
- () => ({})
8
- );
9
- const WrapperComments = aggregatedClasses("div")(
10
- blockName,
11
- "comments",
12
- ({ hasScroll }) => ({
13
- hasScroll,
14
- "not-scroll": !hasScroll
15
- })
16
- );
17
- const WrapperCommentsScroll = aggregatedClasses("div")(
18
- blockName,
19
- "comments-scroll",
20
- ({ hasScroll }) => ({
21
- hasScroll,
22
- "not-scroll": !hasScroll
23
- })
24
- );
25
- const Counter = aggregatedClasses("div")(
26
- blockName,
27
- "counter",
28
- () => ({})
29
- );
30
- const SubmitWrapper = aggregatedClasses("div")(
31
- blockName,
32
- "submit-wrapper",
33
- () => ({})
34
- );
35
- const SubmitExternal = aggregatedClasses("div")(
36
- blockName,
37
- "submit-external",
38
- () => ({})
39
- );
40
- const SubmitButton = aggregatedClasses("div")(
41
- blockName,
42
- "submit-btn",
43
- () => ({})
44
- );
45
- const CommentCardWrapper = aggregatedClasses("div")(
46
- blockName,
47
- "comment-card-wrapper",
48
- ({ borderBottom }) => ({ borderBottom })
49
- );
50
- const CommentCardHeader = aggregatedClasses("div")(
51
- blockName,
52
- "comment-card-header",
53
- ({ borderBottom }) => ({ borderBottom })
54
- );
55
- const CommentCardContent = aggregatedClasses("div")(
56
- blockName,
57
- "comment-card-content",
58
- () => ({})
59
- );
60
- const CommentCardLeft = aggregatedClasses("div")(
61
- blockName,
62
- "comment-card-left",
63
- () => ({})
64
- );
65
- const CommentCardName = aggregatedClasses("div")(
66
- blockName,
67
- "comment-card-name",
68
- () => ({})
69
- );
70
- const CommentCardData = aggregatedClasses("div")(
71
- blockName,
72
- "comment-card-data",
73
- () => ({})
74
- );
75
- const CommentCardMenu = aggregatedClasses("div")(
76
- blockName,
77
- "comment-card-menu",
78
- () => ({})
79
- );
80
- const CommentEmptyWrapper = aggregatedClasses("div")(
81
- blockName,
82
- "comment-empty",
83
- () => ({})
84
- );
85
- const CommentEmptyIcon = aggregatedClasses("div")(
86
- blockName,
87
- "comment-empty-icon",
88
- () => ({})
89
- );
90
- const CommentEmptyLabel = aggregatedClasses("div")(
91
- blockName,
92
- "comment-empty-label",
93
- () => ({})
94
- );
4
+ const WrapperArea = aggregatedClasses("div")(blockName, "area", () => ({}));
5
+ const WrapperComments = aggregatedClasses("div")(blockName, "comments", ({ hasScroll }) => ({
6
+ hasScroll,
7
+ "not-scroll": !hasScroll
8
+ }));
9
+ const WrapperCommentsScroll = aggregatedClasses("div")(blockName, "comments-scroll", ({ hasScroll }) => ({
10
+ hasScroll,
11
+ "not-scroll": !hasScroll
12
+ }));
13
+ const Counter = aggregatedClasses("div")(blockName, "counter", () => ({}));
14
+ const SubmitWrapper = aggregatedClasses("div")(blockName, "submit-wrapper", () => ({}));
15
+ const SubmitExternal = aggregatedClasses("div")(blockName, "submit-external", () => ({}));
16
+ const SubmitButton = aggregatedClasses("div")(blockName, "submit-btn", () => ({}));
17
+ const CommentCardWrapper = aggregatedClasses("div")(blockName, "comment-card-wrapper", ({ borderBottom }) => ({
18
+ borderBottom
19
+ }));
20
+ const CommentCardHeader = aggregatedClasses("div")(blockName, "comment-card-header", ({ borderBottom }) => ({
21
+ borderBottom
22
+ }));
23
+ const CommentCardContent = aggregatedClasses("div")(blockName, "comment-card-content", () => ({}));
24
+ const CommentCardLeft = aggregatedClasses("div")(blockName, "comment-card-left", () => ({}));
25
+ const CommentCardName = aggregatedClasses("div")(blockName, "comment-card-name", () => ({}));
26
+ const CommentCardData = aggregatedClasses("div")(blockName, "comment-card-data", () => ({}));
27
+ const CommentCardMenu = aggregatedClasses("div")(blockName, "comment-card-menu", () => ({}));
28
+ const CommentEmptyWrapper = aggregatedClasses("div")(blockName, "comment-empty", () => ({}));
29
+ const CommentEmptyIcon = aggregatedClasses("div")(blockName, "comment-empty-icon", () => ({}));
30
+ const CommentEmptyLabel = aggregatedClasses("div")(blockName, "comment-empty-label", () => ({}));
95
31
  export {
96
32
  CommentCardContent,
97
33
  CommentCardData,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'comments';\n\nexport const WrapperArea = aggregatedClasses('div')(\n blockName,\n 'area',\n () => ({}),\n);\n\nexport const WrapperComments = aggregatedClasses('div')(\n blockName,\n 'comments',\n ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n }),\n);\n\nexport const WrapperCommentsScroll = aggregatedClasses('div')(\n blockName,\n 'comments-scroll',\n ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n }),\n);\n\nexport const Counter = aggregatedClasses('div')(\n blockName,\n 'counter',\n () => ({}),\n);\n\nexport const SubmitWrapper = aggregatedClasses('div')(\n blockName,\n 'submit-wrapper',\n () => ({}),\n);\n\nexport const SubmitExternal = aggregatedClasses('div')(\n blockName,\n 'submit-external',\n () => ({}),\n);\n\nexport const SubmitButton = aggregatedClasses('div')(\n blockName,\n 'submit-btn',\n () => ({}),\n);\n\nexport const CommentCardWrapper = aggregatedClasses('div')(\n blockName,\n 'comment-card-wrapper',\n ({ borderBottom }) => ({ borderBottom }),\n);\n\nexport const CommentCardHeader = aggregatedClasses('div')(\n blockName,\n 'comment-card-header',\n ({ borderBottom }) => ({ borderBottom }),\n);\n\nexport const CommentCardContent = aggregatedClasses('div')(\n blockName,\n 'comment-card-content',\n () => ({}),\n);\n\nexport const CommentCardLeft = aggregatedClasses('div')(\n blockName,\n 'comment-card-left',\n () => ({}),\n);\n\nexport const CommentCardName = aggregatedClasses('div')(\n blockName,\n 'comment-card-name',\n () => ({}),\n);\n\nexport const CommentCardData = aggregatedClasses('div')(\n blockName,\n 'comment-card-data',\n () => ({}),\n);\n\nexport const CommentCardMenu = aggregatedClasses('div')(\n blockName,\n 'comment-card-menu',\n () => ({}),\n);\n\nexport const CommentEmptyWrapper = aggregatedClasses('div')(\n blockName,\n 'comment-empty',\n () => ({}),\n);\n\nexport const CommentEmptyIcon = aggregatedClasses('div')(\n blockName,\n 'comment-empty-icon',\n () => ({}),\n);\n\nexport const CommentEmptyLabel = aggregatedClasses('div')(\n blockName,\n 'comment-empty-label',\n () => ({}),\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,KAAK;AAAA,EAChD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,kBAAkB,kBAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,OAAO;AAAA,IAClB;AAAA,IACA,cAAc,CAAC;AAAA,EACjB;AACF;AAEO,MAAM,wBAAwB,kBAAkB,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,CAAC,EAAE,UAAU,OAAO;AAAA,IAClB;AAAA,IACA,cAAc,CAAC;AAAA,EACjB;AACF;AAEO,MAAM,UAAU,kBAAkB,KAAK;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,gBAAgB,kBAAkB,KAAK;AAAA,EAClD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,iBAAiB,kBAAkB,KAAK;AAAA,EACnD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,eAAe,kBAAkB,KAAK;AAAA,EACjD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,qBAAqB,kBAAkB,KAAK;AAAA,EACvD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,aAAa,OAAO,EAAE,aAAa;AACxC;AAEO,MAAM,oBAAoB,kBAAkB,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,aAAa,OAAO,EAAE,aAAa;AACxC;AAEO,MAAM,qBAAqB,kBAAkB,KAAK;AAAA,EACvD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,kBAAkB,kBAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,kBAAkB,kBAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,kBAAkB,kBAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,kBAAkB,kBAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,sBAAsB,kBAAkB,KAAK;AAAA,EACxD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,mBAAmB,kBAAkB,KAAK;AAAA,EACrD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,oBAAoB,kBAAkB,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA,OAAO,CAAC;AACV;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'comments';\n\nexport const WrapperArea = aggregatedClasses('div')(blockName, 'area', () => ({}));\n\nexport const WrapperComments = aggregatedClasses('div')(blockName, 'comments', ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n}));\n\nexport const WrapperCommentsScroll = aggregatedClasses('div')(blockName, 'comments-scroll', ({ hasScroll }) => ({\n hasScroll,\n 'not-scroll': !hasScroll,\n}));\n\nexport const Counter = aggregatedClasses('div')(blockName, 'counter', () => ({}));\n\nexport const SubmitWrapper = aggregatedClasses('div')(blockName, 'submit-wrapper', () => ({}));\n\nexport const SubmitExternal = aggregatedClasses('div')(blockName, 'submit-external', () => ({}));\n\nexport const SubmitButton = aggregatedClasses('div')(blockName, 'submit-btn', () => ({}));\n\nexport const CommentCardWrapper = aggregatedClasses('div')(blockName, 'comment-card-wrapper', ({ borderBottom }) => ({\n borderBottom,\n}));\n\nexport const CommentCardHeader = aggregatedClasses('div')(blockName, 'comment-card-header', ({ borderBottom }) => ({\n borderBottom,\n}));\n\nexport const CommentCardContent = aggregatedClasses('div')(blockName, 'comment-card-content', () => ({}));\n\nexport const CommentCardLeft = aggregatedClasses('div')(blockName, 'comment-card-left', () => ({}));\n\nexport const CommentCardName = aggregatedClasses('div')(blockName, 'comment-card-name', () => ({}));\n\nexport const CommentCardData = aggregatedClasses('div')(blockName, 'comment-card-data', () => ({}));\n\nexport const CommentCardMenu = aggregatedClasses('div')(blockName, 'comment-card-menu', () => ({}));\n\nexport const CommentEmptyWrapper = aggregatedClasses('div')(blockName, 'comment-empty', () => ({}));\n\nexport const CommentEmptyIcon = aggregatedClasses('div')(blockName, 'comment-empty-icon', () => ({}));\n\nexport const CommentEmptyLabel = aggregatedClasses('div')(blockName, 'comment-empty-label', () => ({}));\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,KAAK,EAAE,WAAW,QAAQ,OAAO,CAAC,EAAE;AAE1E,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,WAAW,YAAY,CAAC,EAAE,UAAU,OAAO;AAAA,EACjG;AAAA,EACA,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,wBAAwB,kBAAkB,KAAK,EAAE,WAAW,mBAAmB,CAAC,EAAE,UAAU,OA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- "version": "3.11.1-rc.1",
3
+ "version": "3.12.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Comments",
6
6
  "files": [
@@ -51,12 +51,12 @@
51
51
  "indent": 4
52
52
  },
53
53
  "dependencies": {
54
- "@elliemae/ds-button": "3.11.1-rc.1",
55
- "@elliemae/ds-classnames": "3.11.1-rc.1",
56
- "@elliemae/ds-dropdownmenu": "3.11.1-rc.1",
57
- "@elliemae/ds-icons": "3.11.1-rc.1",
58
- "@elliemae/ds-read-more": "3.11.1-rc.1",
59
- "@elliemae/ds-utilities": "3.11.1-rc.1",
54
+ "@elliemae/ds-button": "3.12.0-next.1",
55
+ "@elliemae/ds-classnames": "3.12.0-next.1",
56
+ "@elliemae/ds-dropdownmenu": "3.12.0-next.1",
57
+ "@elliemae/ds-icons": "3.12.0-next.1",
58
+ "@elliemae/ds-read-more": "3.12.0-next.1",
59
+ "@elliemae/ds-utilities": "3.12.0-next.1",
60
60
  "moment": "~2.29.3"
61
61
  },
62
62
  "devDependencies": {
@@ -76,8 +76,11 @@
76
76
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
77
77
  "test": "node ../../scripts/testing/test.mjs",
78
78
  "lint": "node ../../scripts/lint.mjs",
79
+ "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
79
80
  "dts": "node ../../scripts/dts.mjs",
80
81
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
82
+ "dev:build": "pnpm --filter {.}... build && pnpm --filter {.}... dts",
83
+ "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
81
84
  "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
82
85
  }
83
86
  }