sccoreui 3.6.4 → 3.6.6
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/App.scss
CHANGED
|
@@ -254,17 +254,6 @@ h3 {
|
|
|
254
254
|
background: #667085;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
li.active {
|
|
258
|
-
background: #12B76A;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
li.inactive {
|
|
262
|
-
background: #F04438;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
li.draft {
|
|
266
|
-
background: #162578;
|
|
267
|
-
}
|
|
268
257
|
|
|
269
258
|
li:nth-child(2) {
|
|
270
259
|
left: 6px;
|
|
@@ -290,12 +279,14 @@ h3 {
|
|
|
290
279
|
}
|
|
291
280
|
}
|
|
292
281
|
|
|
293
|
-
.selected_multile.selected_num_3 {
|
|
282
|
+
.selected_multile.selected_num_3 , .selected_multile.moreThanThreeItems {
|
|
294
283
|
.p-multiselect .p-multiselect-label {
|
|
295
284
|
padding-left: 44px;
|
|
296
285
|
}
|
|
297
286
|
}
|
|
298
287
|
|
|
288
|
+
|
|
289
|
+
|
|
299
290
|
.status_dropdown.selected_multile {
|
|
300
291
|
.left_section_item {
|
|
301
292
|
max-width: 28px;
|
|
@@ -307,16 +298,16 @@ h3 {
|
|
|
307
298
|
}
|
|
308
299
|
}
|
|
309
300
|
|
|
310
|
-
.status_dropdown_item:before {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
301
|
+
// .status_dropdown_item:before {
|
|
302
|
+
// content: '';
|
|
303
|
+
// width: 10px;
|
|
304
|
+
// height: 10px;
|
|
305
|
+
// position: absolute;
|
|
306
|
+
// transform: translateY(-50%);
|
|
307
|
+
// top: 50%;
|
|
308
|
+
// left: 10px;
|
|
309
|
+
// border-radius: 50px;
|
|
310
|
+
// }
|
|
320
311
|
|
|
321
312
|
.status_dropdown_item.Active::before {
|
|
322
313
|
background: #12B76A;
|
|
@@ -330,9 +321,20 @@ h3 {
|
|
|
330
321
|
background: #162578;
|
|
331
322
|
}
|
|
332
323
|
|
|
324
|
+
.status_dropdown_item {
|
|
325
|
+
.status_dot {
|
|
326
|
+
width: 10px;
|
|
327
|
+
height: 10px;
|
|
328
|
+
border-radius: 50px;
|
|
329
|
+
position: absolute;
|
|
330
|
+
transform: translateY(-50%);
|
|
331
|
+
top: 50%;
|
|
332
|
+
left: 10px;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
333
336
|
|
|
334
337
|
.custom_date_picker_sec {
|
|
335
|
-
|
|
336
338
|
.custom_date_picker {
|
|
337
339
|
|
|
338
340
|
// padding-left: 134px;
|
|
@@ -341,6 +343,22 @@ h3 {
|
|
|
341
343
|
width: 130px;
|
|
342
344
|
// max-width: max-content;
|
|
343
345
|
}
|
|
346
|
+
|
|
347
|
+
.p-inputtext {
|
|
348
|
+
&:enabled {
|
|
349
|
+
&:focus {
|
|
350
|
+
box-shadow: none !important;
|
|
351
|
+
border-color: #d0d5dd !important;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.p-datepicker-trigger {
|
|
357
|
+
&:focus {
|
|
358
|
+
box-shadow: none !important;
|
|
359
|
+
border-color: #d0d5dd !important;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
344
362
|
}
|
|
345
363
|
|
|
346
364
|
.custom_date_picker.multiple {
|
|
@@ -451,7 +469,7 @@ div:has(ul.date_filter) .p-datepicker-footer {
|
|
|
451
469
|
// }
|
|
452
470
|
|
|
453
471
|
.Multi_select_dropdown_panel.hidePanelHeader {
|
|
454
|
-
.p-multiselect-header{
|
|
472
|
+
.p-multiselect-header {
|
|
455
473
|
display: none;
|
|
456
474
|
}
|
|
457
475
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatePicker = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const calendar_1 = require("primereact/calendar");
|
|
@@ -7,18 +8,19 @@ const react_1 = require("react");
|
|
|
7
8
|
const button_1 = require("primereact/button");
|
|
8
9
|
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
9
10
|
const DatePicker = (props) => {
|
|
11
|
+
const dateRef = (0, react_1.useRef)(null);
|
|
10
12
|
const today = new Date();
|
|
11
13
|
const options = { year: 'numeric', month: 'short', day: 'numeric' };
|
|
12
14
|
const oneWeekFromToday = new Date(today);
|
|
13
|
-
oneWeekFromToday.setDate(today.getDate()
|
|
15
|
+
oneWeekFromToday.setDate(today.getDate());
|
|
14
16
|
const formattedDate = today.toLocaleDateString('en-US', options);
|
|
15
|
-
const [fromDate, setFromDate] = (0, react_1.useState)(
|
|
17
|
+
const [fromDate, setFromDate] = (0, react_1.useState)([]);
|
|
16
18
|
const [fromDateFormate, setFromDateFormate] = (0, react_1.useState)(formattedDate);
|
|
17
19
|
const [toDateFormate, setToDateFormate] = (0, react_1.useState)('-');
|
|
18
20
|
const [propsState, setPropsState] = (0, react_1.useState)({});
|
|
19
|
-
let dateFromTo =
|
|
21
|
+
let dateFromTo = [];
|
|
20
22
|
const selecteDateOption = (dateType) => {
|
|
21
|
-
dateFromTo
|
|
23
|
+
dateFromTo.push(today);
|
|
22
24
|
switch (dateType) {
|
|
23
25
|
case 'Today':
|
|
24
26
|
// Default date
|
|
@@ -26,43 +28,39 @@ const DatePicker = (props) => {
|
|
|
26
28
|
case 'Yesterday':
|
|
27
29
|
const yesterdayFromToday = new Date(today);
|
|
28
30
|
yesterdayFromToday.setDate(today.getDate() - 1);
|
|
29
|
-
dateFromTo
|
|
30
|
-
dateFromTo[1] = today;
|
|
31
|
+
dateFromTo.unshift(yesterdayFromToday);
|
|
31
32
|
break;
|
|
32
33
|
case 'This week': {
|
|
33
34
|
const oneWeekFromToday = new Date(today);
|
|
34
35
|
oneWeekFromToday.setDate(today.getDate() + 7);
|
|
35
|
-
dateFromTo
|
|
36
|
+
dateFromTo.push(oneWeekFromToday);
|
|
36
37
|
break;
|
|
37
38
|
}
|
|
38
39
|
case 'Last week': {
|
|
39
40
|
const lastWeekFromToday = new Date(today);
|
|
40
41
|
lastWeekFromToday.setDate(today.getDate() - 7);
|
|
41
|
-
dateFromTo
|
|
42
|
-
dateFromTo[1] = today;
|
|
42
|
+
dateFromTo.unshift(lastWeekFromToday);
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
45
|
case 'This month':
|
|
46
46
|
const oneMonthFromToday = new Date(today);
|
|
47
47
|
oneMonthFromToday.setDate(today.getDate() + 30);
|
|
48
|
-
dateFromTo
|
|
48
|
+
dateFromTo.push(oneMonthFromToday);
|
|
49
49
|
break;
|
|
50
50
|
case 'Last month':
|
|
51
51
|
const lastOneMonthFromToday = new Date(today);
|
|
52
52
|
lastOneMonthFromToday.setDate(today.getDate() - 30);
|
|
53
|
-
dateFromTo
|
|
54
|
-
dateFromTo[1] = today;
|
|
53
|
+
dateFromTo.unshift(lastOneMonthFromToday);
|
|
55
54
|
break;
|
|
56
55
|
case 'This year':
|
|
57
56
|
const oneYearFromToday = new Date(today);
|
|
58
57
|
oneYearFromToday.setFullYear(today.getFullYear() + 1);
|
|
59
|
-
dateFromTo
|
|
58
|
+
dateFromTo.push(oneYearFromToday);
|
|
60
59
|
break;
|
|
61
60
|
case 'Last year':
|
|
62
61
|
const lastOneYearFromToday = new Date(today);
|
|
63
62
|
lastOneYearFromToday.setFullYear(today.getFullYear() - 1);
|
|
64
|
-
dateFromTo
|
|
65
|
-
dateFromTo[1] = today;
|
|
63
|
+
dateFromTo.unshift(lastOneYearFromToday);
|
|
66
64
|
break;
|
|
67
65
|
case 'Custom':
|
|
68
66
|
// Default date
|
|
@@ -93,7 +91,7 @@ const DatePicker = (props) => {
|
|
|
93
91
|
for (let key in props) {
|
|
94
92
|
switch (key) {
|
|
95
93
|
case 'iconPos':
|
|
96
|
-
datePickerProps['iconPos'] = props.iconPos
|
|
94
|
+
// datePickerProps['iconPos'] = props.iconPos
|
|
97
95
|
datePickerProps['icon'] = (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: props.icon });
|
|
98
96
|
break;
|
|
99
97
|
case 'numberOfMonths':
|
|
@@ -140,7 +138,8 @@ const DatePicker = (props) => {
|
|
|
140
138
|
};
|
|
141
139
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ onClick: onClear, className: "flex align-items-center absolute right-20 clear_icon_sec cursor-pointer" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { className: "icon_right right_section_item absolute z-5 ", icon: props.clear, size: 20 }, Math.floor(Math.random() * 1000)) })));
|
|
142
140
|
};
|
|
143
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex justify-content-center w-full relative align-items-center custom_date_picker_sec` }, { children: [(0, jsx_runtime_1.jsx)(calendar_1.Calendar, Object.assign({ showIcon: true, value: fromDate, onChange: (e) => onChangeDate(e), footerTemplate: template, className: `custom_date_picker ${(!JSON.stringify(fromDate).includes('null') && JSON.stringify(fromDate).includes(',')) ? 'multiple' : ''}` }, propsState)), (props.clear && JSON.stringify(fromDate).split(',').length > 1) &&
|
|
141
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex justify-content-center w-full relative align-items-center custom_date_picker_sec` }, { children: [(0, jsx_runtime_1.jsx)(calendar_1.Calendar, Object.assign({ ref: dateRef, showIcon: true, value: fromDate, onChange: (e) => onChangeDate(e), footerTemplate: template, className: `custom_date_picker ${(!JSON.stringify(fromDate).includes('null') && JSON.stringify(fromDate).includes(',')) ? 'multiple' : ''}` }, propsState, { iconPos: props.iconPos })), (props.clear && JSON.stringify(fromDate).split(',').length > 1) &&
|
|
144
142
|
clearIcon()] })));
|
|
145
143
|
};
|
|
146
|
-
exports.
|
|
144
|
+
exports.DatePicker = DatePicker;
|
|
145
|
+
exports.default = exports.DatePicker;
|
|
@@ -10,10 +10,10 @@ const MultiSelectDropDown = (props) => {
|
|
|
10
10
|
const [items, setItems] = (0, react_1.useState)([]);
|
|
11
11
|
const [isMoreThanOne, setIsMoreThenOne] = (0, react_1.useState)(false);
|
|
12
12
|
const LeftSection = () => {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children:
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.dropdownType === "status" ?
|
|
14
14
|
(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'select_status_prv absolute left_section_item z-5' }, { children: items.length > 0 ?
|
|
15
15
|
(0, jsx_runtime_1.jsx)("ul", Object.assign({ className: 'p-0 m-0 list-none' }, { children: items.map((status, i) => {
|
|
16
|
-
return (0, jsx_runtime_1.jsx)("li", { className: `${status.
|
|
16
|
+
return (0, jsx_runtime_1.jsx)("li", { style: { background: status.color }, className: `${status.name.replaceAll(' ', '').toLowerCase()}` }, i);
|
|
17
17
|
}) }))
|
|
18
18
|
:
|
|
19
19
|
(0, jsx_runtime_1.jsx)("ul", Object.assign({ className: 'p-0 m-0 list-none' }, { children: (0, jsx_runtime_1.jsx)("li", { className: 'all' }) })) }))
|
|
@@ -42,8 +42,14 @@ const MultiSelectDropDown = (props) => {
|
|
|
42
42
|
if (props.value !== undefined)
|
|
43
43
|
setItems(props.value);
|
|
44
44
|
}, [props.value]);
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const itemTemplate = (option) => {
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `status_dropdown_item pl-6 ${option.name.replaceAll(' ', '').toLowerCase()}` }, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'status_dot', style: { background: option.color } }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'otption_name mr-8' }, { children: option.name }))] })) }));
|
|
47
|
+
};
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.dropdownType === 'withIcon' &&
|
|
49
|
+
(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative ${isMoreThanOne ? `selected_multile ${`selected_num_` + items.length}` : ''}` }, { children: [(0, jsx_runtime_1.jsx)(LeftSection, {}), (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { panelClassName: `Multi_select_dropdown_panel panel_${props.dropdownType} ${props.hidePanelHeader !== undefined ? 'hidePanelHeader' : ''}`, value: items, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` }), items.length > 0 &&
|
|
50
|
+
(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [isMoreThanOne && (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "selected_moreThan_one absolute z-5" }, { children: [" +", items.length - props.maxSelectedLabels] })), props.clear &&
|
|
51
|
+
clearIcon()] }))] })), props.dropdownType === 'status' &&
|
|
52
|
+
(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative status_dropdown ${isMoreThanOne ? `selected_multile ${`selected_num_` + items.length}` : ''} ${items.length > 3 ? 'moreThanThreeItems' : ''}` }, { children: [(0, jsx_runtime_1.jsx)(LeftSection, {}), (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { panelClassName: `Multi_select_dropdown_panel panel_${props.dropdownType} ${props.hidePanelHeader !== undefined ? 'hidePanelHeader' : ''}`, value: items, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", itemTemplate: (option) => itemTemplate(option), filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` }), items.length > 0 &&
|
|
47
53
|
(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [isMoreThanOne && (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "selected_moreThan_one absolute z-5" }, { children: [" +", items.length - props.maxSelectedLabels] })), props.clear &&
|
|
48
54
|
clearIcon()] }))] })), props.dropdownType === '' &&
|
|
49
55
|
(0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { value: items, panelClassName: `Multi_select_dropdown_panel ${props.hidePanelHeader !== undefined ? 'hidePanelHeader' : ''}`, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` })] }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const DatePicker: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const DatePicker: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default DatePicker;
|