@coorpacademy/components 11.18.9 → 11.18.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/es/atom/button-menu/index.d.ts.map +1 -1
  2. package/es/atom/button-menu/index.js +1 -1
  3. package/es/atom/button-menu/index.js.map +1 -1
  4. package/es/atom/button-menu/style.css +10 -0
  5. package/es/atom/button-menu/types.d.ts +1 -1
  6. package/es/atom/button-menu/types.d.ts.map +1 -1
  7. package/es/atom/button-menu/types.js +1 -1
  8. package/es/atom/button-menu/types.js.map +1 -1
  9. package/es/atom/empty-search-result/index.d.ts +1 -0
  10. package/es/atom/empty-search-result/index.d.ts.map +1 -1
  11. package/es/atom/empty-search-result/index.js +6 -4
  12. package/es/atom/empty-search-result/index.js.map +1 -1
  13. package/es/atom/empty-search-result/style.css +16 -1
  14. package/es/atom/status-item/index.d.ts +1 -0
  15. package/es/atom/status-item/index.d.ts.map +1 -1
  16. package/es/atom/status-item/index.js +3 -2
  17. package/es/atom/status-item/index.js.map +1 -1
  18. package/es/atom/status-item/style.css +15 -17
  19. package/es/atom/status-item/types.d.ts +2 -0
  20. package/es/atom/status-item/types.d.ts.map +1 -1
  21. package/es/atom/status-item/types.js +1 -0
  22. package/es/atom/status-item/types.js.map +1 -1
  23. package/es/atom/tag/index.js +4 -4
  24. package/es/atom/tag/index.js.map +1 -1
  25. package/es/atom/tag/style.css +11 -8
  26. package/es/molecule/brand-tabs/index.d.ts +1 -0
  27. package/es/molecule/brand-tabs/index.d.ts.map +1 -1
  28. package/es/molecule/brand-tabs/index.js +10 -1
  29. package/es/molecule/brand-tabs/index.js.map +1 -1
  30. package/es/molecule/brand-tabs/style.css +7 -4
  31. package/es/molecule/bulk-progress-bar/index.d.ts.map +1 -1
  32. package/es/molecule/bulk-progress-bar/index.js +4 -2
  33. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  34. package/es/molecule/bulk-progress-bar/style.css +5 -0
  35. package/es/molecule/draggable-list/index.d.ts +32 -12
  36. package/es/molecule/expandible-actionable-table/index.d.ts +3 -0
  37. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  38. package/es/molecule/expandible-actionable-table/index.js +15 -2
  39. package/es/molecule/expandible-actionable-table/index.js.map +1 -1
  40. package/es/molecule/expandible-actionable-table/style.css +5 -0
  41. package/es/molecule/expandible-actionable-table/types.d.ts +5 -0
  42. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  43. package/es/molecule/expandible-actionable-table/types.js +3 -1
  44. package/es/molecule/expandible-actionable-table/types.js.map +1 -1
  45. package/es/molecule/review-header-steps/index.d.ts.map +1 -1
  46. package/es/molecule/review-header-steps/index.js +3 -4
  47. package/es/molecule/review-header-steps/index.js.map +1 -1
  48. package/es/molecule/review-header-steps/prop-types.d.ts +1 -0
  49. package/es/molecule/review-header-steps/prop-types.d.ts.map +1 -1
  50. package/es/molecule/review-header-steps/style.css +6 -1
  51. package/es/organism/list-item/index.d.ts +44 -13
  52. package/es/organism/list-item/index.d.ts.map +1 -1
  53. package/es/organism/list-item/index.js +72 -38
  54. package/es/organism/list-item/index.js.map +1 -1
  55. package/es/organism/list-item/style.css +28 -5
  56. package/es/organism/list-items/index.d.ts +36 -12
  57. package/es/organism/list-items/index.d.ts.map +1 -1
  58. package/es/organism/list-items/index.js +19 -4
  59. package/es/organism/list-items/index.js.map +1 -1
  60. package/es/organism/list-items/style.css +42 -0
  61. package/es/organism/review-header/types.d.ts +1 -0
  62. package/es/organism/review-header/types.d.ts.map +1 -1
  63. package/es/organism/wizard-contents/index.d.ts +67 -0
  64. package/es/organism/wizard-contents/index.d.ts.map +1 -1
  65. package/es/organism/wizard-contents/index.js +37 -4
  66. package/es/organism/wizard-contents/index.js.map +1 -1
  67. package/es/organism/wizard-contents/style.css +22 -0
  68. package/es/template/app-review/index.d.ts +1 -0
  69. package/es/template/app-review/index.d.ts.map +1 -1
  70. package/es/template/app-review/player/prop-types.d.ts +1 -0
  71. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  72. package/es/template/app-review/prop-types.d.ts +1 -0
  73. package/es/template/app-review/prop-types.d.ts.map +1 -1
  74. package/es/template/back-office/brand-update/index.d.ts +103 -12
  75. package/lib/atom/button-menu/index.d.ts.map +1 -1
  76. package/lib/atom/button-menu/index.js +1 -1
  77. package/lib/atom/button-menu/index.js.map +1 -1
  78. package/lib/atom/button-menu/style.css +10 -0
  79. package/lib/atom/button-menu/types.d.ts +1 -1
  80. package/lib/atom/button-menu/types.d.ts.map +1 -1
  81. package/lib/atom/button-menu/types.js +1 -1
  82. package/lib/atom/button-menu/types.js.map +1 -1
  83. package/lib/atom/empty-search-result/index.d.ts +1 -0
  84. package/lib/atom/empty-search-result/index.d.ts.map +1 -1
  85. package/lib/atom/empty-search-result/index.js +6 -4
  86. package/lib/atom/empty-search-result/index.js.map +1 -1
  87. package/lib/atom/empty-search-result/style.css +16 -1
  88. package/lib/atom/status-item/index.d.ts +1 -0
  89. package/lib/atom/status-item/index.d.ts.map +1 -1
  90. package/lib/atom/status-item/index.js +3 -2
  91. package/lib/atom/status-item/index.js.map +1 -1
  92. package/lib/atom/status-item/style.css +15 -17
  93. package/lib/atom/status-item/types.d.ts +2 -0
  94. package/lib/atom/status-item/types.d.ts.map +1 -1
  95. package/lib/atom/status-item/types.js +1 -0
  96. package/lib/atom/status-item/types.js.map +1 -1
  97. package/lib/atom/tag/index.js +4 -4
  98. package/lib/atom/tag/index.js.map +1 -1
  99. package/lib/atom/tag/style.css +11 -8
  100. package/lib/molecule/brand-tabs/index.d.ts +1 -0
  101. package/lib/molecule/brand-tabs/index.d.ts.map +1 -1
  102. package/lib/molecule/brand-tabs/index.js +11 -1
  103. package/lib/molecule/brand-tabs/index.js.map +1 -1
  104. package/lib/molecule/brand-tabs/style.css +7 -4
  105. package/lib/molecule/bulk-progress-bar/index.d.ts.map +1 -1
  106. package/lib/molecule/bulk-progress-bar/index.js +4 -2
  107. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  108. package/lib/molecule/bulk-progress-bar/style.css +5 -0
  109. package/lib/molecule/draggable-list/index.d.ts +32 -12
  110. package/lib/molecule/expandible-actionable-table/index.d.ts +3 -0
  111. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  112. package/lib/molecule/expandible-actionable-table/index.js +17 -2
  113. package/lib/molecule/expandible-actionable-table/index.js.map +1 -1
  114. package/lib/molecule/expandible-actionable-table/style.css +5 -0
  115. package/lib/molecule/expandible-actionable-table/types.d.ts +5 -0
  116. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  117. package/lib/molecule/expandible-actionable-table/types.js +3 -1
  118. package/lib/molecule/expandible-actionable-table/types.js.map +1 -1
  119. package/lib/molecule/review-header-steps/index.d.ts.map +1 -1
  120. package/lib/molecule/review-header-steps/index.js +3 -4
  121. package/lib/molecule/review-header-steps/index.js.map +1 -1
  122. package/lib/molecule/review-header-steps/prop-types.d.ts +1 -0
  123. package/lib/molecule/review-header-steps/prop-types.d.ts.map +1 -1
  124. package/lib/molecule/review-header-steps/style.css +6 -1
  125. package/lib/organism/list-item/index.d.ts +44 -13
  126. package/lib/organism/list-item/index.d.ts.map +1 -1
  127. package/lib/organism/list-item/index.js +73 -37
  128. package/lib/organism/list-item/index.js.map +1 -1
  129. package/lib/organism/list-item/style.css +28 -5
  130. package/lib/organism/list-items/index.d.ts +36 -12
  131. package/lib/organism/list-items/index.d.ts.map +1 -1
  132. package/lib/organism/list-items/index.js +21 -4
  133. package/lib/organism/list-items/index.js.map +1 -1
  134. package/lib/organism/list-items/style.css +42 -0
  135. package/lib/organism/review-header/types.d.ts +1 -0
  136. package/lib/organism/review-header/types.d.ts.map +1 -1
  137. package/lib/organism/wizard-contents/index.d.ts +67 -0
  138. package/lib/organism/wizard-contents/index.d.ts.map +1 -1
  139. package/lib/organism/wizard-contents/index.js +39 -4
  140. package/lib/organism/wizard-contents/index.js.map +1 -1
  141. package/lib/organism/wizard-contents/style.css +22 -0
  142. package/lib/template/app-review/index.d.ts +1 -0
  143. package/lib/template/app-review/index.d.ts.map +1 -1
  144. package/lib/template/app-review/player/prop-types.d.ts +1 -0
  145. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  146. package/lib/template/app-review/prop-types.d.ts +1 -0
  147. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  148. package/lib/template/back-office/brand-update/index.d.ts +103 -12
  149. package/package.json +2 -2
