flow-lib-creomnia 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# creo-flow
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`<NodesFlow />`
|
|
6
|
-
|
|
7
|
-
Props:
|
|
8
|
-
|
|
9
|
-
- `nodes` - `NodeType[]`
|
|
10
|
-
- `menuTabs` - `MenuTabType[]`
|
|
11
|
-
- `addNewNodeCallback` - `AddNewNodeCallbackType`
|
|
12
|
-
- `addButtonColor`(optional) - `string`
|
|
3
|
+
[](https://github.com/creomnia/creo-flow/actions/workflows/ci.yml)
|
|
@@ -7,6 +7,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const styled_1 = require("./styled");
|
|
9
9
|
const Grid_1 = __importDefault(require("@mui/material/Grid"));
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
10
12
|
const NodesMenu = ({ addNewNodeCallback, menuTabs, data, onCloseMenu, emptyMenuItemsComponent, searchPlaceholder, }) => {
|
|
11
13
|
const [value, setValue] = (0, react_1.useState)(menuTabs?.[0].name);
|
|
12
14
|
const [searchQuery, setSearchQuery] = (0, react_1.useState)("");
|
|
@@ -33,7 +35,7 @@ const NodesMenu = ({ addNewNodeCallback, menuTabs, data, onCloseMenu, emptyMenuI
|
|
|
33
35
|
return tab[value].filter((menuItem) => menuItem.name.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
34
36
|
}, [searchQuery, value]);
|
|
35
37
|
return ((0, jsx_runtime_1.jsxs)(styled_1.MenuContainer, { children: [(0, jsx_runtime_1.jsxs)(Grid_1.default, { direction: "column", p: "0 0 10px 0", children: [(0, jsx_runtime_1.jsxs)(Grid_1.default, { alignItems: "center", container: true, p: "8px 8px 0 0", children: [(0, jsx_runtime_1.jsx)(Grid_1.default, { flexGrow: 1, item: true, children: (0, jsx_runtime_1.jsx)(styled_1.StyledTabs, { value: value, onChange: handleChange, textColor: "primary", indicatorColor: "primary", children: menuTabs.map((tab) => ((0, jsx_runtime_1.jsx)(styled_1.StyledTab, { value: tab.name, label: tab.name }, tab.name))) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, children: (0, jsx_runtime_1.jsx)(styled_1.Close, { onClick: onCloseMenu }) })] }), (0, jsx_runtime_1.jsx)(styled_1.StyledTextField, { fullWidth: true, variant: "outlined", size: "small", placeholder: searchPlaceholder ? searchPlaceholder : "", value: searchQuery, onChange: handleSearchChange })] }), (0, jsx_runtime_1.jsx)(styled_1.ContentContainer, { children: filteredItems?.length > 0
|
|
36
|
-
? filteredItems.map((menuItem) => ((0, jsx_runtime_1.jsxs)(styled_1.MenuItem, { onClick: () => onMenuItemClick(menuItem.value, menuItem.type), children: [(0, jsx_runtime_1.jsx)(styled_1.IconWrapper, { children: menuItem.icon }), menuItem.name] }, menuItem.value)))
|
|
38
|
+
? filteredItems.map((menuItem) => ((0, jsx_runtime_1.jsxs)(styled_1.MenuItem, { style: { opacity: menuItem?.disabled ? 0.5 : 1, cursor: menuItem?.disabled ? 'not-allowed' : 'pointer' }, onClick: () => !menuItem?.disabled && onMenuItemClick(menuItem.value, menuItem.type), children: [(0, jsx_runtime_1.jsx)(styled_1.IconWrapper, { children: menuItem?.disabled ? (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: 'Building process', children: (0, jsx_runtime_1.jsx)(icons_material_1.BuildCircle, {}) }) : menuItem.icon }), menuItem.name] }, menuItem.value)))
|
|
37
39
|
: emptyMenuItemsComponent && emptyMenuItemsComponent })] }));
|
|
38
40
|
};
|
|
39
41
|
exports.default = NodesMenu;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-lib-creomnia",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"clean": "rm -rf ./lib",
|
|
11
11
|
"copy-files": "cp -R src/assets lib/assets",
|
|
12
12
|
"build": "npm run clean && tsc && npm run copy-files",
|
|
13
|
-
"publish-package": "npm run build && npm publish"
|
|
13
|
+
"publish-package": "npm run build && npm publish",
|
|
14
|
+
"publishPackage": "npm run build && npm publish",
|
|
15
|
+
"publishPackageDev": "npm run build && npm publish --tag dev",
|
|
16
|
+
"publishPackageQa": "npm run build && npm publish --tag qa"
|
|
14
17
|
},
|
|
15
18
|
"keywords": [],
|
|
16
19
|
"author": "",
|