druxt 0.25.2-dev.20261118090101 → 0.25.2-dev.20261119071821
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.
|
@@ -74,7 +74,8 @@ export default {
|
|
|
74
74
|
* @model
|
|
75
75
|
*/
|
|
76
76
|
value: {
|
|
77
|
-
|
|
77
|
+
// String before Boolean, or Vue reads an empty string as `true`.
|
|
78
|
+
type: [Array, String, Boolean, Date, Number, Object],
|
|
78
79
|
default: null,
|
|
79
80
|
},
|
|
80
81
|
|
|
@@ -151,6 +152,12 @@ export default {
|
|
|
151
152
|
...this.$attrs,
|
|
152
153
|
value: this.model,
|
|
153
154
|
},
|
|
155
|
+
// Each module input goes straight to the parent. A bound parent sends it
|
|
156
|
+
// back down through `value`. Without a binding, `model` stays as it was,
|
|
157
|
+
// so a module that fetched its own value keeps fetching for itself.
|
|
158
|
+
on: {
|
|
159
|
+
input: (value) => this.$emit('input', value),
|
|
160
|
+
},
|
|
154
161
|
ref: 'module',
|
|
155
162
|
})
|
|
156
163
|
|
|
@@ -134,7 +134,8 @@ export default {
|
|
|
134
134
|
* @model
|
|
135
135
|
*/
|
|
136
136
|
value: {
|
|
137
|
-
|
|
137
|
+
// String before Boolean, or Vue reads an empty string as `true`.
|
|
138
|
+
type: [Array, String, Boolean, Date, Number, Object],
|
|
138
139
|
default: null,
|
|
139
140
|
},
|
|
140
141
|
|
|
@@ -318,11 +319,27 @@ export default {
|
|
|
318
319
|
},
|
|
319
320
|
|
|
320
321
|
model() {
|
|
322
|
+
// Whether the wrapper emitted an input is tracked apart from the value it
|
|
323
|
+
// emitted, because a field clears to `undefined` and that has to stay
|
|
324
|
+
// distinguishable from having emitted nothing at all.
|
|
325
|
+
const hadInput = this.hasEmittedInput
|
|
326
|
+
const emitted = this.emittedInput
|
|
327
|
+
this.hasEmittedInput = false
|
|
328
|
+
this.emittedInput = undefined
|
|
329
|
+
|
|
321
330
|
if (this.component.props && this.component.props.value !== this.model) {
|
|
322
331
|
this.component.props.value = this.model
|
|
323
332
|
|
|
324
|
-
// Only emit 'input' if using the default 'DruxtWrapper' component
|
|
325
|
-
|
|
333
|
+
// Only emit 'input' if using the default 'DruxtWrapper' component, and
|
|
334
|
+
// only for a value the parent has not heard yet. Skip a value the
|
|
335
|
+
// parent set itself, and skip the value the wrapper just emitted: the
|
|
336
|
+
// handler below sent it already, and the parent may have stored it
|
|
337
|
+
// changed.
|
|
338
|
+
if (
|
|
339
|
+
this.component.is === 'DruxtWrapper' &&
|
|
340
|
+
this.model !== this.value &&
|
|
341
|
+
!(hadInput && this.model === emitted)
|
|
342
|
+
) {
|
|
326
343
|
this.$emit('input', this.model)
|
|
327
344
|
}
|
|
328
345
|
}
|
|
@@ -592,6 +609,8 @@ export default {
|
|
|
592
609
|
attrs,
|
|
593
610
|
on: {
|
|
594
611
|
input(value) {
|
|
612
|
+
self.hasEmittedInput = true
|
|
613
|
+
self.emittedInput = value
|
|
595
614
|
self.model = value
|
|
596
615
|
self.$emit('input', value)
|
|
597
616
|
}
|
package/dist/druxt.esm.js
CHANGED
|
@@ -564,7 +564,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
564
564
|
};
|
|
565
565
|
|
|
566
566
|
var name = "druxt";
|
|
567
|
-
var version = "0.25.2-dev.
|
|
567
|
+
var version = "0.25.2-dev.20261119071821";
|
|
568
568
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
569
569
|
var keywords = [
|
|
570
570
|
"cms",
|
package/dist/druxt.ssr.js
CHANGED
|
@@ -577,7 +577,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
577
577
|
};
|
|
578
578
|
|
|
579
579
|
var name = "druxt";
|
|
580
|
-
var version = "0.25.2-dev.
|
|
580
|
+
var version = "0.25.2-dev.20261119071821";
|
|
581
581
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
582
582
|
var keywords = [
|
|
583
583
|
"cms",
|