@coorpacademy/components 11.12.3-alpha.4 → 11.12.3-alpha.5

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.
Files changed (63) hide show
  1. package/es/atom/battle-opponent/index.d.ts.map +1 -1
  2. package/es/atom/battle-opponent/index.js +4 -2
  3. package/es/atom/battle-opponent/index.js.map +1 -1
  4. package/es/atom/battle-opponent/style.css +12 -0
  5. package/es/atom/tooltip/index.d.ts.map +1 -1
  6. package/es/atom/tooltip/index.js +2 -1
  7. package/es/atom/tooltip/index.js.map +1 -1
  8. package/es/molecule/card/customer.js +1 -1
  9. package/es/molecule/card/customer.js.map +1 -1
  10. package/es/molecule/card/favorite.css +15 -35
  11. package/es/molecule/card/favorite.d.ts +1 -0
  12. package/es/molecule/card/favorite.d.ts.map +1 -1
  13. package/es/molecule/card/favorite.js +70 -18
  14. package/es/molecule/card/favorite.js.map +1 -1
  15. package/es/molecule/card/selectable.js +1 -1
  16. package/es/molecule/card/selectable.js.map +1 -1
  17. package/es/molecule/course-section/style.css +6 -4
  18. package/es/molecule/draggable/style.css +5 -9
  19. package/es/molecule/draggable-list/index.d.ts +2 -50
  20. package/es/molecule/draggable-list/index.d.ts.map +1 -1
  21. package/es/molecule/draggable-list/index.js +2 -4
  22. package/es/molecule/draggable-list/index.js.map +1 -1
  23. package/es/organism/list-item/index.d.ts +0 -1
  24. package/es/organism/list-item/index.js +1 -2
  25. package/es/organism/list-item/index.js.map +1 -1
  26. package/es/organism/list-item/style.css +4 -6
  27. package/es/organism/list-items/index.d.ts +1 -4
  28. package/es/organism/list-items/index.d.ts.map +1 -1
  29. package/es/organism/list-items/index.js +13 -31
  30. package/es/organism/list-items/index.js.map +1 -1
  31. package/es/template/back-office/brand-update/index.d.ts +0 -2
  32. package/lib/atom/battle-opponent/index.d.ts.map +1 -1
  33. package/lib/atom/battle-opponent/index.js +4 -2
  34. package/lib/atom/battle-opponent/index.js.map +1 -1
  35. package/lib/atom/battle-opponent/style.css +12 -0
  36. package/lib/atom/tooltip/index.d.ts.map +1 -1
  37. package/lib/atom/tooltip/index.js +2 -1
  38. package/lib/atom/tooltip/index.js.map +1 -1
  39. package/lib/molecule/card/customer.js +1 -1
  40. package/lib/molecule/card/customer.js.map +1 -1
  41. package/lib/molecule/card/favorite.css +15 -35
  42. package/lib/molecule/card/favorite.d.ts +1 -0
  43. package/lib/molecule/card/favorite.d.ts.map +1 -1
  44. package/lib/molecule/card/favorite.js +71 -16
  45. package/lib/molecule/card/favorite.js.map +1 -1
  46. package/lib/molecule/card/selectable.js +1 -1
  47. package/lib/molecule/card/selectable.js.map +1 -1
  48. package/lib/molecule/course-section/style.css +6 -4
  49. package/lib/molecule/draggable/style.css +5 -9
  50. package/lib/molecule/draggable-list/index.d.ts +2 -50
  51. package/lib/molecule/draggable-list/index.d.ts.map +1 -1
  52. package/lib/molecule/draggable-list/index.js +2 -5
  53. package/lib/molecule/draggable-list/index.js.map +1 -1
  54. package/lib/organism/list-item/index.d.ts +0 -1
  55. package/lib/organism/list-item/index.js +1 -2
  56. package/lib/organism/list-item/index.js.map +1 -1
  57. package/lib/organism/list-item/style.css +4 -6
  58. package/lib/organism/list-items/index.d.ts +1 -4
  59. package/lib/organism/list-items/index.d.ts.map +1 -1
  60. package/lib/organism/list-items/index.js +13 -33
  61. package/lib/organism/list-items/index.js.map +1 -1
  62. package/lib/template/back-office/brand-update/index.d.ts +0 -2
  63. package/package.json +2 -2
@@ -7,6 +7,8 @@ var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
7
7
 
8
8
  var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
9
9
 
10
+ var _has2 = _interopRequireDefault(require("lodash/fp/has"));
11
+
10
12
  var _get2 = _interopRequireDefault(require("lodash/fp/get"));
11
13
 
12
14
  var _react = _interopRequireWildcard(require("react"));
@@ -15,10 +17,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
15
17
 
16
18
  var _classnames = _interopRequireDefault(require("classnames"));
17
19
 
20
+ var _uuid = require("uuid");
21
+
18
22
  var _novaIcons = require("@coorpacademy/nova-icons");
19
23
 
20
24
  var _provider = _interopRequireWildcard(require("../../atom/provider"));
21
25
 
26
+ var _tooltip = _interopRequireWildcard(require("../../atom/tooltip"));
27
+
22
28
  var _favorite = _interopRequireDefault(require("./favorite.css"));
23
29
 
