fluentui-extended 2026.2.11 → 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 +64 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -478,10 +478,8 @@ var Lookup = ({
|
|
|
478
478
|
{
|
|
479
479
|
open: isOpen && !disabled,
|
|
480
480
|
onOpenChange: (_e, data) => {
|
|
481
|
-
if (
|
|
482
|
-
setIsOpen(
|
|
483
|
-
setSearchText("");
|
|
484
|
-
setHighlightedIndex(-1);
|
|
481
|
+
if (data.open && !disabled) {
|
|
482
|
+
setIsOpen(true);
|
|
485
483
|
}
|
|
486
484
|
},
|
|
487
485
|
trapFocus: false,
|
|
@@ -1826,7 +1824,14 @@ var getOperatorByValue = (value) => {
|
|
|
1826
1824
|
return ALL_OPERATORS[value];
|
|
1827
1825
|
};
|
|
1828
1826
|
var operatorRequiresValue = (operator) => {
|
|
1829
|
-
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];
|
|
1830
1835
|
return def?.requiresValue ?? true;
|
|
1831
1836
|
};
|
|
1832
1837
|
|
|
@@ -1955,8 +1960,7 @@ var quoteODataValue = (val, field) => {
|
|
|
1955
1960
|
if (field.dataType === "optionset") return String(parseInt(val, 10) || 0);
|
|
1956
1961
|
if (field.dataType === "boolean") return val === true || val === "true" || val === 1 || val === "1" ? "true" : "false";
|
|
1957
1962
|
if (isLookup) {
|
|
1958
|
-
|
|
1959
|
-
return guidVal ? `'${guidVal}'` : "''";
|
|
1963
|
+
return String(val ?? "");
|
|
1960
1964
|
}
|
|
1961
1965
|
if (field.dataType === "datetime") {
|
|
1962
1966
|
const dateVal = String(val ?? "");
|
|
@@ -2265,13 +2269,8 @@ var parseFetchXmlToState = (xml, fields) => {
|
|
|
2265
2269
|
return { state: null, error: `XML parsing error: ${errorText.slice(0, 200)}` };
|
|
2266
2270
|
}
|
|
2267
2271
|
const groups = [];
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
return { state: null, error: "No <entity> element found in the FetchXML." };
|
|
2271
|
-
}
|
|
2272
|
-
const filterElements = entityEl.querySelectorAll(":scope > filter");
|
|
2273
|
-
const topLevelConditions = [];
|
|
2274
|
-
filterElements.forEach((filterEl, idx) => {
|
|
2272
|
+
let groupCounter = 0;
|
|
2273
|
+
const processFilterElement = (filterEl) => {
|
|
2275
2274
|
const logic = (filterEl.getAttribute("type") || "and").toLowerCase();
|
|
2276
2275
|
const conditions = [];
|
|
2277
2276
|
filterEl.querySelectorAll(":scope > condition").forEach((condEl) => {
|
|
@@ -2279,36 +2278,67 @@ var parseFetchXmlToState = (xml, fields) => {
|
|
|
2279
2278
|
});
|
|
2280
2279
|
if (conditions.length > 0) {
|
|
2281
2280
|
groups.push({
|
|
2282
|
-
id: `grp_${Date.now()}_${
|
|
2281
|
+
id: `grp_${Date.now()}_${groupCounter++}`,
|
|
2283
2282
|
logic,
|
|
2284
2283
|
conditions
|
|
2285
2284
|
});
|
|
2286
2285
|
}
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
entityConditions.forEach((condEl) => {
|
|
2291
|
-
topLevelConditions.push(parseConditionElement(condEl, fields));
|
|
2286
|
+
const nestedFilters = filterEl.querySelectorAll(":scope > filter");
|
|
2287
|
+
nestedFilters.forEach((nestedFilterEl) => {
|
|
2288
|
+
processFilterElement(nestedFilterEl);
|
|
2292
2289
|
});
|
|
2293
|
-
if (
|
|
2290
|
+
if (conditions.length === 0 && nestedFilters.length === 0) {
|
|
2291
|
+
const defaultFieldId = fields.length > 0 ? fields[0].id : "name";
|
|
2294
2292
|
groups.push({
|
|
2295
|
-
id: `grp_${Date.now()}
|
|
2296
|
-
logic
|
|
2297
|
-
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
|
+
}]
|
|
2298
2302
|
});
|
|
2299
2303
|
}
|
|
2300
|
-
}
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
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));
|
|
2309
2316
|
});
|
|
2317
|
+
if (topLevelConditions.length > 0) {
|
|
2318
|
+
groups.push({
|
|
2319
|
+
id: `grp_${Date.now()}_0`,
|
|
2320
|
+
logic: "and",
|
|
2321
|
+
conditions: topLevelConditions
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2310
2324
|
}
|
|
2311
|
-
|
|
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
|
+
}
|
|
2312
2342
|
if (groups.length === 0) {
|
|
2313
2343
|
return {
|
|
2314
2344
|
state: null,
|