@shopgate/pwa-common 7.30.0-alpha.6 → 7.30.0-alpha.8

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 (306) hide show
  1. package/App.js +48 -6
  2. package/action-creators/app/index.js +75 -12
  3. package/action-creators/app/spec.js +96 -1
  4. package/action-creators/client/index.js +27 -5
  5. package/action-creators/client/spec.js +44 -1
  6. package/action-creators/error/index.js +15 -3
  7. package/action-creators/index.js +9 -1
  8. package/action-creators/menu/index.js +23 -4
  9. package/action-creators/menu/spec.js +37 -1
  10. package/action-creators/modal/index.js +15 -3
  11. package/action-creators/modal/spec.js +26 -1
  12. package/action-creators/page/index.js +24 -4
  13. package/action-creators/page/spec.js +38 -1
  14. package/action-creators/router/index.js +48 -7
  15. package/action-creators/url/index.js +24 -4
  16. package/action-creators/url/spec.js +45 -1
  17. package/action-creators/user/index.js +90 -13
  18. package/action-creators/user/spec.js +186 -2
  19. package/actions/app/handleDeepLink.js +11 -2
  20. package/actions/app/handleLink.js +62 -6
  21. package/actions/app/handlePushNotification.js +32 -4
  22. package/actions/app/handleUniversalLink.js +11 -2
  23. package/actions/app/registerLinkEvents.js +24 -3
  24. package/actions/client/fetchClientInformation.js +26 -2
  25. package/actions/menu/fetchMenu.js +23 -2
  26. package/actions/modal/closeModal.js +18 -2
  27. package/actions/modal/promiseMap.js +3 -1
  28. package/actions/modal/showModal.js +54 -8
  29. package/actions/page/fetchPageConfig.js +69 -2
  30. package/actions/page/getPageConfig.js +6 -2
  31. package/actions/page/index.js +1 -1
  32. package/actions/router/historyPop.js +12 -2
  33. package/actions/router/historyPopToRoute.js +27 -2
  34. package/actions/router/historyPush.js +12 -2
  35. package/actions/router/historyRedirect.js +21 -2
  36. package/actions/router/historyReplace.js +20 -3
  37. package/actions/router/historyReset.js +11 -2
  38. package/actions/router/historyResetTo.js +12 -2
  39. package/actions/router/index.js +17 -1
  40. package/actions/router/routeDidPop.js +11 -2
  41. package/actions/router/routeDidPush.js +13 -2
  42. package/actions/router/routeDidReplace.js +11 -2
  43. package/actions/router/routeDidReset.js +11 -2
  44. package/actions/router/routeDidUpdate.js +10 -2
  45. package/actions/router/routeWillPop.js +11 -2
  46. package/actions/router/routeWillPush.js +13 -2
  47. package/actions/router/routeWillReplace.js +11 -2
  48. package/actions/router/routeWillReset.js +11 -2
  49. package/actions/router/windowOpenOverride.js +10 -2
  50. package/actions/user/fetchRegisterUrl.js +36 -2
  51. package/actions/user/fetchUser.js +29 -3
  52. package/actions/user/getUser.js +6 -2
  53. package/actions/user/index.js +1 -1
  54. package/actions/user/login.js +76 -9
  55. package/actions/user/logout.js +30 -2
  56. package/collections/AuthRoutes.js +73 -14
  57. package/collections/Configuration.js +54 -7
  58. package/collections/EmbeddedMedia.js +84 -11
  59. package/collections/PersistedReducers.js +41 -6
  60. package/collections/Redirects.js +103 -17
  61. package/collections/index.js +5 -1
  62. package/collections/media-providers/MediaProvider.js +151 -26
  63. package/collections/media-providers/Vimeo.js +113 -19
  64. package/collections/media-providers/YouTube.js +74 -14
  65. package/collections/media-providers/index.js +3 -1
  66. package/collections/media-providers/style.js +52 -2
  67. package/components/Backdrop/index.js +95 -6
  68. package/components/Backdrop/spec.js +23 -1
  69. package/components/Backdrop/style.js +11 -2
  70. package/components/Button/index.js +47 -5
  71. package/components/Button/spec.js +36 -1
  72. package/components/Button/style.js +6 -1
  73. package/components/Checkbox/index.js +126 -32
  74. package/components/Checkbox/spec.js +94 -3
  75. package/components/Consume/helpers/buildParams.js +13 -2
  76. package/components/Consume/index.js +14 -2
  77. package/components/CountdownTimer/index.js +115 -17
  78. package/components/CountdownTimer/spec.js +126 -12
  79. package/components/Drawer/index.js +131 -16
  80. package/components/Drawer/spec.js +76 -1
  81. package/components/Drawer/style.js +37 -1
  82. package/components/Dropdown/index.js +65 -6
  83. package/components/Dropdown/style.js +4 -1
  84. package/components/Dropdown/transitions.js +34 -1
  85. package/components/Ellipsis/index.js +16 -2
  86. package/components/Ellipsis/spec.js +13 -1
  87. package/components/EmbeddedMedia/index.js +56 -6
  88. package/components/EmbeddedMedia/spec.js +52 -3
  89. package/components/ErrorBoundary/connector.js +9 -2
  90. package/components/ErrorBoundary/index.js +43 -7
  91. package/components/Grid/components/Item/index.js +40 -4
  92. package/components/Grid/components/Item/spec.js +23 -1
  93. package/components/Grid/components/Item/style.js +17 -3
  94. package/components/Grid/index.js +36 -4
  95. package/components/Grid/spec.js +23 -1
  96. package/components/Grid/style.js +11 -2
  97. package/components/HtmlSanitizer/connector.js +24 -3
  98. package/components/HtmlSanitizer/index.js +104 -12
  99. package/components/HtmlSanitizer/spec.js +207 -6
  100. package/components/I18n/components/FormatDate/index.js +26 -2
  101. package/components/I18n/components/FormatDate/spec.js +46 -1
  102. package/components/I18n/components/FormatNumber/index.js +34 -2
  103. package/components/I18n/components/FormatNumber/spec.js +41 -2
  104. package/components/I18n/components/FormatPrice/index.js +32 -2
  105. package/components/I18n/components/FormatPrice/spec.js +46 -1
  106. package/components/I18n/components/FormatTime/index.js +26 -2
  107. package/components/I18n/components/FormatTime/spec.js +43 -2
  108. package/components/I18n/components/I18nProvider/index.js +52 -9
  109. package/components/I18n/components/I18nProvider/spec.js +39 -1
  110. package/components/I18n/components/Placeholder/index.js +8 -2
  111. package/components/I18n/components/Placeholder/spec.js +30 -1
  112. package/components/I18n/components/Translate/index.js +68 -7
  113. package/components/I18n/components/Translate/spec.js +30 -1
  114. package/components/I18n/index.js +16 -1
  115. package/components/Icon/index.js +25 -2
  116. package/components/Icon/style.js +6 -1
  117. package/components/Image/Image.js +176 -19
  118. package/components/Image/ImageInner.js +48 -2
  119. package/components/Image/index.js +1 -1
  120. package/components/Image/style.js +29 -2
  121. package/components/InfiniteContainer/index.js +381 -49
  122. package/components/InfiniteContainer/spec.js +199 -10
  123. package/components/Input/components/DateInput.js +262 -6
  124. package/components/Input/components/MultiLineInput.js +98 -12
  125. package/components/Input/components/SimpleInput.js +207 -31
  126. package/components/Input/index.js +32 -3
  127. package/components/Input/spec.js +122 -1
  128. package/components/KeyboardConsumer/index.js +48 -7
  129. package/components/Link/connector.js +7 -1
  130. package/components/Link/index.js +96 -11
  131. package/components/Link/spec.js +56 -1
  132. package/components/Link/style.js +10 -1
  133. package/components/List/components/Item/index.js +35 -3
  134. package/components/List/components/Item/style.js +16 -1
  135. package/components/List/index.js +20 -2
  136. package/components/List/spec.js +31 -1
  137. package/components/Loading/index.js +6 -2
  138. package/components/Modal/index.js +38 -3
  139. package/components/Modal/style.js +36 -1
  140. package/components/ModalContainer/connector.js +17 -3
  141. package/components/ModalContainer/index.js +36 -3
  142. package/components/ModalContainer/spec.js +105 -5
  143. package/components/Picker/components/Button/index.js +34 -2
  144. package/components/Picker/components/Button/style.js +19 -1
  145. package/components/Picker/components/List/index.js +33 -2
  146. package/components/Picker/components/List/style.js +17 -1
  147. package/components/Picker/components/Modal/index.js +60 -7
  148. package/components/Picker/components/Modal/style.js +78 -1
  149. package/components/Picker/index.js +167 -21
  150. package/components/Picker/spec.js +83 -2
  151. package/components/Portal/index.js +130 -19
  152. package/components/ProductCharacteristics/connector.js +33 -4
  153. package/components/ProductCharacteristics/context.js +2 -1
  154. package/components/ProductCharacteristics/helpers/index.js +135 -21
  155. package/components/ProductCharacteristics/index.js +266 -31
  156. package/components/RangeSlider/components/Handle/index.js +25 -2
  157. package/components/RangeSlider/components/Handle/style.js +14 -1
  158. package/components/RangeSlider/helper.js +43 -8
  159. package/components/RangeSlider/index.js +228 -38
  160. package/components/RangeSlider/style.js +14 -1
  161. package/components/Route/RouteNotFound.js +46 -3
  162. package/components/Route/index.js +78 -10
  163. package/components/Router/connector.js +9 -2
  164. package/components/Router/index.js +237 -31
  165. package/components/ScannerContainer/connector.js +9 -2
  166. package/components/ScannerContainer/index.js +42 -6
  167. package/components/Select/components/Item/index.js +20 -4
  168. package/components/Select/components/Item/style.js +4 -1
  169. package/components/Select/index.js +149 -28
  170. package/components/Select/spec.js +86 -2
  171. package/components/Select/style.js +17 -1
  172. package/components/SelectBox/components/Item/index.js +47 -5
  173. package/components/SelectBox/components/Item/style.js +7 -1
  174. package/components/SelectBox/index.js +173 -17
  175. package/components/SelectBox/spec.js +59 -3
  176. package/components/SelectBox/style.js +18 -1
  177. package/components/Slider/index.js +6 -2
  178. package/components/SurroundPortals/index.js +26 -2
  179. package/components/Swiper/components/SwiperItem/index.js +28 -4
  180. package/components/Swiper/components/SwiperItem/spec.js +17 -1
  181. package/components/Swiper/components/SwiperItem/styles.js +5 -1
  182. package/components/Swiper/index.js +210 -18
  183. package/components/Swiper/styles.js +75 -7
  184. package/components/Toaster/index.js +10 -2
  185. package/components/Transition/index.js +89 -13
  186. package/components/Widgets/components/Widget/index.js +52 -4
  187. package/components/Widgets/components/Widget/spec.js +68 -3
  188. package/components/Widgets/components/Widget/style.js +21 -3
  189. package/components/Widgets/components/WidgetGrid/index.js +52 -7
  190. package/components/Widgets/components/WidgetGrid/spec.js +46 -2
  191. package/components/Widgets/components/WidgetGrid/style.js +8 -1
  192. package/components/Widgets/helpers/shouldShowWidget.js +44 -7
  193. package/components/Widgets/index.js +127 -15
  194. package/components/Widgets/spec.js +213 -6
  195. package/components/index.js +9 -1
  196. package/constants/ActionTypes.js +97 -19
  197. package/constants/Configuration.js +12 -2
  198. package/constants/Device.js +29 -2
  199. package/constants/DisplayOptions.js +8 -1
  200. package/constants/MenuIDs.js +2 -1
  201. package/constants/ModalTypes.js +1 -1
  202. package/constants/PageIDs.js +1 -1
  203. package/constants/Pipelines.js +7 -1
  204. package/constants/Portals.js +136 -3
  205. package/constants/Registration.js +3 -1
  206. package/constants/RoutePaths.js +13 -2
  207. package/constants/Tracking.js +3 -1
  208. package/constants/client.js +6 -1
  209. package/constants/ui.js +2 -1
  210. package/constants/user.js +6 -2
  211. package/context/index.js +33 -3
  212. package/helpers/config/index.js +139 -21
  213. package/helpers/config/mock.js +200 -8
  214. package/helpers/config/theme.js +50 -4
  215. package/helpers/data/index.js +204 -29
  216. package/helpers/data/spec.js +187 -7
  217. package/helpers/date/index.js +58 -6
  218. package/helpers/date/spec.js +92 -1
  219. package/helpers/dom/index.js +48 -11
  220. package/helpers/environment/index.js +14 -2
  221. package/helpers/html/decodeHTML.js +7 -1
  222. package/helpers/html/handleDOM.js +172 -21
  223. package/helpers/html/parseHTML.js +67 -12
  224. package/helpers/i18n/getDateFormatter.js +23 -4
  225. package/helpers/i18n/getNumberFormatter.js +32 -4
  226. package/helpers/i18n/getPriceFormatter.js +38 -4
  227. package/helpers/i18n/getTimeFormatter.js +23 -4
  228. package/helpers/i18n/getTranslator.js +62 -8
  229. package/helpers/i18n/index.js +5 -1
  230. package/helpers/i18n/mergeTranslations.js +36 -9
  231. package/helpers/i18n/messageCache.js +3 -1
  232. package/helpers/legacy/index.js +47 -9
  233. package/helpers/modal/withShowModal.js +13 -2
  234. package/helpers/portals/portalCollection.js +28 -6
  235. package/helpers/portals/routePortals.js +12 -1
  236. package/helpers/redux/compareObjects.js +7 -2
  237. package/helpers/redux/generateResultHash.js +36 -3
  238. package/helpers/redux/generateSortedHash.js +7 -2
  239. package/helpers/redux/hasExpired.js +10 -2
  240. package/helpers/redux/index.js +7 -1
  241. package/helpers/redux/mutable.js +143 -24
  242. package/helpers/redux/shouldFetchData.js +46 -10
  243. package/helpers/redux/shouldFetchFilters.js +17 -4
  244. package/helpers/router/index.js +49 -5
  245. package/helpers/style/index.js +43 -4
  246. package/helpers/style/spec.js +108 -2
  247. package/helpers/tracking/index.js +52 -9
  248. package/helpers/validation/index.js +39 -12
  249. package/helpers/validation/spec.js +10 -1
  250. package/package.json +3 -3
  251. package/providers/index.js +4 -1
  252. package/providers/loading/context.js +2 -1
  253. package/providers/loading/index.js +137 -22
  254. package/providers/toast/context.js +2 -1
  255. package/providers/toast/index.js +105 -11
  256. package/reducers/client/connectivity.js +22 -2
  257. package/reducers/client/index.js +7 -1
  258. package/reducers/client/info.js +27 -2
  259. package/reducers/index.js +23 -4
  260. package/reducers/menu/index.js +5 -1
  261. package/reducers/menu/menusById.js +41 -2
  262. package/reducers/modal/index.js +14 -2
  263. package/reducers/page/index.js +68 -5
  264. package/reducers/router/index.js +48 -2
  265. package/reducers/url/index.js +42 -3
  266. package/reducers/user/data.js +27 -2
  267. package/reducers/user/index.js +7 -1
  268. package/reducers/user/login.js +65 -2
  269. package/selectors/client.js +138 -21
  270. package/selectors/history.js +49 -11
  271. package/selectors/menu.js +34 -6
  272. package/selectors/modal.js +15 -4
  273. package/selectors/page.js +25 -4
  274. package/selectors/router.js +154 -30
  275. package/selectors/url.js +25 -4
  276. package/selectors/user.js +90 -13
  277. package/store/index.js +60 -6
  278. package/store/middelwares/logger.js +7 -1
  279. package/store/middelwares/streams.js +19 -2
  280. package/streams/app.js +60 -8
  281. package/streams/client.js +8 -2
  282. package/streams/error.js +14 -3
  283. package/streams/index.js +6 -1
  284. package/streams/interval.js +6 -2
  285. package/streams/main.js +27 -2
  286. package/streams/router.js +45 -8
  287. package/streams/user.js +89 -15
  288. package/streams/view.js +97 -25
  289. package/styles/reset/form.js +57 -5
  290. package/styles/reset/index.js +6 -1
  291. package/styles/reset/media.js +22 -1
  292. package/styles/reset/root.js +33 -1
  293. package/styles/reset/table.js +10 -1
  294. package/styles/reset/typography.js +26 -1
  295. package/subscriptions/app.js +148 -17
  296. package/subscriptions/error.js +292 -13
  297. package/subscriptions/helpers/buildRegisterUrl.js +25 -6
  298. package/subscriptions/helpers/clearUpInAppBrowser.js +14 -3
  299. package/subscriptions/helpers/handleLinks.js +267 -25
  300. package/subscriptions/helpers/pipeline.js +12 -1
  301. package/subscriptions/history.js +34 -6
  302. package/subscriptions/index.js +25 -4
  303. package/subscriptions/menu.js +22 -5
  304. package/subscriptions/mock.js +39 -7
  305. package/subscriptions/router.js +336 -23
  306. package/subscriptions/user.js +93 -3
