@mattisvensson/strapi-plugin-webatlas 0.3.0 → 0.3.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.
Files changed (41) hide show
  1. package/dist/_chunks/{index-B0XE_zRP.js → index-BAqGJ3TM.js} +1 -1
  2. package/dist/_chunks/{index-CCiDvLAC.mjs → index-BBL_eQ0G.mjs} +5 -5
  3. package/dist/_chunks/{index-BocSkZOu.mjs → index-BOq-WidK.mjs} +1 -1
  4. package/dist/_chunks/{index-BbM9Sn1t.js → index-C4ou6MTp.js} +1 -1
  5. package/dist/_chunks/{index-B85fJxGa.js → index-CKoxbSC0.js} +5 -5
  6. package/dist/_chunks/{index-C7B8QHDT.mjs → index-CwHhwtOU.mjs} +1 -1
  7. package/dist/_chunks/{index-B2Tiv3EK.mjs → index-DZmhgSeq.mjs} +1 -1
  8. package/dist/_chunks/{index-DGb8ESH-.js → index-DsTyLL2l.js} +1 -1
  9. package/dist/admin/index.js +1 -1
  10. package/dist/admin/index.mjs +1 -1
  11. package/dist/server/index.js +4 -2
  12. package/dist/server/index.js.map +1 -1
  13. package/dist/server/index.mjs +4 -2
  14. package/dist/server/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/dist/_chunks/EmptyBox-7D4LrvdH.mjs.map +0 -1
  17. package/dist/_chunks/EmptyBox-DT6D5gcf.js.map +0 -1
  18. package/dist/_chunks/_baseConvert-B84_vf8X.js.map +0 -1
  19. package/dist/_chunks/_baseConvert-C2SW1VHq.mjs.map +0 -1
  20. package/dist/_chunks/de-4tL_cJTC.js.map +0 -1
  21. package/dist/_chunks/de-C8PE3n3B.mjs.map +0 -1
  22. package/dist/_chunks/en-Bg4z3fR7.js.map +0 -1
  23. package/dist/_chunks/en-CR1YZvJo.mjs.map +0 -1
  24. package/dist/_chunks/index-B48CGofU.mjs +0 -17170
  25. package/dist/_chunks/index-B48CGofU.mjs.map +0 -1
  26. package/dist/_chunks/index-CXzNr2cH.mjs +0 -93
  27. package/dist/_chunks/index-CXzNr2cH.mjs.map +0 -1
  28. package/dist/_chunks/index-Cd6y6nuf.js +0 -93
  29. package/dist/_chunks/index-Cd6y6nuf.js.map +0 -1
  30. package/dist/_chunks/index-Cf9ZIBLd.js +0 -4195
  31. package/dist/_chunks/index-Cf9ZIBLd.js.map +0 -1
  32. package/dist/_chunks/index-D981K4TK.mjs +0 -4179
  33. package/dist/_chunks/index-D981K4TK.mjs.map +0 -1
  34. package/dist/_chunks/index-DYiJBXKE.js +0 -10131
  35. package/dist/_chunks/index-DYiJBXKE.js.map +0 -1
  36. package/dist/_chunks/index-DjZ3ZaVB.js +0 -17189
  37. package/dist/_chunks/index-DjZ3ZaVB.js.map +0 -1
  38. package/dist/_chunks/index-DkhJl5mF.mjs +0 -10131
  39. package/dist/_chunks/index-DkhJl5mF.mjs.map +0 -1
  40. package/dist/admin/index.js.map +0 -1
  41. package/dist/admin/index.mjs.map +0 -1
@@ -6,7 +6,7 @@ const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const React = require("react");
8
8
  const ReactDOM = require("react-dom");
9
- const index = require("./index-B85fJxGa.js");
9
+ const index = require("./index-CKoxbSC0.js");
10
10
  const reactIntl = require("react-intl");
11
11
  const EmptyBox = require("./EmptyBox-DT6D5gcf.js");
12
12
  const _baseConvert = require("./_baseConvert-B84_vf8X.js");
@@ -23,7 +23,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
23
23
  );
24
24
  });
25
25
  };
26
- const version = "0.2.6";
26
+ const version = "0.3.0";
27
27
  const keywords = [];
28
28
  const type = "commonjs";