24
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -37,6 +43,7 @@ const Favorite = ({
37
43
  disabled
38
44
  }, legacyContext) => {
39
45
  const skin = (0, _provider.GetSkinFromContext)(legacyContext);
46
+ const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
40
47
  const handleFavoriteClick = (0, _react.useCallback)(e => {
41
48
  e.stopPropagation();
42
49
  e.preventDefault();
@@ -45,26 +52,43 @@ const Favorite = ({
45
52
  const primaryColor = (0, _get2.default)('common.primary', skin);
46
53
  const darkColor = (0, _get2.default)('common.dark', skin);
47
54
  const brandColor = (0, _get2.default)('common.brand', skin);
48
- const toolTipView = (0, _react.useMemo)(() => !(0, _isEmpty2.default)(removeFavoriteToolTip) && !(0, _isEmpty2.default)(addFavoriteToolTip) ? /*#__PURE__*/_react.default.createElement("div", {
49
- className: _favorite.default.showToolTip
50
- }, /*#__PURE__*/_react.default.createElement("span", null, favorite ? removeFavoriteToolTip : addFavoriteToolTip)) : null, [addFavoriteToolTip, favorite, removeFavoriteToolTip]);
51
- return /*#__PURE__*/_react.default.createElement("div", {
52
- className: _favorite.default.blocFavorite
53
- }, toolTipView, /*#__PURE__*/_react.default.createElement("div", {
54
- "data-name": "favorite",
55
- "aria-label": ariaLabel.favorite,
56
- className: (0, _classnames.default)(_favorite.default.favorite, className, favorite && _favorite.default.selected),
57
- onClick: handleFavoriteClick,
58
- style: {
59
- color: primaryColor
60
- }
61
- }, favorite ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck, {
55
+ const buttonRef = (0, _react.useRef)(null);
56
+ const allowToolTip = (0, _react.useMemo)(() => !(0, _isEmpty2.default)(removeFavoriteToolTip) && !(0, _isEmpty2.default)(addFavoriteToolTip), [addFavoriteToolTip, removeFavoriteToolTip]); // to be replaced by useId when React17 is bumped to React18
57
+
58
+ const [favoriteButtonAnchorId] = (0, _react.useState)(allowToolTip ? (0, _uuid.v5)('engaged-battle-', _uuid.v5.URL) : undefined);
59
+ const toolTipContent = (0, _react.useMemo)( // eslint-disable-next-line no-nested-ternary
60
+ () => allowToolTip ? favorite ? removeFavoriteToolTip : addFavoriteToolTip : null, [addFavoriteToolTip, favorite, removeFavoriteToolTip, allowToolTip]);
61
+ const [mouseLeaveTimer, setMouseLeaveTimer] = (0, _react.useState)(undefined);
62
+ const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
63
+ const handleMouseOver = (0, _react.useCallback)(() => {
64
+ mouseLeaveTimer && clearTimeout(mouseLeaveTimer);
65
+ /* istanbul ignore next */
66
+
67
+ (0, _has2.default)(['current', 'focus'], buttonRef) && buttonRef.current.focus();
68
+ setToolTipIsVisible(true);
69
+ }, [mouseLeaveTimer]);
70
+ const handleMouseLeave = (0, _react.useCallback)(() => {
71
+ setMouseLeaveTimer(setTimeout(() => {
72
+ setToolTipIsVisible(false); // @ts-expect-error (error: blur does not exists on type never)
73
+
74
+ /* istanbul ignore next */
75
+
76
+ (0, _has2.default)(['current', 'blur'], buttonRef) && buttonRef.current.blur();
77
+ }, 500));
78
+ }, []);
79
+ const handleKeyPress = (0, _react.useCallback)(event => {
80
+ (0, _tooltip.toggleStateOnKeyPress)(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);
81
+ }, [toolTipIsVisible]);
82
+ const iconWrapperClassName = (0, _react.useMemo)(() => (0, _classnames.default)(_favorite.default.favorite, className, favorite && _favorite.default.selected), [className, favorite]);
83
+ const icon = (0, _react.useMemo)(() => favorite ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyCheck // eslint-disable-next-line css-modules/no-undef-class
84
+ , {
62
85
  className: _favorite.default.checkIcon,
63
86
  style: {
64
87
  color: brandColor
65
88
  },
66
89
  width: 13,
67
90
  height: 13,
91
+ "data-testid": "favorite-check-icon",
68
92
  "aria-label": ariaLabel.removeFromFavorite
69
93
  }) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationMore, {
70
94
  className: _favorite.default.moreIcon,
@@ -73,8 +97,38 @@ const Favorite = ({
73
97
  },
74
98
  width: 13,
75
99
  height: 13,
100
+ "data-testid": "favorite-add-icon",
76
101
  "aria-label": ariaLabel.addToFavorite
77
- })));
102
+ }), [ariaLabel.addToFavorite, ariaLabel.removeFromFavorite, brandColor, darkColor, favorite]);
103
+ return /*#__PURE__*/_react.default.createElement("div", {
104
+ className: _favorite.default.favoriteWrapper,
105
+ "data-testid": "favorite-wrapper"
106
+ }, /*#__PURE__*/_react.default.createElement("button", {
107
+ ref: buttonRef,
108
+ type: "button",
109
+ "data-for": favoriteButtonAnchorId,
110
+ "data-tooltip-place": "left",
111
+ "data-tip": allowToolTip,
112
+ "data-name": "favorite",
113
+ "data-testid": "favorite-button",
114
+ "aria-label": ariaLabel.favorite,
115
+ className: iconWrapperClassName,
116
+ onClick: handleFavoriteClick,
117
+ style: {
118
+ color: primaryColor
119
+ },
120
+ onKeyDown: handleKeyPress,
121
+ onMouseLeave: handleMouseLeave,
122
+ onMouseOver: handleMouseOver,
123
+ tabIndex: 0
124
+ }, icon), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
125
+ fontSize: 12,
126
+ anchorId: favoriteButtonAnchorId,
127
+ toolTipIsVisible: toolTipIsVisible,
128
+ TooltipContent: toolTipContent,
129
+ closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text'),
130
+ stickyOnKeyboardNavigation: true
131
+ }));
78
132
  };
79
133
 
80
134
  Favorite.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -91,7 +145,8 @@ Favorite.propTypes = process.env.NODE_ENV !== "production" ? {
91
145
  })
92
146
  } : {};
93
147
  Favorite.contextTypes = {
94
- skin: _provider.default.childContextTypes.skin
148
+ skin: _provider.default.childContextTypes.skin,
149
+ translate: _provider.default.childContextTypes.translate
95
150
  };
96
151
  var _default = Favorite;