@@ -60,17 +60,12 @@ declare namespace DraggableList {
60
60
  position: PropTypes.Requireable<number>;
61
61
  id: PropTypes.Requireable<string>;
62
62
  }> | PropTypes.InferProps<{
63
- bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
64
- buttonAriaLabel: PropTypes.Requireable<string>;
65
- menuAriaLabel: PropTypes.Requireable<string>;
66
- buttons: PropTypes.Requireable<(PropTypes.InferProps<{
67
- 'data-name': PropTypes.Requireable<string>;
68
- label: PropTypes.Requireable<string>;
69
- type: PropTypes.Requireable<string>;
70
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
71
- }> | null | undefined)[]>;
72
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
73
- }>>;
63
+ title: PropTypes.Validator<string>;
64
+ dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
65
+ label: PropTypes.Requireable<string>;
66
+ type: PropTypes.Requireable<string>;
67
+ className: PropTypes.Requireable<string>;
68
+ }> | null | undefined)[]>;
74
69
  buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
75
70
  type: PropTypes.Requireable<string>;
76
71
  label: PropTypes.Requireable<string>;
@@ -82,11 +77,36 @@ declare namespace DraggableList {
82
77
  }>>;
83
78
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
84
79
  }>>;
80
+ buttonLinkIcon: PropTypes.Requireable<PropTypes.InferProps<{
81
+ size: PropTypes.Requireable<string>;
82
+ 'aria-label': PropTypes.Requireable<string>;
83
+ 'data-name': PropTypes.Requireable<string>;
84
+ icon: PropTypes.Requireable<string>;
85
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
86
+ link: PropTypes.Requireable<PropTypes.InferProps<{
87
+ href: PropTypes.Requireable<string>;
88
+ download: PropTypes.Requireable<boolean>;
89
+ target: PropTypes.Requireable<string>;
90
+ }>>;
91
+ disabled: PropTypes.Requireable<boolean>;
92
+ className: PropTypes.Requireable<string>;
93
+ }>>;
94
+ bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
95
+ buttonAriaLabel: PropTypes.Requireable<string>;
96
+ menuAriaLabel: PropTypes.Requireable<string>;
97
+ buttons: PropTypes.Requireable<(PropTypes.InferProps<{
98
+ 'data-name': PropTypes.Requireable<string>;
99
+ label: PropTypes.Requireable<string>;
100
+ type: PropTypes.Requireable<string>;
101
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
102
+ }> | null | undefined)[]>;
103
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
104
+ }>>;
85
105
  tags: PropTypes.Requireable<(PropTypes.InferProps<{
86
106
  label: PropTypes.Requireable<string>;
87
107
  type: PropTypes.Requireable<string>;
88
108
  }> | null | undefined)[]>;
89
- title: PropTypes.Validator<string>;
109
+ isBulkStyle: PropTypes.Requireable<boolean>;
90
110
  order: PropTypes.Requireable<number>;
91
111
  'aria-label': PropTypes.Requireable<string>;
92
112
  contentType: PropTypes.Requireable<string>;
@@ -35,6 +35,7 @@ declare const ActionableExpandableErrorsTable: {
35
35
  fields: import("prop-types").Requireable<(NonNullable<string | import("prop-types").InferProps<{
36
36
  type: import("prop-types").Requireable<string>;
37
37
  current: import("prop-types").Requireable<boolean>;
38
+ selected: import("prop-types").Requireable<boolean>;
38
39
  icon: import("prop-types").Requireable<string>;
39
40
  value: import("prop-types").Requireable<string>;
40
41
  }> | null | undefined> | null | undefined)[]>;
@@ -97,6 +98,8 @@ declare const ActionableExpandableErrorsTable: {
97
98
  isBulkMenu: import("prop-types").Requireable<boolean>;
98
99
  }> | null | undefined>>;
99
100
  isNestedTable: import("prop-types").Requireable<boolean>;
101
+ emptyStateFirstMessage: import("prop-types").Requireable<string>;
102
+ emptyStateSecondMessage: import("prop-types").Requireable<string>;
100
103
  };
101
104
  };
102
105
  export default ActionableExpandableErrorsTable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAMjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAiCnF,QAAA,MAAM,+BAA+B;YAAW,KAAK,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKrF,CAAC;AASF,eAAe,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAOjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAqCnF,QAAA,MAAM,+BAA+B;YAAW,KAAK,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoLrF,CAAC;AASF,eAAe,+BAA+B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import _isEmpty from "lodash/fp/isEmpty";
1
2
  import _includes from "lodash/fp/includes";
2
3
  import _size from "lodash/fp/size";
3
4
  import _isString from "lodash/fp/isString";
@@ -14,6 +15,7 @@ import Provider, { GetTranslateFromContext } from '../../atom/provider';
14
15
  import BulletPointMenuButton from '../bullet-point-menu-button';
15
16
  import ButtonLink from '../../atom/button-link';
16
17
  import ErrorsTable from '../errors-table';
18
+ import EmptySearchResult from '../../atom/empty-search-result';
17
19
  import style from './style.css';
18
20
  import { propTypes } from './types';
19
21
 
