@mjhls/mjh-framework 1.0.1070 → 1.0.1072
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/README.md +1 -1
- package/dist/cjs/AlgoliaSearch.js +73 -105
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/AuthWrapper.js +19 -89
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/{ImageSlider-d65bc9c8.js → ImageSlider-984a697b.js} +116 -156
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/{MediaSeriesCard-2e65fe95.js → MediaSeriesCard-19aab049.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +4 -4
- package/dist/cjs/MediaSeriesLandingPaginated.js +4 -4
- package/dist/cjs/PartnerDetailListing.js +3 -2
- package/dist/cjs/PartnerDetailListingPaginated.js +3 -2
- package/dist/cjs/PodcastsLanding.js +2 -2
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/{Tooltip-02a841b5.js → Tooltip-96fe6ef6.js} +34 -86
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-9ec837cc.js → index-50be6759.js} +25 -9
- package/dist/cjs/{index-4e9a219e.js → index-a075129d.js} +162 -112
- package/dist/cjs/index.js +5 -3
- package/dist/cjs/typeof-1358762e.js +33 -0
- package/dist/esm/AlgoliaSearch.js +72 -104
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/AuthWrapper.js +16 -86
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/{ImageSlider-da225417.js → ImageSlider-497e9c88.js} +117 -157
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/{MediaSeriesCard-27cce8ea.js → MediaSeriesCard-6d08d387.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +4 -4
- package/dist/esm/MediaSeriesLandingPaginated.js +4 -4
- package/dist/esm/PartnerDetailListing.js +3 -2
- package/dist/esm/PartnerDetailListingPaginated.js +3 -2
- package/dist/esm/PodcastsLanding.js +2 -2
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/{Tooltip-7a093cd4.js → Tooltip-bc98d17e.js} +192 -244
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/defineProperty-23a8f8cd.js +68 -0
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-1fd45cc5.js → index-6be9a1c4.js} +163 -113
- package/dist/esm/{index-0ce54f8a.js → index-98ca9cec.js} +25 -10
- package/dist/esm/index.js +5 -3
- package/dist/esm/typeof-2f07d0e8.js +30 -0
- package/package.json +1 -1
|
@@ -8709,21 +8709,27 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8709
8709
|
showAnswer = _useState4[0],
|
|
8710
8710
|
setShowAnswer = _useState4[1];
|
|
8711
8711
|
|
|
8712
|
+
var _useState5 = React.useState(false),
|
|
8713
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8714
|
+
showBorders = _useState6[0],
|
|
8715
|
+
setShowBorders = _useState6[1];
|
|
8716
|
+
|
|
8712
8717
|
var choices = node.choices,
|
|
8713
8718
|
question = node.question,
|
|
8714
8719
|
response = node.response,
|
|
8715
8720
|
_node$showResults = node.showResults,
|
|
8716
|
-
showResults = _node$showResults === undefined ?
|
|
8721
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults;
|
|
8717
8722
|
|
|
8723
|
+
var inputRef = React.useRef([]);
|
|
8718
8724
|
|
|
8719
8725
|
var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
|
|
8720
8726
|
e.preventDefault();
|
|
8721
8727
|
onVote(node._key, selectedChoice);
|
|
8722
|
-
//setShowAnswer(true)
|
|
8723
8728
|
};
|
|
8724
8729
|
React.useEffect(function () {
|
|
8725
8730
|
if (showResults) {
|
|
8726
|
-
setShowAnswer(
|
|
8731
|
+
setShowAnswer(true);
|
|
8732
|
+
setSelectedChoice(showResults);
|
|
8727
8733
|
}
|
|
8728
8734
|
}, [showResults]);
|
|
8729
8735
|
|
|
@@ -8735,9 +8741,32 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8735
8741
|
return acc;
|
|
8736
8742
|
}
|
|
8737
8743
|
}, 0);
|
|
8744
|
+
|
|
8745
|
+
React.useEffect(function () {
|
|
8746
|
+
var tempArray = choices.filter(function (choice) {
|
|
8747
|
+
if (choice.hasOwnProperty('choiceAnswer')) {
|
|
8748
|
+
return choice;
|
|
8749
|
+
}
|
|
8750
|
+
});
|
|
8751
|
+
setShowBorders(tempArray.length > 0);
|
|
8752
|
+
}, [choices]);
|
|
8753
|
+
|
|
8754
|
+
function checkChoice(key) {
|
|
8755
|
+
return key === selectedChoice;
|
|
8756
|
+
}
|
|
8757
|
+
|
|
8758
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8759
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8760
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8761
|
+
} else {
|
|
8762
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8763
|
+
setSelectedChoice(inputRef.current[e.currentTarget.dataset['index']].value);
|
|
8764
|
+
}
|
|
8765
|
+
};
|
|
8766
|
+
|
|
8738
8767
|
return React__default["default"].createElement(
|
|
8739
|
-
|
|
8740
|
-
|
|
8768
|
+
'div',
|
|
8769
|
+
{ className: 'pollHolder mb-3' },
|
|
8741
8770
|
question && React__default["default"].createElement(
|
|
8742
8771
|
'p',
|
|
8743
8772
|
{ className: 'font-weight-bold' },
|
|
@@ -8745,78 +8774,74 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8745
8774
|
),
|
|
8746
8775
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8747
8776
|
'form',
|
|
8748
|
-
{ onSubmit: function onSubmit(e) {
|
|
8777
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8749
8778
|
return onSubmitPoll(e);
|
|
8750
8779
|
} },
|
|
8751
|
-
choices && choices.map(function (choice) {
|
|
8780
|
+
choices && choices.map(function (choice, index) {
|
|
8752
8781
|
return React__default["default"].createElement(
|
|
8753
8782
|
'div',
|
|
8754
|
-
{ key: choice._key
|
|
8783
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8784
|
+
return userChoiceSelection(e);
|
|
8785
|
+
} },
|
|
8755
8786
|
React__default["default"].createElement(
|
|
8756
8787
|
'label',
|
|
8757
8788
|
{ className: 'pl-2' },
|
|
8758
|
-
React__default["default"].createElement('input', {
|
|
8759
|
-
return
|
|
8760
|
-
} }),
|
|
8789
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8790
|
+
return inputRef.current[index] = el;
|
|
8791
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8761
8792
|
' ' + choice.choiceText
|
|
8762
8793
|
)
|
|
8763
8794
|
);
|
|
8764
8795
|
}),
|
|
8765
8796
|
React__default["default"].createElement(
|
|
8766
8797
|
reactBootstrap.Button,
|
|
8767
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8798
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8768
8799
|
'Vote'
|
|
8769
8800
|
)
|
|
8770
8801
|
),
|
|
8771
|
-
React__default["default"].createElement(
|
|
8802
|
+
showAnswer && React__default["default"].createElement(
|
|
8772
8803
|
'div',
|
|
8773
|
-
{ className: 'progress-container' },
|
|
8804
|
+
{ className: 'progress-container mb-3' },
|
|
8774
8805
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8775
8806
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8776
8807
|
return React__default["default"].createElement(
|
|
8777
8808
|
'div',
|
|
8778
|
-
{
|
|
8809
|
+
{
|
|
8810
|
+
key: choice._key,
|
|
8811
|
+
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8812
|
+
className: 'mb-3' },
|
|
8779
8813
|
React__default["default"].createElement(
|
|
8780
8814
|
'div',
|
|
8781
8815
|
{ className: 'correct-answer' },
|
|
8816
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8782
8817
|
React__default["default"].createElement(
|
|
8783
8818
|
'div',
|
|
8784
8819
|
null,
|
|
8785
8820
|
choice.choiceText
|
|
8786
8821
|
),
|
|
8787
|
-
|
|
8822
|
+
React__default["default"].createElement(
|
|
8788
8823
|
'div',
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
)
|
|
8824
|
+
{ className: 'float-right' },
|
|
8825
|
+
percentage,
|
|
8826
|
+
'% (',
|
|
8827
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8828
|
+
' Votes)'
|
|
8795
8829
|
)
|
|
8796
|
-
),
|
|
8797
|
-
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8798
|
-
React__default["default"].createElement(
|
|
8799
|
-
'span',
|
|
8800
|
-
{ className: 'float-right' },
|
|
8801
|
-
percentage,
|
|
8802
|
-
'% (',
|
|
8803
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8804
|
-
' Votes)'
|
|
8805
8830
|
)
|
|
8806
8831
|
);
|
|
8807
|
-
})
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8832
|
+
}),
|
|
8833
|
+
showAnswer && React__default["default"].createElement(
|
|
8834
|
+
'h4',
|
|
8835
|
+
{ className: 'text-center small p-3' },
|
|
8836
|
+
'Total Votes: ',
|
|
8837
|
+
choicesTotalCount
|
|
8838
|
+
)
|
|
8814
8839
|
),
|
|
8815
8840
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8816
8841
|
React__default["default"].createElement(
|
|
8817
8842
|
'style',
|
|
8818
8843
|
{ jsx: 'true' },
|
|
8819
|
-
'\n .correct-answer {\n display: flex;\n justify-content: space-between;\n }\n .
|
|
8844
|
+
'\n .formPoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: left;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .formPoll > div:hover {\n background-color: #cbcbcb;\n }\n .formPoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .pollHolder {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n clear: both;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n max-width: 75%;\n }\n '
|
|
8820
8845
|
)
|
|
8821
8846
|
);
|
|
8822
8847
|
};
|
|
@@ -8830,62 +8855,74 @@ var Poll = function Poll(_ref) {
|
|
|
8830
8855
|
_ref.showVotes;
|
|
8831
8856
|
var getSerializers = _ref.getSerializers;
|
|
8832
8857
|
|
|
8833
|
-
var _useState = React.useState(
|
|
8858
|
+
var _useState = React.useState([]),
|
|
8834
8859
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
8835
8860
|
selectedChoice = _useState2[0],
|
|
8836
8861
|
setSelectedChoice = _useState2[1];
|
|
8837
8862
|
|
|
8838
|
-
var _useState3 = React.useState(
|
|
8863
|
+
var _useState3 = React.useState(true),
|
|
8839
8864
|
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8840
|
-
|
|
8841
|
-
|
|
8865
|
+
disableVote = _useState4[0],
|
|
8866
|
+
setDisableVote = _useState4[1];
|
|
8867
|
+
|
|
8868
|
+
var _useState5 = React.useState(false),
|
|
8869
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8870
|
+
showAnswer = _useState6[0],
|
|
8871
|
+
setShowAnswer = _useState6[1];
|
|
8872
|
+
|
|
8873
|
+
var _useState7 = React.useState(false),
|
|
8874
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8875
|
+
showBorders = _useState8[0],
|
|
8876
|
+
setShowBorders = _useState8[1];
|
|
8842
8877
|
|
|
8843
8878
|
var choices = node.choices,
|
|
8844
8879
|
question = node.question,
|
|
8845
8880
|
response = node.response,
|
|
8846
8881
|
_node$showResults = node.showResults,
|
|
8847
|
-
showResults = _node$showResults === undefined ?
|
|
8882
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults;
|
|
8848
8883
|
|
|
8884
|
+
var inputRef = React.useRef([]);
|
|
8849
8885
|
|
|
8850
|
-
var onSubmitPoll = function onSubmitPoll(e
|
|
8886
|
+
var onSubmitPoll = function onSubmitPoll(e) {
|
|
8851
8887
|
e.preventDefault();
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
var input = _step.value;
|
|
8860
|
-
|
|
8861
|
-
if (input.nodeName === 'INPUT' && input.checked) {
|
|
8862
|
-
selections.push(input.value);
|
|
8863
|
-
}
|
|
8864
|
-
}
|
|
8865
|
-
} catch (err) {
|
|
8866
|
-
_didIteratorError = true;
|
|
8867
|
-
_iteratorError = err;
|
|
8868
|
-
} finally {
|
|
8869
|
-
try {
|
|
8870
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
8871
|
-
_iterator.return();
|
|
8872
|
-
}
|
|
8873
|
-
} finally {
|
|
8874
|
-
if (_didIteratorError) {
|
|
8875
|
-
throw _iteratorError;
|
|
8876
|
-
}
|
|
8877
|
-
}
|
|
8878
|
-
}
|
|
8879
|
-
|
|
8880
|
-
onVote(node._key, selections.join(','));
|
|
8881
|
-
//setShowAnswer(true)
|
|
8888
|
+
// const selections = []
|
|
8889
|
+
// for (let input of Object.values(e.currentTarget)) {
|
|
8890
|
+
// if (input.nodeName === 'INPUT' && input.checked) {
|
|
8891
|
+
// selections.push(input.value)
|
|
8892
|
+
// }
|
|
8893
|
+
// }
|
|
8894
|
+
onVote(node._key, selectedChoice.toString());
|
|
8882
8895
|
};
|
|
8883
8896
|
React.useEffect(function () {
|
|
8884
8897
|
if (showResults) {
|
|
8885
|
-
setShowAnswer(
|
|
8898
|
+
setShowAnswer(true);
|
|
8899
|
+
setSelectedChoice(showResults.split(','));
|
|
8886
8900
|
}
|
|
8887
8901
|
}, [showResults]);
|
|
8888
8902
|
|
|
8903
|
+
React.useEffect(function () {
|
|
8904
|
+
if (selectedChoice.length > 0) {
|
|
8905
|
+
setDisableVote(false);
|
|
8906
|
+
} else {
|
|
8907
|
+
setDisableVote(true);
|
|
8908
|
+
}
|
|
8909
|
+
}, [selectedChoice]);
|
|
8910
|
+
|
|
8911
|
+
React.useEffect(function () {
|
|
8912
|
+
var tempArray = choices.filter(function (choice) {
|
|
8913
|
+
if (choice.hasOwnProperty('choiceAnswer')) {
|
|
8914
|
+
return choice;
|
|
8915
|
+
}
|
|
8916
|
+
});
|
|
8917
|
+
setShowBorders(tempArray.length > 0);
|
|
8918
|
+
}, [choices]);
|
|
8919
|
+
|
|
8920
|
+
function checkChoice(key) {
|
|
8921
|
+
return selectedChoice.find(function (value) {
|
|
8922
|
+
return value === key;
|
|
8923
|
+
});
|
|
8924
|
+
}
|
|
8925
|
+
|
|
8889
8926
|
var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
|
|
8890
8927
|
if (choice.choiceCount) {
|
|
8891
8928
|
acc = acc + parseInt(choice.choiceCount);
|
|
@@ -8894,9 +8931,26 @@ var Poll = function Poll(_ref) {
|
|
|
8894
8931
|
return acc;
|
|
8895
8932
|
}
|
|
8896
8933
|
}, 0);
|
|
8934
|
+
|
|
8935
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8936
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8937
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8938
|
+
var updateChoices = selectedChoice.filter(function (choice) {
|
|
8939
|
+
if (inputRef.current[e.currentTarget.dataset['index']].value !== choice) {
|
|
8940
|
+
return choice;
|
|
8941
|
+
}
|
|
8942
|
+
});
|
|
8943
|
+
setSelectedChoice(updateChoices);
|
|
8944
|
+
} else {
|
|
8945
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8946
|
+
|
|
8947
|
+
setSelectedChoice([inputRef.current[e.currentTarget.dataset['index']].value].concat(toConsumableArray._toConsumableArray(selectedChoice)));
|
|
8948
|
+
}
|
|
8949
|
+
};
|
|
8950
|
+
|
|
8897
8951
|
return React__default["default"].createElement(
|
|
8898
|
-
|
|
8899
|
-
|
|
8952
|
+
'div',
|
|
8953
|
+
{ className: 'pollHolder mb-3' },
|
|
8900
8954
|
question && React__default["default"].createElement(
|
|
8901
8955
|
'p',
|
|
8902
8956
|
{ className: 'font-weight-bold' },
|
|
@@ -8904,78 +8958,74 @@ var Poll = function Poll(_ref) {
|
|
|
8904
8958
|
),
|
|
8905
8959
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8906
8960
|
'form',
|
|
8907
|
-
{ onSubmit: function onSubmit(e) {
|
|
8961
|
+
{ className: 'multiChoicePoll', onSubmit: function onSubmit(e) {
|
|
8908
8962
|
return onSubmitPoll(e);
|
|
8909
8963
|
} },
|
|
8910
|
-
choices && choices.map(function (choice) {
|
|
8964
|
+
choices && choices.map(function (choice, index) {
|
|
8911
8965
|
return React__default["default"].createElement(
|
|
8912
8966
|
'div',
|
|
8913
|
-
{ key: choice._key
|
|
8967
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8968
|
+
return userChoiceSelection(e);
|
|
8969
|
+
} },
|
|
8914
8970
|
React__default["default"].createElement(
|
|
8915
8971
|
'label',
|
|
8916
8972
|
{ className: 'pl-2' },
|
|
8917
|
-
React__default["default"].createElement('input', {
|
|
8918
|
-
return
|
|
8919
|
-
} }),
|
|
8973
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8974
|
+
return inputRef.current[index] = el;
|
|
8975
|
+
}, type: 'checkbox', id: 'male', name: choice._type, value: choice._key }),
|
|
8920
8976
|
' ' + choice.choiceText
|
|
8921
8977
|
)
|
|
8922
8978
|
);
|
|
8923
8979
|
}),
|
|
8924
8980
|
React__default["default"].createElement(
|
|
8925
8981
|
reactBootstrap.Button,
|
|
8926
|
-
{ disabled:
|
|
8982
|
+
{ disabled: disableVote, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8927
8983
|
'Vote'
|
|
8928
8984
|
)
|
|
8929
8985
|
),
|
|
8930
|
-
React__default["default"].createElement(
|
|
8986
|
+
showAnswer && React__default["default"].createElement(
|
|
8931
8987
|
'div',
|
|
8932
|
-
{ className: 'progress-container' },
|
|
8988
|
+
{ className: 'progress-container mb-3' },
|
|
8933
8989
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8934
8990
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8935
8991
|
return React__default["default"].createElement(
|
|
8936
8992
|
'div',
|
|
8937
|
-
{
|
|
8993
|
+
{
|
|
8994
|
+
key: choice._key,
|
|
8995
|
+
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8996
|
+
className: 'mb-3' },
|
|
8938
8997
|
React__default["default"].createElement(
|
|
8939
8998
|
'div',
|
|
8940
8999
|
{ className: 'correct-answer' },
|
|
9000
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8941
9001
|
React__default["default"].createElement(
|
|
8942
9002
|
'div',
|
|
8943
9003
|
null,
|
|
8944
9004
|
choice.choiceText
|
|
8945
9005
|
),
|
|
8946
|
-
|
|
9006
|
+
React__default["default"].createElement(
|
|
8947
9007
|
'div',
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
)
|
|
9008
|
+
{ className: 'float-right' },
|
|
9009
|
+
percentage,
|
|
9010
|
+
'% (',
|
|
9011
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
9012
|
+
' Votes)'
|
|
8954
9013
|
)
|
|
8955
|
-
),
|
|
8956
|
-
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8957
|
-
React__default["default"].createElement(
|
|
8958
|
-
'span',
|
|
8959
|
-
{ className: 'float-right' },
|
|
8960
|
-
percentage,
|
|
8961
|
-
'% (',
|
|
8962
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
8963
|
-
' Votes)'
|
|
8964
9014
|
)
|
|
8965
9015
|
);
|
|
8966
|
-
})
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
9016
|
+
}),
|
|
9017
|
+
showAnswer && React__default["default"].createElement(
|
|
9018
|
+
'h4',
|
|
9019
|
+
{ className: 'text-center small p-3' },
|
|
9020
|
+
'Total Votes: ',
|
|
9021
|
+
choicesTotalCount
|
|
9022
|
+
)
|
|
8973
9023
|
),
|
|
8974
9024
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8975
9025
|
React__default["default"].createElement(
|
|
8976
9026
|
'style',
|
|
8977
9027
|
{ jsx: 'true' },
|
|
8978
|
-
'\n .
|
|
9028
|
+
'\n .multiChoicePoll > div {\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n border-radius: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem 0;\n text-align: left;\n margin: 0.5rem 0;\n cursor: pointer;\n }\n .multiChoicePoll > div:hover {\n background-color: #cbcbcb;\n }\n .multiChoicePoll > div > label {\n pointer-events: none;\n margin-bottom: 0;\n }\n .pollHolder {\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n clear: both;\n }\n .progress-container > div {\n position: relative;\n font-weight: bold;\n border-radius: 5px;\n box-shadow: 0 0 5px 2px #9b9b9b6b;\n }\n .correct-answer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n background-color: darkgrey;\n border-radius: 5px;\n }\n .float-right {\n z-index: 2;\n padding-right: 1rem;\n color: #fff;\n }\n .progress {\n align-self: flex-start;\n display: contents;\n border-radius: 5px;\n }\n .progress-bar {\n width: 33%;\n height: 100%;\n position: absolute;\n border-radius: 5px 0 0 5px;\n background-color: var(--primary);\n }\n .correct-answer > div:nth-child(2) {\n z-index: 1;\n color: white;\n padding-left: 0.5rem;\n max-width: 75%;\n }\n '
|
|
8979
9029
|
)
|
|
8980
9030
|
);
|
|
8981
9031
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -90,7 +90,7 @@ var VerticalHero = require('./VerticalHero.js');
|
|
|
90
90
|
var YahooHero = require('./YahooHero.js');
|
|
91
91
|
var GridHero = require('./GridHero.js');
|
|
92
92
|
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
93
|
-
var getSerializers = require('./index-
|
|
93
|
+
var getSerializers = require('./index-a075129d.js');
|
|
94
94
|
var Beam = require('./Beam.js');
|
|
95
95
|
var Segment = require('./Segment.js');
|
|
96
96
|
var KMTracker = require('./KMTracker.js');
|
|
@@ -156,7 +156,8 @@ require('./_object-to-array-9337ba83.js');
|
|
|
156
156
|
require('react-bootstrap/Spinner');
|
|
157
157
|
require('react-bootstrap/Form');
|
|
158
158
|
require('./js.cookie-a511c430.js');
|
|
159
|
-
require('./
|
|
159
|
+
require('./typeof-1358762e.js');
|
|
160
|
+
require('./index-50be6759.js');
|
|
160
161
|
require('./ConferenceBanner-213003ce.js');
|
|
161
162
|
require('next/head');
|
|
162
163
|
require('@mjhls/mjh-framework/dist/cjs/urlFor');
|
|
@@ -192,7 +193,8 @@ require('./SeriesSlider-086a8319.js');
|
|
|
192
193
|
require('./style-inject.es-dcee06b6.js');
|
|
193
194
|
require('disqus-react');
|
|
194
195
|
require('react-twitter-embed');
|
|
195
|
-
require('./ImageSlider-
|
|
196
|
+
require('./ImageSlider-984a697b.js');
|
|
197
|
+
require('./defineProperty-e0fb52c5.js');
|
|
196
198
|
require('./VideoSeriesCard.js');
|
|
197
199
|
|
|
198
200
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
+
|
|
5
|
+
var _typeof_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
6
|
+
function _typeof(obj) {
|
|
7
|
+
"@babel/helpers - typeof";
|
|
8
|
+
|
|
9
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
10
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
11
|
+
return typeof obj;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
15
|
+
} else {
|
|
16
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
17
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return _typeof(obj);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = _typeof;
|
|
27
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
var _typeof = _commonjsHelpers.unwrapExports(_typeof_1);
|
|
31
|
+
|
|
32
|
+
exports._typeof = _typeof;
|
|
33
|
+
exports._typeof_1 = _typeof_1;
|