strapi-plugin-navigation 3.0.3-beta.1 → 3.0.3
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/README.md +16 -24
- package/dist/admin/index.js +14 -12
- package/dist/admin/index.mjs +14 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -571,16 +571,14 @@ query {
|
|
|
571
571
|
path
|
|
572
572
|
related {
|
|
573
573
|
id
|
|
574
|
-
|
|
575
|
-
__typename
|
|
574
|
+
__typename
|
|
576
575
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
576
|
+
... on Page {
|
|
577
|
+
Title
|
|
578
|
+
}
|
|
580
579
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
580
|
+
... on WithFlowType {
|
|
581
|
+
Name
|
|
584
582
|
}
|
|
585
583
|
}
|
|
586
584
|
items {
|
|
@@ -589,16 +587,14 @@ query {
|
|
|
589
587
|
path
|
|
590
588
|
related {
|
|
591
589
|
id
|
|
592
|
-
|
|
593
|
-
__typename
|
|
590
|
+
__typename
|
|
594
591
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
592
|
+
... on Page {
|
|
593
|
+
Title
|
|
594
|
+
}
|
|
598
595
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
596
|
+
... on WithFlowType {
|
|
597
|
+
Name
|
|
602
598
|
}
|
|
603
599
|
}
|
|
604
600
|
}
|
|
@@ -618,10 +614,8 @@ query {
|
|
|
618
614
|
"path": "/test-path",
|
|
619
615
|
"related": {
|
|
620
616
|
"id": 3,
|
|
621
|
-
"
|
|
622
|
-
|
|
623
|
-
"Name": "Test"
|
|
624
|
-
}
|
|
617
|
+
"__typename": "WithFlowType",
|
|
618
|
+
"Name": "Test"
|
|
625
619
|
},
|
|
626
620
|
"items": [
|
|
627
621
|
{
|
|
@@ -630,10 +624,8 @@ query {
|
|
|
630
624
|
"path": "/test-path/nested-one",
|
|
631
625
|
"related": {
|
|
632
626
|
"id": 1,
|
|
633
|
-
"
|
|
634
|
-
|
|
635
|
-
"Title": "Eg. Page title"
|
|
636
|
-
}
|
|
627
|
+
"__typename": "Page",
|
|
628
|
+
"Title": "Eg. Page title"
|
|
637
629
|
}
|
|
638
630
|
}
|
|
639
631
|
]
|
package/dist/admin/index.js
CHANGED
|
@@ -53557,7 +53557,8 @@ const NavigationItemForm = ({
|
|
|
53557
53557
|
},
|
|
53558
53558
|
[contentTypeItemsQuery.data, configQuery.data, contentTypes]
|
|
53559
53559
|
);
|
|
53560
|
-
const
|
|
53560
|
+
const availableNavigationItemTypeOptions = !configQuery.data?.contentTypes.length ? ["EXTERNAL", "WRAPPER"] : ["INTERNAL", "EXTERNAL", "WRAPPER"];
|
|
53561
|
+
const navigationItemTypeOptions = availableNavigationItemTypeOptions.map((key) => {
|
|
53561
53562
|
return {
|
|
53562
53563
|
key,
|
|
53563
53564
|
value: key,
|
|
@@ -53739,7 +53740,7 @@ const NavigationItemForm = ({
|
|
|
53739
53740
|
onChange: (eventOrPath) => handleChange("type", eventOrPath, onChange),
|
|
53740
53741
|
value: values.type,
|
|
53741
53742
|
name: "type",
|
|
53742
|
-
disabled: !
|
|
53743
|
+
disabled: !canUpdate,
|
|
53743
53744
|
width: "100%",
|
|
53744
53745
|
children: navigationItemTypeOptions.map(({ key, label, value }) => /* @__PURE__ */ jsxRuntime.jsx(SingleSelectOption, { value, children: label }, key))
|
|
53745
53746
|
}
|
|
@@ -54957,24 +54958,25 @@ const CustomFieldTable = ({
|
|
|
54957
54958
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { textColor: "neutral800", children: customField.required ? /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$4x, {}) : /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$1Z, {}) })
|
|
54958
54959
|
}
|
|
54959
54960
|
) }),
|
|
54960
|
-
/* @__PURE__ */ jsxRuntime.jsx(Td, { children: /* @__PURE__ */ jsxRuntime.
|
|
54961
|
+
/* @__PURE__ */ jsxRuntime.jsx(Td, { children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { width: "100%", justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(IconButtonGroup, { children: [
|
|
54961
54962
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
54962
54963
|
IconButton$1,
|
|
54963
54964
|
{
|
|
54964
|
-
onClick: () =>
|
|
54965
|
-
label: formatMessage(
|
|
54966
|
-
|
|
54965
|
+
onClick: () => onToggleCustomField(customField),
|
|
54966
|
+
label: formatMessage(
|
|
54967
|
+
getTrad(`${tradPrefix}${customField.enabled ? "disable" : "enable"}`)
|
|
54968
|
+
),
|
|
54969
|
+
variant: customField.enabled ? "success-light" : "tertiary",
|
|
54970
|
+
children: customField.enabled ? /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$3x, {}) : /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$3v, {}),
|
|
54967
54971
|
style: { minWidth: 50 }
|
|
54968
54972
|
}
|
|
54969
54973
|
),
|
|
54970
54974
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
54971
54975
|
IconButton$1,
|
|
54972
54976
|
{
|
|
54973
|
-
onClick: () =>
|
|
54974
|
-
label: formatMessage(
|
|
54975
|
-
|
|
54976
|
-
),
|
|
54977
|
-
children: customField.enabled ? /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$3x, {}) : /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$3v, {}),
|
|
54977
|
+
onClick: () => onOpenModal(customField),
|
|
54978
|
+
label: formatMessage(getTrad(`${tradPrefix}edit`)),
|
|
54979
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ForwardRef$1r, {}),
|
|
54978
54980
|
style: { minWidth: 50 }
|
|
54979
54981
|
}
|
|
54980
54982
|
),
|
|
@@ -54987,7 +54989,7 @@ const CustomFieldTable = ({
|
|
|
54987
54989
|
style: { minWidth: 50 }
|
|
54988
54990
|
}
|
|
54989
54991
|
)
|
|
54990
|
-
] }) })
|
|
54992
|
+
] }) }) })
|
|
54991
54993
|
] }, customField.name) : null
|
|
54992
54994
|
) })
|
|
54993
54995
|
]
|
package/dist/admin/index.mjs
CHANGED
|
@@ -53537,7 +53537,8 @@ const NavigationItemForm = ({
|
|
|
53537
53537
|
},
|
|
53538
53538
|
[contentTypeItemsQuery.data, configQuery.data, contentTypes]
|
|
53539
53539
|
);
|
|
53540
|
-
const
|
|
53540
|
+
const availableNavigationItemTypeOptions = !configQuery.data?.contentTypes.length ? ["EXTERNAL", "WRAPPER"] : ["INTERNAL", "EXTERNAL", "WRAPPER"];
|
|
53541
|
+
const navigationItemTypeOptions = availableNavigationItemTypeOptions.map((key) => {
|
|
53541
53542
|
return {
|
|
53542
53543
|
key,
|
|
53543
53544
|
value: key,
|
|
@@ -53719,7 +53720,7 @@ const NavigationItemForm = ({
|
|
|
53719
53720
|
onChange: (eventOrPath) => handleChange("type", eventOrPath, onChange),
|
|
53720
53721
|
value: values.type,
|
|
53721
53722
|
name: "type",
|
|
53722
|
-
disabled: !
|
|
53723
|
+
disabled: !canUpdate,
|
|
53723
53724
|
width: "100%",
|
|
53724
53725
|
children: navigationItemTypeOptions.map(({ key, label, value }) => /* @__PURE__ */ jsx(SingleSelectOption, { value, children: label }, key))
|
|
53725
53726
|
}
|
|
@@ -54937,24 +54938,25 @@ const CustomFieldTable = ({
|
|
|
54937
54938
|
children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: customField.required ? /* @__PURE__ */ jsx(ForwardRef$4x, {}) : /* @__PURE__ */ jsx(ForwardRef$1Z, {}) })
|
|
54938
54939
|
}
|
|
54939
54940
|
) }),
|
|
54940
|
-
/* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */
|
|
54941
|
+
/* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Flex, { width: "100%", justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ jsxs(IconButtonGroup, { children: [
|
|
54941
54942
|
/* @__PURE__ */ jsx(
|
|
54942
54943
|
IconButton$1,
|
|
54943
54944
|
{
|
|
54944
|
-
onClick: () =>
|
|
54945
|
-
label: formatMessage(
|
|
54946
|
-
|
|
54945
|
+
onClick: () => onToggleCustomField(customField),
|
|
54946
|
+
label: formatMessage(
|
|
54947
|
+
getTrad(`${tradPrefix}${customField.enabled ? "disable" : "enable"}`)
|
|
54948
|
+
),
|
|
54949
|
+
variant: customField.enabled ? "success-light" : "tertiary",
|
|
54950
|
+
children: customField.enabled ? /* @__PURE__ */ jsx(ForwardRef$3x, {}) : /* @__PURE__ */ jsx(ForwardRef$3v, {}),
|
|
54947
54951
|
style: { minWidth: 50 }
|
|
54948
54952
|
}
|
|
54949
54953
|
),
|
|
54950
54954
|
/* @__PURE__ */ jsx(
|
|
54951
54955
|
IconButton$1,
|
|
54952
54956
|
{
|
|
54953
|
-
onClick: () =>
|
|
54954
|
-
label: formatMessage(
|
|
54955
|
-
|
|
54956
|
-
),
|
|
54957
|
-
children: customField.enabled ? /* @__PURE__ */ jsx(ForwardRef$3x, {}) : /* @__PURE__ */ jsx(ForwardRef$3v, {}),
|
|
54957
|
+
onClick: () => onOpenModal(customField),
|
|
54958
|
+
label: formatMessage(getTrad(`${tradPrefix}edit`)),
|
|
54959
|
+
children: /* @__PURE__ */ jsx(ForwardRef$1r, {}),
|
|
54958
54960
|
style: { minWidth: 50 }
|
|
54959
54961
|
}
|
|
54960
54962
|
),
|
|
@@ -54967,7 +54969,7 @@ const CustomFieldTable = ({
|
|
|
54967
54969
|
style: { minWidth: 50 }
|
|
54968
54970
|
}
|
|
54969
54971
|
)
|
|
54970
|
-
] }) })
|
|
54972
|
+
] }) }) })
|
|
54971
54973
|
] }, customField.name) : null
|
|
54972
54974
|
) })
|
|
54973
54975
|
]
|