ebta-workflow-prod 4.0.24 → 4.1.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.
@@ -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,55 @@
1
1
  {
2
- "name": "ebta-workflow-prod",
3
- "private": false,
4
- "version": "4.0.24",
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
- "@vertigis/workflow": "^5.44.0",
15
- "@vertigis/workflow-sdk": "^4.1.0",
16
- "typescript": "^5.7.3"
17
- },
18
- "browserslist": [
19
- "last 2 chrome versions",
20
- "last 2 edge versions",
21
- "last 2 firefox versions",
22
- "last 2 safari versions",
23
- "ie 11"
24
- ],
25
- "dependencies": {
26
- "@arcgis/core": "^4.29.10",
27
- "@fseehawer/react-circular-slider": "^3.2.7",
28
- "@mantine/core": "^7.16.0",
29
- "@mui/icons-material": "^5.17.1",
30
- "@mui/material": "^5.17.1",
31
- "@mui/x-charts": "^7.6.2",
32
- "@turf/turf": "^6.5.0",
33
- "@types/arcgis-js-api": "^4.28.0",
34
- "@vertigis/web": "^5.34.0",
35
- "@xmldom/xmldom": "^0.8.10",
36
- "arcgis-js-api": "^4.30.8",
37
- "axios": "^1.7.7",
38
- "html2canvas": "^1.4.1",
39
- "pannellum-react-update": "^1.0.0",
40
- "pdf-lib": "^1.17.1",
41
- "qrcode": "^1.5.4",
42
- "react-color": "^2.19.3",
43
- "react-color-palette": "^7.3.0",
44
- "react-simple-image-slider": "^2.4.1",
45
- "react-slideshow-image": "^4.3.1"
46
- }
47
- }
2
+ "name": "ebta-workflow-prod",
3
+ "private": false,
4
+ "version": "4.1.0",
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/material": "^5.17.1",
37
+ "@mui/x-charts": "^7.6.2",
38
+ "@turf/turf": "^6.5.0",
39
+ "@types/arcgis-js-api": "^4.28.0",
40
+ "@vertigis/web": "^5.43.1",
41
+ "@xmldom/xmldom": "^0.8.10",
42
+ "arcgis-js-api": "^4.30.8",
43
+ "axios": "^1.7.7",
44
+ "dayjs": "^1.11.23",
45
+ "html2canvas": "^1.4.1",
46
+ "pannellum-react-update": "^1.0.0",
47
+ "pdf-lib": "^1.17.1",
48
+ "qrcode": "^1.5.4",
49
+ "react-color": "^2.19.3",
50
+ "react-color-palette": "^7.3.0",
51
+ "react-simple-image-slider": "^2.4.1",
52
+ "react-slideshow-image": "^4.3.1"
53
+ },
54
+ "type": "module"
55
+ }
@@ -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 { Geometry } from "@arcgis/core/geometry";
8
- import { SpatialReference } from "esri/geometry";
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: Geometry;
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,14 @@ 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';
21
+ // import { DateRangePicker } from '@mui/x-date-pickers-pro/DateRangePicker';
22
22
  import dayjs, { Dayjs } from 'dayjs';
23
23
  import timezone from 'dayjs/plugin/timezone';
24
24
  import utc from 'dayjs/plugin/utc';
25
25
  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';
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
29
  import 'dayjs/locale/en-au';
30
30
  import Chip from '@mui/material/Chip';
31
31
  import Button from '@vertigis/web/ui/Button';
@@ -34,8 +34,8 @@ import RadioGroup from '@vertigis/web/ui/RadioGroup';
34
34
  import FormControlLabel from '@vertigis/web/ui/FormControlLabel';
35
35
  import AttributeFilterEasyComp from './modules/AttributeFilterEasyComp';
36
36
  import Stack from '@vertigis/web/ui/Stack';
