@bigbinary/neeto-molecules 1.1.23 → 1.1.25

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,7 +2,7 @@ import React from 'react';
2
2
  import { capitalize } from '@bigbinary/neeto-cist';
3
3
  import { useTimer } from '@bigbinary/neeto-commons-frontend/react-utils';
4
4
  import { timeFormat } from '@bigbinary/neeto-commons-frontend/utils';
5
- import { Typography, Tooltip } from '@bigbinary/neetoui';
5
+ import { Tooltip, Typography } from '@bigbinary/neetoui';
6
6
  import { fromPairs, keys } from 'ramda';
7
7
 
8
8
  function _extends() {
@@ -28,16 +28,18 @@ var DateFormat = fromPairs(keys(timeFormat).map(function (key) {
28
28
  _ref$tooltipProps = _ref.tooltipProps,
29
29
  tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps,
30
30
  _ref$typographyProps = _ref.typographyProps,
31
- typographyProps = _ref$typographyProps === void 0 ? {} : _ref$typographyProps;
31
+ typographyProps = _ref$typographyProps === void 0 ? {} : _ref$typographyProps,
32
+ _ref$tooltipDateForma = _ref.tooltipDateFormat,
33
+ tooltipDateFormat = _ref$tooltipDateForma === void 0 ? "extended" : _ref$tooltipDateForma;
32
34
  useTimer(timerInterval);
33
- var dateDisplay = /*#__PURE__*/React.createElement(Typography, _extends({
35
+ return /*#__PURE__*/React.createElement(Tooltip, _extends({
36
+ content: timeFormat[tooltipDateFormat](date),
37
+ disabled: key === tooltipDateFormat,
38
+ position: "top"
39
+ }, tooltipProps), /*#__PURE__*/React.createElement(Typography, _extends({
34
40
  component: "span",
35
41
  style: "body2"
36
- }, typographyProps), timeFormat[key](date));
37
- return key === "extended" ? dateDisplay : /*#__PURE__*/React.createElement(Tooltip, _extends({
38
- content: timeFormat.extended(date),
39
- position: "top"
40
- }, tooltipProps), dateDisplay);
42
+ }, typographyProps), timeFormat[key](date)));
41
43
  }];
42
44
  }));
