pcm-shared-components 2.0.14 → 2.0.16

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 (58) hide show
  1. package/dist/app/config/reservation_state.js +89 -0
  2. package/dist/app/config/yes_no_status.js +72 -0
  3. package/dist/app/tools/date_formatter.js +141 -0
  4. package/dist/app/tools/date_overlap.js +177 -0
  5. package/dist/app/tools/seasonal_dates.js +229 -0
  6. package/dist/components/Buttons/CustomFab/index.js +0 -27
  7. package/dist/components/Buttons/DropdownButton/index.js +3 -11
  8. package/dist/components/Buttons/HelpButton/index.js +1 -6
  9. package/dist/components/Buttons/ProductItemButton/index.js +8 -22
  10. package/dist/components/Buttons/TillButton/index.js +3 -10
  11. package/dist/components/Date/DateRangeCalendar/index.js +1 -21
  12. package/dist/components/Dialogs/GenericAppBar/components/GenericAppBarSubMenu.js +4 -7
  13. package/dist/components/Dialogs/GenericAppBar/index.js +24 -22
  14. package/dist/components/Dialogs/GenericDialogWindow/index.js +20 -34
  15. package/dist/components/Drawing/CanvasPaint/index.js +12 -37
  16. package/dist/components/Drawing/ImageCanvasDraw/components/Controls.js +13 -10
  17. package/dist/components/Drawing/ImageCanvasDraw/index.js +11 -18
  18. package/dist/components/Drawing/ImageCanvasDraw/service/image_tools.js +6 -6
  19. package/dist/components/Images/ImageStack/index.js +0 -5
  20. package/dist/components/Labels/SimpleLabel/index.js +1 -7
  21. package/dist/components/Layout/SimpleTab/components/TabPanel.js +2 -3
  22. package/dist/components/Layout/SimpleTab/index.js +8 -15
  23. package/dist/components/Layout/TwoColumnDisplay/index.js +0 -2
  24. package/dist/components/Links/HrefLink/index.js +1 -5
  25. package/dist/components/Loaders/LoadingBackdrop/index.js +4 -4
  26. package/dist/components/Loaders/WaitingGalaxy/index.js +1 -2
  27. package/dist/components/Menus/ReusablePopupMenu/components/GenericSubMenu.js +2 -7
  28. package/dist/components/Menus/ReusablePopupMenu/components/ReusableMenu.js +6 -7
  29. package/dist/components/Menus/ReusablePopupMenu/index.js +7 -10
  30. package/dist/components/NEW_COMPONENT/index.js +1 -2
  31. package/dist/components/NEW_COMPONENT/storybook/index.stories.js +0 -2
  32. package/dist/components/PcSharedComponentThemeInheritor/index.js +1 -1
  33. package/dist/components/Platform/PlatformPaymentPlans/components/PriceToggleButton/index.js +0 -2
  34. package/dist/components/Platform/PlatformPaymentPlans/index.js +12 -27
  35. package/dist/components/Platform/PlatformPlanPrices/index.js +3 -10
  36. package/dist/components/Platform/PlatformPlanTitles/index.js +0 -6
  37. package/dist/components/Sandbox/ScrollingInnerDiv/index.js +2 -5
  38. package/dist/components/TextBoxes/CurrencyTextInput/index.js +7 -42
  39. package/dist/components/TextBoxes/SearchBar/index.js +10 -14
  40. package/dist/components/Timelines/ReservationTimelineComponent/components/SearchLotsTextBox.js +34 -0
  41. package/dist/components/Timelines/ReservationTimelineComponent/components/TimelinePopUp.js +11 -0
  42. package/dist/components/Timelines/ReservationTimelineComponent/css/header.css +98 -0
  43. package/dist/components/Timelines/ReservationTimelineComponent/css/styles.css +121 -0
  44. package/dist/components/Timelines/ReservationTimelineComponent/css/styles.old +209 -0
  45. package/dist/components/Timelines/ReservationTimelineComponent/index.js +965 -0
  46. package/dist/components/Tools/CodeHighlight/index.js +17 -21
  47. package/dist/components/Tools/PCMScrollbar/index.js +3 -5
  48. package/dist/components/Tools/isValidFunction.js +0 -1
  49. package/dist/index.js +3 -1
  50. package/dist/languages/en/translations.json +1 -1
  51. package/dist/languages/es/translations.json +1 -1
  52. package/dist/languages/fr/translations.json +1 -1
  53. package/dist/locals/coreLocals.js +0 -8
  54. package/dist/locals/currencySymbol.js +0 -3
  55. package/dist/locals/i18n.js +11 -5
  56. package/dist/locals/translationResources.js +2 -1
  57. package/dist/styles/tailwind.css +1 -1
  58. package/package.json +4 -1
