@pronto-tools-and-more/components 12.15.0 → 12.17.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -398,6 +398,9 @@ var Button = ({
398
398
  to,
399
399
  className
400
400
  }) => {
401
+ if (to && to.startsWith("/#/")) {
402
+ to = to.slice(2);
403
+ }
401
404
  const json = {
402
405
  type: "button",
403
406
  message,
@@ -1055,12 +1058,18 @@ var LanguageMapping = {
1055
1058
  it: "it-it"
1056
1059
  };
1057
1060
 
1061
+ // src/parts/PathPrefix/PathPrefix.ts
1062
+ var pathPrefix = process.env.PATH_PREFIX || "";
1063
+
1058
1064
  // src/parts/LanguageRegistry/LanguageRegistry.ts
1059
1065
  var createLanguageRegistry = () => {
1060
1066
  const languages = /* @__PURE__ */ Object.create(null);
1061
1067
  const links = /* @__PURE__ */ Object.create(null);
1062
1068
  const menus = /* @__PURE__ */ Object.create(null);
1063
1069
  const getLink = (language, key) => {
1070
+ if (pathPrefix) {
1071
+ return `${pathPrefix}${links[language][key]}`;
1072
+ }
1064
1073
  return links[language][key];
1065
1074
  };
1066
1075
  const getText = (language, key) => {
@@ -1931,5 +1940,6 @@ export {
1931
1940
  getPinterestUserUrl,
1932
1941
  getTwitterShareUrl,
1933
1942
  getTwitterUserUrl,
1934
- getYoutubeUserUrl
1943
+ getYoutubeUserUrl,
1944
+ pathPrefix
1935
1945
  };
@@ -55,6 +55,7 @@ export * from "../MenuItemRenderer/MenuItemRenderer.ts";
55
55
  export * from "../MenuItems/MenuItems.tsx";
56
56
  export * from "../MenuItems2/MenuItems2.tsx";
57
57
  export * from "../OneEPaper/OneEPaper.tsx";
58
+ export * from "../PathPrefix/PathPrefix.ts";
58
59
  export * from "../PostContentBody/PostContentBody.tsx";
59
60
  export * from "../PrimaryCategory/PrimaryCategory.tsx";
60
61
  export * from "../PublicationToggle/PublicationToggle.tsx";
@@ -0,0 +1 @@
1
+ export declare const pathPrefix: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "12.15.0",
3
+ "version": "12.17.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",