@micromag/screen-urbania-horoscope 0.3.220 → 0.3.223
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 +7 -6
- package/lib/index.js +7 -6
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -558,7 +558,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
558
558
|
return signValueId === defaultSign.id;
|
|
559
559
|
}) || signsValue[index] : null), defaultSign);
|
|
560
560
|
});
|
|
561
|
-
}, []);
|
|
561
|
+
}, [signsValue]);
|
|
562
562
|
|
|
563
563
|
var _useScreenSize = useScreenSize(),
|
|
564
564
|
width = _useScreenSize.width,
|
|
@@ -618,12 +618,12 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
618
618
|
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
619
619
|
var onSelectSign = useCallback(function (e, id) {
|
|
620
620
|
e.stopPropagation();
|
|
621
|
-
var
|
|
621
|
+
var foundSignIndex = signs.findIndex(function (s) {
|
|
622
622
|
return s.id === id;
|
|
623
623
|
});
|
|
624
|
-
setSelectedSign(
|
|
624
|
+
setSelectedSign(foundSignIndex);
|
|
625
625
|
setShowModal(true);
|
|
626
|
-
trackScreenEvent('UrbaniaHoroscope', 'select_sign',
|
|
626
|
+
trackScreenEvent('UrbaniaHoroscope', 'select_sign', signs[foundSignIndex]);
|
|
627
627
|
}, [signs, setSelectedSign, trackScreenEvent]);
|
|
628
628
|
var onCloseModal = useCallback(function () {
|
|
629
629
|
setShowModal(0);
|
|
@@ -776,7 +776,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
776
776
|
var index = screenState.split('.').pop();
|
|
777
777
|
setShowSignsGrid(1);
|
|
778
778
|
setShowModal(1);
|
|
779
|
-
setSelectedSign(
|
|
779
|
+
setSelectedSign(index);
|
|
780
780
|
}
|
|
781
781
|
}, [screenState]);
|
|
782
782
|
useEffect(function () {
|
|
@@ -936,7 +936,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
936
936
|
}, bindModalDrag()), /*#__PURE__*/React.createElement(SignModal, {
|
|
937
937
|
width: width,
|
|
938
938
|
height: height,
|
|
939
|
-
sign: selectedSign,
|
|
939
|
+
sign: signs[selectedSign],
|
|
940
940
|
subtitle: signSubtitle,
|
|
941
941
|
onClick: onCloseModal
|
|
942
942
|
})), !isPlaceholder ? /*#__PURE__*/React.createElement(animated.div, {
|
|
@@ -1072,6 +1072,7 @@ var definition = [{
|
|
|
1072
1072
|
defaultValue: signs,
|
|
1073
1073
|
repeatable: true,
|
|
1074
1074
|
withoutCreate: true,
|
|
1075
|
+
fieldName: 'signs',
|
|
1075
1076
|
fields: [{
|
|
1076
1077
|
name: 'word',
|
|
1077
1078
|
type: 'heading-element',
|
package/lib/index.js
CHANGED
|
@@ -603,7 +603,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
603
603
|
return signValueId === defaultSign.id;
|
|
604
604
|
}) || signsValue[index] : null), defaultSign);
|
|
605
605
|
});
|
|
606
|
-
}, []);
|
|
606
|
+
}, [signsValue]);
|
|
607
607
|
|
|
608
608
|
var _useScreenSize = contexts.useScreenSize(),
|
|
609
609
|
width = _useScreenSize.width,
|
|
@@ -663,12 +663,12 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
663
663
|
}, [setShowSignsGrid, setShowModal, enableInteraction, trackScreenEvent]);
|
|
664
664
|
var onSelectSign = React.useCallback(function (e, id) {
|
|
665
665
|
e.stopPropagation();
|
|
666
|
-
var
|
|
666
|
+
var foundSignIndex = signs.findIndex(function (s) {
|
|
667
667
|
return s.id === id;
|
|
668
668
|
});
|
|
669
|
-
setSelectedSign(
|
|
669
|
+
setSelectedSign(foundSignIndex);
|
|
670
670
|
setShowModal(true);
|
|
671
|
-
trackScreenEvent('UrbaniaHoroscope', 'select_sign',
|
|
671
|
+
trackScreenEvent('UrbaniaHoroscope', 'select_sign', signs[foundSignIndex]);
|
|
672
672
|
}, [signs, setSelectedSign, trackScreenEvent]);
|
|
673
673
|
var onCloseModal = React.useCallback(function () {
|
|
674
674
|
setShowModal(0);
|
|
@@ -821,7 +821,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
821
821
|
var index = screenState.split('.').pop();
|
|
822
822
|
setShowSignsGrid(1);
|
|
823
823
|
setShowModal(1);
|
|
824
|
-
setSelectedSign(
|
|
824
|
+
setSelectedSign(index);
|
|
825
825
|
}
|
|
826
826
|
}, [screenState]);
|
|
827
827
|
React.useEffect(function () {
|
|
@@ -981,7 +981,7 @@ var UrbaniaHoroscope = function UrbaniaHoroscope(_ref) {
|
|
|
981
981
|
}, bindModalDrag()), /*#__PURE__*/React__default["default"].createElement(SignModal, {
|
|
982
982
|
width: width,
|
|
983
983
|
height: height,
|
|
984
|
-
sign: selectedSign,
|
|
984
|
+
sign: signs[selectedSign],
|
|
985
985
|
subtitle: signSubtitle,
|
|
986
986
|
onClick: onCloseModal
|
|
987
987
|
})), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(web.animated.div, {
|
|
@@ -1117,6 +1117,7 @@ var definition = [{
|
|
|
1117
1117
|
defaultValue: signs,
|
|
1118
1118
|
repeatable: true,
|
|
1119
1119
|
withoutCreate: true,
|
|
1120
|
+
fieldName: 'signs',
|
|
1120
1121
|
fields: [{
|
|
1121
1122
|
name: 'word',
|
|
1122
1123
|
type: 'heading-element',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-horoscope",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.223",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b44e7e58447082a3e8442223788e27da9c5b2237"
|
|
79
79
|
}
|