Skip to content

Commit

Permalink
Update deps & move bmp gen to legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
nfour committed Oct 17, 2023
1 parent 0072567 commit c7f9a51
Show file tree
Hide file tree
Showing 23 changed files with 346 additions and 2,488 deletions.
8 changes: 4 additions & 4 deletions apps/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@emotion/styled": "^11.3.0",
"history": "^5.0.0",
"mapbox-gl": "^2.9.2",
"mobx": "^6.6.1",
"mobx-react-lite": "^3.4.0",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-map-gl": "6.1.12",
Expand All @@ -36,8 +36,8 @@
"@types/geojson": "^7946.0.7",
"@types/node": "^18.0.6",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@vitejs/plugin-react": "^2.0.0",
"eslint-config-nfour": "^3.5.0",
"typescript": "^4.7.4",
Expand Down
5 changes: 2 additions & 3 deletions apps/stories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"luxon": "^3.0.3",
"@types/luxon": "^3.0.1",
"@dhi/arsenal.date-slider": "workspace:*",
"@dhi/arsenal.bmpgenerator": "workspace:*",
"@dhi/arsenal.jsonform": "workspace:*",
"@dhi/arsenal.models": "workspace:*",
"@dhi/arsenal.ui": "workspace:*",
Expand All @@ -34,8 +33,8 @@
},
"devDependencies": {
"eslint-config-nfour": "^3.5.0",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/node": "^18.0.6",
"vite": "^3.1.2",
"@vitejs/plugin-react": "^2.1.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@babel/plugin-syntax-typescript": "^7.12.13",
"@emotion/babel-plugin": "^11.3.0",
"@types/node": "^18.0.6",
"@types/react": "^18.0.15",
"@types/react": "^18.2.28",
"@types/webpack": "^5.28.0",
"babel-loader": "^8.2.2",
"css-loader": "^5.2.2",
Expand All @@ -72,7 +72,7 @@
"react-dom": "^17.0.2",
"style-loader": "^2.0.0",
"ts-node": "^10.2.1",
"typescript": "^4.7.4",
"typescript": "^5.2.2",
"webpack": "^5.36",
"webpack-cli": "^4.10.0"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions libs/date-slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"@mui/material": "^5.4.3",
"@types/node": "^18.0.6",
"@types/luxon": "^3.0.1",
"@types/react": "^18.0.15",
"mobx": "^6.8.0",
"@types/react": "^18.2.28",
"mobx": "^6.10.2",
"mobx-react-lite": "^3.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions libs/jsonform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@types/node": "^18.0.6",
"@types/react": "^18.0.15",
"mobx": "^6.10.0",
"@types/react": "^18.2.28",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion libs/models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@types/node": "^18.0.6",
"mobx": "^6.10.0",
"mobx": "^6.10.2",
"typescript": "^5.1.6"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion libs/scenarios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"@mui/material": "~5.14.4",
"@types/lodash-es": "^4.17.6",
"@types/node": "^18.0.6",
"@types/react": "^18.0.15",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/uuid": "^8.3.4",
"@vitejs/plugin-react": "^4.0.4",
"eslint-config-nfour": "^3.5.0",
Expand Down
70 changes: 43 additions & 27 deletions libs/scenarios/src/editor/ScenarioConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ import { useEffect } from 'react';
export type ConfigEditorProps = Pick<
Partial<PropsOf<typeof FormConfigEditor>>,
'className' | 'operations' | 'onData' | 'onInit' | 'validation' | 'readOnly'
>;
> & {
scenarioActions?: {
delete?: {
disabled?: boolean;
};
clone?: {
disabled?: boolean;
};
};
};

export const ScenarioConfigEditor = observer<{
editor?: ConfigEditorProps;
Expand Down Expand Up @@ -46,7 +55,10 @@ export const ScenarioConfigEditor = observer<{

if (!activeScenario) return <></>;

const actions = editor.scenarioActions;
const showConfigActionBar = draftScenario.value?.id !== activeScenario?.id;
const isAllActionsDisabled =
actions?.delete?.disabled === true && actions?.clone?.disabled === true;

return (
<$Col grow>
Expand Down Expand Up @@ -84,7 +96,7 @@ export const ScenarioConfigEditor = observer<{
...(editor.operations ?? {}),
}}
/>
{showConfigActionBar && (
{showConfigActionBar && !isAllActionsDisabled && (
<ButtonGroup
css={css`
width: 100%;
Expand All @@ -93,32 +105,36 @@ export const ScenarioConfigEditor = observer<{
position: relative;
`}
>
<ConfirmDropdown
css={css`
color: #ff1100ae;
`}
trigger={{
icon: <DeleteIcon />,
label: <>Delete</>,
}}
confirm={{
icon: <DeleteIcon />,
label: <>Delete Scenario</>,
onClick: () => deleteScenario?.(activeScenario.id),
}}
/>
{!actions?.delete?.disabled && (
<ConfirmDropdown
css={css`
color: #ff1100ae;
`}
trigger={{
icon: <DeleteIcon />,
label: <>Delete</>,
}}
confirm={{
icon: <DeleteIcon />,
label: <>Delete Scenario</>,
onClick: () => deleteScenario?.(activeScenario.id),
}}
/>
)}

<ConfirmDropdown
trigger={{
icon: <CloneIcon />,
label: <>Clone</>,
}}
confirm={{
icon: <CloneIcon />,
label: <>Clone Scenario</>,
onClick: () => cloneScenario?.(activeScenario),
}}
/>
{!actions?.clone?.disabled && (
<ConfirmDropdown
trigger={{
icon: <CloneIcon />,
label: <>Clone</>,
}}
confirm={{
icon: <CloneIcon />,
label: <>Clone Scenario</>,
onClick: () => cloneScenario?.(activeScenario),
}}
/>
)}
</ButtonGroup>
)}
</$Col>
Expand Down
4 changes: 2 additions & 2 deletions libs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@types/react": "^18.0.15",
"mobx": "^6.8.0",
"@types/react": "^18.2.28",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
Loading

0 comments on commit c7f9a51

Please sign in to comment.