@bonlineza/luxity-lib 2.36.1-beta.1 → 2.36.1-beta.3

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 (90) hide show
  1. package/Accordion.js +76 -116
  2. package/AddInterest.js +440 -777
  3. package/AddProductInterest.js +485 -644
  4. package/BrandSelector.js +176 -336
  5. package/Checkbox.js +68 -101
  6. package/CheckboxButton.js +79 -124
  7. package/CommunicationPreferenceOptionsRenderer.js +159 -169
  8. package/CommunicationPreferenceSection.js +166 -178
  9. package/CommunicationPreferences.js +549 -427
  10. package/ConditionSelector.js +174 -336
  11. package/CountryCodeSelect.js +7 -10
  12. package/CurrencyInputFormatter.js +29 -56
  13. package/CurrencySelect.js +23 -49
  14. package/DropdownSelector.js +68 -92
  15. package/GALink.js +6 -16
  16. package/GenderSelector.js +88 -142
  17. package/GraphQLDropdownSelector.js +933 -1511
  18. package/GraphQLMultiSelector.js +141 -274
  19. package/IconHeader.js +11 -25
  20. package/IconWrapper.js +3 -7
  21. package/InterestCatSelector.js +34 -74
  22. package/InterestItem.js +103 -187
  23. package/Interests.js +922 -1471
  24. package/InterestsSubheading.js +5 -10
  25. package/InvertedTextButton.js +27 -63
  26. package/LuxityAppSideNav.js +18 -21
  27. package/LuxityDesktopHeader.js +219 -274
  28. package/LuxityFooter.js +430 -321
  29. package/LuxityGraphQLDropdownSelector.js +949 -1543
  30. package/LuxityGraphQLMultiselector.js +167 -321
  31. package/LuxityMobileHeader.js +251 -342
  32. package/LuxityPageReady.js +74 -136
  33. package/LuxityProductInterestItem.js +97 -175
  34. package/LuxitySideNav.js +165 -215
  35. package/MaterialSelector.js +956 -1551
  36. package/ModelSelector.js +956 -1551
  37. package/NotificationDropDown.js +122 -221
  38. package/Notify.js +0 -1
  39. package/OutlinePrimaryButton.js +26 -58
  40. package/PriceRangeSelector.js +168 -281
  41. package/PrimaryButton.js +26 -58
  42. package/RadioButtons.js +114 -140
  43. package/RangeSlider.js +152 -242
  44. package/RareStepFooter.js +27 -41
  45. package/RareStepHeader.js +139 -190
  46. package/ReactSelectWrapper.js +0 -1
  47. package/SecondaryButton.js +26 -58
  48. package/ShoeSizeRangeSelector.js +162 -260
  49. package/ShoeSizeSelector.js +158 -263
  50. package/SimpleErrorBoundary.js +59 -106
  51. package/StyleSelector.js +176 -336
  52. package/TextButton.js +26 -58
  53. package/Tooltip.js +17 -39
  54. package/Tracking.js +0 -1
  55. package/WrapperButton.js +20 -43
  56. package/build/bundle.css +1 -1
  57. package/build/bundle.js +1834 -2387
  58. package/package.json +3 -2
  59. package/svg/Accessories.js +6 -13
  60. package/svg/Account.js +6 -13
  61. package/svg/Add.js +6 -13
  62. package/svg/ArrowRight.js +6 -13
  63. package/svg/Bags.js +6 -13
  64. package/svg/BurgerMenu.js +6 -13
  65. package/svg/Calendar.js +6 -13
  66. package/svg/CalendarCircled.js +6 -13
  67. package/svg/CheckCircled.js +6 -13
  68. package/svg/Close.js +6 -13
  69. package/svg/Clothing.js +6 -13
  70. package/svg/Dot.js +6 -13
  71. package/svg/Edit.js +6 -13
  72. package/svg/Eye.js +6 -13
  73. package/svg/FileAttach.js +6 -13
  74. package/svg/FileAttachCircled.js +6 -13
  75. package/svg/LightBulb.js +6 -13
  76. package/svg/Logo.js +6 -13
  77. package/svg/LuxityMenu.js +6 -13
  78. package/svg/Minus.js +6 -13
  79. package/svg/MobileAvatar.js +6 -13
  80. package/svg/MyOrder.js +6 -13
  81. package/svg/MyPayment.js +6 -13
  82. package/svg/MyProfile.js +8 -14
  83. package/svg/MySale.js +6 -13
  84. package/svg/Notification.js +6 -13
  85. package/svg/PointerDown.js +6 -13
  86. package/svg/Search.js +6 -13
  87. package/svg/Shoes.js +6 -13
  88. package/svg/SvgWrapper.js +3 -7
  89. package/svg/Trash.js +6 -13
  90. package/svg/Watches.js +6 -13
