@ably/ui 5.0.1-dev.baf5b97.0 → 5.3.0-dev.3c981a4

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 (176) hide show
  1. package/core/.gitignore +1 -0
  2. package/core/Code/component.css +70 -0
  3. package/core/Code/component.js +1 -0
  4. package/core/Code.jsx +7578 -0
  5. package/core/ConnectStateWrapper/component.js +1 -0
  6. package/core/ConnectStateWrapper.jsx +213 -0
  7. package/core/ContactFooter/component.css +12 -0
  8. package/core/ContactFooter/component.js +1 -0
  9. package/core/ContactFooter.jsx +448 -0
  10. package/core/CookieMessage/component.css +14 -0
  11. package/core/CookieMessage/component.js +1 -0
  12. package/core/CookieMessage.jsx +476 -0
  13. package/core/CustomerLogos/component.js +1 -0
  14. package/core/CustomerLogos.jsx +246 -0
  15. package/core/FeatureFooter/component.css +13 -0
  16. package/core/FeatureFooter/component.js +1 -0
  17. package/core/FeatureFooter.jsx +17 -0
  18. package/core/FeaturedLink/component.css +16 -0
  19. package/core/FeaturedLink/component.js +1 -0
  20. package/core/FeaturedLink.jsx +307 -0
  21. package/core/Flash/component.css +30 -0
  22. package/core/Flash/component.js +1 -0
  23. package/core/Flash.jsx +2002 -0
  24. package/core/Footer/component.css +14 -0
  25. package/core/Footer/component.js +1 -0
  26. package/core/Footer.jsx +593 -0
  27. package/core/Icon/component.css +1 -0
  28. package/core/Icon/component.js +1 -0
  29. package/core/Icon.jsx +257 -0
  30. package/core/Logo/component.js +1 -0
  31. package/core/Logo.jsx +302 -0
  32. package/core/Meganav/component.css +103 -0
  33. package/core/Meganav/component.js +1 -0
  34. package/core/Meganav/component.json +37 -0
  35. package/core/Meganav.jsx +6514 -0
  36. package/core/MeganavBlogPostsList/component.js +1 -0
  37. package/core/MeganavBlogPostsList.jsx +360 -0
  38. package/core/MeganavContentDevelopers/component.js +1 -0
  39. package/core/MeganavContentDevelopers.jsx +418 -0
  40. package/core/MeganavContentPlatform/component.js +1 -0
  41. package/core/MeganavContentPlatform.jsx +440 -0
  42. package/core/MeganavContentUseCases/component.js +1 -0
  43. package/core/MeganavContentUseCases.jsx +309 -0
  44. package/core/MeganavContentWhyAbly/component.js +1 -0
  45. package/core/MeganavContentWhyAbly.jsx +1471 -0
  46. package/core/MeganavControl/component.js +1 -0
  47. package/core/MeganavControl.jsx +301 -0
  48. package/core/MeganavControlMobileDropdown/component.js +1 -0
  49. package/core/MeganavControlMobileDropdown.jsx +303 -0
  50. package/core/MeganavControlMobilePanelClose/component.js +1 -0
  51. package/core/MeganavControlMobilePanelClose.jsx +301 -0
  52. package/core/MeganavControlMobilePanelOpen/component.js +1 -0
  53. package/core/MeganavControlMobilePanelOpen.jsx +299 -0
  54. package/core/MeganavItemsDesktop/component.js +1 -0
  55. package/core/MeganavItemsDesktop.jsx +377 -0
  56. package/core/MeganavItemsMobile/component.js +1 -0
  57. package/core/MeganavItemsMobile.jsx +581 -0
  58. package/core/MeganavItemsSignedIn/component.js +1 -0
  59. package/core/MeganavItemsSignedIn.jsx +461 -0
  60. package/core/Notice/component.css +8 -0
  61. package/core/Notice/component.js +2 -0
  62. package/core/Notice/component.js.LICENSE.txt +9 -0
  63. package/core/Notice.jsx +2915 -0
  64. package/core/Showcase/component.css +31 -0
  65. package/core/Showcase/component.js +1 -0
  66. package/core/Showcase.jsx +17 -0
  67. package/core/SignOutLink/component.js +1 -0
  68. package/core/SignOutLink.jsx +262 -0
  69. package/core/Slider/component.css +9 -0
  70. package/core/Slider/component.js +1 -0
  71. package/core/Slider.jsx +957 -0
  72. package/core/Test/component.js +59 -0
  73. package/core/Test.jsx +4 -0
  74. package/core/Uptime/component.css +129 -0
  75. package/core/Uptime/component.js +1 -0
  76. package/core/Uptime.jsx +1373 -0
  77. package/core/core.base.css +1 -0
  78. package/core/core.components.css +49 -0
  79. package/core/fonts/.DS_Store +0 -0
  80. package/core/fonts/NEXT-Book-Light-Italic.eot +0 -0
  81. package/core/fonts/NEXT-Book-Light-Italic.otf +0 -0
  82. package/core/fonts/NEXT-Book-Light-Italic.woff +0 -0
  83. package/core/fonts/NEXT-Book-Light-Italic.woff2 +0 -0
  84. package/core/fonts/NEXT-Book-Light.eot +0 -0
  85. package/core/fonts/NEXT-Book-Light.otf +0 -0
  86. package/core/fonts/NEXT-Book-Light.woff +0 -0
  87. package/core/fonts/NEXT-Book-Light.woff2 +0 -0
  88. package/core/fonts/NEXT-Book-Medium-Italic.eot +0 -0
  89. package/core/fonts/NEXT-Book-Medium-Italic.otf +0 -0
  90. package/core/fonts/NEXT-Book-Medium-Italic.woff +0 -0
  91. package/core/fonts/NEXT-Book-Medium-Italic.woff2 +0 -0
  92. package/core/fonts/NEXT-Book-Medium.eot +0 -0
  93. package/core/fonts/NEXT-Book-Medium.otf +0 -0
  94. package/core/fonts/NEXT-Book-Medium.woff +0 -0
  95. package/core/fonts/NEXT-Book-Medium.woff2 +0 -0
  96. package/core/fonts/next.css +59 -0
  97. package/core/images/.DS_Store +0 -0
  98. package/core/images/ably-logo.svg +15 -0
  99. package/core/images/ably-stack.svg +14 -0
  100. package/core/images/blog-thumb1.jpg +0 -0
  101. package/core/images/blog-thumb2.jpg +0 -0
  102. package/core/images/blog-thumb3.jpg +0 -0
  103. package/core/images/cust-logo-ao-col-pos.png +0 -0
  104. package/core/images/cust-logo-ao-col-pos@2x.png +0 -0
  105. package/core/images/cust-logo-ausopen-col-pos.png +0 -0
  106. package/core/images/cust-logo-ausopen-col-pos@2x.png +0 -0
  107. package/core/images/cust-logo-ausopen-mono-pos.svg +5 -0
  108. package/core/images/cust-logo-bloomberg-mono-pos.svg +11 -0
  109. package/core/images/cust-logo-hopin-mono-pos.svg +4 -0
  110. package/core/images/cust-logo-hubspot-col-pos.png +0 -0
  111. package/core/images/cust-logo-hubspot-col-pos@2x.png +0 -0
  112. package/core/images/cust-logo-hubspot-mono-pos.svg +4 -0
  113. package/core/images/cust-logo-lightspeed-col-pos.png +0 -0
  114. package/core/images/cust-logo-lightspeed-col-pos@2x.png +0 -0
  115. package/core/images/cust-logo-lightspeed-syst-col-pos.png +0 -0
  116. package/core/images/cust-logo-lightspeed-syst-col-pos@2x.png +0 -0
  117. package/core/images/cust-logo-split-col-pos.png +0 -0
  118. package/core/images/cust-logo-split-col-pos@2x.png +0 -0
  119. package/core/images/cust-logo-split-mono-pos.svg +9 -0
  120. package/core/images/cust-logo-toyota-mono-pos.svg +18 -0
  121. package/core/images/cust-logo-vitac-col-pos.png +0 -0
  122. package/core/images/cust-logo-vitac-col-pos@2x.png +0 -0
  123. package/core/images/cust-photo-hubspot-max-freiert.jpg +0 -0
  124. package/core/images/cust-photo-split-pato-echague.jpg +0 -0
  125. package/core/images/cust-photo-vitac-joe-antonio.jpg +0 -0
  126. package/core/images/flexible-companies.png +0 -0
  127. package/core/images/rocket-list-2021.png +0 -0
  128. package/core/images/scale-motif-open-empathetic.svg +1 -0
  129. package/core/images/technical-support-01-800x533.jpg +0 -0
  130. package/core/scripts.js +1 -0
  131. package/core/sprites.svg +130 -0
  132. package/core/styles.base.css +1 -0
  133. package/core/styles.components.css +49 -0
  134. package/core/styles.css +560 -0
  135. package/package.json +1 -1
  136. package/preview/log/.keep +0 -0
  137. package/preview/tmp/.keep +0 -0
  138. package/preview/tmp/pids/.keep +0 -0
  139. package/reset/.gitignore +1 -0
  140. package/reset/scripts.js +1 -0
  141. package/reset/styles.css +487 -0
  142. package/src/.DS_Store +0 -0
  143. package/src/core/.DS_Store +0 -0
  144. package/src/core/Code/component.html.erb +3 -3
  145. package/src/core/Code/component.jsx +3 -2
  146. package/src/core/Code/component.rb +2 -1
  147. package/src/core/CustomerLogos/component.html.erb +9 -0
  148. package/src/core/CustomerLogos/component.js +0 -0
  149. package/src/core/CustomerLogos/component.jsx +27 -0
  150. package/src/core/CustomerLogos/component.rb +13 -0
  151. package/src/core/FeaturedLink/component.css +1 -2
  152. package/src/core/FeaturedLink/component.html.erb +1 -1
  153. package/src/core/FeaturedLink/component.rb +3 -1
  154. package/src/core/MeganavItemsSignedIn/component.html.erb +1 -1
  155. package/src/core/MeganavItemsSignedIn/component.jsx +1 -1
  156. package/src/core/Slider/component.html.erb +2 -2
  157. package/src/core/Slider/component.js +2 -2
  158. package/src/core/Slider/component.jsx +2 -2
  159. package/src/core/icons/icon-display-api-keys.svg +3 -0
  160. package/src/core/icons/icon-display-cloud-servers.svg +3 -0
  161. package/src/core/icons/icon-display-map-pin.svg +1 -1
  162. package/src/core/icons/icon-display-servers.svg +3 -0
  163. package/src/core/icons/icon-gui-history.svg +3 -0
  164. package/src/core/icons/icon-gui-refresh.svg +10 -0
  165. package/src/core/images/cust-logo-ausopen-mono-pos.svg +5 -0
  166. package/src/core/images/cust-logo-bloomberg-mono-pos.svg +11 -0
  167. package/src/core/images/cust-logo-hopin-mono-pos.svg +4 -0
  168. package/src/core/images/cust-logo-hubspot-mono-pos.svg +4 -0
  169. package/src/core/images/cust-logo-split-mono-pos.svg +9 -0
  170. package/src/core/images/cust-logo-toyota-mono-pos.svg +18 -0
  171. package/src/core/styles/buttons.css +91 -4
  172. package/src/core/styles/forms.css +50 -0
  173. package/src/core/styles/properties.css +34 -6
  174. package/src/core/styles/text.css +62 -1
  175. package/src/core/styles.components.css +1 -0
  176. package/tailwind.config.js +22 -1
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.ConnectStateWrapper=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,213 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("react")) : factory(root[undefined]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__9281__) {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 3511:
16
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
+
18
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
+ /* harmony export */ "cO": () => (/* binding */ getRemoteDataStore),
20
+ /* harmony export */ "kZ": () => (/* binding */ connectState)
21
+ /* harmony export */ });
22
+ /* unused harmony exports attachStoreToWindow, createRemoteDataStore */
23
+
24
+ var attachStoreToWindow = function attachStoreToWindow(store) {
25
+ window.AblyUi = window.AblyUi || {};
26
+ window.AblyUi.RemoteDataStore = store;
27
+ };
28
+ var getRemoteDataStore = function getRemoteDataStore() {
29
+ if (!window.AblyUi.RemoteDataStore) {
30
+ throw new Error("Remote store was called before one was created");
31
+ }
32
+
33
+ return window.AblyUi.RemoteDataStore;
34
+ };
35
+ var connectState = function connectState(selector, setState) {
36
+ var store = getRemoteDataStore();
37
+ var cachedOldState = selector(store);
38
+ store.subscribe(function () {
39
+ var newState = selector(store); // Do nothing, state is the same
40
+
41
+ if (newState === cachedOldState) {
42
+ return;
43
+ }
44
+
45
+ cachedOldState = newState;
46
+ setState(newState);
47
+ });
48
+ };
49
+ var createRemoteDataStore = function createRemoteDataStore(reducers) {
50
+ return createStore(combineReducers(reducers));
51
+ };
52
+
53
+ /***/ }),
54
+
55
+ /***/ 9281:
56
+ /***/ ((module) => {
57
+
58
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
59
+
60
+ /***/ })
61
+
62
+ /******/ });
63
+ /************************************************************************/
64
+ /******/ // The module cache
65
+ /******/ var __webpack_module_cache__ = {};
66
+ /******/
67
+ /******/ // The require function
68
+ /******/ function __webpack_require__(moduleId) {
69
+ /******/ // Check if module is in cache
70
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
71
+ /******/ if (cachedModule !== undefined) {
72
+ /******/ return cachedModule.exports;
73
+ /******/ }
74
+ /******/ // Create a new module (and put it into the cache)
75
+ /******/ var module = __webpack_module_cache__[moduleId] = {
76
+ /******/ // no module.id needed
77
+ /******/ // no module.loaded needed
78
+ /******/ exports: {}
79
+ /******/ };
80
+ /******/
81
+ /******/ // Execute the module function
82
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
83
+ /******/
84
+ /******/ // Return the exports of the module
85
+ /******/ return module.exports;
86
+ /******/ }
87
+ /******/
88
+ /************************************************************************/
89
+ /******/ /* webpack/runtime/compat get default export */
90
+ /******/ (() => {
91
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
92
+ /******/ __webpack_require__.n = (module) => {
93
+ /******/ var getter = module && module.__esModule ?
94
+ /******/ () => (module['default']) :
95
+ /******/ () => (module);
96
+ /******/ __webpack_require__.d(getter, { a: getter });
97
+ /******/ return getter;
98
+ /******/ };
99
+ /******/ })();
100
+ /******/
101
+ /******/ /* webpack/runtime/define property getters */
102
+ /******/ (() => {
103
+ /******/ // define getter functions for harmony exports
104
+ /******/ __webpack_require__.d = (exports, definition) => {
105
+ /******/ for(var key in definition) {
106
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
107
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
108
+ /******/ }
109
+ /******/ }
110
+ /******/ };
111
+ /******/ })();
112
+ /******/
113
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
114
+ /******/ (() => {
115
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
116
+ /******/ })();
117
+ /******/
118
+ /******/ /* webpack/runtime/make namespace object */
119
+ /******/ (() => {
120
+ /******/ // define __esModule on exports
121
+ /******/ __webpack_require__.r = (exports) => {
122
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
123
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
124
+ /******/ }
125
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
126
+ /******/ };
127
+ /******/ })();
128
+ /******/
129
+ /************************************************************************/
130
+ var __webpack_exports__ = {};
131
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
132
+ (() => {
133
+ __webpack_require__.r(__webpack_exports__);
134
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
135
+ /* harmony export */ "ConnectStateWrapper": () => (/* binding */ ConnectStateWrapper),
136
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
137
+ /* harmony export */ });
138
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
139
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
140
+ /* harmony import */ var _remote_data_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3511);
141
+ function _extends() { _extends = Object.assign || 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); }
142
+
143
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
144
+
145
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
146
+
147
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
148
+
149
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
150
+
151
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
152
+
153
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
154
+
155
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
156
+
157
+ function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
158
+
159
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
160
+
161
+
162
+
163
+ /*
164
+ Connect a react component to a global store.
165
+ This is similar to what react-redux does but uses our global store so
166
+ can share state with other React mount points or anything that uses the
167
+ store.
168
+ - selectors is an object where keys are your prop names and values are your select
169
+ functions that work on the store to retrieve the state you are interested in
170
+ - initial state is set in useEffect so the wrapped component needs to handle it's props set to undefined initially
171
+ */
172
+
173
+ var ConnectStateWrapper = function ConnectStateWrapper(Component, selectors) {
174
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),
175
+ _useState2 = _slicedToArray(_useState, 2),
176
+ state = _useState2[0],
177
+ setState = _useState2[1];
178
+
179
+ var setStateForKey = function setStateForKey(key) {
180
+ return function (storeState) {
181
+ return setState(function () {
182
+ return _defineProperty({}, key, storeState);
183
+ });
184
+ };
185
+ };
186
+
187
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
188
+ var store = (0,_remote_data_store__WEBPACK_IMPORTED_MODULE_1__/* .getRemoteDataStore */ .cO)();
189
+ var resolvedState = Object.keys(selectors).reduce(function (acc, key) {
190
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, selectors[key](store)));
191
+ }, {}); // Set initial state
192
+
193
+ setState(resolvedState); // Create a store subscription for each selector. Depending on your use case, this can be inefficient.
194
+ // When optimising for renders, look for wins with selectors better for your use and using connectState directly.
195
+
196
+ Object.keys(selectors).forEach(function (key) {
197
+ (0,_remote_data_store__WEBPACK_IMPORTED_MODULE_1__/* .connectState */ .kZ)(selectors[key], setStateForKey(key));
198
+ });
199
+ }, []);
200
+
201
+ var WrappedComponent = function WrappedComponent(props) {
202
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _extends({}, props, state));
203
+ };
204
+
205
+ return WrappedComponent;
206
+ };
207
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectStateWrapper);
208
+ })();
209
+
210
+ /******/ return __webpack_exports__;
211
+ /******/ })()
212
+ ;
213
+ });
@@ -0,0 +1,12 @@
1
+ @layer components {
2
+ .ui-contact-footer {
3
+ background-size: 100% 100%;
4
+ background-position: right center;
5
+ @apply w-full bg-gradient-active-orange;
6
+ }
7
+
8
+ .ui-contact-footer-box {
9
+ @apply p-24 sm:p-32 xl:p-40 bg-white flex flex-col justify-between rounded-sm;
10
+ }
11
+ }
12
+
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.ContactFooter=t())}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>a});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))};function o(e,t){e.disabled=!1,e.innerText=t}function r(e,t){e.disabled=!0,e.innerText=t}var i=30;const a=function(){return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).dataId,t=n(e),a=n("open-chat-widget",t),d=a.dataset.enabledLabel,c=a.dataset.disabledLabel;if(e&&t){var u,l=n("open-chat-widget",t),f=function e(t){var n,r,a=null===(n=window)||void 0===n||null===(r=n.HubSpotConversations)||void 0===r?void 0:r.widget,c=document.querySelector("#hubspot-messages-iframe-container");u=function(e){e.preventDefault(),a.open()},a&&c?(l.addEventListener("click",u),o(l,d)):--i&&setTimeout((function(){return e(100)}),t)};return r(l,c),f(0),function(){r(l,c),l.removeEventListener("click",u)}}}({dataId:"contact-footer"})};return t.default})()}));
@@ -0,0 +1,448 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("react")) : factory(root[undefined]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__9281__) {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 9008:
15
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16
+
17
+ "use strict";
18
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
20
+ /* harmony export */ });
21
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
22
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
23
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5697);
24
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
25
+ var _excluded = ["name", "size", "color", "additionalCSS"];
26
+
27
+ function _extends() { _extends = Object.assign || 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); }
28
+
29
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30
+
31
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
+
33
+
34
+
35
+
36
+ var Icon = function Icon(_ref) {
37
+ var name = _ref.name,
38
+ _ref$size = _ref.size,
39
+ size = _ref$size === void 0 ? "0.75rem" : _ref$size,
40
+ _ref$color = _ref.color,
41
+ color = _ref$color === void 0 ? "" : _ref$color,
42
+ _ref$additionalCSS = _ref.additionalCSS,
43
+ additionalCSS = _ref$additionalCSS === void 0 ? "" : _ref$additionalCSS,
44
+ additionalAttributes = _objectWithoutProperties(_ref, _excluded);
45
+
46
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
47
+ className: "".concat(color, " ").concat(additionalCSS),
48
+ style: {
49
+ width: size,
50
+ height: size
51
+ }
52
+ }, additionalAttributes), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
53
+ xlinkHref: "#sprite-".concat(name)
54
+ }));
55
+ };
56
+
57
+ Icon.propTypes = {
58
+ name: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired),
59
+ size: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
60
+ color: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
61
+ additionalCSS: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
62
+ };
63
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);
64
+
65
+ /***/ }),
66
+
67
+ /***/ 2703:
68
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
69
+
70
+ "use strict";
71
+ /**
72
+ * Copyright (c) 2013-present, Facebook, Inc.
73
+ *
74
+ * This source code is licensed under the MIT license found in the
75
+ * LICENSE file in the root directory of this source tree.
76
+ */
77
+
78
+
79
+
80
+ var ReactPropTypesSecret = __webpack_require__(414);
81
+
82
+ function emptyFunction() {}
83
+ function emptyFunctionWithReset() {}
84
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
85
+
86
+ module.exports = function() {
87
+ function shim(props, propName, componentName, location, propFullName, secret) {
88
+ if (secret === ReactPropTypesSecret) {
89
+ // It is still safe when called from React.
90
+ return;
91
+ }
92
+ var err = new Error(
93
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
94
+ 'Use PropTypes.checkPropTypes() to call them. ' +
95
+ 'Read more at http://fb.me/use-check-prop-types'
96
+ );
97
+ err.name = 'Invariant Violation';
98
+ throw err;
99
+ };
100
+ shim.isRequired = shim;
101
+ function getShim() {
102
+ return shim;
103
+ };
104
+ // Important!
105
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
106
+ var ReactPropTypes = {
107
+ array: shim,
108
+ bool: shim,
109
+ func: shim,
110
+ number: shim,
111
+ object: shim,
112
+ string: shim,
113
+ symbol: shim,
114
+
115
+ any: shim,
116
+ arrayOf: getShim,
117
+ element: shim,
118
+ elementType: shim,
119
+ instanceOf: getShim,
120
+ node: shim,
121
+ objectOf: getShim,
122
+ oneOf: getShim,
123
+ oneOfType: getShim,
124
+ shape: getShim,
125
+ exact: getShim,
126
+
127
+ checkPropTypes: emptyFunctionWithReset,
128
+ resetWarningCache: emptyFunction
129
+ };
130
+
131
+ ReactPropTypes.PropTypes = ReactPropTypes;
132
+
133
+ return ReactPropTypes;
134
+ };
135
+
136
+
137
+ /***/ }),
138
+
139
+ /***/ 5697:
140
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
141
+
142
+ /**
143
+ * Copyright (c) 2013-present, Facebook, Inc.
144
+ *
145
+ * This source code is licensed under the MIT license found in the
146
+ * LICENSE file in the root directory of this source tree.
147
+ */
148
+
149
+ if (false) { var throwOnDirectAccess, ReactIs; } else {
150
+ // By explicitly using `prop-types` you are opting into new production behavior.
151
+ // http://fb.me/prop-types-in-prod
152
+ module.exports = __webpack_require__(2703)();
153
+ }
154
+
155
+
156
+ /***/ }),
157
+
158
+ /***/ 414:
159
+ /***/ ((module) => {
160
+
161
+ "use strict";
162
+ /**
163
+ * Copyright (c) 2013-present, Facebook, Inc.
164
+ *
165
+ * This source code is licensed under the MIT license found in the
166
+ * LICENSE file in the root directory of this source tree.
167
+ */
168
+
169
+
170
+
171
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
172
+
173
+ module.exports = ReactPropTypesSecret;
174
+
175
+
176
+ /***/ }),
177
+
178
+ /***/ 9281:
179
+ /***/ ((module) => {
180
+
181
+ "use strict";
182
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
183
+
184
+ /***/ })
185
+
186
+ /******/ });
187
+ /************************************************************************/
188
+ /******/ // The module cache
189
+ /******/ var __webpack_module_cache__ = {};
190
+ /******/
191
+ /******/ // The require function
192
+ /******/ function __webpack_require__(moduleId) {
193
+ /******/ // Check if module is in cache
194
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
195
+ /******/ if (cachedModule !== undefined) {
196
+ /******/ return cachedModule.exports;
197
+ /******/ }
198
+ /******/ // Create a new module (and put it into the cache)
199
+ /******/ var module = __webpack_module_cache__[moduleId] = {
200
+ /******/ // no module.id needed
201
+ /******/ // no module.loaded needed
202
+ /******/ exports: {}
203
+ /******/ };
204
+ /******/
205
+ /******/ // Execute the module function
206
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
207
+ /******/
208
+ /******/ // Return the exports of the module
209
+ /******/ return module.exports;
210
+ /******/ }
211
+ /******/
212
+ /************************************************************************/
213
+ /******/ /* webpack/runtime/compat get default export */
214
+ /******/ (() => {
215
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
216
+ /******/ __webpack_require__.n = (module) => {
217
+ /******/ var getter = module && module.__esModule ?
218
+ /******/ () => (module['default']) :
219
+ /******/ () => (module);
220
+ /******/ __webpack_require__.d(getter, { a: getter });
221
+ /******/ return getter;
222
+ /******/ };
223
+ /******/ })();
224
+ /******/
225
+ /******/ /* webpack/runtime/define property getters */
226
+ /******/ (() => {
227
+ /******/ // define getter functions for harmony exports
228
+ /******/ __webpack_require__.d = (exports, definition) => {
229
+ /******/ for(var key in definition) {
230
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
231
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
232
+ /******/ }
233
+ /******/ }
234
+ /******/ };
235
+ /******/ })();
236
+ /******/
237
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
238
+ /******/ (() => {
239
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
240
+ /******/ })();
241
+ /******/
242
+ /******/ /* webpack/runtime/make namespace object */
243
+ /******/ (() => {
244
+ /******/ // define __esModule on exports
245
+ /******/ __webpack_require__.r = (exports) => {
246
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
247
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
248
+ /******/ }
249
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
250
+ /******/ };
251
+ /******/ })();
252
+ /******/
253
+ /************************************************************************/
254
+ var __webpack_exports__ = {};
255
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
256
+ (() => {
257
+ "use strict";
258
+ // ESM COMPAT FLAG
259
+ __webpack_require__.r(__webpack_exports__);
260
+
261
+ // EXPORTS
262
+ __webpack_require__.d(__webpack_exports__, {
263
+ "default": () => (/* binding */ ContactFooter)
264
+ });
265
+
266
+ // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
267
+ var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
268
+ var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
269
+ // EXTERNAL MODULE: ./node_modules/prop-types/index.js
270
+ var prop_types = __webpack_require__(5697);
271
+ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
272
+ // EXTERNAL MODULE: ./src/core/Icon/component.jsx
273
+ var component = __webpack_require__(9008);
274
+ ;// CONCATENATED MODULE: ./src/core/url-base.js
275
+ var DEFAULT_URL_BASE = "";
276
+
277
+ var absUrl = function absUrl(path) {
278
+ var urlBase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_URL_BASE;
279
+ return "".concat(urlBase).concat(path);
280
+ };
281
+
282
+ /* harmony default export */ const url_base = (absUrl);
283
+ ;// CONCATENATED MODULE: ./src/core/dom-query.js
284
+ var queryId = function queryId(val) {
285
+ var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
286
+ return root.querySelector("[data-id=".concat(val, "]"));
287
+ };
288
+ var queryIdAll = function queryIdAll(val) {
289
+ var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
290
+ return root.querySelectorAll("[data-id=".concat(val, "]"));
291
+ };
292
+ ;// CONCATENATED MODULE: ./src/core/hubspot-chat-toggle.js
293
+
294
+ /*
295
+ A method to enable/disable a CTA that
296
+ is used to open the HubSpot chat widget
297
+
298
+ If the Chat widget is unavailable this script
299
+ will apply a disabled property and change
300
+ the text on the button, to warn the user.
301
+
302
+ Params:
303
+ - dataId the parent container data-id
304
+
305
+ */
306
+
307
+ function enableBtn(el, text) {
308
+ el.disabled = false;
309
+ el.innerText = text;
310
+ }
311
+
312
+ function disableBtn(el, text) {
313
+ el.disabled = true;
314
+ el.innerText = text;
315
+ }
316
+
317
+ var WAIT_BETWEEN_RETRIES_MS = 100;
318
+ var MAX_RETRY_COUNT = 30;
319
+ function toggleChatWidget() {
320
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
321
+ var dataId = params.dataId;
322
+ var container = queryId(dataId);
323
+ var chatButton = queryId("open-chat-widget", container);
324
+ var textEnabled = chatButton.dataset.enabledLabel;
325
+ var textDisabled = chatButton.dataset.disabledLabel;
326
+ if (!dataId || !container) return;
327
+ var trigger = queryId("open-chat-widget", container);
328
+ var clickHandler;
329
+
330
+ var waitForScript = function waitForScript(delay) {
331
+ var _window, _window$HubSpotConver;
332
+
333
+ var widget = (_window = window) === null || _window === void 0 ? void 0 : (_window$HubSpotConver = _window.HubSpotConversations) === null || _window$HubSpotConver === void 0 ? void 0 : _window$HubSpotConver.widget; // If the chat is set to be hidden out of hours this will return null
334
+
335
+ var iframe = document.querySelector("#hubspot-messages-iframe-container");
336
+
337
+ clickHandler = function clickHandler(e) {
338
+ e.preventDefault();
339
+ widget.open();
340
+ };
341
+
342
+ if (widget && iframe) {
343
+ trigger.addEventListener("click", clickHandler);
344
+ enableBtn(trigger, textEnabled);
345
+ } else if (--MAX_RETRY_COUNT) {
346
+ setTimeout(function () {
347
+ return waitForScript(WAIT_BETWEEN_RETRIES_MS);
348
+ }, delay);
349
+ }
350
+ };
351
+
352
+ disableBtn(trigger, textDisabled);
353
+ waitForScript(0);
354
+ return function () {
355
+ disableBtn(trigger, textDisabled);
356
+ trigger.removeEventListener("click", clickHandler);
357
+ };
358
+ }
359
+ ;// CONCATENATED MODULE: ./src/core/ContactFooter/component.js
360
+
361
+
362
+ /* harmony default export */ const ContactFooter_component = (function () {
363
+ return toggleChatWidget({
364
+ dataId: "contact-footer"
365
+ });
366
+ });
367
+ ;// CONCATENATED MODULE: ./src/core/ContactFooter/component.jsx
368
+
369
+
370
+
371
+
372
+
373
+ function ContactFooter(_ref) {
374
+ var urlBase = _ref.urlBase;
375
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
376
+ return ContactFooter_component();
377
+ }, []);
378
+
379
+ var absUrl = function absUrl(path) {
380
+ return url_base(path, urlBase);
381
+ };
382
+
383
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
384
+ className: "ui-contact-footer font-sans antialiased",
385
+ "data-id": "contact-footer"
386
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
387
+ className: "w-full bp-lg max-w-screen-xl mx-auto py-64 grid grid-cols-1 md:grid-cols-3 ui-grid-gap ui-grid-px"
388
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
389
+ className: "ui-contact-footer-box"
390
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(component.default, {
391
+ name: "icon-display-live-chat",
392
+ size: "3rem",
393
+ additionalCSS: "block mb-16"
394
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
395
+ className: "text-h3 mb-24"
396
+ }, "Live Chat"), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("p", {
397
+ className: "text-p1 font-light"
398
+ }, "Reach out team of experts over chat powered by Ably.")), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("button", {
399
+ type: "button",
400
+ className: "ui-btn-secondary self-start mt-16",
401
+ disabled: true,
402
+ "data-id": "open-chat-widget",
403
+ "data-enabled-label": "Start a live chat",
404
+ "data-disabled-label": "Live chat unavailable"
405
+ }, "Live chat unavailable")), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
406
+ className: "ui-contact-footer-box"
407
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(component.default, {
408
+ name: "icon-display-call-mobile",
409
+ size: "3rem",
410
+ additionalCSS: "block mb-16"
411
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
412
+ className: "flex-grow"
413
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
414
+ className: "text-h3 mb-24"
415
+ }, "Call us"), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("p", {
416
+ className: "text-p1 font-light"
417
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("span", {
418
+ className: "block"
419
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("strong", {
420
+ className: "text-p1 font-medium"
421
+ }, "+1 877 434 5287"), " (USA, toll free)"), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("span", {
422
+ className: "block"
423
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("strong", {
424
+ className: "text-p1 font-medium"
425
+ }, "+44 20 3318 4689"), " (UK)")))), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
426
+ className: "ui-contact-footer-box"
427
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(component.default, {
428
+ name: "icon-display-tech-account-comms",
429
+ size: "3rem",
430
+ additionalCSS: "block mb-16"
431
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
432
+ className: "text-h3 mb-24"
433
+ }, "Technical and account support"), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("p", {
434
+ className: "text-p1 font-light"
435
+ }, "We're standing by to help with any questions or code.")), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
436
+ className: "ui-btn-secondary self-start p-btn mt-16",
437
+ href: absUrl("/support")
438
+ }, "Get support now"))));
439
+ }
440
+ ContactFooter.propTypes = {
441
+ urlBase: (prop_types_default()).string
442
+ };
443
+ })();
444
+
445
+ /******/ return __webpack_exports__;
446
+ /******/ })()
447
+ ;
448
+ });