@hitkey-io/strapi-plugin-region 1.0.0 → 1.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/_chunks/{Input-ClJGentv.js → Input-Bmdg_AIq.js} +4 -2
- package/dist/_chunks/{Input-DV9NWUHU.mjs → Input-D40fvg2A.mjs} +4 -2
- package/dist/_chunks/{index-C8USiGWk.js → index-CK-3sF3l.js} +1 -1
- package/dist/_chunks/{index-Cpq91_9N.mjs → index-DewAD-wn.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const react = require("react");
|
|
|
5
5
|
const reactIntl = require("react-intl");
|
|
6
6
|
const designSystem = require("@strapi/design-system");
|
|
7
7
|
const reactTooltip = require("@radix-ui/react-tooltip");
|
|
8
|
-
const index = require("./index-
|
|
8
|
+
const index = require("./index-CK-3sF3l.js");
|
|
9
9
|
const PLUGIN_ID = "strapi-plugin-region";
|
|
10
10
|
const Input = react.forwardRef((props, ref) => {
|
|
11
11
|
const { name, value, onChange, label, error, hint, required, disabled, attribute } = props;
|
|
@@ -45,7 +45,7 @@ const Input = react.forwardRef((props, ref) => {
|
|
|
45
45
|
[selectedCountry, allCountries]
|
|
46
46
|
);
|
|
47
47
|
const regions = countryData?.regions ?? [];
|
|
48
|
-
react.useMemo(
|
|
48
|
+
const regionData = react.useMemo(
|
|
49
49
|
() => regions.find((r) => r.shortCode === selectedRegion) ?? null,
|
|
50
50
|
[selectedRegion, regions]
|
|
51
51
|
);
|
|
@@ -75,6 +75,7 @@ const Input = react.forwardRef((props, ref) => {
|
|
|
75
75
|
designSystem.Combobox,
|
|
76
76
|
{
|
|
77
77
|
value: selectedCountry,
|
|
78
|
+
textValue: countryData?.countryName ?? "",
|
|
78
79
|
onChange: handleCountryChange,
|
|
79
80
|
onClear: () => handleCountryChange(void 0),
|
|
80
81
|
clearLabel: formatMessage({
|
|
@@ -94,6 +95,7 @@ const Input = react.forwardRef((props, ref) => {
|
|
|
94
95
|
designSystem.Combobox,
|
|
95
96
|
{
|
|
96
97
|
value: selectedRegion,
|
|
98
|
+
textValue: regionData?.name ?? "",
|
|
97
99
|
onChange: handleRegionChange,
|
|
98
100
|
onClear: () => {
|
|
99
101
|
onChange({
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useMemo } from "react";
|
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Field, Grid, Combobox, ComboboxOption } from "@strapi/design-system";
|
|
5
5
|
import { Provider } from "@radix-ui/react-tooltip";
|
|
6
|
-
import { u as useCountries } from "./index-
|
|
6
|
+
import { u as useCountries } from "./index-DewAD-wn.mjs";
|
|
7
7
|
const PLUGIN_ID = "strapi-plugin-region";
|
|
8
8
|
const Input = forwardRef((props, ref) => {
|
|
9
9
|
const { name, value, onChange, label, error, hint, required, disabled, attribute } = props;
|
|
@@ -43,7 +43,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
43
43
|
[selectedCountry, allCountries]
|
|
44
44
|
);
|
|
45
45
|
const regions = countryData?.regions ?? [];
|
|
46
|
-
useMemo(
|
|
46
|
+
const regionData = useMemo(
|
|
47
47
|
() => regions.find((r) => r.shortCode === selectedRegion) ?? null,
|
|
48
48
|
[selectedRegion, regions]
|
|
49
49
|
);
|
|
@@ -73,6 +73,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
73
73
|
Combobox,
|
|
74
74
|
{
|
|
75
75
|
value: selectedCountry,
|
|
76
|
+
textValue: countryData?.countryName ?? "",
|
|
76
77
|
onChange: handleCountryChange,
|
|
77
78
|
onClear: () => handleCountryChange(void 0),
|
|
78
79
|
clearLabel: formatMessage({
|
|
@@ -92,6 +93,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
92
93
|
Combobox,
|
|
93
94
|
{
|
|
94
95
|
value: selectedRegion,
|
|
96
|
+
textValue: regionData?.name ?? "",
|
|
95
97
|
onChange: handleRegionChange,
|
|
96
98
|
onClear: () => {
|
|
97
99
|
onChange({
|
|
@@ -18929,7 +18929,7 @@ const index = {
|
|
|
18929
18929
|
},
|
|
18930
18930
|
icon: ForwardRef,
|
|
18931
18931
|
components: {
|
|
18932
|
-
Input: async () => Promise.resolve().then(() => require("./Input-
|
|
18932
|
+
Input: async () => Promise.resolve().then(() => require("./Input-Bmdg_AIq.js"))
|
|
18933
18933
|
},
|
|
18934
18934
|
options: {
|
|
18935
18935
|
base: [
|
|
@@ -18928,7 +18928,7 @@ const index = {
|
|
|
18928
18928
|
},
|
|
18929
18929
|
icon: ForwardRef,
|
|
18930
18930
|
components: {
|
|
18931
|
-
Input: async () => import("./Input-
|
|
18931
|
+
Input: async () => import("./Input-D40fvg2A.mjs")
|
|
18932
18932
|
},
|
|
18933
18933
|
options: {
|
|
18934
18934
|
base: [
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED