@opengeoweb/workspace 15.3.0 → 16.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/workspace",
3
- "version": "15.3.0",
3
+ "version": "16.0.0",
4
4
  "description": "GeoWeb Workspace library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -9,32 +9,32 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "react-redux": "^9.2.0",
12
- "@opengeoweb/shared": "15.3.0",
13
- "@opengeoweb/store": "15.3.0",
14
- "@opengeoweb/api": "15.3.0",
12
+ "@opengeoweb/shared": "16.0.0",
13
+ "@opengeoweb/store": "16.0.0",
14
+ "@opengeoweb/api": "16.0.0",
15
15
  "react-hook-form": "^7.50.1",
16
- "@opengeoweb/theme": "15.3.0",
16
+ "@opengeoweb/theme": "16.0.0",
17
17
  "@reduxjs/toolkit": "^2.6.1",
18
- "@opengeoweb/snackbar": "15.3.0",
18
+ "@opengeoweb/snackbar": "16.0.0",
19
19
  "react-window": "^2.2.6",
20
20
  "lodash": "^4.17.21",
21
21
  "axios": "^1.7.7",
22
22
  "react-mosaic-component": "^6.1.0",
23
- "@opengeoweb/form-fields": "15.3.0",
24
- "@opengeoweb/time-series": "15.3.0",
25
- "@opengeoweb/authentication": "15.3.0",
26
- "@opengeoweb/core": "15.3.0",
27
- "@opengeoweb/taf": "15.3.0",
28
- "@opengeoweb/sigmet-airmet": "15.3.0",
29
- "@opengeoweb/warnings": "15.3.0",
30
- "@opengeoweb/space-weather": "15.3.0",
23
+ "@opengeoweb/form-fields": "16.0.0",
24
+ "@opengeoweb/time-series": "16.0.0",
25
+ "@opengeoweb/authentication": "16.0.0",
26
+ "@opengeoweb/core": "16.0.0",
27
+ "@opengeoweb/taf": "16.0.0",
28
+ "@opengeoweb/sigmet-airmet": "16.0.0",
29
+ "@opengeoweb/warnings": "16.0.0",
30
+ "@opengeoweb/space-weather": "16.0.0",
31
31
  "i18next": "^25.0.1",
32
32
  "react-i18next": "^15.1.1",
33
33
  "@mui/material": "^7.0.1",
34
- "@opengeoweb/webmap-react": "15.3.0",
34
+ "@opengeoweb/webmap-react": "16.0.0",
35
35
  "@tanstack/react-query": "^5.85.5",
36
- "@opengeoweb/soundings": "15.3.0",
37
- "@opengeoweb/knmi-components": "15.3.0",
36
+ "@opengeoweb/soundings": "16.0.0",
37
+ "@opengeoweb/knmi-components": "16.0.0",
38
38
  "@mui/system": "^7.3.5"
39
39
  },
