@elementor/editor-controls 4.4.0-1125 → 4.4.0-1126

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.mjs CHANGED
@@ -10900,9 +10900,16 @@ var markNoticeAsDismissedInSession = (dismissId) => {
10900
10900
  dismissedNotices.push(dismissId);
10901
10901
  }
10902
10902
  };
10903
+ var isNoticeDismissed = (dismissId) => {
10904
+ if (!dismissId) {
10905
+ return false;
10906
+ }
10907
+ const dismissedNotices = window.elementor?.config?.user?.dismissed_editor_notices;
10908
+ return !!dismissedNotices?.includes(dismissId);
10909
+ };
10903
10910
  var NoticeControl = createControl(
10904
10911
  ({ noticeType = "info", heading, content, dismissible, buttonText, buttonUrl }) => {
10905
- const [isDismissed, setIsDismissed] = useState25(false);
10912
+ const [isDismissed, setIsDismissed] = useState25(() => isNoticeDismissed(dismissible));
10906
10913
  if (isDismissed || !content) {
10907
10914
  return null;
10908
10915
  }