@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260818060820 → 0.8.1-dev.20260824062326

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.
Files changed (31) hide show
  1. package/dist/DataBindingControls-QZ7ES2AS.mjs +205 -0
  2. package/dist/DataBindingControls-XCAIDMDC.mjs +209 -0
  3. package/dist/{InputControlClient-XR37ZIQ2.mjs → InputControlClient-4M2BZXQO.mjs} +5 -3
  4. package/dist/InputControlClient-AORN4DRF.mjs +1921 -0
  5. package/dist/{LinkNodeButton-AOEDCCL7.mjs → LinkNodeButton-BEAX4I4C.mjs} +1 -1
  6. package/dist/LinkNodeButton-IT2CELKO.mjs +225 -0
  7. package/dist/{Pagination-YKNCYVXV.mjs → Pagination-GL6B4MNO.mjs} +5 -3
  8. package/dist/{Pagination-6OFACRMQ.mjs → Pagination-ZQO3EUKB.mjs} +27 -71
  9. package/dist/chunk-2R26M6CK.mjs +30 -0
  10. package/dist/{chunk-KL2YKXXS.mjs → chunk-4P4HO663.mjs} +30 -6
  11. package/dist/chunk-4R7F7LBL.mjs +36 -0
  12. package/dist/chunk-6PW2RLUJ.mjs +52 -0
  13. package/dist/chunk-E4VOFO5Q.mjs +39 -0
  14. package/dist/{chunk-YDPISYMP.mjs → chunk-GCG4OYDJ.mjs} +0 -34
  15. package/dist/{chunk-65QPOTZ4.mjs → chunk-GJOJX2O3.mjs} +1 -1
  16. package/dist/chunk-GKI42H4B.mjs +13 -0
  17. package/dist/{chunk-TVL6KVD5.mjs → chunk-Q46GMD3P.mjs} +31 -37
  18. package/dist/chunk-RHVNJMS4.mjs +251 -0
  19. package/dist/{chunk-WEV5U33G.mjs → chunk-TKDSRAM6.mjs} +36 -20
  20. package/dist/chunk-TQ6BXQ3A.mjs +24 -0
  21. package/dist/{chunk-3GWLDT7C.mjs → chunk-WXZMRMRS.mjs} +36 -20
  22. package/dist/index.d.mts +17 -6
  23. package/dist/index.d.ts +17 -6
  24. package/dist/index.js +600 -306
  25. package/dist/index.mjs +85 -49
  26. package/dist/server.d.mts +17 -6
  27. package/dist/server.d.ts +17 -6
  28. package/dist/server.js +2701 -293
  29. package/dist/server.mjs +70 -47
  30. package/package.json +1 -1
  31. package/dist/LinkNodeButton-KZRNRJRI.mjs +0 -467
package/dist/index.js CHANGED
@@ -3432,6 +3432,19 @@ var init_InputControlClient = __esm({
3432
3432
  }
3433
3433
  });
3434
3434
 
3435
+ // src/components/controls/edit/InputControl.tsx
3436
+ var import_dynamic5, InputControl2, InputControl_default;
3437
+ var init_InputControl = __esm({
3438
+ "src/components/controls/edit/InputControl.tsx"() {
3439
+ "use strict";
3440
+ import_dynamic5 = __toESM(require("next/dynamic"));
3441
+ InputControl2 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
3442
+ ssr: false
3443
+ });
3444
+ InputControl_default = InputControl2;
3445
+ }
3446
+ });
3447
+
3435
3448
  // src/clients/CacheManage.tsx
3436
3449
  var import_node_cache, CacheManager;
