mozrest-sdk-react-dev 0.2.91 → 0.2.92

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/mozrest-sdk.es.js CHANGED
@@ -103102,52 +103102,53 @@ const ReservationsAnalytics = ({ userEmail, userFullName }) => {
103102
103102
  totalDays
103103
103103
  }));
103104
103104
  };
103105
- const mainConatiner$2 = "_mainConatiner_1y6wx_48";
103106
- const mainTableContainer = "_mainTableContainer_1y6wx_58";
103107
- const mainSidebarContainer = "_mainSidebarContainer_1y6wx_66";
103108
- const headerReferece = "_headerReferece_1y6wx_76";
103109
- const sidebarCloseIcon = "_sidebarCloseIcon_1y6wx_79";
103110
- const headerContainer = "_headerContainer_1y6wx_131";
103111
- const searchContainer = "_searchContainer_1y6wx_137";
103112
- const buttonList = "_buttonList_1y6wx_148";
103113
- const buttonItem = "_buttonItem_1y6wx_153";
103114
- const addReservationButton = "_addReservationButton_1y6wx_162";
103115
- const tableTopHeader = "_tableTopHeader_1y6wx_171";
103116
- const tableTopHeaderContent = "_tableTopHeaderContent_1y6wx_185";
103117
- const tableTopHeaderContentText = "_tableTopHeaderContentText_1y6wx_192";
103118
- const tableRowContainer = "_tableRowContainer_1y6wx_201";
103119
- const tableRowCard = "_tableRowCard_1y6wx_207";
103120
- const fadeInX = "_fadeInX_1y6wx_1";
103121
- const noData = "_noData_1y6wx_215";
103122
- const tableRowHour = "_tableRowHour_1y6wx_222";
103123
- const tableRowHourText = "_tableRowHourText_1y6wx_238";
103124
- const hours = "_hours_1y6wx_246";
103125
- const tableRowContent = "_tableRowContent_1y6wx_252";
103126
- const rowImage = "_rowImage_1y6wx_267";
103127
- const rowContactContainer = "_rowContactContainer_1y6wx_281";
103128
- const rowContactText = "_rowContactText_1y6wx_293";
103129
- const rowContactPhone = "_rowContactPhone_1y6wx_299";
103130
- const rowSectionContainer = "_rowSectionContainer_1y6wx_306";
103131
- const rowSection = "_rowSection_1y6wx_306";
103132
- const rowSectionText = "_rowSectionText_1y6wx_319";
103133
- const rowSectionSecText = "_rowSectionSecText_1y6wx_325";
103134
- const rowActionButton = "_rowActionButton_1y6wx_332";
103135
- const bookingInfoContainer = "_bookingInfoContainer_1y6wx_345";
103136
- const bookingInfoCardRow = "_bookingInfoCardRow_1y6wx_349";
103137
- const bookingInfoCardContainer = "_bookingInfoCardContainer_1y6wx_357";
103138
- const bookingInfoCard = "_bookingInfoCard_1y6wx_349";
103139
- const bookingInfoCardContent = "_bookingInfoCardContent_1y6wx_369";
103140
- const bookingInfoCardTitle = "_bookingInfoCardTitle_1y6wx_375";
103141
- const bookingInfoCardText = "_bookingInfoCardText_1y6wx_378";
103105
+ const mainConatiner$2 = "_mainConatiner_rgobu_48";
103106
+ const mainTableContainer = "_mainTableContainer_rgobu_58";
103107
+ const mainSidebarContainer = "_mainSidebarContainer_rgobu_66";
103108
+ const headerReferece = "_headerReferece_rgobu_76";
103109
+ const sidebarCloseIcon = "_sidebarCloseIcon_rgobu_79";
103110
+ const headerContainer = "_headerContainer_rgobu_131";
103111
+ const searchContainer = "_searchContainer_rgobu_137";
103112
+ const buttonList = "_buttonList_rgobu_148";
103113
+ const buttonItem = "_buttonItem_rgobu_153";
103114
+ const addReservationButton = "_addReservationButton_rgobu_162";
103115
+ const tableTopHeader = "_tableTopHeader_rgobu_171";
103116
+ const tableTopHeaderContent = "_tableTopHeaderContent_rgobu_185";
103117
+ const tableTopHeaderContentText = "_tableTopHeaderContentText_rgobu_192";
103118
+ const tableRowContainer = "_tableRowContainer_rgobu_201";
103119
+ const tableRowCard = "_tableRowCard_rgobu_207";
103120
+ const fadeInX = "_fadeInX_rgobu_1";
103121
+ const canceled = "_canceled_rgobu_215";
103122
+ const noData = "_noData_rgobu_218";
103123
+ const tableRowHour = "_tableRowHour_rgobu_225";
103124
+ const tableRowHourText = "_tableRowHourText_rgobu_241";
103125
+ const hours = "_hours_rgobu_249";
103126
+ const tableRowContent = "_tableRowContent_rgobu_255";
103127
+ const rowImage = "_rowImage_rgobu_270";
103128
+ const rowContactContainer = "_rowContactContainer_rgobu_284";
103129
+ const rowContactText = "_rowContactText_rgobu_296";
103130
+ const rowContactPhone = "_rowContactPhone_rgobu_302";
103131
+ const rowSectionContainer = "_rowSectionContainer_rgobu_309";
103132
+ const rowSection = "_rowSection_rgobu_309";
103133
+ const rowSectionText = "_rowSectionText_rgobu_322";
103134
+ const rowSectionSecText = "_rowSectionSecText_rgobu_328";
103135
+ const rowActionButton = "_rowActionButton_rgobu_335";
103136
+ const bookingInfoContainer = "_bookingInfoContainer_rgobu_348";
103137
+ const bookingInfoCardRow = "_bookingInfoCardRow_rgobu_352";
103138
+ const bookingInfoCardContainer = "_bookingInfoCardContainer_rgobu_360";
103139
+ const bookingInfoCard = "_bookingInfoCard_rgobu_352";
103140
+ const bookingInfoCardContent = "_bookingInfoCardContent_rgobu_372";
103141
+ const bookingInfoCardTitle = "_bookingInfoCardTitle_rgobu_378";
103142
+ const bookingInfoCardText = "_bookingInfoCardText_rgobu_381";
103142
103143
  var styles$l = {
103143
103144
  mainConatiner: mainConatiner$2,
103144
103145
  mainTableContainer,
103145
103146
  mainSidebarContainer,
103146
103147
  headerReferece,
103147
103148
  sidebarCloseIcon,
103148
- "mainSidebarContainer--open": "_mainSidebarContainer--open_1y6wx_87",
103149
- "mainSidebarContainer--close": "_mainSidebarContainer--close_1y6wx_93",
103150
- "sidebarCloseIcon--show": "_sidebarCloseIcon--show_1y6wx_101",
103149
+ "mainSidebarContainer--open": "_mainSidebarContainer--open_rgobu_87",
103150
+ "mainSidebarContainer--close": "_mainSidebarContainer--close_rgobu_93",
103151
+ "sidebarCloseIcon--show": "_sidebarCloseIcon--show_rgobu_101",
103151
103152
  headerContainer,
103152
103153
  searchContainer,
103153
103154
  buttonList,
@@ -103159,6 +103160,7 @@ var styles$l = {
103159
103160
  tableRowContainer,
103160
103161
  tableRowCard,
103161
103162
  fadeInX,
103163
+ canceled,
103162
103164
  noData,
103163
103165
  tableRowHour,
103164
103166
  tableRowHourText,
@@ -104716,19 +104718,20 @@ const Icon = ({
104716
104718
  ...props
104717
104719
  }, React__default.createElement(icons[icon2]));
104718
104720
  };
104719
- const btn = "_btn_tc8tv_1";
104721
+ const btn = "_btn_1och3_1";
104720
104722
  var styles$j = {
104721
104723
  btn,
104722
- "btn--large": "_btn--large_tc8tv_16",
104723
- "btn--default": "_btn--default_tc8tv_20",
104724
- "btn--small": "_btn--small_tc8tv_24",
104725
- "btn--mini": "_btn--mini_tc8tv_28",
104726
- "btn--primary": "_btn--primary_tc8tv_32",
104727
- "btn--secondary": "_btn--secondary_tc8tv_39",
104728
- "btn--tertiary": "_btn--tertiary_tc8tv_47",
104729
- "btn--inverted": "_btn--inverted_tc8tv_55",
104730
- "btn--danger": "_btn--danger_tc8tv_64",
104731
- "btn--success": "_btn--success_tc8tv_72"
104724
+ "btn--large": "_btn--large_1och3_16",
104725
+ "btn--default": "_btn--default_1och3_20",
104726
+ "btn--small": "_btn--small_1och3_24",
104727
+ "btn--mini": "_btn--mini_1och3_28",
104728
+ "btn--primary": "_btn--primary_1och3_32",
104729
+ "btn--secondary": "_btn--secondary_1och3_39",
104730
+ "btn--tertiary": "_btn--tertiary_1och3_47",
104731
+ "btn--inverted": "_btn--inverted_1och3_55",
104732
+ "btn--danger": "_btn--danger_1och3_64",
104733
+ "btn--soft-danger": "_btn--soft-danger_1och3_72",
104734
+ "btn--success": "_btn--success_1och3_80"
104732
104735
  };
104733
104736
  const Button = ({
104734
104737
  mode = "primary",
@@ -107359,7 +107362,7 @@ const ReloadProvider = ({ children, reload }) => {
107359
107362
  }, children);
107360
107363
  };
107361
107364
  const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
107362
- var _a2, _b, _c, _d;
107365
+ var _a2, _b, _c, _d, _e2;
107363
107366
  const { t: t2 } = useTranslation();
107364
107367
  const { reload: reloadMainTable } = useReloadContext();
107365
107368
  const { showSidebar, setShowSidebar } = useShowSidebarContext();
@@ -107394,7 +107397,7 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
107394
107397
  };
