@creopse/react 0.0.21 → 0.0.22
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/{content-I5YJXH3C.cjs → content-BpVMJ1wf.cjs} +8 -2
- package/dist/{content-BrpVuVxT.js → content-CSFJStkb.js} +8 -2
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/types/hooks/config.d.ts +1 -1
- package/types/types/plugin.d.ts +1 -1
|
@@ -7034,7 +7034,7 @@ const useHelper = () => {
|
|
|
7034
7034
|
userLanguage = props.userData.preferences.locale;
|
|
7035
7035
|
}
|
|
7036
7036
|
if (!lang2) {
|
|
7037
|
-
lang2 = localStorage.getItem(langKey) || props.appLocale || config?.locale ||
|
|
7037
|
+
lang2 = localStorage.getItem(langKey) || (config?.useUserLocaleAsFallback ? userLanguage : false) || props.appLocale || config?.locale || "en";
|
|
7038
7038
|
}
|
|
7039
7039
|
try {
|
|
7040
7040
|
parsedData = JSON.parse(data);
|
|
@@ -7043,7 +7043,13 @@ const useHelper = () => {
|
|
|
7043
7043
|
}
|
|
7044
7044
|
return parsedData ? parsedData[lang2.toUpperCase()] || parsedData[lang2] || "" : "";
|
|
7045
7045
|
},
|
|
7046
|
-
[
|
|
7046
|
+
[
|
|
7047
|
+
config?.locale,
|
|
7048
|
+
config?.useUserLocaleAsFallback,
|
|
7049
|
+
langKey,
|
|
7050
|
+
props.appLocale,
|
|
7051
|
+
props.userData
|
|
7052
|
+
]
|
|
7047
7053
|
);
|
|
7048
7054
|
const tr = React.useCallback(
|
|
7049
7055
|
(data, lang2) => {
|
|
@@ -7033,7 +7033,7 @@ const useHelper = () => {
|
|
|
7033
7033
|
userLanguage = props.userData.preferences.locale;
|
|
7034
7034
|
}
|
|
7035
7035
|
if (!lang2) {
|
|
7036
|
-
lang2 = localStorage.getItem(langKey) || props.appLocale || config?.locale ||
|
|
7036
|
+
lang2 = localStorage.getItem(langKey) || (config?.useUserLocaleAsFallback ? userLanguage : false) || props.appLocale || config?.locale || "en";
|
|
7037
7037
|
}
|
|
7038
7038
|
try {
|
|
7039
7039
|
parsedData = JSON.parse(data);
|
|
@@ -7042,7 +7042,13 @@ const useHelper = () => {
|
|
|
7042
7042
|
}
|
|
7043
7043
|
return parsedData ? parsedData[lang2.toUpperCase()] || parsedData[lang2] || "" : "";
|
|
7044
7044
|
},
|
|
7045
|
-
[
|
|
7045
|
+
[
|
|
7046
|
+
config?.locale,
|
|
7047
|
+
config?.useUserLocaleAsFallback,
|
|
7048
|
+
langKey,
|
|
7049
|
+
props.appLocale,
|
|
7050
|
+
props.userData
|
|
7051
|
+
]
|
|
7046
7052
|
);
|
|
7047
7053
|
const tr = useCallback(
|
|
7048
7054
|
(data, lang2) => {
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const content = require("../content-
|
|
3
|
+
const content = require("../content-BpVMJ1wf.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const useNewsletter = () => {
|
|
6
6
|
const { request } = content.useApi();
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as useApi } from "../content-
|
|
2
|
-
import { f, a, u, b } from "../content-
|
|
1
|
+
import { e as useApi } from "../content-CSFJStkb.js";
|
|
2
|
+
import { f, a, u, b } from "../content-CSFJStkb.js";
|
|
3
3
|
import { useState, useCallback } from "react";
|
|
4
4
|
const useNewsletter = () => {
|
|
5
5
|
const { request } = useApi();
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const content = require("./content-
|
|
4
|
+
const content = require("./content-BpVMJ1wf.cjs");
|
|
5
5
|
const react = require("@inertiajs/react");
|
|
6
6
|
const reactDom = require("react-dom");
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { useState, useEffect, createContext, useRef, useLayoutEffect, useId, useContext, useInsertionEffect, useMemo, useCallback, Children, isValidElement, Fragment, createElement, forwardRef, Component } from "react";
|
|
3
|
-
import { u as useHelper, a as useContent, b as useProps, P as PropsContext, R as ResolveSectionsContext, c as cloneDeep, s as slideToId, E as EditorMessageType, d as RouterContext, C as ConfigContext } from "./content-
|
|
3
|
+
import { u as useHelper, a as useContent, b as useProps, P as PropsContext, R as ResolveSectionsContext, c as cloneDeep, s as slideToId, E as EditorMessageType, d as RouterContext, C as ConfigContext } from "./content-CSFJStkb.js";
|
|
4
4
|
import { router } from "@inertiajs/react";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
var jsxRuntime = { exports: {} };
|
package/package.json
CHANGED
package/types/hooks/config.d.ts
CHANGED