@hitachivantara/uikit-react-core 5.59.0 → 5.60.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/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 +2 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/generic.cjs.map +1 -1
- 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 +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/generic.js.map +1 -1
- package/dist/types/index.d.ts +60 -15
- package/package.json +5 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -137,6 +137,7 @@ import { UseResizeColumnsColumnOptions } from 'react-table';
|
|
|
137
137
|
import { UseResizeColumnsColumnProps } from 'react-table';
|
|
138
138
|
import { UseResizeColumnsOptions } from 'react-table';
|
|
139
139
|
import { UseResizeColumnsState } from 'react-table';
|
|
140
|
+
import { useRowState } from 'react-table';
|
|
140
141
|
import { UseRowStateInstanceProps } from 'react-table';
|
|
141
142
|
import { UseRowStateOptions } from 'react-table';
|
|
142
143
|
import { UseRowStateRowProps } from 'react-table';
|
|
@@ -373,9 +374,9 @@ export declare const baseSwitchClasses: {
|
|
|
373
374
|
switch: "HvBaseSwitch-switch";
|
|
374
375
|
switchBase: "HvBaseSwitch-switchBase";
|
|
375
376
|
track: "HvBaseSwitch-track";
|
|
377
|
+
thumb: "HvBaseSwitch-thumb";
|
|
376
378
|
checked: "HvBaseSwitch-checked";
|
|
377
379
|
focusVisible: "HvBaseSwitch-focusVisible";
|
|
378
|
-
thumb: "HvBaseSwitch-thumb";
|
|
379
380
|
};
|
|
380
381
|
|
|
381
382
|
export declare const breadCrumbClasses: {
|
|
@@ -4650,6 +4651,24 @@ export declare const hvNumberFallback: (value: any) => number | "—";
|
|
|
4650
4651
|
|
|
4651
4652
|
export declare const HvOption: <OptionValue extends {}>(props: HvOptionProps<OptionValue> & RefAttributes<HTMLLIElement>) => ReactElement<any, string | JSXElementConstructor<any>> | null;
|
|
4652
4653
|
|
|
4654
|
+
/**
|
|
4655
|
+
* Optional
|
|
4656
|
+
* @desc From `T` make a set of properties by key `K` become optional
|
|
4657
|
+
* @example
|
|
4658
|
+
* type Props = {
|
|
4659
|
+
* name: string;
|
|
4660
|
+
* age: number;
|
|
4661
|
+
* visible: boolean;
|
|
4662
|
+
* };
|
|
4663
|
+
*
|
|
4664
|
+
* // Expect: { name?: string; age?: number; visible?: boolean; }
|
|
4665
|
+
* type Props = Optional<Props>;
|
|
4666
|
+
*
|
|
4667
|
+
* // Expect: { name: string; age?: number; visible?: boolean; }
|
|
4668
|
+
* type Props = Optional<Props, 'age' | 'visible'>;
|
|
4669
|
+
*/
|
|
4670
|
+
export declare type HvOptional<T extends object, K extends keyof T = keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
4671
|
+
|
|
4653
4672
|
export declare type HvOptionClasses = ExtractNames<typeof useClasses_13>;
|
|
4654
4673
|
|
|
4655
4674
|
export declare const HvOptionGroup: ForwardRefExoticComponent<Omit<HvOptionGroupProps, "ref"> & RefAttributes<HTMLLIElement>>;
|
|
@@ -4871,6 +4890,7 @@ export declare interface HvQueryBuilderAttribute extends Record<string, unknown>
|
|
|
4871
4890
|
type: DefaultAttributes | (string & {});
|
|
4872
4891
|
}
|
|
4873
4892
|
|
|
4893
|
+
/** @deprecated */
|
|
4874
4894
|
export declare interface HvQueryBuilderChangedQuery extends Omit<HvQueryBuilderQuery, "id" | "rules"> {
|
|
4875
4895
|
rules: Array<Omit<HvQueryBuilderQueryRule, "id"> | HvQueryBuilderChangedQuery>;
|
|
4876
4896
|
}
|
|
@@ -5168,10 +5188,18 @@ export declare interface HvQueryBuilderProps {
|
|
|
5168
5188
|
operators?: Record<string, HvQueryBuilderQueryOperator[]>;
|
|
5169
5189
|
/** The query combinators operands. */
|
|
5170
5190
|
combinators?: HvQueryBuilderQueryCombinator[];
|
|
5171
|
-
/** The
|
|
5191
|
+
/** The query when the component is controlled. */
|
|
5192
|
+
value?: HvQueryBuilderQuery;
|
|
5193
|
+
/** The initial query when the component is uncontrolled. */
|
|
5194
|
+
defaultValue?: HvQueryBuilderQuery;
|
|
5195
|
+
/**
|
|
5196
|
+
* The initial query when the component is uncontrolled.
|
|
5197
|
+
*
|
|
5198
|
+
* @deprecated Use `defaultValue` instead.
|
|
5199
|
+
* */
|
|
5172
5200
|
query?: HvQueryBuilderQuery;
|
|
5173
|
-
/** Callback fired when query changes. */
|
|
5174
|
-
onChange?: (value:
|
|
5201
|
+
/** Callback fired when the query changes. */
|
|
5202
|
+
onChange?: (value: HvQueryBuilderQuery) => void;
|
|
5175
5203
|
/** Max depth of nested query groups. */
|
|
5176
5204
|
maxDepth?: number;
|
|
5177
5205
|
/** Object containing all the labels. */
|
|
@@ -5202,9 +5230,7 @@ export declare interface HvQueryBuilderQueryCombinator {
|
|
|
5202
5230
|
label: string;
|
|
5203
5231
|
}
|
|
5204
5232
|
|
|
5205
|
-
export declare interface HvQueryBuilderQueryGroup {
|
|
5206
|
-
id: React.Key;
|
|
5207
|
-
combinator: string;
|
|
5233
|
+
export declare interface HvQueryBuilderQueryGroup extends Omit<HvOptional<QueryGroup, "id">, "rules"> {
|
|
5208
5234
|
rules: Array<HvQueryBuilderQueryRule | HvQueryBuilderQueryGroup>;
|
|
5209
5235
|
}
|
|
5210
5236
|
|
|
@@ -5214,12 +5240,7 @@ export declare interface HvQueryBuilderQueryOperator {
|
|
|
5214
5240
|
combinators: string[];
|
|
5215
5241
|
}
|
|
5216
5242
|
|
|
5217
|
-
export declare
|
|
5218
|
-
id: React.Key;
|
|
5219
|
-
attribute?: string;
|
|
5220
|
-
operator?: string;
|
|
5221
|
-
value?: HvQueryBuilderQueryRuleValue;
|
|
5222
|
-
}
|
|
5243
|
+
export declare type HvQueryBuilderQueryRule = HvOptional<QueryRule, "id">;
|
|
5223
5244
|
|
|
5224
5245
|
export declare type HvQueryBuilderQueryRuleValue = string | number | boolean | HvQueryBuilderNumericRange | HvQueryBuilderDateTimeStrings | HvQueryBuilderDateTimeRange;
|
|
5225
5246
|
|
|
@@ -8032,6 +8053,8 @@ export declare const progressBarClasses: {
|
|
|
8032
8053
|
|
|
8033
8054
|
declare type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
8034
8055
|
|
|
8056
|
+
declare type Query = QueryGroup;
|
|
8057
|
+
|
|
8035
8058
|
declare type QueryAction = {
|
|
8036
8059
|
type: "reset-query";
|
|
8037
8060
|
} | {
|
|
@@ -8059,6 +8082,9 @@ declare type QueryAction = {
|
|
|
8059
8082
|
type: "set-value";
|
|
8060
8083
|
id: React.Key;
|
|
8061
8084
|
value: HvQueryBuilderQueryRuleValue | null | any;
|
|
8085
|
+
} | {
|
|
8086
|
+
type: "set-query";
|
|
8087
|
+
query: Query;
|
|
8062
8088
|
};
|
|
8063
8089
|
|
|
8064
8090
|
export declare const queryBuilderClasses: {
|
|
@@ -8081,6 +8107,19 @@ export declare const queryBuilderClasses: {
|
|
|
8081
8107
|
buttonBackground: "HvQueryBuilder-buttonBackground";
|
|
8082
8108
|
};
|
|
8083
8109
|
|
|
8110
|
+
declare interface QueryGroup {
|
|
8111
|
+
id: React.Key;
|
|
8112
|
+
combinator: string;
|
|
8113
|
+
rules: Array<QueryRule | QueryGroup>;
|
|
8114
|
+
}
|
|
8115
|
+
|
|
8116
|
+
declare interface QueryRule {
|
|
8117
|
+
id: React.Key;
|
|
8118
|
+
attribute?: string;
|
|
8119
|
+
operator?: string;
|
|
8120
|
+
value?: HvQueryBuilderQueryRuleValue;
|
|
8121
|
+
}
|
|
8122
|
+
|
|
8084
8123
|
export declare const radioClasses: {
|
|
8085
8124
|
container: "HvRadio-container";
|
|
8086
8125
|
label: "HvRadio-label";
|
|
@@ -9551,7 +9590,7 @@ declare const useClasses_31: (classesProp?: Partial<Record<"root" | "disabled" |
|
|
|
9551
9590
|
cx: (...args: any) => string;
|
|
9552
9591
|
};
|
|
9553
9592
|
|
|
9554
|
-
declare const useClasses_32: (classesProp?: Partial<Record<"root" | "disabled" | "readOnly" | "switch" | "switchBase" | "track" | "
|
|
9593
|
+
declare const useClasses_32: (classesProp?: Partial<Record<"root" | "disabled" | "readOnly" | "switch" | "switchBase" | "track" | "thumb" | "checked" | "focusVisible", string>>, addStatic?: boolean) => {
|
|
9555
9594
|
classes: {
|
|
9556
9595
|
root: string;
|
|
9557
9596
|
disabled: string;
|
|
@@ -9559,9 +9598,9 @@ declare const useClasses_32: (classesProp?: Partial<Record<"root" | "disabled" |
|
|
|
9559
9598
|
switch: string;
|
|
9560
9599
|
switchBase: string;
|
|
9561
9600
|
track: string;
|
|
9601
|
+
thumb: string;
|
|
9562
9602
|
checked: string;
|
|
9563
9603
|
focusVisible: string;
|
|
9564
|
-
thumb: string;
|
|
9565
9604
|
};
|
|
9566
9605
|
css: {
|
|
9567
9606
|
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
@@ -11058,6 +11097,8 @@ export declare interface UseHvRowSelectionTableRowProps {
|
|
|
11058
11097
|
selected?: boolean;
|
|
11059
11098
|
}
|
|
11060
11099
|
|
|
11100
|
+
export declare const useHvRowState: typeof useRowState;
|
|
11101
|
+
|
|
11061
11102
|
export declare const useHvSnackbar: () => {
|
|
11062
11103
|
enqueueSnackbar: (message: React.ReactNode, options?: HvNotistackSnackMessageProps) => SnackbarKey;
|
|
11063
11104
|
closeSnackbar: (key?: SnackbarKey | undefined) => void;
|
|
@@ -11196,6 +11237,10 @@ export declare type UseRowSelectionProps = (<D extends object = Record<string, u
|
|
|
11196
11237
|
pluginName: string;
|
|
11197
11238
|
};
|
|
11198
11239
|
|
|
11240
|
+
export declare type UseRowStateProps = (<D extends object = Record<string, unknown>>(hooks: Hooks<D>) => void) & {
|
|
11241
|
+
pluginName: string;
|
|
11242
|
+
};
|
|
11243
|
+
|
|
11199
11244
|
export declare function useSavedState<T>(defaultState: T): readonly [T | undefined, (value?: T, save?: boolean) => void, () => void, T | undefined, T];
|
|
11200
11245
|
|
|
11201
11246
|
export declare const useSelectionPath: (data: HvHeaderNavigationItemProp[], selectedId?: string) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.60.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@emotion/css": "^11.11.2",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
35
|
"@emotion/utils": "^1.2.1",
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.9.
|
|
37
|
-
"@hitachivantara/uikit-react-shared": "^5.1.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.9.3",
|
|
37
|
+
"@hitachivantara/uikit-react-shared": "^5.1.35",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.25.0",
|
|
39
39
|
"@internationalized/date": "^3.2.0",
|
|
40
40
|
"@mui/base": "^5.0.0-beta.34",
|
|
41
41
|
"@popperjs/core": "^2.11.8",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"access": "public",
|
|
63
63
|
"directory": "package"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "68cdbb3a465690f8823074ba7390d9b721a42dd6",
|
|
66
66
|
"main": "dist/cjs/index.cjs",
|
|
67
67
|
"exports": {
|
|
68
68
|
".": {
|