@apexcura/ui-components 0.0.13-Beta22 → 0.0.13-Beta23
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.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +43 -5
- package/dist/index.mjs +41 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,6 +54,8 @@ type ElementType = {
|
|
|
54
54
|
iconsClassName?: string;
|
|
55
55
|
labelClassName?: string;
|
|
56
56
|
containerClassName?: string;
|
|
57
|
+
selectBefore?: any[];
|
|
58
|
+
selectAfter?: any[];
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -97,4 +99,8 @@ declare const UploadElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
97
99
|
|
|
98
100
|
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
99
101
|
|
|
100
|
-
|
|
102
|
+
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
103
|
+
|
|
104
|
+
declare const MultiSelect: (props: ElementType) => React$1.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Image, MultiSelect, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, TableElement, TextElement, TextareaElement, UploadElement };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ type ElementType = {
|
|
|
54
54
|
iconsClassName?: string;
|
|
55
55
|
labelClassName?: string;
|
|
56
56
|
containerClassName?: string;
|
|
57
|
+
selectBefore?: any[];
|
|
58
|
+
selectAfter?: any[];
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -97,4 +99,8 @@ declare const UploadElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
97
99
|
|
|
98
100
|
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
99
101
|
|
|
100
|
-
|
|
102
|
+
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
103
|
+
|
|
104
|
+
declare const MultiSelect: (props: ElementType) => React$1.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Image, MultiSelect, MultipleSelectElement, Navbar, NumberElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, TableElement, TextElement, TextareaElement, UploadElement };
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(src_exports, {
|
|
|
37
37
|
DatePickerElement: () => DatePickerElement,
|
|
38
38
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
39
|
Image: () => Image,
|
|
40
|
+
MultiSelect: () => MultiSelect,
|
|
40
41
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
41
42
|
Navbar: () => Navbar,
|
|
42
43
|
NumberElement: () => NumberElement,
|
|
@@ -44,6 +45,7 @@ __export(src_exports, {
|
|
|
44
45
|
RadioElement: () => RadioElement,
|
|
45
46
|
SelectElement: () => SelectElement,
|
|
46
47
|
Sidebar: () => Sidebar,
|
|
48
|
+
SingleCheckbox: () => SingleCheckbox,
|
|
47
49
|
SingleSelectElement: () => SingleSelectElement,
|
|
48
50
|
TableElement: () => TableElement,
|
|
49
51
|
TextElement: () => TextElement,
|
|
@@ -111,10 +113,13 @@ var PasswordElement = (props) => {
|
|
|
111
113
|
handleChange(e);
|
|
112
114
|
},
|
|
113
115
|
iconRender: renderVisibilityIcon,
|
|
114
|
-
visibilityToggle: {
|
|
116
|
+
visibilityToggle: {
|
|
117
|
+
visible: passwordVisible,
|
|
118
|
+
onVisibleChange: handleVisibilityToggle
|
|
119
|
+
}
|
|
115
120
|
}
|
|
116
121
|
);
|
|
117
|
-
return /* @__PURE__ */ import_react2.default.createElement(
|
|
122
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("label", null, props.label), /* @__PURE__ */ import_react2.default.createElement(import_antd2.Space, null, renderPasswordInput()));
|
|
118
123
|
};
|
|
119
124
|
|
|
120
125
|
// src/Components/NumberElement.tsx
|
|
@@ -200,7 +205,7 @@ var SelectElement = (props) => {
|
|
|
200
205
|
import_antd5.Select,
|
|
201
206
|
{
|
|
202
207
|
labelRender,
|
|
203
|
-
options: props.
|
|
208
|
+
options: props.options,
|
|
204
209
|
placeholder: props.placeholder,
|
|
205
210
|
allowClear: true,
|
|
206
211
|
defaultValue: props.defaultValue,
|
|
@@ -369,7 +374,9 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
369
374
|
var SingleSelectElement = (props) => {
|
|
370
375
|
const handleChange = (values) => {
|
|
371
376
|
if (props.onChange) {
|
|
372
|
-
const option = props.dropDownOptions?.find(
|
|
377
|
+
const option = props.dropDownOptions?.find(
|
|
378
|
+
(option2) => String(option2.title) === values
|
|
379
|
+
);
|
|
373
380
|
const selectedOption = { id: option?.id, value: values };
|
|
374
381
|
props.onChange([selectedOption]);
|
|
375
382
|
}
|
|
@@ -383,7 +390,11 @@ var SingleSelectElement = (props) => {
|
|
|
383
390
|
onChange: handleChange,
|
|
384
391
|
onSearch,
|
|
385
392
|
filterOption,
|
|
386
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
393
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
394
|
+
label: String(eachOption.title),
|
|
395
|
+
value: String(eachOption.title),
|
|
396
|
+
id: String(eachOption.id)
|
|
397
|
+
}))
|
|
387
398
|
}
|
|
388
399
|
);
|
|
389
400
|
};
|
|
@@ -857,6 +868,31 @@ var import_react25 = __toESM(require("react"));
|
|
|
857
868
|
var Image = (props) => {
|
|
858
869
|
return /* @__PURE__ */ import_react25.default.createElement("div", null, /* @__PURE__ */ import_react25.default.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
859
870
|
};
|
|
871
|
+
|
|
872
|
+
// src/Components/SingleCheckbox.tsx
|
|
873
|
+
var import_react26 = __toESM(require("react"));
|
|
874
|
+
var import_antd18 = require("antd");
|
|
875
|
+
var SingleCheckbox = (props) => {
|
|
876
|
+
const handleChange = (e) => {
|
|
877
|
+
if (props.onChange) {
|
|
878
|
+
props.onChange(e.target.checked);
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_antd18.Checkbox, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
// src/Components/MultiSelect.tsx
|
|
885
|
+
var import_react27 = __toESM(require("react"));
|
|
886
|
+
var import_antd19 = require("antd");
|
|
887
|
+
var MultiSelect = (props) => {
|
|
888
|
+
const handleChange = (e) => {
|
|
889
|
+
console.log(e.target.value);
|
|
890
|
+
console.log(e);
|
|
891
|
+
};
|
|
892
|
+
const selectAfter = /* @__PURE__ */ import_react27.default.createElement(import_antd19.Select, { options: props.selectAfter, onChange: handleChange });
|
|
893
|
+
const selectBefore = /* @__PURE__ */ import_react27.default.createElement(import_antd19.Select, { options: props.selectAfter });
|
|
894
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_antd19.Space, null, /* @__PURE__ */ import_react27.default.createElement(import_antd19.Input, { addonBefore: selectBefore, addonAfter: selectAfter }));
|
|
895
|
+
};
|
|
860
896
|
// Annotate the CommonJS export names for ESM import in node:
|
|
861
897
|
0 && (module.exports = {
|
|
862
898
|
AddMoreTable,
|
|
@@ -866,6 +902,7 @@ var Image = (props) => {
|
|
|
866
902
|
DatePickerElement,
|
|
867
903
|
DateRangePickerElement,
|
|
868
904
|
Image,
|
|
905
|
+
MultiSelect,
|
|
869
906
|
MultipleSelectElement,
|
|
870
907
|
Navbar,
|
|
871
908
|
NumberElement,
|
|
@@ -873,6 +910,7 @@ var Image = (props) => {
|
|
|
873
910
|
RadioElement,
|
|
874
911
|
SelectElement,
|
|
875
912
|
Sidebar,
|
|
913
|
+
SingleCheckbox,
|
|
876
914
|
SingleSelectElement,
|
|
877
915
|
TableElement,
|
|
878
916
|
TextElement,
|
package/dist/index.mjs
CHANGED
|
@@ -57,10 +57,13 @@ var PasswordElement = (props) => {
|
|
|
57
57
|
handleChange(e);
|
|
58
58
|
},
|
|
59
59
|
iconRender: renderVisibilityIcon,
|
|
60
|
-
visibilityToggle: {
|
|
60
|
+
visibilityToggle: {
|
|
61
|
+
visible: passwordVisible,
|
|
62
|
+
onVisibleChange: handleVisibilityToggle
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
);
|
|
63
|
-
return /* @__PURE__ */ React2.createElement(
|
|
66
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("label", null, props.label), /* @__PURE__ */ React2.createElement(Space, null, renderPasswordInput()));
|
|
64
67
|
};
|
|
65
68
|
|
|
66
69
|
// src/Components/NumberElement.tsx
|
|
@@ -146,7 +149,7 @@ var SelectElement = (props) => {
|
|
|
146
149
|
Select,
|
|
147
150
|
{
|
|
148
151
|
labelRender,
|
|
149
|
-
options: props.
|
|
152
|
+
options: props.options,
|
|
150
153
|
placeholder: props.placeholder,
|
|
151
154
|
allowClear: true,
|
|
152
155
|
defaultValue: props.defaultValue,
|
|
@@ -315,7 +318,9 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
|
|
|
315
318
|
var SingleSelectElement = (props) => {
|
|
316
319
|
const handleChange = (values) => {
|
|
317
320
|
if (props.onChange) {
|
|
318
|
-
const option = props.dropDownOptions?.find(
|
|
321
|
+
const option = props.dropDownOptions?.find(
|
|
322
|
+
(option2) => String(option2.title) === values
|
|
323
|
+
);
|
|
319
324
|
const selectedOption = { id: option?.id, value: values };
|
|
320
325
|
props.onChange([selectedOption]);
|
|
321
326
|
}
|
|
@@ -329,7 +334,11 @@ var SingleSelectElement = (props) => {
|
|
|
329
334
|
onChange: handleChange,
|
|
330
335
|
onSearch,
|
|
331
336
|
filterOption,
|
|
332
|
-
options: props.dropDownOptions?.map((eachOption) => ({
|
|
337
|
+
options: props.dropDownOptions?.map((eachOption) => ({
|
|
338
|
+
label: String(eachOption.title),
|
|
339
|
+
value: String(eachOption.title),
|
|
340
|
+
id: String(eachOption.id)
|
|
341
|
+
}))
|
|
333
342
|
}
|
|
334
343
|
);
|
|
335
344
|
};
|
|
@@ -803,6 +812,31 @@ import React24 from "react";
|
|
|
803
812
|
var Image = (props) => {
|
|
804
813
|
return /* @__PURE__ */ React24.createElement("div", null, /* @__PURE__ */ React24.createElement("img", { className: props.className, src: props.img, alt: "image" }));
|
|
805
814
|
};
|
|
815
|
+
|
|
816
|
+
// src/Components/SingleCheckbox.tsx
|
|
817
|
+
import React25 from "react";
|
|
818
|
+
import { Checkbox as Checkbox2 } from "antd";
|
|
819
|
+
var SingleCheckbox = (props) => {
|
|
820
|
+
const handleChange = (e) => {
|
|
821
|
+
if (props.onChange) {
|
|
822
|
+
props.onChange(e.target.checked);
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
return /* @__PURE__ */ React25.createElement(Checkbox2, { onChange: (e) => handleChange(e), className: props.className }, props.label);
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
// src/Components/MultiSelect.tsx
|
|
829
|
+
import React26 from "react";
|
|
830
|
+
import { Input as Input3, Select as Select4, Space as Space3 } from "antd";
|
|
831
|
+
var MultiSelect = (props) => {
|
|
832
|
+
const handleChange = (e) => {
|
|
833
|
+
console.log(e.target.value);
|
|
834
|
+
console.log(e);
|
|
835
|
+
};
|
|
836
|
+
const selectAfter = /* @__PURE__ */ React26.createElement(Select4, { options: props.selectAfter, onChange: handleChange });
|
|
837
|
+
const selectBefore = /* @__PURE__ */ React26.createElement(Select4, { options: props.selectAfter });
|
|
838
|
+
return /* @__PURE__ */ React26.createElement(Space3, null, /* @__PURE__ */ React26.createElement(Input3, { addonBefore: selectBefore, addonAfter: selectAfter }));
|
|
839
|
+
};
|
|
806
840
|
export {
|
|
807
841
|
AddMoreTable,
|
|
808
842
|
ButtonElement,
|
|
@@ -811,6 +845,7 @@ export {
|
|
|
811
845
|
DatePickerElement,
|
|
812
846
|
DateRangePickerElement,
|
|
813
847
|
Image,
|
|
848
|
+
MultiSelect,
|
|
814
849
|
MultipleSelectElement,
|
|
815
850
|
Navbar,
|
|
816
851
|
NumberElement,
|
|
@@ -818,6 +853,7 @@ export {
|
|
|
818
853
|
RadioElement,
|
|
819
854
|
SelectElement,
|
|
820
855
|
Sidebar,
|
|
856
|
+
SingleCheckbox,
|
|
821
857
|
SingleSelectElement,
|
|
822
858
|
TableElement,
|
|
823
859
|
TextElement,
|