@coorpacademy/components 11.43.2 → 11.43.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/radio-with-title/style.css +1 -0
- package/es/atom/tag/index.d.ts.map +1 -1
- package/es/atom/tag/index.js +4 -1
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +21 -0
- package/es/molecule/assignment-status-tag/index.d.ts +2 -1
- package/es/molecule/assignment-status-tag/index.d.ts.map +1 -1
- package/es/molecule/assignment-status-tag/index.js +19 -5
- package/es/molecule/assignment-status-tag/index.js.map +1 -1
- package/es/molecule/assignment-status-tag/style.css +28 -0
- package/es/molecule/assignment-status-tag/types.d.ts +2 -0
- package/es/molecule/assignment-status-tag/types.d.ts.map +1 -1
- package/es/molecule/assignment-status-tag/types.js +1 -0
- package/es/molecule/assignment-status-tag/types.js.map +1 -1
- package/es/molecule/skills-chart-side-information-item/index.d.ts +3 -1
- package/es/molecule/skills-chart-side-information-item/index.d.ts.map +1 -1
- package/es/molecule/skills-chart-side-information-item/index.js +42 -24
- package/es/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/es/molecule/skills-chart-side-information-item/style.css +36 -3
- package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -0
- package/es/molecule/split-button/index.d.ts +22 -0
- package/es/molecule/split-button/index.d.ts.map +1 -0
- package/es/molecule/split-button/index.js +137 -0
- package/es/molecule/split-button/index.js.map +1 -0
- package/es/molecule/split-button/style.css +75 -0
- package/es/molecule/split-button/types.d.ts +39 -0
- package/es/molecule/split-button/types.d.ts.map +1 -0
- package/es/molecule/split-button/types.js +18 -0
- package/es/molecule/split-button/types.js.map +1 -0
- package/es/molecule/table/index.d.ts +1 -0
- package/es/molecule/table/index.d.ts.map +1 -1
- package/es/organism/assignment-edition/index.d.ts +1 -0
- package/es/organism/assignment-edition/index.d.ts.map +1 -1
- package/es/organism/assignment-edition/types.d.ts +1 -0
- package/es/organism/assignment-edition/types.d.ts.map +1 -1
- package/es/organism/brand-table/index.d.ts +2 -0
- package/es/organism/brand-table/index.d.ts.map +1 -1
- package/es/organism/brand-table/index.js +5 -3
- package/es/organism/brand-table/index.js.map +1 -1
- package/es/organism/content-selection-list/index.d.ts +1 -0
- package/es/organism/content-selection-list/index.d.ts.map +1 -1
- package/es/organism/content-selection-list/index.js +6 -2
- package/es/organism/content-selection-list/index.js.map +1 -1
- package/es/organism/content-selection-list/types.d.ts +2 -0
- package/es/organism/content-selection-list/types.d.ts.map +1 -1
- package/es/organism/content-selection-list/types.js +2 -1
- package/es/organism/content-selection-list/types.js.map +1 -1
- package/es/organism/header-with-actions/index.d.ts +8 -0
- package/es/organism/header-with-actions/index.d.ts.map +1 -1
- package/es/organism/header-with-actions/index.js +6 -1
- package/es/organism/header-with-actions/index.js.map +1 -1
- package/es/organism/header-with-actions/style.css +8 -0
- package/es/organism/header-with-actions/types.d.ts +10 -0
- package/es/organism/header-with-actions/types.d.ts.map +1 -1
- package/es/organism/header-with-actions/types.js +3 -1
- package/es/organism/header-with-actions/types.js.map +1 -1
- package/es/organism/list-item/index.js +1 -1
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/skill-edition/index.d.ts +1 -0
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/types.d.ts +1 -0
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +15 -0
- package/es/variables/assignment-tracking-colors.css +11 -0
- package/lib/atom/radio-with-title/style.css +1 -0
- package/lib/atom/tag/index.d.ts.map +1 -1
- package/lib/atom/tag/index.js +4 -1
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +21 -0
- package/lib/molecule/assignment-status-tag/index.d.ts +2 -1
- package/lib/molecule/assignment-status-tag/index.d.ts.map +1 -1
- package/lib/molecule/assignment-status-tag/index.js +19 -5
- package/lib/molecule/assignment-status-tag/index.js.map +1 -1
- package/lib/molecule/assignment-status-tag/style.css +28 -0
- package/lib/molecule/assignment-status-tag/types.d.ts +2 -0
- package/lib/molecule/assignment-status-tag/types.d.ts.map +1 -1
- package/lib/molecule/assignment-status-tag/types.js +1 -0
- package/lib/molecule/assignment-status-tag/types.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.d.ts +3 -1
- package/lib/molecule/skills-chart-side-information-item/index.d.ts.map +1 -1
- package/lib/molecule/skills-chart-side-information-item/index.js +42 -24
- package/lib/molecule/skills-chart-side-information-item/index.js.map +1 -1
- package/lib/molecule/skills-chart-side-information-item/style.css +36 -3
- package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -0
- package/lib/molecule/split-button/index.d.ts +22 -0
- package/lib/molecule/split-button/index.d.ts.map +1 -0
- package/lib/molecule/split-button/index.js +144 -0
- package/lib/molecule/split-button/index.js.map +1 -0
- package/lib/molecule/split-button/style.css +75 -0
- package/lib/molecule/split-button/types.d.ts +39 -0
- package/lib/molecule/split-button/types.d.ts.map +1 -0
- package/lib/molecule/split-button/types.js +23 -0
- package/lib/molecule/split-button/types.js.map +1 -0
- package/lib/molecule/table/index.d.ts +1 -0
- package/lib/molecule/table/index.d.ts.map +1 -1
- package/lib/organism/assignment-edition/index.d.ts +1 -0
- package/lib/organism/assignment-edition/index.d.ts.map +1 -1
- package/lib/organism/assignment-edition/types.d.ts +1 -0
- package/lib/organism/assignment-edition/types.d.ts.map +1 -1
- package/lib/organism/brand-table/index.d.ts +2 -0
- package/lib/organism/brand-table/index.d.ts.map +1 -1
- package/lib/organism/brand-table/index.js +5 -3
- package/lib/organism/brand-table/index.js.map +1 -1
- package/lib/organism/content-selection-list/index.d.ts +1 -0
- package/lib/organism/content-selection-list/index.d.ts.map +1 -1
- package/lib/organism/content-selection-list/index.js +6 -2
- package/lib/organism/content-selection-list/index.js.map +1 -1
- package/lib/organism/content-selection-list/types.d.ts +2 -0
- package/lib/organism/content-selection-list/types.d.ts.map +1 -1
- package/lib/organism/content-selection-list/types.js +2 -1
- package/lib/organism/content-selection-list/types.js.map +1 -1
- package/lib/organism/header-with-actions/index.d.ts +8 -0
- package/lib/organism/header-with-actions/index.d.ts.map +1 -1
- package/lib/organism/header-with-actions/index.js +6 -1
- package/lib/organism/header-with-actions/index.js.map +1 -1
- package/lib/organism/header-with-actions/style.css +8 -0
- package/lib/organism/header-with-actions/types.d.ts +10 -0
- package/lib/organism/header-with-actions/types.d.ts.map +1 -1
- package/lib/organism/header-with-actions/types.js +3 -1
- package/lib/organism/header-with-actions/types.js.map +1 -1
- package/lib/organism/list-item/index.js +1 -1
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +1 -0
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +1 -0
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +15 -0
- package/lib/variables/assignment-tracking-colors.css +11 -0
- package/package.json +2 -2
|
@@ -20,6 +20,7 @@ const BrandTable = props => {
|
|
|
20
20
|
editable,
|
|
21
21
|
isPending,
|
|
22
22
|
emptyValue,
|
|
23
|
+
keepFiltersWhenEmpty,
|
|
23
24
|
onRefresh,
|
|
24
25
|
refreshLabel,
|
|
25
26
|
headerTitle = ''
|
|
@@ -27,14 +28,14 @@ const BrandTable = props => {
|
|
|
27
28
|
const pendingView = /*#__PURE__*/_react.default.createElement("div", {
|
|
28
29
|
className: _style.default.loading
|
|
29
30
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, null));
|
|
30
|
-
const tableView = rows.length > 0 ? /*#__PURE__*/_react.default.createElement(_table.default, {
|
|
31
|
+
const tableView = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, rows.length > 0 || keepFiltersWhenEmpty && columns.length > 0 ? /*#__PURE__*/_react.default.createElement(_table.default, {
|
|
31
32
|
rows: rows,
|
|
32
33
|
columns: columns,
|
|
33
34
|
editable: editable,
|
|
34
35
|
headerTitle: headerTitle
|
|
35
|
-
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
+
}) : null, rows.length === 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
36
37
|
className: _style.default.empty
|
|
37
|
-
}, emptyValue);
|
|
38
|
+
}, emptyValue) : null);
|
|
38
39
|
const paginationView = pagination ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_pagination.default, pagination)) : null;
|
|
39
40
|
const searchView = search ? /*#__PURE__*/_react.default.createElement("div", {
|
|
40
41
|
className: _style.default.searchWrapper
|
|
@@ -56,6 +57,7 @@ BrandTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
56
57
|
pagination: _propTypes.default.shape(_pagination.default.propTypes),
|
|
57
58
|
emptyValue: _propTypes.default.string.isRequired,
|
|
58
59
|
isPending: _propTypes.default.bool,
|
|
60
|
+
keepFiltersWhenEmpty: _propTypes.default.bool,
|
|
59
61
|
editable: _propTypes.default.bool,
|
|
60
62
|
rows: _table.default.propTypes.rows,
|
|
61
63
|
columns: _table.default.propTypes.columns,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_table","_pagination","_inputSearch","_loader","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","BrandTable","props","pagination","search","rows","columns","editable","isPending","emptyValue","onRefresh","refreshLabel","headerTitle","pendingView","createElement","className","style","loading","tableView","empty","paginationView","searchView","searchWrapper","theme","refreshView","refresh","onClick","wrapper","headerWrapper","propTypes","process","env","NODE_ENV","PropTypes","shape","Search","Pagination","string","isRequired","bool","Table","func","_default","exports"],"sources":["../../../src/organism/brand-table/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Table from '../../molecule/table';\nimport Pagination from '../../molecule/pagination';\nimport Search from '../../atom/input-search';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst BrandTable = props => {\n const {\n pagination,\n search,\n rows = [],\n columns = [],\n editable,\n isPending,\n emptyValue,\n onRefresh,\n refreshLabel,\n headerTitle = ''\n } = props;\n\n const pendingView = (\n <div className={style.loading}>\n <Loader />\n </div>\n );\n\n const tableView
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_table","_pagination","_inputSearch","_loader","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","BrandTable","props","pagination","search","rows","columns","editable","isPending","emptyValue","keepFiltersWhenEmpty","onRefresh","refreshLabel","headerTitle","pendingView","createElement","className","style","loading","tableView","Fragment","empty","paginationView","searchView","searchWrapper","theme","refreshView","refresh","onClick","wrapper","headerWrapper","propTypes","process","env","NODE_ENV","PropTypes","shape","Search","Pagination","string","isRequired","bool","Table","func","_default","exports"],"sources":["../../../src/organism/brand-table/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Table from '../../molecule/table';\nimport Pagination from '../../molecule/pagination';\nimport Search from '../../atom/input-search';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst BrandTable = props => {\n const {\n pagination,\n search,\n rows = [],\n columns = [],\n editable,\n isPending,\n emptyValue,\n keepFiltersWhenEmpty,\n onRefresh,\n refreshLabel,\n headerTitle = ''\n } = props;\n\n const pendingView = (\n <div className={style.loading}>\n <Loader />\n </div>\n );\n\n const tableView = (\n <>\n {rows.length > 0 || (keepFiltersWhenEmpty && columns.length > 0) ? (\n <Table rows={rows} columns={columns} editable={editable} headerTitle={headerTitle} />\n ) : null}\n {rows.length === 0 ? <div className={style.empty}>{emptyValue}</div> : null}\n </>\n );\n const paginationView = pagination ? (\n <div>\n <Pagination {...pagination} />\n </div>\n ) : null;\n const searchView = search ? (\n <div className={style.searchWrapper}>\n <Search {...search} theme={'coorpmanager'} />\n </div>\n ) : null;\n\n const refreshView = onRefresh ? (\n <div className={style.refresh} onClick={onRefresh}>\n 🔄 {refreshLabel}\n </div>\n ) : null;\n\n return (\n <div className={style.wrapper}>\n <div className={style.headerWrapper}>\n {refreshView}\n {searchView}\n {paginationView}\n </div>\n <div>{isPending ? pendingView : tableView}</div>\n <div />\n </div>\n );\n};\n\nBrandTable.propTypes = {\n search: PropTypes.shape(Search.propTypes),\n pagination: PropTypes.shape(Pagination.propTypes),\n emptyValue: PropTypes.string.isRequired,\n isPending: PropTypes.bool,\n keepFiltersWhenEmpty: PropTypes.bool,\n editable: PropTypes.bool,\n rows: Table.propTypes.rows,\n columns: Table.propTypes.columns,\n onRefresh: PropTypes.func,\n refreshLabel: PropTypes.string,\n headerTitle: PropTypes.string\n};\n\nexport default BrandTable;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KA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;EAC1BC,OAAO,EAAEoC,cAAK,CAACX,SAAS,CAACzB,OAAO;EAChCK,SAAS,EAAEwB,kBAAS,CAACQ,IAAI;EACzB/B,YAAY,EAAEuB,kBAAS,CAACI,MAAM;EAC9B1B,WAAW,EAAEsB,kBAAS,CAACI;AACzB,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAzD,OAAA,GAEaa,UAAU","ignoreList":[]}
|
|
@@ -55,6 +55,7 @@ declare const ContentSelectionList: {
|
|
|
55
55
|
tags: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
56
56
|
label: import("prop-types").Validator<string>;
|
|
57
57
|
iconName: import("prop-types").Validator<string>;
|
|
58
|
+
level: import("prop-types").Requireable<string>;
|
|
58
59
|
}>>>;
|
|
59
60
|
checkbox: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
60
61
|
checked: import("prop-types").Validator<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;AAoEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
|
|
@@ -48,7 +48,8 @@ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
|
|
|
48
48
|
image,
|
|
49
49
|
tags: {
|
|
50
50
|
label,
|
|
51
|
-
iconName
|
|
51
|
+
iconName,
|
|
52
|
+
level
|
|
52
53
|
},
|
|
53
54
|
checkbox,
|
|
54
55
|
deleteButton,
|
|
@@ -92,8 +93,11 @@ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
|
|
|
92
93
|
image,
|
|
93
94
|
tags: [{
|
|
94
95
|
label,
|
|
95
|
-
type: 'default',
|
|
96
|
+
type: level || 'default',
|
|
96
97
|
icon: {
|
|
98
|
+
...(level && {
|
|
99
|
+
iconColor: _colors.COLORS.white
|
|
100
|
+
}),
|
|
97
101
|
iconName,
|
|
98
102
|
preset: 's',
|
|
99
103
|
customStyle: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_listItems","_title","_notification","_colors","_styles","_style","_types","e","__esModule","default","buildButtonProps","button","type","label","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","exports","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","neutral_500","cm_grey_100","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","empty","_isEmpty2","titleProps","required","listProps","content","_map2","theme","actionButton","className","style","iconColor","createElement","classnames","contentContainer","role","message","propTypes","process","env","NODE_ENV","ContentSelectionListPropTypes","_default"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n // Grey like the bin icon: the primary type's white text vanished on the grey row.\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent',\n color: COLORS.neutral_500\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n hoverColor: COLORS.neutral_500,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n // Nothing to select or delete in an empty list: it shows its placeholder instead.\n const empty = isEmpty(items);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons:\n readOnly || empty\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle:\n readOnly || empty\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA6F,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtF,MAAMG,gBAAgB,GAAIC,MAIhC,KAAM;EACL,GAAGA,MAAM;EACTC,IAAI,EAAE,SAAS;EACf,YAAY,EAAED,MAAM,CAACE,KAAK;EAC1B,WAAW,EAAE,UAAUF,MAAM,CAACE,KAAK,EAAE;EACrCC,oBAAoB,EAAEC,cAAM,CAACC,WAAW;EACxCC,UAAU,EAAEF,cAAM,CAACG,eAAe;EAClCC,IAAI,EAAE;IACJC,QAAQ,EAAE,MAAM;IAChBC,MAAM,EAAE;MACNC,IAAI,EAAE,MAAM;MACZC,KAAK,EAAER,cAAM,CAACG,eAAe;MAC7BM,IAAI,EAAE,EAAE;MACRC,WAAW,EAAE;QAACC,OAAO,EAAE;MAAC;IAC1B;EACF,CAAC;EACDD,WAAW,EAAE;IACXE,KAAK,EAAE,aAAa;IACpBC,eAAe,EAAEb,cAAM,CAACc,UAAU;IAClCN,KAAK,EAAER,cAAM,CAACG,eAAe;I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AE,IAAAI,mBAAU,EAACC,wBAAgB,EAAEJ,cAAK,CAACrB,IAAI;EAAE,gBACvD9D,MAAA,CAAAa,OAAA,CAAAwE,aAAA,CAAChF,MAAA,CAAAQ,OAAK,EAAK8D,UAAa,CAAC,EACxBJ,KAAK,gBACJvE,MAAA,CAAAa,OAAA,CAAAwE,aAAA;IAAKG,IAAI,EAAC;EAAO,gBACfxF,MAAA,CAAAa,OAAA,CAAAwE,aAAA,CAAC/E,aAAA,CAAAO,OAAY;IAACG,IAAI,EAAC,OAAO;IAACyE,OAAO,EAAElB;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACRvE,MAAA,CAAAa,OAAA,CAAAwE,aAAA,CAACjF,UAAA,CAAAS,OAAS,EAAKgE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDhB,oBAAoB,CAAC6B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGC,oCAA6B;AAAC,IAAAC,QAAA,GAAA3D,OAAA,CAAAvB,OAAA,GAEhDgD,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_listItems","_title","_notification","_colors","_styles","_style","_types","e","__esModule","default","buildButtonProps","button","type","label","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","exports","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","level","checkbox","deleteButton","hidden","hint","secondButtonLink","neutral_500","cm_grey_100","imageOverlay","undefined","contentBadge","category","details","id","iconColor","white","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","empty","_isEmpty2","titleProps","required","listProps","content","_map2","theme","actionButton","className","style","createElement","classnames","contentContainer","role","message","propTypes","process","env","NODE_ENV","ContentSelectionListPropTypes","_default"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName, level},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n // Grey like the bin icon: the primary type's white text vanished on the grey row.\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent',\n color: COLORS.neutral_500\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n hoverColor: COLORS.neutral_500,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: level || 'default',\n icon: {\n ...(level && {iconColor: COLORS.white}),\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n // Nothing to select or delete in an empty list: it shows its placeholder instead.\n const empty = isEmpty(items);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons:\n readOnly || empty\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle:\n readOnly || empty\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA6F,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtF,MAAMG,gBAAgB,GAAIC,MAIhC,KAAM;EACL,GAAGA,MAAM;EACTC,IAAI,EAAE,SAAS;EACf,YAAY,EAAED,MAAM,CAACE,KAAK;EAC1B,WAAW,EAAE,UAAUF,MAAM,CAACE,KAAK,EAAE;EACrCC,oBAAoB,EAAEC,cAAM,CAACC,WAAW;EACxCC,UAAU,EAAEF,cAAM,CAACG,eAAe;EAClCC,IAAI,EAAE;IACJC,QAAQ,EAAE,MAAM;IAChBC,MAAM,EAAE;MACNC,IAAI,EAAE,MAAM;MACZC,KAAK,EAAER,cAAM,CAACG,eAAe;MAC7BM,IAAI,EAAE,EAAE;MACRC,WAAW,EAAE;QAACC,OAAO,EAAE;MAAC;IAC1B;EACF,CAAC;EACDD,WAAW,EAAE;IACXE,KAAK,EAAE,aAAa;IACpBC,eAAe,EAAEb,cAAM,CAACc,UAAU;IAClCN,KAAK,EAAER,cAAM,CAACG,eAAe;IAC7BY,YAAY,EAAE,MAAM;IACpBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAACC,OAAA,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,OAAA,CAAA0E,aAAA;IAAKF,SAAS,EAAE,IAAAG,mBAAU,EAACC,wBAAgB,EAAEH,cAAK,CAACrB,IAAI;EAAE,gBACvDjE,MAAA,CAAAa,OAAA,CAAA0E,aAAA,CAAClF,MAAA,CAAAQ,OAAK,EAAKiE,UAAa,CAAC,EACxBJ,KAAK,gBACJ1E,MAAA,CAAAa,OAAA,CAAA0E,aAAA;IAAKG,IAAI,EAAC;EAAO,gBACf1F,MAAA,CAAAa,OAAA,CAAA0E,aAAA,CAACjF,aAAA,CAAAO,OAAY;IAACG,IAAI,EAAC,OAAO;IAAC2E,OAAO,EAAEjB;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACR1E,MAAA,CAAAa,OAAA,CAAA0E,aAAA,CAACnF,UAAA,CAAAS,OAAS,EAAKmE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDhB,oBAAoB,CAAC4B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGC,oCAA6B;AAAC,IAAAC,QAAA,GAAA7D,OAAA,CAAAvB,OAAA,GAEhDmD,oBAAoB","ignoreList":[]}
|
|
@@ -21,6 +21,7 @@ export declare const ContentSelectionListPropTypes: {
|
|
|
21
21
|
tags: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
22
|
label: PropTypes.Validator<string>;
|
|
23
23
|
iconName: PropTypes.Validator<string>;
|
|
24
|
+
level: PropTypes.Requireable<string>;
|
|
24
25
|
}>>>;
|
|
25
26
|
checkbox: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
27
|
checked: PropTypes.Validator<boolean>;
|
|
@@ -73,6 +74,7 @@ export declare type ContentListItemType = {
|
|
|
73
74
|
tags: {
|
|
74
75
|
label: string;
|
|
75
76
|
iconName: string;
|
|
77
|
+
level?: 'base' | 'advanced' | 'coach';
|
|
76
78
|
};
|
|
77
79
|
checkbox: {
|
|
78
80
|
checked: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEzC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;KACvC,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;KACpC,CAAC;IACF,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,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|
25
25
|
tags: _propTypes.default.shape({
|
|
26
26
|
label: _propTypes.default.string.isRequired,
|
|
27
|
-
iconName: _propTypes.default.string.isRequired
|
|
27
|
+
iconName: _propTypes.default.string.isRequired,
|
|
28
|
+
level: _propTypes.default.oneOf(['base', 'advanced', 'coach'])
|
|
28
29
|
}).isRequired,
|
|
29
30
|
checkbox: _propTypes.default.shape({
|
|
30
31
|
checked: _propTypes.default.bool.isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","ContentSelectionListPropTypes","exports","disabled","PropTypes","bool","title","string","isRequired","subtitle","button","shape","label","onClick","func","list","items","arrayOf","hidden","hint","ref","image","tags","iconName","checkbox","checked","onChange","deleteButton","search","value","placeholder","emptyResult","description","error","hiddenLabel","isFetching","actionButtons","object","checkboxWithTitle","readOnly"],"sources":["../../../src/organism/content-selection-list/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\n\nexport const ContentSelectionListPropTypes = {\n disabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n button: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired\n }).isRequired,\n list: PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n hidden: PropTypes.bool,\n hint: PropTypes.string,\n ref: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n image: PropTypes.string.isRequired,\n tags: PropTypes.shape({\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired\n }).isRequired,\n checkbox: PropTypes.shape({\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }).isRequired,\n deleteButton: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n })\n }).isRequired\n ),\n search: PropTypes.shape({\n value: PropTypes.string.isRequired,\n placeholder: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }),\n emptyResult: PropTypes.shape({\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired\n }),\n checkbox: PropTypes.shape({\n title: PropTypes.string.isRequired,\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n })\n }).isRequired,\n error: PropTypes.string,\n hiddenLabel: PropTypes.string,\n isFetching: PropTypes.bool,\n actionButtons: PropTypes.arrayOf(PropTypes.object),\n checkboxWithTitle: PropTypes.shape({\n title: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n }),\n readOnly: PropTypes.bool\n};\n\nexport type ContentListItemType = {\n hidden?: boolean;\n hint?: string;\n ref: string;\n title: string;\n subtitle: string;\n image: string;\n tags: {\n label: string;\n iconName: string;\n };\n checkbox: {\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n deleteButton?: ButtonLinkProps;\n};\n\nexport type CheckboxWithTitleProps = {\n title?: string;\n checked?: boolean;\n disabled?: boolean;\n onChange?: (value: boolean) => void;\n};\n\nexport type ContentPropsType = {\n disabled?: boolean;\n error?: string;\n hiddenLabel?: string;\n title: string;\n subtitle?: string;\n button: {\n label: string;\n disabled?: boolean;\n onClick: () => void;\n };\n list: {\n title?: string;\n items?: ContentListItemType[];\n search?: {\n value: string;\n placeholder: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n };\n emptyResult?: {\n title: string;\n description: string;\n };\n checkbox?: {\n title: string;\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n };\n actionButtons?: ButtonLinkProps[];\n checkboxWithTitle?: CheckboxWithTitleProps;\n isFetching?: boolean;\n readOnly?: boolean;\n};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG5B,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG;EAC3CE,QAAQ,EAAEC,kBAAS,CAACC,IAAI;EACxBC,KAAK,EAAEF,kBAAS,CAACG,MAAM,CAACC,UAAU;EAClCC,QAAQ,EAAEL,kBAAS,CAACG,MAAM;EAC1BG,MAAM,EAAEN,kBAAS,CAACO,KAAK,CAAC;IACtBC,KAAK,EAAER,kBAAS,CAACG,MAAM,CAACC,UAAU;IAClCL,QAAQ,EAAEC,kBAAS,CAACC,IAAI;IACxBQ,OAAO,EAAET,kBAAS,CAACU,IAAI,CAACN;EAC1B,CAAC,CAAC,CAACA,UAAU;EACbO,IAAI,EAAEX,kBAAS,CAACO,KAAK,CAAC;IACpBL,KAAK,EAAEF,kBAAS,CAACG,MAAM;IACvBS,KAAK,EAAEZ,kBAAS,CAACa,OAAO,CACtBb,kBAAS,CAACO,KAAK,CAAC;MACdO,MAAM,EAAEd,kBAAS,CAACC,IAAI;MACtBc,IAAI,EAAEf,kBAAS,CAACG,MAAM;MACtBa,GAAG,EAAEhB,kBAAS,CAACG,MAAM,CAACC,UAAU;MAChCF,KAAK,EAAEF,kBAAS,CAACG,MAAM,CAACC,UAAU;MAClCC,QAAQ,EAAEL,kBAAS,CAACG,MAAM,CAACC,UAAU;MACrCa,KAAK,EAAEjB,kBAAS,CAACG,MAAM,CAACC,UAAU;MAClCc,IAAI,EAAElB,kBAAS,CAACO,KAAK,CAAC;QACpBC,KAAK,EAAER,kBAAS,CAACG,MAAM,CAACC,UAAU;QAClCe,QAAQ,EAAEnB,kBAAS,CAACG,MAAM,CAACC;
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","ContentSelectionListPropTypes","exports","disabled","PropTypes","bool","title","string","isRequired","subtitle","button","shape","label","onClick","func","list","items","arrayOf","hidden","hint","ref","image","tags","iconName","level","oneOf","checkbox","checked","onChange","deleteButton","search","value","placeholder","emptyResult","description","error","hiddenLabel","isFetching","actionButtons","object","checkboxWithTitle","readOnly"],"sources":["../../../src/organism/content-selection-list/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\n\nexport const ContentSelectionListPropTypes = {\n disabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n button: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func.isRequired\n }).isRequired,\n list: PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.shape({\n hidden: PropTypes.bool,\n hint: PropTypes.string,\n ref: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n image: PropTypes.string.isRequired,\n tags: PropTypes.shape({\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n level: PropTypes.oneOf(['base', 'advanced', 'coach'])\n }).isRequired,\n checkbox: PropTypes.shape({\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }).isRequired,\n deleteButton: PropTypes.shape({\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n })\n }).isRequired\n ),\n search: PropTypes.shape({\n value: PropTypes.string.isRequired,\n placeholder: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n }),\n emptyResult: PropTypes.shape({\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired\n }),\n checkbox: PropTypes.shape({\n title: PropTypes.string.isRequired,\n checked: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n onChange: PropTypes.func.isRequired\n })\n }).isRequired,\n error: PropTypes.string,\n hiddenLabel: PropTypes.string,\n isFetching: PropTypes.bool,\n actionButtons: PropTypes.arrayOf(PropTypes.object),\n checkboxWithTitle: PropTypes.shape({\n title: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n }),\n readOnly: PropTypes.bool\n};\n\nexport type ContentListItemType = {\n hidden?: boolean;\n hint?: string;\n ref: string;\n title: string;\n subtitle: string;\n image: string;\n tags: {\n label: string;\n iconName: string;\n level?: 'base' | 'advanced' | 'coach';\n };\n checkbox: {\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n deleteButton?: ButtonLinkProps;\n};\n\nexport type CheckboxWithTitleProps = {\n title?: string;\n checked?: boolean;\n disabled?: boolean;\n onChange?: (value: boolean) => void;\n};\n\nexport type ContentPropsType = {\n disabled?: boolean;\n error?: string;\n hiddenLabel?: string;\n title: string;\n subtitle?: string;\n button: {\n label: string;\n disabled?: boolean;\n onClick: () => void;\n };\n list: {\n title?: string;\n items?: ContentListItemType[];\n search?: {\n value: string;\n placeholder: string;\n disabled?: boolean;\n onChange: (value: string) => void;\n };\n emptyResult?: {\n title: string;\n description: string;\n };\n checkbox?: {\n title: string;\n checked: boolean;\n disabled?: boolean;\n onChange: (value: boolean) => void;\n };\n };\n actionButtons?: ButtonLinkProps[];\n checkboxWithTitle?: CheckboxWithTitleProps;\n isFetching?: boolean;\n readOnly?: boolean;\n};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG5B,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG;EAC3CE,QAAQ,EAAEC,kBAAS,CAACC,IAAI;EACxBC,KAAK,EAAEF,kBAAS,CAACG,MAAM,CAACC,UAAU;EAClCC,QAAQ,EAAEL,kBAAS,CAACG,MAAM;EAC1B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EC,kBAAS,CAACC,IAAI;IACxBuB,QAAQ,EAAExB,kBAAS,CAACU;EACtB,CAAC,CAAC;EACF2B,QAAQ,EAAErC,kBAAS,CAACC;AACtB,CAAC","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ declare const HeaderWithActions: {
|
|
|
10
10
|
title: import("prop-types").Validator<string>;
|
|
11
11
|
tags: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
12
12
|
status: import("prop-types").Requireable<string>;
|
|
13
|
+
palette: import("prop-types").Requireable<string>;
|
|
13
14
|
label: import("prop-types").Validator<string>;
|
|
14
15
|
}> | null | undefined)[]>;
|
|
15
16
|
subtitle: import("prop-types").Requireable<string>;
|
|
@@ -29,6 +30,13 @@ declare const HeaderWithActions: {
|
|
|
29
30
|
disabled: import("prop-types").Requireable<boolean>;
|
|
30
31
|
iconName: import("prop-types").Requireable<string>;
|
|
31
32
|
iconColor: import("prop-types").Requireable<string>;
|
|
33
|
+
menu: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
34
|
+
ariaLabel: import("prop-types").Validator<string>;
|
|
35
|
+
options: import("prop-types").Validator<(import("prop-types").InferProps<{
|
|
36
|
+
label: import("prop-types").Validator<string>;
|
|
37
|
+
onClick: import("prop-types").Validator<(...args: any[]) => any>;
|
|
38
|
+
}> | null | undefined)[]>;
|
|
39
|
+
}>>;
|
|
32
40
|
}> | null | undefined)[]>;
|
|
33
41
|
bulletPointMenuButton: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
34
42
|
buttons: import("prop-types").Validator<(import("prop-types").InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AASA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
|
|
@@ -10,6 +10,7 @@ var _buttonLinkIcon = _interopRequireDefault(require("../../atom/button-link-ico
|
|
|
10
10
|
var _tag = _interopRequireDefault(require("../../atom/tag"));
|
|
11
11
|
var _assignmentStatusTag = _interopRequireDefault(require("../../molecule/assignment-status-tag"));
|
|
12
12
|
var _bulletPointMenuButton = _interopRequireDefault(require("../../molecule/bullet-point-menu-button"));
|
|
13
|
+
var _splitButton = _interopRequireDefault(require("../../molecule/split-button"));
|
|
13
14
|
var _types = _interopRequireDefault(require("./types"));
|
|
14
15
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -132,7 +133,7 @@ const HeaderWithActions = props => {
|
|
|
132
133
|
className: _style.default.title,
|
|
133
134
|
"data-name": getDataName('title')
|
|
134
135
|
}, title), hasSubtitle ? /*#__PURE__*/_react.default.createElement("p", {
|
|
135
|
-
className: _style.default.subtitle,
|
|
136
|
+
className: subtitle?.includes('\n') ? _style.default.multilineSubtitle : _style.default.subtitle,
|
|
136
137
|
"data-name": getDataName('subtitle')
|
|
137
138
|
}, subtitle) : null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
139
|
className: _style.default.buttonsWrapper,
|
|
@@ -141,6 +142,10 @@ const HeaderWithActions = props => {
|
|
|
141
142
|
buttons: uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons),
|
|
142
143
|
"data-name": getDataName('bullet-point-menu-button')
|
|
143
144
|
})) : null, uncappedMap((action, key) => {
|
|
145
|
+
if (action.menu) return /*#__PURE__*/_react.default.createElement(_splitButton.default, _extends({}, action, {
|
|
146
|
+
menu: action.menu,
|
|
147
|
+
key: key
|
|
148
|
+
}));
|
|
144
149
|
return /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, buildActionButton(action), {
|
|
145
150
|
key: key
|
|
146
151
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_isEmpty","_map","_buttonLink","_buttonLinkIcon","_tag","_assignmentStatusTag","_bulletPointMenuButton","_types","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","getDataName","suffix","uncappedMap","map","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","style","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","isEmpty","buttons","action","propTypes","process","env","NODE_ENV","HeaderWithActionsPropTypes","_default","exports"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,IAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,oBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,sBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AAKA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,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B,CAACsC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGC,cAA0B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArF,OAAA,GAE1CyC,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_isEmpty","_map","_buttonLink","_buttonLinkIcon","_tag","_assignmentStatusTag","_bulletPointMenuButton","_splitButton","_types","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","getDataName","suffix","uncappedMap","map","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","style","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","includes","multilineSubtitle","buttonsWrapper","isEmpty","buttons","action","menu","propTypes","process","env","NODE_ENV","HeaderWithActionsPropTypes","_default","exports"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport SplitButton from '../../molecule/split-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p\n className={subtitle?.includes('\\n') ? style.multilineSubtitle : style.subtitle}\n data-name={getDataName('subtitle')}\n >\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n if (action.menu) return <SplitButton {...action} menu={action.menu} key={key} />;\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,IAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,oBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,sBAAA,GAA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A,IAAI,EACPE,WAAW,CAAC,CAACiE,MAAyB,EAAEP,GAAW,KAAK;IACvD,IAAIO,MAAM,CAACC,IAAI,EAAE,oBAAOhG,MAAA,CAAAe,OAAA,CAAAyD,aAAA,CAAC9D,YAAA,CAAAK,OAAW,EAAAC,QAAA,KAAK+E,MAAM;MAAEC,IAAI,EAAED,MAAM,CAACC,IAAK;MAACR,GAAG,EAAEA;IAAI,EAAE,CAAC;IAChF,oBAAOxF,MAAA,CAAAe,OAAA,CAAAyD,aAAA,CAACnE,WAAA,CAAAU,OAAU,EAAAC,QAAA,KAAKkC,iBAAiB,CAAC6C,MAAM,CAAC;MAAEP,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEvB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDT,iBAAiB,CAACyC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGC,cAA0B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAxF,OAAA,GAE1CyC,iBAAiB","ignoreList":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { SplitButtonProps } from '../../molecule/split-button/types';
|
|
2
3
|
declare const HeaderWithActionsPropTypes: {
|
|
3
4
|
closeButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
4
5
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -7,6 +8,7 @@ declare const HeaderWithActionsPropTypes: {
|
|
|
7
8
|
title: PropTypes.Validator<string>;
|
|
8
9
|
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
10
|
status: PropTypes.Requireable<string>;
|
|
11
|
+
palette: PropTypes.Requireable<string>;
|
|
10
12
|
label: PropTypes.Validator<string>;
|
|
11
13
|
}> | null | undefined)[]>;
|
|
12
14
|
subtitle: PropTypes.Requireable<string>;
|
|
@@ -26,6 +28,13 @@ declare const HeaderWithActionsPropTypes: {
|
|
|
26
28
|
disabled: PropTypes.Requireable<boolean>;
|
|
27
29
|
iconName: PropTypes.Requireable<string>;
|
|
28
30
|
iconColor: PropTypes.Requireable<string>;
|
|
31
|
+
menu: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
|
+
ariaLabel: PropTypes.Validator<string>;
|
|
33
|
+
options: PropTypes.Validator<(PropTypes.InferProps<{
|
|
34
|
+
label: PropTypes.Validator<string>;
|
|
35
|
+
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
36
|
+
}> | null | undefined)[]>;
|
|
37
|
+
}>>;
|
|
29
38
|
}> | null | undefined)[]>;
|
|
30
39
|
bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
40
|
buttons: PropTypes.Validator<(PropTypes.InferProps<{
|
|
@@ -73,6 +82,7 @@ export declare type ButtonActionProps = {
|
|
|
73
82
|
disabled?: boolean;
|
|
74
83
|
iconName?: string;
|
|
75
84
|
iconColor?: string;
|
|
85
|
+
menu?: SplitButtonProps['menu'];
|
|
76
86
|
};
|
|
77
87
|
export declare type HeaderWithActionsProps = {
|
|
78
88
|
closeButton: CloseButtonProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAgB,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAoBlF,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC;AAEF,eAAe,0BAA0B,CAAC;AAE1C,aAAK,QAAQ,GAAG;IACd,KAAK,EAAE,WAAW,GAAG,iBAAiB,GAAG,OAAO,GAAG,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C;IAClB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,6BAA6B,GAAG;IAAC,KAAK,EAAE,sBAAsB,CAAA;CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
6
|
var _types = _interopRequireDefault(require("../../molecule/assignment-status-tag/types"));
|
|
7
|
+
var _types2 = require("../../molecule/split-button/types");
|
|
7
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
9
|
const ButtonMenuPropTypes = {
|
|
9
10
|
dataName: _propTypes.default.string,
|
|
@@ -18,7 +19,8 @@ const ButtonActionPropTypes = {
|
|
|
18
19
|
onClick: _propTypes.default.func.isRequired,
|
|
19
20
|
disabled: _propTypes.default.bool,
|
|
20
21
|
iconName: _propTypes.default.string,
|
|
21
|
-
iconColor: _propTypes.default.string
|
|
22
|
+
iconColor: _propTypes.default.string,
|
|
23
|
+
menu: _types2.menuPropTypes
|
|
22
24
|
};
|
|
23
25
|
const HeaderWithActionsPropTypes = {
|
|
24
26
|
closeButton: _propTypes.default.shape({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","e","__esModule","default","ButtonMenuPropTypes","dataName","PropTypes","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","AssignmentStatusTagPropTypes","subtitle","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching","_default","exports"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","_types2","e","__esModule","default","ButtonMenuPropTypes","dataName","PropTypes","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","menu","menuPropTypes","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","AssignmentStatusTagPropTypes","subtitle","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching","_default","exports"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\nimport {menuPropTypes, SplitButtonProps} from '../../molecule/split-button/types';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string,\n menu: menuPropTypes\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n menu?: SplitButtonProps['menu'];\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAAkF,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElF,MAAMG,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEC,kBAAS,CAACC,MAAM;EAC1BC,KAAK,EAAEF,kBAAS,CAACC,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAEJ,kBAAS,CAACC,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAEL,kBAAS,CAACC,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAEN,kBAAS,CAACO,IAAI,CAACJ;AAC1B,CAAC;AAED,MAAMK,qBAAqB,GAAG;EAC5BC,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACP,UAAU;EAC1DD,KAAK,EAAEF,kBAAS,CAACC,MAAM,CAACE,UAAU;EAClCG,OAAO,EAAEN,kBAAS,CAACO,IAAI,CAACJ,UAAU;EAClCQ,QAAQ,EAAEX,kBAAS,CAACY,IAAI;EACxBR,QAAQ,EAAEJ,kBAAS,CAACC,MAAM;EAC1BI,SAAS,EAAEL,kBAAS,CAACC,MAAM;EAC3BY,IAAI,EAAEC;AACR,CAAC;AAED,MAAMC,0BAA0B,GAAG;EACjCC,WAAW,EAAEhB,kBAAS,CA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EACF4B,UAAU,EAAE/B,kBAAS,CAACY;AACxB,CAAC;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAEakB,0BAA0B","ignoreList":[]}
|
|
@@ -241,7 +241,7 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
241
241
|
}),
|
|
242
242
|
tags: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
243
243
|
label: _propTypes.default.string,
|
|
244
|
-
type:
|
|
244
|
+
type: _tag.default.propTypes.type
|
|
245
245
|
})),
|
|
246
246
|
disabled: _propTypes.default.bool,
|
|
247
247
|
onClick: _propTypes.default.func,
|