druxt-blocks 0.16.3 → 0.17.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.
|
@@ -213,14 +213,15 @@ export default {
|
|
|
213
213
|
// Debug data.
|
|
214
214
|
/* @slot Debug information */
|
|
215
215
|
scopedSlots.default = () => {
|
|
216
|
-
let summary
|
|
217
|
-
let description = [
|
|
218
|
-
h('p', 'DruxtBlocks knows that a block can be rendered, and has information provided by Drupal, but not enough to automatically determine the behaviour of the block.'),
|
|
219
|
-
h('p', 'To render this block manually, create a Nuxt component with one of the following component options.'),
|
|
220
|
-
]
|
|
216
|
+
let summary, description
|
|
221
217
|
|
|
218
|
+
if ((this.block || {}).attributes) {
|
|
219
|
+
summary = `Missing Vue template for the '${this.block.attributes.drupal_internal__id}' block`
|
|
220
|
+
description = [
|
|
221
|
+
h('p', `Create a Druxt theme component to render the "${this.block.attributes.settings.label}" block.`),
|
|
222
|
+
]
|
|
222
223
|
// Ensure an ID or UUID.
|
|
223
|
-
if (!this.id && !this.uuid) {
|
|
224
|
+
} else if (!this.id && !this.uuid) {
|
|
224
225
|
summary = "Missing required 'id' or 'uuid' prop."
|
|
225
226
|
description = [h('p', "The DruxtBlock component requires either the 'id' or 'uuid' prop to be set.")]
|
|
226
227
|
}
|
|
@@ -229,14 +230,25 @@ export default {
|
|
|
229
230
|
{ props: { summary } },
|
|
230
231
|
[
|
|
231
232
|
h('div', description),
|
|
232
|
-
!!this.component.options.length && h('
|
|
233
|
-
|
|
233
|
+
!!this.component.options.length && h('DruxtDevelTemplate', { props: { options: this.component.options }}),
|
|
234
|
+
!!this.block && h('details', [h('summary', 'JSON:API resource'), h('pre', [h('code', [JSON.stringify(this.block, null, ' ')])])])
|
|
234
235
|
]
|
|
235
236
|
)
|
|
236
237
|
}
|
|
237
238
|
|
|
238
239
|
return scopedSlots
|
|
239
240
|
},
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Druxt development template tool configuration.
|
|
244
|
+
*/
|
|
245
|
+
template: {
|
|
246
|
+
debug: 'block',
|
|
247
|
+
mixins: {
|
|
248
|
+
'DruxtBlocksBlockMixin': 'druxt-blocks'
|
|
249
|
+
},
|
|
250
|
+
slots: false
|
|
251
|
+
}
|
|
240
252
|
},
|
|
241
253
|
}
|
|
242
254
|
|
|
@@ -232,7 +232,17 @@ export default {
|
|
|
232
232
|
|
|
233
233
|
return scopedSlots
|
|
234
234
|
},
|
|
235
|
-
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Druxt development template tool configuration.
|
|
238
|
+
*/
|
|
239
|
+
template: {
|
|
240
|
+
debug: '{ blocks, name, theme }',
|
|
241
|
+
mixins: {
|
|
242
|
+
'DruxtBlocksRegionMixin': 'druxt-blocks'
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
236
246
|
}
|
|
237
247
|
|
|
238
248
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "druxt-blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Drupal Block and Block Region Druxt components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"block",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"axios": "^0.27.2",
|
|
46
|
-
"drupal-jsonapi-params": "^2.
|
|
47
|
-
"druxt": "^0.
|
|
48
|
-
"druxt-entity": "^0.
|
|
49
|
-
"druxt-router": "^0.
|
|
46
|
+
"drupal-jsonapi-params": "^2.1.0",
|
|
47
|
+
"druxt": "^0.21.0",
|
|
48
|
+
"druxt-entity": "^0.27.0",
|
|
49
|
+
"druxt-router": "^0.29.0"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"vue": "^2.
|
|
52
|
+
"vue": "^2.7.10",
|
|
53
53
|
"vuex": "^3.6.2"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|