@micromag/screen-keypad 0.3.658 → 0.3.660
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.
- package/es/index.js +10 -3
- package/package.json +18 -18
package/es/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
4
4
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
5
5
|
import { animated } from '@react-spring/web';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
+
import { isString } from 'lodash';
|
|
7
8
|
import PropTypes from 'prop-types';
|
|
8
9
|
import React, { useRef, useMemo, useState, useCallback, useEffect } from 'react';
|
|
9
10
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
@@ -418,7 +419,7 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
418
419
|
_ref15$id = _ref15.id,
|
|
419
420
|
id = _ref15$id === void 0 ? null : _ref15$id,
|
|
420
421
|
_ref15$label = _ref15.label,
|
|
421
|
-
|
|
422
|
+
itemLabel = _ref15$label === void 0 ? null : _ref15$label,
|
|
422
423
|
_ref15$visual = _ref15.visual,
|
|
423
424
|
visual = _ref15$visual === void 0 ? null : _ref15$visual,
|
|
424
425
|
_ref15$textStyle = _ref15.textStyle,
|
|
@@ -446,6 +447,12 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
446
447
|
var _ref18 = content || {},
|
|
447
448
|
_ref18$body = _ref18.body,
|
|
448
449
|
contentBody = _ref18$body === void 0 ? null : _ref18$body;
|
|
450
|
+
var finalLabel = isString(itemLabel) ? {
|
|
451
|
+
body: itemLabel
|
|
452
|
+
} : itemLabel || {};
|
|
453
|
+
var _ref19 = finalLabel || {},
|
|
454
|
+
_ref19$body = _ref19.body,
|
|
455
|
+
label = _ref19$body === void 0 ? null : _ref19$body;
|
|
449
456
|
var key = label || visualUrl || id;
|
|
450
457
|
var isEmpty = label === null && visual === null;
|
|
451
458
|
var isExternalLink = url !== null && !inWebView;
|
|
@@ -488,9 +495,9 @@ var KeypadScreen = function KeypadScreen(_ref) {
|
|
|
488
495
|
}),
|
|
489
496
|
emptyClassName: classNames([styles.empty, styles.emptyButtonLabel]),
|
|
490
497
|
isEmpty: label === null
|
|
491
|
-
}, label !== null || !isInteractivePreview ? /*#__PURE__*/React.createElement(
|
|
498
|
+
}, label !== null || !isInteractivePreview ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
492
499
|
className: styles.buttonLabel
|
|
493
|
-
},
|
|
500
|
+
}, finalLabel)) : null)));
|
|
494
501
|
});
|
|
495
502
|
}, [items, screenState, keypadSettings, buttonAlignment, buttonBoxStyle, buttonTextStyle, buttonLayout]);
|
|
496
503
|
useEffect(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-keypad",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.660",
|
|
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.
|
|
69
|
-
"@micromag/element-background": "^0.3.
|
|
70
|
-
"@micromag/element-button": "^0.3.
|
|
71
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
72
|
-
"@micromag/element-container": "^0.3.
|
|
73
|
-
"@micromag/element-footer": "^0.3.
|
|
74
|
-
"@micromag/element-grid": "^0.3.
|
|
75
|
-
"@micromag/element-header": "^0.3.
|
|
76
|
-
"@micromag/element-heading": "^0.3.
|
|
77
|
-
"@micromag/element-keypad": "^0.3.
|
|
78
|
-
"@micromag/element-layout": "^0.3.
|
|
79
|
-
"@micromag/element-scroll": "^0.3.
|
|
80
|
-
"@micromag/element-text": "^0.3.
|
|
81
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
82
|
-
"@micromag/element-visual": "^0.3.
|
|
83
|
-
"@micromag/transforms": "^0.3.
|
|
68
|
+
"@micromag/core": "^0.3.660",
|
|
69
|
+
"@micromag/element-background": "^0.3.660",
|
|
70
|
+
"@micromag/element-button": "^0.3.660",
|
|
71
|
+
"@micromag/element-call-to-action": "^0.3.660",
|
|
72
|
+
"@micromag/element-container": "^0.3.660",
|
|
73
|
+
"@micromag/element-footer": "^0.3.660",
|
|
74
|
+
"@micromag/element-grid": "^0.3.660",
|
|
75
|
+
"@micromag/element-header": "^0.3.660",
|
|
76
|
+
"@micromag/element-heading": "^0.3.660",
|
|
77
|
+
"@micromag/element-keypad": "^0.3.660",
|
|
78
|
+
"@micromag/element-layout": "^0.3.660",
|
|
79
|
+
"@micromag/element-scroll": "^0.3.660",
|
|
80
|
+
"@micromag/element-text": "^0.3.660",
|
|
81
|
+
"@micromag/element-urbania-author": "^0.3.660",
|
|
82
|
+
"@micromag/element-visual": "^0.3.660",
|
|
83
|
+
"@micromag/transforms": "^0.3.660",
|
|
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": "
|
|
98
|
+
"gitHead": "584698bf4ef786f8fd35853328977554367515d9"
|
|
99
99
|
}
|