@@ -25,7 +27,9 @@ const buildField = field => {
25
27
 
26
28
  switch (componentType) {
27
29
  case 'status':
28
- return /*#__PURE__*/React.createElement(StatusItem, field);
30
+ return /*#__PURE__*/React.createElement("div", {
31
+ className: style.statusItemWrapper
32
+ }, /*#__PURE__*/React.createElement(StatusItem, field));
29
33
 
30
34
  case 'progress-bar':
31
35
  return /*#__PURE__*/React.createElement(BulkProgressBar, field);
@@ -69,7 +73,9 @@ const ActionableExpandableErrorsTable = (props, legacyContext) => {
69
73
  stickyLastColumn = false,
70
74
  ariaDescribedby,
71
75
  columnWidth = `${100 / _size(columns)}%`,
72
- isNestedTable = false
76
+ isNestedTable = false,
77
+ emptyStateFistMessage = '',
78
+ emptyStateSecondMessage = ''
73
79
  } = props;
74
80
  const translate = GetTranslateFromContext(legacyContext);
75
81
  /**
@@ -83,6 +89,13 @@ const ActionableExpandableErrorsTable = (props, legacyContext) => {
83
89
  */
84
90
 
85
91
  const [expandState, setExpandState] = useState({});
92
+ if (_isEmpty(columns)) return /*#__PURE__*/React.createElement("div", {
93
+ className: style.wrapper
94
+ }, /*#__PURE__*/React.createElement(EmptySearchResult, {
95
+ firstMessage: emptyStateFistMessage,
96
+ secondMessage: emptyStateSecondMessage,
97
+ isBulk: true
98
+ }));
86
99
  /**
87
100
  * This function gets called when show/hide link is clicked.
88
101
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useState","classnames","ButtonLinkIconOnly","StatusItem","BulkProgressBar","Provider","GetTranslateFromContext","BulletPointMenuButton","ButtonLink","ErrorsTable","style","propTypes","buildField","field","componentType","buildLastField","lastField","buildNestedRow","row","ActionableExpandableErrorsTable","props","legacyContext","columns","rows","stickyFirstColumn","stickyLastColumn","ariaDescribedby","columnWidth","isNestedTable","translate","expandedRows","setExpandedRows","expandState","setExpandState","handleExpandRow","index","isRowExpanded","newExpandedRows","filter","id","concat","expandedState","forEach","headerRow","map","column","cIndex","title","headerFirstSticky","headerFirst","header","push","headerLastSticky","headerLast","headerView","bodyView","fields","isRowExpandible","bodyRow","fIndex","cellContent","columFirstWrapper","expandButtonWrapper","columnFirstSticky","columnFirst","col","width","columnLastSticky","columnLast","inspectButton","nestedRow","nestedRowCellule","includes","length","wrapper","table","theadNested","thead","contextTypes","skin","childContextTypes"],"sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport classnames from 'classnames';\nimport {get, isString, size, includes} from 'lodash/fp';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport StatusItem from '../../atom/status-item';\nimport BulkProgressBar from '../bulk-progress-bar';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport BulletPointMenuButton from '../bullet-point-menu-button';\nimport ButtonLink from '../../atom/button-link';\nimport ErrorsTable from '../errors-table';\nimport style from './style.css';\nimport {ExpandState, Field, LastField, NestedRow, Props, propTypes} from './types';\n\nconst buildField = (field: Field) => {\n if (isString(field)) return field;\n const {componentType} = field;\n switch (componentType) {\n case 'status':\n return <StatusItem {...field} />;\n case 'progress-bar':\n return <BulkProgressBar {...field} />;\n }\n};\n\nconst buildLastField = (lastField: LastField) => {\n const {componentType} = lastField;\n switch (componentType) {\n case 'menu':\n return <BulletPointMenuButton {...lastField} />;\n case 'button-link':\n return <ButtonLink {...lastField} />;\n }\n};\n\nconst buildNestedRow = (row: NestedRow) => {\n const {componentType} = row;\n switch (componentType) {\n case 'errors-table':\n return <ErrorsTable {...row} />;\n case 'expandible-errors-table':\n return <ActionableExpandableErrorsTable {...row} />;\n }\n};\n\nconst ActionableExpandableErrorsTable = (props: Props, legacyContext: WebContextValues) => {\n const {\n columns,\n rows = [],\n lastField,\n stickyFirstColumn = false,\n stickyLastColumn = false,\n ariaDescribedby,\n columnWidth = `${100 / size(columns)}%`,\n isNestedTable = false\n } = props;\n const translate = GetTranslateFromContext(legacyContext);\n\n /**\n * State variable to keep track of all the expanded rows\n * By default, nothing expanded. Hence initialized with empty array.\n */\n const [expandedRows, setExpandedRows] = useState<number[]>([]);\n\n /**\n * State variable to keep track which row is currently expanded.\n */\n const [expandState, setExpandState] = useState<ExpandState>({});\n\n /**\n * This function gets called when show/hide link is clicked.\n */\n const handleExpandRow = (index: number) => () => {\n const isRowExpanded = includes(index, expandedRows);\n\n /**\n * If the row is expanded, we are here to hide it. Hence remove\n * it from the state variable. Otherwise add to it.\n */\n const newExpandedRows = isRowExpanded\n ? expandedRows.filter(id => id !== index)\n : expandedRows.concat(index);\n\n setExpandedRows(newExpandedRows);\n\n /**\n * Create a new object to update the expanded state of all rows\n * Use the newExpandedRows array to set the state of all rows that are currently expanded\n */\n const expandedState: ExpandState = {};\n newExpandedRows.forEach(id => {\n expandedState[id] = true;\n });\n\n setExpandState(expandedState);\n };\n\n const headerRow = columns.map((column, cIndex) => {\n const {title} = column;\n return (\n <th\n className={\n cIndex === 0\n ? classnames(\n stickyFirstColumn ? style.headerFirstSticky : style.headerFirst,\n style.header\n )\n : style.header\n }\n key={`${title}-${cIndex}`}\n role=\"columnheader\"\n >\n {title}\n </th>\n );\n });\n\n headerRow.push(\n <th\n className={stickyLastColumn ? style.headerLastSticky : style.headerLast}\n key=\"action-header\"\n />\n );\n const headerView = [...headerRow];\n\n const bodyView = rows.map((row, index) => {\n const {fields, isRowExpandible = false} = row;\n const bodyRow = fields.map((field, fIndex) => {\n const cellContent =\n fIndex === 0 ? (\n <div className={style.columFirstWrapper}>\n <div className={style.expandButtonWrapper}>\n {isRowExpandible ? (\n <ButtonLinkIconOnly\n onClick={handleExpandRow(index)}\n data-name={`arrowUp-button-${index}`}\n icon=\"down\"\n className={expandState[index] ? 'bulkArrowUp' : 'bulkArrowDown'}\n aria-label={translate('bulk_import.show_errors')}\n />\n ) : null}\n </div>\n {buildField(field)}\n </div>\n ) : (\n buildField(field)\n );\n return (\n <td\n className={\n fIndex === 0\n ? classnames(\n stickyFirstColumn ? style.columnFirstSticky : style.columnFirst,\n style.col\n )\n : style.col\n }\n style={{width: columnWidth}}\n key={`${field}-${fIndex}`}\n >\n {cellContent}\n </td>\n );\n });\n\n bodyRow.push(\n <td\n className={stickyLastColumn ? style.columnLastSticky : style.columnLast}\n key=\"actionHeader\"\n >\n {lastField ? (\n <div\n className={classnames({\n [style.inspectButton]: get('className', lastField) === 'bulkInspectButton'\n })}\n >\n {buildLastField(lastField)}\n </div>\n ) : null}\n </td>\n );\n const nestedRow = get('nestedRow', row);\n const nestedRowCellule =\n nestedRow && expandedRows.includes(index) ? (\n <tr key={`line-${index}-error`}>\n <td className={style.nestedRowCellule} colSpan={fields.length + 2}>\n {buildNestedRow(nestedRow)}\n </td>\n </tr>\n ) : null;\n\n return nestedRowCellule\n ? [<tr key={`line-${index}`}>{bodyRow}</tr>, nestedRowCellule]\n : [<tr key={`line-${index}`}>{bodyRow}</tr>];\n });\n\n return (\n <div className={style.wrapper}>\n <table\n {...(ariaDescribedby ? {'aria-describedby': ariaDescribedby} : {})}\n className={style.table}\n data-testid=\"expandible-actionable-table\"\n data-name=\"expandible-actionable-table\"\n >\n <thead className={isNestedTable ? style.theadNested : style.thead}>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>\n </div>\n );\n};\n\nActionableExpandableErrorsTable.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nActionableExpandableErrorsTable.propTypes = propTypes;\n\nexport default ActionableExpandableErrorsTable;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,QAA8B,OAA9B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AAEA,OAAOC,QAAP,IAAkBC,uBAAlB,QAAgD,qBAAhD;AACA,OAAOC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AAKvB,UAAL,CADF,CANF,eASE,mCAAQC,QAAR,CATF,CADF,CADF;AAeD,CAtKD;;AAwKApC,+BAA+B,CAAC2D,YAAhC,GAA+C;EAC7CC,IAAI,EAAE1E,QAAQ,CAAC2E,iBAAT,CAA2BD,IADY;EAE7ClD,SAAS,EAAExB,QAAQ,CAAC2E,iBAAT,CAA2BnD;AAFO,CAA/C;AAKAV,+BAA+B,CAACR,SAAhC,2CAA4CA,SAA5C;AAEA,eAAeQ,+BAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useState","classnames","ButtonLinkIconOnly","StatusItem","BulkProgressBar","Provider","GetTranslateFromContext","BulletPointMenuButton","ButtonLink","ErrorsTable","EmptySearchResult","style","propTypes","buildField","field","componentType","statusItemWrapper","buildLastField","lastField","buildNestedRow","row","ActionableExpandableErrorsTable","props","legacyContext","columns","rows","stickyFirstColumn","stickyLastColumn","ariaDescribedby","columnWidth","isNestedTable","emptyStateFistMessage","emptyStateSecondMessage","translate","expandedRows","setExpandedRows","expandState","setExpandState","wrapper","handleExpandRow","index","isRowExpanded","newExpandedRows","filter","id","concat","expandedState","forEach","headerRow","map","column","cIndex","title","headerFirstSticky","headerFirst","header","push","headerLastSticky","headerLast","headerView","bodyView","fields","isRowExpandible","bodyRow","fIndex","cellContent","columFirstWrapper","expandButtonWrapper","columnFirstSticky","columnFirst","col","width","columnLastSticky","columnLast","inspectButton","nestedRow","nestedRowCellule","includes","length","table","theadNested","thead","contextTypes","skin","childContextTypes"],"sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport classnames from 'classnames';\nimport {get, isString, size, includes, isEmpty} from 'lodash/fp';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport StatusItem from '../../atom/status-item';\nimport BulkProgressBar from '../bulk-progress-bar';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport BulletPointMenuButton from '../bullet-point-menu-button';\nimport ButtonLink from '../../atom/button-link';\nimport ErrorsTable from '../errors-table';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport style from './style.css';\nimport {ExpandState, Field, LastField, NestedRow, Props, propTypes} from './types';\n\nconst buildField = (field: Field) => {\n if (isString(field)) return field;\n const {componentType} = field;\n switch (componentType) {\n case 'status':\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem {...field} />\n </div>\n );\n case 'progress-bar':\n return <BulkProgressBar {...field} />;\n }\n};\n\nconst buildLastField = (lastField: LastField) => {\n const {componentType} = lastField;\n switch (componentType) {\n case 'menu':\n return <BulletPointMenuButton {...lastField} />;\n case 'button-link':\n return <ButtonLink {...lastField} />;\n }\n};\n\nconst buildNestedRow = (row: NestedRow) => {\n const {componentType} = row;\n switch (componentType) {\n case 'errors-table':\n return <ErrorsTable {...row} />;\n case 'expandible-errors-table':\n return <ActionableExpandableErrorsTable {...row} />;\n }\n};\n\nconst ActionableExpandableErrorsTable = (props: Props, legacyContext: WebContextValues) => {\n const {\n columns,\n rows = [],\n lastField,\n stickyFirstColumn = false,\n stickyLastColumn = false,\n ariaDescribedby,\n columnWidth = `${100 / size(columns)}%`,\n isNestedTable = false,\n emptyStateFistMessage = '',\n emptyStateSecondMessage = ''\n } = props;\n\n const translate = GetTranslateFromContext(legacyContext);\n\n /**\n * State variable to keep track of all the expanded rows\n * By default, nothing expanded. Hence initialized with empty array.\n */\n const [expandedRows, setExpandedRows] = useState<number[]>([]);\n\n /**\n * State variable to keep track which row is currently expanded.\n */\n const [expandState, setExpandState] = useState<ExpandState>({});\n\n if (isEmpty(columns))\n return (\n <div className={style.wrapper}>\n <EmptySearchResult\n firstMessage={emptyStateFistMessage}\n secondMessage={emptyStateSecondMessage}\n isBulk\n />\n </div>\n );\n\n /**\n * This function gets called when show/hide link is clicked.\n */\n const handleExpandRow = (index: number) => () => {\n const isRowExpanded = includes(index, expandedRows);\n\n /**\n * If the row is expanded, we are here to hide it. Hence remove\n * it from the state variable. Otherwise add to it.\n */\n const newExpandedRows = isRowExpanded\n ? expandedRows.filter(id => id !== index)\n : expandedRows.concat(index);\n\n setExpandedRows(newExpandedRows);\n\n /**\n * Create a new object to update the expanded state of all rows\n * Use the newExpandedRows array to set the state of all rows that are currently expanded\n */\n const expandedState: ExpandState = {};\n newExpandedRows.forEach(id => {\n expandedState[id] = true;\n });\n\n setExpandState(expandedState);\n };\n\n const headerRow = columns.map((column, cIndex) => {\n const {title} = column;\n return (\n <th\n className={\n cIndex === 0\n ? classnames(\n stickyFirstColumn ? style.headerFirstSticky : style.headerFirst,\n style.header\n )\n : style.header\n }\n key={`${title}-${cIndex}`}\n role=\"columnheader\"\n >\n {title}\n </th>\n );\n });\n\n headerRow.push(\n <th\n className={stickyLastColumn ? style.headerLastSticky : style.headerLast}\n key=\"action-header\"\n />\n );\n const headerView = [...headerRow];\n\n const bodyView = rows.map((row, index) => {\n const {fields, isRowExpandible = false} = row;\n const bodyRow = fields.map((field, fIndex) => {\n const cellContent =\n fIndex === 0 ? (\n <div className={style.columFirstWrapper}>\n <div className={style.expandButtonWrapper}>\n {isRowExpandible ? (\n <ButtonLinkIconOnly\n onClick={handleExpandRow(index)}\n data-name={`arrowUp-button-${index}`}\n icon=\"down\"\n className={expandState[index] ? 'bulkArrowUp' : 'bulkArrowDown'}\n aria-label={translate('bulk_import.show_errors')}\n />\n ) : null}\n </div>\n {buildField(field)}\n </div>\n ) : (\n buildField(field)\n );\n return (\n <td\n className={\n fIndex === 0\n ? classnames(\n stickyFirstColumn ? style.columnFirstSticky : style.columnFirst,\n style.col\n )\n : style.col\n }\n style={{width: columnWidth}}\n key={`${field}-${fIndex}`}\n >\n {cellContent}\n </td>\n );\n });\n\n bodyRow.push(\n <td\n className={stickyLastColumn ? style.columnLastSticky : style.columnLast}\n key=\"actionHeader\"\n >\n {lastField ? (\n <div\n className={classnames({\n [style.inspectButton]: get('className', lastField) === 'bulkInspectButton'\n })}\n >\n {buildLastField(lastField)}\n </div>\n ) : null}\n </td>\n );\n const nestedRow = get('nestedRow', row);\n const nestedRowCellule =\n nestedRow && expandedRows.includes(index) ? (\n <tr key={`line-${index}-error`}>\n <td className={style.nestedRowCellule} colSpan={fields.length + 2}>\n {buildNestedRow(nestedRow)}\n </td>\n </tr>\n ) : null;\n\n return nestedRowCellule\n ? [<tr key={`line-${index}`}>{bodyRow}</tr>, nestedRowCellule]\n : [<tr key={`line-${index}`}>{bodyRow}</tr>];\n });\n\n return (\n <div className={style.wrapper}>\n <table\n {...(ariaDescribedby ? {'aria-describedby': ariaDescribedby} : {})}\n className={style.table}\n data-testid=\"expandible-actionable-table\"\n data-name=\"expandible-actionable-table\"\n >\n <thead className={isNestedTable ? style.theadNested : style.thead}>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>\n </div>\n );\n};\n\nActionableExpandableErrorsTable.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nActionableExpandableErrorsTable.propTypes = propTypes;\n\nexport default ActionableExpandableErrorsTable;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,QAA8B,OAA9B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AAEA,OAAOC,QAAP,IAAkBC,uBAAlB,QAAgD,qBAAhD;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,SAAyDC,SAAzD,QAAyE,SAAzE;;AAEA,MAAMC,UAAU,GAAIC,KAAD,IAAkB;EACnC,IAAI,UAASA,KAAT,CAAJ,EAAqB,OAAOA,KAAP;EACrB,MAAM;IAACC;EAAD,IAAkBD,KAA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5D,gBACE,gCAAKtB,UAAL,CADF,CANF,eASE,mCAAQC,QAAR,CATF,CADF,CADF;AAeD,CApLD;;AAsLAvC,+BAA+B,CAAC6D,YAAhC,GAA+C;EAC7CC,IAAI,EAAE9E,QAAQ,CAAC+E,iBAAT,CAA2BD,IADY;EAE7ClD,SAAS,EAAE5B,QAAQ,CAAC+E,iBAAT,CAA2BnD;AAFO,CAA/C;AAKAZ,+BAA+B,CAACT,SAAhC,2CAA4CA,SAA5C;AAEA,eAAeS,+BAAf"}
@@ -132,3 +132,8 @@
132
132
  padding: 10px;
133
133
  border-top: 1px solid light;
134
134
  }
135
+
136
+ .statusItemWrapper {
137
+ width: 24px;
138
+ height: 24px;
139
+ }
@@ -12,6 +12,7 @@ export declare const propTypes: {
12
12
  fields: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
13
13
  type: PropTypes.Requireable<string>;
14
14
  current: PropTypes.Requireable<boolean>;
15
+ selected: PropTypes.Requireable<boolean>;
15
16
  icon: PropTypes.Requireable<string>;
16
17
  value: PropTypes.Requireable<string>;
17
18
  }> | null | undefined> | null | undefined)[]>;
@@ -74,6 +75,8 @@ export declare const propTypes: {
74
75
  isBulkMenu: PropTypes.Requireable<boolean>;
75
76
  }> | null | undefined>>;
76
77
  isNestedTable: PropTypes.Requireable<boolean>;
78
+ emptyStateFirstMessage: PropTypes.Requireable<string>;
79
+ emptyStateSecondMessage: PropTypes.Requireable<string>;
77
80
  };
