@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/dev/jsenv_navi.js
CHANGED
|
@@ -80431,12 +80431,28 @@ const PickerCustom = props => {
|
|
|
80431
80431
|
// person's edit. Until they change something, what was there at open
|
|
80432
80432
|
// follows it: a look and a close then send nothing, and a cancel goes
|
|
80433
80433
|
// back to the record as it arrived.
|
|
80434
|
+
// A write the app makes in answer to the person — a seat chosen in a
|
|
80435
|
+
// sheet, a drag landed — arrives as the same event as that record, so
|
|
80436
|
+
// the event alone cannot end the following: a press or a key in the
|
|
80437
|
+
// picker does (its popup and the sheets opened from it stand in its
|
|
80438
|
+
// root). The press that opened it ended before these listeners.
|
|
80434
80439
|
let editedSinceOpen = false;
|
|
80440
|
+
let actedSinceOpen = false;
|
|
80441
|
+
const noteActed = () => {
|
|
80442
|
+
actedSinceOpen = true;
|
|
80443
|
+
};
|
|
80444
|
+
const pickerRoot = ref.current;
|
|
80445
|
+
pickerRoot.addEventListener("pointerdown", noteActed, {
|
|
80446
|
+
capture: true
|
|
80447
|
+
});
|
|
80448
|
+
pickerRoot.addEventListener("keydown", noteActed, {
|
|
80449
|
+
capture: true
|
|
80450
|
+
});
|
|
80435
80451
|
const followOutsideUntilEdited = e => {
|
|
80436
80452
|
if (editedSinceOpen) {
|
|
80437
80453
|
return;
|
|
80438
80454
|
}
|
|
80439
|
-
if (!isWrittenByTheOutside(e.detail.event)) {
|
|
80455
|
+
if (actedSinceOpen || !isWrittenByTheOutside(e.detail.event)) {
|
|
80440
80456
|
editedSinceOpen = true;
|
|
80441
80457
|
return;
|
|
80442
80458
|
}
|
|
@@ -80497,6 +80513,12 @@ const PickerCustom = props => {
|
|
|
80497
80513
|
},
|
|
80498
80514
|
onClose: closeEvent => {
|
|
80499
80515
|
pickerInput?.removeEventListener("navi_ui_state_change", followOutsideUntilEdited);
|
|
80516
|
+
pickerRoot.removeEventListener("pointerdown", noteActed, {
|
|
80517
|
+
capture: true
|
|
80518
|
+
});
|
|
80519
|
+
pickerRoot.removeEventListener("keydown", noteActed, {
|
|
80520
|
+
capture: true
|
|
80521
|
+
});
|
|
80500
80522
|
if (closeEvent.detail.isCancel) {
|
|
80501
80523
|
const pickerEl = ref.current;
|
|
80502
80524
|
const inputEl = getPickerInput(pickerEl);
|
|
@@ -81022,12 +81044,13 @@ const getTriggerLabelIds = pickerEl => {
|
|
|
81022
81044
|
}
|
|
81023
81045
|
return ids.length === 0 ? undefined : ids.join(" ");
|
|
81024
81046
|
};
|
|
81025
|
-
// What the picker
|
|
81026
|
-
// signal) moving, a default moving under it, and what its popup's controls
|
|
81027
|
-
// placed on as they mount. Read along the chain, never off the event alone:
|
|
81028
|
-
// control in the popup carries its change up to the picker as an event of its
|
|
81047
|
+
// What reaches the picker without a gesture of one of its controls: its `value`
|
|
81048
|
+
// (or signal) moving, a default moving under it, and what its popup's controls
|
|
81049
|
+
// are placed on as they mount. Read along the chain, never off the event alone:
|
|
81050
|
+
// a control in the popup carries its change up to the picker as an event of its
|
|
81029
81051
|
// own (see the facade in ui_state_controller.js), chained to what caused it —
|
|
81030
|
-
// an app writing that control's bound signal included.
|
|
81052
|
+
// an app writing that control's bound signal included. Whether that write
|
|
81053
|
+
// answers the person is not in the event (see actedSinceOpen).
|
|
81031
81054
|
const OUTSIDE_WRITE_TYPE_SET = new Set(["state_prop_change", "initial_state_push", "facade_child_mount_sync", "outside_value_follow"]);
|
|
81032
81055
|
const isWrittenByTheOutside = e => {
|
|
81033
81056
|
if (!e) {
|