pcm-shared-components 2.1.107 → 2.1.109

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 (28) hide show
  1. package/README.md +21 -1
  2. package/dist/components/Buttons/CustomFab/index.js +55 -88
  3. package/dist/components/Buttons/DropdownButton/index.js +1 -1
  4. package/dist/components/Buttons/ProductItemButton/index.js +164 -209
  5. package/dist/components/Buttons/TillButton/index.js +1 -1
  6. package/dist/components/Cards/EventCard/components/OpenEventViewAllImageDialog.js +3 -3
  7. package/dist/components/Cards/EventCard/index.js +1 -1
  8. package/dist/components/Date/DatePickerReactStyled/DateCalendar/index.js +1 -1
  9. package/dist/components/Date/DatePickerReactStyled/DateCalendar/storybook/index.stories.js +1 -1
  10. package/dist/components/Date/DatePickerReactStyled/DateRangeCalendar/index.js +1 -1
  11. package/dist/components/Date/DatePickerReactStyled/DateRangeCalendar/storybook/index.stories.js +1 -1
  12. package/dist/components/Date/DatePickerReactStyled/common/theme.js +0 -2
  13. package/dist/components/Date/PricingCalendar/index.js +0 -1
  14. package/dist/components/Dialogs/GenericAppBar/components/GenericAppBarSubMenu.js +3 -5
  15. package/dist/components/Dialogs/GenericAppBar/index.js +78 -171
  16. package/dist/components/Dialogs/GenericDialogWindow/index.js +2 -2
  17. package/dist/components/Dialogs/GenericDialogWindow/index_UPGRADED.js +226 -0
  18. package/dist/components/Drawing/ImageCanvasDraw/components/Controls.js +0 -1
  19. package/dist/components/Layout/SimpleTab/index.js +38 -62
  20. package/dist/components/Menus/ReusablePopupMenu/components/ReusableMenu.js +58 -58
  21. package/dist/components/Menus/ReusablePopupMenu/components/{GenericSubMenu.js → SubMenuInternal.js} +50 -80
  22. package/dist/components/Menus/ReusablePopupMenu/index copy.js +98 -0
  23. package/dist/components/Menus/ReusablePopupMenu/index.js +39 -44
  24. package/dist/components/PcSharedComponentThemeInheritor/index.js +11 -7
  25. package/dist/components/Platform/PlatformPaymentPlans/index.js +1 -1
  26. package/dist/locals/i18n.js +0 -1
  27. package/dist/styles/tailwind.css +1 -1
  28. package/package.json +14 -11
@@ -1,140 +1,39 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
- import { ThemeProvider } from '@mui/system';
4
- import { createTheme, useTheme } from '@mui/material/styles';
4
+ import { ThemeProvider, createTheme, useTheme, styled } from '@mui/material/styles';
5
5
  import clsx from 'clsx';
6
6
  import Button from '@mui/material/Button';
7
- // import { toFloat_2_decimal } from '../../../tools/string_formatter';
8
7
  import IconButton from '@mui/material/IconButton';
9
8
  import EditIcon from '@mui/icons-material/Edit';
10
- // import { limitStringLength } from 'app/tools/string_formatter';
11
- // import { RiBarcodeLine } from 'react-icons/ri';
12
9
  import ImageStack from '../../Images/ImageStack';
13
10
  import InfoIcon from '@mui/icons-material/Info';
14
- import Tooltip from '@mui/material/Tooltip';
15
- import { makeStyles } from '@mui/styles';
16
- import withStyles from "@mui/styles/withStyles";
11
+ import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
17
12
  let debounce;
