@interware/content-generator 0.4.1 → 0.4.2

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.
@@ -2,12 +2,12 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useRBAC, useFetchClient, useNotification, Page } from "@strapi/strapi/admin";
3
3
  import { SubNav, SubNavHeader, SubNavSections, SubNavSection, SubNavLink, Box, Table, Thead, Tr, Th, Typography, Flex, Tbody, Td, Button, LinkButton, Dialog, Grid, Field, Textarea, TextInput, Combobox, ComboboxOption, Modal, Card, CardHeader, CardCheckbox, CardAsset, CardBody, CardContent, CardTitle, CardSubtitle, CardBadge, CardAction, IconButton, DesignSystemProvider } from "@strapi/design-system";
4
4
  import { useLocation, useNavigate, Routes, Route } from "react-router-dom";
5
- import { p as pluginPermissions, c as closeDialog, o as openDialog, P as PLUGIN_ID } from "./index-Ce6iZs1V.mjs";
5
+ import { p as pluginPermissions, c as closeDialog, o as openDialog, P as PLUGIN_ID } from "./index-DL56cMMt.mjs";
6
6
  import { useIntl } from "react-intl";
7
7
  import { useCallback, memo, useMemo, useState, useRef, useEffect, createContext, useContext } from "react";
8
8
  import { useDispatch, useSelector } from "react-redux";
9
9
  import { Play, ExternalLink, Image as Image$1, Download, Trash, PlusCircle } from "@strapi/icons";
10
- import { g as getTranslation } from "./getTranslation-DEI5jv50.mjs";
10
+ import { g as getTranslation } from "./getTranslation-YJf3i4B7.mjs";
11
11
  import { useFormik } from "formik";
12
12
  import * as Yup from "yup";
13
13
  const links = [
@@ -1068,9 +1068,13 @@ const ImagesProvider = ({ children }) => {
1068
1068
  }
1069
1069
  }, [openDialog2, setOpen]);
1070
1070
  const downloadImage = (url, filename) => {
1071
+ const encodedFilename = encodeURIComponent(filename);
1072
+ const separator = url.includes("?") ? "&" : "?";
1073
+ const finalUrl = `${url}${separator}response-content-disposition=attachment;filename="${encodedFilename}"`;
1071
1074
  const link = document.createElement("a");
1072
- link.href = url;
1073
- link.download = filename;
1075
+ link.href = finalUrl;
1076
+ link.target = "_blank";
1077
+ link.rel = "noopener";
1074
1078
  document.body.appendChild(link);
1075
1079
  link.click();
1076
1080
  document.body.removeChild(link);
@@ -4,12 +4,12 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const admin = require("@strapi/strapi/admin");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const reactRouterDom = require("react-router-dom");
7
- const index = require("./index-B84clBNy.js");
7
+ const index = require("./index-DIbmEmw5.js");
8
8
  const reactIntl = require("react-intl");
9
9
  const react = require("react");
10
10
  const reactRedux = require("react-redux");
11
11
  const icons = require("@strapi/icons");
12
- const getTranslation = require("./getTranslation-DkcopoYv.js");
12
+ const getTranslation = require("./getTranslation-BODOQcEi.js");
13
13
  const formik = require("formik");
14
14
  const Yup = require("yup");
15
15
  function _interopNamespace(e) {
@@ -1088,9 +1088,13 @@ const ImagesProvider = ({ children }) => {
1088
1088
  }
1089
1089
  }, [openDialog, setOpen]);
