fluentui-extended 2026.2.10 → 2026.2.12
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/index.js +69 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -477,6 +477,11 @@ var Lookup = ({
|
|
|
477
477
|
reactComponents.Popover,
|
|
478
478
|
{
|
|
479
479
|
open: isOpen && !disabled,
|
|
480
|
+
onOpenChange: (_e, data) => {
|
|
481
|
+
if (data.open && !disabled) {
|
|
482
|
+
setIsOpen(true);
|
|
483
|
+
}
|
|
484
|
+
},
|
|
480
485
|
trapFocus: false,
|
|
481
486
|
withArrow: false,
|
|
482
487
|
positioning: "below-start"
|
|
@@ -551,8 +556,8 @@ var Lookup = ({
|
|
|
551
556
|
id: `${lookupId}-option-${option.key}`,
|
|
552
557
|
role: "option",
|
|
553
558
|
"data-index": index,
|
|
554
|
-
"aria-selected": option.key === selectedOption?.key,
|
|
555
|
-
"aria-disabled": option.disabled,
|
|
559
|
+
"aria-selected": option.key === selectedOption?.key ? "true" : "false",
|
|
560
|
+
"aria-disabled": option.disabled ? "true" : void 0,
|
|
556
561
|
className: reactComponents.mergeClasses(
|
|
557
562
|
styles.option,
|
|
558
563
|
index === highlightedIndex && styles.optionHighlighted,
|
|
@@ -1819,7 +1824,14 @@ var getOperatorByValue = (value) => {
|
|
|
1819
1824
|
return ALL_OPERATORS[value];
|
|
1820
1825
|
};
|
|
1821
1826
|
var operatorRequiresValue = (operator) => {
|
|
1822
|
-
const
|
|
1827
|
+
const legacyAliases = {
|
|
1828
|
+
"notnull": "not-null",
|
|
1829
|
+
"startswith": "begins-with",
|
|
1830
|
+
"endswith": "ends-with",
|
|
1831
|
+
"notcontains": "not-contain"
|
|
1832
|
+
};
|
|
1833
|
+
const normalized = legacyAliases[operator] || operator;
|
|
1834
|
+
const def = ALL_OPERATORS[normalized];
|
|
1823
1835
|
return def?.requiresValue ?? true;
|
|
1824
1836
|
};
|
|
1825
1837
|
|
|
@@ -1948,8 +1960,7 @@ var quoteODataValue = (val, field) => {
|
|
|
1948
1960
|
if (field.dataType === "optionset") return String(parseInt(val, 10) || 0);
|
|
1949
1961
|
if (field.dataType === "boolean") return val === true || val === "true" || val === 1 || val === "1" ? "true" : "false";
|
|
1950
1962
|
if (isLookup) {
|
|
1951
|
-
|
|
1952
|
-
return guidVal ? `'${guidVal}'` : "''";
|
|
1963
|
+
return String(val ?? "");
|
|
1953
1964
|
}
|
|
1954
1965
|
if (field.dataType === "datetime") {
|
|
1955
1966
|
const dateVal = String(val ?? "");
|
|
@@ -2258,13 +2269,8 @@ var parseFetchXmlToState = (xml, fields) => {
|
|
|
2258
2269
|
return { state: null, error: `XML parsing error: ${errorText.slice(0, 200)}` };
|
|
2259
2270
|
}
|
|
2260
2271
|
const groups = [];
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
return { state: null, error: "No <entity> element found in the FetchXML." };
|
|
2264
|
-
}
|
|
2265
|
-
const filterElements = entityEl.querySelectorAll(":scope > filter");
|
|
2266
|
-
const topLevelConditions = [];
|
|
2267
|
-
filterElements.forEach((filterEl, idx) => {
|
|
2272
|
+
let groupCounter = 0;
|
|
2273
|
+
const processFilterElement = (filterEl) => {
|
|
2268
2274
|
const logic = (filterEl.getAttribute("type") || "and").toLowerCase();
|
|
2269
2275
|
const conditions = [];
|
|
2270
2276
|
filterEl.querySelectorAll(":scope > condition").forEach((condEl) => {
|
|
@@ -2272,36 +2278,67 @@ var parseFetchXmlToState = (xml, fields) => {
|
|
|
2272
2278
|
});
|
|
2273
2279
|
if (conditions.length > 0) {
|
|
2274
2280
|
groups.push({
|
|
2275
|
-
id: `grp_${Date.now()}_${
|
|
2281
|
+
id: `grp_${Date.now()}_${groupCounter++}`,
|
|
2276
2282
|
logic,
|
|
2277
2283
|
conditions
|
|
2278
2284
|
});
|
|
2279
2285
|
}
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
entityConditions.forEach((condEl) => {
|
|
2284
|
-
topLevelConditions.push(parseConditionElement(condEl, fields));
|
|
2286
|
+
const nestedFilters = filterEl.querySelectorAll(":scope > filter");
|
|
2287
|
+
nestedFilters.forEach((nestedFilterEl) => {
|
|
2288
|
+
processFilterElement(nestedFilterEl);
|
|
2285
2289
|
});
|
|
2286
|
-
if (
|
|
2290
|
+
if (conditions.length === 0 && nestedFilters.length === 0) {
|
|
2291
|
+
const defaultFieldId = fields.length > 0 ? fields[0].id : "name";
|
|
2287
2292
|
groups.push({
|
|
2288
|
-
id: `grp_${Date.now()}
|
|
2289
|
-
logic
|
|
2290
|
-
conditions:
|
|
2293
|
+
id: `grp_${Date.now()}_${groupCounter++}`,
|
|
2294
|
+
logic,
|
|
2295
|
+
conditions: [{
|
|
2296
|
+
id: `cond_${Date.now()}_default`,
|
|
2297
|
+
kind: "field",
|
|
2298
|
+
fieldId: defaultFieldId,
|
|
2299
|
+
operator: "eq",
|
|
2300
|
+
value: ""
|
|
2301
|
+
}]
|
|
2291
2302
|
});
|
|
2292
2303
|
}
|
|
2293
|
-
}
|
|
2294
|
-
const
|
|
2295
|
-
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2304
|
+
};
|
|
2305
|
+
const entityEl = doc.querySelector("fetch > entity, entity");
|
|
2306
|
+
if (entityEl) {
|
|
2307
|
+
const filterElements = entityEl.querySelectorAll(":scope > filter");
|
|
2308
|
+
const topLevelConditions = [];
|
|
2309
|
+
filterElements.forEach((filterEl) => {
|
|
2310
|
+
processFilterElement(filterEl);
|
|
2311
|
+
});
|
|
2312
|
+
if (filterElements.length === 0) {
|
|
2313
|
+
const entityConditions = entityEl.querySelectorAll(":scope > condition");
|
|
2314
|
+
entityConditions.forEach((condEl) => {
|
|
2315
|
+
topLevelConditions.push(parseConditionElement(condEl, fields));
|
|
2302
2316
|
});
|
|
2317
|
+
if (topLevelConditions.length > 0) {
|
|
2318
|
+
groups.push({
|
|
2319
|
+
id: `grp_${Date.now()}_0`,
|
|
2320
|
+
logic: "and",
|
|
2321
|
+
conditions: topLevelConditions
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2303
2324
|
}
|
|
2304
|
-
|
|
2325
|
+
const linkEntities = entityEl.querySelectorAll(":scope > link-entity");
|
|
2326
|
+
linkEntities.forEach((linkEl, idx) => {
|
|
2327
|
+
const relatedEntityCondition = parseLinkEntity(linkEl, fields);
|
|
2328
|
+
if (relatedEntityCondition) {
|
|
2329
|
+
groups.push({
|
|
2330
|
+
id: `grp_${Date.now()}_link_${idx}`,
|
|
2331
|
+
logic: "and",
|
|
2332
|
+
conditions: [relatedEntityCondition]
|
|
2333
|
+
});
|
|
2334
|
+
}
|
|
2335
|
+
});
|
|
2336
|
+
} else {
|
|
2337
|
+
const filterElements = doc.querySelectorAll("filter");
|
|
2338
|
+
filterElements.forEach((filterEl) => {
|
|
2339
|
+
processFilterElement(filterEl);
|
|
2340
|
+
});
|
|
2341
|
+
}
|
|
2305
2342
|
if (groups.length === 0) {
|
|
2306
2343
|
return {
|
|
2307
2344
|
state: null,
|