3437
3450
  var init_CacheManage = __esm({
@@ -3468,7 +3481,7 @@ var init_CacheManage = __esm({
3468
3481
  });
3469
3482
 
3470
3483
  // src/clients/ServiceClient.tsx
3471
- var ServerApiError, ServiceClient, ServiceClient_default;
3484
+ var ServerApiError, _ServiceClient, ServiceClient, ServiceClient_default;
3472
3485
  var init_ServiceClient = __esm({
3473
3486
  "src/clients/ServiceClient.tsx"() {
3474
3487
  "use strict";
@@ -3481,7 +3494,7 @@ var init_ServiceClient = __esm({
3481
3494
  this.data.isSuccessful = false;
3482
3495
  }
3483
3496
  };
3484
- ServiceClient = class {
3497
+ _ServiceClient = class _ServiceClient {
3485
3498
  constructor(apiBaseUrl, session) {
3486
3499
  this.cacheManager = CacheManager.getInstance();
3487
3500
  this.baseUrl = apiBaseUrl;
@@ -3524,28 +3537,42 @@ var init_ServiceClient = __esm({
3524
3537
  if (cachedData) {
3525
3538
  return cachedData;
3526
3539
  }
3527
- console.log("*****************CALLING API:", cacheKey, (/* @__PURE__ */ new Date()).toISOString());
3528
- const response = await fetch(fullPath, { headers: config.headers });
3529
- if (!response.ok) {
3530
- const apiErrorData = await response.json();
3531
- throw new ServerApiError(apiErrorData, response.status);
3532
- }
3533
- const cacheControl = response.headers.get("Cache-Control");
3534
- let revalidate = null;
3535
- if (cacheControl) {
3536
- const maxAgeMatch = cacheControl.match(/max-age=(\d+)/);
3537
- if (maxAgeMatch && maxAgeMatch[1]) {
3538
- const maxAge = parseInt(maxAgeMatch[1], 10);
3539
- revalidate = maxAge * 1e3;
3540
- }
3540
+ const existingRequest = _ServiceClient.inFlightGetRequests.get(cacheKey);
3541
+ if (existingRequest) {
3542
+ return existingRequest;
3541
3543
  }
3542
- const data = await response.json();
3543
- data.isSuccessful = true;
3544
- if (revalidate !== null && revalidate > 0) {
3545
- console.log("revalidate............I am caching:" + revalidate);
3546
- this.cacheManager.set(cacheKey, data, revalidate);
3544
+ const request = (async () => {
3545
+ console.log("*****************CALLING API:", cacheKey, (/* @__PURE__ */ new Date()).toISOString());
3546
+ const response = await fetch(fullPath, { headers: config.headers });
3547
+ if (!response.ok) {
3548
+ const apiErrorData = await response.json();
3549
+ throw new ServerApiError(apiErrorData, response.status);
3550
+ }
3551
+ const cacheControl = response.headers.get("Cache-Control");
3552
+ let revalidate = null;
3553
+ if (cacheControl) {
3554
+ const maxAgeMatch = cacheControl.match(/max-age=(\d+)/);
3555
+ if (maxAgeMatch && maxAgeMatch[1]) {
3556
+ const maxAge = parseInt(maxAgeMatch[1], 10);
3557
+ revalidate = maxAge * 1e3;
3558
+ }
3559
+ }
3560
+ const data = await response.json();
3561
+ data.isSuccessful = true;
3562
+ if (revalidate !== null && revalidate > 0) {
3563
+ console.log("revalidate............I am caching:" + revalidate);
3564
+ this.cacheManager.set(cacheKey, data, revalidate);
3565
+ }
3566
+ return data;
3567
+ })();
3568
+ _ServiceClient.inFlightGetRequests.set(cacheKey, request);
3569
+ try {
3570
+ return await request;
3571
+ } finally {
3572
+ if (_ServiceClient.inFlightGetRequests.get(cacheKey) === request) {
3573
+ _ServiceClient.inFlightGetRequests.delete(cacheKey);
3574
+ }
3547
3575
  }
3548
- return data;
3549
3576
  }
3550
3577
  // private async refreshToken(): Promise<void> {
3551
3578
  // console.log("*******************calling refresh token***********************");
@@ -3642,6 +3669,8 @@ var init_ServiceClient = __esm({
3642
3669
  }
3643
3670
  }
3644
3671
  };
3672
+ _ServiceClient.inFlightGetRequests = /* @__PURE__ */ new Map();
3673
+ ServiceClient = _ServiceClient;
3645
3674
  ServiceClient_default = ServiceClient;
3646
3675
  }
3647
3676
  });
@@ -4094,6 +4123,12 @@ var init_OdataBuilder = __esm({
4094
4123
  if (key == "searchCols") {
4095
4124
  this.searchCols = odata[key];
4096
4125
  }
4126
+ if (key == "filter") {
4127
+ this.apiFilter = odata[key];
4128
+ }
4129
+ if (key == "orderBy") {
4130
+ this.apiOrderBy = odata[key];
4131
+ }
4097
4132
  }
4098
4133
  }
4099
4134
  }
@@ -4120,6 +4155,12 @@ var init_OdataBuilder = __esm({
4120
4155
  if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
4121
4156
  queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
4122
4157
  }
4158
+ if (obj?.["filter"] && obj["filter"].trim() !== "") {
4159
+ queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
4160
+ }
4161
+ if (obj?.["orderBy"] && obj["orderBy"].trim() !== "") {
4162
+ queryString += `&orderBy=${encodeURIComponent(obj["orderBy"])}`;
4163
+ }
4123
4164
  if (obj) {
4124
4165
  if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
4125
4166
  queryString = queryString + `&$filter=${encodeURIComponent(obj["$filter"])}`;
@@ -4167,6 +4208,18 @@ var init_OdataBuilder = __esm({
4167
4208
  }
4168
4209
  return pageNumber;
4169
4210
  }
4211
+ appendApiQueryParameters(url) {
4212
+ if (this.searchTerm) {
4213
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
4214
+ }
4215
+ if (this.apiFilter) {
4216
+ url += `&filter=${encodeURIComponent(this.apiFilter)}`;
4217
+ }
4218
+ if (this.apiOrderBy) {
4219
+ url += `&orderBy=${encodeURIComponent(this.apiOrderBy)}`;
4220
+ }
4221
+ return url;
4222
+ }
4170
4223
  getUrl() {
4171
4224
  let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
4172
4225
  if (this.filterBy !== null && this.filterBy !== "") {
@@ -4182,7 +4235,7 @@ var init_OdataBuilder = __esm({
4182
4235
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
4183
4236
  }
4184
4237
  console.log(url);
4185
- return url;
4238
+ return this.appendApiQueryParameters(url);
4186
4239
  }
4187
4240
  getNewOrderByUrl(orderBy) {
4188
4241
  let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
@@ -4196,7 +4249,7 @@ var init_OdataBuilder = __esm({
4196
4249
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
4197
4250
  }
4198
4251
  url = url + `&$orderby=${encodeURIComponent(orderBy)}`;
4199
- return url;
4252
+ return this.appendApiQueryParameters(url);
4200
4253
  }
4201
4254
  getNewFilterUrl(filterBy) {
4202
4255
  let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
@@ -4212,7 +4265,7 @@ var init_OdataBuilder = __esm({
4212
4265
  if (this.searchCols) {
4213
4266
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
4214
4267
  }
4215
- return url;
4268
+ return this.appendApiQueryParameters(url);
4216
4269
  }
4217
4270
  getNewPageUrl(page) {
4218
4271
  let skip = page * Constants.pagesize - Constants.pagesize;
@@ -4229,7 +4282,7 @@ var init_OdataBuilder = __esm({
4229
4282
  if (this.searchCols) {
4230
4283
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
4231
4284
  }
4232
- return url;
4285
+ return this.appendApiQueryParameters(url);
4233
4286
  }
4234
4287
  getNewPageSizeUrl(pageSize) {
4235
4288
  const currentPage = this.getPageNumber(
@@ -4243,7 +4296,7 @@ var init_OdataBuilder = __esm({
4243
4296
  if (this.orderBy !== null && this.orderBy !== "") {
4244
4297
  url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
4245
4298
  }
4246
- return url;
4299
+ return this.appendApiQueryParameters(url);
4247
4300
  }
4248
4301
  getOrderBy() {
4249
4302
  return this.orderBy;
@@ -4436,18 +4489,224 @@ var init_Pagination = __esm({
4436
4489
  }
4437
4490
  });
4438
4491
 
4492
+ // src/components/pageRenderingEngine/nodes/DataBindingControls.tsx
4493
+ var DataBindingControls_exports = {};
4494
+ __export(DataBindingControls_exports, {
4495
+ default: () => DataBindingControls_default
4496
+ });
4497
+ var import_react55, import_navigation, import_jsx_runtime77, humanize, escapeODataString, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
4498
+ var init_DataBindingControls = __esm({
4499
+ "src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
4500
+ "use strict";
4501
+ "use client";
4502
+ import_react55 = require("react");
4503
+ import_navigation = require("next/navigation");
4504
+ init_InputControl();
4505
+ init_InputControlType();
4506
+ import_jsx_runtime77 = require("react/jsx-runtime");
4507
+ humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
4508
+ escapeODataString = (value) => value.replace(/'/g, "''");
4509
+ normalizeSortOption = (option) => {
4510
+ const direction = option.direction.trim();
4511
+ return {
4512
+ label: option.title || humanize(option.name),
4513
+ value: [option.name, direction].filter(Boolean).join(" ")
4514
+ };
4515
+ };
4516
+ DUMMY_FACETS = {
4517
+ CategoryTitle: [
4518
+ { value: "Career Readiness", count: 2 },
4519
+ { value: "Student Learning", count: 2 }
4520
+ ],
4521
+ Author: [
4522
+ { value: "John Smith", count: 2 },
4523
+ { value: "Sarah Jones", count: 1 },
4524
+ { value: "Emily Brown", count: 1 }
4525
+ ]
4526
+ };
4527
+ DUMMY_SORT_OPTIONS = [
4528
+ { name: "createdDate", title: "Newest First", direction: "desc" },
4529
+ { name: "createdDate", title: "Oldest First", direction: "asc" },
4530
+ { name: "title", title: "Title A-Z", direction: "asc" },
4531
+ { name: "title", title: "Title Z-A", direction: "desc" }
4532
+ ];
4533
+ DataBindingControls = ({
4534
+ path,
4535
+ query,
4536
+ facets,
4537
+ sortOptions,
4538
+ showFacets,
4539
+ showSortOptions,
4540
+ showSearchBar,
4541
+ mode = "toolbar"
4542
+ }) => {
4543
+ const router = (0, import_navigation.useRouter)();
4544
+ const apiFacetGroups = Object.entries(facets ?? {}).filter(
4545
+ ([, values]) => Array.isArray(values) && values.length > 0
4546
+ );
4547
+ const facetGroups = apiFacetGroups.length > 0 ? apiFacetGroups : Object.entries(DUMMY_FACETS);
4548
+ const apiSortOptions = (sortOptions ?? []).filter(
4549
+ (option) => option?.name && option?.direction
4550
+ );
4551
+ const resolvedSortOptions = apiSortOptions.length > 0 ? apiSortOptions : DUMMY_SORT_OPTIONS;
4552
+ const normalizedSortOptions = resolvedSortOptions.map(normalizeSortOption).filter((option) => option.value);
4553
+ const currentFilter = query?.["$filter"] ?? query?.filter ?? "";
4554
+ const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
4555
+ const currentSearch = query?.searchTerm ?? query?.searchText ?? "";
4556
+ const [searchText, setSearchText] = (0, import_react55.useState)(currentSearch);
4557
+ const lastNavigationUrl = (0, import_react55.useRef)(null);
4558
+ (0, import_react55.useEffect)(() => {
4559
+ setSearchText(currentSearch);
4560
+ }, [currentSearch]);
4561
+ const getQueryUrl = (0, import_react55.useCallback)(
4562
+ (updates) => {
4563
+ const params = new URLSearchParams(query ?? {});
4564
+ Object.entries(updates).forEach(([key, value]) => {
4565
+ if (value) {
4566
+ params.set(key, value);
4567
+ } else {
4568
+ params.delete(key);
4569
+ }
4570
+ });
4571
+ params.delete("$skip");
4572
+ params.delete("skip");
4573
+ const queryString = params.toString();
4574
+ return queryString ? `${path}?${queryString}` : path;
4575
+ },
4576
+ [path, query]
4577
+ );
4578
+ const getFacetUrl = (field, value) => getQueryUrl({
4579
+ $filter: value ? `${field} eq '${escapeODataString(value)}'` : void 0,
4580
+ filter: void 0
4581
+ });
4582
+ const navigateWithoutReload = (0, import_react55.useCallback)(
4583
+ (url) => {
4584
+ if (lastNavigationUrl.current === url) {
4585
+ return;
4586
+ }
4587
+ if (typeof window !== "undefined") {
4588
+ const targetUrl = new URL(url, window.location.origin);
4589
+ if (targetUrl.pathname === window.location.pathname && targetUrl.search === window.location.search) {
4590
+ return;
4591
+ }
4592
+ }
4593
+ lastNavigationUrl.current = url;
4594
+ router.push(url, { scroll: false });
4595
+ },
4596
+ [router]
4597
+ );
4598
+ (0, import_react55.useEffect)(() => {
4599
+ const trimmedSearchText = searchText.trim();
4600
+ if (trimmedSearchText === currentSearch.trim()) {
4601
+ return;
4602
+ }
4603
+ const timeout = window.setTimeout(() => {
4604
+ navigateWithoutReload(
4605
+ getQueryUrl({
4606
+ searchTerm: trimmedSearchText || void 0,
4607
+ searchText: void 0
4608
+ })
4609
+ );
4610
+ }, 500);
4611
+ return () => window.clearTimeout(timeout);
4612
+ }, [currentSearch, getQueryUrl, navigateWithoutReload, searchText]);
4613
+ const hasFacetControls = showFacets && facetGroups.length > 0;
4614
+ const hasSortControls = showSortOptions && normalizedSortOptions.length > 0;
4615
+ const shouldShowToolbar = mode === "toolbar" && (showSearchBar || hasSortControls);
4616
+ const shouldShowFacets = mode === "facets" && hasFacetControls;
4617
+ if (!shouldShowToolbar && !shouldShowFacets) {
4618
+ return null;
4619
+ }
4620
+ const renderFacetLinks = (field, values, stacked = false) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: stacked ? "flex flex-col gap-1" : "flex flex-wrap gap-2", children: [
4621
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4622
+ "button",
4623
+ {
4624
+ type: "button",
4625
+ onClick: () => navigateWithoutReload(getFacetUrl(field)),
4626
+ "aria-pressed": !currentFilter,
4627
+ className: `px-3 py-2 text-left text-sm ${stacked ? "w-full" : "border"} ${currentFilter ? "" : "bg-primary-base font-semibold"}`,
4628
+ children: "All"
4629
+ }
4630
+ ),
4631
+ values.map((facet) => {
4632
+ const filter = `${field} eq '${escapeODataString(facet.value)}'`;
4633
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
4634
+ "button",
4635
+ {
4636
+ type: "button",
4637
+ onClick: () => navigateWithoutReload(getFacetUrl(field, facet.value)),
4638
+ "aria-pressed": currentFilter === filter,
4639
+ className: `px-3 py-2 text-left text-sm ${stacked ? "w-full" : "border"} ${currentFilter === filter ? "bg-primary-base font-semibold" : ""}`,
4640
+ children: [
4641
+ facet.value,
4642
+ " (",
4643
+ facet.count,
4644
+ ")"
4645
+ ]
4646
+ },
4647
+ `${field}-${facet.value}`
4648
+ );
4649
+ })
4650
+ ] });
4651
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: mode === "toolbar" ? "mb-6" : "flex flex-col gap-2", children: [
4652
+ shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
4653
+ showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "w-full max-w-xl", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4654
+ InputControl_default,
4655
+ {
4656
+ name: "searchText",
4657
+ controlType: InputControlType_default.lineTextInput,
4658
+ value: searchText,
4659
+ callback: (updatedValues) => setSearchText(updatedValues.value),
4660
+ attributes: { placeholder: "Search" },
4661
+ inputClasses: "!mt-0"
4662
+ }
4663
+ ) }),
4664
+ hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
4665
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "font-medium", children: "Sort by" }),
4666
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4667
+ InputControl_default,
4668
+ {
4669
+ name: "sortOptions",
4670
+ controlType: InputControlType_default.select,
4671
+ value: currentSort,
4672
+ dataset: normalizedSortOptions,
4673
+ dataKeyFieldName: "value",
4674
+ dataTextFieldName: "label",
4675
+ callback: (updatedValues) => navigateWithoutReload(
4676
+ getQueryUrl({
4677
+ $orderby: updatedValues.value || void 0,
4678
+ orderBy: void 0
4679
+ })
4680
+ ),
4681
+ attributes: { placeholder: "Default" },
4682
+ inputClasses: "!mt-0 min-w-44"
4683
+ }
4684
+ )
4685
+ ] })
4686
+ ] }),
4687
+ shouldShowFacets && facetGroups.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("nav", { "aria-label": `${humanize(facetGroups[0][0])} filters`, children: renderFacetLinks(facetGroups[0][0], facetGroups[0][1]) }),
4688
+ shouldShowFacets && facetGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col gap-2", children: facetGroups.map(([field, values]) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("details", { className: "border-b", open: true, children: [
4689
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("summary", { className: "cursor-pointer font-semibold", children: humanize(field) }),
4690
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "p-2", children: renderFacetLinks(field, values, true) })
4691
+ ] }, field)) })
4692
+ ] });
4693
+ };
4694
+ DataBindingControls_default = DataBindingControls;
4695
+ }
4696
+ });
4697
+
4439
4698
  // src/components/Slider.tsx