97
152
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"favorite.js","names":["Favorite","favorite","addFavoriteToolTip","removeFavoriteToolTip","className","ariaLabel","onFavoriteClick","disabled","legacyContext","skin","GetSkinFromContext","handleFavoriteClick","useCallback","e","stopPropagation","preventDefault","primaryColor","darkColor","brandColor","toolTipView","useMemo","style","showToolTip","blocFavorite","classnames","selected","color","checkIcon","removeFromFavorite","moreIcon","addToFavorite","propTypes","PropTypes","string","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/molecule/card/favorite.js"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, noop} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport style from './favorite.css';\n\nconst Favorite = (\n {\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n className,\n 'aria-label': ariaLabel = {},\n onFavoriteClick = noop,\n disabled\n },\n legacyContext\n) => {\n const skin = GetSkinFromContext(legacyContext);\n const handleFavoriteClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n if (!disabled) onFavoriteClick(e);\n },\n [disabled, onFavoriteClick]\n );\n\n const primaryColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const brandColor = get('common.brand', skin);\n\n const toolTipView = useMemo(\n () =>\n !isEmpty(removeFavoriteToolTip) && !isEmpty(addFavoriteToolTip) ? (\n <div className={style.showToolTip}>\n <span>{favorite ? removeFavoriteToolTip : addFavoriteToolTip}</span>\n </div>\n ) : null,\n [addFavoriteToolTip, favorite, removeFavoriteToolTip]\n );\n\n return (\n <div className={style.blocFavorite}>\n {toolTipView}\n <div\n data-name=\"favorite\"\n aria-label={ariaLabel.favorite}\n className={classnames(style.favorite, className, favorite && style.selected)}\n onClick={handleFavoriteClick}\n style={{\n color: primaryColor\n }}\n >\n {favorite ? (\n <CheckIcon\n className={style.checkIcon}\n style={{color: brandColor}}\n width={13}\n height={13}\n aria-label={ariaLabel.removeFromFavorite}\n />\n ) : (\n <MoreIcon\n className={style.moreIcon}\n style={{color: darkColor}}\n width={13}\n height={13}\n aria-label={ariaLabel.addToFavorite}\n />\n )}\n </div>\n </div>\n );\n};\n\nFavorite.propTypes = {\n className: PropTypes.string,\n favorite: PropTypes.bool,\n disabled: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onFavoriteClick: PropTypes.func,\n 'aria-label': PropTypes.shape({\n favorite: PropTypes.string,\n addToFavorite: PropTypes.string,\n removeFromFavorite: PropTypes.string\n })\n};\n\nFavorite.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default Favorite;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CACf;EACEC,QADF;EAEEC,kBAFF;EAGEC,qBAHF;EAIEC,SAJF;EAKE,cAAcC,SAAS,GAAG,EAL5B;EAMEC,eAAe,iBANjB;EAOEC;AAPF,CADe,EAUfC,aAVe,KAWZ;EACH,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAMG,mBAAmB,GAAG,IAAAC,kBAAA,EAC1BC,CAAC,IAAI;IACHA,CAAC,CAACC,eAAF;IACAD,CAAC,CAACE,cAAF;IACA,IAAI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E,KAAK,EAAE,EAHT;IAIE,MAAM,EAAE,EAJV;IAKE,cAAYZ,SAAS,CAACyB;EALxB,EAlBJ,CAFF,CADF;AAgCD,CApED;;AAsEA9B,QAAQ,CAAC+B,SAAT,2CAAqB;EACnB3B,SAAS,EAAE4B,kBAAA,CAAUC,MADF;EAEnBhC,QAAQ,EAAE+B,kBAAA,CAAUE,IAFD;EAGnB3B,QAAQ,EAAEyB,kBAAA,CAAUE,IAHD;EAInBhC,kBAAkB,EAAE8B,kBAAA,CAAUC,MAJX;EAKnB9B,qBAAqB,EAAE6B,kBAAA,CAAUC,MALd;EAMnB3B,eAAe,EAAE0B,kBAAA,CAAUG,IANR;EAOnB,cAAcH,kBAAA,CAAUI,KAAV,CAAgB;IAC5BnC,QAAQ,EAAE+B,kBAAA,CAAUC,MADQ;IAE5BH,aAAa,EAAEE,kBAAA,CAAUC,MAFG;IAG5BL,kBAAkB,EAAEI,kBAAA,CAAUC;EAHF,CAAhB;AAPK,CAArB;AAcAjC,QAAQ,CAACqC,YAAT,GAAwB;EACtB5B,IAAI,EAAE6B,iBAAA,CAASC,iBAAT,CAA2B9B;AADX,CAAxB;eAIeT,Q"}
1
+ {"version":3,"file":"favorite.js","names":["Favorite","favorite","addFavoriteToolTip","removeFavoriteToolTip","className","ariaLabel","onFavoriteClick","disabled","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","handleFavoriteClick","useCallback","e","stopPropagation","preventDefault","primaryColor","darkColor","brandColor","buttonRef","useRef","allowToolTip","useMemo","favoriteButtonAnchorId","useState","uuidV5","URL","undefined","toolTipContent","mouseLeaveTimer","setMouseLeaveTimer","toolTipIsVisible","setToolTipIsVisible","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","toggleStateOnKeyPress","iconWrapperClassName","classnames","style","selected","icon","checkIcon","color","removeFromFavorite","moreIcon","addToFavorite","favoriteWrapper","propTypes","PropTypes","string","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/molecule/card/favorite.js"],"sourcesContent":["import React, {useCallback, useMemo, useRef, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport {get, has, isEmpty, noop} from 'lodash/fp';\nimport {\n NovaCompositionNavigationMore as MoreIcon,\n NovaCompositionCoorpacademyCheck as CheckIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport ToolTip, {toggleStateOnKeyPress} from '../../atom/tooltip';\nimport style from './favorite.css';\n\nconst Favorite = (\n {\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n className,\n 'aria-label': ariaLabel = {},\n onFavoriteClick = noop,\n disabled\n },\n legacyContext\n) => {\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n const handleFavoriteClick = useCallback(\n e => {\n e.stopPropagation();\n e.preventDefault();\n if (!disabled) onFavoriteClick(e);\n },\n [disabled, onFavoriteClick]\n );\n\n const primaryColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const brandColor = get('common.brand', skin);\n\n const buttonRef = useRef(null);\n\n const allowToolTip = useMemo(\n () => !isEmpty(removeFavoriteToolTip) && !isEmpty(addFavoriteToolTip),\n [addFavoriteToolTip, removeFavoriteToolTip]\n );\n\n // to be replaced by useId when React17 is bumped to React18\n const [favoriteButtonAnchorId] = useState(\n allowToolTip ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const toolTipContent = useMemo(\n // eslint-disable-next-line no-nested-ternary\n () => (allowToolTip ? (favorite ? removeFavoriteToolTip : addFavoriteToolTip) : null),\n [addFavoriteToolTip, favorite, removeFavoriteToolTip, allowToolTip]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500)\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const iconWrapperClassName = useMemo(\n () => classnames(style.favorite, className, favorite && style.selected),\n [className, favorite]\n );\n const icon = useMemo(\n () =>\n favorite ? (\n <CheckIcon\n // eslint-disable-next-line css-modules/no-undef-class\n className={style.checkIcon}\n style={{color: brandColor}}\n width={13}\n height={13}\n data-testid=\"favorite-check-icon\"\n aria-label={ariaLabel.removeFromFavorite}\n />\n ) : (\n <MoreIcon\n className={style.moreIcon}\n style={{color: darkColor}}\n width={13}\n height={13}\n data-testid=\"favorite-add-icon\"\n aria-label={ariaLabel.addToFavorite}\n />\n ),\n [ariaLabel.addToFavorite, ariaLabel.removeFromFavorite, brandColor, darkColor, favorite]\n );\n\n return (\n <div className={style.favoriteWrapper} data-testid=\"favorite-wrapper\">\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={favoriteButtonAnchorId}\n data-tooltip-place=\"left\"\n data-tip={allowToolTip}\n data-name=\"favorite\"\n data-testid=\"favorite-button\"\n aria-label={ariaLabel.favorite}\n className={iconWrapperClassName}\n onClick={handleFavoriteClick}\n style={{\n color: primaryColor\n }}\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n tabIndex={0}\n >\n {icon}\n </button>\n <ToolTip\n fontSize={12}\n anchorId={favoriteButtonAnchorId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={toolTipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n stickyOnKeyboardNavigation\n />\n </div>\n );\n};\n\nFavorite.propTypes = {\n className: PropTypes.string,\n favorite: PropTypes.bool,\n disabled: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onFavoriteClick: PropTypes.func,\n 'aria-label': PropTypes.shape({\n favorite: PropTypes.string,\n addToFavorite: PropTypes.string,\n removeFromFavorite: PropTypes.string\n })\n};\n\nFavorite.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default Favorite;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AAIA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG,CACf;EACEC,QADF;EAEEC,kBAFF;EAGEC,qBAHF;EAIEC,SAJF;EAKE,cAAcC,SAAS,GAAG,EAL5B;EAMEC,eAAe,iBANjB;EAOEC;AAPF,CADe,EAUfC,aAVe,KAWZ;EACH,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAMG,SAAS,GAAG,IAAAC,iCAAA,EAAwBJ,aAAxB,CAAlB;EACA,MAAMK,mBAAmB,GAAG,IAAAC,kBAAA,EAC1BC,CAAC,IAAI;IACHA,CAAC,CAACC,eAAF;IACAD,CAAC,CAACE,cAAF;IACA,IAAI,CAACV,QAAL,EAAeD,eAAe,CAACS,CAAD,CAAf;EAChB,CALyB,EAM1B,CAACR,QAAD,EAAWD,eAAX,CAN0B,CAA5B;EASA,MAAMY,YAAY,GAAG,mBAAI,gBAAJ,EAAsBT,IAAtB,CAArB;EACA,MAAMU,SAAS,GAAG,mBAAI,aAAJ,EAAmBV,IAAnB,CAAlB;EACA,MAAMW,UAAU,GAAG,mBAAI,cAAJ,EAAoBX,IAApB,CAAnB;EAEA,MAAMY,SAAS,GAAG,IAAAC,aAAA,EAAO,IAAP,CA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ADX;EAEtBE,SAAS,EAAEoD,iBAAA,CAASC,iBAAT,CAA2BrD;AAFhB,CAAxB;eAKeX,Q"}
@@ -20,7 +20,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
20
20
  const Selectable = props => {
21
21
  const {
22
22
  isSelected,
23
- hidden = false,
23
+ hidden,
24
24
  'aria-label': ariaLabel = {}
25
25
  } = props;
26
26
  if ((0, _isUndefined2.default)(isSelected)) return null;
@@ -1 +1 @@
1
- {"version":3,"file":"selectable.js","names":["Selectable","props","isSelected","hidden","ariaLabel","classnames","style","selectable","selected","circle","iconWrapper","addIcon","select","checkIcon","unSelect","hideIcon","hide","showIcon","show","propTypes","PropTypes","bool","shape","string"],"sources":["../../../src/molecule/card/selectable.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isUndefined} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaLineContentEditionHide as HideIcon,\n NovaCompositionCoorpacademyEye as ShowIcon\n} from '@coorpacademy/nova-icons';\nimport style from './selectable.css';\n\nconst Selectable = props => {\n const {isSelected, hidden = false, 'aria-label': ariaLabel = {}} = props;\n\n if (isUndefined(isSelected)) return null;\n\n return (\n <div\n className={classnames(style.selectable, isSelected && style.selected, hidden && style.hidden)}\n >\n <div className={style.circle} />\n <div className={style.iconWrapper}>\n <AddIcon className={style.addIcon} aria-label={ariaLabel.select} />\n <CheckIcon className={style.checkIcon} aria-label={ariaLabel.unSelect} />\n <HideIcon className={style.hideIcon} aria-label={ariaLabel.hide} />\n <ShowIcon className={style.showIcon} aria-label={ariaLabel.show} />\n </div>\n </div>\n );\n};\n\nSelectable.propTypes = {\n isSelected: PropTypes.bool,\n hidden: PropTypes.bool,\n 'aria-label': PropTypes.shape({\n select: PropTypes.string,\n unSelect: PropTypes.string\n })\n};\n\nexport default Selectable;\n"],"mappings":";;;;;;;AAAA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able","props","isSelected","hidden","ariaLabel","classnames","style","selectable","selected","circle","iconWrapper","addIcon","select","checkIcon","unSelect","hideIcon","hide","showIcon","show","propTypes","PropTypes","bool","shape","string"],"sources":["../../../src/molecule/card/selectable.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isUndefined} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaLineContentEditionHide as HideIcon,\n NovaCompositionCoorpacademyEye as ShowIcon\n} from '@coorpacademy/nova-icons';\nimport style from './selectable.css';\n\nconst Selectable = props => {\n const {isSelected, hidden, 'aria-label': ariaLabel = {}} = props;\n\n if (isUndefined(isSelected)) return null;\n\n return (\n <div\n className={classnames(style.selectable, isSelected && style.selected, hidden && style.hidden)}\n >\n <div className={style.circle} />\n <div className={style.iconWrapper}>\n <AddIcon className={style.addIcon} aria-label={ariaLabel.select} />\n <CheckIcon className={style.checkIcon} aria-label={ariaLabel.unSelect} />\n <HideIcon className={style.hideIcon} aria-label={ariaLabel.hide} />\n <ShowIcon className={style.showIcon} aria-label={ariaLabel.show} />\n </div>\n </div>\n );\n};\n\nSelectable.propTypes = {\n isSelected: PropTypes.bool,\n hidden: PropTypes.bool,\n 'aria-label': PropTypes.shape({\n select: PropTypes.string,\n unSelect: PropTypes.string\n })\n};\n\nexport default Selectable;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAMA;;;;AAEA,MAAMA,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IAACC,UAAD;IAAaC,MAAb;IAAqB,cAAcC,SAAS,GAAG;EAA/C,IAAqDH,KAA3D;EAEA,IAAI,2BAAYC,UAAZ,CAAJ,EAA6B,OAAO,IAAP;EAE7B,oBACE;IACE,SAAS,EAAE,IAAAG,mBAAA,EAAWC,mBAAA,CAAMC,UAAjB,EAA6BL,UAAU,IAAII,mBAAA,CAAME,QAAjD,EAA2DL,MAAM,IAAIG,mBAAA,CAAMH,MAA3E;EADb,gBAGE;IAAK,SAAS,EAAEG,mBAAA,CAAMG;EAAtB,EAHF,eAIE;IAAK,SAAS,EAAEH,mBAAA,CAAMI;EAAtB,gBACE,6BAAC,uCAAD;IAAS,SAAS,EAAEJ,mBAAA,CAAMK,OAA1B;IAAmC,cAAYP,SAAS,CAACQ;EAAzD,EADF,eAEE,6BAAC,sCAAD;IAAW,SAAS,EAAEN,mBAAA,CAAMO,SAA5B;IAAuC,cAAYT,SAAS,CAACU;EAA7D,EAFF,eAGE,6BAAC,qCAAD;IAAU,SAAS,EAAER,mBAAA,CAAMS,QAA3B;IAAqC,cAAYX,SAAS,CAACY;EAA3D,EAHF,eAIE,6BAAC,yCAAD;IAAU,SAAS,EAAEV,mBAAA,CAAMW,QAA3B;IAAqC,cAAYb,SAAS,CAACc;EAA3D,EAJF,CAJF,CADF;AAaD,CAlBD;;AAoBAlB,UAAU,CAACmB,SAAX,2CAAuB;EACrBjB,UAAU,EAAEkB,kBAAA,CAAUC,IADD;EAErBlB,MAAM,EAAEiB,kBAAA,CAAUC,IAFG;EAGrB,cAAcD,kBAAA,CAAUE,KAAV,CAAgB;IAC5BV,MAAM,EAAEQ,kBAAA,CAAUG,MADU;IAE5BT,QAAQ,EAAEM,kBAAA,CAAUG;EAFQ,CAAhB;AAHO,CAAvB;eASevB,U"}
@@ -33,10 +33,10 @@
33
33
  font-family: Gilroy;
34
34
  font-size: 16px;
35
35
  font-weight: bold;
36
- overflow: hidden;
37
- white-space: nowrap;
38
- display: inline-block;
39
- text-overflow: ellipsis;
36
+ overflow:hidden;
37
+ white-space:nowrap;
38
+ display:inline-block;
39
+ text-overflow:ellipsis;
40
40
  width: 100%;
41
41
  }
42
42
 
@@ -59,3 +59,5 @@
59
59
  min-height: 56px;
60
60
  min-width: 56px;
61
61
  }
