@mjhls/mjh-framework 1.0.1070 → 1.0.1071
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-55eab36c.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-4e9a219e.js → index-4c260728.js} +162 -110
- package/dist/cjs/{index-9ec837cc.js → index-50be6759.js} +25 -9
- 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-c0cc5c10.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-0ce54f8a.js → index-98ca9cec.js} +25 -10
- package/dist/esm/{index-1fd45cc5.js → index-aef9aa6f.js} +163 -111
- package/dist/esm/index.js +5 -3
- package/dist/esm/typeof-2f07d0e8.js +30 -0
- package/package.json +1 -1
|
@@ -8709,12 +8709,18 @@ 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();
|
|
@@ -8723,7 +8729,8 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8723
8729
|
};
|
|
8724
8730
|
React.useEffect(function () {
|
|
8725
8731
|
if (showResults) {
|
|
8726
|
-
setShowAnswer(
|
|
8732
|
+
setShowAnswer(true);
|
|
8733
|
+
setSelectedChoice(showResults);
|
|
8727
8734
|
}
|
|
8728
8735
|
}, [showResults]);
|
|
8729
8736
|
|
|
@@ -8735,9 +8742,32 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8735
8742
|
return acc;
|
|
8736
8743
|
}
|
|
8737
8744
|
}, 0);
|
|
8745
|
+
|
|
8746
|
+
React.useEffect(function () {
|
|
8747
|
+
var tempArray = choices.filter(function (choice) {
|
|
8748
|
+
if (choice.hasOwnProperty('choiceAnswer')) {
|
|
8749
|
+
return choice;
|
|
8750
|
+
}
|
|
8751
|
+
});
|
|
8752
|
+
setShowBorders(tempArray.length > 0);
|
|
8753
|
+
}, [choices]);
|
|
8754
|
+
|
|
8755
|
+
function checkChoice(key) {
|
|
8756
|
+
return key === selectedChoice;
|
|
8757
|
+
}
|
|
8758
|
+
|
|
8759
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8760
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8761
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8762
|
+
} else {
|
|
8763
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8764
|
+
setSelectedChoice(inputRef.current[e.currentTarget.dataset['index']].value);
|
|
8765
|
+
}
|
|
8766
|
+
};
|
|
8767
|
+
|
|
8738
8768
|
return React__default["default"].createElement(
|
|
8739
|
-
|
|
8740
|
-
|
|
8769
|
+
'div',
|
|
8770
|
+
{ className: 'pollHolder mb-3' },
|
|
8741
8771
|
question && React__default["default"].createElement(
|
|
8742
8772
|
'p',
|
|
8743
8773
|
{ className: 'font-weight-bold' },
|
|
@@ -8745,78 +8775,74 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8745
8775
|
),
|
|
8746
8776
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8747
8777
|
'form',
|
|
8748
|
-
{ onSubmit: function onSubmit(e) {
|
|
8778
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8749
8779
|
return onSubmitPoll(e);
|
|
8750
8780
|
} },
|
|
8751
|
-
choices && choices.map(function (choice) {
|
|
8781
|
+
choices && choices.map(function (choice, index) {
|
|
8752
8782
|
return React__default["default"].createElement(
|
|
8753
8783
|
'div',
|
|
8754
|
-
{ key: choice._key
|
|
8784
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8785
|
+
return userChoiceSelection(e);
|
|
8786
|
+
} },
|
|
8755
8787
|
React__default["default"].createElement(
|
|
8756
8788
|
'label',
|
|
8757
8789
|
{ className: 'pl-2' },
|
|
8758
|
-
React__default["default"].createElement('input', {
|
|
8759
|
-
return
|
|
8760
|
-
} }),
|
|
8790
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8791
|
+
return inputRef.current[index] = el;
|
|
8792
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8761
8793
|
' ' + choice.choiceText
|
|
8762
8794
|
)
|
|
8763
8795
|
);
|
|
8764
8796
|
}),
|
|
8765
8797
|
React__default["default"].createElement(
|
|
8766
8798
|
reactBootstrap.Button,
|
|
8767
|
-
{ disabled: !selectedChoice, type: 'submit' },
|
|
8799
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8768
8800
|
'Vote'
|
|
8769
8801
|
)
|
|
8770
8802
|
),
|
|
8771
|
-
React__default["default"].createElement(
|
|
8803
|
+
showAnswer && React__default["default"].createElement(
|
|
8772
8804
|
'div',
|
|
8773
|
-
{ className: 'progress-container' },
|
|
8805
|
+
{ className: 'progress-container mb-3' },
|
|
8774
8806
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8775
8807
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8776
8808
|
return React__default["default"].createElement(
|
|
8777
8809
|
'div',
|
|
8778
|
-
{
|
|
8810
|
+
{
|
|
8811
|
+
key: choice._key,
|
|
8812
|
+
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8813
|
+
className: 'mb-3' },
|
|
8779
8814
|
React__default["default"].createElement(
|
|
8780
8815
|
'div',
|
|
8781
8816
|
{ className: 'correct-answer' },
|
|
8817
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8782
8818
|
React__default["default"].createElement(
|
|
8783
8819
|
'div',
|
|
8784
8820
|
null,
|
|
8785
8821
|
choice.choiceText
|
|
8786
8822
|
),
|
|
8787
|
-
|
|
8823
|
+
React__default["default"].createElement(
|
|
8788
8824
|
'div',
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
)
|
|
8825
|
+
{ className: 'float-right' },
|
|
8826
|
+
percentage,
|
|
8827
|
+
'% (',
|
|
8828
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8829
|
+
' Votes)'
|
|
8795
8830
|
)
|
|
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
8831
|
)
|
|
8806
8832
|
);
|
|
8807
|
-
})
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8833
|
+
}),
|
|
8834
|
+
showAnswer && React__default["default"].createElement(
|
|
8835
|
+
'h4',
|
|
8836
|
+
{ className: 'text-center small p-3' },
|
|
8837
|
+
'Total Votes: ',
|
|
8838
|
+
choicesTotalCount
|
|
8839
|
+
)
|
|
8814
8840
|
),
|
|
8815
8841
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8816
8842
|
React__default["default"].createElement(
|
|
8817
8843
|
'style',
|
|
8818
8844
|
{ jsx: 'true' },
|
|
8819
|
-
'\n .correct-answer {\n display: flex;\n justify-content: space-between;\n }\n .
|
|
8845
|
+
'\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 }\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
8846
|
)
|
|
8821
8847
|
);
|
|
8822
8848
|
};
|
|
@@ -8830,62 +8856,75 @@ var Poll = function Poll(_ref) {
|
|
|
8830
8856
|
_ref.showVotes;
|
|
8831
8857
|
var getSerializers = _ref.getSerializers;
|
|
8832
8858
|
|
|
8833
|
-
var _useState = React.useState(
|
|
8859
|
+
var _useState = React.useState([]),
|
|
8834
8860
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
8835
8861
|
selectedChoice = _useState2[0],
|
|
8836
8862
|
setSelectedChoice = _useState2[1];
|
|
8837
8863
|
|
|
8838
|
-
var _useState3 = React.useState(
|
|
8864
|
+
var _useState3 = React.useState(true),
|
|
8839
8865
|
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8840
|
-
|
|
8841
|
-
|
|
8866
|
+
disableVote = _useState4[0],
|
|
8867
|
+
setDisableVote = _useState4[1];
|
|
8868
|
+
|
|
8869
|
+
var _useState5 = React.useState(false),
|
|
8870
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8871
|
+
showAnswer = _useState6[0],
|
|
8872
|
+
setShowAnswer = _useState6[1];
|
|
8873
|
+
|
|
8874
|
+
var _useState7 = React.useState(false),
|
|
8875
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8876
|
+
showBorders = _useState8[0],
|
|
8877
|
+
setShowBorders = _useState8[1];
|
|
8842
8878
|
|
|
8843
8879
|
var choices = node.choices,
|
|
8844
8880
|
question = node.question,
|
|
8845
8881
|
response = node.response,
|
|
8846
8882
|
_node$showResults = node.showResults,
|
|
8847
|
-
showResults = _node$showResults === undefined ?
|
|
8883
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults;
|
|
8848
8884
|
|
|
8885
|
+
var inputRef = React.useRef([]);
|
|
8849
8886
|
|
|
8850
|
-
var onSubmitPoll = function onSubmitPoll(e
|
|
8887
|
+
var onSubmitPoll = function onSubmitPoll(e) {
|
|
8851
8888
|
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(','));
|
|
8889
|
+
// const selections = []
|
|
8890
|
+
// for (let input of Object.values(e.currentTarget)) {
|
|
8891
|
+
// if (input.nodeName === 'INPUT' && input.checked) {
|
|
8892
|
+
// selections.push(input.value)
|
|
8893
|
+
// }
|
|
8894
|
+
// }
|
|
8895
|
+
onVote(node._key, selectedChoice.toString());
|
|
8881
8896
|
//setShowAnswer(true)
|
|
8882
8897
|
};
|
|
8883
8898
|
React.useEffect(function () {
|
|
8884
8899
|
if (showResults) {
|
|
8885
|
-
setShowAnswer(
|
|
8900
|
+
setShowAnswer(true);
|
|
8901
|
+
setSelectedChoice(showResults.split(','));
|
|
8886
8902
|
}
|
|
8887
8903
|
}, [showResults]);
|
|
8888
8904
|
|
|
8905
|
+
React.useEffect(function () {
|
|
8906
|
+
if (selectedChoice.length > 0) {
|
|
8907
|
+
setDisableVote(false);
|
|
8908
|
+
} else {
|
|
8909
|
+
setDisableVote(true);
|
|
8910
|
+
}
|
|
8911
|
+
}, [selectedChoice]);
|
|
8912
|
+
|
|
8913
|
+
React.useEffect(function () {
|
|
8914
|
+
var tempArray = choices.filter(function (choice) {
|
|
8915
|
+
if (choice.hasOwnProperty('choiceAnswer')) {
|
|
8916
|
+
return choice;
|
|
8917
|
+
}
|
|
8918
|
+
});
|
|
8919
|
+
setShowBorders(tempArray.length > 0);
|
|
8920
|
+
}, [choices]);
|
|
8921
|
+
|
|
8922
|
+
function checkChoice(key) {
|
|
8923
|
+
return selectedChoice.find(function (value) {
|
|
8924
|
+
return value === key;
|
|
8925
|
+
});
|
|
8926
|
+
}
|
|
8927
|
+
|
|
8889
8928
|
var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
|
|
8890
8929
|
if (choice.choiceCount) {
|
|
8891
8930
|
acc = acc + parseInt(choice.choiceCount);
|
|
@@ -8894,9 +8933,26 @@ var Poll = function Poll(_ref) {
|
|
|
8894
8933
|
return acc;
|
|
8895
8934
|
}
|
|
8896
8935
|
}, 0);
|
|
8936
|
+
|
|
8937
|
+
var userChoiceSelection = function userChoiceSelection(e) {
|
|
8938
|
+
if (inputRef.current[e.currentTarget.dataset['index']].checked) {
|
|
8939
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = false;
|
|
8940
|
+
var updateChoices = selectedChoice.filter(function (choice) {
|
|
8941
|
+
if (inputRef.current[e.currentTarget.dataset['index']].value !== choice) {
|
|
8942
|
+
return choice;
|
|
8943
|
+
}
|
|
8944
|
+
});
|
|
8945
|
+
setSelectedChoice(updateChoices);
|
|
8946
|
+
} else {
|
|
8947
|
+
inputRef.current[e.currentTarget.dataset['index']].checked = true;
|
|
8948
|
+
|
|
8949
|
+
setSelectedChoice([inputRef.current[e.currentTarget.dataset['index']].value].concat(toConsumableArray._toConsumableArray(selectedChoice)));
|
|
8950
|
+
}
|
|
8951
|
+
};
|
|
8952
|
+
|
|
8897
8953
|
return React__default["default"].createElement(
|
|
8898
|
-
|
|
8899
|
-
|
|
8954
|
+
'div',
|
|
8955
|
+
{ className: 'pollHolder mb-3' },
|
|
8900
8956
|
question && React__default["default"].createElement(
|
|
8901
8957
|
'p',
|
|
8902
8958
|
{ className: 'font-weight-bold' },
|
|
@@ -8904,78 +8960,74 @@ var Poll = function Poll(_ref) {
|
|
|
8904
8960
|
),
|
|
8905
8961
|
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8906
8962
|
'form',
|
|
8907
|
-
{ onSubmit: function onSubmit(e) {
|
|
8963
|
+
{ className: 'multiChoicePoll', onSubmit: function onSubmit(e) {
|
|
8908
8964
|
return onSubmitPoll(e);
|
|
8909
8965
|
} },
|
|
8910
|
-
choices && choices.map(function (choice) {
|
|
8966
|
+
choices && choices.map(function (choice, index) {
|
|
8911
8967
|
return React__default["default"].createElement(
|
|
8912
8968
|
'div',
|
|
8913
|
-
{ key: choice._key
|
|
8969
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8970
|
+
return userChoiceSelection(e);
|
|
8971
|
+
} },
|
|
8914
8972
|
React__default["default"].createElement(
|
|
8915
8973
|
'label',
|
|
8916
8974
|
{ className: 'pl-2' },
|
|
8917
|
-
React__default["default"].createElement('input', {
|
|
8918
|
-
return
|
|
8919
|
-
} }),
|
|
8975
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8976
|
+
return inputRef.current[index] = el;
|
|
8977
|
+
}, type: 'checkbox', id: 'male', name: choice._type, value: choice._key }),
|
|
8920
8978
|
' ' + choice.choiceText
|
|
8921
8979
|
)
|
|
8922
8980
|
);
|
|
8923
8981
|
}),
|
|
8924
8982
|
React__default["default"].createElement(
|
|
8925
8983
|
reactBootstrap.Button,
|
|
8926
|
-
{ disabled:
|
|
8984
|
+
{ disabled: disableVote, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8927
8985
|
'Vote'
|
|
8928
8986
|
)
|
|
8929
8987
|
),
|
|
8930
|
-
React__default["default"].createElement(
|
|
8988
|
+
showAnswer && React__default["default"].createElement(
|
|
8931
8989
|
'div',
|
|
8932
|
-
{ className: 'progress-container' },
|
|
8990
|
+
{ className: 'progress-container mb-3' },
|
|
8933
8991
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8934
8992
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8935
8993
|
return React__default["default"].createElement(
|
|
8936
8994
|
'div',
|
|
8937
|
-
{
|
|
8995
|
+
{
|
|
8996
|
+
key: choice._key,
|
|
8997
|
+
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8998
|
+
className: 'mb-3' },
|
|
8938
8999
|
React__default["default"].createElement(
|
|
8939
9000
|
'div',
|
|
8940
9001
|
{ className: 'correct-answer' },
|
|
9002
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8941
9003
|
React__default["default"].createElement(
|
|
8942
9004
|
'div',
|
|
8943
9005
|
null,
|
|
8944
9006
|
choice.choiceText
|
|
8945
9007
|
),
|
|
8946
|
-
|
|
9008
|
+
React__default["default"].createElement(
|
|
8947
9009
|
'div',
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
)
|
|
9010
|
+
{ className: 'float-right' },
|
|
9011
|
+
percentage,
|
|
9012
|
+
'% (',
|
|
9013
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
9014
|
+
' Votes)'
|
|
8954
9015
|
)
|
|
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
9016
|
)
|
|
8965
9017
|
);
|
|
8966
|
-
})
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
9018
|
+
}),
|
|
9019
|
+
showAnswer && React__default["default"].createElement(
|
|
9020
|
+
'h4',
|
|
9021
|
+
{ className: 'text-center small p-3' },
|
|
9022
|
+
'Total Votes: ',
|
|
9023
|
+
choicesTotalCount
|
|
9024
|
+
)
|
|
8973
9025
|
),
|
|
8974
9026
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8975
9027
|
React__default["default"].createElement(
|
|
8976
9028
|
'style',
|
|
8977
9029
|
{ jsx: 'true' },
|
|
8978
|
-
'\n .
|
|
9030
|
+
'\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 }\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
9031
|
)
|
|
8980
9032
|
);
|
|
8981
9033
|
};
|
|
@@ -35,9 +35,18 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
35
35
|
return target;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
function _setPrototypeOf(o, p) {
|
|
39
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
40
|
+
o.__proto__ = p;
|
|
41
|
+
return o;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return _setPrototypeOf(o, p);
|
|
45
|
+
}
|
|
46
|
+
|
|
38
47
|
var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
39
48
|
/*!
|
|
40
|
-
Copyright (c)
|
|
49
|
+
Copyright (c) 2018 Jed Watson.
|
|
41
50
|
Licensed under the MIT License (MIT), see
|
|
42
51
|
http://jedwatson.github.io/classnames
|
|
43
52
|
*/
|
|
@@ -47,7 +56,7 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
47
56
|
|
|
48
57
|
var hasOwn = {}.hasOwnProperty;
|
|
49
58
|
|
|
50
|
-
function classNames
|
|
59
|
+
function classNames() {
|
|
51
60
|
var classes = [];
|
|
52
61
|
|
|
53
62
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -58,16 +67,22 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
58
67
|
|
|
59
68
|
if (argType === 'string' || argType === 'number') {
|
|
60
69
|
classes.push(arg);
|
|
61
|
-
} else if (Array.isArray(arg)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
} else if (Array.isArray(arg)) {
|
|
71
|
+
if (arg.length) {
|
|
72
|
+
var inner = classNames.apply(null, arg);
|
|
73
|
+
if (inner) {
|
|
74
|
+
classes.push(inner);
|
|
75
|
+
}
|
|
65
76
|
}
|
|
66
77
|
} else if (argType === 'object') {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
if (arg.toString === Object.prototype.toString) {
|
|
79
|
+
for (var key in arg) {
|
|
80
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
81
|
+
classes.push(key);
|
|
82
|
+
}
|
|
70
83
|
}
|
|
84
|
+
} else {
|
|
85
|
+
classes.push(arg.toString());
|
|
71
86
|
}
|
|
72
87
|
}
|
|
73
88
|
}
|
|
@@ -86,4 +101,5 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
86
101
|
|
|
87
102
|
exports._extends = _extends;
|
|
88
103
|
exports._objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
|
|
104
|
+
exports._setPrototypeOf = _setPrototypeOf;
|
|
89
105
|
exports.classnames = classnames;
|
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-4c260728.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;
|