4440
4699
  var Slider_exports = {};
4441
4700
  __export(Slider_exports, {
4442
4701
  default: () => Slider_default
4443
4702
  });
4444
- var import_react55, import_jsx_runtime77, Slider, ArrowButton, ProgressPill, Slider_default;
4703
+ var import_react56, import_jsx_runtime78, Slider, ArrowButton, ProgressPill, Slider_default;
4445
4704
  var init_Slider = __esm({
4446
4705
  "src/components/Slider.tsx"() {
4447
4706
  "use strict";
4448
4707
  "use client";
4449
- import_react55 = __toESM(require("react"));
4450
- import_jsx_runtime77 = require("react/jsx-runtime");
4708
+ import_react56 = __toESM(require("react"));
4709
+ import_jsx_runtime78 = require("react/jsx-runtime");
4451
4710
  Slider = ({
4452
4711
  children,
4453
4712
  slidesToShow = 4,
@@ -4465,13 +4724,13 @@ var init_Slider = __esm({
4465
4724
  pillStyle = "cumulative",
4466
4725
  progressPosition = "bottom"
4467
4726
  }) => {
4468
- const [currentSlide, setCurrentSlide] = (0, import_react55.useState)(0);
4469
- const [transition, setTransition] = (0, import_react55.useState)(true);
4470
- const [slidesToShowState, setSlidesToShowState] = (0, import_react55.useState)(
4727
+ const [currentSlide, setCurrentSlide] = (0, import_react56.useState)(0);
4728
+ const [transition, setTransition] = (0, import_react56.useState)(true);
4729
+ const [slidesToShowState, setSlidesToShowState] = (0, import_react56.useState)(
4471
4730
  typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
4472
4731
  );
4473
- const [isPlaying, setIsPlaying] = (0, import_react55.useState)(autoplay);
4474
- (0, import_react55.useEffect)(() => {
4732
+ const [isPlaying, setIsPlaying] = (0, import_react56.useState)(autoplay);
4733
+ (0, import_react56.useEffect)(() => {
4475
4734
  if (typeof slidesToShow === "number") return;
4476
4735
  const handleResize = () => {
4477
4736
  if (window.innerWidth >= 1024) {
@@ -4486,7 +4745,7 @@ var init_Slider = __esm({
4486
4745
  window.addEventListener("resize", handleResize);
4487
4746
  return () => window.removeEventListener("resize", handleResize);
4488
4747
  }, [slidesToShow]);
4489
- (0, import_react55.useEffect)(() => {
4748
+ (0, import_react56.useEffect)(() => {
4490
4749
  if (!autoplay) return;
4491
4750
  const timer = setInterval(() => {
4492
4751
  if (isPlaying) {
@@ -4495,7 +4754,7 @@ var init_Slider = __esm({
4495
4754
  }, autoplay_speed);
4496
4755
  return () => clearInterval(timer);
4497
4756
  }, [autoplay, autoplay_speed, currentSlide, isPlaying]);
4498
- const totalSlides = import_react55.Children.count(children);
4757
+ const totalSlides = import_react56.Children.count(children);
4499
4758
  const maxSlide = totalSlides - slidesToShowState;
4500
4759
  const nextSlide = () => {
4501
4760
  if (currentSlide >= maxSlide) {
@@ -4540,16 +4799,16 @@ var init_Slider = __esm({
4540
4799
  }
4541
4800
  };
4542
4801
  const translateX = -currentSlide * (100 / slidesToShowState);
4543
- const slides = import_react55.Children.map(children, (child, index) => {
4544
- if (!import_react55.default.isValidElement(child)) return null;
4802
+ const slides = import_react56.Children.map(children, (child, index) => {
4803
+ if (!import_react56.default.isValidElement(child)) return null;
4545
4804
  const childProps = child.props;
4546
4805
  const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
4547
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4806
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4548
4807
  "div",
4549
4808
  {
4550
4809
  className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
4551
4810
  style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
4552
- children: (0, import_react55.cloneElement)(child, {
4811
+ children: (0, import_react56.cloneElement)(child, {
4553
4812
  className: mergedClassName
4554
4813
  })
4555
4814
  },
@@ -4567,14 +4826,14 @@ var init_Slider = __esm({
4567
4826
  return "bottom-4";
4568
4827
  }
4569
4828
  };
4570
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
4829
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4571
4830
  "div",
4572
4831
  {
4573
4832
  className: `relative w-full overflow-hidden ${className}`,
4574
4833
  onMouseEnter: handleMouseEnter,
4575
4834
  onMouseLeave: handleMouseLeave,
4576
4835
  children: [
4577
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4836
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4578
4837
  "div",
4579
4838
  {
4580
4839
  className: "flex h-full",
@@ -4585,18 +4844,18 @@ var init_Slider = __esm({
4585
4844
  children: slides
4586
4845
  }
4587
4846
  ),
4588
- show_arrows && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
4589
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4847
+ show_arrows && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
4848
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4590
4849
  ArrowButton,
4591
4850
  {
4592
4851
  direction: "left",
4593
4852
  onClick: prevSlide,
4594
4853
  visible: infinite_scroll || currentSlide > 0,
4595
4854
  className: arrowClassName,
4596
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
4855
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
4597
4856
  }
4598
4857
  ),
4599
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
4858
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4600
4859
  ArrowButton,
4601
4860
  {
4602
4861
  direction: "right",
@@ -4604,13 +4863,13 @@ var init_Slider = __esm({
4604
4863
  visible: infinite_scroll || currentSlide < maxSlide,
4605
4864
  className: arrowClassName,
4606
4865
  children: [
4607
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
4866
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
4608
4867
  " "
4609
4868
  ]
4610
4869
  }
4611
4870
  )
4612
4871
  ] }),
4613
- show_dots && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4872
+ show_dots && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4614
4873
  ProgressPill,
4615
4874
  {
4616
4875
  active: index === currentSlide,
@@ -4636,7 +4895,7 @@ var init_Slider = __esm({
4636
4895
  visible,
4637
4896
  children,
4638
4897
  className = ""
4639
- }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4898
+ }) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4640
4899
  "button",
4641
4900
  {
4642
4901
  className: `
@@ -4662,13 +4921,13 @@ var init_Slider = __esm({
4662
4921
  currentSlide,
4663
4922
  totalSlides
4664
4923
  }) => {
4665
- const [progress, setProgress] = (0, import_react55.useState)(0);
4666
- (0, import_react55.useEffect)(() => {
4924
+ const [progress, setProgress] = (0, import_react56.useState)(0);
4925
+ (0, import_react56.useEffect)(() => {
4667
4926
  if (active) {
4668
4927
  setProgress(0);
4669
4928
  }
4670
4929
  }, [active, index]);
4671
- (0, import_react55.useEffect)(() => {
4930
+ (0, import_react56.useEffect)(() => {
4672
4931
  if (!active || !isPlaying) {
4673
4932
  if (!active) {
4674
4933
  setProgress(0);
@@ -4723,7 +4982,7 @@ var init_Slider = __esm({
4723
4982
  const renderProgressBar = () => {
4724
4983
  if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
4725
4984
  const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
4726
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4985
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4727
4986
  "div",
4728
4987
  {
4729
4988
  className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
@@ -4735,7 +4994,7 @@ var init_Slider = __esm({
4735
4994
  };
4736
4995
  const renderCumulativeFill = () => {
4737
4996
  if (style === "cumulative" && isFilled && !isActive) {
4738
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
4997
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4739
4998
  "div",
4740
4999
  {
4741
5000
  className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
@@ -4745,7 +5004,7 @@ var init_Slider = __esm({
4745
5004
  }
4746
5005
  return null;
4747
5006
  };
4748
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
5007
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4749
5008
  "button",
4750
5009
  {
4751
5010
  className: `${baseClasses} ${getStyleClasses()}`,
@@ -5171,18 +5430,12 @@ var ViewControl = (props) => {
5171
5430
  };
5172
5431
  var ViewControl_default = ViewControl;
5173
5432
 
5174
- // src/components/controls/edit/InputControl.tsx
5175
- var import_dynamic5 = __toESM(require("next/dynamic"));
5176
- var InputControl2 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
5177
- ssr: false
5178
- });
5179
- var InputControl_default = InputControl2;
5180
-
5181
5433
  // src/index.ts
5434
+ init_InputControl();
5182
5435
  init_InputControlType();
5183
5436
 
5184
5437
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
5185
- var import_react57 = __toESM(require("react"));
5438
+ var import_react58 = __toESM(require("react"));
5186
5439
 
5187
5440
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
5188
5441
  var import_react44 = __toESM(require("react"));
@@ -5956,7 +6209,7 @@ var WidgetNode_default = WidgetNode;
5956
6209
 
5957
6210
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
5958
6211
  var import_dynamic12 = __toESM(require("next/dynamic"));
5959
- var import_react56 = __toESM(require("react"));
6212
+ var import_react57 = __toESM(require("react"));
5960
6213
 
5961
6214
  // src/components/pageRenderingEngine/nodes/EmbedNode.tsx
5962
6215
  var import_dynamic9 = __toESM(require("next/dynamic"));
@@ -7071,8 +7324,11 @@ var GoogleMapNode = (props) => {
7071
7324
  var GoogleMapNode_default = GoogleMapNode;
7072
7325
 
7073
7326
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
7074
- var import_jsx_runtime78 = require("react/jsx-runtime");
7327
+ var import_jsx_runtime79 = require("react/jsx-runtime");
7075
7328
  var Pagination2 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
7329
+ var DataBindingControls2 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
7330
+ ssr: true
7331
+ });
7076
7332
  var Slider2 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
7077
7333
  ssr: false
7078
7334
  });
@@ -7327,7 +7583,7 @@ var DivContainer = async (props) => {
7327
7583
  response = await serviceClient.get(endpoint);
7328
7584
  result = response?.result;
7329
7585
  if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
7330
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NoDataFound_default, {});
7586
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(NoDataFound_default, {});
7331
7587
  }
7332
7588
  if (dataBindingProperties.childCollectionName && props.dataitem) {
7333
7589
  childCollectionData = getNestedValue6(
@@ -7347,7 +7603,7 @@ var DivContainer = async (props) => {
7347
7603
  }
7348
7604
  const SelectedNode = NodeTypes2[node.type];
7349
7605
  if (!SelectedNode) return null;
7350
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7606
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7351
7607
  SelectedNode,
7352
7608
  {
7353
7609
  node,
@@ -7480,45 +7736,80 @@ var DivContainer = async (props) => {
7480
7736
  noLinkColor && "no-link-color",
7481
7737
  !!props.node.enterAnimation && "enter-animation"
7482
7738
  ].filter(Boolean).join(" ");
7483
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react56.default.Fragment, { children: [
7484
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7739
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react57.default.Fragment, { children: [
7740
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7485
7741
  "style",
7486
7742
  {
7487
7743
  dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
7488
7744
  }
7489
7745
  ),
7490
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7491
- Wrapper,
7746
+ dataBindingProperties && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7747
+ DataBindingControls2,
7492
7748
  {
7493
- id: guid,
7494
- style: combinedStyles,
7495
- className: classNames || void 0,
7496
- ...wrapperProps,
7497
- children: dataToRender.map(
7498
- (item, idx) => item?.links?.view && renderLink ? renderChildren(
7499
- props.node.children,
7500
- props,
7501
- item,
7502
- idx,
7503
- props.href ? void 0 : item?.links?.view
7504
- )?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react56.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
7505
- )
7749
+ mode: "toolbar",
7750
+ path: props.path,
7751
+ query: props.query,
7752
+ facets: response?.facets,
7753
+ sortOptions: response?.sortOptions,
7754
+ showSortOptions: dataBindingProperties.showSortOptions,
7755
+ showSearchBar: dataBindingProperties.showSearchBar
7506
7756
  }
7507
7757
  ),
7508
- dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7509
- Pagination2,
7758
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
7759
+ "div",
7510
7760
  {
7511
- path: props.path,
7512
- query: props.query,
7513
- dataset: response
7761
+ className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
7762
+ children: [
7763
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "min-w-0", children: [
7764
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7765
+ Wrapper,
7766
+ {
7767
+ id: guid,
7768
+ style: combinedStyles,
7769
+ className: classNames || void 0,
7770
+ ...wrapperProps,
7771
+ children: dataToRender.map(
7772
+ (item, idx) => item?.links?.view && renderLink ? renderChildren(
7773
+ props.node.children,
7774
+ props,
7775
+ item,
7776
+ idx,
7777
+ props.href ? void 0 : item?.links?.view
7778
+ )?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
7779
+ )
7780
+ }
7781
+ ),
7782
+ dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7783
+ Pagination2,
7784
+ {
7785
+ path: props.path,
7786
+ query: props.query,
7787
+ dataset: response
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
+ ]
7514
7805
  }
7515
- ) })
7806
+ )
7516
7807
  ] });
7517
7808
  };
7518
7809
  var DivContainer_default = DivContainer;
7519
7810
 
7520
7811
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
7521
- var import_jsx_runtime79 = require("react/jsx-runtime");
7812
+ var import_jsx_runtime80 = require("react/jsx-runtime");
7522
7813
  var NodeTypes = {
7523
7814
  ["paragraph"]: ParagraphNode_default,
7524
7815
  ["heading"]: HeadingNode_default,
@@ -7556,14 +7847,14 @@ var PageBodyRenderer = (props) => {
7556
7847
  }
7557
7848
  return true;
7558
7849
  };
7559
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
7850
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
7560
7851
  {
7561
7852
  }
7562
7853
  const SelectedNode = NodeTypes[node.type];
7563
7854
  if (!shouldRenderNode(node)) {
7564
7855
  return null;
7565
7856
  }
7566
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7857
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7567
7858
  SelectedNode,
7568
7859
  {
7569
7860
  node,
@@ -7579,7 +7870,7 @@ var PageBodyRenderer = (props) => {
7579
7870
  device: props.device,
7580
7871
  widgetRenderer: props.widgetRenderer
7581
7872
  }
7582
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7873
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7583
7874
  SelectedNode,
7584
7875
  {
7585
7876
  node,
@@ -7600,10 +7891,10 @@ var PageBodyRenderer = (props) => {
7600
7891
  var PageBodyRenderer_default = PageBodyRenderer;
7601
7892
 
7602
7893
  // src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
7603
- var import_react58 = require("react");
7894
+ var import_react59 = require("react");
7604
7895
  var ENTER_ANIMATION_SELECTOR = ".enter-animation";
7605
7896
  function EnterAnimationHydrator() {
7606
- (0, import_react58.useEffect)(() => {
7897
+ (0, import_react59.useEffect)(() => {
7607
7898
  let observer;
7608
7899
  const observedElements = /* @__PURE__ */ new WeakSet();
7609
7900
  const revealAnimatedElements = () => {
@@ -7648,22 +7939,22 @@ function EnterAnimationHydrator() {
7648
7939
  }
7649
7940
 
7650
7941
  // src/components/Toast.tsx
7651
- var import_react59 = require("react");
7942
+ var import_react60 = require("react");
7652
7943
  init_ToastService();
7653
- var import_jsx_runtime80 = require("react/jsx-runtime");
7944
+ var import_jsx_runtime81 = require("react/jsx-runtime");
7654
7945
  var Toast = () => {
7655
- const [showToast, setShowToast] = (0, import_react59.useState)(false);
7656
- const [message, setMessage] = (0, import_react59.useState)("");
7657
- const [messageType, setMessageType] = (0, import_react59.useState)("error");
7658
- const timeoutRef = (0, import_react59.useRef)(null);
7659
- const closeToast = (0, import_react59.useCallback)(() => {
7946
+ const [showToast, setShowToast] = (0, import_react60.useState)(false);
7947
+ const [message, setMessage] = (0, import_react60.useState)("");
7948
+ const [messageType, setMessageType] = (0, import_react60.useState)("error");
7949
+ const timeoutRef = (0, import_react60.useRef)(null);
7950
+ const closeToast = (0, import_react60.useCallback)(() => {
7660
7951
  if (timeoutRef.current) {
7661
7952
  clearTimeout(timeoutRef.current);
7662
7953
  timeoutRef.current = null;
7663
7954
  }
7664
7955
  setShowToast(false);
7665
7956
  }, []);
7666
- const showMessage = (0, import_react59.useCallback)((message2, messageType2) => {
7957
+ const showMessage = (0, import_react60.useCallback)((message2, messageType2) => {
7667
7958
  if (timeoutRef.current) {
7668
7959
  clearTimeout(timeoutRef.current);
7669
7960
  }
@@ -7675,7 +7966,7 @@ var Toast = () => {
7675
7966
  timeoutRef.current = null;
7676
7967
  }, 4e3);
7677
7968
  }, []);
7678
- (0, import_react59.useEffect)(() => {
7969
+ (0, import_react60.useEffect)(() => {
7679
7970
  ToastService_default.initialize(showMessage, closeToast);
7680
7971
  return () => {
7681
7972
  closeToast();
@@ -7684,8 +7975,8 @@ var Toast = () => {
7684
7975
  });
7685
7976
  };
7686
7977
  }, [closeToast, showMessage]);
7687
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
7688
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7978
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
7979
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7689
7980
  "span",
7690
7981
  {
7691
7982
  className: "font-medium text-inherit text-sm",
@@ -7693,7 +7984,7 @@ var Toast = () => {
7693
7984
  children: message
7694
7985
  }
7695
7986
  ),
7696
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7987
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7697
7988
  "svg",
7698
7989
  {
7699
7990
  xmlns: "http://www.w3.org/2000/svg",
@@ -7701,7 +7992,7 @@ var Toast = () => {
7701
7992
  fill: "none",
7702
7993
  viewBox: "0 0 24 24",
7703
7994
  stroke: "currentColor",
7704
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
7995
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
7705
7996
  }
7706
7997
  ) })
7707
7998
  ] }) }) });
@@ -7731,8 +8022,8 @@ init_Switcher();
7731
8022
 
7732
8023
  // src/components/NavigationTabsV2.tsx
7733
8024
  var import_link3 = __toESM(require("next/link"));
7734
- var import_navigation = require("next/navigation");
7735
- var import_jsx_runtime81 = require("react/jsx-runtime");
8025
+ var import_navigation2 = require("next/navigation");
8026
+ var import_jsx_runtime82 = require("react/jsx-runtime");
7736
8027
  function resolveRoutePlaceholders(route, params) {
7737
8028
  return route.replace(/\{([^}]+)\}/g, (match, key) => {
7738
8029
  const value = params[key];
@@ -7744,7 +8035,7 @@ function resolveRoutePlaceholders(route, params) {
7744
8035
  });
7745
8036
  }
7746
8037
  var NavigationTabsV2 = ({ tabs, params = {} }) => {
7747
- const pathname = (0, import_navigation.usePathname)();
8038
+ const pathname = (0, import_navigation2.usePathname)();
7748
8039
  const shouldHideTabs = pathname?.includes("/add");
7749
8040
  if (shouldHideTabs) return null;
7750
8041
  const mappedTabs = tabs?.sort((a, b) => a.displayOrder - b.displayOrder)?.map((tab) => ({
@@ -7757,8 +8048,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
7757
8048
  isActive: tab.isActive
7758
8049
  })) || [];
7759
8050
  if (mappedTabs.length === 0) return null;
7760
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
7761
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8051
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
8052
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7762
8053
  "div",
7763
8054
  {
7764
8055
  className: `text-sm font-medium border-b-2 px-6 py-2 transition
@@ -7771,14 +8062,15 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
7771
8062
  var NavigationTabsV2_default = NavigationTabsV2;
7772
8063
 
7773
8064
  // src/components/dataForm/DataList.tsx
7774
- var import_react62 = __toESM(require("react"));
7775
- var import_navigation2 = require("next/navigation");
8065
+ var import_react63 = __toESM(require("react"));
8066
+ init_InputControl();
8067
+ var import_navigation3 = require("next/navigation");
7776
8068
 
7777
8069
  // src/components/dataForm/NoContentView.tsx
7778
- var import_react60 = __toESM(require("react"));
7779
- var import_jsx_runtime82 = require("react/jsx-runtime");
8070
+ var import_react61 = __toESM(require("react"));
8071
+ var import_jsx_runtime83 = require("react/jsx-runtime");
7780
8072
  var NoContentView = (props) => {
7781
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react60.default.Fragment, { children: props.isDataFound === false && props.children });
8073
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react61.default.Fragment, { children: props.isDataFound === false && props.children });
7782
8074
  };
7783
8075
  var NoContentView_default = NoContentView;
7784
8076
 
@@ -7786,39 +8078,39 @@ var NoContentView_default = NoContentView;
7786
8078
  init_InputControlType();
7787
8079
 
7788
8080
  // src/components/dataForm/ContentView.tsx
7789
- var import_react61 = __toESM(require("react"));
7790
- var import_jsx_runtime83 = require("react/jsx-runtime");
8081
+ var import_react62 = __toESM(require("react"));
8082
+ var import_jsx_runtime84 = require("react/jsx-runtime");
7791
8083
  var ContentView = (props) => {
7792
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_react61.default.Fragment, { children: [
7793
- props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
7794
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center mb-4", children: [
7795
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
7796
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "ml-2", children: [
7797
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
7798
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
8084
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_react62.default.Fragment, { children: [
8085
+ props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
8086
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center mb-4", children: [
8087
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
8088
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "ml-2", children: [
8089
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
8090
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
7799
8091
  ] })
7800
8092
  ] }),
7801
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
7802
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "animate-pulse", children: [
7803
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
7804
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
7805
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
7806
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
7807
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
8093
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
8094
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "animate-pulse", children: [
8095
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
8096
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
8097
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
8098
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
8099
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
7808
8100
  ] }),
7809
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "animate-pulse", children: [
7810
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
7811
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
7812
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
7813
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
7814
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
8101
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "animate-pulse", children: [
8102
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
8103
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
8104
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
8105
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
8106
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
7815
8107
  ] }),
7816
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "animate-pulse", children: [
7817
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
7818
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
7819
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
7820
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
7821
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
8108
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "animate-pulse", children: [
8109
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
8110
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
8111
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
8112
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
8113
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
7822
8114
  ] })
7823
8115
  ] })
7824
8116
  ] }) }),
@@ -7878,17 +8170,17 @@ function FormReducer(state, action) {
7878
8170
  var FormReducer_default = FormReducer;
7879
8171
 
7880
8172
  // src/components/dataForm/DataList.tsx
7881
- var import_jsx_runtime84 = require("react/jsx-runtime");
8173
+ var import_jsx_runtime85 = require("react/jsx-runtime");
7882
8174
  var DataList = (props) => {
7883
- const router = (0, import_navigation2.useRouter)();
8175
+ const router = (0, import_navigation3.useRouter)();
7884
8176
  let builder = new OdataBuilder(props.path);
7885
8177
  let orderBy = "";
7886
8178
  let activePageNumber = 0;
7887
8179
  let pages = 0;
7888
8180
  console.log(props.addLinkText);
7889
- const [isDataFound, setIsDataFound] = (0, import_react62.useState)(null);
7890
- const [searchTerm, setSearchTerm] = (0, import_react62.useState)(props.query?.searchTerm ?? "");
7891
- (0, import_react62.useEffect)(() => {
8181
+ const [isDataFound, setIsDataFound] = (0, import_react63.useState)(null);
8182
+ const [searchTerm, setSearchTerm] = (0, import_react63.useState)(props.query?.searchTerm ?? "");
8183
+ (0, import_react63.useEffect)(() => {
7892
8184
  if (props?.dataset) {
7893
8185
  if (props?.dataset.result && props.dataset.result.length > 0) {
7894
8186
  setIsDataFound(true);
@@ -7897,7 +8189,7 @@ var DataList = (props) => {
7897
8189
  }
7898
8190
  }
7899
8191
  }, [props.dataset]);
7900
- (0, import_react62.useEffect)(() => {
8192
+ (0, import_react63.useEffect)(() => {
7901
8193
  if (!props.query?.["$filter"] || !props.filters) return;
7902
8194
  const filterQuery = props.query["$filter"];
7903
8195
  props.filters.forEach((filter) => {
@@ -7916,7 +8208,7 @@ var DataList = (props) => {
7916
8208
  if (path.includes(".")) {
7917
8209
  return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
7918
8210
  } else if (Array.isArray(obj[path])) {
7919
- return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: item }, index));
8211
+ return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { children: item }, index));
7920
8212
  } else {
7921
8213
  return obj[path];
7922
8214
  }
@@ -7925,11 +8217,11 @@ var DataList = (props) => {
7925
8217
  inputValues: {},
7926
8218
  lastPropertyChanged: ""
7927
8219
  };
7928
- const [formState, dispatch] = (0, import_react62.useReducer)(FormReducer_default, initialState);
8220
+ const [formState, dispatch] = (0, import_react63.useReducer)(FormReducer_default, initialState);
7929
8221
  const getSearchableColumns = () => {
7930
8222
  return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
7931
8223
  };
7932
- const handleFilterChange = (0, import_react62.useCallback)(
8224
+ const handleFilterChange = (0, import_react63.useCallback)(
7933
8225
  (updatedValues) => {
7934
8226
  dispatch({
7935
8227
  type: FORM_INPUT_UPDATE,
@@ -7960,7 +8252,7 @@ var DataList = (props) => {
7960
8252
  },
7961
8253
  [dispatch, props, router]
7962
8254
  );
7963
- (0, import_react62.useEffect)(() => {
8255
+ (0, import_react63.useEffect)(() => {
7964
8256
  if (!props.columns.some((col) => col.isSearchable)) {
7965
8257
  return;
7966
8258
  }
@@ -7995,30 +8287,30 @@ var DataList = (props) => {
7995
8287
  const renderPageNumbers = () => {
7996
8288
  if (pages <= 10) {
7997
8289
  return Array.from({ length: pages }, (_, index) => index + 1).map(
7998
- (page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8290
+ (page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react63.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
7999
8291
  Hyperlink,
8000
8292
  {
8001
8293
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
8002
8294
  href: builder.getNewPageUrl(page),
8003
8295
  children: page
8004
8296
  }
8005
- ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
8297
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
8006
8298
  );
8007
8299
  } else {
8008
8300
  const showFirstPages = activePageNumber <= 5;
8009
8301
  const showLastPages = activePageNumber > pages - 5;
8010
8302
  if (showFirstPages) {
8011
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8012
- Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8303
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8304
+ Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react63.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8013
8305
  Hyperlink,
8014
8306
  {
8015
8307
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
8016
8308
  href: builder.getNewPageUrl(page),
8017
8309
  children: page
8018
8310
  }
8019
- ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
8020
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-2 py-1", children: "..." }),
8021
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8311
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
8312
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-2 py-1", children: "..." }),
8313
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8022
8314
  Hyperlink,
8023
8315
  {
8024
8316
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8026,7 +8318,7 @@ var DataList = (props) => {
8026
8318
  children: pages - 1
8027
8319
  }
8028
8320
  ),
8029
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8321
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8030
8322
  Hyperlink,
8031
8323
  {
8032
8324
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8034,7 +8326,7 @@ var DataList = (props) => {
8034
8326
  children: pages
8035
8327
  }
8036
8328
  ),
8037
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8329
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8038
8330
  "select",
8039
8331
  {
8040
8332
  className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
@@ -8046,18 +8338,18 @@ var DataList = (props) => {
8046
8338
  }
8047
8339
  },
8048
8340
  children: [
8049
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("option", { className: "", value: "", children: "Jump to" }),
8341
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("option", { className: "", value: "", children: "Jump to" }),
8050
8342
  Array.from(
8051
8343
  { length: Math.max(0, pages - 10) },
8052
8344
  (_, index) => index + 9
8053
- ).map((page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("option", { value: page, children: page }, page))
8345
+ ).map((page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("option", { value: page, children: page }, page))
8054
8346
  ]
8055
8347
  }
8056
8348
  ) })
8057
8349
  ] });
8058
8350
  } else if (showLastPages) {
8059
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8060
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8351
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8352
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8061
8353
  Hyperlink,
8062
8354
  {
8063
8355
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8065,7 +8357,7 @@ var DataList = (props) => {
8065
8357
  children: "1"
8066
8358
  }
8067
8359
  ),
8068
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8360
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8069
8361
  Hyperlink,
8070
8362
  {
8071
8363
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8073,21 +8365,21 @@ var DataList = (props) => {
8073
8365
  children: "2"
8074
8366
  }
8075
8367
  ),
8076
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-2 py-1", children: "..." }),
8368
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-2 py-1", children: "..." }),
8077
8369
  Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
8078
- (page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8370
+ (page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react63.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8079
8371
  Hyperlink,
8080
8372
  {
8081
8373
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
8082
8374
  href: builder.getNewPageUrl(page),
8083
8375
  children: page
8084
8376
  }
8085
- ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
8377
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
8086
8378
  )
8087
8379
  ] });
8088
8380
  } else {
8089
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8090
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8381
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
8382
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8091
8383
  Hyperlink,
8092
8384
  {
8093
8385
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8095,7 +8387,7 @@ var DataList = (props) => {
8095
8387
  children: "1"
8096
8388
  }
8097
8389
  ),
8098
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8390
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8099
8391
  Hyperlink,
8100
8392
  {
8101
8393
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8103,20 +8395,20 @@ var DataList = (props) => {
8103
8395
  children: "2"
8104
8396
  }
8105
8397
  ),
8106
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-2 py-1", children: "..." }),
8398
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-2 py-1", children: "..." }),
8107
8399
  Array.from(
8108
8400
  { length: 5 },
8109
8401
  (_, index) => activePageNumber - 2 + index
8110
- ).map((page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8402
+ ).map((page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react63.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8111
8403
  Hyperlink,
8112
8404
  {
8113
8405
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
8114
8406
  href: builder.getNewPageUrl(page),
8115
8407
  children: page
8116
8408
  }
8117
- ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
8118
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "px-2 py-1", children: "..." }),
8119
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8409
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
8410
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-2 py-1", children: "..." }),
8411
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8120
8412
  Hyperlink,
8121
8413
  {
8122
8414
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8124,7 +8416,7 @@ var DataList = (props) => {
8124
8416
  children: pages - 1
8125
8417
  }
8126
8418
  ),
8127
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8419
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8128
8420
  Hyperlink,
8129
8421
  {
8130
8422
  className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
@@ -8132,7 +8424,7 @@ var DataList = (props) => {
8132
8424
  children: pages
8133
8425
  }
8134
8426
  ),
8135
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8427
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8136
8428
  "select",
8137
8429
  {
8138
8430
  className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
@@ -8144,8 +8436,8 @@ var DataList = (props) => {
8144
8436
  }
8145
8437
  },
8146
8438
  children: [
8147
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("option", { value: "", children: "Jump to" }),
8148
- Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("option", { value: page, children: page }, page))
8439
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("option", { value: "", children: "Jump to" }),
8440
+ Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("option", { value: page, children: page }, page))
8149
8441
  ]
8150
8442
  }
8151
8443
  ) })
@@ -8153,16 +8445,16 @@ var DataList = (props) => {
8153
8445
  }
8154
8446
  }
8155
8447
  };
8156
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_react62.default.Fragment, { children: [
8157
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(ContentView_default, { isDataFound, children: [
8158
- (props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8448
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_react63.default.Fragment, { children: [
8449
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ContentView_default, { isDataFound, children: [
8450
+ (props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8159
8451
  "div",
8160
8452
  {
8161
8453
  className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
8162
8454
  children: [
8163
- props.title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", {}),
8164
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center gap-3", children: [
8165
- props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8455
+ props.title ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", {}),
8456
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-3", children: [
8457
+ props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8166
8458
  InputControl_default,
8167
8459
  {
8168
8460
  name: "Search_input",
@@ -8174,7 +8466,7 @@ var DataList = (props) => {
8174
8466
  }
8175
8467
  }
8176
8468
  ),
8177
- props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8469
+ props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8178
8470
  InputControl_default,
8179
8471
  {
8180
8472
  name: filter.name,
@@ -8189,15 +8481,15 @@ var DataList = (props) => {
8189
8481
  },
8190
8482
  filter.name
8191
8483
  )),
8192
- props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8484
+ props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8193
8485
  Hyperlink,
8194
8486
  {
8195
8487
  className: "gap-1",
8196
8488
  linkType: "Primary" /* Solid */,
8197
8489
  href: props.addLinkHref,
8198
8490
  children: [
8199
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
8200
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
8491
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
8492
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
8201
8493
  ]
8202
8494
  }
8203
8495
  )
@@ -8205,8 +8497,8 @@ var DataList = (props) => {
8205
8497
  ]
8206
8498
  }
8207
8499
  ),
8208
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
8209
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tr", { children: props?.columns?.map((column) => {
8500
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
8501
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: props?.columns?.map((column) => {
8210
8502
  let url = builder.getNewOrderByUrl(column.name);
8211
8503
  let icon = "chevronUpDown";
8212
8504
  if (orderBy.includes(`${column.name} desc`)) {
@@ -8216,18 +8508,18 @@ var DataList = (props) => {
8216
8508
  icon = "chevronUp";
8217
8509
  url = builder.getNewOrderByUrl(column.name + " desc");
8218
8510
  }
8219
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8511
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8220
8512
  "th",
8221
8513
  {
8222
8514
  className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
8223
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8515
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8224
8516
  Hyperlink,
8225
8517
  {
8226
8518
  href: column.enableSorting ? url : void 0,
8227
8519
  className: "!text-neutral-contrast ",
8228
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "flex items-center space-x-1", children: [
8229
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-black", children: column.label }),
8230
- column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
8520
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex items-center space-x-1", children: [
8521
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-black", children: column.label }),
8522
+ column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
8231
8523
  ] })
8232
8524
  }
8233
8525
  )
@@ -8235,22 +8527,22 @@ var DataList = (props) => {
8235
8527
  column.name
8236
8528
  );
8237
8529
  }) }) }),
8238
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
8530
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
8239
8531
  let validityClass = "";
8240
8532
  if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
8241
8533
  validityClass = "bg-alert-200";
8242
8534
  }
8243
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
8244
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8535
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
8536
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8245
8537
  "td",
8246
8538
  {
8247
8539
  className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
8248
- children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8540
+ children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8249
8541
  Hyperlink,
8250
8542
  {
8251
8543
  className: "",
8252
8544
  href: `https://${dataitem[column.name]}`,
8253
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8545
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8254
8546
  ViewControl_default,
8255
8547
  {
8256
8548
  controlType: column.controlType,
@@ -8263,11 +8555,11 @@ var DataList = (props) => {
8263
8555
  }
8264
8556
  )
8265
8557
  }
8266
- ) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8558
+ ) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8267
8559
  Hyperlink,
8268
8560
  {
8269
8561
  href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
8270
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8562
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8271
8563
  ViewControl_default,
8272
8564
  {
8273
8565
  controlType: column.controlType,
@@ -8277,7 +8569,7 @@ var DataList = (props) => {
8277
8569
  }
8278
8570
  )
8279
8571
  }
8280
- ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8572
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8281
8573
  ViewControl_default,
8282
8574
  {
8283
8575
  controlType: column.controlType,
@@ -8291,10 +8583,10 @@ var DataList = (props) => {
8291
8583
  }) }, index);
8292
8584
  }) })
8293
8585
  ] }) }),
8294
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center justify-between", children: [
8295
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-gray-700", children: label }),
8296
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex space-x-2 items-center", children: [
8297
- activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8586
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center justify-between", children: [
8587
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-gray-700", children: label }),
8588
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex space-x-2 items-center", children: [
8589
+ activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8298
8590
  Hyperlink,
8299
8591
  {
8300
8592
  className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
@@ -8302,9 +8594,9 @@ var DataList = (props) => {
8302
8594
  children: "Prev"
8303
8595
  }
8304
8596
  ),
8305
- activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
8597
+ activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
8306
8598
  renderPageNumbers(),
8307
- activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8599
+ activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8308
8600
  Hyperlink,
8309
8601
  {
8310
8602
  className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
@@ -8312,19 +8604,19 @@ var DataList = (props) => {
8312
8604
  children: "Next"
8313
8605
  }
8314
8606
  ),
8315
- activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
8607
+ activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
8316
8608
  ] })
8317
8609
  ] }) })
8318
8610
  ] }),
