@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260924115534 → 0.8.1-dev.20260926063530

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.
@@ -18,18 +18,16 @@ import {
18
18
  SelectWithSearchInput_default,
19
19
  Select_default,
20
20
  TimeInput_default
21
- } from "./chunk-N57RANHY.mjs";
21
+ } from "./chunk-LDS5ZLVG.mjs";
22
22
  import {
23
23
  Hyperlink,
24
- Icon_default
25
- } from "./chunk-GCG4OYDJ.mjs";
24
+ Icon_default,
25
+ InputControlType_default
26
+ } from "./chunk-N3EYMPAJ.mjs";
26
27
  import {
27
28
  Button_default,
28
29
  ClientButton_default
29
30
  } from "./chunk-LSKD5U3S.mjs";
30
- import {
31
- InputControlType_default
32
- } from "./chunk-F4DNLPFN.mjs";
33
31
  import "./chunk-IMNQO57B.mjs";
34
32
  import {
35
33
  AssetUtility_default
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Button_default,
4
4
  ToastService_default
5
- } from "./chunk-4WMSS6CE.mjs";
5
+ } from "./chunk-3IMICDQR.mjs";
6
6
  import {
7
7
  ServiceClient_default
8
8
  } from "./chunk-WXZMRMRS.mjs";
@@ -3,14 +3,12 @@
3
3
  "use client";
4
4
  import {
5
5
  OdataBuilder
6
- } from "./chunk-K6GGVJCI.mjs";
6
+ } from "./chunk-RSUG2VPX.mjs";
7
7
  import {
8
+ Constants,
8
9
  Hyperlink,
9
10
  Icon_default
10
- } from "./chunk-GCG4OYDJ.mjs";
11
- import {
12
- Constants
13
- } from "./chunk-F4DNLPFN.mjs";
11
+ } from "./chunk-N3EYMPAJ.mjs";
14
12
  import "./chunk-IMNQO57B.mjs";
15
13
 
16
14
  // src/components/Pagination.tsx
@@ -1,21 +1,65 @@
1
1
  "use client";
2
2
  import {
3
- Icon_default
4
- } from "./chunk-6PW2RLUJ.mjs";
5
- import {
3
+ Constants,
4
+ Hyperlink,
6
5
  OdataBuilder
7
- } from "./chunk-I3ND2ZRE.mjs";
8
- import {
9
- Hyperlink
10
- } from "./chunk-2R26M6CK.mjs";
11
- import {
12
- Constants
13
- } from "./chunk-HRDHAIZF.mjs";
6
+ } from "./chunk-Q4AFJYT5.mjs";
14
7
  import "./chunk-56HSDML5.mjs";
15
8
 
16
9
  // src/components/Pagination.tsx
17
10
  import { useMemo } from "react";
18
- import { jsx, jsxs } from "react/jsx-runtime";
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";
19
63
  var Pagination = (props) => {
20
64
  const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
21
65
  const builder = useMemo(() => {
@@ -59,7 +103,7 @@ var Pagination = (props) => {
59
103
  return range;
60
104
  };
61
105
  const paginationRange = getPaginationRange();
62
- const PageButton = ({ page, children }) => /* @__PURE__ */ jsx(
106
+ const PageButton = ({ page, children }) => /* @__PURE__ */ jsx6(
63
107
  Hyperlink,
64
108
  {
65
109
  linkType: "Link" /* Link */,
@@ -74,9 +118,9 @@ var Pagination = (props) => {
74
118
  );
75
119
  const NavigationButton = ({ page, disabled, children }) => {
76
120
  if (disabled) {
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 });
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 });
78
122
  }
79
- return /* @__PURE__ */ jsx(
123
+ return /* @__PURE__ */ jsx6(
80
124
  Hyperlink,
81
125
  {
82
126
  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",
@@ -97,7 +141,7 @@ var Pagination = (props) => {
97
141
  ] }),
98
142
  " ",
99
143
  "out of ",
100
- /* @__PURE__ */ jsx("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
144
+ /* @__PURE__ */ jsx6("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
101
145
  " results"
102
146
  ] }),
103
147
  totalPages > 1 && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-1", children: [
@@ -107,14 +151,14 @@ var Pagination = (props) => {
107
151
  page: activePageNumber - 1,
108
152
  disabled: activePageNumber === 1,
109
153
  children: [
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" })
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" })
112
156
  ]
113
157
  }
114
158
  ),
115
159
  paginationRange.map((item, index) => {
116
160
  if (item === "...") {
117
- return /* @__PURE__ */ jsx(
161
+ return /* @__PURE__ */ jsx6(
118
162
  "span",
119
163
  {
120
164
  className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
@@ -124,7 +168,7 @@ var Pagination = (props) => {
124
168
  );
125
169
  }
126
170
  const page = item;
127
- return /* @__PURE__ */ jsx(PageButton, { page, children: page }, page);
171
+ return /* @__PURE__ */ jsx6(PageButton, { page, children: page }, page);
128
172
  }),
129
173
  /* @__PURE__ */ jsxs(
130
174
  NavigationButton,
@@ -132,15 +176,15 @@ var Pagination = (props) => {
132
176
  page: activePageNumber + 1,
133
177
  disabled: activePageNumber === totalPages,
134
178
  children: [
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" }) })
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" }) })
137
181
  ]
138
182
  }
139
183
  )
140
184
  ] }),
141
185
  showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
142
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: "Go to:" }),
143
- /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
186
+ /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "Go to:" }),
187
+ /* @__PURE__ */ jsx6("div", { className: "relative", children: /* @__PURE__ */ jsx6(
144
188
  "input",
145
189
  {
146
190
  type: "number",
@@ -161,9 +205,9 @@ var Pagination = (props) => {
161
205
  ) })
162
206
  ] })
