funda-ui 4.4.15 → 4.4.35

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 (50) hide show
  1. package/EventCalendar/index.css +114 -114
  2. package/EventCalendar/index.d.ts +1 -0
  3. package/EventCalendar/index.js +116 -84
  4. package/EventCalendarTimeline/index.css +274 -270
  5. package/EventCalendarTimeline/index.d.ts +3 -0
  6. package/EventCalendarTimeline/index.js +641 -224
  7. package/MultipleCheckboxes/index.js +11 -11
  8. package/MultipleSelect/index.js +11 -11
  9. package/NativeSelect/index.js +11 -11
  10. package/Radio/index.js +11 -11
  11. package/Select/index.js +11 -11
  12. package/Table/index.css +1 -0
  13. package/Table/index.js +36 -7
  14. package/TagInput/index.d.ts +1 -0
  15. package/TagInput/index.js +20 -2
  16. package/Tree/index.js +11 -11
  17. package/Utils/object.js +11 -11
  18. package/Utils/os.d.ts +2 -0
  19. package/Utils/os.js +104 -0
  20. package/lib/cjs/EventCalendar/index.d.ts +1 -0
  21. package/lib/cjs/EventCalendar/index.js +116 -84
  22. package/lib/cjs/EventCalendarTimeline/index.d.ts +3 -0
  23. package/lib/cjs/EventCalendarTimeline/index.js +641 -224
  24. package/lib/cjs/MultipleCheckboxes/index.js +11 -11
  25. package/lib/cjs/MultipleSelect/index.js +11 -11
  26. package/lib/cjs/NativeSelect/index.js +11 -11
  27. package/lib/cjs/Radio/index.js +11 -11
  28. package/lib/cjs/Select/index.js +11 -11
  29. package/lib/cjs/Table/index.js +36 -7
  30. package/lib/cjs/TagInput/index.d.ts +1 -0
  31. package/lib/cjs/TagInput/index.js +20 -2
  32. package/lib/cjs/Tree/index.js +11 -11
  33. package/lib/cjs/Utils/object.js +11 -11
  34. package/lib/cjs/Utils/os.d.ts +2 -0
  35. package/lib/cjs/Utils/os.js +104 -0
  36. package/lib/css/EventCalendar/index.css +114 -114
  37. package/lib/css/EventCalendarTimeline/index.css +274 -270
  38. package/lib/css/Table/index.css +1 -0
  39. package/lib/esm/EventCalendar/index.scss +81 -81
  40. package/lib/esm/EventCalendar/index.tsx +136 -98
  41. package/lib/esm/EventCalendarTimeline/index.scss +226 -221
  42. package/lib/esm/EventCalendarTimeline/index.tsx +445 -207
  43. package/lib/esm/ModalDialog/index.tsx +0 -1
  44. package/lib/esm/Table/Table.tsx +0 -1
  45. package/lib/esm/Table/index.scss +2 -0
  46. package/lib/esm/Table/utils/hooks/useTableDraggable.tsx +47 -6
  47. package/lib/esm/TagInput/index.tsx +23 -1
  48. package/lib/esm/Utils/libs/object.ts +67 -67
  49. package/lib/esm/Utils/libs/os.ts +63 -0
  50. package/package.json +1 -1
@@ -833,10 +833,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
833
833
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
834
834
  }, _typeof(obj);
835
835
  }
836
- /**
837
- * Remove Duplicate objects from JSON Array
838
- * @param {Array} obj
839
- * @param {String} fieldName
836
+ /**
837
+ * Remove Duplicate objects from JSON Array
838
+ * @param {Array} obj
839
+ * @param {String} fieldName
840
840
  */
841
841
  function _removeArrDuplicateItems(obj, fieldName) {
842
842
  if (!Array.isArray(obj)) return [];
@@ -849,9 +849,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
849
849
  }
850
850
  ;
851
851
 
852
- /**
853
- * Deep clone
854
- * @param {*} obj
852
+ /**
853
+ * Deep clone
854
+ * @param {*} obj
855
855
  */
856
856
  function _deepClone(obj) {
857
857
  if (Array.isArray(obj)) {
@@ -871,10 +871,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
871
871
  }
872
872
  }
