@opengeoweb/knmi-components 20.0.0 → 20.0.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/dist/index.esm.js CHANGED
@@ -202,16 +202,20 @@ function _regeneratorDefine(e, r, n, t) {
202
202
  }, _regeneratorDefine(e, r, n, t);
203
203
  }
204
204
 
205
- var config = sessionStorageProvider.getConfig();
206
- var publisherBaseUrl = config.GW_KNMI_PUBLISHER_BASE_URL || '';
205
+ var getPublisherBaseUrl = function getPublisherBaseUrl() {
206
+ var config = sessionStorageProvider.getConfig();
207
+ return (config == null ? void 0 : config.GW_KNMI_PUBLISHER_BASE_URL) || '';
208
+ };
207
209
  var publishProduct = /*#__PURE__*/function () {
208
210
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(auth, data, productType) {
211
+ var publisherBaseUrl;
209
212
  return _regenerator().w(function (_context) {
210
213
  while (1) switch (_context.n) {
211
214
  case 0:
212
215
  if (productType === void 0) {
213
216
  productType = 'trajks';
214
217
  }
218
+ publisherBaseUrl = getPublisherBaseUrl();
215
219
  return _context.a(2, fetch(publisherBaseUrl + "/publish/" + productType, {
216
220
  headers: getHeaders(auth),
217
221
  method: 'POST',
@@ -1,9 +1,8 @@
1
- import type { UseMutationResult } from '@tanstack/react-query';
1
+ import type { UseMutationReturnType } from '@opengeoweb/api';
2
2
  import type { TrajksFormValues } from '../components/Trajks';
3
- type MutationReturnType<T> = UseMutationResult<Headers | null, Error, T>;
4
3
  interface PublishProductProps {
5
4
  data: TrajksFormValues;
6
5
  clearForm: () => void;
7
6
  }
8
- export declare const usePublishProduct: () => MutationReturnType<PublishProductProps>;
7
+ export declare const usePublishProduct: () => UseMutationReturnType<Headers | null, PublishProductProps>;
9
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/knmi-components",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "GeoWeb knmi-components library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,18 +20,18 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@opengeoweb/form-fields": "20.0.0",
23
+ "@opengeoweb/form-fields": "20.0.1",
24
24
  "react-hook-form": "^7.61.1",
25
25
  "@mui/material": "^9.0.1",
26
- "@opengeoweb/shared": "20.0.0",
27
- "@opengeoweb/theme": "20.0.0",
26
+ "@opengeoweb/shared": "20.0.1",
27
+ "@opengeoweb/theme": "20.0.1",
28
28
  "i18next": "^25.3.2",
29
29
  "react-i18next": "^15.1.1",
30
- "@opengeoweb/api": "20.0.0",
31
- "@opengeoweb/authentication": "20.0.0",
30
+ "@opengeoweb/api": "20.0.1",
31
+ "@opengeoweb/authentication": "20.0.1",
32
32
  "@tanstack/react-query": "^5.85.5",
33
33
  "react-redux": "^9.2.0",
34
- "@opengeoweb/snackbar": "20.0.0"
34
+ "@opengeoweb/snackbar": "20.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "eslint-plugin-storybook": "10.3.3"