@jsenv/navi 0.29.491 → 0.29.492
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/dev/jsenv_navi.js +29 -6
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +29 -6
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/create_and_edit.md +5 -3
- package/docs/popup_open.md +4 -1
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -78655,12 +78655,28 @@ const PickerCustom = props => {
|
|
|
78655
78655
|
// person's edit. Until they change something, what was there at open
|
|
78656
78656
|
// follows it: a look and a close then send nothing, and a cancel goes
|
|
78657
78657
|
// back to the record as it arrived.
|
|
78658
|
+
// A write the app makes in answer to the person — a seat chosen in a
|
|
78659
|
+
// sheet, a drag landed — arrives as the same event as that record, so
|
|
78660
|
+
// the event alone cannot end the following: a press or a key in the
|
|
78661
|
+
// picker does (its popup and the sheets opened from it stand in its
|
|
78662
|
+
// root). The press that opened it ended before these listeners.
|
|
78658
78663
|
let editedSinceOpen = false;
|
|
78664
|
+
let actedSinceOpen = false;
|
|
78665
|
+
const noteActed = () => {
|
|
78666
|
+
actedSinceOpen = true;
|
|
78667
|
+
};
|
|
78668
|
+
const pickerRoot = ref.current;
|
|
78669
|
+
pickerRoot.addEventListener("pointerdown", noteActed, {
|
|
78670
|
+
capture: true
|
|
78671
|
+
});
|
|
78672
|
+
pickerRoot.addEventListener("keydown", noteActed, {
|
|
78673
|
+
capture: true
|
|
78674
|
+
});
|
|
78659
78675
|
const followOutsideUntilEdited = e => {
|
|
78660
78676
|
if (editedSinceOpen) {
|
|
78661
78677
|
return;
|
|
78662
78678
|
}
|
|
78663
|
-
if (!isWrittenByTheOutside(e.detail.event)) {
|
|
78679
|
+
if (actedSinceOpen || !isWrittenByTheOutside(e.detail.event)) {
|
|
78664
78680
|
editedSinceOpen = true;
|
|
78665
78681
|
return;
|
|
78666
78682
|
}
|
|
@@ -78720,6 +78736,12 @@ const PickerCustom = props => {
|
|
|
78720
78736
|
},
|
|
78721
78737
|
onClose: closeEvent => {
|
|
78722
78738
|
pickerInput?.removeEventListener("navi_ui_state_change", followOutsideUntilEdited);
|
|
78739
|
+
pickerRoot.removeEventListener("pointerdown", noteActed, {
|
|
78740
|
+
capture: true
|
|
78741
|
+
});
|
|
78742
|
+
pickerRoot.removeEventListener("keydown", noteActed, {
|
|
78743
|
+
capture: true
|
|
78744
|
+
});
|
|
78723
78745
|
if (closeEvent.detail.isCancel) {
|
|
78724
78746
|
const pickerEl = ref.current;
|
|
78725
78747
|
const inputEl = getPickerInput(pickerEl);
|
|
@@ -79233,12 +79255,13 @@ const getTriggerLabelIds = pickerEl => {
|
|
|
79233
79255
|
}
|
|
79234
79256
|
return ids.length === 0 ? undefined : ids.join(" ");
|
|
79235
79257
|
};
|
|
79236
|
-
// What the picker
|
|
79237
|
-
// signal) moving, a default moving under it, and what its popup's controls
|
|
79238
|
-
// placed on as they mount. Read along the chain, never off the event alone:
|
|
79239
|
-
// control in the popup carries its change up to the picker as an event of its
|
|
79258
|
+
// What reaches the picker without a gesture of one of its controls: its `value`
|
|
79259
|
+
// (or signal) moving, a default moving under it, and what its popup's controls
|
|
79260
|
+
// are placed on as they mount. Read along the chain, never off the event alone:
|
|
79261
|
+
// a control in the popup carries its change up to the picker as an event of its
|
|
79240
79262
|
// own (see the facade in ui_state_controller.js), chained to what caused it —
|
|
79241
|
-
// an app writing that control's bound signal included.
|
|
79263
|
+
// an app writing that control's bound signal included. Whether that write
|
|
79264
|
+
// answers the person is not in the event (see actedSinceOpen).
|
|
79242
79265
|
const OUTSIDE_WRITE_TYPE_SET = new Set(["state_prop_change", "initial_state_push", "facade_child_mount_sync", "outside_value_follow"]);
|
|
79243
79266
|
const isWrittenByTheOutside = e => {
|
|
79244
79267
|
if (!e) {
|