1090
1090
  const downloadImage = (url, filename) => {
1091
+ const encodedFilename = encodeURIComponent(filename);
1092
+ const separator = url.includes("?") ? "&" : "?";
1093
+ const finalUrl = `${url}${separator}response-content-disposition=attachment;filename="${encodedFilename}"`;
1091
1094
  const link = document.createElement("a");
1092
- link.href = url;
1093
- link.download = filename;
1095
+ link.href = finalUrl;
1096
+ link.target = "_blank";
1097
+ link.rel = "noopener";
1094
1098
  document.body.appendChild(link);
1095
1099
  link.click();
1096
1100
  document.body.removeChild(link);
@@ -5,8 +5,8 @@ import { useCallback, useState, useEffect } from "react";
5
5
  import { Box, Grid, Field, Flex, Button, DesignSystemProvider, Typography } from "@strapi/design-system";
6
6
  import { Formik } from "formik";
7
7
  import * as Yup from "yup";
8
- import { P as PLUGIN_ID } from "./index-Ce6iZs1V.mjs";
9
- import { g as getTranslation } from "./getTranslation-DEI5jv50.mjs";
8
+ import { P as PLUGIN_ID } from "./index-DL56cMMt.mjs";
9
+ import { g as getTranslation } from "./getTranslation-YJf3i4B7.mjs";
10
10
  const useSettings = () => {
11
11
  const { get, post } = useFetchClient();
12
12
  const getSettings = useCallback(
@@ -7,8 +7,8 @@ const react = require("react");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const formik = require("formik");
9
9
  const Yup = require("yup");
10
- const index = require("./index-B84clBNy.js");
11
- const getTranslation = require("./getTranslation-DkcopoYv.js");
10
+ const index = require("./index-DIbmEmw5.js");
11
+ const getTranslation = require("./getTranslation-BODOQcEi.js");
12
12
  function _interopNamespace(e) {
13
13
  if (e && e.__esModule) return e;
14
14
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("./index-B84clBNy.js");
2
+ const index = require("./index-DIbmEmw5.js");
3
3
  const getTranslation = (id) => `${index.PLUGIN_ID}.${id}`;
4
4
  exports.getTranslation = getTranslation;
@@ -1,4 +1,4 @@
1
- import { P as PLUGIN_ID } from "./index-Ce6iZs1V.mjs";
1
+ import { P as PLUGIN_ID } from "./index-DL56cMMt.mjs";
2
2
  const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
3
3
  export {
4
4
  getTranslation as g
@@ -77,7 +77,7 @@ const index = {
77
77
  defaultMessage: PLUGIN_ID
78
78
  },
79
79
  Component: async () => {
80
- const { App } = await Promise.resolve().then(() => require("./App-BM49G6ds.js"));
80
+ const { App } = await Promise.resolve().then(() => require("./App-CsarVpQf.js"));
81
81
  return App;
82
82
  },
83
83
  permissions: [
@@ -98,7 +98,7 @@ const index = {
98
98
  defaultMessage: PLUGIN_ID
99
99
  },
100
100
  Component: async () => {
101
- const component = await Promise.resolve().then(() => require("./Settings-qlkGqVhn.js"));
101
+ const component = await Promise.resolve().then(() => require("./Settings-DXyz9jmT.js"));
102
102
  return component.default;
103
103
  },
104
104
  to: `plugins/${PLUGIN_ID}/settings`,
@@ -76,7 +76,7 @@ const index = {
76
76
  defaultMessage: PLUGIN_ID
77
77
  },
78
78
  Component: async () => {
79
- const { App } = await import("./App-0TtrQDm-.mjs");
79
+ const { App } = await import("./App-8EiV8xw6.mjs");
80
80
  return App;
81
81
  },
82
82
  permissions: [
@@ -97,7 +97,7 @@ const index = {
97
97
  defaultMessage: PLUGIN_ID
98
98
  },
99
99
  Component: async () => {
100
- const component = await import("./Settings-DnZt_OBc.mjs");
100
+ const component = await import("./Settings-Be27Xer1.mjs");
101
101
  return component.default;
102
102
  },
103
103
  to: `plugins/${PLUGIN_ID}/settings`,
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-B84clBNy.js");
2
+ const index = require("../_chunks/index-DIbmEmw5.js");
3
3
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-Ce6iZs1V.mjs";
1
+ import { i } from "../_chunks/index-DL56cMMt.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.4.1",
2
+ "version": "0.4.2",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "publishConfig": {