strapi-plugin-navigation 3.0.0 → 3.0.1-beta.0
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 +1 -1
- package/dist/_chunks/{ca-Catou0wg.mjs → ca-BQ81Qo-9.mjs} +8 -1
- package/dist/_chunks/{ca-DtaqQvTI.js → ca-DnfumDWu.js} +8 -1
- package/dist/_chunks/{en-BPYZYsnc.mjs → en-CcW4J8BX.mjs} +8 -1
- package/dist/_chunks/{en-CT7eKHZS.js → en-DFL7XJr6.js} +8 -1
- package/dist/_chunks/{fr-BTVWPkax.mjs → fr-C2AllG-a.mjs} +8 -1
- package/dist/_chunks/{fr-ybbSdjZO.js → fr-CM4is9Gz.js} +8 -1
- package/dist/admin/index.js +239 -222
- package/dist/admin/index.mjs +239 -222
- package/dist/admin/src/translations/ca.d.ts +7 -0
- package/dist/admin/src/translations/en.d.ts +7 -0
- package/dist/admin/src/translations/fr.d.ts +7 -0
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +3 -3
- package/package.json +7 -7
package/dist/admin/index.mjs
CHANGED
|
@@ -5621,7 +5621,7 @@ function createCollection(name2) {
|
|
|
5621
5621
|
}
|
|
5622
5622
|
const cache = /* @__PURE__ */ new Map();
|
|
5623
5623
|
function useCollator(locale, options) {
|
|
5624
|
-
const cacheKey = locale +
|
|
5624
|
+
const cacheKey = locale + Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join();
|
|
5625
5625
|
if (cache.has(cacheKey)) {
|
|
5626
5626
|
return cache.get(cacheKey);
|
|
5627
5627
|
}
|
|
@@ -22851,6 +22851,15 @@ class ViewUpdate {
|
|
|
22851
22851
|
return (this.flags & 4) > 0;
|
|
22852
22852
|
}
|
|
22853
22853
|
/**
|
|
22854
|
+
Returns true when
|
|
22855
|
+
[`viewportChanged`](https://codemirror.net/6/docs/ref/#view.ViewUpdate.viewportChanged) is true
|
|
22856
|
+
and the viewport change is not just the result of mapping it in
|
|
22857
|
+
response to document changes.
|
|
22858
|
+
*/
|
|
22859
|
+
get viewportMoved() {
|
|
22860
|
+
return (this.flags & 8) > 0;
|
|
22861
|
+
}
|
|
22862
|
+
/**
|
|
22854
22863
|
Indicates whether the height of a block element in the editor
|
|
22855
22864
|
changed in this update.
|
|
22856
22865
|
*/
|
|
@@ -22862,7 +22871,7 @@ class ViewUpdate {
|
|
|
22862
22871
|
editor, or elements within the editor, changed.
|
|
22863
22872
|
*/
|
|
22864
22873
|
get geometryChanged() {
|
|
22865
|
-
return this.docChanged || (this.flags & (
|
|
22874
|
+
return this.docChanged || (this.flags & (16 | 2)) > 0;
|
|
22866
22875
|
}
|
|
22867
22876
|
/**
|
|
22868
22877
|
True when this update indicates a focus change.
|
|
@@ -25783,7 +25792,7 @@ class ViewState {
|
|
|
25783
25792
|
this.updateViewportLines();
|
|
25784
25793
|
if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2e3 << 1)
|
|
25785
25794
|
this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, update.changes)));
|
|
25786
|
-
update.flags |= this.computeVisibleRanges();
|
|
25795
|
+
update.flags |= this.computeVisibleRanges(update.changes);
|
|
25787
25796
|
if (scrollTarget)
|
|
25788
25797
|
this.scrollTarget = scrollTarget;
|
|
25789
25798
|
if (!this.mustEnforceCursorAssoc && update.selectionSet && update.view.lineWrapping && update.state.selection.main.empty && update.state.selection.main.assoc && !update.state.facet(nativeSelectionHidden))
|
|
@@ -25805,7 +25814,7 @@ class ViewState {
|
|
|
25805
25814
|
if (scaleX > 5e-3 && Math.abs(this.scaleX - scaleX) > 5e-3 || scaleY > 5e-3 && Math.abs(this.scaleY - scaleY) > 5e-3) {
|
|
25806
25815
|
this.scaleX = scaleX;
|
|
25807
25816
|
this.scaleY = scaleY;
|
|
25808
|
-
result |=
|
|
25817
|
+
result |= 16;
|
|
25809
25818
|
refresh = measureContent = true;
|
|
25810
25819
|
}
|
|
25811
25820
|
}
|
|
@@ -25814,13 +25823,13 @@ class ViewState {
|
|
|
25814
25823
|
if (this.paddingTop != paddingTop || this.paddingBottom != paddingBottom) {
|
|
25815
25824
|
this.paddingTop = paddingTop;
|
|
25816
25825
|
this.paddingBottom = paddingBottom;
|
|
25817
|
-
result |=
|
|
25826
|
+
result |= 16 | 2;
|
|
25818
25827
|
}
|
|
25819
25828
|
if (this.editorWidth != view.scrollDOM.clientWidth) {
|
|
25820
25829
|
if (oracle.lineWrapping)
|
|
25821
25830
|
measureContent = true;
|
|
25822
25831
|
this.editorWidth = view.scrollDOM.clientWidth;
|
|
25823
|
-
result |=
|
|
25832
|
+
result |= 16;
|
|
25824
25833
|
}
|
|
25825
25834
|
let scrollTop = view.scrollDOM.scrollTop * this.scaleY;
|
|
25826
25835
|
if (this.scrollTop != scrollTop) {
|
|
@@ -25843,7 +25852,7 @@ class ViewState {
|
|
|
25843
25852
|
if (this.contentDOMWidth != contentWidth || this.editorHeight != view.scrollDOM.clientHeight) {
|
|
25844
25853
|
this.contentDOMWidth = domRect.width;
|
|
25845
25854
|
this.editorHeight = view.scrollDOM.clientHeight;
|
|
25846
|
-
result |=
|
|
25855
|
+
result |= 16;
|
|
25847
25856
|
}
|
|
25848
25857
|
if (measureContent) {
|
|
25849
25858
|
let lineHeights = view.docView.measureVisibleLineHeights(this.viewport);
|
|
@@ -25854,7 +25863,7 @@ class ViewState {
|
|
|
25854
25863
|
refresh = lineHeight > 0 && oracle.refresh(whiteSpace, lineHeight, charWidth, textHeight, contentWidth / charWidth, lineHeights);
|
|
25855
25864
|
if (refresh) {
|
|
25856
25865
|
view.docView.minWidth = 0;
|
|
25857
|
-
result |=
|
|
25866
|
+
result |= 16;
|
|
25858
25867
|
}
|
|
25859
25868
|
}
|
|
25860
25869
|
if (dTop > 0 && dBottom > 0)
|
|
@@ -26056,7 +26065,7 @@ class ViewState {
|
|
|
26056
26065
|
this.lineGapDeco = Decoration.set(gaps.map((gap) => gap.draw(this, this.heightOracle.lineWrapping)));
|
|
26057
26066
|
}
|
|
26058
26067
|
}
|
|
26059
|
-
computeVisibleRanges() {
|
|
26068
|
+
computeVisibleRanges(changes) {
|
|
26060
26069
|
let deco = this.stateDeco;
|
|
26061
26070
|
if (this.lineGaps.length)
|
|
26062
26071
|
deco = deco.concat(this.lineGapDeco);
|
|
@@ -26068,9 +26077,21 @@ class ViewState {
|
|
|
26068
26077
|
point() {
|
|
26069
26078
|
}
|
|
26070
26079
|
}, 20);
|
|
26071
|
-
let changed =
|
|
26080
|
+
let changed = 0;
|
|
26081
|
+
if (ranges.length != this.visibleRanges.length) {
|
|
26082
|
+
changed = 8 | 4;
|
|
26083
|
+
} else {
|
|
26084
|
+
for (let i = 0; i < ranges.length && !(changed & 8); i++) {
|
|
26085
|
+
let old = this.visibleRanges[i], nw = ranges[i];
|
|
26086
|
+
if (old.from != nw.from || old.to != nw.to) {
|
|
26087
|
+
changed |= 4;
|
|
26088
|
+
if (!(changes && changes.mapPos(old.from, -1) == nw.from && changes.mapPos(old.to, 1) == nw.to))
|
|
26089
|
+
changed |= 8;
|
|
26090
|
+
}
|
|
26091
|
+
}
|
|
26092
|
+
}
|
|
26072
26093
|
this.visibleRanges = ranges;
|
|
26073
|
-
return changed
|
|
26094
|
+
return changed;
|
|
26074
26095
|
}
|
|
26075
26096
|
lineBlockAt(pos) {
|
|
26076
26097
|
return pos >= this.viewport.from && pos <= this.viewport.to && this.viewportLines.find((b) => b.from <= pos && b.to >= pos) || scaleBlock(this.heightMap.lineAt(pos, QueryType$1.ByPos, this.heightOracle, 0, 0), this.scaler);
|
|
@@ -28369,14 +28390,7 @@ function rectanglesForRange(view, className, range) {
|
|
|
28369
28390
|
return pieces(top2).concat(between).concat(pieces(bottom));
|
|
28370
28391
|
}
|
|
28371
28392
|
function piece(left, top2, right, bottom) {
|
|
28372
|
-
return new RectangleMarker(
|
|
28373
|
-
className,
|
|
28374
|
-
left - base2.left,
|
|
28375
|
-
top2 - base2.top - 0.01,
|
|
28376
|
-
right - left,
|
|
28377
|
-
bottom - top2 + 0.01
|
|
28378
|
-
/* C.Epsilon */
|
|
28379
|
-
);
|
|
28393
|
+
return new RectangleMarker(className, left - base2.left, top2 - base2.top, right - left, bottom - top2);
|
|
28380
28394
|
}
|
|
28381
28395
|
function pieces({ top: top2, bottom, horizontal }) {
|
|
28382
28396
|
let pieces2 = [];
|
|
@@ -28750,12 +28764,12 @@ class MatchDecorator {
|
|
|
28750
28764
|
let changeFrom = 1e9, changeTo = -1;
|
|
28751
28765
|
if (update.docChanged)
|
|
28752
28766
|
update.changes.iterChanges((_f, _t, from, to) => {
|
|
28753
|
-
if (to
|
|
28767
|
+
if (to >= update.view.viewport.from && from <= update.view.viewport.to) {
|
|
28754
28768
|
changeFrom = Math.min(from, changeFrom);
|
|
28755
28769
|
changeTo = Math.max(to, changeTo);
|
|
28756
28770
|
}
|
|
28757
28771
|
});
|
|
28758
|
-
if (update.
|
|
28772
|
+
if (update.viewportMoved || changeTo - changeFrom > 1e3)
|
|
28759
28773
|
return this.createDeco(update.view);
|
|
28760
28774
|
if (changeTo > -1)
|
|
28761
28775
|
return this.updateRange(update.view, deco.map(update.changes), changeFrom, changeTo);
|
|
@@ -31018,10 +31032,10 @@ class IndentContext {
|
|
|
31018
31032
|
const indentNodeProp = /* @__PURE__ */ new NodeProp();
|
|
31019
31033
|
function syntaxIndentation(cx, ast, pos) {
|
|
31020
31034
|
let stack = ast.resolveStack(pos);
|
|
31021
|
-
let inner =
|
|
31035
|
+
let inner = ast.resolveInner(pos, -1).resolve(pos, 0).enterUnfinishedNodesBefore(pos);
|
|
31022
31036
|
if (inner != stack.node) {
|
|
31023
31037
|
let add2 = [];
|
|
31024
|
-
for (let cur2 = inner; cur2
|
|
31038
|
+
for (let cur2 = inner; cur2 && !(cur2.from == stack.node.from && cur2.type == stack.node.type); cur2 = cur2.parent)
|
|
31025
31039
|
add2.push(cur2);
|
|
31026
31040
|
for (let i = add2.length - 1; i >= 0; i--)
|
|
31027
31041
|
stack = { node: add2[i], next: stack };
|
|
@@ -50605,9 +50619,9 @@ const Field = ({ children, name: name2, hint, label, error, required }) => {
|
|
|
50605
50619
|
);
|
|
50606
50620
|
};
|
|
50607
50621
|
const trads = {
|
|
50608
|
-
en: () => import("../_chunks/en-
|
|
50609
|
-
fr: () => import("../_chunks/fr-
|
|
50610
|
-
ca: () => import("../_chunks/ca-
|
|
50622
|
+
en: () => import("../_chunks/en-CcW4J8BX.mjs"),
|
|
50623
|
+
fr: () => import("../_chunks/fr-C2AllG-a.mjs"),
|
|
50624
|
+
ca: () => import("../_chunks/ca-BQ81Qo-9.mjs")
|
|
50611
50625
|
};
|
|
50612
50626
|
const getTradId = (msg) => `${PLUGIN_ID}.${msg}`;
|
|
50613
50627
|
const getTrad = (msg, defaultMessage) => ({
|
|
@@ -52758,7 +52772,7 @@ const Item = ({
|
|
|
52758
52772
|
level,
|
|
52759
52773
|
isLast,
|
|
52760
52774
|
style: { opacity: isDragging ? 0.2 : 1 },
|
|
52761
|
-
ref: refs
|
|
52775
|
+
ref: refs.dropRef,
|
|
52762
52776
|
children: [
|
|
52763
52777
|
/* @__PURE__ */ jsxs(
|
|
52764
52778
|
Card,
|
|
@@ -53688,98 +53702,94 @@ const NavigationItemForm = ({
|
|
|
53688
53702
|
isSingleSelected
|
|
53689
53703
|
});
|
|
53690
53704
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
53691
|
-
/* @__PURE__ */ jsxs(Grid.Root, { gap: 5, children: [
|
|
53692
|
-
/* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col:
|
|
53705
|
+
/* @__PURE__ */ jsxs(Grid.Root, { gap: 5, paddingBottom: 1, children: [
|
|
53706
|
+
/* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 8, children: /* @__PURE__ */ jsx(
|
|
53693
53707
|
Field,
|
|
53694
53708
|
{
|
|
53695
|
-
name: "
|
|
53696
|
-
label: formatMessage(getTrad("popup.item.form.
|
|
53697
|
-
error: renderError("
|
|
53709
|
+
name: "type",
|
|
53710
|
+
label: formatMessage(getTrad("popup.item.form.type.label", "Internal link")),
|
|
53711
|
+
error: renderError("type"),
|
|
53698
53712
|
hint: formatMessage(
|
|
53699
53713
|
getTrad("popup.item.form.title.placeholder", "e.g. Blog")
|
|
53700
53714
|
),
|
|
53701
53715
|
children: /* @__PURE__ */ jsx(
|
|
53702
|
-
|
|
53716
|
+
SingleSelect,
|
|
53703
53717
|
{
|
|
53704
|
-
|
|
53705
|
-
|
|
53706
|
-
name: "
|
|
53707
|
-
|
|
53708
|
-
|
|
53718
|
+
onChange: (eventOrPath) => handleChange("type", eventOrPath, onChange),
|
|
53719
|
+
value: values.type,
|
|
53720
|
+
name: "type",
|
|
53721
|
+
disabled: !configQuery.data?.contentTypes.length || !canUpdate,
|
|
53722
|
+
width: "100%",
|
|
53723
|
+
children: navigationItemTypeOptions.map(({ key, label, value }) => /* @__PURE__ */ jsx(SingleSelectOption, { value, children: label }, key))
|
|
53709
53724
|
}
|
|
53710
53725
|
)
|
|
53711
53726
|
}
|
|
53712
53727
|
) }, "title"),
|
|
53713
|
-
/* @__PURE__ */ jsx(
|
|
53714
|
-
|
|
53728
|
+
/* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 4, children: /* @__PURE__ */ jsx(
|
|
53729
|
+
Field,
|
|
53715
53730
|
{
|
|
53716
|
-
|
|
53717
|
-
|
|
53718
|
-
|
|
53731
|
+
name: "menuAttached",
|
|
53732
|
+
label: formatMessage(
|
|
53733
|
+
getTrad("popup.item.form.menuAttached.label", "MenuAttached")
|
|
53734
|
+
),
|
|
53735
|
+
error: renderError("menuAttached"),
|
|
53736
|
+
hint: formatMessage(
|
|
53737
|
+
getTrad(
|
|
53738
|
+
"popup.item.form.menuAttached.placeholder",
|
|
53739
|
+
"is menu item attached to menu"
|
|
53740
|
+
)
|
|
53741
|
+
),
|
|
53719
53742
|
children: /* @__PURE__ */ jsx(
|
|
53720
|
-
|
|
53743
|
+
Toggle,
|
|
53721
53744
|
{
|
|
53722
|
-
name: "
|
|
53723
|
-
|
|
53724
|
-
|
|
53725
|
-
|
|
53726
|
-
|
|
53745
|
+
name: "menuAttached",
|
|
53746
|
+
checked: values.menuAttached,
|
|
53747
|
+
onChange: (eventOrPath) => handleChange(eventOrPath, !values.menuAttached, onChange),
|
|
53748
|
+
value: values.menuAttached,
|
|
53749
|
+
onLabel: formatMessage(
|
|
53750
|
+
getTrad("popup.item.form.menuAttached.value.yes", "yes")
|
|
53727
53751
|
),
|
|
53728
|
-
|
|
53729
|
-
|
|
53730
|
-
|
|
53731
|
-
|
|
53732
|
-
|
|
53733
|
-
name: "type",
|
|
53734
|
-
disabled: !configQuery.data?.contentTypes.length || !canUpdate,
|
|
53735
|
-
width: "100%",
|
|
53736
|
-
children: navigationItemTypeOptions.map(({ key, label, value }) => /* @__PURE__ */ jsx(SingleSelectOption, { value, children: label }, key))
|
|
53737
|
-
}
|
|
53738
|
-
)
|
|
53752
|
+
offLabel: formatMessage(
|
|
53753
|
+
getTrad("popup.item.form.menuAttached.value.no", "no")
|
|
53754
|
+
),
|
|
53755
|
+
disabled: !canUpdate || (configQuery.data?.cascadeMenuAttached ? !(current.isMenuAllowedLevel && current.parentAttachedToMenu) : false),
|
|
53756
|
+
width: "100%"
|
|
53739
53757
|
}
|
|
53740
53758
|
)
|
|
53741
|
-
}
|
|
53742
|
-
|
|
53743
|
-
|
|
53759
|
+
}
|
|
53760
|
+
) }, "menuAttached")
|
|
53761
|
+
] }),
|
|
53762
|
+
/* @__PURE__ */ jsxs(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
53744
53763
|
/* @__PURE__ */ jsx(
|
|
53745
53764
|
Grid.Item,
|
|
53746
53765
|
{
|
|
53747
53766
|
alignItems: "flex-start",
|
|
53748
|
-
col: values.type === "INTERNAL" ?
|
|
53749
|
-
lg: 12,
|
|
53767
|
+
col: values.type === "INTERNAL" ? 8 : 12,
|
|
53750
53768
|
children: /* @__PURE__ */ jsx(
|
|
53751
53769
|
Field,
|
|
53752
53770
|
{
|
|
53753
|
-
name: "
|
|
53754
|
-
label: formatMessage(
|
|
53755
|
-
|
|
53756
|
-
),
|
|
53757
|
-
error: renderError("menuAttached"),
|
|
53771
|
+
name: "title",
|
|
53772
|
+
label: formatMessage(getTrad("popup.item.form.title.label", "Title")),
|
|
53773
|
+
error: renderError("title"),
|
|
53758
53774
|
hint: formatMessage(
|
|
53759
|
-
getTrad(
|
|
53760
|
-
"popup.item.form.menuAttached.placeholder",
|
|
53761
|
-
"is menu item attached to menu"
|
|
53762
|
-
)
|
|
53775
|
+
getTrad("popup.item.form.title.placeholder", "e.g. Blog")
|
|
53763
53776
|
),
|
|
53764
53777
|
children: /* @__PURE__ */ jsx(
|
|
53765
|
-
|
|
53778
|
+
TextInput,
|
|
53766
53779
|
{
|
|
53767
|
-
|
|
53768
|
-
|
|
53769
|
-
|
|
53770
|
-
|
|
53771
|
-
|
|
53772
|
-
offLabel: "false",
|
|
53773
|
-
disabled: !canUpdate || (configQuery.data?.cascadeMenuAttached ? !(current.isMenuAllowedLevel && current.parentAttachedToMenu) : false),
|
|
53774
|
-
width: "100%"
|
|
53780
|
+
type: "string",
|
|
53781
|
+
disabled: !canUpdate || values.autoSync && values.type === "INTERNAL",
|
|
53782
|
+
name: "title",
|
|
53783
|
+
onChange: (eventOrPath, value) => handleChange(eventOrPath, value, onChange),
|
|
53784
|
+
value: values.title
|
|
53775
53785
|
}
|
|
53776
53786
|
)
|
|
53777
53787
|
}
|
|
53778
53788
|
)
|
|
53779
53789
|
},
|
|
53780
|
-
"
|
|
53790
|
+
"title"
|
|
53781
53791
|
),
|
|
53782
|
-
values.type === "INTERNAL" && /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 4,
|
|
53792
|
+
values.type === "INTERNAL" && /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 4, children: /* @__PURE__ */ jsx(
|
|
53783
53793
|
Field,
|
|
53784
53794
|
{
|
|
53785
53795
|
name: "autoSync",
|
|
@@ -53798,153 +53808,159 @@ const NavigationItemForm = ({
|
|
|
53798
53808
|
}
|
|
53799
53809
|
)
|
|
53800
53810
|
}
|
|
53801
|
-
) }, "autoSync")
|
|
53802
|
-
|
|
53811
|
+
) }, "autoSync")
|
|
53812
|
+
] }),
|
|
53813
|
+
/* @__PURE__ */ jsx(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 12, children: /* @__PURE__ */ jsx(
|
|
53814
|
+
Field,
|
|
53815
|
+
{
|
|
53816
|
+
name: pathSourceName,
|
|
53817
|
+
label: formatMessage(
|
|
53818
|
+
getTrad(`popup.item.form.${pathSourceName}.label`, "Path")
|
|
53819
|
+
),
|
|
53820
|
+
error: renderError(pathSourceName),
|
|
53821
|
+
hint: [
|
|
53822
|
+
formatMessage(
|
|
53823
|
+
getTrad(`popup.item.form.${pathSourceName}.placeholder`, "e.g. Blog")
|
|
53824
|
+
),
|
|
53825
|
+
pathDefault ? formatMessage(getTrad("popup.item.form.type.external.description"), {
|
|
53826
|
+
value: pathDefault
|
|
53827
|
+
}) : ""
|
|
53828
|
+
].join(" "),
|
|
53829
|
+
children: /* @__PURE__ */ jsx(
|
|
53830
|
+
TextInput,
|
|
53831
|
+
{
|
|
53832
|
+
disabled: !canUpdate,
|
|
53833
|
+
name: pathSourceName,
|
|
53834
|
+
onChange: (eventOrPath, value) => handleChange(eventOrPath, value, onChange),
|
|
53835
|
+
value: values[pathSourceName],
|
|
53836
|
+
width: "100%"
|
|
53837
|
+
}
|
|
53838
|
+
)
|
|
53839
|
+
}
|
|
53840
|
+
) }, "title") }),
|
|
53841
|
+
values.type === "INTERNAL" && /* @__PURE__ */ jsxs(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
53842
|
+
/* @__PURE__ */ jsx(
|
|
53843
|
+
Grid.Item,
|
|
53844
|
+
{
|
|
53845
|
+
alignItems: "flex-start",
|
|
53846
|
+
col: values.relatedType && !isSingleSelected ? 6 : 12,
|
|
53847
|
+
children: /* @__PURE__ */ jsx(
|
|
53848
|
+
Field,
|
|
53849
|
+
{
|
|
53850
|
+
name: "relatedType",
|
|
53851
|
+
label: formatMessage(
|
|
53852
|
+
getTrad("popup.item.form.relatedType.label", "Related Type")
|
|
53853
|
+
),
|
|
53854
|
+
error: renderError("relatedType"),
|
|
53855
|
+
hint: !isLoading && isEmpty(relatedTypeSelectOptions) ? formatMessage(
|
|
53856
|
+
getTrad(
|
|
53857
|
+
"popup.item.form.relatedType.empty",
|
|
53858
|
+
"There are no more content types"
|
|
53859
|
+
)
|
|
53860
|
+
) : void 0,
|
|
53861
|
+
children: /* @__PURE__ */ jsx(
|
|
53862
|
+
SingleSelect,
|
|
53863
|
+
{
|
|
53864
|
+
name: "relatedType",
|
|
53865
|
+
onChange: (eventOrPath) => handleChange("relatedType", eventOrPath, onChange),
|
|
53866
|
+
value: values.relatedType,
|
|
53867
|
+
disabled: !configQuery.data?.contentTypes.length || !canUpdate,
|
|
53868
|
+
width: "100%",
|
|
53869
|
+
children: configQuery.data?.contentTypes.map((contentType2) => /* @__PURE__ */ jsx(SingleSelectOption, { value: contentType2.uid, children: contentType2.contentTypeName }, contentType2.uid))
|
|
53870
|
+
}
|
|
53871
|
+
)
|
|
53872
|
+
}
|
|
53873
|
+
)
|
|
53874
|
+
}
|
|
53875
|
+
),
|
|
53876
|
+
values.relatedType && !isSingleSelected && /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 6, children: /* @__PURE__ */ jsx(
|
|
53803
53877
|
Field,
|
|
53804
53878
|
{
|
|
53805
|
-
name:
|
|
53806
|
-
label: formatMessage(
|
|
53807
|
-
|
|
53808
|
-
|
|
53809
|
-
|
|
53810
|
-
|
|
53811
|
-
|
|
53812
|
-
getTrad(`popup.item.form.${pathSourceName}.placeholder`, "e.g. Blog")
|
|
53879
|
+
name: "related",
|
|
53880
|
+
label: formatMessage(getTrad("popup.item.form.related.label", "Related")),
|
|
53881
|
+
error: renderError("related"),
|
|
53882
|
+
hint: !isLoading && thereAreNoMoreContentTypes ? formatMessage(
|
|
53883
|
+
getTrad(
|
|
53884
|
+
"popup.item.form.related.empty",
|
|
53885
|
+
"There are no more entities"
|
|
53813
53886
|
),
|
|
53814
|
-
|
|
53815
|
-
|
|
53816
|
-
}) : ""
|
|
53817
|
-
].join(" "),
|
|
53887
|
+
{ contentTypeName: values.relatedType }
|
|
53888
|
+
) : void 0,
|
|
53818
53889
|
children: /* @__PURE__ */ jsx(
|
|
53819
|
-
|
|
53890
|
+
SingleSelect,
|
|
53820
53891
|
{
|
|
53821
|
-
|
|
53822
|
-
|
|
53823
|
-
|
|
53824
|
-
|
|
53825
|
-
|
|
53892
|
+
name: "related",
|
|
53893
|
+
onChange: (eventOrPath) => handleChange("related", eventOrPath, onChange),
|
|
53894
|
+
value: values.related,
|
|
53895
|
+
options: relatedSelectOptions,
|
|
53896
|
+
disabled: isLoading || thereAreNoMoreContentTypes || !canUpdate,
|
|
53897
|
+
width: "100%",
|
|
53898
|
+
children: relatedSelectOptions.map(({ key, label, value }) => /* @__PURE__ */ jsx(SingleSelectOption, { value, children: label }, key))
|
|
53826
53899
|
}
|
|
53827
53900
|
)
|
|
53828
53901
|
}
|
|
53829
|
-
) }
|
|
53830
|
-
|
|
53831
|
-
|
|
53832
|
-
|
|
53833
|
-
|
|
53834
|
-
|
|
53835
|
-
|
|
53836
|
-
|
|
53837
|
-
|
|
53838
|
-
|
|
53839
|
-
|
|
53840
|
-
|
|
53841
|
-
|
|
53842
|
-
|
|
53843
|
-
|
|
53844
|
-
|
|
53845
|
-
|
|
53846
|
-
|
|
53847
|
-
|
|
53848
|
-
|
|
53849
|
-
|
|
53850
|
-
|
|
53851
|
-
|
|
53852
|
-
|
|
53853
|
-
|
|
53854
|
-
|
|
53855
|
-
|
|
53902
|
+
) })
|
|
53903
|
+
] }),
|
|
53904
|
+
!isEmpty(configQuery.data?.additionalFields) && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
53905
|
+
/* @__PURE__ */ jsx(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(Grid.Item, { col: 12, lg: 12, children: /* @__PURE__ */ jsx(Divider, { width: "100%" }) }) }),
|
|
53906
|
+
/* @__PURE__ */ jsxs(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: [
|
|
53907
|
+
configQuery.data?.additionalFields.map(
|
|
53908
|
+
(additionalField, index2) => {
|
|
53909
|
+
if (additionalField !== "audience") {
|
|
53910
|
+
return /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 6, children: /* @__PURE__ */ jsx(
|
|
53911
|
+
Field,
|
|
53912
|
+
{
|
|
53913
|
+
name: `additionalFields.${additionalField.name}`,
|
|
53914
|
+
label: additionalField.label,
|
|
53915
|
+
error: renderError(`additionalFields.${additionalField.name}`),
|
|
53916
|
+
children: /* @__PURE__ */ jsx(
|
|
53917
|
+
AdditionalFieldInput,
|
|
53918
|
+
{
|
|
53919
|
+
name: `additionalFields.${additionalField.name}`,
|
|
53920
|
+
field: additionalField,
|
|
53921
|
+
isLoading,
|
|
53922
|
+
onChange,
|
|
53923
|
+
onChangeEnhancer: handleChange,
|
|
53924
|
+
value: get(values?.additionalFields, additionalField.name),
|
|
53925
|
+
disabled: !canUpdate
|
|
53926
|
+
}
|
|
53927
|
+
)
|
|
53928
|
+
}
|
|
53929
|
+
) }, additionalField.name);
|
|
53930
|
+
}
|
|
53856
53931
|
}
|
|
53857
|
-
)
|
|
53858
|
-
|
|
53859
|
-
|
|
53860
|
-
|
|
53861
|
-
|
|
53862
|
-
|
|
53863
|
-
|
|
53864
|
-
|
|
53865
|
-
|
|
53866
|
-
|
|
53867
|
-
|
|
53868
|
-
|
|
53869
|
-
|
|
53870
|
-
|
|
53871
|
-
|
|
53872
|
-
|
|
53873
|
-
|
|
53874
|
-
|
|
53875
|
-
|
|
53876
|
-
|
|
53877
|
-
|
|
53878
|
-
|
|
53879
|
-
|
|
53880
|
-
|
|
53881
|
-
|
|
53882
|
-
|
|
53883
|
-
}
|
|
53884
|
-
)
|
|
53932
|
+
),
|
|
53933
|
+
configQuery.data?.additionalFields.map(
|
|
53934
|
+
(additionalField, index2) => {
|
|
53935
|
+
if (additionalField === "audience") {
|
|
53936
|
+
return /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 12, children: /* @__PURE__ */ jsx(
|
|
53937
|
+
Field,
|
|
53938
|
+
{
|
|
53939
|
+
name: "audience",
|
|
53940
|
+
label: formatMessage(getTrad("popup.item.form.audience.label")),
|
|
53941
|
+
error: renderError("audience"),
|
|
53942
|
+
hint: !isLoading && isEmpty(audienceOptions) ? formatMessage(
|
|
53943
|
+
getTrad("popup.item.form.title.placeholder", "e.g. Blog")
|
|
53944
|
+
) : void 0,
|
|
53945
|
+
children: /* @__PURE__ */ jsx(
|
|
53946
|
+
MultiSelect,
|
|
53947
|
+
{
|
|
53948
|
+
name: "audience",
|
|
53949
|
+
value: values.audience,
|
|
53950
|
+
onChange: (eventOrPath) => handleChange("audience", eventOrPath, onChange),
|
|
53951
|
+
width: "100%",
|
|
53952
|
+
children: audienceOptions.map(({ value, label }) => /* @__PURE__ */ jsx(MultiSelectOption, { value, children: label }, value))
|
|
53953
|
+
}
|
|
53954
|
+
)
|
|
53955
|
+
}
|
|
53956
|
+
) }, "audience");
|
|
53957
|
+
}
|
|
53885
53958
|
}
|
|
53886
|
-
)
|
|
53959
|
+
)
|
|
53887
53960
|
] }),
|
|
53888
|
-
|
|
53889
|
-
configQuery.data?.additionalFields.map(
|
|
53890
|
-
(additionalField, index2) => {
|
|
53891
|
-
if (additionalField === "audience") {
|
|
53892
|
-
return /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 6, lg: 12, children: /* @__PURE__ */ jsx(
|
|
53893
|
-
Field,
|
|
53894
|
-
{
|
|
53895
|
-
name: "audience",
|
|
53896
|
-
label: formatMessage(getTrad("popup.item.form.audience.label")),
|
|
53897
|
-
error: renderError("audience"),
|
|
53898
|
-
hint: !isLoading && isEmpty(audienceOptions) ? formatMessage(
|
|
53899
|
-
getTrad("popup.item.form.title.placeholder", "e.g. Blog")
|
|
53900
|
-
) : void 0,
|
|
53901
|
-
children: /* @__PURE__ */ jsx(
|
|
53902
|
-
MultiSelect,
|
|
53903
|
-
{
|
|
53904
|
-
name: "audience",
|
|
53905
|
-
value: values.audience,
|
|
53906
|
-
onChange: (eventOrPath) => handleChange("audience", eventOrPath, onChange),
|
|
53907
|
-
width: "100%",
|
|
53908
|
-
children: audienceOptions.map(({ value, label }) => /* @__PURE__ */ jsx(MultiSelectOption, { value, children: label }, value))
|
|
53909
|
-
}
|
|
53910
|
-
)
|
|
53911
|
-
}
|
|
53912
|
-
) }, "audience");
|
|
53913
|
-
} else {
|
|
53914
|
-
return /* @__PURE__ */ jsx(
|
|
53915
|
-
Grid.Item,
|
|
53916
|
-
{
|
|
53917
|
-
alignItems: "flex-start",
|
|
53918
|
-
col: 6,
|
|
53919
|
-
lg: 12,
|
|
53920
|
-
children: /* @__PURE__ */ jsx(
|
|
53921
|
-
Field,
|
|
53922
|
-
{
|
|
53923
|
-
name: `additionalFields.${additionalField.name}`,
|
|
53924
|
-
label: additionalField.label,
|
|
53925
|
-
error: renderError(`additionalFields.${additionalField.name}`),
|
|
53926
|
-
children: /* @__PURE__ */ jsx(
|
|
53927
|
-
AdditionalFieldInput,
|
|
53928
|
-
{
|
|
53929
|
-
name: `additionalFields.${additionalField.name}`,
|
|
53930
|
-
field: additionalField,
|
|
53931
|
-
isLoading,
|
|
53932
|
-
onChange,
|
|
53933
|
-
onChangeEnhancer: handleChange,
|
|
53934
|
-
value: get(values?.additionalFields, additionalField.name),
|
|
53935
|
-
disabled: !canUpdate
|
|
53936
|
-
}
|
|
53937
|
-
)
|
|
53938
|
-
}
|
|
53939
|
-
)
|
|
53940
|
-
},
|
|
53941
|
-
additionalField.name
|
|
53942
|
-
);
|
|
53943
|
-
}
|
|
53944
|
-
}
|
|
53945
|
-
)
|
|
53961
|
+
/* @__PURE__ */ jsx(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(Grid.Item, { col: 12, lg: 12, children: /* @__PURE__ */ jsx(Divider, { width: "100%" }) }) })
|
|
53946
53962
|
] }),
|
|
53947
|
-
availableLocaleOptions && availableLocaleOptions.length > 1 && /* @__PURE__ */
|
|
53963
|
+
availableLocaleOptions && availableLocaleOptions.length > 1 && /* @__PURE__ */ jsx(Grid.Root, { gap: 5, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxs(Grid.Item, { alignItems: "flex-start", col: 12, children: [
|
|
53948
53964
|
/* @__PURE__ */ jsx(Divider, { marginTop: 5, marginBottom: 5 }),
|
|
53949
53965
|
/* @__PURE__ */ jsxs(Grid.Root, { gap: 5, children: [
|
|
53950
53966
|
/* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 6, lg: 12, children: /* @__PURE__ */ jsx(
|
|
@@ -53979,7 +53995,8 @@ const NavigationItemForm = ({
|
|
|
53979
53995
|
}
|
|
53980
53996
|
) }) })
|
|
53981
53997
|
] })
|
|
53982
|
-
] })
|
|
53998
|
+
] }, "title") }),
|
|
53999
|
+
/* @__PURE__ */ jsx(Grid.Root, { gap: 5, children: /* @__PURE__ */ jsx(Grid.Item, { alignItems: "flex-start", col: 12 }, "title") })
|
|
53983
54000
|
] });
|
|
53984
54001
|
} }) }),
|
|
53985
54002
|
/* @__PURE__ */ jsx(
|
|
@@ -54169,7 +54186,7 @@ const Inner$1 = () => {
|
|
|
54169
54186
|
const [currentLocale, setCurrentLocale] = useState();
|
|
54170
54187
|
const viewPermissions = useMemo(
|
|
54171
54188
|
() => ({
|
|
54172
|
-
access: pluginPermissions.access
|
|
54189
|
+
access: pluginPermissions.access,
|
|
54173
54190
|
update: pluginPermissions.update
|
|
54174
54191
|
}),
|
|
54175
54192
|
[]
|