@micromag/screen-keypad 0.3.606 → 0.3.608

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 (2) hide show
  1. package/es/index.js +44 -44
  2. package/package.json +18 -18
package/es/index.js CHANGED
@@ -192,53 +192,53 @@ var KeypadScreen = function KeypadScreen(_ref) {
192
192
  var hasTitle = isTextFilled(title);
193
193
  var _ref2 = title || {},
194
194
  _ref2$textStyle = _ref2.textStyle,
195
- titleTextStyle = _ref2$textStyle === void 0 ? null : _ref2$textStyle;
195
+ titleTextStyle = _ref2$textStyle === undefined ? null : _ref2$textStyle;
196
196
  var _useDimensionObserver = useDimensionObserver(),
197
197
  headerRef = _useDimensionObserver.ref,
198
198
  _useDimensionObserver2 = _useDimensionObserver.height,
199
- headerHeight = _useDimensionObserver2 === void 0 ? 0 : _useDimensionObserver2;
199
+ headerHeight = _useDimensionObserver2 === undefined ? 0 : _useDimensionObserver2;
200
200
  var _useDimensionObserver3 = useDimensionObserver(),
201
201
  footerRef = _useDimensionObserver3.ref,
202
202
  _useDimensionObserver4 = _useDimensionObserver3.height,
203
- footerHeight = _useDimensionObserver4 === void 0 ? 0 : _useDimensionObserver4;
203
+ footerHeight = _useDimensionObserver4 === undefined ? 0 : _useDimensionObserver4;
204
204
  var backgroundPlaying = current && (isView || isEdit);
205
205
  var mediaShouldLoad = !isPlaceholder && (current || preload);
206
206
  var isInteractivePreview = isEdit && screenState === null;
207
207
  var _ref3 = keypadSettings || {},
208
208
  _ref3$layout = _ref3.layout,
209
- keypadLayout = _ref3$layout === void 0 ? null : _ref3$layout;
209
+ keypadLayout = _ref3$layout === undefined ? null : _ref3$layout;
210
210
  var _ref4 = keypadLayout || {},
211
211
  _ref4$columnAlign = _ref4.columnAlign,
212
- columnAlign = _ref4$columnAlign === void 0 ? null : _ref4$columnAlign,
212
+ columnAlign = _ref4$columnAlign === undefined ? null : _ref4$columnAlign,
213
213
  _ref4$columns = _ref4.columns,
214
- columns = _ref4$columns === void 0 ? null : _ref4$columns,
214
+ columns = _ref4$columns === undefined ? null : _ref4$columns,
215
215
  _ref4$spacing = _ref4.spacing,
216
- columnSpacing = _ref4$spacing === void 0 ? null : _ref4$spacing,
216
+ columnSpacing = _ref4$spacing === undefined ? null : _ref4$spacing,
217
217
  _ref4$withSquareItems = _ref4.withSquareItems,
218
- withSquareItems = _ref4$withSquareItems === void 0 ? false : _ref4$withSquareItems;
218
+ withSquareItems = _ref4$withSquareItems === undefined ? false : _ref4$withSquareItems;
219
219
  var _ref5 = buttonStyles || {},
220
220
  _ref5$layout = _ref5.layout,
221
- buttonLayout = _ref5$layout === void 0 ? null : _ref5$layout,
221
+ buttonLayout = _ref5$layout === undefined ? null : _ref5$layout,
222
222
  _ref5$textStyle = _ref5.textStyle,
223
- buttonTextStyle = _ref5$textStyle === void 0 ? null : _ref5$textStyle,
223
+ buttonTextStyle = _ref5$textStyle === undefined ? null : _ref5$textStyle,
224
224
  _ref5$boxStyle = _ref5.boxStyle,
225
- buttonBoxStyle = _ref5$boxStyle === void 0 ? null : _ref5$boxStyle;
225
+ buttonBoxStyle = _ref5$boxStyle === undefined ? null : _ref5$boxStyle;
226
226
  var _ref6 = popupStyles || {},
227
227
  _ref6$layout = _ref6.layout,
228
- popupLayout = _ref6$layout === void 0 ? null : _ref6$layout,
228
+ popupLayout = _ref6$layout === undefined ? null : _ref6$layout,
229
229
  _ref6$headingTextStyl = _ref6.headingTextStyle,
230
- headingTextStyle = _ref6$headingTextStyl === void 0 ? null : _ref6$headingTextStyl,
230
+ headingTextStyle = _ref6$headingTextStyl === undefined ? null : _ref6$headingTextStyl,
231
231
  _ref6$contentTextStyl = _ref6.contentTextStyle,
232
- contentTextStyle = _ref6$contentTextStyl === void 0 ? null : _ref6$contentTextStyl,
232
+ contentTextStyle = _ref6$contentTextStyl === undefined ? null : _ref6$contentTextStyl,
233
233
  _ref6$button = _ref6.button,
234
- popupButtons = _ref6$button === void 0 ? null : _ref6$button,
234
+ popupButtons = _ref6$button === undefined ? null : _ref6$button,
235
235
  _ref6$boxStyle = _ref6.boxStyle,
236
- popupBoxStyle = _ref6$boxStyle === void 0 ? null : _ref6$boxStyle;
236
+ popupBoxStyle = _ref6$boxStyle === undefined ? null : _ref6$boxStyle;
237
237
  var _ref7 = popupButtons || {},
238
238
  _ref7$buttonTextStyle = _ref7.buttonTextStyle,
239
- popupButtonsTextStyle = _ref7$buttonTextStyle === void 0 ? null : _ref7$buttonTextStyle,
239
+ popupButtonsTextStyle = _ref7$buttonTextStyle === undefined ? null : _ref7$buttonTextStyle,
240
240
  _ref7$boxStyle = _ref7.boxStyle,
241
- popupButtonsBoxStyle = _ref7$boxStyle === void 0 ? null : _ref7$boxStyle;
241
+ popupButtonsBoxStyle = _ref7$boxStyle === undefined ? null : _ref7$boxStyle;
242
242
  var popupLayoutClassName = useMemo(function () {
243
243
  return popupLayout !== null ? camelCase(popupLayout) : '';
244
244
  }, [popupLayout]);
@@ -252,38 +252,38 @@ var KeypadScreen = function KeypadScreen(_ref) {
252
252
  setPopup = _useState4[1];
253
253
  var _ref8 = popup || {},
254
254
  _ref8$heading = _ref8.heading,
255
- popupHeading = _ref8$heading === void 0 ? null : _ref8$heading,
255
+ popupHeading = _ref8$heading === undefined ? null : _ref8$heading,
256
256
  _ref8$content = _ref8.content,
257
- popupContent = _ref8$content === void 0 ? null : _ref8$content,
257
+ popupContent = _ref8$content === undefined ? null : _ref8$content,
258
258
  _ref8$largeVisual = _ref8.largeVisual,
259
- largeVisual = _ref8$largeVisual === void 0 ? null : _ref8$largeVisual,
259
+ largeVisual = _ref8$largeVisual === undefined ? null : _ref8$largeVisual,
260
260
  _ref8$button = _ref8.button,
261
- popupButton = _ref8$button === void 0 ? null : _ref8$button;
261
+ popupButton = _ref8$button === undefined ? null : _ref8$button;
262
262
  var hasPopupHeading = isTextFilled(popupHeading);
263
263
  var _ref9 = popupHeading || {},
264
264
  _ref9$textStyle = _ref9.textStyle,
265
- popupHeadingTextStyle = _ref9$textStyle === void 0 ? null : _ref9$textStyle;
265
+ popupHeadingTextStyle = _ref9$textStyle === undefined ? null : _ref9$textStyle;
266
266
  var hasPopupContent = isTextFilled(popupContent);
267
267
  var _ref10 = popupContent || {},
268
268
  _ref10$textStyle = _ref10.textStyle,
269
- popupContentTextStyle = _ref10$textStyle === void 0 ? null : _ref10$textStyle;
269
+ popupContentTextStyle = _ref10$textStyle === undefined ? null : _ref10$textStyle;
270
270
  var _ref11 = popupButton || {},
271
271
  _ref11$label = _ref11.label,
272
- buttonLabel = _ref11$label === void 0 ? null : _ref11$label,
272
+ buttonLabel = _ref11$label === undefined ? null : _ref11$label,
273
273
  _ref11$url = _ref11.url,
274
- buttonUrl = _ref11$url === void 0 ? null : _ref11$url,
274
+ buttonUrl = _ref11$url === undefined ? null : _ref11$url,
275
275
  _ref11$inWebView = _ref11.inWebView,
276
- popupInWebView = _ref11$inWebView === void 0 ? false : _ref11$inWebView,
276
+ popupInWebView = _ref11$inWebView === undefined ? false : _ref11$inWebView,
277
277
  _ref11$boxStyle = _ref11.boxStyle,
278
- popupButtonBoxStyle = _ref11$boxStyle === void 0 ? null : _ref11$boxStyle;
278
+ popupButtonBoxStyle = _ref11$boxStyle === undefined ? null : _ref11$boxStyle;
279
279
  var onItemClick = useCallback(function (e, item) {
280
280
  e.stopPropagation();
281
281
  trackScreenEvent('click_item', item);
282
282
  var _ref12 = item || {},
283
283
  _ref12$inWebView = _ref12.inWebView,
284
- inWebView = _ref12$inWebView === void 0 ? false : _ref12$inWebView,
284
+ inWebView = _ref12$inWebView === undefined ? false : _ref12$inWebView,
285
285
  _ref12$url = _ref12.url,
286
- url = _ref12$url === void 0 ? null : _ref12$url;
286
+ url = _ref12$url === undefined ? null : _ref12$url;
287
287
  if (inWebView && url !== null) {
288
288
  openWebView({
289
289
  url: url
@@ -314,7 +314,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
314
314
  setPopupDragDirection = _useState6[1];
315
315
  var onPopupScrollHeightChange = useCallback(function (_ref13) {
316
316
  var _ref13$scrolleeHeight = _ref13.scrolleeHeight,
317
- scrolleeHeight = _ref13$scrolleeHeight === void 0 ? 0 : _ref13$scrolleeHeight;
317
+ scrolleeHeight = _ref13$scrolleeHeight === undefined ? 0 : _ref13$scrolleeHeight;
318
318
  if (Math.floor(scrolleeHeight) >= Math.floor(height)) {
319
319
  setPopupDragDirection('top');
320
320
  } else {
@@ -410,34 +410,34 @@ var KeypadScreen = function KeypadScreen(_ref) {
410
410
  return (items === null || items.length === 0 ? placeholders : items).map(function (item) {
411
411
  var _ref15 = item || {},
412
412
  _ref15$id = _ref15.id,
413
- id = _ref15$id === void 0 ? null : _ref15$id,
413
+ id = _ref15$id === undefined ? null : _ref15$id,
414
414
  _ref15$label = _ref15.label,
415
- label = _ref15$label === void 0 ? null : _ref15$label,
415
+ label = _ref15$label === undefined ? null : _ref15$label,
416
416
  _ref15$visual = _ref15.visual,
417
- visual = _ref15$visual === void 0 ? null : _ref15$visual,
417
+ visual = _ref15$visual === undefined ? null : _ref15$visual,
418
418
  _ref15$textStyle = _ref15.textStyle,
419
- textStyle = _ref15$textStyle === void 0 ? null : _ref15$textStyle,
419
+ textStyle = _ref15$textStyle === undefined ? null : _ref15$textStyle,
420
420
  _ref15$boxStyle = _ref15.boxStyle,
421
- boxStyle = _ref15$boxStyle === void 0 ? null : _ref15$boxStyle,
421
+ boxStyle = _ref15$boxStyle === undefined ? null : _ref15$boxStyle,
422
422
  _ref15$heading = _ref15.heading,
423
- heading = _ref15$heading === void 0 ? null : _ref15$heading,
423
+ heading = _ref15$heading === undefined ? null : _ref15$heading,
424
424
  _ref15$content = _ref15.content,
425
- content = _ref15$content === void 0 ? null : _ref15$content,
425
+ content = _ref15$content === undefined ? null : _ref15$content,
426
426
  _ref15$url = _ref15.url,
427
- url = _ref15$url === void 0 ? null : _ref15$url,
427
+ url = _ref15$url === undefined ? null : _ref15$url,
428
428
  _ref15$inWebView = _ref15.inWebView,
429
- inWebView = _ref15$inWebView === void 0 ? false : _ref15$inWebView,
429
+ inWebView = _ref15$inWebView === undefined ? false : _ref15$inWebView,
430
430
  _ref15$largeVisual = _ref15.largeVisual,
431
- popupLargeVisual = _ref15$largeVisual === void 0 ? null : _ref15$largeVisual;
431
+ popupLargeVisual = _ref15$largeVisual === undefined ? null : _ref15$largeVisual;
432
432
  var _ref16 = visual || {},
433
433
  _ref16$url = _ref16.url,
434
- visualUrl = _ref16$url === void 0 ? null : _ref16$url;
434
+ visualUrl = _ref16$url === undefined ? null : _ref16$url;
435
435
  var _ref17 = heading || {},
436
436
  _ref17$body = _ref17.body,
437
- headingBody = _ref17$body === void 0 ? null : _ref17$body;
437
+ headingBody = _ref17$body === undefined ? null : _ref17$body;
438
438
  var _ref18 = content || {},
439
439
  _ref18$body = _ref18.body,
440
- contentBody = _ref18$body === void 0 ? null : _ref18$body;
440
+ contentBody = _ref18$body === undefined ? null : _ref18$body;
441
441
  var key = label || visualUrl || id;
442
442
  var isEmpty = label === null && visual === null;
443
443
  var isExternalLink = url !== null && !inWebView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-keypad",
3
- "version": "0.3.606",
3
+ "version": "0.3.608",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -65,22 +65,22 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@babel/runtime": "^7.13.10",
68
- "@micromag/core": "^0.3.606",
69
- "@micromag/element-background": "^0.3.606",
70
- "@micromag/element-button": "^0.3.606",
71
- "@micromag/element-call-to-action": "^0.3.606",
72
- "@micromag/element-container": "^0.3.606",
73
- "@micromag/element-footer": "^0.3.606",
74
- "@micromag/element-grid": "^0.3.606",
75
- "@micromag/element-header": "^0.3.606",
76
- "@micromag/element-heading": "^0.3.606",
77
- "@micromag/element-keypad": "^0.3.606",
78
- "@micromag/element-layout": "^0.3.606",
79
- "@micromag/element-scroll": "^0.3.606",
80
- "@micromag/element-text": "^0.3.606",
81
- "@micromag/element-urbania-author": "^0.3.606",
82
- "@micromag/element-visual": "^0.3.606",
83
- "@micromag/transforms": "^0.3.606",
68
+ "@micromag/core": "^0.3.608",
69
+ "@micromag/element-background": "^0.3.608",
70
+ "@micromag/element-button": "^0.3.608",
71
+ "@micromag/element-call-to-action": "^0.3.608",
72
+ "@micromag/element-container": "^0.3.608",
73
+ "@micromag/element-footer": "^0.3.608",
74
+ "@micromag/element-grid": "^0.3.608",
75
+ "@micromag/element-header": "^0.3.608",
76
+ "@micromag/element-heading": "^0.3.608",
77
+ "@micromag/element-keypad": "^0.3.608",
78
+ "@micromag/element-layout": "^0.3.608",
79
+ "@micromag/element-scroll": "^0.3.608",
80
+ "@micromag/element-text": "^0.3.608",
81
+ "@micromag/element-urbania-author": "^0.3.608",
82
+ "@micromag/element-visual": "^0.3.608",
83
+ "@micromag/transforms": "^0.3.608",
84
84
  "@react-spring/core": "^9.6.1",
85
85
  "@react-spring/web": "^9.6.1",
86
86
  "@use-gesture/react": "^10.3.0",
@@ -95,5 +95,5 @@
95
95
  "access": "public",
96
96
  "registry": "https://registry.npmjs.org/"
97
97
  },
98
- "gitHead": "0e2ee772952cc24e6824806bd23a7c65c8858c73"
98
+ "gitHead": "02f8cfe4dde0c33bec9ed7c3bdb671cd8acf78bc"
99
99
  }