@websy/websy-designs 1.2.21 → 1.2.23

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.
@@ -13,7 +13,8 @@ router.get('/', (req, res) => {
13
13
  })
14
14
 
15
15
  router.get('/lasthtml', (req, res) => {
16
- res.send(req.session.pdf)
16
+ // res.send(req.session.pdf)
17
+ res.send(pdfHelper.getLastHTML())
17
18
  })
18
19
 
19
20
  router.post('/', (req, res) => {
@@ -953,11 +953,11 @@ class WebsyDatePicker {
953
953
  let isContinuousRange = true
954
954
  if (rangeInput.length === 1) {
955
955
  this.selectedRangeDates = [...rangeInput]
956
- this.customRangeSelected = [...rangeInput]
956
+ this.customRangeSelected = true
957
957
  }
958
958
  else if (rangeInput.length === 2) {
959
959
  this.selectedRangeDates = [...rangeInput]
960
- this.customRangeSelected = [...rangeInput]
960
+ this.customRangeSelected = true
961
961
  }
962
962
  rangeInput.forEach((r, i) => {
963
963
  if (i > 0) {
@@ -984,12 +984,14 @@ class WebsyDatePicker {
984
984
  if (this.options.ranges[this.options.mode][i].range.length === 1) {
985
985
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0]) {
986
986
  this.selectedRange = i
987
+ this.customRangeSelected = false
987
988
  break
988
989
  }
989
990
  }
990
991
  else if (this.options.ranges[this.options.mode][i].range.length === 2) {
991
992
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0] && this.options.ranges[this.options.mode][i].range[1] === rangeInput[1]) {
992
993
  this.selectedRange = i
994
+ this.customRangeSelected = false
993
995
  break
994
996
  }
995
997
  }
@@ -3680,7 +3682,7 @@ const WebsyUtils = {
3680
3682
  }
3681
3683
  else if (backgroundColor.toLowerCase().indexOf('rgb') !== -1) {
3682
3684
  // rgb color
3683
- colorParts = backgroundColor
3685
+ colorParts = backgroundColor.replace(/rgb\(/gi, '').replace(/\)/gi, '')
3684
3686
  colorParts = colorParts.split(',')
3685
3687
  red = colorParts[0]
3686
3688
  green = colorParts[1]
@@ -1061,10 +1061,10 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1061
1061
 
1062
1062
  if (rangeInput.length === 1) {
1063
1063
  this.selectedRangeDates = _toConsumableArray(rangeInput);
1064
- this.customRangeSelected = _toConsumableArray(rangeInput);
1064
+ this.customRangeSelected = true;
1065
1065
  } else if (rangeInput.length === 2) {
1066
1066
  this.selectedRangeDates = _toConsumableArray(rangeInput);
1067
- this.customRangeSelected = _toConsumableArray(rangeInput);
1067
+ this.customRangeSelected = true;
1068
1068
  }
1069
1069
 
1070
1070
  rangeInput.forEach(function (r, i) {
@@ -1094,11 +1094,13 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1094
1094
  if (this.options.ranges[this.options.mode][i].range.length === 1) {
1095
1095
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0]) {
1096
1096
  this.selectedRange = i;
1097
+ this.customRangeSelected = false;
1097
1098
  break;
1098
1099
  }
1099
1100
  } else if (this.options.ranges[this.options.mode][i].range.length === 2) {
1100
1101
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0] && this.options.ranges[this.options.mode][i].range[1] === rangeInput[1]) {
1101
1102
  this.selectedRange = i;
1103
+ this.customRangeSelected = false;
1102
1104
  break;
1103
1105
  }
1104
1106
  }
@@ -4153,7 +4155,7 @@ var WebsyUtils = {
4153
4155
  blue = parseInt(colorParts[4] + colorParts[5], 16);
4154
4156
  } else if (backgroundColor.toLowerCase().indexOf('rgb') !== -1) {
4155
4157
  // rgb color
4156
- colorParts = backgroundColor;
4158
+ colorParts = backgroundColor.replace(/rgb\(/gi, '').replace(/\)/gi, '');
4157
4159
  colorParts = colorParts.split(',');
4158
4160
  red = colorParts[0];
4159
4161
  green = colorParts[1];