8319
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(NoContentView_default, { isDataFound, children: [
8320
- (props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8611
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(NoContentView_default, { isDataFound, children: [
8612
+ (props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8321
8613
  "div",
8322
8614
  {
8323
8615
  className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
8324
8616
  children: [
8325
- props.title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", {}),
8326
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center gap-3", children: [
8327
- props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8617
+ props.title ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", {}),
8618
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-3", children: [
8619
+ props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8328
8620
  InputControl_default,
8329
8621
  {
8330
8622
  name: "Search_input",
@@ -8336,7 +8628,7 @@ var DataList = (props) => {
8336
8628
  }
8337
8629
  }
8338
8630
  ),
8339
- props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8631
+ props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8340
8632
  InputControl_default,
8341
8633
  {
8342
8634
  name: filter.name,
@@ -8351,15 +8643,15 @@ var DataList = (props) => {
8351
8643
  },
8352
8644
  filter.name
8353
8645
  )),
8354
- props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8646
+ props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8355
8647
  Hyperlink,
8356
8648
  {
8357
8649
  className: "gap-1",
8358
8650
  linkType: "Primary" /* Solid */,
8359
8651
  href: props.addLinkHref,
8360
8652
  children: [
8361
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
8362
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
8653
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
8654
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
8363
8655
  ]
8364
8656
  }
8365
8657
  )
@@ -8367,8 +8659,8 @@ var DataList = (props) => {
8367
8659
  ]
8368
8660
  }
8369
8661
  ),
8370
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
8371
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("tr", { children: props?.columns?.map((column) => {
8662
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
8663
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tr", { children: props?.columns?.map((column) => {
8372
8664
  let url = builder.getNewOrderByUrl(column.name);
8373
8665
  let icon = "chevronUpDown";
8374
8666
  if (orderBy.includes(`${column.name} desc`)) {
@@ -8378,18 +8670,18 @@ var DataList = (props) => {
8378
8670
  icon = "chevronUp";
8379
8671
  url = builder.getNewOrderByUrl(column.name + " desc");
8380
8672
  }
8381
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8673
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8382
8674
  "th",
8383
8675
  {
8384
8676
  className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
8385
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8677
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8386
8678
  Hyperlink,
8387
8679
  {
8388
8680
  href: column.enableSorting ? url : void 0,
8389
8681
  className: "text-body-950",
8390
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "flex items-center space-x-1", children: [
8391
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: column.label }),
8392
- column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
8682
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "flex items-center space-x-1", children: [
8683
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: column.label }),
8684
+ column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
8393
8685
  ] })
8394
8686
  }
8395
8687
  )
@@ -8397,7 +8689,7 @@ var DataList = (props) => {
8397
8689
  column.name
8398
8690
  );
8399
8691
  }) }) }) }) }),