@@ -1,5 +1,4 @@
1
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
-
3
2
  import React, { useState, useEffect } from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import { ThemeProvider } from '@mui/system';
@@ -26,7 +25,6 @@ const platformPricingIcons = [mdiShimmer, mdiFire, mdiTorch];
26
25
  ```
27
26
  *
28
27
  */
29
-
30
28
  export const PlatformPaymentPlans = props => {
31
29
  const {
32
30
  currentlySelectedPlatformPricingModelId,
@@ -42,22 +40,25 @@ export const PlatformPaymentPlans = props => {
42
40
  } = props;
43
41
  const planTypeDescriptions = [i18next.t('platform_plan_feature.plan_type_descriptions.free'), i18next.t('platform_plan_feature.plan_type_descriptions.standard'), i18next.t('platform_plan_feature.plan_type_descriptions.premium')];
44
42
  const compTheme = theme ? theme : useTheme();
45
- const defaultTheme = createTheme(compTheme); //---------------------------------------------------
43
+ const defaultTheme = createTheme(compTheme);
44
+
45
+ //---------------------------------------------------
46
46
  // Hooks
47
47
  //---------------------------------------------------
48
-
49
48
  const [selectedBillingPeriod, setSelectedBillingPeriod] = useState();
50
49
  const [hasMonthlyAndYearlyBillingPeriod, setHasMonthlyAndYearlyBillingPeriod] = useState(false);
51
- const [showMoreInfo, setShowMoreInfo] = useState(false); //---------------------------------------------------
50
+ const [showMoreInfo, setShowMoreInfo] = useState(false);
51
+
52
+ //---------------------------------------------------
52
53
  // Use Effect
53
54
  //---------------------------------------------------
54
-
55
55
  useEffect(() => {
56
56
  getUniqueBillingPeriodIds();
57
- }, []); //---------------------------------------------------
57
+ }, []);
58
+
59
+ //---------------------------------------------------
58
60
  // Local Functions
59
61
  //---------------------------------------------------
60
-
61
62
  const getUniqueBillingPeriodIds = () => {
62
63
  //Returns an array with the unique ids that we have for the billing_period_id.
63
64
  //This will allow us to determine if we need to display the monthly/yearly toggle button and which billing period id to use as the default
@@ -68,11 +69,11 @@ export const PlatformPaymentPlans = props => {
68
69
  } catch (error) {
69
70
  console.error(error);
70
71
  }
71
- }; //---------------------------------------------------
72
+ };
73
+
74
+ //---------------------------------------------------
72
75
  // Local Component
73
76
  //---------------------------------------------------
74
-
75
-
76
77
  const PlatformFeatureIcon = ({
77
78
  active = true
78
79
  }) => {
@@ -83,7 +84,6 @@ export const PlatformPaymentPlans = props => {
83
84
  }
84
85
  });
85
86
  };
86
-
87
87
  const NewPlatformFeatureIcon = ({
88
88
  active = true
89
89
  }) => {
@@ -95,7 +95,6 @@ export const PlatformPaymentPlans = props => {
95
95
  }
96
96
  });
97
97
  };
98
-
99
98
  const PlatformFeatureText = ({
100
99
  text = ''
101
100
  }) => {
@@ -106,7 +105,6 @@ export const PlatformPaymentPlans = props => {
106
105
  }
107
106
  }, text);
108
107
  };
109
-
110
108
  const PlatformListItem = ({
111
109
  active = true,
112
110
  text = '',
@@ -124,7 +122,6 @@ export const PlatformPaymentPlans = props => {
124
122
  text: text
125
123
  }));
126
124
  };
127
-
128
125
  const PriceCard = props => {
129
126
  const {
130
127
  id = -1,
@@ -132,7 +129,6 @@ export const PlatformPaymentPlans = props => {
132
129
  platform_plan_type_id = 1,
133
130
  billing_period_id = 1
134
131
  } = props;
135
-
136
132
  const handlePlanSelection = id => {
137
133
  try {
138
134
  let selectedPlatform = platformPricingModels.find(pricing_model => Number(pricing_model.id) === Number(id));
@@ -141,7 +137,6 @@ export const PlatformPaymentPlans = props => {
141
137
  console.error(error);
142
138
  }
143
139
  };
144
-
145
140
  return /*#__PURE__*/React.createElement("div", {
146
141
  className: "mx-0 px-4 w-full max-w-full md:max-w-288 bg-white rounded-lg drop-shadow hover:drop-shadow-2xl sm:p-8 border-t-8 transition-all ",
147
142
  style: {
@@ -211,7 +206,6 @@ export const PlatformPaymentPlans = props => {
211
206
  key: `list_item_${billing_period_id}_${plan.platform_plan_type_id}_${plan.feature_key}`
212
207
  })))));
213
208
  };
214
-
215
209
  return /*#__PURE__*/React.createElement(ThemeProvider, {
216
210
  theme: defaultTheme
217
211
  }, /*#__PURE__*/React.createElement("div", {
@@ -260,31 +254,22 @@ PlatformPaymentPlans.defaultProps = {
260
254
  PlatformPaymentPlans.propTypes = {
261
255
  /** This is the platform tier 0=free 1=paying customer. If the campground is on a free tier then we will display a grandfather free cause you lucky dog. */
262
256
  platformTier: PropTypes.oneOf([0, 1]),
263
-
264
257
  /** This is the current plan that is being used by the campground. The platform button won't be enable and the text on the button will say Current so the user knows on which plan they currently are on. */
265
258
  currentlySelectedPlatformPricingModelId: PropTypes.any,
266
-
267
259
  /** This is the label that appears on the select platform button */
268
260
  selectPlatformButtonLabel: PropTypes.string,
269
-
270
261
  /** Toggles the view for the buttons on the platform cards */
271
262
  showSelectPlatformButton: PropTypes.bool,
272
-
273
263
  /** Displays the save up to image above the yearly toggle */
274
264
  saveYearlyImgPath: PropTypes.string,
275
-
276
265
  /** This is the platform features that are activated for each pricing model tier */
277
266
  platformPlanFeatures: PropTypes.array,
278
-
279
267
  /** This is the individual pricing models that are offered to our clients */
280
268
  platformPricingModels: PropTypes.array.isRequired,
281
-
282
269
  /** Callback when a plan is selected. Returns the selected platform pricing model object. */
283
270
  onClickPlanSelection: PropTypes.func,
284
-
285
271
  /** i18next localization to use for the component. Don't use the library localization or else it won't load properly on the consuming application */
286
272
  i18next: PropTypes.any,
287
-
288
273
  /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used */
289
274
  theme: PropTypes.object
290
275
  };
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ThemeProvider } from '@mui/system';
4
4
  import { createTheme, useTheme } from '@mui/material/styles';
5
+
5
6
  /**
6
7
  * ## Importing the component in your project
7
8
  *
@@ -12,7 +13,6 @@ import { createTheme, useTheme } from '@mui/material/styles';
12
13
  ```
