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

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 +616 -311
  25. package/dist/index.mjs +101 -54
  26. package/dist/server.d.mts +17 -6
  27. package/dist/server.d.ts +17 -6
  28. package/dist/server.js +2717 -298
  29. package/dist/server.mjs +86 -52
  30. package/package.json +1 -1
  31. package/dist/LinkNodeButton-KZRNRJRI.mjs +0 -467
@@ -3,7 +3,7 @@
3
3
  "use client";
4
4
  import {
5
5
  ServiceClient_default
6
- } from "./chunk-WEV5U33G.mjs";
6
+ } from "./chunk-TKDSRAM6.mjs";
7
7
  import {
8
8
  Button_default,
9
9
  ToastService_default
@@ -0,0 +1,225 @@
1
+ "use client";
2
+ import {
3
+ Button_default,
4
+ ToastService_default
5
+ } from "./chunk-RHVNJMS4.mjs";
6
+ import {
7
+ ServiceClient_default
8
+ } from "./chunk-WXZMRMRS.mjs";
9
+ import "./chunk-56HSDML5.mjs";
10
+
11
+ // src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx
12
+ import { useCallback, useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ var LinkNodeButton = (props) => {
15
+ const { node, dataitem, children, linkText, linkType, linkUrl } = props;
16
+ const [isLoading, setIsLoading] = useState(false);
17
+ const [successMessage, setSuccessMessage] = useState(null);
18
+ console.log("LinkNodeButton props:", props);
19
+ const extractFieldNames = useCallback((template) => {
20
+ if (!template) return [];
21
+ const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
22
+ const matches = Array.from(template.matchAll(regex));
23
+ const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
24
+ return fieldNames;
25
+ }, []);
26
+ const replaceTemplateVariables = useCallback(
27
+ (template, responseData) => {
28
+ if (!template) return template;
29
+ let result = template;
30
+ const fieldNames = extractFieldNames(template);
31
+ if (responseData) {
32
+ fieldNames.forEach((fieldName) => {
33
+ const value = getNestedValue(responseData, fieldName);
34
+ if (value !== void 0) {
35
+ const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
36
+ const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
37
+ result = result.replace(regex1, String(value));
38
+ result = result.replace(regex2, String(value));
39
+ }
40
+ });
41
+ }
42
+ if (props.routeParameters) {
43
+ Object.entries(props.routeParameters).forEach(([key, value]) => {
44
+ const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
45
+ result = result.replace(regex, String(value));
46
+ });
47
+ }
48
+ if (dataitem) {
49
+ Object.entries(dataitem).forEach(([key, value]) => {
50
+ const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
51
+ result = result.replace(regex, String(value));
52
+ });
53
+ }
54
+ return result;
55
+ },
56
+ [props.routeParameters, dataitem, extractFieldNames]
57
+ );
58
+ const getNestedValue = useCallback((obj, path) => {
59
+ if (!obj || !path) return void 0;
60
+ if (obj[path] !== void 0) {
61
+ return obj[path];
62
+ }
63
+ const keys = path.split(".");
64
+ let current = obj;
65
+ for (const key of keys) {
66
+ if (current[key] === void 0) {
67
+ return void 0;
68
+ }
69
+ current = current[key];
70
+ }
71
+ return current;
72
+ }, []);
73
+ const onClick = useCallback(async () => {
74
+ if (!node.postUrl) {
75
+ return {
76
+ isSuccessful: false,
77
+ message: "No POST URL configured for this button"
78
+ };
79
+ }
80
+ setIsLoading(true);
81
+ try {
82
+ const resolvedPostUrl = replaceTemplateVariables(node.postUrl);
83
+ let parsedPayload = {};
84
+ if (node.payload) {
85
+ try {
86
+ const payloadStr = replaceTemplateVariables(node.payload);
87
+ parsedPayload = JSON.parse(payloadStr);
88
+ console.log("Parsed payload:", parsedPayload);
89
+ } catch (err) {
90
+ console.error("Failed to parse payload JSON:", err);
91
+ parsedPayload = { error: "Invalid payload JSON" };
92
+ }
93
+ }
94
+ const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
95
+ const response = await serviceClient.post(resolvedPostUrl, parsedPayload);
96
+ console.log("API Response:", response);
97
+ if (response && !response.isSuccessful) {
98
+ const errorMessage = response.message || "API request failed";
99
+ setIsLoading(false);
100
+ return { isSuccessful: false, message: errorMessage };
101
+ }
102
+ if (response?.message) {
103
+ ToastService_default.showSuccess(response.message);
104
+ setSuccessMessage(response.message);
105
+ }
106
+ if (response && node.redirectUrl) {
107
+ const fieldNames = extractFieldNames(node.redirectUrl);
108
+ console.log("Field names in redirect URL:", fieldNames);
109
+ const fieldValueMap = {};
110
+ fieldNames.forEach((fieldName) => {
111
+ const value = getNestedValue(response, fieldName);
112
+ if (value !== void 0) {
113
+ fieldValueMap[fieldName] = String(value);
114
+ } else {
115
+ const resultValue = getNestedValue(response, `result.${fieldName}`);
116
+ if (resultValue !== void 0) {
117
+ fieldValueMap[fieldName] = String(resultValue);
118
+ } else {
119
+ const dataValue = getNestedValue(response, `data.${fieldName}`);
120
+ if (dataValue !== void 0) {
121
+ fieldValueMap[fieldName] = String(dataValue);
122
+ }
123
+ }
124
+ }
125
+ });
126
+ console.log("Field value map:", fieldValueMap);
127
+ const missingFields = fieldNames.filter(
128
+ (fieldName) => !fieldValueMap[fieldName]
129
+ );
130
+ if (missingFields.length > 0) {
131
+ console.warn(`Missing field values for: ${missingFields.join(", ")}`);
132
+ }
133
+ let resolvedRedirectUrl = node.redirectUrl;
134
+ Object.entries(fieldValueMap).forEach(([fieldName, value]) => {
135
+ const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
136
+ const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
137
+ resolvedRedirectUrl = resolvedRedirectUrl.replace(regex1, value);
138
+ resolvedRedirectUrl = resolvedRedirectUrl.replace(regex2, value);
139
+ });
140
+ resolvedRedirectUrl = replaceTemplateVariables(
141
+ resolvedRedirectUrl,
142
+ response
143
+ );
144
+ console.log("Final redirect URL:", resolvedRedirectUrl);
145
+ if (resolvedRedirectUrl && !resolvedRedirectUrl.includes("{")) {
146
+ window.location.href = resolvedRedirectUrl;
147
+ }
148
+ } else if (!response) {
149
+ const errorMessage = "No response from server";
150
+ setIsLoading(false);
151
+ return { isSuccessful: false, message: errorMessage };
152
+ }
153
+ setIsLoading(false);
154
+ return {
155
+ isSuccessful: true,
156
+ message: response?.message,
157
+ result: response
158
+ };
159
+ } catch (err) {
160
+ console.error("Button API call failed:", err);
161
+ const errorMessage = err.message || "An unexpected error occurred";
162
+ setIsLoading(false);
163
+ return { isSuccessful: false, message: errorMessage };
164
+ }
165
+ }, [
166
+ node.postUrl,
167
+ node.payload,
168
+ node.redirectUrl,
169
+ replaceTemplateVariables,
170
+ extractFieldNames,
171
+ getNestedValue,
172
+ props.apiBaseUrl,
173
+ props.session
174
+ ]);
175
+ const renderButtonContent = () => {
176
+ if (children) {
177
+ return children;
178
+ }
179
+ if (linkText) {
180
+ return /* @__PURE__ */ jsx("span", { children: linkText });
181
+ }
182
+ return node.title || "Button";
183
+ };
184
+ const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
185
+ return /* @__PURE__ */ jsx("div", { className: "link-button-wrapper", children: /* @__PURE__ */ jsx(
186
+ Button_default,
187
+ {
188
+ ButtonType: linkType,
189
+ onClick,
190
+ disabled: isLoading || !!successMessage,
191
+ className: "w-full",
192
+ children: successMessage ? /* @__PURE__ */ jsxs(
193
+ "span",
194
+ {
195
+ style: fontSize ? { fontSize } : void 0,
196
+ className: "inline-flex items-center gap-2",
197
+ children: [
198
+ /* @__PURE__ */ jsx(
199
+ "svg",
200
+ {
201
+ xmlns: "http://www.w3.org/2000/svg",
202
+ viewBox: "0 0 20 20",
203
+ fill: "currentColor",
204
+ className: "w-5 h-5",
205
+ children: /* @__PURE__ */ jsx(
206
+ "path",
207
+ {
208
+ fillRule: "evenodd",
209
+ d: "M16.704 5.29a1 1 0 010 1.42l-7.25 7.25a1 1 0 01-1.415 0L3.29 9.21a1 1 0 111.415-1.414l4.042 4.042 6.543-6.543a1 1 0 011.414 0z",
210
+ clipRule: "evenodd"
211
+ }
212
+ )
213
+ }
214
+ ),
215
+ /* @__PURE__ */ jsx("span", { children: successMessage })
216
+ ]
217
+ }
218
+ ) : renderButtonContent()
219
+ }
220
+ ) });
221
+ };
222
+ var LinkNodeButton_default = LinkNodeButton;
223
+ export {
224
+ LinkNodeButton_default as default
225
+ };
@@ -3,12 +3,14 @@
3
3
  "use client";
4
4
  import {
5
5
  OdataBuilder
6
- } from "./chunk-KL2YKXXS.mjs";
6
+ } from "./chunk-4P4HO663.mjs";
7
7
  import {
8
- Constants,
9
8
  Hyperlink,
10
9
  Icon_default
11
- } from "./chunk-YDPISYMP.mjs";
10
+ } from "./chunk-GCG4OYDJ.mjs";
11
+ import {
12
+ Constants
13
+ } from "./chunk-E4VOFO5Q.mjs";
12
14
  import "./chunk-IMNQO57B.mjs";
