@geekron/strapi 0.2.5 → 0.2.6
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/admin/index.js +18 -15
- package/dist/admin/index.mjs +18 -15
- package/dist/server/index.js +13 -0
- package/dist/server/index.mjs +13 -0
- package/package.json +1 -1
package/dist/admin/index.js
CHANGED
|
@@ -46829,29 +46829,32 @@ function findItemDeep(items, itemId) {
|
|
|
46829
46829
|
return;
|
|
46830
46830
|
}
|
|
46831
46831
|
function removeItem(items, id) {
|
|
46832
|
-
|
|
46833
|
-
for (const item of items) {
|
|
46834
|
-
if (item.id === id) {
|
|
46835
|
-
continue;
|
|
46836
|
-
}
|
|
46832
|
+
return items.filter((item) => item.id !== id).map((item) => {
|
|
46837
46833
|
if (item.children.length) {
|
|
46838
|
-
|
|
46834
|
+
return {
|
|
46835
|
+
...item,
|
|
46836
|
+
children: removeItem(item.children, id)
|
|
46837
|
+
};
|
|
46839
46838
|
}
|
|
46840
|
-
|
|
46841
|
-
}
|
|
46842
|
-
return newItems;
|
|
46839
|
+
return item;
|
|
46840
|
+
});
|
|
46843
46841
|
}
|
|
46844
46842
|
function setProperty(items, id, property, setter) {
|
|
46845
|
-
|
|
46843
|
+
return items.map((item) => {
|
|
46846
46844
|
if (item.id === id) {
|
|
46847
|
-
|
|
46848
|
-
|
|
46845
|
+
return {
|
|
46846
|
+
...item,
|
|
46847
|
+
[property]: setter(item[property])
|
|
46848
|
+
};
|
|
46849
46849
|
}
|
|
46850
46850
|
if (item.children.length) {
|
|
46851
|
-
|
|
46851
|
+
return {
|
|
46852
|
+
...item,
|
|
46853
|
+
children: setProperty(item.children, id, property, setter)
|
|
46854
|
+
};
|
|
46852
46855
|
}
|
|
46853
|
-
|
|
46854
|
-
|
|
46856
|
+
return item;
|
|
46857
|
+
});
|
|
46855
46858
|
}
|
|
46856
46859
|
function countChildren(items, count = 0) {
|
|
46857
46860
|
return items.reduce((acc, { children }) => {
|
package/dist/admin/index.mjs
CHANGED
|
@@ -46874,29 +46874,32 @@ function findItemDeep(items, itemId) {
|
|
|
46874
46874
|
return;
|
|
46875
46875
|
}
|
|
46876
46876
|
function removeItem(items, id) {
|
|
46877
|
-
|
|
46878
|
-
for (const item of items) {
|
|
46879
|
-
if (item.id === id) {
|
|
46880
|
-
continue;
|
|
46881
|
-
}
|
|
46877
|
+
return items.filter((item) => item.id !== id).map((item) => {
|
|
46882
46878
|
if (item.children.length) {
|
|
46883
|
-
|
|
46879
|
+
return {
|
|
46880
|
+
...item,
|
|
46881
|
+
children: removeItem(item.children, id)
|
|
46882
|
+
};
|
|
46884
46883
|
}
|
|
46885
|
-
|
|
46886
|
-
}
|
|
46887
|
-
return newItems;
|
|
46884
|
+
return item;
|
|
46885
|
+
});
|
|
46888
46886
|
}
|
|
46889
46887
|
function setProperty(items, id, property, setter) {
|
|
46890
|
-
|
|
46888
|
+
return items.map((item) => {
|
|
46891
46889
|
if (item.id === id) {
|
|
46892
|
-
|
|
46893
|
-
|
|
46890
|
+
return {
|
|
46891
|
+
...item,
|
|
46892
|
+
[property]: setter(item[property])
|
|
46893
|
+
};
|
|
46894
46894
|
}
|
|
46895
46895
|
if (item.children.length) {
|
|
46896
|
-
|
|
46896
|
+
return {
|
|
46897
|
+
...item,
|
|
46898
|
+
children: setProperty(item.children, id, property, setter)
|
|
46899
|
+
};
|
|
46897
46900
|
}
|
|
46898
|
-
|
|
46899
|
-
|
|
46901
|
+
return item;
|
|
46902
|
+
});
|
|
46900
46903
|
}
|
|
46901
46904
|
function countChildren(items, count = 0) {
|
|
46902
46905
|
return items.reduce((acc, { children }) => {
|
package/dist/server/index.js
CHANGED
|
@@ -96,6 +96,19 @@ var schema_default = {
|
|
|
96
96
|
},
|
|
97
97
|
component: "site.social",
|
|
98
98
|
repeatable: true
|
|
99
|
+
},
|
|
100
|
+
footLinks: {
|
|
101
|
+
type: "customField",
|
|
102
|
+
pluginOptions: {
|
|
103
|
+
i18n: {
|
|
104
|
+
localized: true
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
customField: "plugin::website.dataNested",
|
|
108
|
+
required: false,
|
|
109
|
+
options: {
|
|
110
|
+
depth: 2
|
|
111
|
+
}
|
|
99
112
|
}
|
|
100
113
|
}
|
|
101
114
|
};
|
package/dist/server/index.mjs
CHANGED
|
@@ -61,6 +61,19 @@ var schema_default = {
|
|
|
61
61
|
},
|
|
62
62
|
component: "site.social",
|
|
63
63
|
repeatable: true
|
|
64
|
+
},
|
|
65
|
+
footLinks: {
|
|
66
|
+
type: "customField",
|
|
67
|
+
pluginOptions: {
|
|
68
|
+
i18n: {
|
|
69
|
+
localized: true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
customField: "plugin::website.dataNested",
|
|
73
|
+
required: false,
|
|
74
|
+
options: {
|
|
75
|
+
depth: 2
|
|
76
|
+
}
|
|
64
77
|
}
|
|
65
78
|
}
|
|
66
79
|
};
|