@coorpacademy/components 11.42.1 → 11.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/checkbox-with-title/index.d.ts +1 -0
- package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/es/atom/checkbox-with-title/index.js +6 -3
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/radio-group/style.css +3 -1
- package/es/atom/radio-with-title/index.d.ts +3 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.js +23 -5
- package/es/atom/radio-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/style.css +27 -0
- package/es/atom/radio-with-title/types.d.ts +6 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.js +3 -0
- package/es/atom/radio-with-title/types.js.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +20 -3
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +17 -0
- package/es/molecule/cm-popin/types.d.ts +36 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.js +3 -0
- package/es/molecule/cm-popin/types.js.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +6 -0
- package/es/molecule/progress-bar/index.d.ts +16 -7
- package/es/molecule/progress-bar/index.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.js +61 -4
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/progress-bar/style.css +56 -0
- package/es/molecule/table/index.d.ts +8 -0
- package/es/molecule/table/index.d.ts.map +1 -1
- package/es/molecule/table/index.js +43 -5
- package/es/molecule/table/index.js.map +1 -1
- package/es/molecule/table/style.css +24 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.d.ts +3 -0
- package/es/molecule/wizard-summary/index.d.ts.map +1 -1
- package/es/molecule/wizard-summary/index.js +35 -3
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +54 -1
- package/es/organism/brand-learning-priorities/index.d.ts +6 -0
- package/es/organism/brand-table/index.d.ts +8 -0
- package/es/organism/content-selection-list/index.d.ts +95 -0
- package/es/organism/content-selection-list/index.d.ts.map +1 -0
- package/es/organism/content-selection-list/index.js +175 -0
- package/es/organism/content-selection-list/index.js.map +1 -0
- package/es/organism/content-selection-list/style.css +8 -0
- package/es/organism/content-selection-list/types.d.ts +113 -0
- package/es/organism/content-selection-list/types.d.ts.map +1 -0
- package/es/organism/content-selection-list/types.js +58 -0
- package/es/organism/content-selection-list/types.js.map +1 -0
- package/es/organism/content-skill-modal/index.d.ts +7 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +7 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-item/index.d.ts +9 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +16 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +15 -0
- package/es/organism/list-items/index.d.ts +7 -0
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/skill-edition/index.d.ts +8 -3
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +3 -168
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/styles.d.ts +10 -0
- package/es/organism/skill-edition/styles.d.ts.map +1 -0
- package/es/organism/skill-edition/styles.js +10 -0
- package/es/organism/skill-edition/styles.js.map +1 -0
- package/es/organism/skill-edition/types.d.ts +10 -54
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +3 -52
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +1 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +1 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/app-player/loading/index.d.ts +33 -0
- package/es/template/app-player/player/index.d.ts +66 -0
- package/es/template/app-player/player/slides/index.d.ts +33 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +33 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts +33 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +33 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +33 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +80 -3
- package/es/template/certification-detail/index.d.ts +33 -0
- package/es/template/common/dashboard/index.d.ts +66 -0
- package/es/template/common/search-page/index.d.ts +33 -0
- package/es/template/external-course/index.d.ts +33 -0
- package/es/template/playlist-detail/index.d.ts +33 -0
- package/lib/atom/checkbox-with-title/index.d.ts +1 -0
- package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +6 -3
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/radio-group/style.css +3 -1
- package/lib/atom/radio-with-title/index.d.ts +3 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.js +23 -5
- package/lib/atom/radio-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/style.css +27 -0
- package/lib/atom/radio-with-title/types.d.ts +6 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.js +3 -0
- package/lib/atom/radio-with-title/types.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +20 -3
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +17 -0
- package/lib/molecule/cm-popin/types.d.ts +36 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.js +3 -0
- package/lib/molecule/cm-popin/types.js.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +6 -0
- package/lib/molecule/progress-bar/index.d.ts +16 -7
- package/lib/molecule/progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.js +61 -4
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/progress-bar/style.css +56 -0
- package/lib/molecule/table/index.d.ts +8 -0
- package/lib/molecule/table/index.d.ts.map +1 -1
- package/lib/molecule/table/index.js +43 -5
- package/lib/molecule/table/index.js.map +1 -1
- package/lib/molecule/table/style.css +24 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +3 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.d.ts +3 -0
- package/lib/molecule/wizard-summary/index.d.ts.map +1 -1
- package/lib/molecule/wizard-summary/index.js +35 -3
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +54 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +6 -0
- package/lib/organism/brand-table/index.d.ts +8 -0
- package/lib/organism/content-selection-list/index.d.ts +95 -0
- package/lib/organism/content-selection-list/index.d.ts.map +1 -0
- package/lib/organism/content-selection-list/index.js +181 -0
- package/lib/organism/content-selection-list/index.js.map +1 -0
- package/lib/organism/content-selection-list/style.css +8 -0
- package/lib/organism/content-selection-list/types.d.ts +113 -0
- package/lib/organism/content-selection-list/types.d.ts.map +1 -0
- package/lib/organism/content-selection-list/types.js +63 -0
- package/lib/organism/content-selection-list/types.js.map +1 -0
- package/lib/organism/content-skill-modal/index.d.ts +7 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +7 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.d.ts +9 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +16 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +15 -0
- package/lib/organism/list-items/index.d.ts +7 -0
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +8 -3
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +11 -174
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/styles.d.ts +10 -0
- package/lib/organism/skill-edition/styles.d.ts.map +1 -0
- package/lib/organism/skill-edition/styles.js +15 -0
- package/lib/organism/skill-edition/styles.js.map +1 -0
- package/lib/organism/skill-edition/types.d.ts +10 -54
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +6 -53
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +1 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +1 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/app-player/loading/index.d.ts +33 -0
- package/lib/template/app-player/player/index.d.ts +66 -0
- package/lib/template/app-player/player/slides/index.d.ts +33 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +33 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts +33 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +33 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +33 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +80 -3
- package/lib/template/certification-detail/index.d.ts +33 -0
- package/lib/template/common/dashboard/index.d.ts +66 -0
- package/lib/template/common/search-page/index.d.ts +33 -0
- package/lib/template/external-course/index.d.ts +33 -0
- package/lib/template/playlist-detail/index.d.ts +33 -0
- package/package.json +2 -2
|
@@ -10,6 +10,7 @@ var _title = _interopRequireDefault(require("../../atom/title"));
|
|
|
10
10
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
11
11
|
var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
12
12
|
var _listItems = _interopRequireDefault(require("../../organism/list-items"));
|
|
13
|
+
var _wizardSummary = _interopRequireDefault(require("../wizard-summary"));
|
|
13
14
|
var _buttonIcons = require("../../util/button-icons");
|
|
14
15
|
var _icon = require("../../atom/icon");
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -53,6 +54,8 @@ const propTypes = {
|
|
|
53
54
|
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape(_icon.propTypes)]),
|
|
54
55
|
backgroundImageUrl: _propTypes.default.string,
|
|
55
56
|
descriptionText: _propTypes.default.string,
|
|
57
|
+
sections: _wizardSummary.default.propTypes.sections,
|
|
58
|
+
warning: _propTypes.default.string,
|
|
56
59
|
cookieTitle: _propTypes.default.string,
|
|
57
60
|
headerSubtitle: _propTypes.default.string,
|
|
58
61
|
descriptionBtnTxt: _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonLink","_inputSwitch","_title","_link","_cardsGrid","_listItems","_buttonIcons","_icon","e","__esModule","default","propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","ButtonLink","secondButton","icon","position","_keys2","ICONS","thirdButton","onClose","oneOfType","iconPropTypes","backgroundImageUrl","descriptionText","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","InputSwitch","items","list","CardsGrid","ListItems","link","Link","_default","exports"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport {ICONS} from '../../util/button-icons';\nimport {propTypes as iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonLink","_inputSwitch","_title","_link","_cardsGrid","_listItems","_wizardSummary","_buttonIcons","_icon","e","__esModule","default","propTypes","content","PropTypes","string","mode","oneOf","header","shape","title","Title","headerIcon","backgroundImage","firstButton","label","handleOnclick","func","largeButton","bool","type","customStyle","ButtonLink","secondButton","icon","position","_keys2","ICONS","thirdButton","onClose","oneOfType","iconPropTypes","backgroundImageUrl","descriptionText","sections","WizardSummary","warning","cookieTitle","headerSubtitle","descriptionBtnTxt","listBtnSwicth","arrayOf","InputSwitch","items","list","CardsGrid","ListItems","link","Link","_default","exports"],"sources":["../../../src/molecule/cm-popin/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport Link from '../../atom/link';\nimport {TitleProps} from '../../atom/title/types';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport WizardSummary from '../wizard-summary';\nimport {ICONS} from '../../util/button-icons';\nimport {propTypes as iconPropTypes} from '../../atom/icon';\n\nconst propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items', 'list']),\n header: PropTypes.shape({\n title: PropTypes.shape(Title.propTypes),\n headerIcon: PropTypes.string,\n backgroundImage: PropTypes.string\n }),\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: ButtonLink.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n })\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: ButtonLink.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.shape(iconPropTypes)]),\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n sections: WizardSummary.propTypes.sections,\n warning: PropTypes.string,\n cookieTitle: PropTypes.string,\n headerSubtitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),\n items: PropTypes.shape({\n type: PropTypes.oneOf(['content', 'list']),\n list: PropTypes.oneOfType([\n PropTypes.shape(CardsGrid.propTypes),\n PropTypes.shape(ListItems.propTypes)\n ])\n }),\n link: PropTypes.shape(Link.propTypes)\n};\n\ntype PopinHeaderProps = {\n title: TitleProps;\n backgroundImage: string;\n headerIcon: string;\n};\n\nexport type QuitPopinButton = {\n 'aria-label'?: string;\n label: string;\n type: string;\n customStyle?: {\n backgroundColor?: string;\n color?: string;\n };\n handleOnclick: () => void;\n};\n\nexport type CMPopinProps = {\n content: string;\n icon: string | PropTypes.InferProps<typeof iconPropTypes>;\n mode: 'alert' | 'information' | 'cookie' | 'items' | 'list';\n onClose?: () => void;\n popinHeader?: PopinHeaderProps;\n descriptionText: string;\n sections?: PropTypes.InferProps<typeof WizardSummary.propTypes>['sections'];\n warning?: string;\n firstButton?: QuitPopinButton;\n secondButton?: QuitPopinButton;\n items?: {\n type: 'content' | 'list';\n list:\n | PropTypes.InferProps<typeof CardsGrid.propTypes>\n | PropTypes.InferProps<typeof ListItems.propTypes>;\n };\n link?: PropTypes.InferProps<typeof Link.propTypes>;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,UAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,cAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAA2D,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3D,MAAMG,SAAS,GAAG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,CAAC,CAAC;IAC1CqC,IAAI,EAAExC,kBAAS,CAAC0B,SAAS,CAAC,CACxB1B,kBAAS,CAACK,KAAK,CAACoC,kBAAS,CAAC3C,SAAS,CAAC,EACpCE,kBAAS,CAACK,KAAK,CAACqC,kBAAS,CAAC5C,SAAS,CAAC,CACrC;EACH,CAAC,CAAC;EACF6C,IAAI,EAAE3C,kBAAS,CAACK,KAAK,CAACuC,aAAI,CAAC9C,SAAS;AACtC,CAAC;AAAC,IAAA+C,QAAA,GAAAC,OAAA,CAAAjD,OAAA,GAuCaC,SAAS","ignoreList":[]}
|
|
@@ -85,6 +85,11 @@ declare namespace DraggableList {
|
|
|
85
85
|
size: PropTypes.Requireable<number>;
|
|
86
86
|
wrapperSize: PropTypes.Requireable<number>;
|
|
87
87
|
}>>;
|
|
88
|
+
imageOverlay: PropTypes.Requireable<string>;
|
|
89
|
+
contentBadge: PropTypes.Requireable<PropTypes.InferProps<{
|
|
90
|
+
category: PropTypes.Requireable<string>;
|
|
91
|
+
label: PropTypes.Requireable<string>;
|
|
92
|
+
}>>;
|
|
88
93
|
image: PropTypes.Requireable<string>;
|
|
89
94
|
checkbox: PropTypes.Requireable<PropTypes.InferProps<{
|
|
90
95
|
value: PropTypes.Requireable<string>;
|
|
@@ -102,6 +107,7 @@ declare namespace DraggableList {
|
|
|
102
107
|
customStyle: PropTypes.Requireable<{
|
|
103
108
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
104
109
|
}>;
|
|
110
|
+
className: PropTypes.Requireable<string>;
|
|
105
111
|
}>>;
|
|
106
112
|
}> | PropTypes.InferProps<{
|
|
107
113
|
title: PropTypes.Validator<string>;
|
|
@@ -2,16 +2,25 @@ export default ProgressBar;
|
|
|
2
2
|
declare function ProgressBar(props: any): JSX.Element;
|
|
3
3
|
declare namespace ProgressBar {
|
|
4
4
|
namespace propTypes {
|
|
5
|
-
const className: PropTypes.Requireable<string>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const desc: PropTypes.Requireable<string>;
|
|
9
|
-
const steps: PropTypes.Requireable<number>;
|
|
10
|
-
const style: PropTypes.Requireable<{
|
|
5
|
+
export const className: PropTypes.Requireable<string>;
|
|
6
|
+
export { numberRequiredWithoutSegments as value };
|
|
7
|
+
export { numberRequiredWithoutSegments as max };
|
|
8
|
+
export const desc: PropTypes.Requireable<string>;
|
|
9
|
+
export const steps: PropTypes.Requireable<number>;
|
|
10
|
+
export const style: PropTypes.Requireable<{
|
|
11
11
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
12
12
|
}>;
|
|
13
|
-
const displayInfo: PropTypes.Requireable<boolean>;
|
|
13
|
+
export const displayInfo: PropTypes.Requireable<boolean>;
|
|
14
|
+
export const segments: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
15
|
+
value: PropTypes.Validator<number>;
|
|
16
|
+
label: PropTypes.Validator<string>;
|
|
17
|
+
color: PropTypes.Validator<string>;
|
|
18
|
+
}> | null | undefined)[]>;
|
|
19
|
+
export const title: PropTypes.Requireable<string>;
|
|
20
|
+
export const subtitle: PropTypes.Requireable<string>;
|
|
21
|
+
export const ariaLabel: PropTypes.Requireable<string>;
|
|
14
22
|
}
|
|
15
23
|
}
|
|
16
24
|
import PropTypes from "prop-types";
|
|
25
|
+
declare function numberRequiredWithoutSegments(props: any, propName: any, ...args: any[]): Error | null;
|
|
17
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAeA,sDAsFC;;;;;;;;;;;;;;;;;;;;;;;AA9FD,wGAMC"}
|
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _times2 = _interopRequireDefault(require("lodash/fp/times"));
|
|
6
|
+
var _sumBy2 = _interopRequireDefault(require("lodash/fp/sumBy"));
|
|
6
7
|
var _react = _interopRequireDefault(require("react"));
|
|
7
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
9
11
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
10
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const numberRequiredWithoutSegments = process.env.NODE_ENV !== "production" ? (props, propName, ...args) => {
|
|
14
|
+
const validator = props.segments !== undefined && props.segments !== null ? _propTypes.default.number : _propTypes.default.number.isRequired;
|
|
15
|
+
return validator(props, propName, ...args);
|
|
16
|
+
} : {};
|
|
11
17
|
const ProgressBar = props => {
|
|
12
18
|
const {
|
|
13
19
|
className,
|
|
@@ -16,8 +22,51 @@ const ProgressBar = props => {
|
|
|
16
22
|
desc = '',
|
|
17
23
|
steps = 0,
|
|
18
24
|
style: propsStyle,
|
|
19
|
-
displayInfo = true
|
|
25
|
+
displayInfo = true,
|
|
26
|
+
segments,
|
|
27
|
+
title,
|
|
28
|
+
subtitle,
|
|
29
|
+
ariaLabel
|
|
20
30
|
} = props;
|
|
31
|
+
if (segments !== undefined && segments !== null) {
|
|
32
|
+
const total = (0, _sumBy2.default)('value', segments);
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: (0, _classnames.default)(_style.default.segmented, className)
|
|
35
|
+
}, title || subtitle ? /*#__PURE__*/_react.default.createElement("div", null, title ? /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
36
|
+
type: "form-group",
|
|
37
|
+
titleSize: "medium",
|
|
38
|
+
title: title
|
|
39
|
+
}) : null, subtitle ? /*#__PURE__*/_react.default.createElement("p", {
|
|
40
|
+
className: _style.default.segmentedSubtitle
|
|
41
|
+
}, subtitle) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: _style.default.segmentedBar,
|
|
43
|
+
"data-name": "progress-bar-segmented-bar",
|
|
44
|
+
role: "img",
|
|
45
|
+
"aria-label": ariaLabel
|
|
46
|
+
}, segments.filter(segment => segment.value > 0).map((segment, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
key: index,
|
|
48
|
+
className: _style.default.segment,
|
|
49
|
+
"data-name": "progress-bar-segment",
|
|
50
|
+
"aria-hidden": "true",
|
|
51
|
+
style: {
|
|
52
|
+
width: `${segment.value / total * 100}%`,
|
|
53
|
+
backgroundColor: segment.color
|
|
54
|
+
}
|
|
55
|
+
}))), /*#__PURE__*/_react.default.createElement("ul", {
|
|
56
|
+
className: _style.default.segmentedLegend
|
|
57
|
+
}, segments.map((segment, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
58
|
+
key: index,
|
|
59
|
+
className: _style.default.legendItem,
|
|
60
|
+
"data-name": "progress-bar-legend-item"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
62
|
+
className: _style.default.legendSwatch,
|
|
63
|
+
"data-name": "progress-bar-legend-swatch",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
style: {
|
|
66
|
+
backgroundColor: segment.color
|
|
67
|
+
}
|
|
68
|
+
}), segment.label))));
|
|
69
|
+
}
|
|
21
70
|
const ratio = value / max;
|
|
22
71
|
const percentage = Math.floor(ratio * 100);
|
|
23
72
|
const text = `${percentage}%`;
|
|
@@ -47,12 +96,20 @@ const ProgressBar = props => {
|
|
|
47
96
|
};
|
|
48
97
|
ProgressBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
49
98
|
className: _propTypes.default.string,
|
|
50
|
-
value:
|
|
51
|
-
max:
|
|
99
|
+
value: numberRequiredWithoutSegments,
|
|
100
|
+
max: numberRequiredWithoutSegments,
|
|
52
101
|
desc: _propTypes.default.string,
|
|
53
102
|
steps: _propTypes.default.number,
|
|
54
103
|
style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])),
|
|
55
|
-
displayInfo: _propTypes.default.bool
|
|
104
|
+
displayInfo: _propTypes.default.bool,
|
|
105
|
+
segments: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
106
|
+
value: _propTypes.default.number.isRequired,
|
|
107
|
+
label: _propTypes.default.string.isRequired,
|
|
108
|
+
color: _propTypes.default.string.isRequired
|
|
109
|
+
})),
|
|
110
|
+
title: _propTypes.default.string,
|
|
111
|
+
subtitle: _propTypes.default.string,
|
|
112
|
+
ariaLabel: _propTypes.default.string
|
|
56
113
|
} : {};
|
|
57
114
|
var _default = exports.default = ProgressBar;
|
|
58
115
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_style","e","__esModule","default","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_classnames","_title","_style","e","__esModule","default","numberRequiredWithoutSegments","process","env","NODE_ENV","props","propName","args","validator","segments","undefined","PropTypes","number","isRequired","ProgressBar","className","value","max","desc","steps","style","propsStyle","displayInfo","title","subtitle","ariaLabel","total","_sumBy2","createElement","classnames","segmented","type","titleSize","segmentedSubtitle","segmentedBar","role","filter","segment","map","index","key","width","backgroundColor","color","segmentedLegend","legendItem","legendSwatch","label","ratio","percentage","Math","floor","text","stepList","_times2","step","background","progress","texts","description","propTypes","string","objectOf","oneOfType","bool","arrayOf","shape","_default","exports"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {sumBy, times} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst numberRequiredWithoutSegments = (props, propName, ...args) => {\n const validator =\n props.segments !== undefined && props.segments !== null\n ? PropTypes.number\n : PropTypes.number.isRequired;\n return validator(props, propName, ...args);\n};\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true,\n segments,\n title,\n subtitle,\n ariaLabel\n } = props;\n\n if (segments !== undefined && segments !== null) {\n const total = sumBy('value', segments);\n return (\n <div className={classnames(style.segmented, className)}>\n {title || subtitle ? (\n <div>\n {title ? <Title type=\"form-group\" titleSize=\"medium\" title={title} /> : null}\n {subtitle ? <p className={style.segmentedSubtitle}>{subtitle}</p> : null}\n </div>\n ) : null}\n <div\n className={style.segmentedBar}\n data-name=\"progress-bar-segmented-bar\"\n role=\"img\"\n aria-label={ariaLabel}\n >\n {segments\n .filter(segment => segment.value > 0)\n .map((segment, index) => (\n <div\n key={index}\n className={style.segment}\n data-name=\"progress-bar-segment\"\n aria-hidden=\"true\"\n style={{width: `${(segment.value / total) * 100}%`, backgroundColor: segment.color}}\n />\n ))}\n </div>\n <ul className={style.segmentedLegend}>\n {segments.map((segment, index) => (\n <li key={index} className={style.legendItem} data-name=\"progress-bar-legend-item\">\n <span\n className={style.legendSwatch}\n data-name=\"progress-bar-legend-swatch\"\n aria-hidden=\"true\"\n style={{backgroundColor: segment.color}}\n />\n {segment.label}\n </li>\n ))}\n </ul>\n </div>\n );\n }\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div\n className={classnames(style.background, className)}\n data-name=\"progress-bar-wrapper\"\n data-content={`${text}`}\n >\n <div\n className={style.progress}\n style={{\n ...propsStyle,\n width: `${ratio * 100}%`\n }}\n />\n {displayInfo ? (\n <p className={style.texts}>\n <span className={style.description}>{`${value}/${max} ${desc}`}</span>\n <span className={style.percentage}>{text}</span>\n </p>\n ) : null}\n <div className={style.steps}>{stepList}</div>\n </div>\n );\n};\n\nProgressBar.propTypes = {\n className: PropTypes.string,\n value: numberRequiredWithoutSegments,\n max: numberRequiredWithoutSegments,\n desc: PropTypes.string,\n steps: PropTypes.number,\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n displayInfo: PropTypes.bool,\n segments: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired\n })\n ),\n title: PropTypes.string,\n subtitle: PropTypes.string,\n ariaLabel: PropTypes.string\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,6BAA6B,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG,CAACC,KAAK,EAAEC,QAAQ,EAAE,GAAGC,IAAI,KAAK;EAClE,MAAMC,SAAS,GACbH,KAAK,CAACI,QAAQ,KAAKC,SAAS,IAAIL,KAAK,CAACI,QAAQ,KAAK,IAAI,GACnDE,kBAAS,CAACC,MAAM,GAChBD,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjC,OAAOL,SAAS,CAACH,KAAK,EAAEC,QAAQ,EAAE,GAAGC,IAAI,CAAC;AAC5C,CAAC;AAED,MAAMO,WAAW,GAAGT,KAAK,IAAI;EAC3B,MAAM;IACJU,SAAS;IACTC,KAAK;IACLC,GAAG;IACHC,IAAI,GAAG,EAAE;IACTC,KAAK,GAAG,CAAC;IACTC,KAAK,EAAEC,UAAU;IACjBC,WAAW,GAAG,IAAI;IAClBb,QAAQ;IACRc,KAAK;IACLC,QAAQ;IACRC;EACF,CAAC,GAAGpB,K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AChD;EAC1B,CAAC,CACH,CAAC;EACDU,KAAK,EAAEZ,kBAAS,CAACkD,MAAM;EACvBrC,QAAQ,EAAEb,kBAAS,CAACkD,MAAM;EAC1BpC,SAAS,EAAEd,kBAAS,CAACkD;AACvB,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEac,WAAW","ignoreList":[]}
|
|
@@ -66,3 +66,59 @@
|
|
|
66
66
|
width: 0;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
@value white, cm_grey_200 from colors;
|
|
71
|
+
|
|
72
|
+
.segmented {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 12px;
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.segmentedSubtitle {
|
|
80
|
+
composes: subtitleFormGroup from "../../atom/title/style.css";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.segmentedBar {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: 2px;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 25px;
|
|
88
|
+
background-color: white;
|
|
89
|
+
border-radius: 5px;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.segmentedBar:empty {
|
|
94
|
+
background-color: cm_grey_200;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.segment {
|
|
98
|
+
flex: 0 1 auto;
|
|
99
|
+
min-width: 0;
|
|
100
|
+
height: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.segmentedLegend {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-wrap: wrap;
|
|
106
|
+
gap: 8px 16px;
|
|
107
|
+
list-style: none;
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.legendItem {
|
|
113
|
+
composes: subtitleFormGroup from "../../atom/title/style.css";
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: 8px;
|
|
117
|
+
margin: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.legendSwatch {
|
|
121
|
+
flex: 0 0 12px;
|
|
122
|
+
height: 12px;
|
|
123
|
+
border-radius: 4px;
|
|
124
|
+
}
|
|
@@ -30,6 +30,12 @@ declare namespace Table {
|
|
|
30
30
|
const rows: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
31
31
|
fields: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
|
|
32
32
|
icon: PropTypes.Requireable<string>;
|
|
33
|
+
title: PropTypes.Requireable<string>;
|
|
34
|
+
text: PropTypes.Requireable<string>;
|
|
35
|
+
tags: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
36
|
+
status: PropTypes.Requireable<string>;
|
|
37
|
+
label: PropTypes.Validator<string>;
|
|
38
|
+
}> | null | undefined)[]>;
|
|
33
39
|
}> | null | undefined> | null | undefined)[]>;
|
|
34
40
|
editHref: PropTypes.Requireable<string>;
|
|
35
41
|
highlighted: PropTypes.Requireable<boolean>;
|
|
@@ -38,6 +44,8 @@ declare namespace Table {
|
|
|
38
44
|
title: PropTypes.Validator<string>;
|
|
39
45
|
info: PropTypes.Requireable<string>;
|
|
40
46
|
filtered: PropTypes.Requireable<boolean>;
|
|
47
|
+
order: PropTypes.Requireable<string>;
|
|
48
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
49
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
42
50
|
title: PropTypes.Validator<string>;
|
|
43
51
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";AAwEA,8DAiIC"}
|
|
@@ -11,11 +11,21 @@ var _novaIcons = require("@coorpacademy/nova-icons");
|
|
|
11
11
|
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
12
12
|
var _checkbox = _interopRequireDefault(require("../../atom/checkbox"));
|
|
13
13
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
14
|
+
var _assignmentStatusTag = _interopRequireDefault(require("../assignment-status-tag"));
|
|
14
15
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
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); }
|
|
16
18
|
const THEMES = {
|
|
17
19
|
COCKPIT: 'cockpit'
|
|
18
20
|
};
|
|
21
|
+
const SORT_ARROWS = {
|
|
22
|
+
asc: '▲',
|
|
23
|
+
desc: '▼'
|
|
24
|
+
};
|
|
25
|
+
const ARIA_SORT = {
|
|
26
|
+
asc: 'ascending',
|
|
27
|
+
desc: 'descending'
|
|
28
|
+
};
|
|
19
29
|
const createOptionsView = (_options, hasOptions) => {
|
|
20
30
|
const optionsView = _options.map((option, oIndex) => {
|
|
21
31
|
const {
|
|
@@ -91,8 +101,24 @@ const Table = (props, context) => {
|
|
|
91
101
|
title,
|
|
92
102
|
filtered,
|
|
93
103
|
info = '',
|
|
94
|
-
options = []
|
|
104
|
+
options = [],
|
|
105
|
+
order,
|
|
106
|
+
onClick
|
|
95
107
|
} = column;
|
|
108
|
+
if (onClick) {
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement("th", {
|
|
110
|
+
title: info,
|
|
111
|
+
key: cIndex,
|
|
112
|
+
"aria-sort": ARIA_SORT[order] || 'none'
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
className: _style.default.sortButton,
|
|
116
|
+
onClick: onClick
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, title), /*#__PURE__*/_react.default.createElement("span", {
|
|
118
|
+
className: _style.default.sortArrow,
|
|
119
|
+
"aria-hidden": "true"
|
|
120
|
+
}, SORT_ARROWS[order] || '')));
|
|
121
|
+
}
|
|
96
122
|
const hasOptions = options.length > 0;
|
|
97
123
|
const OptionsIcon = hasOptions && (filtered ? _novaIcons.NovaCompositionCoorpacademyFunnel : _novaIcons.NovaCompositionNavigationArrowDown) || null;
|
|
98
124
|
return /*#__PURE__*/_react.default.createElement("th", {
|
|
@@ -164,9 +190,18 @@ const Table = (props, context) => {
|
|
|
164
190
|
if (!field) return /*#__PURE__*/_react.default.createElement("td", {
|
|
165
191
|
key: fIndex
|
|
166
192
|
}, '');
|
|
193
|
+
if ((0, _isString2.default)(field) || field.icon) {
|
|
194
|
+
return /*#__PURE__*/_react.default.createElement("td", {
|
|
195
|
+
key: fIndex
|
|
196
|
+
}, (0, _isString2.default)(field) ? field : renderIcon(field));
|
|
197
|
+
}
|
|
167
198
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
168
199
|
key: fIndex
|
|
169
|
-
},
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
201
|
+
className: _style.default.cellContent
|
|
202
|
+
}, field.text, (field.tags || []).map((tag, tagIndex) => /*#__PURE__*/_react.default.createElement(_assignmentStatusTag.default, _extends({}, tag, {
|
|
203
|
+
key: tagIndex
|
|
204
|
+
})))));
|
|
170
205
|
});
|
|
171
206
|
if (editable) {
|
|
172
207
|
tableRows.unshift(
|
|
@@ -206,10 +241,10 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
206
241
|
editable: _propTypes.default.bool,
|
|
207
242
|
rows: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
208
243
|
fields: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
|
209
|
-
icon: _propTypes.default.string
|
|
210
|
-
}), _propTypes.default.shape({
|
|
211
244
|
icon: _propTypes.default.string,
|
|
212
|
-
title: _propTypes.default.string
|
|
245
|
+
title: _propTypes.default.string,
|
|
246
|
+
text: _propTypes.default.string,
|
|
247
|
+
tags: _propTypes.default.arrayOf(_propTypes.default.shape(_assignmentStatusTag.default.propTypes))
|
|
213
248
|
})])),
|
|
214
249
|
editHref: _propTypes.default.string,
|
|
215
250
|
highlighted: _propTypes.default.bool
|
|
@@ -218,6 +253,9 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
218
253
|
title: _propTypes.default.string.isRequired,
|
|
219
254
|
info: _propTypes.default.string,
|
|
220
255
|
filtered: _propTypes.default.bool,
|
|
256
|
+
// A sortable column: its header is a button showing ▲ (asc), ▼ (desc) or nothing ('')
|
|
257
|
+
order: _propTypes.default.oneOf(['asc', 'desc', '']),
|
|
258
|
+
onClick: _propTypes.default.func,
|
|
221
259
|
options: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
222
260
|
title: _propTypes.default.string.isRequired,
|
|
223
261
|
onChange: _propTypes.default.func.isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_propTypes","_novaIcons","_provider","_checkbox","_link","_style","e","__esModule","default","THEMES","COCKPIT","createOptionsView","_options","hasOptions","optionsView","map","option","oIndex","onChange","selected","createElement","key","className","style","type","onClick","title","options","buildTableContext","translate","theme","headerTitle","header","legend","icon","NovaCompositionCoorpacademyDraft","width","height","label","NovaCompositionCoorpacademyValidate","nostatus","Table","props","context","rows","columns","editable","skin","mediumColor","_get2","headerView","column","cIndex","filtered","info","length","OptionsIcon","FunnelIcon","ArrowDown","toggle","noOptions","id","name","checked","checkbox","htmlFor","optionsIconWrapper","color","optionsIcon","tableContext","unshift","renderIcon","field","Fragment","NovaSolidVideosVideoSubtitle","videosubtitle","bodyView","row","index","fields","editHref","trClasses","classnames","highlighted","tableRows","fIndex","_isString2","href","NovaSolidContentEditionPencil1","mainClass","cockpit","wrapper","table","readonly","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","bool","arrayOf","shape","oneOfType","string","isRequired","func","oneOf","_default","exports"],"sources":["../../../src/molecule/table/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {get, isString} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionCoorpacademyFunnel as FunnelIcon,\n NovaSolidContentEditionPencil1 as PencilIcon,\n NovaCompositionCoorpacademyDraft as DraftIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon,\n NovaSolidVideosVideoSubtitle as VideoSubtitleIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/checkbox';\nimport Link from '../../atom/link';\nimport style from './style.css';\n\nconst THEMES = {COCKPIT: 'cockpit'};\n\nconst createOptionsView = (_options, hasOptions) => {\n const optionsView = _options.map((option, oIndex) => {\n const {onChange, selected} = option;\n\n return (\n <div key={oIndex} className={selected ? style.selected : style.option}>\n <button type=\"button\" onClick={onChange}>\n {option.title}\n </button>\n </div>\n );\n });\n\n return hasOptions ? <div className={style.options}>{optionsView}</div> : null;\n};\n\nconst buildTableContext = (translate, theme, headerTitle) => {\n if (theme === THEMES.COCKPIT) {\n return (\n <div className={style.header}>\n <h1 className={style.title}>{headerTitle}</h1>\n <div className={style.legend}>\n <div className={style.icon}>\n <DraftIcon width={25} height={25} />\n <span className={style.label}>{translate('Draft')}</span>\n </div>\n <div className={style.icon}>\n <ValidateIcon width={25} height={25} />\n <span className={style.label}>{translate('Validated')}</span>\n </div>\n <div className={style.icon}>\n <span className={style.nostatus}>{'\\u26A0️'}</span>\n <span className={style.label}>{translate('No status')}</span>\n </div>\n </div>\n </div>\n );\n }\n\n if (headerTitle) {\n return (\n <div className={style.header}>\n <h2 className={style.title}>{headerTitle}</h2>\n </div>\n );\n }\n return null;\n};\n\nconst Table = (props, context) => {\n const {rows = [], columns = [], editable = true, theme, headerTitle = ''} = props;\n const {skin, translate} = context;\n\n const mediumColor = get('common.medium', skin);\n\n const headerView = columns.map((column, cIndex) => {\n const {title, filtered, info = '', options = []} = column;\n\n const hasOptions = options.length > 0;\n\n const OptionsIcon = (hasOptions && (filtered ? FunnelIcon : ArrowDown)) || null;\n\n return (\n <th title={info} key={cIndex}>\n <div className={hasOptions ? style.toggle : style.noOptions}>\n <Checkbox id={title} name={title} checked className={style.checkbox} />\n <label htmlFor={title}>{title}</label>\n {options.length > 0 ? createOptionsView(options, hasOptions) : null}\n <div className={style.optionsIconWrapper}>\n {hasOptions ? (\n <OptionsIcon\n style={{color: mediumColor}}\n height={16}\n width={16}\n className={style.optionsIcon}\n />\n ) : null}\n </div>\n </div>\n </th>\n );\n });\n\n const tableContext = buildTableContext(translate, theme, headerTitle);\n\n if (editable) {\n headerView.unshift(\n <th key=\"header\">\n <div className={style.noOptions} />\n </th>\n );\n }\n\n const renderIcon = field => {\n switch (get('icon', field)) {\n case 'draft':\n return <DraftIcon width={25} height={25} />;\n case 'validate':\n return <ValidateIcon width={25} height={25} />;\n case 'nostatus':\n return <span className={style.nostatus}>{'\\u26A0️'}</span>;\n case 'videosubtitle':\n return (\n <>\n <VideoSubtitleIcon className={style.videosubtitle} width={25} height={25} />\n {field.title}\n </>\n );\n default:\n null;\n }\n };\n\n const bodyView = rows.map((row, index) => {\n const {fields = [], editHref} = row;\n const trClasses = classnames({[style.highlighted]: row.highlighted});\n\n const tableRows = fields.map((field, fIndex) => {\n if (!field) return <td key={fIndex}>{''}</td>;\n return <td key={fIndex}>{isString(field) ? field : renderIcon(field)}</td>;\n });\n\n if (editable) {\n tableRows.unshift(\n // TODO restore dropped support of hoverColor={brandColor}\n <td key=\"header\">\n <Link href={editHref}>\n <PencilIcon style={{color: mediumColor}} height={16} width={16} />\n </Link>\n </td>\n );\n }\n\n return (\n <tr className={trClasses} key={index}>\n {tableRows}\n </tr>\n );\n });\n\n const mainClass = classnames(theme === THEMES.COCKPIT ? style.cockpit : style.wrapper);\n\n return (\n <div className={mainClass}>\n {tableContext}\n <table className={classnames(style.table, {[style.readonly]: !editable})}>\n <thead>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>\n </div>\n );\n};\n\nTable.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nTable.propTypes = {\n editable: PropTypes.bool,\n rows: PropTypes.arrayOf(\n PropTypes.shape({\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({icon: PropTypes.string}),\n PropTypes.shape({icon: PropTypes.string, title: PropTypes.string})\n ])\n ),\n editHref: PropTypes.string,\n highlighted: PropTypes.bool\n })\n ),\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n info: PropTypes.string,\n filtered: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n selected: PropTypes.bool.isRequired\n })\n )\n })\n ),\n theme: PropTypes.oneOf([THEMES.COCKPIT]),\n headerTitle: PropTypes.string\n};\n\nexport default Table;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAQA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAA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yD,kBAAS,CAACE,OAAO,CACrBF,kBAAS,CAACG,KAAK,CAAC;IACdzB,MAAM,EAAEsB,kBAAS,CAACE,OAAO,CACvBF,kBAAS,CAACI,SAAS,CAAC,CAClBJ,kBAAS,CAACK,MAAM,EAChBL,kBAAS,CAACG,KAAK,CAAC;MAACtE,IAAI,EAAEmE,kBAAS,CAACK;IAAM,CAAC,CAAC,EACzCL,kBAAS,CAACG,KAAK,CAAC;MAACtE,IAAI,EAAEmE,kBAAS,CAACK,MAAM;MAAEhF,KAAK,EAAE2E,kBAAS,CAACK;IAAM,CAAC,CAAC,CACnE,CACH,CAAC;IACD1B,QAAQ,EAAEqB,kBAAS,CAACK,MAAM;IAC1BvB,WAAW,EAAEkB,kBAAS,CAACC;EACzB,CAAC,CACH,CAAC;EACDzD,OAAO,EAAEwD,kBAAS,CAACE,OAAO,CACxBF,kBAAS,CAACG,KAAK,CAAC;IACd9E,KAAK,EAAE2E,kBAAS,CAACK,MAAM,CAACC,UAAU;IAClCrD,IAAI,EAAE+C,kBAAS,CAACK,MAAM;IACtBrD,QAAQ,EAAEgD,kBAAS,CAACC,IAAI;IACxB3E,OAAO,EAAE0E,kBAAS,CAACE,OAAO,CACxBF,kBAAS,CAACG,KAAK,CAAC;MACd9E,KAAK,EAAE2E,kBAAS,CAACK,MAAM,CAACC,UAAU;MAClCzF,QAAQ,EAAEmF,kBAAS,CAACO,IAAI,CAACD,UAAU;MACnCxF,QAAQ,EAAEkF,kBAAS,CAACC,IAAI,CAACK;IAC3B,CAAC,CACH;EACF,CAAC,CACH,CAAC;EACD7E,KAAK,EAAEuE,kBAAS,CAACQ,KAAK,CAAC,CAACpG,MAAM,CAACC,OAAO,CAAC,CAAC;EACxCqB,WAAW,EAAEsE,kBAAS,CAACK;AACzB,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAvG,OAAA,GAEaiC,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_propTypes","_novaIcons","_provider","_checkbox","_link","_assignmentStatusTag","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","THEMES","COCKPIT","SORT_ARROWS","asc","desc","ARIA_SORT","createOptionsView","_options","hasOptions","optionsView","map","option","oIndex","onChange","selected","createElement","key","className","style","type","onClick","title","options","buildTableContext","translate","theme","headerTitle","header","legend","icon","NovaCompositionCoorpacademyDraft","width","height","label","NovaCompositionCoorpacademyValidate","nostatus","Table","props","context","rows","columns","editable","skin","mediumColor","_get2","headerView","column","cIndex","filtered","info","order","sortButton","sortArrow","OptionsIcon","FunnelIcon","ArrowDown","toggle","noOptions","id","name","checked","checkbox","htmlFor","optionsIconWrapper","color","optionsIcon","tableContext","unshift","renderIcon","field","Fragment","NovaSolidVideosVideoSubtitle","videosubtitle","bodyView","row","index","fields","editHref","trClasses","classnames","highlighted","tableRows","fIndex","_isString2","cellContent","text","tags","tag","tagIndex","href","NovaSolidContentEditionPencil1","mainClass","cockpit","wrapper","table","readonly","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","bool","arrayOf","shape","oneOfType","string","AssignmentStatusTag","isRequired","oneOf","func","_default","exports"],"sources":["../../../src/molecule/table/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {get, isString} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionCoorpacademyFunnel as FunnelIcon,\n NovaSolidContentEditionPencil1 as PencilIcon,\n NovaCompositionCoorpacademyDraft as DraftIcon,\n NovaCompositionCoorpacademyValidate as ValidateIcon,\n NovaSolidVideosVideoSubtitle as VideoSubtitleIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/checkbox';\nimport Link from '../../atom/link';\nimport AssignmentStatusTag from '../assignment-status-tag';\nimport style from './style.css';\n\nconst THEMES = {COCKPIT: 'cockpit'};\n\nconst SORT_ARROWS = {asc: '▲', desc: '▼'};\nconst ARIA_SORT = {asc: 'ascending', desc: 'descending'};\n\nconst createOptionsView = (_options, hasOptions) => {\n const optionsView = _options.map((option, oIndex) => {\n const {onChange, selected} = option;\n\n return (\n <div key={oIndex} className={selected ? style.selected : style.option}>\n <button type=\"button\" onClick={onChange}>\n {option.title}\n </button>\n </div>\n );\n });\n\n return hasOptions ? <div className={style.options}>{optionsView}</div> : null;\n};\n\nconst buildTableContext = (translate, theme, headerTitle) => {\n if (theme === THEMES.COCKPIT) {\n return (\n <div className={style.header}>\n <h1 className={style.title}>{headerTitle}</h1>\n <div className={style.legend}>\n <div className={style.icon}>\n <DraftIcon width={25} height={25} />\n <span className={style.label}>{translate('Draft')}</span>\n </div>\n <div className={style.icon}>\n <ValidateIcon width={25} height={25} />\n <span className={style.label}>{translate('Validated')}</span>\n </div>\n <div className={style.icon}>\n <span className={style.nostatus}>{'\\u26A0️'}</span>\n <span className={style.label}>{translate('No status')}</span>\n </div>\n </div>\n </div>\n );\n }\n\n if (headerTitle) {\n return (\n <div className={style.header}>\n <h2 className={style.title}>{headerTitle}</h2>\n </div>\n );\n }\n return null;\n};\n\nconst Table = (props, context) => {\n const {rows = [], columns = [], editable = true, theme, headerTitle = ''} = props;\n const {skin, translate} = context;\n\n const mediumColor = get('common.medium', skin);\n\n const headerView = columns.map((column, cIndex) => {\n const {title, filtered, info = '', options = [], order, onClick} = column;\n\n if (onClick) {\n return (\n <th title={info} key={cIndex} aria-sort={ARIA_SORT[order] || 'none'}>\n <button type=\"button\" className={style.sortButton} onClick={onClick}>\n <span>{title}</span>\n <span className={style.sortArrow} aria-hidden=\"true\">\n {SORT_ARROWS[order] || ''}\n </span>\n </button>\n </th>\n );\n }\n\n const hasOptions = options.length > 0;\n\n const OptionsIcon = (hasOptions && (filtered ? FunnelIcon : ArrowDown)) || null;\n\n return (\n <th title={info} key={cIndex}>\n <div className={hasOptions ? style.toggle : style.noOptions}>\n <Checkbox id={title} name={title} checked className={style.checkbox} />\n <label htmlFor={title}>{title}</label>\n {options.length > 0 ? createOptionsView(options, hasOptions) : null}\n <div className={style.optionsIconWrapper}>\n {hasOptions ? (\n <OptionsIcon\n style={{color: mediumColor}}\n height={16}\n width={16}\n className={style.optionsIcon}\n />\n ) : null}\n </div>\n </div>\n </th>\n );\n });\n\n const tableContext = buildTableContext(translate, theme, headerTitle);\n\n if (editable) {\n headerView.unshift(\n <th key=\"header\">\n <div className={style.noOptions} />\n </th>\n );\n }\n\n const renderIcon = field => {\n switch (get('icon', field)) {\n case 'draft':\n return <DraftIcon width={25} height={25} />;\n case 'validate':\n return <ValidateIcon width={25} height={25} />;\n case 'nostatus':\n return <span className={style.nostatus}>{'\\u26A0️'}</span>;\n case 'videosubtitle':\n return (\n <>\n <VideoSubtitleIcon className={style.videosubtitle} width={25} height={25} />\n {field.title}\n </>\n );\n default:\n null;\n }\n };\n\n const bodyView = rows.map((row, index) => {\n const {fields = [], editHref} = row;\n const trClasses = classnames({[style.highlighted]: row.highlighted});\n\n const tableRows = fields.map((field, fIndex) => {\n if (!field) return <td key={fIndex}>{''}</td>;\n if (isString(field) || field.icon) {\n return <td key={fIndex}>{isString(field) ? field : renderIcon(field)}</td>;\n }\n return (\n <td key={fIndex}>\n <span className={style.cellContent}>\n {field.text}\n {(field.tags || []).map((tag, tagIndex) => (\n <AssignmentStatusTag {...tag} key={tagIndex} />\n ))}\n </span>\n </td>\n );\n });\n\n if (editable) {\n tableRows.unshift(\n // TODO restore dropped support of hoverColor={brandColor}\n <td key=\"header\">\n <Link href={editHref}>\n <PencilIcon style={{color: mediumColor}} height={16} width={16} />\n </Link>\n </td>\n );\n }\n\n return (\n <tr className={trClasses} key={index}>\n {tableRows}\n </tr>\n );\n });\n\n const mainClass = classnames(theme === THEMES.COCKPIT ? style.cockpit : style.wrapper);\n\n return (\n <div className={mainClass}>\n {tableContext}\n <table className={classnames(style.table, {[style.readonly]: !editable})}>\n <thead>\n <tr>{headerView}</tr>\n </thead>\n <tbody>{bodyView}</tbody>\n </table>\n </div>\n );\n};\n\nTable.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nTable.propTypes = {\n editable: PropTypes.bool,\n rows: PropTypes.arrayOf(\n PropTypes.shape({\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n icon: PropTypes.string,\n title: PropTypes.string,\n text: PropTypes.string,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTag.propTypes))\n })\n ])\n ),\n editHref: PropTypes.string,\n highlighted: PropTypes.bool\n })\n ),\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n info: PropTypes.string,\n filtered: PropTypes.bool,\n // A sortable column: its header is a button showing ▲ (asc), ▼ (desc) or nothing ('')\n order: PropTypes.oneOf(['asc', 'desc', '']),\n onClick: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n selected: PropTypes.bool.isRequired\n })\n )\n })\n ),\n theme: PropTypes.oneOf([THEMES.COCKPIT]),\n headerTitle: PropTypes.string\n};\n\nexport default Table;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAQA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA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AAQ,EAAEuD,kBAAS,CAACC,IAAI;IACxB;IACAtD,KAAK,EAAEqD,kBAAS,CAACQ,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3C3F,OAAO,EAAEmF,kBAAS,CAACS,IAAI;IACvB1F,OAAO,EAAEiF,kBAAS,CAACE,OAAO,CACxBF,kBAAS,CAACG,KAAK,CAAC;MACdrF,KAAK,EAAEkF,kBAAS,CAACK,MAAM,CAACE,UAAU;MAClCjG,QAAQ,EAAE0F,kBAAS,CAACS,IAAI,CAACF,UAAU;MACnChG,QAAQ,EAAEyF,kBAAS,CAACC,IAAI,CAACM;IAC3B,CAAC,CACH;EACF,CAAC,CACH,CAAC;EACDrF,KAAK,EAAE8E,kBAAS,CAACQ,KAAK,CAAC,CAAC/G,MAAM,CAACC,OAAO,CAAC,CAAC;EACxCyB,WAAW,EAAE6E,kBAAS,CAACK;AACzB,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAA/H,OAAA,GAEaiD,KAAK","ignoreList":[]}
|
|
@@ -55,6 +55,12 @@
|
|
|
55
55
|
|
|
56
56
|
.readonly {}
|
|
57
57
|
|
|
58
|
+
.cellContent {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
.table:not(.readonly) tbody tr:hover {
|
|
59
65
|
background-color: xtraLightGrey;
|
|
60
66
|
}
|
|
@@ -269,3 +275,21 @@
|
|
|
269
275
|
vertical-align: middle;
|
|
270
276
|
padding-right: 4px;
|
|
271
277
|
}
|
|
278
|
+
|
|
279
|
+
.sortButton {
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: 6px;
|
|
283
|
+
padding: 0;
|
|
284
|
+
border: 0;
|
|
285
|
+
background: none;
|
|
286
|
+
font: inherit;
|
|
287
|
+
font-weight: 600;
|
|
288
|
+
color: inherit;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.sortArrow {
|
|
293
|
+
font-size: 10px;
|
|
294
|
+
min-width: 10px;
|
|
295
|
+
}
|
|
@@ -18,6 +18,7 @@ declare namespace TitleAndCheckBoxWrapper {
|
|
|
18
18
|
customStyle: PropTypes.Requireable<{
|
|
19
19
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
20
20
|
}>;
|
|
21
|
+
className: PropTypes.Requireable<string>;
|
|
21
22
|
}>>;
|
|
22
23
|
const sectionTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
24
|
removeMargin: PropTypes.Requireable<boolean>;
|
|
@@ -84,6 +84,9 @@ declare const TitleRadioWrapper: {
|
|
|
84
84
|
}>>>;
|
|
85
85
|
name: import("prop-types").Requireable<string>;
|
|
86
86
|
checked: import("prop-types").Requireable<boolean>;
|
|
87
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
88
|
+
example: import("prop-types").Requireable<string>;
|
|
89
|
+
hint: import("prop-types").Requireable<string>;
|
|
87
90
|
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
88
91
|
'aria-label': import("prop-types").Requireable<string>;
|
|
89
92
|
'data-name': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAqB1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAqB1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
|
|
@@ -85,6 +85,9 @@ declare const propTypes: {
|
|
|
85
85
|
}>>>;
|
|
86
86
|
name: PropTypes.Requireable<string>;
|
|
87
87
|
checked: PropTypes.Requireable<boolean>;
|
|
88
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
89
|
+
example: PropTypes.Requireable<string>;
|
|
90
|
+
hint: PropTypes.Requireable<string>;
|
|
88
91
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
89
92
|
'aria-label': PropTypes.Requireable<string>;
|
|
90
93
|
'data-name': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOd,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,cAAc,EAAE,mBAAmB,CAAC;IACpC,KAAK,EAAE,OAAO,cAAc,CAAC,SAAS,GAAG,OAAO,kBAAkB,CAAC,SAAS,CAAC;IAC7E,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;CACjD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -2,6 +2,7 @@ export default WizardSummary;
|
|
|
2
2
|
declare function WizardSummary(props: any): JSX.Element;
|
|
3
3
|
declare namespace WizardSummary {
|
|
4
4
|
namespace propTypes {
|
|
5
|
+
export const inline: PropTypes.Requireable<boolean>;
|
|
5
6
|
export const title: PropTypes.Requireable<string>;
|
|
6
7
|
export const side: PropTypes.Requireable<string>;
|
|
7
8
|
export const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -14,6 +15,8 @@ declare namespace WizardSummary {
|
|
|
14
15
|
type: PropTypes.Requireable<string>;
|
|
15
16
|
text: PropTypes.Requireable<string>;
|
|
16
17
|
unsaved: PropTypes.Requireable<boolean>;
|
|
18
|
+
diff: PropTypes.Requireable<string>;
|
|
19
|
+
diffLabel: PropTypes.Requireable<string>;
|
|
17
20
|
}> | PropTypes.InferProps<{
|
|
18
21
|
type: PropTypes.Requireable<string>;
|
|
19
22
|
badgeList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/wizard-summary/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/wizard-summary/index.js"],"names":[],"mappings":";AA6IA,wDA4DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlGD;;;uBAwBC"}
|