13
15
 
14
16
  // src/components/Pagination.tsx
@@ -1,65 +1,21 @@
1
1
  "use client";
2
2
  import {
3
- Constants,
4
- Hyperlink,
3
+ Icon_default
4
+ } from "./chunk-6PW2RLUJ.mjs";
5
+ import {
5
6
  OdataBuilder
6
- } from "./chunk-TVL6KVD5.mjs";
7
+ } from "./chunk-Q46GMD3P.mjs";
8
+ import {
9
+ Hyperlink
10
+ } from "./chunk-2R26M6CK.mjs";
11
+ import {
12
+ Constants
13
+ } from "./chunk-4R7F7LBL.mjs";
7
14
  import "./chunk-56HSDML5.mjs";
8
15
 
9
16
  // src/components/Pagination.tsx
10
17
  import { useMemo } from "react";
11
-
12
- // src/svg/chevron-updown.tsx
13
- import { jsx } from "react/jsx-runtime";
14
- var ChevronUpDown = (props) => {
15
- return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
16
- };
17
- var chevron_updown_default = ChevronUpDown;
18
-
19
- // src/svg/chevron-down.tsx
20
- import { jsx as jsx2 } from "react/jsx-runtime";
21
- var ChevronDown = (props) => {
22
- return /* @__PURE__ */ jsx2("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx2("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
23
- };
24
- var chevron_down_default = ChevronDown;
25
-
26
- // src/svg/chevron-up.tsx
27
- import { jsx as jsx3 } from "react/jsx-runtime";
28
- var ChevronUp = (props) => {
29
- return /* @__PURE__ */ jsx3("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
30
- };
31
- var chevron_up_default = ChevronUp;
32
-
33
- // src/svg/plus.tsx
34
- import { jsx as jsx4 } from "react/jsx-runtime";
35
- var Plus = (props) => {
36
- return /* @__PURE__ */ jsx4("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
37
- };
38
- var plus_default = Plus;
39
-
40
- // src/svg/Icons.tsx
41
- var Icons = {
42
- chevronUpDown: chevron_updown_default,
43
- chevronDown: chevron_down_default,
44
- chevronUp: chevron_up_default,
45
- plus: plus_default
46
- };
47
- var Icons_default = Icons;
48
-
49
- // src/svg/Icon.tsx
50
- import { jsx as jsx5 } from "react/jsx-runtime";
51
- var Icon = ({ name, className, ...props }) => {
52
- const IconComponent = Icons_default[name];
53
- if (!IconComponent) {
54
- console.error(`Icon "${name}" not found.`);
55
- return null;
56
- }
57
- return /* @__PURE__ */ jsx5(IconComponent, { ...props, className });
58
- };
59
- var Icon_default = Icon;
60
-
61
- // src/components/Pagination.tsx
62
- import { jsx as jsx6, jsxs } from "react/jsx-runtime";
18
+ import { jsx, jsxs } from "react/jsx-runtime";
63
19
  var Pagination = (props) => {
64
20
  const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
65
21
  const builder = useMemo(() => {
@@ -103,7 +59,7 @@ var Pagination = (props) => {
103
59
  return range;
104
60
  };
105
61
  const paginationRange = getPaginationRange();
106
- const PageButton = ({ page, children }) => /* @__PURE__ */ jsx6(
62
+ const PageButton = ({ page, children }) => /* @__PURE__ */ jsx(
107
63
  Hyperlink,
108
64
  {
109
65
  linkType: "Link" /* Link */,
@@ -118,9 +74,9 @@ var Pagination = (props) => {
118
74
  );
119
75
  const NavigationButton = ({ page, disabled, children }) => {
120
76
  if (disabled) {
121
- return /* @__PURE__ */ jsx6("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
77
+ return /* @__PURE__ */ jsx("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
122
78
  }
123
- return /* @__PURE__ */ jsx6(
79
+ return /* @__PURE__ */ jsx(
124
80
  Hyperlink,
125
81
  {
126
82
  className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
@@ -141,7 +97,7 @@ var Pagination = (props) => {
141
97
  ] }),
142
98
  " ",
143
99
  "out of ",
144
- /* @__PURE__ */ jsx6("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
100
+ /* @__PURE__ */ jsx("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
145
101
  " results"
146
102
  ] }),
147
103
  totalPages > 1 && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-1", children: [
@@ -151,14 +107,14 @@ var Pagination = (props) => {
151
107
  page: activePageNumber - 1,
152
108
  disabled: activePageNumber === 1,
153
109
  children: [
154
- /* @__PURE__ */ jsx6("span", { children: /* @__PURE__ */ jsx6(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
155
- /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "Prev" })
110
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
111
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Prev" })
156
112
  ]
157
113
  }
158
114
  ),
159
115
  paginationRange.map((item, index) => {
160
116
  if (item === "...") {
161
- return /* @__PURE__ */ jsx6(
117
+ return /* @__PURE__ */ jsx(
162
118
  "span",
163
119
  {
164
120
  className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
@@ -168,7 +124,7 @@ var Pagination = (props) => {
168
124
  );
169
125
  }
170
126
  const page = item;
171
- return /* @__PURE__ */ jsx6(PageButton, { page, children: page }, page);
127
+ return /* @__PURE__ */ jsx(PageButton, { page, children: page }, page);
172
128
  }),
173
129
  /* @__PURE__ */ jsxs(
174
130
  NavigationButton,
@@ -176,15 +132,15 @@ var Pagination = (props) => {
176
132
  page: activePageNumber + 1,
177
133
  disabled: activePageNumber === totalPages,
178
134
  children: [
179
- /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "Next" }),
180
- /* @__PURE__ */ jsx6("span", { children: /* @__PURE__ */ jsx6(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
135
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Next" }),
136
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
181
137
  ]
182
138
  }
183
139
  )
184
140
  ] }),
185
141
  showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
186
- /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "Go to:" }),
187
- /* @__PURE__ */ jsx6("div", { className: "relative", children: /* @__PURE__ */ jsx6(
142
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Go to:" }),
143
+ /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
188
144
  "input",
189
145
  {
190
146
  type: "number",
@@ -205,9 +161,9 @@ var Pagination = (props) => {
205
161
  ) })
206
162
  ] })
207
163
  ] }),
208
- showPageSizeSelector && /* @__PURE__ */ jsx6("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
209
- /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "Show:" }),
210
- /* @__PURE__ */ jsx6("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx6(
164
+ showPageSizeSelector && /* @__PURE__ */ jsx("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
165
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Show:" }),
166
+ /* @__PURE__ */ jsx("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx(
211
167
  Hyperlink,
212
168
  {
213
169
  className: `
@@ -219,7 +175,7 @@ var Pagination = (props) => {
219
175
  },
220
176
  size
221
177
  )) }),
222
- /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "per page" })
178
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: "per page" })
223
179
  ] }) })
224
180
  ] });
225
181
  };
@@ -0,0 +1,30 @@
1
+ import {
2
+ buttonClasses
3
+ } from "./chunk-56HSDML5.mjs";
4
+
5
+ // src/components/dataForm/Hyperlink.tsx
6
+ import Link from "next/link";
7
+ import { Fragment, jsx } from "react/jsx-runtime";
8
+ function Hyperlink(props) {
9
+ let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
10
+ const target = props?.href?.startsWith("http") ? "_blank" : "_self";
11
+ const additionalProps = {};
12
+ if (target == "_blank") {
13
+ additionalProps.rel = "noopener noreferrer";
14
+ }
15
+ return /* @__PURE__ */ jsx(Fragment, { children: props.href ? /* @__PURE__ */ jsx(
16
+ Link,
17
+ {
18
+ href: props.href,
19
+ prefetch: false,
20
+ className: [linkClass, props.className].filter(Boolean).join(" "),
21
+ ...additionalProps,
22
+ target,
23
+ children: props.children
24
+ }
25
+ ) : props.isHeading ? /* @__PURE__ */ jsx("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx("span", { className: props.className, children: props.children }) });
26
+ }
27
+
28
+ export {
29
+ Hyperlink
30
+ };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  Constants
5
- } from "./chunk-YDPISYMP.mjs";
5
+ } from "./chunk-E4VOFO5Q.mjs";
6
6
 
7
7
  // src/clients/OdataBuilder.tsx
8
8
  var OdataBuilder = class {
@@ -40,6 +40,12 @@ var OdataBuilder = class {
40
40
  if (key == "searchCols") {
41
41
  this.searchCols = odata[key];
42
42
  }
43
+ if (key == "filter") {
44
+ this.apiFilter = odata[key];
45
+ }
46
+ if (key == "orderBy") {
47
+ this.apiOrderBy = odata[key];
48
+ }
43
49
  }
44
50
  }
45
51
  }
@@ -66,6 +72,12 @@ var OdataBuilder = class {
66
72
  if (obj?.["searchCols"] && obj["searchCols"].trim() !== "") {
67
73
  queryString += `&searchCols=${encodeURIComponent(obj["searchCols"])}`;
68
74
  }
75
+ if (obj?.["filter"] && obj["filter"].trim() !== "") {
76
+ queryString += `&filter=${encodeURIComponent(obj["filter"])}`;
77
+ }
78
+ if (obj?.["orderBy"] && obj["orderBy"].trim() !== "") {
79
+ queryString += `&orderBy=${encodeURIComponent(obj["orderBy"])}`;
80
+ }
69
81
  if (obj) {
70
82
  if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
71
83
  queryString = queryString + `&$filter=${encodeURIComponent(obj["$filter"])}`;
@@ -113,6 +125,18 @@ var OdataBuilder = class {
113
125
  }
114
126
  return pageNumber;
115
127
  }
128
+ appendApiQueryParameters(url) {
129
+ if (this.searchTerm) {
130
+ url += `&searchTerm=${encodeURIComponent(this.searchTerm)}`;
131
+ }
132
+ if (this.apiFilter) {
133
+ url += `&filter=${encodeURIComponent(this.apiFilter)}`;
134
+ }
135
+ if (this.apiOrderBy) {
136
+ url += `&orderBy=${encodeURIComponent(this.apiOrderBy)}`;
137
+ }
138
+ return url;
139
+ }
116
140
  getUrl() {
117
141
  let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
118
142
  if (this.filterBy !== null && this.filterBy !== "") {
@@ -128,7 +152,7 @@ var OdataBuilder = class {
128
152
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
129
153
  }
130
154
  console.log(url);
131
- return url;
155
+ return this.appendApiQueryParameters(url);
132
156
  }
133
157
  getNewOrderByUrl(orderBy) {
134
158
  let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
@@ -142,7 +166,7 @@ var OdataBuilder = class {
142
166
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
143
167
  }
144
168
  url = url + `&$orderby=${encodeURIComponent(orderBy)}`;
145
- return url;
169
+ return this.appendApiQueryParameters(url);
146
170
  }
147
171
  getNewFilterUrl(filterBy) {
148
172
  let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
@@ -158,7 +182,7 @@ var OdataBuilder = class {
158
182
  if (this.searchCols) {
159
183
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
160
184
  }
161
- return url;
185
+ return this.appendApiQueryParameters(url);
162
186
  }
163
187
  getNewPageUrl(page) {
164
188
  let skip = page * Constants.pagesize - Constants.pagesize;
@@ -175,7 +199,7 @@ var OdataBuilder = class {
175
199
  if (this.searchCols) {
176
200
  url += `&searchCols=${encodeURIComponent(this.searchCols)}`;
177
201
  }
178
- return url;
202
+ return this.appendApiQueryParameters(url);
179
203
  }
180
204
  getNewPageSizeUrl(pageSize) {
181
205
  const currentPage = this.getPageNumber(
@@ -189,7 +213,7 @@ var OdataBuilder = class {
189
213
  if (this.orderBy !== null && this.orderBy !== "") {
190
214
  url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
191
215
  }
192
- return url;
216
+ return this.appendApiQueryParameters(url);
193
217
  }
194
218
  getOrderBy() {
195
219
  return this.orderBy;
@@ -0,0 +1,36 @@
1
+ // src/components/controls/edit/InputControlType.tsx
2
+ var Constants = {
3
+ pagesize: 10
4
+ };
5
+ var InputControlType = {
6
+ lineTextInput: "lineTextInput",
7
+ multilineTextInput: "multilineTextInput",
8
+ emailInput: "emailInput",
9
+ moneyInput: "money",
10
+ select: "select",
11
+ percentageInput: "percentage",
12
+ asset: "asset",
13
+ assetUpload: "assetUpload",
14
+ phoneInput: "phone",
15
+ numberInput: "numberInput",
16
+ checkboxInput: "checkboxInput",
17
+ otpInput: "otp",
18
+ datetimeInput: "datetimeInput",
19
+ timeInput: "time",
20
+ colorInput: "colorInput",
21
+ selectWithSearchInput: "selectWithSearchInput",
22
+ selectWithSearchPanel: "selectWithSearchPanel",
23
+ booleanSelect: "booleanSelect",
24
+ switchInput: "switchInput",
25
+ dateInput: "dateInput",
26
+ radioInput: "radioInput",
27
+ switcher: "switcher",
28
+ videoInput: "videoInput",
29
+ referenceInput: "referenceInput"
30
+ };
31
+ var InputControlType_default = InputControlType;
32
+
33
+ export {
34
+ Constants,
35
+ InputControlType_default
36
+ };
@@ -0,0 +1,52 @@
1
+ // src/svg/chevron-updown.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ var ChevronUpDown = (props) => {
4
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
5
+ };
6
+ var chevron_updown_default = ChevronUpDown;
7
+
8
+ // src/svg/chevron-down.tsx
9
+ import { jsx as jsx2 } from "react/jsx-runtime";
10
+ var ChevronDown = (props) => {
11
+ return /* @__PURE__ */ jsx2("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx2("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
12
+ };
13
+ var chevron_down_default = ChevronDown;
14
+
15
+ // src/svg/chevron-up.tsx
16
+ import { jsx as jsx3 } from "react/jsx-runtime";
17
+ var ChevronUp = (props) => {
18
+ return /* @__PURE__ */ jsx3("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
19
+ };
20
+ var chevron_up_default = ChevronUp;
21
+
22
+ // src/svg/plus.tsx
23
+ import { jsx as jsx4 } from "react/jsx-runtime";
24
+ var Plus = (props) => {
25
+ return /* @__PURE__ */ jsx4("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx4("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
26
+ };
27
+ var plus_default = Plus;
28
+
29
+ // src/svg/Icons.tsx
30
+ var Icons = {
31
+ chevronUpDown: chevron_updown_default,
32
+ chevronDown: chevron_down_default,
33
+ chevronUp: chevron_up_default,
34
+ plus: plus_default
35
+ };
36
+ var Icons_default = Icons;
37
+
38
+ // src/svg/Icon.tsx
39
+ import { jsx as jsx5 } from "react/jsx-runtime";
40
+ var Icon = ({ name, className, ...props }) => {
41
+ const IconComponent = Icons_default[name];
42
+ if (!IconComponent) {
43
+ console.error(`Icon "${name}" not found.`);
44
+ return null;
45
+ }
46
+ return /* @__PURE__ */ jsx5(IconComponent, { ...props, className });
47
+ };
48
+ var Icon_default = Icon;
49
+
50
+ export {
51
+ Icon_default
52
+ };