@coorpacademy/components 11.38.8-alpha.7 → 11.39.1-alpha.0

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 (164) hide show
  1. package/es/atom/chip/index.d.ts.map +1 -1
  2. package/es/atom/chip/index.js +0 -3
  3. package/es/atom/chip/index.js.map +1 -1
  4. package/es/atom/input-text/index.d.ts +0 -1
  5. package/es/atom/input-text/index.d.ts.map +1 -1
  6. package/es/atom/input-text/index.js +1 -4
  7. package/es/atom/input-text/index.js.map +1 -1
  8. package/es/atom/input-text/style.css +1 -13
  9. package/es/atom/input-text-with-title/index.d.ts +0 -1
  10. package/es/atom/input-textarea/index.d.ts +0 -1
  11. package/es/atom/input-textarea/index.d.ts.map +1 -1
  12. package/es/atom/input-textarea/index.js +1 -4
  13. package/es/atom/input-textarea/index.js.map +1 -1
  14. package/es/atom/input-textarea/style.css +0 -22
  15. package/es/atom/select/index.d.ts +0 -1
  16. package/es/atom/select/index.d.ts.map +1 -1
  17. package/es/atom/select/index.js +11 -26
  18. package/es/atom/select/index.js.map +1 -1
  19. package/es/atom/select/style.css +0 -61
  20. package/es/atom/status-item/index.d.ts.map +1 -1
  21. package/es/atom/status-item/index.js +15 -15
  22. package/es/atom/status-item/index.js.map +1 -1
  23. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  24. package/es/molecule/bullet-point-menu-button/index.js +2 -42
  25. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  26. package/es/molecule/card/favorite.d.ts.map +1 -1
  27. package/es/molecule/card/favorite.js +0 -13
  28. package/es/molecule/card/favorite.js.map +1 -1
  29. package/es/molecule/course-sections/index.d.ts +0 -1
  30. package/es/molecule/drag-and-drop/index.d.ts +0 -1
  31. package/es/molecule/drag-and-drop/upload-report.d.ts +0 -1
  32. package/es/molecule/filters/index.d.ts +0 -1
  33. package/es/molecule/filters/index.d.ts.map +1 -1
  34. package/es/molecule/skill-picker-modal/index.js +1 -1
  35. package/es/molecule/skill-picker-modal/index.js.map +1 -1
  36. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +0 -1
  37. package/es/molecule/translation-modal/index.d.ts +0 -4
  38. package/es/molecule/translation-modal/index.js +6 -6
  39. package/es/molecule/translation-modal/index.js.map +1 -1
  40. package/es/organism/content-translation/index.d.ts +0 -2
  41. package/es/organism/header-with-actions/index.d.ts +2 -1
  42. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  43. package/es/organism/header-with-actions/index.js +4 -3
  44. package/es/organism/header-with-actions/index.js.map +1 -1
  45. package/es/organism/header-with-actions/types.d.ts +2 -0
  46. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  47. package/es/organism/header-with-actions/types.js +2 -1
  48. package/es/organism/header-with-actions/types.js.map +1 -1
  49. package/es/organism/icon-editor/index.d.ts +0 -1
  50. package/es/organism/icon-editor/index.d.ts.map +1 -1
  51. package/es/organism/icon-editor/types.d.ts +0 -1
  52. package/es/organism/icon-editor/types.d.ts.map +1 -1
  53. package/es/organism/rewards-form/index.d.ts +0 -1
  54. package/es/organism/select-opponents/index.d.ts +0 -1
  55. package/es/organism/select-opponents/index.d.ts.map +1 -1
  56. package/es/organism/select-opponents/types.d.ts +0 -1
  57. package/es/organism/select-opponents/types.d.ts.map +1 -1
  58. package/es/organism/skill-edition/index.d.ts +2 -22
  59. package/es/organism/skill-edition/index.d.ts.map +1 -1
  60. package/es/organism/skill-edition/index.js +47 -63
  61. package/es/organism/skill-edition/index.js.map +1 -1
  62. package/es/organism/skill-edition/style.css +13 -0
  63. package/es/organism/skill-edition/types.d.ts +5 -27
  64. package/es/organism/skill-edition/types.d.ts.map +1 -1
  65. package/es/organism/skill-edition/types.js +5 -22
  66. package/es/organism/skill-edition/types.js.map +1 -1
  67. package/es/organism/title-and-input/index.d.ts +0 -5
  68. package/es/organism/title-and-input/index.d.ts.map +1 -1
  69. package/es/organism/title-and-input/types.d.ts +0 -5
  70. package/es/organism/title-and-input/types.d.ts.map +1 -1
  71. package/es/organism/wizard-contents/index.d.ts +0 -4
  72. package/es/template/back-office/brand-update/index.d.ts +3 -22
  73. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  74. package/es/template/back-office/brand-update/index.js +3 -6
  75. package/es/template/back-office/brand-update/index.js.map +1 -1
  76. package/es/template/certifications/index.d.ts +0 -1
  77. package/es/template/common/search-page/index.d.ts +0 -1
  78. package/es/template/playlist-detail/index.d.ts +0 -1
  79. package/es/util/render-with-context.d.ts.map +1 -1
  80. package/es/util/render-with-context.js +2 -3
  81. package/es/util/render-with-context.js.map +1 -1
  82. package/lib/atom/chip/index.d.ts.map +1 -1
  83. package/lib/atom/chip/index.js +0 -3
  84. package/lib/atom/chip/index.js.map +1 -1
  85. package/lib/atom/input-text/index.d.ts +0 -1
  86. package/lib/atom/input-text/index.d.ts.map +1 -1
  87. package/lib/atom/input-text/index.js +1 -4
  88. package/lib/atom/input-text/index.js.map +1 -1
  89. package/lib/atom/input-text/style.css +1 -13
  90. package/lib/atom/input-text-with-title/index.d.ts +0 -1
  91. package/lib/atom/input-textarea/index.d.ts +0 -1
  92. package/lib/atom/input-textarea/index.d.ts.map +1 -1
  93. package/lib/atom/input-textarea/index.js +1 -4
  94. package/lib/atom/input-textarea/index.js.map +1 -1
  95. package/lib/atom/input-textarea/style.css +0 -22
  96. package/lib/atom/select/index.d.ts +0 -1
  97. package/lib/atom/select/index.d.ts.map +1 -1
  98. package/lib/atom/select/index.js +11 -26
  99. package/lib/atom/select/index.js.map +1 -1
  100. package/lib/atom/select/style.css +0 -61
  101. package/lib/atom/status-item/index.d.ts.map +1 -1
  102. package/lib/atom/status-item/index.js +17 -15
  103. package/lib/atom/status-item/index.js.map +1 -1
  104. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  105. package/lib/molecule/bullet-point-menu-button/index.js +2 -41
  106. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  107. package/lib/molecule/card/favorite.d.ts.map +1 -1
  108. package/lib/molecule/card/favorite.js +0 -13
  109. package/lib/molecule/card/favorite.js.map +1 -1
  110. package/lib/molecule/course-sections/index.d.ts +0 -1
  111. package/lib/molecule/drag-and-drop/index.d.ts +0 -1
  112. package/lib/molecule/drag-and-drop/upload-report.d.ts +0 -1
  113. package/lib/molecule/filters/index.d.ts +0 -1
  114. package/lib/molecule/filters/index.d.ts.map +1 -1
  115. package/lib/molecule/skill-picker-modal/index.js +1 -1
  116. package/lib/molecule/skill-picker-modal/index.js.map +1 -1
  117. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +0 -1
  118. package/lib/molecule/translation-modal/index.d.ts +0 -4
  119. package/lib/molecule/translation-modal/index.js +6 -6
  120. package/lib/molecule/translation-modal/index.js.map +1 -1
  121. package/lib/organism/content-translation/index.d.ts +0 -2
  122. package/lib/organism/header-with-actions/index.d.ts +2 -1
  123. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  124. package/lib/organism/header-with-actions/index.js +4 -3
  125. package/lib/organism/header-with-actions/index.js.map +1 -1
  126. package/lib/organism/header-with-actions/types.d.ts +2 -0
  127. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  128. package/lib/organism/header-with-actions/types.js +2 -1
  129. package/lib/organism/header-with-actions/types.js.map +1 -1
  130. package/lib/organism/icon-editor/index.d.ts +0 -1
  131. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  132. package/lib/organism/icon-editor/types.d.ts +0 -1
  133. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  134. package/lib/organism/rewards-form/index.d.ts +0 -1
  135. package/lib/organism/select-opponents/index.d.ts +0 -1
  136. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  137. package/lib/organism/select-opponents/types.d.ts +0 -1
  138. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  139. package/lib/organism/skill-edition/index.d.ts +2 -22
  140. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  141. package/lib/organism/skill-edition/index.js +47 -63
  142. package/lib/organism/skill-edition/index.js.map +1 -1
  143. package/lib/organism/skill-edition/style.css +13 -0
  144. package/lib/organism/skill-edition/types.d.ts +5 -27
  145. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  146. package/lib/organism/skill-edition/types.js +5 -22
  147. package/lib/organism/skill-edition/types.js.map +1 -1
  148. package/lib/organism/title-and-input/index.d.ts +0 -5
  149. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  150. package/lib/organism/title-and-input/types.d.ts +0 -5
  151. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  152. package/lib/organism/wizard-contents/index.d.ts +0 -4
  153. package/lib/template/back-office/brand-update/index.d.ts +3 -22
  154. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  155. package/lib/template/back-office/brand-update/index.js +3 -6
  156. package/lib/template/back-office/brand-update/index.js.map +1 -1
  157. package/lib/template/certifications/index.d.ts +0 -1
  158. package/lib/template/common/search-page/index.d.ts +0 -1
  159. package/lib/template/playlist-detail/index.d.ts +0 -1
  160. package/lib/util/render-with-context.d.ts.map +1 -1
  161. package/lib/util/render-with-context.js +2 -3
  162. package/lib/util/render-with-context.js.map +1 -1
  163. package/locales/.mtslconfig.json +1 -0
  164. package/package.json +2 -2