78
81
  export declare type Field = string | (StatusItemProps & {
79
82
  componentType: 'status';
@@ -109,6 +112,8 @@ export declare type Props = {
109
112
  ariaDescribedby?: string;
110
113
  lastField?: LastField;
111
114
  isNestedTable?: boolean;
115
+ emptyStateFistMessage?: string;
116
+ emptyStateSecondMessage?: string;
112
117
  };
113
118
  export declare type ExpandState = {
114
119
  [key: number]: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"names":[],"mappings":"A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AAa,CAAC;CAC9B,CAAC,GACF,CAAC,0BAA0B,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEP,oBAAY,SAAS,GACjB,CAAC,gBAAgB,GAAG;IAClB,aAAa,EAAE,cAAc,CAAC;CAC/B,CAAC,GACF,CAAC,KAAK,GAAG;IACP,aAAa,EAAE,yBAAyB,CAAC;CAC1C,CAAC,CAAC;AAEP,oBAAY,MAAM,GAAG;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AACrC,oBAAY,GAAG,GAAG;IAChB,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF,oBAAY,OAAO,GAAG,MAAM,EAAE,CAAC;AAC/B,oBAAY,IAAI,GAAG,GAAG,EAAE,CAAC;AAEzB,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,oBAAY,WAAW,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CAAC"}
@@ -28,6 +28,8 @@ export const propTypes = {
28
28
  })), PropTypes.shape(_extends({}, BulletPointMenuButton.propTypes, {
29
29
  componentType: PropTypes.oneOf(['menu'])
30
30
  }))]),
