@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 +13 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +14 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/HintModal/HintModal.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -8983,7 +8983,7 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
8983
8983
|
|
|
8984
8984
|
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"};
|
|
8985
8985
|
|
|
8986
|
-
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
8986
|
+
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId", "onSetDoNotShowAgainStatus"];
|
|
8987
8987
|
const HintModal = _ref => {
|
|
8988
8988
|
let {
|
|
8989
8989
|
header,
|
|
@@ -8993,26 +8993,33 @@ const HintModal = _ref => {
|
|
|
8993
8993
|
modalId,
|
|
8994
8994
|
primaryButton,
|
|
8995
8995
|
secondaryButton,
|
|
8996
|
-
testId
|
|
8996
|
+
testId,
|
|
8997
|
+
onSetDoNotShowAgainStatus
|
|
8997
8998
|
} = _ref,
|
|
8998
8999
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8999
9000
|
const __ = useTranslation('HintModal');
|
|
9000
9001
|
const [doNotShowAgain, setDoNotShowAgain] = useState(false);
|
|
9001
9002
|
const [persistedDoNotShow, setPersistedDoNotShow] = useLocalStorage(modalId, false);
|
|
9003
|
+
const persistDoNotShowAgain = value => {
|
|
9004
|
+
setPersistedDoNotShow(value);
|
|
9005
|
+
if (onSetDoNotShowAgainStatus) {
|
|
9006
|
+
onSetDoNotShowAgainStatus(value);
|
|
9007
|
+
}
|
|
9008
|
+
};
|
|
9002
9009
|
const primaryButtonUpdated = updateButtonProps$1(primaryButton, {
|
|
9003
9010
|
theme: primaryButton.props.theme || 'primary',
|
|
9004
9011
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
9005
9012
|
onClick: () => {
|
|
9006
|
-
|
|
9007
|
-
primaryButton.props.onClick();
|
|
9013
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9014
|
+
primaryButton.props.onClick(doNotShowAgain);
|
|
9008
9015
|
}
|
|
9009
9016
|
});
|
|
9010
9017
|
const secondaryButtonUpdated = secondaryButton ? updateButtonProps$1(secondaryButton, {
|
|
9011
9018
|
theme: secondaryButton.props.theme || 'default',
|
|
9012
9019
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
9013
9020
|
onClick: () => {
|
|
9014
|
-
|
|
9015
|
-
secondaryButton.props.onClick();
|
|
9021
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9022
|
+
secondaryButton.props.onClick(doNotShowAgain);
|
|
9016
9023
|
}
|
|
9017
9024
|
}) : undefined;
|
|
9018
9025
|
const positionStyles = usePositionStyles(positionProps);
|
|
@@ -9022,7 +9029,7 @@ const HintModal = _ref => {
|
|
|
9022
9029
|
})
|
|
9023
9030
|
};
|
|
9024
9031
|
const handleOnClose = () => {
|
|
9025
|
-
|
|
9032
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9026
9033
|
onClose();
|
|
9027
9034
|
};
|
|
9028
9035
|
return React__default.createElement(ReactModal, {
|