@opengeoweb/layer-select 9.35.1-spike-oltanstack.0 → 9.36.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/index.esm.js CHANGED
@@ -12,7 +12,7 @@ import 'i18next';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { FixedSizeList } from 'react-window';
14
14
  import { getDimensionsList, LayerInfoButton } from '@opengeoweb/webmap-react';
15
- import { webmapUtils, LayerType, getWMSServiceId, queryWMSServiceInfo, queryWMSLayers, invalidateWMSGetCapabilities, clearImageCacheForAllMaps } from '@opengeoweb/webmap';
15
+ import { webmapUtils, LayerType, WMGetServiceFromStore, getCapabilities, clearImageCacheForAllMaps } from '@opengeoweb/webmap';
16
16
  import { snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
17
17
  import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField } from '@opengeoweb/form-fields';
18
18
  import { useFormContext } from 'react-hook-form';
@@ -2353,30 +2353,20 @@ var loadWMSService = /*#__PURE__*/function () {
2353
2353
  if (forceReload === void 0) {
2354
2354
  forceReload = false;
2355
2355
  }
2356
- if (!forceReload) {
2357
- _context.next = 4;
2358
- break;
2359
- }
2360
- _context.next = 4;
2361
- return invalidateWMSGetCapabilities(serviceUrl);
2362
- case 4:
2363
- _context.next = 6;
2364
- return queryWMSLayers(serviceUrl);
2365
- case 6:
2356
+ _context.next = 3;
2357
+ return getCapabilities.getLayersFlattenedFromService(serviceUrl, forceReload);
2358
+ case 3:
2366
2359
  layers = _context.sent;
2367
- _context.next = 9;
2368
- return queryWMSServiceInfo(serviceUrl);
2369
- case 9:
2370
- service = _context.sent;
2360
+ service = WMGetServiceFromStore(serviceUrl);
2371
2361
  return _context.abrupt("return", {
2372
- id: service.id || getWMSServiceId(serviceUrl),
2362
+ id: service.id,
2373
2363
  name: service.title,
2374
2364
  serviceUrl: serviceUrl,
2375
2365
  "abstract": service["abstract"],
2376
2366
  layers: layers,
2377
2367
  scope: 'user'
2378
2368
  });
2379
- case 11:
2369
+ case 6:
2380
2370
  case "end":
2381
2371
  return _context.stop();
2382
2372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/layer-select",
3
- "version": "9.35.1-spike-oltanstack.0",
3
+ "version": "9.36.0",
4
4
  "description": "GeoWeb layer select library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,25 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const KeywordFilterResultsLight: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- parameters: {
10
- zeplinLink: {
11
- name: string;
12
- link: string;
13
- }[];
14
- };
15
- };
16
- export declare const KeywordFilterResultsDark: {
17
- (): React.ReactElement;
18
- tags: string[];
19
- parameters: {
20
- zeplinLink: {
21
- name: string;
22
- link: string;
23
- }[];
24
- };
25
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { KeywordFilterResults } from './KeywordFilterResults';
3
+ declare const meta: Meta<typeof KeywordFilterResults>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof KeywordFilterResults>;
6
+ export declare const Component: Story;
7
+ export declare const KeywordFilterResultsLight: Story;
8
+ export declare const KeywordFilterResultsDark: Story;
@@ -1,33 +1,10 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const LayerSelectDemoLightTheme: {
7
- (): React.ReactElement;
8
- tags: string[];
9
- parameters: {
10
- zeplinLink: {
11
- name: string;
12
- link: string;
13
- }[];
14
- };
15
- };
16
- export declare const LayerSelectDemoDarkTheme: {
17
- (): React.ReactElement;
18
- tags: string[];
19
- parameters: {
20
- zeplinLink: {
21
- name: string;
22
- link: string;
23
- }[];
24
- };
25
- };
26
- export declare const LayerSelectDemoSmallLightTheme: {
27
- (): React.ReactElement;
28
- tags: string[];
29
- };
30
- export declare const LayerSelectDemoSmallDarkTheme: {
31
- (): React.ReactElement;
32
- tags: string[];
33
- };
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { LayerSelect } from './LayerSelect';
3
+ declare const meta: Meta<typeof LayerSelect>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LayerSelect>;
6
+ export declare const Component: Story;
7
+ export declare const LayerSelectDemoLightTheme: Story;
8
+ export declare const LayerSelectDemoDarkTheme: Story;
9
+ export declare const LayerSelectDemoSmallLightTheme: Story;
10
+ export declare const LayerSelectDemoSmallDarkTheme: Story;
@@ -11,9 +11,11 @@ interface LayerSelectTranslationWrapperProps {
11
11
  children?: React.ReactNode;
12
12
  i18nInstance?: typeof i18n;
13
13
  }
14
- export declare const ThemeProvider: React.FC<BaseProviderProps>;
15
14
  export declare const LayerSelecti18nProvider: React.FC<LayerSelectTranslationWrapperProps>;
16
15
  export declare const DemoWrapper: React.FC<BaseProviderProps>;
16
+ export declare const LayerSelectStoreProvider: React.FC<ThemeProviderProps & {
17
+ store: Store;
18
+ }>;
17
19
  export declare const TestThemeStoreProvider: React.FC<ThemeProviderProps & {
18
20
  store: Store;
19
21
  }>;
@@ -1,7 +1,8 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ServiceOptionsButtonLight: () => React.ReactElement;
7
- export declare const ServiceOptionsButtonDark: () => React.ReactElement;
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { ServiceOptionsButton } from './ServiceOptionsButton';
3
+ declare const meta: Meta<typeof ServiceOptionsButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ServiceOptionsButton>;
6
+ export declare const Component: Story;
7
+ export declare const ServiceOptionsButtonLight: Story;
8
+ export declare const ServiceOptionsButtonDark: Story;
@@ -1,11 +1,18 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
1
+ import { layerTypes } from '@opengeoweb/store';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { ServiceOptionsDialog } from './ServiceOptionsDialog';
4
+ import { layerSelectTypes } from '../../store';
5
+ declare const meta: Meta<typeof ServiceOptionsDialog>;
6
+ export default meta;
7
+ type Story = StoryObj<typeof ServiceOptionsDialog>;
8
+ export declare const Component: Story;
6
9
  export declare const ServiceOptionsDialogLight: {
7
- (): React.ReactElement;
8
10
  tags: string[];
11
+ args: {
12
+ services: layerSelectTypes.ActiveServiceObjectEntities;
13
+ selectedLayers: layerTypes.Layer[];
14
+ isLoading: boolean;
15
+ };
9
16
  parameters: {
10
17
  zeplinLink: {
11
18
  name: string;
@@ -14,8 +21,12 @@ export declare const ServiceOptionsDialogLight: {
14
21
  };
15
22
  };
16
23
  export declare const ServiceOptionsDialogDark: {
17
- (): React.ReactElement;
18
24
  tags: string[];
25
+ args: {
26
+ services: layerSelectTypes.ActiveServiceObjectEntities;
27
+ selectedLayers: layerTypes.Layer[];
28
+ isLoading: boolean;
29
+ };
19
30
  parameters: {
20
31
  zeplinLink: {
21
32
  name: string;
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("./ServicePopup").ServicePopupProps>;
3
- export default _default;
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { ServicePopup } from './ServicePopup';
4
+ declare const meta: Meta<typeof ServicePopup>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof ServicePopup>;
7
+ export declare const Component: Story;
4
8
  export declare const ServicePopupAddLight: {
5
9
  (): React.ReactElement;
6
10
  tags: string[];
@@ -41,4 +45,3 @@ export declare const ServicePopupShowDark: {
41
45
  }[];
42
46
  };
43
47
  };
44
- export declare const ServicePopupWithInvalidUrl: () => React.ReactElement;
@@ -3,4 +3,7 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- export declare const ServicePopupAddWithExistingServiceError: React.FC;
6
+ export declare const ServicePopupAddWithExistingServiceError: {
7
+ (): React.ReactElement;
8
+ tags: string[];
9
+ };