@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260824103828 → 0.8.1-dev.20260824114331
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/{DataBindingControls-VTCI7X5Y.mjs → DataBindingControls-ESDLOHNB.mjs} +7 -11
- package/dist/{DataBindingControls-2LHGICW3.mjs → DataBindingControls-WJAY5HFO.mjs} +7 -11
- package/dist/{Pagination-PDU7V3HY.mjs → Pagination-QBPYDD66.mjs} +1 -1
- package/dist/{Pagination-2KVND6JU.mjs → Pagination-T7Z2NXKO.mjs} +1 -1
- package/dist/{chunk-4OH67SPF.mjs → chunk-5TQWVOWH.mjs} +18 -18
- package/dist/{chunk-TKJDEJSU.mjs → chunk-X5ERUUQV.mjs} +18 -18
- package/dist/index.js +25 -29
- package/dist/index.mjs +3 -3
- package/dist/server.js +25 -29
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
|
@@ -21,21 +21,17 @@ var parseFacetSelections = (filter) => {
|
|
|
21
21
|
selections.set(match[1].trim(), match[2].replace(/''/g, "'"));
|
|
22
22
|
}
|
|
23
23
|
if (selections.size === 0) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
);
|
|
27
|
-
if (singleExpression) {
|
|
24
|
+
const ungroupedExpression = /(?:^|\s+and\s+)\s*([^()]+?)\s+eq\s+'((?:''|[^'])*)'\s*(?=\s+and\s+|$)/gi;
|
|
25
|
+
for (const match of filter.matchAll(ungroupedExpression)) {
|
|
28
26
|
selections.set(
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
match[1].trim(),
|
|
28
|
+
match[2].replace(/''/g, "'")
|
|
31
29
|
);
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
return selections;
|
|
35
33
|
};
|
|
36
|
-
var buildFacetFilter = (selections) => Array.from(selections.entries()).map(
|
|
37
|
-
([field, value]) => `(${field} eq '${escapeODataString(value)}')`
|
|
38
|
-
).join(" and ");
|
|
34
|
+
var buildFacetFilter = (selections) => Array.from(selections.entries()).map(([field, value]) => `${field} eq '${escapeODataString(value)}'`).join(" and ");
|
|
39
35
|
var parseODataSearch = (value) => {
|
|
40
36
|
if (!value) return "";
|
|
41
37
|
const trimmedValue = value.trim();
|
|
@@ -91,7 +87,7 @@ var DataBindingControls = ({
|
|
|
91
87
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
92
88
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
93
89
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
94
|
-
const currentSearch = parseODataSearch(query?.["$
|
|
90
|
+
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
95
91
|
const [searchText, setSearchText] = useState(currentSearch);
|
|
96
92
|
const lastNavigationUrl = useRef(null);
|
|
97
93
|
useEffect(() => {
|
|
@@ -151,7 +147,7 @@ var DataBindingControls = ({
|
|
|
151
147
|
const timeout = window.setTimeout(() => {
|
|
152
148
|
navigateWithoutReload(
|
|
153
149
|
getQueryUrl({
|
|
154
|
-
"$
|
|
150
|
+
"$search": trimmedSearchText || void 0
|
|
155
151
|
})
|
|
156
152
|
);
|
|
157
153
|
}, 500);
|
|
@@ -25,21 +25,17 @@ var parseFacetSelections = (filter) => {
|
|
|
25
25
|
selections.set(match[1].trim(), match[2].replace(/''/g, "'"));
|
|
26
26
|
}
|
|
27
27
|
if (selections.size === 0) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
);
|
|
31
|
-
if (singleExpression) {
|
|
28
|
+
const ungroupedExpression = /(?:^|\s+and\s+)\s*([^()]+?)\s+eq\s+'((?:''|[^'])*)'\s*(?=\s+and\s+|$)/gi;
|
|
29
|
+
for (const match of filter.matchAll(ungroupedExpression)) {
|
|
32
30
|
selections.set(
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
match[1].trim(),
|
|
32
|
+
match[2].replace(/''/g, "'")
|
|
35
33
|
);
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
return selections;
|
|
39
37
|
};
|
|
40
|
-
var buildFacetFilter = (selections) => Array.from(selections.entries()).map(
|
|
41
|
-
([field, value]) => `(${field} eq '${escapeODataString(value)}')`
|
|
42
|
-
).join(" and ");
|
|
38
|
+
var buildFacetFilter = (selections) => Array.from(selections.entries()).map(([field, value]) => `${field} eq '${escapeODataString(value)}'`).join(" and ");
|
|
43
39
|
var parseODataSearch = (value) => {
|
|
44
40
|
if (!value) return "";
|
|
45
41
|
const trimmedValue = value.trim();
|
|
@@ -95,7 +91,7 @@ var DataBindingControls = ({
|
|
|
95
91
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
96
92
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
97
93
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
98
|
-
const currentSearch = parseODataSearch(query?.["$
|
|
94
|
+
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
99
95
|
const [searchText, setSearchText] = useState(currentSearch);
|
|
100
96
|
const lastNavigationUrl = useRef(null);
|
|
101
97
|
useEffect(() => {
|
|
@@ -155,7 +151,7 @@ var DataBindingControls = ({
|
|
|
155
151
|
const timeout = window.setTimeout(() => {
|
|
156
152
|
navigateWithoutReload(
|
|
157
153
|
getQueryUrl({
|
|
158
|
-
"$
|
|
154
|
+
"$search": trimmedSearchText || void 0
|
|
159
155
|
})
|
|
160
156
|
);
|
|
161
157
|
}, 500);
|
|
@@ -38,7 +38,7 @@ var OdataBuilder = class {
|
|
|
38
38
|
if (key == "searchCols") {
|
|
39
39
|
this.searchCols = odata[key];
|
|
40
40
|
}
|
|
41
|
-
if (key == "$
|
|
41
|
+
if (key == "$search") {
|
|
42
42
|
this.search = odata[key];
|
|
43
43
|
}
|
|
44
44
|
if (key == "filter") {
|
|
@@ -73,8 +73,8 @@ var OdataBuilder = class {
|
|
|
73
73
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
74
74
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
75
75
|
}
|
|
76
|
-
if (obj?.["$
|
|
77
|
-
queryString += `&$
|
|
76
|
+
if (obj?.["$search"] && obj["$search"].trim() !== "") {
|
|
77
|
+
queryString += `&$search=${obj["$search"]}`;
|
|
78
78
|
}
|
|
79
79
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
80
80
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
@@ -84,16 +84,16 @@ var OdataBuilder = class {
|
|
|
84
84
|
}
|
|
85
85
|
if (obj) {
|
|
86
86
|
if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
|
|
87
|
-
queryString = queryString + `&$filter=${
|
|
87
|
+
queryString = queryString + `&$filter=${obj["$filter"]}`;
|
|
88
88
|
}
|
|
89
89
|
if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
|
|
90
|
-
queryString = queryString + `&$orderby=${
|
|
90
|
+
queryString = queryString + `&$orderby=${obj["$orderby"]}`;
|
|
91
91
|
} else if (defaultOrder) {
|
|
92
|
-
queryString = queryString + `&$orderby=${
|
|
92
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
93
93
|
}
|
|
94
94
|
} else {
|
|
95
95
|
if (defaultOrder) {
|
|
96
|
-
queryString = queryString + `&$orderby=${
|
|
96
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return queryString;
|
|
@@ -131,7 +131,7 @@ var OdataBuilder = class {
|
|
|
131
131
|
}
|
|
132
132
|
appendApiQueryParameters(url) {
|
|
133
133
|
if (this.search) {
|
|
134
|
-
url += `&$
|
|
134
|
+
url += `&$search=${this.search}`;
|
|
135
135
|
}
|
|
136
136
|
if (this.apiFilter) {
|
|
137
137
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -144,10 +144,10 @@ var OdataBuilder = class {
|
|
|
144
144
|
getUrl() {
|
|
145
145
|
let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
|
|
146
146
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
147
|
-
url = url + `&$filter=${
|
|
147
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
148
148
|
}
|
|
149
149
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
150
|
-
url = url + `&$orderby=${
|
|
150
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
151
151
|
}
|
|
152
152
|
if (this.searchTerm) {
|
|
153
153
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -161,7 +161,7 @@ var OdataBuilder = class {
|
|
|
161
161
|
getNewOrderByUrl(orderBy) {
|
|
162
162
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
163
163
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
164
|
-
url = url + `&$filter=${
|
|
164
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
165
165
|
}
|
|
166
166
|
if (this.searchTerm) {
|
|
167
167
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -169,16 +169,16 @@ var OdataBuilder = class {
|
|
|
169
169
|
if (this.searchCols) {
|
|
170
170
|
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
171
171
|
}
|
|
172
|
-
url = url + `&$orderby=${
|
|
172
|
+
url = url + `&$orderby=${orderBy}`;
|
|
173
173
|
return this.appendApiQueryParameters(url);
|
|
174
174
|
}
|
|
175
175
|
getNewFilterUrl(filterBy) {
|
|
176
176
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
177
177
|
if (filterBy !== null && filterBy !== "") {
|
|
178
|
-
url = url + `&$filter=${
|
|
178
|
+
url = url + `&$filter=${filterBy}`;
|
|
179
179
|
}
|
|
180
180
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
181
|
-
url = url + `&$orderby=${
|
|
181
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
182
182
|
}
|
|
183
183
|
if (this.searchTerm) {
|
|
184
184
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -192,10 +192,10 @@ var OdataBuilder = class {
|
|
|
192
192
|
let skip = page * Constants.pagesize - Constants.pagesize;
|
|
193
193
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
|
|
194
194
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
195
|
-
url = url + `&$filter=${
|
|
195
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
196
196
|
}
|
|
197
197
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
198
|
-
url = url + `&$orderby=${
|
|
198
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
199
199
|
}
|
|
200
200
|
if (this.searchTerm) {
|
|
201
201
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -212,10 +212,10 @@ var OdataBuilder = class {
|
|
|
212
212
|
const skip = (currentPage - 1) * pageSize;
|
|
213
213
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
|
|
214
214
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
215
|
-
url = url + `&$filter=${
|
|
215
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
216
216
|
}
|
|
217
217
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
218
|
-
url = url + `&$orderby=${
|
|
218
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
219
219
|
}
|
|
220
220
|
if (this.searchTerm) {
|
|
221
221
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -40,7 +40,7 @@ var OdataBuilder = class {
|
|
|
40
40
|
if (key == "searchCols") {
|
|
41
41
|
this.searchCols = odata[key];
|
|
42
42
|
}
|
|
43
|
-
if (key == "$
|
|
43
|
+
if (key == "$search") {
|
|
44
44
|
this.search = odata[key];
|
|
45
45
|
}
|
|
46
46
|
if (key == "filter") {
|
|
@@ -75,8 +75,8 @@ var OdataBuilder = class {
|
|
|
75
75
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
76
76
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
77
77
|
}
|
|
78
|
-
if (obj?.["$
|
|
79
|
-
queryString += `&$
|
|
78
|
+
if (obj?.["$search"] && obj["$search"].trim() !== "") {
|
|
79
|
+
queryString += `&$search=${obj["$search"]}`;
|
|
80
80
|
}
|
|
81
81
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
82
82
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
@@ -86,16 +86,16 @@ var OdataBuilder = class {
|
|
|
86
86
|
}
|
|
87
87
|
if (obj) {
|
|
88
88
|
if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
|
|
89
|
-
queryString = queryString + `&$filter=${
|
|
89
|
+
queryString = queryString + `&$filter=${obj["$filter"]}`;
|
|
90
90
|
}
|
|
91
91
|
if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
|
|
92
|
-
queryString = queryString + `&$orderby=${
|
|
92
|
+
queryString = queryString + `&$orderby=${obj["$orderby"]}`;
|
|
93
93
|
} else if (defaultOrder) {
|
|
94
|
-
queryString = queryString + `&$orderby=${
|
|
94
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
97
97
|
if (defaultOrder) {
|
|
98
|
-
queryString = queryString + `&$orderby=${
|
|
98
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
return queryString;
|
|
@@ -133,7 +133,7 @@ var OdataBuilder = class {
|
|
|
133
133
|
}
|
|
134
134
|
appendApiQueryParameters(url) {
|
|
135
135
|
if (this.search) {
|
|
136
|
-
url += `&$
|
|
136
|
+
url += `&$search=${this.search}`;
|
|
137
137
|
}
|
|
138
138
|
if (this.apiFilter) {
|
|
139
139
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -146,10 +146,10 @@ var OdataBuilder = class {
|
|
|
146
146
|
getUrl() {
|
|
147
147
|
let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
|
|
148
148
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
149
|
-
url = url + `&$filter=${
|
|
149
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
150
150
|
}
|
|
151
151
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
152
|
-
url = url + `&$orderby=${
|
|
152
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
153
153
|
}
|
|
154
154
|
if (this.searchTerm) {
|
|
155
155
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -163,7 +163,7 @@ var OdataBuilder = class {
|
|
|
163
163
|
getNewOrderByUrl(orderBy) {
|
|
164
164
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
165
165
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
166
|
-
url = url + `&$filter=${
|
|
166
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
167
167
|
}
|
|
168
168
|
if (this.searchTerm) {
|
|
169
169
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -171,16 +171,16 @@ var OdataBuilder = class {
|
|
|
171
171
|
if (this.searchCols) {
|
|
172
172
|
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
173
173
|
}
|
|
174
|
-
url = url + `&$orderby=${
|
|
174
|
+
url = url + `&$orderby=${orderBy}`;
|
|
175
175
|
return this.appendApiQueryParameters(url);
|
|
176
176
|
}
|
|
177
177
|
getNewFilterUrl(filterBy) {
|
|
178
178
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
179
179
|
if (filterBy !== null && filterBy !== "") {
|
|
180
|
-
url = url + `&$filter=${
|
|
180
|
+
url = url + `&$filter=${filterBy}`;
|
|
181
181
|
}
|
|
182
182
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
183
|
-
url = url + `&$orderby=${
|
|
183
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
184
184
|
}
|
|
185
185
|
if (this.searchTerm) {
|
|
186
186
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -194,10 +194,10 @@ var OdataBuilder = class {
|
|
|
194
194
|
let skip = page * Constants.pagesize - Constants.pagesize;
|
|
195
195
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
|
|
196
196
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
197
|
-
url = url + `&$filter=${
|
|
197
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
198
198
|
}
|
|
199
199
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
200
|
-
url = url + `&$orderby=${
|
|
200
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
201
201
|
}
|
|
202
202
|
if (this.searchTerm) {
|
|
203
203
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -214,10 +214,10 @@ var OdataBuilder = class {
|
|
|
214
214
|
const skip = (currentPage - 1) * pageSize;
|
|
215
215
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
|
|
216
216
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
217
|
-
url = url + `&$filter=${
|
|
217
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
218
218
|
}
|
|
219
219
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
220
|
-
url = url + `&$orderby=${
|
|
220
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
221
221
|
}
|
|
222
222
|
if (this.searchTerm) {
|
|
223
223
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
package/dist/index.js
CHANGED
|
@@ -4123,7 +4123,7 @@ var init_OdataBuilder = __esm({
|
|
|
4123
4123
|
if (key == "searchCols") {
|
|
4124
4124
|
this.searchCols = odata[key];
|
|
4125
4125
|
}
|
|
4126
|
-
if (key == "$
|
|
4126
|
+
if (key == "$search") {
|
|
4127
4127
|
this.search = odata[key];
|
|
4128
4128
|
}
|
|
4129
4129
|
if (key == "filter") {
|
|
@@ -4158,8 +4158,8 @@ var init_OdataBuilder = __esm({
|
|
|
4158
4158
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
4159
4159
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
4160
4160
|
}
|
|
4161
|
-
if (obj?.["$
|
|
4162
|
-
queryString += `&$
|
|
4161
|
+
if (obj?.["$search"] && obj["$search"].trim() !== "") {
|
|
4162
|
+
queryString += `&$search=${obj["$search"]}`;
|
|
4163
4163
|
}
|
|
4164
4164
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
4165
4165
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
@@ -4169,16 +4169,16 @@ var init_OdataBuilder = __esm({
|
|
|
4169
4169
|
}
|
|
4170
4170
|
if (obj) {
|
|
4171
4171
|
if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
|
|
4172
|
-
queryString = queryString + `&$filter=${
|
|
4172
|
+
queryString = queryString + `&$filter=${obj["$filter"]}`;
|
|
4173
4173
|
}
|
|
4174
4174
|
if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
|
|
4175
|
-
queryString = queryString + `&$orderby=${
|
|
4175
|
+
queryString = queryString + `&$orderby=${obj["$orderby"]}`;
|
|
4176
4176
|
} else if (defaultOrder) {
|
|
4177
|
-
queryString = queryString + `&$orderby=${
|
|
4177
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
4178
4178
|
}
|
|
4179
4179
|
} else {
|
|
4180
4180
|
if (defaultOrder) {
|
|
4181
|
-
queryString = queryString + `&$orderby=${
|
|
4181
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
4184
|
return queryString;
|
|
@@ -4216,7 +4216,7 @@ var init_OdataBuilder = __esm({
|
|
|
4216
4216
|
}
|
|
4217
4217
|
appendApiQueryParameters(url) {
|
|
4218
4218
|
if (this.search) {
|
|
4219
|
-
url += `&$
|
|
4219
|
+
url += `&$search=${this.search}`;
|
|
4220
4220
|
}
|
|
4221
4221
|
if (this.apiFilter) {
|
|
4222
4222
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -4229,10 +4229,10 @@ var init_OdataBuilder = __esm({
|
|
|
4229
4229
|
getUrl() {
|
|
4230
4230
|
let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
|
|
4231
4231
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
4232
|
-
url = url + `&$filter=${
|
|
4232
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
4233
4233
|
}
|
|
4234
4234
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
4235
|
-
url = url + `&$orderby=${
|
|
4235
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
4236
4236
|
}
|
|
4237
4237
|
if (this.searchTerm) {
|
|
4238
4238
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4246,7 +4246,7 @@ var init_OdataBuilder = __esm({
|
|
|
4246
4246
|
getNewOrderByUrl(orderBy) {
|
|
4247
4247
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
4248
4248
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
4249
|
-
url = url + `&$filter=${
|
|
4249
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
4250
4250
|
}
|
|
4251
4251
|
if (this.searchTerm) {
|
|
4252
4252
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4254,16 +4254,16 @@ var init_OdataBuilder = __esm({
|
|
|
4254
4254
|
if (this.searchCols) {
|
|
4255
4255
|
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
4256
4256
|
}
|
|
4257
|
-
url = url + `&$orderby=${
|
|
4257
|
+
url = url + `&$orderby=${orderBy}`;
|
|
4258
4258
|
return this.appendApiQueryParameters(url);
|
|
4259
4259
|
}
|
|
4260
4260
|
getNewFilterUrl(filterBy) {
|
|
4261
4261
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
4262
4262
|
if (filterBy !== null && filterBy !== "") {
|
|
4263
|
-
url = url + `&$filter=${
|
|
4263
|
+
url = url + `&$filter=${filterBy}`;
|
|
4264
4264
|
}
|
|
4265
4265
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
4266
|
-
url = url + `&$orderby=${
|
|
4266
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
4267
4267
|
}
|
|
4268
4268
|
if (this.searchTerm) {
|
|
4269
4269
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4277,10 +4277,10 @@ var init_OdataBuilder = __esm({
|
|
|
4277
4277
|
let skip = page * Constants.pagesize - Constants.pagesize;
|
|
4278
4278
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
|
|
4279
4279
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
4280
|
-
url = url + `&$filter=${
|
|
4280
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
4281
4281
|
}
|
|
4282
4282
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
4283
|
-
url = url + `&$orderby=${
|
|
4283
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
4284
4284
|
}
|
|
4285
4285
|
if (this.searchTerm) {
|
|
4286
4286
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4297,10 +4297,10 @@ var init_OdataBuilder = __esm({
|
|
|
4297
4297
|
const skip = (currentPage - 1) * pageSize;
|
|
4298
4298
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
|
|
4299
4299
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
4300
|
-
url = url + `&$filter=${
|
|
4300
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
4301
4301
|
}
|
|
4302
4302
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
4303
|
-
url = url + `&$orderby=${
|
|
4303
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
4304
4304
|
}
|
|
4305
4305
|
if (this.searchTerm) {
|
|
4306
4306
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4525,21 +4525,17 @@ var init_DataBindingControls = __esm({
|
|
|
4525
4525
|
selections.set(match[1].trim(), match[2].replace(/''/g, "'"));
|
|
4526
4526
|
}
|
|
4527
4527
|
if (selections.size === 0) {
|
|
4528
|
-
const
|
|
4529
|
-
|
|
4530
|
-
);
|
|
4531
|
-
if (singleExpression) {
|
|
4528
|
+
const ungroupedExpression = /(?:^|\s+and\s+)\s*([^()]+?)\s+eq\s+'((?:''|[^'])*)'\s*(?=\s+and\s+|$)/gi;
|
|
4529
|
+
for (const match of filter.matchAll(ungroupedExpression)) {
|
|
4532
4530
|
selections.set(
|
|
4533
|
-
|
|
4534
|
-
|
|
4531
|
+
match[1].trim(),
|
|
4532
|
+
match[2].replace(/''/g, "'")
|
|
4535
4533
|
);
|
|
4536
4534
|
}
|
|
4537
4535
|
}
|
|
4538
4536
|
return selections;
|
|
4539
4537
|
};
|
|
4540
|
-
buildFacetFilter = (selections) => Array.from(selections.entries()).map(
|
|
4541
|
-
([field, value]) => `(${field} eq '${escapeODataString(value)}')`
|
|
4542
|
-
).join(" and ");
|
|
4538
|
+
buildFacetFilter = (selections) => Array.from(selections.entries()).map(([field, value]) => `${field} eq '${escapeODataString(value)}'`).join(" and ");
|
|
4543
4539
|
parseODataSearch = (value) => {
|
|
4544
4540
|
if (!value) return "";
|
|
4545
4541
|
const trimmedValue = value.trim();
|
|
@@ -4595,7 +4591,7 @@ var init_DataBindingControls = __esm({
|
|
|
4595
4591
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
4596
4592
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
4597
4593
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
4598
|
-
const currentSearch = parseODataSearch(query?.["$
|
|
4594
|
+
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
4599
4595
|
const [searchText, setSearchText] = (0, import_react55.useState)(currentSearch);
|
|
4600
4596
|
const lastNavigationUrl = (0, import_react55.useRef)(null);
|
|
4601
4597
|
(0, import_react55.useEffect)(() => {
|
|
@@ -4655,7 +4651,7 @@ var init_DataBindingControls = __esm({
|
|
|
4655
4651
|
const timeout = window.setTimeout(() => {
|
|
4656
4652
|
navigateWithoutReload(
|
|
4657
4653
|
getQueryUrl({
|
|
4658
|
-
"$
|
|
4654
|
+
"$search": trimmedSearchText || void 0
|
|
4659
4655
|
})
|
|
4660
4656
|
);
|
|
4661
4657
|
}, 500);
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
OdataBuilder
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X5ERUUQV.mjs";
|
|
6
6
|
import {
|
|
7
7
|
InputControl_default
|
|
8
8
|
} from "./chunk-GKI42H4B.mjs";
|
|
@@ -2295,8 +2295,8 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
2295
2295
|
|
|
2296
2296
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2297
2297
|
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2298
|
-
var Pagination = dynamic11(() => import("./Pagination-
|
|
2299
|
-
var DataBindingControls = dynamic11(() => import("./DataBindingControls-
|
|
2298
|
+
var Pagination = dynamic11(() => import("./Pagination-T7Z2NXKO.mjs"), { ssr: true });
|
|
2299
|
+
var DataBindingControls = dynamic11(() => import("./DataBindingControls-ESDLOHNB.mjs"), {
|
|
2300
2300
|
ssr: true
|
|
2301
2301
|
});
|
|
2302
2302
|
var Slider = dynamic11(() => import("./Slider-554BKC7N.mjs"), {
|
package/dist/server.js
CHANGED
|
@@ -1945,7 +1945,7 @@ var init_OdataBuilder = __esm({
|
|
|
1945
1945
|
if (key == "searchCols") {
|
|
1946
1946
|
this.searchCols = odata[key];
|
|
1947
1947
|
}
|
|
1948
|
-
if (key == "$
|
|
1948
|
+
if (key == "$search") {
|
|
1949
1949
|
this.search = odata[key];
|
|
1950
1950
|
}
|
|
1951
1951
|
if (key == "filter") {
|
|
@@ -1980,8 +1980,8 @@ var init_OdataBuilder = __esm({
|
|
|
1980
1980
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
1981
1981
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
1982
1982
|
}
|
|
1983
|
-
if (obj?.["$
|
|
1984
|
-
queryString += `&$
|
|
1983
|
+
if (obj?.["$search"] && obj["$search"].trim() !== "") {
|
|
1984
|
+
queryString += `&$search=${obj["$search"]}`;
|
|
1985
1985
|
}
|
|
1986
1986
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
1987
1987
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
@@ -1991,16 +1991,16 @@ var init_OdataBuilder = __esm({
|
|
|
1991
1991
|
}
|
|
1992
1992
|
if (obj) {
|
|
1993
1993
|
if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
|
|
1994
|
-
queryString = queryString + `&$filter=${
|
|
1994
|
+
queryString = queryString + `&$filter=${obj["$filter"]}`;
|
|
1995
1995
|
}
|
|
1996
1996
|
if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
|
|
1997
|
-
queryString = queryString + `&$orderby=${
|
|
1997
|
+
queryString = queryString + `&$orderby=${obj["$orderby"]}`;
|
|
1998
1998
|
} else if (defaultOrder) {
|
|
1999
|
-
queryString = queryString + `&$orderby=${
|
|
1999
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
2000
2000
|
}
|
|
2001
2001
|
} else {
|
|
2002
2002
|
if (defaultOrder) {
|
|
2003
|
-
queryString = queryString + `&$orderby=${
|
|
2003
|
+
queryString = queryString + `&$orderby=${defaultOrder}`;
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
return queryString;
|
|
@@ -2038,7 +2038,7 @@ var init_OdataBuilder = __esm({
|
|
|
2038
2038
|
}
|
|
2039
2039
|
appendApiQueryParameters(url) {
|
|
2040
2040
|
if (this.search) {
|
|
2041
|
-
url += `&$
|
|
2041
|
+
url += `&$search=${this.search}`;
|
|
2042
2042
|
}
|
|
2043
2043
|
if (this.apiFilter) {
|
|
2044
2044
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -2051,10 +2051,10 @@ var init_OdataBuilder = __esm({
|
|
|
2051
2051
|
getUrl() {
|
|
2052
2052
|
let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
|
|
2053
2053
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
2054
|
-
url = url + `&$filter=${
|
|
2054
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
2055
2055
|
}
|
|
2056
2056
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
2057
|
-
url = url + `&$orderby=${
|
|
2057
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
2058
2058
|
}
|
|
2059
2059
|
if (this.searchTerm) {
|
|
2060
2060
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -2068,7 +2068,7 @@ var init_OdataBuilder = __esm({
|
|
|
2068
2068
|
getNewOrderByUrl(orderBy) {
|
|
2069
2069
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
2070
2070
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
2071
|
-
url = url + `&$filter=${
|
|
2071
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
2072
2072
|
}
|
|
2073
2073
|
if (this.searchTerm) {
|
|
2074
2074
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -2076,16 +2076,16 @@ var init_OdataBuilder = __esm({
|
|
|
2076
2076
|
if (this.searchCols) {
|
|
2077
2077
|
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
2078
2078
|
}
|
|
2079
|
-
url = url + `&$orderby=${
|
|
2079
|
+
url = url + `&$orderby=${orderBy}`;
|
|
2080
2080
|
return this.appendApiQueryParameters(url);
|
|
2081
2081
|
}
|
|
2082
2082
|
getNewFilterUrl(filterBy) {
|
|
2083
2083
|
let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
|
|
2084
2084
|
if (filterBy !== null && filterBy !== "") {
|
|
2085
|
-
url = url + `&$filter=${
|
|
2085
|
+
url = url + `&$filter=${filterBy}`;
|
|
2086
2086
|
}
|
|
2087
2087
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
2088
|
-
url = url + `&$orderby=${
|
|
2088
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
2089
2089
|
}
|
|
2090
2090
|
if (this.searchTerm) {
|
|
2091
2091
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -2099,10 +2099,10 @@ var init_OdataBuilder = __esm({
|
|
|
2099
2099
|
let skip = page * Constants.pagesize - Constants.pagesize;
|
|
2100
2100
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
|
|
2101
2101
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
2102
|
-
url = url + `&$filter=${
|
|
2102
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
2103
2103
|
}
|
|
2104
2104
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
2105
|
-
url = url + `&$orderby=${
|
|
2105
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
2106
2106
|
}
|
|
2107
2107
|
if (this.searchTerm) {
|
|
2108
2108
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -2119,10 +2119,10 @@ var init_OdataBuilder = __esm({
|
|
|
2119
2119
|
const skip = (currentPage - 1) * pageSize;
|
|
2120
2120
|
let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
|
|
2121
2121
|
if (this.filterBy !== null && this.filterBy !== "") {
|
|
2122
|
-
url = url + `&$filter=${
|
|
2122
|
+
url = url + `&$filter=${this.filterBy}`;
|
|
2123
2123
|
}
|
|
2124
2124
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
2125
|
-
url = url + `&$orderby=${
|
|
2125
|
+
url = url + `&$orderby=${this.orderBy}`;
|
|
2126
2126
|
}
|
|
2127
2127
|
if (this.searchTerm) {
|
|
2128
2128
|
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
@@ -4523,21 +4523,17 @@ var init_DataBindingControls = __esm({
|
|
|
4523
4523
|
selections.set(match[1].trim(), match[2].replace(/''/g, "'"));
|
|
4524
4524
|
}
|
|
4525
4525
|
if (selections.size === 0) {
|
|
4526
|
-
const
|
|
4527
|
-
|
|
4528
|
-
);
|
|
4529
|
-
if (singleExpression) {
|
|
4526
|
+
const ungroupedExpression = /(?:^|\s+and\s+)\s*([^()]+?)\s+eq\s+'((?:''|[^'])*)'\s*(?=\s+and\s+|$)/gi;
|
|
4527
|
+
for (const match of filter.matchAll(ungroupedExpression)) {
|
|
4530
4528
|
selections.set(
|
|
4531
|
-
|
|
4532
|
-
|
|
4529
|
+
match[1].trim(),
|
|
4530
|
+
match[2].replace(/''/g, "'")
|
|
4533
4531
|
);
|
|
4534
4532
|
}
|
|
4535
4533
|
}
|
|
4536
4534
|
return selections;
|
|
4537
4535
|
};
|
|
4538
|
-
buildFacetFilter = (selections) => Array.from(selections.entries()).map(
|
|
4539
|
-
([field, value]) => `(${field} eq '${escapeODataString(value)}')`
|
|
4540
|
-
).join(" and ");
|
|
4536
|
+
buildFacetFilter = (selections) => Array.from(selections.entries()).map(([field, value]) => `${field} eq '${escapeODataString(value)}'`).join(" and ");
|
|
4541
4537
|
parseODataSearch = (value) => {
|
|
4542
4538
|
if (!value) return "";
|
|
4543
4539
|
const trimmedValue = value.trim();
|
|
@@ -4593,7 +4589,7 @@ var init_DataBindingControls = __esm({
|
|
|
4593
4589
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
4594
4590
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
4595
4591
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
4596
|
-
const currentSearch = parseODataSearch(query?.["$
|
|
4592
|
+
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
4597
4593
|
const [searchText, setSearchText] = (0, import_react55.useState)(currentSearch);
|
|
4598
4594
|
const lastNavigationUrl = (0, import_react55.useRef)(null);
|
|
4599
4595
|
(0, import_react55.useEffect)(() => {
|
|
@@ -4653,7 +4649,7 @@ var init_DataBindingControls = __esm({
|
|
|
4653
4649
|
const timeout = window.setTimeout(() => {
|
|
4654
4650
|
navigateWithoutReload(
|
|
4655
4651
|
getQueryUrl({
|
|
4656
|
-
"$
|
|
4652
|
+
"$search": trimmedSearchText || void 0
|
|
4657
4653
|
})
|
|
4658
4654
|
);
|
|
4659
4655
|
}, 500);
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OdataBuilder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5TQWVOWH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AssetUtility_default
|
|
6
6
|
} from "./chunk-TQ6BXQ3A.mjs";
|
|
@@ -2263,8 +2263,8 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
2263
2263
|
|
|
2264
2264
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2265
2265
|
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2266
|
-
var Pagination = dynamic11(() => import("./Pagination-
|
|
2267
|
-
var DataBindingControls = dynamic11(() => import("./DataBindingControls-
|
|
2266
|
+
var Pagination = dynamic11(() => import("./Pagination-QBPYDD66.mjs"), { ssr: true });
|
|
2267
|
+
var DataBindingControls = dynamic11(() => import("./DataBindingControls-WJAY5HFO.mjs"), {
|
|
2268
2268
|
ssr: true
|
|
2269
2269
|
});
|
|
2270
2270
|
var Slider = dynamic11(() => import("./Slider-PEIVH6A5.mjs"), {
|