62
+
63
+
@@ -13,18 +13,15 @@
13
13
  background: transparent;
14
14
  margin: 8px 0;
15
15
  border-radius: 7px;
16
- transform: translate(0, 0);
16
+ transform:translate(0,0);
17
17
  z-index: 0;
18
18
  }
19
-
20
- .draggable:hover {
19
+ .draggable:hover{
21
20
  background: rgba(0, 0, 0, 0.3);
22
21
  }
23
-
24
- .draggable:active {
22
+ .draggable:active{
25
23
  background: transparent;
26
24
  }
27
-
28
25
  .draggable:before {
29
26
  content: '.';
30
27
  position: absolute;
@@ -35,10 +32,9 @@
35
32
  font-size: 25px;
36
33
  color: medium;
37
34
  pointer-events: none;
38
- text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
39
- 5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
35
+ text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
36
+ 5px 0 medium , 5px 5px medium, 5px 10px medium, 5px 15px medium;
40
37
  }
41
-
42
38
  .dragging {
43
39
  background: rgba(0, 0, 0, 0.1);
44
40
  }
@@ -6,7 +6,7 @@ declare function DraggableList({ items, onDrop, itemType }: {
6
6
  }): JSX.Element;
7
7
  declare namespace DraggableList {
8
8
  namespace propTypes {
9
- const items: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
9
+ const items: PropTypes.Requireable<(PropTypes.InferProps<{
10
10
  title: PropTypes.Validator<string>;
11
11
  onUp: PropTypes.Requireable<(...args: any[]) => any>;
12
12
  onDown: PropTypes.Requireable<(...args: any[]) => any>;
@@ -43,55 +43,7 @@ declare namespace DraggableList {
43
43
  }> | null | undefined)[]>;
44
44
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
45
45
  }>>;
46
- }> | PropTypes.InferProps<{
47
- 'aria-label': PropTypes.Requireable<PropTypes.InferProps<{
48
- title: PropTypes.Requireable<string>;
49
- author: PropTypes.Requireable<string>;
50
- modules: PropTypes.Requireable<string>;
51
- position: PropTypes.Requireable<string>;
52
- }>>;
53
- image: PropTypes.Requireable<string>;
54
- badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
55
- category: PropTypes.Requireable<string>;
56
- label: PropTypes.Requireable<string>;
57
- }> | null | undefined)[]>;
58
- title: PropTypes.Requireable<string>;
59
- author: PropTypes.Requireable<string>;
60
- position: PropTypes.Requireable<number>;
61
- id: PropTypes.Requireable<string>;
62
- }> | PropTypes.InferProps<{
63
- bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
64
- buttonAriaLabel: PropTypes.Requireable<string>;
65
- menuAriaLabel: PropTypes.Requireable<string>;
66
- buttons: PropTypes.Requireable<(PropTypes.InferProps<{
67
- 'data-name': PropTypes.Requireable<string>;
68
- label: PropTypes.Requireable<string>;
69
- type: PropTypes.Requireable<string>;
70
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
71
- }> | null | undefined)[]>;
72
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
73
- }>>;
74
- buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
75
- type: PropTypes.Requireable<string>;
76
- label: PropTypes.Requireable<string>;
77
- ariaLabel: PropTypes.Requireable<string>;
78
- dataName: PropTypes.Requireable<string>;
79
- icon: PropTypes.Requireable<PropTypes.InferProps<{
80
- position: PropTypes.Requireable<string>;
81
- type: PropTypes.Requireable<string>;
82
- }>>;
83
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
84
- }>>;
85
- tags: PropTypes.Requireable<(PropTypes.InferProps<{
86
- label: PropTypes.Requireable<string>;
87
- type: PropTypes.Requireable<string>;
88
- }> | null | undefined)[]>;
89
- title: PropTypes.Validator<string>;
90
- order: PropTypes.Requireable<number>;
91
- 'aria-label': PropTypes.Requireable<string>;
92
- contentType: PropTypes.Requireable<string>;
93
- id: PropTypes.Requireable<string>;
94
- }> | null | undefined> | null | undefined)[]>;
46
+ }> | null | undefined)[]>;
95
47
  const onDrop: PropTypes.Requireable<(...args: any[]) => any>;
