@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260609124852 → 0.8.1-dev.20260610051103
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 +16 -1
- package/dist/index.mjs +16 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6075,6 +6075,21 @@ var DataList = (props) => {
|
|
|
6075
6075
|
}
|
|
6076
6076
|
}
|
|
6077
6077
|
}, [props.dataset]);
|
|
6078
|
+
(0, import_react55.useEffect)(() => {
|
|
6079
|
+
if (!props.query?.["$filter"] || !props.filters) return;
|
|
6080
|
+
const filterQuery = props.query["$filter"];
|
|
6081
|
+
props.filters.forEach((filter) => {
|
|
6082
|
+
const regex = new RegExp(`${filter.name}\\s+eq\\s+'?([^']+)'?`);
|
|
6083
|
+
const match = filterQuery.match(regex);
|
|
6084
|
+
if (match) {
|
|
6085
|
+
dispatch({
|
|
6086
|
+
type: FORM_INPUT_UPDATE,
|
|
6087
|
+
name: filter.name,
|
|
6088
|
+
value: match[1]
|
|
6089
|
+
});
|
|
6090
|
+
}
|
|
6091
|
+
});
|
|
6092
|
+
}, [props.query, props.filters]);
|
|
6078
6093
|
function getNestedProperty2(obj, path) {
|
|
6079
6094
|
if (path.includes(".")) {
|
|
6080
6095
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
@@ -6099,7 +6114,7 @@ var DataList = (props) => {
|
|
|
6099
6114
|
console.log("ddddaaa", updatedValues.value);
|
|
6100
6115
|
let builder2 = new OdataBuilder(props.path);
|
|
6101
6116
|
builder2 = builder2.setQuery(props.query);
|
|
6102
|
-
if (updatedValues.value != "") {
|
|
6117
|
+
if (updatedValues.value != "" && updatedValues.value != null) {
|
|
6103
6118
|
const filter = props.filters?.find((x) => x.name == updatedValues.name);
|
|
6104
6119
|
if (filter?.dataTypeCode == "number") {
|
|
6105
6120
|
router.push(
|
package/dist/index.mjs
CHANGED
|
@@ -4463,6 +4463,21 @@ var DataList = (props) => {
|
|
|
4463
4463
|
}
|
|
4464
4464
|
}
|
|
4465
4465
|
}, [props.dataset]);
|
|
4466
|
+
useEffect10(() => {
|
|
4467
|
+
if (!props.query?.["$filter"] || !props.filters) return;
|
|
4468
|
+
const filterQuery = props.query["$filter"];
|
|
4469
|
+
props.filters.forEach((filter) => {
|
|
4470
|
+
const regex = new RegExp(`${filter.name}\\s+eq\\s+'?([^']+)'?`);
|
|
4471
|
+
const match = filterQuery.match(regex);
|
|
4472
|
+
if (match) {
|
|
4473
|
+
dispatch({
|
|
4474
|
+
type: FORM_INPUT_UPDATE,
|
|
4475
|
+
name: filter.name,
|
|
4476
|
+
value: match[1]
|
|
4477
|
+
});
|
|
4478
|
+
}
|
|
4479
|
+
});
|
|
4480
|
+
}, [props.query, props.filters]);
|
|
4466
4481
|
function getNestedProperty2(obj, path) {
|
|
4467
4482
|
if (path.includes(".")) {
|
|
4468
4483
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
@@ -4487,7 +4502,7 @@ var DataList = (props) => {
|
|
|
4487
4502
|
console.log("ddddaaa", updatedValues.value);
|
|
4488
4503
|
let builder2 = new OdataBuilder(props.path);
|
|
4489
4504
|
builder2 = builder2.setQuery(props.query);
|
|
4490
|
-
if (updatedValues.value != "") {
|
|
4505
|
+
if (updatedValues.value != "" && updatedValues.value != null) {
|
|
4491
4506
|
const filter = props.filters?.find((x) => x.name == updatedValues.name);
|
|
4492
4507
|
if (filter?.dataTypeCode == "number") {
|
|
4493
4508
|
router.push(
|
package/package.json
CHANGED