31
- isNestedTable: PropTypes.bool
31
+ isNestedTable: PropTypes.bool,
32
+ emptyStateFirstMessage: PropTypes.string,
33
+ emptyStateSecondMessage: PropTypes.string
32
34
  };
33
35
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","StatusItem","ButtonLink","BulletPointMenuButton","columnProptypes","shape","title","string","isRequired","rowProptypes","fields","arrayOf","oneOfType","propTypes","type","oneOf","isRowExpandible","bool","lastField","columns","rows","stickyFirstColumn","stickyLastColumn","columnWidth","ariaDescribedby","componentType","isNestedTable"],"sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport StatusItem from '../../atom/status-item';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../bullet-point-menu-button';\nimport {BulletPointMenuButtonProps} from '../bullet-point-menu-button/types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport {StatusItemProps} from '../../atom/status-item/types';\nimport {Props as ErrorsTableProps} from '../errors-table/types';\nimport {Props as BulkProgressBarProps} from '../bulk-progress-bar/types';\n\nconst columnProptypes = PropTypes.shape({\n title: PropTypes.string.isRequired\n});\n\nconst rowProptypes = PropTypes.shape({\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n ...StatusItem.propTypes,\n type: PropTypes.oneOf(['status'])\n })\n ])\n ),\n isRowExpandible: PropTypes.bool,\n lastField: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n ...BulletPointMenuButton.propTypes,\n type: PropTypes.oneOf(['menu'])\n })\n ])\n});\n\nexport const propTypes = {\n columns: PropTypes.arrayOf(columnProptypes),\n rows: PropTypes.arrayOf(rowProptypes),\n stickyFirstColumn: PropTypes.bool,\n stickyLastColumn: PropTypes.bool,\n columnWidth: PropTypes.string,\n ariaDescribedby: PropTypes.string,\n lastField: PropTypes.oneOfType([\n PropTypes.shape({\n ...ButtonLink.propTypes,\n componentType: PropTypes.oneOf(['button-link'])\n }),\n PropTypes.shape({\n ...BulletPointMenuButton.propTypes,\n componentType: PropTypes.oneOf(['menu'])\n })\n ]),\n isNestedTable: PropTypes.bool\n};\n\nexport type Field =\n | string\n | (StatusItemProps & {\n componentType: 'status';\n })\n | (BulkProgressBarProps & {\n componentType: 'progress-bar';\n });\n\nexport type LastField =\n | (ButtonLinkProps & {\n componentType: 'button-link';\n })\n | (BulletPointMenuButtonProps & {\n componentType: 'menu';\n });\n\nexport type NestedRow =\n | (ErrorsTableProps & {\n componentType: 'errors-table';\n })\n | (Props & {\n componentType: 'expandible-errors-table';\n });\n\nexport type Column = {title: string};\nexport type Row = {\n fields: Field[];\n\n nestedRow?: NestedRow;\n isRowExpandible?: boolean;\n};\nexport type Columns = Column[];\nexport type Rows = Row[];\n\nexport type Props = {\n columns: Columns;\n rows?: Rows;\n stickyFirstColumn?: boolean;\n stickyLastColumn?: boolean;\n columnWidth?: `${number}${'px' | '%'}`;\n ariaDescribedby?: string;\n lastField?: LastField;\n isNestedTable?: boolean;\n};\n\nexport type ExpandState = {[key: number]: boolean};\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AAOA,MAAMC,eAAe,GAAGJ,SAAS,CAACK,KAAV,CAAgB;EACtCC,KAAK,EAAEN,SAAS,CAACO,MAAV,CAAiBC;AADc,CAAhB,CAAxB;AAIA,MAAMC,YAAY,GAAGT,SAAS,CAACK,KAAV,CAAgB;EACnCK,MAAM,EAAEV,SAAS,CAACW,OAAV,CACNX,SAAS,CAACY,SAAV,CAAoB,CAClBZ,SAAS,CAACO,MADQ,EAElBP,SAAS,CAACK,KAAV,cACKJ,UAAU,CAACY,SADhB;IAEEC,IAAI,EAAEd,SAAS,CAACe,KAAV,CAAgB,CAAC,QAAD,CAAhB;EAFR,GAFkB,CAApB,CADM,CAD2B;EAUnCC,eAAe,EAAEhB,SAAS,CAACiB,IAVQ;EAWnCC,SAAS,EAAElB,SAAS,CAACY,SAAV,CAAoB,CAC7BZ,SAAS,CAACO,MADmB,EAE7BP,SAAS,CAACK,KAAV,cACKF,qBAAqB,CAACU,SAD3B;IAEEC,IAAI,EAAEd,SAAS,CAACe,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAFR,GAF6B,CAApB;AAXwB,CAAhB,CAArB;AAoBA,OAAO,MAAMF,SAAS,GAAG;EACvBM,OAAO,EAAEnB,SAAS,CAACW,OAAV,CAAkBP,eAAlB,CADc;EAEvBgB,IAAI,EAAEpB,SAAS,CAACW,OAAV,CAAkBF,YAAlB,CAFiB;EAGvBY,iBAAiB,EAAErB,SAAS,CAACiB,IAHN;EAIvBK,gBAAgB,EAAEtB,SAAS,CAACiB,IAJL;EAKvBM,WAAW,EAAEvB,SAAS,CAACO,MALA;EAMvBiB,eAAe,EAAExB,SAAS,CAACO,MANJ;EAOvBW,SAAS,EAAElB,SAAS,CAACY,SAAV,CAAoB,CAC7BZ,SAAS,CAACK,KAAV,cACKH,UAAU,CAACW,SADhB;IAEEY,aAAa,EAAEzB,SAAS,CAACe,KAAV,CAAgB,CAAC,aAAD,CAAhB;EAFjB,GAD6B,EAK7Bf,SAAS,CAACK,KAAV,cACKF,qBAAqB,CAACU,SAD3B;IAEEY,aAAa,EAAEzB,SAAS,CAACe,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAFjB,GAL6B,CAApB,CAPY;EAiBvBW,aAAa,EAAE1B,SAAS,CAACiB;AAjBF,CAAlB"}
1
+ {"version":3,"file":"types.js","names":["PropTypes","StatusItem","ButtonLink","BulletPointMenuButton","columnProptypes","shape","title","string","isRequired","rowProptypes","fields","arrayOf","oneOfType","propTypes","type","oneOf","isRowExpandible","bool","lastField","columns","rows","stickyFirstColumn","stickyLastColumn","columnWidth","ariaDescribedby","componentType","isNestedTable","emptyStateFirstMessage","emptyStateSecondMessage"],"sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport StatusItem from '../../atom/status-item';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../bullet-point-menu-button';\nimport {BulletPointMenuButtonProps} from '../bullet-point-menu-button/types';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport {StatusItemProps} from '../../atom/status-item/types';\nimport {Props as ErrorsTableProps} from '../errors-table/types';\nimport {Props as BulkProgressBarProps} from '../bulk-progress-bar/types';\n\nconst columnProptypes = PropTypes.shape({\n title: PropTypes.string.isRequired\n});\n\nconst rowProptypes = PropTypes.shape({\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n ...StatusItem.propTypes,\n type: PropTypes.oneOf(['status'])\n })\n ])\n ),\n isRowExpandible: PropTypes.bool,\n lastField: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n ...BulletPointMenuButton.propTypes,\n type: PropTypes.oneOf(['menu'])\n })\n ])\n});\n\nexport const propTypes = {\n columns: PropTypes.arrayOf(columnProptypes),\n rows: PropTypes.arrayOf(rowProptypes),\n stickyFirstColumn: PropTypes.bool,\n stickyLastColumn: PropTypes.bool,\n columnWidth: PropTypes.string,\n ariaDescribedby: PropTypes.string,\n lastField: PropTypes.oneOfType([\n PropTypes.shape({\n ...ButtonLink.propTypes,\n componentType: PropTypes.oneOf(['button-link'])\n }),\n PropTypes.shape({\n ...BulletPointMenuButton.propTypes,\n componentType: PropTypes.oneOf(['menu'])\n })\n ]),\n isNestedTable: PropTypes.bool,\n emptyStateFirstMessage: PropTypes.string,\n emptyStateSecondMessage: PropTypes.string\n};\n\nexport type Field =\n | string\n | (StatusItemProps & {\n componentType: 'status';\n })\n | (BulkProgressBarProps & {\n componentType: 'progress-bar';\n });\n\nexport type LastField =\n | (ButtonLinkProps & {\n componentType: 'button-link';\n })\n | (BulletPointMenuButtonProps & {\n componentType: 'menu';\n });\n\nexport type NestedRow =\n | (ErrorsTableProps & {\n componentType: 'errors-table';\n })\n | (Props & {\n componentType: 'expandible-errors-table';\n });\n\nexport type Column = {title: string};\nexport type Row = {\n fields: Field[];\n\n nestedRow?: NestedRow;\n isRowExpandible?: boolean;\n};\nexport type Columns = Column[];\nexport type Rows = Row[];\n\nexport type Props = {\n columns: Columns;\n rows?: Rows;\n stickyFirstColumn?: boolean;\n stickyLastColumn?: boolean;\n columnWidth?: `${number}${'px' | '%'}`;\n ariaDescribedby?: string;\n lastField?: LastField;\n isNestedTable?: boolean;\n emptyStateFistMessage?: string;\n emptyStateSecondMessage?: string;\n};\n\nexport type ExpandState = {[key: number]: boolean};\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AAOA,MAAMC,eAAe,GAAGJ,SAAS,CAACK,KAAV,CAAgB;EACtCC,KAAK,EAAEN,SAAS,CAACO,MAAV,CAAiBC;AADc,CAAhB,CAAxB;AAIA,MAAMC,YAAY,GAAGT,SAAS,CAACK,KAAV,CAAgB;EACnCK,MAAM,EAAEV,SAAS,CAACW,OAAV,CACNX,SAAS,CAACY,SAAV,CAAoB,CAClBZ,SAAS,CAACO,MADQ,EAElBP,SAAS,CAACK,KAAV,cACKJ,UAAU,CAACY,SADhB;IAEEC,IAAI,EAAEd,SAAS,CAACe,KAAV,CAAgB,CAAC,QAAD,CAAhB;EAFR,GAFkB,CAApB,CADM,CAD2B;EAUnCC,eAAe,EAAEhB,SAAS,CAACiB,IAVQ;EAWnCC,SAAS,EAAElB,SAAS,CAACY,SAAV,CAAoB,CAC7BZ,SAAS,CAACO,MADmB,EAE7BP,SAAS,CAACK,KAAV,cACKF,qBAAqB,CAACU,SAD3B;IAEEC,IAAI,EAAEd,SAAS,CAACe,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAFR,GAF6B,CAApB;AAXwB,CAAhB,CAArB;AAoBA,OAAO,MAAMF,SAAS,GAAG;EACvBM,OAAO,EAAEnB,SAAS,CAACW,OAAV,CAAkBP,eAAlB,CADc;EAEvBgB,IAAI,EAAEpB,SAAS,CAACW,OAAV,CAAkBF,YAAlB,CAFiB;EAGvBY,iBAAiB,EAAErB,SAAS,CAACiB,IAHN;EAIvBK,gBAAgB,EAAEtB,SAAS,CAACiB,IAJL;EAKvBM,WAAW,EAAEvB,SAAS,CAACO,MALA;EAMvBiB,eAAe,EAAExB,SAAS,CAACO,MANJ;EAOvBW,SAAS,EAAElB,SAAS,CAACY,SAAV,CAAoB,CAC7BZ,SAAS,CAACK,KAAV,cACKH,UAAU,CAACW,SADhB;IAEEY,aAAa,EAAEzB,SAAS,CAACe,KAAV,CAAgB,CAAC,aAAD,CAAhB;EAFjB,GAD6B,EAK7Bf,SAAS,CAACK,KAAV,cACKF,qBAAqB,CAACU,SAD3B;IAEEY,aAAa,EAAEzB,SAAS,CAACe,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAFjB,GAL6B,CAApB,CAPY;EAiBvBW,aAAa,EAAE1B,SAAS,CAACiB,IAjBF;EAkBvBU,sBAAsB,EAAE3B,SAAS,CAACO,MAlBX;EAmBvBqB,uBAAuB,EAAE5B,SAAS,CAACO;AAnBZ,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/index.js"],"names":[],"mappings":";AAMA,4DAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/index.js"],"names":[],"mappings":";AAMA,4DAiBC"}
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import React from 'react';
4
2
  import map from 'lodash/fp/map';
