@coorpacademy/components 11.32.21 → 11.32.23-alpha.2
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/es/atom/radio-with-title/index.d.ts +3 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +3 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/tag/index.d.ts +5 -1
- package/es/atom/tag/index.d.ts.map +1 -1
- package/es/atom/tag/index.js +6 -3
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/title/index.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts +7 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +12 -0
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +4 -2
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/molecule/learning-priority-modal/index.d.ts +30 -0
- package/es/molecule/learning-priority-modal/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-modal/index.js +242 -0
- package/es/molecule/learning-priority-modal/index.js.map +1 -0
- package/es/molecule/learning-priority-modal/style.css +70 -0
- package/es/molecule/learning-priority-setup-item/index.d.ts +18 -0
- package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
- package/es/molecule/learning-priority-setup-item/index.js +83 -0
- package/es/molecule/learning-priority-setup-item/index.js.map +1 -0
- package/es/molecule/learning-priority-setup-item/style.css +47 -0
- package/es/molecule/playlist-detail-cover/index.d.ts +14 -0
- package/es/molecule/playlist-detail-cover/index.d.ts.map +1 -0
- package/es/molecule/playlist-detail-cover/index.js +52 -0
- package/es/molecule/playlist-detail-cover/index.js.map +1 -0
- package/es/molecule/playlist-detail-cover/style.css +17 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +167 -0
- package/es/organism/brand-learning-priorities/index.d.ts.map +1 -0
- package/es/organism/brand-learning-priorities/index.js +128 -0
- package/es/organism/brand-learning-priorities/index.js.map +1 -0
- package/es/organism/brand-learning-priorities/style.css +40 -0
- package/es/organism/list-item/index.d.ts +34 -2
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +58 -14
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +25 -1
- package/es/organism/list-items/index.d.ts +4 -0
- package/es/organism/rewards-form/index.d.ts +3 -0
- package/es/organism/select-opponents/index.d.ts +3 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +3 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/title-and-input/index.d.ts +6 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +6 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +3 -0
- package/es/template/app-player/loading/index.d.ts +7 -0
- package/es/template/app-player/player/index.d.ts +14 -0
- package/es/template/app-player/player/slides/index.d.ts +7 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +7 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +7 -0
- package/es/template/app-review/index.d.ts +7 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +7 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +7 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +149 -0
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +7 -0
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/common/dashboard/index.d.ts +14 -0
- package/es/template/common/search-page/index.d.ts +7 -0
- package/es/template/external-course/index.d.ts +7 -0
- package/es/template/playlist-detail/index.d.ts +96 -0
- package/es/template/playlist-detail/index.d.ts.map +1 -0
- package/es/template/playlist-detail/index.js +112 -0
- package/es/template/playlist-detail/index.js.map +1 -0
- package/es/template/playlist-detail/style.css +109 -0
- package/es/template/skill-detail/all-courses.d.ts +1 -1
- package/es/template/skill-detail/all-courses.js +3 -3
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/es/template/skill-detail/index.d.ts +39 -4
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +2 -4
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/variables/courses.d.ts +3 -0
- package/es/variables/courses.d.ts.map +1 -0
- package/es/variables/courses.js +3 -0
- package/es/variables/courses.js.map +1 -0
- package/lib/atom/radio-with-title/index.d.ts +3 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +3 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/tag/index.d.ts +5 -1
- package/lib/atom/tag/index.d.ts.map +1 -1
- package/lib/atom/tag/index.js +6 -3
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/title/index.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts +7 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +12 -0
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +5 -2
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/molecule/learning-priority-modal/index.d.ts +30 -0
- package/lib/molecule/learning-priority-modal/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-modal/index.js +265 -0
- package/lib/molecule/learning-priority-modal/index.js.map +1 -0
- package/lib/molecule/learning-priority-modal/style.css +70 -0
- package/lib/molecule/learning-priority-setup-item/index.d.ts +18 -0
- package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -0
- package/lib/molecule/learning-priority-setup-item/index.js +100 -0
- package/lib/molecule/learning-priority-setup-item/index.js.map +1 -0
- package/lib/molecule/learning-priority-setup-item/style.css +47 -0
- package/lib/molecule/playlist-detail-cover/index.d.ts +14 -0
- package/lib/molecule/playlist-detail-cover/index.d.ts.map +1 -0
- package/lib/molecule/playlist-detail-cover/index.js +68 -0
- package/lib/molecule/playlist-detail-cover/index.js.map +1 -0
- package/lib/molecule/playlist-detail-cover/style.css +17 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +167 -0
- package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -0
- package/lib/organism/brand-learning-priorities/index.js +147 -0
- package/lib/organism/brand-learning-priorities/index.js.map +1 -0
- package/lib/organism/brand-learning-priorities/style.css +40 -0
- package/lib/organism/list-item/index.d.ts +34 -2
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +62 -16
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +25 -1
- package/lib/organism/list-items/index.d.ts +4 -0
- package/lib/organism/rewards-form/index.d.ts +3 -0
- package/lib/organism/select-opponents/index.d.ts +3 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +3 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +6 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +6 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +3 -0
- package/lib/template/app-player/loading/index.d.ts +7 -0
- package/lib/template/app-player/player/index.d.ts +14 -0
- package/lib/template/app-player/player/slides/index.d.ts +7 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +7 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +7 -0
- package/lib/template/app-review/index.d.ts +7 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +7 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +7 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +149 -0
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +8 -0
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +14 -0
- package/lib/template/common/search-page/index.d.ts +7 -0
- package/lib/template/external-course/index.d.ts +7 -0
- package/lib/template/playlist-detail/index.d.ts +96 -0
- package/lib/template/playlist-detail/index.d.ts.map +1 -0
- package/lib/template/playlist-detail/index.js +137 -0
- package/lib/template/playlist-detail/index.js.map +1 -0
- package/lib/template/playlist-detail/style.css +109 -0
- package/lib/template/skill-detail/all-courses.d.ts +1 -1
- package/lib/template/skill-detail/all-courses.js +3 -3
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts +39 -4
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +3 -2
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/variables/courses.d.ts +3 -0
- package/lib/variables/courses.d.ts.map +1 -0
- package/lib/variables/courses.js +7 -0
- package/lib/variables/courses.js.map +1 -0
- package/locales/bs/global.json +13 -1
- package/locales/cs/global.json +13 -1
- package/locales/de/global.json +13 -1
- package/locales/en/global.json +12 -0
- package/locales/es/global.json +13 -1
- package/locales/et/global.json +13 -1
- package/locales/fi/global.json +13 -1
- package/locales/fr/global.json +13 -1
- package/locales/hr/global.json +13 -1
- package/locales/hu/global.json +13 -1
- package/locales/hy/global.json +13 -1
- package/locales/it/global.json +13 -1
- package/locales/ja/global.json +13 -1
- package/locales/ko/global.json +13 -1
- package/locales/nl/global.json +13 -1
- package/locales/pl/global.json +13 -1
- package/locales/pt/global.json +13 -1
- package/locales/ro/global.json +13 -1
- package/locales/ru/global.json +13 -1
- package/locales/sk/global.json +13 -1
- package/locales/sl/global.json +13 -1
- package/locales/sv/global.json +13 -1
- package/locales/tl/global.json +13 -1
- package/locales/tr/global.json +13 -1
- package/locales/uk/global.json +13 -1
- package/locales/vi/global.json +13 -1
- package/locales/zh/global.json +13 -1
- package/locales/zh_TW/global.json +13 -1
- package/package.json +2 -2
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _cssColorFunction = require("css-color-function");
|
|
13
|
+
|
|
14
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
15
|
+
|
|
16
|
+
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
17
|
+
|
|
18
|
+
var _select = require("../../atom/select");
|
|
19
|
+
|
|
20
|
+
var _draggableList = _interopRequireDefault(require("../../molecule/draggable-list"));
|
|
21
|
+
|
|
22
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
23
|
+
|
|
24
|
+
var _learningPriorityModal = _interopRequireDefault(require("../../molecule/learning-priority-modal"));
|
|
25
|
+
|
|
26
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
const BrandLearningPriorities = (props, context) => {
|
|
37
|
+
const {
|
|
38
|
+
content,
|
|
39
|
+
priorities,
|
|
40
|
+
filters,
|
|
41
|
+
isLoading,
|
|
42
|
+
onAdd
|
|
43
|
+
} = props;
|
|
44
|
+
const {
|
|
45
|
+
items,
|
|
46
|
+
onDrop,
|
|
47
|
+
itemType
|
|
48
|
+
} = content;
|
|
49
|
+
const [itemList, setItemList] = (0, _react.useState)([...items]);
|
|
50
|
+
const [openModal, setOpenModal] = (0, _react.useState)(false);
|
|
51
|
+
const {
|
|
52
|
+
skin,
|
|
53
|
+
translate
|
|
54
|
+
} = context;
|
|
55
|
+
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
56
|
+
const selectedPriorities = (0, _react.useMemo)(() => items.map(priority => priority.priorityRef), [items]);
|
|
57
|
+
const handleDropItem = (0, _react.useCallback)((dragRef, dropRef) => {
|
|
58
|
+
const dragIndex = itemList.findIndex(item => item.priorityRef === dragRef);
|
|
59
|
+
const dropIndex = itemList.findIndex(item => item.priorityRef === dropRef);
|
|
60
|
+
if (dragIndex === dropIndex) return;
|
|
61
|
+
const newItems = [...itemList];
|
|
62
|
+
const [dragItem] = newItems.splice(dragIndex, 1);
|
|
63
|
+
newItems.splice(dropIndex, 0, dragItem);
|
|
64
|
+
setItemList(newItems);
|
|
65
|
+
onDrop(newItems.map(item => {
|
|
66
|
+
return {
|
|
67
|
+
type: item.type,
|
|
68
|
+
ref: item.priorityRef
|
|
69
|
+
};
|
|
70
|
+
}));
|
|
71
|
+
}, [itemList, setItemList, onDrop]);
|
|
72
|
+
const Loading = (0, _react.useCallback)(() => /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
className: _style.default.loading
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, null)), []);
|
|
75
|
+
(0, _react.useEffect)(() => {
|
|
76
|
+
setItemList(items);
|
|
77
|
+
}, [items]);
|
|
78
|
+
const handleOpenModal = (0, _react.useCallback)(() => setOpenModal(true), [setOpenModal]);
|
|
79
|
+
const handleCloseModal = (0, _react.useCallback)(() => setOpenModal(false), [setOpenModal]);
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
className: _style.default.container
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(_learningPriorityModal.default, {
|
|
83
|
+
isLoading: isLoading,
|
|
84
|
+
isOpen: openModal,
|
|
85
|
+
onCancel: handleCloseModal,
|
|
86
|
+
onClose: handleCloseModal,
|
|
87
|
+
onAdd: onAdd,
|
|
88
|
+
priorities: priorities,
|
|
89
|
+
filters: filters,
|
|
90
|
+
preselected: selectedPriorities
|
|
91
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: _style.default.LPtitle
|
|
93
|
+
}, translate('learning_priorities')), /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
+
className: _style.default.LPdescription
|
|
95
|
+
}, translate('learning_priorities_brand_description')), isLoading ? /*#__PURE__*/_react.default.createElement(Loading, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: _style.default.ctaWrapper
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: _style.default.priorityCount
|
|
99
|
+
}, `${items.length} ${translate('items')}`), /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
100
|
+
customStyle: {
|
|
101
|
+
backgroundColor: primarySkinColor,
|
|
102
|
+
color: '#FFFFFF',
|
|
103
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
|
|
104
|
+
width: 'fit-content'
|
|
105
|
+
},
|
|
106
|
+
hoverBackgroundColor: (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`),
|
|
107
|
+
hoverColor: primarySkinColor,
|
|
108
|
+
onClick: handleOpenModal,
|
|
109
|
+
label: translate('add_learning_priority'),
|
|
110
|
+
"data-name": "add-learning-priority",
|
|
111
|
+
icon: {
|
|
112
|
+
position: 'left',
|
|
113
|
+
faIcon: {
|
|
114
|
+
name: 'plus',
|
|
115
|
+
backgroundColor: primarySkinColor,
|
|
116
|
+
color: '#FFFFFF',
|
|
117
|
+
size: 16
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
})), /*#__PURE__*/_react.default.createElement(_draggableList.default, {
|
|
121
|
+
itemType: itemType,
|
|
122
|
+
items: itemList,
|
|
123
|
+
onDrop: handleDropItem
|
|
124
|
+
})));
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
BrandLearningPriorities.contextTypes = {
|
|
128
|
+
skin: _provider.default.childContextTypes.skin,
|
|
129
|
+
translate: _provider.default.childContextTypes.translate
|
|
130
|
+
};
|
|
131
|
+
BrandLearningPriorities.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
132
|
+
content: _propTypes.default.shape(_draggableList.default.propTypes),
|
|
133
|
+
priorities: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
134
|
+
ref: _propTypes.default.string,
|
|
135
|
+
title: _propTypes.default.string,
|
|
136
|
+
courses: _propTypes.default.number,
|
|
137
|
+
type: _propTypes.default.string
|
|
138
|
+
})),
|
|
139
|
+
filters: _propTypes.default.arrayOf(_propTypes.default.shape(_extends({}, _select.SelectOptionPropTypes, {
|
|
140
|
+
count: _propTypes.default.number
|
|
141
|
+
}))),
|
|
142
|
+
isLoading: _propTypes.default.bool,
|
|
143
|
+
onAdd: _propTypes.default.func
|
|
144
|
+
} : {};
|
|
145
|
+
var _default = BrandLearningPriorities;
|
|
146
|
+
exports.default = _default;
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["BrandLearningPriorities","props","context","content","priorities","filters","isLoading","onAdd","items","onDrop","itemType","itemList","setItemList","useState","openModal","setOpenModal","skin","translate","primarySkinColor","selectedPriorities","useMemo","map","priority","priorityRef","handleDropItem","useCallback","dragRef","dropRef","dragIndex","findIndex","item","dropIndex","newItems","dragItem","splice","type","ref","Loading","style","loading","useEffect","handleOpenModal","handleCloseModal","container","LPtitle","LPdescription","ctaWrapper","priorityCount","length","backgroundColor","color","transition","width","convert","position","faIcon","name","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","DraggableList","arrayOf","string","title","courses","number","SelectOptionPropTypes","count","bool","func"],"sources":["../../../src/organism/brand-learning-priorities/index.js"],"sourcesContent":["import React, {useState, useCallback, useMemo, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport DraggableList from '../../molecule/draggable-list';\nimport ButtonLink from '../../atom/button-link';\nimport LearningPriorityModal from '../../molecule/learning-priority-modal';\nimport style from './style.css';\n\nconst BrandLearningPriorities = (props, context) => {\n const {content, priorities, filters, isLoading, onAdd} = props;\n const {items, onDrop, itemType} = content;\n const [itemList, setItemList] = useState([...items]);\n const [openModal, setOpenModal] = useState(false);\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const selectedPriorities = useMemo(() => items.map(priority => priority.priorityRef), [items]);\n\n const handleDropItem = useCallback(\n (dragRef, dropRef) => {\n const dragIndex = itemList.findIndex(item => item.priorityRef === dragRef);\n const dropIndex = itemList.findIndex(item => item.priorityRef === dropRef);\n\n if (dragIndex === dropIndex) return;\n\n const newItems = [...itemList];\n const [dragItem] = newItems.splice(dragIndex, 1);\n newItems.splice(dropIndex, 0, dragItem);\n\n setItemList(newItems);\n onDrop(\n newItems.map(item => {\n return {type: item.type, ref: item.priorityRef};\n })\n );\n },\n [itemList, setItemList, onDrop]\n );\n\n const Loading = useCallback(\n () => (\n <div className={style.loading}>\n <Loader />\n </div>\n ),\n []\n );\n\n useEffect(() => {\n setItemList(items);\n }, [items]);\n\n const handleOpenModal = useCallback(() => setOpenModal(true), [setOpenModal]);\n const handleCloseModal = useCallback(() => setOpenModal(false), [setOpenModal]);\n return (\n <div className={style.container}>\n <LearningPriorityModal\n isLoading={isLoading}\n isOpen={openModal}\n onCancel={handleCloseModal}\n onClose={handleCloseModal}\n onAdd={onAdd}\n priorities={priorities}\n filters={filters}\n preselected={selectedPriorities}\n />\n <div className={style.LPtitle}>{translate('learning_priorities')}</div>\n <div className={style.LPdescription}>\n {translate('learning_priorities_brand_description')}\n </div>\n\n {isLoading ? (\n <Loading />\n ) : (\n <>\n <div className={style.ctaWrapper}>\n <div className={style.priorityCount}>{`${items.length} ${translate('items')}`}</div>\n <ButtonLink\n customStyle={{\n backgroundColor: primarySkinColor,\n color: '#FFFFFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n }}\n hoverBackgroundColor={convert(`color(${primarySkinColor} a(0.07))`)}\n hoverColor={primarySkinColor}\n onClick={handleOpenModal}\n label={translate('add_learning_priority')}\n data-name=\"add-learning-priority\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'plus',\n backgroundColor: primarySkinColor,\n color: '#FFFFFF',\n size: 16\n }\n }}\n />\n </div>\n <DraggableList itemType={itemType} items={itemList} onDrop={handleDropItem} />\n </>\n )}\n </div>\n );\n};\n\nBrandLearningPriorities.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nBrandLearningPriorities.propTypes = {\n content: PropTypes.shape(DraggableList.propTypes),\n priorities: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.string\n })\n ),\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n ...SelectOptionPropTypes,\n count: PropTypes.number\n })\n ),\n isLoading: PropTypes.bool,\n onAdd: PropTypes.func\n};\n\nexport default BrandLearningPriorities;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,uBAAuB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAClD,MAAM;IAACC,OAAD;IAAUC,UAAV;IAAsBC,OAAtB;IAA+BC,SAA/B;IAA0CC;EAA1C,IAAmDN,KAAzD;EACA,MAAM;IAACO,KAAD;IA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UlC7D,OAAO,EAAEyD,kBAAA,CAAUG,OAAV,CACPH,kBAAA,CAAUC,KAAV,cACKO,6BADL;IAEEC,KAAK,EAAET,kBAAA,CAAUO;EAFnB,GADO,CAVyB;EAgBlC/D,SAAS,EAAEwD,kBAAA,CAAUU,IAhBa;EAiBlCjE,KAAK,EAAEuD,kBAAA,CAAUW;AAjBiB,CAApC;eAoBezE,uB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_500 from colors;
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
font-family: "Gilroy";
|
|
6
|
+
font-style: normal;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.LPtitle {
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
line-height: 24px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.LPdescription {
|
|
17
|
+
color: cm_grey_500;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: 20px;
|
|
21
|
+
max-width: 620px;
|
|
22
|
+
margin-bottom: 32px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.loading {
|
|
26
|
+
position: relative;
|
|
27
|
+
height: 200px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ctaWrapper {
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
margin-bottom: 16px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.priorityCount {
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
line-height: 22px;
|
|
40
|
+
}
|
|
@@ -1,20 +1,50 @@
|
|
|
1
1
|
export default ListItem;
|
|
2
|
-
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, dataColumns, order, "aria-label": ariaLabel, contentType, isBulkStyle, isOverflowHidden }: {
|
|
2
|
+
declare function ListItem({ buttonLink, secondButtonLink, bulletPointMenuButton, tags, title, selected, subtitle, dataColumns, order, "aria-label": ariaLabel, disabled, contentType, isBulkStyle, isOverflowHidden, onClick }: {
|
|
3
3
|
buttonLink: any;
|
|
4
4
|
secondButtonLink: any;
|
|
5
5
|
bulletPointMenuButton: any;
|
|
6
6
|
tags: any;
|
|
7
7
|
title: any;
|
|
8
|
+
selected: any;
|
|
9
|
+
subtitle: any;
|
|
8
10
|
dataColumns: any;
|
|
9
11
|
order: any;
|
|
10
12
|
"aria-label": any;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
11
14
|
contentType: any;
|
|
12
15
|
isBulkStyle?: boolean | undefined;
|
|
13
16
|
isOverflowHidden?: boolean | undefined;
|
|
14
|
-
|
|
17
|
+
onClick?: import("lodash/fp").LodashNoop | undefined;
|
|
18
|
+
}, context: any): JSX.Element;
|
|
15
19
|
declare namespace ListItem {
|
|
20
|
+
namespace contextTypes {
|
|
21
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
common: PropTypes.Requireable<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}>;
|
|
25
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
27
|
+
logo: PropTypes.Requireable<any>;
|
|
28
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
29
|
+
login: PropTypes.Requireable<any>;
|
|
30
|
+
}>>;
|
|
31
|
+
icons: PropTypes.Requireable<{
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
}>;
|
|
34
|
+
mod: PropTypes.Requireable<{
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
courses: PropTypes.Requireable<any[]>;
|
|
38
|
+
texts: PropTypes.Requireable<{
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
}>;
|
|
41
|
+
}>>;
|
|
42
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
}
|
|
16
44
|
const propTypes: {
|
|
17
45
|
title: PropTypes.Validator<string>;
|
|
46
|
+
subtitle: PropTypes.Requireable<string>;
|
|
47
|
+
selected: PropTypes.Requireable<boolean>;
|
|
18
48
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
19
49
|
label: PropTypes.Requireable<string>;
|
|
20
50
|
type: PropTypes.Requireable<string>;
|
|
@@ -57,6 +87,8 @@ declare namespace ListItem {
|
|
|
57
87
|
label: PropTypes.Requireable<string>;
|
|
58
88
|
type: PropTypes.Requireable<string>;
|
|
59
89
|
}> | null | undefined)[]>;
|
|
90
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
91
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
60
92
|
isBulkStyle: PropTypes.Requireable<boolean>;
|
|
61
93
|
isOverflowHidden: PropTypes.Requireable<boolean>;
|
|
62
94
|
order: PropTypes.Requireable<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;;8BAuGC"}
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
+
|
|
8
|
+
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
9
|
+
|
|
6
10
|
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
|
|
7
11
|
|
|
8
12
|
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
@@ -11,10 +15,16 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
15
|
|
|
12
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
17
|
|
|
18
|
+
var _cssColorFunction = require("css-color-function");
|
|
19
|
+
|
|
14
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
21
|
|
|
22
|
+
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
23
|
+
|
|
16
24
|
var _tag = _interopRequireDefault(require("../../atom/tag"));
|
|
17
25
|
|
|
26
|
+
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
27
|
+
|
|
18
28
|
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
19
29
|
|
|
20
30
|
var _bulletPointMenuButton = _interopRequireDefault(require("../../molecule/bullet-point-menu-button"));
|
|
@@ -23,59 +33,93 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
23
33
|
|
|
24
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
35
|
|
|
26
|
-
|
|
36
|
+
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); }
|
|
37
|
+
|
|
27
38
|
const ListItem = ({
|
|
28
39
|
buttonLink,
|
|
29
40
|
secondButtonLink,
|
|
30
41
|
bulletPointMenuButton,
|
|
31
42
|
tags,
|
|
32
43
|
title,
|
|
44
|
+
selected,
|
|
45
|
+
subtitle,
|
|
33
46
|
dataColumns,
|
|
34
47
|
order,
|
|
35
48
|
'aria-label': ariaLabel,
|
|
49
|
+
disabled = false,
|
|
36
50
|
contentType,
|
|
37
51
|
isBulkStyle = false,
|
|
38
|
-
isOverflowHidden = false
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
isOverflowHidden = false,
|
|
53
|
+
onClick = _noop2.default
|
|
54
|
+
}, context) => {
|
|
55
|
+
const {
|
|
56
|
+
skin
|
|
57
|
+
} = context;
|
|
58
|
+
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
59
|
+
|
|
60
|
+
const mapUncapped = _map2.default.convert({
|
|
43
61
|
cap: false
|
|
44
|
-
})
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
let isPublished = false;
|
|
65
|
+
const selectedStyle = selected ? {
|
|
66
|
+
backgroundColor: (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.07))`)
|
|
67
|
+
} : {};
|
|
68
|
+
const tagSelectedStyle = selected ? {
|
|
69
|
+
backgroundColor: (0, _cssColorFunction.convert)(`color(${primarySkinColor} a(0.15))`),
|
|
70
|
+
color: primarySkinColor
|
|
71
|
+
} : {};
|
|
72
|
+
const tagsView = mapUncapped((tag, index) => {
|
|
45
73
|
isPublished = tag.type === 'success';
|
|
46
74
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
75
|
key: index,
|
|
48
76
|
className: _style.default.tag
|
|
49
|
-
}, /*#__PURE__*/_react.default.createElement(_tag.default, tag
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_tag.default, _extends({}, tag, {
|
|
78
|
+
customStyle: tagSelectedStyle
|
|
79
|
+
})));
|
|
50
80
|
})(tags);
|
|
51
|
-
|
|
52
|
-
const dataColumnsView = _map2.default.convert({
|
|
53
|
-
cap: false
|
|
54
|
-
})((dataColumn, index) => {
|
|
81
|
+
const dataColumnsView = mapUncapped((dataColumn, index) => {
|
|
55
82
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
56
83
|
key: index,
|
|
57
84
|
className: _style.default[dataColumn.className]
|
|
58
85
|
}, dataColumn.type ? /*#__PURE__*/_react.default.createElement(_tag.default, dataColumn) : dataColumn.label);
|
|
59
86
|
})(dataColumns);
|
|
60
|
-
|
|
61
87
|
const orderView = order !== null && order !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
62
88
|
className: _style.default.order,
|
|
63
89
|
"aria-label": ariaLabel
|
|
64
90
|
}, order + 1) : null;
|
|
65
91
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
-
className: (0, _classnames.default)(_style.default.wrapper, isBulkStyle && _style.default.gridLayout)
|
|
92
|
+
className: (0, _classnames.default)(_style.default.wrapper, isBulkStyle && _style.default.gridLayout, subtitle && _style.default.withSubtitle, disabled && _style.default.disabled, onClick !== _noop2.default && !disabled && _style.default.cursorPointer),
|
|
93
|
+
onClick: !disabled ? onClick : undefined,
|
|
94
|
+
style: selectedStyle
|
|
67
95
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
96
|
className: (0, _classnames.default)(_style.default.dataColumnsWrapper, isOverflowHidden && _style.default.hiddenOverflowX)
|
|
69
97
|
}, isPublished && contentType === 'certification' ? orderView : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
70
98
|
className: _style.default.title,
|
|
71
99
|
title: title
|
|
72
|
-
}, title
|
|
100
|
+
}, title, subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: _style.default.subtitle
|
|
102
|
+
}, subtitle) : null), dataColumnsView), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
103
|
className: _style.default.settings
|
|
74
|
-
}, tagsView,
|
|
104
|
+
}, tagsView, selected ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
105
|
+
iconName: "circle-check",
|
|
106
|
+
iconColor: primarySkinColor,
|
|
107
|
+
backgroundColor: '#ffffff',
|
|
108
|
+
size: {
|
|
109
|
+
faSize: 16,
|
|
110
|
+
wrapperSize: 16
|
|
111
|
+
}
|
|
112
|
+
}) : null, buttonLink ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink) : null, secondButtonLink ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, secondButtonLink) : null, !(0, _isEmpty2.default)(bulletPointMenuButton) ? /*#__PURE__*/_react.default.createElement(_bulletPointMenuButton.default, bulletPointMenuButton) : null));
|
|
75
113
|
};
|
|
76
114
|
|
|
115
|
+
ListItem.contextTypes = {
|
|
116
|
+
skin: _provider.default.childContextTypes.skin,
|
|
117
|
+
translate: _provider.default.childContextTypes.translate
|
|
118
|
+
};
|
|
77
119
|
ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
78
120
|
title: _propTypes.default.string.isRequired,
|
|
121
|
+
subtitle: _propTypes.default.string,
|
|
122
|
+
selected: _propTypes.default.bool,
|
|
79
123
|
dataColumns: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
80
124
|
label: _propTypes.default.string,
|
|
81
125
|
type: _propTypes.default.oneOf(['success', 'failure', 'warning', 'progress', 'default']),
|
|
@@ -118,6 +162,8 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
118
162
|
label: _propTypes.default.string,
|
|
119
163
|
type: _propTypes.default.oneOf(['success', 'failure', 'warning', 'progress', 'default'])
|
|
120
164
|
})),
|
|
165
|
+
disabled: _propTypes.default.bool,
|
|
166
|
+
onClick: _propTypes.default.func,
|
|
121
167
|
isBulkStyle: _propTypes.default.bool,
|
|
122
168
|
isOverflowHidden: _propTypes.default.bool,
|
|
123
169
|
order: _propTypes.default.number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ListItem","buttonLink","secondButtonLink","bulletPointMenuButton","tags","title","dataColumns","order","ariaLabel","contentType","isBulkStyle","isOverflowHidden","isPublished","tagsView","convert","cap","tag","index","type","style","dataColumnsView","dataColumn","className","label","orderView","undefined","classnames","wrapper","gridLayout","dataColumnsWrapper","hiddenOverflowX","settings","propTypes","PropTypes","string","isRequired","arrayOf","shape","oneOf","dataName","icon","position","onClick","func","buttonAriaLabel","menuAriaLabel","buttons","bool","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst ListItem = ({\n buttonLink,\n secondButtonLink,\n bulletPointMenuButton,\n tags,\n title,\n dataColumns,\n order,\n 'aria-label': ariaLabel,\n contentType,\n isBulkStyle = false,\n isOverflowHidden = false\n}) => {\n let isPublished = false;\n\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'success';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n\n const dataColumnsView = map.convert({cap: false})((dataColumn, index) => {\n return (\n <div key={index} className={style[dataColumn.className]}>\n {dataColumn.type ? <Tag {...dataColumn} /> : dataColumn.label}\n </div>\n );\n })(dataColumns);\n\n const orderView =\n order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null;\n\n return (\n <div className={classnames(style.wrapper, isBulkStyle && style.gridLayout)}>\n <div\n className={classnames(style.dataColumnsWrapper, isOverflowHidden && style.hiddenOverflowX)}\n >\n {isPublished && contentType === 'certification' ? orderView : null}\n <div className={style.title} title={title}>\n {title}\n </div>\n {dataColumnsView}\n </div>\n\n <div className={style.settings}>\n {tagsView}\n {buttonLink ? <ButtonLink {...buttonLink} /> : null}\n {secondButtonLink ? <ButtonLink {...secondButtonLink} /> : null}\n {!isEmpty(bulletPointMenuButton) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} />\n ) : null}\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n title: PropTypes.string.isRequired,\n dataColumns: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),\n className: PropTypes.oneOf(['cell', 'title'])\n })\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 secondButtonLink: 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 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 tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])\n })\n ),\n isBulkStyle: PropTypes.bool,\n isOverflowHidden: PropTypes.bool,\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;;;;AADA;AAGA,MAAMA,QAAQ,GAAG,CAAC;EAChBC,UADgB;EAEhBC,gBAFgB;EAGhBC,qBAHgB;EAIhBC,IAJgB;EAKhBC,KALgB;EAMhBC,WANgB;EAOhBC,KAPgB;EAQhB,cAAcC,SARE;EAShBC,WATgB;EAUhBC,WAAW,GAAG,KAVE;EAWhBC,gBAAgB,GAAG;AAXH,CAAD,KAYX;EACJ,IAAIC,WAAW,GAAG,KAAlB;;EAEA,MAAMC,QAAQ,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0B,CAACC,GAAD,EAAMC,KAAN,KAAgB;IACzDL,WAAW,GAAGI,GAAG,CAACE,IAAJ,KAAa,SAA3B;IACA,oBACE;MAAK,GAAG,EAAED,KAAV;MAAiB,SAAS,EAAEE,cAAA,CAAMH;IAAlC,gBACE,6BAAC,YAAD,EAASA,GAAT,CADF,CADF;EAKD,CAPg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CAAUC,MADA;MAEpBhB,IAAI,EAAEe,kBAAA,CAAUC;IAFI,CAAhB,CAL0B;IAShCQ,OAAO,EAAET,kBAAA,CAAUU;EATa,CAAhB,CApBC;EA+BnBxC,qBAAqB,EAAE8B,kBAAA,CAAUI,KAAV,CAAgB;IACrCO,eAAe,EAAEX,kBAAA,CAAUC,MADU;IAErCW,aAAa,EAAEZ,kBAAA,CAAUC,MAFY;IAGrCY,OAAO,EAAEb,kBAAA,CAAUG,OAAV,CACPH,kBAAA,CAAUI,KAAV,CAAgB;MACd,aAAaJ,kBAAA,CAAUC,MADT;MAEdX,KAAK,EAAEU,kBAAA,CAAUC,MAFH;MAGdhB,IAAI,EAAEe,kBAAA,CAAUC,MAHF;MAIdQ,OAAO,EAAET,kBAAA,CAAUU;IAJL,CAAhB,CADO,CAH4B;IAWrCD,OAAO,EAAET,kBAAA,CAAUU;EAXkB,CAAhB,CA/BJ;EA4CnBvC,IAAI,EAAE6B,kBAAA,CAAUG,OAAV,CACJH,kBAAA,CAAUI,KAAV,CAAgB;IACdd,KAAK,EAAEU,kBAAA,CAAUC,MADH;IAEdhB,IAAI,EAAEe,kBAAA,CAAUK,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,SAAvB,EAAkC,UAAlC,EAA8C,SAA9C,CAAhB;EAFQ,CAAhB,CADI,CA5Ca;EAkDnB5B,WAAW,EAAEuB,kBAAA,CAAUc,IAlDJ;EAmDnBpC,gBAAgB,EAAEsB,kBAAA,CAAUc,IAnDT;EAoDnBxC,KAAK,EAAE0B,kBAAA,CAAUe,MApDE;EAqDnB,cAAcf,kBAAA,CAAUC,MArDL;EAsDnBzB,WAAW,EAAEwB,kBAAA,CAAUC,MAtDJ;EAuDnBe,EAAE,EAAEhB,kBAAA,CAAUC;AAvDK,CAArB;eA0DelC,Q"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ListItem","buttonLink","secondButtonLink","bulletPointMenuButton","tags","title","selected","subtitle","dataColumns","order","ariaLabel","disabled","contentType","isBulkStyle","isOverflowHidden","onClick","context","skin","primarySkinColor","mapUncapped","convert","cap","isPublished","selectedStyle","backgroundColor","tagSelectedStyle","color","tagsView","tag","index","type","style","dataColumnsView","dataColumn","className","label","orderView","undefined","classnames","wrapper","gridLayout","withSubtitle","cursorPointer","dataColumnsWrapper","hiddenOverflowX","settings","faSize","wrapperSize","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","string","isRequired","bool","arrayOf","shape","oneOf","dataName","icon","position","func","buttonAriaLabel","menuAriaLabel","buttons","number","id"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, noop, get} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst ListItem = (\n {\n buttonLink,\n secondButtonLink,\n bulletPointMenuButton,\n tags,\n title,\n selected,\n subtitle,\n dataColumns,\n order,\n 'aria-label': ariaLabel,\n disabled = false,\n contentType,\n isBulkStyle = false,\n isOverflowHidden = false,\n onClick = noop\n },\n context\n) => {\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n const mapUncapped = map.convert({cap: false});\n let isPublished = false;\n\n const selectedStyle = selected\n ? {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`)\n }\n : {};\n\n const tagSelectedStyle = selected\n ? {\n backgroundColor: convert(`color(${primarySkinColor} a(0.15))`),\n color: primarySkinColor\n }\n : {};\n\n const tagsView = mapUncapped((tag, index) => {\n isPublished = tag.type === 'success';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} customStyle={tagSelectedStyle} />\n </div>\n );\n })(tags);\n\n const dataColumnsView = mapUncapped((dataColumn, index) => {\n return (\n <div key={index} className={style[dataColumn.className]}>\n {dataColumn.type ? <Tag {...dataColumn} /> : dataColumn.label}\n </div>\n );\n })(dataColumns);\n\n const orderView =\n order !== null && order !== undefined ? (\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n ) : null;\n\n return (\n <div\n className={classnames(\n style.wrapper,\n isBulkStyle && style.gridLayout,\n subtitle && style.withSubtitle,\n disabled && style.disabled,\n onClick !== noop && !disabled && style.cursorPointer\n )}\n onClick={!disabled ? onClick : undefined}\n style={selectedStyle}\n >\n <div\n className={classnames(style.dataColumnsWrapper, isOverflowHidden && style.hiddenOverflowX)}\n >\n {isPublished && contentType === 'certification' ? orderView : null}\n <div className={style.title} title={title}>\n {title}\n {subtitle ? <div className={style.subtitle}>{subtitle}</div> : null}\n </div>\n {dataColumnsView}\n </div>\n\n <div className={style.settings}>\n {tagsView}\n {selected ? (\n <Icon\n iconName=\"circle-check\"\n iconColor={primarySkinColor}\n backgroundColor={'#ffffff'}\n size={{faSize: 16, wrapperSize: 16}}\n />\n ) : null}\n {buttonLink ? <ButtonLink {...buttonLink} /> : null}\n {secondButtonLink ? <ButtonLink {...secondButtonLink} /> : null}\n {!isEmpty(bulletPointMenuButton) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} />\n ) : null}\n </div>\n </div>\n );\n};\n\nListItem.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nListItem.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n selected: PropTypes.bool,\n dataColumns: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),\n className: PropTypes.oneOf(['cell', 'title'])\n })\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 secondButtonLink: 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 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 tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])\n })\n ),\n disabled: PropTypes.bool,\n onClick: PropTypes.func,\n isBulkStyle: PropTypes.bool,\n isOverflowHidden: PropTypes.bool,\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;;AACA;;AACA;;AACA;;AAEA;;;;;;AAEA,MAAMA,QAAQ,GAAG,CACf;EACEC,UADF;EAEEC,gBAFF;EAGEC,qBAHF;EAIEC,IAJF;EAKEC,KALF;EAMEC,QANF;EAOEC,QAPF;EAQEC,WARF;EASEC,KATF;EAUE,cAAcC,SAVhB;EAWEC,QAAQ,GAAG,KAXb;EAYEC,WAZF;EAaEC,WAAW,GAAG,KAbhB;EAcEC,gBAAgB,GAAG,KAdrB;EAeEC,OAAO;AAfT,CADe,EAkBfC,OAlBe,KAmBZ;EACH,MAAM;IAACC;EAAD,IAASD,OAAf;EACA,MAAME,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBD,IAAtB,CAAzB;;EACA,MAAME,WAAW,GAAG,cAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,CAApB;;EACA,IA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,MAxDE;EAyDnB,cAAcd,kBAAA,CAAUC,MAzDL;EA0DnB1C,WAAW,EAAEyC,kBAAA,CAAUC,MA1DJ;EA2DnBc,EAAE,EAAEf,kBAAA,CAAUC;AA3DK,CAArB;eA8DetD,Q"}
|
|
@@ -24,11 +24,16 @@
|
|
|
24
24
|
grid-template-columns: 60% auto;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
.disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
.title {
|
|
28
32
|
color: cm_grey_900;
|
|
29
33
|
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
30
35
|
height: 56px;
|
|
31
|
-
|
|
36
|
+
justify-content: center;
|
|
32
37
|
flex: 2 0 0;
|
|
33
38
|
font-family: Gilroy;
|
|
34
39
|
font-size: 16px;
|
|
@@ -42,6 +47,17 @@
|
|
|
42
47
|
white-space: nowrap;
|
|
43
48
|
}
|
|
44
49
|
|
|
50
|
+
.subtitle {
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
color: cm_grey_400;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cursorPointer {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
.settings {
|
|
46
62
|
align-items: center;
|
|
47
63
|
display: flex;
|
|
@@ -96,4 +112,12 @@
|
|
|
96
112
|
|
|
97
113
|
.hiddenOverflowX:hover {
|
|
98
114
|
overflow-x: auto;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.withSubtitle {
|
|
118
|
+
padding: 8px 16px;
|
|
119
|
+
|
|
120
|
+
.setting {
|
|
121
|
+
gap: 8px;
|
|
122
|
+
}
|
|
99
123
|
}
|
|
@@ -54,6 +54,8 @@ declare namespace ListItems {
|
|
|
54
54
|
content: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
55
55
|
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
56
56
|
title: PropTypes.Validator<string>;
|
|
57
|
+
subtitle: PropTypes.Requireable<string>;
|
|
58
|
+
selected: PropTypes.Requireable<boolean>;
|
|
57
59
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
58
60
|
label: PropTypes.Requireable<string>;
|
|
59
61
|
type: PropTypes.Requireable<string>;
|
|
@@ -96,6 +98,8 @@ declare namespace ListItems {
|
|
|
96
98
|
label: PropTypes.Requireable<string>;
|
|
97
99
|
type: PropTypes.Requireable<string>;
|
|
98
100
|
}> | null | undefined)[]>;
|
|
101
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
102
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
103
|
isBulkStyle: PropTypes.Requireable<boolean>;
|
|
100
104
|
isOverflowHidden: PropTypes.Requireable<boolean>;
|
|
101
105
|
order: PropTypes.Requireable<number>;
|
|
@@ -26,6 +26,9 @@ declare namespace RewardsForm {
|
|
|
26
26
|
label: PropTypes.Requireable<string>;
|
|
27
27
|
type: PropTypes.Requireable<string>;
|
|
28
28
|
size: PropTypes.Requireable<string>;
|
|
29
|
+
customStyle: PropTypes.Requireable<{
|
|
30
|
+
[x: string]: string | null | undefined;
|
|
31
|
+
}>;
|
|
29
32
|
}>>;
|
|
30
33
|
}>>;
|
|
31
34
|
child: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
@@ -25,6 +25,9 @@ declare const SelectOpponents: {
|
|
|
25
25
|
label: import("prop-types").Requireable<string>;
|
|
26
26
|
type: import("prop-types").Requireable<string>;
|
|
27
27
|
size: import("prop-types").Requireable<string>;
|
|
28
|
+
customStyle: import("prop-types").Requireable<{
|
|
29
|
+
[x: string]: string | null | undefined;
|
|
30
|
+
}>;
|
|
28
31
|
}>>;
|
|
29
32
|
}>>;
|
|
30
33
|
child: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -22,6 +22,9 @@ export declare const propTypes: {
|
|
|
22
22
|
label: PropTypes.Requireable<string>;
|
|
23
23
|
type: PropTypes.Requireable<string>;
|
|
24
24
|
size: PropTypes.Requireable<string>;
|
|
25
|
+
customStyle: PropTypes.Requireable<{
|
|
26
|
+
[x: string]: string | null | undefined;
|
|
27
|
+
}>;
|
|
25
28
|
}>>;
|
|
26
29
|
}>>;
|
|
27
30
|
child: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,KAAK,EAAE;QACL,SAAS,EAAE,iBAAiB,GAAG,cAAc,CAAC;QAC9C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,4BAA4B,EAAE,CAAC;CACvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -15,6 +15,9 @@ declare const TitleAndInput: {
|
|
|
15
15
|
label: import("prop-types").Requireable<string>;
|
|
16
16
|
type: import("prop-types").Requireable<string>;
|
|
17
17
|
size: import("prop-types").Requireable<string>;
|
|
18
|
+
customStyle: import("prop-types").Requireable<{
|
|
19
|
+
[x: string]: string | null | undefined;
|
|
20
|
+
}>;
|
|
18
21
|
}>>;
|
|
19
22
|
}>>>;
|
|
20
23
|
field: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
@@ -76,6 +79,9 @@ declare const TitleAndInput: {
|
|
|
76
79
|
label: import("prop-types").Requireable<string>;
|
|
77
80
|
type: import("prop-types").Requireable<string>;
|
|
78
81
|
size: import("prop-types").Requireable<string>;
|
|
82
|
+
customStyle: import("prop-types").Requireable<{
|
|
83
|
+
[x: string]: string | null | undefined;
|
|
84
|
+
}>;
|
|
79
85
|
}>>;
|
|
80
86
|
}>>;
|
|
81
87
|
child: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAiBtD,QAAA,MAAM,aAAa;YAAW,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAiBtD,QAAA,MAAM,aAAa;YAAW,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB/C,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -16,6 +16,9 @@ declare const propTypes: {
|
|
|
16
16
|
label: PropTypes.Requireable<string>;
|
|
17
17
|
type: PropTypes.Requireable<string>;
|
|
18
18
|
size: PropTypes.Requireable<string>;
|
|
19
|
+
customStyle: PropTypes.Requireable<{
|
|
20
|
+
[x: string]: string | null | undefined;
|
|
21
|
+
}>;
|
|
19
22
|
}>>;
|
|
20
23
|
}>>>;
|
|
21
24
|
field: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
@@ -77,6 +80,9 @@ declare const propTypes: {
|
|
|
77
80
|
label: PropTypes.Requireable<string>;
|
|
78
81
|
type: PropTypes.Requireable<string>;
|
|
79
82
|
size: PropTypes.Requireable<string>;
|
|
83
|
+
customStyle: PropTypes.Requireable<{
|
|
84
|
+
[x: string]: string | null | undefined;
|
|
85
|
+
}>;
|
|
80
86
|
}>>;
|
|
81
87
|
}>>;
|
|
82
88
|
child: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AAEnD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAE/D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AAEnD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQd,CAAC;AACF,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,KAAK,EACD,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAC3C,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,GACzC,oBAAoB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|