@coorpacademy/components 11.40.4 → 11.40.6-alpha.5
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/button-link/index.d.ts +15 -8
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +75 -37
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +20 -14
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +4 -3
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/button-menu/index.d.ts +1 -3
- package/es/atom/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +1 -7
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/types.d.ts +2 -6
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/chip/index.d.ts +4 -0
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +12 -6
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +2 -1
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-switch/style.css +4 -1
- package/es/atom/radio-with-title/index.d.ts +16 -8
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +16 -8
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/title/index.d.ts +16 -8
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +5 -2
- package/es/atom/title/index.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts +1 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +6 -2
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/base-modal/style.css +5 -0
- package/es/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.d.ts +19 -11
- package/es/molecule/button-menu-action/index.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.js +27 -3
- package/es/molecule/button-menu-action/index.js.map +1 -1
- package/es/molecule/button-menu-action/types.d.ts +22 -12
- package/es/molecule/button-menu-action/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/types.js +7 -2
- package/es/molecule/button-menu-action/types.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +135 -85
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/icon-picker-modal/index.d.ts +1 -2
- package/es/molecule/icon-picker-modal/index.d.ts.map +1 -1
- package/es/molecule/icon-picker-modal/index.js +16 -43
- package/es/molecule/icon-picker-modal/index.js.map +1 -1
- package/es/molecule/multi-filter-panel/index.d.ts +19 -0
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.js +39 -10
- package/es/molecule/multi-filter-panel/index.js.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +26 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.js +5 -0
- package/es/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/es/molecule/multi-filter-panel/style.css +8 -0
- package/es/molecule/quick-filters/index.d.ts +15 -8
- package/es/molecule/quick-filters/index.d.ts.map +1 -1
- package/es/molecule/quick-filters/types.d.ts +15 -8
- package/es/molecule/quick-filters/types.d.ts.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +16 -8
- package/es/molecule/title-radio-wrapper/index.d.ts +16 -8
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +16 -8
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +135 -68
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +135 -68
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.d.ts +1 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.js +5 -2
- package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.d.ts +2 -0
- package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.js +1 -0
- package/es/organism/filter-checkbox-and-search/props-types.js.map +1 -1
- package/es/organism/filter-checkbox-and-search/style.css +2 -0
- package/es/organism/filter-chip/index.d.ts +3 -0
- package/es/organism/filter-chip/index.d.ts.map +1 -1
- package/es/organism/filter-chip/index.js +12 -4
- package/es/organism/filter-chip/index.js.map +1 -1
- package/es/organism/filter-chip/prop-types.d.ts +14 -7
- package/es/organism/filter-chip/prop-types.d.ts.map +1 -1
- package/es/organism/filter-chip/prop-types.js +3 -0
- package/es/organism/filter-chip/prop-types.js.map +1 -1
- package/es/organism/filter-switch/index.d.ts +23 -0
- package/es/organism/filter-switch/index.d.ts.map +1 -0
- package/es/organism/filter-switch/index.js +76 -0
- package/es/organism/filter-switch/index.js.map +1 -0
- package/es/organism/filter-switch/prop-types.d.ts +28 -0
- package/es/organism/filter-switch/prop-types.d.ts.map +1 -0
- package/es/organism/filter-switch/prop-types.js +15 -0
- package/es/organism/filter-switch/prop-types.js.map +1 -0
- package/es/organism/filter-switch/style.css +46 -0
- package/es/organism/icon-editor/index.d.ts +15 -8
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +15 -8
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +116 -68
- package/es/organism/rewards-form/index.d.ts +16 -8
- package/es/organism/select-opponents/index.d.ts +16 -8
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +16 -8
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/setup-header/index.d.ts +60 -32
- package/es/organism/title-and-input/index.d.ts +47 -24
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +47 -24
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +63 -38
- package/es/template/app-player/loading/index.d.ts +135 -85
- package/es/template/app-player/player/index.d.ts +278 -170
- package/es/template/app-player/player/slides/header/index.d.ts +8 -0
- package/es/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/es/template/app-player/player/slides/header/index.js +89 -3
- package/es/template/app-player/player/slides/header/index.js.map +1 -1
- package/es/template/app-player/player/slides/header/style.css +1 -1
- package/es/template/app-player/player/slides/index.d.ts +143 -85
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +135 -85
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +143 -85
- package/es/template/app-review/index.d.ts +135 -85
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +135 -85
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +135 -85
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +60 -32
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +60 -32
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +599 -298
- package/es/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +270 -170
- package/es/template/common/search-page/index.d.ts +135 -85
- package/es/template/external-course/index.d.ts +135 -85
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +1 -0
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +15 -8
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +75 -37
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +20 -14
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +4 -3
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/button-menu/index.d.ts +1 -3
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +1 -7
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/types.d.ts +2 -6
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/chip/index.d.ts +4 -0
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +12 -6
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +2 -1
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-switch/style.css +4 -1
- package/lib/atom/radio-with-title/index.d.ts +16 -8
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +16 -8
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/title/index.d.ts +16 -8
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +5 -2
- package/lib/atom/title/index.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts +1 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +6 -2
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/base-modal/style.css +5 -0
- package/lib/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.d.ts +19 -11
- package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.js +26 -2
- package/lib/molecule/button-menu-action/index.js.map +1 -1
- package/lib/molecule/button-menu-action/types.d.ts +22 -12
- package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/types.js +7 -2
- package/lib/molecule/button-menu-action/types.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +135 -85
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/icon-picker-modal/index.d.ts +1 -2
- package/lib/molecule/icon-picker-modal/index.d.ts.map +1 -1
- package/lib/molecule/icon-picker-modal/index.js +16 -43
- package/lib/molecule/icon-picker-modal/index.js.map +1 -1
- package/lib/molecule/multi-filter-panel/index.d.ts +19 -0
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.js +39 -9
- package/lib/molecule/multi-filter-panel/index.js.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +26 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.js +5 -0
- package/lib/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/lib/molecule/multi-filter-panel/style.css +8 -0
- package/lib/molecule/quick-filters/index.d.ts +15 -8
- package/lib/molecule/quick-filters/index.d.ts.map +1 -1
- package/lib/molecule/quick-filters/types.d.ts +15 -8
- package/lib/molecule/quick-filters/types.d.ts.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +16 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts +16 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +16 -8
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +135 -68
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +135 -68
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.d.ts +1 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.js +5 -2
- package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts +2 -0
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.js +1 -0
- package/lib/organism/filter-checkbox-and-search/props-types.js.map +1 -1
- package/lib/organism/filter-checkbox-and-search/style.css +2 -0
- package/lib/organism/filter-chip/index.d.ts +3 -0
- package/lib/organism/filter-chip/index.d.ts.map +1 -1
- package/lib/organism/filter-chip/index.js +12 -4
- package/lib/organism/filter-chip/index.js.map +1 -1
- package/lib/organism/filter-chip/prop-types.d.ts +14 -7
- package/lib/organism/filter-chip/prop-types.d.ts.map +1 -1
- package/lib/organism/filter-chip/prop-types.js +3 -0
- package/lib/organism/filter-chip/prop-types.js.map +1 -1
- package/lib/organism/filter-switch/index.d.ts +23 -0
- package/lib/organism/filter-switch/index.d.ts.map +1 -0
- package/lib/organism/filter-switch/index.js +83 -0
- package/lib/organism/filter-switch/index.js.map +1 -0
- package/lib/organism/filter-switch/prop-types.d.ts +28 -0
- package/lib/organism/filter-switch/prop-types.d.ts.map +1 -0
- package/lib/organism/filter-switch/prop-types.js +20 -0
- package/lib/organism/filter-switch/prop-types.js.map +1 -0
- package/lib/organism/filter-switch/style.css +46 -0
- package/lib/organism/icon-editor/index.d.ts +15 -8
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +15 -8
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +116 -68
- package/lib/organism/rewards-form/index.d.ts +16 -8
- package/lib/organism/select-opponents/index.d.ts +16 -8
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +16 -8
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/setup-header/index.d.ts +60 -32
- package/lib/organism/title-and-input/index.d.ts +47 -24
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +47 -24
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +63 -38
- package/lib/template/app-player/loading/index.d.ts +135 -85
- package/lib/template/app-player/player/index.d.ts +278 -170
- package/lib/template/app-player/player/slides/header/index.d.ts +8 -0
- package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/lib/template/app-player/player/slides/header/index.js +89 -3
- package/lib/template/app-player/player/slides/header/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/style.css +1 -1
- package/lib/template/app-player/player/slides/index.d.ts +143 -85
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +135 -85
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +143 -85
- package/lib/template/app-review/index.d.ts +135 -85
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +135 -85
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +135 -85
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +60 -32
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +60 -32
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +599 -298
- package/lib/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +270 -170
- package/lib/template/common/search-page/index.d.ts +135 -85
- package/lib/template/external-course/index.d.ts +135 -85
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +1 -0
- package/lib/variables/colors.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,8 +6,7 @@ declare namespace IconPickerModal {
|
|
|
6
6
|
}
|
|
7
7
|
namespace propTypes {
|
|
8
8
|
const isOpen: PropTypes.Requireable<boolean>;
|
|
9
|
-
const
|
|
10
|
-
const onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
const onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
10
|
const onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-picker-modal/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-picker-modal/index.js"],"names":[],"mappings":";AAaA,+EA6GC"}
|
|
@@ -13,21 +13,18 @@ import BaseModal from '../base-modal';
|
|
|
13
13
|
import SelectIcon from '../../atom/select-icon';
|
|
14
14
|
import Provider from '../../atom/provider';
|
|
15
15
|
import SearchForm from '../search-form';
|
|
16
|
-
import { COLORS } from '../../variables/colors';
|
|
17
16
|
import style from './style.css';
|
|
18
17
|
import useIconSearch from './use-icon-search';
|
|
19
18
|
const ICONS_PER_LOAD = 48;
|
|
20
19
|
const IconPickerModal = (props, context) => {
|
|
21
20
|
const {
|
|
22
21
|
isOpen,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onClose
|
|
22
|
+
onClose,
|
|
23
|
+
onClick
|
|
26
24
|
} = props;
|
|
27
25
|
const {
|
|
28
26
|
translate
|
|
29
27
|
} = context;
|
|
30
|
-
const [selectedIcon, setSelectedIcon] = useState(null);
|
|
31
28
|
const [displayedIcons, setDisplayedIcons] = useState([]);
|
|
32
29
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
33
30
|
const allIcons = useMemo(() => _pipe(_values, _map(_get('iconName')), _uniq)(fas), []);
|
|
@@ -37,15 +34,9 @@ const IconPickerModal = (props, context) => {
|
|
|
37
34
|
handleSearch,
|
|
38
35
|
handleReset
|
|
39
36
|
} = useIconSearch(allIcons);
|
|
40
|
-
const handleCancel = useCallback(() => {
|
|
41
|
-
onCancel();
|
|
42
|
-
}, [onCancel]);
|
|
43
37
|
const handleClose = useCallback(() => {
|
|
44
38
|
onClose();
|
|
45
39
|
}, [onClose]);
|
|
46
|
-
const handleIconClick = useCallback(iconName => () => {
|
|
47
|
-
setSelectedIcon(prevSelectedIcon => prevSelectedIcon === iconName ? null : iconName);
|
|
48
|
-
}, []);
|
|
49
40
|
const loadMoreIcons = useCallback(() => {
|
|
50
41
|
const nextIndex = currentIndex + ICONS_PER_LOAD;
|
|
51
42
|
const newIcons = _slice(currentIndex, nextIndex, searchResults);
|
|
@@ -66,36 +57,20 @@ const IconPickerModal = (props, context) => {
|
|
|
66
57
|
loadMoreIcons();
|
|
67
58
|
}
|
|
68
59
|
}, [loadMoreIcons]);
|
|
69
|
-
const icons = useMemo(() => _pipe(_entries, _map(([index, iconName]) =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"data-name": `icon-${index}`,
|
|
73
|
-
"aria-label": iconName,
|
|
74
|
-
faIcon: iconName,
|
|
75
|
-
onClick: handleIconClick(iconName),
|
|
76
|
-
options: {
|
|
77
|
-
isSelected: selectedIcon === iconName
|
|
60
|
+
const icons = useMemo(() => _pipe(_entries, _map(([index, iconName]) => {
|
|
61
|
+
function handleIconClick() {
|
|
62
|
+
return onClick(iconName);
|
|
78
63
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
setSelectedIcon(null);
|
|
90
|
-
onClose();
|
|
91
|
-
},
|
|
92
|
-
label: translate('confirm'),
|
|
93
|
-
iconName: 'plus',
|
|
94
|
-
disabled: selectedIcon === null,
|
|
95
|
-
color: COLORS.cm_primary_blue
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}, [handleCancel, onConfirm, onClose, translate, selectedIcon]);
|
|
64
|
+
return /*#__PURE__*/React.createElement(SelectIcon, {
|
|
65
|
+
key: `icon-${iconName}`,
|
|
66
|
+
size: "responsive",
|
|
67
|
+
"data-name": `icon-${iconName}`,
|
|
68
|
+
"aria-label": iconName,
|
|
69
|
+
faIcon: iconName,
|
|
70
|
+
onClick: handleIconClick,
|
|
71
|
+
options: {}
|
|
72
|
+
});
|
|
73
|
+
}))(displayedIcons), [displayedIcons, onClick]);
|
|
99
74
|
if (!isOpen) return null;
|
|
100
75
|
return /*#__PURE__*/React.createElement(BaseModal, {
|
|
101
76
|
title: translate('icon_picker_title'),
|
|
@@ -103,7 +78,6 @@ const IconPickerModal = (props, context) => {
|
|
|
103
78
|
isOpen: isOpen,
|
|
104
79
|
onClose: handleClose,
|
|
105
80
|
onScroll: handleScroll,
|
|
106
|
-
footer: footer,
|
|
107
81
|
headerIcon: {
|
|
108
82
|
name: 'arrows-rotate',
|
|
109
83
|
backgroundColor: '#D6E6FF'
|
|
@@ -140,8 +114,7 @@ IconPickerModal.contextTypes = {
|
|
|
140
114
|
};
|
|
141
115
|
IconPickerModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
142
116
|
isOpen: PropTypes.bool,
|
|
143
|
-
|
|
144
|
-
onConfirm: PropTypes.func,
|
|
117
|
+
onClick: PropTypes.func,
|
|
145
118
|
onClose: PropTypes.func
|
|
146
119
|
} : {};
|
|
147
120
|
export default IconPickerModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","useEffect","PropTypes","fas","BaseModal","SelectIcon","Provider","SearchForm","COLORS","style","useIconSearch","ICONS_PER_LOAD","IconPickerModal","props","context","isOpen","onCancel","onConfirm","onClose","translate","selectedIcon","setSelectedIcon","displayedIcons","setDisplayedIcons","currentIndex","setCurrentIndex","allIcons","_pipe","_values","_map","_get","_uniq","searchValue","searchResults","handleSearch","handleReset","handleCancel","handleClose","handleIconClick","iconName","prevSelectedIcon","loadMoreIcons","nextIndex","newIcons","_slice","prevIcons","handleScroll","event","scrollTop","clientHeight","scrollHeight","currentTarget","icons","_entries","index","createElement","key","size","faIcon","onClick","options","isSelected","footer","cancelButton","label","confirmButton","disabled","color","cm_primary_blue","title","description","onScroll","headerIcon","name","backgroundColor","className","iconPicker","Fragment","searchWrapper","search","placeholder","value","onChange","onReset","dataTestId","_size","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","iconsListWrapper","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func"],"sources":["../../../src/molecule/icon-picker-modal/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {entries, map, pipe, get, values, slice, size, uniq} from 'lodash/fp';\nimport BaseModal from '../base-modal';\nimport SelectIcon from '../../atom/select-icon';\nimport Provider from '../../atom/provider';\nimport SearchForm from '../search-form';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport useIconSearch from './use-icon-search';\n\nconst ICONS_PER_LOAD = 48;\n\nconst IconPickerModal = (props, context) => {\n const {isOpen, onCancel, onConfirm, onClose} = props;\n const {translate} = context;\n\n const [selectedIcon, setSelectedIcon] = useState(null);\n const [displayedIcons, setDisplayedIcons] = useState([]);\n const [currentIndex, setCurrentIndex] = useState(0);\n\n const allIcons = useMemo(() => pipe(values, map(get('iconName')), uniq)(fas), []);\n const {searchValue, searchResults, handleSearch, handleReset} = useIconSearch(allIcons);\n\n const handleCancel = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const handleClose = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const handleIconClick = useCallback(\n iconName => () => {\n setSelectedIcon(prevSelectedIcon => (prevSelectedIcon === iconName ? null : iconName));\n },\n []\n );\n\n const loadMoreIcons = useCallback(() => {\n const nextIndex = currentIndex + ICONS_PER_LOAD;\n const newIcons = slice(currentIndex, nextIndex, searchResults);\n setDisplayedIcons(prevIcons => [...prevIcons, ...newIcons]);\n setCurrentIndex(nextIndex);\n }, [currentIndex, searchResults]);\n\n useEffect(() => {\n setDisplayedIcons(() => slice(0, ICONS_PER_LOAD, searchResults));\n setCurrentIndex(ICONS_PER_LOAD);\n }, [searchResults]);\n\n const handleScroll = useCallback(\n event => {\n const {scrollTop, clientHeight, scrollHeight} = event.currentTarget;\n if (scrollHeight - scrollTop <= clientHeight + 1) {\n loadMoreIcons();\n }\n },\n [loadMoreIcons]\n );\n\n const icons = useMemo(\n () =>\n pipe(\n entries,\n map(([index, iconName]) => (\n <SelectIcon\n key={`icon-${index}`}\n size=\"responsive\"\n data-name={`icon-${index}`}\n aria-label={iconName}\n faIcon={iconName}\n onClick={handleIconClick(iconName)}\n options={{isSelected: selectedIcon === iconName}}\n />\n ))\n )(displayedIcons),\n [displayedIcons, selectedIcon, handleIconClick]\n );\n\n const footer = useMemo(() => {\n return {\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel')\n },\n confirmButton: {\n onConfirm: () => {\n onConfirm(selectedIcon);\n setSelectedIcon(null);\n onClose();\n },\n label: translate('confirm'),\n iconName: 'plus',\n disabled: selectedIcon === null,\n color: COLORS.cm_primary_blue\n }\n };\n }, [handleCancel, onConfirm, onClose, translate, selectedIcon]);\n\n if (!isOpen) return null;\n\n return (\n <BaseModal\n title={translate('icon_picker_title')}\n description={translate('icon_picker_description')}\n isOpen={isOpen}\n onClose={handleClose}\n onScroll={handleScroll}\n footer={footer}\n headerIcon={{\n name: 'arrows-rotate',\n backgroundColor: '#D6E6FF'\n }}\n >\n <div className={style.iconPicker}>\n {\n <>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleReset}\n dataTestId=\"search-input\"\n />\n </div>\n {searchValue && size(searchResults) === 0 ? (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n ) : (\n <div className={style.iconsListWrapper}>{icons}</div>\n )}\n </>\n }\n </div>\n </BaseModal>\n );\n};\n\nIconPickerModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nIconPickerModal.propTypes = {\n isOpen: PropTypes.bool,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default IconPickerModal;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,QAAO,OAAO;AACtE,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,GAAG,QAAO,kCAAkC;AAEpD,OAA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AAA,CAAAC,QAAA,oBAAG;EAC1BjF,MAAM,EAAEb,SAAS,CAAC+F,IAAI;EACtBjF,QAAQ,EAAEd,SAAS,CAACgG,IAAI;EACxBjF,SAAS,EAAEf,SAAS,CAACgG,IAAI;EACzBhF,OAAO,EAAEhB,SAAS,CAACgG;AACrB,CAAC;AAED,eAAetF,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","useEffect","PropTypes","fas","BaseModal","SelectIcon","Provider","SearchForm","style","useIconSearch","ICONS_PER_LOAD","IconPickerModal","props","context","isOpen","onClose","onClick","translate","displayedIcons","setDisplayedIcons","currentIndex","setCurrentIndex","allIcons","_pipe","_values","_map","_get","_uniq","searchValue","searchResults","handleSearch","handleReset","handleClose","loadMoreIcons","nextIndex","newIcons","_slice","prevIcons","handleScroll","event","scrollTop","clientHeight","scrollHeight","currentTarget","icons","_entries","index","iconName","handleIconClick","createElement","key","size","faIcon","options","title","description","onScroll","headerIcon","name","backgroundColor","className","iconPicker","Fragment","searchWrapper","search","placeholder","value","onChange","onReset","dataTestId","_size","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","iconsListWrapper","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func"],"sources":["../../../src/molecule/icon-picker-modal/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {entries, map, pipe, get, values, slice, size, uniq} from 'lodash/fp';\nimport BaseModal from '../base-modal';\nimport SelectIcon from '../../atom/select-icon';\nimport Provider from '../../atom/provider';\nimport SearchForm from '../search-form';\nimport style from './style.css';\nimport useIconSearch from './use-icon-search';\n\nconst ICONS_PER_LOAD = 48;\n\nconst IconPickerModal = (props, context) => {\n const {isOpen, onClose, onClick} = props;\n const {translate} = context;\n\n const [displayedIcons, setDisplayedIcons] = useState([]);\n const [currentIndex, setCurrentIndex] = useState(0);\n\n const allIcons = useMemo(() => pipe(values, map(get('iconName')), uniq)(fas), []);\n const {searchValue, searchResults, handleSearch, handleReset} = useIconSearch(allIcons);\n\n const handleClose = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const loadMoreIcons = useCallback(() => {\n const nextIndex = currentIndex + ICONS_PER_LOAD;\n const newIcons = slice(currentIndex, nextIndex, searchResults);\n setDisplayedIcons(prevIcons => [...prevIcons, ...newIcons]);\n setCurrentIndex(nextIndex);\n }, [currentIndex, searchResults]);\n\n useEffect(() => {\n setDisplayedIcons(() => slice(0, ICONS_PER_LOAD, searchResults));\n setCurrentIndex(ICONS_PER_LOAD);\n }, [searchResults]);\n\n const handleScroll = useCallback(\n event => {\n const {scrollTop, clientHeight, scrollHeight} = event.currentTarget;\n if (scrollHeight - scrollTop <= clientHeight + 1) {\n loadMoreIcons();\n }\n },\n [loadMoreIcons]\n );\n\n const icons = useMemo(\n () =>\n pipe(\n entries,\n map(([index, iconName]) => {\n function handleIconClick() {\n return onClick(iconName);\n }\n\n return (\n <SelectIcon\n key={`icon-${iconName}`}\n size=\"responsive\"\n data-name={`icon-${iconName}`}\n aria-label={iconName}\n faIcon={iconName}\n onClick={handleIconClick}\n options={{}}\n />\n );\n })\n )(displayedIcons),\n [displayedIcons, onClick]\n );\n\n if (!isOpen) return null;\n\n return (\n <BaseModal\n title={translate('icon_picker_title')}\n description={translate('icon_picker_description')}\n isOpen={isOpen}\n onClose={handleClose}\n onScroll={handleScroll}\n headerIcon={{\n name: 'arrows-rotate',\n backgroundColor: '#D6E6FF'\n }}\n >\n <div className={style.iconPicker}>\n {\n <>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleReset}\n dataTestId=\"search-input\"\n />\n </div>\n {searchValue && size(searchResults) === 0 ? (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n ) : (\n <div className={style.iconsListWrapper}>{icons}</div>\n )}\n </>\n }\n </div>\n </BaseModal>\n );\n};\n\nIconPickerModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nIconPickerModal.propTypes = {\n isOpen: PropTypes.bool,\n onClick: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default IconPickerModal;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,QAAO,OAAO;AACtE,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,GAAG,QAAO,kCAAkC;AAEpD,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,MAAMC,cAAc,GAAG,EAAE;AAEzB,MAAMC,eAAe,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAC1C,MAAM;IAACC,MAAM;IAAEC,OAAO;IAAEC;EAAO,CAAC,GAAGJ,KAAK;EACxC,MAAM;IAACK;EAAS,CAAC,GAAGJ,OAAO;EAE3B,MAAM,CAACK,cAAc,EAAEC,iBAAiB,CAAC,GAAGpB,QAAQ,CAAC,EAAE,CAAC;EACxD,MAAM,CAACqB,YAAY,EAAEC,eAAe,CAAC,GAAGtB,QAAQ,CAAC,CAAC,CAAC;EAEnD,MAAMuB,QAAQ,GAAGxB,OAAO,CAAC,MAAMyB,KAAA,CAAAC,OAAA,EAAaC,IAAA,CAAIC,IAAA,CAAI,UAAU,CAAC,CAAC,EAAAC,KAAM,CA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aAAa,CAAC,KAAK,CAAC,gBACvChC,KAAA,CAAAoD,aAAA;IAAKW,SAAS,EAAEpD,KAAK,CAAC+D;EAA2B,gBAC/C1E,KAAA,CAAAoD,aAAA;IAAKW,SAAS,EAAEpD,KAAK,CAACgE;EAAuB,GAC1CvD,SAAS,CAAC,2BAA2B,EAAE;IAACW;EAAW,CAAC,CAClD,CAAC,eACN/B,KAAA,CAAAoD,aAAA;IAAKW,SAAS,EAAEpD,KAAK,CAACiE;EAA6B,GAChDxD,SAAS,CAAC,iCAAiC,CACzC,CAAC,eACNpB,KAAA,CAAAoD,aAAA;IAAKW,SAAS,EAAEpD,KAAK,CAACkE,4BAA6B;IAAC1D,OAAO,EAAEe;EAAY,GACtEd,SAAS,CAAC,kCAAkC,CAC1C,CACF,CAAC,gBAENpB,KAAA,CAAAoD,aAAA;IAAKW,SAAS,EAAEpD,KAAK,CAACmE;EAAiB,GAAE/B,KAAW,CAEtD,CAED,CACI,CAAC;AAEhB,CAAC;AAEDjC,eAAe,CAACiE,YAAY,GAAG;EAC7B3D,SAAS,EAAEX,QAAQ,CAACuE,iBAAiB,CAAC5D;AACxC,CAAC;AAEDN,eAAe,CAACmE,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAC1BnE,MAAM,EAAEZ,SAAS,CAACgF,IAAI;EACtBlE,OAAO,EAAEd,SAAS,CAACiF,IAAI;EACvBpE,OAAO,EAAEb,SAAS,CAACiF;AACrB,CAAC;AAED,eAAexE,eAAe","ignoreList":[]}
|
|
@@ -6,16 +6,20 @@ declare const MultiFilterPanel: {
|
|
|
6
6
|
propTypes: {
|
|
7
7
|
title: import("prop-types").Requireable<string>;
|
|
8
8
|
onClearAll: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
9
|
+
onRemoveSelectedFilter: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
9
10
|
options: import("prop-types").Requireable<(NonNullable<import("prop-types").InferProps<{
|
|
10
11
|
type: import("prop-types").Requireable<string>;
|
|
11
12
|
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
12
13
|
title: import("prop-types").Requireable<string>;
|
|
14
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
13
15
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
14
16
|
options: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
15
17
|
label: import("prop-types").Requireable<string>;
|
|
16
18
|
type: import("prop-types").Requireable<string>;
|
|
19
|
+
textColor: import("prop-types").Requireable<string>;
|
|
17
20
|
selected: import("prop-types").Requireable<boolean>;
|
|
18
21
|
icon: import("prop-types").Requireable<string>;
|
|
22
|
+
customIcon: import("prop-types").Requireable<string>;
|
|
19
23
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
20
24
|
}> | null | undefined)[]>;
|
|
21
25
|
}>>;
|
|
@@ -23,6 +27,7 @@ declare const MultiFilterPanel: {
|
|
|
23
27
|
type: import("prop-types").Requireable<string>;
|
|
24
28
|
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
25
29
|
title: import("prop-types").Requireable<string>;
|
|
30
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
26
31
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
27
32
|
options: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
28
33
|
label: import("prop-types").Requireable<string>;
|
|
@@ -46,6 +51,20 @@ declare const MultiFilterPanel: {
|
|
|
46
51
|
searchIconAriaLabel: import("prop-types").Requireable<string>;
|
|
47
52
|
}>>;
|
|
48
53
|
}>>;
|
|
54
|
+
}> | import("prop-types").InferProps<{
|
|
55
|
+
type: import("prop-types").Requireable<string>;
|
|
56
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
57
|
+
title: import("prop-types").Validator<string>;
|
|
58
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
59
|
+
onClear: import("prop-types").Validator<(...args: any[]) => any>;
|
|
60
|
+
options: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
61
|
+
label: import("prop-types").Validator<string>;
|
|
62
|
+
value: import("prop-types").Validator<boolean>;
|
|
63
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
64
|
+
theme: import("prop-types").Validator<string>;
|
|
65
|
+
ariaLabel: import("prop-types").Validator<string>;
|
|
66
|
+
}> | null | undefined)[]>;
|
|
67
|
+
}>>;
|
|
49
68
|
}> | null | undefined> | null | undefined)[]>;
|
|
50
69
|
};
|
|
51
70
|
contextTypes: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AASjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAwDlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
|
|
@@ -11,9 +11,11 @@ import Title from '../../atom/title';
|
|
|
11
11
|
import Tag from '../../atom/tag';
|
|
12
12
|
import ButtonLink from '../../atom/button-link';
|
|
13
13
|
import Provider, { GetTranslateFromContext } from '../../atom/provider';
|
|
14
|
-
import
|
|
14
|
+
import Chip from '../../atom/chip';
|
|
15
|
+
import { COLORS } from '../../variables/colors';
|
|
16
|
+
import FilterSwitch from '../../organism/filter-switch';
|
|
15
17
|
import style from './style.css';
|
|
16
|
-
|
|
18
|
+
import propTypes from './prop-types';
|
|
17
19
|
// @ts-expect-error convert is not recognized by the types
|
|
18
20
|
const uncappedMap = _map.convert({
|
|
19
21
|
cap: false
|
|
@@ -35,21 +37,47 @@ const buildFilters = filterOptions => {
|
|
|
35
37
|
return /*#__PURE__*/React.createElement(FilterChip, options);
|
|
36
38
|
case 'checkbox':
|
|
37
39
|
return /*#__PURE__*/React.createElement(FilterCheckboxAndSearch, options);
|
|
40
|
+
case 'switch':
|
|
41
|
+
return /*#__PURE__*/React.createElement(FilterSwitch, options);
|
|
38
42
|
default:
|
|
39
43
|
return null;
|
|
40
44
|
}
|
|
41
45
|
};
|
|
46
|
+
const buildAllSelectedFilterChips = (selectedFilters, onRemoveSelectedFilter) => {
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: style.selectedFiltersContainer,
|
|
49
|
+
"data-testid": "selected-filters-container"
|
|
50
|
+
}, selectedFilters.map(filterItem => {
|
|
51
|
+
const {
|
|
52
|
+
label
|
|
53
|
+
} = filterItem;
|
|
54
|
+
function handleClick() {
|
|
55
|
+
return onRemoveSelectedFilter(label);
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
58
|
+
key: label,
|
|
59
|
+
onClick: handleClick,
|
|
60
|
+
text: label,
|
|
61
|
+
textColor: COLORS.neutral_500,
|
|
62
|
+
backgroundColor: COLORS.cm_grey_150,
|
|
63
|
+
customIcon: 'xmark',
|
|
64
|
+
customStyle: {
|
|
65
|
+
height: '28px',
|
|
66
|
+
padding: '4px 8px'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
42
71
|
const MultiFilterPanel = (props, context) => {
|
|
43
72
|
const {
|
|
44
73
|
title,
|
|
45
74
|
onClearAll,
|
|
46
|
-
options
|
|
75
|
+
options,
|
|
76
|
+
onRemoveSelectedFilter = false
|
|
47
77
|
} = props;
|
|
48
78
|
const translate = GetTranslateFromContext(context);
|
|
49
|
-
const allSelectedFilters = _pipe(_map('options'), _flatMap('options'), _filter(
|
|
50
|
-
|
|
51
|
-
}), _size)(options);
|
|
52
|
-
const hasSelectedFilters = allSelectedFilters > 0;
|
|
79
|
+
const allSelectedFilters = _pipe(_map('options'), _flatMap('options'), _filter(filterOptions => filterOptions.selected || filterOptions.value === true))(options);
|
|
80
|
+
const hasSelectedFilters = _size(allSelectedFilters) > 0;
|
|
53
81
|
const filters = uncappedMap((filterOptions, i) => {
|
|
54
82
|
const isLastItem = i + 1 === _size(options);
|
|
55
83
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -65,7 +93,7 @@ const MultiFilterPanel = (props, context) => {
|
|
|
65
93
|
type: "form-group",
|
|
66
94
|
titleSize: "standard-light-weight"
|
|
67
95
|
}), hasSelectedFilters ? /*#__PURE__*/React.createElement(Tag, {
|
|
68
|
-
label: _toString(allSelectedFilters),
|
|
96
|
+
label: _toString(_size(allSelectedFilters)),
|
|
69
97
|
type: "info",
|
|
70
98
|
size: "S"
|
|
71
99
|
}) : null), hasSelectedFilters ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -76,8 +104,9 @@ const MultiFilterPanel = (props, context) => {
|
|
|
76
104
|
type: "text",
|
|
77
105
|
"data-name": "filters-all-clear-button",
|
|
78
106
|
"aria-label": "filters all clear button",
|
|
79
|
-
onClick: onClearAll
|
|
80
|
-
|
|
107
|
+
onClick: onClearAll,
|
|
108
|
+
hoverColor: COLORS.primary_600
|
|
109
|
+
})) : null), onRemoveSelectedFilter && hasSelectedFilters ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, buildAllSelectedFilterChips(allSelectedFilters, onRemoveSelectedFilter)), FilterSeparator) : null, filters);
|
|
81
110
|
};
|
|
82
111
|
MultiFilterPanel.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
83
112
|
MultiFilterPanel.contextTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","FilterChip","FilterCheckboxAndSearch","Title","Tag","ButtonLink","Provider","GetTranslateFromContext","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","FilterChip","FilterCheckboxAndSearch","Title","Tag","ButtonLink","Provider","GetTranslateFromContext","Chip","COLORS","FilterSwitch","style","propTypes","uncappedMap","_map","convert","cap","CLEAR_ALL_BUTTON_STYLE","fontWeight","padding","FilterSeparator","createElement","className","filterSeparator","buildFilters","filterOptions","type","options","buildAllSelectedFilterChips","selectedFilters","onRemoveSelectedFilter","selectedFiltersContainer","map","filterItem","label","handleClick","key","onClick","text","textColor","neutral_500","backgroundColor","cm_grey_150","customIcon","customStyle","height","MultiFilterPanel","props","context","title","onClearAll","translate","allSelectedFilters","_pipe","_flatMap","_filter","selected","value","hasSelectedFilters","_size","filters","i","isLastItem","Fragment","header","titleContainer","titleSize","_toString","size","buttonContainer","hoverColor","primary_600","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"sourcesContent":["import React from 'react';\nimport {map, size, pipe, filter, flatMap, toString} from 'lodash/fp';\nimport FilterChip from '../../organism/filter-chip';\nimport FilterCheckboxAndSearch from '../../organism/filter-checkbox-and-search';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport Chip from '../../atom/chip';\nimport {COLORS} from '../../variables/colors';\nimport FilterSwitch from '../../organism/filter-switch';\nimport {FilterCheckboxAndSearchOptions} from '../../organism/filter-checkbox-and-search/props-types';\nimport {FilterChipOptionsProps} from '../../organism/filter-chip/prop-types';\nimport {FilterSwitchOptionsProps} from '../../organism/filter-switch/prop-types';\nimport style from './style.css';\nimport propTypes, {MultiFilterPanelProps, FilterOptionsProps} from './prop-types';\n\ntype SelectedFilter =\n | FilterChipOptionsProps\n | FilterSwitchOptionsProps\n | FilterCheckboxAndSearchOptions;\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst CLEAR_ALL_BUTTON_STYLE = {fontWeight: 'normal', padding: 0};\nconst FilterSeparator = <div className={style.filterSeparator} />;\n\nconst buildFilters = (filterOptions: FilterOptionsProps) => {\n const {type, options} = filterOptions;\n switch (type) {\n case 'chip':\n return <FilterChip {...options} />;\n case 'checkbox':\n return <FilterCheckboxAndSearch {...options} />;\n case 'switch':\n return <FilterSwitch {...options} />;\n default:\n return null;\n }\n};\n\nconst buildAllSelectedFilterChips = (\n selectedFilters: SelectedFilter[],\n onRemoveSelectedFilter: (label: string) => void\n) => {\n return (\n <div className={style.selectedFiltersContainer} data-testid=\"selected-filters-container\">\n {selectedFilters.map((filterItem: SelectedFilter) => {\n const {label} = filterItem;\n\n function handleClick() {\n return onRemoveSelectedFilter(label);\n }\n\n return (\n <Chip\n key={label}\n onClick={handleClick}\n text={label}\n textColor={COLORS.neutral_500}\n backgroundColor={COLORS.cm_grey_150}\n customIcon={'xmark'}\n customStyle={{height: '28px', padding: '4px 8px'}}\n />\n );\n })}\n </div>\n );\n};\n\nconst MultiFilterPanel = (props: MultiFilterPanelProps, context: WebContextValues) => {\n const {title, onClearAll, options, onRemoveSelectedFilter = false} = props;\n const translate = GetTranslateFromContext(context);\n const allSelectedFilters: SelectedFilter[] = pipe(\n map('options'),\n flatMap('options'),\n filter(filterOptions => filterOptions.selected || filterOptions.value === true)\n )(options);\n const hasSelectedFilters = size(allSelectedFilters) > 0;\n const filters = uncappedMap((filterOptions: FilterOptionsProps, i: number) => {\n const isLastItem = i + 1 === size(options);\n\n return (\n <div key={i}>\n {buildFilters(filterOptions)}\n {isLastItem ? null : FilterSeparator}\n </div>\n );\n }, options);\n return (\n <>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} type=\"form-group\" titleSize=\"standard-light-weight\" />\n {hasSelectedFilters ? (\n <Tag label={toString(size(allSelectedFilters))} type=\"info\" size=\"S\" />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={CLEAR_ALL_BUTTON_STYLE}\n label={translate('clear_all')}\n type=\"text\"\n data-name=\"filters-all-clear-button\"\n aria-label=\"filters all clear button\"\n onClick={onClearAll}\n hoverColor={COLORS.primary_600}\n />\n </div>\n ) : null}\n </div>\n {onRemoveSelectedFilter && hasSelectedFilters ? (\n <>\n <div>{buildAllSelectedFilterChips(allSelectedFilters, onRemoveSelectedFilter)}</div>\n {FilterSeparator}\n </>\n ) : null}\n {filters}\n </>\n );\n};\n\nMultiFilterPanel.propTypes = propTypes;\n\nMultiFilterPanel.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default MultiFilterPanel;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,UAAU,MAAM,4BAA4B;AACnD,OAAOC,uBAAuB,MAAM,2CAA2C;AAC/E,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBAAqB;AACrE,OAAOC,IAAI,MAAM,iBAAiB;AAClC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,YAAY,MAAM,8BAA8B;AAIvD,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAmD,cAAc;AAOjF;AACA,MAAMC,WAAW,GAAGC,IAAA,CAAIC,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,sBAAsB,GAAG;EAACC,UAAU,EAAE,QAAQ;EAAEC,OAAO,EAAE;AAAC,CAAC;AACjE,MAAMC,eAAe,gBAAGpB,KAAA,CAAAqB,aAAA;EAAKC,SAAS,EAAEX,KAAK,CAACY;AAAgB,CAAE,CAAC;AAEjE,MAAMC,YAAY,GAAIC,aAAiC,IAAK;EAC1D,MAAM;IAACC,IAAI;IAAEC;EAAO,CAA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AAS,EAAEX,KAAK,CAAC0D;EAAgB,gBACpCrE,KAAA,CAAAqB,aAAA,CAAChB,UAAU;IACTuC,WAAW,EAAE3B,sBAAuB;IACpCiB,KAAK,EAAEiB,SAAS,CAAC,WAAW,CAAE;IAC9BzB,IAAI,EAAC,MAAM;IACX,aAAU,0BAA0B;IACpC,cAAW,0BAA0B;IACrCW,OAAO,EAAEa,UAAW;IACpBoB,UAAU,EAAE7D,MAAM,CAAC8D;EAAY,CAChC,CACE,CAAC,GACJ,IACD,CAAC,EACLzC,sBAAsB,IAAI4B,kBAAkB,gBAC3C1D,KAAA,CAAAqB,aAAA,CAAArB,KAAA,CAAA+D,QAAA,qBACE/D,KAAA,CAAAqB,aAAA,cAAMO,2BAA2B,CAACwB,kBAAkB,EAAEtB,sBAAsB,CAAO,CAAC,EACnFV,eACD,CAAC,GACD,IAAI,EACPwC,OACD,CAAC;AAEP,CAAC;AAEDd,gBAAgB,CAAClC,SAAS,GAAA4D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG9D,SAAS;AAEtCkC,gBAAgB,CAAC6B,YAAY,GAAG;EAC9BxB,SAAS,EAAE7C,QAAQ,CAACsE,iBAAiB,CAACzB;AACxC,CAAC;AAED,eAAeL,gBAAgB","ignoreList":[]}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { FilterChipProps } from '../../organism/filter-chip/prop-types';
|
|
3
3
|
import { FilterCheckboxAndSearchProps } from '../../organism/filter-checkbox-and-search/props-types';
|
|
4
|
+
import { FilterSwitchProps } from '../../organism/filter-switch/prop-types';
|
|
4
5
|
declare const propTypes: {
|
|
5
6
|
title: PropTypes.Requireable<string>;
|
|
6
7
|
onClearAll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
+
onRemoveSelectedFilter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
7
9
|
options: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
8
10
|
type: PropTypes.Requireable<string>;
|
|
9
11
|
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
12
|
title: PropTypes.Requireable<string>;
|
|
13
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
11
14
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
15
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
13
16
|
label: PropTypes.Requireable<string>;
|
|
14
17
|
type: PropTypes.Requireable<string>;
|
|
18
|
+
textColor: PropTypes.Requireable<string>;
|
|
15
19
|
selected: PropTypes.Requireable<boolean>;
|
|
16
20
|
icon: PropTypes.Requireable<string>;
|
|
21
|
+
customIcon: PropTypes.Requireable<string>;
|
|
17
22
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
23
|
}> | null | undefined)[]>;
|
|
19
24
|
}>>;
|
|
@@ -21,6 +26,7 @@ declare const propTypes: {
|
|
|
21
26
|
type: PropTypes.Requireable<string>;
|
|
22
27
|
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
28
|
title: PropTypes.Requireable<string>;
|
|
29
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
24
30
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
31
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
26
32
|
label: PropTypes.Requireable<string>;
|
|
@@ -44,6 +50,20 @@ declare const propTypes: {
|
|
|
44
50
|
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
45
51
|
}>>;
|
|
46
52
|
}>>;
|
|
53
|
+
}> | PropTypes.InferProps<{
|
|
54
|
+
type: PropTypes.Requireable<string>;
|
|
55
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
56
|
+
title: PropTypes.Validator<string>;
|
|
57
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
58
|
+
onClear: PropTypes.Validator<(...args: any[]) => any>;
|
|
59
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
60
|
+
label: PropTypes.Validator<string>;
|
|
61
|
+
value: PropTypes.Validator<boolean>;
|
|
62
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
63
|
+
theme: PropTypes.Validator<string>;
|
|
64
|
+
ariaLabel: PropTypes.Validator<string>;
|
|
65
|
+
}> | null | undefined)[]>;
|
|
66
|
+
}>>;
|
|
47
67
|
}> | null | undefined> | null | undefined)[]>;
|
|
48
68
|
};
|
|
49
69
|
export declare type OptionsChipProps = {
|
|
@@ -54,9 +74,14 @@ export declare type OptionsCheckboxProps = {
|
|
|
54
74
|
type: 'checkbox';
|
|
55
75
|
options: FilterCheckboxAndSearchProps;
|
|
56
76
|
};
|
|
57
|
-
export declare type
|
|
77
|
+
export declare type OptionsSwitchProps = {
|
|
78
|
+
type: 'switch';
|
|
79
|
+
options: FilterSwitchProps;
|
|
80
|
+
};
|
|
81
|
+
export declare type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps | OptionsSwitchProps;
|
|
58
82
|
export declare type MultiFilterPanelProps = {
|
|
59
83
|
title: string;
|
|
84
|
+
onRemoveSelectedFilter?: (label: string) => void;
|
|
60
85
|
onClearAll: () => void;
|
|
61
86
|
options: FilterOptionsProps[];
|
|
62
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAC/D,OAA8B,EAAC,iBAAiB,EAAC,MAAM,yCAAyC,CAAC;AAEjG,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBd,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,4BAA4B,CAAC;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAE9F,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import filterChipProptypes from '../../organism/filter-chip/prop-types';
|
|
3
3
|
import filterCheckboxAndSearchProptypes from '../../organism/filter-checkbox-and-search/props-types';
|
|
4
|
+
import filterSwitchProptypes from '../../organism/filter-switch/prop-types';
|
|
4
5
|
const propTypes = {
|
|
5
6
|
title: PropTypes.string,
|
|
6
7
|
onClearAll: PropTypes.func,
|
|
8
|
+
onRemoveSelectedFilter: PropTypes.func,
|
|
7
9
|
options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
8
10
|
type: PropTypes.oneOf(['chip']),
|
|
9
11
|
options: PropTypes.shape(filterChipProptypes)
|
|
10
12
|
}), PropTypes.shape({
|
|
11
13
|
type: PropTypes.oneOf(['checkbox']),
|
|
12
14
|
options: PropTypes.shape(filterCheckboxAndSearchProptypes)
|
|
15
|
+
}), PropTypes.shape({
|
|
16
|
+
type: PropTypes.oneOf(['switch']),
|
|
17
|
+
options: PropTypes.shape(filterSwitchProptypes)
|
|
13
18
|
})]))
|
|
14
19
|
};
|
|
15
20
|
export default propTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["PropTypes","filterChipProptypes","filterCheckboxAndSearchProptypes","propTypes","title","string","onClearAll","func","options","arrayOf","oneOfType","shape","type","oneOf"],"sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport filterChipProptypes, {FilterChipProps} from '../../organism/filter-chip/prop-types';\nimport filterCheckboxAndSearchProptypes, {\n FilterCheckboxAndSearchProps\n} from '../../organism/filter-checkbox-and-search/props-types';\n\nconst propTypes = {\n title: PropTypes.string,\n onClearAll: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.oneOf(['chip']),\n options: PropTypes.shape(filterChipProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['checkbox']),\n options: PropTypes.shape(filterCheckboxAndSearchProptypes)\n })\n ])\n )\n};\n\nexport type OptionsChipProps = {\n type: 'chip';\n options: FilterChipProps;\n};\n\nexport type OptionsCheckboxProps = {\n type: 'checkbox';\n options: FilterCheckboxAndSearchProps;\n};\n\nexport type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps;\n\nexport type MultiFilterPanelProps = {\n title: string;\n onClearAll: () => void;\n options: FilterOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,mBAAmB,MAAyB,uCAAuC;AAC1F,OAAOC,gCAAgC,MAEhC,uDAAuD;
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","filterChipProptypes","filterCheckboxAndSearchProptypes","filterSwitchProptypes","propTypes","title","string","onClearAll","func","onRemoveSelectedFilter","options","arrayOf","oneOfType","shape","type","oneOf"],"sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport filterChipProptypes, {FilterChipProps} from '../../organism/filter-chip/prop-types';\nimport filterCheckboxAndSearchProptypes, {\n FilterCheckboxAndSearchProps\n} from '../../organism/filter-checkbox-and-search/props-types';\nimport filterSwitchProptypes, {FilterSwitchProps} from '../../organism/filter-switch/prop-types';\n\nconst propTypes = {\n title: PropTypes.string,\n onClearAll: PropTypes.func,\n onRemoveSelectedFilter: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.oneOf(['chip']),\n options: PropTypes.shape(filterChipProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['checkbox']),\n options: PropTypes.shape(filterCheckboxAndSearchProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['switch']),\n options: PropTypes.shape(filterSwitchProptypes)\n })\n ])\n )\n};\n\nexport type OptionsChipProps = {\n type: 'chip';\n options: FilterChipProps;\n};\n\nexport type OptionsCheckboxProps = {\n type: 'checkbox';\n options: FilterCheckboxAndSearchProps;\n};\n\nexport type OptionsSwitchProps = {\n type: 'switch';\n options: FilterSwitchProps;\n};\n\nexport type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps | OptionsSwitchProps;\n\nexport type MultiFilterPanelProps = {\n title: string;\n onRemoveSelectedFilter?: (label: string) => void;\n onClearAll: () => void;\n options: FilterOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,mBAAmB,MAAyB,uCAAuC;AAC1F,OAAOC,gCAAgC,MAEhC,uDAAuD;AAC9D,OAAOC,qBAAqB,MAA2B,yCAAyC;AAEhG,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEL,SAAS,CAACM,MAAM;EACvBC,UAAU,EAAEP,SAAS,CAACQ,IAAI;EAC1BC,sBAAsB,EAAET,SAAS,CAACQ,IAAI;EACtCE,OAAO,EAAEV,SAAS,CAACW,OAAO,CACxBX,SAAS,CAACY,SAAS,CAAC,CAClBZ,SAAS,CAACa,KAAK,CAAC;IACdC,IAAI,EAAEd,SAAS,CAACe,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/BL,OAAO,EAAEV,SAAS,CAACa,KAAK,CAACZ,mBAAmB;EAC9C,CAAC,CAAC,EACFD,SAAS,CAACa,KAAK,CAAC;IACdC,IAAI,EAAEd,SAAS,CAACe,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;IACnCL,OAAO,EAAEV,SAAS,CAACa,KAAK,CAACX,gCAAgC;EAC3D,CAAC,CAAC,EACFF,SAAS,CAACa,KAAK,CAAC;IACdC,IAAI,EAAEd,SAAS,CAACe,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjCL,OAAO,EAAEV,SAAS,CAACa,KAAK,CAACV,qBAAqB;EAChD,CAAC,CAAC,CACH,CACH;AACF,CAAC;AA0BD,eAAeC,SAAS","ignoreList":[]}
|
|
@@ -33,7 +33,7 @@ declare const QuickFilters: {
|
|
|
33
33
|
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
34
34
|
'data-name': import("prop-types").Requireable<string>;
|
|
35
35
|
'data-testid': import("prop-types").Requireable<string>;
|
|
36
|
-
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
36
|
+
icon: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
37
37
|
position: import("prop-types").Requireable<string>;
|
|
38
38
|
type: import("prop-types").Requireable<string>;
|
|
39
39
|
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
@@ -41,11 +41,19 @@ declare const QuickFilters: {
|
|
|
41
41
|
color: import("prop-types").Requireable<string>;
|
|
42
42
|
backgroundColor: import("prop-types").Requireable<string>;
|
|
43
43
|
size: import("prop-types").Requireable<number>;
|
|
44
|
-
customStyle: import("prop-types").Requireable<
|
|
45
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
46
|
-
}>;
|
|
44
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
47
45
|
}>>;
|
|
48
|
-
}
|
|
46
|
+
}> | (import("prop-types").InferProps<{
|
|
47
|
+
position: import("prop-types").Requireable<string>;
|
|
48
|
+
type: import("prop-types").Requireable<string>;
|
|
49
|
+
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
50
|
+
name: import("prop-types").Validator<string>;
|
|
51
|
+
color: import("prop-types").Requireable<string>;
|
|
52
|
+
backgroundColor: import("prop-types").Requireable<string>;
|
|
53
|
+
size: import("prop-types").Requireable<number>;
|
|
54
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
55
|
+
}>>;
|
|
56
|
+
}> | null | undefined)[] | null | undefined>>;
|
|
49
57
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
50
58
|
link: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
51
59
|
href: import("prop-types").Requireable<string>;
|
|
@@ -56,9 +64,8 @@ declare const QuickFilters: {
|
|
|
56
64
|
hoverColor: import("prop-types").Requireable<string>;
|
|
57
65
|
disabled: import("prop-types").Requireable<boolean>;
|
|
58
66
|
className: import("prop-types").Requireable<string>;
|
|
59
|
-
customStyle: import("prop-types").Requireable<
|
|
60
|
-
|
|
61
|
-
}>;
|
|
67
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
68
|
+
contentCustomStyle: import("prop-types").Requireable<object>;
|
|
62
69
|
useTitle: import("prop-types").Requireable<boolean>;
|
|
63
70
|
customLabelClassName: import("prop-types").Requireable<string>;
|
|
64
71
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EAAC,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAIrD,eAAO,MAAM,YAAY,cAAe,MAAM,WAAW,MAAM,SAAS,CAAC,cAAc,CAAC,SAOvF,CAAC;AA0BF,QAAA,MAAM,YAAY;2HAOf,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EAAC,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAIrD,eAAO,MAAM,YAAY,cAAe,MAAM,WAAW,MAAM,SAAS,CAAC,cAAc,CAAC,SAOvF,CAAC;AA0BF,QAAA,MAAM,YAAY;2HAOf,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GnB,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -57,7 +57,7 @@ export declare const propTypes: {
|
|
|
57
57
|
tooltipPlacement: PropTypes.Requireable<string>;
|
|
58
58
|
'data-name': PropTypes.Requireable<string>;
|
|
59
59
|
'data-testid': PropTypes.Requireable<string>;
|
|
60
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
60
|
+
icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
61
61
|
position: PropTypes.Requireable<string>;
|
|
62
62
|
type: PropTypes.Requireable<string>;
|
|
63
63
|
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -65,11 +65,19 @@ export declare const propTypes: {
|
|
|
65
65
|
color: PropTypes.Requireable<string>;
|
|
66
66
|
backgroundColor: PropTypes.Requireable<string>;
|
|
67
67
|
size: PropTypes.Requireable<number>;
|
|
68
|
-
customStyle: PropTypes.Requireable<
|
|
69
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
70
|
-
}>;
|
|
68
|
+
customStyle: PropTypes.Requireable<object>;
|
|
71
69
|
}>>;
|
|
72
|
-
}
|
|
70
|
+
}> | (PropTypes.InferProps<{
|
|
71
|
+
position: PropTypes.Requireable<string>;
|
|
72
|
+
type: PropTypes.Requireable<string>;
|
|
73
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
74
|
+
name: PropTypes.Validator<string>;
|
|
75
|
+
color: PropTypes.Requireable<string>;
|
|
76
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
77
|
+
size: PropTypes.Requireable<number>;
|
|
78
|
+
customStyle: PropTypes.Requireable<object>;
|
|
79
|
+
}>>;
|
|
80
|
+
}> | null | undefined)[] | null | undefined>>;
|
|
73
81
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
74
82
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
75
83
|
href: PropTypes.Requireable<string>;
|
|
@@ -80,9 +88,8 @@ export declare const propTypes: {
|
|
|
80
88
|
hoverColor: PropTypes.Requireable<string>;
|
|
81
89
|
disabled: PropTypes.Requireable<boolean>;
|
|
82
90
|
className: PropTypes.Requireable<string>;
|
|
83
|
-
customStyle: PropTypes.Requireable<
|
|
84
|
-
|
|
85
|
-
}>;
|
|
91
|
+
customStyle: PropTypes.Requireable<object>;
|
|
92
|
+
contentCustomStyle: PropTypes.Requireable<object>;
|
|
86
93
|
useTitle: PropTypes.Requireable<boolean>;
|
|
87
94
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
88
95
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-filters/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAG7D,oBAAY,iBAAiB,GAAG;IA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