873
873
 
874
- /**
875
- * Flat Data
876
- * @param {*} data
877
- * @returns
874
+ /**
875
+ * Flat Data
876
+ * @param {*} data
877
+ * @returns
878
878
  */
879
879
  function _flatData(data) {
880
880
  var result = [];
@@ -1186,10 +1186,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1186
1186
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1187
1187
  }, _typeof(obj);
1188
1188
  }
1189
- /**
1190
- * Remove Duplicate objects from JSON Array
1191
- * @param {Array} obj
1192
- * @param {String} fieldName
1189
+ /**
1190
+ * Remove Duplicate objects from JSON Array
1191
+ * @param {Array} obj
1192
+ * @param {String} fieldName
1193
1193
  */
1194
1194
  function _removeArrDuplicateItems(obj, fieldName) {
1195
1195
  if (!Array.isArray(obj)) return [];
@@ -1202,9 +1202,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1202
1202
  }
1203
1203
  ;
1204
1204
 
1205
- /**
1206
- * Deep clone
1207
- * @param {*} obj
1205
+ /**
1206
+ * Deep clone
1207
+ * @param {*} obj
1208
1208
  */
1209
1209
  function _deepClone(obj) {
1210
1210
  if (Array.isArray(obj)) {
@@ -1224,10 +1224,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1224
1224
  }
1225
1225
  }
1226
1226
 
1227
- /**
1228
- * Flat Data
1229
- * @param {*} data
1230
- * @returns
1227
+ /**
1228
+ * Flat Data
1229
+ * @param {*} data
1230
+ * @returns
1231
1231
  */
1232
1232
  function _flatData(data) {
1233
1233
  var result = [];
@@ -504,10 +504,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
504
504
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
505
505
  }, _typeof(obj);
506
506
  }
507
- /**
508
- * Remove Duplicate objects from JSON Array
509
- * @param {Array} obj
510
- * @param {String} fieldName
507
+ /**
508
+ * Remove Duplicate objects from JSON Array
509
+ * @param {Array} obj
510
+ * @param {String} fieldName
511
511
  */
512
512
  function _removeArrDuplicateItems(obj, fieldName) {
513
513
  if (!Array.isArray(obj)) return [];
@@ -520,9 +520,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
520
520
  }
521
521
  ;
522
522
 
523
- /**
524
- * Deep clone
525
- * @param {*} obj
523
+ /**
524
+ * Deep clone
525
+ * @param {*} obj
526
526
  */
527
527
  function _deepClone(obj) {
528
528
  if (Array.isArray(obj)) {
@@ -542,10 +542,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
542
542
  }
543
543
  }
544
544
 
545
- /**
546
- * Flat Data
547
- * @param {*} data
548
- * @returns
545
+ /**
546
+ * Flat Data
547
+ * @param {*} data
548
+ * @returns
549
549
  */
550
550
  function _flatData(data) {
551
551
  var result = [];
package/Radio/index.js CHANGED
@@ -504,10 +504,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
504
504
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
505
505
  }, _typeof(obj);
506
506
  }
507
- /**
508
- * Remove Duplicate objects from JSON Array
509
- * @param {Array} obj
510
- * @param {String} fieldName
507
+ /**
508
+ * Remove Duplicate objects from JSON Array
509
+ * @param {Array} obj
510
+ * @param {String} fieldName
511
511
  */
512
512
  function _removeArrDuplicateItems(obj, fieldName) {
513
513
  if (!Array.isArray(obj)) return [];
@@ -520,9 +520,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
520
520
  }
521
521
  ;
522
522
 
523
- /**
524
- * Deep clone
525
- * @param {*} obj
523
+ /**
524
+ * Deep clone
525
+ * @param {*} obj
526
526
  */
527
527
  function _deepClone(obj) {
528
528
  if (Array.isArray(obj)) {
@@ -542,10 +542,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
542
542
  }
543
543
  }
544
544
 
545
- /**
546
- * Flat Data
547
- * @param {*} data
548
- * @returns
545
+ /**
546
+ * Flat Data
547
+ * @param {*} data
548
+ * @returns
549
549
  */
