@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260824062326 → 0.8.1-dev.20260824095913
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-XCAIDMDC.mjs → DataBindingControls-AT7I4FSN.mjs} +11 -4
- package/dist/{DataBindingControls-QZ7ES2AS.mjs → DataBindingControls-GHWIJ5N7.mjs} +11 -4
- package/dist/{Pagination-GL6B4MNO.mjs → Pagination-2KVND6JU.mjs} +1 -1
- package/dist/{Pagination-ZQO3EUKB.mjs → Pagination-PDU7V3HY.mjs} +1 -1
- package/dist/{chunk-Q46GMD3P.mjs → chunk-4OH67SPF.mjs} +14 -2
- package/dist/{chunk-4P4HO663.mjs → chunk-TKJDEJSU.mjs} +14 -2
- package/dist/index.js +98 -68
- package/dist/index.mjs +75 -64
- package/dist/server.js +98 -68
- package/dist/server.mjs +75 -64
- package/package.json +1 -1
|
@@ -18,6 +18,14 @@ var InputControl_default = InputControl;
|
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
var humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
20
20
|
var escapeODataString = (value) => value.replace(/'/g, "''");
|
|
21
|
+
var parseODataSearch = (value) => {
|
|
22
|
+
if (!value) return "";
|
|
23
|
+
const trimmedValue = value.trim();
|
|
24
|
+
if (trimmedValue.startsWith("'") && trimmedValue.endsWith("'")) {
|
|
25
|
+
return trimmedValue.slice(1, -1).replace(/''/g, "'");
|
|
26
|
+
}
|
|
27
|
+
return trimmedValue;
|
|
28
|
+
};
|
|
21
29
|
var normalizeSortOption = (option) => {
|
|
22
30
|
const direction = option.direction.trim();
|
|
23
31
|
return {
|
|
@@ -64,7 +72,7 @@ var DataBindingControls = ({
|
|
|
64
72
|
const normalizedSortOptions = resolvedSortOptions.map(normalizeSortOption).filter((option) => option.value);
|
|
65
73
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
66
74
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
67
|
-
const currentSearch = query?.
|
|
75
|
+
const currentSearch = parseODataSearch(query?.["$Search"]);
|
|
68
76
|
const [searchText, setSearchText] = useState(currentSearch);
|
|
69
77
|
const lastNavigationUrl = useRef(null);
|
|
70
78
|
useEffect(() => {
|
|
@@ -82,7 +90,7 @@ var DataBindingControls = ({
|
|
|
82
90
|
});
|
|
83
91
|
params.delete("$skip");
|
|
84
92
|
params.delete("skip");
|
|
85
|
-
const queryString = params.
|
|
93
|
+
const queryString = Array.from(params.entries()).map(([key, value]) => `${key}=${value}`).join("&");
|
|
86
94
|
return queryString ? `${path}?${queryString}` : path;
|
|
87
95
|
},
|
|
88
96
|
[path, query]
|
|
@@ -115,8 +123,7 @@ var DataBindingControls = ({
|
|
|
115
123
|
const timeout = window.setTimeout(() => {
|
|
116
124
|
navigateWithoutReload(
|
|
117
125
|
getQueryUrl({
|
|
118
|
-
|
|
119
|
-
searchText: void 0
|
|
126
|
+
"$Search": trimmedSearchText ? `'${escapeODataString(trimmedSearchText)}'` : void 0
|
|
120
127
|
})
|
|
121
128
|
);
|
|
122
129
|
}, 500);
|
|
@@ -14,6 +14,14 @@ import { useRouter } from "next/navigation";
|
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
var humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
16
16
|
var escapeODataString = (value) => value.replace(/'/g, "''");
|
|
17
|
+
var parseODataSearch = (value) => {
|
|
18
|
+
if (!value) return "";
|
|
19
|
+
const trimmedValue = value.trim();
|
|
20
|
+
if (trimmedValue.startsWith("'") && trimmedValue.endsWith("'")) {
|
|
21
|
+
return trimmedValue.slice(1, -1).replace(/''/g, "'");
|
|
22
|
+
}
|
|
23
|
+
return trimmedValue;
|
|
24
|
+
};
|
|
17
25
|
var normalizeSortOption = (option) => {
|
|
18
26
|
const direction = option.direction.trim();
|
|
19
27
|
return {
|
|
@@ -60,7 +68,7 @@ var DataBindingControls = ({
|
|
|
60
68
|
const normalizedSortOptions = resolvedSortOptions.map(normalizeSortOption).filter((option) => option.value);
|
|
61
69
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
62
70
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
63
|
-
const currentSearch = query?.
|
|
71
|
+
const currentSearch = parseODataSearch(query?.["$Search"]);
|
|
64
72
|
const [searchText, setSearchText] = useState(currentSearch);
|
|
65
73
|
const lastNavigationUrl = useRef(null);
|
|
66
74
|
useEffect(() => {
|
|
@@ -78,7 +86,7 @@ var DataBindingControls = ({
|
|
|
78
86
|
});
|
|
79
87
|
params.delete("$skip");
|
|
80
88
|
params.delete("skip");
|
|
81
|
-
const queryString = params.
|
|
89
|
+
const queryString = Array.from(params.entries()).map(([key, value]) => `${key}=${value}`).join("&");
|
|
82
90
|
return queryString ? `${path}?${queryString}` : path;
|
|
83
91
|
},
|
|
84
92
|
[path, query]
|
|
@@ -111,8 +119,7 @@ var DataBindingControls = ({
|
|
|
111
119
|
const timeout = window.setTimeout(() => {
|
|
112
120
|
navigateWithoutReload(
|
|
113
121
|
getQueryUrl({
|
|
114
|
-
|
|
115
|
-
searchText: void 0
|
|
122
|
+
"$Search": trimmedSearchText ? `'${escapeODataString(trimmedSearchText)}'` : void 0
|
|
116
123
|
})
|
|
117
124
|
);
|
|
118
125
|
}, 500);
|
|
@@ -38,6 +38,9 @@ var OdataBuilder = class {
|
|
|
38
38
|
if (key == "searchCols") {
|
|
39
39
|
this.searchCols = odata[key];
|
|
40
40
|
}
|
|
41
|
+
if (key == "$Search") {
|
|
42
|
+
this.search = odata[key];
|
|
43
|
+
}
|
|
41
44
|
if (key == "filter") {
|
|
42
45
|
this.apiFilter = odata[key];
|
|
43
46
|
}
|
|
@@ -70,6 +73,9 @@ var OdataBuilder = class {
|
|
|
70
73
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
71
74
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
72
75
|
}
|
|
76
|
+
if (obj?.["$Search"] && obj["$Search"].trim() !== "") {
|
|
77
|
+
queryString += `&$Search=${obj["$Search"]}`;
|
|
78
|
+
}
|
|
73
79
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
74
80
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
75
81
|
}
|
|
@@ -124,8 +130,8 @@ var OdataBuilder = class {
|
|
|
124
130
|
return pageNumber;
|
|
125
131
|
}
|
|
126
132
|
appendApiQueryParameters(url) {
|
|
127
|
-
if (this.
|
|
128
|
-
url +=
|
|
133
|
+
if (this.search) {
|
|
134
|
+
url += `&$Search=${this.search}`;
|
|
129
135
|
}
|
|
130
136
|
if (this.apiFilter) {
|
|
131
137
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -211,6 +217,12 @@ var OdataBuilder = class {
|
|
|
211
217
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
212
218
|
url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
|
|
213
219
|
}
|
|
220
|
+
if (this.searchTerm) {
|
|
221
|
+
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
222
|
+
}
|
|
223
|
+
if (this.searchCols) {
|
|
224
|
+
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
225
|
+
}
|
|
214
226
|
return this.appendApiQueryParameters(url);
|
|
215
227
|
}
|
|
216
228
|
getOrderBy() {
|
|
@@ -40,6 +40,9 @@ var OdataBuilder = class {
|
|
|
40
40
|
if (key == "searchCols") {
|
|
41
41
|
this.searchCols = odata[key];
|
|
42
42
|
}
|
|
43
|
+
if (key == "$Search") {
|
|
44
|
+
this.search = odata[key];
|
|
45
|
+
}
|
|
43
46
|
if (key == "filter") {
|
|
44
47
|
this.apiFilter = odata[key];
|
|
45
48
|
}
|
|
@@ -72,6 +75,9 @@ var OdataBuilder = class {
|
|
|
72
75
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
73
76
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
74
77
|
}
|
|
78
|
+
if (obj?.["$Search"] && obj["$Search"].trim() !== "") {
|
|
79
|
+
queryString += `&$Search=${obj["$Search"]}`;
|
|
80
|
+
}
|
|
75
81
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
76
82
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
77
83
|
}
|
|
@@ -126,8 +132,8 @@ var OdataBuilder = class {
|
|
|
126
132
|
return pageNumber;
|
|
127
133
|
}
|
|
128
134
|
appendApiQueryParameters(url) {
|
|
129
|
-
if (this.
|
|
130
|
-
url +=
|
|
135
|
+
if (this.search) {
|
|
136
|
+
url += `&$Search=${this.search}`;
|
|
131
137
|
}
|
|
132
138
|
if (this.apiFilter) {
|
|
133
139
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -213,6 +219,12 @@ var OdataBuilder = class {
|
|
|
213
219
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
214
220
|
url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
|
|
215
221
|
}
|
|
222
|
+
if (this.searchTerm) {
|
|
223
|
+
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
224
|
+
}
|
|
225
|
+
if (this.searchCols) {
|
|
226
|
+
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
227
|
+
}
|
|
216
228
|
return this.appendApiQueryParameters(url);
|
|
217
229
|
}
|
|
218
230
|
getOrderBy() {
|
package/dist/index.js
CHANGED
|
@@ -4123,6 +4123,9 @@ var init_OdataBuilder = __esm({
|
|
|
4123
4123
|
if (key == "searchCols") {
|
|
4124
4124
|
this.searchCols = odata[key];
|
|
4125
4125
|
}
|
|
4126
|
+
if (key == "$Search") {
|
|
4127
|
+
this.search = odata[key];
|
|
4128
|
+
}
|
|
4126
4129
|
if (key == "filter") {
|
|
4127
4130
|
this.apiFilter = odata[key];
|
|
4128
4131
|
}
|
|
@@ -4155,6 +4158,9 @@ var init_OdataBuilder = __esm({
|
|
|
4155
4158
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
4156
4159
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
4157
4160
|
}
|
|
4161
|
+
if (obj?.["$Search"] && obj["$Search"].trim() !== "") {
|
|
4162
|
+
queryString += `&$Search=${obj["$Search"]}`;
|
|
4163
|
+
}
|
|
4158
4164
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
4159
4165
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
4160
4166
|
}
|
|
@@ -4209,8 +4215,8 @@ var init_OdataBuilder = __esm({
|
|
|
4209
4215
|
return pageNumber;
|
|
4210
4216
|
}
|
|
4211
4217
|
appendApiQueryParameters(url) {
|
|
4212
|
-
if (this.
|
|
4213
|
-
url +=
|
|
4218
|
+
if (this.search) {
|
|
4219
|
+
url += `&$Search=${this.search}`;
|
|
4214
4220
|
}
|
|
4215
4221
|
if (this.apiFilter) {
|
|
4216
4222
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -4296,6 +4302,12 @@ var init_OdataBuilder = __esm({
|
|
|
4296
4302
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
4297
4303
|
url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
|
|
4298
4304
|
}
|
|
4305
|
+
if (this.searchTerm) {
|
|
4306
|
+
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
4307
|
+
}
|
|
4308
|
+
if (this.searchCols) {
|
|
4309
|
+
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
4310
|
+
}
|
|
4299
4311
|
return this.appendApiQueryParameters(url);
|
|
4300
4312
|
}
|
|
4301
4313
|
getOrderBy() {
|
|
@@ -4494,7 +4506,7 @@ var DataBindingControls_exports = {};
|
|
|
4494
4506
|
__export(DataBindingControls_exports, {
|
|
4495
4507
|
default: () => DataBindingControls_default
|
|
4496
4508
|
});
|
|
4497
|
-
var import_react55, import_navigation, import_jsx_runtime77, humanize, escapeODataString, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
4509
|
+
var import_react55, import_navigation, import_jsx_runtime77, humanize, escapeODataString, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
4498
4510
|
var init_DataBindingControls = __esm({
|
|
4499
4511
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
4500
4512
|
"use strict";
|
|
@@ -4506,6 +4518,14 @@ var init_DataBindingControls = __esm({
|
|
|
4506
4518
|
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4507
4519
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
4508
4520
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
4521
|
+
parseODataSearch = (value) => {
|
|
4522
|
+
if (!value) return "";
|
|
4523
|
+
const trimmedValue = value.trim();
|
|
4524
|
+
if (trimmedValue.startsWith("'") && trimmedValue.endsWith("'")) {
|
|
4525
|
+
return trimmedValue.slice(1, -1).replace(/''/g, "'");
|
|
4526
|
+
}
|
|
4527
|
+
return trimmedValue;
|
|
4528
|
+
};
|
|
4509
4529
|
normalizeSortOption = (option) => {
|
|
4510
4530
|
const direction = option.direction.trim();
|
|
4511
4531
|
return {
|
|
@@ -4552,7 +4572,7 @@ var init_DataBindingControls = __esm({
|
|
|
4552
4572
|
const normalizedSortOptions = resolvedSortOptions.map(normalizeSortOption).filter((option) => option.value);
|
|
4553
4573
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
4554
4574
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
4555
|
-
const currentSearch = query?.
|
|
4575
|
+
const currentSearch = parseODataSearch(query?.["$Search"]);
|
|
4556
4576
|
const [searchText, setSearchText] = (0, import_react55.useState)(currentSearch);
|
|
4557
4577
|
const lastNavigationUrl = (0, import_react55.useRef)(null);
|
|
4558
4578
|
(0, import_react55.useEffect)(() => {
|
|
@@ -4570,7 +4590,7 @@ var init_DataBindingControls = __esm({
|
|
|
4570
4590
|
});
|
|
4571
4591
|
params.delete("$skip");
|
|
4572
4592
|
params.delete("skip");
|
|
4573
|
-
const queryString = params.
|
|
4593
|
+
const queryString = Array.from(params.entries()).map(([key, value]) => `${key}=${value}`).join("&");
|
|
4574
4594
|
return queryString ? `${path}?${queryString}` : path;
|
|
4575
4595
|
},
|
|
4576
4596
|
[path, query]
|
|
@@ -4603,8 +4623,7 @@ var init_DataBindingControls = __esm({
|
|
|
4603
4623
|
const timeout = window.setTimeout(() => {
|
|
4604
4624
|
navigateWithoutReload(
|
|
4605
4625
|
getQueryUrl({
|
|
4606
|
-
|
|
4607
|
-
searchText: void 0
|
|
4626
|
+
"$Search": trimmedSearchText ? `'${escapeODataString(trimmedSearchText)}'` : void 0
|
|
4608
4627
|
})
|
|
4609
4628
|
);
|
|
4610
4629
|
}, 500);
|
|
@@ -7736,6 +7755,36 @@ var DivContainer = async (props) => {
|
|
|
7736
7755
|
noLinkColor && "no-link-color",
|
|
7737
7756
|
!!props.node.enterAnimation && "enter-animation"
|
|
7738
7757
|
].filter(Boolean).join(" ");
|
|
7758
|
+
const showDataBindingControls = Boolean(
|
|
7759
|
+
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
7760
|
+
);
|
|
7761
|
+
const WrapperComponent = Wrapper;
|
|
7762
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7763
|
+
WrapperComponent,
|
|
7764
|
+
{
|
|
7765
|
+
id: guid,
|
|
7766
|
+
style: combinedStyles,
|
|
7767
|
+
className: classNames || void 0,
|
|
7768
|
+
...wrapperProps,
|
|
7769
|
+
children: dataToRender.map(
|
|
7770
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
7771
|
+
props.node.children,
|
|
7772
|
+
props,
|
|
7773
|
+
item,
|
|
7774
|
+
idx,
|
|
7775
|
+
props.href ? void 0 : item?.links?.view
|
|
7776
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
7777
|
+
)
|
|
7778
|
+
}
|
|
7779
|
+
);
|
|
7780
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7781
|
+
Pagination2,
|
|
7782
|
+
{
|
|
7783
|
+
path: props.path,
|
|
7784
|
+
query: props.query,
|
|
7785
|
+
dataset: response
|
|
7786
|
+
}
|
|
7787
|
+
) : null;
|
|
7739
7788
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7740
7789
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7741
7790
|
"style",
|
|
@@ -7743,67 +7792,48 @@ var DivContainer = async (props) => {
|
|
|
7743
7792
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
7744
7793
|
}
|
|
7745
7794
|
),
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
}
|
|
7789
|
-
)
|
|
7790
|
-
] }),
|
|
7791
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
7792
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
7793
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7794
|
-
DataBindingControls2,
|
|
7795
|
-
{
|
|
7796
|
-
mode: "facets",
|
|
7797
|
-
path: props.path,
|
|
7798
|
-
query: props.query,
|
|
7799
|
-
facets: response?.facets,
|
|
7800
|
-
showFacets: dataBindingProperties.showFacets
|
|
7801
|
-
}
|
|
7802
|
-
)
|
|
7803
|
-
] })
|
|
7804
|
-
]
|
|
7805
|
-
}
|
|
7806
|
-
)
|
|
7795
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7796
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7797
|
+
DataBindingControls2,
|
|
7798
|
+
{
|
|
7799
|
+
mode: "toolbar",
|
|
7800
|
+
path: props.path,
|
|
7801
|
+
query: props.query,
|
|
7802
|
+
facets: response?.facets,
|
|
7803
|
+
sortOptions: response?.sortOptions,
|
|
7804
|
+
showSortOptions: dataBindingProperties?.showSortOptions,
|
|
7805
|
+
showSearchBar: dataBindingProperties?.showSearchBar
|
|
7806
|
+
}
|
|
7807
|
+
),
|
|
7808
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7809
|
+
"div",
|
|
7810
|
+
{
|
|
7811
|
+
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
7812
|
+
children: [
|
|
7813
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "min-w-0", children: [
|
|
7814
|
+
renderedContainer,
|
|
7815
|
+
paginationControl
|
|
7816
|
+
] }),
|
|
7817
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7820
|
+
DataBindingControls2,
|
|
7821
|
+
{
|
|
7822
|
+
mode: "facets",
|
|
7823
|
+
path: props.path,
|
|
7824
|
+
query: props.query,
|
|
7825
|
+
facets: response?.facets,
|
|
7826
|
+
showFacets: dataBindingProperties.showFacets
|
|
7827
|
+
}
|
|
7828
|
+
)
|
|
7829
|
+
] })
|
|
7830
|
+
]
|
|
7831
|
+
}
|
|
7832
|
+
)
|
|
7833
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7834
|
+
renderedContainer,
|
|
7835
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: paginationControl })
|
|
7836
|
+
] })
|
|
7807
7837
|
] });
|
|
7808
7838
|
};
|
|
7809
7839
|
var DivContainer_default = DivContainer;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
OdataBuilder
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TKJDEJSU.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-2KVND6JU.mjs"), { ssr: true });
|
|
2299
|
+
var DataBindingControls = dynamic11(() => import("./DataBindingControls-GHWIJ5N7.mjs"), {
|
|
2300
2300
|
ssr: true
|
|
2301
2301
|
});
|
|
2302
2302
|
var Slider = dynamic11(() => import("./Slider-554BKC7N.mjs"), {
|
|
@@ -2706,6 +2706,36 @@ var DivContainer = async (props) => {
|
|
|
2706
2706
|
noLinkColor && "no-link-color",
|
|
2707
2707
|
!!props.node.enterAnimation && "enter-animation"
|
|
2708
2708
|
].filter(Boolean).join(" ");
|
|
2709
|
+
const showDataBindingControls = Boolean(
|
|
2710
|
+
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
2711
|
+
);
|
|
2712
|
+
const WrapperComponent = Wrapper;
|
|
2713
|
+
const renderedContainer = /* @__PURE__ */ jsx35(
|
|
2714
|
+
WrapperComponent,
|
|
2715
|
+
{
|
|
2716
|
+
id: guid,
|
|
2717
|
+
style: combinedStyles,
|
|
2718
|
+
className: classNames || void 0,
|
|
2719
|
+
...wrapperProps,
|
|
2720
|
+
children: dataToRender.map(
|
|
2721
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
2722
|
+
props.node.children,
|
|
2723
|
+
props,
|
|
2724
|
+
item,
|
|
2725
|
+
idx,
|
|
2726
|
+
props.href ? void 0 : item?.links?.view
|
|
2727
|
+
)?.map((child, i) => /* @__PURE__ */ jsx35(React22.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2728
|
+
)
|
|
2729
|
+
}
|
|
2730
|
+
);
|
|
2731
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ jsx35(
|
|
2732
|
+
Pagination,
|
|
2733
|
+
{
|
|
2734
|
+
path: props.path,
|
|
2735
|
+
query: props.query,
|
|
2736
|
+
dataset: response
|
|
2737
|
+
}
|
|
2738
|
+
) : null;
|
|
2709
2739
|
return /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2710
2740
|
/* @__PURE__ */ jsx35(
|
|
2711
2741
|
"style",
|
|
@@ -2713,67 +2743,48 @@ var DivContainer = async (props) => {
|
|
|
2713
2743
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2714
2744
|
}
|
|
2715
2745
|
),
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
}
|
|
2759
|
-
)
|
|
2760
|
-
] }),
|
|
2761
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs13("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
2762
|
-
/* @__PURE__ */ jsx35("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
2763
|
-
/* @__PURE__ */ jsx35(
|
|
2764
|
-
DataBindingControls,
|
|
2765
|
-
{
|
|
2766
|
-
mode: "facets",
|
|
2767
|
-
path: props.path,
|
|
2768
|
-
query: props.query,
|
|
2769
|
-
facets: response?.facets,
|
|
2770
|
-
showFacets: dataBindingProperties.showFacets
|
|
2771
|
-
}
|
|
2772
|
-
)
|
|
2773
|
-
] })
|
|
2774
|
-
]
|
|
2775
|
-
}
|
|
2776
|
-
)
|
|
2746
|
+
showDataBindingControls ? /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2747
|
+
/* @__PURE__ */ jsx35(
|
|
2748
|
+
DataBindingControls,
|
|
2749
|
+
{
|
|
2750
|
+
mode: "toolbar",
|
|
2751
|
+
path: props.path,
|
|
2752
|
+
query: props.query,
|
|
2753
|
+
facets: response?.facets,
|
|
2754
|
+
sortOptions: response?.sortOptions,
|
|
2755
|
+
showSortOptions: dataBindingProperties?.showSortOptions,
|
|
2756
|
+
showSearchBar: dataBindingProperties?.showSearchBar
|
|
2757
|
+
}
|
|
2758
|
+
),
|
|
2759
|
+
/* @__PURE__ */ jsxs13(
|
|
2760
|
+
"div",
|
|
2761
|
+
{
|
|
2762
|
+
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
2763
|
+
children: [
|
|
2764
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
2765
|
+
renderedContainer,
|
|
2766
|
+
paginationControl
|
|
2767
|
+
] }),
|
|
2768
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs13("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
2769
|
+
/* @__PURE__ */ jsx35("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
2770
|
+
/* @__PURE__ */ jsx35(
|
|
2771
|
+
DataBindingControls,
|
|
2772
|
+
{
|
|
2773
|
+
mode: "facets",
|
|
2774
|
+
path: props.path,
|
|
2775
|
+
query: props.query,
|
|
2776
|
+
facets: response?.facets,
|
|
2777
|
+
showFacets: dataBindingProperties.showFacets
|
|
2778
|
+
}
|
|
2779
|
+
)
|
|
2780
|
+
] })
|
|
2781
|
+
]
|
|
2782
|
+
}
|
|
2783
|
+
)
|
|
2784
|
+
] }) : /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2785
|
+
renderedContainer,
|
|
2786
|
+
paginationControl && /* @__PURE__ */ jsx35("div", { children: paginationControl })
|
|
2787
|
+
] })
|
|
2777
2788
|
] });
|
|
2778
2789
|
};
|
|
2779
2790
|
var DivContainer_default = DivContainer;
|
package/dist/server.js
CHANGED
|
@@ -1945,6 +1945,9 @@ var init_OdataBuilder = __esm({
|
|
|
1945
1945
|
if (key == "searchCols") {
|
|
1946
1946
|
this.searchCols = odata[key];
|
|
1947
1947
|
}
|
|
1948
|
+
if (key == "$Search") {
|
|
1949
|
+
this.search = odata[key];
|
|
1950
|
+
}
|
|
1948
1951
|
if (key == "filter") {
|
|
1949
1952
|
this.apiFilter = odata[key];
|
|
1950
1953
|
}
|
|
@@ -1977,6 +1980,9 @@ var init_OdataBuilder = __esm({
|
|
|
1977
1980
|
if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
|
|
1978
1981
|
queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
|
|
1979
1982
|
}
|
|
1983
|
+
if (obj?.["$Search"] && obj["$Search"].trim() !== "") {
|
|
1984
|
+
queryString += `&$Search=${obj["$Search"]}`;
|
|
1985
|
+
}
|
|
1980
1986
|
if (obj?.["filter"] && obj["filter"].trim() !== "") {
|
|
1981
1987
|
queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
|
|
1982
1988
|
}
|
|
@@ -2031,8 +2037,8 @@ var init_OdataBuilder = __esm({
|
|
|
2031
2037
|
return pageNumber;
|
|
2032
2038
|
}
|
|
2033
2039
|
appendApiQueryParameters(url) {
|
|
2034
|
-
if (this.
|
|
2035
|
-
url +=
|
|
2040
|
+
if (this.search) {
|
|
2041
|
+
url += `&$Search=${this.search}`;
|
|
2036
2042
|
}
|
|
2037
2043
|
if (this.apiFilter) {
|
|
2038
2044
|
url += `&filter=${encodeURIComponent(this.apiFilter)}`;
|
|
@@ -2118,6 +2124,12 @@ var init_OdataBuilder = __esm({
|
|
|
2118
2124
|
if (this.orderBy !== null && this.orderBy !== "") {
|
|
2119
2125
|
url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
|
|
2120
2126
|
}
|
|
2127
|
+
if (this.searchTerm) {
|
|
2128
|
+
url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
|
|
2129
|
+
}
|
|
2130
|
+
if (this.searchCols) {
|
|
2131
|
+
url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
|
|
2132
|
+
}
|
|
2121
2133
|
return this.appendApiQueryParameters(url);
|
|
2122
2134
|
}
|
|
2123
2135
|
getOrderBy() {
|
|
@@ -4492,7 +4504,7 @@ var DataBindingControls_exports = {};
|
|
|
4492
4504
|
__export(DataBindingControls_exports, {
|
|
4493
4505
|
default: () => DataBindingControls_default
|
|
4494
4506
|
});
|
|
4495
|
-
var import_react55, import_navigation, import_jsx_runtime77, humanize, escapeODataString, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
4507
|
+
var import_react55, import_navigation, import_jsx_runtime77, humanize, escapeODataString, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
4496
4508
|
var init_DataBindingControls = __esm({
|
|
4497
4509
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
4498
4510
|
"use strict";
|
|
@@ -4504,6 +4516,14 @@ var init_DataBindingControls = __esm({
|
|
|
4504
4516
|
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4505
4517
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
4506
4518
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
4519
|
+
parseODataSearch = (value) => {
|
|
4520
|
+
if (!value) return "";
|
|
4521
|
+
const trimmedValue = value.trim();
|
|
4522
|
+
if (trimmedValue.startsWith("'") && trimmedValue.endsWith("'")) {
|
|
4523
|
+
return trimmedValue.slice(1, -1).replace(/''/g, "'");
|
|
4524
|
+
}
|
|
4525
|
+
return trimmedValue;
|
|
4526
|
+
};
|
|
4507
4527
|
normalizeSortOption = (option) => {
|
|
4508
4528
|
const direction = option.direction.trim();
|
|
4509
4529
|
return {
|
|
@@ -4550,7 +4570,7 @@ var init_DataBindingControls = __esm({
|
|
|
4550
4570
|
const normalizedSortOptions = resolvedSortOptions.map(normalizeSortOption).filter((option) => option.value);
|
|
4551
4571
|
const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
|
|
4552
4572
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
4553
|
-
const currentSearch = query?.
|
|
4573
|
+
const currentSearch = parseODataSearch(query?.["$Search"]);
|
|
4554
4574
|
const [searchText, setSearchText] = (0, import_react55.useState)(currentSearch);
|
|
4555
4575
|
const lastNavigationUrl = (0, import_react55.useRef)(null);
|
|
4556
4576
|
(0, import_react55.useEffect)(() => {
|
|
@@ -4568,7 +4588,7 @@ var init_DataBindingControls = __esm({
|
|
|
4568
4588
|
});
|
|
4569
4589
|
params.delete("$skip");
|
|
4570
4590
|
params.delete("skip");
|
|
4571
|
-
const queryString = params.
|
|
4591
|
+
const queryString = Array.from(params.entries()).map(([key, value]) => `${key}=${value}`).join("&");
|
|
4572
4592
|
return queryString ? `${path}?${queryString}` : path;
|
|
4573
4593
|
},
|
|
4574
4594
|
[path, query]
|
|
@@ -4601,8 +4621,7 @@ var init_DataBindingControls = __esm({
|
|
|
4601
4621
|
const timeout = window.setTimeout(() => {
|
|
4602
4622
|
navigateWithoutReload(
|
|
4603
4623
|
getQueryUrl({
|
|
4604
|
-
|
|
4605
|
-
searchText: void 0
|
|
4624
|
+
"$Search": trimmedSearchText ? `'${escapeODataString(trimmedSearchText)}'` : void 0
|
|
4606
4625
|
})
|
|
4607
4626
|
);
|
|
4608
4627
|
}, 500);
|
|
@@ -7703,6 +7722,36 @@ var DivContainer = async (props) => {
|
|
|
7703
7722
|
noLinkColor && "no-link-color",
|
|
7704
7723
|
!!props.node.enterAnimation && "enter-animation"
|
|
7705
7724
|
].filter(Boolean).join(" ");
|
|
7725
|
+
const showDataBindingControls = Boolean(
|
|
7726
|
+
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
7727
|
+
);
|
|
7728
|
+
const WrapperComponent = Wrapper;
|
|
7729
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7730
|
+
WrapperComponent,
|
|
7731
|
+
{
|
|
7732
|
+
id: guid,
|
|
7733
|
+
style: combinedStyles,
|
|
7734
|
+
className: classNames || void 0,
|
|
7735
|
+
...wrapperProps,
|
|
7736
|
+
children: dataToRender.map(
|
|
7737
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
7738
|
+
props.node.children,
|
|
7739
|
+
props,
|
|
7740
|
+
item,
|
|
7741
|
+
idx,
|
|
7742
|
+
props.href ? void 0 : item?.links?.view
|
|
7743
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
7744
|
+
)
|
|
7745
|
+
}
|
|
7746
|
+
);
|
|
7747
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7748
|
+
Pagination2,
|
|
7749
|
+
{
|
|
7750
|
+
path: props.path,
|
|
7751
|
+
query: props.query,
|
|
7752
|
+
dataset: response
|
|
7753
|
+
}
|
|
7754
|
+
) : null;
|
|
7706
7755
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7707
7756
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7708
7757
|
"style",
|
|
@@ -7710,67 +7759,48 @@ var DivContainer = async (props) => {
|
|
|
7710
7759
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
7711
7760
|
}
|
|
7712
7761
|
),
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
}
|
|
7756
|
-
)
|
|
7757
|
-
] }),
|
|
7758
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
7759
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
7760
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7761
|
-
DataBindingControls2,
|
|
7762
|
-
{
|
|
7763
|
-
mode: "facets",
|
|
7764
|
-
path: props.path,
|
|
7765
|
-
query: props.query,
|
|
7766
|
-
facets: response?.facets,
|
|
7767
|
-
showFacets: dataBindingProperties.showFacets
|
|
7768
|
-
}
|
|
7769
|
-
)
|
|
7770
|
-
] })
|
|
7771
|
-
]
|
|
7772
|
-
}
|
|
7773
|
-
)
|
|
7762
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7764
|
+
DataBindingControls2,
|
|
7765
|
+
{
|
|
7766
|
+
mode: "toolbar",
|
|
7767
|
+
path: props.path,
|
|
7768
|
+
query: props.query,
|
|
7769
|
+
facets: response?.facets,
|
|
7770
|
+
sortOptions: response?.sortOptions,
|
|
7771
|
+
showSortOptions: dataBindingProperties?.showSortOptions,
|
|
7772
|
+
showSearchBar: dataBindingProperties?.showSearchBar
|
|
7773
|
+
}
|
|
7774
|
+
),
|
|
7775
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7776
|
+
"div",
|
|
7777
|
+
{
|
|
7778
|
+
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
7779
|
+
children: [
|
|
7780
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "min-w-0", children: [
|
|
7781
|
+
renderedContainer,
|
|
7782
|
+
paginationControl
|
|
7783
|
+
] }),
|
|
7784
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
7785
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7787
|
+
DataBindingControls2,
|
|
7788
|
+
{
|
|
7789
|
+
mode: "facets",
|
|
7790
|
+
path: props.path,
|
|
7791
|
+
query: props.query,
|
|
7792
|
+
facets: response?.facets,
|
|
7793
|
+
showFacets: dataBindingProperties.showFacets
|
|
7794
|
+
}
|
|
7795
|
+
)
|
|
7796
|
+
] })
|
|
7797
|
+
]
|
|
7798
|
+
}
|
|
7799
|
+
)
|
|
7800
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
|
|
7801
|
+
renderedContainer,
|
|
7802
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: paginationControl })
|
|
7803
|
+
] })
|
|
7774
7804
|
] });
|
|
7775
7805
|
};
|
|
7776
7806
|
var DivContainer_default = DivContainer;
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OdataBuilder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4OH67SPF.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-PDU7V3HY.mjs"), { ssr: true });
|
|
2267
|
+
var DataBindingControls = dynamic11(() => import("./DataBindingControls-AT7I4FSN.mjs"), {
|
|
2268
2268
|
ssr: true
|
|
2269
2269
|
});
|
|
2270
2270
|
var Slider = dynamic11(() => import("./Slider-PEIVH6A5.mjs"), {
|
|
@@ -2674,6 +2674,36 @@ var DivContainer = async (props) => {
|
|
|
2674
2674
|
noLinkColor && "no-link-color",
|
|
2675
2675
|
!!props.node.enterAnimation && "enter-animation"
|
|
2676
2676
|
].filter(Boolean).join(" ");
|
|
2677
|
+
const showDataBindingControls = Boolean(
|
|
2678
|
+
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
2679
|
+
);
|
|
2680
|
+
const WrapperComponent = Wrapper;
|
|
2681
|
+
const renderedContainer = /* @__PURE__ */ jsx35(
|
|
2682
|
+
WrapperComponent,
|
|
2683
|
+
{
|
|
2684
|
+
id: guid,
|
|
2685
|
+
style: combinedStyles,
|
|
2686
|
+
className: classNames || void 0,
|
|
2687
|
+
...wrapperProps,
|
|
2688
|
+
children: dataToRender.map(
|
|
2689
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
2690
|
+
props.node.children,
|
|
2691
|
+
props,
|
|
2692
|
+
item,
|
|
2693
|
+
idx,
|
|
2694
|
+
props.href ? void 0 : item?.links?.view
|
|
2695
|
+
)?.map((child, i) => /* @__PURE__ */ jsx35(React22.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2696
|
+
)
|
|
2697
|
+
}
|
|
2698
|
+
);
|
|
2699
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ jsx35(
|
|
2700
|
+
Pagination,
|
|
2701
|
+
{
|
|
2702
|
+
path: props.path,
|
|
2703
|
+
query: props.query,
|
|
2704
|
+
dataset: response
|
|
2705
|
+
}
|
|
2706
|
+
) : null;
|
|
2677
2707
|
return /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2678
2708
|
/* @__PURE__ */ jsx35(
|
|
2679
2709
|
"style",
|
|
@@ -2681,67 +2711,48 @@ var DivContainer = async (props) => {
|
|
|
2681
2711
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2682
2712
|
}
|
|
2683
2713
|
),
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
}
|
|
2727
|
-
)
|
|
2728
|
-
] }),
|
|
2729
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs13("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
2730
|
-
/* @__PURE__ */ jsx35("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
2731
|
-
/* @__PURE__ */ jsx35(
|
|
2732
|
-
DataBindingControls,
|
|
2733
|
-
{
|
|
2734
|
-
mode: "facets",
|
|
2735
|
-
path: props.path,
|
|
2736
|
-
query: props.query,
|
|
2737
|
-
facets: response?.facets,
|
|
2738
|
-
showFacets: dataBindingProperties.showFacets
|
|
2739
|
-
}
|
|
2740
|
-
)
|
|
2741
|
-
] })
|
|
2742
|
-
]
|
|
2743
|
-
}
|
|
2744
|
-
)
|
|
2714
|
+
showDataBindingControls ? /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2715
|
+
/* @__PURE__ */ jsx35(
|
|
2716
|
+
DataBindingControls,
|
|
2717
|
+
{
|
|
2718
|
+
mode: "toolbar",
|
|
2719
|
+
path: props.path,
|
|
2720
|
+
query: props.query,
|
|
2721
|
+
facets: response?.facets,
|
|
2722
|
+
sortOptions: response?.sortOptions,
|
|
2723
|
+
showSortOptions: dataBindingProperties?.showSortOptions,
|
|
2724
|
+
showSearchBar: dataBindingProperties?.showSearchBar
|
|
2725
|
+
}
|
|
2726
|
+
),
|
|
2727
|
+
/* @__PURE__ */ jsxs13(
|
|
2728
|
+
"div",
|
|
2729
|
+
{
|
|
2730
|
+
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
2731
|
+
children: [
|
|
2732
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
|
|
2733
|
+
renderedContainer,
|
|
2734
|
+
paginationControl
|
|
2735
|
+
] }),
|
|
2736
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs13("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
2737
|
+
/* @__PURE__ */ jsx35("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
2738
|
+
/* @__PURE__ */ jsx35(
|
|
2739
|
+
DataBindingControls,
|
|
2740
|
+
{
|
|
2741
|
+
mode: "facets",
|
|
2742
|
+
path: props.path,
|
|
2743
|
+
query: props.query,
|
|
2744
|
+
facets: response?.facets,
|
|
2745
|
+
showFacets: dataBindingProperties.showFacets
|
|
2746
|
+
}
|
|
2747
|
+
)
|
|
2748
|
+
] })
|
|
2749
|
+
]
|
|
2750
|
+
}
|
|
2751
|
+
)
|
|
2752
|
+
] }) : /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2753
|
+
renderedContainer,
|
|
2754
|
+
paginationControl && /* @__PURE__ */ jsx35("div", { children: paginationControl })
|
|
2755
|
+
] })
|
|
2745
2756
|
] });
|
|
2746
2757
|
};
|
|
2747
2758
|
var DivContainer_default = DivContainer;
|