5
3
  import StatusItem from '../../atom/status-item';
@@ -12,9 +10,10 @@ const ReviewHeaderSteps = props => {
12
10
  } = props;
13
11
  const items = map.convert({
14
12
  cap: false
15
- })((step, index) => /*#__PURE__*/React.createElement(StatusItem, _extends({}, step, {
13
+ })((step, index) => /*#__PURE__*/React.createElement("div", {
14
+ className: style.statusItemContainer,
16
15
  key: index
17
- })), steps);
16
+ }, /*#__PURE__*/React.createElement(StatusItem, step)), steps);
18
17
  return /*#__PURE__*/React.createElement("div", {
19
18
  className: style.wrapper,
20
19
  "data-name": "header-steps"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","map","StatusItem","style","propTypes","ReviewHeaderSteps","props","steps","items","convert","cap","step","index","wrapper"],"sources":["../../../src/molecule/review-header-steps/index.js"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewHeaderSteps = props => {\n const {steps} = props;\n\n const items = map.convert({cap: false})(\n (step, index) => <StatusItem {...step} key={index} />,\n steps\n );\n\n return (\n <div className={style.wrapper} data-name=\"header-steps\">\n {items}\n </div>\n );\n};\n\nReviewHeaderSteps.propTypes = propTypes;\n\nexport default ReviewHeaderSteps;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;EAEA,MAAME,KAAK,GAAGP,GAAG,CAACQ,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBAAiB,oBAAC,UAAD,eAAgBD,IAAhB;IAAsB,GAAG,EAAEC;EAA3B,GADL,EAEZL,KAFY,CAAd;EAKA,oBACE;IAAK,SAAS,EAAEJ,KAAK,CAACU,OAAtB;IAA+B,aAAU;EAAzC,GACGL,KADH,CADF;AAKD,CAbD;;AAeAH,iBAAiB,CAACD,SAAlB,2CAA8BA,SAA9B;AAEA,eAAeC,iBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","map","StatusItem","style","propTypes","ReviewHeaderSteps","props","steps","items","convert","cap","step","index","statusItemContainer","wrapper"],"sources":["../../../src/molecule/review-header-steps/index.js"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ReviewHeaderSteps = props => {\n const {steps} = props;\n\n const items = map.convert({cap: false})(\n (step, index) => (\n <div className={style.statusItemContainer} key={index}>\n <StatusItem {...step} />\n </div>\n ),\n steps\n );\n\n return (\n <div className={style.wrapper} data-name=\"header-steps\">\n {items}\n </div>\n );\n};\n\nReviewHeaderSteps.propTypes = propTypes;\n\nexport default ReviewHeaderSteps;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AAEA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC;EAAD,IAAUD,KAAhB;EAEA,MAAME,KAAK,GAAGP,GAAG,CAACQ,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EACZ,CAACC,IAAD,EAAOC,KAAP,kBACE;IAAK,SAAS,EAAET,KAAK,CAACU,mBAAtB;IAA2C,GAAG,EAAED;EAAhD,gBACE,oBAAC,UAAD,EAAgBD,IAAhB,CADF,CAFU,EAMZJ,KANY,CAAd;EASA,oBACE;IAAK,SAAS,EAAEJ,KAAK,CAACW,OAAtB;IAA+B,aAAU;EAAzC,GACGN,KADH,CADF;AAKD,CAjBD;;AAmBAH,iBAAiB,CAACD,SAAlB,2CAA8BA,SAA9B;AAEA,eAAeC,iBAAf"}
@@ -3,6 +3,7 @@ import { StatusItemProps } from '../../atom/status-item/types';
3
3
  declare const propTypes: {
4
4
  steps: PropTypes.Requireable<(PropTypes.InferProps<{
5
5
  current: PropTypes.Requireable<boolean>;
6
+ selected: PropTypes.Requireable<boolean>;
6
7
  icon: PropTypes.Requireable<string>;
7
8
  value: PropTypes.Requireable<string>;
8
9
  }> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAsC,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE5F,QAAA,MAAM,SAAS;;;;;;CAEd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-header-steps/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAsC,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE5F,QAAA,MAAM,SAAS;;;;;;;CAEd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC"}
@@ -3,4 +3,9 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  justify-content: space-between;
6
- }
6
+ }
7
+
8
+ .statusItemContainer {
9
+ width: 32px;
10
+ height: 32px;
11
+ }
@@ -1,18 +1,24 @@
1
1
  export default ListItem;
2
- declare function ListItem(props: any): JSX.Element;
2
+ declare function ListItem({ buttonLink, buttonLinkIcon, bulletPointMenuButton, tags, title, dataColumns, order, "aria-label": ariaLabel, contentType, isBulkStyle }: {
3
+ buttonLink: any;
4
+ buttonLinkIcon: any;
5
+ bulletPointMenuButton: any;
6
+ tags: any;
7
+ title: any;
8
+ dataColumns: any;
9
+ order: any;
10
+ "aria-label": any;
11
+ contentType: any;
12
+ isBulkStyle?: boolean | undefined;
13
+ }): JSX.Element;
3
14
  declare namespace ListItem {
4
15
  const propTypes: {
5
- bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
6
- buttonAriaLabel: PropTypes.Requireable<string>;
7
- menuAriaLabel: PropTypes.Requireable<string>;
8
- buttons: PropTypes.Requireable<(PropTypes.InferProps<{
9
- 'data-name': PropTypes.Requireable<string>;
10
- label: PropTypes.Requireable<string>;
11
- type: PropTypes.Requireable<string>;
12
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
13
- }> | null | undefined)[]>;
14
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
15
- }>>;
16
+ title: PropTypes.Validator<string>;
17
+ dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
18
+ label: PropTypes.Requireable<string>;
19
+ type: PropTypes.Requireable<string>;
20
+ className: PropTypes.Requireable<string>;
21
+ }> | null | undefined)[]>;
16
22
  buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
17
23
  type: PropTypes.Requireable<string>;
18
24
  label: PropTypes.Requireable<string>;
@@ -24,11 +30,36 @@ declare namespace ListItem {
24
30
  }>>;
25
31
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
26
32
  }>>;
33
+ buttonLinkIcon: PropTypes.Requireable<PropTypes.InferProps<{
34
+ size: PropTypes.Requireable<string>;
35
+ 'aria-label': PropTypes.Requireable<string>;
36
+ 'data-name': PropTypes.Requireable<string>;
37
+ icon: PropTypes.Requireable<string>;
38
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
39
+ link: PropTypes.Requireable<PropTypes.InferProps<{
40
+ href: PropTypes.Requireable<string>;
41
+ download: PropTypes.Requireable<boolean>;
42
+ target: PropTypes.Requireable<string>;
43
+ }>>;
44
+ disabled: PropTypes.Requireable<boolean>;
45
+ className: PropTypes.Requireable<string>;
46
+ }>>;
47
+ bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
48
+ buttonAriaLabel: PropTypes.Requireable<string>;
49
+ menuAriaLabel: PropTypes.Requireable<string>;
50
+ buttons: PropTypes.Requireable<(PropTypes.InferProps<{
51
+ 'data-name': PropTypes.Requireable<string>;
52
+ label: PropTypes.Requireable<string>;
53
+ type: PropTypes.Requireable<string>;
54
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
55
+ }> | null | undefined)[]>;
56
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
57
+ }>>;
27
58
  tags: PropTypes.Requireable<(PropTypes.InferProps<{
28
59
  label: PropTypes.Requireable<string>;
29
60
  type: PropTypes.Requireable<string>;
30
61
  }> | null | undefined)[]>;
