@jsenv/navi 0.27.51 → 0.27.52
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 +47 -69
- package/dist/jsenv_navi.js.map +6 -6
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -22459,7 +22459,7 @@ const useUIStateController = (
|
|
|
22459
22459
|
const currentUIState = uiStateController.uiState;
|
|
22460
22460
|
const stateIsTheSame = compareTwoJsValues(newUIState, currentUIState);
|
|
22461
22461
|
if (stateIsTheSame) {
|
|
22462
|
-
if (controlType === "button") {
|
|
22462
|
+
if (controlType === "button" || controlType === "link") {
|
|
22463
22463
|
if (!isInternalEvent(e)) {
|
|
22464
22464
|
uiStateController.onUIAction(e);
|
|
22465
22465
|
}
|
|
@@ -23071,6 +23071,9 @@ const useUIGroupStateController = (
|
|
|
23071
23071
|
if (childUIStateController.controlType === "button") {
|
|
23072
23072
|
return false;
|
|
23073
23073
|
}
|
|
23074
|
+
if (childUIStateController.controlType === "link") {
|
|
23075
|
+
return false;
|
|
23076
|
+
}
|
|
23074
23077
|
return true;
|
|
23075
23078
|
};
|
|
23076
23079
|
|
|
@@ -23367,6 +23370,9 @@ const useUIGroupStateController = (
|
|
|
23367
23370
|
if (childUIStateController.controlType === "button") {
|
|
23368
23371
|
continue;
|
|
23369
23372
|
}
|
|
23373
|
+
if (childUIStateController.controlType === "link") {
|
|
23374
|
+
continue;
|
|
23375
|
+
}
|
|
23370
23376
|
childUIStateController.clearUIState(propagateDownClearEvent);
|
|
23371
23377
|
}
|
|
23372
23378
|
onChange(e, { notifyExternal: true });
|
|
@@ -23465,6 +23471,9 @@ const useUIFacadeStateController = (props, realUIStateController) => {
|
|
|
23465
23471
|
if (childController.controlType === "button") {
|
|
23466
23472
|
return false;
|
|
23467
23473
|
}
|
|
23474
|
+
if (childController.controlType === "link") {
|
|
23475
|
+
return false;
|
|
23476
|
+
}
|
|
23468
23477
|
if (childController.controlType === "facade") {
|
|
23469
23478
|
return false;
|
|
23470
23479
|
}
|
|
@@ -32091,8 +32100,12 @@ const getNowHoursRoundedToStep = (stepMinutes, offsetMinutes = 0) => {
|
|
|
32091
32100
|
return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}`;
|
|
32092
32101
|
};
|
|
32093
32102
|
|
|
32094
|
-
// Maps validity type names → navi input type names
|
|
32103
|
+
// Maps validity type names → navi input type names.
|
|
32104
|
+
// Numeric signal types must not fall through to the native type="number"
|
|
32105
|
+
// (which adds spinner buttons and has poor UX) — they map to navi_number instead.
|
|
32095
32106
|
const VALIDITY_TYPE_TO_INPUT_TYPE = {
|
|
32107
|
+
number: "navi_number",
|
|
32108
|
+
integer: "navi_number",
|
|
32096
32109
|
percentage: "navi_percentage",
|
|
32097
32110
|
};
|
|
32098
32111
|
|
|
@@ -36318,6 +36331,10 @@ const PickerCustom = props => {
|
|
|
36318
36331
|
Object.assign(pickerProps, {
|
|
36319
36332
|
eventReactionDefinitions: {
|
|
36320
36333
|
mouseDown: e => {
|
|
36334
|
+
const popupEl = popupRef.current;
|
|
36335
|
+
if (popupEl && popupEl.contains(e.target)) {
|
|
36336
|
+
return null;
|
|
36337
|
+
}
|
|
36321
36338
|
if (expandedRef.current) {
|
|
36322
36339
|
return {
|
|
36323
36340
|
name: "mousedown to close picker",
|
|
@@ -36334,6 +36351,10 @@ const PickerCustom = props => {
|
|
|
36334
36351
|
};
|
|
36335
36352
|
},
|
|
36336
36353
|
click: e => {
|
|
36354
|
+
const popupEl = popupRef.current;
|
|
36355
|
+
if (popupEl && popupEl.contains(e.target)) {
|
|
36356
|
+
return null;
|
|
36357
|
+
}
|
|
36337
36358
|
// When a label is clicked it transfers focus to the select
|
|
36338
36359
|
// in that case we want to open it (otherwise we have already opened on mousedown interaction)
|
|
36339
36360
|
return {
|
|
@@ -36352,40 +36373,6 @@ const PickerCustom = props => {
|
|
|
36352
36373
|
}
|
|
36353
36374
|
}
|
|
36354
36375
|
});
|
|
36355
|
-
Object.assign(popupProps, {
|
|
36356
|
-
onMouseDown: e => {
|
|
36357
|
-
if (e.button !== 0) {
|
|
36358
|
-
return;
|
|
36359
|
-
}
|
|
36360
|
-
// mousedown inside popover should not bubble to the select (would re-open it if that mousedown closes it)
|
|
36361
|
-
debugPopup(e, `"mousedown" received on popup -> prevent bubbling to picker (e.stopPropagation())`);
|
|
36362
|
-
e.stopPropagation();
|
|
36363
|
-
},
|
|
36364
|
-
onClick: e => {
|
|
36365
|
-
if (e.button !== 0) {
|
|
36366
|
-
return;
|
|
36367
|
-
}
|
|
36368
|
-
// click inside popover should not bubble to the picker (would re-open it if that click closes it)
|
|
36369
|
-
debugPopup(e, `"click" received on popup -> prevent bubbling to picker (e.stopPropagation())`);
|
|
36370
|
-
e.stopPropagation();
|
|
36371
|
-
// Here we can't preventDefault because the click might be needed to check a radio for instance.
|
|
36372
|
-
// As a result we have to let it go through which means it could trigger form submission
|
|
36373
|
-
// but we've put type="button" on the picker to ensure it can't submit the form
|
|
36374
|
-
// so browser won't submit eventual form for clicks inside the popover/dialog
|
|
36375
|
-
// e.preventDefault();
|
|
36376
|
-
},
|
|
36377
|
-
onKeyDown: e => {
|
|
36378
|
-
// some keys pressed inside popover should not reach the picker button
|
|
36379
|
-
// (like enter that would try to request action of closest form otherwise for instance)
|
|
36380
|
-
if (e.key === "Enter") {
|
|
36381
|
-
debugPopup(e, `"enter" received on popup -> prevent bubbling to picker (e.stopPropagation())`);
|
|
36382
|
-
e.stopPropagation();
|
|
36383
|
-
// preventDefault prevents the browser from dispatching a "click" on the
|
|
36384
|
-
// picker button when focus moves to it synchronously during enterEffect
|
|
36385
|
-
e.preventDefault();
|
|
36386
|
-
}
|
|
36387
|
-
}
|
|
36388
|
-
});
|
|
36389
36376
|
}
|
|
36390
36377
|
}
|
|
36391
36378
|
if (mode === "popover") {
|
|
@@ -38764,41 +38751,32 @@ const ListFirstResolver = props => {
|
|
|
38764
38751
|
...props
|
|
38765
38752
|
});
|
|
38766
38753
|
};
|
|
38754
|
+
|
|
38767
38755
|
/**
|
|
38768
38756
|
* List — generic virtualized scroll container.
|
|
38769
|
-
*
|
|
38770
|
-
*
|
|
38771
|
-
*
|
|
38772
|
-
*
|
|
38773
|
-
*
|
|
38774
|
-
*
|
|
38775
|
-
*
|
|
38776
|
-
*
|
|
38777
|
-
*
|
|
38778
|
-
*
|
|
38779
|
-
*
|
|
38780
|
-
*
|
|
38781
|
-
*
|
|
38782
|
-
*
|
|
38783
|
-
*
|
|
38784
|
-
*
|
|
38785
|
-
*
|
|
38786
|
-
*
|
|
38787
|
-
*
|
|
38788
|
-
*
|
|
38789
|
-
*
|
|
38790
|
-
*
|
|
38791
|
-
*
|
|
38792
|
-
* searchNoMatchMode — controls how List.Item behaves when match=false (default "remove"):
|
|
38793
|
-
* "remove" — remove from DOM
|
|
38794
|
-
* "invisible_and_inert" — keep in DOM, invisible and non-interactive (preserves layout)
|
|
38795
|
-
* "muted" — keep in DOM, visible but opacified and still interactive
|
|
38796
|
-
* separator — element or function(index, { previousItem, currentItem }) inserted between visible items.
|
|
38797
|
-
* lockSize — captures the container's dimensions on first render so filtering
|
|
38798
|
-
* cannot collapse the layout (sets min-width/min-height).
|
|
38799
|
-
* horizontal — lays items out in a row instead of a column.
|
|
38800
|
-
* spacing — gap between items (forwarded to Box spacing prop).
|
|
38801
|
-
* ...rest — forwarded to the outer container <Box>.
|
|
38757
|
+
* Items must use <List.Item> to participate in tracking.
|
|
38758
|
+
*
|
|
38759
|
+
* @type {import("ignore:preact").FunctionComponent<{
|
|
38760
|
+
* selectable?: boolean,
|
|
38761
|
+
* action?: (value: any) => void,
|
|
38762
|
+
* uiAction?: (value: any) => void,
|
|
38763
|
+
* popover?: boolean,
|
|
38764
|
+
* renderBudget?: number,
|
|
38765
|
+
* virtualItemSize?: number,
|
|
38766
|
+
* fallback?: import("ignore:preact").ComponentChildren,
|
|
38767
|
+
* searchFallback?: import("ignore:preact").ComponentChildren,
|
|
38768
|
+
* searchText?: string,
|
|
38769
|
+
* searchNoMatchMode?: "remove" | "invisible_and_inert" | "muted",
|
|
38770
|
+
* separator?: boolean | import("ignore:preact").ComponentChildren,
|
|
38771
|
+
* lockSize?: boolean,
|
|
38772
|
+
* horizontal?: boolean,
|
|
38773
|
+
* spacing?: string,
|
|
38774
|
+
* expandX?: boolean,
|
|
38775
|
+
* expand?: boolean,
|
|
38776
|
+
* maxHeight?: string | number,
|
|
38777
|
+
* children?: import("ignore:preact").ComponentChildren,
|
|
38778
|
+
* [key: string]: any,
|
|
38779
|
+
* }>}
|
|
38802
38780
|
*/
|
|
38803
38781
|
const List = createComponentResolver([ListFirstResolver, ListSelectableResolver, ListUI]);
|
|
38804
38782
|
const ListContent = ({
|