@banyan_cloud/roots 1.0.341 → 1.0.343

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/esm/index.js CHANGED
@@ -15614,7 +15614,8 @@ var Dates = function Dates(props) {
15614
15614
  setSelectedRange = props.setSelectedRange,
15615
15615
  disabledDates = props.disabledDates,
15616
15616
  disableDatesBefore = props.disableDatesBefore,
15617
- enableFutureDates = props.enableFutureDates;
15617
+ enableFutureDates = props.enableFutureDates,
15618
+ disableDatesAfter = props.disableDatesAfter;
15618
15619
  var _ref = selectedMonth || {},
15619
15620
  monthAsNumber = _ref.monthAsNumber,
15620
15621
  year = _ref.year;
@@ -15710,6 +15711,9 @@ var Dates = function Dates(props) {
15710
15711
  return (disableDatesBefore === null || disableDatesBefore === void 0 ? void 0 : disableDatesBefore.length) > 0 && isBefore(date, fromUnixTime(disableDatesBefore));
15711
15712
  };
15712
15713
  var disabledAfterDate = function disabledAfterDate(date) {
15714
+ if (disableDatesAfter) {
15715
+ return (disableDatesAfter === null || disableDatesAfter === void 0 ? void 0 : disableDatesAfter.length) > 0 && isAfter(date, fromUnixTime(disableDatesAfter));
15716
+ }
15713
15717
  var dObj = new Date();
15714
15718
  dObj.setDate(dObj.getDate() + 1);
15715
15719
  dObj.setHours(0, 0, 0, 0);
@@ -16171,6 +16175,7 @@ var Calender = function Calender(props) {
16171
16175
  onClear = props.onClear,
16172
16176
  disabledDates = props.disabledDates,
16173
16177
  disableDatesBefore = props.disableDatesBefore,
16178
+ disableDatesAfter = props.disableDatesAfter,
16174
16179
  value = props.value,
16175
16180
  setFixedRange = props.setFixedRange,
16176
16181
  fixedRange = props.fixedRange,
@@ -16376,6 +16381,7 @@ var Calender = function Calender(props) {
16376
16381
  setSelectedMonth: setSelectedMonth,
16377
16382
  disabledDates: disabledDates,
16378
16383
  disableDatesBefore: disableDatesBefore,
16384
+ disableDatesAfter: disableDatesAfter,
16379
16385
  enableFutureDates: enableFutureDates
16380
16386
  })) : /*#__PURE__*/jsx(ClockView, _objectSpread2(_objectSpread2({}, commonCalenderProps), {}, {
16381
16387
  setSelectedMonth: setSelectedMonth,
@@ -16530,6 +16536,7 @@ var DatePicker = function DatePicker(props) {
16530
16536
  disabled = props.disabled,
16531
16537
  className = props.className,
16532
16538
  disableDatesBefore = props.disableDatesBefore,
16539
+ disableDatesAfter = props.disableDatesAfter,
16533
16540
  _onClear = props.onClear,
16534
16541
  customRanges = props.customRanges,
16535
16542
  custom = props.custom,
@@ -16656,6 +16663,7 @@ var DatePicker = function DatePicker(props) {
16656
16663
  },
16657
16664
  disabledDates: disabledDates,
16658
16665
  disableDatesBefore: disableDatesBefore,
16666
+ disableDatesAfter: disableDatesAfter,
16659
16667
  value: value,
16660
16668
  setFixedRange: setFixedRange,
16661
16669
  customRanges: customRanges,
@@ -16795,7 +16803,8 @@ DatePicker.propTypes = {
16795
16803
  type: propTypesExports.string
16796
16804
  }),
16797
16805
  className: propTypesExports.string,
16798
- disableDatesBefore: propTypesExports.arrayOf(propTypesExports.string),
16806
+ disableDatesBefore: propTypesExports.arrayOf(propTypesExports.number),
16807
+ disableDatesAfter: propTypesExports.arrayOf(propTypesExports.number),
16799
16808
  defaultRangeSelection: propTypesExports.arrayOf(propTypesExports.number),
16800
16809
  customRanges: propTypesExports.arrayOf(propTypesExports.shape({
16801
16810
  title: propTypesExports.string,
@@ -22352,12 +22361,16 @@ var TableCell = /*#__PURE__*/forwardRef(function TableCell(props, ref) {
22352
22361
  sticky = props.sticky,
22353
22362
  sort = props.sort,
22354
22363
  onSort = props.onSort,
22364
+ sortValue = props.sortValue,
22355
22365
  html = props.html,
22356
22366
  json = props.json;
22357
- var _useState = useState('asc'),
22367
+ var _useState = useState('default'),
22358
22368
  _useState2 = _slicedToArray(_useState, 2),
22359
22369
  sortState = _useState2[0],
22360
22370
  setSortState = _useState2[1];
22371
+ useEffect(function () {
22372
+ setSortState((sortValue === null || sortValue === void 0 ? void 0 : sortValue[id]) || 'default');
22373
+ }, [sortValue]);
22361
22374
  var spanElement = /*#__PURE__*/jsx("span", _objectSpread2(_objectSpread2({}, _objectSpread2(_objectSpread2({}, cellTitle != null ? {
22362
22375
  title: cellTitle
22363
22376
  } : {}), {}, {
@@ -22379,7 +22392,7 @@ var TableCell = /*#__PURE__*/forwardRef(function TableCell(props, ref) {
22379
22392
  }
22380
22393
  return /*#__PURE__*/jsx(BaseCell, {
22381
22394
  ref: ref,
22382
- className: classes(modules_7ba8d001.root, modules_7ba8d001["".concat(type, "-cell")], modules_7ba8d001["sticky-".concat(sticky)], modules_7ba8d001["sort-".concat(sort)], sort != null ? modules_7ba8d001.sortable : '', className),
22395
+ className: classes(modules_7ba8d001.root, modules_7ba8d001["".concat(type, "-cell")], modules_7ba8d001["sticky-".concat(sticky)], modules_7ba8d001["sort-".concat(sortState)], sortState != null ? modules_7ba8d001.sortable : '', className),
22383
22396
  attrs: _objectSpread2({
22384
22397
  style: style
22385
22398
  }, attrs),
@@ -22455,6 +22468,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
22455
22468
  Expandable = props.expandable,
22456
22469
  _props$onSort = props.onSort,
22457
22470
  onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
22471
+ sortValue = props.sortValue,
22458
22472
  _props$rowHeight = props.rowHeight,
22459
22473
  rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
22460
22474
  _toggleDrawer = props.toggleDrawer,
@@ -22503,6 +22517,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
22503
22517
  cellTitle: cellContent,
22504
22518
  type: type,
22505
22519
  onSort: onSort,
22520
+ sortValue: sortValue,
22506
22521
  rowHeight: rowHeight,
22507
22522
  toggleDrawer: function toggleDrawer(index, standalone) {
22508
22523
  _toggleDrawer({
@@ -22780,6 +22795,7 @@ var TableHeader = function TableHeader(props) {
22780
22795
  customCells = props.customCells,
22781
22796
  expandable = props.expandable,
22782
22797
  onSort = props.onSort,
22798
+ sortValue = props.sortValue,
22783
22799
  rowHeight = props.rowHeight,
22784
22800
  _props$theme = props.theme,
22785
22801
  theme = _props$theme === void 0 ? '' : _props$theme,
@@ -22800,6 +22816,7 @@ var TableHeader = function TableHeader(props) {
22800
22816
  customCells: customCells,
22801
22817
  expandable: expandable,
22802
22818
  onSort: onSort,
22819
+ sortValue: sortValue,
22803
22820
  rowHeight: rowHeight,
22804
22821
  onRowClick: onRowClick,
22805
22822
  theme: theme,
@@ -23010,6 +23027,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
23010
23027
  onRowClick = props.onRowClick,
23011
23028
  expandable = props.expandable,
23012
23029
  onSort = props.onSort,
23030
+ sortValue = props.sortValue,
23013
23031
  rowHeight = props.rowHeight,
23014
23032
  theme = props.theme,
23015
23033
  placeholder = props.placeholder,
@@ -23045,6 +23063,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
23045
23063
  customCells: customCells,
23046
23064
  expandable: expandable,
23047
23065
  onSort: onSort,
23066
+ sortValue: sortValue,
23048
23067
  onRowClick: onRowClick,
23049
23068
  onCheck: onCheck,
23050
23069
  checkedRows: checkedRows,
@@ -23942,6 +23961,8 @@ var Table = function Table(props) {
23942
23961
  rightActions = _props$rightActions === void 0 ? null : _props$rightActions,
23943
23962
  _props$onSort = props.onSort,
23944
23963
  onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
23964
+ _props$sortValue = props.sortValue,
23965
+ sortValue = _props$sortValue === void 0 ? 'asc' : _props$sortValue,
23945
23966
  _props$rowHeight = props.rowHeight,
23946
23967
  rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
23947
23968
  _props$theme = props.theme,
@@ -24126,6 +24147,7 @@ var Table = function Table(props) {
24126
24147
  customCells: customCells,
24127
24148
  className: modules_2e8406c7.table,
24128
24149
  onSort: onSort,
24150
+ sortValue: sortValue,
24129
24151
  rowHeight: rowHeight,
24130
24152
  onRowClick: onRowClick,
24131
24153
  defaultActiveIndex: defaultActiveIndex,
@@ -24653,7 +24675,7 @@ var modules_d563b0a9 = {"root":"BaseV2Widget_module_root__05b06aba","header":"Ba
24653
24675
  n(css$5,{});
24654
24676
 
24655
24677
  var generateOptions$1 = function generateOptions(_ref) {
24656
- var _optionData$id, _optionData$placehold, _optionData$value, _optionData$onChange, _optionData$selectOpt, _optionData$title, _optionData$onClick, _optionData$placehold2, _optionData$range, _optionData$onApply, _optionData$onClear, _optionData$date;
24678
+ var _optionData$id, _optionData$placehold, _optionData$value, _optionData$onChange, _optionData$selectOpt, _optionData$title, _optionData$onClick, _optionData$placehold2, _optionData$range, _optionData$onApply, _optionData$onClear, _optionData$date, _optionData$title2;
24657
24679
  var optionData = _ref.optionData,
24658
24680
  toggleDrawer = _ref.toggleDrawer;
24659
24681
  switch ((_optionData$id = optionData === null || optionData === void 0 ? void 0 : optionData.id) !== null && _optionData$id !== void 0 ? _optionData$id : '') {
@@ -24699,7 +24721,7 @@ var generateOptions$1 = function generateOptions(_ref) {
24699
24721
  });
24700
24722
  case 'filter':
24701
24723
  return /*#__PURE__*/jsx(Button, {
24702
- title: "Filter",
24724
+ title: (_optionData$title2 = optionData === null || optionData === void 0 ? void 0 : optionData.title) !== null && _optionData$title2 !== void 0 ? _optionData$title2 : 'Filter',
24703
24725
  variant: "outlined",
24704
24726
  size: "auto",
24705
24727
  className: modules_d563b0a9['filter-button'],