@hitachivantara/uikit-react-lab 3.47.2 → 3.48.1
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/dist/Controls/Controls.d.ts +57 -0
- package/dist/Controls/Controls.js +197 -0
- package/dist/Controls/Controls.js.map +1 -0
- package/dist/Controls/LeftControl/LeftControl.d.ts +32 -0
- package/dist/Controls/LeftControl/LeftControl.js +130 -0
- package/dist/Controls/LeftControl/LeftControl.js.map +1 -0
- package/dist/Controls/LeftControl/index.d.ts +2 -0
- package/dist/Controls/LeftControl/index.js +16 -0
- package/dist/Controls/LeftControl/index.js.map +1 -0
- package/dist/Controls/LeftControl/styles.js +19 -0
- package/dist/Controls/LeftControl/styles.js.map +1 -0
- package/dist/Controls/RightControl/RightControl.d.ts +43 -0
- package/dist/Controls/RightControl/RightControl.js +167 -0
- package/dist/Controls/RightControl/RightControl.js.map +1 -0
- package/dist/Controls/RightControl/index.d.ts +2 -0
- package/dist/Controls/RightControl/index.js +16 -0
- package/dist/Controls/RightControl/index.js.map +1 -0
- package/dist/Controls/RightControl/styles.js +22 -0
- package/dist/Controls/RightControl/styles.js.map +1 -0
- package/dist/Controls/context/ControlsContext.js +21 -0
- package/dist/Controls/context/ControlsContext.js.map +1 -0
- package/dist/Controls/index.d.ts +3 -0
- package/dist/Controls/index.js +32 -0
- package/dist/Controls/index.js.map +1 -0
- package/dist/Controls/styles.js +30 -0
- package/dist/Controls/styles.js.map +1 -0
- package/dist/Table/TableBody/TableBody.js +1 -3
- package/dist/Table/TableBody/TableBody.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/legacy/Controls/Controls.d.ts +57 -0
- package/dist/legacy/Controls/Controls.js +174 -0
- package/dist/legacy/Controls/Controls.js.map +1 -0
- package/dist/legacy/Controls/LeftControl/LeftControl.d.ts +32 -0
- package/dist/legacy/Controls/LeftControl/LeftControl.js +91 -0
- package/dist/legacy/Controls/LeftControl/LeftControl.js.map +1 -0
- package/dist/legacy/Controls/LeftControl/index.d.ts +2 -0
- package/dist/legacy/Controls/LeftControl/index.js +2 -0
- package/dist/legacy/Controls/LeftControl/index.js.map +1 -0
- package/dist/legacy/Controls/LeftControl/styles.js +11 -0
- package/dist/legacy/Controls/LeftControl/styles.js.map +1 -0
- package/dist/legacy/Controls/RightControl/RightControl.d.ts +43 -0
- package/dist/legacy/Controls/RightControl/RightControl.js +125 -0
- package/dist/legacy/Controls/RightControl/RightControl.js.map +1 -0
- package/dist/legacy/Controls/RightControl/index.d.ts +2 -0
- package/dist/legacy/Controls/RightControl/index.js +2 -0
- package/dist/legacy/Controls/RightControl/index.js.map +1 -0
- package/dist/legacy/Controls/RightControl/styles.js +14 -0
- package/dist/legacy/Controls/RightControl/styles.js.map +1 -0
- package/dist/legacy/Controls/context/ControlsContext.js +6 -0
- package/dist/legacy/Controls/context/ControlsContext.js.map +1 -0
- package/dist/legacy/Controls/index.d.ts +3 -0
- package/dist/legacy/Controls/index.js +4 -0
- package/dist/legacy/Controls/index.js.map +1 -0
- package/dist/legacy/Controls/styles.js +22 -0
- package/dist/legacy/Controls/styles.js.map +1 -0
- package/dist/legacy/Table/TableBody/TableBody.js +2 -3
- package/dist/legacy/Table/TableBody/TableBody.js.map +1 -1
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +2 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Controls/Controls.d.ts +57 -0
- package/dist/modern/Controls/Controls.js +164 -0
- package/dist/modern/Controls/Controls.js.map +1 -0
- package/dist/modern/Controls/LeftControl/LeftControl.d.ts +32 -0
- package/dist/modern/Controls/LeftControl/LeftControl.js +90 -0
- package/dist/modern/Controls/LeftControl/LeftControl.js.map +1 -0
- package/dist/modern/Controls/LeftControl/index.d.ts +2 -0
- package/dist/modern/Controls/LeftControl/index.js +2 -0
- package/dist/modern/Controls/LeftControl/index.js.map +1 -0
- package/dist/modern/Controls/LeftControl/styles.js +9 -0
- package/dist/modern/Controls/LeftControl/styles.js.map +1 -0
- package/dist/modern/Controls/RightControl/RightControl.d.ts +43 -0
- package/dist/modern/Controls/RightControl/RightControl.js +109 -0
- package/dist/modern/Controls/RightControl/RightControl.js.map +1 -0
- package/dist/modern/Controls/RightControl/index.d.ts +2 -0
- package/dist/modern/Controls/RightControl/index.js +2 -0
- package/dist/modern/Controls/RightControl/index.js.map +1 -0
- package/dist/modern/Controls/RightControl/styles.js +12 -0
- package/dist/modern/Controls/RightControl/styles.js.map +1 -0
- package/dist/modern/Controls/context/ControlsContext.js +6 -0
- package/dist/modern/Controls/context/ControlsContext.js.map +1 -0
- package/dist/modern/Controls/index.d.ts +3 -0
- package/dist/modern/Controls/index.js +4 -0
- package/dist/modern/Controls/index.js.map +1 -0
- package/dist/modern/Controls/styles.js +20 -0
- package/dist/modern/Controls/styles.js.map +1 -0
- package/dist/modern/Table/TableBody/TableBody.js +2 -3
- package/dist/modern/Table/TableBody/TableBody.js.map +1 -1
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +2 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.js","names":["React","forwardRef","useContext","useRef","PropTypes","clsx","withStyles","
|
|
1
|
+
{"version":3,"file":"TableBody.js","names":["React","forwardRef","useContext","useRef","PropTypes","clsx","withStyles","HvFocus","useForkRef","TableContext","TableSectionContext","styles","tableSectionContext","type","filterClassName","defaultComponent","HvTableBody","props","externalRef","classes","className","component","children","withNavigation","others","tableContext","bodyRef","handleRef","Component","components","TBody","root","map","element","key","selected","propTypes","string","node","elementType","bool","shape","isRequired","name"],"sources":["../../../../src/Table/TableBody/TableBody.js"],"sourcesContent":["import React, { forwardRef, useContext, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvFocus, useForkRef } from \"@hitachivantara/uikit-react-core\";\n\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport styles from \"./styles\";\n\nconst tableSectionContext = {\n type: \"body\",\n filterClassName: \"grid\",\n};\n\nconst defaultComponent = \"tbody\";\n\n/**\n * HvTableBody acts as a `tbody` element.\n * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles\n */\nconst HvTableBody = forwardRef(function HvTableBody(props, externalRef) {\n const { classes, className, component, children, withNavigation = false, ...others } = props;\n\n const tableContext = useContext(TableContext);\n\n const bodyRef = useRef(null);\n\n const handleRef = useForkRef(externalRef, bodyRef);\n\n const Component = component || tableContext?.components?.TBody || defaultComponent;\n\n return (\n <TableSectionContext.Provider value={tableSectionContext}>\n <Component\n className={clsx(classes.root, className)}\n ref={handleRef}\n role={Component === defaultComponent ? null : \"rowgroup\"}\n {...others}\n >\n {withNavigation\n ? children.map((element) => {\n return (\n <HvFocus\n rootRef={bodyRef}\n key={`row-${element.key}`}\n strategy=\"grid\"\n useArrows=\"true\"\n filterClass={tableSectionContext.filterClassName}\n navigationJump={1}\n focusDisabled={false}\n selected={element.props.selected}\n >\n {element}\n </HvFocus>\n );\n })\n : children}\n </Component>\n </TableSectionContext.Provider>\n );\n});\n\nHvTableBody.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tbody.\n */\n component: PropTypes.elementType,\n /**\n * Sets whether or not there should be arrow navigation between the table rows\n */\n withNavigation: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableBody\" })(HvTableBody);\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,EAAwCC,MAAxC,QAAsD,OAAtD;AACA,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,OAAO,CAACY,IAAT,EAAeX,SAAf,CADjB;IAEE,GAAG,EAAEO,SAFP;IAGE,IAAI,EAAEC,SAAS,KAAKb,gBAAd,GAAiC,IAAjC,GAAwC;EAHhD,GAIMS,MAJN,GAMGD,cAAc,GACXD,QAAQ,CAACU,GAAT,CAAa,UAACC,OAAD,EAAa;IACxB,oBACE,oBAAC,OAAD;MACE,OAAO,EAAEP,OADX;MAEE,GAAG,gBAASO,OAAO,CAACC,GAAjB,CAFL;MAGE,QAAQ,EAAC,MAHX;MAIE,SAAS,EAAC,MAJZ;MAKE,WAAW,EAAEtB,mBAAmB,CAACE,eALnC;MAME,cAAc,EAAE,CANlB;MAOE,aAAa,EAAE,KAPjB;MAQE,QAAQ,EAAEmB,OAAO,CAAChB,KAAR,CAAckB;IAR1B,GAUGF,OAVH,CADF;EAcD,CAfD,CADW,GAiBXX,QAvBN,CADF,CADF;AA6BD,CAxC6B,CAA9B;AA0CA,wCAAAN,WAAW,CAACoB,SAAZ,GAAwB;EACtB;AACF;AACA;EACEhB,SAAS,EAAEhB,SAAS,CAACiC,MAJC;;EAKtB;AACF;AACA;EACEf,QAAQ,EAAElB,SAAS,CAACkC,IARE;;EAStB;AACF;AACA;AACA;EACEjB,SAAS,EAAEjB,SAAS,CAACmC,WAbC;;EActB;AACF;AACA;EACEhB,cAAc,EAAEnB,SAAS,CAACoC,IAjBJ;;EAkBtB;AACF;AACA;EACErB,OAAO,EAAEf,SAAS,CAACqC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIV,IAAI,EAAE3B,SAAS,CAACiC;EAJO,CAAhB,EAKNK;AA1BmB,CAAxB;AA6BA,eAAepC,UAAU,CAACK,MAAD,EAAS;EAAEgC,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4C3B,WAA5C,CAAf"}
|
package/dist/legacy/index.d.ts
CHANGED
package/dist/legacy/index.js
CHANGED
|
@@ -14,6 +14,8 @@ export { default as HvTag } from "./Tag";
|
|
|
14
14
|
export { default as HvDrawer } from "./Drawer";
|
|
15
15
|
export { default as HvColorPicker } from "./ColorPicker";
|
|
16
16
|
export { default as HvQueryBuilder } from "./QueryBuilder";
|
|
17
|
+
export { default as HvControls } from "./Controls";
|
|
18
|
+
export * from "./Controls";
|
|
17
19
|
export * from "./QueryBuilder";
|
|
18
20
|
export { default as HvInlineEditor } from "./InlineEditor";
|
|
19
21
|
export { default as HvProgressBar } from "./ProgressBar";
|
package/dist/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvInlineEditor","HvProgressBar","HvDotPagination"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,cAAc,gBAAd;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvControls","HvInlineEditor","HvProgressBar","HvDotPagination"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvControls } from \"./Controls\";\nexport * from \"./Controls\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd;AACA,cAAc,gBAAd;AACA,SAASb,OAAO,IAAIc,cAApB,QAA0C,gBAA1C;AACA,SAASd,OAAO,IAAIe,aAApB,QAAyC,eAAzC;AACA,SAASf,OAAO,IAAIgB,eAApB,QAA2C,iBAA3C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { StandardProps } from "@material-ui/core";
|
|
2
|
+
|
|
3
|
+
export type HvControlsClassKey = "root" | "rightSection" | "leftSection";
|
|
4
|
+
|
|
5
|
+
export interface HvControlsSortValue {
|
|
6
|
+
id: string;
|
|
7
|
+
desc: string;
|
|
8
|
+
}
|
|
9
|
+
export interface HvControlsViewConfiguration extends Record<string, unknown> {
|
|
10
|
+
setSortBy?: (v: HvControlsSortValue[]) => void;
|
|
11
|
+
setGlobalFilter?: (v: string) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface HvControlsCallbacks extends Record<string, unknown> {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
icon: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface HvControlsProps
|
|
21
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvControlsClassKey> {
|
|
22
|
+
/** Children to be rendered. */
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Class names to be applied.
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* An instance of useHvTable or useTable used to manage the data
|
|
30
|
+
* if this is not provided data sorting and search must be handled externally
|
|
31
|
+
*/
|
|
32
|
+
callbacks?: HvControlsCallbacks;
|
|
33
|
+
/**
|
|
34
|
+
* Views configuration required for the view buttons
|
|
35
|
+
*/
|
|
36
|
+
views?: HvControlsViewConfiguration[];
|
|
37
|
+
/**
|
|
38
|
+
* What view is selected by default
|
|
39
|
+
*/
|
|
40
|
+
defaultView?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the selected view to be the one specified
|
|
43
|
+
* if specified the component is in a controlled state and it won't change it state
|
|
44
|
+
* unless specified externally
|
|
45
|
+
*/
|
|
46
|
+
selectedView?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Callback called when the view switcher button is pressed
|
|
49
|
+
*/
|
|
50
|
+
onViewChange?: (event: Event, id: string) => void;
|
|
51
|
+
/**
|
|
52
|
+
* if `true` the button to switch views is not rendered
|
|
53
|
+
*/
|
|
54
|
+
hideViewSwitcher?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default function HvControls(props: HvControlsProps): JSX.Element | null;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["id", "icon"];
|
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import PropTypes from "prop-types";
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
import { withStyles } from "@material-ui/core";
|
|
9
|
+
import { useControlled, HvMultiButton, HvButton, setId } from "@hitachivantara/uikit-react-core";
|
|
10
|
+
import { HvControlsContextProvider } from "./context/ControlsContext";
|
|
11
|
+
import styleCreator from "./styles";
|
|
12
|
+
/** Controls it's a group of features used to control data that can be rendered using different views (table, cards, list). */
|
|
13
|
+
|
|
14
|
+
const HvControls = ({
|
|
15
|
+
id,
|
|
16
|
+
views,
|
|
17
|
+
classes,
|
|
18
|
+
className,
|
|
19
|
+
callbacks,
|
|
20
|
+
selectedView,
|
|
21
|
+
defaultView,
|
|
22
|
+
children,
|
|
23
|
+
hideViewSwitcher = false,
|
|
24
|
+
onViewChange
|
|
25
|
+
}) => {
|
|
26
|
+
const [currentView, setCurrentView] = useControlled(selectedView, defaultView);
|
|
27
|
+
|
|
28
|
+
const onViewChangeHandler = (evt, btnId) => {
|
|
29
|
+
setCurrentView(btnId);
|
|
30
|
+
onViewChange === null || onViewChange === void 0 ? void 0 : onViewChange(evt, btnId);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const onSearchHandler = value => callbacks === null || callbacks === void 0 ? void 0 : callbacks.setGlobalFilter(value);
|
|
34
|
+
|
|
35
|
+
const onSortHandler = value => callbacks === null || callbacks === void 0 ? void 0 : callbacks.setSortBy([{
|
|
36
|
+
id: value === null || value === void 0 ? void 0 : value.accessor,
|
|
37
|
+
desc: value === null || value === void 0 ? void 0 : value.desc
|
|
38
|
+
}]);
|
|
39
|
+
|
|
40
|
+
const childrenIndexCut = (children === null || children === void 0 ? void 0 : children.length) > 0 ? Math.round(children.length * 0.5) : 0;
|
|
41
|
+
const leftChildren = children.slice(0, childrenIndexCut);
|
|
42
|
+
const rightChildren = children.slice(childrenIndexCut, (children === null || children === void 0 ? void 0 : children.length) || 0);
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
id: id,
|
|
45
|
+
className: clsx(className, classes.root)
|
|
46
|
+
}, /*#__PURE__*/React.createElement(HvControlsContextProvider, {
|
|
47
|
+
value: {
|
|
48
|
+
onSearch: onSearchHandler,
|
|
49
|
+
onSort: onSortHandler
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: clsx(classes.section, classes.leftSection)
|
|
53
|
+
}, leftChildren), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: clsx(classes.section, classes.rightSection)
|
|
55
|
+
}, rightChildren, !hideViewSwitcher && (views === null || views === void 0 ? void 0 : views.length) > 0 && /*#__PURE__*/React.createElement(HvMultiButton, {
|
|
56
|
+
id: setId(id, "view-multi-button")
|
|
57
|
+
}, views === null || views === void 0 ? void 0 : views.map(_ref => {
|
|
58
|
+
let {
|
|
59
|
+
id: btnId,
|
|
60
|
+
icon
|
|
61
|
+
} = _ref,
|
|
62
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
63
|
+
|
|
64
|
+
return /*#__PURE__*/React.createElement(HvButton, _extends({
|
|
65
|
+
id: btnId,
|
|
66
|
+
key: btnId,
|
|
67
|
+
icon: true,
|
|
68
|
+
selected: currentView === btnId,
|
|
69
|
+
onClick: evt => onViewChangeHandler(evt, btnId)
|
|
70
|
+
}, others), icon);
|
|
71
|
+
})))));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
process.env.NODE_ENV !== "production" ? HvControls.propTypes = {
|
|
75
|
+
/** Children to be rendered. */
|
|
76
|
+
id: PropTypes.string,
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Class names to be applied.
|
|
80
|
+
*/
|
|
81
|
+
className: PropTypes.string,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Children elements to be rendered
|
|
85
|
+
*/
|
|
86
|
+
children: PropTypes.node,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* An instance of useHvTable or useTable used to manage the data
|
|
90
|
+
* if this is not provided data sorting and search must be handled externally
|
|
91
|
+
*/
|
|
92
|
+
callbacks: PropTypes.shape({
|
|
93
|
+
/**
|
|
94
|
+
* Callback used by the .
|
|
95
|
+
*/
|
|
96
|
+
setSortBy: PropTypes.func,
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Callback used by the search input to filter data across all fields
|
|
100
|
+
*/
|
|
101
|
+
setGlobalFilter: PropTypes.func
|
|
102
|
+
}),
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Views configuration required for the view buttons
|
|
106
|
+
*/
|
|
107
|
+
views: PropTypes.arrayOf(PropTypes.shape({
|
|
108
|
+
label: PropTypes.string,
|
|
109
|
+
icon: PropTypes.node,
|
|
110
|
+
id: PropTypes.string
|
|
111
|
+
})),
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* the classes object to be applied into the root object.
|
|
115
|
+
*/
|
|
116
|
+
classes: PropTypes.shape({
|
|
117
|
+
/**
|
|
118
|
+
* Style applied to the root of the component.
|
|
119
|
+
*/
|
|
120
|
+
root: PropTypes.string,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Right box of the controls
|
|
124
|
+
*/
|
|
125
|
+
rightSection: PropTypes.string,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Left box of the controls
|
|
129
|
+
*/
|
|
130
|
+
leftSection: PropTypes.string,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* common styles for left and right controls
|
|
134
|
+
*/
|
|
135
|
+
section: PropTypes.string
|
|
136
|
+
}).isRequired,
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* What view is selected by default
|
|
140
|
+
*/
|
|
141
|
+
defaultView: PropTypes.string,
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Sets the selected view to be the one specified
|
|
145
|
+
* if specified the component is in a controlled state and it won't change it state
|
|
146
|
+
* unless specified externally
|
|
147
|
+
*/
|
|
148
|
+
selectedView: PropTypes.string,
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Callback called when the view switcher button is pressed
|
|
152
|
+
*/
|
|
153
|
+
onViewChange: PropTypes.func,
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* if `true` the button to switch views is not rendered
|
|
157
|
+
*/
|
|
158
|
+
hideViewSwitcher: PropTypes.bool
|
|
159
|
+
} : void 0;
|
|
160
|
+
export default withStyles(styleCreator, {
|
|
161
|
+
name: "HvControls",
|
|
162
|
+
withTheme: true
|
|
163
|
+
})(HvControls);
|
|
164
|
+
//# sourceMappingURL=Controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Controls.js","names":["React","PropTypes","clsx","withStyles","useControlled","HvMultiButton","HvButton","setId","HvControlsContextProvider","styleCreator","HvControls","id","views","classes","className","callbacks","selectedView","defaultView","children","hideViewSwitcher","onViewChange","currentView","setCurrentView","onViewChangeHandler","evt","btnId","onSearchHandler","value","setGlobalFilter","onSortHandler","setSortBy","accessor","desc","childrenIndexCut","length","Math","round","leftChildren","slice","rightChildren","root","onSearch","onSort","section","leftSection","rightSection","map","icon","others","propTypes","string","node","shape","func","arrayOf","label","isRequired","bool","name","withTheme"],"sources":["../../../src/Controls/Controls.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { useControlled, HvMultiButton, HvButton, setId } from \"@hitachivantara/uikit-react-core\";\nimport { HvControlsContextProvider } from \"./context/ControlsContext\";\nimport styleCreator from \"./styles\";\n\n/** Controls it's a group of features used to control data that can be rendered using different views (table, cards, list). */\nconst HvControls = ({\n id,\n views,\n classes,\n className,\n callbacks,\n selectedView,\n defaultView,\n children,\n hideViewSwitcher = false,\n onViewChange,\n}) => {\n const [currentView, setCurrentView] = useControlled(selectedView, defaultView);\n\n const onViewChangeHandler = (evt, btnId) => {\n setCurrentView(btnId);\n onViewChange?.(evt, btnId);\n };\n\n const onSearchHandler = (value) => callbacks?.setGlobalFilter(value);\n const onSortHandler = (value) =>\n callbacks?.setSortBy([\n {\n id: value?.accessor,\n desc: value?.desc,\n },\n ]);\n const childrenIndexCut = children?.length > 0 ? Math.round(children.length * 0.5) : 0;\n const leftChildren = children.slice(0, childrenIndexCut);\n const rightChildren = children.slice(childrenIndexCut, children?.length || 0);\n return (\n <div id={id} className={clsx(className, classes.root)}>\n <HvControlsContextProvider\n value={{\n onSearch: onSearchHandler,\n onSort: onSortHandler,\n }}\n >\n <div className={clsx(classes.section, classes.leftSection)}>{leftChildren}</div>\n <div className={clsx(classes.section, classes.rightSection)}>\n {rightChildren}\n {!hideViewSwitcher && views?.length > 0 && (\n <HvMultiButton id={setId(id, \"view-multi-button\")}>\n {views?.map(({ id: btnId, icon, ...others }) => (\n <HvButton\n id={btnId}\n key={btnId}\n icon\n selected={currentView === btnId}\n onClick={(evt) => onViewChangeHandler(evt, btnId)}\n {...others}\n >\n {icon}\n </HvButton>\n ))}\n </HvMultiButton>\n )}\n </div>\n </HvControlsContextProvider>\n </div>\n );\n};\n\nHvControls.propTypes = {\n /** Children to be rendered. */\n id: PropTypes.string,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Children elements to be rendered\n */\n children: PropTypes.node,\n /**\n * An instance of useHvTable or useTable used to manage the data\n * if this is not provided data sorting and search must be handled externally\n */\n callbacks: PropTypes.shape({\n /**\n * Callback used by the .\n */\n setSortBy: PropTypes.func,\n /**\n * Callback used by the search input to filter data across all fields\n */\n setGlobalFilter: PropTypes.func,\n }),\n /**\n * Views configuration required for the view buttons\n */\n views: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n icon: PropTypes.node,\n id: PropTypes.string,\n })\n ),\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Right box of the controls\n */\n rightSection: PropTypes.string,\n /**\n * Left box of the controls\n */\n leftSection: PropTypes.string,\n /**\n * common styles for left and right controls\n */\n section: PropTypes.string,\n }).isRequired,\n /**\n * What view is selected by default\n */\n defaultView: PropTypes.string,\n /**\n * Sets the selected view to be the one specified\n * if specified the component is in a controlled state and it won't change it state\n * unless specified externally\n */\n selectedView: PropTypes.string,\n /**\n * Callback called when the view switcher button is pressed\n */\n onViewChange: PropTypes.func,\n /**\n * if `true` the button to switch views is not rendered\n */\n hideViewSwitcher: PropTypes.bool,\n};\n\nexport default withStyles(styleCreator, { name: \"HvControls\", withTheme: true })(HvControls);\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,aAAT,EAAwBC,aAAxB,EAAuCC,QAAvC,EAAiDC,KAAjD,QAA8D,kCAA9D;AACA,SAASC,yBAAT,QAA0C,2BAA1C;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;;AACA,MAAMC,UAAU,GAAG,CAAC;EAClBC,EADkB;EAElBC,KAFkB;EAGlBC,OAHkB;EAIlBC,SAJkB;EAKlBC,SALkB;EAMlBC,YANkB;EAOlBC,WAPkB;EAQlBC,QARkB;EASlBC,gBAAgB,GAAG,KATD;EAUlBC;AAVkB,CAAD,KAWb;EACJ,MAAM,CAACC,WAAD,EAAcC,cAAd,IAAgClB,aAAa,CAACY,YAAD,EAAeC,WAAf,CAAnD;;EAEA,MAAMM,mBAAmB,GAAG,CAACC,GAAD,EAAMC,KAAN,KAAgB;IAC1CH,cAAc,CAACG,KAAD,CAAd;IACAL,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAGI,GAAH,EAAQC,KAAR,CAAZ;EACD,CAHD;;EAKA,MAAMC,eAAe,G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AmCrB;AACF;AACA;EACErC,OAAO,EAAEZ,SAAS,CAACmD,KAAV,CAAgB;IACvB;AACJ;AACA;IACIZ,IAAI,EAAEvC,SAAS,CAACiD,MAJO;;IAKvB;AACJ;AACA;IACIL,YAAY,EAAE5C,SAAS,CAACiD,MARD;;IASvB;AACJ;AACA;IACIN,WAAW,EAAE3C,SAAS,CAACiD,MAZA;;IAavB;AACJ;AACA;IACIP,OAAO,EAAE1C,SAAS,CAACiD;EAhBI,CAAhB,EAiBNM,UAvDkB;;EAwDrB;AACF;AACA;EACEvC,WAAW,EAAEhB,SAAS,CAACiD,MA3DF;;EA4DrB;AACF;AACA;AACA;AACA;EACElC,YAAY,EAAEf,SAAS,CAACiD,MAjEH;;EAkErB;AACF;AACA;EACE9B,YAAY,EAAEnB,SAAS,CAACoD,IArEH;;EAsErB;AACF;AACA;EACElC,gBAAgB,EAAElB,SAAS,CAACwD;AAzEP,CAAvB;AA4EA,eAAetD,UAAU,CAACM,YAAD,EAAe;EAAEiD,IAAI,EAAE,YAAR;EAAsBC,SAAS,EAAE;AAAjC,CAAf,CAAV,CAAkEjD,UAAlE,CAAf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StandardProps } from "@material-ui/core";
|
|
2
|
+
import { HvInputProps } from "@hitachivantara/uikit-react-core";
|
|
3
|
+
|
|
4
|
+
export type HvLeftControlClassKey = "root";
|
|
5
|
+
|
|
6
|
+
export interface HvLeftControlProps
|
|
7
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvLeftControlClassKey> {
|
|
8
|
+
/** Children to be rendered. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Class names to be applied.
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* if `true` the hide sort by dropdown is not rendered
|
|
16
|
+
*/
|
|
17
|
+
hideSearch?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* placeholder of the input
|
|
20
|
+
*/
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Callback called when a search action occurs
|
|
24
|
+
*/
|
|
25
|
+
onSearch?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Extra props passed to input
|
|
28
|
+
*/
|
|
29
|
+
searchProps?: HvInputProps;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default function HvLeftControl(props: HvLeftControlProps): JSX.Element | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["id", "classes", "className", "children", "placeholder", "onSearch", "hideSearch", "searchProps"];
|
|
4
|
+
import React, { useContext } from "react";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import PropTypes from "prop-types";
|
|
7
|
+
import { withStyles } from "@material-ui/core";
|
|
8
|
+
import { HvInput, setId } from "@hitachivantara/uikit-react-core";
|
|
9
|
+
import { HvControlsContext } from "../context/ControlsContext";
|
|
10
|
+
import styleCreator from "./styles";
|
|
11
|
+
|
|
12
|
+
const HvLeftControl = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
id,
|
|
15
|
+
classes,
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
placeholder = "Search",
|
|
19
|
+
onSearch,
|
|
20
|
+
hideSearch = false,
|
|
21
|
+
searchProps
|
|
22
|
+
} = _ref,
|
|
23
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
onSearch: onSearchHandler
|
|
27
|
+
} = useContext(HvControlsContext);
|
|
28
|
+
|
|
29
|
+
const onChangeFilter = (e, value) => {
|
|
30
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch(e, value);
|
|
31
|
+
onSearchHandler === null || onSearchHandler === void 0 ? void 0 : onSearchHandler(value);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
|
+
id: id,
|
|
36
|
+
className: clsx(className, classes.root)
|
|
37
|
+
}, others), !hideSearch && /*#__PURE__*/React.createElement(HvInput, _extends({
|
|
38
|
+
id: setId(id, "search-input"),
|
|
39
|
+
type: "search",
|
|
40
|
+
placeholder: placeholder,
|
|
41
|
+
onChange: (e, value) => onChangeFilter(e, value)
|
|
42
|
+
}, searchProps)), children);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
process.env.NODE_ENV !== "production" ? HvLeftControl.propTypes = {
|
|
46
|
+
/** Children to be rendered. */
|
|
47
|
+
id: PropTypes.string,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Class names to be applied.
|
|
51
|
+
*/
|
|
52
|
+
className: PropTypes.string,
|
|
53
|
+
|
|
54
|
+
/** Children to be rendered. */
|
|
55
|
+
children: PropTypes.node,
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* the classes object to be applied.
|
|
59
|
+
*/
|
|
60
|
+
classes: PropTypes.shape({
|
|
61
|
+
/**
|
|
62
|
+
* Style applied to the root of the component.
|
|
63
|
+
*/
|
|
64
|
+
root: PropTypes.string,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Style applied to the dropdown in charge of sorting.
|
|
68
|
+
*/
|
|
69
|
+
sortDropdown: PropTypes.string
|
|
70
|
+
}).isRequired,
|
|
71
|
+
|
|
72
|
+
/** Placeholder text to be show within the search input. */
|
|
73
|
+
placeholder: PropTypes.string,
|
|
74
|
+
|
|
75
|
+
/** Callback fired when the user starts to type in the search field. */
|
|
76
|
+
onSearch: PropTypes.func,
|
|
77
|
+
|
|
78
|
+
/** Boolean to control whether if the search input should appears or not. */
|
|
79
|
+
hideSearch: PropTypes.bool,
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Extra props to be passed onto the input
|
|
83
|
+
*/
|
|
84
|
+
searchProps: PropTypes.object
|
|
85
|
+
} : void 0;
|
|
86
|
+
export default withStyles(styleCreator, {
|
|
87
|
+
name: "HvLeftControl",
|
|
88
|
+
withTheme: true
|
|
89
|
+
})(HvLeftControl);
|
|
90
|
+
//# sourceMappingURL=LeftControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeftControl.js","names":["React","useContext","clsx","PropTypes","withStyles","HvInput","setId","HvControlsContext","styleCreator","HvLeftControl","id","classes","className","children","placeholder","onSearch","hideSearch","searchProps","others","onSearchHandler","onChangeFilter","e","value","root","propTypes","string","node","shape","sortDropdown","isRequired","func","bool","object","name","withTheme"],"sources":["../../../../src/Controls/LeftControl/LeftControl.js"],"sourcesContent":["import React, { useContext } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvInput, setId } from \"@hitachivantara/uikit-react-core\";\nimport { HvControlsContext } from \"../context/ControlsContext\";\nimport styleCreator from \"./styles\";\n\nconst HvLeftControl = ({\n id,\n classes,\n className,\n children,\n placeholder = \"Search\",\n onSearch,\n hideSearch = false,\n searchProps,\n ...others\n}) => {\n const { onSearch: onSearchHandler } = useContext(HvControlsContext);\n\n const onChangeFilter = (e, value) => {\n onSearch?.(e, value);\n onSearchHandler?.(value);\n };\n\n return (\n <div id={id} className={clsx(className, classes.root)} {...others}>\n {!hideSearch && (\n <HvInput\n id={setId(id, \"search-input\")}\n type=\"search\"\n placeholder={placeholder}\n onChange={(e, value) => onChangeFilter(e, value)}\n {...searchProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nHvLeftControl.propTypes = {\n /** Children to be rendered. */\n id: PropTypes.string,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /** Children to be rendered. */\n children: PropTypes.node,\n /**\n * the classes object to be applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dropdown in charge of sorting.\n */\n sortDropdown: PropTypes.string,\n }).isRequired,\n /** Placeholder text to be show within the search input. */\n placeholder: PropTypes.string,\n /** Callback fired when the user starts to type in the search field. */\n onSearch: PropTypes.func,\n /** Boolean to control whether if the search input should appears or not. */\n hideSearch: PropTypes.bool,\n /**\n * Extra props to be passed onto the input\n */\n searchProps: PropTypes.object,\n};\n\nexport default withStyles(styleCreator, { name: \"HvLeftControl\", withTheme: true })(HvLeftControl);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,OAAT,EAAkBC,KAAlB,QAA+B,kCAA/B;AACA,SAASC,iBAAT,QAAkC,4BAAlC;AACA,OAAOC,YAAP,MAAyB,UAAzB;;AAEA,MAAMC,aAAa,GAAG,QAUhB;EAAA,IAViB;IACrBC,EADqB;IAErBC,OAFqB;IAGrBC,SAHqB;IAIrBC,QAJqB;IAKrBC,WAAW,GAAG,QALO;IAMrBC,QANqB;IAOrBC,UAAU,GAAG,KAPQ;IAQrBC;EARqB,CAUjB;EAAA,IADDC,MACC;;EACJ,MAAM;IAAEH,QAAQ,EAAEI;EAAZ,IAAgClB,UAAU,CAACM,iBAAD,CAAhD;;EAEA,MAAMa,cAAc,GAAG,CAACC,CAAD,EAAIC,KAAJ,KAAc;IACnCP,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAGM,CAAH,EAAMC,KAAN,CAAR;IACAH,eAAe,SAAf,IAAAA,eAAe,WAAf,YAAAA,eAAe,CAAGG,KAAH,CAAf;EACD,CAHD;;EAKA,oBACE;IAAK,EAAE,EAAEZ,EAAT;IAAa,SAAS,EAAER,IAAI,CAACU,SAAD,EAAYD,OAAO,CAACY,IAApB;EAA5B,GAA2DL,MAA3D,GACG,CAACF,UAAD,iBACC,oBAAC,OAAD;IACE,EAAE,EAAEV,KAAK,CAACI,EAAD,EAAK,cAAL,CADX;IAEE,IAAI,EAAC,QAFP;IAGE,WAAW,EAAEI,WAHf;IAIE,QAAQ,EAAE,CAACO,CAAD,EAAIC,KAAJ,KAAcF,cAAc,CAACC,CAAD,EAAIC,KAAJ;EAJxC,GAKML,WALN,EAFJ,EAUGJ,QAVH,CADF;AAcD,CAhCD;;AAkCA,wCAAAJ,aAAa,CAACe,SAAd,GAA0B;EACxB;EACAd,EAAE,EAAEP,SAAS,CAACsB,MAFU;;EAGxB;AACF;AACA;EACEb,SAAS,EAAET,SAAS,CAACsB,MANG;;EAOxB;EACAZ,QAAQ,EAAEV,SAAS,CAACuB,IARI;;EASxB;AACF;AACA;EACEf,OAAO,EAAER,SAAS,CAACwB,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEpB,SAAS,CAACsB,MAJO;;IAKvB;AACJ;AACA;IACIG,YAAY,EAAEzB,SAAS,CAACsB;EARD,CAAhB,EASNI,UArBqB;;EAsBxB;EACAf,WAAW,EAAEX,SAAS,CAACsB,MAvBC;;EAwBxB;EACAV,QAAQ,EAAEZ,SAAS,CAAC2B,IAzBI;;EA0BxB;EACAd,UAAU,EAAEb,SAAS,CAAC4B,IA3BE;;EA4BxB;AACF;AACA;EACEd,WAAW,EAAEd,SAAS,CAAC6B;AA/BC,CAA1B;AAkCA,eAAe5B,UAAU,CAACI,YAAD,EAAe;EAAEyB,IAAI,EAAE,eAAR;EAAyBC,SAAS,EAAE;AAApC,CAAf,CAAV,CAAqEzB,aAArE,CAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Controls/LeftControl/index.js"],"sourcesContent":["export { default } from \"./LeftControl\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","root","display","gap"],"sources":["../../../../src/Controls/LeftControl/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n display: \"inline-flex\",\n gap: 10,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,OAAO,EAAE,aADL;IAEJC,GAAG,EAAE;EAFD;AADc,CAAP,CAAf;;AAOA,eAAeH,MAAf"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StandardProps } from "@material-ui/core";
|
|
2
|
+
import { HvDropdownProps, ListValueProp } from "@hitachivantara/uikit-react-core";
|
|
3
|
+
|
|
4
|
+
export type HvRightControlClassKey = "root" | "sortDropdown";
|
|
5
|
+
|
|
6
|
+
export interface HvControlsViewConfiguration extends Record<string, unknown> {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface RightListControls extends ListValueProp {
|
|
13
|
+
accesor: string;
|
|
14
|
+
desc: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface HvRightControlProps
|
|
18
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvRightControlClassKey> {
|
|
19
|
+
/** Children to be rendered. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Class names to be applied.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* if `true` the hide sort by dropdown is not rendered
|
|
27
|
+
*/
|
|
28
|
+
hideSortBy?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* options for the dropdown to sort
|
|
31
|
+
*/
|
|
32
|
+
values?: RightListControls[];
|
|
33
|
+
/**
|
|
34
|
+
* Callback called when a sort action occurs
|
|
35
|
+
*/
|
|
36
|
+
onSort?: (selected: RightListControls | ListValueProp | ListValueProp[] | undefined) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Extra props passed to dropdown
|
|
39
|
+
*/
|
|
40
|
+
sortProps?: HvDropdownProps;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default function HvRightControl(props: HvRightControlProps): JSX.Element | null;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
const _excluded = ["id", "classes", "className", "children", "values", "onSort", "hideSortBy", "sortProps"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
+
|
|
10
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
11
|
+
import React, { useContext, useState } from "react";
|
|
12
|
+
import PropTypes from "prop-types";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { withStyles } from "@material-ui/core";
|
|
15
|
+
import { HvDropdown, setId } from "@hitachivantara/uikit-react-core";
|
|
16
|
+
import styleCreator from "./styles";
|
|
17
|
+
import { HvControlsContext } from "../context/ControlsContext";
|
|
18
|
+
|
|
19
|
+
const HvRightControl = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
id,
|
|
22
|
+
classes,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
values,
|
|
26
|
+
onSort,
|
|
27
|
+
hideSortBy = false,
|
|
28
|
+
sortProps
|
|
29
|
+
} = _ref,
|
|
30
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
|
|
32
|
+
const [dropDownValues, setDropdownValues] = useState(values);
|
|
33
|
+
const {
|
|
34
|
+
onSort: onSortHandler
|
|
35
|
+
} = useContext(HvControlsContext);
|
|
36
|
+
|
|
37
|
+
const handleChangeSort = value => {
|
|
38
|
+
onSort === null || onSort === void 0 ? void 0 : onSort(value);
|
|
39
|
+
onSortHandler === null || onSortHandler === void 0 ? void 0 : onSortHandler(value); // this should be changed when dropdown changes his "values" behavior
|
|
40
|
+
|
|
41
|
+
setDropdownValues(prevValues => prevValues.map(prevValue => _objectSpread(_objectSpread({}, prevValue), {}, {
|
|
42
|
+
selected: prevValue.id === value.id
|
|
43
|
+
})));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
47
|
+
id: id,
|
|
48
|
+
className: clsx(className, classes.root)
|
|
49
|
+
}, others), !hideSortBy && /*#__PURE__*/React.createElement(HvDropdown, _extends({
|
|
50
|
+
id: setId(id, "sort-by-dropdown"),
|
|
51
|
+
values: dropDownValues,
|
|
52
|
+
className: classes.sortDropdown,
|
|
53
|
+
onChange: handleChangeSort,
|
|
54
|
+
singleSelectionToggle: false
|
|
55
|
+
}, sortProps)), children);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
process.env.NODE_ENV !== "production" ? HvRightControl.propTypes = {
|
|
59
|
+
/** Children to be rendered. */
|
|
60
|
+
id: PropTypes.string,
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Class names to be applied.
|
|
64
|
+
*/
|
|
65
|
+
className: PropTypes.string,
|
|
66
|
+
|
|
67
|
+
/** Children to be rendered. */
|
|
68
|
+
children: PropTypes.node,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* the classes object to be applied.
|
|
72
|
+
*/
|
|
73
|
+
classes: PropTypes.shape({
|
|
74
|
+
/**
|
|
75
|
+
* Style applied to the root of the component.
|
|
76
|
+
*/
|
|
77
|
+
root: PropTypes.string,
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Style applied to the dropdown in charge of sorting.
|
|
81
|
+
*/
|
|
82
|
+
sortDropdown: PropTypes.string
|
|
83
|
+
}).isRequired,
|
|
84
|
+
|
|
85
|
+
/** Data collection to be listed on the sort field. */
|
|
86
|
+
values: PropTypes.arrayOf(PropTypes.shape({
|
|
87
|
+
id: PropTypes.string,
|
|
88
|
+
accessor: PropTypes.string,
|
|
89
|
+
label: PropTypes.string,
|
|
90
|
+
selected: PropTypes.bool,
|
|
91
|
+
desc: PropTypes.bool
|
|
92
|
+
})),
|
|
93
|
+
|
|
94
|
+
/** Callback fired when the selected sort item is changed. */
|
|
95
|
+
onSort: PropTypes.func,
|
|
96
|
+
|
|
97
|
+
/** Boolean to control whether if the sort input should appears or not. */
|
|
98
|
+
hideSortBy: PropTypes.bool,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Extra props to be passed onto the dropdown
|
|
102
|
+
*/
|
|
103
|
+
sortProps: PropTypes.object
|
|
104
|
+
} : void 0;
|
|
105
|
+
export default withStyles(styleCreator, {
|
|
106
|
+
name: "HvRightControl",
|
|
107
|
+
withTheme: true
|
|
108
|
+
})(HvRightControl);
|
|
109
|
+
//# sourceMappingURL=RightControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RightControl.js","names":["React","useContext","useState","PropTypes","clsx","withStyles","HvDropdown","setId","styleCreator","HvControlsContext","HvRightControl","id","classes","className","children","values","onSort","hideSortBy","sortProps","others","dropDownValues","setDropdownValues","onSortHandler","handleChangeSort","value","prevValues","map","prevValue","selected","root","sortDropdown","propTypes","string","node","shape","isRequired","arrayOf","accessor","label","bool","desc","func","object","name","withTheme"],"sources":["../../../../src/Controls/RightControl/RightControl.js"],"sourcesContent":["import React, { useContext, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvDropdown, setId } from \"@hitachivantara/uikit-react-core\";\nimport styleCreator from \"./styles\";\nimport { HvControlsContext } from \"../context/ControlsContext\";\n\nconst HvRightControl = ({\n id,\n classes,\n className,\n children,\n values,\n onSort,\n hideSortBy = false,\n sortProps,\n ...others\n}) => {\n const [dropDownValues, setDropdownValues] = useState(values);\n\n const { onSort: onSortHandler } = useContext(HvControlsContext);\n\n const handleChangeSort = (value) => {\n onSort?.(value);\n onSortHandler?.(value);\n // this should be changed when dropdown changes his \"values\" behavior\n setDropdownValues((prevValues) =>\n prevValues.map((prevValue) => ({\n ...prevValue,\n selected: prevValue.id === value.id,\n }))\n );\n };\n return (\n <div id={id} className={clsx(className, classes.root)} {...others}>\n {!hideSortBy && (\n <HvDropdown\n id={setId(id, \"sort-by-dropdown\")}\n values={dropDownValues}\n className={classes.sortDropdown}\n onChange={handleChangeSort}\n singleSelectionToggle={false}\n {...sortProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nHvRightControl.propTypes = {\n /** Children to be rendered. */\n id: PropTypes.string,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /** Children to be rendered. */\n children: PropTypes.node,\n /**\n * the classes object to be applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dropdown in charge of sorting.\n */\n sortDropdown: PropTypes.string,\n }).isRequired,\n /** Data collection to be listed on the sort field. */\n values: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n accessor: PropTypes.string,\n label: PropTypes.string,\n selected: PropTypes.bool,\n desc: PropTypes.bool,\n })\n ),\n /** Callback fired when the selected sort item is changed. */\n onSort: PropTypes.func,\n /** Boolean to control whether if the sort input should appears or not. */\n hideSortBy: PropTypes.bool,\n /**\n * Extra props to be passed onto the dropdown\n */\n sortProps: PropTypes.object,\n};\n\nexport default withStyles(styleCreator, { name: \"HvRightControl\", withTheme: true })(\n HvRightControl\n);\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,UAAT,EAAqBC,KAArB,QAAkC,kCAAlC;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SAASC,iBAAT,QAAkC,4BAAlC;;AAEA,MAAMC,cAAc,GAAG,QAUjB;EAAA,IAVkB;IACtBC,EADsB;IAEtBC,OAFsB;IAGtBC,SAHsB;IAItBC,QAJsB;IAKtBC,MALsB;IAMtBC,MANsB;IAOtBC,UAAU,GAAG,KAPS;IAQtBC;EARsB,CAUlB;EAAA,IADDC,MACC;;EACJ,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsCnB,QAAQ,CAACa,MAAD,CAApD;EAEA,MAAM;IAAEC,MAAM,EAAEM;EAAV,IAA4BrB,UAAU,CAACQ,iBAAD,CAA5C;;EAEA,MAAMc,gBAAgB,GAAIC,KAAD,IAAW;IAClCR,MAAM,SAAN,IAAAA,MAAM,WAAN,YAAAA,MAAM,CAAGQ,KAAH,CAAN;IACAF,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGE,KAAH,CAAb,CAFkC,CAGlC;;IACAH,iBAAiB,CAAEI,UAAD,IAChBA,UAAU,CAACC,GAAX,CAAgBC,SAAD,oCACVA,SADU;MAEbC,QAAQ,EAAED,SAAS,CAAChB,EAAV,KAAiBa,KAAK,CAACb;IAFpB,EAAf,CADe,CAAjB;EAMD,CAVD;;EAWA,oBACE;IAAK,EAAE,EAAEA,EAAT;IAAa,SAAS,EAAEP,IAAI,CAACS,SAAD,EAAYD,OAAO,CAACiB,IAApB;EAA5B,GAA2DV,MAA3D,GAC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,CACblC,cADa,CAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Controls/RightControl/index.js"],"sourcesContent":["export { default } from \"./RightControl\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,gBAAxB"}
|