96
48
  const itemType: PropTypes.Requireable<string>;
97
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAaA;;;;gBAmDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAQA;;;;gBAmDC"}
@@ -13,8 +13,6 @@ var _setupSection = _interopRequireDefault(require("../setup-section"));
13
13
 
14
14
  var _courseSection = _interopRequireDefault(require("../course-section"));
15
15
 
16
- var _listItem = _interopRequireDefault(require("../../organism/list-item"));
17
-
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
17
 
20
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -25,8 +23,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
25
23
 
26
24
  const ITEMS = {
27
25
  'setup-section': _setupSection.default,
28
- 'course-section': _courseSection.default,
29
- 'list-item': _listItem.default
26
+ 'course-section': _courseSection.default
30
27
  };
31
28
 
32
29
  const DraggableList = ({
@@ -67,7 +64,7 @@ const DraggableList = ({
67
64
  };
68
65
 
69
66
  DraggableList.propTypes = process.env.NODE_ENV !== "production" ? {
70
- items: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape(_setupSection.default.propTypes), _propTypes.default.shape(_courseSection.default.propTypes), _propTypes.default.shape(_listItem.default.propTypes)])),
67
+ items: _propTypes.default.arrayOf(_propTypes.default.shape(_setupSection.default.propTypes)),
71
68
  onDrop: _propTypes.default.func,
72
69
  itemType: _propTypes.default.string
73
70
  } : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ITEMS","SetupSection","CourseSection","ListItem","DraggableList","items","onDrop","itemType","dragTo","setDragTo","useState","dragFrom","setDragFrom","dragStartHandler","useCallback","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","PropTypes","arrayOf","oneOfType","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\nimport ListItem from '../../organism/list-item';\n\nconst ITEMS = {\n 'setup-section': SetupSection,\n 'course-section': CourseSection,\n 'list-item': ListItem\n};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map(item => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape(SetupSection.propTypes),\n PropTypes.shape(CourseSection.propTypes),\n PropTypes.shape(ListItem.propTypes)\n ])\n ),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZ,iBAAiBC,qBADL;EAEZ,kBAAkBC,sBAFN;EAGZ,aAAaC;A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AAKc,IAAI,CAACP,EAH5B;IAIE,WAAW,EAAEF,gBAJf;IAKE,UAAU,EAAEG,eALd;IAME,WAAW,EAAEC,gBANf;IAOE,MAAM,EAAEC;EAPV,gBASE,6BAAC,IAAD,eAAUI,IAAV;IAAgB,GAAG,EAAEA,IAAI,CAACP;EAA1B,GATF,CADgB,CAAlB;EAaA,oBAAO,0CAAMK,SAAN,CAAP;AACD,CAnDD;;AAqDAhB,aAAa,CAACmB,SAAd,2CAA0B;EACxBlB,KAAK,EAAEmB,kBAAA,CAAUC,OAAV,CACLD,kBAAA,CAAUE,SAAV,CAAoB,CAClBF,kBAAA,CAAUG,KAAV,CAAgB1B,qBAAA,CAAasB,SAA7B,CADkB,EAElBC,kBAAA,CAAUG,KAAV,CAAgBzB,sBAAA,CAAcqB,SAA9B,CAFkB,EAGlBC,kBAAA,CAAUG,KAAV,CAAgBxB,iBAAA,CAASoB,SAAzB,CAHkB,CAApB,CADK,CADiB;EAQxBjB,MAAM,EAAEkB,kBAAA,CAAUI,IARM;EASxBrB,QAAQ,EAAEiB,kBAAA,CAAUK;AATI,CAA1B;eAYezB,a"}