107395
107398
  case "canceled":
107396
107399
  return {
107397
- mode: "danger",
107400
+ mode: "soft-danger",
107398
107401
  text: t2("CANCELED"),
107399
107402
  icon: "TrashX",
107400
107403
  disabled: true
@@ -107439,7 +107442,7 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
107439
107442
  }
107440
107443
  }
107441
107444
  }, /* @__PURE__ */ React__default.createElement("div", {
107442
- className: styles$l.tableRowHour
107445
+ className: classNames$2(styles$l.tableRowHour, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
107443
107446
  }, /* @__PURE__ */ React__default.createElement("h2", {
107444
107447
  className: styles$l.tableRowHourText
107445
107448
  }, /* @__PURE__ */ React__default.createElement(TimeFormat, {
@@ -107451,13 +107454,13 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
107451
107454
  className: styles$l.rowImage,
107452
107455
  src: item2.bookingChannelLogo
107453
107456
  }), /* @__PURE__ */ React__default.createElement("div", {
107454
- className: styles$l.rowContactContainer
107457
+ className: classNames$2(styles$l.rowContactContainer, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
107455
107458
  }, /* @__PURE__ */ React__default.createElement("h4", {
107456
107459
  className: styles$l.rowContactText
107457
107460
  }, item2.name), /* @__PURE__ */ React__default.createElement("p", {
107458
107461
  className: styles$l.rowContactPhone
107459
107462
  }, (_a2 = item2 == null ? void 0 : item2.contact) == null ? void 0 : _a2.telephone)), /* @__PURE__ */ React__default.createElement("div", {
107460
- className: styles$l.rowSectionContainer
107463
+ className: classNames$2(styles$l.rowSectionContainer, (item2 == null ? void 0 : item2.status) === "canceled" ? styles$l.canceled : "")
107461
107464
  }, /* @__PURE__ */ React__default.createElement("div", {
107462
107465
  className: styles$l.rowSection
107463
107466
  }, /* @__PURE__ */ React__default.createElement("h4", {
@@ -107468,13 +107471,13 @@ const TableRow = ({ index: index2, item: item2, filtersData, venueId }) => {
107468
107471
  className: styles$l.rowSection
107469
107472
  }, /* @__PURE__ */ React__default.createElement("h4", {
107470
107473
  className: styles$l.rowSectionText
107471
- }, (_b = item2 == null ? void 0 : item2.table) == null ? void 0 : _b.name), /* @__PURE__ */ React__default.createElement("p", {
107474
+ }, (_b = item2 == null ? void 0 : item2.table) == null ? void 0 : _b.name), ((_c = item2 == null ? void 0 : item2.table) == null ? void 0 : _c.areaName) && /* @__PURE__ */ React__default.createElement("p", {
107472
107475
  className: styles$l.rowSectionSecText
107473
- }, (_c = item2 == null ? void 0 : item2.table) == null ? void 0 : _c.areaName))), canEdit && /* @__PURE__ */ React__default.createElement("div", {
107476
+ }, (_d = item2 == null ? void 0 : item2.table) == null ? void 0 : _d.areaName))), canEdit && /* @__PURE__ */ React__default.createElement("div", {
107474
107477
  className: styles$l.rowActionButton
107475
107478
  }, /* @__PURE__ */ React__default.createElement(Button, {
107476
107479
  icon: statusBuilder(item2.status).icon,
107477
- disabled: (_d = statusBuilder(item2.status)) == null ? void 0 : _d.disabled,
107480
+ disabled: (_e2 = statusBuilder(item2.status)) == null ? void 0 : _e2.disabled,
107478
107481
  mode: statusBuilder(item2.status).mode,
107479
107482
  onClick: () => {
107480
107483
  changeStatus();
@@ -107891,7 +107894,7 @@ const index$a = ({ filtersData, venueId }) => {
107891
107894
  phone: create$2().nullable().notRequired().test(
107892
107895
  "is-valid-phone",
107893
107896
  t2("errors.phone"),
107894
- (value2) => !value2 || new RegExp(/^\+34[67]\d{8}$/).test(value2)
107897
+ (value2) => !value2 || new RegExp(/^\+?[1-9]\d{1,14}$/).test(value2)
107895
107898
  ),
107896
107899
  notes: create$2()
107897
107900
  });
@@ -107972,7 +107975,15 @@ const index$a = ({ filtersData, venueId }) => {
107972
107975
  const toSend = {
107973
107976
  partySize: (_e2 = data22 == null ? void 0 : data22.partySize) == null ? void 0 : _e2.value,
107974
107977
  table: (_f = data22 == null ? void 0 : data22.table) == null ? void 0 : _f.value,
107975
- date: data22.date ? moment$1.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment$1.tz(moment$1(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3
107978
+ date: data22.date ? moment$1.tz(`${data22.date} ${(_g = data22.time) == null ? void 0 : _g.value}`, currentTimeZone ? currentTimeZone : "").valueOf() / 1e3 : moment$1.tz(moment$1(), currentTimeZone ? currentTimeZone : "").valueOf() / 1e3,
107979
+ notes: data22 == null ? void 0 : data22.notes,
107980
+ contact: {
107981
+ firstname: data22 == null ? void 0 : data22.firstName,
107982
+ lastname: data22 == null ? void 0 : data22.lastName,
107983
+ email: data22 == null ? void 0 : data22.email,
107984
+ telephone: data22 == null ? void 0 : data22.phone,
107985
+ locale: "en"
107986
+ }
107976
107987
  };
107977
107988
  executeUpdate({ data: toSend, venueId, bookingId: selectedBooking.id });
107978
107989
  }
@@ -108129,7 +108140,7 @@ const index$a = ({ filtersData, venueId }) => {
108129
108140
  }, /* @__PURE__ */ React__default.createElement("div", {
108130
108141
  style: { width: "50%" }
108131
108142
  }, /* @__PURE__ */ React__default.createElement(TextInputField, {
108132
- disabled: selectedBooking || !canEdit,
108143
+ disabled: !canEdit,
108133
108144
  control,
108134
108145
  id: "firstName",
108135
108146
  name: "firstName",
@@ -108140,7 +108151,7 @@ const index$a = ({ filtersData, venueId }) => {
108140
108151
  })), /* @__PURE__ */ React__default.createElement("div", {
108141
108152
  style: { width: "50%" }
108142
108153
  }, /* @__PURE__ */ React__default.createElement(TextInputField, {
108143
- disabled: selectedBooking || !canEdit,
108154
+ disabled: !canEdit,
108144
108155
  control,
108145
108156
  id: "lastName",
108146
108157
  name: "lastName",
@@ -108151,7 +108162,7 @@ const index$a = ({ filtersData, venueId }) => {
108151
108162
  }))), /* @__PURE__ */ React__default.createElement("div", {
108152
108163
  style: { width: "100%" }
108153
108164
  }, /* @__PURE__ */ React__default.createElement(TextInputField, {
108154
- disabled: selectedBooking || !canEdit,
108165
+ disabled: !canEdit,
108155
108166
  control,
108156
108167
  id: "email",
108157
108168
  name: "email",
@@ -108162,7 +108173,7 @@ const index$a = ({ filtersData, venueId }) => {
108162
108173
  })), /* @__PURE__ */ React__default.createElement("div", {
108163
108174
  style: { width: "100%" }
108164
108175
  }, /* @__PURE__ */ React__default.createElement(TextInputField, {
108165
- disabled: selectedBooking || !canEdit,
108176
+ disabled: !canEdit,
108166
108177
  control,
108167
108178
  id: "phone",
108168
108179
  name: "phone",
@@ -108173,7 +108184,7 @@ const index$a = ({ filtersData, venueId }) => {
108173
108184
  })), /* @__PURE__ */ React__default.createElement("div", {
108174
108185
  style: { width: "100%" }
108175
108186
  }, /* @__PURE__ */ React__default.createElement(TextAreaField, {
108176
- disabled: selectedBooking || !canEdit,
108187
+ disabled: !canEdit,
108177
108188
  control,
108178
108189
  id: "notes",
108179
108190
  name: "notes",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.2.91",
3
+ "version": "0.2.92",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": ["mozrest"],
6
6
  "author": {