40
40
  "peerDependencies": {
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface PastePresetDialogProps {
3
+ isOpen: boolean;
4
+ mode: 'workspace' | 'viewpreset';
5
+ onClose: () => void;
6
+ onConfirm: (jsonString: string) => void;
7
+ }
8
+ export declare const PastePresetDialog: React.FC<PastePresetDialogProps>;
@@ -0,0 +1,2 @@
1
+ export { PastePresetDialog } from './PastePresetDialog';
2
+ export type { PastePresetDialogProps } from './PastePresetDialog';
@@ -7,6 +7,10 @@ export interface WorkspaceOptionsProps {
7
7
  handleEditTitle?: () => void;
8
8
  handleDelete?: () => void;
9
9
  handleReset?: () => void;
10
+ handleCopyToClipboard?: () => void;
11
+ handlePasteFromClipboard?: () => void;
12
+ copyToClipboardLabel?: string;
13
+ pasteFromClipboardLabel?: string;
10
14
  isDisabled?: boolean;
11
15
  isDefaultOpen?: boolean;
12
16
  showEditTitleOption?: boolean;
@@ -3,6 +3,8 @@ import type { MosaicBranch } from 'react-mosaic-component';
3
3
  interface SplitButtonsConnectProps {
4
4
  panelId: string;
5
5
  path: MosaicBranch[];
6
+ inMenuItem?: boolean;
7
+ isVerticalSplitDisabled?: boolean;
6
8
  }
7
9
  export declare const SplitButtonsConnect: React.FC<SplitButtonsConnectProps>;
8
10
  export {};
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react/';
2
+ import WorkspaceView from './WorkspaceView';
3
+ declare const meta: Meta<typeof WorkspaceView>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof WorkspaceView>;
6
+ export declare const WorkspaceViewLightSmall: Story;
7
+ export declare const WorkspaceViewDarkSmall: Story;
8
+ export declare const WorkspaceViewLightLarge: Story;
9
+ export declare const WorkspaceViewDarkLarge: Story;
@@ -57,6 +57,7 @@ export declare const getMosaicNode: ((state: AppStore) => import("react-mosaic-c
57
57
  memoize: typeof import("reselect").weakMapMemoize;
58
58
  argsMemoize: typeof import("reselect").weakMapMemoize;
59
59
  };
60
+ export declare const getWorkspaceId: (store: AppStore) => string | undefined;
60
61
  /**
61
62
  * Gets view from workspace state
62
63
  *
@@ -353,6 +354,7 @@ export declare const getWorkspaceData: ((state: AppStore & CoreAppStore) => {
353
354
  labels: import("./types").WorkspacePresetLabels | undefined;
354
355
  description: string | undefined;
355
356
  updated: string | undefined;
357
+ username: string | undefined;
356
358
  }) & {
357
359
  clearCache: () => void;
358
360
  resultsCount: () => number;
@@ -380,6 +382,7 @@ export declare const getWorkspaceData: ((state: AppStore & CoreAppStore) => {
380
382
  labels: import("./types").WorkspacePresetLabels | undefined;
381
383
  description: string | undefined;
382
384
  updated: string | undefined;
385
+ username: string | undefined;
383
386
  };
384
387
  memoizedResultFunc: ((resultFuncArgs_0: WorkspaceState, resultFuncArgs_1: import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState) => {
385
388
  id: string | undefined;
@@ -403,6 +406,7 @@ export declare const getWorkspaceData: ((state: AppStore & CoreAppStore) => {
403
406
  labels: import("./types").WorkspacePresetLabels | undefined;
404
407
  description: string | undefined;
405
408
  updated: string | undefined;
409
+ username: string | undefined;
406
410
  }) & {
407
411
  clearCache: () => void;
408
412
  resultsCount: () => number;
@@ -430,6 +434,7 @@ export declare const getWorkspaceData: ((state: AppStore & CoreAppStore) => {
430
434
  labels: import("./types").WorkspacePresetLabels | undefined;
431
435
  description: string | undefined;
432
436
  updated: string | undefined;
437
+ username: string | undefined;
433
438
  };
434
439
  dependencies: [(store: AppStore) => WorkspaceState, (store: CoreAppStore) => import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState];
435
440
  recomputations: () => number;
@@ -88,7 +88,7 @@ export interface WorkspacePresetFromBE extends WorkspacePresetForBE {
88
88
  id: string;
89
89
  viewType: ViewType;
90
90
  scope: SystemScope;
91
- username: string;
91
+ username?: string;
92
92
  }
93
93
  export interface WorkspacePresetListItem {
94
94
  id: string;
@@ -116,7 +116,8 @@ export declare enum WorkspacePresetAction {
116
116
  DELETE_SYSTEM_PRESET = "DELETE_SYSTEM_PRESET",
117
117
  SHARE = "SHARE",
118
118
  OPEN_TAB = "OPEN_TAB",
119
- EDIT_TITLE = "EDIT_TITLE"
119
+ EDIT_TITLE = "EDIT_TITLE",
120
+ COPY_TO_CLIPBOARD = "COPY_TO_CLIPBOARD"
120
121
  }
121
122
  export interface WorkspaceAddViewPayload {
122
123
  id: string;
@@ -145,6 +146,7 @@ export interface WorkspaceChangeToEmptyMapWorkspacePayload {
145
146
  }
146
147
  export interface WorkspaceSetPresetPayload {
147
148
  workspacePreset: WorkspacePreset;
149
+ markAsChanged?: boolean;
148
150
  }
149
151
  export interface WorkspaceSetPreventCloseViewPayload {
150
152
  viewId: string;
@@ -119,6 +119,7 @@ export interface OnNonDeleteSuccesWorkspacePresetActionPayload {
119
119
  views?: WorkspaceViewsFromBE[];
120
120
  updated?: string;
121
121
  updatedBy?: string;
122
+ username?: string;
122
123
  }
123
124
  export interface OnDeleteSuccesWorkspacePresetActionPayload {
124
125
  workspaceId: string;
@@ -0,0 +1,23 @@
1
+ import type { Credentials } from '@opengeoweb/authentication';
2
+ import type { ViewPreset } from '../store/viewPresets/types';
3
+ import type { WorkspacePresetForBE } from '../store/workspace/types';
4
+ export declare const writeToClipboard: (text: string) => Promise<void>;
5
+ /**
6
+ * For each view that only has a viewPresetId reference (old-style), fetch
7
+ * the full view preset from BE and replaces the reference with inline
8
+ * componentType + initialProps.
9
+ */
10
+ export declare const expandWorkspaceViewPresets: (preset: WorkspacePresetForBE, auth: Credentials) => Promise<WorkspacePresetForBE>;
11
+ export declare const sanitizeWorkspaceForClipboard: (preset: WorkspacePresetForBE) => WorkspacePresetForBE;
12
+ export declare const sanitizeViewPresetForClipboard: (preset: ViewPreset) => ViewPreset;
13
+ export declare const validateWorkspacePresetJson: (jsonString: string) => {
14
+ error: string;
15
+ errorParam?: string;
16
+ } | null;
17
+ /**
18
+ * Validates that the parsed value is a valid ViewPreset structure.
19
+ */
20
+ export declare const validateViewPresetJson: (jsonString: string) => {
21
+ error: string;
22
+ errorParam?: string;
23
+ } | null;
@@ -0,0 +1 @@
1
+ export {};