@@ -14,183 +14,121 @@
14
14
  PageReady = PageReady && Object.prototype.hasOwnProperty.call(PageReady, 'default') ? PageReady['default'] : PageReady;
15
15
  var Notifications__default = 'default' in Notifications ? Notifications['default'] : Notifications;
16
16
 
17
- function ownKeys(object, enumerableOnly) {
18
- var keys = Object.keys(object);
19
-
20
- if (Object.getOwnPropertySymbols) {
21
- var symbols = Object.getOwnPropertySymbols(object);
22
- enumerableOnly && (symbols = symbols.filter(function (sym) {
23
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
24
- })), keys.push.apply(keys, symbols);
25
- }
26
-
27
- return keys;
17
+ function _assertThisInitialized(e) {
18
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
19
+ return e;
28
20
  }
29
-
30
- function _objectSpread2(target) {
31
- for (var i = 1; i < arguments.length; i++) {
32
- var source = null != arguments[i] ? arguments[i] : {};
33
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
34
- _defineProperty(target, key, source[key]);
35
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
- });
38
- }
39
-
40
- return target;
21
+ function _callSuper(t, o, e) {
22
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
41
23
  }
42
-
43
- function _classCallCheck(instance, Constructor) {
44
- if (!(instance instanceof Constructor)) {
45
- throw new TypeError("Cannot call a class as a function");
46
- }
24
+ function _classCallCheck(a, n) {
25
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
47
26
  }
48
-
49
- function _defineProperties(target, props) {
50
- for (var i = 0; i < props.length; i++) {
51
- var descriptor = props[i];
52
- descriptor.enumerable = descriptor.enumerable || false;
53
- descriptor.configurable = true;
54
- if ("value" in descriptor) descriptor.writable = true;
55
- Object.defineProperty(target, descriptor.key, descriptor);
27
+ function _defineProperties(e, r) {
28
+ for (var t = 0; t < r.length; t++) {
29
+ var o = r[t];
30
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
56
31
  }
57
32
  }
58
-
59
- function _createClass(Constructor, protoProps, staticProps) {
60
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
61
- if (staticProps) _defineProperties(Constructor, staticProps);
62
- Object.defineProperty(Constructor, "prototype", {
63
- writable: false
64
- });
65
- return Constructor;
33
+ function _createClass(e, r, t) {
34
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
35
+ writable: !1
36
+ }), e;
66
37
  }
67
-
68
- function _defineProperty(obj, key, value) {
69
- if (key in obj) {
70
- Object.defineProperty(obj, key, {
71
- value: value,
72
- enumerable: true,
73
- configurable: true,
74
- writable: true
75
- });
76
- } else {
77
- obj[key] = value;
78
- }
79
-
80
- return obj;
38
+ function _defineProperty(e, r, t) {
39
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
40
+ value: t,
41
+ enumerable: !0,
42
+ configurable: !0,
43
+ writable: !0
44
+ }) : e[r] = t, e;
81
45
  }
82
-
83
46
  function _extends() {
84
- _extends = Object.assign ? Object.assign.bind() : function (target) {
85
- for (var i = 1; i < arguments.length; i++) {
86
- var source = arguments[i];
87
-
88
- for (var key in source) {
89
- if (Object.prototype.hasOwnProperty.call(source, key)) {
90
- target[key] = source[key];
91
- }
92
- }
47
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
48
+ for (var e = 1; e < arguments.length; e++) {
49
+ var t = arguments[e];
50
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
93
51
  }
94
-
95
- return target;
96
- };
97
- return _extends.apply(this, arguments);
52
+ return n;
53
+ }, _extends.apply(null, arguments);
98
54
  }
99
-
100
- function _inherits(subClass, superClass) {
101
- if (typeof superClass !== "function" && superClass !== null) {
102
- throw new TypeError("Super expression must either be null or a function");
103
- }
104
-
105
- subClass.prototype = Object.create(superClass && superClass.prototype, {
55
+ function _getPrototypeOf(t) {
56
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
57
+ return t.__proto__ || Object.getPrototypeOf(t);
58
+ }, _getPrototypeOf(t);
59
+ }
60
+ function _inherits(t, e) {
61
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
62
+ t.prototype = Object.create(e && e.prototype, {
106
63
  constructor: {
107
- value: subClass,
108
- writable: true,
109
- configurable: true
64
+ value: t,
65
+ writable: !0,
66
+ configurable: !0
110
67
  }
111
- });
112
- Object.defineProperty(subClass, "prototype", {
113
- writable: false
114
- });
115
- if (superClass) _setPrototypeOf(subClass, superClass);
116
- }
117
-
118
- function _getPrototypeOf(o) {
119
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
120
- return o.__proto__ || Object.getPrototypeOf(o);
121
- };
122
- return _getPrototypeOf(o);
68
+ }), Object.defineProperty(t, "prototype", {
69
+ writable: !1
70
+ }), e && _setPrototypeOf(t, e);
123
71
  }
124
-
125
- function _setPrototypeOf(o, p) {
126
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
127
- o.__proto__ = p;
128
- return o;
129
- };
130
- return _setPrototypeOf(o, p);
131
- }
132
-
133
72
  function _isNativeReflectConstruct() {
134
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
135
- if (Reflect.construct.sham) return false;
136
- if (typeof Proxy === "function") return true;
137
-
138
73
  try {
139
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
140
- return true;
141
- } catch (e) {
142
- return false;
143
- }
74
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
75
+ } catch (t) {}
76
+ return (_isNativeReflectConstruct = function () {
77
+ return !!t;
78
+ })();
144
79
  }
145
-
146
- function _assertThisInitialized(self) {
147
- if (self === void 0) {
148
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
80
+ function ownKeys(e, r) {
81
+ var t = Object.keys(e);
82
+ if (Object.getOwnPropertySymbols) {
83
+ var o = Object.getOwnPropertySymbols(e);
84
+ r && (o = o.filter(function (r) {
85
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
86
+ })), t.push.apply(t, o);
149
87
  }
150
-
151
- return self;
88
+ return t;
152
89
  }
153
-
154
- function _possibleConstructorReturn(self, call) {
155
- if (call && (typeof call === "object" || typeof call === "function")) {
156
- return call;
157
- } else if (call !== void 0) {
158
- throw new TypeError("Derived constructors may only return object or undefined");
90
+ function _objectSpread2(e) {
91
+ for (var r = 1; r < arguments.length; r++) {
92
+ var t = null != arguments[r] ? arguments[r] : {};
93
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
94
+ _defineProperty(e, r, t[r]);
95
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
96
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
97
+ });
159
98
  }
160
-
161
- return _assertThisInitialized(self);
99
+ return e;
162
100
  }
163
-
164
- function _createSuper(Derived) {
165
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
166
-
167
- return function _createSuperInternal() {
168
- var Super = _getPrototypeOf(Derived),
169
- result;
170
-
171
- if (hasNativeReflectConstruct) {
172
- var NewTarget = _getPrototypeOf(this).constructor;
173
-
174
- result = Reflect.construct(Super, arguments, NewTarget);
175
- } else {
176
- result = Super.apply(this, arguments);
177
- }
178
-
179
- return _possibleConstructorReturn(this, result);
180
- };
101
+ function _possibleConstructorReturn(t, e) {
102
+ if (e && ("object" == typeof e || "function" == typeof e)) return e;
103
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
104
+ return _assertThisInitialized(t);
181
105
  }
182
-
183
- function _taggedTemplateLiteral(strings, raw) {
184
- if (!raw) {
185
- raw = strings.slice(0);
186
- }
187
-
188
- return Object.freeze(Object.defineProperties(strings, {
106
+ function _setPrototypeOf(t, e) {
107
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
108
+ return t.__proto__ = e, t;
109
+ }, _setPrototypeOf(t, e);
110
+ }
111
+ function _taggedTemplateLiteral(e, t) {
112
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
189
113
  raw: {
190
- value: Object.freeze(raw)
114
+ value: Object.freeze(t)
191
115
  }
192
116
  }));
193
117
  }
118
+ function _toPrimitive(t, r) {
119
+ if ("object" != typeof t || !t) return t;
120
+ var e = t[Symbol.toPrimitive];
121
+ if (void 0 !== e) {
122
+ var i = e.call(t, r || "default");
123
+ if ("object" != typeof i) return i;
124
+ throw new TypeError("@@toPrimitive must return a primitive value.");
125
+ }
126
+ return ("string" === r ? String : Number)(t);
127
+ }
128
+ function _toPropertyKey(t) {
129
+ var i = _toPrimitive(t, "string");
130
+ return "symbol" == typeof i ? i : i + "";
131
+ }
194
132
 
195
133
  var safeIsNaN = Number.isNaN ||
196
134
  function ponyfill(value) {
@@ -6783,50 +6721,39 @@
6783
6721
  var LuxityPageReadyContext = /*#__PURE__*/React__default.createContext({
6784
6722
  data: null
6785
6723
  });
6724
+
6786
6725
  /**
6787
6726
  * A flavour of PageReady with Luxity customisations
6788
6727
  * 1. the onIsLoading callback is useful to parent components that have more complex data interactions
6789
6728
  * 2. an error message interpreter is supplied from the local helper library
6790
6729
  */
6791
-
6792
6730
  var LuxityPageReady = /*#__PURE__*/function (_React$Component) {
6793
- _inherits(LuxityPageReady, _React$Component);
6794
-
6795
- var _super = _createSuper(LuxityPageReady);
6796
-
6797
6731
  function LuxityPageReady() {
6798
6732
  var _this;
6799
-
6800
6733
  _classCallCheck(this, LuxityPageReady);
6801
-
6802
6734
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6803
6735
  args[_key] = arguments[_key];
6804
6736
  }
6805
-
6806
- _this = _super.call.apply(_super, [this].concat(args));
6807
-
6808
- _defineProperty(_assertThisInitialized(_this), "state", {
6737
+ _this = _callSuper(this, LuxityPageReady, [].concat(args));
6738
+ _defineProperty(_this, "state", {
6809
6739
  data: null
6810
6740
  });
6811
-
6812
- _defineProperty(_assertThisInitialized(_this), "refreshPage", function () {
6741
+ _defineProperty(_this, "refreshPage", function () {
6813
6742
  return _this.pageReadyInstance.initRequest();
6814
6743
  });
6815
-
6816
6744
  return _this;
6817
6745
  }
6818
-
6819
- _createClass(LuxityPageReady, [{
6746
+ _inherits(LuxityPageReady, _React$Component);
6747
+ return _createClass(LuxityPageReady, [{
6820
6748
  key: "render",
6821
6749
  value: function render() {
6822
6750
  var _this2 = this;
6823
-
6824
6751
  var _this$props = this.props,
6825
- customErrorMessage = _this$props.customErrorMessage,
6826
- customErrorHandler = _this$props.customErrorHandler,
6827
- getRequestPromise = _this$props.getRequestPromise,
6828
- _onData = _this$props.onData,
6829
- children = _this$props.children;
6752
+ customErrorMessage = _this$props.customErrorMessage,
6753
+ customErrorHandler = _this$props.customErrorHandler,
6754
+ getRequestPromise = _this$props.getRequestPromise,
6755
+ _onData = _this$props.onData,
6756
+ children = _this$props.children;
6830
6757
  var data = this.state.data;
6831
6758
  return /*#__PURE__*/React__default.createElement(PageReady, {
6832
6759
  ref: function ref(inst) {
@@ -6836,19 +6763,15 @@
6836
6763
  _this2.setState({
6837
6764
  data: res.data
6838
6765
  });
6839
-
6840
6766
  _onData(res);
6841
6767
  },
6842
6768
  getRequestInstance: function getRequestInstance() {
6843
6769
  _this2.props.onIsLoading(true);
6844
-
6845
6770
  return getRequestPromise().then(function (out) {
6846
6771
  _this2.props.onIsLoading(false);
6847
-
6848
6772
  return out;
6849
6773
  }).catch(function (oops) {
6850
6774
  _this2.props.onIsLoading(false);
6851
-
6852
6775
  return oops;
6853
6776
  });
6854
6777
  },
@@ -6865,10 +6788,7 @@
6865
6788
  }, children));
6866
6789
  }
6867
6790
  }]);
6868
-
6869
- return LuxityPageReady;
6870
6791
  }(React__default.Component);
6871
-
6872
6792
  LuxityPageReady.defaultProps = {
6873
6793
  onIsLoading: function onIsLoading() {
6874
6794
  return null;
@@ -6892,12 +6812,12 @@
6892
6812
  /**
6893
6813
  * It represents the React Component that contains the notifications.
6894
6814
  * */
6895
-
6896
6815
  var LuxityNotifications = function LuxityNotifications(props) {
6897
6816
  return /*#__PURE__*/React__default.createElement(Notifications__default, props);
6898
6817
  };
6899
6818
 
6900
6819
  /** @format */
6820
+
6901
6821
  var request = {
6902
6822
  fetching: false,
6903
6823
  failed: false,
@@ -6970,31 +6890,20 @@
6970
6890
  });
6971
6891
 
6972
6892
  var NotificationDropDown = /*#__PURE__*/function (_React$Component) {
6973
- _inherits(NotificationDropDown, _React$Component);
6974
-
6975
- var _super = _createSuper(NotificationDropDown);
6976
-
6977
6893
  function NotificationDropDown(props) {
6978
6894
  var _this;
6979
-
6980
6895
  _classCallCheck(this, NotificationDropDown);
6981
-
6982
- _this = _super.call(this, props);
6983
-
6984
- _defineProperty(_assertThisInitialized(_this), "postUpdate", function (selectedOption, type) {
6896
+ _this = _callSuper(this, NotificationDropDown, [props]);
6897
+ _defineProperty(_this, "postUpdate", function (selectedOption, type) {
6985
6898
  _this.setState({
6986
6899
  request: _objectSpread2(_objectSpread2({}, request), {}, {
6987
6900
  fetching: true
6988
6901
  })
6989
6902
  });
6990
-
6991
6903
  _this.props.setSchedule(selectedOption.value, type).then(function () {
6992
- var _this$setState;
6993
-
6994
- _this.setState((_this$setState = {}, _defineProperty(_this$setState, type === 'EMAIL' ? 'emailSelectedOption' : 'whatsappSelectedOption', selectedOption), _defineProperty(_this$setState, "request", _objectSpread2(_objectSpread2({}, request), {}, {
6904
+ _this.setState(_defineProperty(_defineProperty({}, type === 'EMAIL' ? 'emailSelectedOption' : 'whatsappSelectedOption', selectedOption), "request", _objectSpread2(_objectSpread2({}, request), {}, {
6995
6905
  success: true
6996
- })), _this$setState));
6997
-
6906
+ })));
6998
6907
  success("".concat(type === 'EMAIL' ? 'Email' : 'WhatsApp', " Notification Frequency Updated"));
6999
6908
  }).catch(function () {
7000
6909
  _this.setState({
@@ -7002,12 +6911,10 @@
7002
6911
  failed: true
7003
6912
  })
7004
6913
  });
7005
-
7006
6914
  error('Error Occurred');
7007
6915
  });
7008
6916
  });
7009
-
7010
- _defineProperty(_assertThisInitialized(_this), "getOptionsFromEnumResult", function (enumResult) {
6917
+ _defineProperty(_this, "getOptionsFromEnumResult", function (enumResult) {
7011
6918
  var enumValues = enumResult.data.__type.enumValues;
7012
6919
  return enumValues.map(function (enumItem) {
7013
6920
  return {
@@ -7016,20 +6923,17 @@
7016
6923
  };
7017
6924
  });
7018
6925
  });
7019
-
7020
- _defineProperty(_assertThisInitialized(_this), "onData", function (_ref) {
6926
+ _defineProperty(_this, "onData", function (_ref) {
7021
6927
  var data = _ref.data;
7022
-
7023
6928
  var options = _this.getOptionsFromEnumResult(data);
7024
-
7025
6929
  var _data$data$user = data.data.user,
7026
- email_interest_send_schedule = _data$data$user.email_interest_send_schedule,
7027
- whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule,
7028
- vip = _data$data$user.vip;
7029
-
6930
+ email_interest_send_schedule = _data$data$user.email_interest_send_schedule,
6931
+ whatsapp_interest_send_schedule = _data$data$user.whatsapp_interest_send_schedule,
6932
+ is_early_access = _data$data$user.is_early_access,
6933
+ is_exclusive = _data$data$user.is_exclusive;
7030
6934
  _this.setState({
7031
6935
  options: options,
7032
- isVip: vip,
6936
+ canReceiveWhatsAppNotifications: is_early_access || is_exclusive,
7033
6937
  emailSelectedOption: options.find(function (item) {
7034
6938
  return item.value === email_interest_send_schedule;
7035
6939
  }),
@@ -7038,14 +6942,13 @@
7038
6942
  })
7039
6943
  });
7040
6944
  });
7041
-
7042
- _defineProperty(_assertThisInitialized(_this), "render", function () {
6945
+ _defineProperty(_this, "render", function () {
7043
6946
  var _this$state = _this.state,
7044
- options = _this$state.options,
7045
- emailSelectedOption = _this$state.emailSelectedOption,
7046
- whatsappSelectedOption = _this$state.whatsappSelectedOption,
7047
- isVip = _this$state.isVip,
7048
- updating = _this$state.request.fetching;
6947
+ options = _this$state.options,
6948
+ emailSelectedOption = _this$state.emailSelectedOption,
6949
+ whatsappSelectedOption = _this$state.whatsappSelectedOption,
6950
+ canReceiveWhatsAppNotifications = _this$state.canReceiveWhatsAppNotifications,
6951
+ updating = _this$state.request.fetching;
7049
6952
  return /*#__PURE__*/React__default.createElement(NotifyContainer, null, /*#__PURE__*/React__default.createElement(LuxityNotifications, null), /*#__PURE__*/React__default.createElement(LuxityPageReady, {
7050
6953
  getRequestPromise: _this.props.getSchedule,
7051
6954
  onData: function onData(data) {
@@ -7053,7 +6956,7 @@
7053
6956
  }
7054
6957
  }, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7055
6958
  className: "notification-settings"
7056
- }, isVip && /*#__PURE__*/React__default.createElement("div", {
6959
+ }, canReceiveWhatsAppNotifications && /*#__PURE__*/React__default.createElement("div", {
7057
6960
  className: "notification-row-wrapper"
7058
6961
  }, /*#__PURE__*/React__default.createElement("div", {
7059
6962
  className: "notification-dropdown-label"
@@ -7093,20 +6996,18 @@
7093
6996
  value: emailSelectedOption
7094
6997
  }))))));
7095
6998
  });
7096
-
7097
6999
  _this.state = {
7098
7000
  options: [],
7099
7001
  emailSelectedOption: null,
7100
7002
  whatsappSelectedOption: null,
7101
- isVip: false,
7003
+ canReceiveWhatsAppNotifications: false,
7102
7004
  request: _objectSpread2({}, request)
7103
7005
  };
7104
7006
  return _this;
7105
7007
  }
7106
-
7008
+ _inherits(NotificationDropDown, _React$Component);
7107
7009
  return _createClass(NotificationDropDown);
7108
7010
  }(React__default.Component);
7109
-
7110
7011
  var index$2 = themed(NotificationDropDown);
7111
7012
 
7112
7013
  return index$2;
package/Notify.js CHANGED
@@ -20,7 +20,6 @@
20
20
  /**
21
21
  * It represents the React Component that contains the notifications.
22
22
  * */
23
-
24
23
  var LuxityNotifications = function LuxityNotifications(props) {
25
24
  return /*#__PURE__*/React.createElement(Notifications__default, props);
26
25
  };
@@ -8,66 +8,38 @@
8
8
  var styled__default = 'default' in styled ? styled['default'] : styled;
9
9
 
10
10
  function _extends() {
11
- _extends = Object.assign ? Object.assign.bind() : function (target) {
12
- for (var i = 1; i < arguments.length; i++) {
13
- var source = arguments[i];
14
-
15
- for (var key in source) {
16
- if (Object.prototype.hasOwnProperty.call(source, key)) {
17
- target[key] = source[key];
18
- }
19
- }
11
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
12
+ for (var e = 1; e < arguments.length; e++) {
13
+ var t = arguments[e];
14
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
20
15
  }
21
-
22
- return target;
23
- };
24
- return _extends.apply(this, arguments);
16
+ return n;
17
+ }, _extends.apply(null, arguments);
25
18
  }
26
-
27
- function _objectWithoutPropertiesLoose(source, excluded) {
28
- if (source == null) return {};
29
- var target = {};
30
- var sourceKeys = Object.keys(source);
31
- var key, i;
32
-
33
- for (i = 0; i < sourceKeys.length; i++) {
34
- key = sourceKeys[i];
35
- if (excluded.indexOf(key) >= 0) continue;
36
- target[key] = source[key];
37
- }
38
-
39
- return target;
40
- }
41
-
42
- function _objectWithoutProperties(source, excluded) {
43
- if (source == null) return {};
44
-
45
- var target = _objectWithoutPropertiesLoose(source, excluded);
46
-
47
- var key, i;
48
-
19
+ function _objectWithoutProperties(e, t) {
20
+ if (null == e) return {};
21
+ var o,
22
+ r,
23
+ i = _objectWithoutPropertiesLoose(e, t);
49
24
  if (Object.getOwnPropertySymbols) {
50
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
51
-
52
- for (i = 0; i < sourceSymbolKeys.length; i++) {
53
- key = sourceSymbolKeys[i];
54
- if (excluded.indexOf(key) >= 0) continue;
55
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
56
- target[key] = source[key];
57
- }
25
+ var n = Object.getOwnPropertySymbols(e);
26
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
58
27
  }
59
-
60
- return target;
28
+ return i;
61
29
  }
62
-
63
- function _taggedTemplateLiteral(strings, raw) {
64
- if (!raw) {
65
- raw = strings.slice(0);
30
+ function _objectWithoutPropertiesLoose(r, e) {
31
+ if (null == r) return {};
32
+ var t = {};
33
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
34
+ if (-1 !== e.indexOf(n)) continue;
35
+ t[n] = r[n];
66
36
  }
67
-
68
- return Object.freeze(Object.defineProperties(strings, {
37
+ return t;
38
+ }
39
+ function _taggedTemplateLiteral(e, t) {
40
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
69
41
  raw: {
70
- value: Object.freeze(raw)
42
+ value: Object.freeze(t)
71
43
  }
72
44
  }));
73
45
  }
@@ -141,7 +113,6 @@
141
113
  });
142
114
 
143
115
  var _excluded = ["children"];
144
-
145
116
  var _templateObject$1;
146
117
  var Button = styled__default.button(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n border: 1px solid ", ";\n color: ", ";\n background-color: transparent;\n &:active,\n &:hover {\n background-color: ", ";\n color: #ffff;\n }\n &:disabled {\n ", "\n &:hover {\n color: ", ";\n background-color: transparent;\n }\n }\n"])), baseButtonStyle, function (props) {
147
118
  return props.theme.colors.primary;
@@ -152,14 +123,11 @@
152
123
  }, disabledButtonStyle, function (props) {
153
124
  return props.theme.colors.primary;
154
125
  });
155
-
156
126
  var OutlinePrimaryButton = function OutlinePrimaryButton(_ref) {
157
127
  var children = _ref.children,
158
- restProps = _objectWithoutProperties(_ref, _excluded);
159
-
128
+ restProps = _objectWithoutProperties(_ref, _excluded);
160
129
  return /*#__PURE__*/React__default.createElement(Button, restProps, children);
161
130
  };
162
-
163
131
  var index = themed(OutlinePrimaryButton);
164
132
 
165
133
  return index;