43
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormat.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../src/components/DateFormat.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import React from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport { useTimer } from \"neetocommons/react-utils\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { fromPairs, keys } from \"ramda\";\n\nconst DateFormat = fromPairs(\n keys(timeFormat).map(key => [\n capitalize(key),\n ({ date, timerInterval = 60, tooltipProps = {}, typographyProps = {} }) => {\n useTimer(timerInterval);\n const dateDisplay = (\n <Typography component=\"span\" style=\"body2\" {...typographyProps}>\n {timeFormat[key](date)}\n </Typography>\n );\n\n return key === \"extended\" ? (\n dateDisplay\n ) : (\n <Tooltip\n content={timeFormat.extended(date)}\n position=\"top\"\n {...tooltipProps}\n >\n {dateDisplay}\n </Tooltip>\n );\n },\n ])\n);\n\nDateFormat.propTypes = {\n /**\n * The date object to be formatted.\n */\n date: PropTypes.instanceOf(Date),\n /**\n * This prop will be used to re-render the component in every `timerInterval` seconds to show updated relative time.\n */\n timerInterval: PropTypes.number,\n /**\n * This prop will be forwarded to the neetoui Tooltip component. Default position is \"top\".\n */\n tooltipProps: PropTypes.object,\n /**\n * This prop will be forwarded to the neetoui Typography component.\n */\n typographyProps: PropTypes.object,\n};\n\nexport default DateFormat;\n"],"names":["DateFormat","fromPairs","keys","timeFormat","map","key","capitalize","_ref","date","_ref$timerInterval","timerInterval","_ref$tooltipProps","tooltipProps","_ref$typographyProps","typographyProps","useTimer","dateDisplay","React","createElement","Typography","_extends","component","style","Tooltip","content","extended","position"],"mappings":";;;;;;;AAAe,SAAS,QAAQ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E,GAAAA,oBAAA,CAAA;IAClEE,QAAQ,CAACL,aAAa,CAAC,CAAA;IACvB,IAAMM,WAAW,gBACfC,KAAA,CAAAC,aAAA,CAACC,UAAU,EAAAC,QAAA,CAAA;AAACC,MAAAA,SAAS,EAAC,MAAM;AAACC,MAAAA,KAAK,EAAC,OAAA;KAAYR,EAAAA,eAAe,GAC3DX,UAAU,CAACE,GAAG,CAAC,CAACG,IAAI,CAAC,CAEzB,CAAA;AAED,IAAA,OAAOH,GAAG,KAAK,UAAU,GACvBW,WAAW,gBAEXC,KAAA,CAAAC,aAAA,CAACK,OAAO,EAAAH,QAAA,CAAA;AACNI,MAAAA,OAAO,EAAErB,UAAU,CAACsB,QAAQ,CAACjB,IAAI,CAAE;AACnCkB,MAAAA,QAAQ,EAAC,KAAA;KACLd,EAAAA,YAAY,CAEfI,EAAAA,WAAW,CAEf,CAAA;AACH,GAAC,CACF,CAAA;AAAA,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"DateFormat.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../src/components/DateFormat.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import React from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport { useTimer } from \"neetocommons/react-utils\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { fromPairs, keys } from \"ramda\";\n\nconst DateFormat = fromPairs(\n keys(timeFormat).map(key => [\n capitalize(key),\n ({\n date,\n timerInterval = 60,\n tooltipProps = {},\n typographyProps = {},\n tooltipDateFormat = \"extended\",\n }) => {\n useTimer(timerInterval);\n\n return (\n <Tooltip\n content={timeFormat[tooltipDateFormat](date)}\n disabled={key === tooltipDateFormat}\n position=\"top\"\n {...tooltipProps}\n >\n <Typography component=\"span\" style=\"body2\" {...typographyProps}>\n {timeFormat[key](date)}\n </Typography>\n </Tooltip>\n );\n },\n ])\n);\n\nDateFormat.propTypes = {\n /**\n * The date object to be formatted.\n */\n date: PropTypes.instanceOf(Date),\n /**\n * This prop will be used to re-render the component in every `timerInterval` seconds to show updated relative time.\n */\n timerInterval: PropTypes.number,\n /**\n * This prop will accept a string to set the format corresponding to\n * [dateFormat](https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/utils/dateFormat.md)\n * options from `neeto-commons-frontend`.\n */\n tooltipDateFormat: PropTypes.string,\n /**\n * This prop will be forwarded to the neetoui Tooltip component. Default position is \"top\".\n */\n tooltipProps: PropTypes.object,\n /**\n * This prop will be forwarded to the neetoui Typography component.\n */\n typographyProps: PropTypes.object,\n};\n\nexport default DateFormat;\n"],"names":["DateFormat","fromPairs","keys","timeFormat","map","key","capitalize","_ref","date","_ref$timerInterval","timerInterval","_ref$tooltipProps","tooltipProps","_ref$typographyProps","typographyProps","_ref$tooltipDateForma","tooltipDateFormat","useTimer","React","createElement","Tooltip","_extends","content","disabled","position","Typography","component","style"],"mappings":";;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAA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A,CAACM,UAAU,EAAAJ,QAAA,CAAA;AAACK,MAAAA,SAAS,EAAC,MAAM;AAACC,MAAAA,KAAK,EAAC,OAAA;KAAYb,EAAAA,eAAe,CAC3DX,EAAAA,UAAU,CAACE,GAAG,CAAC,CAACG,IAAI,CAAC,CACX,CACL,CAAA;AAEd,GAAC,CACF,CAAA;AAAA,CAAA,CAAC;;;;"}
package/dist/EmailForm.js CHANGED
@@ -929,6 +929,7 @@ var EmailForm = function EmailForm(_ref) {
929
929
  }), /*#__PURE__*/React.createElement("div", {
930
930
  className: "w-full"
931
931
  }, /*#__PURE__*/React.createElement(FormikEditor, {
932
+ isMenuCollapsible: true,
932
933
  required: true,
933
934
  addons: EDITOR_ADDONS,
934
935
  "data-cy": "message-input-field",