@hitachivantara/uikit-react-core 5.59.0 → 5.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseCheckBox/BaseCheckBox.cjs +16 -13
- package/dist/cjs/BaseCheckBox/BaseCheckBox.cjs.map +1 -1
- package/dist/cjs/BaseCheckBox/BaseCheckBox.styles.cjs +54 -6
- package/dist/cjs/BaseCheckBox/BaseCheckBox.styles.cjs.map +1 -1
- package/dist/cjs/BaseCheckBox/icons.cjs +21 -0
- package/dist/cjs/BaseCheckBox/icons.cjs.map +1 -0
- package/dist/cjs/CheckBox/CheckBox.cjs +4 -1
- package/dist/cjs/CheckBox/CheckBox.cjs.map +1 -1
- package/dist/cjs/CheckBox/CheckBox.styles.cjs +4 -1
- package/dist/cjs/CheckBox/CheckBox.styles.cjs.map +1 -1
- package/dist/cjs/List/List.styles.cjs +1 -1
- package/dist/cjs/List/List.styles.cjs.map +1 -1
- package/dist/cjs/LoadingContainer/LoadingContainer.cjs +37 -0
- package/dist/cjs/LoadingContainer/LoadingContainer.cjs.map +1 -0
- package/dist/cjs/LoadingContainer/LoadingContainer.styles.cjs +20 -0
- package/dist/cjs/LoadingContainer/LoadingContainer.styles.cjs.map +1 -0
- package/dist/cjs/QueryBuilder/Context.cjs +1 -0
- package/dist/cjs/QueryBuilder/Context.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/QueryBuilder.cjs +39 -18
- package/dist/cjs/QueryBuilder/QueryBuilder.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/types.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/utils/index.cjs +29 -5
- package/dist/cjs/QueryBuilder/utils/index.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/utils/reducer.cjs +6 -2
- package/dist/cjs/QueryBuilder/utils/reducer.cjs.map +1 -1
- package/dist/cjs/Table/hooks/useRowState.cjs +7 -0
- package/dist/cjs/Table/hooks/useRowState.cjs.map +1 -0
- package/dist/cjs/hooks/useControlled.cjs.map +1 -1
- package/dist/cjs/index.cjs +6 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/generic.cjs.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.js +13 -10
- package/dist/esm/BaseCheckBox/BaseCheckBox.js.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js +54 -6
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js.map +1 -1
- package/dist/esm/BaseCheckBox/icons.js +21 -0
- package/dist/esm/BaseCheckBox/icons.js.map +1 -0
- package/dist/esm/CheckBox/CheckBox.js +4 -1
- package/dist/esm/CheckBox/CheckBox.js.map +1 -1
- package/dist/esm/CheckBox/CheckBox.styles.js +4 -1
- package/dist/esm/CheckBox/CheckBox.styles.js.map +1 -1
- package/dist/esm/List/List.styles.js +1 -1
- package/dist/esm/List/List.styles.js.map +1 -1
- package/dist/esm/LoadingContainer/LoadingContainer.js +38 -0
- package/dist/esm/LoadingContainer/LoadingContainer.js.map +1 -0
- package/dist/esm/LoadingContainer/LoadingContainer.styles.js +20 -0
- package/dist/esm/LoadingContainer/LoadingContainer.styles.js.map +1 -0
- package/dist/esm/QueryBuilder/Context.js +1 -0
- package/dist/esm/QueryBuilder/Context.js.map +1 -1
- package/dist/esm/QueryBuilder/QueryBuilder.js +40 -19
- package/dist/esm/QueryBuilder/QueryBuilder.js.map +1 -1
- package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
- package/dist/esm/QueryBuilder/types.js.map +1 -1
- package/dist/esm/QueryBuilder/utils/index.js +30 -6
- package/dist/esm/QueryBuilder/utils/index.js.map +1 -1
- package/dist/esm/QueryBuilder/utils/reducer.js +6 -2
- package/dist/esm/QueryBuilder/utils/reducer.js.map +1 -1
- package/dist/esm/Table/hooks/useRowState.js +7 -0
- package/dist/esm/Table/hooks/useRowState.js.map +1 -0
- package/dist/esm/hooks/useControlled.js.map +1 -1
- package/dist/esm/index.js +102 -96
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/generic.js.map +1 -1
- package/dist/types/index.d.ts +241 -149
- package/package.json +5 -5
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { findNodeById, findParentById, emptyGroup, emptyRule } from "./index.js";
|
|
2
2
|
const reducer = (state, action) => {
|
|
3
|
-
const query =
|
|
3
|
+
const query = structuredClone(state);
|
|
4
4
|
switch (action.type) {
|
|
5
5
|
case "reset-query": {
|
|
6
6
|
return emptyGroup();
|
|
7
7
|
}
|
|
8
|
+
case "set-query":
|
|
9
|
+
return action.query;
|
|
8
10
|
case "reset-group": {
|
|
9
11
|
const group = findNodeById(action.id, query);
|
|
10
12
|
if (group && "rules" in group) {
|
|
@@ -76,7 +78,9 @@ const reducer = (state, action) => {
|
|
|
76
78
|
case "set-value": {
|
|
77
79
|
const node = findNodeById(action.id, query);
|
|
78
80
|
if (node && "operator" in node) {
|
|
79
|
-
|
|
81
|
+
if ("value" in node) {
|
|
82
|
+
node.value = action.value ?? void 0;
|
|
83
|
+
}
|
|
80
84
|
return query;
|
|
81
85
|
}
|
|
82
86
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","sources":["../../../../src/QueryBuilder/utils/reducer.tsx"],"sourcesContent":["import { Reducer } from \"react\";\n\nimport { emptyRule, emptyGroup, findNodeById, findParentById } from \"./index\";\nimport {
|
|
1
|
+
{"version":3,"file":"reducer.js","sources":["../../../../src/QueryBuilder/utils/reducer.tsx"],"sourcesContent":["import { Reducer } from \"react\";\n\nimport { emptyRule, emptyGroup, findNodeById, findParentById } from \"./index\";\nimport { Query, QueryAction } from \"../types\";\n\nconst reducer: Reducer<Query, QueryAction> = (state, action) => {\n const query = structuredClone(state);\n\n switch (action.type) {\n case \"reset-query\": {\n return emptyGroup();\n }\n case \"set-query\":\n return action.query;\n case \"reset-group\": {\n const group = findNodeById(action.id, query);\n if (group && \"rules\" in group) {\n group.rules = [emptyRule()];\n\n return query;\n }\n break;\n }\n case \"add-rule\": {\n const group = findNodeById(action.id, query);\n if (group && \"rules\" in group) {\n const rule = emptyRule();\n\n group.rules.push(rule);\n\n return query;\n }\n break;\n }\n case \"add-group\": {\n const group = findNodeById(action.id, query);\n if (group && \"rules\" in group) {\n group.rules.push(emptyGroup(true));\n\n return query;\n }\n break;\n }\n case \"remove-node\": {\n const parent = findParentById(action.id, query);\n if (parent) {\n parent.rules = parent.rules.filter((rule) => rule.id !== action.id);\n\n return query;\n }\n\n // reset query if deleting top node\n return emptyGroup();\n }\n case \"set-combinator\": {\n const node = findNodeById(action.id, query);\n if (node && \"combinator\" in node) {\n if (node.combinator !== action.combinator) {\n node.combinator = action.combinator;\n\n return query;\n }\n }\n break;\n }\n case \"set-attribute\": {\n const node = findNodeById(action.id, query);\n if (node && node.attribute !== action.attribute) {\n node.attribute = action.attribute ?? undefined;\n\n // we keep the operator and value unless the operator is explicitly null (or set)\n if (action.operator !== undefined) {\n node.operator = action.operator ?? undefined;\n node.value = action.value ?? undefined;\n }\n\n return query;\n }\n break;\n }\n case \"set-operator\": {\n const node = findNodeById(action.id, query);\n if (node && \"attribute\" in node) {\n if (node.operator !== action.operator) {\n node.operator = action.operator;\n if (action.value !== undefined) {\n node.value = action.value ?? undefined;\n }\n\n return query;\n }\n }\n break;\n }\n case \"set-value\": {\n const node = findNodeById(action.id, query);\n if (node && \"operator\" in node) {\n // Making sure we are not adding \"value: undefined\" to the object when value wasn't even set (because of EmptyValue)\n // Without this we can trigger onChange\n if (\"value\" in node) {\n node.value = action.value ?? undefined;\n }\n\n return query;\n }\n break;\n }\n\n default:\n }\n\n // Return existing state if nothing changed\n return query;\n};\n\nexport default reducer;\n"],"names":[],"mappings":";AAKA,MAAM,UAAuC,CAAC,OAAO,WAAW;AACxD,QAAA,QAAQ,gBAAgB,KAAK;AAEnC,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,eAAe;AAClB,aAAO,WAAW;AAAA,IACpB;AAAA,IACA,KAAK;AACH,aAAO,OAAO;AAAA,IAChB,KAAK,eAAe;AAClB,YAAM,QAAQ,aAAa,OAAO,IAAI,KAAK;AACvC,UAAA,SAAS,WAAW,OAAO;AACvB,cAAA,QAAQ,CAAC,UAAA,CAAW;AAEnB,eAAA;AAAA,MACT;AACA;AAAA,IACF;AAAA,IACA,KAAK,YAAY;AACf,YAAM,QAAQ,aAAa,OAAO,IAAI,KAAK;AACvC,UAAA,SAAS,WAAW,OAAO;AAC7B,cAAM,OAAO;AAEP,cAAA,MAAM,KAAK,IAAI;AAEd,eAAA;AAAA,MACT;AACA;AAAA,IACF;AAAA,IACA,KAAK,aAAa;AAChB,YAAM,QAAQ,aAAa,OAAO,IAAI,KAAK;AACvC,UAAA,SAAS,WAAW,OAAO;AAC7B,cAAM,MAAM,KAAK,WAAW,IAAI,CAAC;AAE1B,eAAA;AAAA,MACT;AACA;AAAA,IACF;AAAA,IACA,KAAK,eAAe;AAClB,YAAM,SAAS,eAAe,OAAO,IAAI,KAAK;AAC9C,UAAI,QAAQ;AACH,eAAA,QAAQ,OAAO,MAAM,OAAO,CAAC,SAAS,KAAK,OAAO,OAAO,EAAE;AAE3D,eAAA;AAAA,MACT;AAGA,aAAO,WAAW;AAAA,IACpB;AAAA,IACA,KAAK,kBAAkB;AACrB,YAAM,OAAO,aAAa,OAAO,IAAI,KAAK;AACtC,UAAA,QAAQ,gBAAgB,MAAM;AAC5B,YAAA,KAAK,eAAe,OAAO,YAAY;AACzC,eAAK,aAAa,OAAO;AAElB,iBAAA;AAAA,QACT;AAAA,MACF;AACA;AAAA,IACF;AAAA,IACA,KAAK,iBAAiB;AACpB,YAAM,OAAO,aAAa,OAAO,IAAI,KAAK;AAC1C,UAAI,QAAQ,KAAK,cAAc,OAAO,WAAW;AAC1C,aAAA,YAAY,OAAO,aAAa;AAGjC,YAAA,OAAO,aAAa,QAAW;AAC5B,eAAA,WAAW,OAAO,YAAY;AAC9B,eAAA,QAAQ,OAAO,SAAS;AAAA,QAC/B;AAEO,eAAA;AAAA,MACT;AACA;AAAA,IACF;AAAA,IACA,KAAK,gBAAgB;AACnB,YAAM,OAAO,aAAa,OAAO,IAAI,KAAK;AACtC,UAAA,QAAQ,eAAe,MAAM;AAC3B,YAAA,KAAK,aAAa,OAAO,UAAU;AACrC,eAAK,WAAW,OAAO;AACnB,cAAA,OAAO,UAAU,QAAW;AACzB,iBAAA,QAAQ,OAAO,SAAS;AAAA,UAC/B;AAEO,iBAAA;AAAA,QACT;AAAA,MACF;AACA;AAAA,IACF;AAAA,IACA,KAAK,aAAa;AAChB,YAAM,OAAO,aAAa,OAAO,IAAI,KAAK;AACtC,UAAA,QAAQ,cAAc,MAAM;AAG9B,YAAI,WAAW,MAAM;AACd,eAAA,QAAQ,OAAO,SAAS;AAAA,QAC/B;AAEO,eAAA;AAAA,MACT;AACA;AAAA,IACF;AAAA,EAGF;AAGO,SAAA;AACT;AAEA,MAAA,YAAe;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRowState.js","sources":["../../../../src/Table/hooks/useRowState.ts"],"sourcesContent":["import { Hooks, useRowState } from \"react-table\";\n\n// #region ##### TYPES #####\n\nexport type UseRowStateProps = (<D extends object = Record<string, unknown>>(\n hooks: Hooks<D>\n) => void) & { pluginName: string };\n\n// #endregion ##### TYPES #####\n\nconst useHvRowState = useRowState.bind({});\n(useHvRowState.pluginName as string) = \"useHvRowState\";\n\nexport default useHvRowState;\n"],"names":[],"mappings":";AAUA,MAAM,gBAAgB,YAAY,KAAK,CAAA,CAAE;AACxC,cAAc,aAAwB;AAEvC,MAAA,kBAAe;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useControlled.js","sources":["../../../src/hooks/useControlled.ts"],"sourcesContent":["// based in https://raw.githubusercontent.com/mui-org/material-ui/next/packages/material-ui/src/utils/useControlled.js\n// modifications:\n// 1. renamed default to initialState, to convey the same meaning of the useState hook.\n// 2. removed the console error when initialState changes; that is acceptable and just ignored, like in useState.\n// 3. the console error regarding switching from controlled to uncontrolled (or vice-versa) is sent synchronously\n// so the stacktrace shows the caller\n// 4. given that, the hook signature was simplified, no need for metadata\n\nimport { useRef, useState, useCallback, SetStateAction } from \"react\";\n\
|
|
1
|
+
{"version":3,"file":"useControlled.js","sources":["../../../src/hooks/useControlled.ts"],"sourcesContent":["// based in https://raw.githubusercontent.com/mui-org/material-ui/next/packages/material-ui/src/utils/useControlled.js\n// modifications:\n// 1. renamed default to initialState, to convey the same meaning of the useState hook.\n// 2. removed the console error when initialState changes; that is acceptable and just ignored, like in useState.\n// 3. the console error regarding switching from controlled to uncontrolled (or vice-versa) is sent synchronously\n// so the stacktrace shows the caller\n// 4. given that, the hook signature was simplified, no need for metadata\n\nimport { useRef, useState, useCallback, SetStateAction } from \"react\";\n\nexport const useControlled = (controlledProp: any, initialState: any) => {\n const { current: isControlled } = useRef(controlledProp !== undefined);\n const [valueState, setValue] = useState(initialState);\n const value = isControlled ? controlledProp : valueState;\n\n if (import.meta.env.DEV && isControlled !== (controlledProp !== undefined)) {\n // eslint-disable-next-line no-console\n console.error(\n [\n `A component is changing the ${\n isControlled ? \"\" : \"un\"\n }controlled state to be ${isControlled ? \"un\" : \"\"}controlled.`,\n \"Elements should not switch from uncontrolled to controlled (or vice versa).\",\n \"Decide between using a controlled or uncontrolled element for the lifetime of the component.\",\n \"The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.\",\n ].join(\"\\n\")\n );\n }\n\n const setValueIfUncontrolled = useCallback(\n (newValue: SetStateAction<any>) => {\n if (!isControlled) {\n setValue(newValue);\n }\n },\n [isControlled]\n );\n\n return [value, setValueIfUncontrolled];\n};\n"],"names":[],"mappings":";AAUa,MAAA,gBAAgB,CAAC,gBAAqB,iBAAsB;AACvE,QAAM,EAAE,SAAS,aAAiB,IAAA,OAAO,mBAAmB,MAAS;AACrE,QAAM,CAAC,YAAY,QAAQ,IAAI,SAAS,YAAY;AAC9C,QAAA,QAAQ,eAAe,iBAAiB;AAgB9C,QAAM,yBAAyB;AAAA,IAC7B,CAAC,aAAkC;AACjC,UAAI,CAAC,cAAc;AACjB,iBAAS,QAAQ;AAAA,MACnB;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EAAA;AAGR,SAAA,CAAC,OAAO,sBAAsB;AACvC;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -192,62 +192,64 @@ import { staticClasses as staticClasses70 } from "./List/List.styles.js";
|
|
|
192
192
|
import { HvList } from "./List/List.js";
|
|
193
193
|
import { staticClasses as staticClasses71 } from "./Loading/Loading.styles.js";
|
|
194
194
|
import { HvLoading } from "./Loading/Loading.js";
|
|
195
|
-
import { staticClasses as staticClasses72 } from "./
|
|
195
|
+
import { staticClasses as staticClasses72 } from "./LoadingContainer/LoadingContainer.styles.js";
|
|
196
|
+
import { HvLoadingContainer } from "./LoadingContainer/LoadingContainer.js";
|
|
197
|
+
import { staticClasses as staticClasses73 } from "./Login/Login.styles.js";
|
|
196
198
|
import { HvLogin } from "./Login/Login.js";
|
|
197
|
-
import { staticClasses as
|
|
199
|
+
import { staticClasses as staticClasses74 } from "./MultiButton/MultiButton.styles.js";
|
|
198
200
|
import { HvMultiButton } from "./MultiButton/MultiButton.js";
|
|
199
|
-
import { staticClasses as
|
|
201
|
+
import { staticClasses as staticClasses75 } from "./OverflowTooltip/OverflowTooltip.styles.js";
|
|
200
202
|
import { HvOverflowTooltip } from "./OverflowTooltip/OverflowTooltip.js";
|
|
201
|
-
import { staticClasses as
|
|
203
|
+
import { staticClasses as staticClasses76 } from "./Pagination/Pagination.styles.js";
|
|
202
204
|
import { HvPagination } from "./Pagination/Pagination.js";
|
|
203
|
-
import { staticClasses as
|
|
205
|
+
import { staticClasses as staticClasses77 } from "./Panel/Panel.styles.js";
|
|
204
206
|
import { HvPanel } from "./Panel/Panel.js";
|
|
205
|
-
import { staticClasses as
|
|
207
|
+
import { staticClasses as staticClasses78 } from "./ProgressBar/ProgressBar.styles.js";
|
|
206
208
|
import { HvProgressBar } from "./ProgressBar/ProgressBar.js";
|
|
207
209
|
import { defaultCombinators, defaultLabels, defaultOperators, useQueryBuilderContext } from "./QueryBuilder/Context.js";
|
|
208
|
-
import { staticClasses as
|
|
210
|
+
import { staticClasses as staticClasses79 } from "./QueryBuilder/QueryBuilder.styles.js";
|
|
209
211
|
import { HvQueryBuilder } from "./QueryBuilder/QueryBuilder.js";
|
|
210
|
-
import { staticClasses as
|
|
212
|
+
import { staticClasses as staticClasses80 } from "./Radio/Radio.styles.js";
|
|
211
213
|
import { HvRadio } from "./Radio/Radio.js";
|
|
212
|
-
import { staticClasses as
|
|
214
|
+
import { staticClasses as staticClasses81 } from "./RadioGroup/RadioGroup.styles.js";
|
|
213
215
|
import { HvRadioGroup } from "./RadioGroup/RadioGroup.js";
|
|
214
|
-
import { staticClasses as
|
|
215
|
-
import { staticClasses as
|
|
216
|
+
import { staticClasses as staticClasses82 } from "./ScrollTo/Vertical/VerticalScrollListItem/VerticalScrollListItem.styles.js";
|
|
217
|
+
import { staticClasses as staticClasses83 } from "./ScrollTo/Vertical/ScrollToVertical.styles.js";
|
|
216
218
|
import { HvScrollToVertical } from "./ScrollTo/Vertical/ScrollToVertical.js";
|
|
217
|
-
import { staticClasses as
|
|
218
|
-
import { staticClasses as
|
|
219
|
+
import { staticClasses as staticClasses84 } from "./ScrollTo/Horizontal/HorizontalScrollListItem/HorizontalScrollListItem.styles.js";
|
|
220
|
+
import { staticClasses as staticClasses85 } from "./ScrollTo/Horizontal/ScrollToHorizontal.styles.js";
|
|
219
221
|
import { HvScrollToHorizontal } from "./ScrollTo/Horizontal/ScrollToHorizontal.js";
|
|
220
|
-
import { staticClasses as
|
|
222
|
+
import { staticClasses as staticClasses86 } from "./Section/Section.styles.js";
|
|
221
223
|
import { HvSection } from "./Section/Section.js";
|
|
222
|
-
import { staticClasses as
|
|
224
|
+
import { staticClasses as staticClasses87 } from "./SimpleGrid/SimpleGrid.styles.js";
|
|
223
225
|
import { HvSimpleGrid } from "./SimpleGrid/SimpleGrid.js";
|
|
224
|
-
import { staticClasses as
|
|
226
|
+
import { staticClasses as staticClasses88 } from "./Slider/Slider.styles.js";
|
|
225
227
|
import { HvSlider } from "./Slider/Slider.js";
|
|
226
|
-
import { staticClasses as
|
|
228
|
+
import { staticClasses as staticClasses89 } from "./Snackbar/Snackbar.styles.js";
|
|
227
229
|
import { HvSnackbar } from "./Snackbar/Snackbar.js";
|
|
228
|
-
import { staticClasses as
|
|
230
|
+
import { staticClasses as staticClasses90 } from "./Snackbar/SnackbarContent/SnackbarContent.styles.js";
|
|
229
231
|
import { HvSnackbarContent } from "./Snackbar/SnackbarContent/SnackbarContent.js";
|
|
230
|
-
import { staticClasses as
|
|
232
|
+
import { staticClasses as staticClasses91 } from "./SnackbarProvider/SnackbarProvider.styles.js";
|
|
231
233
|
import { HvSnackbarProvider, useHvSnackbar } from "./SnackbarProvider/SnackbarProvider.js";
|
|
232
|
-
import { staticClasses as
|
|
234
|
+
import { staticClasses as staticClasses92 } from "./Stack/Stack.styles.js";
|
|
233
235
|
import { HvStack } from "./Stack/Stack.js";
|
|
234
|
-
import { staticClasses as
|
|
236
|
+
import { staticClasses as staticClasses93 } from "./Switch/Switch.styles.js";
|
|
235
237
|
import { HvSwitch } from "./Switch/Switch.js";
|
|
236
|
-
import { staticClasses as
|
|
238
|
+
import { staticClasses as staticClasses94 } from "./Tab/Tab.styles.js";
|
|
237
239
|
import { HvTab } from "./Tab/Tab.js";
|
|
238
|
-
import { staticClasses as
|
|
240
|
+
import { staticClasses as staticClasses95 } from "./Table/Table.styles.js";
|
|
239
241
|
import { HvTable } from "./Table/Table.js";
|
|
240
|
-
import { staticClasses as
|
|
242
|
+
import { staticClasses as staticClasses96 } from "./Table/TableContainer/TableContainer.styles.js";
|
|
241
243
|
import { HvTableContainer } from "./Table/TableContainer/TableContainer.js";
|
|
242
|
-
import { staticClasses as
|
|
244
|
+
import { staticClasses as staticClasses97 } from "./Table/TableBody/TableBody.styles.js";
|
|
243
245
|
import { HvTableBody } from "./Table/TableBody/TableBody.js";
|
|
244
|
-
import { staticClasses as
|
|
246
|
+
import { staticClasses as staticClasses98 } from "./Table/TableHead/TableHead.styles.js";
|
|
245
247
|
import { HvTableHead } from "./Table/TableHead/TableHead.js";
|
|
246
|
-
import { staticClasses as
|
|
248
|
+
import { staticClasses as staticClasses99 } from "./Table/TableHeader/TableHeader.styles.js";
|
|
247
249
|
import { HvTableHeader } from "./Table/TableHeader/TableHeader.js";
|
|
248
|
-
import { staticClasses as
|
|
250
|
+
import { staticClasses as staticClasses100 } from "./Table/TableRow/TableRow.styles.js";
|
|
249
251
|
import { HvTableRow } from "./Table/TableRow/TableRow.js";
|
|
250
|
-
import { staticClasses as
|
|
252
|
+
import { staticClasses as staticClasses101 } from "./Table/TableCell/TableCell.styles.js";
|
|
251
253
|
import { HvTableCell } from "./Table/TableCell/TableCell.js";
|
|
252
254
|
import { getHeaderFooterPropsHook, default as default4 } from "./Table/hooks/useTableStyles.js";
|
|
253
255
|
import { default as default5 } from "./Table/hooks/useSortBy.js";
|
|
@@ -260,6 +262,7 @@ import { default as default11 } from "./Table/hooks/useHeaderGroups.js";
|
|
|
260
262
|
import { default as default12 } from "./Table/hooks/useResizeColumns.js";
|
|
261
263
|
import { default as default13 } from "./Table/hooks/useGlobalFilter.js";
|
|
262
264
|
import { default as default14 } from "./Table/hooks/useFilters.js";
|
|
265
|
+
import { default as default15 } from "./Table/hooks/useRowState.js";
|
|
263
266
|
import { hvDateColumn, hvDropdownColumn, hvExpandColumn, hvNumberColumn, hvProgressColumn, hvSwitchColumn, hvTagColumn, hvTextColumn } from "./Table/renderers/renderers.js";
|
|
264
267
|
import { HvDateColumnCell } from "./Table/renderers/DateColumnCell/DateColumnCell.js";
|
|
265
268
|
import { HvDropdownColumnCell } from "./Table/renderers/DropdownColumnCell/DropdownColumnCell.js";
|
|
@@ -267,47 +270,47 @@ import { HvProgressColumnCell, normalizeProgressBar } from "./Table/renderers/Pr
|
|
|
267
270
|
import { HvSwitchColumnCell } from "./Table/renderers/SwitchColumnCell/SwitchColumnCell.js";
|
|
268
271
|
import { hvNodeFallback, hvNumberFallback, hvStringFallback } from "./Table/utils/fallbacks.js";
|
|
269
272
|
import { getBorderStyles } from "./Table/utils/utils.js";
|
|
270
|
-
import { staticClasses as
|
|
273
|
+
import { staticClasses as staticClasses102 } from "./Tabs/Tabs.styles.js";
|
|
271
274
|
import { HvTabs } from "./Tabs/Tabs.js";
|
|
272
|
-
import { staticClasses as
|
|
275
|
+
import { staticClasses as staticClasses103 } from "./Tag/Tag.styles.js";
|
|
273
276
|
import { HvTag } from "./Tag/Tag.js";
|
|
274
|
-
import { staticClasses as
|
|
277
|
+
import { staticClasses as staticClasses104 } from "./TagsInput/TagsInput.styles.js";
|
|
275
278
|
import { HvTagsInput } from "./TagsInput/TagsInput.js";
|
|
276
|
-
import { staticClasses as
|
|
279
|
+
import { staticClasses as staticClasses105 } from "./TextArea/TextArea.styles.js";
|
|
277
280
|
import { HvTextArea } from "./TextArea/TextArea.js";
|
|
278
|
-
import { staticClasses as
|
|
281
|
+
import { staticClasses as staticClasses106 } from "./TimeAgo/TimeAgo.styles.js";
|
|
279
282
|
import { HvTimeAgo } from "./TimeAgo/TimeAgo.js";
|
|
280
|
-
import { staticClasses as
|
|
283
|
+
import { staticClasses as staticClasses107 } from "./TimePicker/TimePicker.styles.js";
|
|
281
284
|
import { HvTimePicker } from "./TimePicker/TimePicker.js";
|
|
282
285
|
import { HvToggleButton } from "./ToggleButton/ToggleButton.js";
|
|
283
|
-
import { staticClasses as
|
|
286
|
+
import { staticClasses as staticClasses108 } from "./Tooltip/Tooltip.styles.js";
|
|
284
287
|
import { HvTooltip } from "./Tooltip/Tooltip.js";
|
|
285
|
-
import { staticClasses as
|
|
288
|
+
import { staticClasses as staticClasses109 } from "./TreeView/TreeView.styles.js";
|
|
286
289
|
import { HvTreeView } from "./TreeView/TreeView.js";
|
|
287
|
-
import { staticClasses as
|
|
290
|
+
import { staticClasses as staticClasses110 } from "./TreeView/TreeItem/TreeItem.styles.js";
|
|
288
291
|
import { HvTreeItem } from "./TreeView/TreeItem/TreeItem.js";
|
|
289
292
|
import { useHvTreeItem } from "./TreeView/TreeItem/useHvTreeItem.js";
|
|
290
|
-
import { staticClasses as
|
|
293
|
+
import { staticClasses as staticClasses111 } from "./VerticalNavigation/VerticalNavigation.styles.js";
|
|
291
294
|
import { HvVerticalNavigation } from "./VerticalNavigation/VerticalNavigation.js";
|
|
292
|
-
import { staticClasses as
|
|
295
|
+
import { staticClasses as staticClasses112 } from "./VerticalNavigation/Header/Header.styles.js";
|
|
293
296
|
import { HvVerticalNavigationHeader } from "./VerticalNavigation/Header/Header.js";
|
|
294
|
-
import { staticClasses as
|
|
297
|
+
import { staticClasses as staticClasses113 } from "./VerticalNavigation/Actions/Actions.styles.js";
|
|
295
298
|
import { HvVerticalNavigationActions } from "./VerticalNavigation/Actions/Actions.js";
|
|
296
|
-
import { staticClasses as
|
|
299
|
+
import { staticClasses as staticClasses114 } from "./VerticalNavigation/Actions/Action.styles.js";
|
|
297
300
|
import { HvVerticalNavigationAction } from "./VerticalNavigation/Actions/Action.js";
|
|
298
|
-
import { staticClasses as
|
|
301
|
+
import { staticClasses as staticClasses115 } from "./VerticalNavigation/Navigation/Navigation.styles.js";
|
|
299
302
|
import { HvVerticalNavigationTree } from "./VerticalNavigation/Navigation/Navigation.js";
|
|
300
|
-
import { staticClasses as
|
|
303
|
+
import { staticClasses as staticClasses116 } from "./VerticalNavigation/NavigationSlider/NavigationSlider.styles.js";
|
|
301
304
|
import { HvVerticalNavigationSlider } from "./VerticalNavigation/NavigationSlider/NavigationSlider.js";
|
|
302
|
-
import { staticClasses as
|
|
305
|
+
import { staticClasses as staticClasses117 } from "./VerticalNavigation/TreeView/TreeView.styles.js";
|
|
303
306
|
import { HvVerticalNavigationTreeView } from "./VerticalNavigation/TreeView/TreeView.js";
|
|
304
|
-
import { staticClasses as
|
|
307
|
+
import { staticClasses as staticClasses118 } from "./VerticalNavigation/TreeView/TreeViewItem.styles.js";
|
|
305
308
|
import { HvVerticalNavigationTreeViewItem } from "./VerticalNavigation/TreeView/TreeViewItem.js";
|
|
306
309
|
import { VerticalNavigationContext } from "./VerticalNavigation/VerticalNavigationContext.js";
|
|
307
|
-
import { staticClasses as
|
|
310
|
+
import { staticClasses as staticClasses119 } from "./TableSection/TableSection.styles.js";
|
|
308
311
|
import { HvTableSection } from "./TableSection/TableSection.js";
|
|
309
312
|
import { HvIconButton } from "./IconButton/IconButton.js";
|
|
310
|
-
import { staticClasses as
|
|
313
|
+
import { staticClasses as staticClasses120 } from "./Skeleton/Skeleton.styles.js";
|
|
311
314
|
import { HvSkeleton } from "./Skeleton/Skeleton.js";
|
|
312
315
|
import { EmotionContext, HvThemeContext, defaultCacheKey, defaultEmotionCache } from "@hitachivantara/uikit-react-shared";
|
|
313
316
|
export {
|
|
@@ -398,6 +401,7 @@ export {
|
|
|
398
401
|
HvListContainer,
|
|
399
402
|
HvListItem,
|
|
400
403
|
HvLoading,
|
|
404
|
+
HvLoadingContainer,
|
|
401
405
|
HvLogin,
|
|
402
406
|
HvMultiButton,
|
|
403
407
|
HvOption,
|
|
@@ -462,8 +466,8 @@ export {
|
|
|
462
466
|
VerticalNavigationContext,
|
|
463
467
|
staticClasses16 as accordionClasses,
|
|
464
468
|
staticClasses17 as actionBarClasses,
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
staticClasses114 as actionClasses,
|
|
470
|
+
staticClasses113 as actionsClasses,
|
|
467
471
|
staticClasses18 as actionsGenericClasses,
|
|
468
472
|
staticClasses6 as adornmentClasses,
|
|
469
473
|
staticClasses20 as appSwitcherActionClasses,
|
|
@@ -551,7 +555,7 @@ export {
|
|
|
551
555
|
staticClasses62 as headerClasses,
|
|
552
556
|
staticClasses65 as headerNavigationClasses,
|
|
553
557
|
hexToRgbA,
|
|
554
|
-
|
|
558
|
+
staticClasses84 as horizontalScrollListItemClasses,
|
|
555
559
|
hvDateColumn,
|
|
556
560
|
hvDropdownColumn,
|
|
557
561
|
hvExpandColumn,
|
|
@@ -584,65 +588,66 @@ export {
|
|
|
584
588
|
staticClasses3 as listContainerClasses,
|
|
585
589
|
staticClasses4 as listItemClasses,
|
|
586
590
|
staticClasses71 as loadingClasses,
|
|
587
|
-
staticClasses72 as
|
|
588
|
-
staticClasses73 as
|
|
591
|
+
staticClasses72 as loadingContainerClasses,
|
|
592
|
+
staticClasses73 as loginClasses,
|
|
593
|
+
staticClasses74 as multiButtonClasses,
|
|
589
594
|
multiSelectionEventHandler,
|
|
590
595
|
normalizeProgressBar,
|
|
591
596
|
optionClasses,
|
|
592
597
|
optionGroupClasses,
|
|
593
598
|
outlineStyles,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
599
|
+
staticClasses75 as overflowTooltipClasses,
|
|
600
|
+
staticClasses76 as paginationClasses,
|
|
601
|
+
staticClasses77 as panelClasses,
|
|
597
602
|
pentahoPlus,
|
|
598
603
|
prepareRow,
|
|
599
604
|
processThemes,
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
605
|
+
staticClasses78 as progressBarClasses,
|
|
606
|
+
staticClasses79 as queryBuilderClasses,
|
|
607
|
+
staticClasses80 as radioClasses,
|
|
608
|
+
staticClasses81 as radioGroupClasses,
|
|
604
609
|
reducer,
|
|
605
610
|
replace$,
|
|
606
611
|
staticClasses45 as rightControlClasses,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
612
|
+
staticClasses85 as scrollToHorizontalClasses,
|
|
613
|
+
staticClasses83 as scrollToVerticalClasses,
|
|
614
|
+
staticClasses86 as sectionClasses,
|
|
610
615
|
staticClasses11 as selectClasses,
|
|
611
616
|
staticClasses12 as selectionListClasses,
|
|
612
617
|
setElementAttrs,
|
|
613
618
|
setId,
|
|
614
619
|
setUid,
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
620
|
+
staticClasses87 as simpleGridClasses,
|
|
621
|
+
staticClasses120 as skeletonClasses,
|
|
622
|
+
staticClasses88 as sliderClasses,
|
|
623
|
+
staticClasses89 as snackbarClasses,
|
|
624
|
+
staticClasses90 as snackbarContentClasses,
|
|
625
|
+
staticClasses91 as snackbarProviderClasses,
|
|
626
|
+
staticClasses92 as stackClasses,
|
|
622
627
|
staticClasses13 as suggestionsClasses,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
628
|
+
staticClasses93 as switchClasses,
|
|
629
|
+
staticClasses94 as tabClasses,
|
|
630
|
+
staticClasses97 as tableBodyClasses,
|
|
631
|
+
staticClasses101 as tableCellClasses,
|
|
632
|
+
staticClasses95 as tableClasses,
|
|
633
|
+
staticClasses96 as tableContainerClasses,
|
|
634
|
+
staticClasses98 as tableHeadClasses,
|
|
635
|
+
staticClasses99 as tableHeaderClasses,
|
|
636
|
+
staticClasses100 as tableRowClasses,
|
|
637
|
+
staticClasses119 as tableSectionClasses,
|
|
638
|
+
staticClasses102 as tabsClasses,
|
|
639
|
+
staticClasses103 as tagClasses,
|
|
640
|
+
staticClasses104 as tagsInputClasses,
|
|
641
|
+
staticClasses105 as textAreaClasses,
|
|
637
642
|
theme,
|
|
638
643
|
themes,
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
staticClasses106 as timeAgoClasses,
|
|
645
|
+
staticClasses107 as timePickerClasses,
|
|
646
|
+
staticClasses108 as tooltipClasses,
|
|
647
|
+
staticClasses110 as treeItemClasses,
|
|
648
|
+
staticClasses109 as treeView2Classes,
|
|
649
|
+
staticClasses117 as treeViewClasses,
|
|
650
|
+
staticClasses118 as treeViewItemClasses,
|
|
646
651
|
staticClasses as typographyClasses,
|
|
647
652
|
typographyVariants,
|
|
648
653
|
useClickOutside,
|
|
@@ -661,6 +666,7 @@ export {
|
|
|
661
666
|
default12 as useHvResizeColumns,
|
|
662
667
|
default10 as useHvRowExpand,
|
|
663
668
|
default8 as useHvRowSelection,
|
|
669
|
+
default15 as useHvRowState,
|
|
664
670
|
useHvSnackbar,
|
|
665
671
|
default5 as useHvSortBy,
|
|
666
672
|
default3 as useHvTable,
|
|
@@ -677,11 +683,11 @@ export {
|
|
|
677
683
|
useTheme,
|
|
678
684
|
useUniqueId,
|
|
679
685
|
useWidth,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
686
|
+
staticClasses111 as verticalNavigationClasses,
|
|
687
|
+
staticClasses112 as verticalNavigationHeaderClasses,
|
|
688
|
+
staticClasses116 as verticalNavigationSliderClasses,
|
|
689
|
+
staticClasses115 as verticalNavigationTreeClasses,
|
|
690
|
+
staticClasses82 as verticalScrollListItemClasses,
|
|
685
691
|
staticClasses10 as warningTextClasses,
|
|
686
692
|
withTooltip,
|
|
687
693
|
wrapperTooltip
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sources":["../../../src/types/generic.ts"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport type {\n HvExtraProps,\n HvExtraDeepProps,\n} from \"@hitachivantara/uikit-react-shared\";\n\nexport type { HvExtraProps, HvExtraDeepProps };\n\ntype AsProp<C extends React.ElementType> = {\n /** Custom element type to override the root component */\n component?: C;\n};\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// Workaround to fix the use of Omit with ComponentPropsWithoutRef\n// Without this the event handlers return any instead of the type for the chosen element\ntype FixComponentProps<T> = T extends any ? T : never;\n\ntype PolymorphicComponent<\n C extends React.ElementType,\n Props = {}\n> = React.PropsWithChildren<Props & AsProp<C>> &\n FixComponentProps<\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>\n >;\n\nexport type PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>[\"ref\"];\n\nexport type PolymorphicComponentRef<\n C extends React.ElementType,\n Props = {}\n> = PolymorphicComponent<C, Props> & { ref?: PolymorphicRef<C> };\n\n/** HV Base Props. Extends `React.HTMLAttributes` of an element `E`, and filters `K` keys. */\nexport type HvBaseProps<\n E extends HTMLElement = HTMLDivElement,\n K extends keyof React.HTMLAttributes<E> = never\n> = Omit<React.HTMLAttributes<E>, K>;\n\n/** This type allows to do a deep partial by applying the Partial type to each key recursively */\nexport type DeepPartial<T> = T extends Object\n ? Partial<{\n [P in keyof T]: DeepPartial<T[P]>;\n }>\n : T;\n\n/** This type combines the HvExtraProps and DeepPartial types */\nexport type HvExtraDeepPartialProps<T> = Partial<{\n [P in keyof T]: DeepPartial<T[P]> & HvExtraProps;\n}> &\n HvExtraProps;\n\nexport type Arrayable<T> = T | T[];\n\n/** React.forwardRef with fixed type declarations */\nexport function fixedForwardRef<T, P = {}>(\n // TODO: change `React.ReactElement | null` to `React.ReactNode` in typescript@5\n render: (props: P, ref: React.Ref<T>) => React.ReactElement | null\n): (props: P & React.RefAttributes<T>) => React.ReactElement | null {\n return forwardRef(render) as any;\n}\n"],"names":[],"mappings":";AA0DO,SAAS,gBAEd,QACkE;AAClE,SAAO,WAAW,MAAM;AAC1B;"}
|
|
1
|
+
{"version":3,"file":"generic.js","sources":["../../../src/types/generic.ts"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport type {\n HvExtraProps,\n HvExtraDeepProps,\n} from \"@hitachivantara/uikit-react-shared\";\n\nexport type { HvExtraProps, HvExtraDeepProps };\n\ntype AsProp<C extends React.ElementType> = {\n /** Custom element type to override the root component */\n component?: C;\n};\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// Workaround to fix the use of Omit with ComponentPropsWithoutRef\n// Without this the event handlers return any instead of the type for the chosen element\ntype FixComponentProps<T> = T extends any ? T : never;\n\ntype PolymorphicComponent<\n C extends React.ElementType,\n Props = {}\n> = React.PropsWithChildren<Props & AsProp<C>> &\n FixComponentProps<\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>\n >;\n\nexport type PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>[\"ref\"];\n\nexport type PolymorphicComponentRef<\n C extends React.ElementType,\n Props = {}\n> = PolymorphicComponent<C, Props> & { ref?: PolymorphicRef<C> };\n\n/** HV Base Props. Extends `React.HTMLAttributes` of an element `E`, and filters `K` keys. */\nexport type HvBaseProps<\n E extends HTMLElement = HTMLDivElement,\n K extends keyof React.HTMLAttributes<E> = never\n> = Omit<React.HTMLAttributes<E>, K>;\n\n/** This type allows to do a deep partial by applying the Partial type to each key recursively */\nexport type DeepPartial<T> = T extends Object\n ? Partial<{\n [P in keyof T]: DeepPartial<T[P]>;\n }>\n : T;\n\n/** This type combines the HvExtraProps and DeepPartial types */\nexport type HvExtraDeepPartialProps<T> = Partial<{\n [P in keyof T]: DeepPartial<T[P]> & HvExtraProps;\n}> &\n HvExtraProps;\n\nexport type Arrayable<T> = T | T[];\n\n/** React.forwardRef with fixed type declarations */\nexport function fixedForwardRef<T, P = {}>(\n // TODO: change `React.ReactElement | null` to `React.ReactNode` in typescript@5\n render: (props: P, ref: React.Ref<T>) => React.ReactElement | null\n): (props: P & React.RefAttributes<T>) => React.ReactElement | null {\n return forwardRef(render) as any;\n}\n\n// Source code from: https://github.com/piotrwitek/utility-types/blob/master/src/mapped-types.ts\n/**\n * Optional\n * @desc From `T` make a set of properties by key `K` become optional\n * @example\n * type Props = {\n * name: string;\n * age: number;\n * visible: boolean;\n * };\n *\n * // Expect: { name?: string; age?: number; visible?: boolean; }\n * type Props = Optional<Props>;\n *\n * // Expect: { name: string; age?: number; visible?: boolean; }\n * type Props = Optional<Props, 'age' | 'visible'>;\n */\nexport type HvOptional<T extends object, K extends keyof T = keyof T> = Omit<\n T,\n K\n> &\n Partial<Pick<T, K>>;\n"],"names":[],"mappings":";AA0DO,SAAS,gBAEd,QACkE;AAClE,SAAO,WAAW,MAAM;AAC1B;"}
|