550
550
  function _flatData(data) {
551
551
  var result = [];
package/Select/index.js CHANGED
@@ -1842,10 +1842,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1842
1842
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1843
1843
  }, _typeof(obj);
1844
1844
  }
1845
- /**
1846
- * Remove Duplicate objects from JSON Array
1847
- * @param {Array} obj
1848
- * @param {String} fieldName
1845
+ /**
1846
+ * Remove Duplicate objects from JSON Array
1847
+ * @param {Array} obj
1848
+ * @param {String} fieldName
1849
1849
  */
1850
1850
  function _removeArrDuplicateItems(obj, fieldName) {
1851
1851
  if (!Array.isArray(obj)) return [];
@@ -1858,9 +1858,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1858
1858
  }
1859
1859
  ;
1860
1860
 
1861
- /**
1862
- * Deep clone
1863
- * @param {*} obj
1861
+ /**
1862
+ * Deep clone
1863
+ * @param {*} obj
1864
1864
  */
1865
1865
  function _deepClone(obj) {
1866
1866
  if (Array.isArray(obj)) {
@@ -1880,10 +1880,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1880
1880
  }
1881
1881
  }
1882
1882
 
1883
- /**
1884
- * Flat Data
1885
- * @param {*} data
1886
- * @returns
1883
+ /**
1884
+ * Flat Data
1885
+ * @param {*} data
1886
+ * @returns
1887
1887
  */
1888
1888
  function _flatData(data) {
1889
1889
  var result = [];
package/Table/index.css CHANGED
@@ -17,6 +17,7 @@
17
17
  }
18
18
  .syntable__wrapper.table-responsive {
19
19
  overflow-x: auto;
20
+ overflow-y: hidden;
20
21
  }
21
22
  .syntable__wrapper.table-responsive::-webkit-scrollbar {
22
23
  height: var(--syntable-scrollbar-h);
package/Table/index.js CHANGED
@@ -808,7 +808,7 @@ function useTableDraggable(_ref, deps) {
808
808
  var overObj = null;
809
809
  var placeholderGenerator = function placeholderGenerator(trHeight) {
810
810
  var tbodyRef = getTbody(spyElement);
811
- if (tbodyRef === null) return;
811
+ if (tbodyRef === null || tbodyRef.querySelector('tr') === null) return;
812
812
 
813
813
  // Insert a row at the "index" of the table
814
814
  var newRow = document.createElement('tr');
@@ -827,7 +827,9 @@ function useTableDraggable(_ref, deps) {
827
827
  };
828
828
  var lastRowGenerator = function lastRowGenerator(trHeight) {
829
829
  var tbodyRef = getTbody(spyElement);
830
- if (tbodyRef === null) return;
830
+ if (tbodyRef === null || tbodyRef.querySelector('tr') === null) return;
831
+ var cloneEl = tbodyRef.querySelector('.row-obj-clonelast');
832
+ if (cloneEl !== null) return;
831
833
 
832
834
  // Insert a row at the "index" of the table
833
835
  var newRow = document.createElement('tr');
@@ -871,7 +873,12 @@ function useTableDraggable(_ref, deps) {
871
873
  setSortData(listIndexes);
872
874
 
873
875
  //last placeholder
874
- insertAfter(lastRowGenerator(_allRows.at(-1).clientHeight), _allRows.at(-1));
876
+ if (_allRows.length > 0) {
877
+ var lastEl = lastRowGenerator(_allRows.at(-1).clientHeight);
878
+ if (typeof _allRows.at(-1) !== 'undefined') {
879
+ insertAfter(lastEl, _allRows.at(-1));
880
+ }
881
+ }
875
882
  };
876
883
  var handleTbodyEnter = function handleTbodyEnter(e) {
877
884
  var _table = e.currentTarget.closest('table');
@@ -904,6 +911,8 @@ function useTableDraggable(_ref, deps) {
904
911
  }
905
912
  }, [sortData]);
906
913
  var handleDragStart = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
914
+ var tbodyRef = getTbody(spyElement);
915
+ if (tbodyRef === null) return;
907
916
  draggedObj = e.currentTarget;
908
917
  e.dataTransfer.effectAllowed = 'move';
909
918
  e.dataTransfer.setData('text/html', draggedObj);
@@ -915,6 +924,13 @@ function useTableDraggable(_ref, deps) {
915
924
  callback.call(null, draggedObj, sortData, sortDataByIndex(sortData, data));
916
925
  };
917
926
  onRowDrag === null || onRowDrag === void 0 ? void 0 : onRowDrag(dragStart, null);
927
+
928
+ // init clone <tr>
929
+ // !!! It needs to be put at the end of the code to fix the location of the clone element
930
+ var cloneEl = tbodyRef.querySelector('.row-obj-clonelast');
931
+ if (cloneEl !== null) {
932
+ cloneEl.style.display = 'none';
933
+ }
918
934
  }, [handledragOver]);
919
935
  var handleDragEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
920
936
  var tbodyRef = getTbody(spyElement);
@@ -958,10 +974,11 @@ function useTableDraggable(_ref, deps) {
958
974
  // sort elements
959
975
  var categoryItemsArray = allRows(spyElement);
960
976
  var sorter = function sorter(a, b) {
961
- return a.dataset.order.localeCompare(b.dataset.order); // sorts based on alphabetical order
977
+ var txt1 = Number(a.dataset.order),
978
+ txt2 = Number(b.dataset.order);
979
+ return txt2 < txt1 ? -1 : txt2 > txt1 ? 1 : 0;
962
980
  };
963
-
964
- var sorted = categoryItemsArray.sort(sorter);
981
+ var sorted = categoryItemsArray.sort(sorter).reverse();
965
982
  sorted.forEach(function (e) {
966
983
  return spyElement.querySelector('table').querySelector('tbody').appendChild(e);
967
984
  });
@@ -971,10 +988,22 @@ function useTableDraggable(_ref, deps) {
971
988
  callback.call(null, draggedObj, newData, sortDataByIndex(newData, data));
972
989
  };
973
990
  onRowDrag === null || onRowDrag === void 0 ? void 0 : onRowDrag(null, dragEnd);
991
+
992
+ // init clone <tr>
993
+ // !!! It needs to be put at the end of the code to fix the location of the clone element
994
+ var _allRows = allRows(spyElement);
995
+ var cloneEl = tbodyRef.querySelector('.row-obj-clonelast');
996
+ if (cloneEl !== null) {
997
+ if (typeof _allRows.at(-1) !== 'undefined') {
998
+ insertAfter(cloneEl, _allRows.at(-1));
999
+ cloneEl.style.display = 'none';
1000
+ }
1001
+ }
974
1002
  }, [sortData]);
975
1003
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
976
1004
  if (enabled) {
977
- if (Array.isArray(data)) {
1005
+ if (Array.isArray(data) && data.length > 0) {
1006
+ // !!! REQUIRED "data.length > 0" to avoid data-order cannot be assigned when asynchronous data is empty
978
1007
  data.forEach(function (item, i) {
979
1008
  item.order = i;
980
1009
  });
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare type TagInputProps = {
3
+ contentRef?: React.ForwardedRef<any>;
3
4
  wrapperClassName?: string;
4
5
  value?: string;
5
6
  maxTags?: number;
package/TagInput/index.js CHANGED
@@ -828,7 +828,7 @@ __webpack_require__.r(__webpack_exports__);
828
828
  /* harmony import */ var funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_convert__WEBPACK_IMPORTED_MODULE_3__);
829
829
  /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(188);
830
830
  /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_4__);
831
- var _excluded = ["wrapperClassName", "maxTags", "disabled", "required", "placeholder", "readOnly", "value", "requiredLabel", "label", "name", "id", "autoComplete", "autoCapitalize", "spellCheck", "extractValueByBrackets", "minLength", "maxLength", "style", "tabIndex", "onChange", "onBlur", "onFocus"];
831
+ var _excluded = ["contentRef", "wrapperClassName", "maxTags", "disabled", "required", "placeholder", "readOnly", "value", "requiredLabel", "label", "name", "id", "autoComplete", "autoCapitalize", "spellCheck", "extractValueByBrackets", "minLength", "maxLength", "style", "tabIndex", "onChange", "onBlur", "onFocus"];
832
832
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
833
833
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
834
834
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -844,7 +844,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
844
844
 
845
845
 
846
846
  var TagInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
847
- var wrapperClassName = props.wrapperClassName,
847
+ var contentRef = props.contentRef,
848
+ wrapperClassName = props.wrapperClassName,
848
849
  maxTags = props.maxTags,
849
850
  disabled = props.disabled,
850
851
  required = props.required,
@@ -894,6 +895,23 @@ var TagInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
894
895
  _useState10 = _slicedToArray(_useState9, 2),
895
896
  onComposition = _useState10[0],
896
897
  setOnComposition = _useState10[1];
898
+
899
+ // exposes the following methods
900
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
901
+ return {
902
+ control: function control() {
903
+ return valRef.current;
904
+ },
905
+ clear: function clear(cb) {
906
+ initDefaultValue('');
907
+ cb === null || cb === void 0 ? void 0 : cb();
908
+ },
909
+ set: function set(value, cb) {
910
+ initDefaultValue("".concat(value));
911
+ cb === null || cb === void 0 ? void 0 : cb();
912
+ }
913
+ };
914
+ }, [contentRef]);
897
915
  function initDefaultValue(defaultValue) {
898
916
  // change the value to trigger component rendering
899
917
  if (typeof defaultValue === 'undefined' || defaultValue === '') {
package/Tree/index.js CHANGED
@@ -676,10 +676,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
676
676
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
677
677
  }, _typeof(obj);
678
678
  }
679
- /**
680
- * Remove Duplicate objects from JSON Array
681
- * @param {Array} obj
682
- * @param {String} fieldName
679
+ /**
680
+ * Remove Duplicate objects from JSON Array
681
+ * @param {Array} obj
682
+ * @param {String} fieldName
683
683
  */
684
684
  function _removeArrDuplicateItems(obj, fieldName) {
685
685
  if (!Array.isArray(obj)) return [];
@@ -692,9 +692,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
692
692
  }
693
693
  ;
694
694
 
695
- /**
696
- * Deep clone
697
- * @param {*} obj
695
+ /**
696
+ * Deep clone
697
+ * @param {*} obj
698
698
  */
699
699
  function _deepClone(obj) {
700
700
  if (Array.isArray(obj)) {
@@ -714,10 +714,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
714
714
  }
715
715
  }
716
716
 
717
- /**
718
- * Flat Data
719
- * @param {*} data
720
- * @returns
717
+ /**
718
+ * Flat Data
719
+ * @param {*} data
720
+ * @returns
721
721
  */
722
722
  function _flatData(data) {
723
723
  var result = [];
package/Utils/object.js CHANGED
@@ -51,10 +51,10 @@ __webpack_require__.r(__webpack_exports__);
51
51
  /* harmony export */ "removeArrDuplicateItems": () => (/* binding */ removeArrDuplicateItems)
52
52
  /* harmony export */ });
53
53
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
54
- /**
55
- * Remove Duplicate objects from JSON Array
56
- * @param {Array} obj
57
- * @param {String} fieldName
54
+ /**
55
+ * Remove Duplicate objects from JSON Array
56
+ * @param {Array} obj
57
+ * @param {String} fieldName
58
58
  */
59
59
  function removeArrDuplicateItems(obj, fieldName) {
60
60
  if (!Array.isArray(obj)) return [];
@@ -67,9 +67,9 @@ function removeArrDuplicateItems(obj, fieldName) {
67
67
  }
68
68
  ;
69
69
 
70
- /**
71
- * Deep clone
72
- * @param {*} obj
70
+ /**
71
+ * Deep clone
72
+ * @param {*} obj
73
73
  */
74
74
  function deepClone(obj) {
75
75
  if (Array.isArray(obj)) {
@@ -89,10 +89,10 @@ function deepClone(obj) {
89
89
  }
90
90
  }
91
91
 
92
- /**
93
- * Flat Data
94
- * @param {*} data
95
- * @returns
92
+ /**
93
+ * Flat Data
94
+ * @param {*} data
95
+ * @returns
96
96
  */
97
97
  function flatData(data) {
98
98
  var result = [];
package/Utils/os.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function getOs(): any;
2
+ export default getOs;
package/Utils/os.js ADDED
@@ -0,0 +1,104 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["RPB"] = factory();
8
+ else
9
+ root["RPB"] = factory();
10
+ })(this, () => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ // The require scope
14
+ /******/ var __webpack_require__ = {};
15
+ /******/
16
+ /************************************************************************/
17
+ /******/ /* webpack/runtime/define property getters */
18
+ /******/ (() => {
19
+ /******/ // define getter functions for harmony exports
20
+ /******/ __webpack_require__.d = (exports, definition) => {
21
+ /******/ for(var key in definition) {
22
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
23
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
24
+ /******/ }
25
+ /******/ }
26
+ /******/ };
27
+ /******/ })();
28
+ /******/
29
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
30
+ /******/ (() => {
31
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
32
+ /******/ })();
33
+ /******/
34
+ /******/ /* webpack/runtime/make namespace object */
35
+ /******/ (() => {
36
+ /******/ // define __esModule on exports
37
+ /******/ __webpack_require__.r = (exports) => {
38
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
39
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
40
+ /******/ }
41
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
42
+ /******/ };
43
+ /******/ })();
44
+ /******/
45
+ /************************************************************************/
46
+ var __webpack_exports__ = {};
47
+ __webpack_require__.r(__webpack_exports__);
48
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
50
+ /* harmony export */ });
51
+ /*
52
+ * Determine whether it is a special platform
53
+ *
54
+ * @private
55
+ */
56
+ function getOs() {
57
+ if (typeof window === 'undefined') return {};
58
+ var os;
59
+ if (typeof window !== "undefined") {
60
+ var _getOs = function _getOs() {
61
+ var _navigator = window.navigator;
62
+ var platform = function platform() {
63
+ // 2022 way of detecting. Note : this userAgentData feature is available only in secure contexts (HTTPS)
64
+ if (typeof _navigator.userAgentData !== 'undefined' && _navigator.userAgentData != null) {
65
+ return _navigator.userAgentData.platform;
66
+ }
67
+ // Deprecated but still works for most of the browser
68
+ if (typeof _navigator.platform !== 'undefined') {
69
+ if (typeof _navigator.userAgent !== 'undefined' && /android/.test(_navigator.userAgent.toLowerCase())) {
70
+ // android device’s _navigator.platform is often set as 'linux', so const’s use userAgent for them
71
+ return 'android';
72
+ }
73
+ return _navigator.platform;
74
+ }
75
+ return 'unknown';
76
+ };
77
+ var _platform = platform().toLowerCase();
78
+ var isOSX = /mac/.test(_platform); // Mac desktop
79
+ var isIOS = ['iphone', 'ipad', 'ipod'].indexOf(_platform) === -1 ? false : true; // Mac iOs
80
+ var isApple = isOSX || isIOS; // Apple device (desktop or iOS)
81
+ var isWindows = /win/.test(_platform); // Windows
82
+ var isAndroid = /android/.test(_platform); // Android
83
+ var isLinux = /linux/.test(_platform); // Linux
84
+
85
+ return {
86
+ isOSX: isOSX,
87
+ isIOS: isIOS,
88
+ isApple: isApple,
89
+ isWindows: isWindows,
90
+ isAndroid: isAndroid,
91
+ isLinux: isLinux
92
+ };
93
+ };
94
+ os = _getOs();
95
+ } else {
96
+ os = {};
97
+ }
98
+ return os;
99
+ }
100
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getOs);
101
+ /******/ return __webpack_exports__;
102
+ /******/ })()
103
+ ;
104
+ });
@@ -53,6 +53,7 @@ export declare type EventCalendarProps = {
53
53
  onCellMouseEnter?: (el: any) => void;
54
54
  onCellMouseLeave?: (el: any) => void;
55
55
  onCellClick?: (el: any) => void;
56
+ onCellDoubleClick?: (el: any) => void;
56
57
  onCellMouseUp?: (el: any) => void;
57
58
  onKeyPressed?: (el: any) => void;
58
59
  };