@@ -16,7 +16,6 @@ declare namespace PlayListTranslation {
16
16
  placeholder: PropTypes.Requireable<string>;
17
17
  defaultValue: PropTypes.Requireable<string>;
18
18
  disabled: PropTypes.Requireable<boolean>;
19
- readOnly: PropTypes.Requireable<boolean>;
20
19
  value: PropTypes.Requireable<string>;
21
20
  hint: PropTypes.Requireable<string>;
22
21
  error: PropTypes.Requireable<string>;
@@ -35,7 +34,6 @@ declare namespace PlayListTranslation {
35
34
  title: PropTypes.Requireable<string>;
36
35
  name: PropTypes.Requireable<string>;
37
36
  disabled: PropTypes.Requireable<boolean>;
38
- readOnly: PropTypes.Requireable<boolean>;
39
37
  value: PropTypes.Requireable<string>;
40
38
  hint: PropTypes.Requireable<string>;
41
39
  error: PropTypes.Requireable<string>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { HeaderWithActionsProps } from './types';
3
3
  declare const HeaderWithActions: {
4
- (props: HeaderWithActionsProps): JSX.Element;
4
+ (props: HeaderWithActionsProps): JSX.Element | null;
5
5
  propTypes: {
6
6
  closeButton: import("prop-types").Requireable<import("prop-types").InferProps<{
7
7
  'aria-label': import("prop-types").Requireable<string>;
@@ -36,6 +36,7 @@ declare const HeaderWithActions: {
36
36
  buttonAriaLabel: import("prop-types").Requireable<string>;
37
37
  disabled: import("prop-types").Validator<boolean>;
38
38
  }>>;
39
+ isFetching: import("prop-types").Requireable<boolean>;
39
40
  };
40
41
  };
41
42
  export default HeaderWithActions;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAOA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAOA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -88,9 +88,10 @@ const HeaderWithActions = props => {
88
88
  tag,
89
89
  saveStatus,
90
90
  bulletPointMenuButton,
91
- actionButtons
91
+ actionButtons,
92
+ isFetching
92
93
  } = props;
93
- return /*#__PURE__*/React.createElement("div", {
94
+ return !isFetching ? /*#__PURE__*/React.createElement("div", {
94
95
  className: style.headerWrapper,
95
96
  "data-name": getDataName('wrapper')
96
97
  }, /*#__PURE__*/React.createElement("div", {
@@ -121,7 +122,7 @@ const HeaderWithActions = props => {
121
122
  return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, buildActionButton(action), {
122
123
  key: key
123
124
  }));
124
- }, actionButtons)));
125
+ }, actionButtons))) : null;
125
126
  };
