@elliemae/ds-comments 2.0.0-next.0 → 2.0.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,14 +2,19 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.filter.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.filter.js');
8
+ require('core-js/modules/esnext.async-iterator.for-each.js');
9
+ require('core-js/modules/esnext.iterator.for-each.js');
5
10
  var _jsx = require('@babel/runtime/helpers/jsx');
6
11
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
12
  var react = require('react');
8
13
  var reactDesc = require('react-desc');
9
- var DSButton = require('@elliemae/ds-basic/Button');
10
- var dsBasic = require('@elliemae/ds-basic');
14
+ var DSButton = require('@elliemae/ds-button');
15
+ var dsReadMore = require('@elliemae/ds-read-more');
11
16
  var DSDropdownMenu = require('@elliemae/ds-dropdownmenu');
12
- var MoreOptionsVert = require('@elliemae/ds-icons/MoreOptionsVert');
17
+ var dsIcons = require('@elliemae/ds-icons');
13
18
  var blocks = require('./blocks.js');
14
19
  var helper = require('./helper.js');
15
20
  var jsxRuntime = require('react/jsx-runtime');
@@ -20,7 +25,6 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
20
25
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
21
26
  var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
22
27
  var DSDropdownMenu__default = /*#__PURE__*/_interopDefaultLegacy(DSDropdownMenu);
23
- var MoreOptionsVert__default = /*#__PURE__*/_interopDefaultLegacy(MoreOptionsVert);
24
28
 
25
29
  var _span, _span2, _MoreOptionsVert;
26
30
 
@@ -28,25 +32,26 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
28
32
 
29
33
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
30
34
 
31
- const CommentCard = ({
32
- containerProps = {},
33
- name = '',
34
- date = new Date(),
35
- type = '',
36
- content = '',
37
- style = {},
38
- options = [],
39
- selection = {
40
- 'single-selection-internal-external': ['set-as-internal']
41
- },
42
- customDropdownMenuProps = {
43
- focusOnOpen: true
44
- },
45
- borderBottom,
46
- dateFormat = 'MM/DD/YYYY',
47
- timeFormat = 'hh:mm a',
48
- maxLines = 2
49
- }) => {
35
+ const CommentCard = _ref => {
36
+ let {
37
+ containerProps = {},
38
+ name = '',
39
+ date = new Date(),
40
+ type = '',
41
+ content = '',
42
+ style = {},
43
+ options = [],
44
+ selection = {
45
+ 'single-selection-internal-external': ['set-as-internal']
46
+ },
47
+ customDropdownMenuProps = {
48
+ focusOnOpen: true
49
+ },
50
+ borderBottom,
51
+ dateFormat = 'MM/DD/YYYY',
52
+ timeFormat = 'hh:mm a',
53
+ maxLines = 2
54
+ } = _ref;
50
55
  const ref = react.useRef();
51
56
  const displayDate = date ? helper.getDisplayDate(date, dateFormat) : null;
52
57
  const displayTime = date ? helper.getTime(date, timeFormat) : null;
@@ -74,14 +79,14 @@ const CommentCard = ({
74
79
  selection: selection,
75
80
  triggerComponent: /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
76
81
  buttonType: "text",
77
- icon: _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx__default["default"](MoreOptionsVert__default["default"], {})),
82
+ icon: _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx__default["default"](dsIcons.MoreOptionsVert, {})),
78
83
  innerRef: ref
79
84
  }),
80
85
  zIndex: "11" // https://jira.elliemae.io/browse/PUI-1664
81
86
 
82
- })))), /*#__PURE__*/_jsx__default["default"](blocks.CommentCardContent, {}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](dsBasic.DSReadMore, {
87
+ })))), /*#__PURE__*/_jsx__default["default"](blocks.CommentCardContent, {}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](dsReadMore.DSReadMore, {
83
88
  lines: maxLines,
84
- content: `${content} `,
89
+ content: "".concat(content, " "),
85
90
  more: "MORE",
86
91
  less: "LESS",
87
92
  buttonType: "text",
@@ -6,32 +6,44 @@ var dsClassnames = require('@elliemae/ds-classnames');
6
6
 
7
7
  const blockName = 'comments';
8
8
  const WrapperArea = dsClassnames.aggregatedClasses('div')(blockName, 'area', () => ({}));
9
- const WrapperComments = dsClassnames.aggregatedClasses('div')(blockName, 'comments', ({
10
- hasScroll
11
- }) => ({
12
- hasScroll,
13
- 'not-scroll': !hasScroll
14
- }));
15
- const WrapperCommentsScroll = dsClassnames.aggregatedClasses('div')(blockName, 'comments-scroll', ({
16
- hasScroll
17
- }) => ({
18
- hasScroll,
19
- 'not-scroll': !hasScroll
20
- }));
9
+ const WrapperComments = dsClassnames.aggregatedClasses('div')(blockName, 'comments', _ref => {
10
+ let {
11
+ hasScroll
12
+ } = _ref;
13
+ return {
14
+ hasScroll,
15
+ 'not-scroll': !hasScroll
16
+ };
17
+ });
18
+ const WrapperCommentsScroll = dsClassnames.aggregatedClasses('div')(blockName, 'comments-scroll', _ref2 => {
19
+ let {
20
+ hasScroll
21
+ } = _ref2;
22
+ return {
23
+ hasScroll,
24
+ 'not-scroll': !hasScroll
25
+ };
26
+ });
21
27
  const Counter = dsClassnames.aggregatedClasses('div')(blockName, 'counter', () => ({}));
22
28
  const SubmitWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'submit-wrapper', () => ({}));
23
29
  const SubmitExternal = dsClassnames.aggregatedClasses('div')(blockName, 'submit-external', () => ({}));
24
30
  const SubmitButton = dsClassnames.aggregatedClasses('div')(blockName, 'submit-btn', () => ({}));
25
- const CommentCardWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-wrapper', ({
26
- borderBottom
27
- }) => ({
28
- borderBottom
29
- }));
30
- const CommentCardHeader = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-header', ({
31
- borderBottom
32
- }) => ({
33
- borderBottom
34
- }));
31
+ const CommentCardWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-wrapper', _ref3 => {
32
+ let {
33
+ borderBottom
34
+ } = _ref3;
35
+ return {
36
+ borderBottom
37
+ };
38
+ });
39
+ const CommentCardHeader = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-header', _ref4 => {
40
+ let {
41
+ borderBottom
42
+ } = _ref4;
43
+ return {
44
+ borderBottom
45
+ };
46
+ });
35
47
  const CommentCardContent = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-content', () => ({}));
