@gridsuite/commons-ui 0.92.3 → 0.93.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/components/checkBoxList/CheckBoxList.js +1 -1
- package/dist/components/checkBoxList/CheckBoxListItems.js +1 -1
- package/dist/components/checkBoxList/checkBoxList.type.d.ts +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/inputs/ActivableChip.d.ts +14 -0
- package/dist/components/inputs/ActivableChip.js +22 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/inputs/index.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Box } from "@mui/material";
|
|
4
|
-
import { DragDropContext, Droppable } from "
|
|
4
|
+
import { DragDropContext, Droppable } from "@hello-pangea/dnd";
|
|
5
5
|
import { CheckBoxListItems } from "./CheckBoxListItems.js";
|
|
6
6
|
function CheckBoxList({
|
|
7
7
|
isDndDragAndDropActive = false,
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
import { List, ListItem, ListItemButton, ListItemIcon, Checkbox, ListItemText } from "@mui/material";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
|
-
import { Draggable } from "
|
|
5
|
+
import { Draggable } from "@hello-pangea/dnd";
|
|
6
6
|
import { CheckBoxListItem } from "./CheckBoxListItem.js";
|
|
7
7
|
import { OverflowableText } from "../overflowableText/OverflowableText.js";
|
|
8
8
|
import { DraggableCheckBoxListItem } from "./DraggableCheckBoxListItem.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { DraggableProvided, DragStart, DropResult } from '
|
|
2
|
+
import { DraggableProvided, DragStart, DropResult } from '@hello-pangea/dnd';
|
|
3
3
|
import { SxProps, Theme } from '@mui/material';
|
|
4
4
|
export type CheckBoxListItemSx = {
|
|
5
5
|
checkBoxIcon?: SxProps<Theme>;
|
package/dist/components/index.js
CHANGED
|
@@ -93,6 +93,7 @@ import { GroupValueEditor } from "./inputs/reactQueryBuilder/compositeRuleEditor
|
|
|
93
93
|
import { RuleValueEditor } from "./inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
|
|
94
94
|
import { useConvertValue } from "./inputs/reactQueryBuilder/hooks/useConvertValue.js";
|
|
95
95
|
import { useValid } from "./inputs/reactQueryBuilder/hooks/useValid.js";
|
|
96
|
+
import { ActivableChip } from "./inputs/ActivableChip.js";
|
|
96
97
|
import { MultipleSelectionDialog } from "./multipleSelectionDialog/MultipleSelectionDialog.js";
|
|
97
98
|
import { OverflowableText } from "./overflowableText/OverflowableText.js";
|
|
98
99
|
import { SnackbarProvider } from "./snackbarProvider/SnackbarProvider.js";
|
|
@@ -106,6 +107,7 @@ import { useNotificationsListener } from "./notifications/hooks/useNotifications
|
|
|
106
107
|
import { useListenerManager } from "./notifications/hooks/useListenerManager.js";
|
|
107
108
|
export {
|
|
108
109
|
AboutDialog,
|
|
110
|
+
ActivableChip,
|
|
109
111
|
AddButton,
|
|
110
112
|
AuthenticationRouter,
|
|
111
113
|
default2 as AuthenticationRouterErrorDisplay,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export interface ActivableChipProps {
|
|
8
|
+
isActivated: boolean;
|
|
9
|
+
label: string;
|
|
10
|
+
tooltipMessage: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ActivableChip(props: Readonly<ActivableChipProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip, Chip } from "@mui/material";
|
|
3
|
+
import { CheckCircleOutline, Cancel } from "@mui/icons-material";
|
|
4
|
+
function ActivableChip(props) {
|
|
5
|
+
const { isActivated, label, tooltipMessage, onClick, isDisabled } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: tooltipMessage, arrow: true, children: /* @__PURE__ */ jsx(
|
|
7
|
+
Chip,
|
|
8
|
+
{
|
|
9
|
+
label,
|
|
10
|
+
deleteIcon: isActivated ? /* @__PURE__ */ jsx(CheckCircleOutline, {}) : /* @__PURE__ */ jsx(Cancel, {}),
|
|
11
|
+
color: "primary",
|
|
12
|
+
size: "small",
|
|
13
|
+
variant: isActivated ? "filled" : "outlined",
|
|
14
|
+
onDelete: onClick,
|
|
15
|
+
onClick,
|
|
16
|
+
disabled: isDisabled
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
ActivableChip
|
|
22
|
+
};
|
|
@@ -51,7 +51,9 @@ import { GroupValueEditor } from "./reactQueryBuilder/compositeRuleEditor/GroupV
|
|
|
51
51
|
import { RuleValueEditor } from "./reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
|
|
52
52
|
import { useConvertValue } from "./reactQueryBuilder/hooks/useConvertValue.js";
|
|
53
53
|
import { useValid } from "./reactQueryBuilder/hooks/useValid.js";
|
|
54
|
+
import { ActivableChip } from "./ActivableChip.js";
|
|
54
55
|
export {
|
|
56
|
+
ActivableChip,
|
|
55
57
|
AddButton,
|
|
56
58
|
AutocompleteInput,
|
|
57
59
|
AutocompleteWithFavorites,
|
package/dist/index.js
CHANGED
|
@@ -94,6 +94,7 @@ import { GroupValueEditor } from "./components/inputs/reactQueryBuilder/composit
|
|
|
94
94
|
import { RuleValueEditor } from "./components/inputs/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
|
|
95
95
|
import { useConvertValue } from "./components/inputs/reactQueryBuilder/hooks/useConvertValue.js";
|
|
96
96
|
import { useValid } from "./components/inputs/reactQueryBuilder/hooks/useValid.js";
|
|
97
|
+
import { ActivableChip } from "./components/inputs/ActivableChip.js";
|
|
97
98
|
import { MultipleSelectionDialog } from "./components/multipleSelectionDialog/MultipleSelectionDialog.js";
|
|
98
99
|
import { OverflowableText } from "./components/overflowableText/OverflowableText.js";
|
|
99
100
|
import { SnackbarProvider } from "./components/snackbarProvider/SnackbarProvider.js";
|
|
@@ -189,6 +190,7 @@ import * as yup from "yup";
|
|
|
189
190
|
export {
|
|
190
191
|
AMPERE,
|
|
191
192
|
AboutDialog,
|
|
193
|
+
ActivableChip,
|
|
192
194
|
AddButton,
|
|
193
195
|
AuthenticationRouter,
|
|
194
196
|
default3 as AuthenticationRouterErrorDisplay,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"author": "gridsuite team",
|
|
6
6
|
"homepage": "https://github.com/gridsuite",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
37
38
|
"@react-querybuilder/dnd": "^8.2.0",
|
|
38
39
|
"@react-querybuilder/material": "^8.2.0",
|
|
39
40
|
"autosuggest-highlight": "^3.3.4",
|
|
@@ -42,7 +43,6 @@
|
|
|
42
43
|
"localized-countries": "^2.0.0",
|
|
43
44
|
"oidc-client": "^1.11.5",
|
|
44
45
|
"prop-types": "^15.8.1",
|
|
45
|
-
"react-beautiful-dnd": "^13.1.1",
|
|
46
46
|
"react-csv-downloader": "^3.3.0",
|
|
47
47
|
"react-dnd": "^16.0.1",
|
|
48
48
|
"react-dnd-html5-backend": "^16.0.1",
|
|
@@ -96,7 +96,6 @@
|
|
|
96
96
|
"@types/node": "^22.13.4",
|
|
97
97
|
"@types/prop-types": "^15.7.14",
|
|
98
98
|
"@types/react": "^18.3.18",
|
|
99
|
-
"@types/react-beautiful-dnd": "^13.1.8",
|
|
100
99
|
"@types/react-dom": "^18.3.5",
|
|
101
100
|
"@types/react-resizable": "^3.0.8",
|
|
102
101
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|