@elliemae/ds-comments 2.2.1 → 2.3.0-alpha.4
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/cjs/components/CommentCard.js +111 -143
- package/cjs/components/CommentCard.js.map +7 -0
- package/cjs/components/DSComments.js +39 -12
- package/cjs/components/DSComments.js.map +7 -0
- package/cjs/components/blocks.js +73 -70
- package/cjs/components/blocks.js.map +7 -0
- package/cjs/components/helper.js +41 -20
- package/cjs/components/helper.js.map +7 -0
- package/cjs/index.js +39 -14
- package/cjs/index.js.map +7 -0
- package/esm/components/CommentCard.js +81 -122
- package/esm/components/CommentCard.js.map +7 -0
- package/esm/components/DSComments.js +9 -7
- package/esm/components/DSComments.js.map +7 -0
- package/esm/components/blocks.js +46 -52
- package/esm/components/blocks.js.map +7 -0
- package/esm/components/helper.js +10 -8
- package/esm/components/helper.js.map +7 -0
- package/esm/index.js +10 -8
- package/esm/index.js.map +7 -0
- package/package.json +6 -6
|
@@ -1,150 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var CommentCard_exports = {};
|
|
29
|
+
__export(CommentCard_exports, {
|
|
30
|
+
DSCommentCardWithSchema: () => DSCommentCardWithSchema,
|
|
31
|
+
default: () => CommentCard_default
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_react_desc = require("react-desc");
|
|
36
|
+
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
37
|
+
var import_ds_read_more = require("@elliemae/ds-read-more");
|
|
38
|
+
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
39
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
40
|
+
var import_blocks = require("./blocks");
|
|
41
|
+
var import_helper = require("./helper");
|
|
42
|
+
const CommentCard = ({
|
|
43
|
+
containerProps = {},
|
|
44
|
+
name = "",
|
|
45
|
+
date = new Date(),
|
|
46
|
+
type = "",
|
|
47
|
+
content = "",
|
|
48
|
+
style = {},
|
|
49
|
+
options = [],
|
|
50
|
+
selection = { "single-selection-internal-external": ["set-as-internal"] },
|
|
51
|
+
customDropdownMenuProps = {
|
|
52
|
+
focusOnOpen: true
|
|
53
|
+
},
|
|
54
|
+
borderBottom,
|
|
55
|
+
dateFormat = "MM/DD/YYYY",
|
|
56
|
+
timeFormat = "hh:mm a",
|
|
57
|
+
maxLines = 2
|
|
58
|
+
}) => {
|
|
59
|
+
const ref = (0, import_react.useRef)();
|
|
60
|
+
const displayDate = date ? (0, import_helper.getDisplayDate)(date, dateFormat) : null;
|
|
61
|
+
const displayTime = date ? (0, import_helper.getTime)(date, timeFormat) : null;
|
|
62
|
+
const handleCloseMenu = (0, import_react.useCallback)(() => {
|
|
59
63
|
ref.current.focus();
|
|
60
64
|
}, []);
|
|
61
|
-
return
|
|
62
|
-
classProps: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}), type && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
75
|
-
children: [_span2 || (_span2 = /*#__PURE__*/_jsx__default["default"]("span", {}, void 0, "\u2022")), type]
|
|
76
|
-
}))), options && options.length > 0 && /*#__PURE__*/_jsx__default["default"](blocks.CommentCardMenu, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(DSDropdownMenu__default["default"], _objectSpread(_objectSpread({}, customDropdownMenuProps), {}, {
|
|
77
|
-
onClose: handleCloseMenu,
|
|
78
|
-
options: options,
|
|
79
|
-
selection: selection,
|
|
80
|
-
triggerComponent: /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
81
|
-
buttonType: "text",
|
|
82
|
-
icon: _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx__default["default"](dsIcons.MoreOptionsVert, {})),
|
|
83
|
-
innerRef: ref
|
|
84
|
-
}),
|
|
85
|
-
zIndex: "11" // https://jira.elliemae.io/browse/PUI-1664
|
|
86
|
-
|
|
87
|
-
})))), /*#__PURE__*/_jsx__default["default"](blocks.CommentCardContent, {}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](dsReadMore.DSReadMore, {
|
|
88
|
-
lines: maxLines,
|
|
89
|
-
content: "".concat(content, " "),
|
|
90
|
-
more: "MORE",
|
|
91
|
-
less: "LESS",
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardWrapper, {
|
|
66
|
+
classProps: { borderBottom },
|
|
67
|
+
tabIndex: 0,
|
|
68
|
+
...containerProps,
|
|
69
|
+
style: { ...style, ...containerProps.style || {} }
|
|
70
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardHeader, {
|
|
71
|
+
classProps: { borderBottom }
|
|
72
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardLeft, null, /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardName, null, name), /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardData, null, displayDate, displayTime && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("span", null, "\u2022"), displayTime), type && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("span", null, "\u2022"), type))), options && options.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardMenu, null, /* @__PURE__ */ import_react.default.createElement(import_ds_dropdownmenu.default, {
|
|
73
|
+
...customDropdownMenuProps,
|
|
74
|
+
onClose: handleCloseMenu,
|
|
75
|
+
options,
|
|
76
|
+
selection,
|
|
77
|
+
triggerComponent: /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, {
|
|
92
78
|
buttonType: "text",
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
79
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_ds_icons.MoreOptionsVert, null),
|
|
80
|
+
innerRef: ref
|
|
81
|
+
}),
|
|
82
|
+
zIndex: "11"
|
|
83
|
+
}))), /* @__PURE__ */ import_react.default.createElement(import_blocks.CommentCardContent, null, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_ds_read_more.DSReadMore, {
|
|
84
|
+
lines: maxLines,
|
|
85
|
+
content: `${content} `,
|
|
86
|
+
more: "MORE",
|
|
87
|
+
less: "LESS",
|
|
88
|
+
buttonType: "text",
|
|
89
|
+
size: "m",
|
|
90
|
+
ellipsis: "... "
|
|
91
|
+
}))));
|
|
97
92
|
};
|
|
98
|
-
|
|
99
93
|
const props = {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/** comment content */
|
|
119
|
-
content: reactDesc.PropTypes.string.description('comment content'),
|
|
120
|
-
|
|
121
|
-
/** dropdown menu options */
|
|
122
|
-
options: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('dropdown menu options'),
|
|
123
|
-
|
|
124
|
-
/** dropdown selection */
|
|
125
|
-
selection: reactDesc.PropTypes.object.description('dropdown selection'),
|
|
126
|
-
|
|
127
|
-
/** pass down props to dropdown */
|
|
128
|
-
customDropdownMenuProps: reactDesc.PropTypes.shape({
|
|
129
|
-
focusOnOpen: reactDesc.PropTypes.bool
|
|
130
|
-
}).description('pass down props to dropdown'),
|
|
131
|
-
|
|
132
|
-
/** toggle border bottom for card */
|
|
133
|
-
borderBottom: reactDesc.PropTypes.bool.description('toggle border bottom for card'),
|
|
134
|
-
|
|
135
|
-
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
136
|
-
dateFormat: reactDesc.PropTypes.oneOf(['MM/DD/YYYY', 'MM DD YYYY']).description('moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/'),
|
|
137
|
-
|
|
138
|
-
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
139
|
-
timeFormat: reactDesc.PropTypes.oneOf(['hh:mm a', 'HH:mm']).description('moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/'),
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Max lines
|
|
143
|
-
*/
|
|
144
|
-
maxLines: reactDesc.PropTypes.number.description('Max lines')
|
|
94
|
+
containerProps: import_react_desc.PropTypes.shape({
|
|
95
|
+
id: import_react_desc.PropTypes.string,
|
|
96
|
+
"data-testid": import_react_desc.PropTypes.string
|
|
97
|
+
}).description("props to inject to comment card wrapper"),
|
|
98
|
+
name: import_react_desc.PropTypes.string.description("form name"),
|
|
99
|
+
style: import_react_desc.PropTypes.object.description(" style object "),
|
|
100
|
+
date: import_react_desc.PropTypes.instanceOf(Date).description("date object"),
|
|
101
|
+
type: import_react_desc.PropTypes.string.description("comment type string"),
|
|
102
|
+
content: import_react_desc.PropTypes.string.description("comment content"),
|
|
103
|
+
options: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.object).description("dropdown menu options"),
|
|
104
|
+
selection: import_react_desc.PropTypes.object.description("dropdown selection"),
|
|
105
|
+
customDropdownMenuProps: import_react_desc.PropTypes.shape({
|
|
106
|
+
focusOnOpen: import_react_desc.PropTypes.bool
|
|
107
|
+
}).description("pass down props to dropdown"),
|
|
108
|
+
borderBottom: import_react_desc.PropTypes.bool.description("toggle border bottom for card"),
|
|
109
|
+
dateFormat: import_react_desc.PropTypes.oneOf(["MM/DD/YYYY", "MM DD YYYY"]).description("moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/"),
|
|
110
|
+
timeFormat: import_react_desc.PropTypes.oneOf(["hh:mm a", "HH:mm"]).description("moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/"),
|
|
111
|
+
maxLines: import_react_desc.PropTypes.number.description("Max lines")
|
|
145
112
|
};
|
|
146
|
-
|
|
113
|
+
CommentCard.propTypes = props;
|
|
114
|
+
const DSCommentCardWithSchema = (0, import_react_desc.describe)(CommentCard);
|
|
147
115
|
DSCommentCardWithSchema.propTypes = props;
|
|
148
|
-
|
|
149
|
-
exports
|
|
150
|
-
|
|
116
|
+
var CommentCard_default = CommentCard;
|
|
117
|
+
module.exports = __toCommonJS(CommentCard_exports);
|
|
118
|
+
//# sourceMappingURL=CommentCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 'react-desc';\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;\n\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;AAA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nPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var DSComments_exports = {};
|
|
29
|
+
__export(DSComments_exports, {
|
|
30
|
+
DSCommentCardWithSchema: () => import_CommentCard.DSCommentCardWithSchema,
|
|
31
|
+
default: () => DSComments_default
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_CommentCard = __toESM(require("./CommentCard"));
|
|
35
|
+
var DSComments_default = {
|
|
36
|
+
DSCommentCard: import_CommentCard.default
|
|
37
|
+
};
|
|
38
|
+
module.exports = __toCommonJS(DSComments_exports);
|
|
39
|
+
//# sourceMappingURL=DSComments.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAuD;AAEvD,IAAO,qBAAQ;AAAA,EACb;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/components/blocks.js
CHANGED
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
16
26
|
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var blocks_exports = {};
|
|
29
|
+
__export(blocks_exports, {
|
|
30
|
+
CommentCardContent: () => CommentCardContent,
|
|
31
|
+
CommentCardData: () => CommentCardData,
|
|
32
|
+
CommentCardHeader: () => CommentCardHeader,
|
|
33
|
+
CommentCardLeft: () => CommentCardLeft,
|
|
34
|
+
CommentCardMenu: () => CommentCardMenu,
|
|
35
|
+
CommentCardName: () => CommentCardName,
|
|
36
|
+
CommentCardWrapper: () => CommentCardWrapper,
|
|
37
|
+
CommentEmptyIcon: () => CommentEmptyIcon,
|
|
38
|
+
CommentEmptyLabel: () => CommentEmptyLabel,
|
|
39
|
+
CommentEmptyWrapper: () => CommentEmptyWrapper,
|
|
40
|
+
Counter: () => Counter,
|
|
41
|
+
SubmitButton: () => SubmitButton,
|
|
42
|
+
SubmitExternal: () => SubmitExternal,
|
|
43
|
+
SubmitWrapper: () => SubmitWrapper,
|
|
44
|
+
WrapperArea: () => WrapperArea,
|
|
45
|
+
WrapperComments: () => WrapperComments,
|
|
46
|
+
WrapperCommentsScroll: () => WrapperCommentsScroll
|
|
17
47
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
const CommentCardContent = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-content', () => ({}));
|
|
48
|
-
const CommentCardLeft = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-left', () => ({}));
|
|
49
|
-
const CommentCardName = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-name', () => ({}));
|
|
50
|
-
const CommentCardData = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-data', () => ({}));
|
|
51
|
-
const CommentCardMenu = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-menu', () => ({}));
|
|
52
|
-
const CommentEmptyWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'comment-empty', () => ({}));
|
|
53
|
-
const CommentEmptyIcon = dsClassnames.aggregatedClasses('div')(blockName, 'comment-empty-icon', () => ({}));
|
|
54
|
-
const CommentEmptyLabel = dsClassnames.aggregatedClasses('div')(blockName, 'comment-empty-label', () => ({}));
|
|
55
|
-
|
|
56
|
-
exports.CommentCardContent = CommentCardContent;
|
|
57
|
-
exports.CommentCardData = CommentCardData;
|
|
58
|
-
exports.CommentCardHeader = CommentCardHeader;
|
|
59
|
-
exports.CommentCardLeft = CommentCardLeft;
|
|
60
|
-
exports.CommentCardMenu = CommentCardMenu;
|
|
61
|
-
exports.CommentCardName = CommentCardName;
|
|
62
|
-
exports.CommentCardWrapper = CommentCardWrapper;
|
|
63
|
-
exports.CommentEmptyIcon = CommentEmptyIcon;
|
|
64
|
-
exports.CommentEmptyLabel = CommentEmptyLabel;
|
|
65
|
-
exports.CommentEmptyWrapper = CommentEmptyWrapper;
|
|
66
|
-
exports.Counter = Counter;
|
|
67
|
-
exports.SubmitButton = SubmitButton;
|
|
68
|
-
exports.SubmitExternal = SubmitExternal;
|
|
69
|
-
exports.SubmitWrapper = SubmitWrapper;
|
|
70
|
-
exports.WrapperArea = WrapperArea;
|
|
71
|
-
exports.WrapperComments = WrapperComments;
|
|
72
|
-
exports.WrapperCommentsScroll = WrapperCommentsScroll;
|
|
48
|
+
var React = __toESM(require("react"));
|
|
49
|
+
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
50
|
+
const blockName = "comments";
|
|
51
|
+
const WrapperArea = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "area", () => ({}));
|
|
52
|
+
const WrapperComments = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comments", ({ hasScroll }) => ({
|
|
53
|
+
hasScroll,
|
|
54
|
+
"not-scroll": !hasScroll
|
|
55
|
+
}));
|
|
56
|
+
const WrapperCommentsScroll = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comments-scroll", ({ hasScroll }) => ({
|
|
57
|
+
hasScroll,
|
|
58
|
+
"not-scroll": !hasScroll
|
|
59
|
+
}));
|
|
60
|
+
const Counter = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "counter", () => ({}));
|
|
61
|
+
const SubmitWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-wrapper", () => ({}));
|
|
62
|
+
const SubmitExternal = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-external", () => ({}));
|
|
63
|
+
const SubmitButton = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "submit-btn", () => ({}));
|
|
64
|
+
const CommentCardWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-wrapper", ({ borderBottom }) => ({ borderBottom }));
|
|
65
|
+
const CommentCardHeader = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-header", ({ borderBottom }) => ({ borderBottom }));
|
|
66
|
+
const CommentCardContent = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-content", () => ({}));
|
|
67
|
+
const CommentCardLeft = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-left", () => ({}));
|
|
68
|
+
const CommentCardName = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-name", () => ({}));
|
|
69
|
+
const CommentCardData = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-data", () => ({}));
|
|
70
|
+
const CommentCardMenu = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-card-menu", () => ({}));
|
|
71
|
+
const CommentEmptyWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty", () => ({}));
|
|
72
|
+
const CommentEmptyIcon = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty-icon", () => ({}));
|
|
73
|
+
const CommentEmptyLabel = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "comment-empty-label", () => ({}));
|
|
74
|
+
module.exports = __toCommonJS(blocks_exports);
|
|
75
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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;AA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components/helper.js
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var helper_exports = {};
|
|
29
|
+
__export(helper_exports, {
|
|
30
|
+
getDisplayDate: () => getDisplayDate,
|
|
31
|
+
getMaxSize: () => getMaxSize,
|
|
32
|
+
getTime: () => getTime
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_moment = __toESM(require("moment"));
|
|
11
36
|
function getMaxSize() {
|
|
12
37
|
return 113;
|
|
13
38
|
}
|
|
14
|
-
function getTime(date) {
|
|
15
|
-
|
|
16
|
-
return moment__default["default"](date).format(formatString);
|
|
39
|
+
function getTime(date, formatString = "hh:mm a") {
|
|
40
|
+
return (0, import_moment.default)(date).format(formatString);
|
|
17
41
|
}
|
|
18
|
-
function getDisplayDate(date) {
|
|
19
|
-
|
|
20
|
-
return moment__default["default"](date).format(formatString);
|
|
42
|
+
function getDisplayDate(date, formatString = "MM/DD/YYYY") {
|
|
43
|
+
return (0, import_moment.default)(date).format(formatString);
|
|
21
44
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports.getMaxSize = getMaxSize;
|
|
25
|
-
exports.getTime = getTime;
|
|
45
|
+
module.exports = __toCommonJS(helper_exports);
|
|
46
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/helper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAmB;AAEZ,sBAAsB;AAC3B,SAAO;AAAA;AAEF,iBAAiB,MAAM,eAAe,WAAW;AACtD,SAAO,2BAAO,MAAM,OAAO;AAAA;AAEtB,wBAAwB,MAAM,eAAe,cAAc;AAChE,SAAO,2BAAO,MAAM,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/index.js
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
DSCommentCard: () => DSCommentCard,
|
|
31
|
+
DSCommentCardWithSchema: () => import_DSComments.DSCommentCardWithSchema,
|
|
32
|
+
default: () => src_default
|
|
33
|
+
});
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_DSComments = __toESM(require("./components/DSComments"));
|
|
36
|
+
const { DSCommentCard } = import_DSComments.default;
|
|
37
|
+
var src_default = DSCommentCard;
|
|
38
|
+
module.exports = __toCommonJS(src_exports);
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAoD;AAE7C,MAAM,EAAE,kBAAkB;AACjC,IAAO,cAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,138 +1,97 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
customDropdownMenuProps = {
|
|
37
|
-
focusOnOpen: true
|
|
38
|
-
},
|
|
39
|
-
borderBottom,
|
|
40
|
-
dateFormat = 'MM/DD/YYYY',
|
|
41
|
-
timeFormat = 'hh:mm a',
|
|
42
|
-
maxLines = 2
|
|
43
|
-
} = _ref;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useCallback, useRef } from "react";
|
|
3
|
+
import { PropTypes, describe } from "react-desc";
|
|
4
|
+
import DSButton from "@elliemae/ds-button";
|
|
5
|
+
import { DSReadMore } from "@elliemae/ds-read-more";
|
|
6
|
+
import DSDropdownMenu from "@elliemae/ds-dropdownmenu";
|
|
7
|
+
import { MoreOptionsVert } from "@elliemae/ds-icons";
|
|
8
|
+
import {
|
|
9
|
+
CommentCardWrapper,
|
|
10
|
+
CommentCardHeader,
|
|
11
|
+
CommentCardContent,
|
|
12
|
+
CommentCardName,
|
|
13
|
+
CommentCardData,
|
|
14
|
+
CommentCardMenu,
|
|
15
|
+
CommentCardLeft
|
|
16
|
+
} from "./blocks";
|
|
17
|
+
import { getTime, getDisplayDate } from "./helper";
|
|
18
|
+
const CommentCard = ({
|
|
19
|
+
containerProps = {},
|
|
20
|
+
name = "",
|
|
21
|
+
date = new Date(),
|
|
22
|
+
type = "",
|
|
23
|
+
content = "",
|
|
24
|
+
style = {},
|
|
25
|
+
options = [],
|
|
26
|
+
selection = { "single-selection-internal-external": ["set-as-internal"] },
|
|
27
|
+
customDropdownMenuProps = {
|
|
28
|
+
focusOnOpen: true
|
|
29
|
+
},
|
|
30
|
+
borderBottom,
|
|
31
|
+
dateFormat = "MM/DD/YYYY",
|
|
32
|
+
timeFormat = "hh:mm a",
|
|
33
|
+
maxLines = 2
|
|
34
|
+
}) => {
|
|
44
35
|
const ref = useRef();
|
|
45
36
|
const displayDate = date ? getDisplayDate(date, dateFormat) : null;
|
|
46
37
|
const displayTime = date ? getTime(date, timeFormat) : null;
|
|
47
38
|
const handleCloseMenu = useCallback(() => {
|
|
48
39
|
ref.current.focus();
|
|
49
40
|
}, []);
|
|
50
|
-
return
|
|
51
|
-
classProps: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}), type && /*#__PURE__*/jsxs(Fragment, {
|
|
64
|
-
children: [_span2 || (_span2 = /*#__PURE__*/_jsx("span", {}, void 0, "\u2022")), type]
|
|
65
|
-
}))), options && options.length > 0 && /*#__PURE__*/_jsx(CommentCardMenu, {}, void 0, /*#__PURE__*/jsx(DSDropdownMenu, _objectSpread(_objectSpread({}, customDropdownMenuProps), {}, {
|
|
66
|
-
onClose: handleCloseMenu,
|
|
67
|
-
options: options,
|
|
68
|
-
selection: selection,
|
|
69
|
-
triggerComponent: /*#__PURE__*/_jsx(DSButton, {
|
|
70
|
-
buttonType: "text",
|
|
71
|
-
icon: _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx(MoreOptionsVert, {})),
|
|
72
|
-
innerRef: ref
|
|
73
|
-
}),
|
|
74
|
-
zIndex: "11" // https://jira.elliemae.io/browse/PUI-1664
|
|
75
|
-
|
|
76
|
-
})))), /*#__PURE__*/_jsx(CommentCardContent, {}, void 0, /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/_jsx(DSReadMore, {
|
|
77
|
-
lines: maxLines,
|
|
78
|
-
content: "".concat(content, " "),
|
|
79
|
-
more: "MORE",
|
|
80
|
-
less: "LESS",
|
|
41
|
+
return /* @__PURE__ */ React2.createElement(CommentCardWrapper, {
|
|
42
|
+
classProps: { borderBottom },
|
|
43
|
+
tabIndex: 0,
|
|
44
|
+
...containerProps,
|
|
45
|
+
style: { ...style, ...containerProps.style || {} }
|
|
46
|
+
}, /* @__PURE__ */ React2.createElement(CommentCardHeader, {
|
|
47
|
+
classProps: { borderBottom }
|
|
48
|
+
}, /* @__PURE__ */ React2.createElement(CommentCardLeft, null, /* @__PURE__ */ React2.createElement(CommentCardName, null, name), /* @__PURE__ */ React2.createElement(CommentCardData, null, displayDate, displayTime && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("span", null, "\u2022"), displayTime), type && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("span", null, "\u2022"), type))), options && options.length > 0 && /* @__PURE__ */ React2.createElement(CommentCardMenu, null, /* @__PURE__ */ React2.createElement(DSDropdownMenu, {
|
|
49
|
+
...customDropdownMenuProps,
|
|
50
|
+
onClose: handleCloseMenu,
|
|
51
|
+
options,
|
|
52
|
+
selection,
|
|
53
|
+
triggerComponent: /* @__PURE__ */ React2.createElement(DSButton, {
|
|
81
54
|
buttonType: "text",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
|
|
55
|
+
icon: /* @__PURE__ */ React2.createElement(MoreOptionsVert, null),
|
|
56
|
+
innerRef: ref
|
|
57
|
+
}),
|
|
58
|
+
zIndex: "11"
|
|
59
|
+
}))), /* @__PURE__ */ React2.createElement(CommentCardContent, null, /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(DSReadMore, {
|
|
60
|
+
lines: maxLines,
|
|
61
|
+
content: `${content} `,
|
|
62
|
+
more: "MORE",
|
|
63
|
+
less: "LESS",
|
|
64
|
+
buttonType: "text",
|
|
65
|
+
size: "m",
|
|
66
|
+
ellipsis: "... "
|
|
67
|
+
}))));
|
|
86
68
|
};
|
|
87
|
-
|
|
88
69
|
const props = {
|
|
89
|
-
/** props to inject to comment card wrapper */
|
|
90
70
|
containerProps: PropTypes.shape({
|
|
91
71
|
id: PropTypes.string,
|
|
92
|
-
|
|
93
|
-
}).description(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/** date object */
|
|
102
|
-
date: PropTypes.instanceOf(Date).description('date object'),
|
|
103
|
-
|
|
104
|
-
/** comment type string */
|
|
105
|
-
type: PropTypes.string.description('comment type string'),
|
|
106
|
-
|
|
107
|
-
/** comment content */
|
|
108
|
-
content: PropTypes.string.description('comment content'),
|
|
109
|
-
|
|
110
|
-
/** dropdown menu options */
|
|
111
|
-
options: PropTypes.arrayOf(PropTypes.object).description('dropdown menu options'),
|
|
112
|
-
|
|
113
|
-
/** dropdown selection */
|
|
114
|
-
selection: PropTypes.object.description('dropdown selection'),
|
|
115
|
-
|
|
116
|
-
/** pass down props to dropdown */
|
|
72
|
+
"data-testid": PropTypes.string
|
|
73
|
+
}).description("props to inject to comment card wrapper"),
|
|
74
|
+
name: PropTypes.string.description("form name"),
|
|
75
|
+
style: PropTypes.object.description(" style object "),
|
|
76
|
+
date: PropTypes.instanceOf(Date).description("date object"),
|
|
77
|
+
type: PropTypes.string.description("comment type string"),
|
|
78
|
+
content: PropTypes.string.description("comment content"),
|
|
79
|
+
options: PropTypes.arrayOf(PropTypes.object).description("dropdown menu options"),
|
|
80
|
+
selection: PropTypes.object.description("dropdown selection"),
|
|
117
81
|
customDropdownMenuProps: PropTypes.shape({
|
|
118
82
|
focusOnOpen: PropTypes.bool
|
|
119
|
-
}).description(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
125
|
-
dateFormat: PropTypes.oneOf(['MM/DD/YYYY', 'MM DD YYYY']).description('moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/'),
|
|
126
|
-
|
|
127
|
-
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
128
|
-
timeFormat: PropTypes.oneOf(['hh:mm a', 'HH:mm']).description('moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/'),
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Max lines
|
|
132
|
-
*/
|
|
133
|
-
maxLines: PropTypes.number.description('Max lines')
|
|
83
|
+
}).description("pass down props to dropdown"),
|
|
84
|
+
borderBottom: PropTypes.bool.description("toggle border bottom for card"),
|
|
85
|
+
dateFormat: PropTypes.oneOf(["MM/DD/YYYY", "MM DD YYYY"]).description("moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/"),
|
|
86
|
+
timeFormat: PropTypes.oneOf(["hh:mm a", "HH:mm"]).description("moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/"),
|
|
87
|
+
maxLines: PropTypes.number.description("Max lines")
|
|
134
88
|
};
|
|
89
|
+
CommentCard.propTypes = props;
|
|
135
90
|
const DSCommentCardWithSchema = describe(CommentCard);
|
|
136
91
|
DSCommentCardWithSchema.propTypes = props;
|
|
137
|
-
|
|
138
|
-
export {
|
|
92
|
+
var CommentCard_default = CommentCard;
|
|
93
|
+
export {
|
|
94
|
+
DSCommentCardWithSchema,
|
|
95
|
+
CommentCard_default as default
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=CommentCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 'react-desc';\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;\n\nconst DSCommentCardWithSchema = describe(CommentCard);\nDSCommentCardWithSchema.propTypes = props;\n\nexport default CommentCard;\nexport { DSCommentCardWithSchema };\n"],
|
|
5
|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AAO;AAAA,IACP,SAAS,GAAG;AAAA,IACZ,MAAK;AAAA,IACL,MAAK;AAAA,IACL,YAAW;AAAA,IACX,MAAK;AAAA,IACL,UAAS;AAAA;AAAA;AAQrB,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,MAAM;AAAA,IAC9B,IAAI,UAAU;AAAA,IACd,eAAe,UAAU;AAAA,KACxB,YAAY;AAAA,EAEf,MAAM,UAAU,OAAO,YAAY;AAAA,EAEnC,OAAO,UAAU,OAAO,YAAY;AAAA,EAEpC,MAAM,UAAU,WAAW,MAAM,YAAY;AAAA,EAE7C,MAAM,UAAU,OAAO,YAAY;AAAA,EAEnC,SAAS,UAAU,OAAO,YAAY;AAAA,EAEtC,SAAS,UAAU,QAAQ,UAAU,QAAQ,YAAY;AAAA,EAEzD,WAAW,UAAU,OAAO,YAAY;AAAA,EAExC,yBAAyB,UAAU,MAAM;AAAA,IACvC,aAAa,UAAU;AAAA,KACtB,YAAY;AAAA,EAEf,cAAc,UAAU,KAAK,YAAY;AAAA,EAEzC,YAAY,UAAU,MAAM,CAAC,cAAc,eAAe,YACxD;AAAA,EAGF,YAAY,UAAU,MAAM,CAAC,WAAW,UAAU,YAChD;AAAA,EAKF,UAAU,UAAU,OAAO,YAAY;AAAA;AAGzC,YAAY,YAAY;AAExB,MAAM,0BAA0B,SAAS;AACzC,wBAAwB,YAAY;AAEpC,IAAO,sBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
DSCommentCard: CommentCard
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSCommentCard, { DSCommentCardWithSchema } from "./CommentCard";
|
|
3
|
+
var DSComments_default = {
|
|
4
|
+
DSCommentCard
|
|
6
5
|
};
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export {
|
|
7
|
+
DSCommentCardWithSchema,
|
|
8
|
+
DSComments_default as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=DSComments.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,IAAO,qBAAQ;AAAA,EACb;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/components/blocks.js
CHANGED
|
@@ -1,52 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const blockName =
|
|
4
|
-
const WrapperArea = aggregatedClasses(
|
|
5
|
-
const WrapperComments = aggregatedClasses(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const CommentCardMenu = aggregatedClasses('div')(blockName, 'comment-card-menu', () => ({}));
|
|
48
|
-
const CommentEmptyWrapper = aggregatedClasses('div')(blockName, 'comment-empty', () => ({}));
|
|
49
|
-
const CommentEmptyIcon = aggregatedClasses('div')(blockName, 'comment-empty-icon', () => ({}));
|
|
50
|
-
const CommentEmptyLabel = aggregatedClasses('div')(blockName, 'comment-empty-label', () => ({}));
|
|
51
|
-
|
|
52
|
-
export { CommentCardContent, CommentCardData, CommentCardHeader, CommentCardLeft, CommentCardMenu, CommentCardName, CommentCardWrapper, CommentEmptyIcon, CommentEmptyLabel, CommentEmptyWrapper, Counter, SubmitButton, SubmitExternal, SubmitWrapper, WrapperArea, WrapperComments, WrapperCommentsScroll };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
const blockName = "comments";
|
|
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 }) => ({ borderBottom }));
|
|
18
|
+
const CommentCardHeader = aggregatedClasses("div")(blockName, "comment-card-header", ({ borderBottom }) => ({ borderBottom }));
|
|
19
|
+
const CommentCardContent = aggregatedClasses("div")(blockName, "comment-card-content", () => ({}));
|
|
20
|
+
const CommentCardLeft = aggregatedClasses("div")(blockName, "comment-card-left", () => ({}));
|
|
21
|
+
const CommentCardName = aggregatedClasses("div")(blockName, "comment-card-name", () => ({}));
|
|
22
|
+
const CommentCardData = aggregatedClasses("div")(blockName, "comment-card-data", () => ({}));
|
|
23
|
+
const CommentCardMenu = aggregatedClasses("div")(blockName, "comment-card-menu", () => ({}));
|
|
24
|
+
const CommentEmptyWrapper = aggregatedClasses("div")(blockName, "comment-empty", () => ({}));
|
|
25
|
+
const CommentEmptyIcon = aggregatedClasses("div")(blockName, "comment-empty-icon", () => ({}));
|
|
26
|
+
const CommentEmptyLabel = aggregatedClasses("div")(blockName, "comment-empty-label", () => ({}));
|
|
27
|
+
export {
|
|
28
|
+
CommentCardContent,
|
|
29
|
+
CommentCardData,
|
|
30
|
+
CommentCardHeader,
|
|
31
|
+
CommentCardLeft,
|
|
32
|
+
CommentCardMenu,
|
|
33
|
+
CommentCardName,
|
|
34
|
+
CommentCardWrapper,
|
|
35
|
+
CommentEmptyIcon,
|
|
36
|
+
CommentEmptyLabel,
|
|
37
|
+
CommentEmptyWrapper,
|
|
38
|
+
Counter,
|
|
39
|
+
SubmitButton,
|
|
40
|
+
SubmitExternal,
|
|
41
|
+
SubmitWrapper,
|
|
42
|
+
WrapperArea,
|
|
43
|
+
WrapperComments,
|
|
44
|
+
WrapperCommentsScroll
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,cAAc,kBAAkB,OAC3C,WACA,QACA,MAAO;AAGF,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,YACA,CAAC,EAAE,gBAAiB;AAAA,EAClB;AAAA,EACA,cAAc,CAAC;AAAA;AAIZ,MAAM,wBAAwB,kBAAkB,OACrD,WACA,mBACA,CAAC,EAAE,gBAAiB;AAAA,EAClB;AAAA,EACA,cAAc,CAAC;AAAA;AAIZ,MAAM,UAAU,kBAAkB,OACvC,WACA,WACA,MAAO;AAGF,MAAM,gBAAgB,kBAAkB,OAC7C,WACA,kBACA,MAAO;AAGF,MAAM,iBAAiB,kBAAkB,OAC9C,WACA,mBACA,MAAO;AAGF,MAAM,eAAe,kBAAkB,OAC5C,WACA,cACA,MAAO;AAGF,MAAM,qBAAqB,kBAAkB,OAClD,WACA,wBACA,CAAC,EAAE,mBAAoB,GAAE;AAGpB,MAAM,oBAAoB,kBAAkB,OACjD,WACA,uBACA,CAAC,EAAE,mBAAoB,GAAE;AAGpB,MAAM,qBAAqB,kBAAkB,OAClD,WACA,wBACA,MAAO;AAGF,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,qBACA,MAAO;AAGF,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,qBACA,MAAO;AAGF,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,qBACA,MAAO;AAGF,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,qBACA,MAAO;AAGF,MAAM,sBAAsB,kBAAkB,OACnD,WACA,iBACA,MAAO;AAGF,MAAM,mBAAmB,kBAAkB,OAChD,WACA,sBACA,MAAO;AAGF,MAAM,oBAAoB,kBAAkB,OACjD,WACA,uBACA,MAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/components/helper.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import moment from "moment";
|
|
3
3
|
function getMaxSize() {
|
|
4
4
|
return 113;
|
|
5
5
|
}
|
|
6
|
-
function getTime(date) {
|
|
7
|
-
let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'hh:mm a';
|
|
6
|
+
function getTime(date, formatString = "hh:mm a") {
|
|
8
7
|
return moment(date).format(formatString);
|
|
9
8
|
}
|
|
10
|
-
function getDisplayDate(date) {
|
|
11
|
-
let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'MM/DD/YYYY';
|
|
9
|
+
function getDisplayDate(date, formatString = "MM/DD/YYYY") {
|
|
12
10
|
return moment(date).format(formatString);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export {
|
|
13
|
+
getDisplayDate,
|
|
14
|
+
getMaxSize,
|
|
15
|
+
getTime
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/helper.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,sBAAsB;AAC3B,SAAO;AAAA;AAEF,iBAAiB,MAAM,eAAe,WAAW;AACtD,SAAO,OAAO,MAAM,OAAO;AAAA;AAEtB,wBAAwB,MAAM,eAAe,cAAc;AAChE,SAAO,OAAO,MAAM,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import DSComments, { DSCommentCardWithSchema } from "./components/DSComments";
|
|
3
|
+
const { DSCommentCard } = DSComments;
|
|
4
|
+
var src_default = DSCommentCard;
|
|
5
|
+
export {
|
|
6
|
+
DSCommentCard,
|
|
7
|
+
DSCommentCardWithSchema,
|
|
8
|
+
src_default as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,EAAE,kBAAkB;AACjC,IAAO,cAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-comments",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-alpha.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Comments",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"build": "node ../../scripts/build/build.js"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@elliemae/ds-button": "2.
|
|
52
|
-
"@elliemae/ds-classnames": "2.
|
|
53
|
-
"@elliemae/ds-dropdownmenu": "2.
|
|
54
|
-
"@elliemae/ds-icons": "2.
|
|
55
|
-
"@elliemae/ds-read-more": "2.
|
|
51
|
+
"@elliemae/ds-button": "2.3.0-alpha.4",
|
|
52
|
+
"@elliemae/ds-classnames": "2.3.0-alpha.4",
|
|
53
|
+
"@elliemae/ds-dropdownmenu": "2.3.0-alpha.4",
|
|
54
|
+
"@elliemae/ds-icons": "2.3.0-alpha.4",
|
|
55
|
+
"@elliemae/ds-read-more": "2.3.0-alpha.4",
|
|
56
56
|
"moment": "~2.29.1",
|
|
57
57
|
"prop-types": "~15.7.2",
|
|
58
58
|
"react-desc": "~4.1.3"
|