29
29
  const exports = {
@@ -3781,7 +3781,7 @@ const Alias = ({ config }) => {
3781
3781
  const initialValue = initialValues[key];
3782
3782
  if (currentValue && !isOverride) {
3783
3783
  const path2 = config.pattern ? `${config.pattern}/${currentValue}` : `${currentValue}`;
3784
- onChange("webatlas_path", path2);
3784
+ onChange("webatlas_path", transformToUrl(path2));
3785
3785
  }
3786
3786
  if (!initialLoadComplete) return;
3787
3787
  if (currentValue !== initialValue) {
@@ -4076,7 +4076,7 @@ const index = {
4076
4076
  defaultMessage: "Routes"
4077
4077
  },
4078
4078
  Component: async () => {
4079
- const component = await import("./index-B2Tiv3EK.mjs");
4079
+ const component = await import("./index-DZmhgSeq.mjs");
4080
4080
  return { default: component.default };
4081
4081
  },
4082
4082
  permissions: [
@@ -4095,7 +4095,7 @@ const index = {
4095
4095
  defaultMessage: "Navigation"
4096
4096
  },
4097
4097
  Component: async () => {
4098
- const component = await import("./index-C7B8QHDT.mjs");
4098
+ const component = await import("./index-CwHhwtOU.mjs");
4099
4099
  return { default: component.default };
4100
4100
  },
4101
4101
  permissions: [
@@ -4124,7 +4124,7 @@ const index = {
4124
4124
  Component: async () => {
4125
4125
  return await import(
4126
4126
  /* webpackChunkName: "webatlas-settings-page" */
4127
- "./index-BocSkZOu.mjs"
4127
+ "./index-BOq-WidK.mjs"
4128
4128
  );
4129
4129
  },
4130
4130
  permissions: [
@@ -10,7 +10,7 @@ import { useIntl } from "react-intl";
10
10
  import "@strapi/icons/symbols";
11
11
  import ReactDOM__default, { unstable_batchedUpdates as unstable_batchedUpdates$1 } from "react-dom";
12
12
  import { createGlobalStyle, styled } from "styled-components";
13
- import { _ as _extends$4, b as usePluginConfig, c as useAllContentTypes, t as transformToUrl, P as PLUGIN_NAME, g as getTranslation, T as Tooltip } from "./index-CCiDvLAC.mjs";
13
+ import { _ as _extends$4, b as usePluginConfig, c as useAllContentTypes, t as transformToUrl, P as PLUGIN_NAME, g as getTranslation, T as Tooltip } from "./index-BBL_eQ0G.mjs";
14
14
  var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
15
15
  var _freeGlobal = freeGlobal$1;
16
16
  var freeGlobal = _freeGlobal;
@@ -11,7 +11,7 @@ const reactIntl = require("react-intl");
11
11
  require("@strapi/icons/symbols");
12
12
  const ReactDOM = require("react-dom");
13
13
  const styledComponents = require("styled-components");
14
- const index = require("./index-B85fJxGa.js");
14
+ const index = require("./index-CKoxbSC0.js");
15
15
  const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
16
16
  function _interopNamespace(e2) {
17
17
  if (e2 && e2.__esModule) return e2;
@@ -41,7 +41,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
41
41
  );
42
42
  });
43
43
  };
44
- const version = "0.2.6";
44
+ const version = "0.3.0";
45
45
  const keywords = [];
46
46
  const type = "commonjs";
47
47
  const exports$1 = {
@@ -3799,7 +3799,7 @@ const Alias = ({ config }) => {
3799
3799
  const initialValue = initialValues[key];
3800
3800
  if (currentValue && !isOverride) {
3801
3801
  const path2 = config.pattern ? `${config.pattern}/${currentValue}` : `${currentValue}`;
3802
- onChange("webatlas_path", path2);
3802
+ onChange("webatlas_path", transformToUrl(path2));
3803
3803
  }
3804
3804
  if (!initialLoadComplete) return;
3805
3805
  if (currentValue !== initialValue) {
@@ -4094,7 +4094,7 @@ const index = {
4094
4094
  defaultMessage: "Routes"
4095
4095
  },
4096
4096
  Component: async () => {
4097
- const component = await Promise.resolve().then(() => require("./index-DGb8ESH-.js"));
4097
+ const component = await Promise.resolve().then(() => require("./index-DsTyLL2l.js"));
4098
4098
  return { default: component.default };
4099
4099
  },
4100
4100
  permissions: [
@@ -4113,7 +4113,7 @@ const index = {
4113
4113
  defaultMessage: "Navigation"
4114
4114
  },
4115
4115
  Component: async () => {
4116
- const component = await Promise.resolve().then(() => require("./index-B0XE_zRP.js"));
4116
+ const component = await Promise.resolve().then(() => require("./index-BAqGJ3TM.js"));
4117
4117
  return { default: component.default };
4118
4118
  },
4119
4119
  permissions: [
@@ -4142,7 +4142,7 @@ const index = {
4142
4142
  Component: async () => {
4143
4143
  return await Promise.resolve().then(() => require(
4144
4144
  /* webpackChunkName: "webatlas-settings-page" */
4145
- "./index-BbM9Sn1t.js"
4145
+ "./index-C4ou6MTp.js"
4146
4146
  ));
4147
4147
  },
4148
4148
  permissions: [
@@ -4,7 +4,7 @@ import { Dialog, Typography, Button, Modal, Flex, SingleSelect, SingleSelectOpti
4
4
  import { useFetchClient, Layouts } from "@strapi/strapi/admin";
5
5
  import { useState, useEffect, createContext, useRef, useContext, useReducer, useCallback, useMemo, forwardRef } from "react";
6
6
  import { createPortal } from "react-dom";
7
- import { u as useApi, g as getTranslation, d as debounce, a as duplicateCheck, t as transformToUrl, U as URLInfo } from "./index-CCiDvLAC.mjs";
7
+ import { u as useApi, g as getTranslation, d as debounce, a as duplicateCheck, t as transformToUrl, U as URLInfo } from "./index-BBL_eQ0G.mjs";
8
8
  import { useIntl } from "react-intl";
9
9
  import { C as Center, E as EmptyBox } from "./EmptyBox-7D4LrvdH.mjs";
10
10
  import { c as commonjsGlobal, _ as _baseConvert } from "./_baseConvert-C2SW1VHq.mjs";
@@ -3,7 +3,7 @@ import { useState, useEffect } from "react";
3
3
  import { Layouts } from "@strapi/strapi/admin";
4
4
  import { Table, Thead, Tr, Th, Typography, VisuallyHidden, Tbody, Td, Flex, LinkButton } from "@strapi/design-system";
5
5
  import { Pencil } from "@strapi/icons";
6
- import { u as useApi, g as getTranslation } from "./index-CCiDvLAC.mjs";
6
+ import { u as useApi, g as getTranslation } from "./index-BBL_eQ0G.mjs";
7
7
  import { C as Center, E as EmptyBox } from "./EmptyBox-7D4LrvdH.mjs";
8
8
  import { useIntl } from "react-intl";
9
9
  function getRouteType(route) {
@@ -5,7 +5,7 @@ const React = require("react");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const icons = require("@strapi/icons");
8
- const index = require("./index-B85fJxGa.js");
8
+ const index = require("./index-CKoxbSC0.js");
9
9
  const EmptyBox = require("./EmptyBox-DT6D5gcf.js");
10
10
  const reactIntl = require("react-intl");
11
11
  function getRouteType(route) {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-B85fJxGa.js");
2
+ const index = require("../_chunks/index-CKoxbSC0.js");
3
3
  require("react/jsx-runtime");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-CCiDvLAC.mjs";
1
+ import { i } from "../_chunks/index-BBL_eQ0G.mjs";
2
2
  import "react/jsx-runtime";
3
3
  export {
4
4
  i as default
@@ -20,7 +20,7 @@ function transformToUrl(input) {
20
20
  input = input.replace(/-+/g, "-");
21
21
  return input;
22
22
  }
23
- const version = "0.3.0";
23
+ const version = "0.3.1";
24
24
  const keywords = [];
25
25
  const type = "commonjs";
26
26
  const exports$1 = {
@@ -239,9 +239,11 @@ const bootstrap = async ({ strapi: strapi2 }) => {
239
239
  });
240
240
  strapi2.db?.lifecycles.subscribe({
241
241
  models: config2.selectedContentTypes.map((type2) => type2.uid),
242
- async beforeCreate() {
242
+ async beforeCreate(event) {
243
243
  const validContentTypes = config2.selectedContentTypes.filter((type2) => strapi2.contentTypes[type2.uid]);
244
244
  await pluginStore.set({ key: "config", value: { selectedContentTypes: validContentTypes } });
245
+ if (!event.params.data.webatlas_path) return;
246
+ event.params.data.webatlas_path = transformToUrl(event.params.data.webatlas_path);
245
247
  },
246
248
  async afterCreate(event) {
247
249
  const ctSettings = config2.selectedContentTypes.find((type2) => type2.uid === event.model.uid);