126
127
  HeaderWithActions.propTypes = process.env.NODE_ENV !== "production" ? HeaderWithActionsPropTypes : {};
127
128
  export default HeaderWithActions;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","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","saveStatus","bulletPointMenuButton","actionButtons","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","buttonsWrapper","buttons","action","key","propTypes","process","env","NODE_ENV"],"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 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 {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons} = props;\n\n return (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\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={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\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 );\n};\n\nHeaderWithActions.propTypes = Hea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AAG,EAAKmC,GAAM,CAAC,EACfC,UAAU,CAACW,OAAO,IAAIX,UAAU,CAACpB,KAAK,gBACrCrB,KAAA,CAAA4C,aAAA;IAAGC,SAAS,EAAErC,KAAK,CAACiC;EAAW,GAAEA,UAAU,CAACpB,KAAS,CAAC,GACpD,IACD,CAAC,eACNrB,KAAA,CAAA4C,aAAA;IAAIC,SAAS,EAAErC,KAAK,CAAC+B,KAAM;IAAC,cAAYA,KAAM;IAAC,aAAW9B,WAAW,CAAC,OAAO;EAAE,GAC5E8B,KACC,CACD,CACF,CAAC,eACNvC,KAAA,CAAA4C,aAAA;IAAKC,SAAS,EAAErC,KAAK,CAAC6C,cAAe;IAAC,aAAW5C,WAAW,CAAC,iBAAiB;EAAE,GAC7EiC,qBAAqB,IAAI,CAACzC,OAAO,CAACyC,qBAAqB,CAACY,OAAO,CAAC,gBAC/DtD,KAAA,CAAA4C,aAAA,CAACtC,qBAAqB,EAAA0C,QAAA,KAChBN,qBAAqB;IACzBY,OAAO,EAAE3C,WAAW,CAACQ,eAAe,EAAEuB,qBAAqB,CAACY,OAAO,CAAE;IACrE,aAAW7C,WAAW,CAAC,0BAA0B;EAAE,EACpD,CAAC,GACA,IAAI,EACPE,WAAW,CAAC,CAAC4C,MAAyB,EAAEC,GAAW,KAAK;IACvD,oBAAOxD,KAAA,CAAA4C,aAAA,CAACzC,UAAU,EAAA6C,QAAA,KAAKlB,iBAAiB,CAACyB,MAAM,CAAC;MAAEC,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEb,aAAa,CACb,CACF,CAAC;AAEV,CAAC;AAEDP,iBAAiB,CAACqB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrD,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","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","saveStatus","bulletPointMenuButton","actionButtons","isFetching","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","buttonsWrapper","buttons","action","key","propTypes","process","env","NODE_ENV"],"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 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 {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons, isFetching} =\n props;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\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={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK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aAAW9B,WAAW,CAAC,OAAO;EAAE,GAC5E8B,KACC,CACD,CACF,CAAC,eACNvC,KAAA,CAAA6C,aAAA;IAAKC,SAAS,EAAEtC,KAAK,CAAC8C,cAAe;IAAC,aAAW7C,WAAW,CAAC,iBAAiB;EAAE,GAC7EiC,qBAAqB,IAAI,CAACzC,OAAO,CAACyC,qBAAqB,CAACa,OAAO,CAAC,gBAC/DvD,KAAA,CAAA6C,aAAA,CAACvC,qBAAqB,EAAA2C,QAAA,KAChBP,qBAAqB;IACzBa,OAAO,EAAE5C,WAAW,CAACQ,eAAe,EAAEuB,qBAAqB,CAACa,OAAO,CAAE;IACrE,aAAW9C,WAAW,CAAC,0BAA0B;EAAE,EACpD,CAAC,GACA,IAAI,EACPE,WAAW,CAAC,CAAC6C,MAAyB,EAAEC,GAAW,KAAK;IACvD,oBAAOzD,KAAA,CAAA6C,aAAA,CAAC1C,UAAU,EAAA8C,QAAA,KAAKnB,iBAAiB,CAAC0B,MAAM,CAAC;MAAEC,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEd,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDP,iBAAiB,CAACsB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGtD,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
@@ -33,6 +33,7 @@ declare const HeaderWithActionsPropTypes: {
33
33
  buttonAriaLabel: PropTypes.Requireable<string>;
34
34
  disabled: PropTypes.Validator<boolean>;
35
35
  }>>;
36
+ isFetching: PropTypes.Requireable<boolean>;
36
37
  };