36
48
  const CommentCardLeft = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-left', () => ({}));
37
49
  const CommentCardName = dsClassnames.aggregatedClasses('div')(blockName, 'comment-card-name', () => ({}));
@@ -11,10 +11,12 @@ var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
11
11
  function getMaxSize() {
12
12
  return 113;
13
13
  }
14
- function getTime(date, formatString = 'hh:mm a') {
14
+ function getTime(date) {
15
+ let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'hh:mm a';
15
16
  return moment__default["default"](date).format(formatString);
16
17
  }
17
- function getDisplayDate(date, formatString = 'MM/DD/YYYY') {
18
+ function getDisplayDate(date) {
19
+ let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'MM/DD/YYYY';
18
20
  return moment__default["default"](date).format(formatString);
19
21
  }
20
22
 
@@ -1,11 +1,16 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
8
  import { useRef, useCallback } from 'react';
4
9
  import { PropTypes, describe } from 'react-desc';
5
- import DSButton from '@elliemae/ds-basic/Button';
6
- import { DSReadMore } from '@elliemae/ds-basic';
10
+ import DSButton from '@elliemae/ds-button';
11
+ import { DSReadMore } from '@elliemae/ds-read-more';
7
12
  import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
8
- import MoreOptionsVert from '@elliemae/ds-icons/MoreOptionsVert';
13
+ import { MoreOptionsVert } from '@elliemae/ds-icons';
9
14
  import { CommentCardWrapper, CommentCardHeader, CommentCardLeft, CommentCardName, CommentCardData, CommentCardMenu, CommentCardContent } from './blocks.js';
10
15
  import { getDisplayDate, getTime } from './helper.js';
11
16
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -16,25 +21,26 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
16
21
 
17
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
23
 
19
- const CommentCard = ({
20
- containerProps = {},
21
- name = '',
22
- date = new Date(),
23
- type = '',
24
- content = '',
25
- style = {},
26
- options = [],
27
- selection = {
28
- 'single-selection-internal-external': ['set-as-internal']
29
- },
30
- customDropdownMenuProps = {
31
- focusOnOpen: true
32
- },
33
- borderBottom,
34
- dateFormat = 'MM/DD/YYYY',
35
- timeFormat = 'hh:mm a',
36
- maxLines = 2
37
- }) => {
24
+ const CommentCard = _ref => {
25
+ let {
26
+ containerProps = {},
27
+ name = '',
28
+ date = new Date(),
29
+ type = '',
30
+ content = '',
31
+ style = {},
32
+ options = [],
33
+ selection = {
34
+ 'single-selection-internal-external': ['set-as-internal']
35
+ },
36
+ customDropdownMenuProps = {
37
+ focusOnOpen: true
38
+ },
39
+ borderBottom,
40
+ dateFormat = 'MM/DD/YYYY',
41
+ timeFormat = 'hh:mm a',
42
+ maxLines = 2
43
+ } = _ref;
38
44
  const ref = useRef();
39
45
  const displayDate = date ? getDisplayDate(date, dateFormat) : null;
40
46
  const displayTime = date ? getTime(date, timeFormat) : null;
@@ -69,7 +75,7 @@ const CommentCard = ({
69
75
 
70
76
  })))), /*#__PURE__*/_jsx(CommentCardContent, {}, void 0, /*#__PURE__*/_jsx("div", {}, void 0, /*#__PURE__*/_jsx(DSReadMore, {
71
77
  lines: maxLines,
72
- content: `${content} `,
78
+ content: "".concat(content, " "),
73
79
  more: "MORE",
74
80
  less: "LESS",
75
81
  buttonType: "text",
@@ -2,32 +2,44 @@ import { aggregatedClasses } from '@elliemae/ds-classnames';
2
2
 
3
3
  const blockName = 'comments';
4
4
  const WrapperArea = aggregatedClasses('div')(blockName, 'area', () => ({}));
5
- const WrapperComments = aggregatedClasses('div')(blockName, 'comments', ({
6
- hasScroll
7
- }) => ({
8
- hasScroll,
9
- 'not-scroll': !hasScroll
10
- }));
11
- const WrapperCommentsScroll = aggregatedClasses('div')(blockName, 'comments-scroll', ({
12
- hasScroll
13
- }) => ({
14
- hasScroll,
15
- 'not-scroll': !hasScroll
16
- }));
5
+ const WrapperComments = aggregatedClasses('div')(blockName, 'comments', _ref => {
6
+ let {
7
+ hasScroll
8
+ } = _ref;
9
+ return {
10
+ hasScroll,
11
+ 'not-scroll': !hasScroll
12
+ };
13
+ });
14
+ const WrapperCommentsScroll = aggregatedClasses('div')(blockName, 'comments-scroll', _ref2 => {
15
+ let {
16
+ hasScroll
17
+ } = _ref2;
18
+ return {
19
+ hasScroll,
20
+ 'not-scroll': !hasScroll
21
+ };
22
+ });
17
23
  const Counter = aggregatedClasses('div')(blockName, 'counter', () => ({}));
18
24
  const SubmitWrapper = aggregatedClasses('div')(blockName, 'submit-wrapper', () => ({}));
19
25
  const SubmitExternal = aggregatedClasses('div')(blockName, 'submit-external', () => ({}));
20
26
  const SubmitButton = aggregatedClasses('div')(blockName, 'submit-btn', () => ({}));
21
- const CommentCardWrapper = aggregatedClasses('div')(blockName, 'comment-card-wrapper', ({
22
- borderBottom
23
- }) => ({
24
- borderBottom
25
- }));
26
- const CommentCardHeader = aggregatedClasses('div')(blockName, 'comment-card-header', ({
27
- borderBottom
28
- }) => ({
29
- borderBottom
30
- }));
27
+ const CommentCardWrapper = aggregatedClasses('div')(blockName, 'comment-card-wrapper', _ref3 => {
28
+ let {
29
+ borderBottom
30
+ } = _ref3;
31
+ return {
32
+ borderBottom
33
+ };
34
+ });
35
+ const CommentCardHeader = aggregatedClasses('div')(blockName, 'comment-card-header', _ref4 => {
36
+ let {
37
+ borderBottom
38
+ } = _ref4;
39
+ return {
40
+ borderBottom
41
+ };
42
+ });
31
43
  const CommentCardContent = aggregatedClasses('div')(blockName, 'comment-card-content', () => ({}));
32
44
  const CommentCardLeft = aggregatedClasses('div')(blockName, 'comment-card-left', () => ({}));
33
45
  const CommentCardName = aggregatedClasses('div')(blockName, 'comment-card-name', () => ({}));
@@ -3,10 +3,12 @@ import moment from 'moment';
3
3
  function getMaxSize() {
4
4
  return 113;
5
5
  }
6
- function getTime(date, formatString = 'hh:mm a') {
6
+ function getTime(date) {
7
+ let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'hh:mm a';
7
8
  return moment(date).format(formatString);
8
9
  }
9
- function getDisplayDate(date, formatString = 'MM/DD/YYYY') {
10
+ function getDisplayDate(date) {
11
+ let formatString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'MM/DD/YYYY';
10
12
  return moment(date).format(formatString);
11
13
  }
12
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-comments",
3
- "version": "2.0.0-next.0",
3
+ "version": "2.0.0-next.12",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Comments",
6
6
  "module": "./esm/index.js",
@@ -48,19 +48,22 @@
48
48
  "build": "node ../../scripts/build/build.js"
49
49
  },
50
50
  "dependencies": {
51
- "@elliemae/ds-basic": "2.0.0-next.0",
52
- "@elliemae/ds-classnames": "2.0.0-next.0",
53
- "@elliemae/ds-dropdownmenu": "2.0.0-next.0",
54
- "prop-types": "~15.7.2"
51
+ "@elliemae/ds-basic": "2.0.0-next.12",
52
+ "@elliemae/ds-classnames": "2.0.0-next.12",
53
+ "@elliemae/ds-dropdownmenu": "2.0.0-next.12",
54
+ "@elliemae/ds-icons": "2.0.0-next.12",
55
+ "moment": "~2.29.1",
56
+ "prop-types": "~15.7.2",
57
+ "react-desc": "~4.1.3"
55
58
  },
56
59
  "devDependencies": {
57
- "styled-components": "~5.3.1"
60
+ "styled-components": "~5.3.3"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "lodash": "^4.17.21",
61
64
  "react": "~17.0.2",
62
65
  "react-dom": "^17.0.2",
63
- "styled-components": "~5.3.1"
66
+ "styled-components": "~5.3.3"
64
67
  },
65
68
  "publishConfig": {
66
69
  "access": "public",
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }