funda-ui 4.3.555 → 4.4.15

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.
Files changed (63) hide show
  1. package/Date/index.js +104 -0
  2. package/EventCalendar/index.css +7 -0
  3. package/EventCalendar/index.d.ts +2 -0
  4. package/EventCalendar/index.js +228 -89
  5. package/EventCalendarTimeline/index.css +29 -1
  6. package/EventCalendarTimeline/index.d.ts +11 -1
  7. package/EventCalendarTimeline/index.js +796 -298
  8. package/MultipleSelect/index.js +1 -1
  9. package/NativeSelect/index.js +1 -1
  10. package/Select/index.css +17 -0
  11. package/Select/index.d.ts +1 -0
  12. package/Select/index.js +83 -38
  13. package/Table/index.d.ts +4 -4
  14. package/Table/index.js +17 -17
  15. package/Tree/index.js +1 -1
  16. package/Utils/date.d.ts +27 -1
  17. package/Utils/date.js +92 -0
  18. package/lib/cjs/Date/index.js +104 -0
  19. package/lib/cjs/EventCalendar/index.d.ts +2 -0
  20. package/lib/cjs/EventCalendar/index.js +228 -89
  21. package/lib/cjs/EventCalendarTimeline/index.d.ts +11 -1
  22. package/lib/cjs/EventCalendarTimeline/index.js +796 -298
  23. package/lib/cjs/MultipleSelect/index.js +1 -1
  24. package/lib/cjs/NativeSelect/index.js +1 -1
  25. package/lib/cjs/Select/index.d.ts +1 -0
  26. package/lib/cjs/Select/index.js +83 -38
  27. package/lib/cjs/Table/index.d.ts +4 -4
  28. package/lib/cjs/Table/index.js +17 -17
  29. package/lib/cjs/Tree/index.js +1 -1
  30. package/lib/cjs/Utils/date.d.ts +27 -1
  31. package/lib/cjs/Utils/date.js +92 -0
  32. package/lib/css/EventCalendar/index.css +7 -0
  33. package/lib/css/EventCalendarTimeline/index.css +29 -1
  34. package/lib/css/Select/index.css +17 -0
  35. package/lib/esm/EventCalendar/index.scss +9 -0
  36. package/lib/esm/EventCalendar/index.tsx +203 -156
  37. package/lib/esm/EventCalendarTimeline/index.scss +46 -1
  38. package/lib/esm/EventCalendarTimeline/index.tsx +815 -358
  39. package/lib/esm/MultipleSelect/ItemList.tsx +1 -1
  40. package/lib/esm/MultipleSelect/index.tsx +1 -1
  41. package/lib/esm/NativeSelect/index.tsx +1 -1
  42. package/lib/esm/Select/index.scss +36 -1
  43. package/lib/esm/Select/index.tsx +179 -30
  44. package/lib/esm/Table/Table.tsx +2 -2
  45. package/lib/esm/Table/TableCell.tsx +2 -2
  46. package/lib/esm/Table/TableRow.tsx +1 -1
  47. package/lib/esm/Table/index.tsx +4 -4
  48. package/lib/esm/Tree/TreeList.tsx +1 -1
  49. package/lib/esm/Utils/libs/date.ts +101 -1
  50. package/package.json +1 -1
  51. /package/lib/esm/MultipleSelect/{multiple-select-utils → utils}/func.ts +0 -0
  52. /package/lib/esm/NativeSelect/{native-select-utils → utils}/func.ts +0 -0
  53. /package/lib/esm/Select/{select-utils → utils}/func.ts +0 -0
  54. /package/lib/esm/Table/{table-utils → utils}/DragHandleSprite.tsx +0 -0
  55. /package/lib/esm/Table/{table-utils → utils}/SortSprite.tsx +0 -0
  56. /package/lib/esm/Table/{table-utils → utils}/TableFilter.tsx +0 -0
  57. /package/lib/esm/Table/{table-utils → utils}/ToggleSelection.tsx +0 -0
  58. /package/lib/esm/Table/{table-utils → utils}/func.ts +0 -0
  59. /package/lib/esm/Table/{table-utils → utils}/hooks/useTableDraggable.tsx +0 -0
  60. /package/lib/esm/Table/{table-utils → utils}/hooks/useTableKeyPress.tsx +0 -0
  61. /package/lib/esm/Table/{table-utils → utils}/hooks/useTableResponsive.tsx +0 -0
  62. /package/lib/esm/Table/{table-utils → utils}/hooks/useTableSort.tsx +0 -0
  63. /package/lib/esm/Tree/{tree-utils.ts → utils/func.ts} +0 -0
@@ -52,9 +52,11 @@ __webpack_require__.r(__webpack_exports__);
52
52
  /* harmony export */ "getCurrentDay": () => (/* binding */ getCurrentDay),
53
53
  /* harmony export */ "getCurrentMonth": () => (/* binding */ getCurrentMonth),
54
54
  /* harmony export */ "getCurrentYear": () => (/* binding */ getCurrentYear),
55
+ /* harmony export */ "getDateDetails": () => (/* binding */ getDateDetails),
55
56
  /* harmony export */ "getFirstAndLastMonthDay": () => (/* binding */ getFirstAndLastMonthDay),
56
57
  /* harmony export */ "getFullTime": () => (/* binding */ getFullTime),
57
58
  /* harmony export */ "getLastDayInMonth": () => (/* binding */ getLastDayInMonth),
59
+ /* harmony export */ "getMonthDates": () => (/* binding */ getMonthDates),
58
60
  /* harmony export */ "getNextMonthDate": () => (/* binding */ getNextMonthDate),
59
61
  /* harmony export */ "getNextYearDate": () => (/* binding */ getNextYearDate),
60
62
  /* harmony export */ "getNow": () => (/* binding */ getNow),
@@ -63,6 +65,8 @@ __webpack_require__.r(__webpack_exports__);
63
65
  /* harmony export */ "getSpecifiedDate": () => (/* binding */ getSpecifiedDate),
64
66
  /* harmony export */ "getTodayDate": () => (/* binding */ getTodayDate),
65
67
  /* harmony export */ "getTomorrowDate": () => (/* binding */ getTomorrowDate),
68
+ /* harmony export */ "getWeekDatesFromMon": () => (/* binding */ getWeekDatesFromMon),
69
+ /* harmony export */ "getWeekDatesFromSun": () => (/* binding */ getWeekDatesFromSun),
66
70
  /* harmony export */ "getYesterdayDate": () => (/* binding */ getYesterdayDate),
67
71
  /* harmony export */ "isTimeString": () => (/* binding */ isTimeString),
68
72
  /* harmony export */ "isValidDate": () => (/* binding */ isValidDate),
@@ -174,6 +178,31 @@ function dateFormat(v) {
174
178
  return date;
175
179
  }
176
180
 
181
+ /**
182
+ * Get date details
183
+ * @param {Date | String} v
184
+ * @param {Boolean} padZeroEnabled
185
+ * @typedef {Object} JSON
186
+ */
187
+ function getDateDetails(v) {
188
+ var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
189
+ var date = dateFormat(v);
190
+ var year = date.getFullYear();
191
+ var month = padZero(date.getMonth() + 1, padZeroEnabled);
192
+ var day = padZero(date.getDate(), padZeroEnabled);
193
+ var hours = padZero(date.getHours(), padZeroEnabled);
194
+ var minutes = padZero(date.getMinutes(), padZeroEnabled);
195
+ var seconds = padZero(date.getSeconds(), padZeroEnabled);
196
+ return {
197
+ year: String(year),
198
+ month: month,
199
+ day: day,
200
+ hours: hours,
201
+ minutes: minutes,
202
+ seconds: seconds
203
+ };
204
+ }
205
+
177
206
  /**
178
207
  * Get calendar date
179
208
  * @param {Date | String} v
@@ -469,6 +498,69 @@ function timestampToDate(v) {
469
498
  return getFullTime(new Date(v), padZeroEnabled);
470
499
  }
471
500
 
501
+ /**
502
+ * Get the date of the specified month
503
+ * @param {Number} year
504
+ * @param {Number} month
505
+ * @returns {Array<string>}
506
+ */
507
+ function getMonthDates(year, month) {
508
+ var dates = [];
509
+
510
+ // Get the total number of days in the month
511
+ var daysInMonth = new Date(year, month, 0).getDate();
512
+ for (var day = 1; day <= daysInMonth; day++) {
513
+ dates.push("".concat(year, "-").concat(String(month).padStart(2, '0'), "-").concat(String(day).padStart(2, '0'))); // 'YYYY-MM-DD'
514
+ }
515
+
516
+ return dates;
517
+ }
518
+
519
+ /**
520
+ * Get the date of the specified week (From Sunday)
521
+ * @param {Number} weekOffset
522
+ * @returns {Array<Date>}
523
+ */
524
+ function getWeekDatesFromSun(weekOffset) {
525
+ var dates = [];
526
+ var currentDate = new Date();
527
+
528
+ // Calculate the date of Sunday
529
+ var dayOfWeek = currentDate.getDay(); // 0 is Sunday
530
+ currentDate.setDate(currentDate.getDate() - dayOfWeek + weekOffset * 7);
531
+
532
+ // Get the date of the week
533
+ for (var i = 0; i < 7; i++) {
534
+ var date = new Date(currentDate);
535
+ date.setDate(currentDate.getDate() + i);
536
+ dates.push(date);
537
+ }
538
+ return dates;
539
+ }
540
+
541
+ /**
542
+ * Get the date of the specified week (From Monday)
543
+ * @param {Number} weekOffset
544
+ * @returns {Array<Date>}
545
+ */
546
+ function getWeekDatesFromMon(weekOffset) {
547
+ var dates = [];
548
+ var currentDate = new Date();
549
+
550
+ // Set the date to Monday
551
+ var dayOfWeek = currentDate.getDay();
552
+ var diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
553
+ currentDate.setDate(currentDate.getDate() + diffToMonday + weekOffset * 7);
554
+
555
+ // Get the date of the week
556
+ for (var i = 0; i < 7; i++) {
557
+ var date = new Date(currentDate);
558
+ date.setDate(currentDate.getDate() + i);
559
+ dates.push(date);
560
+ }
561
+ return dates;
562
+ }
563
+
472
564
  /******/ return __webpack_exports__;
473
565
  /******/ })()
474
566
  ;
@@ -32,12 +32,16 @@
32
32
  position: relative;
33
33
  min-width: var(--e-cal-normal-wrapper-min-width);
34
34
  border: 1px solid var(--e-cal-normal-border-color);
35
+ /* Required when using onKeyDown */
35
36
  /* --HEADER --*/
36
37
  /*-- BODY --*/
37
38
  /*-- CELL --*/
38
39
  /*-- SELECTION --*/
39
40
  /* --BUTTON --*/
40
41
  }
42
+ .e-cal-normal__wrapper[tabindex]:focus-visible {
43
+ outline: none;
44
+ }
41
45
  .e-cal-normal__wrapper .e-cal-normal__header {
42
46
  font-size: var(--e-cal-normal-header-fs);
43
47
  font-weight: bold;
@@ -186,6 +190,9 @@
186
190
  position: relative;
187
191
  width: 100%;
188
192
  }
193
+ .e-cal-normal__wrapper .e-cal-normal__row .e-cal-normal__cell.empty > div {
194
+ opacity: 0.2;
195
+ }
189
196
  .e-cal-normal__wrapper .e-cal-normal__row .e-cal-normal__cell:not(.empty) {
190
197
  cursor: pointer;
191
198
  }
@@ -25,6 +25,7 @@
25
25
  --e-cal-timeline-header-prevnext-btn-radius: 0.25rem;
26
26
  --e-cal-timeline-footer-today-btn-bg: rgba(0, 58, 166, 1);
27
27
  --e-cal-timeline-footer-today-btn-color: #fff;