31
- title: PropTypes.Validator<string>;
62
+ isBulkStyle: PropTypes.Requireable<boolean>;
32
63
  order: PropTypes.Requireable<number>;
33
64
  'aria-label': PropTypes.Requireable<string>;
34
65
  contentType: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAQA,mDA8CC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-item/index.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;gBAgEC"}
@@ -1,65 +1,74 @@
1
1
  import _map from "lodash/fp/map";
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import classnames from 'classnames';
4
5
  import Tag from '../../atom/tag';
5
6
  import ButtonLink from '../../atom/button-link';
6
- import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
7
+ import ButtonLinkIconOnly from '../../atom/button-link-icon-only';
8
+ import BulletPointMenuButton from '../../molecule/bullet-point-menu-button'; // eslint-disable-next-line css-modules/no-unused-class
9
+
7
10
  import style from './style.css';
8
11
 
9
- const ListItem = props => {
12
+ const ListItem = ({
13
+ buttonLink,
14
+ buttonLinkIcon,
15
+ bulletPointMenuButton,
16
+ tags,
17
+ title,
18
+ dataColumns,
19
+ order,
20
+ 'aria-label': ariaLabel,
21
+ contentType,
22
+ isBulkStyle = false
23
+ }) => {
10
24
  let isPublished = false;
11
- const {
12
- bulletPointMenuButton,
13
- buttonLink,
14
- tags,
15
- title,
16
- order,
17
- 'aria-label': ariaLabel,
18
- contentType
19
- } = props;
20
25
 
21
26
  const tagsView = _map.convert({
22
27
  cap: false
23
28
  })((tag, index) => {
24
- isPublished = tag.type === 'published';
29
+ isPublished = tag.type === 'success';
25
30
  return /*#__PURE__*/React.createElement("div", {
26
31
  key: index,
27
32
  className: style.tag
28
33
  }, /*#__PURE__*/React.createElement(Tag, tag));
29
34
  })(tags);
30
35
 
31
- return /*#__PURE__*/React.createElement("div", {
32
- className: style.wrapper
33
- }, isPublished && contentType === 'certification' ? /*#__PURE__*/React.createElement("div", {
34
- className: style.orderWrapper
35
- }, order !== null && order !== undefined ? /*#__PURE__*/React.createElement("div", {
36
+ const dataColumnsView = _map.convert({
37
+ cap: false
38
+ })((dataColumn, index) => {
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ key: index,
41
+ className: style[dataColumn.className]
42
+ }, dataColumn.type ? /*#__PURE__*/React.createElement(Tag, dataColumn) : dataColumn.label);
43
+ })(dataColumns);
44
+
45
+ const orderView = order !== null && order !== undefined ? /*#__PURE__*/React.createElement("div", {
36
46
  className: style.order,
37
47
  "aria-label": ariaLabel
38
- }, order + 1) : null, /*#__PURE__*/React.createElement("div", {
39
- className: style.title,
40
- title: title
41
- }, title)) : /*#__PURE__*/React.createElement("div", {
48
+ }, order + 1) : null;
49
+ return /*#__PURE__*/React.createElement("div", {
50
+ className: classnames(style.wrapper, isBulkStyle && style.gridLayout)
51
+ }, /*#__PURE__*/React.createElement("div", {
52
+ className: style.dataColumnsWrapper
53
+ }, isPublished && contentType === 'certification' ? orderView : null, /*#__PURE__*/React.createElement("div", {
42
54
  className: style.title,
43
55
  title: title
44
- }, title), /*#__PURE__*/React.createElement("div", {
56
+ }, title), dataColumnsView), /*#__PURE__*/React.createElement("div", {
45
57
  className: style.settings
46
- }, tagsView, /*#__PURE__*/React.createElement("div", {
47
- className: style.edit
48
- }, /*#__PURE__*/React.createElement(ButtonLink, buttonLink)), /*#__PURE__*/React.createElement(BulletPointMenuButton, bulletPointMenuButton)));
58
+ }, tagsView, buttonLink ? /*#__PURE__*/React.createElement("div", {
59
+ className: style.buttonLink
60
+ }, /*#__PURE__*/React.createElement(ButtonLink, buttonLink)) : null, buttonLinkIcon ? /*#__PURE__*/React.createElement("div", {
61
+ className: style.buttonLink
62
+ }, /*#__PURE__*/React.createElement(ButtonLinkIconOnly, buttonLinkIcon)) : null, /*#__PURE__*/React.createElement(BulletPointMenuButton, bulletPointMenuButton)));
49
63
  };
