@jsenv/navi 0.29.168 → 0.29.169
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/jsenv_navi.js +39 -4
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -34483,7 +34483,12 @@ const GROUP_DEFAULTS = {
|
|
|
34483
34483
|
}
|
|
34484
34484
|
// Merged in on the way up (see above), so on the way down it takes the
|
|
34485
34485
|
// whole object and picks out its own keys — the same value it produced.
|
|
34486
|
-
|
|
34486
|
+
// Only for a child with no name of its own: the same condition the
|
|
34487
|
+
// aggregate applies before merging. A NAMED child holding an object (a
|
|
34488
|
+
// `type="object"` picker, say) answers for one key, and the object it is
|
|
34489
|
+
// not mentioned in says nothing about it — handing it the whole value
|
|
34490
|
+
// would make it hold the group.
|
|
34491
|
+
if (!childName && isNamelessGrouping(child, child.uiState)) {
|
|
34487
34492
|
return newUIState;
|
|
34488
34493
|
}
|
|
34489
34494
|
if (
|
|
@@ -34771,7 +34776,17 @@ const useUIGroupStateController = (
|
|
|
34771
34776
|
e,
|
|
34772
34777
|
`${controlType}.getUIState -> ${JSON.stringify(groupUIState)}`,
|
|
34773
34778
|
);
|
|
34774
|
-
if (notifyExternal === true) {
|
|
34779
|
+
if (notifyExternal === true || notifyExternal === "if-it-moves") {
|
|
34780
|
+
if (
|
|
34781
|
+
notifyExternal === "if-it-moves" &&
|
|
34782
|
+
compareTwoJsValues(groupUIState, controller.uiState)
|
|
34783
|
+
) {
|
|
34784
|
+
// A child confirming what it already shows, to a group already
|
|
34785
|
+
// worth it: the value arrived while the popup was open and the
|
|
34786
|
+
// group reacted then. One trip through a picker is one answer, so
|
|
34787
|
+
// there is nothing left to say here.
|
|
34788
|
+
return;
|
|
34789
|
+
}
|
|
34775
34790
|
// Somebody answered: what the group is worth is what its children say
|
|
34776
34791
|
// between them, from here on.
|
|
34777
34792
|
controller.stateGivenFromAbove = false;
|
|
@@ -35085,7 +35100,7 @@ const useUIGroupStateController = (
|
|
|
35085
35100
|
onChildUIAction: (
|
|
35086
35101
|
childUIStateController,
|
|
35087
35102
|
e,
|
|
35088
|
-
{ stateChanged, silent },
|
|
35103
|
+
{ stateChanged, silent, onlyIfGroupValueMoves },
|
|
35089
35104
|
) => {
|
|
35090
35105
|
const delegatedTo = delegatedChildrenRef.current.get(
|
|
35091
35106
|
childUIStateController,
|
|
@@ -35094,6 +35109,7 @@ const useUIGroupStateController = (
|
|
|
35094
35109
|
delegatedTo.onChildUIAction(childUIStateController, e, {
|
|
35095
35110
|
stateChanged,
|
|
35096
35111
|
silent,
|
|
35112
|
+
onlyIfGroupValueMoves,
|
|
35097
35113
|
});
|
|
35098
35114
|
return;
|
|
35099
35115
|
}
|
|
@@ -35108,7 +35124,11 @@ const useUIGroupStateController = (
|
|
|
35108
35124
|
);
|
|
35109
35125
|
if (stateChanged) {
|
|
35110
35126
|
onChange(e, {
|
|
35111
|
-
notifyExternal: silent
|
|
35127
|
+
notifyExternal: silent
|
|
35128
|
+
? "silent"
|
|
35129
|
+
: onlyIfGroupValueMoves
|
|
35130
|
+
? "if-it-moves"
|
|
35131
|
+
: true,
|
|
35112
35132
|
actingChild: childUIStateController,
|
|
35113
35133
|
});
|
|
35114
35134
|
} else {
|
|
@@ -51839,6 +51859,17 @@ const isUIStateHeld = (controller) => {
|
|
|
51839
51859
|
* `command` on a control is its reaction to being used, and this is a
|
|
51840
51860
|
* confirmation happening elsewhere, whose own command (the picker's) is already
|
|
51841
51861
|
* running.
|
|
51862
|
+
*
|
|
51863
|
+
* And up one, to the group the control answers to: a picker inside a form is
|
|
51864
|
+
* one of its fields, and a form is worth what its fields say. What the popup
|
|
51865
|
+
* put there arrived through a mount sync, which is deliberately silent — a
|
|
51866
|
+
* popup opening is nobody answering (see onChange in ui_state_controller.js) —
|
|
51867
|
+
* so this is the first moment the form can be told.
|
|
51868
|
+
*
|
|
51869
|
+
* That group only hears about it when it moves: a value the user picked in the
|
|
51870
|
+
* popup reached it already, and one trip through a picker is one answer. Down
|
|
51871
|
+
* the subtree the reaction re-runs either way — a control saying again what it
|
|
51872
|
+
* holds says the same thing, and it is where a signal is written.
|
|
51842
51873
|
*/
|
|
51843
51874
|
const commitUIStateAsAnswer = (controller, e) => {
|
|
51844
51875
|
if (!controller) {
|
|
@@ -51846,6 +51877,10 @@ const commitUIStateAsAnswer = (controller, e) => {
|
|
|
51846
51877
|
}
|
|
51847
51878
|
const answering = controller.facadeChild || controller;
|
|
51848
51879
|
commitSubtree(answering, e);
|
|
51880
|
+
controller.parentUIStateController?.onChildUIAction(controller, e, {
|
|
51881
|
+
stateChanged: true,
|
|
51882
|
+
onlyIfGroupValueMoves: true,
|
|
51883
|
+
});
|
|
51849
51884
|
};
|
|
51850
51885
|
const commitSubtree = (controller, e) => {
|
|
51851
51886
|
controller.onUIAction?.(e, { skipCommand: true });
|