@elliemae/ds-comments 3.16.0-next.2 → 3.16.0-next.21
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/CommentCard.js +40 -21
- package/dist/cjs/components/CommentCard.js.map +2 -2
- package/dist/cjs/components/DSComments.js +5 -1
- package/dist/cjs/components/DSComments.js.map +2 -2
- package/dist/cjs/components/blocks.js +4 -0
- package/dist/cjs/components/blocks.js.map +1 -1
- package/dist/cjs/components/helper.js +4 -0
- package/dist/cjs/components/helper.js.map +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/esm/components/CommentCard.js +19 -4
- package/dist/esm/components/CommentCard.js.map +2 -2
- package/dist/esm/components/DSComments.js +1 -1
- package/dist/esm/components/DSComments.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/types/components/CommentCard.d.ts +15 -14
- package/dist/types/components/DSComments.d.ts +15 -14
- package/dist/types/index.d.ts +15 -14
- package/package.json +11 -10
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,17 +35,17 @@ module.exports = __toCommonJS(CommentCard_exports);
|
|
|
31
35
|
var React = __toESM(require("react"));
|
|
32
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
37
|
var import_react = require("react");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
36
40
|
var import_ds_read_more = require("@elliemae/ds-read-more");
|
|
37
41
|
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
38
42
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
|
-
var import_blocks = require("./blocks");
|
|
40
|
-
var import_helper = require("./helper");
|
|
43
|
+
var import_blocks = require("./blocks.js");
|
|
44
|
+
var import_helper = require("./helper.js");
|
|
41
45
|
const CommentCard = ({
|
|
42
46
|
containerProps = {},
|
|
43
47
|
name = "",
|
|
44
|
-
date = new Date(),
|
|
48
|
+
date = /* @__PURE__ */ new Date(),
|
|
45
49
|
type = "",
|
|
46
50
|
content = "",
|
|
47
51
|
style = {},
|
|
@@ -113,32 +117,47 @@ const CommentCard = ({
|
|
|
113
117
|
);
|
|
114
118
|
};
|
|
115
119
|
const props = {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
/** props to inject to comment card wrapper */
|
|
121
|
+
containerProps: import_ds_props_helpers.PropTypes.shape({
|
|
122
|
+
id: import_ds_props_helpers.PropTypes.string,
|
|
123
|
+
"data-testid": import_ds_props_helpers.PropTypes.string
|
|
119
124
|
}).description("props to inject to comment card wrapper"),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
/** form name */
|
|
126
|
+
name: import_ds_props_helpers.PropTypes.string.description("form name"),
|
|
127
|
+
/** style object */
|
|
128
|
+
style: import_ds_props_helpers.PropTypes.object.description(" style object "),
|
|
129
|
+
/** date object */
|
|
130
|
+
date: import_ds_props_helpers.PropTypes.instanceOf(Date).description("date object"),
|
|
131
|
+
/** comment type string */
|
|
132
|
+
type: import_ds_props_helpers.PropTypes.string.description("comment type string"),
|
|
133
|
+
/** comment content */
|
|
134
|
+
content: import_ds_props_helpers.PropTypes.string.description("comment content"),
|
|
135
|
+
/** dropdown menu options */
|
|
136
|
+
options: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("dropdown menu options"),
|
|
137
|
+
/** dropdown selection */
|
|
138
|
+
selection: import_ds_props_helpers.PropTypes.object.description("dropdown selection"),
|
|
139
|
+
/** pass down props to dropdown */
|
|
140
|
+
customDropdownMenuProps: import_ds_props_helpers.PropTypes.shape({
|
|
141
|
+
focusOnOpen: import_ds_props_helpers.PropTypes.bool
|
|
129
142
|
}).description("pass down props to dropdown"),
|
|
130
|
-
|
|
131
|
-
|
|
143
|
+
/** toggle border bottom for card */
|
|
144
|
+
borderBottom: import_ds_props_helpers.PropTypes.bool.description("toggle border bottom for card"),
|
|
145
|
+
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
146
|
+
dateFormat: import_ds_props_helpers.PropTypes.oneOf(["MM/DD/YYYY", "MM DD YYYY"]).description(
|
|
132
147
|
"moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
133
148
|
),
|
|
134
|
-
|
|
149
|
+
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
150
|
+
timeFormat: import_ds_props_helpers.PropTypes.oneOf(["hh:mm a", "HH:mm"]).description(
|
|
135
151
|
"moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
136
152
|
),
|
|
137
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Max lines
|
|
155
|
+
*/
|
|
156
|
+
maxLines: import_ds_props_helpers.PropTypes.number.description("Max lines")
|
|
138
157
|
};
|
|
139
158
|
CommentCard.propTypes = props;
|
|
140
159
|
CommentCard.displayName = "CommentCard";
|
|
141
|
-
const DSCommentCardWithSchema = (0,
|
|
160
|
+
const DSCommentCardWithSchema = (0, import_ds_props_helpers.describe)(CommentCard);
|
|
142
161
|
DSCommentCardWithSchema.propTypes = props;
|
|
143
162
|
var CommentCard_default = CommentCard;
|
|
144
163
|
//# sourceMappingURL=CommentCard.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/CommentCard.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useCallback, useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useCallback, useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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.js';\nimport { getTime, getDisplayDate } from './helper.js';\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;ADqDb;AAnDV,mBAA2C;AAC3C,8BAAoC;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,oBAAI,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,M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AAA;AAAA,EAE9C,OAAO,kCAAU,OAAO,YAAY,gBAAgB;AAAA;AAAA,EAEpD,MAAM,kCAAU,WAAW,IAAI,EAAE,YAAY,aAAa;AAAA;AAAA,EAE1D,MAAM,kCAAU,OAAO,YAAY,qBAAqB;AAAA;AAAA,EAExD,SAAS,kCAAU,OAAO,YAAY,iBAAiB;AAAA;AAAA,EAEvD,SAAS,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,uBAAuB;AAAA;AAAA,EAEhF,WAAW,kCAAU,OAAO,YAAY,oBAAoB;AAAA;AAAA,EAE5D,yBAAyB,kCAAU,MAAM;AAAA,IACvC,aAAa,kCAAU;AAAA,EACzB,CAAC,EAAE,YAAY,6BAA6B;AAAA;AAAA,EAE5C,cAAc,kCAAU,KAAK,YAAY,+BAA+B;AAAA;AAAA,EAExE,YAAY,kCAAU,MAAM,CAAC,cAAc,YAAY,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AAAA;AAAA,EAEA,YAAY,kCAAU,MAAM,CAAC,WAAW,OAAO,CAAC,EAAE;AAAA,IAChD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,UAAU,kCAAU,OAAO,YAAY,WAAW;AACpD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA0B,kCAAS,WAAW;AACpD,wBAAwB,YAAY;AAEpC,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["DSDropdownMenu", "DSButton"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -29,7 +33,7 @@ __export(DSComments_exports, {
|
|
|
29
33
|
});
|
|
30
34
|
module.exports = __toCommonJS(DSComments_exports);
|
|
31
35
|
var React = __toESM(require("react"));
|
|
32
|
-
var import_CommentCard = __toESM(require("./CommentCard"));
|
|
36
|
+
var import_CommentCard = __toESM(require("./CommentCard.js"));
|
|
33
37
|
var DSComments_default = {
|
|
34
38
|
DSCommentCard: import_CommentCard.default
|
|
35
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/DSComments.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import DSCommentCard, { DSCommentCardWithSchema } from './CommentCard';\n\nexport default {\n DSCommentCard,\n};\nexport { DSCommentCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import DSCommentCard, { DSCommentCardWithSchema } from './CommentCard.js';\n\nexport default {\n DSCommentCard,\n};\nexport { DSCommentCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAuD;AAEvD,IAAO,qBAAQ;AAAA,EACb,kCAAAA;AACF;",
|
|
6
6
|
"names": ["DSCommentCard"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 { React };\n"],
|
|
5
|
-
"mappings": "
|
|
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,EAAE,WAAW,QAAQ,OAAO,CAAC,EAAE;AAE1E,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,YAAY,CAAC,EAAE,UAAU,OAAO;AAAA,EACjG;AAAA,EACA,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,4BAAwB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB,CAAC,EAAE,UAAU,OAAO;AAAA,EAC9G;AAAA,EACA,cAAc,CAAC;AACjB,EAAE;AAEK,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,WAAW,OAAO,CAAC,EAAE;AAEzE,MAAM,oBAAgB,wCAAkB,KAAK,EAAE,WAAW,kBAAkB,OAAO,CAAC,EAAE;AAEtF,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB,OAAO,CAAC,EAAE;AAExF,MAAM,mBAAe,wCAAkB,KAAK,EAAE,WAAW,cAAc,OAAO,CAAC,EAAE;AAEjF,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,WAAW,wBAAwB,CAAC,EAAE,aAAa,OAAO;AAAA,EACnH;AACF,EAAE;AAEK,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,WAAW,uBAAuB,CAAC,EAAE,aAAa,OAAO;AAAA,EACjH;AACF,EAAE;AAEK,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,WAAW,wBAAwB,OAAO,CAAC,EAAE;AAEjG,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,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,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
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/helper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import moment from 'moment';\n\nexport function getMaxSize() {\n return 113;\n}\nexport function getTime(date, formatString = 'hh:mm a') {\n return moment(date).format(formatString);\n}\nexport function getDisplayDate(date, formatString = 'MM/DD/YYYY') {\n return moment(date).format(formatString);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAmB;AAEZ,SAAS,aAAa;AAC3B,SAAO;AACT;AACO,SAAS,QAAQ,MAAM,eAAe,WAAW;AACtD,aAAO,cAAAA,SAAO,IAAI,EAAE,OAAO,YAAY;AACzC;AACO,SAAS,eAAe,MAAM,eAAe,cAAc;AAChE,aAAO,cAAAA,SAAO,IAAI,EAAE,OAAO,YAAY;AACzC;",
|
|
6
6
|
"names": ["moment"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -30,7 +34,7 @@ __export(src_exports, {
|
|
|
30
34
|
});
|
|
31
35
|
module.exports = __toCommonJS(src_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
|
-
var import_DSComments = __toESM(require("./components/DSComments"));
|
|
37
|
+
var import_DSComments = __toESM(require("./components/DSComments.js"));
|
|
34
38
|
const { DSCommentCard } = import_DSComments.default;
|
|
35
39
|
var src_default = DSCommentCard;
|
|
36
40
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import DSComments, { DSCommentCardWithSchema } from './components/DSComments';\n\nexport const { DSCommentCard } = DSComments;\nexport default DSCommentCard;\nexport { DSCommentCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import DSComments, { DSCommentCardWithSchema } from './components/DSComments.js';\n\nexport const { DSCommentCard } = DSComments;\nexport default DSCommentCard;\nexport { DSCommentCardWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAoD;AAE7C,MAAM,EAAE,cAAc,IAAI,kBAAAA;AACjC,IAAO,cAAQ;",
|
|
6
6
|
"names": ["DSComments"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useRef } from "react";
|
|
4
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import DSButton from "@elliemae/ds-button";
|
|
6
6
|
import { DSReadMore } from "@elliemae/ds-read-more";
|
|
7
7
|
import DSDropdownMenu from "@elliemae/ds-dropdownmenu";
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
CommentCardData,
|
|
15
15
|
CommentCardMenu,
|
|
16
16
|
CommentCardLeft
|
|
17
|
-
} from "./blocks";
|
|
18
|
-
import { getTime, getDisplayDate } from "./helper";
|
|
17
|
+
} from "./blocks.js";
|
|
18
|
+
import { getTime, getDisplayDate } from "./helper.js";
|
|
19
19
|
const CommentCard = ({
|
|
20
20
|
containerProps = {},
|
|
21
21
|
name = "",
|
|
22
|
-
date = new Date(),
|
|
22
|
+
date = /* @__PURE__ */ new Date(),
|
|
23
23
|
type = "",
|
|
24
24
|
content = "",
|
|
25
25
|
style = {},
|
|
@@ -91,27 +91,42 @@ const CommentCard = ({
|
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
93
|
const props = {
|
|
94
|
+
/** props to inject to comment card wrapper */
|
|
94
95
|
containerProps: PropTypes.shape({
|
|
95
96
|
id: PropTypes.string,
|
|
96
97
|
"data-testid": PropTypes.string
|
|
97
98
|
}).description("props to inject to comment card wrapper"),
|
|
99
|
+
/** form name */
|
|
98
100
|
name: PropTypes.string.description("form name"),
|
|
101
|
+
/** style object */
|
|
99
102
|
style: PropTypes.object.description(" style object "),
|
|
103
|
+
/** date object */
|
|
100
104
|
date: PropTypes.instanceOf(Date).description("date object"),
|
|
105
|
+
/** comment type string */
|
|
101
106
|
type: PropTypes.string.description("comment type string"),
|
|
107
|
+
/** comment content */
|
|
102
108
|
content: PropTypes.string.description("comment content"),
|
|
109
|
+
/** dropdown menu options */
|
|
103
110
|
options: PropTypes.arrayOf(PropTypes.object).description("dropdown menu options"),
|
|
111
|
+
/** dropdown selection */
|
|
104
112
|
selection: PropTypes.object.description("dropdown selection"),
|
|
113
|
+
/** pass down props to dropdown */
|
|
105
114
|
customDropdownMenuProps: PropTypes.shape({
|
|
106
115
|
focusOnOpen: PropTypes.bool
|
|
107
116
|
}).description("pass down props to dropdown"),
|
|
117
|
+
/** toggle border bottom for card */
|
|
108
118
|
borderBottom: PropTypes.bool.description("toggle border bottom for card"),
|
|
119
|
+
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
109
120
|
dateFormat: PropTypes.oneOf(["MM/DD/YYYY", "MM DD YYYY"]).description(
|
|
110
121
|
"moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
111
122
|
),
|
|
123
|
+
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
112
124
|
timeFormat: PropTypes.oneOf(["hh:mm a", "HH:mm"]).description(
|
|
113
125
|
"moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
114
126
|
),
|
|
127
|
+
/**
|
|
128
|
+
* Max lines
|
|
129
|
+
*/
|
|
115
130
|
maxLines: PropTypes.number.description("Max lines")
|
|
116
131
|
};
|
|
117
132
|
CommentCard.propTypes = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/CommentCard.tsx"],
|
|
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-
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACqDb,SAII,UAJJ,KAII,YAJJ;AAnDV,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,
|
|
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-props-helpers';\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.js';\nimport { getTime, getDisplayDate } from './helper.js';\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 { DSC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UAAU;AAAA,EACzB,CAAC,EAAE,YAAY,6BAA6B;AAAA;AAAA,EAE5C,cAAc,UAAU,KAAK,YAAY,+BAA+B;AAAA;AAAA,EAExE,YAAY,UAAU,MAAM,CAAC,cAAc,YAAY,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AAAA;AAAA,EAEA,YAAY,UAAU,MAAM,CAAC,WAAW,OAAO,CAAC,EAAE;AAAA,IAChD;AAAA,EACF;AAAA;AAAA;AAAA;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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSComments.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSCommentCard, { DSCommentCardWithSchema } from './CommentCard';\n\nexport default {\n DSCommentCard,\n};\nexport { DSCommentCardWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSCommentCard, { DSCommentCardWithSchema } from './CommentCard.js';\n\nexport default {\n DSCommentCard,\n};\nexport { DSCommentCardWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,iBAAiB,+BAA+B;AAEvD,IAAO,qBAAQ;AAAA,EACb;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import DSComments, { DSCommentCardWithSchema } from "./components/DSComments";
|
|
2
|
+
import DSComments, { DSCommentCardWithSchema } from "./components/DSComments.js";
|
|
3
3
|
const { DSCommentCard } = DSComments;
|
|
4
4
|
var src_default = DSCommentCard;
|
|
5
5
|
export {
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSComments, { DSCommentCardWithSchema } from './components/DSComments';\n\nexport const { DSCommentCard } = DSComments;\nexport default DSCommentCard;\nexport { DSCommentCardWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import DSComments, { DSCommentCardWithSchema } from './components/DSComments.js';\n\nexport const { DSCommentCard } = DSComments;\nexport default DSCommentCard;\nexport { DSCommentCardWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAO,cAAc,+BAA+B;AAE7C,MAAM,EAAE,cAAc,IAAI;AACjC,IAAO,cAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const CommentCard: {
|
|
2
3
|
({ containerProps, name, date, type, content, style, options, selection, customDropdownMenuProps, borderBottom, dateFormat, timeFormat, maxLines, }: {
|
|
3
4
|
containerProps?: {} | undefined;
|
|
@@ -20,37 +21,37 @@ declare const CommentCard: {
|
|
|
20
21
|
}): JSX.Element;
|
|
21
22
|
propTypes: {
|
|
22
23
|
/** props to inject to comment card wrapper */
|
|
23
|
-
containerProps: import("@elliemae/ds-
|
|
24
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
25
|
/** form name */
|
|
25
|
-
name: import("@elliemae/ds-
|
|
26
|
+
name: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
27
|
/** style object */
|
|
27
|
-
style: import("@elliemae/ds-
|
|
28
|
+
style: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
29
|
/** date object */
|
|
29
|
-
date: import("@elliemae/ds-
|
|
30
|
+
date: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
31
|
/** comment type string */
|
|
31
|
-
type: import("@elliemae/ds-
|
|
32
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
33
|
/** comment content */
|
|
33
|
-
content: import("@elliemae/ds-
|
|
34
|
+
content: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
34
35
|
/** dropdown menu options */
|
|
35
|
-
options: import("@elliemae/ds-
|
|
36
|
+
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
37
|
/** dropdown selection */
|
|
37
|
-
selection: import("@elliemae/ds-
|
|
38
|
+
selection: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
38
39
|
/** pass down props to dropdown */
|
|
39
|
-
customDropdownMenuProps: import("@elliemae/ds-
|
|
40
|
+
customDropdownMenuProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
40
41
|
/** toggle border bottom for card */
|
|
41
|
-
borderBottom: import("@elliemae/ds-
|
|
42
|
+
borderBottom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
42
43
|
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
43
|
-
dateFormat: import("@elliemae/ds-
|
|
44
|
+
dateFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
44
45
|
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
45
|
-
timeFormat: import("@elliemae/ds-
|
|
46
|
+
timeFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
46
47
|
/**
|
|
47
48
|
* Max lines
|
|
48
49
|
*/
|
|
49
|
-
maxLines: import("@elliemae/ds-
|
|
50
|
+
maxLines: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
50
51
|
};
|
|
51
52
|
displayName: string;
|
|
52
53
|
};
|
|
53
|
-
declare const DSCommentCardWithSchema: import("@elliemae/ds-
|
|
54
|
+
declare const DSCommentCardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
54
55
|
containerProps?: {} | undefined;
|
|
55
56
|
name?: string | undefined;
|
|
56
57
|
date?: Date | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DSCommentCardWithSchema } from './CommentCard.js';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
DSCommentCard: {
|
|
4
5
|
({ containerProps, name, date, type, content, style, options, selection, customDropdownMenuProps, borderBottom, dateFormat, timeFormat, maxLines, }: {
|
|
@@ -21,19 +22,19 @@ declare const _default: {
|
|
|
21
22
|
maxLines?: number | undefined;
|
|
22
23
|
}): JSX.Element;
|
|
23
24
|
propTypes: {
|
|
24
|
-
containerProps: import("@elliemae/ds-
|
|
25
|
-
name: import("@elliemae/ds-
|
|
26
|
-
style: import("@elliemae/ds-
|
|
27
|
-
date: import("@elliemae/ds-
|
|
28
|
-
type: import("@elliemae/ds-
|
|
29
|
-
content: import("@elliemae/ds-
|
|
30
|
-
options: import("@elliemae/ds-
|
|
31
|
-
selection: import("@elliemae/ds-
|
|
32
|
-
customDropdownMenuProps: import("@elliemae/ds-
|
|
33
|
-
borderBottom: import("@elliemae/ds-
|
|
34
|
-
dateFormat: import("@elliemae/ds-
|
|
35
|
-
timeFormat: import("@elliemae/ds-
|
|
36
|
-
maxLines: import("@elliemae/ds-
|
|
25
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
+
name: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
style: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
|
+
date: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
|
+
content: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
selection: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
|
+
customDropdownMenuProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
34
|
+
borderBottom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
35
|
+
dateFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
|
+
timeFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
37
|
+
maxLines: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
37
38
|
};
|
|
38
39
|
displayName: string;
|
|
39
40
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DSCommentCardWithSchema } from './components/DSComments.js';
|
|
2
3
|
export declare const DSCommentCard: {
|
|
3
4
|
({ containerProps, name, date, type, content, style, options, selection, customDropdownMenuProps, borderBottom, dateFormat, timeFormat, maxLines, }: {
|
|
4
5
|
containerProps?: {} | undefined;
|
|
@@ -20,19 +21,19 @@ export declare const DSCommentCard: {
|
|
|
20
21
|
maxLines?: number | undefined;
|
|
21
22
|
}): JSX.Element;
|
|
22
23
|
propTypes: {
|
|
23
|
-
containerProps: import("@elliemae/ds-
|
|
24
|
-
name: import("@elliemae/ds-
|
|
25
|
-
style: import("@elliemae/ds-
|
|
26
|
-
date: import("@elliemae/ds-
|
|
27
|
-
type: import("@elliemae/ds-
|
|
28
|
-
content: import("@elliemae/ds-
|
|
29
|
-
options: import("@elliemae/ds-
|
|
30
|
-
selection: import("@elliemae/ds-
|
|
31
|
-
customDropdownMenuProps: import("@elliemae/ds-
|
|
32
|
-
borderBottom: import("@elliemae/ds-
|
|
33
|
-
dateFormat: import("@elliemae/ds-
|
|
34
|
-
timeFormat: import("@elliemae/ds-
|
|
35
|
-
maxLines: import("@elliemae/ds-
|
|
24
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
25
|
+
name: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
+
style: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
+
date: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
|
+
content: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
|
+
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
+
selection: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
customDropdownMenuProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
|
+
borderBottom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
34
|
+
dateFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
35
|
+
timeFormat: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
|
+
maxLines: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
37
|
};
|
|
37
38
|
displayName: string;
|
|
38
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-comments",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Comments",
|
|
6
6
|
"files": [
|
|
@@ -51,16 +51,17 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"moment": "~2.29.
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-
|
|
57
|
-
"@elliemae/ds-dropdownmenu": "3.16.0-next.
|
|
58
|
-
"@elliemae/ds-icons": "3.16.0-next.
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-
|
|
54
|
+
"moment": "~2.29.4",
|
|
55
|
+
"@elliemae/ds-classnames": "3.16.0-next.21",
|
|
56
|
+
"@elliemae/ds-button": "3.16.0-next.21",
|
|
57
|
+
"@elliemae/ds-dropdownmenu": "3.16.0-next.21",
|
|
58
|
+
"@elliemae/ds-icons": "3.16.0-next.21",
|
|
59
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.21",
|
|
60
|
+
"@elliemae/ds-read-more": "3.16.0-next.21",
|
|
61
|
+
"@elliemae/ds-utilities": "3.16.0-next.21"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"styled-components": "~5.3.
|
|
64
|
+
"styled-components": "~5.3.9"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"lodash": "^4.17.21",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
80
81
|
"dts": "node ../../scripts/dts.mjs",
|
|
81
82
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
82
|
-
"dev:build": "pnpm --filter {.}... build
|
|
83
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
83
84
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
84
85
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
85
86
|
}
|