28
+ --e-cal-timeline-appearance-btn-active-bg: rgb(239, 239, 239);
28
29
  position: relative;
29
30
  z-index: 3;
30
31
  min-width: var(--e-cal-timeline-wrapper-min-width);
@@ -32,6 +33,7 @@
32
33
  /* --HEADER --*/
33
34
  /*-- SELECTION --*/
34
35
  /* --BUTTON --*/
36
+ /* WEEK MODE --*/
35
37
  }
36
38
  .e-cal-timeline__wrapper .e-cal-timeline__header {
37
39
  font-size: var(--e-cal-timeline-header-fs);
@@ -40,6 +42,11 @@
40
42
  display: flex;
41
43
  justify-content: space-between;
42
44
  }
45
+ .e-cal-timeline__wrapper .e-cal-timeline__header .e-cal-timeline__header__info {
46
+ font-weight: normal;
47
+ font-size: 0.875em;
48
+ margin-bottom: 0.2rem;
49
+ }
43
50
  .e-cal-timeline__wrapper .e-cal-timeline__header .e-cal-timeline__header__btns .e-cal-timeline__btn {
44
51
  margin-right: 1rem;
45
52
  color: var(--e-cal-timeline-header-text-color);
@@ -133,6 +140,7 @@
133
140
  margin: 0;
134
141
  box-shadow: none;
135
142
  cursor: pointer;
143
+ margin-right: 0.35rem;
136
144
  /* required */
137
145
  display: inline-flex;
138
146
  align-items: center;
@@ -160,7 +168,20 @@
160
168
  color: var(--e-cal-timeline-footer-today-btn-color);
161
169
  background-color: var(--e-cal-timeline-footer-today-btn-bg);
162
170
  }
171
+ .e-cal-timeline__wrapper .e-cal-timeline__btn--appearance {
172
+ border: 1px solid var(--e-cal-timeline-border-color);
173
+ border-radius: 0.25rem;
174
+ font-size: 0.875em;
175
+ padding: 0.2rem 1rem;
176
+ }
177
+ .e-cal-timeline__wrapper .e-cal-timeline__btn--appearance.active {
178
+ background-color: var(--e-cal-timeline-appearance-btn-active-bg);
179
+ }
180
+ .e-cal-timeline__wrapper.e-cal-timeline__wrapper--week .e-cal-timeline__header__info {
181
+ transform: translateX(-2.5rem);
182
+ }
163
183
 
184
+ /* WEEK MODE*/
164
185
  /*
165
186
  ///////////////////////////////////////////////////
166
187
  //////////////////// Table Grid //////////////////
@@ -192,12 +213,13 @@
192
213
  --e-cal-timeline-table-add-btn-color: #0b5ed7;
193
214
  --e-cal-timeline-table-event-font-size: 0.75rem;
194
215
  --e-cal-timeline-table-event-hover-bg: rgba(255, 240, 227, 0);
195
- --e-cal-timeline-table-event-hover-shadow: inset 0px 0px 0px 1px rgba(0,0,0,0.15);
216
+ --e-cal-timeline-table-event-hover-shadow: inset 0px 0px 0px 1px rgba(21, 21, 240, 0.45);
196
217
  height: 100%; /* Required */
197
218
  font-size: var(--e-cal-timeline-table-bodycell-font-size);
198
219
  margin-top: -1px;
199
220
  position: relative;
200
221
  z-index: 2;
222
+ /* Required when using onKeyDown */
201
223
  /* list section */
202
224
  /* datagrid title */
203
225
  /* datagrid content */
@@ -220,6 +242,9 @@
220
242
  /* cell */
221
243
  /* scroller */
222
244
  }
245
+ .e-cal-timeline-table__timeline-table__wrapper[tabindex]:focus-visible {
246
+ outline: none;
247
+ }
223
248
  .e-cal-timeline-table__timeline-table__wrapper .e-cal-timeline-table__timeline-table {
224
249
  border: var(--e-cal-timeline-table-primary-border);
225
250
  text-align: left;
@@ -468,6 +493,9 @@
468
493
  overflow: hidden;
469
494
  height: auto;
470
495
  }
