@opengeoweb/warnings 9.18.0 → 9.19.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/index.esm.js +311 -120
- package/package.json +1 -1
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +4 -2
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +1 -0
- package/src/lib/components/WarningsMapView/WarningsMapView.d.ts +1 -0
- package/src/lib/store/publicWarningForm/types.d.ts +4 -1
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options,
|
|
4
|
+
import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options, Copy, Success, Expire, Remove } from '@opengeoweb/theme';
|
|
5
5
|
import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog } from '@opengeoweb/store';
|
|
6
6
|
import { defaultPolygon, emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
|
|
7
7
|
import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
|
|
@@ -99,10 +99,6 @@ var en = {
|
|
|
99
99
|
"warning-dialog-delete-title": "Delete warning",
|
|
100
100
|
"warning-dialog-delete-confirm": "Delete",
|
|
101
101
|
"warning-dialog-delete-description": "Are you sure you want to delete this warning?",
|
|
102
|
-
"warning-dialog-ignore-succes": "Warning has been ignored",
|
|
103
|
-
"warning-dialog-ignore-title": "Ignore warning",
|
|
104
|
-
"warning-dialog-ignore-confirm": "Ignore",
|
|
105
|
-
"warning-dialog-ignore-description": "Are you sure you want to ignore this warning?",
|
|
106
102
|
"warning-save-succes": "Public warning has succesfully been saved!",
|
|
107
103
|
"warning-publish-succes": "Public warning has succesfully been published!",
|
|
108
104
|
"warning-editor-user-viewer": "Viewer",
|
|
@@ -111,8 +107,11 @@ var en = {
|
|
|
111
107
|
"warning-editor-remove-editor": "You are now no longer the editor for this warning",
|
|
112
108
|
"warning-list-button_create": "Create a warning",
|
|
113
109
|
"warning-list-button-use": "Use",
|
|
114
|
-
"warning-list-button-ignore": "Ignore",
|
|
115
110
|
"warning-list-button-options": "Options",
|
|
111
|
+
"warning-list-button-duplicate": "Duplicate",
|
|
112
|
+
"warning-list-button-update": "Update",
|
|
113
|
+
"warning-list-button-expire": "Expire",
|
|
114
|
+
"warning-list-button-withdraw": "Withdraw",
|
|
116
115
|
"warning-list-status-draft": "Drafts",
|
|
117
116
|
"warning-list-status-published": "Published",
|
|
118
117
|
"warning-list-status-todo": "Reviews",
|
|
@@ -204,10 +203,6 @@ var nl = {
|
|
|
204
203
|
"warning-dialog-delete-title": "Waarschuwing verwijderen",
|
|
205
204
|
"warning-dialog-delete-confirm": "Verwijderen",
|
|
206
205
|
"warning-dialog-delete-description": "Weet je zeker dat je deze waarschuwing wilt verwijderen?",
|
|
207
|
-
"warning-dialog-ignore-succes": "Waarschuwing is genegeerd",
|
|
208
|
-
"warning-dialog-ignore-title": "Waarschuwing negeren",
|
|
209
|
-
"warning-dialog-ignore-confirm": "Negeren",
|
|
210
|
-
"warning-dialog-ignore-description": "Weet je zeker dat je deze waarschuwing wilt negeren?",
|
|
211
206
|
"warning-save-succes": "Publieke waarschuwing is succesvol opgeslagen!",
|
|
212
207
|
"warning-publish-succes": "Publieke waarschuwing is succesvol gepubliceerd!",
|
|
213
208
|
"warning-editor-add-editor": "Je bent nu de editor van deze waarschuwing",
|
|
@@ -216,8 +211,11 @@ var nl = {
|
|
|
216
211
|
"warning-editor-user-editor": "Editor",
|
|
217
212
|
"warning-list-button_create": "Maak waarschuwing",
|
|
218
213
|
"warning-list-button-use": "Gebruik",
|
|
219
|
-
"warning-list-button-ignore": "Negeer",
|
|
220
214
|
"warning-list-button-options": "Opties",
|
|
215
|
+
"warning-list-button-duplicate": "Dupliceren",
|
|
216
|
+
"warning-list-button-update": "Bijwerken",
|
|
217
|
+
"warning-list-button-expire": "Verlopen",
|
|
218
|
+
"warning-list-button-withdraw": "Intrekken",
|
|
221
219
|
"warning-list-status-draft": "Concepten",
|
|
222
220
|
"warning-list-status-published": "Gepubliceerd",
|
|
223
221
|
"warning-list-status-todo": "Te doen",
|
|
@@ -309,10 +307,6 @@ var fi = {
|
|
|
309
307
|
"warning-dialog-delete-title": "ei käännetty",
|
|
310
308
|
"warning-dialog-delete-confirm": "ei käännetty",
|
|
311
309
|
"warning-dialog-delete-description": "ei käännetty",
|
|
312
|
-
"warning-dialog-ignore-succes": "ei käännetty",
|
|
313
|
-
"warning-dialog-ignore-title": "ei käännetty",
|
|
314
|
-
"warning-dialog-ignore-confirm": "ei käännetty",
|
|
315
|
-
"warning-dialog-ignore-description": "ei käännetty",
|
|
316
310
|
"warning-save-succes": "ei käännetty",
|
|
317
311
|
"warning-publish-succes": "ei käännetty",
|
|
318
312
|
"warning-editor-user-viewer": "ei käännetty",
|
|
@@ -321,8 +315,11 @@ var fi = {
|
|
|
321
315
|
"warning-editor-remove-editor": "ei käännetty",
|
|
322
316
|
"warning-list-button_create": "ei käännetty",
|
|
323
317
|
"warning-list-button-use": "ei käännetty",
|
|
324
|
-
"warning-list-button-ignore": "ei käännetty",
|
|
325
318
|
"warning-list-button-options": "ei käännetty",
|
|
319
|
+
"warning-list-button-duplicate": "ei käännetty",
|
|
320
|
+
"warning-list-button-update": "ei käännetty",
|
|
321
|
+
"warning-list-button-expire": "ei käännetty",
|
|
322
|
+
"warning-list-button-withdraw": "ei käännetty",
|
|
326
323
|
"warning-list-status-draft": "ei käännetty",
|
|
327
324
|
"warning-list-status-published": "ei käännetty",
|
|
328
325
|
"warning-list-status-todo": "ei käännetty",
|
|
@@ -414,10 +411,6 @@ var no = {
|
|
|
414
411
|
"warning-dialog-delete-title": "Slett varsel",
|
|
415
412
|
"warning-dialog-delete-confirm": "Slett",
|
|
416
413
|
"warning-dialog-delete-description": "Er du sikker på at du vil slette varselet?",
|
|
417
|
-
"warning-dialog-ignore-succes": "Varselet er blitt ignorert",
|
|
418
|
-
"warning-dialog-ignore-title": "Ignorer varselet",
|
|
419
|
-
"warning-dialog-ignore-confirm": "Ignorer",
|
|
420
|
-
"warning-dialog-ignore-description": "Er du sikker på at du vil ignorere dette varselet?",
|
|
421
414
|
"warning-save-succes": "Farevarselet er lagret!",
|
|
422
415
|
"warning-publish-succes": "Farevarselet er publisert!",
|
|
423
416
|
"warning-editor-user-viewer": "Visningsmodus",
|
|
@@ -426,8 +419,11 @@ var no = {
|
|
|
426
419
|
"warning-editor-remove-editor": "Du editerer ikke lenger dette varselet",
|
|
427
420
|
"warning-list-button_create": "Lag et farevarsel",
|
|
428
421
|
"warning-list-button-use": "Bruk",
|
|
429
|
-
"warning-list-button-ignore": "Ignorer",
|
|
430
422
|
"warning-list-button-options": "Valg",
|
|
423
|
+
"warning-list-button-duplicate": "Dupliser",
|
|
424
|
+
"warning-list-button-update": "ikke oversatt",
|
|
425
|
+
"warning-list-button-expire": "ikke oversatt",
|
|
426
|
+
"warning-list-button-withdraw": "ikke oversatt",
|
|
431
427
|
"warning-list-status-draft": "Utkast",
|
|
432
428
|
"warning-list-status-published": "Publisert",
|
|
433
429
|
"warning-list-status-todo": "Til sjekk",
|
|
@@ -945,10 +941,10 @@ var SHARED = '__core-js_shared__';
|
|
|
945
941
|
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
946
942
|
|
|
947
943
|
(store$3.versions || (store$3.versions = [])).push({
|
|
948
|
-
version: '3.
|
|
944
|
+
version: '3.37.1',
|
|
949
945
|
mode: 'global',
|
|
950
946
|
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
951
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
947
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
|
|
952
948
|
source: 'https://github.com/zloirock/core-js'
|
|
953
949
|
});
|
|
954
950
|
|
|
@@ -3376,8 +3372,8 @@ const slice = createSlice({
|
|
|
3376
3372
|
} = action.payload;
|
|
3377
3373
|
if (draft.selectedPublicWarningId) {
|
|
3378
3374
|
const currentWarning = warnings.find(warning => warning.id === draft.selectedPublicWarningId);
|
|
3379
|
-
if (((_a = draft.publicWarning) === null || _a === void 0 ? void 0 : _a.editor) !==
|
|
3380
|
-
draft.publicWarning.editor = currentWarning
|
|
3375
|
+
if (currentWarning && ((_a = draft.publicWarning) === null || _a === void 0 ? void 0 : _a.editor) !== currentWarning.editor) {
|
|
3376
|
+
draft.publicWarning.editor = currentWarning.editor;
|
|
3381
3377
|
// if form is in edit mode show warning
|
|
3382
3378
|
if (draft.formState === '') {
|
|
3383
3379
|
draft.error = {
|
|
@@ -3562,9 +3558,6 @@ const ObjectManagerConnect = ({
|
|
|
3562
3558
|
objectName
|
|
3563
3559
|
});
|
|
3564
3560
|
};
|
|
3565
|
-
if (!isDialogOpen) {
|
|
3566
|
-
return null;
|
|
3567
|
-
}
|
|
3568
3561
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectManager, {
|
|
3569
3562
|
title: `${t('object-manager-title')} ${mapId}`,
|
|
3570
3563
|
bounds: bounds,
|
|
@@ -4796,7 +4789,8 @@ var warningListJSON = [
|
|
|
4796
4789
|
domain: "public",
|
|
4797
4790
|
warningProposalSource: "PASCAL-ECMWF-EPS",
|
|
4798
4791
|
authority: "KNMI",
|
|
4799
|
-
type: 1
|
|
4792
|
+
type: 1,
|
|
4793
|
+
probability: 30
|
|
4800
4794
|
}
|
|
4801
4795
|
},
|
|
4802
4796
|
{
|
|
@@ -5315,6 +5309,128 @@ var warningListJSON = [
|
|
|
5315
5309
|
type: 1
|
|
5316
5310
|
}
|
|
5317
5311
|
},
|
|
5312
|
+
{
|
|
5313
|
+
id: "f1e8981e-937c-11ee-a1bf-003kmdidki9",
|
|
5314
|
+
lastUpdatedTime: "2024-05-28T09:45:33Z",
|
|
5315
|
+
status: "DRAFT_PUBLISHED",
|
|
5316
|
+
warningDetail: {
|
|
5317
|
+
id: "f1e8981e-937c-11ee-a1bf-003kmdidki9",
|
|
5318
|
+
phenomenon: "wind",
|
|
5319
|
+
geoJSON: {
|
|
5320
|
+
type: "FeatureCollection",
|
|
5321
|
+
features: [
|
|
5322
|
+
{
|
|
5323
|
+
type: "Feature",
|
|
5324
|
+
geometry: {
|
|
5325
|
+
type: "Polygon",
|
|
5326
|
+
coordinates: [
|
|
5327
|
+
[
|
|
5328
|
+
[
|
|
5329
|
+
5.5,
|
|
5330
|
+
52.9
|
|
5331
|
+
],
|
|
5332
|
+
[
|
|
5333
|
+
5.5,
|
|
5334
|
+
53
|
|
5335
|
+
],
|
|
5336
|
+
[
|
|
5337
|
+
5.4,
|
|
5338
|
+
53.1
|
|
5339
|
+
],
|
|
5340
|
+
[
|
|
5341
|
+
5.3,
|
|
5342
|
+
53
|
|
5343
|
+
],
|
|
5344
|
+
[
|
|
5345
|
+
5.3,
|
|
5346
|
+
52.9
|
|
5347
|
+
],
|
|
5348
|
+
[
|
|
5349
|
+
5.4,
|
|
5350
|
+
52.8
|
|
5351
|
+
],
|
|
5352
|
+
[
|
|
5353
|
+
5.5,
|
|
5354
|
+
52.9
|
|
5355
|
+
]
|
|
5356
|
+
]
|
|
5357
|
+
]
|
|
5358
|
+
},
|
|
5359
|
+
properties: {
|
|
5360
|
+
fill: "#fae21e",
|
|
5361
|
+
stroke: "#fae21e",
|
|
5362
|
+
"fill-opacity": 0.2,
|
|
5363
|
+
"stroke-width": 2,
|
|
5364
|
+
selectionType: "poly",
|
|
5365
|
+
warning_level: "1",
|
|
5366
|
+
"stroke-opacity": 1
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
]
|
|
5370
|
+
},
|
|
5371
|
+
validFrom: "2024-05-28T09:45:28Z",
|
|
5372
|
+
probability: 30,
|
|
5373
|
+
linked_to_id: "14f7903a-937d-11ee-b619-0ab3cf8a98c1",
|
|
5374
|
+
warning_handle_uuid: "exampleid"
|
|
5375
|
+
}
|
|
5376
|
+
},
|
|
5377
|
+
{
|
|
5378
|
+
id: "550c2b5e-937d-11ee-a1bf-dki2883ke",
|
|
5379
|
+
lastUpdatedTime: "2024-05-27T14:48:20Z",
|
|
5380
|
+
status: "DRAFT_PUBLISHED",
|
|
5381
|
+
editor: "user.name",
|
|
5382
|
+
warningDetail: {
|
|
5383
|
+
id: "550c2b5e-937d-11ee-a1bf-dki2883ke",
|
|
5384
|
+
phenomenon: "lowTemp",
|
|
5385
|
+
geoJSON: {
|
|
5386
|
+
type: "FeatureCollection",
|
|
5387
|
+
features: [
|
|
5388
|
+
{
|
|
5389
|
+
type: "Feature",
|
|
5390
|
+
geometry: {
|
|
5391
|
+
type: "Polygon",
|
|
5392
|
+
coordinates: [
|
|
5393
|
+
[
|
|
5394
|
+
[
|
|
5395
|
+
5.0950448864466225,
|
|
5396
|
+
53.492000941975654
|
|
5397
|
+
],
|
|
5398
|
+
[
|
|
5399
|
+
4.280148780801422,
|
|
5400
|
+
52.46455621916433
|
|
5401
|
+
],
|
|
5402
|
+
[
|
|
5403
|
+
6.878229305858475,
|
|
5404
|
+
52.98133263853793
|
|
5405
|
+
],
|
|
5406
|
+
[
|
|
5407
|
+
5.0950448864466225,
|
|
5408
|
+
53.492000941975654
|
|
5409
|
+
]
|
|
5410
|
+
]
|
|
5411
|
+
]
|
|
5412
|
+
},
|
|
5413
|
+
properties: {
|
|
5414
|
+
fill: "#ff7800",
|
|
5415
|
+
stroke: "#ff7800",
|
|
5416
|
+
"fill-opacity": 0.2,
|
|
5417
|
+
"stroke-width": 2,
|
|
5418
|
+
selectionType: "poly",
|
|
5419
|
+
"stroke-opacity": 1
|
|
5420
|
+
}
|
|
5421
|
+
}
|
|
5422
|
+
]
|
|
5423
|
+
},
|
|
5424
|
+
validFrom: "2024-05-28T14:48:09Z",
|
|
5425
|
+
validUntil: "2024-05-28T18:48:09Z",
|
|
5426
|
+
level: "moderate",
|
|
5427
|
+
probability: 30,
|
|
5428
|
+
descriptionOriginal: "This is the original description",
|
|
5429
|
+
descriptionTranslation: "This is the translation",
|
|
5430
|
+
linked_to_id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
|
|
5431
|
+
warning_handle_uuid: "exampleid"
|
|
5432
|
+
}
|
|
5433
|
+
},
|
|
5318
5434
|
{
|
|
5319
5435
|
id: "550c2b5e-937d-11ee-a1bf-0ab3cf8a98c1",
|
|
5320
5436
|
lastUpdatedTime: "2023-12-05T14:48:20Z",
|
|
@@ -5489,6 +5605,8 @@ var warningListJSON = [
|
|
|
5489
5605
|
lastUpdatedTime: "2023-12-05T14:47:19Z",
|
|
5490
5606
|
status: "PUBLISHED",
|
|
5491
5607
|
warningDetail: {
|
|
5608
|
+
id: "30fe2e4c-937d-11ee-b3d1-0ab3cf8a98c1",
|
|
5609
|
+
warning_handle_uuid: "exampleid",
|
|
5492
5610
|
phenomenon: "snowIce",
|
|
5493
5611
|
geoJSON: {
|
|
5494
5612
|
type: "FeatureCollection",
|
|
@@ -5532,14 +5650,19 @@ var warningListJSON = [
|
|
|
5532
5650
|
validFrom: "2023-12-05T14:47:03Z",
|
|
5533
5651
|
validUntil: "2023-12-18T16:47:03Z",
|
|
5534
5652
|
level: "severe",
|
|
5535
|
-
probability: 70
|
|
5653
|
+
probability: 70,
|
|
5654
|
+
descriptionOriginal: "storm",
|
|
5655
|
+
descriptionTranslation: "storm"
|
|
5536
5656
|
}
|
|
5537
5657
|
},
|
|
5538
5658
|
{
|
|
5539
5659
|
id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
|
|
5540
5660
|
lastUpdatedTime: "2023-12-05T14:46:52Z",
|
|
5541
5661
|
status: "PUBLISHED",
|
|
5662
|
+
editor: "other.user",
|
|
5542
5663
|
warningDetail: {
|
|
5664
|
+
id: "20f54a8a-937d-11ee-b619-0ab3cf8a98c1",
|
|
5665
|
+
warning_handle_uuid: "exampleid",
|
|
5543
5666
|
phenomenon: "lowTemp",
|
|
5544
5667
|
geoJSON: {
|
|
5545
5668
|
type: "FeatureCollection",
|
|
@@ -5583,7 +5706,9 @@ var warningListJSON = [
|
|
|
5583
5706
|
validFrom: "2023-12-05T14:46:39Z",
|
|
5584
5707
|
validUntil: "2023-12-07T20:48:39Z",
|
|
5585
5708
|
level: "moderate",
|
|
5586
|
-
probability: 80
|
|
5709
|
+
probability: 80,
|
|
5710
|
+
descriptionOriginal: "cold",
|
|
5711
|
+
descriptionTranslation: "cold"
|
|
5587
5712
|
}
|
|
5588
5713
|
},
|
|
5589
5714
|
{
|
|
@@ -5591,6 +5716,8 @@ var warningListJSON = [
|
|
|
5591
5716
|
lastUpdatedTime: "2023-12-05T14:46:32Z",
|
|
5592
5717
|
status: "PUBLISHED",
|
|
5593
5718
|
warningDetail: {
|
|
5719
|
+
id: "14f7903a-937d-11ee-b619-0ab3cf8a98c1",
|
|
5720
|
+
warning_handle_uuid: "exampleid",
|
|
5594
5721
|
phenomenon: "wind",
|
|
5595
5722
|
geoJSON: {
|
|
5596
5723
|
type: "FeatureCollection",
|
|
@@ -5634,7 +5761,9 @@ var warningListJSON = [
|
|
|
5634
5761
|
validFrom: "2023-12-06T14:46:19Z",
|
|
5635
5762
|
validUntil: "2023-12-06T20:46:19Z",
|
|
5636
5763
|
level: "severe",
|
|
5637
|
-
probability: 30
|
|
5764
|
+
probability: 30,
|
|
5765
|
+
descriptionOriginal: "windy",
|
|
5766
|
+
descriptionTranslation: "windy"
|
|
5638
5767
|
}
|
|
5639
5768
|
},
|
|
5640
5769
|
{
|
|
@@ -6560,9 +6689,6 @@ const DrawingToolConnect = ({
|
|
|
6560
6689
|
};
|
|
6561
6690
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6562
6691
|
}, []);
|
|
6563
|
-
if (!isDialogOpen) {
|
|
6564
|
-
return null;
|
|
6565
|
-
}
|
|
6566
6692
|
return /*#__PURE__*/React.createElement(DrawingTool, {
|
|
6567
6693
|
bounds: bounds,
|
|
6568
6694
|
isOpen: isDialogOpen,
|
|
@@ -7949,7 +8075,8 @@ const zoomToFeature = (mapId, geojsonFeature) => {
|
|
|
7949
8075
|
};
|
|
7950
8076
|
const WarningsMapView = ({
|
|
7951
8077
|
geojsonFeature,
|
|
7952
|
-
defaultBbox: _defaultBbox = defaultBbox
|
|
8078
|
+
defaultBbox: _defaultBbox = defaultBbox,
|
|
8079
|
+
isSnapshot: _isSnapshot = false
|
|
7953
8080
|
}) => {
|
|
7954
8081
|
const mapId = React.useRef(`WarningsMapView_${generateMapId()}`).current;
|
|
7955
8082
|
const warningLayer = {
|
|
@@ -7979,11 +8106,11 @@ const WarningsMapView = ({
|
|
|
7979
8106
|
zoomToFeature(mapId, geojsonFeature);
|
|
7980
8107
|
},
|
|
7981
8108
|
holdShiftToScroll: true
|
|
7982
|
-
}, /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.baseLayerGrey, {
|
|
8109
|
+
}, !_isSnapshot && ( /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.baseLayerGrey, {
|
|
7983
8110
|
id: `${mapId}_baseLayer}`
|
|
7984
|
-
})), warningLayer.geojson && /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, warningLayer)), /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.overLayer, {
|
|
8111
|
+
}))), warningLayer.geojson && /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, warningLayer)), !_isSnapshot && ( /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.overLayer, {
|
|
7985
8112
|
id: `${mapId}_overlayer}`
|
|
7986
|
-
}))));
|
|
8113
|
+
})))));
|
|
7987
8114
|
};
|
|
7988
8115
|
|
|
7989
8116
|
/* *
|
|
@@ -8182,7 +8309,8 @@ const Form = ({
|
|
|
8182
8309
|
message: ''
|
|
8183
8310
|
},
|
|
8184
8311
|
isReadOnly: _isReadOnly2 = false,
|
|
8185
|
-
onFormDirty: _onFormDirty = () => {}
|
|
8312
|
+
onFormDirty: _onFormDirty = () => {},
|
|
8313
|
+
isSnapshot: _isSnapshot = false
|
|
8186
8314
|
}) => {
|
|
8187
8315
|
const {
|
|
8188
8316
|
t
|
|
@@ -8291,7 +8419,8 @@ const Form = ({
|
|
|
8291
8419
|
xs: 12
|
|
8292
8420
|
}, /*#__PURE__*/React.createElement(WarningsMapView, {
|
|
8293
8421
|
geojsonFeature: warningGeoJSONFeatureWithFillProps,
|
|
8294
|
-
defaultBbox: defaultBbox
|
|
8422
|
+
defaultBbox: defaultBbox,
|
|
8423
|
+
isSnapshot: _isSnapshot
|
|
8295
8424
|
}))), /*#__PURE__*/React.createElement(Grid, {
|
|
8296
8425
|
item: true,
|
|
8297
8426
|
xs: 12,
|
|
@@ -8498,10 +8627,11 @@ const PublicWarningsFormConnect = ({
|
|
|
8498
8627
|
}));
|
|
8499
8628
|
};
|
|
8500
8629
|
const saveForm = newFormValues => {
|
|
8630
|
+
const status = newFormValues.linked_to_id ? 'DRAFT_PUBLISHED' : 'DRAFT';
|
|
8501
8631
|
dispatch(publicWarningFormActions.saveWarning({
|
|
8502
8632
|
publicWarning: {
|
|
8503
8633
|
warningDetail: newFormValues,
|
|
8504
|
-
status
|
|
8634
|
+
status,
|
|
8505
8635
|
editor: auth === null || auth === void 0 ? void 0 : auth.username
|
|
8506
8636
|
}
|
|
8507
8637
|
}));
|
|
@@ -8634,13 +8764,10 @@ const PublicWarningsFormDialogConnect = ({
|
|
|
8634
8764
|
}
|
|
8635
8765
|
onCloseDialog();
|
|
8636
8766
|
});
|
|
8637
|
-
if (!isDialogOpen) {
|
|
8638
|
-
return null;
|
|
8639
|
-
}
|
|
8640
8767
|
// Readonly also in case you are not creating a new warning and you are not set as the editor
|
|
8641
8768
|
const isReadOnly = formAction === 'readonly' || !isEditor && publicWarningStatus !== undefined;
|
|
8642
8769
|
// Only show toggle if in draft status
|
|
8643
|
-
const shouldHideFormToggleMode = publicWarningStatus !== 'DRAFT';
|
|
8770
|
+
const shouldHideFormToggleMode = publicWarningStatus !== 'DRAFT' && publicWarningStatus !== 'DRAFT_PUBLISHED';
|
|
8644
8771
|
return /*#__PURE__*/React__default.createElement(PublicWarningsFormDialog, {
|
|
8645
8772
|
isOpen: isDialogOpen,
|
|
8646
8773
|
onClose: closeDialog,
|
|
@@ -8661,7 +8788,7 @@ const PublicWarningsFormDialogConnect = ({
|
|
|
8661
8788
|
|
|
8662
8789
|
const sortWarningsOnStatus = warnings => {
|
|
8663
8790
|
return warnings.reduce((allWarnings, warning) => {
|
|
8664
|
-
if (warning.status === 'DRAFT') {
|
|
8791
|
+
if (warning.status === 'DRAFT' || warning.status === 'DRAFT_PUBLISHED') {
|
|
8665
8792
|
return Object.assign(Object.assign({}, allWarnings), {
|
|
8666
8793
|
draft: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.draft.concat(warning)
|
|
8667
8794
|
});
|
|
@@ -8689,17 +8816,85 @@ const sortWarningsOnStatus = warnings => {
|
|
|
8689
8816
|
expired: []
|
|
8690
8817
|
});
|
|
8691
8818
|
};
|
|
8692
|
-
const
|
|
8819
|
+
const getWarningWithLinkedToId = warning => {
|
|
8820
|
+
const {
|
|
8821
|
+
id,
|
|
8822
|
+
warningDetail
|
|
8823
|
+
} = warning;
|
|
8824
|
+
const cleanWarningDetail = __rest(warningDetail, ["id"]);
|
|
8825
|
+
return Object.assign(Object.assign({}, warning), {
|
|
8826
|
+
warningDetail: Object.assign(Object.assign({}, cleanWarningDetail), {
|
|
8827
|
+
linked_to_id: id
|
|
8828
|
+
}),
|
|
8829
|
+
status: 'DRAFT_PUBLISHED'
|
|
8830
|
+
});
|
|
8831
|
+
};
|
|
8832
|
+
const getWarningWithProposalId = warning => {
|
|
8693
8833
|
const {
|
|
8694
8834
|
id,
|
|
8695
8835
|
warningDetail
|
|
8696
8836
|
} = warning,
|
|
8697
8837
|
fullWarning = __rest(warning, ["id", "warningDetail"]);
|
|
8698
8838
|
const cleanWarningDetail = __rest(warningDetail, ["id"]);
|
|
8839
|
+
return Object.assign(Object.assign({}, fullWarning), {
|
|
8840
|
+
warningDetail: Object.assign(Object.assign({}, cleanWarningDetail), {
|
|
8841
|
+
proposal_id: id
|
|
8842
|
+
})
|
|
8843
|
+
});
|
|
8844
|
+
};
|
|
8845
|
+
const getWarningWithoutIdStatusEditor = warning => {
|
|
8846
|
+
const {
|
|
8847
|
+
id,
|
|
8848
|
+
warningDetail,
|
|
8849
|
+
status,
|
|
8850
|
+
editor
|
|
8851
|
+
} = warning,
|
|
8852
|
+
fullWarning = __rest(warning, ["id", "warningDetail", "status", "editor"]);
|
|
8853
|
+
const cleanWarningDetail = __rest(warningDetail, ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"]);
|
|
8699
8854
|
return Object.assign(Object.assign({}, fullWarning), {
|
|
8700
8855
|
warningDetail: cleanWarningDetail
|
|
8701
8856
|
});
|
|
8702
8857
|
};
|
|
8858
|
+
const getStatusIcon = warning => {
|
|
8859
|
+
const getStatusTag = (content, color, icon = null) => ( /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
8860
|
+
content: content,
|
|
8861
|
+
color: color,
|
|
8862
|
+
sx: {
|
|
8863
|
+
width: 'inherit',
|
|
8864
|
+
height: '16px',
|
|
8865
|
+
marginRight: 2
|
|
8866
|
+
},
|
|
8867
|
+
icon: icon
|
|
8868
|
+
}));
|
|
8869
|
+
switch (warning.status) {
|
|
8870
|
+
case 'TODO':
|
|
8871
|
+
return null;
|
|
8872
|
+
case 'DRAFT':
|
|
8873
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
8874
|
+
sx: {
|
|
8875
|
+
height: '16px',
|
|
8876
|
+
padding: '0px',
|
|
8877
|
+
display: 'flex',
|
|
8878
|
+
alignItems: 'center',
|
|
8879
|
+
justifyContent: 'center',
|
|
8880
|
+
color: 'geowebColors.iconButtons.flat.default.color'
|
|
8881
|
+
}
|
|
8882
|
+
}, /*#__PURE__*/React__default.createElement(Edit, null));
|
|
8883
|
+
case 'DRAFT_PUBLISHED':
|
|
8884
|
+
return getStatusTag('Pub', 'green', /*#__PURE__*/React__default.createElement(Edit, {
|
|
8885
|
+
sx: {
|
|
8886
|
+
width: 20,
|
|
8887
|
+
height: 20,
|
|
8888
|
+
marginTop: '3px'
|
|
8889
|
+
}
|
|
8890
|
+
}));
|
|
8891
|
+
case 'PUBLISHED':
|
|
8892
|
+
return getStatusTag('Pub', 'green');
|
|
8893
|
+
case 'EXPIRED':
|
|
8894
|
+
default:
|
|
8895
|
+
return getStatusTag('Exp', 'grey');
|
|
8896
|
+
}
|
|
8897
|
+
};
|
|
8703
8898
|
const WarningListHeaderContent = _a => {
|
|
8704
8899
|
var {
|
|
8705
8900
|
title,
|
|
@@ -8768,7 +8963,7 @@ const WarningsOnStatus = ({
|
|
|
8768
8963
|
onSelectWarning: _onSelectWarning = () => {},
|
|
8769
8964
|
onEditWarning: _onEditWarning = () => {},
|
|
8770
8965
|
onDeleteWarning: _onDeleteWarning = () => {},
|
|
8771
|
-
|
|
8966
|
+
onDeleteReviewWarning: _onDeleteReviewWarning = () => {}
|
|
8772
8967
|
}) => {
|
|
8773
8968
|
const {
|
|
8774
8969
|
t
|
|
@@ -8786,37 +8981,55 @@ const WarningsOnStatus = ({
|
|
|
8786
8981
|
}
|
|
8787
8982
|
};
|
|
8788
8983
|
const headerText = `${warnings.length} ${getStatus(status)}`;
|
|
8789
|
-
const onClickWarning = warning => () => _onSelectWarning(warning);
|
|
8790
|
-
const onClickEditWarning = warning => () => _onEditWarning(warning);
|
|
8791
|
-
const onClickDeleteWarning = warningId => () => _onDeleteWarning(warningId);
|
|
8792
|
-
const onClickUseWarning = warning => () => {
|
|
8793
|
-
_onEditWarning(getWarningWithoutId(warning));
|
|
8794
|
-
};
|
|
8795
|
-
const onClickIgnoreWarning = warning => () => _onIgnoreWarning(warning);
|
|
8796
8984
|
const getMenuItems = warning => {
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8985
|
+
const duplicate = {
|
|
8986
|
+
text: t('warning-list-button-duplicate'),
|
|
8987
|
+
action: () => _onEditWarning(getWarningWithoutIdStatusEditor(warning)),
|
|
8988
|
+
icon: /*#__PURE__*/React__default.createElement(Copy, null)
|
|
8989
|
+
};
|
|
8990
|
+
switch (status) {
|
|
8991
|
+
case 'PUBLISHED':
|
|
8992
|
+
return [{
|
|
8993
|
+
text: t('warning-list-button-update'),
|
|
8994
|
+
action: () => _onEditWarning(getWarningWithLinkedToId(warning)),
|
|
8995
|
+
icon: /*#__PURE__*/React__default.createElement(Edit, null)
|
|
8996
|
+
}, duplicate, {
|
|
8997
|
+
text: t('warning-list-button-expire'),
|
|
8998
|
+
action: () => null,
|
|
8999
|
+
icon: /*#__PURE__*/React__default.createElement(Expire, null),
|
|
9000
|
+
isDisabled: true
|
|
9001
|
+
}, {
|
|
9002
|
+
text: t('warning-list-button-withdraw'),
|
|
9003
|
+
action: () => null,
|
|
9004
|
+
icon: /*#__PURE__*/React__default.createElement(Remove, null),
|
|
9005
|
+
isDisabled: true
|
|
9006
|
+
}];
|
|
9007
|
+
case 'EXPIRED':
|
|
9008
|
+
return [duplicate];
|
|
9009
|
+
case 'DRAFT':
|
|
9010
|
+
case 'DRAFT_PUBLISHED':
|
|
9011
|
+
return [{
|
|
9012
|
+
text: t('object-manager-button-edit'),
|
|
9013
|
+
action: () => _onEditWarning(warning),
|
|
9014
|
+
icon: /*#__PURE__*/React__default.createElement(Edit, null)
|
|
9015
|
+
}, duplicate, {
|
|
9016
|
+
text: t('object-manager-button-delete'),
|
|
9017
|
+
action: () => _onDeleteWarning(warning.id),
|
|
9018
|
+
icon: /*#__PURE__*/React__default.createElement(Delete, null)
|
|
9019
|
+
}];
|
|
9020
|
+
case 'TODO':
|
|
9021
|
+
return [{
|
|
9022
|
+
text: t('warning-list-button-use'),
|
|
9023
|
+
action: () => _onEditWarning(getWarningWithProposalId(warning)),
|
|
9024
|
+
icon: /*#__PURE__*/React__default.createElement(Success, null)
|
|
9025
|
+
}, {
|
|
9026
|
+
text: t('object-manager-button-delete'),
|
|
9027
|
+
action: () => _onDeleteReviewWarning(warning),
|
|
9028
|
+
icon: /*#__PURE__*/React__default.createElement(Delete, null)
|
|
9029
|
+
}];
|
|
9030
|
+
default:
|
|
9031
|
+
return [];
|
|
9032
|
+
}
|
|
8820
9033
|
};
|
|
8821
9034
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
8822
9035
|
sx: {
|
|
@@ -8845,18 +9058,14 @@ const WarningsOnStatus = ({
|
|
|
8845
9058
|
borderWidth: activeWarningId === warning.id ? '1px' : '1px',
|
|
8846
9059
|
borderStyle: 'solid'
|
|
8847
9060
|
},
|
|
8848
|
-
secondaryAction:
|
|
9061
|
+
secondaryAction: /*#__PURE__*/React__default.createElement(ToggleMenu, {
|
|
8849
9062
|
menuTitle: t('warning-list-button-options'),
|
|
8850
9063
|
tooltipTitle: t('warning-list-button-options'),
|
|
8851
9064
|
menuPosition: "bottom",
|
|
8852
9065
|
"aria-label": t('warning-list-button-options'),
|
|
8853
9066
|
menuItems: getMenuItems(warning),
|
|
8854
9067
|
buttonIcon: /*#__PURE__*/React__default.createElement(Options, null)
|
|
8855
|
-
})
|
|
8856
|
-
sx: {
|
|
8857
|
-
width: 24
|
|
8858
|
-
}
|
|
8859
|
-
}))
|
|
9068
|
+
})
|
|
8860
9069
|
}, /*#__PURE__*/React__default.createElement(ListItemButton, {
|
|
8861
9070
|
sx: {
|
|
8862
9071
|
height: '100%',
|
|
@@ -8870,7 +9079,7 @@ const WarningsOnStatus = ({
|
|
|
8870
9079
|
}
|
|
8871
9080
|
}
|
|
8872
9081
|
},
|
|
8873
|
-
onClick:
|
|
9082
|
+
onClick: () => _onSelectWarning(warning),
|
|
8874
9083
|
"aria-label": `warning item for ${warning.id}`,
|
|
8875
9084
|
selected: activeWarningId === warning.id
|
|
8876
9085
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
@@ -8930,38 +9139,20 @@ const WarningsOnStatus = ({
|
|
|
8930
9139
|
title: t('warning-list-header-status'),
|
|
8931
9140
|
status: status,
|
|
8932
9141
|
width: 96
|
|
8933
|
-
},
|
|
9142
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
8934
9143
|
sx: {
|
|
8935
|
-
position: 'relative'
|
|
8936
|
-
right: 12
|
|
9144
|
+
position: 'relative'
|
|
8937
9145
|
}
|
|
8938
|
-
}, warning.editor && ( /*#__PURE__*/React__default.createElement(Box, {
|
|
9146
|
+
}, getStatusIcon(warning), warning.editor && ( /*#__PURE__*/React__default.createElement(Box, {
|
|
8939
9147
|
sx: {
|
|
8940
9148
|
width: '16px',
|
|
8941
9149
|
position: 'absolute',
|
|
8942
9150
|
top: '1px',
|
|
8943
|
-
right: '-
|
|
9151
|
+
right: '-12px'
|
|
8944
9152
|
}
|
|
8945
9153
|
}, /*#__PURE__*/React__default.createElement(WarningAvatar, {
|
|
8946
9154
|
editor: warning.editor
|
|
8947
|
-
})))
|
|
8948
|
-
sx: {
|
|
8949
|
-
height: '16px',
|
|
8950
|
-
padding: '0px',
|
|
8951
|
-
'& .MuiSvgIcon-root': {
|
|
8952
|
-
marginRight: '-2px'
|
|
8953
|
-
}
|
|
8954
|
-
},
|
|
8955
|
-
variant: "flat",
|
|
8956
|
-
startIcon: /*#__PURE__*/React__default.createElement(Edit, null)
|
|
8957
|
-
}, t('warning-list-header-draft')))) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
8958
|
-
content: status.toLowerCase(),
|
|
8959
|
-
color: status === 'EXPIRED' ? 'grey' : 'green',
|
|
8960
|
-
sx: {
|
|
8961
|
-
width: 66,
|
|
8962
|
-
height: '16px'
|
|
8963
|
-
}
|
|
8964
|
-
}))))));
|
|
9155
|
+
}))))))));
|
|
8965
9156
|
}))));
|
|
8966
9157
|
};
|
|
8967
9158
|
const PublicWarningList = ({
|
|
@@ -8975,7 +9166,7 @@ const PublicWarningList = ({
|
|
|
8975
9166
|
onCreateWarning: _onCreateWarning = () => {},
|
|
8976
9167
|
onDeleteWarning: _onDeleteWarning2 = () => {},
|
|
8977
9168
|
onRefetchWarnings: _onRefetchWarnings = () => {},
|
|
8978
|
-
|
|
9169
|
+
onDeleteReviewWarning: _onDeleteReviewWarning2 = () => {}
|
|
8979
9170
|
}) => {
|
|
8980
9171
|
const {
|
|
8981
9172
|
t
|
|
@@ -9069,7 +9260,7 @@ const PublicWarningList = ({
|
|
|
9069
9260
|
onSelectWarning: _onSelectWarning2,
|
|
9070
9261
|
onEditWarning: _onEditWarning2,
|
|
9071
9262
|
onDeleteWarning: _onDeleteWarning2,
|
|
9072
|
-
|
|
9263
|
+
onDeleteReviewWarning: _onDeleteReviewWarning2,
|
|
9073
9264
|
activeWarningId: _selectedPublicWarningId
|
|
9074
9265
|
}), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
|
|
9075
9266
|
status: "DRAFT",
|
|
@@ -9077,7 +9268,7 @@ const PublicWarningList = ({
|
|
|
9077
9268
|
onSelectWarning: _onSelectWarning2,
|
|
9078
9269
|
onEditWarning: _onEditWarning2,
|
|
9079
9270
|
onDeleteWarning: _onDeleteWarning2,
|
|
9080
|
-
|
|
9271
|
+
onDeleteReviewWarning: _onDeleteReviewWarning2,
|
|
9081
9272
|
activeWarningId: _selectedPublicWarningId
|
|
9082
9273
|
}), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
|
|
9083
9274
|
status: "PUBLISHED",
|
|
@@ -9085,7 +9276,7 @@ const PublicWarningList = ({
|
|
|
9085
9276
|
onSelectWarning: _onSelectWarning2,
|
|
9086
9277
|
onEditWarning: _onEditWarning2,
|
|
9087
9278
|
onDeleteWarning: _onDeleteWarning2,
|
|
9088
|
-
|
|
9279
|
+
onDeleteReviewWarning: _onDeleteReviewWarning2,
|
|
9089
9280
|
activeWarningId: _selectedPublicWarningId
|
|
9090
9281
|
}), /*#__PURE__*/React__default.createElement(WarningsOnStatus, {
|
|
9091
9282
|
status: "EXPIRED",
|
|
@@ -9093,7 +9284,7 @@ const PublicWarningList = ({
|
|
|
9093
9284
|
onSelectWarning: _onSelectWarning2,
|
|
9094
9285
|
onEditWarning: _onEditWarning2,
|
|
9095
9286
|
onDeleteWarning: _onDeleteWarning2,
|
|
9096
|
-
|
|
9287
|
+
onDeleteReviewWarning: _onDeleteReviewWarning2,
|
|
9097
9288
|
activeWarningId: _selectedPublicWarningId
|
|
9098
9289
|
}))));
|
|
9099
9290
|
};
|
|
@@ -9301,16 +9492,16 @@ const PublicWarningListConnect = () => {
|
|
|
9301
9492
|
callback: () => onRemoveSuccess(warningId, t('warning-dialog-delete-succes'))
|
|
9302
9493
|
});
|
|
9303
9494
|
};
|
|
9304
|
-
const
|
|
9495
|
+
const deleteReviewWarning = warning => {
|
|
9305
9496
|
const ignoredWarning = Object.assign(Object.assign({}, warning), {
|
|
9306
9497
|
status: 'IGNORED'
|
|
9307
9498
|
});
|
|
9308
9499
|
setConfirmDialogOptions({
|
|
9309
|
-
confirmLabel: t('warning-dialog-
|
|
9310
|
-
title: t('warning-dialog-
|
|
9311
|
-
description: t('warning-dialog-
|
|
9500
|
+
confirmLabel: t('warning-dialog-delete-confirm'),
|
|
9501
|
+
title: t('warning-dialog-delete-title'),
|
|
9502
|
+
description: t('warning-dialog-delete-description'),
|
|
9312
9503
|
request: () => warningsApi.updateWarning(ignoredWarning.id, ignoredWarning),
|
|
9313
|
-
callback: () => onRemoveSuccess(ignoredWarning.id, t('warning-dialog-
|
|
9504
|
+
callback: () => onRemoveSuccess(ignoredWarning.id, t('warning-dialog-delete-succes'))
|
|
9314
9505
|
});
|
|
9315
9506
|
};
|
|
9316
9507
|
const onRemoveSuccess = (warningId, snackbarMessage) => {
|
|
@@ -9341,7 +9532,7 @@ const PublicWarningListConnect = () => {
|
|
|
9341
9532
|
onCreateWarning: createWarning,
|
|
9342
9533
|
onEditWarning: editWarning,
|
|
9343
9534
|
onDeleteWarning: deleteWarning,
|
|
9344
|
-
|
|
9535
|
+
onDeleteReviewWarning: deleteReviewWarning,
|
|
9345
9536
|
selectedPublicWarningId: selectedPublicWarningId,
|
|
9346
9537
|
lastUpdatedTime: lastUpdatedTime,
|
|
9347
9538
|
onRefetchWarnings: fetchWarnings
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GridProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PublicWarning, PublicWarningStatus } from '../../store/publicWarningForm/types';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const getWarningWithLinkedToId: (warning: PublicWarning) => PublicWarning;
|
|
5
|
+
export declare const getWarningWithProposalId: (warning: PublicWarning) => PublicWarning;
|
|
6
|
+
export declare const getWarningWithoutIdStatusEditor: (warning: PublicWarning) => PublicWarning;
|
|
5
7
|
export declare const WarningListColumnContent: React.FC<GridProps & {
|
|
6
8
|
title?: string;
|
|
7
9
|
status: PublicWarningStatus;
|
|
@@ -13,7 +15,7 @@ interface WarningStatusProps {
|
|
|
13
15
|
onSelectWarning?: (warning: PublicWarning) => void;
|
|
14
16
|
onEditWarning?: (warning: PublicWarning) => void;
|
|
15
17
|
onDeleteWarning?: (warningId: string) => void;
|
|
16
|
-
|
|
18
|
+
onDeleteReviewWarning?: (warning: PublicWarning) => void;
|
|
17
19
|
}
|
|
18
20
|
export declare const PublicWarningList: React.FC<{
|
|
19
21
|
isLoading?: boolean;
|
|
@@ -12,8 +12,11 @@ export interface PublicWarningDetail {
|
|
|
12
12
|
warningProposalSource?: string;
|
|
13
13
|
authority?: string;
|
|
14
14
|
type?: number;
|
|
15
|
+
warning_handle_uuid?: string;
|
|
16
|
+
proposal_id?: string;
|
|
17
|
+
linked_to_id?: string;
|
|
15
18
|
}
|
|
16
|
-
export type PublicWarningStatus = 'DRAFT' | 'PUBLISHED' | 'TODO' | 'EXPIRED' | 'IGNORED';
|
|
19
|
+
export type PublicWarningStatus = 'DRAFT' | 'DRAFT_PUBLISHED' | 'PUBLISHED' | 'TODO' | 'EXPIRED' | 'IGNORED';
|
|
17
20
|
export interface PublicWarning {
|
|
18
21
|
status?: PublicWarningStatus;
|
|
19
22
|
editor?: string;
|