ebta-workflow-prod 4.0.24 → 4.1.1
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/build/main.js +11 -6
- package/eslint.config.js +12 -0
- package/package.json +55 -46
- package/src/activities/DrapGeometry.ts +3 -3
- package/src/elements/AttributeFilter.tsx +26 -42
- package/src/elements/CsColorPicker.tsx +3 -3
- package/src/elements/ItemSearcher.tsx +1 -1
- package/src/elements/ItemSearcher_v2.tsx +1 -1
- package/src/elements/modules/AttributeFilterEasyComp.tsx +30 -59
- package/tsconfig.json +2 -0
- /package/{uuid.js → uuid.cjs} +0 -0
package/eslint.config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
3
|
+
import baseConfig from "@vertigis/workflow-sdk/config/eslint.config.js";
|
|
4
|
+
|
|
5
|
+
export default defineConfig([
|
|
6
|
+
globalIgnores(["**/*.js", "**/*.d.ts"]),
|
|
7
|
+
baseConfig,
|
|
8
|
+
{
|
|
9
|
+
// Add your custom rules or other eslint config overrides here.
|
|
10
|
+
rules: {}
|
|
11
|
+
}
|
|
12
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,47 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
2
|
+
"name": "ebta-workflow-prod",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "4.1.1",
|
|
5
|
+
"description": "",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"author": "",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "vertigis-workflow-sdk build",
|
|
10
|
+
"generate": "vertigis-workflow-sdk generate",
|
|
11
|
+
"start": "vertigis-workflow-sdk start"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/react": "^19.2.18",
|
|
15
|
+
"@types/react-dom": "^19.2.4",
|
|
16
|
+
"@vertigis/workflow": "^5.52.2",
|
|
17
|
+
"@vertigis/workflow-sdk": "^6.1.1",
|
|
18
|
+
"node-fetch": "^3.3.2",
|
|
19
|
+
"typescript": "^5.4.0"
|
|
20
|
+
},
|
|
21
|
+
"browserslist": [
|
|
22
|
+
"last 2 chrome versions",
|
|
23
|
+
"last 2 edge versions",
|
|
24
|
+
"last 2 firefox versions",
|
|
25
|
+
"last 2 safari versions",
|
|
26
|
+
"ie 11"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@arcgis/core": "^5.1.19",
|
|
30
|
+
"@emotion/react": "^11.14.0",
|
|
31
|
+
"@emotion/styled": "^11.14.1",
|
|
32
|
+
"@fseehawer/react-circular-slider": "^3.2.7",
|
|
33
|
+
"@mantine/core": "^7.16.0",
|
|
34
|
+
"@mantine/hooks": "^9.5.1",
|
|
35
|
+
"@mui/icons-material": "^5.17.1",
|
|
36
|
+
"@mui/base": "5.0.0-beta.70",
|
|
37
|
+
"@mui/material": "^5.17.1",
|
|
38
|
+
"@mui/x-charts": "^7.6.2",
|
|
39
|
+
"@turf/turf": "^6.5.0",
|
|
40
|
+
"@types/arcgis-js-api": "^4.28.0",
|
|
41
|
+
"@vertigis/web": "^5.43.1",
|
|
42
|
+
"@xmldom/xmldom": "^0.8.10",
|
|
43
|
+
"arcgis-js-api": "^4.30.8",
|
|
44
|
+
"axios": "^1.7.7",
|
|
45
|
+
"dayjs": "^1.11.23",
|
|
46
|
+
"html2canvas": "^1.4.1",
|
|
47
|
+
"pannellum-react-update": "^1.0.0",
|
|
48
|
+
"pdf-lib": "^1.17.1",
|
|
49
|
+
"qrcode": "^1.5.4",
|
|
50
|
+
"react-color": "^2.19.3",
|
|
51
|
+
"react-color-palette": "^7.3.0",
|
|
52
|
+
"react-simple-image-slider": "^2.4.1",
|
|
53
|
+
"react-slideshow-image": "^4.3.1"
|
|
54
|
+
},
|
|
55
|
+
"type": "module"
|
|
56
|
+
}
|
|
@@ -4,8 +4,8 @@ import Multipoint from "@arcgis/core/geometry/Multipoint";
|
|
|
4
4
|
import Polyline from "@arcgis/core/geometry/Polyline";
|
|
5
5
|
import Polygon from "@arcgis/core/geometry/Polygon";
|
|
6
6
|
import ElevationLayer from "@arcgis/core/layers/ElevationLayer";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import Geometry from "@arcgis/core/geometry/Geometry";
|
|
8
|
+
import SpatialReference from "@arcgis/core/geometry/SpatialReference";
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
/** An interface that defines the inputs of the activity. */
|
|
@@ -57,7 +57,7 @@ export default class DrapGeometryActivity implements IActivityHandler {
|
|
|
57
57
|
return result.geometry as Polyline;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
let geometry3D:
|
|
60
|
+
let geometry3D:Point | Multipoint | Polyline | Polygon;
|
|
61
61
|
|
|
62
62
|
// Handle different types of geometry
|
|
63
63
|
if (inputs.inputGeometry instanceof Point) {
|
|
@@ -18,14 +18,10 @@ import Box from "@vertigis/web/ui/Box"
|
|
|
18
18
|
import Checkbox from "@vertigis/web/ui/Checkbox"
|
|
19
19
|
import { ThemeProvider } from "@emotion/react";
|
|
20
20
|
import Typography from '@vertigis/web/ui/Typography';
|
|
21
|
-
import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
|
|
22
21
|
import dayjs, { Dayjs } from 'dayjs';
|
|
23
22
|
import timezone from 'dayjs/plugin/timezone';
|
|
24
23
|
import utc from 'dayjs/plugin/utc';
|
|
25
24
|
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
26
|
-
import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
|
|
27
|
-
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
28
|
-
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
29
25
|
import 'dayjs/locale/en-au';
|
|
30
26
|
import Chip from '@mui/material/Chip';
|
|
31
27
|
import Button from '@vertigis/web/ui/Button';
|
|
@@ -34,8 +30,8 @@ import RadioGroup from '@vertigis/web/ui/RadioGroup';
|
|
|
34
30
|
import FormControlLabel from '@vertigis/web/ui/FormControlLabel';
|
|
35
31
|
import AttributeFilterEasyComp from './modules/AttributeFilterEasyComp';
|
|
36
32
|
import Stack from '@vertigis/web/ui/Stack';
|
|
37
|
-
import Graphic from "
|
|
38
|
-
const { Search, SearchIconWrapper, StyledInputBase, StyledBadge, LightTooltip, defaultTheme, CustomNumberInput
|
|
33
|
+
import Graphic from "@arcgis/core/Graphic";
|
|
34
|
+
const { Search, SearchIconWrapper, StyledInputBase, StyledBadge, LightTooltip, defaultTheme, CustomNumberInput} = AttributeFilterEasyComp;
|
|
39
35
|
dayjs.extend(utc);
|
|
40
36
|
dayjs.extend(timezone);
|
|
41
37
|
dayjs.extend(customParseFormat);
|
|
@@ -1392,42 +1388,30 @@ function AttributeFilter(props: AttributeFilterProps): React.ReactElement {
|
|
|
1392
1388
|
{attribute.uniqValue ?
|
|
1393
1389
|
(<Collapse in={attribute.display} timeout="auto" unmountOnExit>
|
|
1394
1390
|
{attribute.type && attribute.type == 'date' && (attribute.uniqValue.length > 6) ?
|
|
1395
|
-
<Box display="flex" alignItems="center" >
|
|
1396
|
-
<
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
borderColor: 'var(--accentIconBorder)', // Change border color on hover
|
|
1420
|
-
},
|
|
1421
|
-
'&.Mui-focused fieldset': {
|
|
1422
|
-
borderColor: 'var(--accentIconBorder)', // Change border color when focused
|
|
1423
|
-
},
|
|
1424
|
-
},
|
|
1425
|
-
}}
|
|
1426
|
-
|
|
1427
|
-
/>
|
|
1428
|
-
</LocalizationProvider>
|
|
1429
|
-
</DemoContainer>
|
|
1430
|
-
</LocalizationProvider>
|
|
1391
|
+
<Box display="flex" alignItems="center" gap={1}>
|
|
1392
|
+
<input
|
|
1393
|
+
type="date"
|
|
1394
|
+
value={startDate ? startDate.format('YYYY-MM-DD') : ''}
|
|
1395
|
+
min={dayjs.unix(minDate.current).format('YYYY-MM-DD')}
|
|
1396
|
+
max={dayjs.unix(maxDate.current).format('YYYY-MM-DD')}
|
|
1397
|
+
onChange={(event) => {
|
|
1398
|
+
const newStart = event.target.value ? dayjs(event.target.value) : startDate;
|
|
1399
|
+
handleDateRangeChange(newStart, endDate);
|
|
1400
|
+
}}
|
|
1401
|
+
style={{ color: 'var(--accentIconBorder)', border: '1px solid var(--accentIconBorder)', borderRadius: 4, padding: '4px 8px', marginRight: 8 }}
|
|
1402
|
+
/>
|
|
1403
|
+
<span>to</span>
|
|
1404
|
+
<input
|
|
1405
|
+
type="date"
|
|
1406
|
+
value={endDate ? endDate.format('YYYY-MM-DD') : ''}
|
|
1407
|
+
min={dayjs.unix(minDate.current).format('YYYY-MM-DD')}
|
|
1408
|
+
max={dayjs.unix(maxDate.current).format('YYYY-MM-DD')}
|
|
1409
|
+
onChange={(event) => {
|
|
1410
|
+
const newEnd = event.target.value ? dayjs(event.target.value) : endDate;
|
|
1411
|
+
handleDateRangeChange(startDate, newEnd);
|
|
1412
|
+
}}
|
|
1413
|
+
style={{ color: 'var(--accentIconBorder)', border: '1px solid var(--accentIconBorder)', borderRadius: 4, padding: '4px 8px', marginLeft: 8 }}
|
|
1414
|
+
/>
|
|
1431
1415
|
</Box>
|
|
1432
1416
|
:
|
|
1433
1417
|
ISnumberAttribute && (attribute.uniqValue.length > 6) ?
|
|
@@ -2,11 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
import { MantineProvider } from '@mantine/core';
|
|
3
3
|
import { FormElementProps, FormElementRegistration } from "@vertigis/workflow";
|
|
4
4
|
import { ColorInput, ColorPicker } from '@mantine/core';
|
|
5
|
-
|
|
5
|
+
type ColorFormat = "hex" | "rgba" | "rgb" | "hsl" | "hsla";
|
|
6
6
|
|
|
7
7
|
import "@mantine/core/styles.css";
|
|
8
8
|
|
|
9
|
-
import Color from "
|
|
9
|
+
import Color from "@arcgis/core/Color";
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
declare module "@vertigis/workflow" {
|
|
@@ -73,7 +73,7 @@ function CsColorPickerV2(props: CsColorPickerV2Props): React.ReactElement {
|
|
|
73
73
|
esriColor = new Color(color);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
setProperty("esriColor" as any, esriColor);
|
|
77
77
|
setValue(color);
|
|
78
78
|
raiseEvent("changed", color);
|
|
79
79
|
};
|
|
@@ -195,7 +195,7 @@ function ItemSearcherDEV(props: ItemSearcherDEVProps): React.ReactElement {
|
|
|
195
195
|
const [data, setData] = React.useState<Category[]>(props.itemData);
|
|
196
196
|
const isFirstRender = React.useRef(true);
|
|
197
197
|
const preSearchOpenCategories = React.useRef<Set<string>>(new Set());
|
|
198
|
-
const loadDataTime = React.useRef<number>();
|
|
198
|
+
const loadDataTime = React.useRef<number | undefined>(undefined);
|
|
199
199
|
const currentOpenCategories = React.useRef<Set<string>>(new Set());
|
|
200
200
|
const prevSearchValue = React.useRef<string>('')
|
|
201
201
|
const [selection, setSelection] = React.useState<{ [key: string]: { [key: string]: Item[] } }>({});
|
|
@@ -183,7 +183,7 @@ function ItemSearcher_V2(props: ItemSearcher_V2Props): React.ReactElement {
|
|
|
183
183
|
const [filteredData, setFilteredData] = React.useState<Category[]>([]); // New state for filtered data
|
|
184
184
|
const requestTime = React.useRef<number | null>(null)
|
|
185
185
|
const [inputValue, setInputValue] = React.useState<string>(searchQuery);
|
|
186
|
-
const debounceTimer = React.useRef<ReturnType<typeof setTimeout>>();
|
|
186
|
+
const debounceTimer = React.useRef<ReturnType<typeof setTimeout>>(undefined);
|
|
187
187
|
const latestOpenCategories = React.useRef<Set<string>>(openCategories);
|
|
188
188
|
|
|
189
189
|
|
|
@@ -5,9 +5,8 @@ import Badge, { BadgeProps } from '@mui/material/Badge';
|
|
|
5
5
|
import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
|
|
6
6
|
import { createTheme } from "@mui/material/styles";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
numberInputClasses,
|
|
8
|
+
Unstable_NumberInput as BaseNumberInput,
|
|
9
|
+
NumberInputProps,
|
|
11
10
|
} from '@mui/base/Unstable_NumberInput';
|
|
12
11
|
|
|
13
12
|
const Search =styled('div')(({ theme }) => ({
|
|
@@ -107,38 +106,8 @@ const StyledButton = styled('button')(
|
|
|
107
106
|
color: #FFF;
|
|
108
107
|
background: var(--accentIconForeground) !important;
|
|
109
108
|
border-color: var(--accentIconBorder) !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&.${numberInputClasses.incrementButton} {
|
|
113
|
-
grid-column: 2/3;
|
|
114
|
-
grid-row: 1/2;
|
|
115
|
-
border-top-left-radius: 4px;
|
|
116
|
-
border-top-right-radius: 4px;
|
|
117
|
-
border: 1px solid;
|
|
118
|
-
border-bottom: 0;
|
|
119
|
-
border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
|
|
120
|
-
background: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
|
|
121
|
-
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[900]};
|
|
122
|
-
|
|
123
|
-
&:hover {
|
|
124
|
-
cursor: pointer;
|
|
125
|
-
color: #FFF;
|
|
126
|
-
background: var(--accentIconForeground) !important;
|
|
127
|
-
border-color: var(--accentIconBorder);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&.${numberInputClasses.decrementButton} {
|
|
132
|
-
grid-column: 2/3;
|
|
133
|
-
grid-row: 2/3;
|
|
134
|
-
border-bottom-left-radius: 4px;
|
|
135
|
-
border-bottom-right-radius: 4px;
|
|
136
|
-
border: 1px solid;
|
|
137
|
-
border-color: ${theme.palette.mode === 'dark' ? grey[700] : grey[200]};
|
|
138
|
-
background: ${theme.palette.mode === 'dark' ? grey[900] : grey[50]};
|
|
139
|
-
color: ${theme.palette.mode === 'dark' ? grey[200] : grey[900]};
|
|
140
|
-
}
|
|
141
|
-
|
|
109
|
+
};
|
|
110
|
+
|
|
142
111
|
& .arrow {
|
|
143
112
|
transform: translateY(-1px);
|
|
144
113
|
}
|
|
@@ -173,31 +142,33 @@ const defaultTheme = createTheme({
|
|
|
173
142
|
},
|
|
174
143
|
});
|
|
175
144
|
|
|
176
|
-
const CustomNumberInput =React.forwardRef(function
|
|
177
|
-
|
|
178
|
-
|
|
145
|
+
const CustomNumberInput = React.forwardRef(function CustomNumberInput(
|
|
146
|
+
props: NumberInputProps,
|
|
147
|
+
ref: React.ForwardedRef<HTMLDivElement>,
|
|
179
148
|
) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
149
|
+
return (
|
|
150
|
+
<BaseNumberInput
|
|
151
|
+
slots={{
|
|
152
|
+
root: StyledInputRoot,
|
|
153
|
+
input: StyledInputElement,
|
|
154
|
+
incrementButton: StyledButton,
|
|
155
|
+
decrementButton: StyledButton,
|
|
156
|
+
}}
|
|
157
|
+
slotProps={{
|
|
158
|
+
incrementButton: {
|
|
159
|
+
children: 'Increase value',
|
|
160
|
+
'aria-label': 'Increase value',
|
|
161
|
+
},
|
|
162
|
+
decrementButton: {
|
|
163
|
+
children: 'Decrease value',
|
|
164
|
+
'aria-label': 'Decrease value',
|
|
165
|
+
},
|
|
166
|
+
}}
|
|
167
|
+
{...props}
|
|
168
|
+
ref={ref}
|
|
169
|
+
/>
|
|
170
|
+
);
|
|
171
|
+
});
|
|
201
172
|
|
|
202
173
|
const StyledInputElement = styled('input')(
|
|
203
174
|
() => `
|
package/tsconfig.json
CHANGED
/package/{uuid.js → uuid.cjs}
RENAMED
|
File without changes
|