xmlui 0.9.12 → 0.9.13
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/{apiInterceptorWorker-dYrfbzdh.mjs → apiInterceptorWorker-BUaYCWe6.mjs} +1 -1
- package/dist/{index-Dh2MThrK.mjs → index-DiCe0Ajo.mjs} +182 -75
- package/dist/index.css +49 -43
- package/dist/scripts/src/components/Form/FormNative.js +8 -2
- package/dist/scripts/src/components/Form/formActions.js +5 -4
- package/dist/scripts/src/components/FormItem/FormItemNative.js +16 -12
- package/dist/scripts/src/components/Markdown/Markdown.js +1 -0
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +13 -10
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +1 -1
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +10 -7
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +2 -2
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +10 -2
- package/dist/style.css +49 -43
- package/dist/xmlui-metadata.mjs +40 -20
- package/dist/xmlui-metadata.umd.js +40 -20
- package/dist/xmlui-standalone.umd.js +291 -177
- package/dist/xmlui.d.ts +12 -0
- package/dist/xmlui.mjs +2 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -5549,7 +5549,7 @@ button._selectTrigger_nwesf_46._valid_nwesf_37::placeholder {
|
|
|
5549
5549
|
* This function allows other CSS modules to get the value of the CSS variable specified in $componentVariable.
|
|
5550
5550
|
Optionally, you can provide a $fallbackValue to set the variable's value if that is not defined.
|
|
5551
5551
|
*/
|
|
5552
|
-
.
|
|
5552
|
+
._markdownContent_1anzp_13 ._blockquote_1anzp_13 {
|
|
5553
5553
|
position: relative;
|
|
5554
5554
|
margin-top: var(--xmlui-marginTop-Blockquote);
|
|
5555
5555
|
margin-bottom: var(--xmlui-marginBottom-Blockquote);
|
|
@@ -5557,7 +5557,7 @@ button._selectTrigger_nwesf_46._valid_nwesf_37::placeholder {
|
|
|
5557
5557
|
border-radius: var(--xmlui-borderRadius-Blockquote);
|
|
5558
5558
|
padding-left: var(--xmlui-paddingLeft-Blockquote);
|
|
5559
5559
|
}
|
|
5560
|
-
.
|
|
5560
|
+
._markdownContent_1anzp_13 ._blockquote_1anzp_13::before {
|
|
5561
5561
|
background-color: var(--xmlui-accentColor-Blockquote);
|
|
5562
5562
|
position: absolute;
|
|
5563
5563
|
top: 0;
|
|
@@ -5567,39 +5567,50 @@ button._selectTrigger_nwesf_46._valid_nwesf_37::placeholder {
|
|
|
5567
5567
|
height: 100%;
|
|
5568
5568
|
width: var(--xmlui-accentWidth-Blockquote);
|
|
5569
5569
|
}
|
|
5570
|
-
.
|
|
5570
|
+
._markdownContent_1anzp_13 ._blockquoteContainer_1anzp_31 {
|
|
5571
5571
|
padding: 0.5rem;
|
|
5572
5572
|
}
|
|
5573
|
-
.
|
|
5573
|
+
._markdownContent_1anzp_13 ._admonitionBlockquote_1anzp_34 {
|
|
5574
5574
|
margin-top: var(--xmlui-marginTop-Admonition);
|
|
5575
5575
|
margin-bottom: var(--xmlui-marginBottom-Admonition);
|
|
5576
5576
|
background-color: var(--xmlui-backgroundColor-Admonition);
|
|
5577
5577
|
border-radius: var(--xmlui-borderRadius-Admonition);
|
|
5578
5578
|
}
|
|
5579
|
-
.
|
|
5579
|
+
._markdownContent_1anzp_13 ._admonitionContainer_1anzp_40 {
|
|
5580
5580
|
padding: 0.5rem;
|
|
5581
5581
|
display: flex;
|
|
5582
5582
|
align-items: flex-start;
|
|
5583
5583
|
}
|
|
5584
|
-
.
|
|
5584
|
+
._markdownContent_1anzp_13 ._admonitionContent_1anzp_45 {
|
|
5585
5585
|
margin-left: var(--xmlui-marginLeft-Admonition-content);
|
|
5586
5586
|
}
|
|
5587
|
-
.
|
|
5587
|
+
._markdownContent_1anzp_13 ._admonitionIcon_1anzp_48 {
|
|
5588
5588
|
font-size: var(--xmlui-iconSize-Admonition);
|
|
5589
5589
|
line-height: 1;
|
|
5590
5590
|
}
|
|
5591
|
-
.
|
|
5591
|
+
._markdownContent_1anzp_13 ._admonitionContent_1anzp_45 {
|
|
5592
5592
|
flex: 1;
|
|
5593
5593
|
min-width: 0;
|
|
5594
5594
|
}
|
|
5595
|
-
.
|
|
5595
|
+
._markdownContent_1anzp_13 ._admonitionBlockquote_1anzp_34 ._admonitionContent_1anzp_45 [class*=text_][class*=markdown_] {
|
|
5596
5596
|
margin-top: 0;
|
|
5597
5597
|
margin-bottom: 0;
|
|
5598
5598
|
}
|
|
5599
|
-
.
|
|
5599
|
+
._markdownContent_1anzp_13 li:has(> input[type=checkbox]),
|
|
5600
|
+
._markdownContent_1anzp_13 li:has(> input[type=checkbox]) {
|
|
5601
|
+
display: flex;
|
|
5602
|
+
align-items: flex-start;
|
|
5603
|
+
}
|
|
5604
|
+
._markdownContent_1anzp_13 li:has(> input[type=checkbox]) > input[type=checkbox],
|
|
5605
|
+
._markdownContent_1anzp_13 li:has(> input[type=checkbox]) > input[type=checkbox] {
|
|
5606
|
+
margin-right: 8px;
|
|
5607
|
+
margin-top: 4px;
|
|
5608
|
+
flex-shrink: 0;
|
|
5609
|
+
}
|
|
5610
|
+
._markdownContent_1anzp_13 > *:first-child {
|
|
5600
5611
|
margin-top: 0;
|
|
5601
5612
|
}
|
|
5602
|
-
.
|
|
5613
|
+
._markdownContent_1anzp_13 > *:last-child {
|
|
5603
5614
|
margin-bottom: 0;
|
|
5604
5615
|
}
|
|
5605
5616
|
|
|
@@ -5648,7 +5659,7 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5648
5659
|
* This function allows other CSS modules to get the value of the CSS variable specified in $componentVariable.
|
|
5649
5660
|
Optionally, you can provide a $fallbackValue to set the variable's value if that is not defined.
|
|
5650
5661
|
*/
|
|
5651
|
-
.
|
|
5662
|
+
._htmlTable_ei3dh_13 {
|
|
5652
5663
|
background-color: var(--xmlui-backgroundColor-HtmlTable);
|
|
5653
5664
|
color: var(--xmlui-textColor-HtmlTable);
|
|
5654
5665
|
font-family: var(--xmlui-fontFamily-HtmlTable);
|
|
@@ -5684,7 +5695,7 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5684
5695
|
padding-bottom: var(--xmlui-paddingBottom-HtmlTable, var(--xmlui-paddingVertical-HtmlTable, var(--xmlui-padding-HtmlTable)));
|
|
5685
5696
|
}
|
|
5686
5697
|
|
|
5687
|
-
.
|
|
5698
|
+
._htmlThead_ei3dh_49 {
|
|
5688
5699
|
background-color: var(--xmlui-backgroundColor-HtmlThead);
|
|
5689
5700
|
color: var(--xmlui-textColor-HtmlThead);
|
|
5690
5701
|
font-weight: var(--xmlui-fontWeight-HtmlThead);
|
|
@@ -5717,7 +5728,7 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5717
5728
|
padding-bottom: var(--xmlui-paddingBottom-HtmlThead, var(--xmlui-paddingVertical-HtmlThead, var(--xmlui-padding-HtmlThead)));
|
|
5718
5729
|
}
|
|
5719
5730
|
|
|
5720
|
-
.
|
|
5731
|
+
._htmlTbody_ei3dh_82 {
|
|
5721
5732
|
background-color: var(--xmlui-backgroundColor-HtmlTbody);
|
|
5722
5733
|
color: var(--xmlui-textColor-HtmlTbody);
|
|
5723
5734
|
text-align: var(--xmlui-textAlign-HtmlTbody);
|
|
@@ -5725,12 +5736,12 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5725
5736
|
text-transform: var(--xmlui-textTransform-HtmlTbody);
|
|
5726
5737
|
}
|
|
5727
5738
|
|
|
5728
|
-
.
|
|
5739
|
+
._htmlTfoot_ei3dh_90 {
|
|
5729
5740
|
background-color: var(--xmlui-backgroundColor-HtmlTfoot);
|
|
5730
5741
|
color: var(--xmlui-textColor-HtmlTfoot);
|
|
5731
5742
|
}
|
|
5732
5743
|
|
|
5733
|
-
.
|
|
5744
|
+
._htmlTh_ei3dh_49 {
|
|
5734
5745
|
background-color: var(--xmlui-backgroundColor-HtmlTh);
|
|
5735
5746
|
color: var(--xmlui-textColor-HtmlTh);
|
|
5736
5747
|
font-weight: var(--xmlui-fontWeight-HtmlTh);
|
|
@@ -5761,11 +5772,11 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5761
5772
|
padding-top: var(--xmlui-paddingTop-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)));
|
|
5762
5773
|
padding-bottom: var(--xmlui-paddingBottom-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)));
|
|
5763
5774
|
}
|
|
5764
|
-
.
|
|
5775
|
+
._htmlTh_ei3dh_49:hover {
|
|
5765
5776
|
background-color: var(--xmlui-backgroundColor-HtmlTh--hover);
|
|
5766
5777
|
}
|
|
5767
5778
|
|
|
5768
|
-
.
|
|
5779
|
+
._htmlTr_ei3dh_130 {
|
|
5769
5780
|
background-color: var(--xmlui-backgroundColor-HtmlTr);
|
|
5770
5781
|
color: var(--xmlui-textColor-HtmlTr);
|
|
5771
5782
|
font-weight: var(--xmlui-fontWeight-HtmlTr);
|
|
@@ -5791,18 +5802,18 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5791
5802
|
border-end-start-radius: var(--xmlui-borderEndStartRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr));
|
|
5792
5803
|
border-end-end-radius: var(--xmlui-borderEndEndRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr));
|
|
5793
5804
|
}
|
|
5794
|
-
.
|
|
5805
|
+
._htmlTr_ei3dh_130:nth-child(even) {
|
|
5795
5806
|
background-color: var(--xmlui-backgroundColor-even-HtmlTr);
|
|
5796
5807
|
}
|
|
5797
|
-
.
|
|
5808
|
+
._htmlTr_ei3dh_130:hover {
|
|
5798
5809
|
background-color: var(--xmlui-backgroundColor-HtmlTr--hover);
|
|
5799
5810
|
color: var(--xmlui-textColor-HtmlTr--hover);
|
|
5800
5811
|
}
|
|
5801
|
-
.
|
|
5812
|
+
._htmlTr_ei3dh_130:hover:not(:has(:not(th))) {
|
|
5802
5813
|
background-color: initial;
|
|
5803
5814
|
}
|
|
5804
5815
|
|
|
5805
|
-
.
|
|
5816
|
+
._htmlTd_ei3dh_167 {
|
|
5806
5817
|
background-color: var(--xmlui-backgroundColor-HtmlTd);
|
|
5807
5818
|
text-align: var(--xmlui-text-align-HtmlTd);
|
|
5808
5819
|
vertical-align: var(--xmlui-verticalAlign-HtmlTd);
|
|
@@ -5835,50 +5846,45 @@ $color-marker-ListItem: createThemeVar("color-marker-ListItem");
|
|
|
5835
5846
|
padding-bottom: var(--xmlui-paddingBottom-HtmlTd, var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd)));
|
|
5836
5847
|
}
|
|
5837
5848
|
|
|
5838
|
-
.
|
|
5849
|
+
._htmlUl_ei3dh_200 {
|
|
5839
5850
|
margin-top: var(--xmlui-marginTop-HtmlUl);
|
|
5840
5851
|
margin-bottom: var(--xmlui-marginBottom-HtmlUl);
|
|
5841
5852
|
}
|
|
5842
5853
|
|
|
5843
|
-
.
|
|
5854
|
+
._htmlOl_ei3dh_205 {
|
|
5844
5855
|
margin-top: var(--xmlui-marginTop-HtmlOl);
|
|
5845
5856
|
margin-bottom: var(--xmlui-marginBottom-HtmlOl);
|
|
5846
5857
|
}
|
|
5847
5858
|
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
margin-
|
|
5851
|
-
margin-bottom: 0;
|
|
5859
|
+
._htmlLi_ei3dh_210 {
|
|
5860
|
+
margin-top: var(--xmlui-marginTop-HtmlLi);
|
|
5861
|
+
margin-bottom: var(--xmlui-marginBottom-HtmlLi);
|
|
5852
5862
|
}
|
|
5853
5863
|
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
._htmlOl_1wzn5_205 li:has(> input[type=checkbox]) > input[type=checkbox] {
|
|
5861
|
-
margin-right: 8px;
|
|
5862
|
-
margin-top: 4px;
|
|
5863
|
-
flex-shrink: 0;
|
|
5864
|
+
/*
|
|
5865
|
+
// Compress when nested
|
|
5866
|
+
li .htmlUl,
|
|
5867
|
+
li .htmlOl {
|
|
5868
|
+
margin-top: 0;
|
|
5869
|
+
margin-bottom: 0;
|
|
5864
5870
|
}
|
|
5865
|
-
|
|
5866
|
-
.
|
|
5871
|
+
*/
|
|
5872
|
+
._htmlH1_ei3dh_223, ._htmlH2_ei3dh_223, ._htmlH3_ei3dh_223, ._htmlH4_ei3dh_223, ._htmlH5_ei3dh_223, ._htmlH6_ei3dh_223 {
|
|
5867
5873
|
margin-top: var(--xmlui-marginTop-HtmlHeading);
|
|
5868
5874
|
margin-bottom: var(--xmlui-marginBottom-HtmlHeading);
|
|
5869
5875
|
}
|
|
5870
5876
|
|
|
5871
|
-
.
|
|
5877
|
+
._htmlVideo_ei3dh_228 {
|
|
5872
5878
|
margin-top: var(--xmlui-marginTop-HtmlVideo);
|
|
5873
5879
|
margin-bottom: var(--xmlui-marginBottom-HtmlVideo);
|
|
5874
5880
|
}
|
|
5875
5881
|
|
|
5876
|
-
.
|
|
5882
|
+
._htmlDetails_ei3dh_233 {
|
|
5877
5883
|
margin-top: var(--xmlui-marginTop-HtmlDetails);
|
|
5878
5884
|
margin-bottom: var(--xmlui-marginBottom-HtmlDetails);
|
|
5879
5885
|
}
|
|
5880
5886
|
|
|
5881
|
-
.
|
|
5887
|
+
._htmlDetails_ei3dh_233 {
|
|
5882
5888
|
margin-top: var(--xmlui-marginTop-HtmlDetails);
|
|
5883
5889
|
margin-bottom: var(--xmlui-marginBottom-HtmlDetails);
|
|
5884
5890
|
}/*
|
package/dist/xmlui-metadata.mjs
CHANGED
|
@@ -5662,6 +5662,7 @@ const styles$t = {
|
|
|
5662
5662
|
wrapper: wrapper$1,
|
|
5663
5663
|
buttonRow
|
|
5664
5664
|
};
|
|
5665
|
+
const UNBOUND_FIELD_SUFFIX = "__UNBOUND_FIELD__";
|
|
5665
5666
|
var FormActionKind = /* @__PURE__ */ ((FormActionKind2) => {
|
|
5666
5667
|
FormActionKind2["FIELD_LOST_FOCUS"] = "FormActionKind:FIELD_LOST_FOCUS";
|
|
5667
5668
|
FormActionKind2["FIELD_VALUE_CHANGED"] = "FormActionKind:FIELD_VALUE_CHANGED";
|
|
@@ -5753,7 +5754,10 @@ function formReset(originalSubject) {
|
|
|
5753
5754
|
}
|
|
5754
5755
|
};
|
|
5755
5756
|
}
|
|
5756
|
-
function backendValidationArrived({
|
|
5757
|
+
function backendValidationArrived({
|
|
5758
|
+
generalValidationResults = [],
|
|
5759
|
+
fieldValidationResults = {}
|
|
5760
|
+
}) {
|
|
5757
5761
|
return {
|
|
5758
5762
|
type: "FormActionKind:BACKEND_VALIDATION_ARRIVED",
|
|
5759
5763
|
payload: {
|
|
@@ -7121,7 +7125,13 @@ const Form = forwardRef(function({
|
|
|
7121
7125
|
const prevFocused = document.activeElement;
|
|
7122
7126
|
dispatch(formSubmitting());
|
|
7123
7127
|
try {
|
|
7124
|
-
|
|
7128
|
+
const filteredSubject = Object.entries(formState.subject).reduce((acc, [key, value]) => {
|
|
7129
|
+
if (!key.endsWith(UNBOUND_FIELD_SUFFIX)) {
|
|
7130
|
+
acc[key] = value;
|
|
7131
|
+
}
|
|
7132
|
+
return acc;
|
|
7133
|
+
}, {});
|
|
7134
|
+
await (onSubmit == null ? void 0 : onSubmit(filteredSubject, {
|
|
7125
7135
|
passAsDefaultBody: true
|
|
7126
7136
|
}));
|
|
7127
7137
|
dispatch(formSubmitted());
|
|
@@ -14465,6 +14475,8 @@ memo(function FormItem2({
|
|
|
14465
14475
|
inputRenderer,
|
|
14466
14476
|
...rest
|
|
14467
14477
|
}) {
|
|
14478
|
+
const defaultId = useId();
|
|
14479
|
+
const [formItemId, setFormItemId] = useState(bindTo);
|
|
14468
14480
|
const labelWidthValue = useFormContextPart((value2) => labelWidth || value2.itemLabelWidth);
|
|
14469
14481
|
const labelBreakValue = useFormContextPart(
|
|
14470
14482
|
(value2) => labelBreak2 !== void 0 ? labelBreak2 : value2.itemLabelBreak
|
|
@@ -14473,33 +14485,35 @@ memo(function FormItem2({
|
|
|
14473
14485
|
(value2) => labelPosition || value2.itemLabelPosition || DEFAULT_LABEL_POSITIONS[type]
|
|
14474
14486
|
);
|
|
14475
14487
|
const initialValueFromSubject = useFormContextPart(
|
|
14476
|
-
(value2) => getByPath(value2.originalSubject,
|
|
14488
|
+
(value2) => getByPath(value2.originalSubject, formItemId)
|
|
14477
14489
|
);
|
|
14478
14490
|
const initialValue = initialValueFromSubject === void 0 ? rest.initialValue : initialValueFromSubject;
|
|
14479
|
-
const value = useFormContextPart((value2) => getByPath(value2.subject,
|
|
14480
|
-
const validationResult = useFormContextPart((value2) => value2.validationResults[
|
|
14491
|
+
const value = useFormContextPart((value2) => getByPath(value2.subject, formItemId));
|
|
14492
|
+
const validationResult = useFormContextPart((value2) => value2.validationResults[formItemId]);
|
|
14481
14493
|
const dispatch = useFormContextPart((value2) => value2.dispatch);
|
|
14482
14494
|
const formEnabled = useFormContextPart((value2) => value2.enabled);
|
|
14483
14495
|
const isEnabled2 = enabled2 && formEnabled;
|
|
14484
14496
|
useEffect(() => {
|
|
14485
|
-
|
|
14497
|
+
const newId = bindTo || `${defaultId}${UNBOUND_FIELD_SUFFIX}`;
|
|
14498
|
+
setFormItemId(newId);
|
|
14499
|
+
dispatch(fieldInitialized(newId, initialValue));
|
|
14486
14500
|
}, [bindTo, dispatch, initialValue]);
|
|
14487
|
-
useValidation(validations, onValidate, value, dispatch,
|
|
14501
|
+
useValidation(validations, onValidate, value, dispatch, formItemId, customValidationsDebounce);
|
|
14488
14502
|
const onStateChange = useCallback(
|
|
14489
14503
|
({ value: value2 }, options2) => {
|
|
14490
14504
|
if (!(options2 == null ? void 0 : options2.initial)) {
|
|
14491
|
-
dispatch(fieldChanged(
|
|
14505
|
+
dispatch(fieldChanged(formItemId, value2));
|
|
14492
14506
|
}
|
|
14493
14507
|
},
|
|
14494
|
-
[
|
|
14508
|
+
[formItemId, dispatch]
|
|
14495
14509
|
);
|
|
14496
14510
|
useEffect(() => {
|
|
14497
14511
|
return () => {
|
|
14498
|
-
dispatch(fieldRemoved(
|
|
14512
|
+
dispatch(fieldRemoved(formItemId));
|
|
14499
14513
|
};
|
|
14500
|
-
}, [
|
|
14514
|
+
}, [formItemId, dispatch]);
|
|
14501
14515
|
const { validationStatus, isHelperTextShown } = useValidationDisplay(
|
|
14502
|
-
|
|
14516
|
+
formItemId,
|
|
14503
14517
|
value,
|
|
14504
14518
|
validationResult,
|
|
14505
14519
|
validationMode
|
|
@@ -14717,10 +14731,10 @@ memo(function FormItem2({
|
|
|
14717
14731
|
}
|
|
14718
14732
|
}
|
|
14719
14733
|
const onFocus = useEvent(() => {
|
|
14720
|
-
dispatch(fieldFocused(
|
|
14734
|
+
dispatch(fieldFocused(formItemId));
|
|
14721
14735
|
});
|
|
14722
14736
|
const onBlur = useEvent(() => {
|
|
14723
|
-
dispatch(fieldLostFocus(
|
|
14737
|
+
dispatch(fieldLostFocus(formItemId));
|
|
14724
14738
|
});
|
|
14725
14739
|
const [animateContainerRef] = useAutoAnimate({ duration: 100 });
|
|
14726
14740
|
return /* @__PURE__ */ jsx(
|
|
@@ -15305,7 +15319,7 @@ const themeVarsTfoot = `'{"backgroundColor-HtmlTfoot": "var(--xmlui-backgroundCo
|
|
|
15305
15319
|
const themeVarsTh = `'{"backgroundColor-HtmlTh": "var(--xmlui-backgroundColor-HtmlTh)", "textColor-HtmlTh": "var(--xmlui-textColor-HtmlTh)", "fontWeight-HtmlTh": "var(--xmlui-fontWeight-HtmlTh)", "fontSize-HtmlTh": "var(--xmlui-fontSize-HtmlTh)", "backgroundColor-HtmlTh--hover": "var(--xmlui-backgroundColor-HtmlTh--hover)", "border-HtmlTh": "var(--xmlui-border-HtmlTh)", "borderHorizontal-HtmlTh": "var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh))", "borderVertical-HtmlTh": "var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh))", "borderLeft-HtmlTh": "var(--xmlui-borderLeft-HtmlTh, var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderRight-HtmlTh": "var(--xmlui-borderRight-HtmlTh, var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderTop-HtmlTh": "var(--xmlui-borderTop-HtmlTh, var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderBottom-HtmlTh": "var(--xmlui-borderBottom-HtmlTh, var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderWidth-HtmlTh": "var(--xmlui-borderWidth-HtmlTh)", "borderHorizontalWidth-HtmlTh": "var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh))", "borderLeftWidth-HtmlTh": "var(--xmlui-borderLeftWidth-HtmlTh, var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderRightWidth-HtmlTh": "var(--xmlui-borderRightWidth-HtmlTh, var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderVerticalWidth-HtmlTh": "var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh))", "borderTopWidth-HtmlTh": "var(--xmlui-borderTopWidth-HtmlTh, var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderBottomWidth-HtmlTh": "var(--xmlui-borderBottomWidth-HtmlTh, var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderStyle-HtmlTh": "var(--xmlui-borderStyle-HtmlTh)", "borderHorizontalStyle-HtmlTh": "var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh))", "borderLeftStyle-HtmlTh": "var(--xmlui-borderLeftStyle-HtmlTh, var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderRightStyle-HtmlTh": "var(--xmlui-borderRightStyle-HtmlTh, var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderVerticalStyle-HtmlTh": "var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh))", "borderTopStyle-HtmlTh": "var(--xmlui-borderTopStyle-HtmlTh, var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderBottomStyle-HtmlTh": "var(--xmlui-borderBottomStyle-HtmlTh, var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderColor-HtmlTh": "var(--xmlui-borderColor-HtmlTh)", "borderHorizontalColor-HtmlTh": "var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh))", "borderLeftColor-HtmlTh": "var(--xmlui-borderLeftColor-HtmlTh, var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderRightColor-HtmlTh": "var(--xmlui-borderRightColor-HtmlTh, var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderVerticalColor-HtmlTh": "var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh))", "borderTopColor-HtmlTh": "var(--xmlui-borderTopColor-HtmlTh, var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderBottomColor-HtmlTh": "var(--xmlui-borderBottomColor-HtmlTh, var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderStartStartRadius-HtmlTh": "var(--xmlui-borderStartStartRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderStartEndRadius-HtmlTh": "var(--xmlui-borderStartEndRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderEndStartRadius-HtmlTh": "var(--xmlui-borderEndStartRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderEndEndRadius-HtmlTh": "var(--xmlui-borderEndEndRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "padding-HtmlTh": "var(--xmlui-padding-HtmlTh)", "paddingHorizontal-HtmlTh": "var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh))", "paddingVertical-HtmlTh": "var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh))", "paddingLeft-HtmlTh": "var(--xmlui-paddingLeft-HtmlTh, var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingRight-HtmlTh": "var(--xmlui-paddingRight-HtmlTh, var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingTop-HtmlTh": "var(--xmlui-paddingTop-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingBottom-HtmlTh": "var(--xmlui-paddingBottom-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)))"}'`;
|
|
15306
15320
|
const themeVarsTr = `'{"backgroundColor-HtmlTr": "var(--xmlui-backgroundColor-HtmlTr)", "backgroundColor-HtmlTr--hover": "var(--xmlui-backgroundColor-HtmlTr--hover)", "backgroundColor-even-HtmlTr": "var(--xmlui-backgroundColor-even-HtmlTr)", "textColor-HtmlTr": "var(--xmlui-textColor-HtmlTr)", "textColor-HtmlTr--hover": "var(--xmlui-textColor-HtmlTr--hover)", "fontSize-HtmlTr": "var(--xmlui-fontSize-HtmlTr)", "fontWeight-HtmlTr": "var(--xmlui-fontWeight-HtmlTr)", "border-HtmlTr": "var(--xmlui-border-HtmlTr)", "borderHorizontal-HtmlTr": "var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr))", "borderVertical-HtmlTr": "var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr))", "borderLeft-HtmlTr": "var(--xmlui-borderLeft-HtmlTr, var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderRight-HtmlTr": "var(--xmlui-borderRight-HtmlTr, var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderTop-HtmlTr": "var(--xmlui-borderTop-HtmlTr, var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderBottom-HtmlTr": "var(--xmlui-borderBottom-HtmlTr, var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderWidth-HtmlTr": "var(--xmlui-borderWidth-HtmlTr)", "borderHorizontalWidth-HtmlTr": "var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr))", "borderLeftWidth-HtmlTr": "var(--xmlui-borderLeftWidth-HtmlTr, var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderRightWidth-HtmlTr": "var(--xmlui-borderRightWidth-HtmlTr, var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderVerticalWidth-HtmlTr": "var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr))", "borderTopWidth-HtmlTr": "var(--xmlui-borderTopWidth-HtmlTr, var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderBottomWidth-HtmlTr": "var(--xmlui-borderBottomWidth-HtmlTr, var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderStyle-HtmlTr": "var(--xmlui-borderStyle-HtmlTr)", "borderHorizontalStyle-HtmlTr": "var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr))", "borderLeftStyle-HtmlTr": "var(--xmlui-borderLeftStyle-HtmlTr, var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderRightStyle-HtmlTr": "var(--xmlui-borderRightStyle-HtmlTr, var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderVerticalStyle-HtmlTr": "var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr))", "borderTopStyle-HtmlTr": "var(--xmlui-borderTopStyle-HtmlTr, var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderBottomStyle-HtmlTr": "var(--xmlui-borderBottomStyle-HtmlTr, var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderColor-HtmlTr": "var(--xmlui-borderColor-HtmlTr)", "borderHorizontalColor-HtmlTr": "var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr))", "borderLeftColor-HtmlTr": "var(--xmlui-borderLeftColor-HtmlTr, var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderRightColor-HtmlTr": "var(--xmlui-borderRightColor-HtmlTr, var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderVerticalColor-HtmlTr": "var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr))", "borderTopColor-HtmlTr": "var(--xmlui-borderTopColor-HtmlTr, var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderBottomColor-HtmlTr": "var(--xmlui-borderBottomColor-HtmlTr, var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderStartStartRadius-HtmlTr": "var(--xmlui-borderStartStartRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderStartEndRadius-HtmlTr": "var(--xmlui-borderStartEndRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderEndStartRadius-HtmlTr": "var(--xmlui-borderEndStartRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderEndEndRadius-HtmlTr": "var(--xmlui-borderEndEndRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))"}'`;
|
|
15307
15321
|
const themeVarsTd = `'{"backgroundColor-HtmlTd": "var(--xmlui-backgroundColor-HtmlTd)", "text-align-HtmlTd": "var(--xmlui-text-align-HtmlTd)", "verticalAlign-HtmlTd": "var(--xmlui-verticalAlign-HtmlTd)", "fontSize-HtmlTd": "var(--xmlui-fontSize-HtmlTd)", "fontWeight-HtmlTd": "var(--xmlui-fontWeight-HtmlTd)", "border-HtmlTd": "var(--xmlui-border-HtmlTd)", "borderHorizontal-HtmlTd": "var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd))", "borderVertical-HtmlTd": "var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd))", "borderLeft-HtmlTd": "var(--xmlui-borderLeft-HtmlTd, var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderRight-HtmlTd": "var(--xmlui-borderRight-HtmlTd, var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderTop-HtmlTd": "var(--xmlui-borderTop-HtmlTd, var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderBottom-HtmlTd": "var(--xmlui-borderBottom-HtmlTd, var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderWidth-HtmlTd": "var(--xmlui-borderWidth-HtmlTd)", "borderHorizontalWidth-HtmlTd": "var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd))", "borderLeftWidth-HtmlTd": "var(--xmlui-borderLeftWidth-HtmlTd, var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderRightWidth-HtmlTd": "var(--xmlui-borderRightWidth-HtmlTd, var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderVerticalWidth-HtmlTd": "var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd))", "borderTopWidth-HtmlTd": "var(--xmlui-borderTopWidth-HtmlTd, var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderBottomWidth-HtmlTd": "var(--xmlui-borderBottomWidth-HtmlTd, var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderStyle-HtmlTd": "var(--xmlui-borderStyle-HtmlTd)", "borderHorizontalStyle-HtmlTd": "var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd))", "borderLeftStyle-HtmlTd": "var(--xmlui-borderLeftStyle-HtmlTd, var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderRightStyle-HtmlTd": "var(--xmlui-borderRightStyle-HtmlTd, var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderVerticalStyle-HtmlTd": "var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd))", "borderTopStyle-HtmlTd": "var(--xmlui-borderTopStyle-HtmlTd, var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderBottomStyle-HtmlTd": "var(--xmlui-borderBottomStyle-HtmlTd, var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderColor-HtmlTd": "var(--xmlui-borderColor-HtmlTd)", "borderHorizontalColor-HtmlTd": "var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd))", "borderLeftColor-HtmlTd": "var(--xmlui-borderLeftColor-HtmlTd, var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderRightColor-HtmlTd": "var(--xmlui-borderRightColor-HtmlTd, var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderVerticalColor-HtmlTd": "var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd))", "borderTopColor-HtmlTd": "var(--xmlui-borderTopColor-HtmlTd, var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderBottomColor-HtmlTd": "var(--xmlui-borderBottomColor-HtmlTd, var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderStartStartRadius-HtmlTd": "var(--xmlui-borderStartStartRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderStartEndRadius-HtmlTd": "var(--xmlui-borderStartEndRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderEndStartRadius-HtmlTd": "var(--xmlui-borderEndStartRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderEndEndRadius-HtmlTd": "var(--xmlui-borderEndEndRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "padding-HtmlTd": "var(--xmlui-padding-HtmlTd)", "paddingHorizontal-HtmlTd": "var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd))", "paddingVertical-HtmlTd": "var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd))", "paddingLeft-HtmlTd": "var(--xmlui-paddingLeft-HtmlTd, var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingRight-HtmlTd": "var(--xmlui-paddingRight-HtmlTd, var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingTop-HtmlTd": "var(--xmlui-paddingTop-HtmlTd, var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingBottom-HtmlTd": "var(--xmlui-paddingBottom-HtmlTd, var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd)))"}'`;
|
|
15308
|
-
const themeVarsList = `'{"marginTop-HtmlOl": "var(--xmlui-marginTop-HtmlOl)", "marginBottom-HtmlOl": "var(--xmlui-marginBottom-HtmlOl)", "marginTop-HtmlUl": "var(--xmlui-marginTop-HtmlUl)", "marginBottom-HtmlUl": "var(--xmlui-marginBottom-HtmlUl)"}'`;
|
|
15322
|
+
const themeVarsList = `'{"marginTop-HtmlOl": "var(--xmlui-marginTop-HtmlOl)", "marginBottom-HtmlOl": "var(--xmlui-marginBottom-HtmlOl)", "marginTop-HtmlUl": "var(--xmlui-marginTop-HtmlUl)", "marginBottom-HtmlUl": "var(--xmlui-marginBottom-HtmlUl)", "marginTop-HtmlLi": "var(--xmlui-marginTop-HtmlLi)", "marginBottom-HtmlLi": "var(--xmlui-marginBottom-HtmlLi)"}'`;
|
|
15309
15323
|
const themeVarsHeading = `'{"marginTop-HtmlHeading": "var(--xmlui-marginTop-HtmlHeading)", "marginBottom-HtmlHeading": "var(--xmlui-marginBottom-HtmlHeading)"}'`;
|
|
15310
15324
|
const themeVarsVideo = `'{"marginTop-HtmlVideo": "var(--xmlui-marginTop-HtmlVideo)", "marginBottom-HtmlVideo": "var(--xmlui-marginBottom-HtmlVideo)"}'`;
|
|
15311
15325
|
const themeVarsDetails = `'{"marginTop-HtmlDetails": "var(--xmlui-marginTop-HtmlDetails)", "marginBottom-HtmlDetails": "var(--xmlui-marginBottom-HtmlDetails)"}'`;
|
|
@@ -15348,6 +15362,7 @@ const MarkdownMd = createMetadata({
|
|
|
15348
15362
|
"marginBottom-Blockquote": "1rem",
|
|
15349
15363
|
"marginBottom-Text-codefence": ".5rem",
|
|
15350
15364
|
"marginBottom-Text-markdown": ".5rem",
|
|
15365
|
+
"marginTop-HtmlLi": "-0.5rem",
|
|
15351
15366
|
light: {
|
|
15352
15367
|
// --- No light-specific theme vars
|
|
15353
15368
|
},
|
|
@@ -16158,9 +16173,13 @@ const SelectionStore = ({
|
|
|
16158
16173
|
const [items, setItems] = useState(selectedItems);
|
|
16159
16174
|
const valueInitializedRef = useRef(false);
|
|
16160
16175
|
const refreshSelection = useEvent((allItems = EMPTY_ARRAY) => {
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16176
|
+
const safeAllItems = allItems || EMPTY_ARRAY;
|
|
16177
|
+
const safeSelectedItems = selectedItems || EMPTY_ARRAY;
|
|
16178
|
+
setItems(safeAllItems);
|
|
16179
|
+
let value = safeAllItems.filter(
|
|
16180
|
+
(item) => !!safeSelectedItems.find((si) => si && item && si[idKey] === item[idKey])
|
|
16181
|
+
);
|
|
16182
|
+
if (!isEqual(safeSelectedItems, value) || !valueInitializedRef.current) {
|
|
16164
16183
|
valueInitializedRef.current = true;
|
|
16165
16184
|
updateState({
|
|
16166
16185
|
value
|
|
@@ -16168,7 +16187,8 @@ const SelectionStore = ({
|
|
|
16168
16187
|
}
|
|
16169
16188
|
});
|
|
16170
16189
|
const setSelectedRowIds = useEvent((rowIds) => {
|
|
16171
|
-
|
|
16190
|
+
const safeItems = items || EMPTY_ARRAY;
|
|
16191
|
+
updateState({ value: safeItems.filter((item) => rowIds.includes(item[idKey])) });
|
|
16172
16192
|
});
|
|
16173
16193
|
const clearSelection = useEvent(() => {
|
|
16174
16194
|
setSelectedRowIds(EMPTY_ARRAY);
|
|
@@ -16196,7 +16216,7 @@ function useSelectionContext() {
|
|
|
16196
16216
|
}
|
|
16197
16217
|
const COMP$s = "SelectionStore";
|
|
16198
16218
|
const SelectionStoreMd = createMetadata({
|
|
16199
|
-
status: "
|
|
16219
|
+
status: "experimental",
|
|
16200
16220
|
description: `The \`${COMP$s}\` is a non-visual component that may wrap components (items) and manage their selection state to accommodate the usage of other actions.`,
|
|
16201
16221
|
props: {
|
|
16202
16222
|
idKey: d(
|
|
@@ -5659,6 +5659,7 @@
|
|
|
5659
5659
|
wrapper: wrapper$1,
|
|
5660
5660
|
buttonRow
|
|
5661
5661
|
};
|
|
5662
|
+
const UNBOUND_FIELD_SUFFIX = "__UNBOUND_FIELD__";
|
|
5662
5663
|
var FormActionKind = /* @__PURE__ */ ((FormActionKind2) => {
|
|
5663
5664
|
FormActionKind2["FIELD_LOST_FOCUS"] = "FormActionKind:FIELD_LOST_FOCUS";
|
|
5664
5665
|
FormActionKind2["FIELD_VALUE_CHANGED"] = "FormActionKind:FIELD_VALUE_CHANGED";
|
|
@@ -5750,7 +5751,10 @@
|
|
|
5750
5751
|
}
|
|
5751
5752
|
};
|
|
5752
5753
|
}
|
|
5753
|
-
function backendValidationArrived({
|
|
5754
|
+
function backendValidationArrived({
|
|
5755
|
+
generalValidationResults = [],
|
|
5756
|
+
fieldValidationResults = {}
|
|
5757
|
+
}) {
|
|
5754
5758
|
return {
|
|
5755
5759
|
type: "FormActionKind:BACKEND_VALIDATION_ARRIVED",
|
|
5756
5760
|
payload: {
|
|
@@ -7118,7 +7122,13 @@
|
|
|
7118
7122
|
const prevFocused = document.activeElement;
|
|
7119
7123
|
dispatch(formSubmitting());
|
|
7120
7124
|
try {
|
|
7121
|
-
|
|
7125
|
+
const filteredSubject = Object.entries(formState.subject).reduce((acc, [key, value]) => {
|
|
7126
|
+
if (!key.endsWith(UNBOUND_FIELD_SUFFIX)) {
|
|
7127
|
+
acc[key] = value;
|
|
7128
|
+
}
|
|
7129
|
+
return acc;
|
|
7130
|
+
}, {});
|
|
7131
|
+
await (onSubmit == null ? void 0 : onSubmit(filteredSubject, {
|
|
7122
7132
|
passAsDefaultBody: true
|
|
7123
7133
|
}));
|
|
7124
7134
|
dispatch(formSubmitted());
|
|
@@ -14462,6 +14472,8 @@
|
|
|
14462
14472
|
inputRenderer,
|
|
14463
14473
|
...rest
|
|
14464
14474
|
}) {
|
|
14475
|
+
const defaultId = React.useId();
|
|
14476
|
+
const [formItemId, setFormItemId] = React.useState(bindTo);
|
|
14465
14477
|
const labelWidthValue = useFormContextPart((value2) => labelWidth || value2.itemLabelWidth);
|
|
14466
14478
|
const labelBreakValue = useFormContextPart(
|
|
14467
14479
|
(value2) => labelBreak2 !== void 0 ? labelBreak2 : value2.itemLabelBreak
|
|
@@ -14470,33 +14482,35 @@
|
|
|
14470
14482
|
(value2) => labelPosition || value2.itemLabelPosition || DEFAULT_LABEL_POSITIONS[type]
|
|
14471
14483
|
);
|
|
14472
14484
|
const initialValueFromSubject = useFormContextPart(
|
|
14473
|
-
(value2) => getByPath(value2.originalSubject,
|
|
14485
|
+
(value2) => getByPath(value2.originalSubject, formItemId)
|
|
14474
14486
|
);
|
|
14475
14487
|
const initialValue = initialValueFromSubject === void 0 ? rest.initialValue : initialValueFromSubject;
|
|
14476
|
-
const value = useFormContextPart((value2) => getByPath(value2.subject,
|
|
14477
|
-
const validationResult = useFormContextPart((value2) => value2.validationResults[
|
|
14488
|
+
const value = useFormContextPart((value2) => getByPath(value2.subject, formItemId));
|
|
14489
|
+
const validationResult = useFormContextPart((value2) => value2.validationResults[formItemId]);
|
|
14478
14490
|
const dispatch = useFormContextPart((value2) => value2.dispatch);
|
|
14479
14491
|
const formEnabled = useFormContextPart((value2) => value2.enabled);
|
|
14480
14492
|
const isEnabled2 = enabled2 && formEnabled;
|
|
14481
14493
|
React.useEffect(() => {
|
|
14482
|
-
|
|
14494
|
+
const newId = bindTo || `${defaultId}${UNBOUND_FIELD_SUFFIX}`;
|
|
14495
|
+
setFormItemId(newId);
|
|
14496
|
+
dispatch(fieldInitialized(newId, initialValue));
|
|
14483
14497
|
}, [bindTo, dispatch, initialValue]);
|
|
14484
|
-
useValidation(validations, onValidate, value, dispatch,
|
|
14498
|
+
useValidation(validations, onValidate, value, dispatch, formItemId, customValidationsDebounce);
|
|
14485
14499
|
const onStateChange = React.useCallback(
|
|
14486
14500
|
({ value: value2 }, options2) => {
|
|
14487
14501
|
if (!(options2 == null ? void 0 : options2.initial)) {
|
|
14488
|
-
dispatch(fieldChanged(
|
|
14502
|
+
dispatch(fieldChanged(formItemId, value2));
|
|
14489
14503
|
}
|
|
14490
14504
|
},
|
|
14491
|
-
[
|
|
14505
|
+
[formItemId, dispatch]
|
|
14492
14506
|
);
|
|
14493
14507
|
React.useEffect(() => {
|
|
14494
14508
|
return () => {
|
|
14495
|
-
dispatch(fieldRemoved(
|
|
14509
|
+
dispatch(fieldRemoved(formItemId));
|
|
14496
14510
|
};
|
|
14497
|
-
}, [
|
|
14511
|
+
}, [formItemId, dispatch]);
|
|
14498
14512
|
const { validationStatus, isHelperTextShown } = useValidationDisplay(
|
|
14499
|
-
|
|
14513
|
+
formItemId,
|
|
14500
14514
|
value,
|
|
14501
14515
|
validationResult,
|
|
14502
14516
|
validationMode
|
|
@@ -14714,10 +14728,10 @@
|
|
|
14714
14728
|
}
|
|
14715
14729
|
}
|
|
14716
14730
|
const onFocus = useEvent(() => {
|
|
14717
|
-
dispatch(fieldFocused(
|
|
14731
|
+
dispatch(fieldFocused(formItemId));
|
|
14718
14732
|
});
|
|
14719
14733
|
const onBlur = useEvent(() => {
|
|
14720
|
-
dispatch(fieldLostFocus(
|
|
14734
|
+
dispatch(fieldLostFocus(formItemId));
|
|
14721
14735
|
});
|
|
14722
14736
|
const [animateContainerRef] = useAutoAnimate({ duration: 100 });
|
|
14723
14737
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15302,7 +15316,7 @@
|
|
|
15302
15316
|
const themeVarsTh = `'{"backgroundColor-HtmlTh": "var(--xmlui-backgroundColor-HtmlTh)", "textColor-HtmlTh": "var(--xmlui-textColor-HtmlTh)", "fontWeight-HtmlTh": "var(--xmlui-fontWeight-HtmlTh)", "fontSize-HtmlTh": "var(--xmlui-fontSize-HtmlTh)", "backgroundColor-HtmlTh--hover": "var(--xmlui-backgroundColor-HtmlTh--hover)", "border-HtmlTh": "var(--xmlui-border-HtmlTh)", "borderHorizontal-HtmlTh": "var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh))", "borderVertical-HtmlTh": "var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh))", "borderLeft-HtmlTh": "var(--xmlui-borderLeft-HtmlTh, var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderRight-HtmlTh": "var(--xmlui-borderRight-HtmlTh, var(--xmlui-borderHorizontal-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderTop-HtmlTh": "var(--xmlui-borderTop-HtmlTh, var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderBottom-HtmlTh": "var(--xmlui-borderBottom-HtmlTh, var(--xmlui-borderVertical-HtmlTh, var(--xmlui-border-HtmlTh)))", "borderWidth-HtmlTh": "var(--xmlui-borderWidth-HtmlTh)", "borderHorizontalWidth-HtmlTh": "var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh))", "borderLeftWidth-HtmlTh": "var(--xmlui-borderLeftWidth-HtmlTh, var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderRightWidth-HtmlTh": "var(--xmlui-borderRightWidth-HtmlTh, var(--xmlui-borderHorizontalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderVerticalWidth-HtmlTh": "var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh))", "borderTopWidth-HtmlTh": "var(--xmlui-borderTopWidth-HtmlTh, var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderBottomWidth-HtmlTh": "var(--xmlui-borderBottomWidth-HtmlTh, var(--xmlui-borderVerticalWidth-HtmlTh, var(--xmlui-borderWidth-HtmlTh)))", "borderStyle-HtmlTh": "var(--xmlui-borderStyle-HtmlTh)", "borderHorizontalStyle-HtmlTh": "var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh))", "borderLeftStyle-HtmlTh": "var(--xmlui-borderLeftStyle-HtmlTh, var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderRightStyle-HtmlTh": "var(--xmlui-borderRightStyle-HtmlTh, var(--xmlui-borderHorizontalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderVerticalStyle-HtmlTh": "var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh))", "borderTopStyle-HtmlTh": "var(--xmlui-borderTopStyle-HtmlTh, var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderBottomStyle-HtmlTh": "var(--xmlui-borderBottomStyle-HtmlTh, var(--xmlui-borderVerticalStyle-HtmlTh, var(--xmlui-borderStyle-HtmlTh)))", "borderColor-HtmlTh": "var(--xmlui-borderColor-HtmlTh)", "borderHorizontalColor-HtmlTh": "var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh))", "borderLeftColor-HtmlTh": "var(--xmlui-borderLeftColor-HtmlTh, var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderRightColor-HtmlTh": "var(--xmlui-borderRightColor-HtmlTh, var(--xmlui-borderHorizontalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderVerticalColor-HtmlTh": "var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh))", "borderTopColor-HtmlTh": "var(--xmlui-borderTopColor-HtmlTh, var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderBottomColor-HtmlTh": "var(--xmlui-borderBottomColor-HtmlTh, var(--xmlui-borderVerticalColor-HtmlTh, var(--xmlui-borderColor-HtmlTh)))", "borderStartStartRadius-HtmlTh": "var(--xmlui-borderStartStartRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderStartEndRadius-HtmlTh": "var(--xmlui-borderStartEndRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderEndStartRadius-HtmlTh": "var(--xmlui-borderEndStartRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "borderEndEndRadius-HtmlTh": "var(--xmlui-borderEndEndRadius-HtmlTh, var(--xmlui-borderRadius-HtmlTh))", "padding-HtmlTh": "var(--xmlui-padding-HtmlTh)", "paddingHorizontal-HtmlTh": "var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh))", "paddingVertical-HtmlTh": "var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh))", "paddingLeft-HtmlTh": "var(--xmlui-paddingLeft-HtmlTh, var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingRight-HtmlTh": "var(--xmlui-paddingRight-HtmlTh, var(--xmlui-paddingHorizontal-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingTop-HtmlTh": "var(--xmlui-paddingTop-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)))", "paddingBottom-HtmlTh": "var(--xmlui-paddingBottom-HtmlTh, var(--xmlui-paddingVertical-HtmlTh, var(--xmlui-padding-HtmlTh)))"}'`;
|
|
15303
15317
|
const themeVarsTr = `'{"backgroundColor-HtmlTr": "var(--xmlui-backgroundColor-HtmlTr)", "backgroundColor-HtmlTr--hover": "var(--xmlui-backgroundColor-HtmlTr--hover)", "backgroundColor-even-HtmlTr": "var(--xmlui-backgroundColor-even-HtmlTr)", "textColor-HtmlTr": "var(--xmlui-textColor-HtmlTr)", "textColor-HtmlTr--hover": "var(--xmlui-textColor-HtmlTr--hover)", "fontSize-HtmlTr": "var(--xmlui-fontSize-HtmlTr)", "fontWeight-HtmlTr": "var(--xmlui-fontWeight-HtmlTr)", "border-HtmlTr": "var(--xmlui-border-HtmlTr)", "borderHorizontal-HtmlTr": "var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr))", "borderVertical-HtmlTr": "var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr))", "borderLeft-HtmlTr": "var(--xmlui-borderLeft-HtmlTr, var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderRight-HtmlTr": "var(--xmlui-borderRight-HtmlTr, var(--xmlui-borderHorizontal-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderTop-HtmlTr": "var(--xmlui-borderTop-HtmlTr, var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderBottom-HtmlTr": "var(--xmlui-borderBottom-HtmlTr, var(--xmlui-borderVertical-HtmlTr, var(--xmlui-border-HtmlTr)))", "borderWidth-HtmlTr": "var(--xmlui-borderWidth-HtmlTr)", "borderHorizontalWidth-HtmlTr": "var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr))", "borderLeftWidth-HtmlTr": "var(--xmlui-borderLeftWidth-HtmlTr, var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderRightWidth-HtmlTr": "var(--xmlui-borderRightWidth-HtmlTr, var(--xmlui-borderHorizontalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderVerticalWidth-HtmlTr": "var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr))", "borderTopWidth-HtmlTr": "var(--xmlui-borderTopWidth-HtmlTr, var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderBottomWidth-HtmlTr": "var(--xmlui-borderBottomWidth-HtmlTr, var(--xmlui-borderVerticalWidth-HtmlTr, var(--xmlui-borderWidth-HtmlTr)))", "borderStyle-HtmlTr": "var(--xmlui-borderStyle-HtmlTr)", "borderHorizontalStyle-HtmlTr": "var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr))", "borderLeftStyle-HtmlTr": "var(--xmlui-borderLeftStyle-HtmlTr, var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderRightStyle-HtmlTr": "var(--xmlui-borderRightStyle-HtmlTr, var(--xmlui-borderHorizontalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderVerticalStyle-HtmlTr": "var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr))", "borderTopStyle-HtmlTr": "var(--xmlui-borderTopStyle-HtmlTr, var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderBottomStyle-HtmlTr": "var(--xmlui-borderBottomStyle-HtmlTr, var(--xmlui-borderVerticalStyle-HtmlTr, var(--xmlui-borderStyle-HtmlTr)))", "borderColor-HtmlTr": "var(--xmlui-borderColor-HtmlTr)", "borderHorizontalColor-HtmlTr": "var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr))", "borderLeftColor-HtmlTr": "var(--xmlui-borderLeftColor-HtmlTr, var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderRightColor-HtmlTr": "var(--xmlui-borderRightColor-HtmlTr, var(--xmlui-borderHorizontalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderVerticalColor-HtmlTr": "var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr))", "borderTopColor-HtmlTr": "var(--xmlui-borderTopColor-HtmlTr, var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderBottomColor-HtmlTr": "var(--xmlui-borderBottomColor-HtmlTr, var(--xmlui-borderVerticalColor-HtmlTr, var(--xmlui-borderColor-HtmlTr)))", "borderStartStartRadius-HtmlTr": "var(--xmlui-borderStartStartRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderStartEndRadius-HtmlTr": "var(--xmlui-borderStartEndRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderEndStartRadius-HtmlTr": "var(--xmlui-borderEndStartRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))", "borderEndEndRadius-HtmlTr": "var(--xmlui-borderEndEndRadius-HtmlTr, var(--xmlui-borderRadius-HtmlTr))"}'`;
|
|
15304
15318
|
const themeVarsTd = `'{"backgroundColor-HtmlTd": "var(--xmlui-backgroundColor-HtmlTd)", "text-align-HtmlTd": "var(--xmlui-text-align-HtmlTd)", "verticalAlign-HtmlTd": "var(--xmlui-verticalAlign-HtmlTd)", "fontSize-HtmlTd": "var(--xmlui-fontSize-HtmlTd)", "fontWeight-HtmlTd": "var(--xmlui-fontWeight-HtmlTd)", "border-HtmlTd": "var(--xmlui-border-HtmlTd)", "borderHorizontal-HtmlTd": "var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd))", "borderVertical-HtmlTd": "var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd))", "borderLeft-HtmlTd": "var(--xmlui-borderLeft-HtmlTd, var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderRight-HtmlTd": "var(--xmlui-borderRight-HtmlTd, var(--xmlui-borderHorizontal-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderTop-HtmlTd": "var(--xmlui-borderTop-HtmlTd, var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderBottom-HtmlTd": "var(--xmlui-borderBottom-HtmlTd, var(--xmlui-borderVertical-HtmlTd, var(--xmlui-border-HtmlTd)))", "borderWidth-HtmlTd": "var(--xmlui-borderWidth-HtmlTd)", "borderHorizontalWidth-HtmlTd": "var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd))", "borderLeftWidth-HtmlTd": "var(--xmlui-borderLeftWidth-HtmlTd, var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderRightWidth-HtmlTd": "var(--xmlui-borderRightWidth-HtmlTd, var(--xmlui-borderHorizontalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderVerticalWidth-HtmlTd": "var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd))", "borderTopWidth-HtmlTd": "var(--xmlui-borderTopWidth-HtmlTd, var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderBottomWidth-HtmlTd": "var(--xmlui-borderBottomWidth-HtmlTd, var(--xmlui-borderVerticalWidth-HtmlTd, var(--xmlui-borderWidth-HtmlTd)))", "borderStyle-HtmlTd": "var(--xmlui-borderStyle-HtmlTd)", "borderHorizontalStyle-HtmlTd": "var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd))", "borderLeftStyle-HtmlTd": "var(--xmlui-borderLeftStyle-HtmlTd, var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderRightStyle-HtmlTd": "var(--xmlui-borderRightStyle-HtmlTd, var(--xmlui-borderHorizontalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderVerticalStyle-HtmlTd": "var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd))", "borderTopStyle-HtmlTd": "var(--xmlui-borderTopStyle-HtmlTd, var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderBottomStyle-HtmlTd": "var(--xmlui-borderBottomStyle-HtmlTd, var(--xmlui-borderVerticalStyle-HtmlTd, var(--xmlui-borderStyle-HtmlTd)))", "borderColor-HtmlTd": "var(--xmlui-borderColor-HtmlTd)", "borderHorizontalColor-HtmlTd": "var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd))", "borderLeftColor-HtmlTd": "var(--xmlui-borderLeftColor-HtmlTd, var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderRightColor-HtmlTd": "var(--xmlui-borderRightColor-HtmlTd, var(--xmlui-borderHorizontalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderVerticalColor-HtmlTd": "var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd))", "borderTopColor-HtmlTd": "var(--xmlui-borderTopColor-HtmlTd, var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderBottomColor-HtmlTd": "var(--xmlui-borderBottomColor-HtmlTd, var(--xmlui-borderVerticalColor-HtmlTd, var(--xmlui-borderColor-HtmlTd)))", "borderStartStartRadius-HtmlTd": "var(--xmlui-borderStartStartRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderStartEndRadius-HtmlTd": "var(--xmlui-borderStartEndRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderEndStartRadius-HtmlTd": "var(--xmlui-borderEndStartRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "borderEndEndRadius-HtmlTd": "var(--xmlui-borderEndEndRadius-HtmlTd, var(--xmlui-borderRadius-HtmlTd))", "padding-HtmlTd": "var(--xmlui-padding-HtmlTd)", "paddingHorizontal-HtmlTd": "var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd))", "paddingVertical-HtmlTd": "var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd))", "paddingLeft-HtmlTd": "var(--xmlui-paddingLeft-HtmlTd, var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingRight-HtmlTd": "var(--xmlui-paddingRight-HtmlTd, var(--xmlui-paddingHorizontal-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingTop-HtmlTd": "var(--xmlui-paddingTop-HtmlTd, var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd)))", "paddingBottom-HtmlTd": "var(--xmlui-paddingBottom-HtmlTd, var(--xmlui-paddingVertical-HtmlTd, var(--xmlui-padding-HtmlTd)))"}'`;
|
|
15305
|
-
const themeVarsList = `'{"marginTop-HtmlOl": "var(--xmlui-marginTop-HtmlOl)", "marginBottom-HtmlOl": "var(--xmlui-marginBottom-HtmlOl)", "marginTop-HtmlUl": "var(--xmlui-marginTop-HtmlUl)", "marginBottom-HtmlUl": "var(--xmlui-marginBottom-HtmlUl)"}'`;
|
|
15319
|
+
const themeVarsList = `'{"marginTop-HtmlOl": "var(--xmlui-marginTop-HtmlOl)", "marginBottom-HtmlOl": "var(--xmlui-marginBottom-HtmlOl)", "marginTop-HtmlUl": "var(--xmlui-marginTop-HtmlUl)", "marginBottom-HtmlUl": "var(--xmlui-marginBottom-HtmlUl)", "marginTop-HtmlLi": "var(--xmlui-marginTop-HtmlLi)", "marginBottom-HtmlLi": "var(--xmlui-marginBottom-HtmlLi)"}'`;
|
|
15306
15320
|
const themeVarsHeading = `'{"marginTop-HtmlHeading": "var(--xmlui-marginTop-HtmlHeading)", "marginBottom-HtmlHeading": "var(--xmlui-marginBottom-HtmlHeading)"}'`;
|
|
15307
15321
|
const themeVarsVideo = `'{"marginTop-HtmlVideo": "var(--xmlui-marginTop-HtmlVideo)", "marginBottom-HtmlVideo": "var(--xmlui-marginBottom-HtmlVideo)"}'`;
|
|
15308
15322
|
const themeVarsDetails = `'{"marginTop-HtmlDetails": "var(--xmlui-marginTop-HtmlDetails)", "marginBottom-HtmlDetails": "var(--xmlui-marginBottom-HtmlDetails)"}'`;
|
|
@@ -15345,6 +15359,7 @@
|
|
|
15345
15359
|
"marginBottom-Blockquote": "1rem",
|
|
15346
15360
|
"marginBottom-Text-codefence": ".5rem",
|
|
15347
15361
|
"marginBottom-Text-markdown": ".5rem",
|
|
15362
|
+
"marginTop-HtmlLi": "-0.5rem",
|
|
15348
15363
|
light: {
|
|
15349
15364
|
// --- No light-specific theme vars
|
|
15350
15365
|
},
|
|
@@ -16155,9 +16170,13 @@
|
|
|
16155
16170
|
const [items, setItems] = React.useState(selectedItems);
|
|
16156
16171
|
const valueInitializedRef = React.useRef(false);
|
|
16157
16172
|
const refreshSelection = useEvent((allItems = EMPTY_ARRAY) => {
|
|
16158
|
-
|
|
16159
|
-
|
|
16160
|
-
|
|
16173
|
+
const safeAllItems = allItems || EMPTY_ARRAY;
|
|
16174
|
+
const safeSelectedItems = selectedItems || EMPTY_ARRAY;
|
|
16175
|
+
setItems(safeAllItems);
|
|
16176
|
+
let value = safeAllItems.filter(
|
|
16177
|
+
(item) => !!safeSelectedItems.find((si) => si && item && si[idKey] === item[idKey])
|
|
16178
|
+
);
|
|
16179
|
+
if (!lodashEs.isEqual(safeSelectedItems, value) || !valueInitializedRef.current) {
|
|
16161
16180
|
valueInitializedRef.current = true;
|
|
16162
16181
|
updateState({
|
|
16163
16182
|
value
|
|
@@ -16165,7 +16184,8 @@
|
|
|
16165
16184
|
}
|
|
16166
16185
|
});
|
|
16167
16186
|
const setSelectedRowIds = useEvent((rowIds) => {
|
|
16168
|
-
|
|
16187
|
+
const safeItems = items || EMPTY_ARRAY;
|
|
16188
|
+
updateState({ value: safeItems.filter((item) => rowIds.includes(item[idKey])) });
|
|
16169
16189
|
});
|
|
16170
16190
|
const clearSelection = useEvent(() => {
|
|
16171
16191
|
setSelectedRowIds(EMPTY_ARRAY);
|
|
@@ -16193,7 +16213,7 @@
|
|
|
16193
16213
|
}
|
|
16194
16214
|
const COMP$s = "SelectionStore";
|
|
16195
16215
|
const SelectionStoreMd = createMetadata({
|
|
16196
|
-
status: "
|
|
16216
|
+
status: "experimental",
|
|
16197
16217
|
description: `The \`${COMP$s}\` is a non-visual component that may wrap components (items) and manage their selection state to accommodate the usage of other actions.`,
|
|
16198
16218
|
props: {
|
|
16199
16219
|
idKey: d(
|