@apexcura/ui-components 0.0.12-Beta71 → 0.0.12-Beta73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +4 -0
- package/dist/index.d.mts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +28 -9
- package/dist/index.mjs +28 -9
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -21,7 +21,7 @@ type ElementType = {
|
|
|
21
21
|
maxLength?: number;
|
|
22
22
|
fieldNames?: any[];
|
|
23
23
|
options?: any[];
|
|
24
|
-
onChange?: (value: string | number | boolean | any[]) => void;
|
|
24
|
+
onChange?: (value: string | number | boolean | object | any[]) => void;
|
|
25
25
|
dropDownOptions?: any[];
|
|
26
26
|
id?: number;
|
|
27
27
|
thead?: any[];
|
|
@@ -44,10 +44,11 @@ type ElementType = {
|
|
|
44
44
|
profileImageClassName?: string;
|
|
45
45
|
profileSubClassName?: string;
|
|
46
46
|
subContainerClassName?: string;
|
|
47
|
+
element?: string;
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
interface ElementExecuterProps$3 extends ElementType {
|
|
50
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
51
|
+
onChange: (value: string | number | boolean | object | any[]) => void;
|
|
51
52
|
}
|
|
52
53
|
declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
|
|
53
54
|
|
|
@@ -64,12 +65,12 @@ interface PasswordProps {
|
|
|
64
65
|
declare const PasswordElement: React$1.FC<PasswordProps>;
|
|
65
66
|
|
|
66
67
|
interface ElementExecuterProps$2 extends ElementType {
|
|
67
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
68
|
+
onChange: (value: string | number | object | boolean | any[]) => void;
|
|
68
69
|
}
|
|
69
70
|
declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
|
|
70
71
|
|
|
71
72
|
interface ElementExecuterProps$1 extends ElementType {
|
|
72
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
73
|
+
onChange: (value: string | number | boolean | object | any[]) => void;
|
|
73
74
|
}
|
|
74
75
|
declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
|
|
75
76
|
|
|
@@ -80,7 +81,7 @@ declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
80
81
|
declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
|
|
81
82
|
|
|
82
83
|
interface ElementExecuterProps extends ElementType {
|
|
83
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
84
|
+
onChange: (value: string | number | object | boolean | any[]) => void;
|
|
84
85
|
}
|
|
85
86
|
declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
|
|
86
87
|
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ type ElementType = {
|
|
|
21
21
|
maxLength?: number;
|
|
22
22
|
fieldNames?: any[];
|
|
23
23
|
options?: any[];
|
|
24
|
-
onChange?: (value: string | number | boolean | any[]) => void;
|
|
24
|
+
onChange?: (value: string | number | boolean | object | any[]) => void;
|
|
25
25
|
dropDownOptions?: any[];
|
|
26
26
|
id?: number;
|
|
27
27
|
thead?: any[];
|
|
@@ -44,10 +44,11 @@ type ElementType = {
|
|
|
44
44
|
profileImageClassName?: string;
|
|
45
45
|
profileSubClassName?: string;
|
|
46
46
|
subContainerClassName?: string;
|
|
47
|
+
element?: string;
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
interface ElementExecuterProps$3 extends ElementType {
|
|
50
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
51
|
+
onChange: (value: string | number | boolean | object | any[]) => void;
|
|
51
52
|
}
|
|
52
53
|
declare const TextElement: (props: ElementExecuterProps$3) => React$1.JSX.Element;
|
|
53
54
|
|
|
@@ -64,12 +65,12 @@ interface PasswordProps {
|
|
|
64
65
|
declare const PasswordElement: React$1.FC<PasswordProps>;
|
|
65
66
|
|
|
66
67
|
interface ElementExecuterProps$2 extends ElementType {
|
|
67
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
68
|
+
onChange: (value: string | number | object | boolean | any[]) => void;
|
|
68
69
|
}
|
|
69
70
|
declare const NumberElement: (props: ElementExecuterProps$2) => React$1.JSX.Element;
|
|
70
71
|
|
|
71
72
|
interface ElementExecuterProps$1 extends ElementType {
|
|
72
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
73
|
+
onChange: (value: string | number | boolean | object | any[]) => void;
|
|
73
74
|
}
|
|
74
75
|
declare const TextareaElement: (props: ElementExecuterProps$1) => React$1.JSX.Element;
|
|
75
76
|
|
|
@@ -80,7 +81,7 @@ declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
80
81
|
declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
|
|
81
82
|
|
|
82
83
|
interface ElementExecuterProps extends ElementType {
|
|
83
|
-
onChange: (value: string | number | boolean | any[]) => void;
|
|
84
|
+
onChange: (value: string | number | object | boolean | any[]) => void;
|
|
84
85
|
}
|
|
85
86
|
declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
|
|
86
87
|
|
package/dist/index.js
CHANGED
|
@@ -195,9 +195,10 @@ var RadioElement = (props) => {
|
|
|
195
195
|
const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
|
|
196
196
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
197
197
|
const handleChange = (e) => {
|
|
198
|
+
console.log(e);
|
|
198
199
|
const selectedVal = e.target.value;
|
|
199
200
|
const selectedLabel = e.target.label;
|
|
200
|
-
const selectedOptions =
|
|
201
|
+
const selectedOptions = { label: selectedLabel, value: selectedVal };
|
|
201
202
|
setSelectedValue(selectedVal);
|
|
202
203
|
setIsDisabled(true);
|
|
203
204
|
if (props.onChange) {
|
|
@@ -549,22 +550,40 @@ var Sidebar = (props) => {
|
|
|
549
550
|
// src/Components/Navbar.tsx
|
|
550
551
|
var import_react17 = __toESM(require("react"));
|
|
551
552
|
|
|
552
|
-
// src/Components/
|
|
553
|
+
// src/Components/Notification.tsx
|
|
553
554
|
var import_react15 = __toESM(require("react"));
|
|
554
555
|
var import_antd12 = require("antd");
|
|
555
|
-
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
556
|
-
|
|
557
|
-
|
|
556
|
+
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
557
|
+
import_antd12.Popover,
|
|
558
|
+
{
|
|
559
|
+
className: props.className,
|
|
560
|
+
content: props.items?.map(
|
|
561
|
+
(eachItem) => {
|
|
562
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", null, /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.text), /* @__PURE__ */ import_react15.default.createElement("p", null, eachItem.time));
|
|
563
|
+
}
|
|
564
|
+
),
|
|
565
|
+
trigger: "focus",
|
|
566
|
+
placement: "bottomRight"
|
|
567
|
+
},
|
|
568
|
+
/* @__PURE__ */ import_react15.default.createElement(import_antd12.Badge, { count: props.count }, props.icon)
|
|
569
|
+
);
|
|
558
570
|
|
|
559
571
|
// src/Components/Profile.tsx
|
|
560
572
|
var import_react16 = __toESM(require("react"));
|
|
561
|
-
var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.
|
|
573
|
+
var Profile = (props) => /* @__PURE__ */ import_react16.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react16.default.createElement("img", { src: props.profileImage, alt: "profile", className: props.profileImageClassName }), /* @__PURE__ */ import_react16.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react16.default.createElement("span", null, props.primaryText), /* @__PURE__ */ import_react16.default.createElement("span", null, props.secondaryText)));
|
|
562
574
|
|
|
563
575
|
// src/Components/Navbar.tsx
|
|
564
576
|
var Navbar = (props) => {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
577
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: ` ${props.className}` }, props.fields && props.fields.map((field) => {
|
|
578
|
+
if (field.element === "span") {
|
|
579
|
+
return /* @__PURE__ */ import_react17.default.createElement("span", { className: field.className }, field.label);
|
|
580
|
+
} else if (field.element === "notifications") {
|
|
581
|
+
return /* @__PURE__ */ import_react17.default.createElement(Notification, { ...field });
|
|
582
|
+
} else if (field.name === "profile") {
|
|
583
|
+
return /* @__PURE__ */ import_react17.default.createElement(Profile, { ...field });
|
|
584
|
+
}
|
|
585
|
+
return null;
|
|
586
|
+
}));
|
|
568
587
|
};
|
|
569
588
|
// Annotate the CommonJS export names for ESM import in node:
|
|
570
589
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -146,9 +146,10 @@ var RadioElement = (props) => {
|
|
|
146
146
|
const [selectedValue, setSelectedValue] = useState2(props.value);
|
|
147
147
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
148
148
|
const handleChange = (e) => {
|
|
149
|
+
console.log(e);
|
|
149
150
|
const selectedVal = e.target.value;
|
|
150
151
|
const selectedLabel = e.target.label;
|
|
151
|
-
const selectedOptions =
|
|
152
|
+
const selectedOptions = { label: selectedLabel, value: selectedVal };
|
|
152
153
|
setSelectedValue(selectedVal);
|
|
153
154
|
setIsDisabled(true);
|
|
154
155
|
if (props.onChange) {
|
|
@@ -500,22 +501,40 @@ var Sidebar = (props) => {
|
|
|
500
501
|
// src/Components/Navbar.tsx
|
|
501
502
|
import React16 from "react";
|
|
502
503
|
|
|
503
|
-
// src/Components/
|
|
504
|
+
// src/Components/Notification.tsx
|
|
504
505
|
import React14 from "react";
|
|
505
506
|
import { Popover, Badge } from "antd";
|
|
506
|
-
var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
508
|
+
Popover,
|
|
509
|
+
{
|
|
510
|
+
className: props.className,
|
|
511
|
+
content: props.items?.map(
|
|
512
|
+
(eachItem) => {
|
|
513
|
+
return /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("p", null, eachItem.text), /* @__PURE__ */ React14.createElement("p", null, eachItem.time));
|
|
514
|
+
}
|
|
515
|
+
),
|
|
516
|
+
trigger: "focus",
|
|
517
|
+
placement: "bottomRight"
|
|
518
|
+
},
|
|
519
|
+
/* @__PURE__ */ React14.createElement(Badge, { count: props.count }, props.icon)
|
|
520
|
+
);
|
|
509
521
|
|
|
510
522
|
// src/Components/Profile.tsx
|
|
511
523
|
import React15 from "react";
|
|
512
|
-
var Profile = (props) => /* @__PURE__ */ React15.createElement("div", { className: props.
|
|
524
|
+
var Profile = (props) => /* @__PURE__ */ React15.createElement("div", { className: props.className }, /* @__PURE__ */ React15.createElement("img", { src: props.profileImage, alt: "profile", className: props.profileImageClassName }), /* @__PURE__ */ React15.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ React15.createElement("span", null, props.primaryText), /* @__PURE__ */ React15.createElement("span", null, props.secondaryText)));
|
|
513
525
|
|
|
514
526
|
// src/Components/Navbar.tsx
|
|
515
527
|
var Navbar = (props) => {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
528
|
+
return /* @__PURE__ */ React16.createElement("div", { className: ` ${props.className}` }, props.fields && props.fields.map((field) => {
|
|
529
|
+
if (field.element === "span") {
|
|
530
|
+
return /* @__PURE__ */ React16.createElement("span", { className: field.className }, field.label);
|
|
531
|
+
} else if (field.element === "notifications") {
|
|
532
|
+
return /* @__PURE__ */ React16.createElement(Notification, { ...field });
|
|
533
|
+
} else if (field.name === "profile") {
|
|
534
|
+
return /* @__PURE__ */ React16.createElement(Profile, { ...field });
|
|
535
|
+
}
|
|
536
|
+
return null;
|
|
537
|
+
}));
|
|
519
538
|
};
|
|
520
539
|
export {
|
|
521
540
|
AddMoreTable,
|