@jsenv/navi 0.26.29 → 0.26.31
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 +67 -42
- package/dist/jsenv_navi.js.map +25 -26
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -6193,6 +6193,54 @@ const useCancelPrevious = () => {
|
|
|
6193
6193
|
return canceller;
|
|
6194
6194
|
};
|
|
6195
6195
|
|
|
6196
|
+
const moveArrayItemByIndex = (array, indexA, indexB) => {
|
|
6197
|
+
const newArray = [];
|
|
6198
|
+
const movedItem = array[indexA];
|
|
6199
|
+
const movingRight = indexA < indexB;
|
|
6200
|
+
|
|
6201
|
+
for (let i = 0; i < array.length; i++) {
|
|
6202
|
+
if (movingRight) {
|
|
6203
|
+
// Moving right: add target first, then moved item after
|
|
6204
|
+
if (i !== indexA) {
|
|
6205
|
+
newArray.push(array[i]);
|
|
6206
|
+
}
|
|
6207
|
+
if (i === indexB) {
|
|
6208
|
+
newArray.push(movedItem);
|
|
6209
|
+
}
|
|
6210
|
+
} else {
|
|
6211
|
+
// Moving left: add moved item first, then target after
|
|
6212
|
+
if (i === indexB) {
|
|
6213
|
+
newArray.push(movedItem);
|
|
6214
|
+
}
|
|
6215
|
+
if (i !== indexA) {
|
|
6216
|
+
newArray.push(array[i]);
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
return newArray;
|
|
6221
|
+
};
|
|
6222
|
+
|
|
6223
|
+
const swapArrayItemByIndex = (array, indexA, indexB) => {
|
|
6224
|
+
const newArray = [];
|
|
6225
|
+
const itemAtPositionA = array[indexA];
|
|
6226
|
+
const itemAtPositionB = array[indexB];
|
|
6227
|
+
for (let i = 0; i < array.length; i++) {
|
|
6228
|
+
if (i === indexB) {
|
|
6229
|
+
// At the new position, put the dragged column
|
|
6230
|
+
newArray.push(itemAtPositionA);
|
|
6231
|
+
continue;
|
|
6232
|
+
}
|
|
6233
|
+
if (i === indexA) {
|
|
6234
|
+
// At the old position, put what was at the new position
|
|
6235
|
+
newArray.push(itemAtPositionB);
|
|
6236
|
+
continue;
|
|
6237
|
+
}
|
|
6238
|
+
// Everything else stays the same
|
|
6239
|
+
newArray.push(array[i]);
|
|
6240
|
+
}
|
|
6241
|
+
return newArray;
|
|
6242
|
+
};
|
|
6243
|
+
|
|
6196
6244
|
/**
|
|
6197
6245
|
* Merges a component's base className with className received from props.
|
|
6198
6246
|
*
|
|
@@ -8454,6 +8502,14 @@ const Box = props => {
|
|
|
8454
8502
|
const cssVar = styleContext.styleCSSVars[name];
|
|
8455
8503
|
if (cssVar) {
|
|
8456
8504
|
addCSSVar(mergedValue, cssVar, stylesTarget);
|
|
8505
|
+
if (name === "borderRadius" && value === "inherit") {
|
|
8506
|
+
// "inherit" cannot be expressed via a CSS variable — a var() reference
|
|
8507
|
+
// never propagates the inherit keyword itself. So when borderRadius="inherit"
|
|
8508
|
+
// we must also set the inline style directly so the element actually
|
|
8509
|
+
// inherits the radius from its parent.
|
|
8510
|
+
styleDeps.push(name, value);
|
|
8511
|
+
stylesTarget[name] = mergedValue;
|
|
8512
|
+
}
|
|
8457
8513
|
return true;
|
|
8458
8514
|
}
|
|
8459
8515
|
styleDeps.push(name, value); // impact box style -> add to deps
|
|
@@ -8735,17 +8791,14 @@ const applySeparatorOnChildren = (children, separator) => {
|
|
|
8735
8791
|
return childrenWithSeparators;
|
|
8736
8792
|
};
|
|
8737
8793
|
const shouldInjectSeparatorBetween = (left, right) => {
|
|
8738
|
-
if (
|
|
8794
|
+
if (isValidElement(left) && left.props?.hidden) {
|
|
8739
8795
|
return false;
|
|
8740
8796
|
}
|
|
8741
|
-
if (
|
|
8797
|
+
if (isValidElement(right) && right.props?.hidden) {
|
|
8742
8798
|
return false;
|
|
8743
8799
|
}
|
|
8744
8800
|
return true;
|
|
8745
8801
|
};
|
|
8746
|
-
const isPreactNode$1 = jsxChild => {
|
|
8747
|
-
return jsxChild !== null && typeof jsxChild === "object" && jsxChild.type !== undefined;
|
|
8748
|
-
};
|
|
8749
8802
|
|
|
8750
8803
|
/**
|
|
8751
8804
|
* Fix alignment behavior for flex/grid containers that use `height: 100%`.
|
|
@@ -21083,12 +21136,9 @@ const markAsOutsideTextFlow = jsxElement => {
|
|
|
21083
21136
|
const isMarkedAsOutsideTextFlow = jsxElement => {
|
|
21084
21137
|
return outsideTextFlowSet.has(jsxElement.type);
|
|
21085
21138
|
};
|
|
21086
|
-
const isPreactNode = jsxChild => {
|
|
21087
|
-
return jsxChild !== null && typeof jsxChild === "object" && jsxChild.type !== undefined;
|
|
21088
|
-
};
|
|
21089
21139
|
const shouldInjectSpacingBetween = (left, right) => {
|
|
21090
|
-
const leftIsNode =
|
|
21091
|
-
const rightIsNode =
|
|
21140
|
+
const leftIsNode = isValidElement(left);
|
|
21141
|
+
const rightIsNode = isValidElement(right);
|
|
21092
21142
|
// only inject spacing when at least one side is a preact node
|
|
21093
21143
|
if (!leftIsNode && !rightIsNode) {
|
|
21094
21144
|
return false;
|
|
@@ -21212,7 +21262,6 @@ const TextUI = props => {
|
|
|
21212
21262
|
childrenOutsideFlow,
|
|
21213
21263
|
...rest
|
|
21214
21264
|
} = props;
|
|
21215
|
-
const parentBoxFlow = useContext(BoxFlowContext);
|
|
21216
21265
|
const defaultSpace = preventSpaceUnderlines ? FAKE_SPACE : REGULAR_SPACE;
|
|
21217
21266
|
const resolvedSpacing = spacing ?? defaultSpace;
|
|
21218
21267
|
const boxProps = {
|
|
@@ -21222,7 +21271,7 @@ const TextUI = props => {
|
|
|
21222
21271
|
ref,
|
|
21223
21272
|
"baseClassName": withPropsClassName("navi_text", rest.baseClassName)
|
|
21224
21273
|
};
|
|
21225
|
-
const shouldPreserveSpacing = rest.as === "pre" || rest.flex || rest.grid
|
|
21274
|
+
const shouldPreserveSpacing = rest.as === "pre" || rest.flex || rest.grid;
|
|
21226
21275
|
if (shouldPreserveSpacing) {
|
|
21227
21276
|
boxProps.spacing = resolvedSpacing;
|
|
21228
21277
|
} else {
|
|
@@ -22677,7 +22726,7 @@ installImportMetaCssBuild(import.meta);const css$A = /* css */`
|
|
|
22677
22726
|
border-width: var(--button-border-width);
|
|
22678
22727
|
border-style: solid;
|
|
22679
22728
|
border-color: var(--x-button-border-color);
|
|
22680
|
-
border-radius:
|
|
22729
|
+
border-radius: inherit;
|
|
22681
22730
|
outline-width: var(--x-button-outline-width);
|
|
22682
22731
|
outline-color: var(--button-outline-color);
|
|
22683
22732
|
outline-offset: var(--x-button-outline-offset);
|
|
@@ -32627,7 +32676,7 @@ const useTableDragContextValue = ({
|
|
|
32627
32676
|
return;
|
|
32628
32677
|
}
|
|
32629
32678
|
const columnIds = columns.map(col => col.id);
|
|
32630
|
-
const columnIdsWithNewOrder =
|
|
32679
|
+
const columnIdsWithNewOrder = moveArrayItemByIndex(columnIds, columnIndex, newColumnIndex);
|
|
32631
32680
|
setColumnOrder(columnIdsWithNewOrder);
|
|
32632
32681
|
};
|
|
32633
32682
|
return useMemo(() => {
|
|
@@ -32642,31 +32691,6 @@ const useTableDragContextValue = ({
|
|
|
32642
32691
|
};
|
|
32643
32692
|
}, [grabTarget, canChangeColumnOrder]);
|
|
32644
32693
|
};
|
|
32645
|
-
const moveItem = (array, indexA, indexB) => {
|
|
32646
|
-
const newArray = [];
|
|
32647
|
-
const movedItem = array[indexA];
|
|
32648
|
-
const movingRight = indexA < indexB;
|
|
32649
|
-
for (let i = 0; i < array.length; i++) {
|
|
32650
|
-
if (movingRight) {
|
|
32651
|
-
// Moving right: add target first, then moved item after
|
|
32652
|
-
if (i !== indexA) {
|
|
32653
|
-
newArray.push(array[i]);
|
|
32654
|
-
}
|
|
32655
|
-
if (i === indexB) {
|
|
32656
|
-
newArray.push(movedItem);
|
|
32657
|
-
}
|
|
32658
|
-
} else {
|
|
32659
|
-
// Moving left: add moved item first, then target after
|
|
32660
|
-
if (i === indexB) {
|
|
32661
|
-
newArray.push(movedItem);
|
|
32662
|
-
}
|
|
32663
|
-
if (i !== indexA) {
|
|
32664
|
-
newArray.push(array[i]);
|
|
32665
|
-
}
|
|
32666
|
-
}
|
|
32667
|
-
}
|
|
32668
|
-
return newArray;
|
|
32669
|
-
};
|
|
32670
32694
|
const TableDragCloneContainer = forwardRef((props, ref) => {
|
|
32671
32695
|
import.meta.css = [css$h, "@jsenv/navi/src/field/table/drag/table_drag.jsx"];
|
|
32672
32696
|
const {
|
|
@@ -36225,12 +36249,13 @@ const BadgeCount = ({
|
|
|
36225
36249
|
if (charCount > MAX_CHAR_AS_CIRCLE) {
|
|
36226
36250
|
circle = false;
|
|
36227
36251
|
}
|
|
36252
|
+
const textKey = loading + String(valueDisplayed) + hasOverflow;
|
|
36228
36253
|
if (circle) {
|
|
36229
36254
|
return jsx(TextAnchor, {
|
|
36230
36255
|
childRef: ref,
|
|
36231
36256
|
textAnchor: textAnchor,
|
|
36232
36257
|
textSize: props.size,
|
|
36233
|
-
textKey:
|
|
36258
|
+
textKey: textKey,
|
|
36234
36259
|
lineLayout: lineLayout,
|
|
36235
36260
|
children: jsxs(BadgeCountCircle, {
|
|
36236
36261
|
...props,
|
|
@@ -36249,7 +36274,7 @@ const BadgeCount = ({
|
|
|
36249
36274
|
childRef: ref,
|
|
36250
36275
|
textAnchor: textAnchor,
|
|
36251
36276
|
textSize: props.size,
|
|
36252
|
-
textKey:
|
|
36277
|
+
textKey: textKey,
|
|
36253
36278
|
lineLayout: lineLayout,
|
|
36254
36279
|
children: jsxs(BadgeCountEllipse, {
|
|
36255
36280
|
...props,
|
|
@@ -37990,5 +38015,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
37990
38015
|
})
|
|
37991
38016
|
});
|
|
37992
38017
|
|
|
37993
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, Dialog, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemFooter, ListItemGroup, ListItemHeader, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, MessageBox, Meter, Nav, NaviDebug, Paragraph, Popover, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, anyMatchingRouteSignal, applySearch, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, requestListClose, requestListOpen, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSearchText, useSelectRequestClose, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage, windowWidthSignal };
|
|
38018
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, Dialog, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemFooter, ListItemGroup, ListItemHeader, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, MessageBox, Meter, Nav, NaviDebug, Paragraph, Popover, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, anyMatchingRouteSignal, applySearch, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, moveArrayItemByIndex, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, requestListClose, requestListOpen, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, swapArrayItemByIndex, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSearchText, useSelectRequestClose, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage, windowWidthSignal };
|
|
37994
38019
|
//# sourceMappingURL=jsenv_navi.js.map
|