1
+ {"version":3,"file":"index.js","names":["ITEMS","SetupSection","CourseSection","DraggableList","items","onDrop","itemType","dragTo","setDragTo","useState","dragFrom","setDragFrom","dragStartHandler","useCallback","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","PropTypes","arrayOf","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\n\nconst ITEMS = {'setup-section': SetupSection, 'course-section': CourseSection};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map(item => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,KAAK,GAAG;EAAC,iBAAiBC,qBAAlB;EAAgC,kBAAkBC;AAAlD,CAAd;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,MAAR;EAAgBC;AAAhB,CAAD,KAA+B;EACnD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAS,IAAT,CAA5B;EACA,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,IAAAF,eAAA,EAAS,IAAT,CAAhC;EAEA,MAAMG,gBAAgB,GAAG,IAAAC,kBAAA,EACvBC,EAAE,IAAI;IACJH,WAAW,CAACG,EAAD,CAAX;EACD,CAHsB,EAIvB,CAACH,WAAD,CAJuB,CAAzB;EAOA,MAAMI,eAAe,GAAG,IAAAF,kBAAA,EACtBC,EAAE,IAAI;IACJ,IAAIP,MAAM,KAAKO,EAAf,EAAmB;IACnBN,SAAS,CAACM,EAAD,C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B;eAMexB,a"}
@@ -32,7 +32,6 @@ declare namespace ListItem {
32
32
  order: PropTypes.Requireable<number>;
33
33
  'aria-label': PropTypes.Requireable<string>;
34
34
  contentType: PropTypes.Requireable<string>;
35
- id: PropTypes.Requireable<string>;
36
35
  };
37
36
  }
