sapp-common-package-test-final 1.7.7 → 1.7.9

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.
@@ -479,7 +479,6 @@ var Button = function Button(_ref) {
479
479
  color = _ref$color === void 0 ? 'default' : _ref$color,
480
480
  onClick = _ref.onClick,
481
481
  children = _ref.children;
482
- console.log('value:', styles["btn-" + color]);
483
482
  return React.createElement("button", {
484
483
  type: type,
485
484
  onClick: onClick,
@@ -619,7 +618,7 @@ var MonthlyCell = function MonthlyCell(_ref) {
619
618
  var isToday = dayjs().isSame(date, 'day');
620
619
  var handleOpenCreateModal = function handleOpenCreateModal(e) {
621
620
  if (e.target !== e.currentTarget) return;
622
- onOpenCreate(dayjs(date).hour(dayjs().hour()).minute(dayjs().minute()).toDate());
621
+ onOpenCreate && onOpenCreate(dayjs(date).hour(dayjs().hour()).minute(dayjs().minute()).toDate());
623
622
  };
624
623
  return React.createElement("div", {
625
624
  className: styles['monthly-calendar__cell'] + " " + (isToday ? styles['monthly-calendar__cell--active'] : styles['border-gray-4']) + " " + (isSameMonth ? styles['bg-white'] : styles['bg-button']),
@@ -628,7 +627,7 @@ var MonthlyCell = function MonthlyCell(_ref) {
628
627
  className: isSameMonth ? styles['text-black'] : styles['text-secondary-text']
629
628
  }, date.format('DD')), React.createElement("ul", {
630
629
  onClick: function onClick() {
631
- return onOpenDetail(date.toDate(), events);
630
+ return onOpenDetail && onOpenDetail(date.toDate(), events);
632
631
  }
633
632
  }, events.slice(0, 2).map(function (event, index) {
634
633
  return React.createElement(MonthlyEvent, {
@@ -787,7 +786,7 @@ var WeeklyEvent = function WeeklyEvent(_ref) {
787
786
  return React.createElement("div", {
788
787
  className: clsx$1(styles["event-" + convertType[event.type]], isMinHeight && styles['event--min-height']),
789
788
  onClick: function onClick() {
790
- onOpenDetail(dayjs(event.startDate).toDate(), [event]);
789
+ onOpenDetail && onOpenDetail(dayjs(event.startDate).toDate(), [event]);
791
790
  onEventDetail && onEventDetail(event);
792
791
  },
793
792
  style: {
@@ -823,7 +822,7 @@ var WeeklyCell = function WeeklyCell(_ref) {
823
822
  var isToday = dayjs().isSame(date, 'day');
824
823
  var handleOpenCreateModal = function handleOpenCreateModal(e) {
825
824
  if (e.target !== e.currentTarget) return;
826
- onOpenCreate(dayjs(date).toDate());
825
+ onOpenCreate && onOpenCreate(dayjs(date).toDate());
827
826
  };
828
827
  events.sort(function (a, b) {
829
828
  return a.type === EVENT_TYPES.BUSY && b.type !== EVENT_TYPES.BUSY ? 1 : -1;
@@ -999,7 +998,7 @@ var LMSWeeklyEvent = function LMSWeeklyEvent(_ref) {
999
998
  return React.createElement("div", {
1000
999
  className: styles["event-" + convertType[event.type]],
1001
1000
  onClick: function onClick() {
1002
- onOpenDetail(dayjs(event.startDate).toDate(), [event]);
1001
+ onOpenDetail && onOpenDetail(dayjs(event.startDate).toDate(), [event]);
1003
1002
  onEventDetail && onEventDetail(event);
1004
1003
  },
1005
1004
  style: {
@@ -1038,7 +1037,7 @@ var LMSWeeklyCell = function LMSWeeklyCell(_ref) {
1038
1037
  var isToday = dayjs().isSame(date, 'day');
1039
1038
  var handleOpenCreateModal = function handleOpenCreateModal(e) {
1040
1039
  if (e.target !== e.currentTarget) return;
1041
- onOpenCreate(dayjs(date).toDate());
1040
+ onOpenCreate && onOpenCreate(dayjs(date).toDate());
1042
1041
  };
1043
1042
  events = (_events = events) === null || _events === void 0 ? void 0 : _events.sort(function (a, b) {
1044
1043
  return a.type === EVENT_TYPES.BUSY && b.type !== EVENT_TYPES.BUSY ? 1 : -1;