druxt 0.25.2-dev.20261118090101 → 0.25.2-dev.20261119063602
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.
|
@@ -151,6 +151,12 @@ export default {
|
|
|
151
151
|
...this.$attrs,
|
|
152
152
|
value: this.model,
|
|
153
153
|
},
|
|
154
|
+
// Each module input goes straight to the parent. A bound parent sends it
|
|
155
|
+
// back down through `value`. Without a binding, `model` stays as it was,
|
|
156
|
+
// so a module that fetched its own value keeps fetching for itself.
|
|
157
|
+
on: {
|
|
158
|
+
input: (value) => this.$emit('input', value),
|
|
159
|
+
},
|
|
154
160
|
ref: 'module',
|
|
155
161
|
})
|
|
156
162
|
|
|
@@ -318,11 +318,27 @@ export default {
|
|
|
318
318
|
},
|
|
319
319
|
|
|
320
320
|
model() {
|
|
321
|
+
// Whether the wrapper emitted an input is tracked apart from the value it
|
|
322
|
+
// emitted, because a field clears to `undefined` and that has to stay
|
|
323
|
+
// distinguishable from having emitted nothing at all.
|
|
324
|
+
const hadInput = this.hasEmittedInput
|
|
325
|
+
const emitted = this.emittedInput
|
|
326
|
+
this.hasEmittedInput = false
|
|
327
|
+
this.emittedInput = undefined
|
|
328
|
+
|
|
321
329
|
if (this.component.props && this.component.props.value !== this.model) {
|
|
322
330
|
this.component.props.value = this.model
|
|
323
331
|
|
|
324
|
-
// Only emit 'input' if using the default 'DruxtWrapper' component
|
|
325
|
-
|
|
332
|
+
// Only emit 'input' if using the default 'DruxtWrapper' component, and
|
|
333
|
+
// only for a value the parent has not heard yet. Skip a value the
|
|
334
|
+
// parent set itself, and skip the value the wrapper just emitted: the
|
|
335
|
+
// handler below sent it already, and the parent may have stored it
|
|
336
|
+
// changed.
|
|
337
|
+
if (
|
|
338
|
+
this.component.is === 'DruxtWrapper' &&
|
|
339
|
+
this.model !== this.value &&
|
|
340
|
+
!(hadInput && this.model === emitted)
|
|
341
|
+
) {
|
|
326
342
|
this.$emit('input', this.model)
|
|
327
343
|
}
|
|
328
344
|
}
|
|
@@ -592,6 +608,8 @@ export default {
|
|
|
592
608
|
attrs,
|
|
593
609
|
on: {
|
|
594
610
|
input(value) {
|
|
611
|
+
self.hasEmittedInput = true
|
|
612
|
+
self.emittedInput = value
|
|
595
613
|
self.model = value
|
|
596
614
|
self.$emit('input', value)
|
|
597
615
|
}
|
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.20261119063602";
|
|
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.20261119063602";
|
|
581
581
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
582
582
|
var keywords = [
|
|
583
583
|
"cms",
|