8400
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
8692
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
8401
8693
  ] })
8402
8694
  ] })
8403
8695
  ] });
@@ -8405,12 +8697,12 @@ var DataList = (props) => {
8405
8697
  var DataList_default = DataList;
8406
8698
 
8407
8699
  // src/components/dataForm/DataListRenderer.tsx
8408
- var import_react63 = __toESM(require("react"));
8700
+ var import_react64 = __toESM(require("react"));
8409
8701
  init_ServiceClient();
8410
8702
  init_OdataBuilder();
8411
8703
  init_SelectWithSearchInput();
8412
- var import_navigation3 = require("next/navigation");
8413
- var import_jsx_runtime85 = require("react/jsx-runtime");
8704
+ var import_navigation4 = require("next/navigation");
8705
+ var import_jsx_runtime86 = require("react/jsx-runtime");
8414
8706
  var viewControlMap = {
8415
8707
  number: ViewControlTypes.number,
8416
8708
  lineText: ViewControlTypes.lineText,
@@ -8465,14 +8757,14 @@ var DataListRenderer = ({
8465
8757
  widgetProps
8466
8758
  }) => {
8467
8759
  const serviceClient = new ServiceClient_default(apiBaseUrl, session);
8468
- const [columns, setColumns] = (0, import_react63.useState)([]);
8469
- const [dataset, setDataset] = (0, import_react63.useState)();
8470
- const [filter, setFilters] = (0, import_react63.useState)([]);
8471
- const [addLinkHref, setAddLinkHref] = (0, import_react63.useState)("");
8472
- const [addLinkText, setAddLinkText] = (0, import_react63.useState)("");
8473
- const [serviceRoute, setServiceRoute] = (0, import_react63.useState)("");
8474
- const pathname = (0, import_navigation3.usePathname)();
8475
- (0, import_react63.useEffect)(() => {
8760
+ const [columns, setColumns] = (0, import_react64.useState)([]);
8761
+ const [dataset, setDataset] = (0, import_react64.useState)();
8762
+ const [filter, setFilters] = (0, import_react64.useState)([]);
8763
+ const [addLinkHref, setAddLinkHref] = (0, import_react64.useState)("");
8764
+ const [addLinkText, setAddLinkText] = (0, import_react64.useState)("");
8765
+ const [serviceRoute, setServiceRoute] = (0, import_react64.useState)("");
8766
+ const pathname = (0, import_navigation4.usePathname)();
8767
+ (0, import_react64.useEffect)(() => {
8476
8768
  if (!formDefinition) return;
8477
8769
  setColumns(mapApiToColumns(formDefinition));
8478
8770
  setFilters(mapApiToFilters(formDefinition));
@@ -8485,7 +8777,7 @@ var DataListRenderer = ({
8485
8777
  setAddLinkHref(resolvedAddLinkHref);
8486
8778
  setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
8487
8779
  }, [formDefinition, params]);
8488
- (0, import_react63.useEffect)(() => {
8780
+ (0, import_react64.useEffect)(() => {
8489
8781
  const fetchData = async () => {
8490
8782
  if (!serviceRoute) return;
8491
8783
  const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
@@ -8505,13 +8797,13 @@ var DataListRenderer = ({
8505
8797
  isActive: landingPageUrl === pathname
8506
8798
  };
8507
8799
  });
8508
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_react63.default.Fragment, { children: [
8800
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_react64.default.Fragment, { children: [
8509
8801
  resolvedTabs.length > 0 && // <NavigationTabsV2
8510
8802
  // tabs={resolvedTabs}
8511
8803
  // params={(widgetProps?.params ?? params) as Record<string, any>}
8512
8804
  // />
8513
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
8514
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8805
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
8806
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8515
8807
  DataList_default,
8516
8808
  {
8517
8809
  addLinkHref,
@@ -8533,13 +8825,15 @@ var DataListRenderer_default = DataListRenderer;
8533
8825
  init_InputControlType();
8534
8826
 
8535
8827
  // src/components/dataForm/DataForm.tsx
8536
- var import_react65 = __toESM(require("react"));
8828
+ var import_react66 = __toESM(require("react"));
8829
+ init_InputControl();
8537
8830
  init_Icon();
8538
8831
  init_Button();
8539
8832
  init_StyleTypes();
8540
8833
 
8541
8834
  // src/components/dataForm/DataFormChildSection.tsx
8542
- var import_react64 = __toESM(require("react"));
8835
+ var import_react65 = __toESM(require("react"));
8836
+ init_InputControl();
8543
8837
 
8544
8838
  // src/components/dataForm/StyleTypes.tsx
8545
8839
  var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
@@ -8566,7 +8860,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
8566
8860
  var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
8567
8861
 
8568
8862
  // src/components/dataForm/DataFormChildSection.tsx
8569
- var import_jsx_runtime86 = require("react/jsx-runtime");
8863
+ var import_jsx_runtime87 = require("react/jsx-runtime");
8570
8864
  var DataFormChildSection = (props) => {
8571
8865
  const { section } = props;
8572
8866
  const isOneToOne = section.relationshipType === "one-to-one";
@@ -8578,7 +8872,7 @@ var DataFormChildSection = (props) => {
8578
8872
  return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
8579
8873
  };
8580
8874
  const childItemsToRender = getChildItemsForRendering();
8581
- const handleChildInputChange = (0, import_react64.useCallback)(
8875
+ const handleChildInputChange = (0, import_react65.useCallback)(
8582
8876
  (updatedValues) => {
8583
8877
  if (isOneToOne) {
8584
8878
  props.callback({
@@ -8605,7 +8899,7 @@ var DataFormChildSection = (props) => {
8605
8899
  },
8606
8900
  [props, isOneToOne, childItemsToRender]
8607
8901
  );
8608
- const onAddRow = (0, import_react64.useCallback)(() => {
8902
+ const onAddRow = (0, import_react65.useCallback)(() => {
8609
8903
  props.callback({
8610
8904
  sectionName: props.section.name,
8611
8905
  actionType: FORM_CHILD_ROW_ADD,
@@ -8614,7 +8908,7 @@ var DataFormChildSection = (props) => {
8614
8908
  rowIndex: -1
8615
8909
  });
8616
8910
  }, [props]);
8617
- const onDeleteRow = (0, import_react64.useCallback)(
8911
+ const onDeleteRow = (0, import_react65.useCallback)(
8618
8912
  (filteredIndex) => {
8619
8913
  const visibleItem = childItemsToRender[filteredIndex];
8620
8914
  if (visibleItem) {
@@ -8634,14 +8928,14 @@ var DataFormChildSection = (props) => {
8634
8928
  childItemsToRender,
8635
8929
  allChildItems: childItems
8636
8930
  });
8637
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react64.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
8638
- section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
8639
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
8640
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
8641
- (!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
8642
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("tr", { className: "", children: [
8931
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react65.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
8932
+ section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
8933
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
8934
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
8935
+ (!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
8936
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("tr", { className: "", children: [
8643
8937
  sectionRow.elements.map((field, index) => {
8644
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8938
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8645
8939
  "th",
8646
8940
  {
8647
8941
  className: "py-3 font-normal text-left",
@@ -8650,21 +8944,21 @@ var DataFormChildSection = (props) => {
8650
8944
  field.name
8651
8945
  );
8652
8946
  }),
8653
- !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
8947
+ !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
8654
8948
  ] }, sectionRowIndex);
8655
8949
  }) }),
8656
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
8950
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
8657
8951
  const { item, originalIndex } = visibleItem;
8658
8952
  const rowKey = originalIndex;
8659
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react64.default.Fragment, { children: section.sectionRows.map(
8953
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react65.default.Fragment, { children: section.sectionRows.map(
8660
8954
  (sectionRow, sectionRowIndex) => {
8661
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
8955
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
8662
8956
  "tr",
8663
8957
  {
8664
8958
  className: "",
8665
8959
  children: [
8666
8960
  sectionRow.elements.map((field, index) => {
8667
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8961
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8668
8962
  InputControl_default,
8669
8963
  {
8670
8964
  index: filteredIndex,
@@ -8684,7 +8978,7 @@ var DataFormChildSection = (props) => {
8684
8978
  }
8685
8979
  ) }) }) }, field.name);
8686
8980
  }),
8687
- !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8981
+ !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8688
8982
  ClientButton_default,
8689
8983
  {
8690
8984
  ButtonType: StyleTypes2.Hollow,
@@ -8693,7 +8987,7 @@ var DataFormChildSection = (props) => {
8693
8987
  },
8694
8988
  dataRole: "delete",
8695
8989
  tabIndex: -1,
8696
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
8990
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8697
8991
  Icon_default,
8698
8992
  {
8699
8993
  className: "w-4 h-4",
@@ -8710,7 +9004,7 @@ var DataFormChildSection = (props) => {
8710
9004
  ) }, rowKey);
8711
9005
  }) })
8712
9006
  ] }) }),
8713
- !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9007
+ !section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
8714
9008
  ClientButton_default,
8715
9009
  {
8716
9010
  ButtonType: "Link" /* Link */,
@@ -8725,9 +9019,9 @@ var DataFormChildSection = (props) => {
8725
9019
  var DataFormChildSection_default = DataFormChildSection;
8726
9020
 
8727
9021
  // src/components/dataForm/DataForm.tsx
8728
- var import_jsx_runtime87 = require("react/jsx-runtime");
9022
+ var import_jsx_runtime88 = require("react/jsx-runtime");
8729
9023
  var DataForm = (props) => {
8730
- const formRef = (0, import_react65.useRef)(null);
9024
+ const formRef = (0, import_react66.useRef)(null);
8731
9025
  console.log(props.dataItem, "dssads");
8732
9026
  const initialState = {
8733
9027
  inputValues: {},
@@ -8736,9 +9030,9 @@ var DataForm = (props) => {
8736
9030
  const childInitialState = {
8737
9031
  inputValues: []
8738
9032
  };
8739
- const [formState, dispatch] = (0, import_react65.useReducer)(FormReducer_default, initialState);
9033
+ const [formState, dispatch] = (0, import_react66.useReducer)(FormReducer_default, initialState);
8740
9034
  console.log(props.sections, "sections");
8741
- const clearHiddenChildSections = (0, import_react65.useCallback)(
9035
+ const clearHiddenChildSections = (0, import_react66.useCallback)(
8742
9036
  (changedProperty, newValues) => {
8743
9037
  if (!props.sections) return;
8744
9038
  const allChildSections = [];
@@ -8776,7 +9070,7 @@ var DataForm = (props) => {
8776
9070
  },
8777
9071
  [props.sections, formState.inputValues]
8778
9072
  );
8779
- const handleInputChange = (0, import_react65.useCallback)(
9073
+ const handleInputChange = (0, import_react66.useCallback)(
8780
9074
  async (updatedValues) => {
8781
9075
  dispatch({
8782
9076
  type: FORM_INPUT_UPDATE,
@@ -8791,7 +9085,7 @@ var DataForm = (props) => {
8791
9085
  },
8792
9086
  [dispatch, formState.inputValues, clearHiddenChildSections]
8793
9087
  );
8794
- const fetchData = (0, import_react65.useCallback)(async () => {
9088
+ const fetchData = (0, import_react66.useCallback)(async () => {
8795
9089
  if (!props.rules) return;
8796
9090
  if (Object.keys(formState.inputValues).length === 0) {
8797
9091
  return;
@@ -8822,7 +9116,7 @@ var DataForm = (props) => {
8822
9116
  console.error("Error fetching data:", error);
8823
9117
  }
8824
9118
  }, [formState.lastPropertyChanged, formState.inputValues]);
8825
- (0, import_react65.useEffect)(() => {
9119
+ (0, import_react66.useEffect)(() => {
8826
9120
  fetchData();
8827
9121
  }, [formState.inputValues, formState.lastPropertyChanged]);
8828
9122
  function replacePlaceholders(template, context, params) {
@@ -8842,7 +9136,7 @@ var DataForm = (props) => {
8842
9136
  }
8843
9137
  );
8844
9138
  }
8845
- const handleChildSectionChangeCallback = (0, import_react65.useCallback)(
9139
+ const handleChildSectionChangeCallback = (0, import_react66.useCallback)(
8846
9140
  (params) => {
8847
9141
  dispatch({
8848
9142
  type: params.actionType,
@@ -8887,7 +9181,7 @@ var DataForm = (props) => {
8887
9181
  });
8888
9182
  return cloned;
8889
9183
  }
8890
- const onClick = (0, import_react65.useCallback)(async () => {
9184
+ const onClick = (0, import_react66.useCallback)(async () => {
8891
9185
  if (props.onClick) {
8892
9186
  const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
8893
9187
  const normalizedValues = normalizeChildSections(
@@ -8903,21 +9197,21 @@ var DataForm = (props) => {
8903
9197
  return { isSuccessful: true };
8904
9198
  }
8905
9199
  }, [formState, props]);
8906
- const handleAdditionalOnClick = (0, import_react65.useCallback)(async () => {
9200
+ const handleAdditionalOnClick = (0, import_react66.useCallback)(async () => {
8907
9201
  if (props.additionalActions?.onClick) {
8908
9202
  return await props.additionalActions.onClick(formState);
8909
9203
  } else {
8910
9204
  return { isSuccessful: true, message: "Action completed successfully" };
8911
9205
  }
8912
9206
  }, [formState, props]);
8913
- const onDelete = (0, import_react65.useCallback)(async () => {
9207
+ const onDelete = (0, import_react66.useCallback)(async () => {
8914
9208
  if (props.onDelete) {
8915
9209
  return await props.onDelete(formState);
8916
9210
  } else {
8917
9211
  return { isSuccessful: true };
8918
9212
  }
8919
9213
  }, [formState, props]);
8920
- (0, import_react65.useEffect)(() => {
9214
+ (0, import_react66.useEffect)(() => {
8921
9215
  if (props.dataItem) {
8922
9216
  dispatch({
8923
9217
  type: FORM_INITIAL_UPDATE,
@@ -8945,19 +9239,19 @@ var DataForm = (props) => {
8945
9239
  return false;
8946
9240
  }
8947
9241
  }
8948
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react65.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex-grow flex flex-col", children: [
8949
- props.title && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
9242
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react66.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex-grow flex flex-col", children: [
9243
+ props.title && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
8950
9244
  "div",
8951
9245
  {
8952
9246
  className: "inline-flex items-center gap-2 cursor-pointer",
8953
9247
  onClick: () => window.history.back(),
8954
9248
  children: [
8955
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
8956
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
9249
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
9250
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
8957
9251
  ]
8958
9252
  }
8959
9253
  ) }),
8960
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9254
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8961
9255
  "form",
8962
9256
  {
8963
9257
  className: "group space-y-6 pb-6 overflow-y-auto",
@@ -8978,8 +9272,8 @@ var DataForm = (props) => {
8978
9272
  }
8979
9273
  }
8980
9274
  },
8981
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
8982
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react65.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
9275
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
9276
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react66.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
8983
9277
  section.sectionRows?.map(
8984
9278
  (sectionRow, sectionRowIndex) => {
8985
9279
  const elementsCount = sectionRow.elements.length;
@@ -8990,14 +9284,14 @@ var DataForm = (props) => {
8990
9284
  sectionRow.visible
8991
9285
  );
8992
9286
  }
8993
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react65.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
8994
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
9287
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react66.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
9288
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
8995
9289
  "div",
8996
9290
  {
8997
9291
  className: sectionRow.grow ? "grow" : "",
8998
9292
  children: [
8999
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: field.controlType }),
9000
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9293
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: field.controlType }),
9294
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9001
9295
  InputControl_default,
9002
9296
  {
9003
9297
  name: field.name,
@@ -9027,12 +9321,12 @@ var DataForm = (props) => {
9027
9321
  }) }) }, sectionRowIndex);
9028
9322
  }
9029
9323
  ),
9030
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: section.childSections?.map(
9324
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: section.childSections?.map(
9031
9325
  (childSection, childSectionIndex) => {
9032
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: childSection.name && evalutateCondition(
9326
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: childSection.name && evalutateCondition(
9033
9327
  formState.inputValues,
9034
9328
  childSection.visible
9035
- ) && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9329
+ ) && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9036
9330
  DataFormChildSection_default,
9037
9331
  {
9038
9332
  section: childSection,
@@ -9047,8 +9341,8 @@ var DataForm = (props) => {
9047
9341
  }) })
9048
9342
  }
9049
9343
  ),
9050
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
9051
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9344
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
9345
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9052
9346
  Button_default,
9053
9347
  {
9054
9348
  ButtonType: "PrimaryHollow" /* Hollow */,
@@ -9056,7 +9350,7 @@ var DataForm = (props) => {
9056
9350
  children: props.additionalActions.title
9057
9351
  }
9058
9352
  ) }),
9059
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9353
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9060
9354
  Button_default,
9061
9355
  {
9062
9356
  ButtonType: "PrimaryHollow" /* Hollow */,
@@ -9067,7 +9361,7 @@ var DataForm = (props) => {
9067
9361
  children: "Delete"
9068
9362
  }
9069
9363
  ) }),
9070
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9364
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9071
9365
  Button_default,
9072
9366
  {
9073
9367
  onValidate,
@@ -9085,7 +9379,7 @@ var DataForm_default = DataForm;
9085
9379
 
9086
9380
  // src/components/dataForm/DataFormRenderer.tsx
9087
9381
  init_ServiceClient();
9088
- var import_jsx_runtime88 = require("react/jsx-runtime");
9382
+ var import_jsx_runtime89 = require("react/jsx-runtime");
9089
9383
  function getAction(actions, code) {
9090
9384
  return actions?.find((a) => a.actionCode === code);
9091
9385
  }
@@ -9111,9 +9405,9 @@ var DataFormRenderer = ({
9111
9405
  "Delete"
9112
9406
  );
9113
9407
  const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
9114
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex-grow flex flex-col", children: [
9115
- widgetProps && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
9116
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9408
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex-grow flex flex-col", children: [
9409
+ widgetProps && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
9410
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9117
9411
  DataForm_default,
9118
9412
  {
9119
9413
  title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",