38
37
  import PropTypes from "prop-types";
@@ -91,8 +91,7 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
91
91
  title: _propTypes.default.string.isRequired,
92
92
  order: _propTypes.default.number,
93
93
  'aria-label': _propTypes.default.string,
94
- contentType: _propTypes.default.string,
95
- id: _propTypes.default.string
94
+ contentType: _propTypes.default.string
96
95
  } : {};
97
96
  var _default = ListItem;
98
97
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string,\n id: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IACJC,qBADI;IAEJC,UAFI;IAGJC,IAHI;IAIJC,KAJI;IAKJC,KALI;IAMJ,cAAcC,SANV;IAOJC;EAPI,IAQFR,KARJ;;EASA,MAAMS,QAAQ,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,GAAD,EAAMC,KAAN,KAAgB;IACzDZ,WAAW,GAAGW,GAAG,CAACE,IAAJ,KAAa,WAA3B;IACA,oBACE;MAAK,GAAG,EAAED,KAAV;MAAiB,SAAS,EAAEE,cAAA,CAAMH;IAAlC,gBACE,6BA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R,IAAI,EAAEO,kBAAA,CAAUG,MADU;IAE1BI,KAAK,EAAEP,kBAAA,CAAUG,MAFS;IAG1BjB,SAAS,EAAEc,kBAAA,CAAUG,MAHK;IAI1BO,QAAQ,EAAEV,kBAAA,CAAUG,MAJM;IAK1BQ,IAAI,EAAEX,kBAAA,CAAUC,KAAV,CAAgB;MACpBW,QAAQ,EAAEZ,kBAAA,CAAUG,MADA;MAEpBV,IAAI,EAAEO,kBAAA,CAAUG;IAFI,CAAhB,CALoB;IAS1BK,OAAO,EAAER,kBAAA,CAAUS;EATO,CAAhB,CAdO;EAyBnB1B,IAAI,EAAEiB,kBAAA,CAAUM,OAAV,CACJN,kBAAA,CAAUC,KAAV,CAAgB;IACdM,KAAK,EAAEP,kBAAA,CAAUG,MADH;IAEdV,IAAI,EAAEO,kBAAA,CAAUa,KAAV,CAAgB,CAAC,WAAD,EAAc,OAAd,EAAuB,UAAvB,EAAmC,SAAnC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CAzBa;EA+BnB7B,KAAK,EAAEgB,kBAAA,CAAUG,MAAV,CAAiBW,UA/BL;EAgCnB7B,KAAK,EAAEe,kBAAA,CAAUe,MAhCE;EAiCnB,cAAcf,kBAAA,CAAUG,MAjCL;EAkCnBhB,WAAW,EAAEa,kBAAA,CAAUG,MAlCJ;EAmCnBa,EAAE,EAAEhB,kBAAA,CAAUG;AAnCK,CAArB;eAsCezB,Q"}
1
+ {"version":3,"file":"index.js","names":["ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","style","wrapper","orderWrapper","settings","edit","propTypes","PropTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,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AUG;AAlCJ,CAArB;eAqCezB,Q"}
@@ -33,17 +33,17 @@
33
33
  text-align: left;
34
34
  text-overflow: ellipsis;
35
35
  white-space: nowrap;
36
-
36
+
37
37
  }
38
38
 
39
39
  .settings {
40
40
  align-items: center;
41
41
  display: flex;
42
- height: 100%;
42
+ height: 100%;
43
43
  }
44
44
 
45
45
  .tag {
46
- margin: 0 16px 0 0;
46
+ margin: 0 16px 0 0;
47
47
  text-overflow: ellipsis;
48
48
  white-space: nowrap;
49
49
  }
@@ -64,10 +64,8 @@
64
64
  color: cm_grey_400;
65
65
  margin: 0 16px 0 0;
66
66
  }
67
-
68
67
  .orderWrapper {
69
68
  align-items: center;
70
69
  display: flex;
71
70
  width: 100%;
72
- margin-left: 24px;
73
- }
71
+ }
@@ -1,11 +1,10 @@
1
1
  export default ListItems;
2
- declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType, onDrop }: {
2
+ declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType }: {
3
3
  title: any;
4
4
  buttonLink: any;
5
5
  items: any;
6
6
  "aria-label": any;
7
7
  contentType: any;
8
- onDrop: any;
9
8
  }): JSX.Element;
10
9
  declare namespace ListItems {
11
10
  const propTypes: {
@@ -61,11 +60,9 @@ declare namespace ListItems {
61
60
  order: PropTypes.Requireable<number>;
62
61
  'aria-label': PropTypes.Requireable<string>;
63
62
  contentType: PropTypes.Requireable<string>;
64
- id: PropTypes.Requireable<string>;
65
63
  }> | null | undefined)[]>;
66
64
  title: PropTypes.Requireable<string>;
67
65
  contentType: PropTypes.Requireable<string>;
68
- onDrop: PropTypes.Requireable<(...args: any[]) => any>;
69
66
  };
70
67
  }
71
68
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAkCA;;;;;;;gBAcC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAOA;;;;;;gBAsBC"}
@@ -5,14 +5,10 @@ exports.default = void 0;
5
5
 
6
6
  var _react = _interopRequireDefault(require("react"));
7
7
 