18
- const useStyles = makeStyles(theme => ({
19
- productButtonWrapper: {
20
- color: 'lightgray',
21
- height: ({
22
- PRODUCT_BUTTON_HEIGHT
23
- }) => PRODUCT_BUTTON_HEIGHT,
24
- maxHeight: ({
25
- PRODUCT_BUTTON_HEIGHT
26
- }) => PRODUCT_BUTTON_HEIGHT,
27
- maxWidth: 'fit-content',
28
- margin: ({
29
- PRODUCT_BUTTON_GUTTER
30
- }) => PRODUCT_BUTTON_GUTTER,
31
- backgroundColor: 'lightgray',
32
- borderRadius: 5
33
- },
34
- productButtonActive: {
35
- color: '#fff',
36
- height: ({
37
- PRODUCT_BUTTON_HEIGHT
38
- }) => PRODUCT_BUTTON_HEIGHT,
39
- maxHeight: ({
40
- PRODUCT_BUTTON_HEIGHT
41
- }) => PRODUCT_BUTTON_HEIGHT,
42
- // paddingRight: ({ hasImage, isTierPricing }) => (hasImage && isTierPricing) ? 2 : undefined,
43
- textAlign: 'center',
44
- fontSize: 16,
45
- borderRadius: 5,
46
- backgroundColor: theme.palette && theme.palette.primary.main ? theme.palette.primary.main : undefined,
47
- '&:hover': {
48
- backgroundColor: theme.palette && theme.palette.primary.dark ? theme.palette.primary.dark : undefined
49
- }
50
- },
51
- productButtonNotActive: {
52
- color: '#fff',
53
- height: ({
54
- PRODUCT_BUTTON_HEIGHT
55
- }) => PRODUCT_BUTTON_HEIGHT,
56
- maxHeight: ({
57
- PRODUCT_BUTTON_HEIGHT
58
- }) => PRODUCT_BUTTON_HEIGHT,
59
- // paddingRight: ({ hasImage, isTierPricing }) => (hasImage && isTierPricing) ? 2 : undefined,
60
- textAlign: 'center',
61
- borderRadius: 5,
62
- backgroundColor: theme.palette && theme.palette.action.focus ? theme.palette.action.focus : undefined,
63
- '&:hover': {
64
- backgroundColor: theme.palette && theme.palette.action.active ? theme.palette.action.active : undefined
65
- }
66
- },
67
- productName: {
68
- fontSize: 16,
69
- lineHeight: 1,
70
- "-webkit-line-clamp": ({
71
- hasFooterSection
72
- }) => hasFooterSection ? 1 : 2,
73
- WebkitLineClamp: ({
74
- hasFooterSection
75
- }) => hasFooterSection ? 1 : 2,
76
- display: '-webkit-box',
77
- "-webkit-box-orient": 'vertical',
78
- whiteSpace: 'normal',
79
- overflow: 'hidden',
80
- textOverflow: 'ellipsis'
81
- },
82
- productPrice: {
83
- fontSize: 26,
84
- lineHeight: 1.5,
85
- "-webkit-line-clamp": 1,
86
- WebkitLineClamp: 1,
87
- display: '-webkit-box',
88
- "-webkit-box-orient": 'vertical',
89
- whiteSpace: 'normal',
90
- overflow: 'hidden',
91
- textOverflow: 'ellipsis'
92
- },
93
- productTirePrice: {
94
- fontSize: 16,
95
- lineHeight: 1.3,
96
- "-webkit-line-clamp": 1,
97
- WebkitLineClamp: 1,
98
- display: '-webkit-box',
99
- "-webkit-box-orient": 'vertical',
100
- whiteSpace: 'normal',
101
- overflow: 'hidden',
102
- textOverflow: 'ellipsis'
103
- },
104
- productQuantity: {
105
- fontSize: 11,
106
- padding: 0,
107
- marginTop: 0,
108
- marginBottom: 0
109
- },
110
- productSKU: {
111
- lineHeight: 1.5,
112
- fontSize: 12,
113
- padding: '0 5px 0px 5px',
114
- margin: 'auto',
115
- backgroundColor: 'white',
116
- width: '100%',
117
- minWidth: '100%',
118
- color: 'orange',
119
- borderRadius: 5
120
- },
121
- tierPriceSubtitle: {
122
- lineHeight: 0.5,
123
- padding: 0,
124
- margin: 0,
125
- fontSize: 10
13
+ const LightTooltip = styled(({
14
+ className,
15
+ ...props
16
+ }) => /*#__PURE__*/React.createElement(Tooltip, _extends({}, props, {
17
+ classes: {
18
+ popper: className
19
+ }
20
+ })))(({
21
+ theme
22
+ }) => ({
23
+ [`& .${tooltipClasses.tooltip}`]: {
24
+ backgroundColor: theme?.palette?.common?.white,
25
+ color: theme?.palette?.common?.black,
26
+ boxShadow: theme?.shadows ? theme.shadows[1] : 1,
27
+ fontSize: 14
126
28
  }
127
29
  }));
128
30
 
129
31
  /**
130
32
  * ## Importing the component in your project
131
- *
132
- ```js
133
-
134
- import {ProductItemButton} from 'pcm-shared-components';
135
-
136
- ```
137
- *
33
+ *
34
+ * ```js
35
+ * import { ProductItemButton } from 'pcm-shared-components';
36
+ * ```
138
37
  */
139
38
  export const ProductItemButton = props => {
140
39
  const {
@@ -150,52 +49,62 @@ export const ProductItemButton = props => {
150
49
  i18next,
151
50
  theme
152
51
  } = props;
153
- const classes = useStyles({
154
- PRODUCT_BUTTON_GUTTER,
155
- PRODUCT_BUTTON_HEIGHT,
156
- PRODUCT_SMALL_BUTTON_WIDTH,
157
- PRODUCT_LARGE_BUTTON_WIDTH,
158
- hasImage: productData.picturesFullURL && productData.picturesFullURL.length > 0 ? true : false,
159
- isTierPricing: Number(productData.is_unit_pricing) !== 1 ? true : false,
160
- hasFooterSection: FooterSection ? true : false
161
- });
162
- const compTheme = theme ? theme : useTheme();
52
+ const hasImage = productData.picturesFullURL && productData.picturesFullURL.length > 0;
53
+ const isTierPricing = Number(productData.is_unit_pricing) !== 1;
54
+ const hasFooterSection = Boolean(FooterSection);
55
+ const compTheme = theme || useTheme();
163
56
  const defaultTheme = createTheme(compTheme);
164
-
165
- //---------------------------------------------------
166
- // Local Component
167
- //---------------------------------------------------
168
-
169
- const LightTooltip = withStyles(theme => ({
170
- tooltip: {
171
- backgroundColor: theme && theme.palette && theme.palette.common.white ? theme.palette.common.white : undefined,
172
- color: theme && theme.palette && theme.palette.common.black ? theme.palette.common.black : undefined,
173
- boxShadow: theme.shadows ? theme.shadows[1] : 1,
174
- fontSize: 14
175
- }
176
- }))(Tooltip);
177
- const TierPricing = ({
178
- price,
179
- sub_title
180
- }) => {
181
- const thisPrice = toFloat_2_decimal(price);
182
- return /*#__PURE__*/React.createElement(React.Fragment, null, parseFloat(thisPrice) > 0 ? /*#__PURE__*/React.createElement(Tooltip, {
183
- title: sub_title,
184
- arrow: true,
185
- placement: "right-end"
186
- }, /*#__PURE__*/React.createElement("div", {
187
- className: clsx('flex flex-row m-auto ')
188
- }, /*#__PURE__*/React.createElement("p", {
189
- className: clsx(classes.productTirePrice, 'p-0 my-auto ')
190
- }, toFloat_2_decimal(price)), /*#__PURE__*/React.createElement("div", {
191
- className: "h-full my-auto pl-4"
192
- }, /*#__PURE__*/React.createElement("p", {
193
- className: clsx(classes.tierPriceSubtitle, '')
194
- }, String(sub_title).substring(0, 2))))) : /*#__PURE__*/React.createElement(React.Fragment, null));
57
+ const commonLineClampStyle = {
58
+ display: '-webkit-box',
59
+ WebkitBoxOrient: 'vertical',
60
+ whiteSpace: 'normal',
61
+ overflow: 'hidden',
62
+ textOverflow: 'ellipsis'
63
+ };
64
+ const productNameStyle = {
65
+ fontSize: 16,
66
+ lineHeight: 1,
67
+ WebkitLineClamp: hasFooterSection ? 1 : 2,
68
+ ...commonLineClampStyle
69
+ };
70
+ const productPriceStyle = {
71
+ fontSize: 26,
72
+ lineHeight: 1.5,
73
+ WebkitLineClamp: 1,
74
+ ...commonLineClampStyle
75
+ };
76
+ const productTierPriceStyle = {
77
+ fontSize: 16,
78
+ lineHeight: 1.3,
79
+ WebkitLineClamp: 1,
80
+ ...commonLineClampStyle
81
+ };
82
+ const tierPriceSubtitleStyle = {
83
+ lineHeight: 0.5,
84
+ padding: 0,
85
+ margin: 0,
86
+ fontSize: 10
87
+ };
88
+ const productSKUStyle = {
89
+ lineHeight: 1.5,
90
+ fontSize: 12,
91
+ padding: '0 5px',
92
+ margin: 'auto',
93
+ backgroundColor: 'white',
94
+ width: '100%',
95
+ minWidth: '100%',
96
+ color: 'orange',
97
+ borderRadius: 5
98
+ };
99
+ const productQuantityStyle = {
100
+ fontSize: 11,
101
+ padding: 0,
102
+ marginTop: 0,
103
+ marginBottom: 0
195
104
  };
196
105
  const toFloat_2_decimal = value => {
197
106
  try {
198
- if (value) {
107
+ if (value !== undefined && value !== null) {
199
108
  value = parseFloat(Math.round(value * 100) / 100).toFixed(2);
200
109
  }
201
110
  } catch (e) {
@@ -205,7 +114,7 @@ export const ProductItemButton = props => {
205
114
  };
206
115
  const toFloat_0_decimal = value => {
207
116
  try {
208
- if (value) {
117
+ if (value !== undefined && value !== null) {
209
118
  value = parseFloat(Math.round(value * 100) / 100).toFixed(0);
210
119
  }
211
120
  } catch (e) {
@@ -213,11 +122,40 @@ export const ProductItemButton = props => {
213
122
  }
214
123
  return value;
215
124
  };
125
+ const TierPricing = ({
126
+ price,
127
+ sub_title
128
+ }) => {
129
+ const thisPrice = toFloat_2_decimal(price);
130
+ return /*#__PURE__*/React.createElement(React.Fragment, null, parseFloat(thisPrice || 0) > 0 ? /*#__PURE__*/React.createElement(Tooltip, {
131
+ title: sub_title,
132
+ arrow: true,
133
+ placement: "right-end"
134
+ }, /*#__PURE__*/React.createElement("div", {
135
+ className: clsx('flex flex-row m-auto')
136
+ }, /*#__PURE__*/React.createElement("p", {
137
+ className: clsx('p-0 my-auto'),
138
+ style: productTierPriceStyle
139
+ }, toFloat_2_decimal(price)), /*#__PURE__*/React.createElement("div", {
140
+ className: "h-full my-auto pl-4"
141
+ }, /*#__PURE__*/React.createElement("p", {
142
+ style: tierPriceSubtitleStyle
143
+ }, String(sub_title).substring(0, 2))))) : null);
144
+ };
216
145
  return /*#__PURE__*/React.createElement(ThemeProvider, {
217
146
  theme: defaultTheme
218
147
  }, /*#__PURE__*/React.createElement("div", {
219
148
  key: `product_list_items_${productData.product_id}`,
220
- className: clsx(classes.productButtonWrapper, 'flex flex-row')
149
+ className: clsx('flex flex-row'),
150
+ style: {
151
+ color: 'lightgray',
152
+ height: PRODUCT_BUTTON_HEIGHT,
153
+ maxHeight: PRODUCT_BUTTON_HEIGHT,
154
+ maxWidth: 'fit-content',
155
+ margin: PRODUCT_BUTTON_GUTTER,
156
+ backgroundColor: 'lightgray',
157
+ borderRadius: 5
158
+ }
221
159
  }, /*#__PURE__*/React.createElement(Button, {
222
160
  onClick: () => {
223
161
  clearTimeout(debounce);
@@ -226,27 +164,43 @@ export const ProductItemButton = props => {
226
164
  }, 50);
227
165
  },
228
166
  variant: "contained",
229
- className: clsx(Number(productData.state_id) === 1 ? classes.productButtonActive : classes.productButtonNotActive),
167
+ sx: theme => ({
168
+ color: '#fff',
169
+ height: PRODUCT_BUTTON_HEIGHT,
170
+ maxHeight: PRODUCT_BUTTON_HEIGHT,
171
+ textAlign: 'center',
172
+ borderRadius: 5,
173
+ fontSize: 16,
174
+ ...(Number(productData.state_id) === 1 ? {
175
+ backgroundColor: theme?.palette?.primary?.main,
176
+ '&:hover': {
177
+ backgroundColor: theme?.palette?.primary?.dark
178
+ }
179
+ } : {
180
+ backgroundColor: theme?.palette?.action?.focus,
181
+ '&:hover': {
182
+ backgroundColor: theme?.palette?.action?.active
183
+ }
184
+ })
185
+ }),
230
186
  style: {
231
- //change the width based on pricing type. So we can show the tiered pricing the button
232
187
  width: Number(productData.is_unit_pricing) === 1 ? PRODUCT_SMALL_BUTTON_WIDTH : PRODUCT_LARGE_BUTTON_WIDTH,
233
188
  height: '100%'
234
189
  }
235
190
  }, /*#__PURE__*/React.createElement("div", {
236
- className: "flex flex-col w-full h-full justify-between "
237
- }, /*#__PURE__*/React.createElement("div", {
238
- className: ""
239
- }, /*#__PURE__*/React.createElement("p", {
240
- className: clsx(classes.productName, 'my-auto mx-12')
191
+ className: "flex flex-col w-full h-full justify-between"
192
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
193
+ className: clsx('my-auto mx-12'),
194
+ style: productNameStyle
241
195
  }, productData.name), productData.description && productData.description.length > 3 && /*#__PURE__*/React.createElement("div", {
242
- className: "absolute right-0 top-0 "
196
+ className: "absolute right-0 top-0"
243
197
  }, /*#__PURE__*/React.createElement(LightTooltip, {
244
198
  title: productData.description,
245
199
  arrow: true
246
200
  }, /*#__PURE__*/React.createElement(InfoIcon, {
247
- fontSize: "normal"
248
- })))), productData.picturesFullURL && productData.picturesFullURL.length > 0 && /*#__PURE__*/React.createElement("div", {
249
- className: "absolute left-0 -ml-10 z-99",
201
+ fontSize: "small"
202
+ })))), hasImage && /*#__PURE__*/React.createElement("div", {
203
+ className: "absolute left-0 -ml-10 z-99",
250
204
  style: {
251
205
  top: '22%'
252
206
  }
@@ -262,24 +216,25 @@ export const ProductItemButton = props => {
262
216
  /*#__PURE__*/
263
217
  // Unit Pricing
264
218
  React.createElement("p", {
265
- className: clsx(classes.productPrice, 'my-auto')
219
+ className: clsx('my-auto'),
220
+ style: productPriceStyle
266
221
  }, toFloat_2_decimal(productData.price_per_unit)) :
267
222
  /*#__PURE__*/
268
- // Tire Pricing
223
+ // Tier Pricing
269
224
  React.createElement("div", {
270
- className: `flex flex-row justify-around m-auto capitalize ${productData.picturesFullURL && productData.picturesFullURL.length > 0 ? ' ml-24 ' : ''}`
225
+ className: clsx('flex flex-row justify-around m-auto capitalize', hasImage ? 'ml-24' : '')
271
226
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TierPricing, {
272
227
  price: productData.daily_price,
273
- sub_title: i18next.t('common.app.nightly')
228
+ sub_title: i18next?.t('common.app.nightly') || ''
274
229
  }), /*#__PURE__*/React.createElement(TierPricing, {
275
230
  price: productData.weekly_price,
276
- sub_title: i18next.t('common.app.weekly')
231
+ sub_title: i18next?.t('common.app.weekly') || ''
277
232
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TierPricing, {
278
233
  price: productData.monthly_price,
279
- sub_title: i18next.t('common.app.monthly')
234
+ sub_title: i18next?.t('common.app.monthly') || ''
280
235
  }), /*#__PURE__*/React.createElement(TierPricing, {
281
236
  price: productData.seasonal_price,
282
- sub_title: i18next.t('common.app.seasonal')
237
+ sub_title: i18next?.t('common.app.seasonal') || ''
283
238
  }))))), /*#__PURE__*/React.createElement("div", {
284
239
  className: "flex flex-row"
285
240
  }, /*#__PURE__*/React.createElement("div", {
@@ -295,7 +250,7 @@ export const ProductItemButton = props => {
295
250
  }, /*#__PURE__*/React.createElement(IconButton, {
296
251
  size: "small",
297
252
  color: "primary",
298
- "aria-label": "upload picture",
253
+ "aria-label": "edit product",
299
254
  component: "span"
300
255
  }, /*#__PURE__*/React.createElement(EditIcon, null)))));
301
256
  };
@@ -317,25 +272,25 @@ ProductItemButton.defaultProps = {
317
272
  category_id: 1,
318
273
  state_id: 1,
319
274
  available_online: 1,
320
- name: "",
321
- description: "",
322
- SKU: "",
323
- allow_sale_if_quantity_zero: "1",
324
- last_stock_quantity: "0",
325
- is_unit_pricing: "1",
326
- price_per_unit: "0",
327
- stock_quantity: "0",
328
- daily_price: "0",
329
- weekly_price: "0",
330
- monthly_price: "0",
331
- seasonal_price: "0",
275
+ name: '',
276
+ description: '',
277
+ SKU: '',
278
+ allow_sale_if_quantity_zero: '1',
279
+ last_stock_quantity: '0',
280
+ is_unit_pricing: '1',
281
+ price_per_unit: '0',
282
+ stock_quantity: '0',
283
+ daily_price: '0',
284
+ weekly_price: '0',
285
+ monthly_price: '0',
286
+ seasonal_price: '0',
332
287
  pictures: [],
333
288
  picturesFullURL: [],
334
- discount_type_id: "0",
335
- discount_type_amount: "0",
336
- discount_total: "0",
337
- line_price_override: "0",
338
- product_category_name: "Res Addons"
289
+ discount_type_id: '0',
290
+ discount_type_amount: '0',
291
+ discount_total: '0',
292
+ line_price_override: '0',
293
+ product_category_name: 'Res Addons'
339
294
  }
340
295
  };
341
296
  ProductItemButton.propTypes = {
@@ -343,22 +298,22 @@ ProductItemButton.propTypes = {
343
298
  showEdit: PropTypes.bool,
344
299
  /** Gutter around the button */
345
300
  PRODUCT_BUTTON_GUTTER: PropTypes.number,
346
- /** The hight of the button */
301
+ /** The height of the button */
347
302
  PRODUCT_BUTTON_HEIGHT: PropTypes.number,
348
303
  /** Length of the small button when we are displaying a unit price */
349
304
  PRODUCT_SMALL_BUTTON_WIDTH: PropTypes.number,
350
- /** Product button width use to display a larger button however now it's by default the same length as the small button width */
305
+ /** Product button width used to display a larger button (currently same as small width) */
351
306
  PRODUCT_LARGE_BUTTON_WIDTH: PropTypes.number,
352
307
  /** Any component to display on the footer of the button */
353
308
  FooterSection: PropTypes.any,
354
- /** The call back when the edit button is clicked. Returns the productData passed to the button when initialized */
309
+ /** The callback when the edit button is clicked. Returns productData */
355
310
  onEditClick: PropTypes.any,
356
- /** The onclick callback when the button is clicked. Returns the productData passed to the button when initialized */
311
+ /** The onclick callback when the button is clicked. Returns productData */
357
312
  onClick: PropTypes.any,
358
313
  /** This is the product object */
359
314
  productData: PropTypes.any,
360
- /** The i18next needs to be passed in by the component or else they will be blank */
315
+ /** The i18next instance needs to be passed in by the component */
361
316
  i18next: PropTypes.any,
362
- /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
317
+ /** Theme object to use on this component; if none provided then the MUI theme provider theme is used */
363
318
  theme: PropTypes.object
364
319
  };
@@ -1,4 +1,4 @@
1
- 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); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { memo } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
@@ -1,12 +1,12 @@
1
- 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); }
2
- import React from "react";
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ import React, { forwardRef } from "react";
3
3
  import { Dialog, DialogContent } from '@mui/material';
4
4
  import PropTypes from "prop-types";
5
5
  import VerticalImageTile from "../../../Images/VerticalImageTile";
6
6
  import Slide from '@mui/material/Slide';
7
7
  import { IconButton } from '@mui/material';
8
8
  import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew';
9
- const Transition = /*#__PURE__*/React.forwardRef(function Transition(props, ref) {
9
+ const Transition = /*#__PURE__*/forwardRef(function Transition(props, ref) {
10
10
  return /*#__PURE__*/React.createElement(Slide, _extends({
11
11
  direction: "up",
12
12
  ref: ref
@@ -1,4 +1,4 @@
1
- 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); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useState, useEffect, useCallback } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import moment from "moment";
@@ -145,7 +145,7 @@ DateCalendar.propTypes = {
145
145
  dateFormat: PropTypes.string,
146
146
  /** Min booking days allowing the user to select a valid date range.*/
147
147
  minBookingDays: PropTypes.number,
148
- /** Provides a (date:date) props to the function and expects a React.ReactNode component to be returned */
148
+ /** Provides a (date:date) props to the function and expects a ReactNode component to be returned */
149
149
  onDayRender: PropTypes.func,
150
150
  /** Provides a (date:date) props to the function and expects a boolean value returned which tells the calendar to either block or not that day*/
151
151
  isDateBlocked: PropTypes.func,
@@ -1,4 +1,4 @@
1
- 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); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { useState } from 'react';
3
3
  import DateCalendar from '..';
4
4
  import IndexDocs from './index.docs.mdx';
@@ -135,7 +135,7 @@ DateRangeCalendar.propTypes = {
135
135
  dateFormat: PropTypes.string,
136
136
  /** Min booking days allowing the user to select a valid date range.*/
137
137
  minBookingDays: PropTypes.number,
138
- /** Provides a (date:date) props to the function and expects a React.ReactNode component to be returned */
138
+ /** Provides a (date:date) props to the function and expects a ReactNode component to be returned */
139
139
  onDayRender: PropTypes.func,
140
140
  /** Provides a (date:date) props to the function and expects a boolean value returned which tells the calendar to either block or not that day*/
141
141
  isDateBlocked: PropTypes.func,
@@ -1,4 +1,4 @@
1
- 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); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import { useState } from 'react';
3
3
  import DateRangeCalendar from '..';
4
4
  import IndexDocs from './index.docs.mdx';
@@ -37,7 +37,6 @@ export const commonCalendarTheme = ({
37
37
  // normalDayHover: 'transparent',
38
38
  ...themeConfig.colors // Allows overriding color settings
39
39
  },
40
-
41
40
  inputLabelBorder: variant === 'outlined' ? undefined : 'none',
42
41
  datepickerZIndex: zIndex,
43
42
  dateRangeZIndex: zIndex,
@@ -46,6 +45,5 @@ export const commonCalendarTheme = ({
46
45
  ...themeConfig // Spread additional custom configuration
47
46
  }
48
47
  };
49
-
50
48
  return theme;
51
49
  };
@@ -98,7 +98,6 @@ export const PricingCalendar = props => {
98
98
  // selectedDays={[moment(startDate), { from: moment(startDate).toDate(), to: new moment(endDate).toDate() }]}
99
99
  }));
100
100
  };
101
-
102
101
  export default PricingCalendar;
103
102
  PricingCalendar.defaultProps = {
104
103
  i18next: undefined,
@@ -1,12 +1,12 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { Tooltip, IconButton, MenuItem, Menu } from "@mui/material";
3
3
  import ChevronRightIcon from '@mui/icons-material/ChevronRight';
4
- const GenericAppBarSubMenu = ({
4
+ function GenericAppBarSubMenu({
5
5
  menu,
6
6
  classes,
7
7
  full_menu = false,
8
8
  handleParentMenuClose = undefined
9
- }) => {
9
+ }) {
10
10
  const [anchorSubMenu, setAnchorSubMenu] = useState(false);
11
11
  const [isSubMenuOpen, setSubMenuOpen] = useState(false);
12
12
  const openSubMenu = event => {
@@ -21,7 +21,6 @@ const GenericAppBarSubMenu = ({
21
21
  }
22
22
  // handleMobileMenuClose();
23
23
  };
24
-
25
24
  useEffect(() => {
26
25
  setSubMenuOpen(Boolean(anchorSubMenu));
27
26
  }, [anchorSubMenu]);
@@ -39,7 +38,6 @@ const GenericAppBarSubMenu = ({
39
38
  }))) : /*#__PURE__*/React.createElement(Tooltip, {
40
39
  title: menu.name
41
40
  }, /*#__PURE__*/React.createElement(IconButton, {
42
- className: classes.menuButton,
43
41
  color: "inherit",
44
42
  "aria-owns": "menu-appbar",
45
43
  onClick: openSubMenu
@@ -76,5 +74,5 @@ const GenericAppBarSubMenu = ({
76
74
  }, /*#__PURE__*/React.createElement(IconButton, {
77
75
  color: "inherit"
78
76
  }, sub_menu.icon), /*#__PURE__*/React.createElement("p", null, sub_menu.name))))));
79
- };
77
+ }
80
78
  export default GenericAppBarSubMenu;