xmlui 0.11.13 → 0.11.15
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/lib/{index-BGwgKjPl.js → index-CP9ZIMMT.js} +219 -58
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-BuPNXouY.js → initMock-C17fxLuA.js} +1 -1
- package/dist/lib/language-server-web-worker.js +1 -1
- package/dist/lib/language-server.js +1 -1
- package/dist/lib/{metadata-utils-2bsMr4Gd.js → metadata-utils-BXGJbvlh.js} +2 -2
- package/dist/lib/{server-common-aCslEKNy.js → server-common-Ce61T1XU.js} +1 -1
- package/dist/lib/testing.d.ts +8 -0
- package/dist/lib/testing.js +14 -0
- package/dist/lib/xmlui.d.ts +3 -0
- package/dist/lib/xmlui.js +1 -1
- package/dist/metadata/{collectedComponentMetadata-vckMPeLq.js → collectedComponentMetadata-Bn_obqca.js} +218 -57
- package/dist/metadata/{initMock-B1fL_SOf.js → initMock-DROjRCvI.js} +1 -1
- package/dist/metadata/xmlui-metadata.css +1 -1
- package/dist/metadata/xmlui-metadata.js +1 -1
- package/dist/metadata/xmlui-metadata.umd.cjs +3 -3
- package/dist/standalone/xmlui-standalone.es.d.ts +6 -0
- package/dist/standalone/xmlui-standalone.umd.js +36 -36
- package/package.json +1 -1
|
@@ -17645,20 +17645,22 @@ const checkboxComponentRenderer = createComponentRenderer(
|
|
|
17645
17645
|
}
|
|
17646
17646
|
);
|
|
17647
17647
|
const themeVars$K = `'{"backgroundColor-ContentSeparator": "var(--xmlui-backgroundColor-ContentSeparator)", "thickness-ContentSeparator": "var(--xmlui-thickness-ContentSeparator)", "length-ContentSeparator": "var(--xmlui-length-ContentSeparator)", "marginTop-ContentSeparator": "var(--xmlui-marginTop-ContentSeparator)", "marginBottom-ContentSeparator": "var(--xmlui-marginBottom-ContentSeparator)", "marginVertical-ContentSeparator": "var(--xmlui-marginVertical-ContentSeparator)", "marginLeft-ContentSeparator": "var(--xmlui-marginLeft-ContentSeparator)", "marginRight-ContentSeparator": "var(--xmlui-marginRight-ContentSeparator)", "marginHorizontal-ContentSeparator": "var(--xmlui-marginHorizontal-ContentSeparator)", "paddingTop-ContentSeparator": "var(--xmlui-paddingTop-ContentSeparator)", "paddingBottom-ContentSeparator": "var(--xmlui-paddingBottom-ContentSeparator)", "paddingVertical-ContentSeparator": "var(--xmlui-paddingVertical-ContentSeparator)", "paddingLeft-ContentSeparator": "var(--xmlui-paddingLeft-ContentSeparator)", "paddingRight-ContentSeparator": "var(--xmlui-paddingRight-ContentSeparator)", "paddingHorizontal-ContentSeparator": "var(--xmlui-paddingHorizontal-ContentSeparator)"}'`;
|
|
17648
|
-
const separator = "
|
|
17649
|
-
const horizontal$3 = "
|
|
17650
|
-
const
|
|
17648
|
+
const separator = "_separator_hmp7g_14";
|
|
17649
|
+
const horizontal$3 = "_horizontal_hmp7g_27";
|
|
17650
|
+
const stretchToFit = "_stretchToFit_hmp7g_31";
|
|
17651
|
+
const vertical$3 = "_vertical_hmp7g_35";
|
|
17651
17652
|
const styles$$ = {
|
|
17652
17653
|
themeVars: themeVars$K,
|
|
17653
17654
|
separator,
|
|
17654
17655
|
horizontal: horizontal$3,
|
|
17656
|
+
stretchToFit,
|
|
17655
17657
|
vertical: vertical$3
|
|
17656
17658
|
};
|
|
17657
17659
|
const defaultProps$W = {
|
|
17658
17660
|
orientation: "horizontal"
|
|
17659
17661
|
};
|
|
17660
17662
|
const ContentSeparator = forwardRef(
|
|
17661
|
-
({ orientation = defaultProps$W.orientation, thickness, length, style: style2, className, ...rest }, ref) => {
|
|
17663
|
+
({ orientation = defaultProps$W.orientation, thickness, length, hasExplicitLength = false, style: style2, className, ...rest }, ref) => {
|
|
17662
17664
|
const inlineStyles = {};
|
|
17663
17665
|
if (thickness !== void 0) {
|
|
17664
17666
|
if (orientation === "horizontal") {
|
|
@@ -17683,7 +17685,8 @@ const ContentSeparator = forwardRef(
|
|
|
17683
17685
|
styles$$.separator,
|
|
17684
17686
|
{
|
|
17685
17687
|
[styles$$.horizontal]: orientation === "horizontal",
|
|
17686
|
-
[styles$$.vertical]: orientation === "vertical"
|
|
17688
|
+
[styles$$.vertical]: orientation === "vertical",
|
|
17689
|
+
[styles$$.stretchToFit]: !hasExplicitLength
|
|
17687
17690
|
},
|
|
17688
17691
|
className
|
|
17689
17692
|
),
|
|
@@ -17736,12 +17739,16 @@ const contentSeparatorComponentRenderer = createComponentRenderer(
|
|
|
17736
17739
|
COMP$1k,
|
|
17737
17740
|
ContentSeparatorMd,
|
|
17738
17741
|
({ node, className, extractValue }) => {
|
|
17742
|
+
const orientation = extractValue(node.props.orientation);
|
|
17743
|
+
const length = extractValue.asSize(node.props.length);
|
|
17744
|
+
const hasExplicitLength = length !== void 0 || orientation === "vertical" && node.props.height !== void 0 || orientation === "horizontal" && node.props.width !== void 0;
|
|
17739
17745
|
return /* @__PURE__ */ jsx(
|
|
17740
17746
|
ContentSeparator,
|
|
17741
17747
|
{
|
|
17742
|
-
orientation
|
|
17748
|
+
orientation,
|
|
17743
17749
|
thickness: extractValue.asSize(node.props.thickness),
|
|
17744
|
-
length
|
|
17750
|
+
length,
|
|
17751
|
+
hasExplicitLength,
|
|
17745
17752
|
className
|
|
17746
17753
|
}
|
|
17747
17754
|
);
|
|
@@ -18403,17 +18410,19 @@ const datePickerComponentRenderer = createComponentRenderer(
|
|
|
18403
18410
|
}
|
|
18404
18411
|
);
|
|
18405
18412
|
const themeVars$I = `'{"backgroundColor-DropdownMenu": "var(--xmlui-backgroundColor-DropdownMenu)", "borderRadius-DropdownMenu": "var(--xmlui-borderRadius-DropdownMenu)", "boxShadow-DropdownMenu": "var(--xmlui-boxShadow-DropdownMenu)", "borderColor-DropdownMenu-content": "var(--xmlui-borderColor-DropdownMenu-content)", "borderWidth-DropdownMenu-content": "var(--xmlui-borderWidth-DropdownMenu-content)", "borderStyle-DropdownMenu-content": "var(--xmlui-borderStyle-DropdownMenu-content)", "minWidth-DropdownMenu": "var(--xmlui-minWidth-DropdownMenu)", "backgroundColor-MenuItem": "var(--xmlui-backgroundColor-MenuItem)", "color-MenuItem": "var(--xmlui-color-MenuItem)", "fontFamily-MenuItem": "var(--xmlui-fontFamily-MenuItem)", "gap-MenuItem": "var(--xmlui-gap-MenuItem)", "fontSize-MenuItem": "var(--xmlui-fontSize-MenuItem)", "paddingVertical-MenuItem": "var(--xmlui-paddingVertical-MenuItem)", "paddingHorizontal-MenuItem": "var(--xmlui-paddingHorizontal-MenuItem)", "backgroundColor-MenuItem--hover": "var(--xmlui-backgroundColor-MenuItem--hover)", "backgroundColor-MenuItem--active": "var(--xmlui-backgroundColor-MenuItem--active)", "backgroundColor-MenuItem--active--hover": "var(--xmlui-backgroundColor-MenuItem--active--hover)", "color-MenuItem--hover": "var(--xmlui-color-MenuItem--hover)", "color-MenuItem--active": "var(--xmlui-color-MenuItem--active)", "color-MenuItem--active--hover": "var(--xmlui-color-MenuItem--active--hover)", "color-MenuItem--disabled": "var(--xmlui-color-MenuItem--disabled)", "marginTop-MenuSeparator": "var(--xmlui-marginTop-MenuSeparator)", "marginBottom-MenuSeparator": "var(--xmlui-marginBottom-MenuSeparator)", "width-MenuSeparator": "var(--xmlui-width-MenuSeparator)", "height-MenuSeparator": "var(--xmlui-height-MenuSeparator)", "color-MenuSeparator": "var(--xmlui-color-MenuSeparator)"}'`;
|
|
18406
|
-
const DropdownMenuContent = "
|
|
18407
|
-
const
|
|
18408
|
-
const
|
|
18409
|
-
const
|
|
18410
|
-
const
|
|
18411
|
-
const
|
|
18412
|
-
const
|
|
18413
|
-
const
|
|
18413
|
+
const DropdownMenuContent = "_DropdownMenuContent_tklrk_14";
|
|
18414
|
+
const compact = "_compact_tklrk_18";
|
|
18415
|
+
const DropdownMenuSubContent = "_DropdownMenuSubContent_tklrk_22";
|
|
18416
|
+
const DropdownMenuItem = "_DropdownMenuItem_tklrk_32";
|
|
18417
|
+
const DropdownMenuSubTrigger = "_DropdownMenuSubTrigger_tklrk_33";
|
|
18418
|
+
const active$2 = "_active_tklrk_56";
|
|
18419
|
+
const disabled$8 = "_disabled_tklrk_66";
|
|
18420
|
+
const wrapper$h = "_wrapper_tklrk_81";
|
|
18421
|
+
const DropdownMenuSeparator = "_DropdownMenuSeparator_tklrk_85";
|
|
18414
18422
|
const styles$Z = {
|
|
18415
18423
|
themeVars: themeVars$I,
|
|
18416
18424
|
DropdownMenuContent,
|
|
18425
|
+
compact,
|
|
18417
18426
|
DropdownMenuSubContent,
|
|
18418
18427
|
DropdownMenuItem,
|
|
18419
18428
|
DropdownMenuSubTrigger,
|
|
@@ -18449,6 +18458,7 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
|
|
|
18449
18458
|
triggerButtonThemeColor = defaultDropdownMenuProps.triggerButtonThemeColor,
|
|
18450
18459
|
triggerButtonIcon = defaultDropdownMenuProps.triggerButtonIcon,
|
|
18451
18460
|
triggerButtonIconPosition = defaultDropdownMenuProps.triggerButtonIconPosition,
|
|
18461
|
+
compact: compact2 = false,
|
|
18452
18462
|
...rest
|
|
18453
18463
|
}, ref) {
|
|
18454
18464
|
const { root: root2 } = useTheme();
|
|
@@ -18553,7 +18563,7 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
|
|
|
18553
18563
|
ref: contentRef,
|
|
18554
18564
|
align: alignment,
|
|
18555
18565
|
style: style2,
|
|
18556
|
-
className: classnames(styles$Z.DropdownMenuContent, className),
|
|
18566
|
+
className: classnames(styles$Z.DropdownMenuContent, className, { [styles$Z.compact]: compact2 }),
|
|
18557
18567
|
onOpenAutoFocus: (e) => {
|
|
18558
18568
|
e.preventDefault();
|
|
18559
18569
|
contentRef.current?.focus();
|
|
@@ -18581,7 +18591,8 @@ const MenuItem = forwardRef(function MenuItem2({
|
|
|
18581
18591
|
icon: icon2,
|
|
18582
18592
|
iconPosition = defaultMenuItemProps.iconPosition,
|
|
18583
18593
|
active: active2 = defaultMenuItemProps.active,
|
|
18584
|
-
enabled: enabled2 = true
|
|
18594
|
+
enabled: enabled2 = true,
|
|
18595
|
+
compact: compact2 = false
|
|
18585
18596
|
}, ref) {
|
|
18586
18597
|
const iconToStart = iconPosition === "start";
|
|
18587
18598
|
const context = useDropdownMenuContext();
|
|
@@ -18616,7 +18627,8 @@ const MenuItem = forwardRef(function MenuItem2({
|
|
|
18616
18627
|
style: style2,
|
|
18617
18628
|
className: classnames(className, styles$Z.DropdownMenuItem, {
|
|
18618
18629
|
[styles$Z.active]: active2,
|
|
18619
|
-
[styles$Z.disabled]: !enabled2
|
|
18630
|
+
[styles$Z.disabled]: !enabled2,
|
|
18631
|
+
[styles$Z.compact]: compact2
|
|
18620
18632
|
}),
|
|
18621
18633
|
ref,
|
|
18622
18634
|
onClick: handleClick,
|
|
@@ -21316,14 +21328,18 @@ const Form = forwardRef(function({
|
|
|
21316
21328
|
dispatch(formSubmitting());
|
|
21317
21329
|
try {
|
|
21318
21330
|
const filteredSubject = validationResult.data;
|
|
21319
|
-
const
|
|
21320
|
-
if (
|
|
21331
|
+
const willSubmitResult = await onWillSubmit?.(filteredSubject);
|
|
21332
|
+
if (willSubmitResult === false) {
|
|
21321
21333
|
dispatch(
|
|
21322
21334
|
backendValidationArrived({ generalValidationResults: [], fieldValidationResults: {} })
|
|
21323
21335
|
);
|
|
21324
21336
|
return;
|
|
21325
21337
|
}
|
|
21326
|
-
|
|
21338
|
+
let dataToSubmit = filteredSubject;
|
|
21339
|
+
if (willSubmitResult !== null && willSubmitResult !== void 0 && willSubmitResult !== "" && typeof willSubmitResult === "object" && !Array.isArray(willSubmitResult)) {
|
|
21340
|
+
dataToSubmit = willSubmitResult;
|
|
21341
|
+
}
|
|
21342
|
+
const result = await onSubmit?.(dataToSubmit, {
|
|
21327
21343
|
passAsDefaultBody: true
|
|
21328
21344
|
});
|
|
21329
21345
|
dispatch(formSubmitted());
|
|
@@ -21652,7 +21668,7 @@ const FormMd = createMetadata({
|
|
|
21652
21668
|
},
|
|
21653
21669
|
events: {
|
|
21654
21670
|
willSubmit: d(
|
|
21655
|
-
`The form infrastructure fires this event just before the form is submitted. The event argument is the current \`data\` value to be submitted.
|
|
21671
|
+
`The form infrastructure fires this event just before the form is submitted. The event argument is the current \`data\` value to be submitted. The return value controls submission behavior: returning \`false\` cancels the submission; returning a plain object submits that object instead; returning \`null\`, \`undefined\`, an empty string, or any non-object value proceeds with normal submission.`
|
|
21656
21672
|
),
|
|
21657
21673
|
submit: d(
|
|
21658
21674
|
`The form infrastructure fires this event when the form is submitted. The event argument is the current \`data\` value to save.`
|
|
@@ -25255,11 +25271,11 @@ function requireClient() {
|
|
|
25255
25271
|
var clientExports = /* @__PURE__ */ requireClient();
|
|
25256
25272
|
const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(clientExports);
|
|
25257
25273
|
const themeVars$p = `'{"backgroundColor-ResponsiveBar": "var(--xmlui-backgroundColor-ResponsiveBar)", "padding-ResponsiveBar": "var(--xmlui-padding-ResponsiveBar)", "margin-ResponsiveBar": "var(--xmlui-margin-ResponsiveBar)"}'`;
|
|
25258
|
-
const responsiveBar = "
|
|
25259
|
-
const vertical$2 = "
|
|
25260
|
-
const horizontal$1 = "
|
|
25261
|
-
const visibleItems = "
|
|
25262
|
-
const overflowDropdown = "
|
|
25274
|
+
const responsiveBar = "_responsiveBar_1euow_14";
|
|
25275
|
+
const vertical$2 = "_vertical_1euow_26";
|
|
25276
|
+
const horizontal$1 = "_horizontal_1euow_33";
|
|
25277
|
+
const visibleItems = "_visibleItems_1euow_39";
|
|
25278
|
+
const overflowDropdown = "_overflowDropdown_1euow_65";
|
|
25263
25279
|
const styles$F = {
|
|
25264
25280
|
themeVars: themeVars$p,
|
|
25265
25281
|
responsiveBar,
|
|
@@ -25268,26 +25284,55 @@ const styles$F = {
|
|
|
25268
25284
|
visibleItems,
|
|
25269
25285
|
overflowDropdown
|
|
25270
25286
|
};
|
|
25287
|
+
const PART_OVERFLOW = "overflow";
|
|
25271
25288
|
const ResponsiveBarDropdown = ({
|
|
25272
25289
|
overflowIcon,
|
|
25290
|
+
dropdownText,
|
|
25291
|
+
dropdownAlignment,
|
|
25292
|
+
triggerTemplate,
|
|
25273
25293
|
children,
|
|
25274
|
-
className
|
|
25275
|
-
|
|
25294
|
+
className,
|
|
25295
|
+
onWillOpen,
|
|
25296
|
+
registerComponentApi
|
|
25297
|
+
}) => /* @__PURE__ */ jsx("div", { className, "data-part-id": PART_OVERFLOW, children: /* @__PURE__ */ jsx(
|
|
25298
|
+
DropdownMenu,
|
|
25299
|
+
{
|
|
25300
|
+
label: dropdownText,
|
|
25301
|
+
triggerButtonIcon: overflowIcon,
|
|
25302
|
+
triggerTemplate,
|
|
25303
|
+
alignment: dropdownAlignment,
|
|
25304
|
+
compact: true,
|
|
25305
|
+
onWillOpen,
|
|
25306
|
+
registerComponentApi,
|
|
25307
|
+
children
|
|
25308
|
+
}
|
|
25309
|
+
) });
|
|
25276
25310
|
const defaultResponsiveBarProps = {
|
|
25277
25311
|
overflowIcon: "ellipsisHorizontal:ResponsiveBar",
|
|
25312
|
+
dropdownText: "More options",
|
|
25278
25313
|
gap: 0,
|
|
25279
|
-
orientation: "horizontal"
|
|
25314
|
+
orientation: "horizontal",
|
|
25315
|
+
reverse: false
|
|
25280
25316
|
};
|
|
25281
25317
|
const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
25282
25318
|
children,
|
|
25319
|
+
childNodes,
|
|
25320
|
+
renderChildFn,
|
|
25283
25321
|
overflowIcon = defaultResponsiveBarProps.overflowIcon,
|
|
25322
|
+
dropdownText = defaultResponsiveBarProps.dropdownText,
|
|
25323
|
+
dropdownAlignment,
|
|
25324
|
+
triggerTemplate,
|
|
25284
25325
|
gap = defaultResponsiveBarProps.gap,
|
|
25285
25326
|
orientation = defaultResponsiveBarProps.orientation,
|
|
25327
|
+
reverse: reverse2 = defaultResponsiveBarProps.reverse,
|
|
25286
25328
|
style: style2,
|
|
25287
25329
|
className,
|
|
25288
25330
|
onClick,
|
|
25331
|
+
onWillOpen,
|
|
25332
|
+
registerComponentApi,
|
|
25289
25333
|
...rest
|
|
25290
25334
|
}, ref) {
|
|
25335
|
+
const effectiveAlignment = dropdownAlignment ?? (reverse2 ? "start" : "end");
|
|
25291
25336
|
const containerRef = useRef(null);
|
|
25292
25337
|
const measurementDropdownRef = useRef(null);
|
|
25293
25338
|
const isCalculatingRef = useRef(false);
|
|
@@ -25295,8 +25340,10 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25295
25340
|
const lastChildrenCount = useRef(0);
|
|
25296
25341
|
useRef(null);
|
|
25297
25342
|
const layoutCompletedRef = useRef(false);
|
|
25343
|
+
const dropdownApiRef = useRef(null);
|
|
25298
25344
|
const [isInMeasurementPhase, setIsInMeasurementPhase] = useState(true);
|
|
25299
25345
|
const [measuredWidths, setMeasuredWidths] = useState([]);
|
|
25346
|
+
const [measuredDropdownSize, setMeasuredDropdownSize] = useState(0);
|
|
25300
25347
|
const [layout, setLayout] = useState({
|
|
25301
25348
|
visibleItems: [],
|
|
25302
25349
|
overflowItems: []
|
|
@@ -25308,6 +25355,21 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25308
25355
|
return result;
|
|
25309
25356
|
}, [children]);
|
|
25310
25357
|
const childrenCount = childrenArray.length;
|
|
25358
|
+
useEffect(() => {
|
|
25359
|
+
if (registerComponentApi) {
|
|
25360
|
+
registerComponentApi({
|
|
25361
|
+
open: () => {
|
|
25362
|
+
dropdownApiRef.current?.open();
|
|
25363
|
+
},
|
|
25364
|
+
close: () => {
|
|
25365
|
+
dropdownApiRef.current?.close();
|
|
25366
|
+
},
|
|
25367
|
+
hasOverflow: () => {
|
|
25368
|
+
return layout.overflowItems.length > 0;
|
|
25369
|
+
}
|
|
25370
|
+
});
|
|
25371
|
+
}
|
|
25372
|
+
}, [registerComponentApi, layout.overflowItems.length]);
|
|
25311
25373
|
const measureItems = () => {
|
|
25312
25374
|
if (!containerRef.current) return;
|
|
25313
25375
|
const items = [];
|
|
@@ -25327,7 +25389,16 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25327
25389
|
const rect = item2.getBoundingClientRect();
|
|
25328
25390
|
return orientation === "horizontal" ? rect.width : rect.height;
|
|
25329
25391
|
});
|
|
25392
|
+
let dropdownSize = orientation === "horizontal" ? 147 : 47;
|
|
25393
|
+
if (measurementDropdownRef.current) {
|
|
25394
|
+
const dropdownRect = measurementDropdownRef.current.getBoundingClientRect();
|
|
25395
|
+
const measuredSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
|
|
25396
|
+
if (measuredSize > 0) {
|
|
25397
|
+
dropdownSize = measuredSize;
|
|
25398
|
+
}
|
|
25399
|
+
}
|
|
25330
25400
|
setMeasuredWidths(measurements);
|
|
25401
|
+
setMeasuredDropdownSize(dropdownSize);
|
|
25331
25402
|
setIsInMeasurementPhase(false);
|
|
25332
25403
|
};
|
|
25333
25404
|
const calculateOverflowLayout = () => {
|
|
@@ -25341,7 +25412,6 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25341
25412
|
if (containerSize === 0 || containerSize === lastSize) {
|
|
25342
25413
|
return;
|
|
25343
25414
|
}
|
|
25344
|
-
console.log(`ResponsiveBar ${orientation}: containerSize=${containerSize}, children=${childrenArray.length}`);
|
|
25345
25415
|
isCalculatingRef.current = true;
|
|
25346
25416
|
lastContainerSize.current = containerSize;
|
|
25347
25417
|
const gapValue = gap;
|
|
@@ -25352,25 +25422,23 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25352
25422
|
const gapSize = i > 0 ? gapValue : 0;
|
|
25353
25423
|
totalSize += gapSize + childSize;
|
|
25354
25424
|
}
|
|
25355
|
-
console.log(`Total size needed: ${totalSize}, available: ${containerSize}`);
|
|
25356
25425
|
let visibleItems2;
|
|
25357
25426
|
let overflowItems;
|
|
25358
25427
|
if (totalSize <= containerSize) {
|
|
25359
25428
|
visibleItems2 = childrenArray;
|
|
25360
25429
|
overflowItems = [];
|
|
25361
25430
|
} else {
|
|
25362
|
-
let dropdownSize = orientation === "horizontal" ? 147 : 47;
|
|
25431
|
+
let dropdownSize = measuredDropdownSize > 0 ? measuredDropdownSize : orientation === "horizontal" ? 147 : 47;
|
|
25363
25432
|
const existingDropdown = container2.querySelector(
|
|
25364
25433
|
`.${styles$F.overflowDropdown}`
|
|
25365
25434
|
);
|
|
25366
25435
|
if (existingDropdown) {
|
|
25367
25436
|
const dropdownRect = existingDropdown.getBoundingClientRect();
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25437
|
+
const currentSize = orientation === "horizontal" ? dropdownRect.width : dropdownRect.height;
|
|
25438
|
+
if (currentSize > 0) {
|
|
25439
|
+
dropdownSize = currentSize;
|
|
25440
|
+
}
|
|
25372
25441
|
}
|
|
25373
|
-
console.log(`Dropdown size: ${dropdownSize}`);
|
|
25374
25442
|
let accumulatedSize = 0;
|
|
25375
25443
|
let visibleCount = 0;
|
|
25376
25444
|
for (let i = 0; i < childrenArray.length; i++) {
|
|
@@ -25379,7 +25447,6 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25379
25447
|
const gapSize = i > 0 ? gapValue : 0;
|
|
25380
25448
|
const proposedSize = accumulatedSize + gapSize + childSize;
|
|
25381
25449
|
const totalSizeWithDropdown = proposedSize + gapValue + dropdownSize;
|
|
25382
|
-
console.log(`Item ${i}: size=${childSize}, proposed=${proposedSize}, withDropdown=${totalSizeWithDropdown}`);
|
|
25383
25450
|
if (totalSizeWithDropdown <= containerSize) {
|
|
25384
25451
|
accumulatedSize = proposedSize;
|
|
25385
25452
|
visibleCount++;
|
|
@@ -25393,18 +25460,14 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25393
25460
|
if (visibleCount >= childrenArray.length) {
|
|
25394
25461
|
visibleItems2 = childrenArray;
|
|
25395
25462
|
overflowItems = [];
|
|
25396
|
-
console.log(`All items fit, no dropdown needed`);
|
|
25397
25463
|
} else if (visibleCount === 0) {
|
|
25398
25464
|
visibleItems2 = childrenArray.slice(0, 1);
|
|
25399
25465
|
overflowItems = childrenArray.slice(1);
|
|
25400
|
-
console.log(`No items fit, forcing one visible: visible=1, overflow=${overflowItems.length}`);
|
|
25401
25466
|
} else {
|
|
25402
25467
|
visibleItems2 = childrenArray.slice(0, visibleCount);
|
|
25403
25468
|
overflowItems = childrenArray.slice(visibleCount);
|
|
25404
|
-
console.log(`Split items: visible=${visibleItems2.length}, overflow=${overflowItems.length}`);
|
|
25405
25469
|
}
|
|
25406
25470
|
}
|
|
25407
|
-
console.log(`Final layout: visible=${visibleItems2.length}, overflow=${overflowItems.length}`);
|
|
25408
25471
|
if (visibleItems2.length !== layout.visibleItems.length || overflowItems.length !== layout.overflowItems.length) {
|
|
25409
25472
|
setLayout({
|
|
25410
25473
|
visibleItems: visibleItems2,
|
|
@@ -25426,6 +25489,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25426
25489
|
lastChildrenCount.current = childrenCount;
|
|
25427
25490
|
setIsInMeasurementPhase(true);
|
|
25428
25491
|
setMeasuredWidths([]);
|
|
25492
|
+
setMeasuredDropdownSize(0);
|
|
25429
25493
|
}
|
|
25430
25494
|
}, [childrenCount]);
|
|
25431
25495
|
useEffect(() => {
|
|
@@ -25471,7 +25535,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25471
25535
|
...style2,
|
|
25472
25536
|
gap: `${gap}px`,
|
|
25473
25537
|
// Gap between visibleItems and overflowDropdown
|
|
25474
|
-
flexDirection: orientation === "horizontal" ? "row" : "column",
|
|
25538
|
+
flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column",
|
|
25475
25539
|
height: orientation === "vertical" ? "100%" : void 0,
|
|
25476
25540
|
width: orientation === "horizontal" ? "100%" : void 0
|
|
25477
25541
|
},
|
|
@@ -25493,7 +25557,7 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25493
25557
|
visibility: "hidden",
|
|
25494
25558
|
opacity: 0,
|
|
25495
25559
|
pointerEvents: "none",
|
|
25496
|
-
flexDirection: orientation === "horizontal" ? "row" : "column"
|
|
25560
|
+
flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column"
|
|
25497
25561
|
},
|
|
25498
25562
|
children: childrenArray.map((child, index) => /* @__PURE__ */ jsx("div", { children: child }, `item-${index}`))
|
|
25499
25563
|
}
|
|
@@ -25511,7 +25575,13 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25511
25575
|
ResponsiveBarDropdown,
|
|
25512
25576
|
{
|
|
25513
25577
|
overflowIcon,
|
|
25578
|
+
dropdownText,
|
|
25579
|
+
dropdownAlignment: effectiveAlignment,
|
|
25580
|
+
triggerTemplate,
|
|
25514
25581
|
className: styles$F.overflowDropdown,
|
|
25582
|
+
onWillOpen,
|
|
25583
|
+
registerComponentApi: (api) => {
|
|
25584
|
+
},
|
|
25515
25585
|
children: childrenArray.length > 0 && /* @__PURE__ */ jsx(MenuItem, { children: childrenArray[0] })
|
|
25516
25586
|
}
|
|
25517
25587
|
)
|
|
@@ -25531,11 +25601,11 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25531
25601
|
style: {
|
|
25532
25602
|
gap: `${gap}px`,
|
|
25533
25603
|
// Gap between visible items
|
|
25534
|
-
flexDirection: orientation === "horizontal" ? "row" : "column"
|
|
25604
|
+
flexDirection: orientation === "horizontal" ? reverse2 ? "row-reverse" : "row" : reverse2 ? "column-reverse" : "column"
|
|
25535
25605
|
},
|
|
25536
25606
|
children: childrenArray.map((child, index) => {
|
|
25537
25607
|
const isVisible = layout.visibleItems.length > 0 ? index < layout.visibleItems.length : true;
|
|
25538
|
-
return /* @__PURE__ */ jsx("div", { style: { display: isVisible ? "
|
|
25608
|
+
return /* @__PURE__ */ jsx("div", { style: { display: isVisible ? "flex" : "none", alignItems: "stretch" }, children: renderChildFn && childNodes ? renderChildFn(childNodes[index], false) : child }, `item-${index}`);
|
|
25539
25609
|
})
|
|
25540
25610
|
}
|
|
25541
25611
|
),
|
|
@@ -25543,8 +25613,19 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25543
25613
|
ResponsiveBarDropdown,
|
|
25544
25614
|
{
|
|
25545
25615
|
overflowIcon,
|
|
25616
|
+
dropdownText,
|
|
25617
|
+
dropdownAlignment: effectiveAlignment,
|
|
25618
|
+
triggerTemplate,
|
|
25546
25619
|
className: styles$F.overflowDropdown,
|
|
25547
|
-
|
|
25620
|
+
onWillOpen,
|
|
25621
|
+
registerComponentApi: (api) => {
|
|
25622
|
+
dropdownApiRef.current = api;
|
|
25623
|
+
},
|
|
25624
|
+
children: layout.overflowItems.map((item2, index) => {
|
|
25625
|
+
const originalIndex = layout.visibleItems.length + index;
|
|
25626
|
+
const renderedChild = renderChildFn && childNodes ? renderChildFn(childNodes[originalIndex], true) : item2;
|
|
25627
|
+
return /* @__PURE__ */ jsx(MenuItem, { compact: true, children: renderedChild }, index);
|
|
25628
|
+
})
|
|
25548
25629
|
}
|
|
25549
25630
|
)
|
|
25550
25631
|
] })
|
|
@@ -25552,6 +25633,21 @@ const ResponsiveBar = forwardRef(function ResponsiveBar2({
|
|
|
25552
25633
|
}
|
|
25553
25634
|
);
|
|
25554
25635
|
});
|
|
25636
|
+
const ResponsiveBarItem = memo(
|
|
25637
|
+
({ node, isOverflow, renderChild: renderChild2, layoutContext }) => {
|
|
25638
|
+
const nodeWithContext = useMemo(() => {
|
|
25639
|
+
return {
|
|
25640
|
+
type: "Container",
|
|
25641
|
+
contextVars: {
|
|
25642
|
+
$overflow: isOverflow
|
|
25643
|
+
},
|
|
25644
|
+
children: Array.isArray(node) ? node : [node]
|
|
25645
|
+
};
|
|
25646
|
+
}, [node, isOverflow]);
|
|
25647
|
+
return /* @__PURE__ */ jsx(Fragment, { children: renderChild2(nodeWithContext, layoutContext) });
|
|
25648
|
+
}
|
|
25649
|
+
);
|
|
25650
|
+
ResponsiveBarItem.displayName = "ResponsiveBarItem";
|
|
25555
25651
|
const COMP$1c = "ResponsiveBar";
|
|
25556
25652
|
const ResponsiveBarMd = createMetadata({
|
|
25557
25653
|
status: "stable",
|
|
@@ -25569,17 +25665,54 @@ const ResponsiveBarMd = createMetadata({
|
|
|
25569
25665
|
valueType: "string",
|
|
25570
25666
|
defaultValue: defaultResponsiveBarProps.overflowIcon
|
|
25571
25667
|
},
|
|
25668
|
+
dropdownText: {
|
|
25669
|
+
description: "Text to display in the dropdown trigger button label when items overflow. This text is used for accessibility and appears alongside the overflow icon.",
|
|
25670
|
+
valueType: "string",
|
|
25671
|
+
defaultValue: defaultResponsiveBarProps.dropdownText
|
|
25672
|
+
},
|
|
25673
|
+
dropdownAlignment: {
|
|
25674
|
+
description: "Alignment of the dropdown menu relative to the trigger button. By default, uses 'end' when reverse is false (dropdown on the right/bottom) and 'start' when reverse is true (dropdown on the left/top).",
|
|
25675
|
+
valueType: "string",
|
|
25676
|
+
availableValues: alignmentOptionMd
|
|
25677
|
+
},
|
|
25678
|
+
triggerTemplate: dTriggerTemplate(COMP$1c),
|
|
25572
25679
|
gap: {
|
|
25573
25680
|
description: "Gap between child elements in pixels. Controls the spacing between items in the responsive bar layout.",
|
|
25574
25681
|
valueType: "number",
|
|
25575
25682
|
defaultValue: defaultResponsiveBarProps.gap
|
|
25683
|
+
},
|
|
25684
|
+
reverse: {
|
|
25685
|
+
description: "Reverses the direction of child elements. In horizontal mode, items are arranged from right to left instead of left to right. In vertical mode, items are arranged from bottom to top instead of top to bottom. The dropdown menu position also adjusts to appear at the start (left/top) instead of the end (right/bottom).",
|
|
25686
|
+
valueType: "boolean",
|
|
25687
|
+
defaultValue: defaultResponsiveBarProps.reverse
|
|
25576
25688
|
}
|
|
25577
25689
|
},
|
|
25578
25690
|
events: {
|
|
25579
|
-
click: dClick(COMP$1c)
|
|
25691
|
+
click: dClick(COMP$1c),
|
|
25692
|
+
willOpen: d(
|
|
25693
|
+
`This event fires when the \`${COMP$1c}\` overflow dropdown menu is about to be opened. You can prevent opening the menu by returning \`false\` from the event handler. Otherwise, the menu will open at the end of the event handler like normal.`
|
|
25694
|
+
)
|
|
25695
|
+
},
|
|
25696
|
+
apis: {
|
|
25697
|
+
close: {
|
|
25698
|
+
description: `This method closes the overflow dropdown menu.`,
|
|
25699
|
+
signature: "close(): void"
|
|
25700
|
+
},
|
|
25701
|
+
open: {
|
|
25702
|
+
description: `This method opens the overflow dropdown menu.`,
|
|
25703
|
+
signature: "open(): void"
|
|
25704
|
+
},
|
|
25705
|
+
hasOverflow: {
|
|
25706
|
+
description: `This method returns true if the ResponsiveBar currently has an overflow menu (i.e., some items don't fit and are in the dropdown).`,
|
|
25707
|
+
signature: "hasOverflow(): boolean"
|
|
25708
|
+
}
|
|
25709
|
+
},
|
|
25710
|
+
contextVars: {
|
|
25711
|
+
$overflow: {
|
|
25712
|
+
description: "Boolean indicating whether the child component is displayed in the overflow dropdown menu (true) or visible in the main bar (false).",
|
|
25713
|
+
valueType: "boolean"
|
|
25714
|
+
}
|
|
25580
25715
|
},
|
|
25581
|
-
apis: {},
|
|
25582
|
-
contextVars: {},
|
|
25583
25716
|
themeVars: parseScssVar(styles$F.themeVars),
|
|
25584
25717
|
limitThemeVarsToComponent: true,
|
|
25585
25718
|
defaultThemeVars: {
|
|
@@ -25591,16 +25724,43 @@ const ResponsiveBarMd = createMetadata({
|
|
|
25591
25724
|
const responsiveBarComponentRenderer = createComponentRenderer(
|
|
25592
25725
|
COMP$1c,
|
|
25593
25726
|
ResponsiveBarMd,
|
|
25594
|
-
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) => {
|
|
25727
|
+
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi, layoutContext }) => {
|
|
25728
|
+
const children = Array.isArray(node.children) ? node.children : node.children ? [node.children] : [];
|
|
25729
|
+
const renderChildWithContext = (childNode, isOverflow) => /* @__PURE__ */ jsx(
|
|
25730
|
+
ResponsiveBarItem,
|
|
25731
|
+
{
|
|
25732
|
+
node: childNode,
|
|
25733
|
+
isOverflow,
|
|
25734
|
+
renderChild: renderChild2,
|
|
25735
|
+
layoutContext
|
|
25736
|
+
}
|
|
25737
|
+
);
|
|
25595
25738
|
return /* @__PURE__ */ jsx(
|
|
25596
25739
|
ResponsiveBar,
|
|
25597
25740
|
{
|
|
25598
25741
|
orientation: extractValue(node.props?.orientation),
|
|
25599
25742
|
overflowIcon: extractValue(node.props?.overflowIcon),
|
|
25743
|
+
dropdownText: extractValue(node.props?.dropdownText),
|
|
25744
|
+
dropdownAlignment: extractValue(node.props?.dropdownAlignment),
|
|
25745
|
+
triggerTemplate: renderChild2(node.props?.triggerTemplate),
|
|
25600
25746
|
gap: extractValue(node.props?.gap),
|
|
25747
|
+
reverse: extractValue.asOptionalBoolean(node.props?.reverse),
|
|
25601
25748
|
onClick: lookupEventHandler("click"),
|
|
25749
|
+
onWillOpen: lookupEventHandler("willOpen"),
|
|
25750
|
+
registerComponentApi,
|
|
25602
25751
|
className,
|
|
25603
|
-
|
|
25752
|
+
childNodes: children,
|
|
25753
|
+
renderChildFn: renderChildWithContext,
|
|
25754
|
+
children: children.map((child, index) => /* @__PURE__ */ jsx(
|
|
25755
|
+
ResponsiveBarItem,
|
|
25756
|
+
{
|
|
25757
|
+
node: child,
|
|
25758
|
+
isOverflow: false,
|
|
25759
|
+
renderChild: renderChild2,
|
|
25760
|
+
layoutContext
|
|
25761
|
+
},
|
|
25762
|
+
index
|
|
25763
|
+
))
|
|
25604
25764
|
}
|
|
25605
25765
|
);
|
|
25606
25766
|
}
|
|
@@ -48088,7 +48248,7 @@ function IconProvider({ children }) {
|
|
|
48088
48248
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
48089
48249
|
] });
|
|
48090
48250
|
}
|
|
48091
|
-
const version = "0.11.
|
|
48251
|
+
const version = "0.11.15";
|
|
48092
48252
|
const miscellaneousUtils = {
|
|
48093
48253
|
capitalize,
|
|
48094
48254
|
pluralize: pluralize$1,
|
|
@@ -55738,7 +55898,7 @@ function ApiInterceptorProvider({
|
|
|
55738
55898
|
return;
|
|
55739
55899
|
}
|
|
55740
55900
|
void (async () => {
|
|
55741
|
-
const { initMock } = await import("./initMock-
|
|
55901
|
+
const { initMock } = await import("./initMock-DROjRCvI.js");
|
|
55742
55902
|
const apiInstance2 = await initMock(interceptor);
|
|
55743
55903
|
setApiInstance(apiInstance2);
|
|
55744
55904
|
setInitialized(true);
|
|
@@ -55755,7 +55915,7 @@ function ApiInterceptorProvider({
|
|
|
55755
55915
|
if (define_process_env_default.VITE_MOCK_ENABLED) {
|
|
55756
55916
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
55757
55917
|
useWorker ? import("./apiInterceptorWorker-Wgm2_zjg.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
55758
|
-
import("./initMock-
|
|
55918
|
+
import("./initMock-DROjRCvI.js")
|
|
55759
55919
|
]);
|
|
55760
55920
|
if (interceptor || forceInitialize) {
|
|
55761
55921
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -55792,7 +55952,7 @@ function ApiInterceptorProvider({
|
|
|
55792
55952
|
void (async () => {
|
|
55793
55953
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
55794
55954
|
import("./apiInterceptorWorker-Wgm2_zjg.js"),
|
|
55795
|
-
import("./initMock-
|
|
55955
|
+
import("./initMock-DROjRCvI.js")
|
|
55796
55956
|
]);
|
|
55797
55957
|
const apiInstance2 = await initMock(interceptor);
|
|
55798
55958
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|
|
@@ -58706,6 +58866,7 @@ const collectedComponentMetadata = {
|
|
|
58706
58866
|
RadioGroup: RadioGroupMd,
|
|
58707
58867
|
RealTimeAdapter: RealTimeAdapterMd,
|
|
58708
58868
|
Redirect: RedirectMd,
|
|
58869
|
+
ResponsiveBar: ResponsiveBarMd,
|
|
58709
58870
|
Select: SelectMd,
|
|
58710
58871
|
SelectionStore: SelectionStoreMd,
|
|
58711
58872
|
Slider: SliderMd,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
|
|
2
2
|
import { isArray, isObject, mapValues } from "lodash-es";
|
|
3
|
-
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-
|
|
3
|
+
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-Bn_obqca.js";
|
|
4
4
|
import Dexie from "dexie";
|
|
5
5
|
var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
|
|
6
6
|
HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
|