37
38
  export default HeaderWithActionsPropTypes;
38
39
  declare type TagProps = {
@@ -75,6 +76,7 @@ export declare type HeaderWithActionsProps = {
75
76
  saveStatus: SaveStatusProps;
76
77
  actionButtons: ButtonActionProps[];
77
78
  bulletPointMenuButton?: BulletPointMenuButtonProps;
79
+ isFetching?: boolean;
78
80
  };
79
81
  export declare type HeaderWithActionsPropsFixture = {
80
82
  props: HeaderWithActionsProps;
@@ -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;AAmBnC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB/B,CAAC;AAEF,eAAe,0BAA0B,CAAC;AAE1C,aAAK,QAAQ,GAAG;IACd,KAAK,EAAE,WAAW,GAAG,iBAAiB,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9D,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,aAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IA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AO,EAAE,eAAe,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,UAAU,EAAE,eAAe,CAAC;IAC5B,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"}
@@ -34,7 +34,8 @@ const HeaderWithActionsPropTypes = {
34
34
  buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,
35
35
  buttonAriaLabel: PropTypes.string,
36
36
  disabled: PropTypes.bool.isRequired
37
- })
37
+ }),
38
+ isFetching: PropTypes.bool
38
39
  };
39
40
  export default HeaderWithActionsPropTypes;