496
+ .e-cal-timeline-table__timeline-table__wrapper .e-cal-timeline-table__scroller-harness--hideX {
497
+ overflow-x: hidden !important;
498
+ }
471
499
  .e-cal-timeline-table__timeline-table__wrapper .e-cal-timeline-table__scroller-harness[data-scroll=body].dragging {
472
500
  cursor: grab;
473
501
  }
@@ -262,6 +262,7 @@
262
262
  --cus-sel-listgroup-popwin-min-width: 200px;
263
263
  --cus-sel-listgroup-tool-bg: rgb(248,249,250);
264
264
  --cus-sel-listgroup-checkbox: #a5a5a5;
265
+ --cus-sel-listgroup-checkbox-active: #3162B2;
265
266
  --cus-sel-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
266
267
  --cus-sel-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
267
268
  --cus-sel-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
@@ -271,6 +272,7 @@
271
272
  display: none;
272
273
  min-width: var(--cus-sel-listgroup-popwin-min-width);
273
274
  z-index: 1055; /* --bs-modal-zindex */
275
+ /*------ Multiple selection ------*/
274
276
  /*------ Group ------*/
275
277
  /*------ Extended buttons of Multiple selection ------*/
276
278
  /*------ Extended buttons of Single selection ------*/
@@ -302,6 +304,9 @@
302
304
  .custom-select__options-wrapper .bg-light {
303
305
  background-color: var(--cus-sel-listgroup-tool-bg) !important;
304
306
  }
307
+ .custom-select__options-wrapper .list-group-item {
308
+ /* ITEM SELECTED */
309
+ }
305
310
  .custom-select__options-wrapper .list-group-item.hide {
306
311
  display: none;
307
312
  }
@@ -326,9 +331,21 @@
326
331
  .custom-select__options-wrapper .list-group-item .custom-select-multi__control-option-checkbox-selected svg path {
327
332
  stroke: var(--cus-sel-listgroup-checkbox);
328
333
  }
334
+ .custom-select__options-wrapper .list-group-item.item-selected .custom-select-multi__control-option-checkbox-placeholder svg path {
335
+ stroke: var(--cus-sel-listgroup-checkbox-active);
336
+ }
337
+ .custom-select__options-wrapper .list-group-item.item-selected .custom-select-multi__control-option-checkbox-selected svg {
338
+ fill: var(--cus-sel-listgroup-checkbox-active);
339
+ }
340
+ .custom-select__options-wrapper .list-group-item.item-selected .custom-select-multi__control-option-checkbox-selected svg path {
341
+ stroke: var(--cus-sel-listgroup-checkbox-active);
342
+ }
329
343
  .custom-select__options-wrapper .list-group-item:hover, .custom-select__options-wrapper .list-group-item:focus {
330
344
  background-color: var(--cus-sel-listgroup-item-hover-focus-bg);
331
345
  }
346
+ .custom-select__options-wrapper.multiple-selection .list-group-item.active {
347
+ border-top-width: 0;
348
+ }
332
349
  .custom-select__options-wrapper .custom-select-grouptitle {
333
350
  pointer-events: none;
334
351
  color: var(--cus-sel-listgroup-grouptitle-color);
@@ -46,6 +46,11 @@
46
46
  border: 1px solid var(--e-cal-normal-border-color);
47
47
 
48
48
 
49
+ /* Required when using onKeyDown */
50
+ &[tabindex]:focus-visible {
51
+ outline: none;
52
+ }
53
+
49
54
  /* --HEADER --*/
50
55
  .e-cal-normal__header {
51
56
  font-size: var(--e-cal-normal-header-fs);
@@ -246,6 +251,10 @@
246
251
  position: relative;
247
252
  width: 100%;
248
253
  }
254
+
255
+ &.empty > div {
256
+ opacity: .2;
257
+ }
249
258
 
250
259
 
251
260
  &:not(.empty) {