@7shifts/sous-chef 3.77.1 → 3.78.0

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/dist/index.js CHANGED
@@ -8813,7 +8813,7 @@ var useLocalStorage = function useLocalStorage(key, initialValue) {
8813
8813
 
8814
8814
  var styles$L = {"hint-modal":"_NwD6V","hint-modal--after-open":"_4ofZb","hint-modal--before-close":"_hGoMD","hint-modal__overlay":"_iK5zl","hint-modal__image":"_V9hLa","hint-modal__body":"_oOqUg","hint-modal__close-button":"_5zcBK"};
8815
8815
 
8816
- var _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
8816
+ var _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId", "onSetDoNotShowAgainStatus"];
8817
8817
  var HintModal = function HintModal(_ref) {
8818
8818
  var header = _ref.header,
8819
8819
  children = _ref.children,
@@ -8823,6 +8823,7 @@ var HintModal = function HintModal(_ref) {
8823
8823
  primaryButton = _ref.primaryButton,
8824
8824
  secondaryButton = _ref.secondaryButton,
8825
8825
  testId = _ref.testId,
8826
+ onSetDoNotShowAgainStatus = _ref.onSetDoNotShowAgainStatus,
8826
8827
  positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
8827
8828
  var __ = useTranslation('HintModal');
8828
8829
  var _useState = React.useState(false),
@@ -8831,20 +8832,26 @@ var HintModal = function HintModal(_ref) {
8831
8832
  var _useLocalStorage = useLocalStorage(modalId, false),
8832
8833
  persistedDoNotShow = _useLocalStorage[0],
8833
8834
  setPersistedDoNotShow = _useLocalStorage[1];
8835
+ var persistDoNotShowAgain = function persistDoNotShowAgain(value) {
8836
+ setPersistedDoNotShow(value);
8837
+ if (onSetDoNotShowAgainStatus) {
8838
+ onSetDoNotShowAgainStatus(value);
8839
+ }
8840
+ };
8834
8841
  var primaryButtonUpdated = updateButtonProps$1(primaryButton, {
8835
8842
  theme: primaryButton.props.theme || 'primary',
8836
8843
  size: BUTTON_SIZES.MIN_WIDTH_100,
8837
8844
  onClick: function onClick() {
8838
- setPersistedDoNotShow(doNotShowAgain);
8839
- primaryButton.props.onClick();
8845
+ persistDoNotShowAgain(doNotShowAgain);
8846
+ primaryButton.props.onClick(doNotShowAgain);
8840
8847
  }
8841
8848
  });
8842
8849
  var secondaryButtonUpdated = secondaryButton ? updateButtonProps$1(secondaryButton, {
8843
8850
  theme: secondaryButton.props.theme || 'default',
8844
8851
  size: BUTTON_SIZES.MIN_WIDTH_100,
8845
8852
  onClick: function onClick() {
8846
- setPersistedDoNotShow(doNotShowAgain);
8847
- secondaryButton.props.onClick();
8853
+ persistDoNotShowAgain(doNotShowAgain);
8854
+ secondaryButton.props.onClick(doNotShowAgain);
8848
8855
  }
8849
8856
  }) : undefined;
8850
8857
  var positionStyles = usePositionStyles(positionProps);
@@ -8854,7 +8861,7 @@ var HintModal = function HintModal(_ref) {
8854
8861
  })
8855
8862
  };
8856
8863
  var handleOnClose = function handleOnClose() {
8857
- setPersistedDoNotShow(doNotShowAgain);
8864
+ persistDoNotShowAgain(doNotShowAgain);
8858
8865
  onClose();
8859
8866
  };
8860
8867
  return React__default["default"].createElement(ReactModal__default["default"], {