40
41
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tag","size","saveStatus","display","actionButtons","arrayOf","bulletPointMenuButton","buttons","buttonAriaLabel"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-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 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 }).isRequired,\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }).isRequired,\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};\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 tag: TagProps;\n saveStatus: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEF,SAAS,CAACG,MAAM;EAC1BC,KAAK,EAAEJ,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAEN,SAAS,CAACG,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAEP,SAAS,CAACG,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ;AAC1B,CAAC;AAED,MAAMK,qBAAqB,GAAG;EAC5BC,IAAI,EAAEX,SAAS,CAACY,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACP,UAAU;EAC1DD,KAAK,EAAEJ,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCG,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ,UAAU;EAClCQ,QAAQ,EAAEb,SAAS,CAACc,IAAI;EACxBR,QAAQ,EAAEN,SAAS,CAACG,MAAM;EAC1BI,SAAS,EAAEP,SAAS,CAACG;AACvB,CAAC;AAED,MAAMY,0BAA0B,GAAG;EACjCC,WAAW,EAAEhB,SAAS,CAACiB,KAAK,CAAC;IAC3B,YAAY,EAAEjB,SAAS,CAACG,MAAM;IAC9BK,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ;EAC1B,CAAC,CAAC;EACFa,KAAK,EAAElB,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCc,GAAG,EAAEnB,SAAS,CAACiB,KAAK,CAAC;IACnBb,KAAK,EAAEJ,SAAS,CAACY,KAAK,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAACP,UAAU;IACxFM,IAAI,EAAEX,SAAS,CAACY,KAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAACP,UAAU;IACpEe,IAAI,EAAEpB,SAAS,CAACG,MAAM,CAACE;EACzB,CAAC,CAAC,CAACA,UAAU;EACbgB,UAAU,EAAErB,SAAS,CAACiB,KAAK,CAAC;IAC1BK,OAAO,EAAEtB,SAAS,CAACc,IAAI,CAACT,UAAU;IAClCD,KAAK,EAAEJ,SAAS,CAACY,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC,CAACP,UAAU;EACbkB,aAAa,EAAEvB,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFoB,qBAAqB,EAAEzB,SAAS,CAACiB,KAAK,CAAC;IACrCS,OAAO,EAAE1B,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3EsB,eAAe,EAAE3B,SAAS,CAACG,MAAM;IACjCU,QAAQ,EAAEb,SAAS,CAACc,IAAI,CAACT;EAC3B,CAAC;AACH,CAAC;AAED,eAAeU,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tag","size","saveStatus","display","actionButtons","arrayOf","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-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 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 }).isRequired,\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }).isRequired,\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 tag: TagProps;\n saveStatus: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEF,SAAS,CAACG,MAAM;EAC1BC,KAAK,EAAEJ,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAEN,SAAS,CAACG,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAEP,SAAS,CAACG,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ;AAC1B,CAAC;AAED,MAAMK,qBAAqB,GAAG;EAC5BC,IAAI,EAAEX,SAAS,CAACY,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACP,UAAU;EAC1DD,KAAK,EAAEJ,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCG,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ,UAAU;EAClCQ,QAAQ,EAAEb,SAAS,CAACc,IAAI;EACxBR,QAAQ,EAAEN,SAAS,CAACG,MAAM;EAC1BI,SAAS,EAAEP,SAAS,CAACG;AACvB,CAAC;AAED,MAAMY,0BAA0B,GAAG;EACjCC,WAAW,EAAEhB,SAAS,CAACiB,KAAK,CAAC;IAC3B,YAAY,EAAEjB,SAAS,CAACG,MAAM;IAC9BK,OAAO,EAAER,SAAS,CAACS,IAAI,CAACJ;EAC1B,CAAC,CAAC;EACFa,KAAK,EAAElB,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCc,GAAG,EAAEnB,SAAS,CAACiB,KAAK,CAAC;IACnBb,KAAK,EAAEJ,SAAS,CAACY,KAAK,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAACP,UAAU;IACxFM,IAAI,EAAEX,SAAS,CAACY,KAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAACP,UAAU;IACpEe,IAAI,EAAEpB,SAAS,CAACG,MAAM,CAACE;EACzB,CAAC,CAAC,CAACA,UAAU;EACbgB,UAAU,EAAErB,SAAS,CAACiB,KAAK,CAAC;IAC1BK,OAAO,EAAEtB,SAAS,CAACc,IAAI,CAACT,UAAU;IAClCD,KAAK,EAAEJ,SAAS,CAACY,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC,CAACP,UAAU;EACbkB,aAAa,EAAEvB,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFoB,qBAAqB,EAAEzB,SAAS,CAACiB,KAAK,CAAC;IACrCS,OAAO,EAAE1B,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3EsB,eAAe,EAAE3B,SAAS,CAACG,MAAM;IACjCU,QAAQ,EAAEb,SAAS,CAACc,IAAI,CAACT;EAC3B,CAAC,CAAC;EACFuB,UAAU,EAAE5B,SAAS,CAACc;AACxB,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
@@ -21,7 +21,6 @@ declare const IconEditor: {
21
21
  defaultValue: import("prop-types").Requireable<string>;
22
22
  theme: import("prop-types").Requireable<string>;
23
23
  disabled: import("prop-types").Requireable<boolean>;
24
- readOnly: import("prop-types").Requireable<boolean>;
25
24
  value: import("prop-types").Requireable<string>;
26
25
  hint: import("prop-types").Requireable<string>;
27
26
  error: import("prop-types").Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
@@ -18,7 +18,6 @@ declare const IconEditorPropTypes: {
18
18
  defaultValue: PropTypes.Requireable<string>;
19
19
  theme: PropTypes.Requireable<string>;
20
20
  disabled: PropTypes.Requireable<boolean>;
21
- readOnly: PropTypes.Requireable<boolean>;
22
21
  value: PropTypes.Requireable<string>;
23
22
  hint: PropTypes.Requireable<string>;
24
23
  error: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAEnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAEnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC"}
@@ -100,7 +100,6 @@ declare namespace RewardsForm {
100
100
  placeholder: PropTypes.Requireable<string>;
101
101
  defaultValue: PropTypes.Requireable<string>;
102
102
  disabled: PropTypes.Requireable<boolean>;
103
- readOnly: PropTypes.Requireable<boolean>;
104
103
  value: PropTypes.Requireable<string>;
105
104
  hint: PropTypes.Requireable<string>;
106
105
  error: PropTypes.Requireable<string>;
@@ -99,7 +99,6 @@ declare const SelectOpponents: {
99
99
  placeholder: import("prop-types").Requireable<string>;
100
100
  defaultValue: import("prop-types").Requireable<string>;
101
101
  disabled: import("prop-types").Requireable<boolean>;
102
- readOnly: import("prop-types").Requireable<boolean>;
103
102
  value: import("prop-types").Requireable<string>;
104
103
  hint: import("prop-types").Requireable<string>;
105
104
  error: import("prop-types").Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
@@ -97,7 +97,6 @@ export declare const propTypes: {
97
97
  placeholder: PropTypes.Requireable<string>;
98
98
  defaultValue: PropTypes.Requireable<string>;
99
99
  disabled: PropTypes.Requireable<boolean>;
100
- readOnly: PropTypes.Requireable<boolean>;
101
100
  value: PropTypes.Requireable<string>;
102
101
  hint: PropTypes.Requireable<string>;
103
102
  error: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,KAAK,EAAE;QACL,SAAS,EAAE,iBAAiB,GAAG,cAAc,CAAC;QAC9C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,4BAA4B,EAAE,CAAC;CACvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,KAAK,EAAE;QACL,SAAS,EAAE,iBAAiB,GAAG,cAAc,CAAC;QAC9C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,4BAA4B,EAAE,CAAC;CACvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -31,7 +31,6 @@ declare const SkillEdition: {
31
31
  defaultValue: import("prop-types").Requireable<string>;
32
32
  theme: import("prop-types").Requireable<string>;
33
33
  disabled: import("prop-types").Requireable<boolean>;
34
- readOnly: import("prop-types").Requireable<boolean>;
35
34
  value: import("prop-types").Requireable<string>;
36
35
  hint: import("prop-types").Requireable<string>;
37
36
  error: import("prop-types").Requireable<string>;
@@ -53,7 +52,6 @@ declare const SkillEdition: {
53
52
  name: import("prop-types").Requireable<string>;
54
53
  theme: import("prop-types").Requireable<string>;
55
54
  disabled: import("prop-types").Requireable<boolean>;
56
- readOnly: import("prop-types").Requireable<boolean>;
57
55
  value: import("prop-types").Requireable<string>;
58
56
  hint: import("prop-types").Requireable<string>;
59
57
  error: import("prop-types").Requireable<string>;
@@ -80,7 +78,6 @@ declare const SkillEdition: {
80
78
  defaultValue: import("prop-types").Requireable<string>;
81
79
  theme: import("prop-types").Requireable<string>;
82
80
  disabled: import("prop-types").Requireable<boolean>;
83
- readOnly: import("prop-types").Requireable<boolean>;
84
81
  value: import("prop-types").Requireable<string>;
85
82
  hint: import("prop-types").Requireable<string>;
86
83
  error: import("prop-types").Requireable<string>;
@@ -114,7 +111,6 @@ declare const SkillEdition: {
114
111
  title: import("prop-types").Validator<string>;
115
112
  onEditClick: import("prop-types").Validator<(...args: any[]) => any>;
116
113
  onDeleteClick: import("prop-types").Validator<(...args: any[]) => any>;
117
- readonly: import("prop-types").Requireable<boolean>;
118
114
  }>>;
119
115
  }>;
120
116
  button: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
@@ -122,11 +118,6 @@ declare const SkillEdition: {
122
118
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
123
119
  disabled: import("prop-types").Requireable<boolean>;
124
120
  }>>>;
125
- emptyResult: import("prop-types").Requireable<import("prop-types").InferProps<{
126
- title: import("prop-types").Requireable<string>;
127
- description: import("prop-types").Requireable<string>;
128
- }>>;
129
- readonly: import("prop-types").Requireable<boolean>;
130
121
  }>>>;
131
122
  content: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
132
123
  title: import("prop-types").Validator<string>;
@@ -136,7 +127,6 @@ declare const SkillEdition: {
136
127
  onClick: import("prop-types").Validator<(...args: any[]) => any>;
137
128
  }>>>;
138
129
  list: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
139
- title: import("prop-types").Requireable<string>;
140
130
  items: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
141
131
  ref: import("prop-types").Validator<string>;
142
132
  title: import("prop-types").Validator<string>;
@@ -150,10 +140,6 @@ declare const SkillEdition: {
150
140
  checked: import("prop-types").Validator<boolean>;
151
141
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
152
142
  }>>>;
153
- deleteButton: import("prop-types").Requireable<import("prop-types").InferProps<{
154
- label: import("prop-types").Requireable<string>;
155
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
156
- }>>;
157
143
  }>>[]>;
158
144
  search: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
159
145
  value: import("prop-types").Validator<string>;
@@ -170,15 +156,9 @@ declare const SkillEdition: {
170
156
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
171
157
  }>>;
172
158
  }>>>;
173
- actionButtons: import("prop-types").Requireable<(object | null | undefined)[]>;
174
- checkboxWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
175
- title: import("prop-types").Requireable<string>;
176
- checked: import("prop-types").Requireable<boolean>;
177
- onChange: import("prop-types").Requireable<(...args: any[]) => any>;
178
- }>>;
179
- readonly: import("prop-types").Requireable<boolean>;
159
+ isFetching: import("prop-types").Requireable<boolean>;
180
160
  }>>>;
181
- readonly: import("prop-types").Requireable<boolean>;
161
+ isFetching: import("prop-types").Requireable<boolean>;
182
162
  };
183
163
  };