163
207
  ] }),
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(
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(
167
211
  Hyperlink,
168
212
  {
169
213
  className: `
@@ -175,7 +219,7 @@ var Pagination = (props) => {
175
219
  },
176
220
  size
177
221
  )) }),
178
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: "per page" })
222
+ /* @__PURE__ */ jsx6("span", { className: "text-sm", children: "per page" })
179
223
  ] }) })
180
224
  ] });
181
225
  };
@@ -246,6 +246,5 @@ var Button_default = Button;
246
246
 
247
247
  export {
248
248
  ToastService_default,
249
- ClientButton_default,
250
249
  Button_default
251
250
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  Icon_default
5
- } from "./chunk-GCG4OYDJ.mjs";
5
+ } from "./chunk-N3EYMPAJ.mjs";
6
6
 
7
7
  // src/components/controls/edit/MultilineTextInput.tsx
8
8
  import React from "react";
@@ -4,6 +4,35 @@ import {
4
4
  buttonClasses
5
5
  } from "./chunk-IMNQO57B.mjs";
6
6
 
7
+ // src/components/controls/edit/InputControlType.tsx
8
+ var Constants = {
9
+ pagesize: 10
10
+ };
11
+ var InputControlType = {
12
+ lineTextInput: "lineTextInput",
13
+ multilineTextInput: "multilineTextInput",
14
+ emailInput: "emailInput",
15
+ numberInput: "numberInput",
16
+ checkboxInput: "checkboxInput",
17
+ moneyInput: "moneyInput",
18
+ select: "select",
19
+ percentageInput: "percentageInput",
20
+ assetUpload: "assetUpload",
21
+ phoneInput: "phoneInput",
22
+ otpInput: "otpInput",
23
+ datetimeInput: "datetimeInput",
24
+ timeInput: "timeInput",
25
+ colorInput: "colorInput",
26
+ selectWithSearchInput: "selectWithSearchInput",
27
+ selectWithSearchPanel: "selectWithSearchPanel",
28
+ switchInput: "switchInput",
29
+ dateInput: "dateInput",
30
+ radioInput: "radioInput",
31
+ videoInput: "videoInput",
32
+ referenceInput: "referenceInput"
33
+ };
34
+ var InputControlType_default = InputControlType;
35
+
7
36
  // src/components/dataForm/Hyperlink.tsx
8
37
  import Link from "next/link";
9
38
  import { Fragment, jsx } from "react/jsx-runtime";
@@ -77,6 +106,8 @@ var Icon = ({ name, className, ...props }) => {
77
106
  var Icon_default = Icon;
78
107
 
79
108
  export {
109
+ Constants,
110
+ InputControlType_default,
80
111
  Hyperlink,
81
112
  Icon_default
82
113
  };
@@ -1,6 +1,34 @@
1
1
  import {
2
- Constants
3
- } from "./chunk-HRDHAIZF.mjs";
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
+ // src/components/controls/edit/InputControlType.tsx
29
+ var Constants = {
30
+ pagesize: 10
31
+ };
4
32
 
5
33
  // src/clients/OdataBuilder.tsx
6
34
  var encodeFilter = (filter) => encodeURIComponent(filter);
@@ -232,5 +260,7 @@ var OdataBuilder = class {
232
260
  };
233
261
 
234
262
  export {
263
+ Hyperlink,
264
+ Constants,
235
265
  OdataBuilder
236
266
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  Constants
5
- } from "./chunk-F4DNLPFN.mjs";
5
+ } from "./chunk-N3EYMPAJ.mjs";
6
6
 
7
7
  // src/clients/OdataBuilder.tsx
8
8
  var encodeFilter = (filter) => encodeURIComponent(filter);