Compare commits

...
3 changed files with 15 additions and 5 deletions
@@ -22,7 +22,7 @@ export default {
},
computed: {
pickerWidgets() {
return this.widgets.filter(widget => widget.allowed);
return this.widgets.filter(widget => widget.allowed).map(widget => ({ ...widget, permitted: true }));
},
sizeLimits() {
return Object.fromEntries(this.widgets.map(({ setup, widget_id: type }) => {
@@ -6,10 +6,16 @@ export default {
BsModal,
WidgetIcon,
},
props: [
"widgets",
"hiddenWidgets"
],
props: {
widgets: {
type: [ Array, null ],
required: true
},
hiddenWidgets: {
type: Array,
default: []
}
},
data: () => ({
callbacks: {}
}),
+4
View File
@@ -47,3 +47,7 @@ function splitWordsInCamelCase(string) {
splitWords.push(string.slice(lastUpperCaseLetterIndex));
return splitWords;
}
export function isString(str) {
return typeof str === 'string' || str instanceof String;
}