184
164
  export default SkillEdition;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAEhB,qBAAqB,EAMtB,MAAM,SAAS,CAAC;AA+ZjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAEhB,qBAAqB,EAMtB,MAAM,SAAS,CAAC;AA2YjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -1,22 +1,19 @@
1
- import _omit from "lodash/fp/omit";
2
1
  import _map from "lodash/fp/map";
3
2
  import _keys from "lodash/fp/keys";
4
3
  import _isEmpty from "lodash/fp/isEmpty";
5
4
  import _includes from "lodash/fp/includes";
6
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
7
5
  import React from 'react';
8
6
  import BrandFormGroup from '../../molecule/brand-form-group';
9
7
  import ListItems from '../list-items';
10
8
  import Title from '../../atom/title';
11
9
  import TitleAndInput from '../title-and-input';
12
10
  import { COLORS } from '../../variables/colors';
11
+ import Loader from '../../atom/loader';
13
12
  import propTypes from './types';
14
13
  import style from './style.css';
15
- const buildFormField = (field, type, readonly) => {
16
- const fieldWithoutOverrides = _omit(['type', 'theme', 'size', 'readOnly'], field);
14
+ const buildFormField = (field, type) => {
17
15
  return {
18
- ...fieldWithoutOverrides,
19
- readOnly: readonly,
16
+ ...field,
20
17
  type,
21
18
  theme: 'coorpmanager',
22
19
  size: 'large'
@@ -46,8 +43,7 @@ const buildTitleAndInputField = ({
46
43
  const SkillInformations = skillInformations => {
47
44
  const {
48
45
  form,
49
- iconEditor,
50
- readonly
46
+ iconEditor
51
47
  } = skillInformations;
52
48
  const {
53
49
  select,
@@ -63,11 +59,8 @@ const SkillInformations = skillInformations => {
63
59
  },
64
60
  field: {
65
61
  iconPreview: iconEditor.iconPreview,
66
- inputText: {
67
- ...iconEditor.inputText,
68
- readOnly: readonly
69
- },
70
- buttonLink: iconEditor.buttonLink && !readonly ? {
62
+ inputText: iconEditor.inputText,
63
+ buttonLink: iconEditor.buttonLink ? {
71
64
  type: 'secondary',
72
65
  label: iconEditor.buttonLink.label,
73
66
  ariaLabel: iconEditor.buttonLink.ariaLabel,
@@ -102,8 +95,7 @@ const SkillInformations = skillInformations => {
102
95
  'aria-label': select.field['aria-label'],
103
96
  onChange: select.field.onChange,
104
97
  theme: 'skillDetail',
105
- size: 'large',
106
- readOnly: readonly
98
+ size: 'large'
107
99
  }
108
100
  }, {
109
101
  ...buildTitleAndInputField({
@@ -111,13 +103,13 @@ const SkillInformations = skillInformations => {
111
103
  required: true,
112
104
  childType: 'inputText'
113
105
  }),
114
- field: buildFormField(inputText.field, 'text', readonly)
106
+ field: buildFormField(inputText.field, 'text')
115
107
  }, {
116
108
  ...buildTitleAndInputField({
117
109
  title: inputTextArea.title,
118
110
  childType: 'inputTextArea'
119
111
  }),
120
- field: buildFormField(inputTextArea.field, 'textarea', readonly)
112
+ field: buildFormField(inputTextArea.field, 'textarea')
121
113
  }];
122
114
  const formProps = {
123
115
  title: form.title,
@@ -166,33 +158,12 @@ const buildButtonProps = button => ({
166
158
  const buildTranslationItems = ({
167
159
  title: itemTitle,
168
160
  onEditClick,
169
- onDeleteClick,
170
- readonly = false
161
+ onDeleteClick
171
162
  }, index) => ({
172
- ...(readonly ? {} : {
173
- secondButtonLink: {
174
- 'aria-label': 'Delete',
175
- type: 'primary',
176
- customStyle: {
177
- width: 'fit-content',
178
- backgroundColor: 'transparent'
179
- },
180
- hoverBackgroundColor: COLORS.cm_grey_100,
181
- icon: {
182
- position: 'left',
183
- faIcon: {
184
- name: 'trash',
185
- color: COLORS.neutral_500,
186
- size: 16
187
- }
188
- },
189
- onClick: onDeleteClick
190
- }
191
- }),
192
163
  id: index,
193
164
  title: itemTitle,
194
165
  buttonLink: {
195
- 'aria-label': readonly ? 'View Custom SKill' : 'Edit Custom Skill',
166
+ 'aria-label': 'Edit',
196
167
  type: 'primary',
197
168
  customStyle: {
198
169
  width: 'fit-content',
@@ -202,12 +173,30 @@ const buildTranslationItems = ({
202
173
  icon: {
203
174
  position: 'left',
204
175
  faIcon: {
205
- name: readonly ? 'eye' : 'edit',
206
- color: COLORS.neutral_500,
176
+ name: 'edit',
177
+ color: COLORS.cm_grey_500,
207
178
  size: 16
208
179
  }
209
180
  },
210
181
  onClick: onEditClick
182
+ },
183
+ secondButtonLink: {
184
+ 'aria-label': 'Delete',
185
+ type: 'primary',
186
+ customStyle: {
187
+ width: 'fit-content',
188
+ backgroundColor: 'transparent'
189
+ },
190
+ hoverBackgroundColor: COLORS.cm_grey_100,
191
+ icon: {
192
+ position: 'left',
193
+ faIcon: {
194
+ name: 'trash',
195
+ color: COLORS.cm_grey_500,
196
+ size: 16
197
+ }
198
+ },
199
+ onClick: onDeleteClick
211
200
  }
212
201
  });
213
202
  const Translations = ({
@@ -216,8 +205,7 @@ const Translations = ({
216
205
  items,
217
206
  button,
218
207
  localesOptions,
219
- emptyResult,
220
- readonly = false
208
+ emptyResult
221
209
  }) => {
222
210
  const buttonProps = buildButtonProps(button);
223
211
  const translationMenuAction = {
@@ -261,13 +249,10 @@ const Translations = ({
261
249
  button: translationMenuAction
262
250
  }
263
251
  }),
264
- items: uncappedMap((item, index) => buildTranslationItems({
265
- ...item,
266
- readonly
267
- }, index), items),
252
+ items: uncappedMap(buildTranslationItems, items),
268
253
  type: 'list'
269
254
  },
270
- buttonMenuAction: readonly ? undefined : translationMenuAction
255
+ buttonMenuAction: translationMenuAction
271
256
  };
272
257
  return /*#__PURE__*/React.createElement(ListItems, translationProps);
273
258
  };
@@ -337,7 +322,8 @@ const Content = ({
337
322
  },
338
323
  actionButtons,
339
324
  checkboxWithTitle: checkboxWithTitleProps,
340
- readonly = false
325
+ readonly = false,
326
+ isFetching = false
341
327
  }) => {
342
328
  const buttonProps = buildButtonProps(button);
343
329
  const titleProps = {
@@ -375,9 +361,7 @@ const Content = ({
375
361
  },
376
362
  search: {
377
363
  ...search,
378
- theme: 'coorpmanager',
379
- // Keep search interactive even in readonly mode
380
- disabled: false
364
+ theme: 'coorpmanager'
381
365
  },
382
366
  actionButtons: readonly ? [] : _map(actionButton => ({
383
367
  ...actionButton,
@@ -402,7 +386,8 @@ const Content = ({
402
386
  iconColor: 'white',
403
387
  preset: 's'
404
388
  }
405
- }
389
+ },
390
+ isFetching
406
391
  };
407
392
  return /*#__PURE__*/React.createElement("div", {
408
393
  className: style.contentContainer
@@ -413,17 +398,16 @@ const SkillEdition = props => {
413
398
  skillInformations,
414
399
  translations,
415
400
  content,
416
- readonly
401
+ isFetching
417
402
  } = props;
418
- return /*#__PURE__*/React.createElement("div", {
403
+ return isFetching ? /*#__PURE__*/React.createElement("div", {
404
+ className: style.loaderContainer
405
+ }, /*#__PURE__*/React.createElement(Loader, {
406
+ className: style.loader,
407
+ theme: "coorpmanager"
408
+ })) : /*#__PURE__*/React.createElement("div", {
419
409
  className: style.container
420
- }, /*#__PURE__*/React.createElement(SkillInformations, _extends({}, skillInformations, {
421
- readonly: readonly
422
- })), /*#__PURE__*/React.createElement(Translations, _extends({}, translations, {
423
- readonly: readonly
424
- })), /*#__PURE__*/React.createElement(Content, _extends({}, content, {
425
- readonly: readonly
426
- })));
410
+ }, /*#__PURE__*/React.createElement(SkillInformations, skillInformations), /*#__PURE__*/React.createElement(Translations, translations), /*#__PURE__*/React.createElement(Content, content));
427
411
  };
428
412
  SkillEdition.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
429
413
  export default SkillEdition;