package/streams/app.js CHANGED
@@ -1,17 +1,69 @@
1
- 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);}import{getCurrentRoute}from"../selectors/router";import{APP_WILL_INIT,APP_DID_START,APP_WILL_START,PWA_DID_APPEAR,PWA_DID_DISAPPEAR,OPEN_PUSH_NOTIFICATION,OPEN_UNIVERSAL_LINK,OPEN_DEEP_LINK}from"../constants/ActionTypes";import{main$}from"./main";export var appWillInit$=main$.filter(function(_ref){var action=_ref.action;return action.type===APP_WILL_INIT;});/**
1
+ import { getCurrentRoute } from "../selectors/router";
2
+ import { APP_WILL_INIT, APP_DID_START, APP_WILL_START, PWA_DID_APPEAR, PWA_DID_DISAPPEAR, OPEN_PUSH_NOTIFICATION, OPEN_UNIVERSAL_LINK, OPEN_DEEP_LINK } from "../constants/ActionTypes";
3
+ import { main$ } from "./main";
4
+ export const appWillInit$ = main$.filter(({
5
+ action
6
+ }) => action.type === APP_WILL_INIT);
7
+
8
+ /**
2
9
  * Gets triggered before the app starts.
3
10
  * @type {Observable}
4
- */export var appWillStart$=main$.filter(function(_ref2){var action=_ref2.action;return action.type===APP_WILL_START;});/**
11
+ */
12
+ export const appWillStart$ = main$.filter(({
13
+ action
14
+ }) => action.type === APP_WILL_START);
15
+
16
+ /**
5
17
  * Gets triggered when the app starts.
6
18
  * @type {Observable}
7
- */export var appDidStart$=main$.filter(function(_ref3){var action=_ref3.action;return action.type===APP_DID_START;});/**
19
+ */
20
+ export const appDidStart$ = main$.filter(({
21
+ action
22
+ }) => action.type === APP_DID_START);
23
+
24
+ /**
8
25
  * Emits when the PWA appeared again after navigating back from a legacy page.
9
- */export var pwaDidAppear$=main$.filter(function(_ref4){var action=_ref4.action;return action.type===PWA_DID_APPEAR;}).map(function(params){return _extends({},params,{action:_extends({},params.action,{route:getCurrentRoute(params.getState())})});});/**
26
+ */
27
+ export const pwaDidAppear$ = main$.filter(({
28
+ action
29
+ }) => action.type === PWA_DID_APPEAR).map(params => ({
30
+ ...params,
31
+ action: {
32
+ ...params.action,
33
+ route: getCurrentRoute(params.getState())
34
+ }
35
+ }));
36
+
37
+ /**
10
38
  * Emits when the PWA disappears
11
- */export var pwaDidDisappear$=main$.filter(function(_ref5){var action=_ref5.action;return action.type===PWA_DID_DISAPPEAR;}).map(function(params){return _extends({},params,{action:_extends({},params.action,{route:getCurrentRoute(params.getState())})});});/**
39
+ */
40
+ export const pwaDidDisappear$ = main$.filter(({
41
+ action
42
+ }) => action.type === PWA_DID_DISAPPEAR).map(params => ({
43
+ ...params,
44
+ action: {
45
+ ...params.action,
46
+ route: getCurrentRoute(params.getState())
47
+ }
48
+ }));
49
+
50
+ /**
12
51
  * Emits when a push message was opened.
13
- */export var pushNotificationOpened$=main$.filter(function(_ref6){var action=_ref6.action;return action.type===OPEN_PUSH_NOTIFICATION;});/**
52
+ */
53
+ export const pushNotificationOpened$ = main$.filter(({
54
+ action
55
+ }) => action.type === OPEN_PUSH_NOTIFICATION);
56
+
57
+ /**
14
58
  * Emits when a universal link was opened.
15
- */export var universalLinkOpened$=main$.filter(function(_ref7){var action=_ref7.action;return action.type===OPEN_UNIVERSAL_LINK;});/**
59
+ */
60
+ export const universalLinkOpened$ = main$.filter(({
61
+ action
62
+ }) => action.type === OPEN_UNIVERSAL_LINK);
63
+
64
+ /**
16
65
  * Emits when a deeplink was opened.
17
- */export var deeplinkOpened$=main$.filter(function(_ref8){var action=_ref8.action;return action.type===OPEN_DEEP_LINK;});
66
+ */
67
+ export const deeplinkOpened$ = main$.filter(({
68
+ action
69
+ }) => action.type === OPEN_DEEP_LINK);
package/streams/client.js CHANGED
@@ -1,4 +1,10 @@
1
- import{RECEIVE_CLIENT_INFORMATION}from"../constants/ActionTypes";import{main$}from"./main";/**
1
+ import { RECEIVE_CLIENT_INFORMATION } from "../constants/ActionTypes";
2
+ import { main$ } from "./main";
3
+
4
+ /**
2
5
  * Gets triggered after the client information was updated
3
6
  * @type {Observable}
4
- */export var clientInformationDidUpdate$=main$.filter(function(_ref){var action=_ref.action;return action.type===RECEIVE_CLIENT_INFORMATION;});
7
+ */
8
+ export const clientInformationDidUpdate$ = main$.filter(({
9
+ action
10
+ }) => action.type === RECEIVE_CLIENT_INFORMATION);
package/streams/error.js CHANGED
@@ -1,7 +1,18 @@
1
- import{APP_ERROR,PIPELINE_ERROR}from"../constants/ActionTypes";import{main$}from"./main";/**
1
+ import { APP_ERROR, PIPELINE_ERROR } from "../constants/ActionTypes";
2
+ import { main$ } from "./main";
3
+
4
+ /**
2
5
  * Gets triggered when an app error is received.
3
6
  * @type {Observable}
4
- */export var appError$=main$.filter(function(_ref){var action=_ref.action;return action.type===APP_ERROR;});/**
7
+ */
8
+ export const appError$ = main$.filter(({
9
+ action
10
+ }) => action.type === APP_ERROR);
11
+
12
+ /**
5
13
  * Gets triggered when an pipeline error is received.
6
14
  * @type {Observable}
7
- */export var pipelineError$=main$.filter(function(_ref2){var action=_ref2.action;return action.type===PIPELINE_ERROR;});
15
+ */
16
+ export const pipelineError$ = main$.filter(({
17
+ action
18
+ }) => action.type === PIPELINE_ERROR);
package/streams/index.js CHANGED
@@ -1 +1,6 @@
1
- export*from"./app";export*from"./client";export*from"./error";export*from"./main";export*from"./router";export*from"./user";
1
+ export * from "./app";
2
+ export * from "./client";
3
+ export * from "./error";
4
+ export * from "./main";
5
+ export * from "./router";
6
+ export * from "./user";
@@ -1,4 +1,8 @@
1
- import{Observable}from'rxjs/Observable';import'rxjs/add/observable/interval';/**
1
+ import { Observable } from 'rxjs/Observable';
2
+ import 'rxjs/add/observable/interval';
3
+
4
+ /**
2
5
  * Gets triggered every second.
3
6
  * @type {Observable}
4
- */export var second$=Observable.interval(1000);
7
+ */
8
+ export const second$ = Observable.interval(1000);
package/streams/main.js CHANGED
@@ -1,4 +1,29 @@
1
- import{Observable}from'rxjs/Observable';import'rxjs/add/observable/from';import'rxjs/add/operator/buffer';import'rxjs/add/operator/bufferTime';import'rxjs/add/operator/filter';import'rxjs/add/operator/first';import'rxjs/add/operator/map';import'rxjs/add/operator/merge';import'rxjs/add/operator/mergeMap';import'rxjs/add/operator/delay';import'rxjs/add/operator/zip';import'rxjs/add/operator/do';import'rxjs/add/operator/shareReplay';import'rxjs/add/operator/distinctUntilChanged';import'rxjs/add/operator/pairwise';import'rxjs/add/operator/debounceTime';import'rxjs/add/operator/switchMap';import'rxjs/add/operator/withLatestFrom';import'rxjs/add/operator/startWith';import{mainSubject}from"../store/middelwares/streams";/**
1
+ import { Observable } from 'rxjs/Observable';
2
+ import 'rxjs/add/observable/from';
3
+ import 'rxjs/add/operator/buffer';
4
+ import 'rxjs/add/operator/bufferTime';
5
+ import 'rxjs/add/operator/filter';
6
+ import 'rxjs/add/operator/first';
7
+ import 'rxjs/add/operator/map';
8
+ import 'rxjs/add/operator/merge';
9
+ import 'rxjs/add/operator/mergeMap';
10
+ import 'rxjs/add/operator/delay';
11
+ import 'rxjs/add/operator/zip';
12
+ import 'rxjs/add/operator/do';
13
+ import 'rxjs/add/operator/shareReplay';
14
+ import 'rxjs/add/operator/distinctUntilChanged';
15
+ import 'rxjs/add/operator/pairwise';
16
+ import 'rxjs/add/operator/debounceTime';
17
+ import 'rxjs/add/operator/switchMap';
18
+ import 'rxjs/add/operator/withLatestFrom';
19
+ import 'rxjs/add/operator/startWith';
20
+ import { mainSubject } from "../store/middelwares/streams";
21
+
22
+ /**
2
23
  * Gets triggered on every redux action that is dispatched.
3
24
  * @type {Observable}
4
- */export var main$=Observable.from(mainSubject);if(window.Cypress){window.main$=main$;}
25
+ */
26
+ export const main$ = Observable.from(mainSubject);
27
+ if (window.Cypress) {
28
+ window.main$ = main$;
29
+ }
package/streams/router.js CHANGED
@@ -1,16 +1,53 @@
1
- import{main$}from"./main";import{NAVIGATE,ROUTE_WILL_ENTER,ROUTE_DID_ENTER,ROUTE_WILL_LEAVE,ROUTE_DID_LEAVE,ROUTE_DID_UPDATE,WINDOW_OPEN_OVERRIDE}from"../constants/ActionTypes";/**
1
+ import { main$ } from "./main";
2
+ import { NAVIGATE, ROUTE_WILL_ENTER, ROUTE_DID_ENTER, ROUTE_WILL_LEAVE, ROUTE_DID_LEAVE, ROUTE_DID_UPDATE, WINDOW_OPEN_OVERRIDE } from "../constants/ActionTypes";
3
+
4
+ /**
2
5
  * @type {Observable}
3
- */export var navigate$=main$.filter(function(_ref){var action=_ref.action;return action.type===NAVIGATE;});/**
6
+ */
7
+ export const navigate$ = main$.filter(({
8
+ action
9
+ }) => action.type === NAVIGATE);
10
+
11
+ /**
4
12
  * @type {Observable}
5
- */export var routeWillEnter$=main$.filter(function(_ref2){var action=_ref2.action;return action.type===ROUTE_WILL_ENTER;});/**
13
+ */
14
+ export const routeWillEnter$ = main$.filter(({
15
+ action
16
+ }) => action.type === ROUTE_WILL_ENTER);
17
+
18
+ /**
6
19
  * @type {Observable}
7
- */export var routeDidEnter$=main$.filter(function(_ref3){var action=_ref3.action;return action.type===ROUTE_DID_ENTER;});/**
20
+ */
21
+ export const routeDidEnter$ = main$.filter(({
22
+ action
23
+ }) => action.type === ROUTE_DID_ENTER);
24
+
25
+ /**
8
26
  * @type {Observable}
9
- */export var routeWillLeave$=main$.filter(function(_ref4){var action=_ref4.action;return action.type===ROUTE_WILL_LEAVE;});/**
27
+ */
28
+ export const routeWillLeave$ = main$.filter(({
29
+ action
30
+ }) => action.type === ROUTE_WILL_LEAVE);
31
+
32
+ /**
10
33
  * @type {Observable}
11
- */export var routeDidLeave$=main$.filter(function(_ref5){var action=_ref5.action;return action.type===ROUTE_DID_LEAVE;});/**
34
+ */
35
+ export const routeDidLeave$ = main$.filter(({
36
+ action
37
+ }) => action.type === ROUTE_DID_LEAVE);
38
+
39
+ /**
12
40
  * @type {Observable}
13
- */export var routeDidUpdate$=main$.filter(function(_ref6){var action=_ref6.action;return action.type===ROUTE_DID_UPDATE;});/**
41
+ */
42
+ export const routeDidUpdate$ = main$.filter(({
43
+ action
44
+ }) => action.type === ROUTE_DID_UPDATE);
45
+
46
+ /**
14
47
  * @type {Observable}
15
48
  * @deprecated use routeDidEnter$
16
- */export var routeDidChange$=routeDidEnter$;export var windowOpenOverride$=main$.filter(function(_ref7){var action=_ref7.action;return action.type===WINDOW_OPEN_OVERRIDE;});
49
+ */
50
+ export const routeDidChange$ = routeDidEnter$;
51
+ export const windowOpenOverride$ = main$.filter(({
52
+ action
53
+ }) => action.type === WINDOW_OPEN_OVERRIDE);
package/streams/user.js CHANGED
@@ -1,42 +1,116 @@
1
- import{Observable}from'rxjs/Observable';import'rxjs/add/observable/interval';import'rxjs/add/operator/takeUntil';import{REQUEST_LOGIN,SUCCESS_LOGIN,ERROR_LOGIN,ERROR_LEGACY_CONNECT_REGISTER,REQUEST_LOGOUT,SUCCESS_LOGOUT,RECEIVE_USER,ERROR_USER}from"../constants/ActionTypes";import{appDidStart$}from"./app";import{main$}from"./main";import{SESSION_EXPIRY_CHECK_INTERVAL}from"../constants/user";import{getSessionExpiry,getIsSessionExpired}from"../selectors/user";/**
1
+ import { Observable } from 'rxjs/Observable';
2
+ import 'rxjs/add/observable/interval';
3
+ import 'rxjs/add/operator/takeUntil';
4
+ import { REQUEST_LOGIN, SUCCESS_LOGIN, ERROR_LOGIN, ERROR_LEGACY_CONNECT_REGISTER, REQUEST_LOGOUT, SUCCESS_LOGOUT, RECEIVE_USER, ERROR_USER } from "../constants/ActionTypes";
5
+ import { appDidStart$ } from "./app";
6
+ import { main$ } from "./main";
7
+ import { SESSION_EXPIRY_CHECK_INTERVAL } from "../constants/user";
8
+ import { getSessionExpiry, getIsSessionExpired } from "../selectors/user";
9
+
10
+ /**
2
11
  * Gets triggered when user is requesting to login.
3
12
  * @type {Observable}
4
- */export var userWillLogin$=main$.filter(function(_ref){var action=_ref.action;return action.type===REQUEST_LOGIN;});/**
13
+ */
14
+ export const userWillLogin$ = main$.filter(({
15
+ action
16
+ }) => action.type === REQUEST_LOGIN);
17
+
18
+ /**
5
19
  * Gets triggered when user login request has gained a response.
6
20
  * @type {Observable}
7
- */export var userLoginResponse$=main$.filter(function(_ref2){var action=_ref2.action;return action.type===SUCCESS_LOGIN||action.type===ERROR_LOGIN;});/**
21
+ */
22
+ export const userLoginResponse$ = main$.filter(({
23
+ action
24
+ }) => action.type === SUCCESS_LOGIN || action.type === ERROR_LOGIN);
25
+
26
+ /**
8
27
  * Gets triggered when user has logged in.
9
28
  * @type {Observable}
10
- */export var userDidLogin$=main$.filter(function(_ref3){var action=_ref3.action;return action.type===SUCCESS_LOGIN;});/**
29
+ */
30
+ export const userDidLogin$ = main$.filter(({
31
+ action
32
+ }) => action.type === SUCCESS_LOGIN);
33
+
34
+ /**
11
35
  * Gets triggered when user is requesting to logout.
12
36
  * @type {Observable}
13
- */export var userWillLogout$=main$.filter(function(_ref4){var action=_ref4.action;return action.type===REQUEST_LOGOUT;});/**
37
+ */
38
+ export const userWillLogout$ = main$.filter(({
39
+ action
40
+ }) => action.type === REQUEST_LOGOUT);
41
+
42
+ /**
14
43
  * Gets triggered when user has logged out.
15
44
  * @type {Observable}
16
- */export var userDidLogout$=main$.filter(function(_ref5){var action=_ref5.action;return action.type===SUCCESS_LOGOUT;});/**
45
+ */
46
+ export const userDidLogout$ = main$.filter(({
47
+ action
48
+ }) => action.type === SUCCESS_LOGOUT);
49
+
50
+ /**
17
51
  * Gets triggered when the user data was updated.
18
52
  * @type {Observable}
19
- */export var userDidUpdate$=main$.filter(function(_ref6){var action=_ref6.action;return action.type===RECEIVE_USER||action.type===SUCCESS_LOGOUT||action.type===ERROR_USER;});/**
53
+ */
54
+ export const userDidUpdate$ = main$.filter(({
55
+ action
56
+ }) => action.type === RECEIVE_USER || action.type === SUCCESS_LOGOUT || action.type === ERROR_USER);
57
+
58
+ /**
20
59
  * Gets triggered when we have a stable login state of the user. Since user data is persisted,
21
60
  * some parts of the code might not rely on the redux states.
22
61
  * @type {Observable}
23
- */export var userDidInitialize$=appDidStart$.switchMap(function(){return main$.filter(function(_ref7){var action=_ref7.action;return action.type===RECEIVE_USER||action.type===ERROR_USER;});}).first();/**
62
+ */
63
+ export const userDidInitialize$ = appDidStart$.switchMap(() => main$.filter(({
64
+ action
65
+ }) => action.type === RECEIVE_USER || action.type === ERROR_USER)).first();
66
+
67
+ /**
24
68
  * Gets triggered when we received the user data.
25
69
  * @type {Observable}
26
- */export var userDataReceived$=userDidUpdate$.filter(function(_ref8){var action=_ref8.action;return action.type===RECEIVE_USER;});/**
70
+ */
71
+ export const userDataReceived$ = userDidUpdate$.filter(({
72
+ action
73
+ }) => action.type === RECEIVE_USER);
74
+
75
+ /**
27
76
  * Gets triggered when the login failed.
28
77
  * @type {Observable}
29
- */export var loginDidFail$=main$.filter(function(_ref9){var action=_ref9.action;return action.type===ERROR_LOGIN;});/**
78
+ */
79
+ export const loginDidFail$ = main$.filter(({
80
+ action
81
+ }) => action.type === ERROR_LOGIN);
82
+
83
+ /**
30
84
  * Gets triggered when the legacy sgconnect registration failed
31
85
  * @type {Observable}
32
- */export var legacyConnectRegisterDidFail$=main$.filter(function(_ref10){var action=_ref10.action;return action.type===ERROR_LEGACY_CONNECT_REGISTER;});/**
86
+ */
87
+ export const legacyConnectRegisterDidFail$ = main$.filter(({
88
+ action
89
+ }) => action.type === ERROR_LEGACY_CONNECT_REGISTER);
90
+
91
+ /**
33
92
  * Emits when user session expiry needs to be checked. That's the case when the login state in
34
93
  * Redux contains a numeric value for the "expires" property.
35
94
  * Checks are performed at appStart since there might be a persisted value in Redux from the last
36
95
  * sessions, or it happens after login when the login response contained a session lease.
37
- */export var sessionExpiryNeedsToBeChecked$=appDidStart$.merge(userDidLogin$).filter(function(_ref11){var getState=_ref11.getState;var expiry=getSessionExpiry(getState());return expiry!==null;});/**
96
+ */
97
+ export const sessionExpiryNeedsToBeChecked$ = appDidStart$.merge(userDidLogin$).filter(({
98
+ getState
99
+ }) => {
100
+ const expiry = getSessionExpiry(getState());
101
+ return expiry !== null;
102
+ });
103
+
104
+ /**
38
105
  * Emits when a user session with an expiry expires. Therefore it performs an interval check to
39
106
  * check if the session is still active.
40
- */export var userSessionExpired$=sessionExpiryNeedsToBeChecked$.switchMap(function(data){// At first check if the session already expired - necessary for appDidStart$
41
- if(getIsSessionExpired(data.getState())){return Observable.of(data);}// Setup an interval that periodically checks if the session expired - runs till user logged out
42
- return Observable.interval(SESSION_EXPIRY_CHECK_INTERVAL).takeUntil(userDidLogout$).filter(function(){return getIsSessionExpired(data.getState());}).switchMap(function(){return Observable.of(data);});});
107
+ */
108
+ export const userSessionExpired$ = sessionExpiryNeedsToBeChecked$.switchMap(data => {
109
+ // At first check if the session already expired - necessary for appDidStart$
110
+ if (getIsSessionExpired(data.getState())) {
111
+ return Observable.of(data);
112
+ }
113
+
114
+ // Setup an interval that periodically checks if the session expired - runs till user logged out
115
+ return Observable.interval(SESSION_EXPIRY_CHECK_INTERVAL).takeUntil(userDidLogout$).filter(() => getIsSessionExpired(data.getState())).switchMap(() => Observable.of(data));
116
+ });
package/streams/view.js CHANGED
@@ -1,34 +1,106 @@
1
- import{Observable}from'rxjs/Observable';import{Subject}from'rxjs/Subject';import{async as asyncScheduler}from'rxjs/scheduler/async';import'rxjs/add/observable/from';import'rxjs/add/observable/fromEvent';import'rxjs/add/operator/do';import'rxjs/add/operator/throttleTime';export var eventsSubject=new Subject();/**
1
+ import { Observable } from 'rxjs/Observable';
2
+ import { Subject } from 'rxjs/Subject';
3
+ import { async as asyncScheduler } from 'rxjs/scheduler/async';
4
+ import 'rxjs/add/observable/from';
5
+ import 'rxjs/add/observable/fromEvent';
6
+ import 'rxjs/add/operator/do';
7
+ import 'rxjs/add/operator/throttleTime';
8
+ export const eventsSubject = new Subject();
9
+
10
+ /**
2
11
  * Cold observable for View scroll events
3
12
  * Use this to listen for scroll-related changes in any part of the app.
4
13
  * @type {Observable}
5
- */export var viewScroll$=Observable.from(eventsSubject);/**
14
+ */
15
+ export const viewScroll$ = Observable.from(eventsSubject);
16
+
17
+ /**
6
18
  * Sets up throttled scroll event stream for a given element or window.
7
19
  * Emits enriched scroll info such as direction and distance.
8
20
  *
9
21
  * @param {HTMLElement|Window} element - DOM node or window to observe
10
22
  * @param {number} throttleTime - Time in ms to throttle scroll events
11
23
  * @returns {Observable} - Observable emitting scroll-related data
12
- */export var emitScrollEvents=function emitScrollEvents(element){var throttleTime=arguments.length>1&&arguments[1]!==undefined?arguments[1]:250;// In rare situation during unmounting a react dom ref might
13
- // be null due to the execution order of events in fiber nodes.
14
- if(!element){return undefined;}var previousScrollTop=0;// Tracks scroll direction ('up' or 'down')
15
- var lastDirection=null;// Minimum distance to consider a real scroll
16
- var minDelta=10;// Pixels from bottom to consider "at bottom"
17
- var bottomThreshold=20;// Prevent scrollUp triggering in this zone
18
- var deadZoneThreshold=30;var scroll$=Observable.fromEvent(element,'scroll').throttleTime(throttleTime,asyncScheduler,{leading:false,trailing:true}).map(function(event){// Determine if element is the window/document or a scrollable container
19
- var isWindow=element===window||element===document.body||element===document.documentElement;// Get current scroll position
20
- var rawScrollTop=isWindow?window.scrollY||window.pageYOffset||0:element.scrollTop;// Compute max scroll value
21
- var maxScrollTop=isWindow?Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)-window.innerHeight:element.scrollHeight-element.clientHeight;// Clamp scrollTop to prevent overshoot from iOS bounce
22
- var scrollTop=Math.min(rawScrollTop,maxScrollTop);var delta=scrollTop-previousScrollTop;var isScrollingDown=delta>0;var isScrollingUp=delta<0;// Determine direction
23
- var direction=lastDirection;if(isScrollingDown)direction='down';else if(isScrollingUp)direction='up';// Are we near the bottom of the scrollable area?
24
- var nearBottom=scrollTop>=maxScrollTop-bottomThreshold;var inDeadZone=scrollTop>=maxScrollTop-deadZoneThreshold;// Detect downward scroll beyond threshold and not near bottom
25
- var scrollDown=isScrollingDown&&delta>minDelta&&!nearBottom;// Detect upward scroll beyond threshold
26
- var scrollUp=isScrollingUp&&Math.abs(delta)>minDelta;// Suppress scrollUp events in dead zone to avoid iOS bounce
27
- if(scrollUp&&inDeadZone&&direction==='up'){scrollUp=false;}// Detect a bounce-back: scrollDown followed by a quick scrollUp at the bottom
28
- var bounced=lastDirection==='down'&&direction==='up'&&nearBottom;// Final scrolled flag — only emit if meaningful and not a bounce
29
- var scrolled=(scrollDown||scrollUp)&&!bounced;// Update direction and scrollTop memory
30
- lastDirection=direction;return{event:event,scrollTop:scrollTop,previousScrollTop:previousScrollTop,scrolled:scrolled,scrollUp:scrollUp,scrollDown:scrollDown&&!bounced,direction:direction,scrollOut:scrollDown&&!bounced,// legacy compatibility
31
- scrollIn:scrollUp// legacy compatibility
32
- };})["do"](function(event){// Store current scrollTop for next event comparison
33
- previousScrollTop=event.scrollTop;});// Pipe scroll data into the shared stream for global consumers
34
- scroll$.subscribe(viewScroll$);return scroll$;};
24
+ */
25
+ export const emitScrollEvents = (element, throttleTime = 250) => {
26
+ // In rare situation during unmounting a react dom ref might
27
+ // be null due to the execution order of events in fiber nodes.
28
+ if (!element) {
29
+ return undefined;
30
+ }
31
+ let previousScrollTop = 0;
32
+ // Tracks scroll direction ('up' or 'down')
33
+ let lastDirection = null;
34
+ // Minimum distance to consider a real scroll
35
+ const minDelta = 10;
36
+ // Pixels from bottom to consider "at bottom"
37
+ const bottomThreshold = 20;
38
+ // Prevent scrollUp triggering in this zone
39
+ const deadZoneThreshold = 30;
40
+ const scroll$ = Observable.fromEvent(element, 'scroll').throttleTime(throttleTime, asyncScheduler, {
41
+ leading: false,
42
+ trailing: true
43
+ }).map(event => {
44
+ // Determine if element is the window/document or a scrollable container
45
+ const isWindow = element === window || element === document.body || element === document.documentElement;
46
+
47
+ // Get current scroll position
48
+ const rawScrollTop = isWindow ? window.scrollY || window.pageYOffset || 0 : element.scrollTop;
49
+
50
+ // Compute max scroll value
51
+ const maxScrollTop = isWindow ? Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - window.innerHeight : element.scrollHeight - element.clientHeight;
52
+
53
+ // Clamp scrollTop to prevent overshoot from iOS bounce
54
+ const scrollTop = Math.min(rawScrollTop, maxScrollTop);
55
+ const delta = scrollTop - previousScrollTop;
56
+ const isScrollingDown = delta > 0;
57
+ const isScrollingUp = delta < 0;
58
+
59
+ // Determine direction
60
+ let direction = lastDirection;
61
+ if (isScrollingDown) direction = 'down';else if (isScrollingUp) direction = 'up';
62
+
63
+ // Are we near the bottom of the scrollable area?
64
+ const nearBottom = scrollTop >= maxScrollTop - bottomThreshold;
65
+ const inDeadZone = scrollTop >= maxScrollTop - deadZoneThreshold;
66
+
67
+ // Detect downward scroll beyond threshold and not near bottom
68
+ const scrollDown = isScrollingDown && delta > minDelta && !nearBottom;
69
+
70
+ // Detect upward scroll beyond threshold
71
+ let scrollUp = isScrollingUp && Math.abs(delta) > minDelta;
72
+
73
+ // Suppress scrollUp events in dead zone to avoid iOS bounce
74
+ if (scrollUp && inDeadZone && direction === 'up') {
75
+ scrollUp = false;
76
+ }
77
+
78
+ // Detect a bounce-back: scrollDown followed by a quick scrollUp at the bottom
79
+ const bounced = lastDirection === 'down' && direction === 'up' && nearBottom;
80
+
81
+ // Final scrolled flag — only emit if meaningful and not a bounce
82
+ const scrolled = (scrollDown || scrollUp) && !bounced;
83
+
84
+ // Update direction and scrollTop memory
85
+ lastDirection = direction;
86
+ return {
87
+ event,
88
+ scrollTop,
89
+ previousScrollTop,
90
+ scrolled,
91
+ scrollUp,
92
+ scrollDown: scrollDown && !bounced,
93
+ direction,
94
+ scrollOut: scrollDown && !bounced,
95
+ // legacy compatibility
96
+ scrollIn: scrollUp // legacy compatibility
97
+ };
98
+ }).do(event => {
99
+ // Store current scrollTop for next event comparison
100
+ previousScrollTop = event.scrollTop;
101
+ });
102
+
103
+ // Pipe scroll data into the shared stream for global consumers
104
+ scroll$.subscribe(viewScroll$);
105
+ return scroll$;
106
+ };
@@ -1,11 +1,63 @@
1
1
  /**
2
2
  * @deprecated used @shopgate/engage/styles instead
3
- */import{css}from'glamor';/**
3
+ */
4
+
5
+ import { css } from 'glamor';
6
+
7
+ /**
4
8
  * 1. Correct the inability to style clickable types in iOS and Safari.
5
- */css.global('button, html [type="button"], [type="reset"], [type="submit"]',{WebkitAppearance:'button'});// since iOS 15 button has a default color of blue rgb(0, 122, 255);
6
- css.global('button',{color:'inherit'});/**
9
+ */
10
+ css.global('button, html [type="button"], [type="reset"], [type="submit"]', {
11
+ WebkitAppearance: 'button'
12
+ });
13
+
14
+ // since iOS 15 button has a default color of blue rgb(0, 122, 255);
15
+ css.global('button', {
16
+ color: 'inherit'
17
+ });
18
+
19
+ /**
7
20
  * 1. Change font properties to `inherit` in Safari.
8
21
  * 2. Correct the inability to style clickable types in iOS and Safari.
9
- */css.global('::-webkit-file-upload-button',{font:'inherit',WebkitAppearance:'button'});/**
22
+ */
23
+ css.global('::-webkit-file-upload-button', {
24
+ font: 'inherit',
25
+ WebkitAppearance: 'button'
26
+ });
27
+
28
+ /**
10
29
  * Remove the inner padding and cancel buttons in Chrome and Safari for OS X.
11
- */css.global('::-webkit-search-cancel-button, ::-webkit-search-decoration',{WebkitAppearance:'none'});css.global('button, input, select, textarea',{background:'transparent',border:0,fontSize:'1em',margin:0});css.global('input, select, textarea',{fontFamily:'inherit'});css.global('button, textarea',{fontFamily:'inherit',lineHeight:'inherit'});css.global('button',{borderRadius:0});css.global('button, label, [type="checkbox"], [type="radio"]',{cursor:'pointer'});css.global('label',{display:'inline-block'});css.global('textarea',{minHeight:'5em',maxWidth:'100%',resize:'none'});css.global('[type="search"]',{WebkitAppearance:'textfield'});
30
+ */
31
+ css.global('::-webkit-search-cancel-button, ::-webkit-search-decoration', {
32
+ WebkitAppearance: 'none'
33
+ });
34
+ css.global('button, input, select, textarea', {
35
+ background: 'transparent',
36
+ border: 0,
37
+ fontSize: '1em',
38
+ margin: 0
39
+ });
40
+ css.global('input, select, textarea', {
41
+ fontFamily: 'inherit'
42
+ });
43
+ css.global('button, textarea', {
44
+ fontFamily: 'inherit',
45
+ lineHeight: 'inherit'
46
+ });
47
+ css.global('button', {
48
+ borderRadius: 0
49
+ });
50
+ css.global('button, label, [type="checkbox"], [type="radio"]', {
51
+ cursor: 'pointer'
52
+ });
53
+ css.global('label', {
54
+ display: 'inline-block'
55
+ });
56
+ css.global('textarea', {
57
+ minHeight: '5em',
58
+ maxWidth: '100%',
59
+ resize: 'none'
60
+ });
61
+ css.global('[type="search"]', {
62
+ WebkitAppearance: 'textfield'
63
+ });
@@ -1,3 +1,8 @@
1
1
  /**
2
2
  * @deprecated used @shopgate/engage/styles/reset instead
3
- */import"./root";import"./typography";import"./media";import"./form";import"./table";
3
+ */
4
+ import "./root";
5
+ import "./typography";
6
+ import "./media";
7
+ import "./form";
8
+ import "./table";
@@ -1,3 +1,24 @@
1
1
  /**
2
2
  * @deprecated used @shopgate/engage/styles/reset instead
3
- */import{css}from'glamor';css.global('audio:not([controls])',{display:'none',height:0});css.global('figure',{margin:0});css.global('iframe',{border:0,display:'block',width:'100%'});css.global('img, svg',{display:'block',maxWidth:'100%'});css.global('progress',{verticalAlign:'baseline'});
3
+ */
4
+
5
+ import { css } from 'glamor';
6
+ css.global('audio:not([controls])', {
7
+ display: 'none',
8
+ height: 0
9
+ });
10
+ css.global('figure', {
11
+ margin: 0
12
+ });
13
+ css.global('iframe', {
14
+ border: 0,
15
+ display: 'block',
16
+ width: '100%'
17
+ });
18
+ css.global('img, svg', {
19
+ display: 'block',
20
+ maxWidth: '100%'
21
+ });
22
+ css.global('progress', {
23
+ verticalAlign: 'baseline'
24
+ });
@@ -1,3 +1,35 @@
1
1
  /**
2
2
  * @deprecated used @shopgate/engage/styles instead
3
- */import{css}from'glamor';import{themeConfig}from"../../helpers/config";var typography=themeConfig.typography;css.global('*, *:before, *:after',{boxSizing:'border-box'});css.global('html, body',{WebkitTapHighlightColor:'transparent',width:'100%',height:'100%'});css.global('html',{overflow:'hidden',MozOsxFontSmoothing:'grayscale',WebkitFontSmoothing:'antialiased',MsTextSizeAdjust:'100%',WebkitTextSizeAdjust:'100%',minHeight:'100%'});css.global('body',{font:"".concat(typography.rootSize,"px/").concat(typography.lineHeight," ").concat(typography.family),overflow:'auto',margin:0,WebkitOverflowScrolling:'touch',WebkitUserSelect:'none'});css.global('[data-pattern]',{height:'100% !important'});
3
+ */
4
+
5
+ import { css } from 'glamor';
6
+ import { themeConfig } from "../../helpers/config";
7
+ const {
8
+ typography
9
+ } = themeConfig;
10
+ css.global('*, *:before, *:after', {
11
+ boxSizing: 'border-box'
12
+ });
13
+ css.global('html, body', {
14
+ WebkitTapHighlightColor: 'transparent',
15
+ width: '100%',
16
+ height: '100%'
17
+ });
18
+ css.global('html', {
19
+ overflow: 'hidden',
20
+ MozOsxFontSmoothing: 'grayscale',
21
+ WebkitFontSmoothing: 'antialiased',
22
+ MsTextSizeAdjust: '100%',
23
+ WebkitTextSizeAdjust: '100%',
24
+ minHeight: '100%'
25
+ });
26
+ css.global('body', {
27
+ font: `${typography.rootSize}px/${typography.lineHeight} ${typography.family}`,
28
+ overflow: 'auto',
29
+ margin: 0,
30
+ WebkitOverflowScrolling: 'touch',
31
+ WebkitUserSelect: 'none'
32
+ });
33
+ css.global('[data-pattern]', {
34
+ height: '100% !important'
35
+ });