50
64
 
51
65
  ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
52
- bulletPointMenuButton: PropTypes.shape({
53
- buttonAriaLabel: PropTypes.string,
54
- menuAriaLabel: PropTypes.string,
55
- buttons: PropTypes.arrayOf(PropTypes.shape({
56
- 'data-name': PropTypes.string,
57
- label: PropTypes.string,
58
- type: PropTypes.string,
59
- onClick: PropTypes.func
60
- })),
61
- onClick: PropTypes.func
62
- }),
66
+ title: PropTypes.string.isRequired,
67
+ dataColumns: PropTypes.arrayOf(PropTypes.shape({
68
+ label: PropTypes.string,
69
+ type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default']),
70
+ className: PropTypes.oneOf(['cell', 'title'])
71
+ })),
63
72
  buttonLink: PropTypes.shape({
64
73
  type: PropTypes.string,
65
74
  label: PropTypes.string,
@@ -71,11 +80,36 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
71
80
  }),
72
81
  onClick: PropTypes.func
73
82
  }),
83
+ buttonLinkIcon: PropTypes.shape({
84
+ size: PropTypes.oneOf(['default', 'small', 'responsive']),
85
+ 'aria-label': PropTypes.string,
86
+ 'data-name': PropTypes.string,
87
+ icon: PropTypes.string,
88
+ onClick: PropTypes.func,
89
+ link: PropTypes.shape({
90
+ href: PropTypes.string,
91
+ download: PropTypes.bool,
92
+ target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
93
+ }),
94
+ disabled: PropTypes.bool,
95
+ className: PropTypes.string
96
+ }),
97
+ bulletPointMenuButton: PropTypes.shape({
98
+ buttonAriaLabel: PropTypes.string,
99
+ menuAriaLabel: PropTypes.string,
100
+ buttons: PropTypes.arrayOf(PropTypes.shape({
101
+ 'data-name': PropTypes.string,
102
+ label: PropTypes.string,
103
+ type: PropTypes.string,
104
+ onClick: PropTypes.func
105
+ })),
106
+ onClick: PropTypes.func
107
+ }),
74
108
  tags: PropTypes.arrayOf(PropTypes.shape({
75
109
  label: PropTypes.string,
76
- type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])
110
+ type: PropTypes.oneOf(['success', 'failure', 'warning', 'progress', 'default'])
77
111
  })),
78
- title: PropTypes.string.isRequired,
112
+ isBulkStyle: PropTypes.bool,
79
113
  order: PropTypes.number,
80
114
  'aria-label': PropTypes.string,
81
115
  contentType: PropTypes.string,