Changeset 3131144
- Timestamp:
- 08/05/2024 03:14:30 PM (19 months ago)
- Location:
- notification-master
- Files:
-
- 263 added
- 13 edited
-
tags/1.1.4 (added)
-
tags/1.1.4/assets (added)
-
tags/1.1.4/assets/integrations (added)
-
tags/1.1.4/assets/integrations/discord.svg (added)
-
tags/1.1.4/assets/integrations/email.svg (added)
-
tags/1.1.4/assets/integrations/facebook.svg (added)
-
tags/1.1.4/assets/integrations/make.png (added)
-
tags/1.1.4/assets/integrations/slack.png (added)
-
tags/1.1.4/assets/integrations/twitterx.svg (added)
-
tags/1.1.4/assets/integrations/webhook.svg (added)
-
tags/1.1.4/assets/integrations/zapier.svg (added)
-
tags/1.1.4/assets/logo.png (added)
-
tags/1.1.4/composer.json (added)
-
tags/1.1.4/dist (added)
-
tags/1.1.4/dist/index.asset.php (added)
-
tags/1.1.4/dist/index.js (added)
-
tags/1.1.4/dist/style-rtl.css (added)
-
tags/1.1.4/dist/style.css (added)
-
tags/1.1.4/includes (added)
-
tags/1.1.4/includes/abstracts (added)
-
tags/1.1.4/includes/abstracts/class-comment-merge-tags-group.php (added)
-
tags/1.1.4/includes/abstracts/class-comment-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-db-table.php (added)
-
tags/1.1.4/includes/abstracts/class-integration.php (added)
-
tags/1.1.4/includes/abstracts/class-media-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-merge-tags-group.php (added)
-
tags/1.1.4/includes/abstracts/class-plugin-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-post-merge-tags-group.php (added)
-
tags/1.1.4/includes/abstracts/class-post-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-privacy-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-taxonomy-merge-tags-group.php (added)
-
tags/1.1.4/includes/abstracts/class-taxonomy-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-theme-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-trigger.php (added)
-
tags/1.1.4/includes/abstracts/class-user-trigger.php (added)
-
tags/1.1.4/includes/admin (added)
-
tags/1.1.4/includes/admin/class-admin.php (added)
-
tags/1.1.4/includes/autoload.php (added)
-
tags/1.1.4/includes/class-background-process.php (added)
-
tags/1.1.4/includes/class-logger.php (added)
-
tags/1.1.4/includes/class-notification-logger.php (added)
-
tags/1.1.4/includes/class-notifications.php (added)
-
tags/1.1.4/includes/class-plugin.php (added)
-
tags/1.1.4/includes/class-settings.php (added)
-
tags/1.1.4/includes/class-utils.php (added)
-
tags/1.1.4/includes/connections (added)
-
tags/1.1.4/includes/connections/class-process.php (added)
-
tags/1.1.4/includes/db (added)
-
tags/1.1.4/includes/db/models (added)
-
tags/1.1.4/includes/db/models/class-logs-model.php (added)
-
tags/1.1.4/includes/db/models/class-notification-logs-model.php (added)
-
tags/1.1.4/includes/db/tables (added)
-
tags/1.1.4/includes/db/tables/class-logs-table.php (added)
-
tags/1.1.4/includes/db/tables/class-notification-logs-table.php (added)
-
tags/1.1.4/includes/integrations (added)
-
tags/1.1.4/includes/integrations/class-discord-integration.php (added)
-
tags/1.1.4/includes/integrations/class-email-integration.php (added)
-
tags/1.1.4/includes/integrations/class-loader.php (added)
-
tags/1.1.4/includes/integrations/class-webhook-integration.php (added)
-
tags/1.1.4/includes/libraries (added)
-
tags/1.1.4/includes/libraries/wp-background-processing (added)
-
tags/1.1.4/includes/libraries/wp-background-processing/class-wp-async-request.php (added)
-
tags/1.1.4/includes/libraries/wp-background-processing/class-wp-background-process.php (added)
-
tags/1.1.4/includes/merge-tags (added)
-
tags/1.1.4/includes/merge-tags/class-loader.php (added)
-
tags/1.1.4/includes/merge-tags/comment-type (added)
-
tags/1.1.4/includes/merge-tags/comment-type/class-comment-author.php (added)
-
tags/1.1.4/includes/merge-tags/comment-type/class-comment.php (added)
-
tags/1.1.4/includes/merge-tags/comment-type/class-parent-comment-author.php (added)
-
tags/1.1.4/includes/merge-tags/comment-type/class-parent-comment.php (added)
-
tags/1.1.4/includes/merge-tags/general (added)
-
tags/1.1.4/includes/merge-tags/general/class-general.php (added)
-
tags/1.1.4/includes/merge-tags/media (added)
-
tags/1.1.4/includes/merge-tags/media/class-attachment-author.php (added)
-
tags/1.1.4/includes/merge-tags/media/class-attachment.php (added)
-
tags/1.1.4/includes/merge-tags/plugin (added)
-
tags/1.1.4/includes/merge-tags/plugin/class-plugin.php (added)
-
tags/1.1.4/includes/merge-tags/post-type (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post-author.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post-last-editor.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post-publishing-user.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post-scheduling-user.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post-trashing-user.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/class-post.php (added)
-
tags/1.1.4/includes/merge-tags/post-type/traits (added)
-
tags/1.1.4/includes/merge-tags/post-type/traits/class-post-user.php (added)
-
tags/1.1.4/includes/merge-tags/privacy (added)
-
tags/1.1.4/includes/merge-tags/privacy/class-archive.php (added)
-
tags/1.1.4/includes/merge-tags/taxonomy-type (added)
-
tags/1.1.4/includes/merge-tags/taxonomy-type/class-taxonomy.php (added)
-
tags/1.1.4/includes/merge-tags/theme (added)
-
tags/1.1.4/includes/merge-tags/theme/class-old-theme.php (added)
-
tags/1.1.4/includes/merge-tags/theme/class-theme.php (added)
-
tags/1.1.4/includes/merge-tags/theme/traits (added)
-
tags/1.1.4/includes/merge-tags/theme/traits/class-theme.php (added)
-
tags/1.1.4/includes/merge-tags/user (added)
-
tags/1.1.4/includes/merge-tags/user/class-user.php (added)
-
tags/1.1.4/includes/rest-api (added)
-
tags/1.1.4/includes/rest-api/class-rest-api.php (added)
-
tags/1.1.4/includes/rest-api/controllers (added)
-
tags/1.1.4/includes/rest-api/controllers/v1 (added)
-
tags/1.1.4/includes/rest-api/controllers/v1/class-rest-controller.php (added)
-
tags/1.1.4/includes/rest-api/controllers/v1/class-rest-logs-controller.php (added)
-
tags/1.1.4/includes/rest-api/controllers/v1/class-rest-notification-controller.php (added)
-
tags/1.1.4/includes/rest-api/controllers/v1/class-rest-notification-logs-controller.php (added)
-
tags/1.1.4/includes/rest-api/controllers/v1/class-rest-settings-controller.php (added)
-
tags/1.1.4/includes/triggers (added)
-
tags/1.1.4/includes/triggers/class-loader.php (added)
-
tags/1.1.4/includes/triggers/comment (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-added.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-approved.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-published.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-replied.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-spammed.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-trashed.php (added)
-
tags/1.1.4/includes/triggers/comment/class-comment-unapproved.php (added)
-
tags/1.1.4/includes/triggers/media (added)
-
tags/1.1.4/includes/triggers/media/class-media-published.php (added)
-
tags/1.1.4/includes/triggers/media/class-media-trashed.php (added)
-
tags/1.1.4/includes/triggers/media/class-media-updated.php (added)
-
tags/1.1.4/includes/triggers/plugin (added)
-
tags/1.1.4/includes/triggers/plugin/class-plugin-activated.php (added)
-
tags/1.1.4/includes/triggers/plugin/class-plugin-deactivated.php (added)
-
tags/1.1.4/includes/triggers/plugin/class-plugin-installed.php (added)
-
tags/1.1.4/includes/triggers/plugin/class-plugin-updated.php (added)
-
tags/1.1.4/includes/triggers/post (added)
-
tags/1.1.4/includes/triggers/post/class-post-added.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-approved.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-drafted.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-published-privately.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-published.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-scheduled.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-sent-to-review.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-trashed.php (added)
-
tags/1.1.4/includes/triggers/post/class-post-updated.php (added)
-
tags/1.1.4/includes/triggers/privacy (added)
-
tags/1.1.4/includes/triggers/privacy/class-erase-personal-data-request.php (added)
-
tags/1.1.4/includes/triggers/privacy/class-erased-personal-data.php (added)
-
tags/1.1.4/includes/triggers/privacy/class-export-personal-data-request.php (added)
-
tags/1.1.4/includes/triggers/privacy/class-exported-personal-data.php (added)
-
tags/1.1.4/includes/triggers/taxonomy (added)
-
tags/1.1.4/includes/triggers/taxonomy/class-taxonomy-created.php (added)
-
tags/1.1.4/includes/triggers/taxonomy/class-taxonomy-deleted.php (added)
-
tags/1.1.4/includes/triggers/taxonomy/class-taxonomy-updated.php (added)
-
tags/1.1.4/includes/triggers/theme (added)
-
tags/1.1.4/includes/triggers/theme/class-theme-installed.php (added)
-
tags/1.1.4/includes/triggers/theme/class-theme-switched.php (added)
-
tags/1.1.4/includes/triggers/theme/class-theme-updated.php (added)
-
tags/1.1.4/includes/triggers/user (added)
-
tags/1.1.4/includes/triggers/user/class-user-deleted.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-login.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-logout.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-lost-password.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-password-changed.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-profile-updated.php (added)
-
tags/1.1.4/includes/triggers/user/class-user-registration.php (added)
-
tags/1.1.4/languages (added)
-
tags/1.1.4/languages/notification-master.pot (added)
-
tags/1.1.4/notifications-master.php (added)
-
tags/1.1.4/package.json (added)
-
tags/1.1.4/postcss.config.js (added)
-
tags/1.1.4/readme.txt (added)
-
tags/1.1.4/src (added)
-
tags/1.1.4/src/components (added)
-
tags/1.1.4/src/components/index.tsx (added)
-
tags/1.1.4/src/components/nav (added)
-
tags/1.1.4/src/components/nav/index.tsx (added)
-
tags/1.1.4/src/components/nav/style.scss (added)
-
tags/1.1.4/src/components/pro-alert (added)
-
tags/1.1.4/src/components/pro-alert/index.tsx (added)
-
tags/1.1.4/src/config (added)
-
tags/1.1.4/src/config/index.ts (added)
-
tags/1.1.4/src/config/types.ts (added)
-
tags/1.1.4/src/connections-store (added)
-
tags/1.1.4/src/connections-store/index.ts (added)
-
tags/1.1.4/src/connections-store/types.ts (added)
-
tags/1.1.4/src/constants.ts (added)
-
tags/1.1.4/src/hooks (added)
-
tags/1.1.4/src/hooks/index.ts (added)
-
tags/1.1.4/src/hooks/use-new-notification (added)
-
tags/1.1.4/src/hooks/use-new-notification/index.ts (added)
-
tags/1.1.4/src/hooks/use-prompt (added)
-
tags/1.1.4/src/hooks/use-prompt/index.ts (added)
-
tags/1.1.4/src/hooks/use-title (added)
-
tags/1.1.4/src/hooks/use-title/index.ts (added)
-
tags/1.1.4/src/icons (added)
-
tags/1.1.4/src/icons/index.tsx (added)
-
tags/1.1.4/src/index.tsx (added)
-
tags/1.1.4/src/integrations (added)
-
tags/1.1.4/src/integrations/components (added)
-
tags/1.1.4/src/integrations/components/index.tsx (added)
-
tags/1.1.4/src/integrations/components/merge-tags-icon (added)
-
tags/1.1.4/src/integrations/components/merge-tags-icon/index.tsx (added)
-
tags/1.1.4/src/integrations/discord (added)
-
tags/1.1.4/src/integrations/discord/index.tsx (added)
-
tags/1.1.4/src/integrations/discord/style.scss (added)
-
tags/1.1.4/src/integrations/email (added)
-
tags/1.1.4/src/integrations/email/index.tsx (added)
-
tags/1.1.4/src/integrations/email/style.scss (added)
-
tags/1.1.4/src/integrations/index.tsx (added)
-
tags/1.1.4/src/integrations/types.ts (added)
-
tags/1.1.4/src/integrations/webhook (added)
-
tags/1.1.4/src/integrations/webhook/index.tsx (added)
-
tags/1.1.4/src/integrations/webhook/style.scss (added)
-
tags/1.1.4/src/pages (added)
-
tags/1.1.4/src/pages/debug-log (added)
-
tags/1.1.4/src/pages/debug-log/index.tsx (added)
-
tags/1.1.4/src/pages/debug-log/style.scss (added)
-
tags/1.1.4/src/pages/home (added)
-
tags/1.1.4/src/pages/home/index.tsx (added)
-
tags/1.1.4/src/pages/home/style.scss (added)
-
tags/1.1.4/src/pages/index.tsx (added)
-
tags/1.1.4/src/pages/notification (added)
-
tags/1.1.4/src/pages/notification-log (added)
-
tags/1.1.4/src/pages/notification-log/index.tsx (added)
-
tags/1.1.4/src/pages/notification-log/style.scss (added)
-
tags/1.1.4/src/pages/notification/connections (added)
-
tags/1.1.4/src/pages/notification/connections/add-modal (added)
-
tags/1.1.4/src/pages/notification/connections/add-modal/index.tsx (added)
-
tags/1.1.4/src/pages/notification/connections/add-modal/style.scss (added)
-
tags/1.1.4/src/pages/notification/connections/edit-modal (added)
-
tags/1.1.4/src/pages/notification/connections/edit-modal/index.tsx (added)
-
tags/1.1.4/src/pages/notification/connections/edit-modal/style.scss (added)
-
tags/1.1.4/src/pages/notification/connections/index.tsx (added)
-
tags/1.1.4/src/pages/notification/connections/integrations-select (added)
-
tags/1.1.4/src/pages/notification/connections/integrations-select/index.tsx (added)
-
tags/1.1.4/src/pages/notification/connections/integrations-select/style.scss (added)
-
tags/1.1.4/src/pages/notification/connections/style.scss (added)
-
tags/1.1.4/src/pages/notification/context.ts (added)
-
tags/1.1.4/src/pages/notification/form (added)
-
tags/1.1.4/src/pages/notification/form/index.tsx (added)
-
tags/1.1.4/src/pages/notification/form/merge-tags-modal (added)
-
tags/1.1.4/src/pages/notification/form/merge-tags-modal/index.tsx (added)
-
tags/1.1.4/src/pages/notification/form/merge-tags-modal/style.scss (added)
-
tags/1.1.4/src/pages/notification/form/style.scss (added)
-
tags/1.1.4/src/pages/notification/index.tsx (added)
-
tags/1.1.4/src/pages/notification/sidebar (added)
-
tags/1.1.4/src/pages/notification/sidebar/index.tsx (added)
-
tags/1.1.4/src/pages/notification/sidebar/style.scss (added)
-
tags/1.1.4/src/pages/notification/style.scss (added)
-
tags/1.1.4/src/pages/notifications (added)
-
tags/1.1.4/src/pages/notifications/index.tsx (added)
-
tags/1.1.4/src/pages/notifications/style.scss (added)
-
tags/1.1.4/src/pages/settings (added)
-
tags/1.1.4/src/pages/settings/index.tsx (added)
-
tags/1.1.4/src/pages/settings/style.scss (added)
-
tags/1.1.4/src/pages/style.scss (added)
-
tags/1.1.4/src/pages/types.tsx (added)
-
tags/1.1.4/src/store (added)
-
tags/1.1.4/src/store/actions.ts (added)
-
tags/1.1.4/src/store/constants.ts (added)
-
tags/1.1.4/src/store/index.ts (added)
-
tags/1.1.4/src/store/reducer.ts (added)
-
tags/1.1.4/src/store/resolvers.ts (added)
-
tags/1.1.4/src/store/selectors.ts (added)
-
tags/1.1.4/src/store/types.ts (added)
-
tags/1.1.4/src/utils (added)
-
tags/1.1.4/src/utils/history (added)
-
tags/1.1.4/src/utils/history/index.ts (added)
-
tags/1.1.4/src/utils/icons.tsx (added)
-
tags/1.1.4/src/utils/index.ts (added)
-
tags/1.1.4/tsconfig.json (added)
-
tags/1.1.4/webpack.config.js (added)
-
trunk/dist/index.asset.php (modified) (1 diff)
-
trunk/dist/index.js (modified) (1 diff)
-
trunk/includes/class-logger.php (modified) (1 diff)
-
trunk/includes/class-notification-logger.php (modified) (1 diff)
-
trunk/includes/db/models/class-logs-model.php (modified) (1 diff)
-
trunk/includes/db/models/class-notification-logs-model.php (modified) (1 diff)
-
trunk/includes/rest-api/controllers/v1/class-rest-logs-controller.php (modified) (2 diffs)
-
trunk/includes/rest-api/controllers/v1/class-rest-notification-logs-controller.php (modified) (2 diffs)
-
trunk/languages/notification-master.pot (modified) (7 diffs)
-
trunk/notifications-master.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/pages/debug-log/index.tsx (modified) (5 diffs)
-
trunk/src/pages/notification-log/index.tsx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
notification-master/trunk/dist/index.asset.php
r3125253 r3131144 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => ' 913606e8cec251466c21');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => 'a6c8c1ed030522709f1f'); -
notification-master/trunk/dist/index.js
r3125253 r3131144 9 9 /* translators: %s: Number of days */ 10 10 /* translators: %s: Number of days */ 11 (0,c.sprintf)((0,c.__)("All debug logs older than {%s} days will be deleted.","notification-master"),e.delete_logs_every)})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(c$,{type:"number",value:e.delete_logs_every,onChange:e=>{n("delete_logs_every",e.target.value)}})})]}),(0,s.jsx)("div",{className:"notification-master__settings--header",children:(0,s.jsx)("h3",{className:"notification-master-heading",children:(0,c.__)("Triggers","notification-master")})}),!LS.isPro&&(0,s.jsx)(qw.Ribbon,{text:(0,c.__)("Pro","notification-master"),children:(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),onClick:()=>r(!0),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("WooCommerce","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the WooCommerce product, review, or order changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:!1,onChange:()=>{r(!0)}})})]})}),LS.isPro&&(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("WooCommerce","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the WooCommerce product, review, or order changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.woocommerce_change_trigger||!0,onChange:e=>{n("woocommerce_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.post_status_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Post status change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the post status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.post_status_change_trigger,onChange:e=>{n("post_status_change_trigger",e)}})})]}),e.post_status_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Post types","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the post types for which you want to send notifications when the post status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select post types","notification-master"),options:h,value:e.post_types,onChange:e=>{n("post_types",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.taxonomy_term_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Taxonomy term change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the taxonomy term changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.taxonomy_term_change_trigger,onChange:e=>{n("taxonomy_term_change_trigger",e)}})})]}),e.taxonomy_term_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Taxonomies","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the taxonomies for which you want to send notifications when the taxonomy term changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select taxonomies","notification-master"),options:f,value:e.taxonomies,onChange:e=>{n("taxonomies",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.comment_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Comment change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the comment status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.comment_change_trigger,onChange:e=>{n("comment_change_trigger",e)}})})]}),e.comment_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Comment types","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the comment types for which you want to send notifications when the comment status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select comment types","notification-master"),options:p,value:e.comment_types,onChange:e=>{n("comment_types",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Media change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the media changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.media_change_trigger,onChange:e=>{n("media_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("User change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the user changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.user_change_trigger,onChange:e=>{n("user_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Theme change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the theme changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.theme_change_trigger,onChange:e=>{n("theme_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Plugin change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the plugin changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.plugin_change_trigger,onChange:e=>{n("plugin_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsx)("div",{className:"notification-master__settings--item--title",children:(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Privacy","notification-master")})}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.privacy_trigger,onChange:e=>{n("privacy_trigger",e)}})})]}),(0,s.jsx)("div",{className:"notification-master__settings--footer-placeholder"}),(0,s.jsx)("div",{className:"notification-master__settings--footer",ref:i,children:(0,s.jsx)(Eu,{type:"primary",size:"large",onClick:async()=>{if(!a){u(!0);try{await zT()({path:"/ntfm/v1/settings",method:"POST",data:{settings:e}}),o({type:"success",message:(0,c.__)("Settings saved successfully","notification-master")}),window.location.reload()}catch(e){o({type:"error",message:(0,c.__)("Failed to save settings","notification-master")})}finally{u(!1)}}},loading:a,children:(0,c.__)("Save","notification-master")})})]})]})}},{path:"/notification-log",slug:"notification-log",title:(0,c.__)("Notification Log","notification-master"),component:()=>{const[e,t]=(0,l.useState)(!0),[n,o]=(0,l.useState)([]),[r,i]=(0,l.useState)(10),[a,u]=(0,l.useState)(1),[h,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[g,v]=(0,l.useState)(0),{addNotice:b}=(0,d.useDispatch)("notification-master/core") ;if(lz((0,c.__)("Notification Log","notification-master")),(0,l.useEffect)((()=>{(async()=>{t(!0);try{const e=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/notification-logs",{per_page:r,page:a})});e&&(o((0,Gf.isArray)(e?.logs)?e.logs:[]),v(e?.count||0))}catch(e){b({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}t(!1)})()}),[r,a]),e&&(0,Gf.isEmpty)(n))return(0,s.jsx)("div",{className:"notification-master__log--loading",children:(0,s.jsx)(az,{color:"var(--notification-master-color-primary)"})});const y=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return(0,Gf.isObject)(e)?x(e):e},x=e=>{const t={};for(const n in e)"notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n&&(0,Gf.set)(t,n,y(e[n]));return t};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h2",{className:"notification-master-heading",children:[(0,s.jsx)(zN,{component:VJ,width:20,height:20}),(0,c.__)("Notification Log","notification-master")]}),(0,s.jsx)("div",{className:"notification-master__log",children:(0,Gf.isEmpty)(n)?(0,s.jsx)(Bk.Title,{level:5,style:{textAlign:"center"},children:(0,c.__)("No logs found.","notification-master")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tT,{align:"center",style:{marginBottom:"1rem"},children:(0,s.jsx)($z,{title:(0,c.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!p){m(!0);try{await zT()({path:"/ntfm/v1/notification-logs",method:"DELETE"}),o([])}catch(e){b({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,c.__)("Yes","notification-master"),cancelText:(0,c.__)("No","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",danger:!0,children:(0,c.__)("Delete All","notification-master")})})}),(0,s.jsx)(HX,{columns:WJ,dataSource:n.map((e=>({...e,log_status:(0,s.jsx)(Bk.Text,{type:"error"===e.status?"danger":"success",children:e.status}),notification:(0,s.jsx)(Bk.Text,{children:e.content.notification_name}),date:new Date(e.date).toLocaleString(),view:(0,s.jsx)(gS,{title:(0,c.__)("View","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",shape:"circle",icon:(0,s.jsx)(Qk,{}),onClick:()=>f(e)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,c.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{u(e),i(t)}},loading:e,rowKey:"id",style:{width:"100%"}})]})}),(0,s.jsx)(Xf,{title:(0,c.__)("Log Details","notification-master"),open:!!h,onCancel:()=>f(null),footer:null,width:800,children:(0,s.jsxs)("div",{className:"notification-master__log--view",children:[(0,s.jsxs)(tT,{gap:10,children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Name","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.content.notification_name})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Trigger","notification-master")," : "]}),(0,s.jsxs)(Bk.Text,{children:[h?.content.trigger_name," ",`"${h?.content.trigger}"`]})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Integration","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.integration})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Status","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{type:"error"===h?.status?"danger":"success",children:h?.status})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Date","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.date})]}),(0,s.jsxs)(tT,{style:{marginTop:"1rem",flexDirection:"column"},children:[(0,s.jsx)(Bk.Text,{strong:!0,children:(0,c.__)("Details","notification-master")}),(0,s.jsx)("pre",{style:{overflowX:"auto"},children:JSON.stringify(x(h?.content),null,2)})]})]})})]})}},{path:"/debug-log",slug:"debug-log",title:(0,c.__)("Debug Log","notification-master"),component:()=>{const[e,t]=(0,l.useState)(!0),[n,o]=(0,l.useState)([]),[r,i]=(0,l.useState)(10),[a,u]=(0,l.useState)(1),[h,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[g,v]=(0,l.useState)(0),[b,y]=(0,l.useState)(!1),{addNotice:x}=(0,d.useDispatch)("notification-master/core");return lz((0,c.__)("Debug Log","notification-master")),(0,l.useEffect)((()=>{(async()=>{try{const e=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/logs",{per_page:r,page:a})});e?(o((0,Gf.isArray)(e?.logs)?e.logs:[]),v(e?.count||0)):x({type:"error",message:(0,c.__)("An error occurred","notification-master")})}catch(e){x({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}t(!1)})()}),[r,a]),e?(0,s.jsx)("div",{className:"notification-master__log--loading",children:(0,s.jsx)(az,{color:"var(--notification-master-color-primary)"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h2",{className:"notification-master-heading",children:[(0,s.jsx)(zN,{component:VJ,width:20,height:20}),(0,c.__)("Debug Log","notification-master")]}),(0,s.jsx)("div",{className:"notification-master__log",children:(0,Gf.isEmpty)(n)?(0,s.jsx)(Bk.Title,{level:5,style:{textAlign:"center"},children:(0,c.__)("No logs found.","notification-master")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tT,{align:"center",style:{marginBottom:"1rem"},children:[(0,s.jsx)(Eu,{type:"primary",onClick:async()=>{if(b)return;y(!0);const e=await zT()({path:"/ntfm/v1/logs/export",method:"GET",parse:!1});if(e){const t=await e.blob(),n=window.URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download="logs.json",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n)}y(!1)},style:{marginRight:"1rem"},loading:b,children:(0,c.__)("Export All","notification-master")}),(0,s.jsx)($z,{title:(0,c.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!p){m(!0);try{await zT()({path:"/ntfm/v1/logs",method:"DELETE"}),o([])}catch(e){x({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,c.__)("Yes","notification-master"),cancelText:(0,c.__)("No","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",danger:!0,children:(0,c.__)("Delete All","notification-master")})})]}),(0,s.jsx)(HX,{columns:qJ,dataSource:n.map((e=>({...e,log_type:(0,s.jsx)(Bk.Text,{type:"error"===e.type?"danger":"debug"===e.type?"warning":"secondary",children:e.type.toUpperCase()}),date:new Date(e.date).toLocaleString(),view:(0,s.jsx)(gS,{title:(0,c.__)("View","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",shape:"circle",icon:(0,s.jsx)(Qk,{}),onClick:()=>f(e.id)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,c.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{u(e),i(t)}},rowKey:"id",style:{width:"100%"}})]})}),(0,s.jsx)(Xf,{title:(0,c.__)("Log Details","notification-master"),open:!!h,onCancel:()=>f(null),footer:null,width:600,children:(0,s.jsx)("pre",{style:{maxHeight:"400px",overflowX:"auto"},children:(e=>{const t={};for(const n in e)if("notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n)if("string"==typeof e[n])try{(0,Gf.set)(t,n,JSON.parse(e[n]))}catch(o){(0,Gf.set)(t,n,e[n])}else(0,Gf.set)(t,n,e[n]);return JSON.stringify(t,null,2)})(n.find((e=>e.id===h))?.content)})})]})}}]),UJ=()=>{const{notices:e}=(0,d.useSelect)((e=>({notices:e("notification-master/core").getNotices()}))),{deleteNotice:t}=(0,d.useDispatch)("notification-master/core"),[n,o]=Jl.useNotification();return(0,l.useEffect)((()=>{(0,Gf.size)(e)&&(0,Gf.map)(e,((e,o)=>{const{message:r,description:i,type:a,duration:s}=e;n[a]({message:r,duration:s||6,description:i,onClose:()=>t(o),placement:"bottomRight"})}))}),[e]),o},XJ=({children:e})=>(0,s.jsx)(Ga,{theme:{token:{colorPrimary:"#F07539"},components:{Button:{borderRadius:0,colorPrimary:"#312a30",colorPrimaryHover:"#F07539",defaultShadow:"none",primaryShadow:"none",borderRadiusLG:0,borderRadiusSM:0,borderRadiusOuter:0,algorithm:!1},Input:{borderRadius:0,borderRadiusLG:0,borderRadiusSM:0,borderRadiusOuter:0,paddingBlock:14,paddingInline:14}}},children:e}),GJ=({slug:e,component:t})=>{const{proAlert:n}=(0,d.useSelect)((e=>({proAlert:e("notification-master/core").getProAlert()}))),{toggleProAlert:o}=(0,d.useDispatch)("notification-master/core"),r=J(),i=(0,l.useCallback)(((e,t)=>n=>{n.preventDefault(),r(gT(e)),t?.classList.add("current"),Array.from(t?.parentElement?.children||[]).forEach((e=>{e!==t&&e.classList.remove("current")}))}),[]);return(0,l.useEffect)((()=>{const e=new Map;return(0,Gf.map)((0,Gf.filter)(KJ,(e=>!e.hidden)),"slug").forEach((t=>{const n=t,o=document.querySelector(`.wp-submenu-wrap a[href*="ntfm-${n}"]`);if(!o||!o.parentElement)return;const r=i(n,o.parentElement);e.set(o,r),o.addEventListener("click",r)})),()=>{e.forEach(((e,t)=>{t.removeEventListener("click",e)}))}}),[i]),(0,s.jsxs)("div",{className:`notification-master-page notification-master-page__${e}`,children:[(0,s.jsx)(Xf,{title:!1,open:n,onCancel:()=>o(!1),footer:null,children:(0,s.jsx)(DT,{})}),(0,s.jsx)(RS,{icon:(0,s.jsx)(fw,{}),onClick:()=>{const e=LS.ntfmSiteUrl;window.open(`${e}/docs/getting-started`,"_blank")},tooltip:(0,c.__)("Help","notification-master")}),(0,s.jsx)(UJ,{}),(0,s.jsx)(xT,{}),(0,s.jsx)(XJ,{children:(0,s.jsx)(uw.div,{className:"notification-master-page__content",children:(0,s.jsx)(t,{})})})]})},YJ=window.wp.dataControls,ZJ="SET_SETTINGS",QJ="UPDATE_SETTING",JJ="ADD_NOTICE",e0="DELETE_NOTICE",t0="SET_TOTAL_NOTIFICATIONS",n0="TOGGLE_PRO_ALERT",o0="TOGGLE_MERGE_TAGS",r0=e=>({type:ZJ,settings:e}),i0=(e,t)=>({type:QJ,key:e,value:t}),a0=e=>({type:JJ,notice:e}),s0=e=>({type:e0,id:e}),l0=e=>({type:t0,total:e}),c0=e=>({type:n0,status:e}),u0=e=>({type:o0,status:e}),d0=e=>e.settings,h0=e=>e.notices,f0=(e,t)=>e.notices[t],p0=e=>e.totalNotifications,m0=e=>e.proAlert,g0=e=>e.mergeTags,v0=()=>async({dispatch:e})=>{const t=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/settings")});e.setSettings(t)},b0=e=>async({dispatch:t})=>{const n=await zT()({path:(0,pJ.addQueryArgs)(`/ntfm/v1/integrations/${e}`)});t.receiveIntegration(e,n)},y0=()=>async({dispatch:e})=>{const t=parseInt(LS.totalNotifications)||0;e.setTotalNotifications(t)},x0={settings:{},notices:{},totalNotifications:0,proAlert:!1,mergeTags:!1},w0={reducer:(e=x0,t)=>{switch(t.type){case ZJ:return{...e,settings:t.settings};case QJ:return{...e,settings:{...e.settings,[t.key]:t.value}};case JJ:const n=Math.random().toString(36).substr(2,9),o={...t.notice,noteId:n};return{...e,notices:{...e.notices,[n]:o}};case e0:const r={...e.notices};return r[t.id]&&delete r[t.id],{...e,notices:r};case t0:return{...e,totalNotifications:t.total};case n0:return{...e,proAlert:t.status};case o0:return{...e,mergeTags:!e.mergeTags};default:return e}},actions:r,selectors:i,controls:YJ.controls,resolvers:a},C0=(0,d.createReduxStore)("notification-master/core",w0);(0,d.register)(C0),(0,l.render)((0,s.jsx)((()=>(0,s.jsx)("div",{className:"notification-master__pages",children:(0,s.jsx)(ge,{history:mT(),children:(0,s.jsx)(de,{children:KJ.map((e=>(0,s.jsx)(ce,{path:e.path,element:(0,s.jsx)(GJ,{...e})},e.slug)))})})})),{}),document.getElementById("notification-master-admin"))},1609:e=>{"use strict";e.exports=window.React},2634:()=>{},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e](i,i.exports,o),i.loaded=!0,i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=globalThis.webpackChunknotification_master=globalThis.webpackChunknotification_master||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[350],(()=>o(2163)));r=o.O(r)})();11 (0,c.sprintf)((0,c.__)("All debug logs older than {%s} days will be deleted.","notification-master"),e.delete_logs_every)})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(c$,{type:"number",value:e.delete_logs_every,onChange:e=>{n("delete_logs_every",e.target.value)}})})]}),(0,s.jsx)("div",{className:"notification-master__settings--header",children:(0,s.jsx)("h3",{className:"notification-master-heading",children:(0,c.__)("Triggers","notification-master")})}),!LS.isPro&&(0,s.jsx)(qw.Ribbon,{text:(0,c.__)("Pro","notification-master"),children:(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),onClick:()=>r(!0),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("WooCommerce","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the WooCommerce product, review, or order changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:!1,onChange:()=>{r(!0)}})})]})}),LS.isPro&&(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("WooCommerce","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the WooCommerce product, review, or order changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.woocommerce_change_trigger||!0,onChange:e=>{n("woocommerce_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.post_status_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Post status change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the post status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.post_status_change_trigger,onChange:e=>{n("post_status_change_trigger",e)}})})]}),e.post_status_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Post types","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the post types for which you want to send notifications when the post status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select post types","notification-master"),options:h,value:e.post_types,onChange:e=>{n("post_types",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.taxonomy_term_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Taxonomy term change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the taxonomy term changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.taxonomy_term_change_trigger,onChange:e=>{n("taxonomy_term_change_trigger",e)}})})]}),e.taxonomy_term_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Taxonomies","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the taxonomies for which you want to send notifications when the taxonomy term changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select taxonomies","notification-master"),options:f,value:e.taxonomies,onChange:e=>{n("taxonomies",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item",{"notification-master__settings--item--has-subitem":e.comment_change_trigger}),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Comment change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the comment status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.comment_change_trigger,onChange:e=>{n("comment_change_trigger",e)}})})]}),e.comment_change_trigger&&(0,s.jsxs)("div",{className:"notification-master__settings--item notification-master__settings--item--block",children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Comment types","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("Select the comment types for which you want to send notifications when the comment status changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--select",children:(0,s.jsx)($j,{mode:"multiple",size:"large",placeholder:(0,c.__)("Select comment types","notification-master"),options:p,value:e.comment_types,onChange:e=>{n("comment_types",e)},style:{width:"100%"}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Media change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the media changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.media_change_trigger,onChange:e=>{n("media_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("User change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the user changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.user_change_trigger,onChange:e=>{n("user_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Theme change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the theme changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.theme_change_trigger,onChange:e=>{n("theme_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsxs)("div",{className:"notification-master__settings--item--title",children:[(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Plugin change","notification-master")}),(0,s.jsx)(Bk.Text,{children:(0,c.__)("If enabled, will be able to add notifications when the plugin changes.","notification-master")})]}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.plugin_change_trigger,onChange:e=>{n("plugin_change_trigger",e)}})})]}),(0,s.jsxs)("div",{className:ei()("notification-master__settings--item"),children:[(0,s.jsx)("div",{className:"notification-master__settings--item--title",children:(0,s.jsx)(Bk.Title,{level:5,children:(0,c.__)("Privacy","notification-master")})}),(0,s.jsx)("div",{className:"notification-master__settings--item--switch",children:(0,s.jsx)(Dj,{title:(0,c.__)("Enable","notification-master"),checkedChildren:(0,c.__)("On","notification-master"),unCheckedChildren:(0,c.__)("Off","notification-master"),checked:e.privacy_trigger,onChange:e=>{n("privacy_trigger",e)}})})]}),(0,s.jsx)("div",{className:"notification-master__settings--footer-placeholder"}),(0,s.jsx)("div",{className:"notification-master__settings--footer",ref:i,children:(0,s.jsx)(Eu,{type:"primary",size:"large",onClick:async()=>{if(!a){u(!0);try{await zT()({path:"/ntfm/v1/settings",method:"POST",data:{settings:e}}),o({type:"success",message:(0,c.__)("Settings saved successfully","notification-master")}),window.location.reload()}catch(e){o({type:"error",message:(0,c.__)("Failed to save settings","notification-master")})}finally{u(!1)}}},loading:a,children:(0,c.__)("Save","notification-master")})})]})]})}},{path:"/notification-log",slug:"notification-log",title:(0,c.__)("Notification Log","notification-master"),component:()=>{const[e,t]=(0,l.useState)(!0),[n,o]=(0,l.useState)([]),[r,i]=(0,l.useState)(10),[a,u]=(0,l.useState)(1),[h,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[g,v]=(0,l.useState)(0),{addNotice:b}=(0,d.useDispatch)("notification-master/core"),[y,x]=(0,l.useState)([]),[w,C]=(0,l.useState)(""),[S,E]=(0,l.useState)(!1);lz((0,c.__)("Notification Log","notification-master"));const k=async()=>{t(!0);try{const e=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/notification-logs",{per_page:r,page:a})});e&&(o((0,Gf.isArray)(e?.logs)?e.logs:[]),v(e?.count||0))}catch(e){b({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}t(!1)};if((0,l.useEffect)((()=>{k()}),[r,a]),e&&(0,Gf.isEmpty)(n))return(0,s.jsx)("div",{className:"notification-master__log--loading",children:(0,s.jsx)(az,{color:"var(--notification-master-color-primary)"})});const $=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return(0,Gf.isObject)(e)?O(e):e},O=e=>{const t={};for(const n in e)"notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n&&(0,Gf.set)(t,n,$(e[n]));return t};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h2",{className:"notification-master-heading",children:[(0,s.jsx)(zN,{component:VJ,width:20,height:20}),(0,c.__)("Notification Log","notification-master")]}),(0,s.jsx)("div",{className:"notification-master__log",children:(0,Gf.isEmpty)(n)?(0,s.jsx)(Bk.Title,{level:5,style:{textAlign:"center"},children:(0,c.__)("No logs found.","notification-master")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tT,{gap:20,justify:"space-between",children:[(0,s.jsxs)(tT,{gap:"small",children:[(0,s.jsx)($j,{options:[{label:(0,c.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,c.__)("Delete","notification-master"),value:"delete"}],value:w,onChange:e=>C(e)}),(0,s.jsx)(Eu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Gf.isEmpty)(y))return void b({type:"error",message:(0,c.__)("Please select a log.","notification-master")});E(!0);try{await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/notification-logs"),method:"DELETE",data:{ids:y}}),x([]),k()}catch(e){b({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}finally{E(!1)}}})(w),loading:S,children:(0,c.__)("Apply","notification-master")})]}),(0,s.jsx)(tT,{align:"center",style:{marginBottom:"1rem"},children:(0,s.jsx)($z,{title:(0,c.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!p){m(!0);try{await zT()({path:"/ntfm/v1/notification-logs",method:"DELETE"}),o([])}catch(e){b({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,c.__)("Yes","notification-master"),cancelText:(0,c.__)("No","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",danger:!0,children:(0,c.__)("Delete All","notification-master")})})})]}),(0,s.jsx)(HX,{columns:WJ,dataSource:n.map((e=>({...e,log_status:(0,s.jsx)(Bk.Text,{type:"error"===e.status?"danger":"success",children:e.status}),notification:(0,s.jsx)(Bk.Text,{children:e.content.notification_name}),date:new Date(e.date).toLocaleString(),view:(0,s.jsx)(gS,{title:(0,c.__)("View","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",shape:"circle",icon:(0,s.jsx)(Qk,{}),onClick:()=>f(e)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,c.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{u(e),i(t)}},loading:e,rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:y,onChange:e=>x(e)}})]})}),(0,s.jsx)(Xf,{title:(0,c.__)("Log Details","notification-master"),open:!!h,onCancel:()=>f(null),footer:null,width:800,children:(0,s.jsxs)("div",{className:"notification-master__log--view",children:[(0,s.jsxs)(tT,{gap:10,children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Name","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.content.notification_name})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Trigger","notification-master")," : "]}),(0,s.jsxs)(Bk.Text,{children:[h?.content.trigger_name," ",`"${h?.content.trigger}"`]})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Integration","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.integration})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Status","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{type:"error"===h?.status?"danger":"success",children:h?.status})]}),(0,s.jsxs)(tT,{gap:10,style:{marginTop:"1rem"},children:[(0,s.jsxs)(Bk.Text,{strong:!0,children:[(0,c.__)("Date","notification-master")," : "]}),(0,s.jsx)(Bk.Text,{children:h?.date})]}),(0,s.jsxs)(tT,{style:{marginTop:"1rem",flexDirection:"column"},children:[(0,s.jsx)(Bk.Text,{strong:!0,children:(0,c.__)("Details","notification-master")}),(0,s.jsx)("pre",{style:{overflowX:"auto"},children:JSON.stringify(O(h?.content),null,2)})]})]})})]})}},{path:"/debug-log",slug:"debug-log",title:(0,c.__)("Debug Log","notification-master"),component:()=>{const[e,t]=(0,l.useState)(!0),[n,o]=(0,l.useState)([]),[r,i]=(0,l.useState)(10),[a,u]=(0,l.useState)(1),[h,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[g,v]=(0,l.useState)(0),[b,y]=(0,l.useState)(!1),{addNotice:x}=(0,d.useDispatch)("notification-master/core"),[w,C]=(0,l.useState)([]),[S,E]=(0,l.useState)(""),[k,$]=(0,l.useState)(!1);lz((0,c.__)("Debug Log","notification-master"));const O=async()=>{try{const e=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/logs",{per_page:r,page:a})});e?(o((0,Gf.isArray)(e?.logs)?e.logs:[]),v(e?.count||0)):x({type:"error",message:(0,c.__)("An error occurred","notification-master")})}catch(e){x({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}t(!1)};return(0,l.useEffect)((()=>{O()}),[r,a]),e?(0,s.jsx)("div",{className:"notification-master__log--loading",children:(0,s.jsx)(az,{color:"var(--notification-master-color-primary)"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h2",{className:"notification-master-heading",children:[(0,s.jsx)(zN,{component:VJ,width:20,height:20}),(0,c.__)("Debug Log","notification-master")]}),(0,s.jsx)("div",{className:"notification-master__log",children:(0,Gf.isEmpty)(n)?(0,s.jsx)(Bk.Title,{level:5,style:{textAlign:"center"},children:(0,c.__)("No logs found.","notification-master")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tT,{gap:20,justify:"space-between",children:[(0,s.jsxs)(tT,{gap:"small",children:[(0,s.jsx)($j,{options:[{label:(0,c.__)("Bulk Actions","notification-master"),value:"",disabled:!0},{label:(0,c.__)("Delete","notification-master"),value:"delete"}],value:S,onChange:e=>E(e)}),(0,s.jsx)(Eu,{type:"primary",onClick:()=>(async e=>{if("delete"===e){if((0,Gf.isEmpty)(w))return void x({type:"error",message:(0,c.__)("Please select a log.","notification-master")});$(!0);try{await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/logs"),method:"DELETE",data:{ids:w}}),C([]),O()}catch(e){x({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}finally{$(!1)}}})(S),loading:k,children:(0,c.__)("Apply","notification-master")})]}),(0,s.jsxs)(tT,{align:"center",style:{marginBottom:"1rem"},children:[(0,s.jsx)(Eu,{type:"primary",onClick:async()=>{if(b)return;y(!0);const e=await zT()({path:"/ntfm/v1/logs/export",method:"GET",parse:!1});if(e){const t=await e.blob(),n=window.URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download="logs.json",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n)}y(!1)},style:{marginRight:"1rem"},loading:b,children:(0,c.__)("Export All","notification-master")}),(0,s.jsx)($z,{title:(0,c.__)("Are you sure?","notification-master"),onConfirm:async()=>{if(!p){m(!0);try{await zT()({path:"/ntfm/v1/logs",method:"DELETE"}),o([])}catch(e){x({type:"error",message:e?.message||(0,c.__)("An error occurred","notification-master")})}m(!1)}},okText:(0,c.__)("Yes","notification-master"),cancelText:(0,c.__)("No","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",danger:!0,children:(0,c.__)("Delete All","notification-master")})})]})]}),(0,s.jsx)(HX,{columns:qJ,dataSource:n.map((e=>({...e,log_type:(0,s.jsx)(Bk.Text,{type:"error"===e.type?"danger":"debug"===e.type?"warning":"secondary",children:e.type.toUpperCase()}),date:new Date(e.date).toLocaleString(),view:(0,s.jsx)(gS,{title:(0,c.__)("View","notification-master"),children:(0,s.jsx)(Eu,{type:"primary",shape:"circle",icon:(0,s.jsx)(Qk,{}),onClick:()=>f(e.id)})})}))),pagination:{total:g,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`${(0,c.__)("Total","notification-master")}: ${e}`,onChange:(e,t)=>{u(e),i(t)}},rowKey:"id",style:{width:"100%"},rowSelection:{selectedRowKeys:w,onChange:e=>C(e)}})]})}),(0,s.jsx)(Xf,{title:(0,c.__)("Log Details","notification-master"),open:!!h,onCancel:()=>f(null),footer:null,width:600,children:(0,s.jsx)("pre",{style:{maxHeight:"400px",overflowX:"auto"},children:(e=>{const t={};for(const n in e)if("notification_name"!==n&&"trigger"!==n&&"trigger_name"!==n)if("string"==typeof e[n])try{(0,Gf.set)(t,n,JSON.parse(e[n]))}catch(o){(0,Gf.set)(t,n,e[n])}else(0,Gf.set)(t,n,e[n]);return JSON.stringify(t,null,2)})(n.find((e=>e.id===h))?.content)})})]})}}]),UJ=()=>{const{notices:e}=(0,d.useSelect)((e=>({notices:e("notification-master/core").getNotices()}))),{deleteNotice:t}=(0,d.useDispatch)("notification-master/core"),[n,o]=Jl.useNotification();return(0,l.useEffect)((()=>{(0,Gf.size)(e)&&(0,Gf.map)(e,((e,o)=>{const{message:r,description:i,type:a,duration:s}=e;n[a]({message:r,duration:s||6,description:i,onClose:()=>t(o),placement:"bottomRight"})}))}),[e]),o},XJ=({children:e})=>(0,s.jsx)(Ga,{theme:{token:{colorPrimary:"#F07539"},components:{Button:{borderRadius:0,colorPrimary:"#312a30",colorPrimaryHover:"#F07539",defaultShadow:"none",primaryShadow:"none",borderRadiusLG:0,borderRadiusSM:0,borderRadiusOuter:0,algorithm:!1},Input:{borderRadius:0,borderRadiusLG:0,borderRadiusSM:0,borderRadiusOuter:0,paddingBlock:14,paddingInline:14}}},children:e}),GJ=({slug:e,component:t})=>{const{proAlert:n}=(0,d.useSelect)((e=>({proAlert:e("notification-master/core").getProAlert()}))),{toggleProAlert:o}=(0,d.useDispatch)("notification-master/core"),r=J(),i=(0,l.useCallback)(((e,t)=>n=>{n.preventDefault(),r(gT(e)),t?.classList.add("current"),Array.from(t?.parentElement?.children||[]).forEach((e=>{e!==t&&e.classList.remove("current")}))}),[]);return(0,l.useEffect)((()=>{const e=new Map;return(0,Gf.map)((0,Gf.filter)(KJ,(e=>!e.hidden)),"slug").forEach((t=>{const n=t,o=document.querySelector(`.wp-submenu-wrap a[href*="ntfm-${n}"]`);if(!o||!o.parentElement)return;const r=i(n,o.parentElement);e.set(o,r),o.addEventListener("click",r)})),()=>{e.forEach(((e,t)=>{t.removeEventListener("click",e)}))}}),[i]),(0,s.jsxs)("div",{className:`notification-master-page notification-master-page__${e}`,children:[(0,s.jsx)(Xf,{title:!1,open:n,onCancel:()=>o(!1),footer:null,children:(0,s.jsx)(DT,{})}),(0,s.jsx)(RS,{icon:(0,s.jsx)(fw,{}),onClick:()=>{const e=LS.ntfmSiteUrl;window.open(`${e}/docs/getting-started`,"_blank")},tooltip:(0,c.__)("Help","notification-master")}),(0,s.jsx)(UJ,{}),(0,s.jsx)(xT,{}),(0,s.jsx)(XJ,{children:(0,s.jsx)(uw.div,{className:"notification-master-page__content",children:(0,s.jsx)(t,{})})})]})},YJ=window.wp.dataControls,ZJ="SET_SETTINGS",QJ="UPDATE_SETTING",JJ="ADD_NOTICE",e0="DELETE_NOTICE",t0="SET_TOTAL_NOTIFICATIONS",n0="TOGGLE_PRO_ALERT",o0="TOGGLE_MERGE_TAGS",r0=e=>({type:ZJ,settings:e}),i0=(e,t)=>({type:QJ,key:e,value:t}),a0=e=>({type:JJ,notice:e}),s0=e=>({type:e0,id:e}),l0=e=>({type:t0,total:e}),c0=e=>({type:n0,status:e}),u0=e=>({type:o0,status:e}),d0=e=>e.settings,h0=e=>e.notices,f0=(e,t)=>e.notices[t],p0=e=>e.totalNotifications,m0=e=>e.proAlert,g0=e=>e.mergeTags,v0=()=>async({dispatch:e})=>{const t=await zT()({path:(0,pJ.addQueryArgs)("/ntfm/v1/settings")});e.setSettings(t)},b0=e=>async({dispatch:t})=>{const n=await zT()({path:(0,pJ.addQueryArgs)(`/ntfm/v1/integrations/${e}`)});t.receiveIntegration(e,n)},y0=()=>async({dispatch:e})=>{const t=parseInt(LS.totalNotifications)||0;e.setTotalNotifications(t)},x0={settings:{},notices:{},totalNotifications:0,proAlert:!1,mergeTags:!1},w0={reducer:(e=x0,t)=>{switch(t.type){case ZJ:return{...e,settings:t.settings};case QJ:return{...e,settings:{...e.settings,[t.key]:t.value}};case JJ:const n=Math.random().toString(36).substr(2,9),o={...t.notice,noteId:n};return{...e,notices:{...e.notices,[n]:o}};case e0:const r={...e.notices};return r[t.id]&&delete r[t.id],{...e,notices:r};case t0:return{...e,totalNotifications:t.total};case n0:return{...e,proAlert:t.status};case o0:return{...e,mergeTags:!e.mergeTags};default:return e}},actions:r,selectors:i,controls:YJ.controls,resolvers:a},C0=(0,d.createReduxStore)("notification-master/core",w0);(0,d.register)(C0),(0,l.render)((0,s.jsx)((()=>(0,s.jsx)("div",{className:"notification-master__pages",children:(0,s.jsx)(ge,{history:mT(),children:(0,s.jsx)(de,{children:KJ.map((e=>(0,s.jsx)(ce,{path:e.path,element:(0,s.jsx)(GJ,{...e})},e.slug)))})})})),{}),document.getElementById("notification-master-admin"))},1609:e=>{"use strict";e.exports=window.React},2634:()=>{},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e](i,i.exports,o),i.loaded=!0,i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,r,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=globalThis.webpackChunknotification_master=globalThis.webpackChunknotification_master||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[350],(()=>o(2163)));r=o.O(r)})(); -
notification-master/trunk/includes/class-logger.php
r3118722 r3131144 184 184 * 185 185 * @since 1.0.0 186 */ 187 public function delete() { 188 Logs_Model::delete(); 186 * 187 * @param array $ids IDs. 188 */ 189 public function delete( $ids = array() ) { 190 if ( empty( $ids ) ) { 191 Logs_Model::delete(); 192 } else { 193 Logs_Model::delete_by_ids( $ids ); 194 } 189 195 } 190 196 -
notification-master/trunk/includes/class-notification-logger.php
r3118722 r3131144 158 158 * 159 159 * @since 1.0.0 160 * 161 * @param array $ids IDs. 160 162 */ 161 public function delete() { 162 Notification_Logs_Model::delete(); 163 public function delete( $ids = array() ) { 164 if ( empty( $ids ) ) { 165 Notification_Logs_Model::delete(); 166 } else { 167 Notification_Logs_Model::delete_by_ids( $ids ); 168 } 163 169 } 164 170 -
notification-master/trunk/includes/db/models/class-logs-model.php
r3118722 r3131144 117 117 118 118 /** 119 * Delete by IDs. 120 * 121 * @since 1.0.0 122 * 123 * @param array $ids IDs. 124 */ 125 public static function delete_by_ids( $ids ) { 126 global $wpdb; 127 128 $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}ntfm_logs WHERE id IN (%s)", implode( ',', $ids ) ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- No caching needed. 129 } 130 131 /** 119 132 * Delete by date. 120 133 * -
notification-master/trunk/includes/db/models/class-notification-logs-model.php
r3118722 r3131144 135 135 136 136 /** 137 * Delete by IDs. 138 * 139 * @since 1.0.0 140 * 141 * @param array $ids IDs. 142 * 143 * @return int 144 */ 145 public static function delete_by_ids( $ids ) { 146 global $wpdb; 147 148 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}ntfm_notification_logs WHERE id IN (%s)", implode( ',', $ids ) ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- No caching needed. 149 } 150 151 /** 137 152 * Delete by date. 138 153 * -
notification-master/trunk/includes/rest-api/controllers/v1/class-rest-logs-controller.php
r3118722 r3131144 68 68 'callback' => array( $this, 'delete_logs' ), 69 69 'permission_callback' => array( $this, 'delete_logs_permissions_check' ), 70 'args' => array( 71 'ids' => array( 72 'type' => 'array', 73 'description' => __( 'Log IDs.', 'notification-master' ), 74 'required' => false, 75 ), 76 ), 70 77 ), 71 78 ) … … 137 144 */ 138 145 public function delete_logs( $request ) { 139 Notification_Master()->logger->delete(); 146 $ids = $request->get_param( 'ids' ) ? $request->get_param( 'ids' ) : array(); 147 Notification_Master()->logger->delete( $ids ); 140 148 141 149 return new WP_REST_Response( null, 204 ); -
notification-master/trunk/includes/rest-api/controllers/v1/class-rest-notification-logs-controller.php
r3118722 r3131144 68 68 'callback' => array( $this, 'delete_logs' ), 69 69 'permission_callback' => array( $this, 'delete_logs_permissions_check' ), 70 'args' => array( 71 'ids' => array( 72 'type' => 'array', 73 'description' => __( 'Log IDs.', 'notification-master' ), 74 'required' => false, 75 ), 76 ), 70 77 ), 71 78 ) … … 138 145 */ 139 146 public function delete_logs( $request ) { 140 Notification_Master()->notification_logger->delete(); 147 $ids = $request->get_param( 'ids' ) ? $request->get_param( 'ids' ) : array(); 148 Notification_Master()->notification_logger->delete( $ids ); 141 149 142 150 return new WP_REST_Response( null, 204 ); -
notification-master/trunk/languages/notification-master.pot
r3125271 r3131144 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Notification Master 1.1. 3\n"5 "Project-Id-Version: Notification Master 1.1.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/notification-master\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-0 7-25T14:33:52+02:00\n"12 "POT-Creation-Date: 2024-08-05T17:09:11+02:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 1317 1317 msgstr "" 1318 1318 1319 #: includes/rest-api/controllers/v1/class-rest-logs-controller.php:73 1320 #: includes/rest-api/controllers/v1/class-rest-notification-logs-controller.php:73 1321 msgid "Log IDs." 1322 msgstr "" 1323 1319 1324 #: includes/rest-api/controllers/v1/class-rest-notification-controller.php:51 1320 1325 msgid "Trigger." … … 1747 1752 #: dist/index.js:1 1748 1753 #: dist/index.js:5 1754 #: dist/index.js:11 1749 1755 msgid "Delete" 1750 1756 msgstr "" … … 1834 1840 1835 1841 #: dist/index.js:1 1842 #: dist/index.js:11 1836 1843 msgid "Bulk Actions" 1837 1844 msgstr "" … … 1866 1873 1867 1874 #: dist/index.js:1 1875 #: dist/index.js:11 1868 1876 msgid "Apply" 1869 1877 msgstr "" … … 2099 2107 2100 2108 #: dist/index.js:11 2109 msgid "Please select a log." 2110 msgstr "" 2111 2112 #: dist/index.js:11 2101 2113 msgid "Delete All" 2102 2114 msgstr "" -
notification-master/trunk/notifications-master.php
r3125271 r3131144 5 5 * Description: Enhance user engagement. Trigger notifications for events, support multiple channels like email and Discord, and personalize with dynamic merge tags. Easy setup and customization. 6 6 * 7 * Version: 1.1. 37 * Version: 1.1.4 8 8 * 9 9 * Author: Notification Master … … 26 26 27 27 // Define notification-master constants. 28 define( 'NOTIFICATION_MASTER_VERSION', '1.1. 3' );28 define( 'NOTIFICATION_MASTER_VERSION', '1.1.4' ); 29 29 define( 'NOTIFICATION_MASTER_FILE', __FILE__ ); 30 30 define( 'NOTIFICATION_MASTER_DIR', plugin_dir_path( __FILE__ ) ); -
notification-master/trunk/readme.txt
r3125271 r3131144 3 3 Donate link: https://notification-master.com 4 4 Tags: notification, email, alerts, notifications, webhooks 5 Stable tag: 1.1. 35 Stable tag: 1.1.4 6 6 Requires at least: 4.9 7 7 Tested up to: 6.6 … … 149 149 == Changelog == 150 150 151 = 1.1.4 = 152 * Feature: Added the ability to delete logs by selected IDs. 153 * Feature: Added the ability to delete notification logs by selected IDs. 154 151 155 = 1.1.3 = 152 156 * Fixed: Issue when updating notifications. -
notification-master/trunk/src/pages/debug-log/index.tsx
r3118722 r3131144 19 19 Popconfirm, 20 20 Typography, 21 Select, 21 22 } from 'antd'; 22 23 import Icon, { FileExclamationOutlined, EyeOutlined } from '@ant-design/icons'; … … 75 76 const [isExporting, setIsExporting] = useState(false); 76 77 const { addNotice } = useDispatch('notification-master/core'); 78 const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]); 79 const [selectedAction, setSelectedAction] = useState(''); 80 const [isApplying, setIsApplying] = useState(false); 81 77 82 usePageTitle(__('Debug Log', 'notification-master')); 78 83 … … 134 139 135 140 setIsDeleting(false); 141 }; 142 143 const handleBulkAction = async (action: string) => { 144 if (action === 'delete') { 145 if (isEmpty(selectedRowKeys)) { 146 addNotice({ 147 type: 'error', 148 message: __('Please select a log.', 'notification-master'), 149 }); 150 return; 151 } 152 153 setIsApplying(true); 154 155 try { 156 // @ts-ignore 157 const response = await apiFetch({ 158 path: addQueryArgs('/ntfm/v1/logs'), 159 method: 'DELETE', 160 data: { ids: selectedRowKeys }, 161 }); 162 163 setSelectedRowKeys([]); 164 fetchLogs(); 165 } catch (error: any) { 166 addNotice({ 167 type: 'error', 168 message: 169 error?.message || 170 __('An error occurred', 'notification-master'), 171 }); 172 } finally { 173 setIsApplying(false); 174 } 175 } 136 176 }; 137 177 … … 215 255 ) : ( 216 256 <> 217 <Flex align="center" style={{ marginBottom: '1rem' }}> 218 <Button 219 type="primary" 220 onClick={exportLogs} 221 style={{ marginRight: '1rem' }} 222 loading={isExporting} 257 <Flex gap={20} justify="space-between"> 258 <Flex gap={'small'}> 259 <Select 260 options={[ 261 { 262 label: __( 263 'Bulk Actions', 264 'notification-master' 265 ), 266 value: '', 267 disabled: true, 268 }, 269 { 270 label: __( 271 'Delete', 272 'notification-master' 273 ), 274 value: 'delete', 275 }, 276 ]} 277 value={selectedAction} 278 onChange={(value) => 279 setSelectedAction(value) 280 } 281 /> 282 <Button 283 type="primary" 284 onClick={() => 285 handleBulkAction(selectedAction) 286 } 287 loading={isApplying} 288 > 289 {__('Apply', 'notification-master')} 290 </Button> 291 </Flex> 292 <Flex 293 align="center" 294 style={{ marginBottom: '1rem' }} 223 295 > 224 {__('Export All', 'notification-master')} 225 </Button> 226 <Popconfirm 227 title={__( 228 'Are you sure?', 229 'notification-master' 230 )} 231 onConfirm={deleteAllLogs} 232 okText={__('Yes', 'notification-master')} 233 cancelText={__('No', 'notification-master')} 234 > 235 <Button type="primary" danger> 236 {__('Delete All', 'notification-master')} 296 <Button 297 type="primary" 298 onClick={exportLogs} 299 style={{ marginRight: '1rem' }} 300 loading={isExporting} 301 > 302 {__('Export All', 'notification-master')} 237 303 </Button> 238 </Popconfirm> 304 <Popconfirm 305 title={__( 306 'Are you sure?', 307 'notification-master' 308 )} 309 onConfirm={deleteAllLogs} 310 okText={__('Yes', 'notification-master')} 311 cancelText={__('No', 'notification-master')} 312 > 313 <Button type="primary" danger> 314 {__( 315 'Delete All', 316 'notification-master' 317 )} 318 </Button> 319 </Popconfirm> 320 </Flex> 239 321 </Flex> 240 322 <Table … … 285 367 rowKey="id" 286 368 style={{ width: '100%' }} 369 rowSelection={{ 370 selectedRowKeys, 371 onChange: (selectedRowKeys) => 372 setSelectedRowKeys(selectedRowKeys), 373 }} 287 374 /> 288 375 </> -
notification-master/trunk/src/pages/notification-log/index.tsx
r3118722 r3131144 19 19 Popconfirm, 20 20 Typography, 21 Select, 21 22 } from 'antd'; 22 23 import Icon, { FileExclamationOutlined, EyeOutlined } from '@ant-design/icons'; … … 80 81 const [count, setCount] = useState(0); 81 82 const { addNotice } = useDispatch('notification-master/core'); 83 const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]); 84 const [selectedAction, setSelectedAction] = useState(''); 85 const [isApplying, setIsApplying] = useState(false); 82 86 83 87 usePageTitle(__('Notification Log', 'notification-master')); … … 136 140 137 141 setIsDeleting(false); 142 }; 143 144 const handleBulkAction = async (action: string) => { 145 if (action === 'delete') { 146 if (isEmpty(selectedRowKeys)) { 147 addNotice({ 148 type: 'error', 149 message: __('Please select a log.', 'notification-master'), 150 }); 151 return; 152 } 153 154 setIsApplying(true); 155 156 try { 157 // @ts-ignore 158 const response = await apiFetch({ 159 path: addQueryArgs('/ntfm/v1/notification-logs'), 160 method: 'DELETE', 161 data: { ids: selectedRowKeys }, 162 }); 163 164 setSelectedRowKeys([]); 165 fetchLogs(); 166 } catch (error: any) { 167 addNotice({ 168 type: 'error', 169 message: 170 error?.message || 171 __('An error occurred', 'notification-master'), 172 }); 173 } finally { 174 setIsApplying(false); 175 } 176 } 138 177 }; 139 178 … … 199 238 ) : ( 200 239 <> 201 <Flex align="center" style={{ marginBottom: '1rem' }}> 202 <Popconfirm 203 title={__( 204 'Are you sure?', 205 'notification-master' 206 )} 207 onConfirm={deleteAllLogs} 208 okText={__('Yes', 'notification-master')} 209 cancelText={__('No', 'notification-master')} 240 <Flex gap={20} justify="space-between"> 241 <Flex gap={'small'}> 242 <Select 243 options={[ 244 { 245 label: __( 246 'Bulk Actions', 247 'notification-master' 248 ), 249 value: '', 250 disabled: true, 251 }, 252 { 253 label: __( 254 'Delete', 255 'notification-master' 256 ), 257 value: 'delete', 258 }, 259 ]} 260 value={selectedAction} 261 onChange={(value) => 262 setSelectedAction(value) 263 } 264 /> 265 <Button 266 type="primary" 267 onClick={() => 268 handleBulkAction(selectedAction) 269 } 270 loading={isApplying} 271 > 272 {__('Apply', 'notification-master')} 273 </Button> 274 </Flex> 275 <Flex 276 align="center" 277 style={{ marginBottom: '1rem' }} 210 278 > 211 <Button type="primary" danger> 212 {__('Delete All', 'notification-master')} 213 </Button> 214 </Popconfirm> 279 <Popconfirm 280 title={__( 281 'Are you sure?', 282 'notification-master' 283 )} 284 onConfirm={deleteAllLogs} 285 okText={__('Yes', 'notification-master')} 286 cancelText={__('No', 'notification-master')} 287 > 288 <Button type="primary" danger> 289 {__( 290 'Delete All', 291 'notification-master' 292 )} 293 </Button> 294 </Popconfirm> 295 </Flex> 215 296 </Flex> 216 297 <Table … … 265 346 rowKey="id" 266 347 style={{ width: '100%' }} 348 rowSelection={{ 349 selectedRowKeys, 350 onChange: (selectedRowKeys) => 351 setSelectedRowKeys(selectedRowKeys), 352 }} 267 353 /> 268 354 </>
Note: See TracChangeset
for help on using the changeset viewer.