13
14
  *
14
15
  */
15
-
16
16
  export const PlatformPlanPrices = props => {
17
17
  const {
18
18
  billing_period_id,
@@ -26,7 +26,8 @@ export const PlatformPlanPrices = props => {
26
26
  } = props;
27
27
  const compTheme = theme ? theme : useTheme();
28
28
  const defaultTheme = createTheme(compTheme);
29
- const MONTHLY_BILLING_PERIOD = 1; // const YEARLY_BILLING_PERIOD = 2;
29
+ const MONTHLY_BILLING_PERIOD = 1;
30
+ // const YEARLY_BILLING_PERIOD = 2;
30
31
 
31
32
  const PriceDescription = props => {
32
33
  const {
@@ -54,7 +55,6 @@ export const PlatformPlanPrices = props => {
54
55
  className: "leading-none ml-1 text-base font-600 "
55
56
  }, "/", description));
56
57
  };
57
-
58
58
  return /*#__PURE__*/React.createElement(ThemeProvider, {
59
59
  theme: defaultTheme
60
60
  }, /*#__PURE__*/React.createElement("div", {
@@ -88,25 +88,18 @@ PlatformPlanPrices.defaultProps = {
88
88
  PlatformPlanPrices.propTypes = {
89
89
  /** This is the billing period types 1=monthly, 2=yearly*/
90
90
  billing_period_id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
91
-
92
91
  /** This is the monthly fee we are charging*/
93
92
  monthly_fee: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
94
-
95
93
  /** This is the per reservation fee we are charging*/
96
94
  per_reservation_fee: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
97
-
98
95
  /** This is the expected monthly fee, used to simulate what should be the expected price such as a discount*/
99
96
  expected_monthly_fee: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
100
-
101
97
  /** This is the expected per reservation fee, used to simulate what should be the expected price such as a discount*/
102
98
  expected_per_reservation_fee: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
103
-
104
99
  /** This is the color of the plan*/
105
100
  color: PropTypes.string,
106
-
107
101
  /** i18next localization to use for the component. Don't use the library localization or else it won't load properly on the consuming application */
108
102
  i18next: PropTypes.any,
109
-
110
103
  /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used */
111
104
  theme: PropTypes.object
112
105
  };
@@ -15,7 +15,6 @@ const platformPricingIcons = [mdiShimmer, mdiFire, mdiTorch];
15
15
  ```
16
16
  *
17
17
  */
18
-
19
18
  export const PlatformPlanTitles = props => {
20
19
  const {
21
20
  platform_plan_type_id,
@@ -59,19 +58,14 @@ PlatformPlanTitles.defaultProps = {
59
58
  PlatformPlanTitles.propTypes = {
60
59
  /** This is the platform plan type id, we should only ever have three types 1=free, 2=standard, 3=premium*/
61
60
  platform_plan_type_id: PropTypes.any,
62
-
63
61
  /** This is the color of the plan*/
64
62
  color: PropTypes.string,
65
-
66
63
  /** This is the Title*/
67
64
  name: PropTypes.string,
68
-
69
65
  /** This is the Sub Title*/
70
66
  sub_name: PropTypes.string,
71
-
72
67
  /** i18next localization to use for the component. Don't use the library localization or else it won't load properly on the consuming application */
73
68
  i18next: PropTypes.any,
74
-
75
69
  /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used */
76
70
  theme: PropTypes.object
77
71
  };
@@ -2,10 +2,9 @@ import { height } from '@mui/system';
2
2
  import React from 'react';
3
3
  import ImageCanvasDraw from '../../Drawing/ImageCanvasDraw';
4
4
  import { cedarShade } from '../../Drawing/ImageCanvasDraw/storybook/testMap.test';
5
- import Grid from '@mui/material/Grid'; // import './example2.css';
6
-
5
+ import Grid from '@mui/material/Grid';
6
+ // import './example2.css';
7
7
  import PCMScrollbar from '../../Tools/PCMScrollbar';
8
-
9
8
  const ScrollingColumns = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10
9
  className: "flex flex-col border-2 absolute top-0 bottom-0 left-0 right-0"
11
10
  }, /*#__PURE__*/React.createElement("div", null, "some content here... some content here... some content here..."), /*#__PURE__*/React.createElement("div", {
@@ -21,9 +20,7 @@ const ScrollingColumns = () => /*#__PURE__*/React.createElement(React.Fragment,
21
20
  backgroundColor: "lightblue"
22
21
  }
23
22
  }, /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2"), /*#__PURE__*/React.createElement("h1", null, "Column 2")))));
24
-
25
23
  const ScrollingInnerDiv = () => {
26
24
  return /*#__PURE__*/React.createElement(React.Fragment, null, "Something here", /*#__PURE__*/React.createElement(ScrollingColumns, null));
27
25
  };
28
-
29
26
  export default ScrollingInnerDiv;
@@ -8,6 +8,7 @@ import Input from '@mui/material/Input';
8
8
  import { InputAdornment } from '@mui/material';
9
9
  import TextField from '@mui/material/TextField';
10
10
  let debounce;
11
+
11
12
  /**
12
13
  * ## Importing the component in your project
13
14
  *
@@ -18,7 +19,6 @@ let debounce;
18
19
  ```
19
20
  *
20
21
  */
21
-
22
22
  export const CurrencyTextInput = props => {
23
23
  const {
24
24
  id,
@@ -44,10 +44,11 @@ export const CurrencyTextInput = props => {
44
44
  theme
45
45
  } = props;
46
46
  const compTheme = theme ? theme : useTheme();
47
- const defaultTheme = createTheme(compTheme); //---------------------------------------------------
47
+ const defaultTheme = createTheme(compTheme);
48
+
49
+ //---------------------------------------------------
48
50
  // Functions used to sanitize the number
49
51
  //---------------------------------------------------
50
-
51
52
  const sanitizeDecimalDots = value => {
52
53
  //Ensures we only have one decimal dot in our number
53
54
  try {
@@ -55,30 +56,27 @@ export const CurrencyTextInput = props => {
55
56
  } catch (error) {
56
57
  console.error(error);
57
58
  }
58
-
59
59
  return value;
60
60
  };
61
-
62
61
  const sanitizeDigits = value => {
63
62
  //Ensures we only have digits in our number
64
63
  try {
65
64
  //Allow normal numbers, negative number and dots
66
65
  const isNegativeNumber = value[0] === '-';
67
66
  let returnVal = String(value).replace(/[^\d.]/gi, '');
68
- return `${isNegativeNumber ? '-' : ''}${returnVal}`; //Only allow numbers and dots
67
+ return `${isNegativeNumber ? '-' : ''}${returnVal}`;
68
+
69
+ //Only allow numbers and dots
69
70
  // return String(value).replace(/[^\d.]/gi, '');
70
71
  } catch (error) {
71
72
  console.error(error);
72
73
  }
73
-
74
74
  return value;
75
75
  };
76
-
77
76
  const sanitizeDecimalPlaces = value => {
78
77
  try {
79
78
  // Only apply this rule if we have a decimal place with something in it or else skip because it's causing inconsistent number formatting when entering the digits
80
79
  const decimalCheck = String(value).split('.');
81
-
82
80
  if (decimalCheck.length === 2 && decimalCheck[1].length > 0) {
83
81
  return Number(value).toLocaleString(undefined, {
84
82
  minimumFractionDigits: Number(decimalPlaces) > 0 ? 1 : 0,
@@ -89,17 +87,14 @@ export const CurrencyTextInput = props => {
89
87
  } catch (error) {
90
88
  console.error(error);
91
89
  }
92
-
93
90
  return value;
94
91
  };
95
-
96
92
  const sanitizeMinMaxValues = value => {
97
93
  try {
98
94
  if (!isNaN(value)) {
99
95
  if (Number(value) > maximumValue) {
100
96
  return maximumValue;
101
97
  }
102
-
103
98
  if (Number(value) < minimumValue) {
104
99
  return minimumValue;
105
100
  }
@@ -107,21 +102,17 @@ export const CurrencyTextInput = props => {
107
102
  } catch (error) {
108
103
  console.error(error);
109
104
  }
110
-
111
105
  return value;
112
106
  };
113
-
114
107
  const sanitizeThousandPlaces = value => {
115
108
  try {
116
109
  // Only apply the thousand grouping on the numbers before the decimal
117
110
  if (useThousandSeparator && !isNaN(value)) {
118
111
  const digits = String(value).split('.');
119
-
120
112
  if (digits[0].length > 0) {
121
113
  const thousandFormatted = Number(digits[0]).toLocaleString(undefined, {
122
114
  useGrouping: true
123
115
  });
124
-
125
116
  if (digits.length === 2) {
126
117
  //Let's keep any additional DOT and decimal places even if they are empty
127
118
  return `${thousandFormatted}.${digits[1]}`;
@@ -133,13 +124,10 @@ export const CurrencyTextInput = props => {
133
124
  } catch (error) {
134
125
  console.error(error);
135
126
  }
136
-
137
127
  return value;
138
128
  };
139
-
140
129
  const handleCurrencyFormatting = value => {
141
130
  let returnVal = value;
142
-
143
131
  try {
144
132
  returnVal = sanitizeMinMaxValues(returnVal);
145
133
  returnVal = sanitizeDecimalDots(returnVal);
@@ -149,16 +137,13 @@ export const CurrencyTextInput = props => {
149
137
  } catch (error) {
150
138
  console.error(error);
151
139
  }
152
-
153
140
  return returnVal;
154
141
  };
155
-
156
142
  const handleOnChange = event => {
157
143
  //Sanitize the output same as the input
158
144
  event.target.value = handleCurrencyFormatting(event.target.value);
159
145
  onChange(event);
160
146
  };
161
-
162
147
  return /*#__PURE__*/React.createElement(ThemeProvider, {
163
148
  theme: defaultTheme
164
149
  }, /*#__PURE__*/React.createElement(TextField, {
@@ -222,64 +207,44 @@ CurrencyTextInput.defaultProps = {
222
207
  CurrencyTextInput.propTypes = {
223
208
  /** Unique id of the component */
224
209
  id: PropTypes.string,
225
-
226
210
  /** The text color*/
227
211
  textColor: PropTypes.string,
228
-
229
212
  /** Name of the target often used to update state*/
230
213
  name: PropTypes.string,
231
-
232
214
  /** Value to be enter and display in input */
233
215
  value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
234
-
235
216
  /** The label content*/
236
217
  label: PropTypes.string,
237
-
238
218
  /** Controls the look of the text field*/
239
219
  variant: PropTypes.oneOf(['filled', 'outlined', 'standard']),
240
-
241
220
  /** Determines if the text field will be in an error state*/
242
221
  error: PropTypes.bool,
243
-
244
222
  /** Determines if the text field is disabled of not*/
245
223
  disabled: PropTypes.bool,
246
-
247
224
  /** Helper text to display below the field*/
248
225
  helperText: PropTypes.string,
249
-
250
226
  /** Determines if the text field will be full width or fit content*/
251
227
  fullWidth: PropTypes.bool,
252
-
253
228
  /** Determines if the final number grouping will contain the thousand separator */
254
229
  useThousandSeparator: PropTypes.bool,
255
-
256
230
  /** Callback fired when the value is changed*/
257
231
  onChange: PropTypes.func,
258
-
259
232
  /** Defines the currency symbol string.*/
260
233
  currencySymbol: PropTypes.string,
261
-
262
234
  /** Classes to add to the wrapper control*/
263
235
  className: PropTypes.string,
264
-
265
236
  /** Controls the font size in in pt example: 14*/
266
237
  fontSize: PropTypes.number,
267
-
268
238
  /** Controls the padding around the font */
269
239
  textPadding: PropTypes.number,
270
-
271
240
  /** Defines the default number of decimal places to show on the formatted value.*/
272
241
  decimalPlaces: PropTypes.number,
273
-
274
242
  /** Maximum value that can be enter*/
275
243
  maximumValue: PropTypes.number,
276
-
277
244
  /** Minimum value that can be entered*/
278
245
  minimumValue: PropTypes.number,
279
-
280
246
  /** Align the numbers in the textField.*/
281
247
  textAlign: PropTypes.oneOf(['left', 'right']),
282
-
283
248
  /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
284
249
  theme: PropTypes.object
285
250
  };
@@ -8,6 +8,7 @@ import SearchIcon from "@mui/icons-material/Search";
8
8
  import CloseIcon from "@mui/icons-material/Close";
9
9
  import clsx from "clsx";
10
10
  let searchDebounce;
11
+
11
12
  /**
12
13
  * This will allow to add a quick search tool bar to filter out any ui object.
13
14
  *
@@ -20,7 +21,6 @@ let searchDebounce;
20
21
  ```
21
22
  *
22
23
  */
23
-
24
24
  export const SearchBar = props => {
25
25
  // Extract the passed down props
26
26
  const {
@@ -33,11 +33,13 @@ export const SearchBar = props => {
33
33
  showDropdown,
34
34
  className,
35
35
  theme
36
- } = props; //Hooks
36
+ } = props;
37
37
 
38
- const [localValue, setLocalValue] = useState(value); // Use the user specified theme passed via the props
39
- // OR use the HOC theme passed downed by the parent component if the theme is undefined
38
+ //Hooks
39
+ const [localValue, setLocalValue] = useState(value);
40
40
 
41
+ // Use the user specified theme passed via the props
42
+ // OR use the HOC theme passed downed by the parent component if the theme is undefined
41
43
  const componentTheme = createTheme(theme ? theme : useTheme());
42
44
  useEffect(() => {
43
45
  try {
@@ -116,8 +118,9 @@ export const SearchBar = props => {
116
118
  }, /*#__PURE__*/React.createElement(CloseIcon, null))))
117
119
  );
118
120
  };
119
- export default SearchBar; // Specifies the default values for the props:
121
+ export default SearchBar;
120
122
 
123
+ // Specifies the default values for the props:
121
124
  SearchBar.defaultProps = {
122
125
  onCancelSearch: () => {},
123
126
  onChange: () => {},
@@ -128,33 +131,26 @@ SearchBar.defaultProps = {
128
131
  showDropdown: true,
129
132
  className: "",
130
133
  theme: undefined
131
- }; // Specifies the types to use for each props:
134
+ };
132
135
 
136
+ // Specifies the types to use for each props:
133
137
  SearchBar.propTypes = {
134
138
  /** Fired when the search is cancelled. */
135
139
  onCancelSearch: PropTypes.func,
136
-
137
140
  /** Fired when the text value changes. Returns the new value */
138
141
  onChange: PropTypes.func,
139
-
140
142
  /** Same as onChange except only fires 700ms after the users has completed typing to prevent performance issues. Returns the new value */
141
143
  onChangeDebounce: PropTypes.func,
142
-
143
144
  /** Sets placeholder text for the embedded text field. */
144
145
  placeholder: PropTypes.string,
145
-
146
146
  /** The value of the text field. */
147
147
  value: PropTypes.string,
148
-
149
148
  /** Disables text field. */
150
149
  disabled: PropTypes.bool,
151
-
152
150
  /** Show the dropdown around the text field component */
153
151
  showDropdown: PropTypes.bool,
154
-
155
152
  /** Override or extend the styles applied to the component. */
156
153
  className: PropTypes.string,
157
-
158
154
  /** The manual theme to apply to the component */
159
155
  theme: PropTypes.object
160
156
  };
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import TextField from '@mui/material/TextField';
3
+ import i18next from 'i18next';
4
+ const SearchLotsTextBox = props => {
5
+ const {
6
+ lot_search,
7
+ setLotSearch,
8
+ setFocusOnFilter
9
+ } = props;
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ style: {}
12
+ }, /*#__PURE__*/React.createElement(TextField, {
13
+ style: {
14
+ paddingTop: 12,
15
+ paddingBottom: 12
16
+ },
17
+ id: "lot_filter_search",
18
+ label: i18next.t('reservation_grid.header.lot_number'),
19
+ value: lot_search,
20
+ onChange: e => {
21
+ setLotSearch(e.target.value);
22
+ },
23
+ onClick: () => {
24
+ setFocusOnFilter({
25
+ should_focus_on_lot_filter: true
26
+ });
27
+ setTimeout(() => {
28
+ document.getElementById('lot_filter_search').focus();
29
+ }, 100);
30
+ }
31
+ }));
32
+ };
33
+ SearchLotsTextBox.propTypes = {};
34
+ export default /*#__PURE__*/React.memo(SearchLotsTextBox);
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ const TimelinePopUp = props => {
3
+ const {
4
+ res,
5
+ addNewResOnClick,
6
+ getTimeDifference,
7
+ showAddNewReservationButtonInPopup
8
+ } = props;
9
+ return /*#__PURE__*/React.createElement(React.Fragment, null, "some popup");
10
+ };
11
+ export default TimelinePopUp;
@@ -0,0 +1,98 @@
1
+ :root {
2
+ /* Colors */
3
+ --color-white: #fff;
4
+ --color-black: #000;
5
+ --color-border-lightgray: rgba(0, 0, 0, 0.16);
6
+ --color-lightgray: #f0f3f4;
7
+ --color-red: #d32f2f;
8
+
9
+ /* Dimensions */
10
+ --footer-menu-height: 60px;
11
+ }
12
+ /* Header */
13
+ .sticky {
14
+ position: -webkit-sticky; /* Safari */
15
+ position: sticky;
16
+ top: 0;
17
+ z-index: 2000;
18
+ }
19
+
20
+
21
+ .react-calendar-timeline .rct-header-root {
22
+ border-bottom: none;
23
+ font-size: medium;
24
+ /* box-shadow: var(--color-border-lightgray) 0 0 1rem; */
25
+ -moz-box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
26
+ -webkit-box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
27
+ box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
28
+ border: solid 1px var(--color-border-lightgray);
29
+ border-radius: 5px;
30
+ text-align: center;
31
+ }
32
+
33
+ .react-calendar-timeline .rct-header-root{
34
+ background-color: white;
35
+ }
36
+ .left-header{
37
+ background-color: white !important;
38
+ justify-items: center;
39
+ text-align: center;
40
+ margin:auto;
41
+ height: 100%;
42
+ display:inline-block;
43
+ }
44
+
45
+ .react-calendar-timeline .rct-calendar-header {
46
+ border: none;
47
+ }
48
+
49
+ .rct-header-root.undefined {
50
+ background-color: white;
51
+ }
52
+
53
+ .react-calendar-timeline .rct-dateHeader {
54
+ position: relative;
55
+ pointer-events: none;
56
+ border: none;
57
+ /* border-right: dashed 1px rgb(175, 175, 175) !important; */
58
+ border-bottom:none;
59
+ border-right:none;
60
+ background: var(--color-white);
61
+ font-size: 0.9rem;
62
+ font-weight: 200;
63
+ padding-top: 15px;
64
+ }
65
+
66
+ /* creates the half line beside the dates */
67
+ .rct-dateHeader:after {
68
+ content : "";
69
+ position: absolute;
70
+ right : 0;
71
+ z-index: 100;
72
+ top : 40%;
73
+ width : 3px;
74
+ height : 100%; /* or 100px */
75
+ /* background: #555; */
76
+ border-right: dashed 1px rgb(189, 188, 188)!important
77
+ }
78
+
79
+ .react-calendar-timeline .rct-dateHeader-primary {
80
+ color: var(--color-black);
81
+ padding-right: 2.6rem;
82
+ text-transform: uppercase;
83
+ }
84
+
85
+ /* Vertical lines */
86
+ .react-calendar-timeline .rct-vertical-lines .rct-vl {
87
+ border-left: dashed 1px #9292923a;
88
+ /* border-left: none; */
89
+ }
90
+
91
+ .react-calendar-timeline .rct-vertical-lines .rct-vl:nth-child(odd) {
92
+ /* background: var(--color-white); */
93
+ }
94
+
95
+ .react-calendar-timeline .rct-vertical-lines .rct-vl:nth-child(even) {
96
+ /* background: var(--color-lightgray); */
97
+ }
98
+