@apexcura/ui-components 0.0.15-Beta35 → 0.0.15-Beta37
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 +49 -33
- package/dist/index.d.ts +49 -33
- package/dist/index.js +15 -6
- package/dist/index.mjs +15 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
2
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
3
3
|
import { UploadFile } from 'antd/lib/upload/interface';
|
|
4
|
+
import { CheckboxOptionType } from 'antd';
|
|
4
5
|
|
|
5
|
-
type ElementType = {
|
|
6
|
+
type ElementType$1 = {
|
|
6
7
|
[x: string]: any;
|
|
7
8
|
selectedStyle?: boolean;
|
|
8
9
|
style?: boolean;
|
|
@@ -28,6 +29,9 @@ type ElementType = {
|
|
|
28
29
|
options?: any[];
|
|
29
30
|
firstOptions?: any[];
|
|
30
31
|
secondOptions?: any[];
|
|
32
|
+
firstPlaceholder?: string;
|
|
33
|
+
secondPlaceholder?: string;
|
|
34
|
+
enabled_dates?: string;
|
|
31
35
|
view?: boolean;
|
|
32
36
|
onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
33
37
|
onClick?: () => void;
|
|
@@ -83,82 +87,94 @@ type ElementType = {
|
|
|
83
87
|
showProgress?: boolean;
|
|
84
88
|
};
|
|
85
89
|
|
|
86
|
-
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
90
|
+
declare const TextElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
87
91
|
|
|
88
|
-
declare const PasswordElement: (props: ElementType) => React$1.JSX.Element;
|
|
92
|
+
declare const PasswordElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
89
93
|
|
|
90
|
-
declare const NumberElement: (props: ElementType) => React$1.JSX.Element;
|
|
94
|
+
declare const NumberElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
91
95
|
|
|
92
|
-
declare const TextareaElement: (props: ElementType) => React$1.JSX.Element;
|
|
96
|
+
declare const TextareaElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
93
97
|
|
|
94
|
-
declare const SelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
98
|
+
declare const SelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
95
99
|
|
|
96
|
-
declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
|
|
100
|
+
declare const RadioElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
97
101
|
|
|
102
|
+
type CheckboxValueType = string | undefined;
|
|
103
|
+
interface OptionType extends CheckboxOptionType {
|
|
104
|
+
value: CheckboxValueType;
|
|
105
|
+
}
|
|
106
|
+
interface ElementType {
|
|
107
|
+
options: OptionType[];
|
|
108
|
+
onChange?: (selectedOptions: OptionType[]) => void;
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
name?: string;
|
|
111
|
+
styles?: React$1.CSSProperties;
|
|
112
|
+
className?: string;
|
|
113
|
+
}
|
|
98
114
|
declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
|
|
99
115
|
|
|
100
|
-
interface ElementExecuterProps extends ElementType {
|
|
116
|
+
interface ElementExecuterProps extends ElementType$1 {
|
|
101
117
|
onChange: (value: string | number | object | boolean | any[] | undefined) => void;
|
|
102
118
|
}
|
|
103
119
|
declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
|
|
104
120
|
|
|
105
|
-
declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
121
|
+
declare const SingleSelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
106
122
|
|
|
107
|
-
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
123
|
+
declare const MultipleSelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
108
124
|
|
|
109
|
-
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
125
|
+
declare const ButtonElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
110
126
|
|
|
111
|
-
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
127
|
+
declare const AddMoreTable: (props: ElementType$1) => React$1.JSX.Element;
|
|
112
128
|
|
|
113
|
-
declare const Sidebar: (props: ElementType) => React$1.JSX.Element;
|
|
129
|
+
declare const Sidebar: (props: ElementType$1) => React$1.JSX.Element;
|
|
114
130
|
|
|
115
|
-
declare const Navbar: (props: ElementType) => React$1.JSX.Element;
|
|
131
|
+
declare const Navbar: (props: ElementType$1) => React$1.JSX.Element;
|
|
116
132
|
|
|
117
133
|
interface PaginationType {
|
|
118
134
|
page?: number;
|
|
119
135
|
pageSize?: number;
|
|
120
136
|
}
|
|
121
|
-
interface TableElementProps extends ElementType {
|
|
137
|
+
interface TableElementProps extends ElementType$1 {
|
|
122
138
|
value?: PaginationType;
|
|
123
139
|
}
|
|
124
140
|
declare const TableElement: (props: TableElementProps) => React$1.JSX.Element;
|
|
125
141
|
|
|
126
|
-
declare const DatePickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
142
|
+
declare const DatePickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
127
143
|
|
|
128
|
-
declare const DateRangePickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
144
|
+
declare const DateRangePickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
129
145
|
|
|
130
|
-
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
146
|
+
declare const Image: (props: ElementType$1) => React$1.JSX.Element;
|
|
131
147
|
|
|
132
|
-
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
148
|
+
declare const SingleCheckbox: (props: ElementType$1) => React$1.JSX.Element;
|
|
133
149
|
|
|
134
|
-
declare const DropDownGroup: (props: ElementType) => React$1.JSX.Element;
|
|
150
|
+
declare const DropDownGroup: (props: ElementType$1) => React$1.JSX.Element;
|
|
135
151
|
|
|
136
|
-
declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
152
|
+
declare const FileUpload: (props: ElementType$1) => React$1.JSX.Element;
|
|
137
153
|
|
|
138
|
-
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
154
|
+
declare const TabsElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
139
155
|
|
|
140
156
|
declare const SwitchElement: () => React$1.JSX.Element;
|
|
141
157
|
|
|
142
|
-
declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
158
|
+
declare const Upload: (props: ElementType$1) => React$1.JSX.Element;
|
|
143
159
|
|
|
144
|
-
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
160
|
+
declare const OtpElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
145
161
|
|
|
146
|
-
declare const CircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
162
|
+
declare const CircleDonut: (props: ElementType$1) => React$1.JSX.Element;
|
|
147
163
|
|
|
148
|
-
declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
164
|
+
declare const SemiCircleDonut: (props: ElementType$1) => React$1.JSX.Element;
|
|
149
165
|
|
|
150
|
-
declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
166
|
+
declare const HorizontalBarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
151
167
|
|
|
152
|
-
declare const LineChart: (props: ElementType) => React$1.JSX.Element;
|
|
168
|
+
declare const LineChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
153
169
|
|
|
154
|
-
declare const DoubleBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
170
|
+
declare const DoubleBarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
155
171
|
|
|
156
|
-
declare const BarChart: (props: ElementType) => React$1.JSX.Element;
|
|
172
|
+
declare const BarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
157
173
|
|
|
158
|
-
declare const DivContainer: (props: ElementType) => React$1.JSX.Element;
|
|
174
|
+
declare const DivContainer: (props: ElementType$1) => React$1.JSX.Element;
|
|
159
175
|
|
|
160
|
-
declare const ColorPickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
176
|
+
declare const ColorPickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
161
177
|
|
|
162
|
-
declare const NotificationAlert: (props: ElementType) => React$1.JSX.Element;
|
|
178
|
+
declare const NotificationAlert: (props: ElementType$1) => React$1.JSX.Element;
|
|
163
179
|
|
|
164
180
|
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, ColorPickerElement, DatePickerElement, DateRangePickerElement, DivContainer, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NotificationAlert, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
2
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
3
3
|
import { UploadFile } from 'antd/lib/upload/interface';
|
|
4
|
+
import { CheckboxOptionType } from 'antd';
|
|
4
5
|
|
|
5
|
-
type ElementType = {
|
|
6
|
+
type ElementType$1 = {
|
|
6
7
|
[x: string]: any;
|
|
7
8
|
selectedStyle?: boolean;
|
|
8
9
|
style?: boolean;
|
|
@@ -28,6 +29,9 @@ type ElementType = {
|
|
|
28
29
|
options?: any[];
|
|
29
30
|
firstOptions?: any[];
|
|
30
31
|
secondOptions?: any[];
|
|
32
|
+
firstPlaceholder?: string;
|
|
33
|
+
secondPlaceholder?: string;
|
|
34
|
+
enabled_dates?: string;
|
|
31
35
|
view?: boolean;
|
|
32
36
|
onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
|
|
33
37
|
onClick?: () => void;
|
|
@@ -83,82 +87,94 @@ type ElementType = {
|
|
|
83
87
|
showProgress?: boolean;
|
|
84
88
|
};
|
|
85
89
|
|
|
86
|
-
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
90
|
+
declare const TextElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
87
91
|
|
|
88
|
-
declare const PasswordElement: (props: ElementType) => React$1.JSX.Element;
|
|
92
|
+
declare const PasswordElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
89
93
|
|
|
90
|
-
declare const NumberElement: (props: ElementType) => React$1.JSX.Element;
|
|
94
|
+
declare const NumberElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
91
95
|
|
|
92
|
-
declare const TextareaElement: (props: ElementType) => React$1.JSX.Element;
|
|
96
|
+
declare const TextareaElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
93
97
|
|
|
94
|
-
declare const SelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
98
|
+
declare const SelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
95
99
|
|
|
96
|
-
declare const RadioElement: (props: ElementType) => React$1.JSX.Element;
|
|
100
|
+
declare const RadioElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
97
101
|
|
|
102
|
+
type CheckboxValueType = string | undefined;
|
|
103
|
+
interface OptionType extends CheckboxOptionType {
|
|
104
|
+
value: CheckboxValueType;
|
|
105
|
+
}
|
|
106
|
+
interface ElementType {
|
|
107
|
+
options: OptionType[];
|
|
108
|
+
onChange?: (selectedOptions: OptionType[]) => void;
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
name?: string;
|
|
111
|
+
styles?: React$1.CSSProperties;
|
|
112
|
+
className?: string;
|
|
113
|
+
}
|
|
98
114
|
declare const CheckboxElement: (props: ElementType) => React$1.JSX.Element;
|
|
99
115
|
|
|
100
|
-
interface ElementExecuterProps extends ElementType {
|
|
116
|
+
interface ElementExecuterProps extends ElementType$1 {
|
|
101
117
|
onChange: (value: string | number | object | boolean | any[] | undefined) => void;
|
|
102
118
|
}
|
|
103
119
|
declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
|
|
104
120
|
|
|
105
|
-
declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
121
|
+
declare const SingleSelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
106
122
|
|
|
107
|
-
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
123
|
+
declare const MultipleSelectElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
108
124
|
|
|
109
|
-
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
125
|
+
declare const ButtonElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
110
126
|
|
|
111
|
-
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
127
|
+
declare const AddMoreTable: (props: ElementType$1) => React$1.JSX.Element;
|
|
112
128
|
|
|
113
|
-
declare const Sidebar: (props: ElementType) => React$1.JSX.Element;
|
|
129
|
+
declare const Sidebar: (props: ElementType$1) => React$1.JSX.Element;
|
|
114
130
|
|
|
115
|
-
declare const Navbar: (props: ElementType) => React$1.JSX.Element;
|
|
131
|
+
declare const Navbar: (props: ElementType$1) => React$1.JSX.Element;
|
|
116
132
|
|
|
117
133
|
interface PaginationType {
|
|
118
134
|
page?: number;
|
|
119
135
|
pageSize?: number;
|
|
120
136
|
}
|
|
121
|
-
interface TableElementProps extends ElementType {
|
|
137
|
+
interface TableElementProps extends ElementType$1 {
|
|
122
138
|
value?: PaginationType;
|
|
123
139
|
}
|
|
124
140
|
declare const TableElement: (props: TableElementProps) => React$1.JSX.Element;
|
|
125
141
|
|
|
126
|
-
declare const DatePickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
142
|
+
declare const DatePickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
127
143
|
|
|
128
|
-
declare const DateRangePickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
144
|
+
declare const DateRangePickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
129
145
|
|
|
130
|
-
declare const Image: (props: ElementType) => React$1.JSX.Element;
|
|
146
|
+
declare const Image: (props: ElementType$1) => React$1.JSX.Element;
|
|
131
147
|
|
|
132
|
-
declare const SingleCheckbox: (props: ElementType) => React$1.JSX.Element;
|
|
148
|
+
declare const SingleCheckbox: (props: ElementType$1) => React$1.JSX.Element;
|
|
133
149
|
|
|
134
|
-
declare const DropDownGroup: (props: ElementType) => React$1.JSX.Element;
|
|
150
|
+
declare const DropDownGroup: (props: ElementType$1) => React$1.JSX.Element;
|
|
135
151
|
|
|
136
|
-
declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
|
|
152
|
+
declare const FileUpload: (props: ElementType$1) => React$1.JSX.Element;
|
|
137
153
|
|
|
138
|
-
declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
|
|
154
|
+
declare const TabsElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
139
155
|
|
|
140
156
|
declare const SwitchElement: () => React$1.JSX.Element;
|
|
141
157
|
|
|
142
|
-
declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
158
|
+
declare const Upload: (props: ElementType$1) => React$1.JSX.Element;
|
|
143
159
|
|
|
144
|
-
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
160
|
+
declare const OtpElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
145
161
|
|
|
146
|
-
declare const CircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
162
|
+
declare const CircleDonut: (props: ElementType$1) => React$1.JSX.Element;
|
|
147
163
|
|
|
148
|
-
declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
164
|
+
declare const SemiCircleDonut: (props: ElementType$1) => React$1.JSX.Element;
|
|
149
165
|
|
|
150
|
-
declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
166
|
+
declare const HorizontalBarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
151
167
|
|
|
152
|
-
declare const LineChart: (props: ElementType) => React$1.JSX.Element;
|
|
168
|
+
declare const LineChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
153
169
|
|
|
154
|
-
declare const DoubleBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
170
|
+
declare const DoubleBarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
155
171
|
|
|
156
|
-
declare const BarChart: (props: ElementType) => React$1.JSX.Element;
|
|
172
|
+
declare const BarChart: (props: ElementType$1) => React$1.JSX.Element;
|
|
157
173
|
|
|
158
|
-
declare const DivContainer: (props: ElementType) => React$1.JSX.Element;
|
|
174
|
+
declare const DivContainer: (props: ElementType$1) => React$1.JSX.Element;
|
|
159
175
|
|
|
160
|
-
declare const ColorPickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
176
|
+
declare const ColorPickerElement: (props: ElementType$1) => React$1.JSX.Element;
|
|
161
177
|
|
|
162
|
-
declare const NotificationAlert: (props: ElementType) => React$1.JSX.Element;
|
|
178
|
+
declare const NotificationAlert: (props: ElementType$1) => React$1.JSX.Element;
|
|
163
179
|
|
|
164
180
|
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, ColorPickerElement, DatePickerElement, DateRangePickerElement, DivContainer, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NotificationAlert, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -272,7 +272,7 @@ var RadioElement = (props) => {
|
|
|
272
272
|
var import_react7 = __toESM(require("react"));
|
|
273
273
|
var import_antd7 = require("antd");
|
|
274
274
|
var CheckboxGroup = import_antd7.Checkbox.Group;
|
|
275
|
-
var defaultCheckedList = [
|
|
275
|
+
var defaultCheckedList = [];
|
|
276
276
|
var CheckboxElement = (props) => {
|
|
277
277
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
278
278
|
const options = props.options || [];
|
|
@@ -280,7 +280,9 @@ var CheckboxElement = (props) => {
|
|
|
280
280
|
const handleChange = (list) => {
|
|
281
281
|
setCheckedList(list);
|
|
282
282
|
if (props.onChange) {
|
|
283
|
-
const selectedOptions = options.filter(
|
|
283
|
+
const selectedOptions = options.filter(
|
|
284
|
+
(option) => list.includes(option.value)
|
|
285
|
+
);
|
|
284
286
|
props.onChange(selectedOptions);
|
|
285
287
|
}
|
|
286
288
|
};
|
|
@@ -288,7 +290,8 @@ var CheckboxElement = (props) => {
|
|
|
288
290
|
const newList = e.target.checked ? options.map((option) => option.value) : [];
|
|
289
291
|
setCheckedList(newList);
|
|
290
292
|
if (props.onChange) {
|
|
291
|
-
|
|
293
|
+
const selectedOptions = e.target.checked ? options : [];
|
|
294
|
+
props.onChange(selectedOptions);
|
|
292
295
|
}
|
|
293
296
|
};
|
|
294
297
|
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(
|
|
@@ -309,7 +312,7 @@ var CheckboxElement = (props) => {
|
|
|
309
312
|
style: props.styles,
|
|
310
313
|
className: props.className,
|
|
311
314
|
options,
|
|
312
|
-
value: checkedList
|
|
315
|
+
value: checkedList,
|
|
313
316
|
onChange: handleChange
|
|
314
317
|
}
|
|
315
318
|
));
|
|
@@ -832,7 +835,7 @@ var import_react20 = __toESM(require("react"));
|
|
|
832
835
|
var import_antd14 = require("antd");
|
|
833
836
|
var import_dayjs = __toESM(require("dayjs"));
|
|
834
837
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
835
|
-
|
|
838
|
+
import_dayjs.default.extend(import_customParseFormat.default);
|
|
836
839
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
837
840
|
var DatePickerElement = (props) => {
|
|
838
841
|
const [dateState, setDateState] = (0, import_react20.useState)("");
|
|
@@ -845,7 +848,10 @@ var DatePickerElement = (props) => {
|
|
|
845
848
|
}
|
|
846
849
|
};
|
|
847
850
|
const disabledDate = (current) => {
|
|
848
|
-
|
|
851
|
+
if (props.enabled_dates === "from_today") {
|
|
852
|
+
return current && current < (0, import_dayjs.default)().startOf("day");
|
|
853
|
+
}
|
|
854
|
+
return current && current > (0, import_dayjs.default)().endOf("day");
|
|
849
855
|
};
|
|
850
856
|
return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement(
|
|
851
857
|
import_antd14.DatePicker,
|
|
@@ -853,6 +859,7 @@ var DatePickerElement = (props) => {
|
|
|
853
859
|
disabledDate,
|
|
854
860
|
placeholder: props.placeholder,
|
|
855
861
|
value: dateState,
|
|
862
|
+
showTime: true,
|
|
856
863
|
format: "DD-MM-YYYY",
|
|
857
864
|
onChange: handleChange,
|
|
858
865
|
picker: props.picker
|
|
@@ -976,6 +983,7 @@ var DropDownGroup = (props) => {
|
|
|
976
983
|
options: props.firstOptions,
|
|
977
984
|
className: props.className,
|
|
978
985
|
filterOption: firstFilterOptions,
|
|
986
|
+
placeholder: props.firstPlaceholder,
|
|
979
987
|
showSearch: true
|
|
980
988
|
}
|
|
981
989
|
), /* @__PURE__ */ import_react24.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react24.default.createElement(
|
|
@@ -986,6 +994,7 @@ var DropDownGroup = (props) => {
|
|
|
986
994
|
options: props.secondOptions,
|
|
987
995
|
className: props.className,
|
|
988
996
|
filterOption: secondFilterOptions,
|
|
997
|
+
placeholder: props.secondPlaceholder,
|
|
989
998
|
showSearch: true
|
|
990
999
|
}
|
|
991
1000
|
)));
|
package/dist/index.mjs
CHANGED
|
@@ -203,7 +203,7 @@ var RadioElement = (props) => {
|
|
|
203
203
|
import React7, { useState as useState3 } from "react";
|
|
204
204
|
import { Checkbox } from "antd";
|
|
205
205
|
var CheckboxGroup = Checkbox.Group;
|
|
206
|
-
var defaultCheckedList = [
|
|
206
|
+
var defaultCheckedList = [];
|
|
207
207
|
var CheckboxElement = (props) => {
|
|
208
208
|
const [checkedList, setCheckedList] = useState3(defaultCheckedList);
|
|
209
209
|
const options = props.options || [];
|
|
@@ -211,7 +211,9 @@ var CheckboxElement = (props) => {
|
|
|
211
211
|
const handleChange = (list) => {
|
|
212
212
|
setCheckedList(list);
|
|
213
213
|
if (props.onChange) {
|
|
214
|
-
const selectedOptions = options.filter(
|
|
214
|
+
const selectedOptions = options.filter(
|
|
215
|
+
(option) => list.includes(option.value)
|
|
216
|
+
);
|
|
215
217
|
props.onChange(selectedOptions);
|
|
216
218
|
}
|
|
217
219
|
};
|
|
@@ -219,7 +221,8 @@ var CheckboxElement = (props) => {
|
|
|
219
221
|
const newList = e.target.checked ? options.map((option) => option.value) : [];
|
|
220
222
|
setCheckedList(newList);
|
|
221
223
|
if (props.onChange) {
|
|
222
|
-
|
|
224
|
+
const selectedOptions = e.target.checked ? options : [];
|
|
225
|
+
props.onChange(selectedOptions);
|
|
223
226
|
}
|
|
224
227
|
};
|
|
225
228
|
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
@@ -240,7 +243,7 @@ var CheckboxElement = (props) => {
|
|
|
240
243
|
style: props.styles,
|
|
241
244
|
className: props.className,
|
|
242
245
|
options,
|
|
243
|
-
value: checkedList
|
|
246
|
+
value: checkedList,
|
|
244
247
|
onChange: handleChange
|
|
245
248
|
}
|
|
246
249
|
));
|
|
@@ -763,7 +766,7 @@ import React20, { useState as useState6 } from "react";
|
|
|
763
766
|
import { DatePicker } from "antd";
|
|
764
767
|
import dayjs from "dayjs";
|
|
765
768
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
766
|
-
|
|
769
|
+
dayjs.extend(customParseFormat);
|
|
767
770
|
dayjs.extend(customParseFormat);
|
|
768
771
|
var DatePickerElement = (props) => {
|
|
769
772
|
const [dateState, setDateState] = useState6("");
|
|
@@ -776,7 +779,10 @@ var DatePickerElement = (props) => {
|
|
|
776
779
|
}
|
|
777
780
|
};
|
|
778
781
|
const disabledDate = (current) => {
|
|
779
|
-
|
|
782
|
+
if (props.enabled_dates === "from_today") {
|
|
783
|
+
return current && current < dayjs().startOf("day");
|
|
784
|
+
}
|
|
785
|
+
return current && current > dayjs().endOf("day");
|
|
780
786
|
};
|
|
781
787
|
return /* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement(
|
|
782
788
|
DatePicker,
|
|
@@ -784,6 +790,7 @@ var DatePickerElement = (props) => {
|
|
|
784
790
|
disabledDate,
|
|
785
791
|
placeholder: props.placeholder,
|
|
786
792
|
value: dateState,
|
|
793
|
+
showTime: true,
|
|
787
794
|
format: "DD-MM-YYYY",
|
|
788
795
|
onChange: handleChange,
|
|
789
796
|
picker: props.picker
|
|
@@ -907,6 +914,7 @@ var DropDownGroup = (props) => {
|
|
|
907
914
|
options: props.firstOptions,
|
|
908
915
|
className: props.className,
|
|
909
916
|
filterOption: firstFilterOptions,
|
|
917
|
+
placeholder: props.firstPlaceholder,
|
|
910
918
|
showSearch: true
|
|
911
919
|
}
|
|
912
920
|
), /* @__PURE__ */ React24.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React24.createElement(
|
|
@@ -917,6 +925,7 @@ var DropDownGroup = (props) => {
|
|
|
917
925
|
options: props.secondOptions,
|
|
918
926
|
className: props.className,
|
|
919
927
|
filterOption: secondFilterOptions,
|
|
928
|
+
placeholder: props.secondPlaceholder,
|
|
920
929
|
showSearch: true
|
|
921
930
|
}
|
|
922
931
|
)));
|