sccoreui 3.6.3 → 3.6.5

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
@@ -170,7 +170,6 @@ h3 {
170
170
 
171
171
  .sc_custom_multiselect {
172
172
  // max-width: 197px;
173
- margin: 0 4px;
174
173
  width: max-content;
175
174
 
176
175
  * {
@@ -333,16 +332,27 @@ h3 {
333
332
 
334
333
 
335
334
  .custom_date_picker_sec {
336
-
337
335
  .custom_date_picker {
338
-
339
336
  // padding-left: 134px;
340
- .p-inputtext {
341
- padding-right: 16px;
342
- width: 130px;
343
- // max-width: max-content;
337
+ .p-inputtext { padding-right: 16px;
338
+ width: 130px;
339
+ // max-width: max-content;
340
+ }
341
+ .p-inputtext {
342
+ &:enabled {
343
+ &:focus {
344
+ box-shadow: none !important;
345
+ border-color: #d0d5dd !important;
346
+ }
344
347
  }
345
348
  }
349
+ .p-datepicker-trigger {
350
+ &:focus {
351
+ box-shadow: none !important;
352
+ border-color: #d0d5dd !important;
353
+ }
354
+ }
355
+ }
346
356
 
347
357
  .custom_date_picker.multiple {
348
358
  .p-inputtext {
@@ -449,4 +459,10 @@ div:has(ul.date_filter) .p-datepicker-footer {
449
459
 
450
460
  // div:has(ul.date_filter) .p-datepicker-group-container {
451
461
  // padding: 0;
452
- // }
462
+ // }
463
+
464
+ .Multi_select_dropdown_panel.hidePanelHeader {
465
+ .p-multiselect-header{
466
+ display: none;
467
+ }
468
+ }
@@ -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() + 7);
15
+ oneWeekFromToday.setDate(today.getDate());
14
16
  const formattedDate = today.toLocaleDateString('en-US', options);
15
- const [fromDate, setFromDate] = (0, react_1.useState)(today);
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[0] = today;
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[0] = yesterdayFromToday;
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[1] = oneWeekFromToday;
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[0] = lastWeekFromToday;
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[1] = oneMonthFromToday;
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[0] = lastOneMonthFromToday;
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[1] = oneYearFromToday;
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[0] = lastOneYearFromToday;
65
- dateFromTo[1] = today;
63
+ dateFromTo.unshift(lastOneYearFromToday);
66
64
  break;
67
65
  case 'Custom':
68
66
  // Default date
@@ -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)), (props.clear && JSON.stringify(fromDate).split(',').length > 1) &&
144
142
  clearIcon()] })));
145
143
  };
146
- exports.default = DatePicker;
144
+ exports.DatePicker = DatePicker;
145
+ exports.default = exports.DatePicker;
@@ -43,10 +43,10 @@ const MultiSelectDropDown = (props) => {
43
43
  setItems(props.value);
44
44
  }, [props.value]);
45
45
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.dropdownType !== '' &&
46
- (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative ${(props.dropdownType !== undefined && props.dropdownType === "status") ? 'status_dropdown' : ''} ${isMoreThanOne ? `selected_multile ${`selected_num_` + items.length}` : ''}` }, { children: [(0, jsx_runtime_1.jsx)(LeftSection, {}), (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { panelClassName: `panel_${props.dropdownType}`, value: items, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", itemTemplate: props.dropdownType === 'status' ? (option) => { return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `status_dropdown_item pl-6 ${option.name}` }, { children: option.name })) })); } : '', filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` }), items.length > 0 &&
46
+ (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative ${(props.dropdownType !== undefined && props.dropdownType === "status") ? 'status_dropdown' : ''} ${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", itemTemplate: props.dropdownType === 'status' ? (option) => { return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `status_dropdown_item pl-6 ${option.name}` }, { children: option.name })) })); } : '', filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` }), items.length > 0 &&
47
47
  (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
48
  clearIcon()] }))] })), props.dropdownType === '' &&
49
- (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { 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` })] }));
49
+ (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` })] }));
50
50
  };
51
51
  exports.MultiSelectDropDown = MultiSelectDropDown;
52
52
  exports.default = exports.MultiSelectDropDown;
@@ -8930,5 +8930,11 @@ exports.iconList = [
8930
8930
  </svg>
8931
8931
  `,
8932
8932
  },
8933
+ {
8934
+ name: "file-check-03",
8935
+ svg: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
8936
+ <path d="M11.6654 1.8913V5.33341C11.6654 5.80012 11.6654 6.03348 11.7562 6.21174C11.8361 6.36854 11.9636 6.49602 12.1204 6.57592C12.2986 6.66675 12.532 6.66675 12.9987 6.66675H16.4408M7.4987 13.3334L9.16536 15L12.9154 11.25M11.6654 1.66669H7.33203C5.9319 1.66669 5.23183 1.66669 4.69705 1.93917C4.22665 2.17885 3.8442 2.56131 3.60451 3.03171C3.33203 3.56649 3.33203 4.26656 3.33203 5.66669V14.3334C3.33203 15.7335 3.33203 16.4336 3.60451 16.9683C3.8442 17.4387 4.22665 17.8212 4.69705 18.0609C5.23183 18.3334 5.9319 18.3334 7.33203 18.3334H12.6654C14.0655 18.3334 14.7656 18.3334 15.3003 18.0609C15.7707 17.8212 16.1532 17.4387 16.3929 16.9683C16.6654 16.4336 16.6654 15.7335 16.6654 14.3334V6.66669L11.6654 1.66669Z" stroke="#667085" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
8937
+ </svg>`
8938
+ }
8933
8939
  ];
8934
8940
  // console.log(iconList.length)
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "3.6.3",
3
+ "version": "3.6.5",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",