8
- var _findIndex = _interopRequireDefault(require("lodash/fp/findIndex"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
9
 
12
10
  var _listItem = _interopRequireDefault(require("../list-item"));
13
11
 
14
- var _draggableList = _interopRequireDefault(require("../../molecule/draggable-list"));
15
-
16
12
  var _title = _interopRequireDefault(require("../../atom/title"));
17
13
 
18
14
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
@@ -23,17 +19,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
19
 
24
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
21
 
26
- const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
27
- const isPublished = (0, _findIndex.default)({
28
- type: 'published'
29
- }, items[0]?.tags) !== -1;
30
- if (isPublished && contentType === 'certification') return /*#__PURE__*/_react.default.createElement(_draggableList.default, {
31
- items: items.map(item => _extends({}, item, {
32
- contentType
33
- })),
34
- itemType: "list-item",
35
- onDrop: onDrop
36
- });
22
+ const ListItems = ({
23
+ title,
24
+ buttonLink,
25
+ items,
26
+ 'aria-label': ariaLabel,
27
+ contentType
28
+ }) => {
37
29
  const itemsView = items.map((item, index) => /*#__PURE__*/_react.default.createElement("li", {
38
30
  key: item.id,
39
31
  className: _style.default.item,
@@ -42,21 +34,6 @@ const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
42
34
  order: index,
43
35
  contentType: contentType
44
36
  }))));
45
- return /*#__PURE__*/_react.default.createElement("ul", {
46
- className: _style.default.list,
47
- "aria-label": ariaLabel,
48
- "data-name": 'content-list'
49
- }, itemsView);
50
- };
51
-
52
- const ListItems = ({
53
- title,
54
- buttonLink,
55
- items,
56
- 'aria-label': ariaLabel,
57
- contentType,
58
- onDrop
59
- }) => {
60
37
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
61
38
  className: _style.default.header
62
39
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -67,7 +44,11 @@ const ListItems = ({
67
44
  "data-name": 'list-title'
68
45
  })), /*#__PURE__*/_react.default.createElement("div", {
69
46
  className: _style.default.buttonCreate
70
- }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink))), buildItemsView(items, contentType, onDrop, ariaLabel));
47
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink))), /*#__PURE__*/_react.default.createElement("ul", {
48
+ className: _style.default.list,
49
+ "aria-label": ariaLabel,
50
+ "data-name": 'content-list'
51
+ }, itemsView));
71
52
  };
72
53
 
73
54
  ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -75,8 +56,7 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
75
56
  buttonLink: _propTypes.default.shape(_buttonLink.default.propTypes),
76
57
  items: _propTypes.default.arrayOf(_propTypes.default.shape(_listItem.default.propTypes)),
77
58
  title: _propTypes.default.string,
78
- contentType: _propTypes.default.string,
79
- onDrop: _propTypes.default.func
59
+ contentType: _propTypes.default.string
80
60
  } : {};
81
61
  var _default = ListItems;
82
62
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","findIndex","type","tags","map","item","itemsView","index","id","style","list","ListItems","title","buttonLink","header","buttonCreate","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem","func"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport findIndex from 'lodash/fp/findIndex';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsView = (items, contentType, onDrop, ariaLabel) => {\n const isPublished = findIndex({type: 'published'}, items[0]?.tags) !== -1;\n\n if (isPublished && contentType === 'certification')\n return (\n <DraggableList\n items={items.map(item => ({...item, contentType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n );\n\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType, onDrop}) => {\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n {buildItemsView(items, contentType, onDrop, ariaLabel)}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string,\n onDrop: PropTypes.func\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAG,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,KAA2C;EAChE,MAAMC,WAAW,GAAG,IAAAC,kBAAA,EAAU;IAACC,IAAI,EAAE;EAAP,CAAV,EAA+BN,KAAK,CAAC,CAAD,CAAL,EAAUO,IAAzC,MAAmD,CAAC,CAAxE;EAEA,IAAIH,WAAW,IAAIH,WAAW,KAAK,eAAnC,EACE,oBACE,6BAAC,sBAAD;IACE,KAAK,EAAED,KAAK,CAACQ,GAAN,CAAUC,I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kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBJ,KAAK,EAAEK,kBAAA,CAAUC,MAJG;EAKpBrB,WAAW,EAAEoB,kBAAA,CAAUC,MALH;EAMpBpB,MAAM,EAAEmB,kBAAA,CAAUM;AANE,CAAtB;eASeZ,S"}
1
+ {"version":3,"file":"index.js","names":["ListItems","title","buttonLink","items","ariaLabel","contentType","itemsView","map","item","index","id","style","header","buttonCreate","list","propTypes","PropTypes","string","shape","ButtonLink","arrayOf","ListItem"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC,SAAzC;EAAoDC;AAApD,CAAD,KAAsE;EACtF,MAAMC,SAAS,GAAGH,KAAK,CAACI,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEC,cAAA,CAAMH,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,6BAAC,iBAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC,KAA3B;IAAkC,WAAW,EAAEJ;EAA/C,GADF,CADgB,CAAlB;EAMA,oBACE,uDACE;IAAK,SAAS,EAAEM,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAMV;EAAtB,gBACE,6BAAC,cAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAEU,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD,EAAgBX,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAES,cAAA,CAAMG,IAArB;IAA2B,cAAYV,SAAvC;IAAkD,aAAW;EAA7D,GACGE,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAN,SAAS,CAACe,SAAV,2CAAsB;EACpB,cAAcC,kBAAA,CAAUC,MADJ;EAEpBf,UAAU,EAAEc,kBAAA,CAAUE,KAAV,CAAgBC,mBAAA,CAAWJ,SAA3B,CAFQ;EAGpBZ,KAAK,EAAEa,kBAAA,CAAUI,OAAV,CAAkBJ,kBAAA,CAAUE,KAAV,CAAgBG,iBAAA,CAASN,SAAzB,CAAlB,CAHa;EAIpBd,KAAK,EAAEe,kBAAA,CAAUC,MAJG;EAKpBZ,WAAW,EAAEW,kBAAA,CAAUC;AALH,CAAtB;eAQejB,S"}
@@ -1522,10 +1522,8 @@ declare namespace BrandUpdate {
1522
1522
  order: PropTypes.Requireable<number>;
1523
1523
  'aria-label': PropTypes.Requireable<string>;
1524
1524
  contentType: PropTypes.Requireable<string>;
1525
- id: PropTypes.Requireable<string>;
1526
1525
  }> | null | undefined)[]>;
1527
1526
  title: PropTypes.Requireable<string>;
1528
- onDrop: PropTypes.Requireable<(...args: any[]) => any>;
1529
1527
  }> | PropTypes.InferProps<{
1530
1528
  key: PropTypes.Requireable<string>;
1531
1529
  type: PropTypes.Requireable<string>;