37
- import Graphic from "esri/Graphic";
38
- const { Search, SearchIconWrapper, StyledInputBase, StyledBadge, LightTooltip, defaultTheme, CustomNumberInput } = AttributeFilterEasyComp;
37
+ import Graphic from "@arcgis/core/Graphic";
38
+ const { Search, SearchIconWrapper, StyledInputBase, StyledBadge, LightTooltip, defaultTheme } = AttributeFilterEasyComp;
39
39
  dayjs.extend(utc);
40
40
  dayjs.extend(timezone);
41
41
  dayjs.extend(customParseFormat);
@@ -1392,80 +1392,74 @@ function AttributeFilter(props: AttributeFilterProps): React.ReactElement {
1392
1392
  {attribute.uniqValue ?
1393
1393
  (<Collapse in={attribute.display} timeout="auto" unmountOnExit>
1394
1394
  {attribute.type && attribute.type == 'date' && (attribute.uniqValue.length > 6) ?
1395
- <Box display="flex" alignItems="center" >
1396
- <LocalizationProvider dateAdapter={AdapterDayjs} >
1397
- <DemoContainer components={['DatePicker', 'DatePicker']} >
1398
- <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="en-au">
1399
- <DateRangePicker defaultValue={[dayjs.unix(minDate.current), dayjs.unix(maxDate.current)]} maxDate={dayjs.unix(maxDate.current)} minDate={dayjs.unix(minDate.current)}
1400
- value={[startDate, endDate]}
1401
- onChange={([newstart, newend]) => handleDateRangeChange(newstart || startDate, newend || endDate)}
1402
- sx={{
1403
- // Customize the date text color
1404
- '& .MuiInputBase-input': {
1405
- color: 'var(--accentIconBorder)', // Change text color for the selected date
1406
- },
1407
-
1408
- // Customize the start & end labels
1409
- '& .MuiInputLabel-root': {
1410
- color: 'var(--accentIconBorder)', // Change label color for both start and end dates
1411
- },
1412
-
1413
- // Customize the border color of the input
1414
- '& .MuiOutlinedInput-root': {
1415
- '& fieldset': {
1416
- borderColor: 'var(--accentIconBorder)', // Change border color when the input is not focused
1417
- },
1418
- '&:hover fieldset': {
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>
1395
+ // <Box display="flex" alignItems="center" >
1396
+ // <LocalizationProvider dateAdapter={AdapterDayjs} >
1397
+ // <DemoContainer components={['DatePicker', 'DatePicker']} >
1398
+ // <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="en-au">
1399
+ // <DateRangePicker defaultValue={[dayjs.unix(minDate.current), dayjs.unix(maxDate.current)]} maxDate={dayjs.unix(maxDate.current)} minDate={dayjs.unix(minDate.current)}
1400
+ // value={[startDate, endDate]}
1401
+ // onChange={([newstart, newend]) => handleDateRangeChange(newstart || startDate, newend || endDate)}
1402
+ // sx={{
1403
+ // // Customize the date text color
1404
+ // '& .MuiInputBase-input': {
1405
+ // color: 'var(--accentIconBorder)', // Change text color for the selected date
1406
+ // },
1407
+
1408
+ // // Customize the start & end labels
1409
+ // '& .MuiInputLabel-root': {
1410
+ // color: 'var(--accentIconBorder)', // Change label color for both start and end dates
1411
+ // },
1412
+
1413
+ // // Customize the border color of the input
1414
+ // '& .MuiOutlinedInput-root': {
1415
+ // '& fieldset': {
1416
+ // borderColor: 'var(--accentIconBorder)', // Change border color when the input is not focused
1417
+ // },
1418
+ // '&:hover fieldset': {
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>
1431
+ // </Box>
1432
+
1433
+ <Box display="flex" alignItems="center" gap={1}>
1434
+ <input
1435
+ type="date"
1436
+ value={startDate ? startDate.format('YYYY-MM-DD') : ''}
1437
+ min={dayjs.unix(minDate.current).format('YYYY-MM-DD')}
1438
+ max={dayjs.unix(maxDate.current).format('YYYY-MM-DD')}
1439
+ onChange={(e) => {
1440
+ const newstart = e.target.value ? dayjs(e.target.value) : startDate;
1441
+ handleDateRangeChange(newstart, endDate);
1442
+ }}
1443
+ style={{ color: 'var(--accentIconBorder)', border: '1px solid var(--accentIconBorder)', borderRadius: 4, padding: '4px 8px', marginRight: 8 }}
1444
+ />
1445
+ <span>to</span>
1446
+ <input
1447
+ type="date"
1448
+ value={endDate ? endDate.format('YYYY-MM-DD') : ''}
1449
+ min={dayjs.unix(minDate.current).format('YYYY-MM-DD')}
1450
+ max={dayjs.unix(maxDate.current).format('YYYY-MM-DD')}
1451
+ onChange={(e) => {
1452
+ const newend = e.target.value ? dayjs(e.target.value) : endDate;
1453
+ handleDateRangeChange(startDate, newend);
1454
+ }}
1455
+ style={{ color: 'var(--accentIconBorder)', border: '1px solid var(--accentIconBorder)', borderRadius: 4, padding: '4px 8px', marginLeft: 8 }}
1456
+ />
1431
1457
  </Box>
1432
1458
  :
1433
1459
  ISnumberAttribute && (attribute.uniqValue.length > 6) ?
1434
1460
  //Display String search or number Range , don't display if value amount is limited
1435
1461
  <Box display="flex" alignItems="center">
1436
- <CustomNumberInput aria-label="min value input" placeholder={`Min (${attributeMin} ~ ${attributeMax})`} min={attributeMin - 1} max={attributeMax + 1}
1437
- value={minValue == -Infinity ? undefined : minValue} step={0.1}
1438
- onChange={(event, val) => {
1439
- if (((val || val == 0) && (val <= maxValue))) { setProperty("minValue" as any, val) };
1440
- if (val == undefined || val == null) { setProperty("minValue" as any, -Infinity) };
1441
-
1442
- if ((val || val == 0) && val > maxValue) {
1443
- setProperty("minValue" as any, maxValue - 1)
1444
- const filterrangeResult = filterRange(attribute, maxValue - 1, maxValue)
1445
- setProperty("filteredValues" as any, filterrangeResult)
1446
- }
1447
- else {
1448
- const filterrangeResult = filterRange(attribute, val !== null ? val : -Infinity, maxValue !== Infinity ? maxValue : Infinity)
1449
- setProperty("filteredValues" as any, filterrangeResult)
1450
- }
1451
- }}
1452
- />
1453
- <CustomNumberInput aria-label="max value input" placeholder={`Max (${attributeMin} ~ ${attributeMax})`} min={attributeMin - 1} max={attributeMax + 1}
1454
- value={maxValue == Infinity ? undefined : maxValue} step={0.1}
1455
- onChange={(_event, val) => {
1456
- if ((val || val == 0) && (val >= minValue)) { setProperty("maxValue" as any, val) };
1457
- if (val == undefined) { setProperty("maxValue" as any, Infinity) };
1458
- if ((val || val == 0) && val < minValue) {
1459
- setProperty("maxValue" as any, minValue + 1)
1460
- const filterrangeResult = filterRange(attribute, minValue, minValue + 1)
1461
- setProperty("filteredValues" as any, filterrangeResult)
1462
- }
1463
- else {
1464
- const filterrangeResult = filterRange(attribute, minValue !== -Infinity ? minValue : -Infinity, val !== null ? val : Infinity || Infinity)
1465
- setProperty("filteredValues" as any, filterrangeResult)
1466
- }
1467
- }}
1468
- />
1462
+
1469
1463
  </Box>
1470
1464
  :
1471
1465
  (attribute.uniqValue.length > 6) || searchValue ?
@@ -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
- import type { ColorFormat } from "@mantine/core/lib/components/ColorPicker/ColorPicker.types";
5
+ type ColorFormat = "hex" | "rgba" | "rgb" | "hsl" | "hsla";
6
6
 
7
7
  import "@mantine/core/styles.css";
8
8
 
9
- import Color from "esri/Color";
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
- setProperty("esriColor", esriColor);
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
 
@@ -4,11 +4,11 @@ import InputBase from '@mui/material/InputBase';
4
4
  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
- import {
8
- Unstable_NumberInput as BaseNumberInput,
9
- NumberInputProps,
10
- numberInputClasses,
11
- } from '@mui/base/Unstable_NumberInput';
7
+ // import {
8
+ // Unstable_NumberInput as BaseNumberInput,
9
+ // NumberInputProps,
10
+ // numberInputClasses,
11
+ // } from '@mui/base/Unstable_NumberInput';
12
12
 
13
13
  const Search =styled('div')(({ theme }) => ({
14
14
  position: 'relative',
@@ -107,38 +107,8 @@ const StyledButton = styled('button')(
107
107
  color: #FFF;
108
108
  background: var(--accentIconForeground) !important;
109
109
  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
-
110
+ };
111
+
142
112
  & .arrow {
143
113
  transform: translateY(-1px);
144
114
  }
@@ -173,31 +143,31 @@ const defaultTheme = createTheme({
173
143
  },
174
144
  });
175
145
 
176
- const CustomNumberInput =React.forwardRef(function CustomNumberInputfunction(
177
- props: NumberInputProps,
178
- ref: React.ForwardedRef<HTMLDivElement>,
179
- ) {
180
- return (
181
- <BaseNumberInput
182
- slots={{
183
- root: StyledInputRoot,
184
- input: StyledInputElement,
185
- incrementButton: StyledButton,
186
- decrementButton: StyledButton,
187
- }}
188
- slotProps={{
189
- incrementButton: {
190
- children: '▴',
191
- },
192
- decrementButton: {
193
- children: '▾',
194
- },
195
- }}
196
- {...props}
197
- ref={ref}
198
- />
199
- );
200
- })
146
+ // const CustomNumberInput =React.forwardRef(function CustomNumberInputfunction(
147
+ // props: NumberInputProps,
148
+ // ref: React.ForwardedRef<HTMLDivElement>,
149
+ // ) {
150
+ // return (
151
+ // <BaseNumberInput
152
+ // slots={{
153
+ // root: StyledInputRoot,
154
+ // input: StyledInputElement,
155
+ // incrementButton: StyledButton,
156
+ // decrementButton: StyledButton,
157
+ // }}
158
+ // slotProps={{
159
+ // incrementButton: {
160
+ // children: '▴',
161
+ // },
162
+ // decrementButton: {
163
+ // children: '▾',
164
+ // },
165
+ // }}
166
+ // {...props}
167
+ // ref={ref}
168
+ // />
169
+ // );
170
+ // })
201
171
 
202
172
  const StyledInputElement = styled('input')(
203
173
  () => `
@@ -250,4 +220,4 @@ const CustomNumberInput =React.forwardRef(function CustomNumberInputfunction(
250
220
  `,
251
221
  );
252
222
 
253
- export default {Search,SearchIconWrapper,StyledInputBase,StyledBadge,StyledInputRoot,StyledInputElement,StyledButton,CustomNumberInput,defaultTheme,LightTooltip}
223
+ export default {Search,SearchIconWrapper,StyledInputBase,StyledBadge,StyledInputRoot,StyledInputElement,StyledButton,defaultTheme,LightTooltip}
package/tsconfig.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "extends": "@vertigis/workflow-sdk/config/tsconfig.json",
3
3
  "compilerOptions": {
4
+ "ignoreDeprecations": "5.0",
5
+ "noImplicitAny": false,
4
6
  "target": "es5",
5
7
  "baseUrl": ".",
6
8
  "suppressImplicitAnyIndexErrors": false,
File without changes