diff --git a/.github/ISSUE_TEMPLATE/release-free-plugin.md b/.github/ISSUE_TEMPLATE/release-free-plugin.md index 49bee843a..e1f52d462 100644 --- a/.github/ISSUE_TEMPLATE/release-free-plugin.md +++ b/.github/ISSUE_TEMPLATE/release-free-plugin.md @@ -18,8 +18,7 @@ To release the Free plugin, ensure you complete all the tasks below. - [ ] Review updated packages and mention any production library updates in the changelog. - [ ] Inspect GitHub’s Dependabot warnings or Pull Requests. Resolve any false positives, then fix and commit the remaining issues. - [ ] If needed, build JS files for production using `composer build:js` and commit changes. -- [ ] Run `composer build:dir` to prepare the plugin for quality checks. -- [ ] Run a WP VIP scan with `composer check:phpcs` to ensure no warnings or errors greater than 5 exist. +- [ ] Run a code quality check with `composer check` and fix the highlighted issues. - [ ] Update the language files with `composer gen:lang` and note this in the changelog. - [ ] For minor and patch releases, maintain backward compatibility (e.g., renamed or moved classes, namespaces, functions). Include deprecation comments and note this in the changelog. Major releases may remove deprecated code; always note this in the changelog. - [ ] Update the changelog in `/CHANGELOG.md` with a user-friendly description and correct release date. diff --git a/.github/ISSUE_TEMPLATE/release-pro-plugin.md b/.github/ISSUE_TEMPLATE/release-pro-plugin.md index dd8c13dad..8aa6e335b 100644 --- a/.github/ISSUE_TEMPLATE/release-pro-plugin.md +++ b/.github/ISSUE_TEMPLATE/release-pro-plugin.md @@ -21,8 +21,7 @@ To release the Pro plugin, ensure you complete all the tasks below. - [ ] Check if the free plugin uses Composer's autoload and copy the autoload definition from the free plugin to the pro plugin refactoring the relative paths, on `/lib/composer.json`. Execute `composer dumpautoload` to update the autoload files. Commit the changes. - [ ] Inspect GitHub’s Dependabot warnings or Pull Requests. Resolve any false positives, then fix and commit the remaining issues. - [ ] If needed, build JS files for production using `composer build:js` and commit changes. -- [ ] Run `composer build:dir` to prepare the plugin for quality checks. -- [ ] Run a WP VIP scan with `composer check:phpcs` to ensure no warnings or errors greater than 5 exist. +- [ ] Run a code quality check with `composer check` and fix the highlighted issues. - [ ] Update the language files with `composer gen:lang` and note this in the changelog. - [ ] For minor and patch releases, maintain backward compatibility (e.g., renamed or moved classes, namespaces, functions). Include deprecation comments and note this in the changelog. Major releases may remove deprecated code; always note this in the changelog. - [ ] Update the changelog in `/CHANGELOG.md` with a user-friendly description and correct release date. diff --git a/CHANGELOG.md b/CHANGELOG.md index d8915176f..ca6cb0d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [3.4.4] - 21 Aug, 2024 + +### Fixed + +- Improve notice message when scheduled action runs after pressing "run" (PR #896). +- Fixed support for the Event Espresso plugin (PR #900). +- Fixed React warning about createRoot being deprecated. +- Fixed empty fieldset displayed when the bos is disabled for the post type (Issue #792). +- Update language files. + +### Changed + +- Add tabs for post types in the post types settings page (PR #895). + +### Added + +- Added computed date preview to the general settings page (PR #897). +- Added option to hide the calendar by default in the future action panel (PR #899). +- Added new filter `publishpressfuture_posts_future_action_column_output` to the Future Action column. + ## [3.4.3] - 06 Aug, 2024 ### Changed diff --git a/assets/css/edit.css b/assets/css/edit.css index d510e52c1..e39326c36 100644 --- a/assets/css/edit.css +++ b/assets/css/edit.css @@ -153,3 +153,16 @@ body.branch-6-6.edit-php .components-checkbox-control__input-container { padding-top: 9px; line-height: 2.2em; } + +/* Fix style on Event Espresso plugin */ +body.espresso-admin #publishpress-future-classic-editor .components-checkbox-control__input-container svg, +body.espresso-admin #publishpress-future-classic-editor .components-input-control__suffix +{ + visibility: hidden; +} + +body.espresso-admin #publishpress-future-classic-editor .components-input-control__container .components-input-control__input { + border: 0; + min-width: 30px; + padding: 0 4px; +} diff --git a/assets/js/block-editor.js b/assets/js/block-editor.js index 4a11164e0..9649651f0 100644 --- a/assets/js/block-editor.js +++ b/assets/js/block-editor.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(386),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),u=n(214),c=n(61),s=n(625),m=wp.components,d=m.PanelRow,f=m.CheckboxControl,p=m.SelectControl,y=m.FormTokenField,g=m.Spinner,b=m.BaseControl,v=wp.element,E=v.Fragment,S=v.useEffect,h=v.useState,_=wp.htmlEntities.decodeEntities,T=wp.url.addQueryArgs,x=wp.data,N=x.useSelect,R=x.useDispatch,A=wp.apiFetch;t.FutureActionPanel=function(e){var t=N((function(t){return t(e.storeName).getAction()}),[]),n=N((function(t){return t(e.storeName).getDate()}),[]),m=N((function(t){return t(e.storeName).getEnabled()}),[]),v=N((function(t){return t(e.storeName).getTerms()}),[]),x=N((function(t){return t(e.storeName).getTaxonomy()}),[]),C=N((function(t){return t(e.storeName).getTaxonomyName()}),[]),P=N((function(t){return t(e.storeName).getTermsListByName()}),[]),w=N((function(t){return t(e.storeName).getTermsListById()}),[]),O=N((function(t){return t(e.storeName).getIsFetchingTerms()}),[]),D=N((function(t){return t(e.storeName).getCalendarIsVisible()}),[]),F=N((function(t){return t(e.storeName).getHasValidData()}),[]),k=N((function(t){return t(e.storeName).getNewStatus()}),[]),I=h(""),j=r(I,2),B=j[0],M=j[1],L=R(e.storeName),V=L.setAction,H=L.setDate,W=L.setEnabled,U=L.setTerms,Q=L.setTaxonomy,Y=L.setTermsListByName,q=L.setTermsListById,X=L.setTaxonomyName,z=L.setIsFetchingTerms,G=L.setCalendarIsVisible,J=L.setHasValidData,K=L.setNewStatus,Z=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:x},w[e]=e,Y(P),q(w),U([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&w&&(ae=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return w[e]}))}(v)),"string"==typeof ae&&(ae=[]));var re=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(re=Object.keys(P));var oe,ie=D?"future-action-panel":"future-action-panel hidden-calendar",le=D?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=D?"future-action-date-panel":"future-action-date-panel hidden-calendar";oe="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var se=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,u=void 0;try{for(var c,s=a[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var m=c.value.split("}"),d=r(m,2),f=d[0],p=d[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},f)),o.push(p)}}catch(e){l=!0,u=e}finally{try{!i&&s.return&&s.return()}finally{if(l)throw u}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(t).includes("category")&&"category-remove-all"!==t,de=C;switch(t){case"category":de=e.strings.newTerms.replace("%s",C);break;case"category-remove":de=e.strings.removeTerms.replace("%s",C);break;case"category-add":de=e.strings.addTerms.replace("%s",C)}return S((function(){if(!m)return J(!0),void M("");J(function(){var a=!0;if(!m)return M(""),!0;t||(M(e.strings.errorActionRequired),a=!1),n||(M(e.strings.errorDateRequired),a=!1),n&&new Date(n){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,u=i("core/editor").getEditedPostAttribute("publishpress_future_action"),c=o("core/editor"),s=c.lockPostSaving,m=c.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:u.enabled,calendarIsVisible:!0,action:u.action,newStatus:u.newStatus,date:u.date,terms:u.terms,taxonomy:u.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,u=Object.entries(e)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var c=i.value,s=a(c,2),m=s[0],d=s[1];t.publishpress_future_action[m]=d}}catch(e){r=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){m("future-action")},onDataIsInvalid:function(){s("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,u=wp.element.useEffect,c=n((function(t){return t(e.storeName).getDate()}),[]),s=n((function(t){return t(e.storeName).getEnabled()}),[]),m=n((function(t){return t(e.storeName).getAction()}),[]),d=n((function(t){return t(e.storeName).getNewStatus()}),[]),f=n((function(t){return t(e.storeName).getTerms()}),[]),p=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),b=i(e.storeName).setChangeAction,v=f;"object"===(void 0===f?"undefined":a(f))&&(v=f.join(","));var E=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return u((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:E,onChange:function(e){b(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:m,newStatus:d,date:c,terms:f,taxonomy:p,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:s?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:c}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:v}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:p}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),u=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),c=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),s=l;return"object"===(void 0===l?"undefined":a(l))&&(s=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:c,date:t,terms:l,taxonomy:u,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(386),i=n(11),l=n(566),u=n(244),c=wp.components,s=c.PanelRow;c.BaseControl,t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,o.useState)(e.settings.taxonomy),c=a(n,2),m=c[0],d=c[1],f=(0,o.useState)([]),p=a(f,2),y=p[0],g=p[1],b=(0,o.useState)(!1),v=a(b,2),E=v[0],S=v[1],h=(0,o.useState)([]),_=a(h,2),T=_[0],x=_[1],N=(0,o.useState)(e.settings.howToExpire),R=a(N,2),A=R[0],C=R[1],P=(0,o.useState)(e.settings.active),w=a(P,2),O=w[0],D=w[1],F=(0,o.useState)(e.settings.defaultExpireOffset),k=a(F,2),I=k[0],j=k[1],B=(0,o.useState)(e.settings.emailNotification),M=a(B,2),L=M[0],V=M[1],H=(0,o.useState)(e.settings.autoEnabled),W=a(H,2),U=W[0],Q=W[1],Y=(0,o.useState)(!1),q=a(Y,2),X=q[0],z=q[1],G=(0,o.useState)(""),J=a(G,2),K=J[0],Z=J[1],$=(0,o.useState)(""),ee=a($,2),te=ee[0],ne=ee[1],ae=(0,o.useState)(t),re=a(ae,2),oe=re[0],ie=re[1],le=(0,o.useState)(e.settings.newStatus),ue=a(le,2),ce=ue[0],se=ue[1],me=(0,o.useState)(!1),de=a(me,2),fe=de[0],pe=de[1],ye=(0,o.useState)(""),ge=a(ye,2),be=ge[0],ve=ge[1],Ee=(0,o.useState)(),Se=a(Ee,2),he=Se[0],_e=Se[1],Te=(0,o.useRef)(new AbortController),xe=["category","category-add","category-remove","category-remove-all"];(0,o.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=oe.filter((function(e){return-1===xe.indexOf(e.value)})),ie(t))}),[]),(0,o.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),x(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ne(e.label)})))}),[m]),(0,o.useEffect)((function(){z(function(){if(!O)return Z(""),!0;var t=I||e.settings.globalDefaultExpireOffset;if(t){var n=Te.current;n&&n.abort(),Te.current=new AbortController;var a=Te.current.signal;pe(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:a}).then((function(e){pe(!1),z(e.isValid),Z(e.message),e.isValid?(ve(e.preview),_e(e.currentTime)):ve("")})).catch((function(e){"AbortError"!==e.name&&(pe(!1),z(!1),Z(e.message),ve(""))}))}return Z(""),!0}())}),[O,I]),(0,o.useEffect)((function(){if(te){var e=[];t.forEach((function(t){var n=t.label;-1!==xe.indexOf(t.value)&&(n=n.replace("%s",te.toLowerCase())),e.push({value:t.value,label:n})})),ie(e)}}),[te]),(0,o.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,o.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var Ne=y.map((function(e){return e.label})),Re=[React.createElement(r.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:O||!1,label:e.text.fieldActiveLabel,onChange:function(e){D(e)}}))];return O&&(Re.push(React.createElement(r.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:U||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){Q(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){d(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:oe,description:e.text.fieldHowToExpireDescription,selected:A,onChange:function(e){C(e)}}),"change-status"===A&&React.createElement(r.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:se}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(A)>-1&&React.createElement(r.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:Ne,value:T,isLoading:E,onChange:function(e){x(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(r.TextControl,{name:"expired-custom-date-"+e.postType,value:I,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),be&&React.createElement(o.Fragment,null,React.createElement("h4",null,e.text.datePreview),React.createElement("div",null,React.createElement("div",null,React.createElement("span",null,e.text.datePreviewCurrent,": "),React.createElement("span",null,React.createElement("code",null,he))),React.createElement("div",null,React.createElement("span",null,e.text.datePreviewComputed,": "),React.createElement("span",null,React.createElement("code",null,be))))))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(r.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){V(e)}})))),Re=(0,l.applyFilters)("expirationdate_settings_posttype",Re,e,O,o.useState),React.createElement(r.SettingsFieldset,{legend:e.legend},React.createElement(r.SettingsTable,{bodyChildren:Re}),!X&&React.createElement(s,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.PostTypesSettingsPanels=function(e){var t=[],n=!0,o=!1,i=void 0;try{for(var l,u=Object.entries(e.settings)[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var c=l.value,s=a(c,2),m=s[0],d=s[1];t.push(React.createElement(r.PostTypeSettingsPanel,{legend:d.label,text:e.text,postType:m,settings:d,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[m],statusesList:e.statusesList[m],key:m+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished}))}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(386),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},5:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",null,React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(386),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,u=e.onChangeDate,c=e.is12Hour,s=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:u,__nextRemoveHelpButton:!0,is12Hour:c,startOfWeek:s}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(386),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var u=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:u,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var u=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return u.FutureActionPanelBulkEdit}});var c=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return c.PostTypeSettingsPanel}});var s=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return s.PostTypesSettingsPanels}});var m=n(5);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return m.SettingRow}});var d=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return d.SettingsFieldset}});var f=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return f.SettingsForm}});var p=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return p.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var b=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return b.CheckboxControl}});var v=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return v.SelectControl}});var E=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return E.TextControl}});var S=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return S.TokensControl}});var h=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return h.NonceControl}});var _=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var T=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return T.Spinner}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,u=arguments[1];switch(u.type){case"SET_ACTION":return a({},l,{action:u.action});case"SET_NEW_STATUS":return a({},l,{newStatus:u.newStatus});case"SET_DATE":return"number"!=typeof u.date&&(0,o.isNumber)(u.date)&&(u.date=parseInt(u.date)),"string"==typeof u.date&&(u.date=new Date(u.date).getTime()),u.date=(0,r.normalizeUnixTimeToSeconds)(u.date),u.date=(0,r.formatUnixTimeToTimestamp)(u.date),a({},l,{date:u.date});case"SET_ENABLED":return a({},l,{enabled:u.enabled});case"SET_TERMS":return a({},l,{terms:u.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:u.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:u.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:u.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:u.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:u.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:u.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:u.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},u.extraData)});case"SET_EXTRA_DATA_BY_NAME":var c=a({},l.extraData,(e={},n=u.name,i=u.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},c)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{e.exports=publishpressFutureBlockEditorConfig},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},386:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a=n(480),r=n(57),o=n(562),i=n(986),l=n(788),u="publishpress-future/future-action";(0,a.createStore)({name:u,defaultState:{autoEnable:l.postTypeDefaultConfig.autoEnable,action:l.postTypeDefaultConfig.expireType,newStatus:l.postTypeDefaultConfig.newStatus,date:l.defaultDate,taxonomy:l.postTypeDefaultConfig.taxonomy,terms:l.postTypeDefaultConfig.terms}}),(0,i.registerPlugin)("publishpress-future-action",{render:function(){return React.createElement(r.FutureActionPanelBlockEditor,{postType:(0,o.select)("core/editor").getCurrentPostType(),isCleanNewPost:(0,o.select)("core/editor").isCleanNewPost(),actionsSelectOptions:l.actionsSelectOptions,statusesSelectOptions:l.statusesSelectOptions,is12Hour:l.is12Hour,timeFormat:l.timeFormat,startOfWeek:l.startOfWeek,storeName:u,strings:l.strings,taxonomyName:l.taxonomyName,postTypeDefaultConfig:l.postTypeDefaultConfig})}})})(); +(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(386),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(386),o=n(11),i=n(244);n(922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,s=e.labelOffsetPreview,u=e.setValidationErrorCallback,c=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),g=y[0],v=y[1],b=(0,r.useState)(),h=a(b,2),E=h[0],S=h[1],_=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=_.current;e&&e.abort(),_.current=new AbortController;var n=_.current.signal;c(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){c(!1),d(e.isValid),u(e.message),e.isValid?(v(e.preview),S(e.currentTime)):v("")})).catch((function(e){"AbortError"!==e.name&&(c(!1),d(!1),u(e.message),v(""))}))}}()}),[t]);var x=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+x},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},s,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},g)))))};t.default=l},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),s=n(214),u=n(61),c=n(625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,g=d.Spinner,v=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,S=b.useState,_=wp.htmlEntities.decodeEntities,x=wp.url.addQueryArgs,T=wp.data,A=T.useSelect,N=T.useDispatch,C=wp.apiFetch;t.FutureActionPanel=function(e){var t=A((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,b=t.enabled,T=t.terms,w=t.taxonomy,R=t.taxonomyName,P=t.termsListByName,O=t.termsListById,D=t.isFetchingTerms,I=t.calendarIsVisible,k=t.hasValidData,F=t.newStatus,B=S(""),j=r(B,2),M=j[0],V=j[1],L=N(e.storeName),H=L.setAction,U=L.setDate,W=L.setEnabled,Q=L.setTerms,Y=L.setTaxonomy,q=L.setTermsListByName,z=L.setTermsListById,X=L.setTaxonomyName,G=L.setIsFetchingTerms,J=L.setCalendarIsVisible,Z=L.setHasValidData,K=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:w},O[e]=e,q(P),z(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(T)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=I?"future-action-panel":"future-action-panel hidden-calendar",se=I?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=I?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,s=void 0;try{for(var u,c=a[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var d=u.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(l)throw s}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=R;switch(n){case"category":pe=e.strings.newTerms.replace("%s",R);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",R);break;case"category-add":pe=e.strings.addTerms.replace("%s",R)}return E((function(){if(!b)return Z(!0),void V("");Z(function(){var t=!0;if(!b)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,s=i("core/editor").getEditedPostAttribute("publishpress_future_action"),u=o("core/editor"),c=u.lockPostSaving,d=u.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:s.enabled,calendarIsVisible:!0,action:s.action,newStatus:s.newStatus,date:s.date,terms:s.terms,taxonomy:s.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=a(u,2),d=c[0],m=c[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){c("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,s=wp.element.useEffect,u=n((function(t){return t(e.storeName).getDate()}),[]),c=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return s((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:u,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:c?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:u}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),s=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),u=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),c=l;return"object"===(void 0===l?"undefined":a(l))&&(c=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:u,date:t,terms:l,taxonomy:s,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(57),i=n(386),l=n(11),s=n(566),u=n(244),c=(a=n(470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),g=y[0],v=y[1],b=(0,i.useState)(!1),h=r(b,2),E=h[0],S=h[1],_=(0,i.useState)([]),x=r(_,2),T=x[0],A=x[1],N=(0,i.useState)(e.settings.howToExpire),C=r(N,2),w=C[0],R=C[1],P=(0,i.useState)(e.settings.active),O=r(P,2),D=O[0],I=O[1],k=(0,i.useState)(e.settings.defaultExpireOffset),F=r(k,2),B=F[0],j=F[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],U=(0,i.useState)(e.settings.autoEnabled),W=r(U,2),Q=W[0],Y=W[1],q=(0,i.useState)(!0),z=r(q,2),X=z[0],G=z[1],J=(0,i.useState)(""),Z=r(J,2),K=Z[0],$=Z[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],se=(0,i.useState)(e.settings.newStatus),ue=r(se,2),ce=ue[0],de=ue[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ge=B||e.settings.globalDefaultExpireOffset,ve=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===ve.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),v(n),A(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==ve.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var be=g.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:D||!1,label:e.text.fieldActiveLabel,onChange:function(e){I(e)}}))];D&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){Y(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:w,onChange:function(e){R(e)}}),"change-status"===w&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(w)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:be,value:T,isLoading:E,onChange:function(e){A(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:B,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),React.createElement(c.default,{offset:ge,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:G}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,s.applyFilters)("expirationdate_settings_posttype",he,e,D,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!X&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],s=[],u=!0,c=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(u=(m=p.next()).done);u=!0){var f=m.value,y=a(f,2),g=y[0],v=y[1];s.push(React.createElement(r.PostTypeSettingsPanel,{legend:v.label,text:e.text,postType:g,settings:v,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[g],statusesList:e.statusesList[g],key:g+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===g}))}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}var b=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,S=!0,_=!1,x=void 0;try{for(var T,A=Object.entries(e.settings)[Symbol.iterator]();!(S=(T=A.next()).done);S=!0){var N=T.value,C=a(N,2),w=C[0],R=C[1];E=i===w,h.push(React.createElement("a",{href:"#"+w+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:w+"-tab",onClick:b},R.label))}}catch(e){_=!0,x=e}finally{try{!S&&A.return&&A.return()}finally{if(_)throw x}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),s)}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(386),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},5:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(386),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,s=e.onChangeDate,u=e.is12Hour,c=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:s,__nextRemoveHelpButton:!0,is12Hour:u,startOfWeek:c}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(386),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var s=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:s,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var s=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return s.FutureActionPanelBulkEdit}});var u=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return u.PostTypeSettingsPanel}});var c=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return c.PostTypesSettingsPanels}});var d=n(5);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var S=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return S.NonceControl}});var _=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var x=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return x.Spinner}});var T=n(470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return T.DateOffsetPreview}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,s=arguments[1];switch(s.type){case"SET_ACTION":return a({},l,{action:s.action});case"SET_NEW_STATUS":return a({},l,{newStatus:s.newStatus});case"SET_DATE":return"number"!=typeof s.date&&(0,o.isNumber)(s.date)&&(s.date=parseInt(s.date)),"string"==typeof s.date&&(s.date=new Date(s.date).getTime()),s.date=(0,r.normalizeUnixTimeToSeconds)(s.date),s.date=(0,r.formatUnixTimeToTimestamp)(s.date),a({},l,{date:s.date});case"SET_ENABLED":return a({},l,{enabled:s.enabled});case"SET_TERMS":return a({},l,{terms:s.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:s.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:s.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:s.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:s.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:s.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:s.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:s.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},s.extraData)});case"SET_EXTRA_DATA_BY_NAME":var u=a({},l.extraData,(e={},n=s.name,i=s.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},u)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(354),r=n.n(a),o=n(314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(72),r=n.n(a),o=n(825),i=n.n(o),l=n(659),s=n.n(l),u=n(56),c=n.n(u),d=n(540),m=n.n(d),p=n(113),f=n.n(p),y=n(461),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=m(),r()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0},72:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},788:e=>{e.exports=publishpressFutureBlockEditorConfig},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},386:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=n(480),r=n(57),o=n(562),i=n(986),l=n(788),s="publishpress-future/future-action";(0,a.createStore)({name:s,defaultState:{autoEnable:l.postTypeDefaultConfig.autoEnable,action:l.postTypeDefaultConfig.expireType,newStatus:l.postTypeDefaultConfig.newStatus,date:l.defaultDate,taxonomy:l.postTypeDefaultConfig.taxonomy,terms:l.postTypeDefaultConfig.terms}}),(0,i.registerPlugin)("publishpress-future-action",{render:function(){return React.createElement(r.FutureActionPanelBlockEditor,{postType:(0,o.select)("core/editor").getCurrentPostType(),isCleanNewPost:(0,o.select)("core/editor").isCleanNewPost(),actionsSelectOptions:l.actionsSelectOptions,statusesSelectOptions:l.statusesSelectOptions,is12Hour:l.is12Hour,timeFormat:l.timeFormat,startOfWeek:l.startOfWeek,storeName:s,strings:l.strings,taxonomyName:l.taxonomyName,postTypeDefaultConfig:l.postTypeDefaultConfig,hideCalendarByDefault:l.hideCalendarByDefault})}})})(); //# sourceMappingURL=block-editor.js.map \ No newline at end of file diff --git a/assets/js/block-editor.js.map b/assets/js/block-editor.js.map index f05e93b13..2d7f52b5c 100644 --- a/assets/js/block-editor.js.map +++ b/assets/js/block-editor.js.map @@ -1 +1 @@ -{"version":3,"file":"block-editor.js","mappings":"uFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,8FCPD,SACA,SAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ,SAAD,KACI,oBAAC,kBAAD,CACIC,MAAOZ,EAAMY,MACbC,KAAMb,EAAMa,KACZC,GAAId,EAAMa,KACVL,UAAWR,EAAMQ,UACjBH,QAASA,IAAW,EACpBU,SAhBK,SAAUC,GACvBV,EAAWU,GAEPhB,EAAMe,UACNf,EAAMe,SAASC,EAEtB,IAaQb,EAGZ,C,yFCxCD,YACA,SAG8Bc,EAAAA,eAAA,SAAC,GAAmD,IAAlDC,EAAkD,EAAlDA,YAAaH,EAAqC,EAArCA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ACf,CCtBA,aACA,QACA,SACA,SACA,SAYMxX,EAAY,qCAElB,IAAA2T,aAAY,CACRzV,KAAM8B,EACN4T,aAAc,CACVtK,WAAYD,EAAAA,sBAAsBC,WAClCxJ,OAAQuJ,EAAAA,sBAAsB0F,WAC9BzN,UAAW+H,EAAAA,sBAAsB/H,UACjCpB,KAAMgY,EAAAA,YACN1X,SAAU6I,EAAAA,sBAAsB7I,SAChCF,MAAO+I,EAAAA,sBAAsB/I,UAqBrC,IAAA6X,gBAAe,6BAA8B,CACzCC,OAlBkC,WAClC,OACI,oBAAC,EAAAxP,6BAAD,CACIW,UAAU,IAAAxJ,QAAO,eAAesY,qBAChC3U,gBAAgB,IAAA3D,QAAO,eAAe2D,iBACtCiB,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvB9I,SAAUA,EAAAA,SACVkG,WAAYA,EAAAA,WACZjG,YAAaA,EAAAA,YACbuB,UAAWA,EACX2F,QAASA,EAAAA,QACTjF,aAAcA,EAAAA,aACd2I,sBAAuBA,EAAAA,uBAElC,G","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/external var \"publishpressFutureBlockEditorConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/./assets/jsx/block-editor.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []);\n const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []);\n const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []);\n const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []);\n const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1');\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsFieldset,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState, Fragment, useRef } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\n\nconst { PanelRow, BaseControl } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(false);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n const apiRequestControllerRef = useRef(new AbortController());\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n const validateData = () => {\n if (! isActive) {\n setValidationError('');\n return true;\n }\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidation(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidation(false);\n\n setHasValidData(result.isValid);\n setValidationError(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidation(false);\n setHasValidData(false);\n setValidationError(error.message);\n setOffsetPreview('');\n });\n }\n\n setValidationError('');\n return true;\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n setHasValidData(validateData());\n }, [isActive, expireOffset]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n {offsetPreview && (\n \n

{props.text.datePreview}

\n
\n
\n {props.text.datePreviewCurrent}: \n {currentTime}\n
\n
\n {props.text.datePreviewComputed}: \n {offsetPreview}\n
\n
\n
\n )}\n
\n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n return (\n \n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\n\nexport const PostTypesSettingsPanels = function (props) {\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n return (panels);\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","module.exports = publishpressFutureBlockEditorConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { createStore } from './data';\nimport { FutureActionPanelBlockEditor } from './components';\nimport { select } from '@wordpress/data';\nimport { registerPlugin } from '@wordpress/plugins';\nimport {\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n postTypeDefaultConfig,\n defaultDate,\n statusesSelectOptions\n} from \"&config.block-editor\";\n\nconst storeName = 'publishpress-future/future-action';\n\ncreateStore({\n name: storeName,\n defaultState: {\n autoEnable: postTypeDefaultConfig.autoEnable,\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n }\n});\n\nconst BlockEditorFutureActionPlugin = () => {\n return (\n \n );\n}\n\nregisterPlugin('publishpress-future-action', {\n render: BlockEditorFutureActionPlugin\n});\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","useEffect","decodeEntities","htmlEntities","addQueryArgs","url","data","useSelect","useDispatch","apiFetch","FutureActionPanel","action","select","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","path","then","result","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","offset","globalDefaultExpireOffset","controller","current","abort","signal","method","isValid","message","preview","catch","error","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","SettingsFieldset","legend","SettingsTable","bodyChildren","PostTypesSettingsPanels","panels","postTypeSettings","valign","htmlFor","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","onClick","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","module","exports","publishpressFutureBlockEditorConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","defaultDate","registerPlugin","render","getCurrentPostType"],"sourceRoot":""} +{"version":3,"file":"block-editor.js","mappings":"uFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,8FCPD,SACA,SAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ,SAAD,KACI,oBAAC,kBAAD,CACIC,MAAOZ,EAAMY,MACbC,KAAMb,EAAMa,KACZC,GAAId,EAAMa,KACVL,UAAWR,EAAMQ,UACjBH,QAASA,IAAW,EACpBU,SAhBK,SAAUC,GACvBV,EAAWU,GAEPhB,EAAMe,UACNf,EAAMe,SAASC,EAEtB,IAaQb,EAGZ,C,8eCxCD,SAMA,QACA,SAEAc,EAAQ,KAED,IAAMC,EAAoBA,EAAAA,kBAAA,SAAC,GAS5B,IARFC,EAQE,EARFA,OACAP,EAOE,EAPFA,MACAQ,EAME,EANFA,iBACAC,EAKE,EALFA,mBACAC,EAIE,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.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"publishpressFutureBlockEditorConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/block-editor.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = publishpressFutureBlockEditorConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import { createStore } from './data';\nimport { FutureActionPanelBlockEditor } from './components';\nimport { select } from '@wordpress/data';\nimport { registerPlugin } from '@wordpress/plugins';\nimport {\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n postTypeDefaultConfig,\n defaultDate,\n statusesSelectOptions,\n hideCalendarByDefault\n} from \"&config.block-editor\";\n\nconst storeName = 'publishpress-future/future-action';\n\ncreateStore({\n name: storeName,\n defaultState: {\n autoEnable: postTypeDefaultConfig.autoEnable,\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n }\n});\n\nconst BlockEditorFutureActionPlugin = () => {\n return (\n \n );\n}\n\nregisterPlugin('publishpress-future-action', {\n render: BlockEditorFutureActionPlugin\n});\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","publishpressFutureBlockEditorConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","defaultDate","registerPlugin","render","getCurrentPostType"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/js/bulk-edit.js b/assets/js/bulk-edit.js index bf6deb72d..0556df2a3 100644 --- a/assets/js/bulk-edit.js +++ b/assets/js/bulk-edit.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(386),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),u=n(214),c=n(61),s=n(625),m=wp.components,d=m.PanelRow,p=m.CheckboxControl,f=m.SelectControl,y=m.FormTokenField,g=m.Spinner,v=m.BaseControl,b=wp.element,E=b.Fragment,S=b.useEffect,h=b.useState,_=wp.htmlEntities.decodeEntities,T=wp.url.addQueryArgs,x=wp.data,N=x.useSelect,R=x.useDispatch,A=wp.apiFetch;t.FutureActionPanel=function(e){var t=N((function(t){return t(e.storeName).getAction()}),[]),n=N((function(t){return t(e.storeName).getDate()}),[]),m=N((function(t){return t(e.storeName).getEnabled()}),[]),b=N((function(t){return t(e.storeName).getTerms()}),[]),x=N((function(t){return t(e.storeName).getTaxonomy()}),[]),C=N((function(t){return t(e.storeName).getTaxonomyName()}),[]),P=N((function(t){return t(e.storeName).getTermsListByName()}),[]),w=N((function(t){return t(e.storeName).getTermsListById()}),[]),O=N((function(t){return t(e.storeName).getIsFetchingTerms()}),[]),D=N((function(t){return t(e.storeName).getCalendarIsVisible()}),[]),F=N((function(t){return t(e.storeName).getHasValidData()}),[]),k=N((function(t){return t(e.storeName).getNewStatus()}),[]),I=h(""),j=r(I,2),B=j[0],M=j[1],L=R(e.storeName),V=L.setAction,H=L.setDate,W=L.setEnabled,U=L.setTerms,Q=L.setTaxonomy,Y=L.setTermsListByName,q=L.setTermsListById,X=L.setTaxonomyName,z=L.setIsFetchingTerms,G=L.setCalendarIsVisible,J=L.setHasValidData,K=L.setNewStatus,Z=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:x},w[e]=e,Y(P),q(w),U([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&w&&(ae=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return w[e]}))}(b)),"string"==typeof ae&&(ae=[]));var re=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(re=Object.keys(P));var oe,ie=D?"future-action-panel":"future-action-panel hidden-calendar",le=D?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=D?"future-action-date-panel":"future-action-date-panel hidden-calendar";oe="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var se=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,u=void 0;try{for(var c,s=a[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var m=c.value.split("}"),d=r(m,2),p=d[0],f=d[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,u=e}finally{try{!i&&s.return&&s.return()}finally{if(l)throw u}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(t).includes("category")&&"category-remove-all"!==t,de=C;switch(t){case"category":de=e.strings.newTerms.replace("%s",C);break;case"category-remove":de=e.strings.removeTerms.replace("%s",C);break;case"category-add":de=e.strings.addTerms.replace("%s",C)}return S((function(){if(!m)return J(!0),void M("");J(function(){var a=!0;if(!m)return M(""),!0;t||(M(e.strings.errorActionRequired),a=!1),n||(M(e.strings.errorDateRequired),a=!1),n&&new Date(n){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,u=i("core/editor").getEditedPostAttribute("publishpress_future_action"),c=o("core/editor"),s=c.lockPostSaving,m=c.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:u.enabled,calendarIsVisible:!0,action:u.action,newStatus:u.newStatus,date:u.date,terms:u.terms,taxonomy:u.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,u=Object.entries(e)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var c=i.value,s=a(c,2),m=s[0],d=s[1];t.publishpress_future_action[m]=d}}catch(e){r=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){m("future-action")},onDataIsInvalid:function(){s("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,u=wp.element.useEffect,c=n((function(t){return t(e.storeName).getDate()}),[]),s=n((function(t){return t(e.storeName).getEnabled()}),[]),m=n((function(t){return t(e.storeName).getAction()}),[]),d=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var E=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return u((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:E,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:m,newStatus:d,date:c,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:s?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:c}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),u=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),c=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),s=l;return"object"===(void 0===l?"undefined":a(l))&&(s=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:c,date:t,terms:l,taxonomy:u,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(386),i=n(11),l=n(566),u=n(244),c=wp.components,s=c.PanelRow;c.BaseControl,t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,o.useState)(e.settings.taxonomy),c=a(n,2),m=c[0],d=c[1],p=(0,o.useState)([]),f=a(p,2),y=f[0],g=f[1],v=(0,o.useState)(!1),b=a(v,2),E=b[0],S=b[1],h=(0,o.useState)([]),_=a(h,2),T=_[0],x=_[1],N=(0,o.useState)(e.settings.howToExpire),R=a(N,2),A=R[0],C=R[1],P=(0,o.useState)(e.settings.active),w=a(P,2),O=w[0],D=w[1],F=(0,o.useState)(e.settings.defaultExpireOffset),k=a(F,2),I=k[0],j=k[1],B=(0,o.useState)(e.settings.emailNotification),M=a(B,2),L=M[0],V=M[1],H=(0,o.useState)(e.settings.autoEnabled),W=a(H,2),U=W[0],Q=W[1],Y=(0,o.useState)(!1),q=a(Y,2),X=q[0],z=q[1],G=(0,o.useState)(""),J=a(G,2),K=J[0],Z=J[1],$=(0,o.useState)(""),ee=a($,2),te=ee[0],ne=ee[1],ae=(0,o.useState)(t),re=a(ae,2),oe=re[0],ie=re[1],le=(0,o.useState)(e.settings.newStatus),ue=a(le,2),ce=ue[0],se=ue[1],me=(0,o.useState)(!1),de=a(me,2),pe=de[0],fe=de[1],ye=(0,o.useState)(""),ge=a(ye,2),ve=ge[0],be=ge[1],Ee=(0,o.useState)(),Se=a(Ee,2),he=Se[0],_e=Se[1],Te=(0,o.useRef)(new AbortController),xe=["category","category-add","category-remove","category-remove-all"];(0,o.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=oe.filter((function(e){return-1===xe.indexOf(e.value)})),ie(t))}),[]),(0,o.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),x(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ne(e.label)})))}),[m]),(0,o.useEffect)((function(){z(function(){if(!O)return Z(""),!0;var t=I||e.settings.globalDefaultExpireOffset;if(t){var n=Te.current;n&&n.abort(),Te.current=new AbortController;var a=Te.current.signal;fe(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:a}).then((function(e){fe(!1),z(e.isValid),Z(e.message),e.isValid?(be(e.preview),_e(e.currentTime)):be("")})).catch((function(e){"AbortError"!==e.name&&(fe(!1),z(!1),Z(e.message),be(""))}))}return Z(""),!0}())}),[O,I]),(0,o.useEffect)((function(){if(te){var e=[];t.forEach((function(t){var n=t.label;-1!==xe.indexOf(t.value)&&(n=n.replace("%s",te.toLowerCase())),e.push({value:t.value,label:n})})),ie(e)}}),[te]),(0,o.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,o.useEffect)((function(){pe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!pe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[pe]);var Ne=y.map((function(e){return e.label})),Re=[React.createElement(r.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:O||!1,label:e.text.fieldActiveLabel,onChange:function(e){D(e)}}))];return O&&(Re.push(React.createElement(r.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:U||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){Q(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){d(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:oe,description:e.text.fieldHowToExpireDescription,selected:A,onChange:function(e){C(e)}}),"change-status"===A&&React.createElement(r.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:se}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(A)>-1&&React.createElement(r.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:Ne,value:T,isLoading:E,onChange:function(e){x(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(r.TextControl,{name:"expired-custom-date-"+e.postType,value:I,loading:pe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),ve&&React.createElement(o.Fragment,null,React.createElement("h4",null,e.text.datePreview),React.createElement("div",null,React.createElement("div",null,React.createElement("span",null,e.text.datePreviewCurrent,": "),React.createElement("span",null,React.createElement("code",null,he))),React.createElement("div",null,React.createElement("span",null,e.text.datePreviewComputed,": "),React.createElement("span",null,React.createElement("code",null,ve))))))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(r.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){V(e)}})))),Re=(0,l.applyFilters)("expirationdate_settings_posttype",Re,e,O,o.useState),React.createElement(r.SettingsFieldset,{legend:e.legend},React.createElement(r.SettingsTable,{bodyChildren:Re}),!X&&React.createElement(s,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.PostTypesSettingsPanels=function(e){var t=[],n=!0,o=!1,i=void 0;try{for(var l,u=Object.entries(e.settings)[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var c=l.value,s=a(c,2),m=s[0],d=s[1];t.push(React.createElement(r.PostTypeSettingsPanel,{legend:d.label,text:e.text,postType:m,settings:d,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[m],statusesList:e.statusesList[m],key:m+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished}))}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(386),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},5:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",null,React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(386),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,u=e.onChangeDate,c=e.is12Hour,s=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:u,__nextRemoveHelpButton:!0,is12Hour:c,startOfWeek:s}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(386),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var u=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:u,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var u=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return u.FutureActionPanelBulkEdit}});var c=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return c.PostTypeSettingsPanel}});var s=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return s.PostTypesSettingsPanels}});var m=n(5);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return m.SettingRow}});var d=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return d.SettingsFieldset}});var p=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var E=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return E.TextControl}});var S=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return S.TokensControl}});var h=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return h.NonceControl}});var _=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var T=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return T.Spinner}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,u=arguments[1];switch(u.type){case"SET_ACTION":return a({},l,{action:u.action});case"SET_NEW_STATUS":return a({},l,{newStatus:u.newStatus});case"SET_DATE":return"number"!=typeof u.date&&(0,o.isNumber)(u.date)&&(u.date=parseInt(u.date)),"string"==typeof u.date&&(u.date=new Date(u.date).getTime()),u.date=(0,r.normalizeUnixTimeToSeconds)(u.date),u.date=(0,r.formatUnixTimeToTimestamp)(u.date),a({},l,{date:u.date});case"SET_ENABLED":return a({},l,{enabled:u.enabled});case"SET_TERMS":return a({},l,{terms:u.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:u.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:u.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:u.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:u.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:u.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:u.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:u.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},u.extraData)});case"SET_EXTRA_DATA_BY_NAME":var c=a({},l.extraData,(e={},n=u.name,i=u.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},c)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{e.exports=publishpressFutureBulkEditConfig},643:e=>{e.exports=window},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},386:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a=n(57),r=n(480),o=n(386),i=n(562),l=n(643),u=n(384),c="publishpress-future/future-action-bulk-edit",s=l.inlineEditPost.setBulk,m=l.inlineEditPost.revert;l.inlineEditPost.setBulk=function(e){s.apply(this,arguments),(0,i.select)(c)?((0,i.dispatch)(c).setAction(u.postTypeDefaultConfig.expireType),(0,i.dispatch)(c).setDate(u.postTypeDefaultConfig.defaultDate),(0,i.dispatch)(c).setTaxonomy(u.postTypeDefaultConfig.taxonomy),(0,i.dispatch)(c).setTerms(u.postTypeDefaultConfig.terms),(0,i.dispatch)(c).setChangeAction("no-change")):(0,r.createStore)({name:c,defaultState:{action:u.postTypeDefaultConfig.expireType,newStatus:u.postTypeDefaultConfig.newStatus,date:u.defaultDate,taxonomy:u.postTypeDefaultConfig.taxonomy,terms:u.postTypeDefaultConfig.terms,changeAction:"no-change"}});var t=document.getElementById("publishpress-future-bulk-edit"),n=(0,o.createRoot)(t),d=document.querySelector("#bulk_edit");d&&(d.onclick=function(){setTimeout((function(){n.unmount()}),1e3)});var p=React.createElement(a.FutureActionPanelBulkEdit,{storeName:c,postType:u.postType,isNewPost:u.isNewPost,actionsSelectOptions:u.actionsSelectOptions,statusesSelectOptions:u.statusesSelectOptions,is12Hour:u.is12Hour,timeFormat:u.timeFormat,startOfWeek:u.startOfWeek,strings:u.strings,taxonomyName:u.taxonomyName,nonce:u.nonce});n.render(p),l.inlineEditPost.revert=function(){n.unmount(),m.apply(this,arguments)}}})(); +(()=>{"use strict";var e={5442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},4311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(1386),r=n(2214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},5470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(1386),o=n(4011),i=n(3244);n(9922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,s=e.labelOffsetPreview,u=e.setValidationErrorCallback,c=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),g=y[0],v=y[1],b=(0,r.useState)(),h=a(b,2),E=h[0],S=h[1],_=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=_.current;e&&e.abort(),_.current=new AbortController;var n=_.current.signal;c(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){c(!1),d(e.isValid),u(e.message),e.isValid?(v(e.preview),S(e.currentTime)):v("")})).catch((function(e){"AbortError"!==e.name&&(c(!1),d(!1),u(e.message),v(""))}))}}()}),[t]);var x=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+x},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},s,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},g)))))};t.default=l},4620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(7039),r=n(2214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},8418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(8409),i=n(4873),l=n(9986),s=n(2214),u=n(1442),c=n(6625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,g=d.Spinner,v=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,S=b.useState,_=wp.htmlEntities.decodeEntities,x=wp.url.addQueryArgs,T=wp.data,A=T.useSelect,N=T.useDispatch,C=wp.apiFetch;t.FutureActionPanel=function(e){var t=A((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,b=t.enabled,T=t.terms,R=t.taxonomy,w=t.taxonomyName,P=t.termsListByName,O=t.termsListById,D=t.isFetchingTerms,I=t.calendarIsVisible,k=t.hasValidData,F=t.newStatus,B=S(""),j=r(B,2),M=j[0],V=j[1],L=N(e.storeName),H=L.setAction,U=L.setDate,W=L.setEnabled,Q=L.setTerms,q=L.setTaxonomy,Y=L.setTermsListByName,z=L.setTermsListById,X=L.setTaxonomyName,G=L.setIsFetchingTerms,J=L.setCalendarIsVisible,Z=L.setHasValidData,K=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:R},O[e]=e,Y(P),z(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(T)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=I?"future-action-panel":"future-action-panel hidden-calendar",se=I?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=I?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,s=void 0;try{for(var u,c=a[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var d=u.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(l)throw s}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=w;switch(n){case"category":pe=e.strings.newTerms.replace("%s",w);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",w);break;case"category-add":pe=e.strings.addTerms.replace("%s",w)}return E((function(){if(!b)return Z(!0),void V("");Z(function(){var t=!0;if(!b)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,s=i("core/editor").getEditedPostAttribute("publishpress_future_action"),u=o("core/editor"),c=u.lockPostSaving,d=u.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:s.enabled,calendarIsVisible:!0,action:s.action,newStatus:s.newStatus,date:s.date,terms:s.terms,taxonomy:s.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=a(u,2),d=c[0],m=c[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){c("future-action")}})))}},2094:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(8409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,s=wp.element.useEffect,u=n((function(t){return t(e.storeName).getDate()}),[]),c=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return s((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:u,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:c?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:u}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},3571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(2057),r=n(7562);n(1386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},5437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(7562);n(1386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),s=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),u=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),c=l;return"object"===(void 0===l?"undefined":a(l))&&(c=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:u,date:t,terms:l,taxonomy:s,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(1386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},1620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(2057),i=n(1386),l=n(4011),s=n(8566),u=n(3244),c=(a=n(5470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),g=y[0],v=y[1],b=(0,i.useState)(!1),h=r(b,2),E=h[0],S=h[1],_=(0,i.useState)([]),x=r(_,2),T=x[0],A=x[1],N=(0,i.useState)(e.settings.howToExpire),C=r(N,2),R=C[0],w=C[1],P=(0,i.useState)(e.settings.active),O=r(P,2),D=O[0],I=O[1],k=(0,i.useState)(e.settings.defaultExpireOffset),F=r(k,2),B=F[0],j=F[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],U=(0,i.useState)(e.settings.autoEnabled),W=r(U,2),Q=W[0],q=W[1],Y=(0,i.useState)(!0),z=r(Y,2),X=z[0],G=z[1],J=(0,i.useState)(""),Z=r(J,2),K=Z[0],$=Z[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],se=(0,i.useState)(e.settings.newStatus),ue=r(se,2),ce=ue[0],de=ue[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ge=B||e.settings.globalDefaultExpireOffset,ve=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===ve.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),v(n),A(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==ve.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var be=g.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:D||!1,label:e.text.fieldActiveLabel,onChange:function(e){I(e)}}))];D&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){q(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:R,onChange:function(e){w(e)}}),"change-status"===R&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(R)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:be,value:T,isLoading:E,onChange:function(e){A(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:B,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),React.createElement(c.default,{offset:ge,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:G}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,s.applyFilters)("expirationdate_settings_posttype",he,e,D,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!X&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},8138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],s=[],u=!0,c=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(u=(m=p.next()).done);u=!0){var f=m.value,y=a(f,2),g=y[0],v=y[1];s.push(React.createElement(r.PostTypeSettingsPanel,{legend:v.label,text:e.text,postType:g,settings:v,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[g],statusesList:e.statusesList[g],key:g+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===g}))}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}var b=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,S=!0,_=!1,x=void 0;try{for(var T,A=Object.entries(e.settings)[Symbol.iterator]();!(S=(T=A.next()).done);S=!0){var N=T.value,C=a(N,2),R=C[0],w=C[1];E=i===R,h.push(React.createElement("a",{href:"#"+R+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:R+"-tab",onClick:b},w.label))}}catch(e){_=!0,x=e}finally{try{!S&&A.return&&A.return()}finally{if(_)throw x}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),s)}},2858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(1386),r=n(2214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},9005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(1386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},5786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},9892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},5681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(1386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},6772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},4438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},6301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(1386),r=n(2214),o=n(2057);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(2214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},4873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(3190),r=n(4620),o=n(1386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,s=e.onChangeDate,u=e.is12Hour,c=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:s,__nextRemoveHelpButton:!0,is12Hour:u,startOfWeek:c}))}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(1386),o=n(2214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var s=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:s,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},8225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},2057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(5442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(8418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(2864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(3571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(5437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var s=n(2094);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return s.FutureActionPanelBulkEdit}});var u=n(1620);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return u.PostTypeSettingsPanel}});var c=n(8138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return c.PostTypesSettingsPanels}});var d=n(9005);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(5786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(9892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(5681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(6772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(4438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(4311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(2858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(6301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(3948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var S=n(1013);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return S.NonceControl}});var _=n(8225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var x=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return x.Spinner}});var T=n(5470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return T.DateOffsetPreview}})},4480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,s=arguments[1];switch(s.type){case"SET_ACTION":return a({},l,{action:s.action});case"SET_NEW_STATUS":return a({},l,{newStatus:s.newStatus});case"SET_DATE":return"number"!=typeof s.date&&(0,o.isNumber)(s.date)&&(s.date=parseInt(s.date)),"string"==typeof s.date&&(s.date=new Date(s.date).getTime()),s.date=(0,r.normalizeUnixTimeToSeconds)(s.date),s.date=(0,r.formatUnixTimeToTimestamp)(s.date),a({},l,{date:s.date});case"SET_ENABLED":return a({},l,{enabled:s.enabled});case"SET_TERMS":return a({},l,{terms:s.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:s.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:s.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:s.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:s.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:s.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:s.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:s.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},s.extraData)});case"SET_EXTRA_DATA_BY_NAME":var u=a({},l.extraData,(e={},n=s.name,i=s.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},u)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},8409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(1354),r=n.n(a),o=n(6314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},1354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},5338:(e,t,n)=>{var a=n(5206);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},9922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(5072),r=n.n(a),o=n(7825),i=n.n(o),l=n(7659),s=n.n(l),u=n(5056),c=n.n(u),d=n(540),m=n.n(d),p=n(1113),f=n.n(p),y=n(1461),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=m(),r()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0},5072:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5206:e=>{e.exports=ReactDOM},9384:e=>{e.exports=publishpressFutureBulkEditConfig},8643:e=>{e.exports=window},3244:e=>{e.exports=wp},2214:e=>{e.exports=wp.components},7562:e=>{e.exports=wp.data},1386:e=>{e.exports=wp.element},8566:e=>{e.exports=wp.hooks},9986:e=>{e.exports=wp.plugins},4011:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=n(2057),r=n(4480),o=n(5338),i=n(7562),l=n(8643),s=n(9384),u="publishpress-future/future-action-bulk-edit",c=l.inlineEditPost.setBulk,d=l.inlineEditPost.revert;l.inlineEditPost.setBulk=function(e){c.apply(this,arguments),(0,i.select)(u)?((0,i.dispatch)(u).setAction(s.postTypeDefaultConfig.expireType),(0,i.dispatch)(u).setDate(s.postTypeDefaultConfig.defaultDate),(0,i.dispatch)(u).setTaxonomy(s.postTypeDefaultConfig.taxonomy),(0,i.dispatch)(u).setTerms(s.postTypeDefaultConfig.terms),(0,i.dispatch)(u).setChangeAction("no-change")):(0,r.createStore)({name:u,defaultState:{action:s.postTypeDefaultConfig.expireType,newStatus:s.postTypeDefaultConfig.newStatus,date:s.defaultDate,taxonomy:s.postTypeDefaultConfig.taxonomy,terms:s.postTypeDefaultConfig.terms,changeAction:"no-change"}});var t=document.getElementById("publishpress-future-bulk-edit"),n=(0,o.createRoot)(t),m=document.querySelector("#bulk_edit");m&&(m.onclick=function(){setTimeout((function(){n.unmount()}),1e3)});var p=React.createElement(a.FutureActionPanelBulkEdit,{storeName:u,postType:s.postType,isNewPost:s.isNewPost,actionsSelectOptions:s.actionsSelectOptions,statusesSelectOptions:s.statusesSelectOptions,is12Hour:s.is12Hour,timeFormat:s.timeFormat,startOfWeek:s.startOfWeek,strings:s.strings,taxonomyName:s.taxonomyName,nonce:s.nonce,hideCalendarByDefault:s.hideCalendarByDefault});n.render(p),l.inlineEditPost.revert=function(){n.unmount(),d.apply(this,arguments)}}})(); //# sourceMappingURL=bulk-edit.js.map \ No newline at end of file diff --git a/assets/js/bulk-edit.js.map b/assets/js/bulk-edit.js.map index 04e506cdb..b069e0cb4 100644 --- a/assets/js/bulk-edit.js.map +++ b/assets/js/bulk-edit.js.map @@ -1 +1 @@ -{"version":3,"file":"bulk-edit.js","mappings":"uFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,8FCPD,SACA,SAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IA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A,sBAAsB/I,MAC7ByJ,aAAc,eAK1B,IAAM8O,EAAY7N,SAAS8N,eAAe,iCACpCC,GAAO,IAAAC,YAAWH,GAElBI,EAAajO,SAASyH,cAAc,cACtCwG,IACAA,EAAWC,QAAU,WACjBC,YAAW,WACPJ,EAAKK,SACR,GAxDqB,IAyDzB,GAGL,IAAMC,EACF,oBAAC,EAAAvP,0BAAD,CACI9J,UAAWA,EACXuJ,SAAUA,EAAAA,SACVoB,UAAWA,EAAAA,UACXhG,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvB9I,SAAUA,EAAAA,SACVkG,WAAYA,EAAAA,WACZjG,YAAaA,EAAAA,YACbkH,QAASA,EAAAA,QACTjF,aAAcA,EAAAA,aACdmK,MAAOA,EAAAA,QAIfkO,EAAKO,OAAOD,GAEZjB,EAAAA,eAAeG,OAAS,WACpBQ,EAAKK,UAGLd,EAAmBE,MAAMC,KAAMC,UAClC,CACJ,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/external var \"publishpressFutureBulkEditConfig\"","webpack://post-expirator/external var \"window\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/./assets/jsx/bulk-edit.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []);\n const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []);\n const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []);\n const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []);\n const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1');\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsFieldset,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState, Fragment, useRef } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\n\nconst { PanelRow, BaseControl } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(false);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n const apiRequestControllerRef = useRef(new AbortController());\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n const validateData = () => {\n if (! isActive) {\n setValidationError('');\n return true;\n }\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidation(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidation(false);\n\n setHasValidData(result.isValid);\n setValidationError(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidation(false);\n setHasValidData(false);\n setValidationError(error.message);\n setOffsetPreview('');\n });\n }\n\n setValidationError('');\n return true;\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n setHasValidData(validateData());\n }, [isActive, expireOffset]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n {offsetPreview && (\n \n

{props.text.datePreview}

\n
\n
\n {props.text.datePreviewCurrent}: \n {currentTime}\n
\n
\n {props.text.datePreviewComputed}: \n {offsetPreview}\n
\n
\n
\n )}\n
\n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n return (\n \n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\n\nexport const PostTypesSettingsPanels = function (props) {\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n return (panels);\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","module.exports = publishpressFutureBulkEditConfig;","module.exports = window;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { FutureActionPanelBulkEdit } from './components';\nimport { createStore } from './data';\nimport { createRoot } from '@wordpress/element';\nimport { select, dispatch } from '@wordpress/data';\nimport { inlineEditPost } from \"&window\";\nimport {\n postTypeDefaultConfig,\n defaultDate,\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n nonce,\n statusesSelectOptions\n} from \"&config.bulk-edit\";\n\nconst storeName = 'publishpress-future/future-action-bulk-edit';\nconst delayToUnmountAfterSaving = 1000;\n\n// We create a copy of the WP inline set bulk function\nconst wpInlineSetBulk = inlineEditPost.setBulk;\nconst wpInlineEditRevert = inlineEditPost.revert;\n\nconst getPostId = (id) => {\n // If id is a string or a number, return it directly\n if (typeof id === 'string' || typeof id === 'number') {\n return id;\n }\n\n // Otherwise, assume it's an HTML element and extract the post ID\n const trElement = id.closest('tr');\n const trId = trElement.id;\n const postId = trId.split('-')[1];\n\n return postId;\n}\n\n/**\n * We override the function with our own code so we can detect when\n * the inline edit row is displayed to recreate the React component.\n */\ninlineEditPost.setBulk = function (id) {\n // Call the original WP edit function.\n wpInlineSetBulk.apply(this, arguments);\n\n if (select(storeName)) {\n dispatch(storeName).setAction(postTypeDefaultConfig.expireType);\n dispatch(storeName).setDate(postTypeDefaultConfig.defaultDate);\n dispatch(storeName).setTaxonomy(postTypeDefaultConfig.taxonomy);\n dispatch(storeName).setTerms(postTypeDefaultConfig.terms);\n dispatch(storeName).setChangeAction('no-change');\n } else {\n createStore({\n name: storeName,\n defaultState: {\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n changeAction: 'no-change',\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-bulk-edit\");\n const root = createRoot(container);\n\n const saveButton = document.querySelector('#bulk_edit');\n if (saveButton) {\n saveButton.onclick = function() {\n setTimeout(() => {\n root.unmount();\n }, delayToUnmountAfterSaving);\n };\n }\n\n const component = (\n \n );\n\n root.render(component);\n\n inlineEditPost.revert = function () {\n root.unmount();\n\n // Call the original WP revert function.\n wpInlineEditRevert.apply(this, arguments);\n };\n};\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","useEffect","decodeEntities","htmlEntities","addQueryArgs","url","data","useSelect","useDispatch","apiFetch","FutureActionPanel","action","select","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","path","then","result","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","offset","globalDefaultExpireOffset","controller","current","abort","signal","method","isValid","message","preview","catch","error","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","SettingsFieldset","legend","SettingsTable","bodyChildren","PostTypesSettingsPanels","panels","postTypeSettings","valign","htmlFor","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","onClick","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","module","exports","publishpressFutureBulkEditConfig","window","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","wpInlineSetBulk","inlineEditPost","setBulk","wpInlineEditRevert","revert","apply","this","arguments","dispatch","defaultDate","container","getElementById","root","createRoot","saveButton","onclick","setTimeout","unmount","component","render"],"sourceRoot":""} +{"version":3,"file":"bulk-edit.js","mappings":"wFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,+FCPD,UACA,UAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ,SAAD,KACI,oBAAC,kBAAD,CACIC,MAAOZ,EAAMY,MACbC,KAAMb,EAAMa,KACZC,GAAId,EAAMa,KACVL,UAAWR,EAAMQ,UACjBH,QAASA,IAAW,EACpBU,SAhBK,SAAUC,GACvBV,EAAWU,GAEPhB,EAAMe,UACNf,EAAMe,SAASC,EAEtB,IAaQb,EAGZ,C,+eCxCD,UAMA,UACA,UAEAc,EAAQ,MAED,IAAMC,EAAoBA,EAAAA,kBAAA,SAAC,GAS5B,IARFC,EAQE,EARFA,OACAP,EAOE,EAPFA,MACAQ,EAME,EANFA,iBACAC,EAKE,EALFA,mBACAC,EAIE,EAJFA,2BACAC,EAGE,EAHFA,gCACAC,EAEE,EAFFA,wBAEE,IADFC,YAAAA,OACE,YACwC,IAAArB,UAAS,IADjD,SACKsB,EADL,KACoBC,EADpB,QAEoC,IAAAvB,YAFpC,SAEKwB,EAFL,KAEkBC,EAFlB,KAIIC,GAA0B,IAAAC,QAAO,IAAIC,kBA+C3C,IAAAC,YAAU,YA7CiB,WACvB,GAAId,EAAQ,CACR,IAAMe,EAAaJ,EAAwBK,QAEvCD,GACAA,EAAWE,QAGfN,EAAwBK,QAAU,I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EAAA7U,0BAAD,CACI5J,UAAWA,EACXqJ,SAAUA,EAAAA,SACVoB,UAAWA,EAAAA,UACXhG,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvBxI,SAAUA,EAAAA,SACV4F,WAAYA,EAAAA,WACZ3F,YAAaA,EAAAA,YACb4G,QAASA,EAAAA,QACT/E,aAAcA,EAAAA,aACdiK,MAAOA,EAAAA,MACPpH,sBAAuBA,EAAAA,wBAI/B6a,EAAKM,OAAOD,GAEZd,EAAAA,eAAeG,OAAS,WACpBM,EAAKI,UAGLX,EAAmBrC,MAAMvE,KAAM8G,UAClC,CACJ,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./node_modules/react-dom/client.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureBulkEditConfig\"","webpack://post-expirator/external var \"window\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/bulk-edit.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = ReactDOM;","module.exports = publishpressFutureBulkEditConfig;","module.exports = window;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import { FutureActionPanelBulkEdit } from './components';\nimport { createStore } from './data';\nimport { createRoot } from 'react-dom/client';\nimport { select, dispatch } from '@wordpress/data';\nimport { inlineEditPost } from \"&window\";\nimport {\n postTypeDefaultConfig,\n defaultDate,\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n nonce,\n statusesSelectOptions,\n hideCalendarByDefault\n} from \"&config.bulk-edit\";\n\nconst storeName = 'publishpress-future/future-action-bulk-edit';\nconst delayToUnmountAfterSaving = 1000;\n\n// We create a copy of the WP inline set bulk function\nconst wpInlineSetBulk = inlineEditPost.setBulk;\nconst wpInlineEditRevert = inlineEditPost.revert;\n\nconst getPostId = (id) => {\n // If id is a string or a number, return it directly\n if (typeof id === 'string' || typeof id === 'number') {\n return id;\n }\n\n // Otherwise, assume it's an HTML element and extract the post ID\n const trElement = id.closest('tr');\n const trId = trElement.id;\n const postId = trId.split('-')[1];\n\n return postId;\n}\n\n/**\n * We override the function with our own code so we can detect when\n * the inline edit row is displayed to recreate the React component.\n */\ninlineEditPost.setBulk = function (id) {\n // Call the original WP edit function.\n wpInlineSetBulk.apply(this, arguments);\n\n if (select(storeName)) {\n dispatch(storeName).setAction(postTypeDefaultConfig.expireType);\n dispatch(storeName).setDate(postTypeDefaultConfig.defaultDate);\n dispatch(storeName).setTaxonomy(postTypeDefaultConfig.taxonomy);\n dispatch(storeName).setTerms(postTypeDefaultConfig.terms);\n dispatch(storeName).setChangeAction('no-change');\n } else {\n createStore({\n name: storeName,\n defaultState: {\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n changeAction: 'no-change',\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-bulk-edit\");\n const root = createRoot(container);\n\n const saveButton = document.querySelector('#bulk_edit');\n if (saveButton) {\n saveButton.onclick = function() {\n setTimeout(() => {\n root.unmount();\n }, delayToUnmountAfterSaving);\n };\n }\n\n const component = (\n \n );\n\n root.render(component);\n\n inlineEditPost.revert = function () {\n root.unmount();\n\n // Call the original WP revert function.\n wpInlineEditRevert.apply(this, arguments);\n };\n};\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","m","createRoot","hydrateRoot","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","ReactDOM","publishpressFutureBulkEditConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","wpInlineSetBulk","inlineEditPost","setBulk","wpInlineEditRevert","revert","arguments","dispatch","defaultDate","container","getElementById","root","saveButton","onclick","setTimeout","unmount","component","render"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/js/classic-editor.js b/assets/js/classic-editor.js index e280c78bb..ba2681913 100644 --- a/assets/js/classic-editor.js +++ b/assets/js/classic-editor.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(386),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),u=n(214),c=n(61),s=n(625),m=wp.components,d=m.PanelRow,p=m.CheckboxControl,f=m.SelectControl,y=m.FormTokenField,g=m.Spinner,b=m.BaseControl,v=wp.element,E=v.Fragment,S=v.useEffect,h=v.useState,_=wp.htmlEntities.decodeEntities,T=wp.url.addQueryArgs,x=wp.data,N=x.useSelect,R=x.useDispatch,A=wp.apiFetch;t.FutureActionPanel=function(e){var t=N((function(t){return t(e.storeName).getAction()}),[]),n=N((function(t){return t(e.storeName).getDate()}),[]),m=N((function(t){return t(e.storeName).getEnabled()}),[]),v=N((function(t){return t(e.storeName).getTerms()}),[]),x=N((function(t){return t(e.storeName).getTaxonomy()}),[]),C=N((function(t){return t(e.storeName).getTaxonomyName()}),[]),P=N((function(t){return t(e.storeName).getTermsListByName()}),[]),w=N((function(t){return t(e.storeName).getTermsListById()}),[]),O=N((function(t){return t(e.storeName).getIsFetchingTerms()}),[]),D=N((function(t){return t(e.storeName).getCalendarIsVisible()}),[]),F=N((function(t){return t(e.storeName).getHasValidData()}),[]),I=N((function(t){return t(e.storeName).getNewStatus()}),[]),k=h(""),j=r(k,2),B=j[0],M=j[1],L=R(e.storeName),V=L.setAction,H=L.setDate,W=L.setEnabled,U=L.setTerms,Q=L.setTaxonomy,Y=L.setTermsListByName,q=L.setTermsListById,X=L.setTaxonomyName,z=L.setIsFetchingTerms,G=L.setCalendarIsVisible,J=L.setHasValidData,K=L.setNewStatus,Z=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:x},w[e]=e,Y(P),q(w),U([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&w&&(ae=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return w[e]}))}(v)),"string"==typeof ae&&(ae=[]));var re=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(re=Object.keys(P));var oe,ie=D?"future-action-panel":"future-action-panel hidden-calendar",le=D?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=D?"future-action-date-panel":"future-action-date-panel hidden-calendar";oe="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var se=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,u=void 0;try{for(var c,s=a[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var m=c.value.split("}"),d=r(m,2),p=d[0],f=d[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,u=e}finally{try{!i&&s.return&&s.return()}finally{if(l)throw u}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(t).includes("category")&&"category-remove-all"!==t,de=C;switch(t){case"category":de=e.strings.newTerms.replace("%s",C);break;case"category-remove":de=e.strings.removeTerms.replace("%s",C);break;case"category-add":de=e.strings.addTerms.replace("%s",C)}return S((function(){if(!m)return J(!0),void M("");J(function(){var a=!0;if(!m)return M(""),!0;t||(M(e.strings.errorActionRequired),a=!1),n||(M(e.strings.errorDateRequired),a=!1),n&&new Date(n){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,u=i("core/editor").getEditedPostAttribute("publishpress_future_action"),c=o("core/editor"),s=c.lockPostSaving,m=c.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:u.enabled,calendarIsVisible:!0,action:u.action,newStatus:u.newStatus,date:u.date,terms:u.terms,taxonomy:u.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,u=Object.entries(e)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var c=i.value,s=a(c,2),m=s[0],d=s[1];t.publishpress_future_action[m]=d}}catch(e){r=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){m("future-action")},onDataIsInvalid:function(){s("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,u=wp.element.useEffect,c=n((function(t){return t(e.storeName).getDate()}),[]),s=n((function(t){return t(e.storeName).getEnabled()}),[]),m=n((function(t){return t(e.storeName).getAction()}),[]),d=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),b=i(e.storeName).setChangeAction,v=p;"object"===(void 0===p?"undefined":a(p))&&(v=p.join(","));var E=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return u((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:E,onChange:function(e){b(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:m,newStatus:d,date:c,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:s?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:c}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:v}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),u=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),c=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),s=l;return"object"===(void 0===l?"undefined":a(l))&&(s=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:c,date:t,terms:l,taxonomy:u,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(386),i=n(11),l=n(566),u=n(244),c=wp.components,s=c.PanelRow;c.BaseControl,t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,o.useState)(e.settings.taxonomy),c=a(n,2),m=c[0],d=c[1],p=(0,o.useState)([]),f=a(p,2),y=f[0],g=f[1],b=(0,o.useState)(!1),v=a(b,2),E=v[0],S=v[1],h=(0,o.useState)([]),_=a(h,2),T=_[0],x=_[1],N=(0,o.useState)(e.settings.howToExpire),R=a(N,2),A=R[0],C=R[1],P=(0,o.useState)(e.settings.active),w=a(P,2),O=w[0],D=w[1],F=(0,o.useState)(e.settings.defaultExpireOffset),I=a(F,2),k=I[0],j=I[1],B=(0,o.useState)(e.settings.emailNotification),M=a(B,2),L=M[0],V=M[1],H=(0,o.useState)(e.settings.autoEnabled),W=a(H,2),U=W[0],Q=W[1],Y=(0,o.useState)(!1),q=a(Y,2),X=q[0],z=q[1],G=(0,o.useState)(""),J=a(G,2),K=J[0],Z=J[1],$=(0,o.useState)(""),ee=a($,2),te=ee[0],ne=ee[1],ae=(0,o.useState)(t),re=a(ae,2),oe=re[0],ie=re[1],le=(0,o.useState)(e.settings.newStatus),ue=a(le,2),ce=ue[0],se=ue[1],me=(0,o.useState)(!1),de=a(me,2),pe=de[0],fe=de[1],ye=(0,o.useState)(""),ge=a(ye,2),be=ge[0],ve=ge[1],Ee=(0,o.useState)(),Se=a(Ee,2),he=Se[0],_e=Se[1],Te=(0,o.useRef)(new AbortController),xe=["category","category-add","category-remove","category-remove-all"];(0,o.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=oe.filter((function(e){return-1===xe.indexOf(e.value)})),ie(t))}),[]),(0,o.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),x(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ne(e.label)})))}),[m]),(0,o.useEffect)((function(){z(function(){if(!O)return Z(""),!0;var t=k||e.settings.globalDefaultExpireOffset;if(t){var n=Te.current;n&&n.abort(),Te.current=new AbortController;var a=Te.current.signal;fe(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:a}).then((function(e){fe(!1),z(e.isValid),Z(e.message),e.isValid?(ve(e.preview),_e(e.currentTime)):ve("")})).catch((function(e){"AbortError"!==e.name&&(fe(!1),z(!1),Z(e.message),ve(""))}))}return Z(""),!0}())}),[O,k]),(0,o.useEffect)((function(){if(te){var e=[];t.forEach((function(t){var n=t.label;-1!==xe.indexOf(t.value)&&(n=n.replace("%s",te.toLowerCase())),e.push({value:t.value,label:n})})),ie(e)}}),[te]),(0,o.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,o.useEffect)((function(){pe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!pe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[pe]);var Ne=y.map((function(e){return e.label})),Re=[React.createElement(r.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:O||!1,label:e.text.fieldActiveLabel,onChange:function(e){D(e)}}))];return O&&(Re.push(React.createElement(r.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:U||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){Q(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){d(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:oe,description:e.text.fieldHowToExpireDescription,selected:A,onChange:function(e){C(e)}}),"change-status"===A&&React.createElement(r.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:se}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(A)>-1&&React.createElement(r.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:Ne,value:T,isLoading:E,onChange:function(e){x(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(r.TextControl,{name:"expired-custom-date-"+e.postType,value:k,loading:pe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),be&&React.createElement(o.Fragment,null,React.createElement("h4",null,e.text.datePreview),React.createElement("div",null,React.createElement("div",null,React.createElement("span",null,e.text.datePreviewCurrent,": "),React.createElement("span",null,React.createElement("code",null,he))),React.createElement("div",null,React.createElement("span",null,e.text.datePreviewComputed,": "),React.createElement("span",null,React.createElement("code",null,be))))))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(r.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){V(e)}})))),Re=(0,l.applyFilters)("expirationdate_settings_posttype",Re,e,O,o.useState),React.createElement(r.SettingsFieldset,{legend:e.legend},React.createElement(r.SettingsTable,{bodyChildren:Re}),!X&&React.createElement(s,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.PostTypesSettingsPanels=function(e){var t=[],n=!0,o=!1,i=void 0;try{for(var l,u=Object.entries(e.settings)[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var c=l.value,s=a(c,2),m=s[0],d=s[1];t.push(React.createElement(r.PostTypeSettingsPanel,{legend:d.label,text:e.text,postType:m,settings:d,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[m],statusesList:e.statusesList[m],key:m+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished}))}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(386),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},5:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",null,React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(386),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,u=e.onChangeDate,c=e.is12Hour,s=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:u,__nextRemoveHelpButton:!0,is12Hour:c,startOfWeek:s}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(386),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var u=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:u,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var u=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return u.FutureActionPanelBulkEdit}});var c=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return c.PostTypeSettingsPanel}});var s=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return s.PostTypesSettingsPanels}});var m=n(5);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return m.SettingRow}});var d=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return d.SettingsFieldset}});var p=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var b=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return b.CheckboxControl}});var v=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return v.SelectControl}});var E=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return E.TextControl}});var S=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return S.TokensControl}});var h=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return h.NonceControl}});var _=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var T=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return T.Spinner}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,u=arguments[1];switch(u.type){case"SET_ACTION":return a({},l,{action:u.action});case"SET_NEW_STATUS":return a({},l,{newStatus:u.newStatus});case"SET_DATE":return"number"!=typeof u.date&&(0,o.isNumber)(u.date)&&(u.date=parseInt(u.date)),"string"==typeof u.date&&(u.date=new Date(u.date).getTime()),u.date=(0,r.normalizeUnixTimeToSeconds)(u.date),u.date=(0,r.formatUnixTimeToTimestamp)(u.date),a({},l,{date:u.date});case"SET_ENABLED":return a({},l,{enabled:u.enabled});case"SET_TERMS":return a({},l,{terms:u.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:u.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:u.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:u.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:u.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:u.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:u.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:u.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},u.extraData)});case"SET_EXTRA_DATA_BY_NAME":var c=a({},l.extraData,(e={},n=u.name,i=u.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},c)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{e.exports=ReactDOM},477:e=>{e.exports=publishpressFutureClassicEditorConfig},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},386:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a=n(57),r=n(480),o=n(409),i=n(386),l=n(562),u=n(477);if(n(206),!(0,o.isGutenbergEnabled)()){var c="publishpress-future/future-action";(0,l.select)(c)||(0,r.createStore)({name:c,defaultState:{autoEnable:u.postTypeDefaultConfig.autoEnable,action:u.postTypeDefaultConfig.expireType,newStatus:u.postTypeDefaultConfig.newStatus,date:u.defaultDate,taxonomy:u.postTypeDefaultConfig.taxonomy,terms:u.postTypeDefaultConfig.terms}});var s=document.getElementById("publishpress-future-classic-editor"),m=React.createElement(a.FutureActionPanelClassicEditor,{storeName:c,postType:u.postType,isNewPost:u.isNewPost,actionsSelectOptions:u.actionsSelectOptions,statusesSelectOptions:u.statusesSelectOptions,is12Hour:u.is12Hour,timeFormat:u.timeFormat,startOfWeek:u.startOfWeek,strings:u.strings,taxonomyName:u.taxonomyName});(0,i.createRoot)(s).render(m)}})(); +(()=>{"use strict";var e={5442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},4311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(1386),r=n(2214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},5470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(1386),o=n(4011),i=n(3244);n(9922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,s=e.labelOffsetPreview,u=e.setValidationErrorCallback,c=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),g=y[0],v=y[1],b=(0,r.useState)(),h=a(b,2),E=h[0],S=h[1],_=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=_.current;e&&e.abort(),_.current=new AbortController;var n=_.current.signal;c(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){c(!1),d(e.isValid),u(e.message),e.isValid?(v(e.preview),S(e.currentTime)):v("")})).catch((function(e){"AbortError"!==e.name&&(c(!1),d(!1),u(e.message),v(""))}))}}()}),[t]);var x=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+x},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},s,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},g)))))};t.default=l},4620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(7039),r=n(2214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},8418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(8409),i=n(4873),l=n(9986),s=n(2214),u=n(1442),c=n(6625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,g=d.Spinner,v=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,S=b.useState,_=wp.htmlEntities.decodeEntities,x=wp.url.addQueryArgs,T=wp.data,A=T.useSelect,N=T.useDispatch,C=wp.apiFetch;t.FutureActionPanel=function(e){var t=A((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,b=t.enabled,T=t.terms,R=t.taxonomy,w=t.taxonomyName,P=t.termsListByName,O=t.termsListById,D=t.isFetchingTerms,I=t.calendarIsVisible,k=t.hasValidData,F=t.newStatus,B=S(""),j=r(B,2),M=j[0],V=j[1],L=N(e.storeName),H=L.setAction,U=L.setDate,W=L.setEnabled,Q=L.setTerms,Y=L.setTaxonomy,q=L.setTermsListByName,z=L.setTermsListById,X=L.setTaxonomyName,G=L.setIsFetchingTerms,J=L.setCalendarIsVisible,Z=L.setHasValidData,K=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:R},O[e]=e,q(P),z(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(T)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=I?"future-action-panel":"future-action-panel hidden-calendar",se=I?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=I?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,s=void 0;try{for(var u,c=a[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var d=u.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(l)throw s}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=w;switch(n){case"category":pe=e.strings.newTerms.replace("%s",w);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",w);break;case"category-add":pe=e.strings.addTerms.replace("%s",w)}return E((function(){if(!b)return Z(!0),void V("");Z(function(){var t=!0;if(!b)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,s=i("core/editor").getEditedPostAttribute("publishpress_future_action"),u=o("core/editor"),c=u.lockPostSaving,d=u.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:s.enabled,calendarIsVisible:!0,action:s.action,newStatus:s.newStatus,date:s.date,terms:s.terms,taxonomy:s.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=a(u,2),d=c[0],m=c[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){c("future-action")}})))}},2094:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(8409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,s=wp.element.useEffect,u=n((function(t){return t(e.storeName).getDate()}),[]),c=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return s((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:u,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:c?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:u}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},3571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(2057),r=n(7562);n(1386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},5437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(7562);n(1386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),s=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),u=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),c=l;return"object"===(void 0===l?"undefined":a(l))&&(c=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:u,date:t,terms:l,taxonomy:s,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(1386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},1620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(2057),i=n(1386),l=n(4011),s=n(8566),u=n(3244),c=(a=n(5470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),g=y[0],v=y[1],b=(0,i.useState)(!1),h=r(b,2),E=h[0],S=h[1],_=(0,i.useState)([]),x=r(_,2),T=x[0],A=x[1],N=(0,i.useState)(e.settings.howToExpire),C=r(N,2),R=C[0],w=C[1],P=(0,i.useState)(e.settings.active),O=r(P,2),D=O[0],I=O[1],k=(0,i.useState)(e.settings.defaultExpireOffset),F=r(k,2),B=F[0],j=F[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],U=(0,i.useState)(e.settings.autoEnabled),W=r(U,2),Q=W[0],Y=W[1],q=(0,i.useState)(!0),z=r(q,2),X=z[0],G=z[1],J=(0,i.useState)(""),Z=r(J,2),K=Z[0],$=Z[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],se=(0,i.useState)(e.settings.newStatus),ue=r(se,2),ce=ue[0],de=ue[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ge=B||e.settings.globalDefaultExpireOffset,ve=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===ve.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),v(n),A(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==ve.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var be=g.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:D||!1,label:e.text.fieldActiveLabel,onChange:function(e){I(e)}}))];D&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){Y(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:R,onChange:function(e){w(e)}}),"change-status"===R&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(R)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:be,value:T,isLoading:E,onChange:function(e){A(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:B,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),React.createElement(c.default,{offset:ge,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:G}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,s.applyFilters)("expirationdate_settings_posttype",he,e,D,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!X&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},8138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],s=[],u=!0,c=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(u=(m=p.next()).done);u=!0){var f=m.value,y=a(f,2),g=y[0],v=y[1];s.push(React.createElement(r.PostTypeSettingsPanel,{legend:v.label,text:e.text,postType:g,settings:v,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[g],statusesList:e.statusesList[g],key:g+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===g}))}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}var b=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,S=!0,_=!1,x=void 0;try{for(var T,A=Object.entries(e.settings)[Symbol.iterator]();!(S=(T=A.next()).done);S=!0){var N=T.value,C=a(N,2),R=C[0],w=C[1];E=i===R,h.push(React.createElement("a",{href:"#"+R+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:R+"-tab",onClick:b},w.label))}}catch(e){_=!0,x=e}finally{try{!S&&A.return&&A.return()}finally{if(_)throw x}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),s)}},2858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(1386),r=n(2214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},9005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(1386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},5786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},9892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},5681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(1386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},6772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},4438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},6301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(1386),r=n(2214),o=n(2057);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(2214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},4873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(3190),r=n(4620),o=n(1386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,s=e.onChangeDate,u=e.is12Hour,c=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:s,__nextRemoveHelpButton:!0,is12Hour:u,startOfWeek:c}))}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(1386),o=n(2214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var s=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:s,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},8225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},2057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(5442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(8418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(2864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(3571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(5437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var s=n(2094);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return s.FutureActionPanelBulkEdit}});var u=n(1620);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return u.PostTypeSettingsPanel}});var c=n(8138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return c.PostTypesSettingsPanels}});var d=n(9005);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(5786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(9892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(5681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(6772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(4438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(4311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(2858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(6301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(3948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var S=n(1013);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return S.NonceControl}});var _=n(8225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var x=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return x.Spinner}});var T=n(5470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return T.DateOffsetPreview}})},4480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,s=arguments[1];switch(s.type){case"SET_ACTION":return a({},l,{action:s.action});case"SET_NEW_STATUS":return a({},l,{newStatus:s.newStatus});case"SET_DATE":return"number"!=typeof s.date&&(0,o.isNumber)(s.date)&&(s.date=parseInt(s.date)),"string"==typeof s.date&&(s.date=new Date(s.date).getTime()),s.date=(0,r.normalizeUnixTimeToSeconds)(s.date),s.date=(0,r.formatUnixTimeToTimestamp)(s.date),a({},l,{date:s.date});case"SET_ENABLED":return a({},l,{enabled:s.enabled});case"SET_TERMS":return a({},l,{terms:s.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:s.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:s.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:s.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:s.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:s.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:s.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:s.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},s.extraData)});case"SET_EXTRA_DATA_BY_NAME":var u=a({},l.extraData,(e={},n=s.name,i=s.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},u)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},8409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(1354),r=n.n(a),o=n(6314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},1354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},5338:(e,t,n)=>{var a=n(5206);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},9922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(5072),r=n.n(a),o=n(7825),i=n.n(o),l=n(7659),s=n.n(l),u=n(5056),c=n.n(u),d=n(540),m=n.n(d),p=n(1113),f=n.n(p),y=n(1461),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=m(),r()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0},5072:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5206:e=>{e.exports=ReactDOM},6477:e=>{e.exports=publishpressFutureClassicEditorConfig},3244:e=>{e.exports=wp},2214:e=>{e.exports=wp.components},7562:e=>{e.exports=wp.data},1386:e=>{e.exports=wp.element},8566:e=>{e.exports=wp.hooks},9986:e=>{e.exports=wp.plugins},4011:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=n(2057),r=n(4480),o=n(8409),i=n(7562),l=n(5338),s=n(6477);if(!(0,o.isGutenbergEnabled)()){var u="publishpress-future/future-action";(0,i.select)(u)||(0,r.createStore)({name:u,defaultState:{autoEnable:s.postTypeDefaultConfig.autoEnable,action:s.postTypeDefaultConfig.expireType,newStatus:s.postTypeDefaultConfig.newStatus,date:s.defaultDate,taxonomy:s.postTypeDefaultConfig.taxonomy,terms:s.postTypeDefaultConfig.terms}});var c=document.getElementById("publishpress-future-classic-editor"),d=React.createElement(a.FutureActionPanelClassicEditor,{storeName:u,postType:s.postType,isNewPost:s.isNewPost,actionsSelectOptions:s.actionsSelectOptions,statusesSelectOptions:s.statusesSelectOptions,is12Hour:s.is12Hour,timeFormat:s.timeFormat,startOfWeek:s.startOfWeek,strings:s.strings,taxonomyName:s.taxonomyName,hideCalendarByDefault:s.hideCalendarByDefault});(0,l.createRoot)(c).render(d)}})(); //# sourceMappingURL=classic-editor.js.map \ No newline at end of file diff --git a/assets/js/classic-editor.js.map b/assets/js/classic-editor.js.map index 2e2f23d1e..970759053 100644 --- a/assets/js/classic-editor.js.map +++ b/assets/js/classic-editor.js.map @@ -1 +1 @@ -{"version":3,"file":"classic-editor.js","mappings":"uFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,8FCPD,SACA,SAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OA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ApB0Y,EAAOC,QAAU5Y,GAAGa,I,UCApB8X,EAAOC,QAAU5Y,GAAGO,O,UCApBoY,EAAOC,QAAU5Y,GAAG+Y,K,UCApBJ,EAAOC,QAAU5Y,GAAGgZ,O,SCApBL,EAAOC,QAAU5Y,GAAGY,G,GCChBqY,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaR,QAGrB,IAAID,EAASM,EAAyBE,GAAY,CAGjDP,QAAS,CAAC,GAOX,OAHAU,EAAoBH,GAAUR,EAAQA,EAAOC,QAASM,GAG/CP,EAAOC,OACf,CCtBA,YACA,SACA,SACA,SACA,SACA,SAeA,GAFA,SAEM,IAAAtB,sBAAsB,CACxB,IAAMlW,EAAY,qCAEb,IAAAD,QAAOC,KACR,IAAA2T,aAAY,CACRzV,KAAM8B,EACN4T,aAAc,CACVtK,WAAYD,EAAAA,sBAAsBC,WAClCxJ,OAAQuJ,EAAAA,sBAAsB0F,WAC9BzN,UAAW+H,EAAAA,sBAAsB/H,UACjCpB,KAAMiY,EAAAA,YACN3X,SAAU6I,EAAAA,sBAAsB7I,SAChCF,MAAO+I,EAAAA,sBAAsB/I,SAKzC,IAAM8X,EAAYpN,SAASqN,eAAe,sCACpCC,EACF,oBAAC,EAAAxN,+BAAD,CACI9K,UAAWA,EACXuJ,SAAUA,EAAAA,SACVoB,UAAWA,EAAAA,UACXhG,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvB9I,SAAUA,EAAAA,SACVkG,WAAYA,EAAAA,WACZjG,YAAaA,EAAAA,YACbkH,QAASA,EAAAA,QACTjF,aAAcA,EAAAA,gBAItB,IAAA6X,YAAWH,GAAWI,OAAOF,EAChC,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureClassicEditorConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/./assets/jsx/classic-editor.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []);\n const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []);\n const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []);\n const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []);\n const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1');\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsFieldset,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState, Fragment, useRef } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\n\nconst { PanelRow, BaseControl } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(false);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n const apiRequestControllerRef = useRef(new AbortController());\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n const validateData = () => {\n if (! isActive) {\n setValidationError('');\n return true;\n }\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidation(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidation(false);\n\n setHasValidData(result.isValid);\n setValidationError(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidation(false);\n setHasValidData(false);\n setValidationError(error.message);\n setOffsetPreview('');\n });\n }\n\n setValidationError('');\n return true;\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n setHasValidData(validateData());\n }, [isActive, expireOffset]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n {offsetPreview && (\n \n

{props.text.datePreview}

\n
\n
\n {props.text.datePreviewCurrent}: \n {currentTime}\n
\n
\n {props.text.datePreviewComputed}: \n {offsetPreview}\n
\n
\n
\n )}\n
\n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n return (\n \n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\n\nexport const PostTypesSettingsPanels = function (props) {\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n return (panels);\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","module.exports = ReactDOM;","module.exports = publishpressFutureClassicEditorConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { FutureActionPanelClassicEditor } from './components';\nimport { createStore } from './data';\nimport { isGutenbergEnabled } from './utils';\nimport { createRoot } from '@wordpress/element';\nimport { select } from '@wordpress/data';\nimport {\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n postTypeDefaultConfig,\n defaultDate,\n statusesSelectOptions\n} from \"&config.classic-editor\";\nimport { render } from \"react-dom\";\n\nif (! isGutenbergEnabled()) {\n const storeName = 'publishpress-future/future-action';\n\n if (!select(storeName)) {\n createStore({\n name: storeName,\n defaultState: {\n autoEnable: postTypeDefaultConfig.autoEnable,\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-classic-editor\");\n const component = (\n \n );\n\n createRoot(container).render(component);\n}\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","useEffect","decodeEntities","htmlEntities","addQueryArgs","url","data","useSelect","useDispatch","apiFetch","FutureActionPanel","action","select","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","path","then","result","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","offset","globalDefaultExpireOffset","controller","current","abort","signal","method","isValid","message","preview","catch","error","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","SettingsFieldset","legend","SettingsTable","bodyChildren","PostTypesSettingsPanels","panels","postTypeSettings","valign","htmlFor","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","onClick","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","module","exports","ReactDOM","publishpressFutureClassicEditorConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","defaultDate","container","getElementById","component","createRoot","render"],"sourceRoot":""} +{"version":3,"file":"classic-editor.js","mappings":"wFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,+FCPD,UACA,UAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GAC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,UACA,UACA,UAeA,KAAM,IAAApC,sBAAsB,CACxB,IAAMvV,EAAY,qCAEb,IAAAF,QAAOE,KACR,IAAAgT,aAAY,CACR7W,KAAM6D,EACNiT,aAAc,CACV7J,WAAYD,EAAAA,sBAAsBC,WAClCrJ,OAAQoJ,EAAAA,sBAAsBwE,WAC9BrM,UAAW6H,EAAAA,sBAAsB7H,UACjCpB,KAAMwd,EAAAA,YACNld,SAAU2I,EAAAA,sBAAsB3I,SAChCF,MAAO6I,EAAAA,sBAAsB7I,SAKzC,IAAMqd,EAAY7S,SAAS8S,eAAe,sCACpCC,EACF,oBAAC,EAAAjT,+BAAD,CACI5K,UAAWA,EACXqJ,SAAUA,EAAAA,SACVoB,UAAWA,EAAAA,UACXhG,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvBxI,SAAUA,EAAAA,SACV4F,WAAYA,EAAAA,WACZ3F,YAAaA,EAAAA,YACb4G,QAASA,EAAAA,QACT/E,aAAcA,EAAAA,aACd6C,sBAAuBA,EAAAA,yBAI/B,IAAAiV,YAAWmF,GAAWG,OAAOD,EAChC,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./node_modules/react-dom/client.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureClassicEditorConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/classic-editor.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = ReactDOM;","module.exports = publishpressFutureClassicEditorConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import { FutureActionPanelClassicEditor } from './components';\nimport { createStore } from './data';\nimport { isGutenbergEnabled } from './utils';\nimport { select } from '@wordpress/data';\nimport { createRoot } from 'react-dom/client';\nimport {\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n postTypeDefaultConfig,\n defaultDate,\n statusesSelectOptions,\n hideCalendarByDefault\n} from \"&config.classic-editor\";\n\nif (! isGutenbergEnabled()) {\n const storeName = 'publishpress-future/future-action';\n\n if (!select(storeName)) {\n createStore({\n name: storeName,\n defaultState: {\n autoEnable: postTypeDefaultConfig.autoEnable,\n action: postTypeDefaultConfig.expireType,\n newStatus: postTypeDefaultConfig.newStatus,\n date: defaultDate,\n taxonomy: postTypeDefaultConfig.taxonomy,\n terms: postTypeDefaultConfig.terms,\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-classic-editor\");\n const component = (\n \n );\n\n createRoot(container).render(component);\n}\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","m","createRoot","hydrateRoot","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","ReactDOM","publishpressFutureClassicEditorConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","defaultDate","container","getElementById","component","render"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/js/quick-edit.js b/assets/js/quick-edit.js index 6ca0c4b88..ee8f5839e 100644 --- a/assets/js/quick-edit.js +++ b/assets/js/quick-edit.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(5),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),u=n(214),c=n(61),s=n(625),m=wp.components,d=m.PanelRow,p=m.CheckboxControl,f=m.SelectControl,y=m.FormTokenField,g=m.Spinner,v=m.BaseControl,b=wp.element,E=b.Fragment,S=b.useEffect,h=b.useState,_=wp.htmlEntities.decodeEntities,T=wp.url.addQueryArgs,x=wp.data,N=x.useSelect,R=x.useDispatch,A=wp.apiFetch;t.FutureActionPanel=function(e){var t=N((function(t){return t(e.storeName).getAction()}),[]),n=N((function(t){return t(e.storeName).getDate()}),[]),m=N((function(t){return t(e.storeName).getEnabled()}),[]),b=N((function(t){return t(e.storeName).getTerms()}),[]),x=N((function(t){return t(e.storeName).getTaxonomy()}),[]),C=N((function(t){return t(e.storeName).getTaxonomyName()}),[]),P=N((function(t){return t(e.storeName).getTermsListByName()}),[]),w=N((function(t){return t(e.storeName).getTermsListById()}),[]),O=N((function(t){return t(e.storeName).getIsFetchingTerms()}),[]),D=N((function(t){return t(e.storeName).getCalendarIsVisible()}),[]),F=N((function(t){return t(e.storeName).getHasValidData()}),[]),k=N((function(t){return t(e.storeName).getNewStatus()}),[]),I=h(""),j=r(I,2),B=j[0],M=j[1],L=R(e.storeName),V=L.setAction,H=L.setDate,W=L.setEnabled,Q=L.setTerms,U=L.setTaxonomy,q=L.setTermsListByName,Y=L.setTermsListById,X=L.setTaxonomyName,z=L.setIsFetchingTerms,G=L.setCalendarIsVisible,J=L.setHasValidData,K=L.setNewStatus,Z=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:x},w[e]=e,q(P),Y(w),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&w&&(ae=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return w[e]}))}(b)),"string"==typeof ae&&(ae=[]));var re=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(re=Object.keys(P));var oe,ie=D?"future-action-panel":"future-action-panel hidden-calendar",le=D?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=D?"future-action-date-panel":"future-action-date-panel hidden-calendar";oe="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var se=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,u=void 0;try{for(var c,s=a[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var m=c.value.split("}"),d=r(m,2),p=d[0],f=d[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,u=e}finally{try{!i&&s.return&&s.return()}finally{if(l)throw u}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(t).includes("category")&&"category-remove-all"!==t,de=C;switch(t){case"category":de=e.strings.newTerms.replace("%s",C);break;case"category-remove":de=e.strings.removeTerms.replace("%s",C);break;case"category-add":de=e.strings.addTerms.replace("%s",C)}return S((function(){if(!m)return J(!0),void M("");J(function(){var a=!0;if(!m)return M(""),!0;t||(M(e.strings.errorActionRequired),a=!1),n||(M(e.strings.errorDateRequired),a=!1),n&&new Date(n){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,u=i("core/editor").getEditedPostAttribute("publishpress_future_action"),c=o("core/editor"),s=c.lockPostSaving,m=c.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:u.enabled,calendarIsVisible:!0,action:u.action,newStatus:u.newStatus,date:u.date,terms:u.terms,taxonomy:u.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,u=Object.entries(e)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var c=i.value,s=a(c,2),m=s[0],d=s[1];t.publishpress_future_action[m]=d}}catch(e){r=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){m("future-action")},onDataIsInvalid:function(){s("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,u=wp.element.useEffect,c=n((function(t){return t(e.storeName).getDate()}),[]),s=n((function(t){return t(e.storeName).getEnabled()}),[]),m=n((function(t){return t(e.storeName).getAction()}),[]),d=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var E=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return u((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:E,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:m,newStatus:d,date:c,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:s?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:c}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(5),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(5),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),u=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),c=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),s=l;return"object"===(void 0===l?"undefined":a(l))&&(s=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:c,date:t,terms:l,taxonomy:u,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(5);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(5),i=n(11),l=n(566),u=n(244),c=wp.components,s=c.PanelRow;c.BaseControl,t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,o.useState)(e.settings.taxonomy),c=a(n,2),m=c[0],d=c[1],p=(0,o.useState)([]),f=a(p,2),y=f[0],g=f[1],v=(0,o.useState)(!1),b=a(v,2),E=b[0],S=b[1],h=(0,o.useState)([]),_=a(h,2),T=_[0],x=_[1],N=(0,o.useState)(e.settings.howToExpire),R=a(N,2),A=R[0],C=R[1],P=(0,o.useState)(e.settings.active),w=a(P,2),O=w[0],D=w[1],F=(0,o.useState)(e.settings.defaultExpireOffset),k=a(F,2),I=k[0],j=k[1],B=(0,o.useState)(e.settings.emailNotification),M=a(B,2),L=M[0],V=M[1],H=(0,o.useState)(e.settings.autoEnabled),W=a(H,2),Q=W[0],U=W[1],q=(0,o.useState)(!1),Y=a(q,2),X=Y[0],z=Y[1],G=(0,o.useState)(""),J=a(G,2),K=J[0],Z=J[1],$=(0,o.useState)(""),ee=a($,2),te=ee[0],ne=ee[1],ae=(0,o.useState)(t),re=a(ae,2),oe=re[0],ie=re[1],le=(0,o.useState)(e.settings.newStatus),ue=a(le,2),ce=ue[0],se=ue[1],me=(0,o.useState)(!1),de=a(me,2),pe=de[0],fe=de[1],ye=(0,o.useState)(""),ge=a(ye,2),ve=ge[0],be=ge[1],Ee=(0,o.useState)(),Se=a(Ee,2),he=Se[0],_e=Se[1],Te=(0,o.useRef)(new AbortController),xe=["category","category-add","category-remove","category-remove-all"];(0,o.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=oe.filter((function(e){return-1===xe.indexOf(e.value)})),ie(t))}),[]),(0,o.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),x(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ne(e.label)})))}),[m]),(0,o.useEffect)((function(){z(function(){if(!O)return Z(""),!0;var t=I||e.settings.globalDefaultExpireOffset;if(t){var n=Te.current;n&&n.abort(),Te.current=new AbortController;var a=Te.current.signal;fe(!0),(0,u.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:a}).then((function(e){fe(!1),z(e.isValid),Z(e.message),e.isValid?(be(e.preview),_e(e.currentTime)):be("")})).catch((function(e){"AbortError"!==e.name&&(fe(!1),z(!1),Z(e.message),be(""))}))}return Z(""),!0}())}),[O,I]),(0,o.useEffect)((function(){if(te){var e=[];t.forEach((function(t){var n=t.label;-1!==xe.indexOf(t.value)&&(n=n.replace("%s",te.toLowerCase())),e.push({value:t.value,label:n})})),ie(e)}}),[te]),(0,o.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,o.useEffect)((function(){pe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!pe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[pe]);var Ne=y.map((function(e){return e.label})),Re=[React.createElement(r.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:O||!1,label:e.text.fieldActiveLabel,onChange:function(e){D(e)}}))];return O&&(Re.push(React.createElement(r.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){U(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){d(e)}}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:oe,description:e.text.fieldHowToExpireDescription,selected:A,onChange:function(e){C(e)}}),"change-status"===A&&React.createElement(r.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:se}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(A)>-1&&React.createElement(r.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:Ne,value:T,isLoading:E,onChange:function(e){x(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(r.TextControl,{name:"expired-custom-date-"+e.postType,value:I,loading:pe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),ve&&React.createElement(o.Fragment,null,React.createElement("h4",null,e.text.datePreview),React.createElement("div",null,React.createElement("div",null,React.createElement("span",null,e.text.datePreviewCurrent,": "),React.createElement("span",null,React.createElement("code",null,he))),React.createElement("div",null,React.createElement("span",null,e.text.datePreviewComputed,": "),React.createElement("span",null,React.createElement("code",null,ve))))))),Re.push(React.createElement(r.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(r.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){V(e)}})))),Re=(0,l.applyFilters)("expirationdate_settings_posttype",Re,e,O,o.useState),React.createElement(r.SettingsFieldset,{legend:e.legend},React.createElement(r.SettingsTable,{bodyChildren:Re}),!X&&React.createElement(s,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.PostTypesSettingsPanels=function(e){var t=[],n=!0,o=!1,i=void 0;try{for(var l,u=Object.entries(e.settings)[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var c=l.value,s=a(c,2),m=s[0],d=s[1];t.push(React.createElement(r.PostTypeSettingsPanel,{legend:d.label,text:e.text,postType:m,settings:d,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[m],statusesList:e.statusesList[m],key:m+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished}))}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(5),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},767:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(5),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",null,React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(5);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(5),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(5);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,u=e.onChangeDate,c=e.is12Hour,s=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:u,__nextRemoveHelpButton:!0,is12Hour:c,startOfWeek:s}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(5),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var u=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:u,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var u=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return u.FutureActionPanelBulkEdit}});var c=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return c.PostTypeSettingsPanel}});var s=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return s.PostTypesSettingsPanels}});var m=n(767);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return m.SettingRow}});var d=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return d.SettingsFieldset}});var p=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var E=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return E.TextControl}});var S=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return S.TokensControl}});var h=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return h.NonceControl}});var _=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var T=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return T.Spinner}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,u=arguments[1];switch(u.type){case"SET_ACTION":return a({},l,{action:u.action});case"SET_NEW_STATUS":return a({},l,{newStatus:u.newStatus});case"SET_DATE":return"number"!=typeof u.date&&(0,o.isNumber)(u.date)&&(u.date=parseInt(u.date)),"string"==typeof u.date&&(u.date=new Date(u.date).getTime()),u.date=(0,r.normalizeUnixTimeToSeconds)(u.date),u.date=(0,r.formatUnixTimeToTimestamp)(u.date),a({},l,{date:u.date});case"SET_ENABLED":return a({},l,{enabled:u.enabled});case"SET_TERMS":return a({},l,{terms:u.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:u.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:u.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:u.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:u.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:u.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:u.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:u.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},u.extraData)});case"SET_EXTRA_DATA_BY_NAME":var c=a({},l.extraData,(e={},n=u.name,i=u.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},c)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{e.exports=publishpressFutureQuickEditConfig},643:e=>{e.exports=window},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},5:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a=n(57),r=n(480),o=n(409),i=n(5),l=n(562),u=n(643),c=n(47),s="publishpress-future/future-action-quick-edit",m=u.inlineEditPost.edit,d=u.inlineEditPost.revert;u.inlineEditPost.edit=function(e,t){m.apply(this,arguments);var n=function(e){return"string"==typeof e||"number"==typeof e?e:e.closest("tr").id.split("-")[1]}(e),p=(0,o.getActionSettingsFromColumnData)(n);if(p){var f=p.enabled,y=p.action,g=p.date,v=p.taxonomy,b=p.newStatus,E=p.terms;"string"==typeof E&&(E=E.split(",")),(0,l.select)(s)?((0,l.dispatch)(s).setEnabled(f),(0,l.dispatch)(s).setAction(y),(0,l.dispatch)(s).setDate(g),(0,l.dispatch)(s).setTaxonomy(v),(0,l.dispatch)(s).setTerms(E),(0,l.dispatch)(s).setNewStatus(b)):(0,r.createStore)({name:s,defaultState:{autoEnable:f,action:y,date:g,taxonomy:v,terms:E,newStatus:b}});var S=document.getElementById("publishpress-future-quick-edit");if(S){var h=(0,i.createRoot)(S),_=document.querySelector(".inline-edit-save .save");_&&(_.onclick=function(){setTimeout((function(){h.unmount()}),1e3)});var T=React.createElement(a.FutureActionPanelQuickEdit,{storeName:s,postType:c.postType,isNewPost:c.isNewPost,actionsSelectOptions:c.actionsSelectOptions,statusesSelectOptions:c.statusesSelectOptions,is12Hour:c.is12Hour,timeFormat:c.timeFormat,startOfWeek:c.startOfWeek,strings:c.strings,taxonomyName:c.taxonomyName,nonce:c.nonce});h.render(T),u.inlineEditPost.revert=function(){h.unmount(),d.apply(this,arguments)}}}}})(); +(()=>{"use strict";var e={5442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},4311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(1386),r=n(2214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},5470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(1386),o=n(4011),i=n(3244);n(9922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,s=e.labelOffsetPreview,u=e.setValidationErrorCallback,c=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),g=y[0],v=y[1],b=(0,r.useState)(),h=a(b,2),E=h[0],S=h[1],_=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=_.current;e&&e.abort(),_.current=new AbortController;var n=_.current.signal;c(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){c(!1),d(e.isValid),u(e.message),e.isValid?(v(e.preview),S(e.currentTime)):v("")})).catch((function(e){"AbortError"!==e.name&&(c(!1),d(!1),u(e.message),v(""))}))}}()}),[t]);var x=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+x},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},s,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},g)))))};t.default=l},4620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(7039),r=n(2214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},8418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(8409),i=n(4873),l=n(9986),s=n(2214),u=n(1442),c=n(6625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,g=d.Spinner,v=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,S=b.useState,_=wp.htmlEntities.decodeEntities,x=wp.url.addQueryArgs,T=wp.data,A=T.useSelect,N=T.useDispatch,C=wp.apiFetch;t.FutureActionPanel=function(e){var t=A((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,b=t.enabled,T=t.terms,w=t.taxonomy,R=t.taxonomyName,P=t.termsListByName,O=t.termsListById,D=t.isFetchingTerms,I=t.calendarIsVisible,k=t.hasValidData,F=t.newStatus,B=S(""),j=r(B,2),M=j[0],V=j[1],L=N(e.storeName),H=L.setAction,U=L.setDate,W=L.setEnabled,Q=L.setTerms,q=L.setTaxonomy,Y=L.setTermsListByName,z=L.setTermsListById,X=L.setTaxonomyName,G=L.setIsFetchingTerms,J=L.setCalendarIsVisible,Z=L.setHasValidData,K=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:w},O[e]=e,Y(P),z(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(T)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=I?"future-action-panel":"future-action-panel hidden-calendar",se=I?"future-action-panel-content":"future-action-panel-content hidden-calendar",ue=I?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ce=e.actionsSelectOptions;e.taxonomy||(ce=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,s=void 0;try{for(var u,c=a[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var d=u.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(l)throw s}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=R;switch(n){case"category":pe=e.strings.newTerms.replace("%s",R);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",R);break;case"category-add":pe=e.strings.addTerms.replace("%s",R)}return E((function(){if(!b)return Z(!0),void V("");Z(function(){var t=!0;if(!b)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,s=i("core/editor").getEditedPostAttribute("publishpress_future_action"),u=o("core/editor"),c=u.lockPostSaving,d=u.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:s.enabled,calendarIsVisible:!0,action:s.action,newStatus:s.newStatus,date:s.date,terms:s.terms,taxonomy:s.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=a(u,2),d=c[0],m=c[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){c("future-action")}})))}},2094:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(8409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,s=wp.element.useEffect,u=n((function(t){return t(e.storeName).getDate()}),[]),c=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return s((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:u,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:c?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:u}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},3571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(2057),r=n(7562);n(1386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},5437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(7562);n(1386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),s=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),u=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),c=l;return"object"===(void 0===l?"undefined":a(l))&&(c=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:u,date:t,terms:l,taxonomy:s,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(1386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},1620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(2057),i=n(1386),l=n(4011),s=n(8566),u=n(3244),c=(a=n(5470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),g=y[0],v=y[1],b=(0,i.useState)(!1),h=r(b,2),E=h[0],S=h[1],_=(0,i.useState)([]),x=r(_,2),T=x[0],A=x[1],N=(0,i.useState)(e.settings.howToExpire),C=r(N,2),w=C[0],R=C[1],P=(0,i.useState)(e.settings.active),O=r(P,2),D=O[0],I=O[1],k=(0,i.useState)(e.settings.defaultExpireOffset),F=r(k,2),B=F[0],j=F[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],U=(0,i.useState)(e.settings.autoEnabled),W=r(U,2),Q=W[0],q=W[1],Y=(0,i.useState)(!0),z=r(Y,2),X=z[0],G=z[1],J=(0,i.useState)(""),Z=r(J,2),K=Z[0],$=Z[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],se=(0,i.useState)(e.settings.newStatus),ue=r(se,2),ce=ue[0],de=ue[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ge=B||e.settings.globalDefaultExpireOffset,ve=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===ve.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(S(!0),(0,u.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),v(n),A(a),S(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==ve.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){X&&e.onDataIsValid&&e.onDataIsValid(e.postType),!X&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[X]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var be=g.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:D||!1,label:e.text.fieldActiveLabel,onChange:function(e){I(e)}}))];D&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){q(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:w,onChange:function(e){R(e)}}),"change-status"===w&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ce,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(w)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:be,value:T,isLoading:E,onChange:function(e){A(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:B,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){j(e)}}),React.createElement(c.default,{offset:ge,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:G}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,s.applyFilters)("expirationdate_settings_posttype",he,e,D,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!X&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",K)))}},8138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],s=[],u=!0,c=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(u=(m=p.next()).done);u=!0){var f=m.value,y=a(f,2),g=y[0],v=y[1];s.push(React.createElement(r.PostTypeSettingsPanel,{legend:v.label,text:e.text,postType:g,settings:v,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[g],statusesList:e.statusesList[g],key:g+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===g}))}}catch(e){c=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw d}}var b=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,S=!0,_=!1,x=void 0;try{for(var T,A=Object.entries(e.settings)[Symbol.iterator]();!(S=(T=A.next()).done);S=!0){var N=T.value,C=a(N,2),w=C[0],R=C[1];E=i===w,h.push(React.createElement("a",{href:"#"+w+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:w+"-tab",onClick:b},R.label))}}catch(e){_=!0,x=e}finally{try{!S&&A.return&&A.return()}finally{if(_)throw x}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),s)}},2858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(1386),r=n(2214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},9005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(1386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},5786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},9892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},5681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(1386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},6772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},4438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},6301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(1386),r=n(2214),o=n(2057);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(2214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},4873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(3190),r=n(4620),o=n(1386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,s=e.onChangeDate,u=e.is12Hour,c=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:s,__nextRemoveHelpButton:!0,is12Hour:u,startOfWeek:c}))}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(1386),o=n(2214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var s=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:s,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},8225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},2057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(5442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(8418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(2864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(3571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(5437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var s=n(2094);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return s.FutureActionPanelBulkEdit}});var u=n(1620);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return u.PostTypeSettingsPanel}});var c=n(8138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return c.PostTypesSettingsPanels}});var d=n(9005);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(5786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(9892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(5681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(6772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(4438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(4311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(2858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(6301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(3948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var S=n(1013);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return S.NonceControl}});var _=n(8225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return _.TrueFalseControl}});var x=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return x.Spinner}});var T=n(5470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return T.DateOffsetPreview}})},4480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:t,s=arguments[1];switch(s.type){case"SET_ACTION":return a({},l,{action:s.action});case"SET_NEW_STATUS":return a({},l,{newStatus:s.newStatus});case"SET_DATE":return"number"!=typeof s.date&&(0,o.isNumber)(s.date)&&(s.date=parseInt(s.date)),"string"==typeof s.date&&(s.date=new Date(s.date).getTime()),s.date=(0,r.normalizeUnixTimeToSeconds)(s.date),s.date=(0,r.formatUnixTimeToTimestamp)(s.date),a({},l,{date:s.date});case"SET_ENABLED":return a({},l,{enabled:s.enabled});case"SET_TERMS":return a({},l,{terms:s.terms});case"SET_TAXONOMY":return a({},l,{taxonomy:s.taxonomy});case"SET_TERMS_LIST_BY_NAME":return a({},l,{termsListByName:s.termsListByName});case"SET_TERMS_LIST_BY_ID":return a({},l,{termsListById:s.termsListById});case"SET_TAXONOMY_NAME":return a({},l,{taxonomyName:s.taxonomyName});case"SET_CHANGE_ACTION":return a({},l,{changeAction:s.changeAction});case"SET_CALENDAR_IS_VISIBLE":return a({},l,{calendarIsVisible:s.calendarIsVisible});case"SET_HAS_VALID_DATA":return a({},l,{hasValidData:s.hasValidData});case"SET_EXTRA_DATA":return a({},l,{extraData:a({},s.extraData)});case"SET_EXTRA_DATA_BY_NAME":var u=a({},l.extraData,(e={},n=s.name,i=s.value,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e));return a({},l,{extraData:a({},u)})}return l},actions:{setAction:function(e){return{type:"SET_ACTION",action:e}},setNewStatus:function(e){return{type:"SET_NEW_STATUS",newStatus:e}},setDate:function(e){return{type:"SET_DATE",date:e}},setEnabled:function(e){return{type:"SET_ENABLED",enabled:e}},setTerms:function(e){return{type:"SET_TERMS",terms:e}},setTaxonomy:function(e){return{type:"SET_TAXONOMY",taxonomy:e}},setTermsListByName:function(e){return{type:"SET_TERMS_LIST_BY_NAME",termsListByName:e}},setTermsListById:function(e){return{type:"SET_TERMS_LIST_BY_ID",termsListById:e}},setTaxonomyName:function(e){return{type:"SET_TAXONOMY_NAME",taxonomyName:e}},setIsFetchingTerms:function(e){return{type:"SET_IS_FETCHING_TERMS",isFetchingTerms:e}},setChangeAction:function(e){return{type:"SET_CHANGE_ACTION",changeAction:e}},setCalendarIsVisible:function(e){return{type:"SET_CALENDAR_IS_VISIBLE",calendarIsVisible:e}},setHasValidData:function(e){return{type:"SET_HAS_VALID_DATA",hasValidData:e}},setExtraData:function(e){return{type:"SET_EXTRA_DATA",extraData:e}},setExtraDataByName:function(e,t){return{type:"SET_EXTRA_DATA_BY_NAME",name:e,value:t}}},selectors:{getAction:function(e){return e.action},getNewStatus:function(e){return e.newStatus},getDate:function(e){return e.date},getEnabled:function(e){return e.enabled},getTerms:function(e){return e.terms},getTaxonomy:function(e){return e.taxonomy},getTermsListByName:function(e){return e.termsListByName},getTermsListById:function(e){return e.termsListById},getTaxonomyName:function(e){return e.taxonomyName},getIsFetchingTerms:function(e){return e.isFetchingTerms},getChangeAction:function(e){return e.changeAction},getCalendarIsVisible:function(e){return e.calendarIsVisible},getHasValidData:function(e){return e.hasValidData},getExtraData:function(e){return e.extraData},getExtraDataByName:function(e,t){return e.extraData[t]||null}}});return(0,i.register)(n),n}},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},8409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(1354),r=n.n(a),o=n(6314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},1354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},5338:(e,t,n)=>{var a=n(5206);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},9922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(5072),r=n.n(a),o=n(7825),i=n.n(o),l=n(7659),s=n.n(l),u=n(5056),c=n.n(u),d=n(540),m=n.n(d),p=n(1113),f=n.n(p),y=n(1461),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=m(),r()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0},5072:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5206:e=>{e.exports=ReactDOM},3047:e=>{e.exports=publishpressFutureQuickEditConfig},8643:e=>{e.exports=window},3244:e=>{e.exports=wp},2214:e=>{e.exports=wp.components},7562:e=>{e.exports=wp.data},1386:e=>{e.exports=wp.element},8566:e=>{e.exports=wp.hooks},9986:e=>{e.exports=wp.plugins},4011:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=n(2057),r=n(4480),o=n(8409),i=n(5338),l=n(7562),s=n(8643),u=n(3047),c="publishpress-future/future-action-quick-edit",d=s.inlineEditPost.edit,m=s.inlineEditPost.revert;s.inlineEditPost.edit=function(e,t){d.apply(this,arguments);var n=function(e){return"string"==typeof e||"number"==typeof e?e:e.closest("tr").id.split("-")[1]}(e),p=(0,o.getActionSettingsFromColumnData)(n);if(p){var f=p.enabled,y=p.action,g=p.date,v=p.taxonomy,b=p.newStatus,h=p.terms;"string"==typeof h&&(h=h.split(",")),(0,l.select)(c)?((0,l.dispatch)(c).setEnabled(f),(0,l.dispatch)(c).setAction(y),(0,l.dispatch)(c).setDate(g),(0,l.dispatch)(c).setTaxonomy(v),(0,l.dispatch)(c).setTerms(h),(0,l.dispatch)(c).setNewStatus(b)):(0,r.createStore)({name:c,defaultState:{autoEnable:f,action:y,date:g,taxonomy:v,terms:h,newStatus:b}});var E=document.getElementById("publishpress-future-quick-edit");if(E){var S=(0,i.createRoot)(E),_=document.querySelector(".inline-edit-save .save");_&&(_.onclick=function(){setTimeout((function(){S.unmount()}),1e3)});var x=React.createElement(a.FutureActionPanelQuickEdit,{storeName:c,postType:u.postType,isNewPost:u.isNewPost,actionsSelectOptions:u.actionsSelectOptions,statusesSelectOptions:u.statusesSelectOptions,is12Hour:u.is12Hour,timeFormat:u.timeFormat,startOfWeek:u.startOfWeek,strings:u.strings,taxonomyName:u.taxonomyName,nonce:u.nonce,hideCalendarByDefault:u.hideCalendarByDefault});S.render(x),s.inlineEditPost.revert=function(){S.unmount(),m.apply(this,arguments)}}}}})(); //# sourceMappingURL=quick-edit.js.map \ No newline at end of file diff --git a/assets/js/quick-edit.js.map b/assets/js/quick-edit.js.map index a74498af8..cf796b5e1 100644 --- a/assets/js/quick-edit.js.map +++ b/assets/js/quick-edit.js.map @@ -1 +1 @@ -{"version":3,"file":"quick-edit.js","mappings":"uFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB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KACP,IAAA8Y,UAAS9Y,GAAW4B,WAAWxB,IAC/B,IAAA0Y,UAAS9Y,GAAW0B,UAAU5B,IAC9B,IAAAgZ,UAAS9Y,GAAW2B,QAAQzB,IAC5B,IAAA4Y,UAAS9Y,GAAW8B,YAAYtB,IAChC,IAAAsY,UAAS9Y,GAAW6B,SAASvB,IAC7B,IAAAwY,UAAS9Y,GAAWqC,aAAaf,KAEjC,IAAAqS,aAAY,CACRzV,KAAM8B,EACN4T,aAAc,CACVtK,WAAYlJ,EACZN,OAAQA,EACRI,KAAMA,EACNM,SAAUA,EACVF,MAAOA,EACPgB,UAAWA,KAKvB,IAAMyX,EAAY/N,SAASgO,eAAe,kCAC1C,GAAKD,EAAL,CAGA,IAAME,GAAO,IAAAC,YAAWH,GAElBI,EAAanO,SAASyH,cAAc,2BACtC0G,IACAA,EAAWC,QAAU,WACjBC,YAAW,WACPJ,EAAKK,SACR,GAhFqB,IAiFzB,GAGL,IAAMC,EACF,oBAAC,EAAAlO,2BAAD,CACIrL,UAAWA,EACXuJ,SAAUA,EAAAA,SACVoB,UAAWA,EAAAA,UACXhG,qBAAsBA,EAAAA,qBACtB2C,sBAAuBA,EAAAA,sBACvB9I,SAAUA,EAAAA,SACVkG,WAAYA,EAAAA,WACZjG,YAAaA,EAAAA,YACbkH,QAASA,EAAAA,QACTjF,aAAcA,EAAAA,aACdmK,MAAOA,EAAAA,QAIfoO,EAAKO,OAAOD,GAEZnB,EAAAA,eAAeG,OAAS,WACpBU,EAAKK,UAGLhB,EAAmBG,MAAMC,KAAMC,UAClC,CAnCA,CAvCA,CA2EJ,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/external var \"publishpressFutureQuickEditConfig\"","webpack://post-expirator/external var \"window\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/./assets/jsx/quick-edit.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []);\n const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []);\n const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []);\n const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []);\n const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1');\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsFieldset,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState, Fragment, useRef } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\n\nconst { PanelRow, BaseControl } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(false);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n const apiRequestControllerRef = useRef(new AbortController());\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n const validateData = () => {\n if (! isActive) {\n setValidationError('');\n return true;\n }\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidation(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidation(false);\n\n setHasValidData(result.isValid);\n setValidationError(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidation(false);\n setHasValidData(false);\n setValidationError(error.message);\n setOffsetPreview('');\n });\n }\n\n setValidationError('');\n return true;\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n setHasValidData(validateData());\n }, [isActive, expireOffset]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n {offsetPreview && (\n \n

{props.text.datePreview}

\n
\n
\n {props.text.datePreviewCurrent}: \n {currentTime}\n
\n
\n {props.text.datePreviewComputed}: \n {offsetPreview}\n
\n
\n
\n )}\n
\n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n return (\n \n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\n\nexport const PostTypesSettingsPanels = function (props) {\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n return (panels);\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","module.exports = publishpressFutureQuickEditConfig;","module.exports = window;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { FutureActionPanelQuickEdit } from './components';\nimport { createStore } from './data';\nimport { getActionSettingsFromColumnData } from './utils';\nimport { createRoot } from '@wordpress/element';\nimport { select, dispatch } from '@wordpress/data';\nimport { inlineEditPost } from \"&window\";\nimport {\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n nonce,\n statusesSelectOptions\n} from \"&config.quick-edit\";\n\nconst storeName = 'publishpress-future/future-action-quick-edit';\nconst delayToUnmountAfterSaving = 1000;\n\n// We create a copy of the WP inline edit post function\nconst wpInlineEdit = inlineEditPost.edit;\nconst wpInlineEditRevert = inlineEditPost.revert;\n\nconst getPostIdFromButton = (id) => {\n // If id is a string or a number, return it directly\n if (typeof id === 'string' || typeof id === 'number') {\n return id;\n }\n\n // Otherwise, assume it's an HTML element and extract the post ID\n const trElement = id.closest('tr');\n const trId = trElement.id;\n const postId = trId.split('-')[1];\n\n return postId;\n}\n\n/**\n * We override the function with our own code so we can detect when\n * the inline edit row is displayed to recreate the React component.\n */\ninlineEditPost.edit = function (button, id) {\n // Call the original WP edit function.\n wpInlineEdit.apply(this, arguments);\n\n const postId = getPostIdFromButton(button);\n const data = getActionSettingsFromColumnData(postId);\n\n if (!data) {\n return;\n }\n\n const enabled = data.enabled;\n const action = data.action;\n const date = data.date;\n const taxonomy = data.taxonomy;\n const newStatus = data.newStatus;\n\n let terms = data.terms;\n\n if (typeof terms === 'string'){\n terms = terms.split(',');\n }\n\n // if store exists, update the state. Otherwise, create it.\n if (select(storeName)) {\n dispatch(storeName).setEnabled(enabled);\n dispatch(storeName).setAction(action);\n dispatch(storeName).setDate(date);\n dispatch(storeName).setTaxonomy(taxonomy);\n dispatch(storeName).setTerms(terms);\n dispatch(storeName).setNewStatus(newStatus);\n } else {\n createStore({\n name: storeName,\n defaultState: {\n autoEnable: enabled,\n action: action,\n date: date,\n taxonomy: taxonomy,\n terms: terms,\n newStatus: newStatus,\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-quick-edit\");\n if (!container) {\n return;\n }\n const root = createRoot(container);\n\n const saveButton = document.querySelector('.inline-edit-save .save');\n if (saveButton) {\n saveButton.onclick = function() {\n setTimeout(() => {\n root.unmount();\n }, delayToUnmountAfterSaving);\n };\n }\n\n const component = (\n \n );\n\n root.render(component);\n\n inlineEditPost.revert = function () {\n root.unmount();\n\n // Call the original WP revert function.\n wpInlineEditRevert.apply(this, arguments);\n };\n};\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","useEffect","decodeEntities","htmlEntities","addQueryArgs","url","data","useSelect","useDispatch","apiFetch","FutureActionPanel","action","select","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","path","then","result","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","offset","globalDefaultExpireOffset","controller","current","abort","signal","method","isValid","message","preview","catch","error","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","SettingsFieldset","legend","SettingsTable","bodyChildren","PostTypesSettingsPanels","panels","postTypeSettings","valign","htmlFor","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","onClick","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","module","exports","publishpressFutureQuickEditConfig","window","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","wpInlineEdit","inlineEditPost","edit","wpInlineEditRevert","revert","button","apply","this","arguments","closest","getPostIdFromButton","dispatch","container","getElementById","root","createRoot","saveButton","onclick","setTimeout","unmount","component","render"],"sourceRoot":""} +{"version":3,"file":"quick-edit.js","mappings":"wFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,+FCPD,UACA,UAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ,SAAD,KACI,oBAAC,kBAAD,CACIC,MAAOZ,EAAMY,MACbC,KAAMb,EAAMa,KACZC,GAAId,EAAMa,KACVL,UAAWR,EAAMQ,UACjBH,QAASA,IAAW,EACpBU,SAhBK,SAAUC,GACvBV,EAAWU,GAEPhB,EAAMe,UACNf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+G,UAClC,CApCA,CAvCA,CA4EJ,C","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/data.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./node_modules/react-dom/client.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureQuickEditConfig\"","webpack://post-expirator/external var \"window\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/quick-edit.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","import { formatUnixTimeToTimestamp, getCurrentTimeAsTimestamp, normalizeUnixTimeToSeconds } from './time';\nimport { isNumber } from './utils';\nimport { register, createReduxStore } from '@wordpress/data';\n\nexport const createStore = (props) => {\n if (props.defaultState.terms && typeof props.defaultState.terms === 'string') {\n props.defaultState.terms = props.defaultState.terms.split(',').map(term => parseInt(term));\n }\n\n let defaultState = {\n action: props.defaultState.action,\n date: props.defaultState.date ? props.defaultState.date : getCurrentTimeAsTimestamp(),\n enabled: props.defaultState.autoEnable,\n terms: props.defaultState.terms ? props.defaultState.terms : [],\n taxonomy: props.defaultState.taxonomy ? props.defaultState.taxonomy : null,\n newStatus: props.defaultState.newStatus ? props.defaultState.newStatus : 'draft',\n termsListByName: null,\n termsListById: null,\n taxonomyName: null,\n isFetchingTerms: false,\n changeAction: 'no-change',\n calendarIsVisible: true,\n hasValidData: true,\n extraData: props.defaultState.extraData ? props.defaultState.extraData : {},\n }\n\n const store = createReduxStore(props.name, {\n reducer(state = defaultState, action) {\n switch (action.type) {\n case 'SET_ACTION':\n return {\n ...state,\n action: action.action,\n };\n case 'SET_NEW_STATUS':\n return {\n ...state,\n newStatus: action.newStatus,\n };\n case 'SET_DATE':\n // Make sure the date is a number, if it is a string with only numbers\n if (typeof action.date !== 'number' && isNumber(action.date)) {\n action.date = parseInt(action.date);\n }\n\n // If string, convert to unix time\n if (typeof action.date === 'string') {\n action.date = new Date(action.date).getTime();\n }\n\n // Make sure the time is always in seconds\n action.date = normalizeUnixTimeToSeconds(action.date);\n\n // Convert to formated string format, considering it is in the site's timezone\n action.date = formatUnixTimeToTimestamp(action.date);\n\n return {\n ...state,\n date: action.date,\n }\n case 'SET_ENABLED':\n return {\n ...state,\n enabled: action.enabled,\n }\n case 'SET_TERMS':\n return {\n ...state,\n terms: action.terms,\n }\n case 'SET_TAXONOMY':\n return {\n ...state,\n taxonomy: action.taxonomy,\n }\n case 'SET_TERMS_LIST_BY_NAME':\n return {\n ...state,\n termsListByName: action.termsListByName,\n }\n case 'SET_TERMS_LIST_BY_ID':\n return {\n ...state,\n termsListById: action.termsListById,\n }\n case 'SET_TAXONOMY_NAME':\n return {\n ...state,\n taxonomyName: action.taxonomyName,\n }\n case 'SET_CHANGE_ACTION':\n return {\n ...state,\n changeAction: action.changeAction,\n }\n case 'SET_CALENDAR_IS_VISIBLE':\n return {\n ...state,\n calendarIsVisible: action.calendarIsVisible,\n }\n case 'SET_HAS_VALID_DATA':\n return {\n ...state,\n hasValidData: action.hasValidData,\n }\n\n case 'SET_EXTRA_DATA':\n return {\n ...state,\n extraData: {\n ...action.extraData,\n }\n }\n\n case 'SET_EXTRA_DATA_BY_NAME':\n const extraData = {\n ...state.extraData,\n [action.name]: action.value\n };\n\n return {\n ...state,\n extraData: {...extraData}\n }\n }\n\n return state;\n },\n actions: {\n setAction(action) {\n return {\n type: 'SET_ACTION',\n action: action\n };\n },\n setNewStatus(newStatus) {\n return {\n type: 'SET_NEW_STATUS',\n newStatus: newStatus\n };\n },\n setDate(date) {\n return {\n type: 'SET_DATE',\n date: date\n };\n },\n setEnabled(enabled) {\n return {\n type: 'SET_ENABLED',\n enabled: enabled\n };\n },\n setTerms(terms) {\n return {\n type: 'SET_TERMS',\n terms: terms\n };\n },\n setTaxonomy(taxonomy) {\n return {\n type: 'SET_TAXONOMY',\n taxonomy: taxonomy\n };\n },\n setTermsListByName(termsListByName) {\n return {\n type: 'SET_TERMS_LIST_BY_NAME',\n termsListByName: termsListByName\n };\n },\n setTermsListById(termsListById) {\n return {\n type: 'SET_TERMS_LIST_BY_ID',\n termsListById: termsListById\n };\n },\n setTaxonomyName(taxonomyName) {\n return {\n type: 'SET_TAXONOMY_NAME',\n taxonomyName: taxonomyName\n };\n },\n setIsFetchingTerms(isFetchingTerms) {\n return {\n type: 'SET_IS_FETCHING_TERMS',\n isFetchingTerms: isFetchingTerms\n }\n },\n setChangeAction(changeAction) {\n return {\n type: 'SET_CHANGE_ACTION',\n changeAction: changeAction\n }\n },\n setCalendarIsVisible(calendarIsVisible) {\n return {\n type: 'SET_CALENDAR_IS_VISIBLE',\n calendarIsVisible: calendarIsVisible\n }\n },\n setHasValidData(hasValidData) {\n return {\n type: 'SET_HAS_VALID_DATA',\n hasValidData: hasValidData\n }\n },\n setExtraData(extraData) {\n return {\n type: 'SET_EXTRA_DATA',\n extraData: extraData\n }\n },\n setExtraDataByName(name, value) {\n return {\n type: 'SET_EXTRA_DATA_BY_NAME',\n name: name,\n value: value\n }\n }\n },\n selectors: {\n getAction(state) {\n return state.action;\n },\n getNewStatus(state) {\n return state.newStatus;\n },\n getDate(state) {\n return state.date;\n },\n getEnabled(state) {\n return state.enabled;\n },\n getTerms(state) {\n return state.terms;\n },\n getTaxonomy(state) {\n return state.taxonomy;\n },\n getTermsListByName(state) {\n return state.termsListByName;\n },\n getTermsListById(state) {\n return state.termsListById;\n },\n getTaxonomyName(state) {\n return state.taxonomyName;\n },\n getIsFetchingTerms(state) {\n return state.isFetchingTerms;\n },\n getChangeAction(state) {\n return state.changeAction;\n },\n getCalendarIsVisible(state) {\n return state.calendarIsVisible;\n },\n getHasValidData(state) {\n return state.hasValidData;\n },\n getExtraData(state) {\n return state.extraData;\n },\n getExtraDataByName(state, name) {\n return state.extraData[name] || null;\n }\n }\n });\n\n register(store);\n\n return store;\n}\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = ReactDOM;","module.exports = publishpressFutureQuickEditConfig;","module.exports = window;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import { FutureActionPanelQuickEdit } from './components';\nimport { createStore } from './data';\nimport { getActionSettingsFromColumnData } from './utils';\nimport { createRoot } from 'react-dom/client';\nimport { select, dispatch } from '@wordpress/data';\nimport { inlineEditPost } from \"&window\";\nimport {\n postType,\n isNewPost,\n actionsSelectOptions,\n is12Hour,\n timeFormat,\n startOfWeek,\n strings,\n taxonomyName,\n nonce,\n statusesSelectOptions,\n hideCalendarByDefault\n} from \"&config.quick-edit\";\n\nconst storeName = 'publishpress-future/future-action-quick-edit';\nconst delayToUnmountAfterSaving = 1000;\n\n// We create a copy of the WP inline edit post function\nconst wpInlineEdit = inlineEditPost.edit;\nconst wpInlineEditRevert = inlineEditPost.revert;\n\nconst getPostIdFromButton = (id) => {\n // If id is a string or a number, return it directly\n if (typeof id === 'string' || typeof id === 'number') {\n return id;\n }\n\n // Otherwise, assume it's an HTML element and extract the post ID\n const trElement = id.closest('tr');\n const trId = trElement.id;\n const postId = trId.split('-')[1];\n\n return postId;\n}\n\n/**\n * We override the function with our own code so we can detect when\n * the inline edit row is displayed to recreate the React component.\n */\ninlineEditPost.edit = function (button, id) {\n // Call the original WP edit function.\n wpInlineEdit.apply(this, arguments);\n\n const postId = getPostIdFromButton(button);\n const data = getActionSettingsFromColumnData(postId);\n\n if (!data) {\n return;\n }\n\n const enabled = data.enabled;\n const action = data.action;\n const date = data.date;\n const taxonomy = data.taxonomy;\n const newStatus = data.newStatus;\n\n let terms = data.terms;\n\n if (typeof terms === 'string'){\n terms = terms.split(',');\n }\n\n // if store exists, update the state. Otherwise, create it.\n if (select(storeName)) {\n dispatch(storeName).setEnabled(enabled);\n dispatch(storeName).setAction(action);\n dispatch(storeName).setDate(date);\n dispatch(storeName).setTaxonomy(taxonomy);\n dispatch(storeName).setTerms(terms);\n dispatch(storeName).setNewStatus(newStatus);\n } else {\n createStore({\n name: storeName,\n defaultState: {\n autoEnable: enabled,\n action: action,\n date: date,\n taxonomy: taxonomy,\n terms: terms,\n newStatus: newStatus,\n }\n });\n }\n\n const container = document.getElementById(\"publishpress-future-quick-edit\");\n if (!container) {\n return;\n }\n const root = createRoot(container);\n\n const saveButton = document.querySelector('.inline-edit-save .save');\n if (saveButton) {\n saveButton.onclick = function() {\n setTimeout(() => {\n root.unmount();\n }, delayToUnmountAfterSaving);\n };\n }\n\n const component = (\n \n );\n\n root.render(component);\n\n inlineEditPost.revert = function () {\n root.unmount();\n\n // Call the original WP revert function.\n wpInlineEditRevert.apply(this, arguments);\n };\n};\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","createStore","defaultState","getCurrentTimeAsTimestamp","extraData","createReduxStore","reducer","state","isNumber","getTime","normalizeUnixTimeToSeconds","formatUnixTimeToTimestamp","actions","setExtraData","setExtraDataByName","selectors","getExtraDataByName","register","getCurrentTimeInSeconds","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","m","createRoot","hydrateRoot","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","ReactDOM","publishpressFutureQuickEditConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","wpInlineEdit","inlineEditPost","edit","wpInlineEditRevert","revert","button","arguments","closest","getPostIdFromButton","dispatch","container","getElementById","root","saveButton","onclick","setTimeout","unmount","component","render"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/js/settings-general.js b/assets/js/settings-general.js new file mode 100644 index 000000000..27c914ac9 --- /dev/null +++ b/assets/js/settings-general.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var e={5442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},4311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(1386),r=n(2214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},5470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(1386),o=n(4011),i=n(3244);n(9922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,c=e.labelOffsetPreview,s=e.setValidationErrorCallback,u=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),v=y[0],b=y[1],g=(0,r.useState)(),h=a(g,2),E=h[0],x=h[1],S=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=S.current;e&&e.abort(),S.current=new AbortController;var n=S.current.signal;u(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){u(!1),d(e.isValid),s(e.message),e.isValid?(b(e.preview),x(e.currentTime)):b("")})).catch((function(e){"AbortError"!==e.name&&(u(!1),d(!1),s(e.message),b(""))}))}}()}),[t]);var _=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+_},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},c,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},v)))))};t.default=l},4620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(7039),r=n(2214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},8418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(8409),i=n(4873),l=n(9986),c=n(2214),s=n(1442),u=n(6625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,v=d.Spinner,b=d.BaseControl,g=wp.element,h=g.Fragment,E=g.useEffect,x=g.useState,S=wp.htmlEntities.decodeEntities,_=wp.url.addQueryArgs,A=wp.data,C=A.useSelect,w=A.useDispatch,R=wp.apiFetch;t.FutureActionPanel=function(e){var t=C((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,g=t.enabled,A=t.terms,N=t.taxonomy,T=t.taxonomyName,P=t.termsListByName,O=t.termsListById,k=t.isFetchingTerms,F=t.calendarIsVisible,D=t.hasValidData,I=t.newStatus,j=x(""),B=r(j,2),M=B[0],V=B[1],L=w(e.storeName),H=L.setAction,Q=L.setDate,U=L.setEnabled,W=L.setTerms,q=L.setTaxonomy,z=L.setTermsListByName,Y=L.setTermsListById,G=L.setTaxonomyName,J=L.setIsFetchingTerms,Z=L.setCalendarIsVisible,K=L.setHasValidData,X=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:N},O[e]=e,z(P),Y(O),W([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(A)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=F?"future-action-panel":"future-action-panel hidden-calendar",ce=F?"future-action-panel-content":"future-action-panel-content hidden-calendar",se=F?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ue=e.actionsSelectOptions;e.taxonomy||(ue=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,c=void 0;try{for(var s,u=a[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var d=s.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,c=e}finally{try{!i&&u.return&&u.return()}finally{if(l)throw c}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=T;switch(n){case"category":pe=e.strings.newTerms.replace("%s",T);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",T);break;case"category-add":pe=e.strings.addTerms.replace("%s",T)}return E((function(){if(!g)return K(!0),void V("");K(function(){var t=!0;if(!g)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,c=i("core/editor").getEditedPostAttribute("publishpress_future_action"),s=o("core/editor"),u=s.lockPostSaving,d=s.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:c.enabled,calendarIsVisible:!0,action:c.action,newStatus:c.newStatus,date:c.date,terms:c.terms,taxonomy:c.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,c=Object.entries(e)[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var s=i.value,u=a(s,2),d=u[0],m=u[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&c.return&&c.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){u("future-action")}})))}},2094:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(8409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,c=wp.element.useEffect,s=n((function(t){return t(e.storeName).getDate()}),[]),u=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),v=n((function(t){return t(e.storeName).getHasValidData()}),[]),b=i(e.storeName).setChangeAction,g=p;"object"===(void 0===p?"undefined":a(p))&&(g=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return c((function(){v||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[v,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){b(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:s,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:u?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:s}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:g}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},3571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(2057),r=n(7562);n(1386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},5437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(7562);n(1386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),c=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),s=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),u=l;return"object"===(void 0===l?"undefined":a(l))&&(u=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:s,date:t,terms:l,taxonomy:c,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(1386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},1620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(2057),i=n(1386),l=n(4011),c=n(8566),s=n(3244),u=(a=n(5470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),v=y[0],b=y[1],g=(0,i.useState)(!1),h=r(g,2),E=h[0],x=h[1],S=(0,i.useState)([]),_=r(S,2),A=_[0],C=_[1],w=(0,i.useState)(e.settings.howToExpire),R=r(w,2),N=R[0],T=R[1],P=(0,i.useState)(e.settings.active),O=r(P,2),k=O[0],F=O[1],D=(0,i.useState)(e.settings.defaultExpireOffset),I=r(D,2),j=I[0],B=I[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],Q=(0,i.useState)(e.settings.autoEnabled),U=r(Q,2),W=U[0],q=U[1],z=(0,i.useState)(!0),Y=r(z,2),G=Y[0],J=Y[1],Z=(0,i.useState)(""),K=r(Z,2),X=K[0],$=K[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],ce=(0,i.useState)(e.settings.newStatus),se=r(ce,2),ue=se[0],de=se[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ve=j||e.settings.globalDefaultExpireOffset,be=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===be.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(x(!0),(0,s.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),b(n),C(a),x(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==be.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){G&&e.onDataIsValid&&e.onDataIsValid(e.postType),!G&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[G]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var ge=v.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:k||!1,label:e.text.fieldActiveLabel,onChange:function(e){F(e)}}))];k&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:W||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){q(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:N,onChange:function(e){T(e)}}),"change-status"===N&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ue,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(N)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:ge,value:A,isLoading:E,onChange:function(e){C(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:j,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){B(e)}}),React.createElement(u.default,{offset:ve,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:J}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,c.applyFilters)("expirationdate_settings_posttype",he,e,k,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!G&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",X)))}},8138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],c=[],s=!0,u=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(s=(m=p.next()).done);s=!0){var f=m.value,y=a(f,2),v=y[0],b=y[1];c.push(React.createElement(r.PostTypeSettingsPanel,{legend:b.label,text:e.text,postType:v,settings:b,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[v],statusesList:e.statusesList[v],key:v+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===v}))}}catch(e){u=!0,d=e}finally{try{!s&&p.return&&p.return()}finally{if(u)throw d}}var g=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,x=!0,S=!1,_=void 0;try{for(var A,C=Object.entries(e.settings)[Symbol.iterator]();!(x=(A=C.next()).done);x=!0){var w=A.value,R=a(w,2),N=R[0],T=R[1];E=i===N,h.push(React.createElement("a",{href:"#"+N+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:N+"-tab",onClick:g},T.label))}}catch(e){S=!0,_=e}finally{try{!x&&C.return&&C.return()}finally{if(S)throw _}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),c)}},2858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(1386),r=n(2214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},9005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(1386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},5786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},9892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},5681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(1386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},6772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},4438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},6301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(1386),r=n(2214),o=n(2057);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(2214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},4873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(3190),r=n(4620),o=n(1386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,c=e.onChangeDate,s=e.is12Hour,u=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:c,__nextRemoveHelpButton:!0,is12Hour:s,startOfWeek:u}))}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(1386),o=n(2214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var c=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:c,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},8225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},2057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(5442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(8418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(2864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(3571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(5437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var c=n(2094);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return c.FutureActionPanelBulkEdit}});var s=n(1620);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return s.PostTypeSettingsPanel}});var u=n(8138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return u.PostTypesSettingsPanels}});var d=n(9005);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(5786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(9892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(5681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(6772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var v=n(4438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return v.SubmitButton}});var b=n(4311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return b.CheckboxControl}});var g=n(2858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return g.SelectControl}});var h=n(6301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(3948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var x=n(1013);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return x.NonceControl}});var S=n(8225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return S.TrueFalseControl}});var _=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return _.Spinner}});var A=n(5470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return A.DateOffsetPreview}})},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},8409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(1354),r=n.n(a),o=n(6314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},1354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},5338:(e,t,n)=>{var a=n(5206);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},9922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var a=n(5072),r=n.n(a),o=n(7825),i=n.n(o),l=n(7659),c=n.n(l),s=n(5056),u=n.n(s),d=n(540),m=n.n(d),p=n(1113),f=n.n(p),y=n(1461),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=m(),r()(y.A,v);const b=y.A&&y.A.locals?y.A.locals:void 0},5072:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5206:e=>{e.exports=ReactDOM},6319:e=>{e.exports=publishpressFutureSettingsGeneralConfig},3244:e=>{e.exports=wp},2214:e=>{e.exports=wp.components},7562:e=>{e.exports=wp.data},1386:e=>{e.exports=wp.element},8566:e=>{e.exports=wp.hooks},9986:e=>{e.exports=wp.plugins},4011:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386),i=n(5338),l=n(6319),c=document.getElementById("expiration-date-preview"),s=React.createElement((function(e){var t=(0,o.useState)(!0),n=a(t,2),i=n[0],c=n[1],s=(0,o.useState)(""),u=a(s,2),d=u[0],m=u[1],p=(0,o.useState)(!1),f=a(p,2),y=(f[0],f[1]),v=(0,o.useState)(""),b=a(v,2),g=b[0],h=b[1];return(0,o.useEffect)((function(){jQuery("#expired-custom-expiration-date").on("keyup",(function(){h(jQuery(this).val())})),h(jQuery("#expired-custom-expiration-date").val())}),[]),React.createElement(o.StrictMode,null,React.createElement(r.DateOffsetPreview,{offset:g,label:l.text.datePreview,labelDatePreview:l.text.datePreviewCurrent,labelOffsetPreview:l.text.datePreviewComputed,setValidationErrorCallback:function(e){e?(c(!1),m(e)):(c(!0),m(""))},setHasPendingValidationCallback:function(e){y(e)},setHasValidDataCallback:function(e){y(!1),c(e)}}),!i&&d&&React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("p",null,l.text.error,": ",d)))}),null);(0,i.createRoot)(c).render(s)})(); +//# sourceMappingURL=settings-general.js.map \ No newline at end of file diff --git a/assets/js/settings-general.js.map b/assets/js/settings-general.js.map new file mode 100644 index 000000000..190a11cc7 --- /dev/null +++ b/assets/js/settings-general.js.map @@ -0,0 +1 @@ +{"version":3,"file":"settings-general.js","mappings":"wFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,+FCPD,UACA,UAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ,SAAD,KACI,oBAAC,kBAAD,CACIC,MAAOZ,EAAMY,MACbC,KAAMb,EAAMa,KACZC,GAAId,EAAMa,KACVL,UAAWR,EAAMQ,UACjBH,QAASA,IAAW,EACpBU,SAhBK,SAAUC,GACvBV,EAAWU,GAEPhB,EAAMe,UACNf,EAAMe,SAASC,EAEtB,IAaQb,EAGZ,C,+eCxCD,UAMA,UACA,UAEAc,EAAQ,MAED,IAAMC,EAAoBA,EAAAA,kBAAA,SAAC,GAS5B,I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oQ,EAC3B,EAwBW1gB,wBAtBiB,SAACqB,GAC1BiP,GAAwB,GACxB8P,EAAe/e,EAClB,KAsBU8e,GAAezb,GACd,2BAAK1F,UAAU,+DACX,6BAAIoS,EAAAA,KAAK3P,MAAT,KAAkBiD,IAKrC,GAGkB,OAEnB,IAAAoW,YAAWkF,GAAWW,OAAOT,E","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./node_modules/react-dom/client.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureSettingsGeneralConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/settings-general.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = ReactDOM;","module.exports = publishpressFutureSettingsGeneralConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { DateOffsetPreview } from \"./components\";\n\nimport {\n StrictMode,\n useState,\n useEffect\n} from \"@wordpress/element\";\n\nimport { createRoot } from 'react-dom/client';\n\nimport {\n text,\n} from \"&config.settings-general\";\n\nconst SettingsFormPanel = (props) => {\n const [isValidForm, setIsValidForm] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offset, setOffset] = useState('');\n\n const onHasValidationError = (errorMessage) => {\n if (errorMessage) {\n setIsValidForm(false);\n setValidationError(errorMessage);\n } else {\n setIsValidForm(true);\n setValidationError('');\n }\n }\n\n const onValidationStarted = (inProgress) => {\n setHasPendingValidation(inProgress);\n }\n\n const onValidationFinished = (isValid) => {\n setHasPendingValidation(false);\n setIsValidForm(isValid);\n }\n\n useEffect(() => {\n jQuery('#expired-custom-expiration-date').on('keyup', function () {\n setOffset(jQuery(this).val());\n });\n\n setOffset(jQuery('#expired-custom-expiration-date').val());\n }, []);\n\n return (\n \n \n\n {! isValidForm && validationError && (\n
\n

{text.error}: {validationError}

\n
\n )}\n
\n )\n};\n\nconst container = document.getElementById(\"expiration-date-preview\");\nconst component = ();\n\ncreateRoot(container).render(component);\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","getCurrentTimeInSeconds","normalizeUnixTimeToSeconds","getTime","formatUnixTimeToTimestamp","getCurrentTimeAsTimestamp","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNumber","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","m","createRoot","hydrateRoot","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","ReactDOM","publishpressFutureSettingsGeneralConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","container","getElementById","component","isValidForm","setIsValidForm","setOffset","on","val","StrictMode","errorMessage","inProgress","render"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/js/settings-post-types.js b/assets/js/settings-post-types.js index c1a8cf837..2f62bb76e 100644 --- a/assets/js/settings-post-types.js +++ b/assets/js/settings-post-types.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(386),r=n(214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(39),r=n(214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(409),i=n(873),l=n(986),c=n(214),u=n(61),s=n(625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,g=d.Spinner,v=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,S=b.useState,x=wp.htmlEntities.decodeEntities,_=wp.url.addQueryArgs,R=wp.data,T=R.useSelect,N=R.useDispatch,P=wp.apiFetch;t.FutureActionPanel=function(e){var t=T((function(t){return t(e.storeName).getAction()}),[]),n=T((function(t){return t(e.storeName).getDate()}),[]),d=T((function(t){return t(e.storeName).getEnabled()}),[]),b=T((function(t){return t(e.storeName).getTerms()}),[]),R=T((function(t){return t(e.storeName).getTaxonomy()}),[]),C=T((function(t){return t(e.storeName).getTaxonomyName()}),[]),w=T((function(t){return t(e.storeName).getTermsListByName()}),[]),O=T((function(t){return t(e.storeName).getTermsListById()}),[]),F=T((function(t){return t(e.storeName).getIsFetchingTerms()}),[]),A=T((function(t){return t(e.storeName).getCalendarIsVisible()}),[]),k=T((function(t){return t(e.storeName).getHasValidData()}),[]),D=T((function(t){return t(e.storeName).getNewStatus()}),[]),j=S(""),I=r(j,2),B=I[0],M=I[1],V=N(e.storeName),L=V.setAction,H=V.setDate,W=V.setEnabled,Q=V.setTerms,U=V.setTaxonomy,q=V.setTermsListByName,z=V.setTermsListById,G=V.setTaxonomyName,Y=V.setIsFetchingTerms,J=V.setCalendarIsVisible,K=V.setHasValidData,X=V.setNewStatus,Z=function(e){w[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:R},O[e]=e,q(w),z(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(ae=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(b)),"string"==typeof ae&&(ae=[]));var re=[];"object"===(void 0===w?"undefined":a(w))&&null!==w&&(re=Object.keys(w));var oe,ie=A?"future-action-panel":"future-action-panel hidden-calendar",le=A?"future-action-panel-content":"future-action-panel-content hidden-calendar",ce=A?"future-action-date-panel":"future-action-date-panel hidden-calendar";oe="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ue=e.actionsSelectOptions;e.taxonomy||(ue=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var se=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,c=void 0;try{for(var u,s=a[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var d=u.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,c=e}finally{try{!i&&s.return&&s.return()}finally{if(l)throw c}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),de=String(t).includes("category")&&"category-remove-all"!==t,me=C;switch(t){case"category":me=e.strings.newTerms.replace("%s",C);break;case"category-remove":me=e.strings.removeTerms.replace("%s",C);break;case"category-add":me=e.strings.addTerms.replace("%s",C)}return E((function(){if(!d)return K(!0),void M("");K(function(){var a=!0;if(!d)return M(""),!0;t||(M(e.strings.errorActionRequired),a=!1),n||(M(e.strings.errorDateRequired),a=!1),n&&new Date(n){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,c=i("core/editor").getEditedPostAttribute("publishpress_future_action"),u=o("core/editor"),s=u.lockPostSaving,d=u.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:c.enabled,calendarIsVisible:!0,action:c.action,newStatus:c.newStatus,date:c.date,terms:c.terms,taxonomy:c.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,c=Object.entries(e)[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var u=i.value,s=a(u,2),d=s[0],m=s[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&c.return&&c.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},onDataIsInvalid:function(){s("future-action")}})))}},94:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,c=wp.element.useEffect,u=n((function(t){return t(e.storeName).getDate()}),[]),s=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),g=n((function(t){return t(e.storeName).getHasValidData()}),[]),v=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return c((function(){g||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[g,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){v(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:u,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:s?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:u}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(57),r=n(562);n(386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(57),o=n(562);n(386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),c=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),u=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),s=l;return"object"===(void 0===l?"undefined":a(l))&&(s=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:u,date:t,terms:l,taxonomy:c,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57),o=n(386),i=n(11),l=n(566),c=n(244),u=wp.components,s=u.PanelRow;u.BaseControl,t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,o.useState)(e.settings.taxonomy),u=a(n,2),d=u[0],m=u[1],p=(0,o.useState)([]),f=a(p,2),y=f[0],g=f[1],v=(0,o.useState)(!1),b=a(v,2),h=b[0],E=b[1],S=(0,o.useState)([]),x=a(S,2),_=x[0],R=x[1],T=(0,o.useState)(e.settings.howToExpire),N=a(T,2),P=N[0],C=N[1],w=(0,o.useState)(e.settings.active),O=a(w,2),F=O[0],A=O[1],k=(0,o.useState)(e.settings.defaultExpireOffset),D=a(k,2),j=D[0],I=D[1],B=(0,o.useState)(e.settings.emailNotification),M=a(B,2),V=M[0],L=M[1],H=(0,o.useState)(e.settings.autoEnabled),W=a(H,2),Q=W[0],U=W[1],q=(0,o.useState)(!1),z=a(q,2),G=z[0],Y=z[1],J=(0,o.useState)(""),K=a(J,2),X=K[0],Z=K[1],$=(0,o.useState)(""),ee=a($,2),te=ee[0],ne=ee[1],ae=(0,o.useState)(t),re=a(ae,2),oe=re[0],ie=re[1],le=(0,o.useState)(e.settings.newStatus),ce=a(le,2),ue=ce[0],se=ce[1],de=(0,o.useState)(!1),me=a(de,2),pe=me[0],fe=me[1],ye=(0,o.useState)(""),ge=a(ye,2),ve=ge[0],be=ge[1],he=(0,o.useState)(),Ee=a(he,2),Se=Ee[0],xe=Ee[1],_e=(0,o.useRef)(new AbortController),Re=["category","category-add","category-remove","category-remove-all"];(0,o.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=oe.filter((function(e){return-1===Re.indexOf(e.value)})),ie(t))}),[]),(0,o.useEffect)((function(){d&&e.taxonomiesList&&(E(!0),(0,c.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/terms/"+d)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),d===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),R(a),E(!1)})),e.taxonomiesList.forEach((function(e){e.value===d&&ne(e.label)})))}),[d]),(0,o.useEffect)((function(){Y(function(){if(!F)return Z(""),!0;var t=j||e.settings.globalDefaultExpireOffset;if(t){var n=_e.current;n&&n.abort(),_e.current=new AbortController;var a=_e.current.signal;fe(!0),(0,c.apiFetch)({path:(0,i.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:a}).then((function(e){fe(!1),Y(e.isValid),Z(e.message),e.isValid?(be(e.preview),xe(e.currentTime)):be("")})).catch((function(e){"AbortError"!==e.name&&(fe(!1),Y(!1),Z(e.message),be(""))}))}return Z(""),!0}())}),[F,j]),(0,o.useEffect)((function(){if(te){var e=[];t.forEach((function(t){var n=t.label;-1!==Re.indexOf(t.value)&&(n=n.replace("%s",te.toLowerCase())),e.push({value:t.value,label:n})})),ie(e)}}),[te]),(0,o.useEffect)((function(){G&&e.onDataIsValid&&e.onDataIsValid(e.postType),!G&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[G]),(0,o.useEffect)((function(){pe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!pe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[pe]);var Te=y.map((function(e){return e.label})),Ne=[React.createElement(r.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:F||!1,label:e.text.fieldActiveLabel,onChange:function(e){A(e)}}))];return F&&(Ne.push(React.createElement(r.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(r.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){U(e)}}))),Ne.push(React.createElement(r.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:d,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){m(e)}}))),Ne.push(React.createElement(r.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(r.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:oe,description:e.text.fieldHowToExpireDescription,selected:P,onChange:function(e){C(e)}}),"change-status"===P&&React.createElement(r.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ue,onChange:se}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(P)>-1&&React.createElement(r.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:Te,value:_,isLoading:h,onChange:function(e){R(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),Ne.push(React.createElement(r.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(r.TextControl,{name:"expired-custom-date-"+e.postType,value:j,loading:pe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){I(e)}}),ve&&React.createElement(o.Fragment,null,React.createElement("h4",null,e.text.datePreview),React.createElement("div",null,React.createElement("div",null,React.createElement("span",null,e.text.datePreviewCurrent,": "),React.createElement("span",null,React.createElement("code",null,Se))),React.createElement("div",null,React.createElement("span",null,e.text.datePreviewComputed,": "),React.createElement("span",null,React.createElement("code",null,ve))))))),Ne.push(React.createElement(r.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(r.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:V,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){L(e)}})))),Ne=(0,l.applyFilters)("expirationdate_settings_posttype",Ne,e,F,o.useState),React.createElement(r.SettingsFieldset,{legend:e.legend},React.createElement(r.SettingsTable,{bodyChildren:Ne}),!G&&React.createElement(s,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",X)))}},138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(57);t.PostTypesSettingsPanels=function(e){var t=[],n=!0,o=!1,i=void 0;try{for(var l,c=Object.entries(e.settings)[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var u=l.value,s=a(u,2),d=s[0],m=s[1];t.push(React.createElement(r.PostTypeSettingsPanel,{legend:m.label,text:e.text,postType:d,settings:m,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[d],statusesList:e.statusesList[d],key:d+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished}))}}catch(e){o=!0,i=e}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}return t}},858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(386),r=n(214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},5:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",null,React.createElement("legend",null,e.legend),e.children)}},892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(386),r=n(214),o=n(57);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(190),r=n(620),o=n(386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,c=e.onChangeDate,u=e.is12Hour,s=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:c,__nextRemoveHelpButton:!0,is12Hour:u,startOfWeek:s}))}},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(386),o=n(214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var c=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:c,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},57:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var c=n(94);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return c.FutureActionPanelBulkEdit}});var u=n(239);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return u.PostTypeSettingsPanel}});var s=n(138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return s.PostTypesSettingsPanels}});var d=n(5);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var g=n(438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return g.SubmitButton}});var v=n(311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return v.CheckboxControl}});var b=n(858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var S=n(13);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return S.NonceControl}});var x=n(225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return x.TrueFalseControl}});var _=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return _.Spinner}})},39:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{e.exports=ReactDOM},361:e=>{e.exports=publishpressFutureSettingsConfig},244:e=>{e.exports=wp},214:e=>{e.exports=wp.components},562:e=>{e.exports=wp.data},386:e=>{e.exports=wp.element},566:e=>{e.exports=wp.hooks},986:e=>{e.exports=wp.plugins},11:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var a=Object.assign||function(e){for(var t=1;t{"use strict";var e={5442:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonsPanel=function(e){return React.createElement("div",null,e.children)}},4311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxControl=void 0;var a=n(1386),r=n(2214);t.CheckboxControl=function(e){var t,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,a.useState)(e.checked||!1),2),o=n[0],i=n[1];return t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description),React.createElement(a.Fragment,null,React.createElement(r.CheckboxControl,{label:e.label,name:e.name,id:e.name,className:e.className,checked:o||!1,onChange:function(t){i(t),e.onChange&&e.onChange(t)}}),t)}},5470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateOffsetPreview=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(1386),o=n(4011),i=n(3244);n(9922);var l=t.DateOffsetPreview=function(e){var t=e.offset,n=e.label,l=e.labelDatePreview,c=e.labelOffsetPreview,s=e.setValidationErrorCallback,u=e.setHasPendingValidationCallback,d=e.setHasValidDataCallback,m=e.compactView,p=void 0!==m&&m,f=(0,r.useState)(""),y=a(f,2),v=y[0],g=y[1],b=(0,r.useState)(),h=a(b,2),E=h[0],x=h[1],S=(0,r.useRef)(new AbortController);(0,r.useEffect)((function(){!function(){if(t){var e=S.current;e&&e.abort(),S.current=new AbortController;var n=S.current.signal;u(!0),(0,i.apiFetch)({path:(0,o.addQueryArgs)("publishpress-future/v1/settings/validate-expire-offset"),method:"POST",data:{offset:t},signal:n}).then((function(e){u(!1),d(e.isValid),s(e.message),e.isValid?(g(e.preview),x(e.currentTime)):g("")})).catch((function(e){"AbortError"!==e.name&&(u(!1),d(!1),s(e.message),g(""))}))}}()}),[t]);var _=p?" compact":"";return React.createElement(r.Fragment,null,t&&React.createElement("div",{className:"publishpress-future-date-preview"+_},React.createElement("h4",null,n),React.createElement("div",{className:"publishpress-future-date-preview-body"},React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},l,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},E)),React.createElement("div",null,React.createElement("span",{className:"publishpress-future-date-preview-label"},c,": "),React.createElement("span",{className:"publishpress-future-date-preview-value"},v)))))};t.default=l},4620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimePicker=void 0;var a=n(7039),r=n(2214);t.DateTimePicker=function(e){var t=e.currentDate,n=e.onChange,o=e.is12Hour,i=e.startOfWeek;return"number"==typeof t&&(t=(0,a.normalizeUnixTimeToMilliseconds)(t)),React.createElement(r.DateTimePicker,{currentDate:t,onChange:n,__nextRemoveHelpButton:!0,is12Hour:o,startOfWeek:i})}},8418:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanel=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(8409),i=n(4873),l=n(9986),c=n(2214),s=n(1442),u=n(6625),d=wp.components,m=d.PanelRow,p=d.CheckboxControl,f=d.SelectControl,y=d.FormTokenField,v=d.Spinner,g=d.BaseControl,b=wp.element,h=b.Fragment,E=b.useEffect,x=b.useState,S=wp.htmlEntities.decodeEntities,_=wp.url.addQueryArgs,A=wp.data,R=A.useSelect,C=A.useDispatch,w=wp.apiFetch;t.FutureActionPanel=function(e){var t=R((function(t){return{action:t(e.storeName).getAction(),date:t(e.storeName).getDate(),enabled:t(e.storeName).getEnabled(),terms:t(e.storeName).getTerms(),taxonomy:t(e.storeName).getTaxonomy(),taxonomyName:t(e.storeName).getTaxonomyName(),termsListByName:t(e.storeName).getTermsListByName(),termsListById:t(e.storeName).getTermsListById(),isFetchingTerms:t(e.storeName).getIsFetchingTerms(),calendarIsVisible:t(e.storeName).getCalendarIsVisible(),hasValidData:t(e.storeName).getHasValidData(),newStatus:t(e.storeName).getNewStatus()}})),n=t.action,d=t.date,b=t.enabled,A=t.terms,T=t.taxonomy,N=t.taxonomyName,P=t.termsListByName,O=t.termsListById,k=t.isFetchingTerms,F=t.calendarIsVisible,D=t.hasValidData,I=t.newStatus,j=x(""),B=r(j,2),M=B[0],V=B[1],L=C(e.storeName),H=L.setAction,U=L.setDate,W=L.setEnabled,Q=L.setTerms,q=L.setTaxonomy,z=L.setTermsListByName,Y=L.setTermsListById,J=L.setTaxonomyName,G=L.setIsFetchingTerms,Z=L.setCalendarIsVisible,K=L.setHasValidData,X=L.setNewStatus,$=function(e){P[e]={id:e,count:0,description:"",link:"",name:e,slug:e,taxonomy:T},O[e]=e,z(P),Y(O),Q([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&O&&(re=(0,o.compact)(function(e){return"object"!==(void 0===e?"undefined":a(e))||null===e?{}:e.map((function(e){return O[e]}))}(A)),"string"==typeof re&&(re=[]));var oe=[];"object"===(void 0===P?"undefined":a(P))&&null!==P&&(oe=Object.keys(P));var ie,le=F?"future-action-panel":"future-action-panel hidden-calendar",ce=F?"future-action-panel-content":"future-action-panel-content hidden-calendar",se=F?"future-action-date-panel":"future-action-date-panel hidden-calendar";ie="inherited"===e.timeFormat?!e.is12Hour:"24h"===e.timeFormat;var ue=e.actionsSelectOptions;e.taxonomy||(ue=e.actionsSelectOptions.filter((function(e){return-1===["category","category-add","category-remove","category-remove-all"].indexOf(e.value)})));var de=function(e,t,n){var a=e.split("{"),o=[];o.push(a.shift());var i=!0,l=!1,c=void 0;try{for(var s,u=a[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var d=s.value.split("}"),m=r(d,2),p=m[0],f=m[1];o.push(React.createElement("a",{href:t,target:"_blank",key:t},p)),o.push(f)}}catch(e){l=!0,c=e}finally{try{!i&&u.return&&u.return()}finally{if(l)throw c}}return o}(e.strings.timezoneSettingsHelp,"/wp-admin/options-general.php#timezone_string"),me=String(n).includes("category")&&"category-remove-all"!==n,pe=N;switch(n){case"category":pe=e.strings.newTerms.replace("%s",N);break;case"category-remove":pe=e.strings.removeTerms.replace("%s",N);break;case"category-add":pe=e.strings.addTerms.replace("%s",N)}return E((function(){if(!b)return K(!0),void V("");K(function(){var t=!0;if(!b)return V(""),!0;n||(V(e.strings.errorActionRequired),t=!1),d||(V(e.strings.errorDateRequired),t=!1),d&&new Date(d){Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelAfterActionField=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBlockEditor=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057);t.FutureActionPanelBlockEditor=function(e){var t=wp.editPost.PluginDocumentSettingPanel,n=wp.data,o=n.useDispatch,i=n.select,l=o("core/editor").editPost,c=i("core/editor").getEditedPostAttribute("publishpress_future_action"),s=o("core/editor"),u=s.lockPostSaving,d=s.unlockPostSaving;return React.createElement(t,{name:"publishpress-future-action-panel",title:e.strings.panelTitle,initialOpen:e.postTypeDefaultConfig.autoEnable,className:"post-expirator-panel"},React.createElement("div",{id:"publishpress-future-block-editor"},React.createElement(r.FutureActionPanel,{context:"block-editor",postType:e.postType,isCleanNewPost:e.isCleanNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:c.enabled,calendarIsVisible:!0,action:c.action,newStatus:c.newStatus,date:c.date,terms:c.terms,taxonomy:c.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(t,n){var r=i(e.storeName),o={enabled:r.getEnabled()};o.enabled&&(o.action=r.getAction(),o.newStatus=r.getNewStatus(),o.date=r.getDate(),o.terms=r.getTerms(),o.taxonomy=r.getTaxonomy(),o.extraData=r.getExtraData()),function(e){var t={publishpress_future_action:{}},n=!0,r=!1,o=void 0;try{for(var i,c=Object.entries(e)[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var s=i.value,u=a(s,2),d=u[0],m=u[1];t.publishpress_future_action[d]=m}}catch(e){r=!0,o=e}finally{try{!n&&c.return&&c.return()}finally{if(r)throw o}}l(t)}(o)},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){d("future-action")},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){u("future-action")}})))}},2094:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelBulkEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(8409);t.FutureActionPanelBulkEdit=function(e){var t=wp.data,n=t.useSelect,i=t.useDispatch,l=t.select,c=wp.element.useEffect,s=n((function(t){return t(e.storeName).getDate()}),[]),u=n((function(t){return t(e.storeName).getEnabled()}),[]),d=n((function(t){return t(e.storeName).getAction()}),[]),m=n((function(t){return t(e.storeName).getNewStatus()}),[]),p=n((function(t){return t(e.storeName).getTerms()}),[]),f=n((function(t){return t(e.storeName).getTaxonomy()}),[]),y=n((function(t){return t(e.storeName).getChangeAction()}),[]),v=n((function(t){return t(e.storeName).getHasValidData()}),[]),g=i(e.storeName).setChangeAction,b=p;"object"===(void 0===p?"undefined":a(p))&&(b=p.join(","));var h=[{value:"no-change",label:e.strings.noChange},{value:"change-add",label:e.strings.changeAdd},{value:"add-only",label:e.strings.addOnly},{value:"change-only",label:e.strings.changeOnly},{value:"remove-only",label:e.strings.removeOnly}];return c((function(){v||"no-change"===y?jQuery("#bulk_edit").prop("disabled",!1):jQuery("#bulk_edit").prop("disabled",!0)}),[v,y]),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.SelectControl,{label:e.strings.futureActionUpdate,name:"future_action_bulk_change_action",value:y,options:h,onChange:function(e){g(e)}}),["change-add","add-only","change-only"].includes(y)&&React.createElement(r.FutureActionPanel,{context:"bulk-edit",autoEnableAndHideCheckbox:!0,postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:!0,calendarIsVisible:!1,action:d,newStatus:m,date:s,terms:p,taxonomy:f,taxonomyName:e.taxonomyName,onChangeData:function(t,n){(0,o.getElementByName)("future_action_bulk_enabled").value=l(e.storeName).getEnabled()?1:0,(0,o.getElementByName)("future_action_bulk_action").value=l(e.storeName).getAction(),(0,o.getElementByName)("future_action_bulk_new_status").value=l(e.storeName).getNewStatus(),(0,o.getElementByName)("future_action_bulk_date").value=l(e.storeName).getDate(),(0,o.getElementByName)("future_action_bulk_terms").value=l(e.storeName).getTerms().join(","),(0,o.getElementByName)("future_action_bulk_taxonomy").value=l(e.storeName).getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,hideCalendarByDefault:e.hideCalendarByDefault,strings:e.strings}),React.createElement("input",{type:"hidden",name:"future_action_bulk_enabled",value:u?1:0}),React.createElement("input",{type:"hidden",name:"future_action_bulk_action",value:d}),React.createElement("input",{type:"hidden",name:"future_action_bulk_new_status",value:m}),React.createElement("input",{type:"hidden",name:"future_action_bulk_date",value:s}),React.createElement("input",{type:"hidden",name:"future_action_bulk_terms",value:b}),React.createElement("input",{type:"hidden",name:"future_action_bulk_taxonomy",value:f}),React.createElement("input",{type:"hidden",name:"future_action_bulk_view",value:"bulk-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},3571:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelClassicEditor=void 0;var a=n(2057),r=n(7562);n(1386),t.FutureActionPanelClassicEditor=function(e){(new Date).getTimezoneOffset();var t=function(e){return document.getElementsByName(e)[0]},n=function(e){var n=t(e);return n?n.value:""},o={enabled:"1"===n("future_action_enabled"),action:n("future_action_action"),newStatus:n("future_action_new_status"),date:n("future_action_date"),terms:function(e){var n=t("future_action_terms");if(!n)return[];var a=n.value.split(",");return 1===a.length&&""===a[0]&&(a=[]),a.map((function(e){return parseInt(e)}))}(),taxonomy:n("future_action_taxonomy")};return React.createElement("div",{className:"post-expirator-panel"},React.createElement(a.FutureActionPanel,{context:"classic-editor",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:o.enabled,calendarIsVisible:!0,action:o.action,newStatus:o.newStatus,date:o.date,terms:o.terms,taxonomy:o.taxonomy,taxonomyName:e.taxonomyName,onChangeData:function(n,a){var o=(0,r.select)(e.storeName);t("future_action_enabled").value=o.getEnabled()?1:0,t("future_action_action").value=o.getAction(),t("future_action_new_status").value=o.getNewStatus(),t("future_action_date").value=o.getDate(),t("future_action_terms").value=o.getTerms().join(","),t("future_action_taxonomy").value=o.getTaxonomy()},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery("#publish").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery("#publish").prop("disabled",!0)}}))}},5437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelQuickEdit=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(2057),o=n(7562);n(1386),t.FutureActionPanelQuickEdit=function(e){var t=(0,o.useSelect)((function(t){return t(e.storeName).getDate()}),[]),n=(0,o.useSelect)((function(t){return t(e.storeName).getEnabled()}),[]),i=(0,o.useSelect)((function(t){return t(e.storeName).getAction()}),[]),l=(0,o.useSelect)((function(t){return t(e.storeName).getTerms()}),[]),c=(0,o.useSelect)((function(t){return t(e.storeName).getTaxonomy()}),[]),s=((0,o.useSelect)((function(t){return t(e.storeName).getHasValidData()}),[]),(0,o.useSelect)((function(t){return t(e.storeName).getNewStatus()}),[])),u=l;return"object"===(void 0===l?"undefined":a(l))&&(u=l.join(",")),React.createElement("div",{className:"post-expirator-panel"},React.createElement(r.FutureActionPanel,{context:"quick-edit",postType:e.postType,isCleanNewPost:e.isNewPost,actionsSelectOptions:e.actionsSelectOptions,statusesSelectOptions:e.statusesSelectOptions,enabled:n,calendarIsVisible:!1,action:i,newStatus:s,date:t,terms:l,taxonomy:c,taxonomyName:e.taxonomyName,onChangeData:function(e,t){},is12Hour:e.is12Hour,timeFormat:e.timeFormat,startOfWeek:e.startOfWeek,storeName:e.storeName,strings:e.strings,onDataIsValid:function(){jQuery(".button-primary.save").prop("disabled",!1)},hideCalendarByDefault:e.hideCalendarByDefault,onDataIsInvalid:function(){jQuery(".button-primary.save").prop("disabled",!0)}}),React.createElement("input",{type:"hidden",name:"future_action_enabled",value:n?1:0}),React.createElement("input",{type:"hidden",name:"future_action_action",value:i||""}),React.createElement("input",{type:"hidden",name:"future_action_new_status",value:s||""}),React.createElement("input",{type:"hidden",name:"future_action_date",value:t||""}),React.createElement("input",{type:"hidden",name:"future_action_terms",value:u||""}),React.createElement("input",{type:"hidden",name:"future_action_taxonomy",value:c||""}),React.createElement("input",{type:"hidden",name:"future_action_view",value:"quick-edit"}),React.createElement("input",{type:"hidden",name:"_future_action_nonce",value:e.nonce}))}},6625:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FutureActionPanelTop=void 0;var a=Object.assign||function(e){for(var t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.NonceControl=void 0;var a=n(1386);t.NonceControl=function(e){return e.name||(e.name="_wpnonce"),e.referrer||(e.referrer=!0),React.createElement(a.Fragment,null,React.createElement("input",{type:"hidden",name:e.name,id:e.name,value:e.nonce}),e.referrer&&React.createElement("input",{type:"hidden",name:"_wp_http_referer",value:e.referrer}))}},1620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypeSettingsPanel=void 0;var a,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(2057),i=n(1386),l=n(4011),c=n(8566),s=n(3244),u=(a=n(5470))&&a.__esModule?a:{default:a},d=wp.components.PanelRow;t.PostTypeSettingsPanel=function(e){var t=e.expireTypeList[e.postType],n=(0,i.useState)(e.settings.taxonomy),a=r(n,2),m=a[0],p=a[1],f=(0,i.useState)([]),y=r(f,2),v=y[0],g=y[1],b=(0,i.useState)(!1),h=r(b,2),E=h[0],x=h[1],S=(0,i.useState)([]),_=r(S,2),A=_[0],R=_[1],C=(0,i.useState)(e.settings.howToExpire),w=r(C,2),T=w[0],N=w[1],P=(0,i.useState)(e.settings.active),O=r(P,2),k=O[0],F=O[1],D=(0,i.useState)(e.settings.defaultExpireOffset),I=r(D,2),j=I[0],B=I[1],M=(0,i.useState)(e.settings.emailNotification),V=r(M,2),L=V[0],H=V[1],U=(0,i.useState)(e.settings.autoEnabled),W=r(U,2),Q=W[0],q=W[1],z=(0,i.useState)(!0),Y=r(z,2),J=Y[0],G=Y[1],Z=(0,i.useState)(""),K=r(Z,2),X=K[0],$=K[1],ee=(0,i.useState)(""),te=r(ee,2),ne=te[0],ae=te[1],re=(0,i.useState)(t),oe=r(re,2),ie=oe[0],le=oe[1],ce=(0,i.useState)(e.settings.newStatus),se=r(ce,2),ue=se[0],de=se[1],me=(0,i.useState)(!1),pe=r(me,2),fe=pe[0],ye=pe[1],ve=j||e.settings.globalDefaultExpireOffset,ge=["category","category-add","category-remove","category-remove-all"];(0,i.useEffect)((function(){var t;0===e.taxonomiesList.length&&(t=ie.filter((function(e){return-1===ge.indexOf(e.value)})),le(t))}),[]),(0,i.useEffect)((function(){m&&e.taxonomiesList&&(x(!0),(0,s.apiFetch)({path:(0,l.addQueryArgs)("publishpress-future/v1/terms/"+m)}).then((function(t){var n=[],a=null,r=void 0;t.terms.forEach((function(t){r={value:t.id,label:t.name},n.push(r),m===e.settings.taxonomy&&e.settings.terms.includes(t.id)&&(null===a&&(a=[]),a.push(r.label))})),g(n),R(a),x(!1)})),e.taxonomiesList.forEach((function(e){e.value===m&&ae(e.label)})))}),[m]),(0,i.useEffect)((function(){if(ne){var e=[];t.forEach((function(t){var n=t.label;-1!==ge.indexOf(t.value)&&(n=n.replace("%s",ne.toLowerCase())),e.push({value:t.value,label:n})})),le(e)}}),[ne]),(0,i.useEffect)((function(){J&&e.onDataIsValid&&e.onDataIsValid(e.postType),!J&&e.onDataIsInvalid&&e.onDataIsInvalid(e.postType)}),[J]),(0,i.useEffect)((function(){fe&&e.onValidationStarted&&e.onValidationStarted(e.postType),!fe&&e.onValidationFinished&&e.onValidationFinished(e.postType)}),[fe]);var be=v.map((function(e){return e.label})),he=[React.createElement(o.SettingRow,{label:e.text.fieldActive,key:"expirationdate_activemeta-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_activemeta-"+e.postType,checked:k||!1,label:e.text.fieldActiveLabel,onChange:function(e){F(e)}}))];k&&(he.push(React.createElement(o.SettingRow,{label:e.text.fieldAutoEnable,key:"expirationdate_autoenable-"+e.postType},React.createElement(o.CheckboxControl,{name:"expirationdate_autoenable-"+e.postType,checked:Q||!1,label:e.text.fieldAutoEnableLabel,onChange:function(e){q(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldTaxonomy,key:"expirationdate_taxonomy-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_taxonomy-"+e.postType,options:e.taxonomiesList,selected:m,noItemFoundMessage:e.text.noItemsfound,description:e.text.fieldTaxonomyDescription,data:e.postType,onChange:function(e){p(e)}}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldHowToExpire,key:"expirationdate_expiretype-"+e.postType},React.createElement(o.SelectControl,{name:"expirationdate_expiretype-"+e.postType,className:"pe-howtoexpire",options:ie,description:e.text.fieldHowToExpireDescription,selected:T,onChange:function(e){N(e)}}),"change-status"===T&&React.createElement(o.SelectControl,{name:"expirationdate_newstatus-"+e.postType,options:e.statusesList,selected:ue,onChange:de}),e.taxonomiesList.length>0&&["category","category-add","category-remove"].indexOf(T)>-1&&React.createElement(o.TokensControl,{label:e.text.fieldTerm,name:"expirationdate_terms-"+e.postType,options:be,value:A,isLoading:E,onChange:function(e){R(e)},description:e.text.fieldTermDescription,maxSuggestions:1e3,expandOnFocus:!0,autoSelectFirstMatch:!0}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldDefaultDateTimeOffset,key:"expired-custom-date-"+e.postType},React.createElement(o.TextControl,{name:"expired-custom-date-"+e.postType,value:j,loading:fe,placeholder:e.settings.globalDefaultExpireOffset,description:e.text.fieldDefaultDateTimeOffsetDescription,unescapedDescription:!0,onChange:function(e){B(e)}}),React.createElement(u.default,{offset:ve,label:e.text.datePreview,labelDatePreview:e.text.datePreviewCurrent,labelOffsetPreview:e.text.datePreviewComputed,setValidationErrorCallback:$,setHasPendingValidationCallback:ye,setHasValidDataCallback:G}))),he.push(React.createElement(o.SettingRow,{label:e.text.fieldWhoToNotify,key:"expirationdate_emailnotification-"+e.postType},React.createElement(o.TextControl,{name:"expirationdate_emailnotification-"+e.postType,className:"large-text",value:L,description:e.text.fieldWhoToNotifyDescription,onChange:function(e){H(e)}})))),he=(0,c.applyFilters)("expirationdate_settings_posttype",he,e,k,i.useState);var Ee=e.isVisible?"pe-settings-fieldset":"pe-settings-fieldset hidden";return React.createElement("div",{className:Ee},React.createElement(o.SettingsTable,{bodyChildren:he}),!J&&React.createElement(d,null,React.createElement("div",{className:"publishpress-future-notice publishpress-future-notice-error"},React.createElement("strong",null,e.text.error,":")," ",X)))}},8138:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypesSettingsPanels=void 0;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=n(2057),o=n(1386);t.PostTypesSettingsPanels=function(e){var t=(0,o.useState)(Object.keys(e.settings)[0]),n=a(t,2),i=n[0],l=n[1],c=[],s=!0,u=!1,d=void 0;try{for(var m,p=Object.entries(e.settings)[Symbol.iterator]();!(s=(m=p.next()).done);s=!0){var f=m.value,y=a(f,2),v=y[0],g=y[1];c.push(React.createElement(r.PostTypeSettingsPanel,{legend:g.label,text:e.text,postType:v,settings:g,expireTypeList:e.expireTypeList,taxonomiesList:e.taxonomiesList[v],statusesList:e.statusesList[v],key:v+"-panel",onDataIsValid:e.onDataIsValid,onDataIsInvalid:e.onDataIsInvalid,onValidationStarted:e.onValidationStarted,onValidationFinished:e.onValidationFinished,isVisible:i===v}))}}catch(e){u=!0,d=e}finally{try{!s&&p.return&&p.return()}finally{if(u)throw d}}var b=function(e){e.preventDefault(),l(e.target.hash.replace("#","").replace("-panel",""))},h=[],E=!1,x=!0,S=!1,_=void 0;try{for(var A,R=Object.entries(e.settings)[Symbol.iterator]();!(x=(A=R.next()).done);x=!0){var C=A.value,w=a(C,2),T=w[0],N=w[1];E=i===T,h.push(React.createElement("a",{href:"#"+T+"-panel",className:"nav-tab "+(E?"nav-tab-active":""),key:T+"-tab",onClick:b},N.label))}}catch(e){S=!0,_=e}finally{try{!x&&R.return&&R.return()}finally{if(S)throw _}}return React.createElement("div",null,React.createElement("nav",{className:"nav-tab-wrapper"},h),c)}},2858:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControl=void 0;var a=n(1386),r=n(2214);t.SelectControl=function(e){return React.createElement(a.Fragment,null,0===e.options.length&&React.createElement("div",null,e.noItemFoundMessage),e.options.length>0&&React.createElement(r.SelectControl,{label:e.label,name:e.name,id:e.name,className:e.className,value:e.selected,onChange:function(t){e.onChange(t)},"data-data":e.data,options:e.options}),e.children,React.createElement("p",{className:"description"},e.description))}},9005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingRow=void 0,n(1386),t.SettingRow=function(e){return React.createElement("tr",{valign:"top"},React.createElement("th",{scope:"row"},React.createElement("label",{htmlFor:""},e.label)),React.createElement("td",null,e.children))}},5786:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFieldset=function(e){return React.createElement("fieldset",{className:e.className},React.createElement("legend",null,e.legend),e.children)}},9892:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsForm=function(e){return React.createElement("form",{method:"post"},e.children)}},5681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSection=void 0;var a=n(1386);t.SettingsSection=function(e){return React.createElement(a.Fragment,null,React.createElement("h2",null,e.title),React.createElement("p",null,e.description),e.children)}},6772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsTable=function(e){return React.createElement("table",{className:"form-table"},React.createElement("tbody",null,e.bodyChildren))}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=function(e){return React.createElement("span",{className:"publishpress-future-spinner"},React.createElement("div",null),React.createElement("div",null),React.createElement("div",null),React.createElement("div",null))}},4438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitButton=function(e){return React.createElement("input",{type:"submit",name:e.name,value:e.text,disabled:e.disabled,className:"button-primary"})}},6301:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControl=void 0;var a=n(1386),r=n(2214),o=n(2057);t.TextControl=function(e){var t;t=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description);var n=e.className?e.className:"";return e.loading&&(n+=" publishpress-future-loading publishpress-future-loading-input"),React.createElement(a.Fragment,null,React.createElement("div",{className:n},React.createElement(r.TextControl,{type:"text",label:e.label,name:e.name,id:e.name,className:e.className,value:e.value,placeholder:e.placeholder,onChange:function(t){e.onChange&&e.onChange(t)}}),e.loading&&React.createElement(o.Spinner,null),t))}},3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleArrowButton=void 0;var a=n(2214);t.ToggleArrowButton=function(e){var t=e.iconExpanded?e.iconExpanded:"arrow-up-alt2",n=e.iconCollapsed?e.iconCollapsed:"arrow-down-alt2",r=e.isExpanded?t:n,o=e.isExpanded?e.titleExpanded:e.titleCollapsed;return React.createElement(a.Button,{isSmall:!0,title:o,icon:r,onClick:function(){e.onClick&&e.onClick()},className:e.className})}},4873:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleCalendarDatePicker=void 0;var a=n(3190),r=n(4620),o=n(1386);t.ToggleCalendarDatePicker=function(e){var t=e.isExpanded,n=e.strings,i=e.onToggleCalendar,l=e.currentDate,c=e.onChangeDate,s=e.is12Hour,u=e.startOfWeek;return(0,o.useEffect)((function(){var e=document.querySelector(".future-action-calendar-toggle");if(e){var t=e.nextElementSibling;if(t){var n=t.querySelector(".components-datetime__time");if(n){var a=n.nextSibling;a&&t.insertBefore(e,a)}}}})),React.createElement(o.Fragment,null,React.createElement(a.ToggleArrowButton,{className:"future-action-calendar-toggle",isExpanded:t,iconExpanded:"arrow-up-alt2",iconCollapsed:"calendar",titleExpanded:n.hideCalendar,titleCollapsed:n.showCalendar,onClick:i}),React.createElement(r.DateTimePicker,{currentDate:l,onChange:c,__nextRemoveHelpButton:!0,is12Hour:s,startOfWeek:u}))}},3948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokensControl=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(1386),o=n(2214);t.TokensControl=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}((0,r.useState)(""),2),n=t[0],i=t[1];(0,r.useEffect)((function(){e.value&&i(e.value.join(","))}),[e.value]);var l=void 0;e.description&&(l=e.unescapedDescription?React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:e.description}}):React.createElement("p",{className:"description"},e.description));var c=e.value?e.value:[];return React.createElement(r.Fragment,null,React.createElement(o.FormTokenField,{label:e.label,value:c,suggestions:e.options,onChange:function(t){e.onChange&&e.onChange(t),"object"===(void 0===t?"undefined":a(t))?i(t.join(",")):i("")},maxSuggestions:e.maxSuggestions,className:"publishpres-future-token-field",__experimentalExpandOnFocus:e.expandOnFocus,__experimentalAutoSelectFirstMatch:e.autoSelectFirstMatch}),React.createElement("input",{type:"hidden",name:e.name,value:n}),l)}},8225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseControl=function(e){var t=wp.element.Fragment,n=function(t){e.onChange&&e.onChange(t.target.value===e.trueValue&&jQuery(t.target).is(":checked"))};return React.createElement(t,null,React.createElement("input",{type:"radio",name:e.name,id:e.name+"-true",value:e.trueValue,defaultChecked:e.selected,onChange:n}),React.createElement("label",{htmlFor:e.name+"-true"},e.trueLabel),"  ",React.createElement("input",{type:"radio",name:e.name,defaultChecked:!e.selected,id:e.name+"-false",value:e.falseValue,onChange:n}),React.createElement("label",{htmlFor:e.name+"-false"},e.falseLabel),React.createElement("p",{className:"description"},e.description))}},2057:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var a=n(5442);Object.defineProperty(t,"ButtonsPanel",{enumerable:!0,get:function(){return a.ButtonsPanel}});var r=n(8418);Object.defineProperty(t,"FutureActionPanel",{enumerable:!0,get:function(){return r.FutureActionPanel}});var o=n(2864);Object.defineProperty(t,"FutureActionPanelBlockEditor",{enumerable:!0,get:function(){return o.FutureActionPanelBlockEditor}});var i=n(3571);Object.defineProperty(t,"FutureActionPanelClassicEditor",{enumerable:!0,get:function(){return i.FutureActionPanelClassicEditor}});var l=n(5437);Object.defineProperty(t,"FutureActionPanelQuickEdit",{enumerable:!0,get:function(){return l.FutureActionPanelQuickEdit}});var c=n(2094);Object.defineProperty(t,"FutureActionPanelBulkEdit",{enumerable:!0,get:function(){return c.FutureActionPanelBulkEdit}});var s=n(1620);Object.defineProperty(t,"PostTypeSettingsPanel",{enumerable:!0,get:function(){return s.PostTypeSettingsPanel}});var u=n(8138);Object.defineProperty(t,"PostTypesSettingsPanels",{enumerable:!0,get:function(){return u.PostTypesSettingsPanels}});var d=n(9005);Object.defineProperty(t,"SettingRow",{enumerable:!0,get:function(){return d.SettingRow}});var m=n(5786);Object.defineProperty(t,"SettingsFieldset",{enumerable:!0,get:function(){return m.SettingsFieldset}});var p=n(9892);Object.defineProperty(t,"SettingsForm",{enumerable:!0,get:function(){return p.SettingsForm}});var f=n(5681);Object.defineProperty(t,"SettingsSection",{enumerable:!0,get:function(){return f.SettingsSection}});var y=n(6772);Object.defineProperty(t,"SettingsTable",{enumerable:!0,get:function(){return y.SettingsTable}});var v=n(4438);Object.defineProperty(t,"SubmitButton",{enumerable:!0,get:function(){return v.SubmitButton}});var g=n(4311);Object.defineProperty(t,"CheckboxControl",{enumerable:!0,get:function(){return g.CheckboxControl}});var b=n(2858);Object.defineProperty(t,"SelectControl",{enumerable:!0,get:function(){return b.SelectControl}});var h=n(6301);Object.defineProperty(t,"TextControl",{enumerable:!0,get:function(){return h.TextControl}});var E=n(3948);Object.defineProperty(t,"TokensControl",{enumerable:!0,get:function(){return E.TokensControl}});var x=n(1013);Object.defineProperty(t,"NonceControl",{enumerable:!0,get:function(){return x.NonceControl}});var S=n(8225);Object.defineProperty(t,"TrueFalseControl",{enumerable:!0,get:function(){return S.TrueFalseControl}});var _=n(242);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return _.Spinner}});var A=n(5470);Object.defineProperty(t,"DateOffsetPreview",{enumerable:!0,get:function(){return A.DateOffsetPreview}})},7039:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=t.getCurrentTimeInSeconds=function(){return o((new Date).getTime())},a=(t.getCurrentTimeAsTimestamp=function(){return a(n())},t.formatUnixTimeToTimestamp=function(e){var t=new Date(o(e));return t.getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2)+" "+("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)}),r=(t.formatTimestampToUnixTime=function(e){var t=new Date(e);return o(t.getTime())},t.timeIsInSeconds=function(e){return parseInt(e).toString().length<=10}),o=t.normalizeUnixTimeToSeconds=function(e){return e=parseInt(e),r()?e:e/1e3};t.normalizeUnixTimeToMilliseconds=function(e){return e=parseInt(e),r()?1e3*e:e}},8409:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=(t.compact=function(e){return e?(Array.isArray(e)||"object"!==(void 0===e?"undefined":n(e))||(e=Object.values(e)),e.filter((function(e){return null!=e&&""!==e}))):[]},t.debugLogFactory=function(e){return function(t){for(var n=arguments.length,a=Array(n>1?n-1:0),r=1;r{n.d(t,{A:()=>l});var a=n(1354),r=n.n(a),o=n(6314),i=n.n(o)()(r());i.push([e.id,".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n","",{version:3,sources:["webpack://./assets/jsx/components/css/dateOffsetPreview.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB",sourcesContent:[".publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n"],sourceRoot:""}]);const l=i},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",a=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),a&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),a&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,a,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},1354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),o="/*# ".concat(r," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},5338:(e,t,n)=>{var a=n(5206);t.createRoot=a.createRoot,t.hydrateRoot=a.hydrateRoot},9922:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var a=n(5072),r=n.n(a),o=n(7825),i=n.n(o),l=n(7659),c=n.n(l),s=n(5056),u=n.n(s),d=n(540),m=n.n(d),p=n(1113),f=n.n(p),y=n(1461),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=m(),r()(y.A,v);const g=y.A&&y.A.locals?y.A.locals:void 0},5072:e=>{var t=[];function n(e){for(var n=-1,a=0;a{var t={};e.exports=function(e,n){var a=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,r&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5206:e=>{e.exports=ReactDOM},6361:e=>{e.exports=publishpressFutureSettingsConfig},3244:e=>{e.exports=wp},2214:e=>{e.exports=wp.components},7562:e=>{e.exports=wp.data},1386:e=>{e.exports=wp.element},8566:e=>{e.exports=wp.hooks},9986:e=>{e.exports=wp.plugins},4011:e=>{e.exports=wp.url}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var a=Object.assign||function(e){for(var t=1;t\n {props.children}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []);\n const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []);\n const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []);\n const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []);\n const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1');\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsFieldset,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState, Fragment, useRef } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\n\nconst { PanelRow, BaseControl } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(false);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n const apiRequestControllerRef = useRef(new AbortController());\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n const validateData = () => {\n if (! isActive) {\n setValidationError('');\n return true;\n }\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidation(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidation(false);\n\n setHasValidData(result.isValid);\n setValidationError(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidation(false);\n setHasValidData(false);\n setValidationError(error.message);\n setOffsetPreview('');\n });\n }\n\n setValidationError('');\n return true;\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n setHasValidData(validateData());\n }, [isActive, expireOffset]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n {offsetPreview && (\n \n

{props.text.datePreview}

\n
\n
\n {props.text.datePreviewCurrent}: \n {currentTime}\n
\n
\n {props.text.datePreviewComputed}: \n {offsetPreview}\n
\n
\n
\n )}\n
\n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n return (\n \n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\n\nexport const PostTypesSettingsPanels = function (props) {\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n return (panels);\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","module.exports = ReactDOM;","module.exports = publishpressFutureSettingsConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingsForm,\n SettingsSection,\n PostTypesSettingsPanels,\n SubmitButton,\n ButtonsPanel,\n NonceControl\n} from \"./components\";\n\nimport { StrictMode, createRoot, useState, useEffect } from \"@wordpress/element\";\n\nimport {\n nonce,\n referrer,\n settings,\n expireTypeList,\n taxonomiesList,\n text,\n statusesList\n} from \"&config.settings-post-types\";\nimport { render } from \"react-dom\";\n\nconst SettingsFormPanel = (props) => {\n const [formValidationStatusPerPostType, setFormValidationStatusPerPostType] = useState({});\n const [pendingValidationPerPostType, setPendingValidationPerPostType] = useState({});\n const [allValid, setAllValid] = useState(true);\n const [hasNoPendingValidation, setHasNoPendingValidation] = useState(true);\n\n useEffect(() => {\n let allFormsAreValid = true;\n\n for (const [postType, isValidForPostType] of Object.entries(formValidationStatusPerPostType)) {\n if (!isValidForPostType) {\n allFormsAreValid = false;\n break;\n }\n }\n\n setAllValid(allFormsAreValid);\n }, [formValidationStatusPerPostType]);\n\n useEffect(() => {\n let hasNoPendingValidation = true;\n\n for (const [postType, hasPending] of Object.entries(pendingValidationPerPostType)) {\n if (hasPending) {\n hasNoPendingValidation = false;\n break;\n }\n }\n\n setHasNoPendingValidation(hasNoPendingValidation);\n }, [pendingValidationPerPostType]);\n\n const onDataIsValid = (postType) => {\n formValidationStatusPerPostType[postType] = true;\n setFormValidationStatusPerPostType({...formValidationStatusPerPostType});\n }\n\n const onDataIsInvalid = (postType) => {\n formValidationStatusPerPostType[postType] = false;\n setFormValidationStatusPerPostType({...formValidationStatusPerPostType});\n }\n\n const onValidationStarted = (postType) => {\n pendingValidationPerPostType[postType] = true;\n setPendingValidationPerPostType({...pendingValidationPerPostType});\n }\n\n const onValidationFinished = (postType) => {\n pendingValidationPerPostType[postType] = false;\n setPendingValidationPerPostType({...pendingValidationPerPostType});\n }\n\n const saveButtonText = hasNoPendingValidation ? text.saveChanges : text.saveChangesPendingValidation;\n\n return (\n \n \n \n \n \n \n\n \n \n \n \n \n )\n};\n\nconst container = document.getElementById(\"publishpress-future-settings-post-types\");\nconst component = ();\n\ncreateRoot(container).render(component);\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","useEffect","decodeEntities","htmlEntities","addQueryArgs","url","data","useSelect","useDispatch","apiFetch","FutureActionPanel","action","select","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","path","then","result","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","offset","globalDefaultExpireOffset","controller","current","abort","signal","method","isValid","message","preview","catch","error","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","SettingsFieldset","legend","SettingsTable","bodyChildren","PostTypesSettingsPanels","panels","postTypeSettings","valign","htmlFor","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","onClick","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","getCurrentTimeInSeconds","normalizeUnixTimeToSeconds","getTime","formatUnixTimeToTimestamp","getCurrentTimeAsTimestamp","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNumber","isNaN","module","exports","ReactDOM","publishpressFutureSettingsConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","container","getElementById","component","formValidationStatusPerPostType","setFormValidationStatusPerPostType","pendingValidationPerPostType","setPendingValidationPerPostType","allValid","setAllValid","hasNoPendingValidation","setHasNoPendingValidation","allFormsAreValid","saveButtonText","saveChanges","saveChangesPendingValidation","StrictMode","settingsSectionTitle","settingsSectionDescription","createRoot","render"],"sourceRoot":""} +{"version":3,"file":"settings-post-types.js","mappings":"wFAI4BA,EAAAA,aAAA,SAAUC,GAClC,OACI,+BACKA,EAAMC,SAGlB,C,+FCPD,UACA,UAE+BC,EAAAA,gBAAA,SAAUF,GAAO,IAGxCG,EAHwC,E,2YAAA,EACd,IAAAC,UAASJ,EAAMK,UAAW,GADZ,GACrCA,EADqC,KAC5BC,EAD4B,KAoB5C,OAbIH,EAFAH,EAAMO,qBAEQ,yBAAGC,UAAU,cAAcC,wBAAyB,CAAEC,OAAQV,EAAMG,eAEpE,yBAAGK,UAAU,eAAeR,EAAMG,aAYhD,oBAAC,EAAAQ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wP,MAM7B,GAGkB,OAEnB,IAAA9F,YAAWkF,GAAWkB,OAAOhB,E","sources":["webpack://post-expirator/./assets/jsx/components/ButtonsPanel.jsx","webpack://post-expirator/./assets/jsx/components/CheckboxControl.jsx","webpack://post-expirator/./assets/jsx/components/DateOffsetPreview.jsx","webpack://post-expirator/./assets/jsx/components/DateTimePicker.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanel.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelAfterActionField.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBlockEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelBulkEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelClassicEditor.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelQuickEdit.jsx","webpack://post-expirator/./assets/jsx/components/FutureActionPanelTop.jsx","webpack://post-expirator/./assets/jsx/components/NonceControl.jsx","webpack://post-expirator/./assets/jsx/components/PostTypeSettingsPanel.jsx","webpack://post-expirator/./assets/jsx/components/PostTypesSettingsPanels.jsx","webpack://post-expirator/./assets/jsx/components/SelectControl.jsx","webpack://post-expirator/./assets/jsx/components/SettingRow.jsx","webpack://post-expirator/./assets/jsx/components/SettingsFieldset.jsx","webpack://post-expirator/./assets/jsx/components/SettingsForm.jsx","webpack://post-expirator/./assets/jsx/components/SettingsSection.jsx","webpack://post-expirator/./assets/jsx/components/SettingsTable.jsx","webpack://post-expirator/./assets/jsx/components/Spinner.jsx","webpack://post-expirator/./assets/jsx/components/SubmitButton.jsx","webpack://post-expirator/./assets/jsx/components/TextControl.jsx","webpack://post-expirator/./assets/jsx/components/ToggleArrowButton.jsx","webpack://post-expirator/./assets/jsx/components/ToggleCalendarDatePicker.jsx","webpack://post-expirator/./assets/jsx/components/TokensControl.jsx","webpack://post-expirator/./assets/jsx/components/TrueFalseControl.jsx","webpack://post-expirator/./assets/jsx/components/index.jsx","webpack://post-expirator/./assets/jsx/time.jsx","webpack://post-expirator/./assets/jsx/utils.jsx","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css","webpack://post-expirator/./node_modules/css-loader/dist/runtime/api.js","webpack://post-expirator/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://post-expirator/./node_modules/react-dom/client.js","webpack://post-expirator/./assets/jsx/components/css/dateOffsetPreview.css?541a","webpack://post-expirator/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://post-expirator/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://post-expirator/external var \"ReactDOM\"","webpack://post-expirator/external var \"publishpressFutureSettingsConfig\"","webpack://post-expirator/external var \"wp\"","webpack://post-expirator/external var \"wp.components\"","webpack://post-expirator/external var \"wp.data\"","webpack://post-expirator/external var \"wp.element\"","webpack://post-expirator/external var \"wp.hooks\"","webpack://post-expirator/external var \"wp.plugins\"","webpack://post-expirator/external var \"wp.url\"","webpack://post-expirator/webpack/bootstrap","webpack://post-expirator/webpack/runtime/compat get default export","webpack://post-expirator/webpack/runtime/define property getters","webpack://post-expirator/webpack/runtime/hasOwnProperty shorthand","webpack://post-expirator/webpack/runtime/make namespace object","webpack://post-expirator/webpack/runtime/nonce","webpack://post-expirator/./assets/jsx/settings-post-types.jsx"],"sourcesContent":["/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const ButtonsPanel = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState } from \"@wordpress/element\";\nimport { CheckboxControl as WPCheckboxControl } from \"@wordpress/components\";\n\nexport const CheckboxControl = function (props) {\n const [checked, setChecked] = useState(props.checked || false);\n\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n setChecked(value);\n\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n return (\n \n \n\n {description}\n \n )\n}\n","import {\n useState,\n useEffect,\n useRef,\n Fragment\n} from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { apiFetch } from '&wp';\n\nrequire('./css/dateOffsetPreview.css');\n\nexport const DateOffsetPreview = ({\n offset,\n label,\n labelDatePreview,\n labelOffsetPreview,\n setValidationErrorCallback,\n setHasPendingValidationCallback,\n setHasValidDataCallback,\n compactView = false\n}) => {\n const [offsetPreview, setOffsetPreview] = useState('');\n const [currentTime, setCurrentTime] = useState();\n\n const apiRequestControllerRef = useRef(new AbortController());\n\n const validateDateOffset = () => {\n if (offset) {\n const controller = apiRequestControllerRef.current;\n\n if (controller) {\n controller.abort();\n }\n\n apiRequestControllerRef.current = new AbortController();\n const { signal } = apiRequestControllerRef.current;\n\n setHasPendingValidationCallback(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`),\n method: 'POST',\n data: {\n offset\n },\n signal,\n }).then((result) => {\n setHasPendingValidationCallback(false);\n\n setHasValidDataCallback(result.isValid);\n setValidationErrorCallback(result.message);\n\n if (result.isValid) {\n setOffsetPreview(result.preview);\n setCurrentTime(result.currentTime);\n } else {\n setOffsetPreview('');\n }\n }).catch((error) => {\n if (error.name === 'AbortError') {\n return;\n }\n\n setHasPendingValidationCallback(false);\n setHasValidDataCallback(false);\n setValidationErrorCallback(error.message);\n setOffsetPreview('');\n });\n }\n }\n\n useEffect(() => {\n validateDateOffset();\n }, [offset]);\n\n const compactClass = compactView ? ' compact' : '';\n\n return (\n \n { offset && (\n
\n

{ label }

\n
\n
\n { labelDatePreview }: \n {currentTime}\n
\n
\n { labelOffsetPreview }: \n {offsetPreview}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default DateOffsetPreview;\n","import { normalizeUnixTimeToMilliseconds } from \"../time\";\nimport { DateTimePicker as WPDateTimePicker } from \"@wordpress/components\";\n\n\nexport const DateTimePicker = ({currentDate, onChange, is12Hour, startOfWeek}) => {\n if (typeof currentDate === 'number') {\n currentDate = normalizeUnixTimeToMilliseconds(currentDate);\n }\n\n return (\n \n )\n}\n","import { compact } from '../utils';\nimport { ToggleCalendarDatePicker } from './ToggleCalendarDatePicker';\nimport { PluginArea } from '@wordpress/plugins';\nimport { Fill, Slot, SlotFillProvider } from '@wordpress/components';\nimport { FutureActionPanelAfterActionField } from './FutureActionPanelAfterActionField';\nimport { FutureActionPanelTop } from './FutureActionPanelTop';\n\nconst { PanelRow, CheckboxControl, SelectControl, FormTokenField, Spinner, BaseControl } = wp.components;\nconst { Fragment, useEffect, useState } = wp.element;\nconst { decodeEntities } = wp.htmlEntities;\nconst { addQueryArgs } = wp.url;\nconst {\n useSelect,\n useDispatch\n} = wp.data;\nconst { apiFetch } = wp;\n\nexport const FutureActionPanel = (props) => {\n const {\n action,\n date,\n enabled,\n terms,\n taxonomy,\n taxonomyName,\n termsListByName,\n termsListById,\n isFetchingTerms,\n calendarIsVisible,\n hasValidData,\n newStatus,\n } = useSelect((select) => {\n return {\n action: select(props.storeName).getAction(),\n date: select(props.storeName).getDate(),\n enabled: select(props.storeName).getEnabled(),\n terms: select(props.storeName).getTerms(),\n taxonomy: select(props.storeName).getTaxonomy(),\n taxonomyName: select(props.storeName).getTaxonomyName(),\n termsListByName: select(props.storeName).getTermsListByName(),\n termsListById: select(props.storeName).getTermsListById(),\n isFetchingTerms: select(props.storeName).getIsFetchingTerms(),\n calendarIsVisible: select(props.storeName).getCalendarIsVisible(),\n hasValidData: select(props.storeName).getHasValidData(),\n newStatus: select(props.storeName).getNewStatus(),\n };\n });\n\n const [validationError, setValidationError] = useState('');\n\n const {\n setAction,\n setDate,\n setEnabled,\n setTerms,\n setTaxonomy,\n setTermsListByName,\n setTermsListById,\n setTaxonomyName,\n setIsFetchingTerms,\n setCalendarIsVisible,\n setHasValidData,\n setNewStatus\n } = useDispatch(props.storeName);\n\n const mapTermsListById = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n return termsListById[term];\n });\n }\n\n const insertTerm = (term) => {\n termsListByName[term] = { id: term, count: 0, description: \"\", link: \"\", name: term, slug: term, taxonomy: taxonomy };\n termsListById[term] = term;\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTerms([...terms, term]);\n\n }\n\n const mapTermsListByName = (terms) => {\n if (typeof terms !== 'object' || terms === null) {\n return {};\n }\n\n return terms.map((term) => {\n if (termsListByName[term]) {\n return termsListByName[term].id;\n }\n\n insertTerm(term);\n\n return term;\n });\n }\n\n const callOnChangeData = (attribute, value) => {\n if (typeof props.onChangeData === 'function') {\n props.onChangeData(attribute, value);\n }\n }\n\n const handleEnabledChange = (isChecked) => {\n setEnabled(isChecked);\n\n if (isChecked) {\n setAction(props.action);\n setDate(props.date);\n setNewStatus(props.newStatus);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n fetchTerms();\n }\n\n callOnChangeData('enabled', isChecked);\n }\n\n const handleActionChange = (value) => {\n setAction(value);\n\n callOnChangeData('action', value);\n }\n\n const handleNewStatusChange = (value) => {\n setNewStatus(value);\n\n callOnChangeData('newStatus', value);\n }\n\n const handleDateChange = (value) => {\n setDate(value);\n\n callOnChangeData('date', value);\n }\n\n const handleTermsChange = (value) => {\n value = mapTermsListByName(value);\n\n setTerms(value);\n\n callOnChangeData('terms', value);\n }\n\n const fetchTerms = () => {\n let termsListByName = {};\n let termsListById = {};\n\n if (!taxonomy) {\n return;\n }\n\n setIsFetchingTerms(true);\n\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${taxonomy}`),\n }).then((result) => {\n result.terms.forEach(term => {\n termsListByName[decodeEntities(term.name)] = term;\n termsListById[term.id] = decodeEntities(term.name);\n });\n\n setTermsListByName(termsListByName);\n setTermsListById(termsListById);\n setTaxonomyName(decodeEntities(result.taxonomyName));\n setIsFetchingTerms(false);\n });\n }\n\n const storeCalendarIsVisibleOnStorage = (value) => {\n localStorage.setItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context, value ? '1' : '0');\n }\n\n const getCalendarIsVisibleFromStorage = () => {\n return localStorage.getItem('FUTURE_ACTION_CALENDAR_IS_VISIBLE_' + props.context);\n }\n\n useEffect(() => {\n if (props.autoEnableAndHideCheckbox) {\n setEnabled(true);\n } else {\n setEnabled(props.enabled);\n }\n\n setAction(props.action);\n setNewStatus(props.newStatus);\n setDate(props.date);\n setTerms(props.terms);\n setTaxonomy(props.taxonomy);\n\n if (getCalendarIsVisibleFromStorage() === null) {\n setCalendarIsVisible(props.calendarIsVisible);\n } else {\n setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault);\n }\n\n // We need to get the value directly from the props because the value from the store is not updated yet\n if (props.enabled) {\n if (props.isCleanNewPost) {\n // Force populate the default values\n handleEnabledChange(true);\n }\n\n fetchTerms();\n }\n }, []);\n\n useEffect(() => {\n storeCalendarIsVisibleOnStorage(calendarIsVisible);\n }, [calendarIsVisible]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid();\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid();\n }\n }, [hasValidData]);\n\n let selectedTerms = [];\n if (terms && terms.length > 0 && termsListById) {\n selectedTerms = compact(mapTermsListById(terms));\n\n if (typeof selectedTerms === 'string') {\n selectedTerms = [];\n }\n }\n\n let termsListByNameKeys = [];\n if (typeof termsListByName === 'object' && termsListByName !== null) {\n termsListByNameKeys = Object.keys(termsListByName);\n }\n\n const panelClass = calendarIsVisible ? 'future-action-panel' : 'future-action-panel hidden-calendar';\n const contentPanelClass = calendarIsVisible ? 'future-action-panel-content' : 'future-action-panel-content hidden-calendar';\n const datePanelClass = calendarIsVisible ? 'future-action-date-panel' : 'future-action-date-panel hidden-calendar';\n\n let is24hour;\n if (props.timeFormat === 'inherited') {\n is24hour = !props.is12Hour;\n } else {\n is24hour = props.timeFormat === '24h';\n }\n\n const replaceCurlyBracketsWithLink = (string, href, target) => {\n const parts = string.split('{');\n const result = [];\n\n result.push(parts.shift());\n\n for (const part of parts) {\n const [before, after] = part.split('}');\n\n result.push(\n {before}\n );\n\n result.push(after);\n }\n\n return result;\n };\n\n // Remove items from actions list if related to taxonomies and there is no taxonmoy for the post type\n let actionsSelectOptions = props.actionsSelectOptions;\n if (!props.taxonomy) {\n actionsSelectOptions = props.actionsSelectOptions.filter((item) => {\n return ['category', 'category-add', 'category-remove', 'category-remove-all'].indexOf(item.value) === -1;\n });\n }\n\n const HelpText = replaceCurlyBracketsWithLink(props.strings.timezoneSettingsHelp, '/wp-admin/options-general.php#timezone_string', '_blank');\n const displayTaxonomyField = String(action).includes('category') && action !== 'category-remove-all';\n\n let termsFieldLabel = taxonomyName;\n switch (action) {\n case 'category':\n termsFieldLabel = props.strings.newTerms.replace('%s', taxonomyName);\n break;\n case 'category-remove':\n termsFieldLabel = props.strings.removeTerms.replace('%s', taxonomyName);\n break;\n case 'category-add':\n termsFieldLabel = props.strings.addTerms.replace('%s', taxonomyName);\n break;\n }\n\n const validateData = () => {\n let valid = true;\n\n if (!enabled) {\n setValidationError('');\n return true;\n }\n\n if (!action) {\n setValidationError(props.strings.errorActionRequired);\n valid = false;\n }\n\n if (!date) {\n setValidationError(props.strings.errorDateRequired);\n valid = false;\n }\n\n // Check if the date is in the past\n if (date && new Date(date) < new Date()) {\n setValidationError(props.strings.errorDateInPast);\n valid = false;\n }\n\n const isTermRequired = ['category', 'category-add', 'category-remove'].includes(action);\n const noTermIsSelected = terms.length === 0 || (terms.length === 1 && (terms[0] === '' || terms[0] === '0'));\n\n if (isTermRequired && noTermIsSelected) {\n setValidationError(props.strings.errorTermsRequired);\n valid = false;\n }\n\n if (valid) {\n setValidationError('');\n }\n\n return valid;\n }\n\n useEffect(() => {\n if (!enabled) {\n setHasValidData(true);\n setValidationError('');\n\n return;\n }\n\n setHasValidData(validateData());\n }, [action, date, enabled, terms, taxonomy]);\n\n // This adds a 'cancel' class to the input when the user clicks on the\n // field to prevent the form from being submitted. This is a workaround\n // for the issue on the quick-edit form where the form is submitted when\n // the user presses the 'Enter' key trying to add a term to the field.\n const forceIgnoreAutoSubmitOnEnter = (e) => {\n jQuery(e.target).addClass('cancel');\n }\n\n return (\n \n
\n {props.autoEnableAndHideCheckbox && (\n \n )}\n\n \n\n {!props.autoEnableAndHideCheckbox && (\n \n \n \n )}\n\n {enabled && (\n \n \n \n \n\n \n\n {action === 'change-status' &&\n \n \n \n }\n\n {\n displayTaxonomyField && (\n isFetchingTerms && (\n \n \n {`${props.strings.loading} (${taxonomyName})`}\n \n \n \n )\n || (!taxonomy && (\n \n \n
\n {props.strings.noTaxonomyFound}\n
\n
\n
\n )\n || (\n termsListByNameKeys.length === 0 && (\n \n \n
\n {props.strings.noTermsFound}\n
\n
\n
\n )\n || (\n \n \n \n \n \n )\n )\n )\n )\n }\n\n \n setCalendarIsVisible(!calendarIsVisible)}\n is12Hour={!is24hour}\n startOfWeek={props.startOfWeek}\n isExpanded={calendarIsVisible}\n strings={props.strings}\n />\n \n\n \n
\n
\n\n {HelpText}\n
\n
\n\n {!hasValidData && (\n \n \n
{validationError}
\n
\n
\n )}\n
\n )}\n
\n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelAfterActionField = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelAfterActionFieldSlot = (props) => (\n \n);\n\nFutureActionPanelAfterActionField.Slot = FutureActionPanelAfterActionFieldSlot;\n\nexport default FutureActionPanelAfterActionField;\n","import { FutureActionPanel } from './';\n\nexport const FutureActionPanelBlockEditor = (props) => {\n const { PluginDocumentSettingPanel } = wp.editPost;\n const { useDispatch, select } = wp.data;\n\n const { editPost } = useDispatch('core/editor');\n\n const editPostAttribute = (newAttribute) => {\n const attribute = {\n publishpress_future_action: {}\n };\n\n // For each property on newAttribute, set the value on attribute\n for (const [name, value] of Object.entries(newAttribute)) {\n attribute.publishpress_future_action[name] = value;\n }\n\n editPost(attribute);\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n const newAttribute = {\n 'enabled': store.getEnabled()\n }\n\n if (newAttribute.enabled) {\n newAttribute['action'] = store.getAction();\n newAttribute['newStatus'] = store.getNewStatus();\n newAttribute['date'] = store.getDate();\n newAttribute['terms'] = store.getTerms();\n newAttribute['taxonomy'] = store.getTaxonomy();\n newAttribute['extraData'] = store.getExtraData();\n }\n\n editPostAttribute(newAttribute);\n }\n\n const data = select('core/editor').getEditedPostAttribute('publishpress_future_action');\n\n const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');\n\n const onDataIsValid = () => {\n unlockPostSaving('future-action');\n }\n\n const onDataIsInvalid = () => {\n lockPostSaving('future-action');\n }\n\n return (\n \n
\n \n
\n \n );\n};\n","import { FutureActionPanel, SelectControl } from '.';\nimport { getElementByName } from '../utils';\n\nexport const FutureActionPanelBulkEdit = (props) => {\n const { useSelect, useDispatch, select } = wp.data;\n const { useEffect } = wp.element;\n\n const onChangeData = (attribute, value) => {\n getElementByName('future_action_bulk_enabled').value = select(props.storeName).getEnabled() ? 1 : 0;\n getElementByName('future_action_bulk_action').value = select(props.storeName).getAction();\n getElementByName('future_action_bulk_new_status').value = select(props.storeName).getNewStatus();\n getElementByName('future_action_bulk_date').value = select(props.storeName).getDate();\n getElementByName('future_action_bulk_terms').value = select(props.storeName).getTerms().join(',');\n getElementByName('future_action_bulk_taxonomy').value = select(props.storeName).getTaxonomy();\n }\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const changeAction = useSelect((select) => select(props.storeName).getChangeAction(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n\n const {\n setChangeAction\n } = useDispatch(props.storeName);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const handleStrategyChange = (value) => {\n setChangeAction(value);\n };\n\n const options = [\n { value: 'no-change', label: props.strings.noChange },\n { value: 'change-add', label: props.strings.changeAdd },\n { value: 'add-only', label: props.strings.addOnly },\n { value: 'change-only', label: props.strings.changeOnly },\n { value: 'remove-only', label: props.strings.removeOnly },\n ];\n\n const optionsToDisplayPanel = ['change-add', 'add-only', 'change-only'];\n\n useEffect(() => {\n // We are not using onDataIsValid and onDataIsInvalid because we need to enable/disable the button\n // also based on the changeAction value.\n if (hasValidData || changeAction === 'no-change') {\n jQuery('#bulk_edit').prop('disabled', false);\n } else {\n jQuery('#bulk_edit').prop('disabled', true);\n }\n }, [hasValidData, changeAction]);\n\n return (\n
\n \n\n {optionsToDisplayPanel.includes(changeAction) && (\n \n )}\n\n {/* Bulk edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { FutureActionPanel } from \"./\";\nimport { select, useSelect } from \"@wordpress/data\";\nimport { useEffect } from \"@wordpress/element\";\n\nexport const FutureActionPanelClassicEditor = (props) => {\n const browserTimezoneOffset = new Date().getTimezoneOffset();\n\n const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n }\n\n const onChangeData = (attribute, value) => {\n const store = select(props.storeName);\n\n getElementByName('future_action_enabled').value = store.getEnabled() ? 1 : 0;\n getElementByName('future_action_action').value = store.getAction();\n getElementByName('future_action_new_status').value = store.getNewStatus();\n getElementByName('future_action_date').value = store.getDate();\n getElementByName('future_action_terms').value = store.getTerms().join(',');\n getElementByName('future_action_taxonomy').value = store.getTaxonomy();\n }\n\n const getTermsFromElementByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return [];\n }\n\n let terms = element.value.split(',');\n\n if (terms.length === 1 && terms[0] === '') {\n terms = [];\n }\n\n return terms.map(term => parseInt(term));\n }\n\n const getElementValueByName = (name) => {\n const element = getElementByName(name);\n if (!element) {\n return '';\n }\n\n return element.value;\n }\n\n const data = {\n enabled: getElementValueByName('future_action_enabled') === '1',\n action: getElementValueByName('future_action_action'),\n newStatus: getElementValueByName('future_action_new_status'),\n date: getElementValueByName('future_action_date'),\n terms: getTermsFromElementByName('future_action_terms'),\n taxonomy: getElementValueByName('future_action_taxonomy'),\n };\n\n const onDataIsValid = () => {\n jQuery('#publish').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('#publish').prop('disabled', true);\n }\n\n return (\n
\n \n
\n );\n};\n","import { FutureActionPanel } from './';\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\nexport const FutureActionPanelQuickEdit = (props) => {\n const onChangeData = (attribute, value) => {};\n\n const date = useSelect((select) => select(props.storeName).getDate(), []);\n const enabled = useSelect((select) => select(props.storeName).getEnabled(), []);\n const action = useSelect((select) => select(props.storeName).getAction(), []);\n const terms = useSelect((select) => select(props.storeName).getTerms(), []);\n const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []);\n const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []);\n const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []);\n\n let termsString = terms;\n if (typeof terms === 'object') {\n termsString = terms.join(',');\n }\n\n const onDataIsValid = () => {\n jQuery('.button-primary.save').prop('disabled', false);\n }\n\n const onDataIsInvalid = () => {\n jQuery('.button-primary.save').prop('disabled', true);\n }\n\n return (\n
\n \n\n {/* Quick edit JS code will save only fields with name inside the edit row */}\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Slot, Fill } from '@wordpress/components';\n\nexport const FutureActionPanelTop = ({ children }) => (\n \n {children}\n \n);\n\nconst FutureActionPanelTopSlot = (props) => (\n \n);\n\nFutureActionPanelTop.Slot = FutureActionPanelTopSlot;\n\nexport default FutureActionPanelTop;\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const NonceControl = function (props) {\n if (! props.name) {\n props.name = '_wpnonce';\n }\n\n if (! props.referrer) {\n props.referrer = true;\n }\n\n return (\n \n \n\n {props.referrer &&\n \n }\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingRow,\n SettingsTable,\n SelectControl,\n TextControl,\n TokensControl,\n CheckboxControl\n} from './';\nimport { useEffect, useState } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { applyFilters } from '@wordpress/hooks';\nimport { apiFetch } from '&wp';\nimport DateOffsetPreview from './DateOffsetPreview';\n\nconst { PanelRow } = wp.components;\n\nexport const PostTypeSettingsPanel = function (props) {\n const originalExpireTypeList = props.expireTypeList[props.postType];\n\n const [postTypeTaxonomy, setPostTypeTaxonomy] = useState(props.settings.taxonomy);\n const [termOptions, setTermOptions] = useState([]);\n const [termsSelectIsLoading, setTermsSelectIsLoading] = useState(false);\n const [selectedTerms, setSelectedTerms] = useState([]);\n const [settingHowToExpire, setSettingHowToExpire] = useState(props.settings.howToExpire);\n const [isActive, setIsActive] = useState(props.settings.active);\n const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset);\n const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification);\n const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled);\n const [hasValidData, setHasValidData] = useState(true);\n const [validationError, setValidationError] = useState('');\n const [taxonomyLabel, setTaxonomyLabel] = useState('');\n const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList);\n const [newStatus, setNewStatus] = useState(props.settings.newStatus);\n const [hasPendingValidation, setHasPendingValidation] = useState(false);\n\n const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset;\n\n const taxonomyRelatedActions = [\n 'category',\n 'category-add',\n 'category-remove',\n 'category-remove-all'\n ];\n\n const onChangeTaxonomy = function (value) {\n setPostTypeTaxonomy(value);\n };\n\n const onChangeTerms = (value) => {\n setSelectedTerms(value);\n };\n\n const onChangeHowToExpire = (value) => {\n setSettingHowToExpire(value);\n }\n\n const onChangeActive = (value) => {\n setIsActive(value);\n }\n\n const onChangeExpireOffset = (value) => {\n setExpireOffset(value);\n }\n\n const onChangeEmailNotification = (value) => {\n setEmailNotification(value);\n }\n\n const onChangeAutoEnabled = (value) => {\n setIsAutoEnabled(value);\n }\n\n useEffect(() => {\n // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type\n if (props.taxonomiesList.length === 0) {\n let newExpireTypeList = [];\n\n newExpireTypeList = howToExpireList.filter((item) => {\n return taxonomyRelatedActions.indexOf(item.value) === -1;\n });\n\n setHowToExpireList(newExpireTypeList);\n }\n }, []);\n\n useEffect(() => {\n if (!postTypeTaxonomy || !props.taxonomiesList) {\n return;\n }\n\n setTermsSelectIsLoading(true);\n apiFetch({\n path: addQueryArgs(`publishpress-future/v1/terms/${postTypeTaxonomy}`),\n }).then((result) => {\n let options = [];\n\n let settingsTermsOptions = null;\n let option;\n\n result.terms.forEach(term => {\n option = { value: term.id, label: term.name };\n options.push(option);\n\n if (postTypeTaxonomy === props.settings.taxonomy && props.settings.terms.includes(term.id)) {\n if (settingsTermsOptions === null) {\n settingsTermsOptions = [];\n }\n\n settingsTermsOptions.push(option.label);\n }\n });\n\n setTermOptions(options);\n setSelectedTerms(settingsTermsOptions);\n setTermsSelectIsLoading(false);\n });\n\n props.taxonomiesList.forEach((taxonomy) => {\n if (taxonomy.value === postTypeTaxonomy) {\n setTaxonomyLabel(taxonomy.label);\n }\n });\n }, [postTypeTaxonomy]);\n\n useEffect(() => {\n if (!taxonomyLabel) {\n return;\n }\n\n // Update the list of actions replacing the taxonomy name.\n let newExpireTypeList = [];\n\n originalExpireTypeList.forEach((expireType) => {\n let label = expireType.label;\n\n if (taxonomyRelatedActions.indexOf(expireType.value) !== -1) {\n label = label.replace('%s', taxonomyLabel.toLowerCase());\n }\n\n newExpireTypeList.push({\n value: expireType.value,\n label: label\n });\n });\n\n setHowToExpireList(newExpireTypeList);\n }, [taxonomyLabel]);\n\n useEffect(() => {\n if (hasValidData && props.onDataIsValid) {\n props.onDataIsValid(props.postType);\n }\n\n if (!hasValidData && props.onDataIsInvalid) {\n props.onDataIsInvalid(props.postType);\n }\n }, [hasValidData]);\n\n useEffect(() => {\n if (hasPendingValidation && props.onValidationStarted) {\n props.onValidationStarted(props.postType);\n }\n\n if (!hasPendingValidation && props.onValidationFinished) {\n props.onValidationFinished(props.postType);\n }\n }, [hasPendingValidation]);\n\n const termOptionsLabels = termOptions.map((term) => term.label);\n\n let settingsRows = [\n \n \n \n ];\n\n if (isActive) {\n settingsRows.push(\n \n \n \n );\n\n settingsRows.push(\n \n \n \n \n );\n\n settingsRows.push(\n \n \n\n {settingHowToExpire === 'change-status' &&\n \n }\n\n {(props.taxonomiesList.length > 0 && (['category', 'category-add', 'category-remove'].indexOf(settingHowToExpire) > -1)) &&\n \n }\n \n );\n\n settingsRows.push(\n \n \n\n \n \n );\n\n settingsRows.push(\n \n \n \n );\n }\n\n settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState);\n\n const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden';\n\n return (\n
\n \n\n {! hasValidData && (\n \n
\n {props.text.error}: {validationError}\n
\n
\n )}\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport { PostTypeSettingsPanel } from \"./\";\nimport { useState } from \"@wordpress/element\";\n\nexport const PostTypesSettingsPanels = function (props) {\n const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]);\n\n let panels = [];\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n panels.push(\n \n );\n }\n\n const onSelectTab = (event) => {\n event.preventDefault();\n setCurrentTab(event.target.hash.replace('#', '').replace('-panel', ''));\n }\n\n let tabs = [];\n let selected = false;\n\n for (const [postType, postTypeSettings] of Object.entries(props.settings)) {\n selected = currentTab === postType;\n tabs.push(\n \n {postTypeSettings.label}\n \n );\n }\n\n return (\n
\n \n {panels}\n
\n );\n}\n\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { SelectControl as WPSelectControl } from \"@wordpress/components\";\n\nexport const SelectControl = function (props) {\n const onChange = (value) => {\n props.onChange(value);\n };\n\n return (\n \n {props.options.length === 0 && (\n
{props.noItemFoundMessage}
\n )}\n\n {props.options.length > 0 && (\n \n )}\n\n {props.children}\n\n

{props.description}

\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingRow = function (props) {\n return (\n \n \n \n \n \n {props.children}\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsFieldset = function (props) {\n return (\n
\n {props.legend}\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsForm = function (props) {\n return (\n
\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\n\nexport const SettingsSection = function (props) {\n return (\n \n

{props.title}

\n

{props.description}

\n {props.children}\n
\n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SettingsTable = function (props) {\n return (\n \n \n {props.bodyChildren}\n \n
\n )\n}\n","/*\n * Copyright (c) 2024. PublishPress, All rights reserved.\n */\nexport const Spinner = function (props) {\n return (\n
\n );\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const SubmitButton = function (props) {\n return (\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment } from \"@wordpress/element\";\nimport { TextControl as WPTextControl } from \"@wordpress/components\";\nimport { Spinner } from \"./\";\n\nexport const TextControl = function (props) {\n let description;\n\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n\n const onChange = function (value) {\n if (props.onChange) {\n props.onChange(value);\n }\n };\n\n let className = props.className ? props.className : '';\n\n if (props.loading) {\n className += ' publishpress-future-loading publishpress-future-loading-input';\n }\n\n return (\n \n
\n \n\n {props.loading && }\n\n {description}\n
\n
\n )\n}\n","import { Button } from '@wordpress/components';\n\nexport const ToggleArrowButton = function (props) {\n const onClick = function () {\n if (props.onClick) {\n props.onClick();\n }\n };\n\n const iconExpanded = props.iconExpanded ? props.iconExpanded : 'arrow-up-alt2';\n const iconCollapsed = props.iconCollapsed ? props.iconCollapsed : 'arrow-down-alt2';\n\n const icon = props.isExpanded ? iconExpanded : iconCollapsed;\n\n const title = props.isExpanded ? props.titleExpanded : props.titleCollapsed;\n\n return (\n \n )\n}\n","import { ToggleArrowButton } from \"./ToggleArrowButton\";\nimport { DateTimePicker } from \"./DateTimePicker\";\nimport { Fragment, useEffect } from \"@wordpress/element\";\n\nexport const ToggleCalendarDatePicker = (\n {\n isExpanded,\n strings,\n onToggleCalendar,\n currentDate,\n onChangeDate,\n is12Hour,\n startOfWeek\n }\n) => {\n useEffect(() => {\n // Move the element of the toggle button to between the time and date elements.\n const toggleButtonElement = document.querySelector('.future-action-calendar-toggle');\n\n if (! toggleButtonElement) {\n return;\n }\n\n const dateTimeElement = toggleButtonElement.nextElementSibling;\n\n if (! dateTimeElement) {\n return;\n }\n\n const timeElement = dateTimeElement.querySelector('.components-datetime__time');\n\n if (! timeElement) {\n return;\n }\n\n const dateElement = timeElement.nextSibling;\n\n if (! dateElement) {\n return;\n }\n\n dateTimeElement.insertBefore(toggleButtonElement, dateElement)\n });\n\n return (\n \n \n\n \n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\nimport { Fragment, useState, useEffect } from \"@wordpress/element\";\nimport { FormTokenField } from \"@wordpress/components\";\n\nexport const TokensControl = (props) => {\n const [stringValue, setStringValue] = useState('');\n\n useEffect(() => {\n if (props.value) {\n setStringValue(props.value.join(','));\n }\n }, [props.value]);\n\n let description;\n\n if (props.description) {\n if (props.unescapedDescription) {\n // If using this option, the HTML has to be escaped before injected into the JS interface.\n description =

;\n } else {\n description =

{props.description}

;\n }\n }\n\n const onChange = (value) => {\n if (props.onChange) {\n props.onChange(value);\n }\n\n if (typeof value === 'object') {\n setStringValue(value.join(','));\n } else {\n setStringValue('');\n }\n }\n\n const value = props.value ? props.value : [];\n \n return (\n \n \n \n\n {description}\n \n )\n}\n","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nexport const TrueFalseControl = function (props) {\n const { Fragment } = wp.element;\n\n const onChange = (e) => {\n if (props.onChange) {\n props.onChange(\n e.target.value === props.trueValue && jQuery(e.target).is(':checked')\n );\n // Check only the true radio... using the field name? or directly the ID\n }\n };\n\n return (\n \n \n\n \n   \n \n {props.falseLabel}\n\n

{props.description}

\n
\n )\n}\n","export { ButtonsPanel } from \"./ButtonsPanel\";\nexport { FutureActionPanel } from \"./FutureActionPanel\";\nexport { FutureActionPanelBlockEditor } from \"./FutureActionPanelBlockEditor\";\nexport { FutureActionPanelClassicEditor } from \"./FutureActionPanelClassicEditor\";\nexport { FutureActionPanelQuickEdit } from \"./FutureActionPanelQuickEdit\";\nexport { FutureActionPanelBulkEdit } from \"./FutureActionPanelBulkEdit\";\nexport { PostTypeSettingsPanel } from \"./PostTypeSettingsPanel\";\nexport { PostTypesSettingsPanels } from \"./PostTypesSettingsPanels\";\nexport { SettingRow } from \"./SettingRow\";\nexport { SettingsFieldset } from \"./SettingsFieldset\";\nexport { SettingsForm } from \"./SettingsForm\";\nexport { SettingsSection } from \"./SettingsSection\";\nexport { SettingsTable } from \"./SettingsTable\";\nexport { SubmitButton } from \"./SubmitButton\";\nexport { CheckboxControl } from \"./CheckboxControl\";\nexport { SelectControl } from \"./SelectControl\";\nexport { TextControl } from \"./TextControl\";\nexport { TokensControl } from \"./TokensControl\";\nexport { NonceControl } from \"./NonceControl\";\nexport { TrueFalseControl } from \"./TrueFalseControl\";\nexport { Spinner } from \"./Spinner\";\nexport { DateOffsetPreview } from \"./DateOffsetPreview\";\n","export const getCurrentTimeInSeconds = () => {\n return normalizeUnixTimeToSeconds(new Date().getTime());\n}\n\nexport const getCurrentTimeAsTimestamp = () => {\n return formatUnixTimeToTimestamp(getCurrentTimeInSeconds());\n}\n\nexport const formatUnixTimeToTimestamp = (unixTimestamp) => {\n const date = new Date(\n normalizeUnixTimeToSeconds(unixTimestamp)\n );\n\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2); // Months are zero-based\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;\n}\n\nexport const formatTimestampToUnixTime = (time) => {\n const date = new Date(time);\n\n return normalizeUnixTimeToSeconds(date.getTime());\n}\n\nexport const timeIsInSeconds = (time) => {\n return parseInt(time).toString().length <= 10;\n}\n\nexport const normalizeUnixTimeToSeconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time : time / 1000;\n}\n\nexport const normalizeUnixTimeToMilliseconds = (time) => {\n time = parseInt(time);\n\n return timeIsInSeconds() ? time * 1000 : time;\n}\n","export const compact = (array) => {\n if (!array) {\n return [];\n }\n\n if (! Array.isArray(array) && typeof array === 'object') {\n array = Object.values(array);\n }\n\n return array.filter((item) => {\n return item !== null && item !== undefined && item !== '';\n });\n}\n\nexport const debugLogFactory = (config) => {\n return (description, ...message) => {\n if (console && config.isDebugEnabled) {\n console.debug('[Future]', description, ...message);\n }\n }\n}\n\nexport const isGutenbergEnabled = () => {\n return document.body.classList.contains('block-editor-page');\n}\n\nexport const getElementByName = (name) => {\n return document.getElementsByName(name)[0];\n}\n\nexport const getFieldByName = (name, postId) => {\n return document.querySelector(`#the-list tr#post-${postId} .column-expirationdate input#future_action_${name}-${postId}`);\n}\n\nexport const getFieldValueByName = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return null;\n }\n\n return field.value;\n};\n\nexport const getFieldValueByNameAsArrayOfInt = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field || !field.value) {\n return [];\n }\n\n if (typeof field.value === 'number') {\n field.value = field.value.toString();\n }\n\n return field.value.split(',').map(term => parseInt(term));\n};\n\nexport const getFieldValueByNameAsBool = (name, postId) => {\n const field = getFieldByName(name, postId);\n\n if (!field) {\n return false;\n }\n\n return field.value === '1' || field.value === 'true';\n}\n\nexport const getActionSettingsFromColumnData = (postId) => {\n const columnData = document.querySelector(`#post-expire-column-${postId}`);\n\n if (!columnData) {\n return {};\n }\n\n return {\n enabled: columnData.dataset.actionEnabled === '1',\n action: columnData.dataset.actionType,\n date: columnData.dataset.actionDate,\n dateUnix: columnData.dataset.actionDateUnix,\n taxonomy: columnData.dataset.actionTaxonomy,\n terms: columnData.dataset.actionTerms,\n newStatus: columnData.dataset.actionNewStatus,\n };\n}\n\n/**\n * This function is used to determine if a value is a number, including strings.\n *\n * @param {*} value\n * @returns\n */\nexport const isNumber = (value) => {\n return !isNaN(value);\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.publishpress-future-date-preview .publishpress-future-date-preview-value {\n font-family: monospace;\n background-color: #e7e7e7;\n padding: 2px 4px;\n}\n\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\n display: block;\n}\n\n.publishpress-future-date-preview.compact {\n margin-bottom: 8px;\n}\n\n.publishpress-future-date-preview.compact h4 {\n font-size: 11px;\n font-weight: 500;\n line-height: 1.4;\n text-transform: uppercase;\n display: inline-block;\n margin-bottom: calc(8px);\n padding: 0px;\n flex-shrink: 0;\n margin-right: 12px;\n max-width: 75%;\n margin-top: 0;\n}\n\n.publishpress-future-notice.publishpress-future-notice-error {\n color: #dc3232;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./assets/jsx/components/css/dateOffsetPreview.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;IACtB,yBAAyB;IACzB,gBAAgB;AACpB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,aAAa;AACjB;;AAEA;IACI,cAAc;AAClB\",\"sourcesContent\":[\".publishpress-future-date-preview .publishpress-future-date-preview-value {\\n font-family: monospace;\\n background-color: #e7e7e7;\\n padding: 2px 4px;\\n}\\n\\n.publishpress-future-date-preview.compact .publishpress-future-date-preview-label {\\n display: block;\\n}\\n\\n.publishpress-future-date-preview.compact {\\n margin-bottom: 8px;\\n}\\n\\n.publishpress-future-date-preview.compact h4 {\\n font-size: 11px;\\n font-weight: 500;\\n line-height: 1.4;\\n text-transform: uppercase;\\n display: inline-block;\\n margin-bottom: calc(8px);\\n padding: 0px;\\n flex-shrink: 0;\\n margin-right: 12px;\\n max-width: 75%;\\n margin-top: 0;\\n}\\n\\n.publishpress-future-notice.publishpress-future-notice-error {\\n color: #dc3232;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/postcss-loader/dist/cjs.js!./dateOffsetPreview.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = ReactDOM;","module.exports = publishpressFutureSettingsConfig;","module.exports = wp;","module.exports = wp.components;","module.exports = wp.data;","module.exports = wp.element;","module.exports = wp.hooks;","module.exports = wp.plugins;","module.exports = wp.url;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","/*\n * Copyright (c) 2023. PublishPress, All rights reserved.\n */\n\nimport {\n SettingsForm,\n SettingsSection,\n PostTypesSettingsPanels,\n SubmitButton,\n ButtonsPanel,\n NonceControl\n} from \"./components\";\n\nimport { StrictMode, useState, useEffect } from \"@wordpress/element\";\n\nimport { createRoot } from 'react-dom/client';\n\nimport {\n nonce,\n referrer,\n settings,\n expireTypeList,\n taxonomiesList,\n text,\n statusesList\n} from \"&config.settings-post-types\";\nimport { render } from \"react-dom\";\n\nconst SettingsFormPanel = (props) => {\n const [formValidationStatusPerPostType, setFormValidationStatusPerPostType] = useState({});\n const [pendingValidationPerPostType, setPendingValidationPerPostType] = useState({});\n const [allValid, setAllValid] = useState(true);\n const [hasNoPendingValidation, setHasNoPendingValidation] = useState(true);\n\n useEffect(() => {\n let allFormsAreValid = true;\n\n for (const [postType, isValidForPostType] of Object.entries(formValidationStatusPerPostType)) {\n if (!isValidForPostType) {\n allFormsAreValid = false;\n break;\n }\n }\n\n setAllValid(allFormsAreValid);\n }, [formValidationStatusPerPostType]);\n\n useEffect(() => {\n let hasNoPendingValidation = true;\n\n for (const [postType, hasPending] of Object.entries(pendingValidationPerPostType)) {\n if (hasPending) {\n hasNoPendingValidation = false;\n break;\n }\n }\n\n setHasNoPendingValidation(hasNoPendingValidation);\n }, [pendingValidationPerPostType]);\n\n const onDataIsValid = (postType) => {\n formValidationStatusPerPostType[postType] = true;\n setFormValidationStatusPerPostType({...formValidationStatusPerPostType});\n }\n\n const onDataIsInvalid = (postType) => {\n formValidationStatusPerPostType[postType] = false;\n setFormValidationStatusPerPostType({...formValidationStatusPerPostType});\n }\n\n const onValidationStarted = (postType) => {\n pendingValidationPerPostType[postType] = true;\n setPendingValidationPerPostType({...pendingValidationPerPostType});\n }\n\n const onValidationFinished = (postType) => {\n pendingValidationPerPostType[postType] = false;\n setPendingValidationPerPostType({...pendingValidationPerPostType});\n }\n\n const saveButtonText = hasNoPendingValidation ? text.saveChanges : text.saveChangesPendingValidation;\n\n return (\n \n \n \n \n \n \n\n \n \n \n \n \n )\n};\n\nconst container = document.getElementById(\"publishpress-future-settings-post-types\");\nconst component = ();\n\ncreateRoot(container).render(component);\n"],"names":["ButtonsPanel","props","children","CheckboxControl","description","useState","checked","setChecked","unescapedDescription","className","dangerouslySetInnerHTML","__html","Fragment","label","name","id","onChange","value","require","DateOffsetPreview","offset","labelDatePreview","labelOffsetPreview","setValidationErrorCallback","setHasPendingValidationCallback","setHasValidDataCallback","compactView","offsetPreview","setOffsetPreview","currentTime","setCurrentTime","apiRequestControllerRef","useRef","AbortController","useEffect","controller","current","abort","signal","apiFetch","path","addQueryArgs","method","data","then","result","isValid","message","preview","catch","error","validateDateOffset","compactClass","DateTimePicker","currentDate","is12Hour","startOfWeek","normalizeUnixTimeToMilliseconds","__nextRemoveHelpButton","wp","components","PanelRow","SelectControl","FormTokenField","Spinner","BaseControl","element","decodeEntities","htmlEntities","url","useSelect","useDispatch","FutureActionPanel","select","action","storeName","getAction","date","getDate","enabled","getEnabled","terms","getTerms","taxonomy","getTaxonomy","taxonomyName","getTaxonomyName","termsListByName","getTermsListByName","termsListById","getTermsListById","isFetchingTerms","getIsFetchingTerms","calendarIsVisible","getCalendarIsVisible","hasValidData","getHasValidData","newStatus","getNewStatus","validationError","setValidationError","setAction","setDate","setEnabled","setTerms","setTaxonomy","setTermsListByName","setTermsListById","setTaxonomyName","setIsFetchingTerms","setCalendarIsVisible","setHasValidData","setNewStatus","insertTerm","term","count","link","slug","callOnChangeData","attribute","onChangeData","handleEnabledChange","isChecked","fetchTerms","forEach","getCalendarIsVisibleFromStorage","localStorage","getItem","context","autoEnableAndHideCheckbox","hideCalendarByDefault","isCleanNewPost","setItem","onDataIsValid","onDataIsInvalid","selectedTerms","length","compact","map","mapTermsListById","termsListByNameKeys","Object","keys","is24hour","panelClass","contentPanelClass","datePanelClass","timeFormat","actionsSelectOptions","filter","item","indexOf","HelpText","string","href","target","parts","split","push","shift","before","after","key","replaceCurlyBracketsWithLink","strings","timezoneSettingsHelp","displayTaxonomyField","String","includes","termsFieldLabel","newTerms","replace","removeTerms","addTerms","valid","errorActionRequired","errorDateRequired","Date","errorDateInPast","isTermRequired","noTermIsSelected","errorTermsRequired","validateData","SlotFillProvider","type","FutureActionPanelTop","Slot","fillProps","enablePostExpiration","options","FutureActionPanelAfterActionField","statusesSelectOptions","loading","noTaxonomyFound","noTermsFound","suggestions","mapTermsListByName","placeholder","addTermsPlaceholder","maxSuggestions","onFocus","e","jQuery","addClass","__experimentalExpandOnFocus","__experimentalAutoSelectFirstMatch","ToggleCalendarDatePicker","onChangeDate","onToggleCalendar","isExpanded","PluginArea","scope","Fill","FutureActionPanelBlockEditor","PluginDocumentSettingPanel","editPost","getEditedPostAttribute","lockPostSaving","unlockPostSaving","title","panelTitle","initialOpen","postTypeDefaultConfig","autoEnable","postType","store","newAttribute","getExtraData","publishpress_future_action","entries","editPostAttribute","FutureActionPanelBulkEdit","changeAction","getChangeAction","setChangeAction","termsString","join","noChange","changeAdd","addOnly","changeOnly","removeOnly","prop","futureActionUpdate","isNewPost","getElementByName","nonce","FutureActionPanelClassicEditor","getTimezoneOffset","document","getElementsByName","getElementValueByName","parseInt","getTermsFromElementByName","FutureActionPanelQuickEdit","NonceControl","referrer","PostTypeSettingsPanel","originalExpireTypeList","expireTypeList","settings","postTypeTaxonomy","setPostTypeTaxonomy","termOptions","setTermOptions","termsSelectIsLoading","setTermsSelectIsLoading","setSelectedTerms","howToExpire","settingHowToExpire","setSettingHowToExpire","active","isActive","setIsActive","defaultExpireOffset","expireOffset","setExpireOffset","emailNotification","setEmailNotification","autoEnabled","isAutoEnabled","setIsAutoEnabled","taxonomyLabel","setTaxonomyLabel","howToExpireList","setHowToExpireList","hasPendingValidation","setHasPendingValidation","globalDefaultExpireOffset","taxonomyRelatedActions","newExpireTypeList","taxonomiesList","settingsTermsOptions","option","expireType","toLowerCase","onValidationStarted","onValidationFinished","termOptionsLabels","settingsRows","SettingRow","text","fieldActive","fieldActiveLabel","fieldAutoEnable","fieldAutoEnableLabel","fieldTaxonomy","selected","noItemFoundMessage","noItemsfound","fieldTaxonomyDescription","fieldHowToExpire","fieldHowToExpireDescription","statusesList","TokensControl","fieldTerm","isLoading","fieldTermDescription","expandOnFocus","autoSelectFirstMatch","fieldDefaultDateTimeOffset","TextControl","fieldDefaultDateTimeOffsetDescription","datePreview","datePreviewCurrent","datePreviewComputed","fieldWhoToNotify","fieldWhoToNotifyDescription","applyFilters","fieldSetClassNames","isVisible","SettingsTable","bodyChildren","PostTypesSettingsPanels","currentTab","setCurrentTab","panels","postTypeSettings","legend","onSelectTab","event","preventDefault","hash","tabs","onClick","valign","htmlFor","SettingsFieldset","SettingsForm","SettingsSection","SubmitButton","disabled","ToggleArrowButton","iconExpanded","iconCollapsed","icon","titleExpanded","titleCollapsed","Button","isSmall","toggleButtonElement","querySelector","dateTimeElement","nextElementSibling","timeElement","dateElement","nextSibling","insertBefore","hideCalendar","showCalendar","stringValue","setStringValue","TrueFalseControl","trueValue","is","defaultChecked","trueLabel","falseValue","falseLabel","getCurrentTimeInSeconds","normalizeUnixTimeToSeconds","getTime","formatUnixTimeToTimestamp","getCurrentTimeAsTimestamp","unixTimestamp","getFullYear","getMonth","slice","getHours","getMinutes","getSeconds","timeIsInSeconds","formatTimestampToUnixTime","time","toString","getFieldByName","array","Array","isArray","values","debugLogFactory","config","console","isDebugEnabled","debug","isGutenbergEnabled","body","classList","contains","postId","getFieldValueByName","field","getFieldValueByNameAsArrayOfInt","getFieldValueByNameAsBool","getActionSettingsFromColumnData","columnData","dataset","actionEnabled","actionType","actionDate","dateUnix","actionDateUnix","actionTaxonomy","actionTerms","actionNewStatus","isNumber","isNaN","___CSS_LOADER_EXPORT___","module","exports","cssWithMappingToString","list","this","content","needLayer","concat","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","sourceMapping","m","createRoot","hydrateRoot","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","style","styleTarget","window","HTMLIFrameElement","contentDocument","head","getTarget","Error","appendChild","createElement","attributes","styleElement","setAttribute","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","ReactDOM","publishpressFutureSettingsConfig","hooks","plugins","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prototype","hasOwnProperty","call","r","Symbol","toStringTag","nc","container","getElementById","component","formValidationStatusPerPostType","setFormValidationStatusPerPostType","pendingValidationPerPostType","setPendingValidationPerPostType","allValid","setAllValid","hasNoPendingValidation","setHasNoPendingValidation","allFormsAreValid","saveButtonText","saveChanges","saveChangesPendingValidation","StrictMode","settingsSectionTitle","settingsSectionDescription","render"],"sourceRoot":""} \ No newline at end of file diff --git a/assets/jsx/block-editor.jsx b/assets/jsx/block-editor.jsx index 5c412066e..5140e19db 100644 --- a/assets/jsx/block-editor.jsx +++ b/assets/jsx/block-editor.jsx @@ -11,7 +11,8 @@ import { taxonomyName, postTypeDefaultConfig, defaultDate, - statusesSelectOptions + statusesSelectOptions, + hideCalendarByDefault } from "&config.block-editor"; const storeName = 'publishpress-future/future-action'; @@ -41,7 +42,9 @@ const BlockEditorFutureActionPlugin = () => { storeName={storeName} strings={strings} taxonomyName={taxonomyName} - postTypeDefaultConfig={postTypeDefaultConfig} /> + postTypeDefaultConfig={postTypeDefaultConfig} + hideCalendarByDefault={hideCalendarByDefault} + /> ); } diff --git a/assets/jsx/bulk-edit.jsx b/assets/jsx/bulk-edit.jsx index 9de4a8df9..0f14dd1f1 100644 --- a/assets/jsx/bulk-edit.jsx +++ b/assets/jsx/bulk-edit.jsx @@ -1,6 +1,6 @@ import { FutureActionPanelBulkEdit } from './components'; import { createStore } from './data'; -import { createRoot } from '@wordpress/element'; +import { createRoot } from 'react-dom/client'; import { select, dispatch } from '@wordpress/data'; import { inlineEditPost } from "&window"; import { @@ -15,7 +15,8 @@ import { strings, taxonomyName, nonce, - statusesSelectOptions + statusesSelectOptions, + hideCalendarByDefault } from "&config.bulk-edit"; const storeName = 'publishpress-future/future-action-bulk-edit'; @@ -92,6 +93,7 @@ inlineEditPost.setBulk = function (id) { strings={strings} taxonomyName={taxonomyName} nonce={nonce} + hideCalendarByDefault={hideCalendarByDefault} /> ); diff --git a/assets/jsx/classic-editor.jsx b/assets/jsx/classic-editor.jsx index d0d6b9b53..677754ed7 100644 --- a/assets/jsx/classic-editor.jsx +++ b/assets/jsx/classic-editor.jsx @@ -1,8 +1,8 @@ import { FutureActionPanelClassicEditor } from './components'; import { createStore } from './data'; import { isGutenbergEnabled } from './utils'; -import { createRoot } from '@wordpress/element'; import { select } from '@wordpress/data'; +import { createRoot } from 'react-dom/client'; import { postType, isNewPost, @@ -14,9 +14,9 @@ import { taxonomyName, postTypeDefaultConfig, defaultDate, - statusesSelectOptions + statusesSelectOptions, + hideCalendarByDefault } from "&config.classic-editor"; -import { render } from "react-dom"; if (! isGutenbergEnabled()) { const storeName = 'publishpress-future/future-action'; @@ -48,6 +48,7 @@ if (! isGutenbergEnabled()) { startOfWeek={startOfWeek} strings={strings} taxonomyName={taxonomyName} + hideCalendarByDefault={hideCalendarByDefault} /> ); diff --git a/assets/jsx/components/DateOffsetPreview.jsx b/assets/jsx/components/DateOffsetPreview.jsx new file mode 100644 index 000000000..a39135c2f --- /dev/null +++ b/assets/jsx/components/DateOffsetPreview.jsx @@ -0,0 +1,99 @@ +import { + useState, + useEffect, + useRef, + Fragment +} from '@wordpress/element'; +import { addQueryArgs } from '@wordpress/url'; +import { apiFetch } from '&wp'; + +require('./css/dateOffsetPreview.css'); + +export const DateOffsetPreview = ({ + offset, + label, + labelDatePreview, + labelOffsetPreview, + setValidationErrorCallback, + setHasPendingValidationCallback, + setHasValidDataCallback, + compactView = false +}) => { + const [offsetPreview, setOffsetPreview] = useState(''); + const [currentTime, setCurrentTime] = useState(); + + const apiRequestControllerRef = useRef(new AbortController()); + + const validateDateOffset = () => { + if (offset) { + const controller = apiRequestControllerRef.current; + + if (controller) { + controller.abort(); + } + + apiRequestControllerRef.current = new AbortController(); + const { signal } = apiRequestControllerRef.current; + + setHasPendingValidationCallback(true); + + apiFetch({ + path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`), + method: 'POST', + data: { + offset + }, + signal, + }).then((result) => { + setHasPendingValidationCallback(false); + + setHasValidDataCallback(result.isValid); + setValidationErrorCallback(result.message); + + if (result.isValid) { + setOffsetPreview(result.preview); + setCurrentTime(result.currentTime); + } else { + setOffsetPreview(''); + } + }).catch((error) => { + if (error.name === 'AbortError') { + return; + } + + setHasPendingValidationCallback(false); + setHasValidDataCallback(false); + setValidationErrorCallback(error.message); + setOffsetPreview(''); + }); + } + } + + useEffect(() => { + validateDateOffset(); + }, [offset]); + + const compactClass = compactView ? ' compact' : ''; + + return ( + + { offset && ( +
+

{ label }

+
+
+ { labelDatePreview }: + {currentTime} +
+
+ { labelOffsetPreview }: + {offsetPreview} +
+
+
+ )} +
+ ) +} + +export default DateOffsetPreview; diff --git a/assets/jsx/components/FutureActionPanel.jsx b/assets/jsx/components/FutureActionPanel.jsx index 3e73df017..72b9800b3 100644 --- a/assets/jsx/components/FutureActionPanel.jsx +++ b/assets/jsx/components/FutureActionPanel.jsx @@ -16,18 +16,35 @@ const { const { apiFetch } = wp; export const FutureActionPanel = (props) => { - const action = useSelect((select) => select(props.storeName).getAction(), []); - const date = useSelect((select) => select(props.storeName).getDate(), []); - const enabled = useSelect((select) => select(props.storeName).getEnabled(), []); - const terms = useSelect((select) => select(props.storeName).getTerms(), []); - const taxonomy = useSelect((select) => select(props.storeName).getTaxonomy(), []); - const taxonomyName = useSelect((select) => select(props.storeName).getTaxonomyName(), []); - const termsListByName = useSelect((select) => select(props.storeName).getTermsListByName(), []); - const termsListById = useSelect((select) => select(props.storeName).getTermsListById(), []); - const isFetchingTerms = useSelect((select) => select(props.storeName).getIsFetchingTerms(), []); - const calendarIsVisible = useSelect((select) => select(props.storeName).getCalendarIsVisible(), []); - const hasValidData = useSelect((select) => select(props.storeName).getHasValidData(), []); - const newStatus = useSelect((select) => select(props.storeName).getNewStatus(), []); + const { + action, + date, + enabled, + terms, + taxonomy, + taxonomyName, + termsListByName, + termsListById, + isFetchingTerms, + calendarIsVisible, + hasValidData, + newStatus, + } = useSelect((select) => { + return { + action: select(props.storeName).getAction(), + date: select(props.storeName).getDate(), + enabled: select(props.storeName).getEnabled(), + terms: select(props.storeName).getTerms(), + taxonomy: select(props.storeName).getTaxonomy(), + taxonomyName: select(props.storeName).getTaxonomyName(), + termsListByName: select(props.storeName).getTermsListByName(), + termsListById: select(props.storeName).getTermsListById(), + isFetchingTerms: select(props.storeName).getIsFetchingTerms(), + calendarIsVisible: select(props.storeName).getCalendarIsVisible(), + hasValidData: select(props.storeName).getHasValidData(), + newStatus: select(props.storeName).getNewStatus(), + }; + }); const [validationError, setValidationError] = useState(''); @@ -178,7 +195,7 @@ export const FutureActionPanel = (props) => { if (getCalendarIsVisibleFromStorage() === null) { setCalendarIsVisible(props.calendarIsVisible); } else { - setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1'); + setCalendarIsVisible(getCalendarIsVisibleFromStorage() === '1' && ! props.hideCalendarByDefault); } // We need to get the value directly from the props because the value from the store is not updated yet @@ -347,6 +364,7 @@ export const FutureActionPanel = (props) => { label={props.strings.enablePostExpiration} checked={enabled || false} onChange={handleEnabledChange} + className="future-action-enable-checkbox" /> )} @@ -359,6 +377,7 @@ export const FutureActionPanel = (props) => { value={action} options={actionsSelectOptions} onChange={handleActionChange} + className="future-action-select-action" /> @@ -371,6 +390,7 @@ export const FutureActionPanel = (props) => { options={props.statusesSelectOptions} value={newStatus} onChange={handleNewStatusChange} + className="future-action-select-new-status" /> } @@ -413,6 +433,7 @@ export const FutureActionPanel = (props) => { suggestions={termsListByNameKeys} onChange={handleTermsChange} placeholder={props.strings.addTermsPlaceholder} + className="future-action-terms" maxSuggestions={1000} onFocus={forceIgnoreAutoSubmitOnEnter} __experimentalExpandOnFocus={true} diff --git a/assets/jsx/components/FutureActionPanelBlockEditor.jsx b/assets/jsx/components/FutureActionPanelBlockEditor.jsx index e113760c8..3c5a0e950 100644 --- a/assets/jsx/components/FutureActionPanelBlockEditor.jsx +++ b/assets/jsx/components/FutureActionPanelBlockEditor.jsx @@ -78,6 +78,7 @@ export const FutureActionPanelBlockEditor = (props) => { storeName={props.storeName} strings={props.strings} onDataIsValid={onDataIsValid} + hideCalendarByDefault={props.hideCalendarByDefault} onDataIsInvalid={onDataIsInvalid} /> diff --git a/assets/jsx/components/FutureActionPanelBulkEdit.jsx b/assets/jsx/components/FutureActionPanelBulkEdit.jsx index 2446bc46d..8cfc50293 100644 --- a/assets/jsx/components/FutureActionPanelBulkEdit.jsx +++ b/assets/jsx/components/FutureActionPanelBulkEdit.jsx @@ -87,6 +87,7 @@ export const FutureActionPanelBulkEdit = (props) => { timeFormat={props.timeFormat} startOfWeek={props.startOfWeek} storeName={props.storeName} + hideCalendarByDefault={props.hideCalendarByDefault} strings={props.strings} /> )} diff --git a/assets/jsx/components/FutureActionPanelClassicEditor.jsx b/assets/jsx/components/FutureActionPanelClassicEditor.jsx index 082348a1f..e2f1d8cc6 100644 --- a/assets/jsx/components/FutureActionPanelClassicEditor.jsx +++ b/assets/jsx/components/FutureActionPanelClassicEditor.jsx @@ -84,6 +84,7 @@ export const FutureActionPanelClassicEditor = (props) => { storeName={props.storeName} strings={props.strings} onDataIsValid={onDataIsValid} + hideCalendarByDefault={props.hideCalendarByDefault} onDataIsInvalid={onDataIsInvalid} /> ); diff --git a/assets/jsx/components/FutureActionPanelQuickEdit.jsx b/assets/jsx/components/FutureActionPanelQuickEdit.jsx index 13edf60cd..4b7d0f0eb 100644 --- a/assets/jsx/components/FutureActionPanelQuickEdit.jsx +++ b/assets/jsx/components/FutureActionPanelQuickEdit.jsx @@ -49,6 +49,7 @@ export const FutureActionPanelQuickEdit = (props) => { storeName={props.storeName} strings={props.strings} onDataIsValid={onDataIsValid} + hideCalendarByDefault={props.hideCalendarByDefault} onDataIsInvalid={onDataIsInvalid} /> {/* Quick edit JS code will save only fields with name inside the edit row */} diff --git a/assets/jsx/components/PostTypeSettingsPanel.jsx b/assets/jsx/components/PostTypeSettingsPanel.jsx index 3d3f58ca1..01fd55d01 100644 --- a/assets/jsx/components/PostTypeSettingsPanel.jsx +++ b/assets/jsx/components/PostTypeSettingsPanel.jsx @@ -4,19 +4,19 @@ import { SettingRow, - SettingsFieldset, SettingsTable, SelectControl, TextControl, TokensControl, CheckboxControl } from './'; -import { useEffect, useState, Fragment, useRef } from '@wordpress/element'; +import { useEffect, useState } from '@wordpress/element'; import { addQueryArgs } from '@wordpress/url'; import { applyFilters } from '@wordpress/hooks'; import { apiFetch } from '&wp'; +import DateOffsetPreview from './DateOffsetPreview'; -const { PanelRow, BaseControl } = wp.components; +const { PanelRow } = wp.components; export const PostTypeSettingsPanel = function (props) { const originalExpireTypeList = props.expireTypeList[props.postType]; @@ -30,15 +30,14 @@ export const PostTypeSettingsPanel = function (props) { const [expireOffset, setExpireOffset] = useState(props.settings.defaultExpireOffset); const [emailNotification, setEmailNotification] = useState(props.settings.emailNotification); const [isAutoEnabled, setIsAutoEnabled] = useState(props.settings.autoEnabled); - const [hasValidData, setHasValidData] = useState(false); + const [hasValidData, setHasValidData] = useState(true); const [validationError, setValidationError] = useState(''); const [taxonomyLabel, setTaxonomyLabel] = useState(''); const [howToExpireList, setHowToExpireList] = useState(originalExpireTypeList); const [newStatus, setNewStatus] = useState(props.settings.newStatus); const [hasPendingValidation, setHasPendingValidation] = useState(false); - const [offsetPreview, setOffsetPreview] = useState(''); - const [currentTime, setCurrentTime] = useState(); - const apiRequestControllerRef = useRef(new AbortController()); + + const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset; const taxonomyRelatedActions = [ 'category', @@ -75,61 +74,6 @@ export const PostTypeSettingsPanel = function (props) { setIsAutoEnabled(value); } - const validateData = () => { - if (! isActive) { - setValidationError(''); - return true; - } - - const offset = expireOffset ? expireOffset : props.settings.globalDefaultExpireOffset; - - if (offset) { - const controller = apiRequestControllerRef.current; - - if (controller) { - controller.abort(); - } - - apiRequestControllerRef.current = new AbortController(); - const { signal } = apiRequestControllerRef.current; - - setHasPendingValidation(true); - - apiFetch({ - path: addQueryArgs(`publishpress-future/v1/settings/validate-expire-offset`), - method: 'POST', - data: { - offset - }, - signal, - }).then((result) => { - setHasPendingValidation(false); - - setHasValidData(result.isValid); - setValidationError(result.message); - - if (result.isValid) { - setOffsetPreview(result.preview); - setCurrentTime(result.currentTime); - } else { - setOffsetPreview(''); - } - }).catch((error) => { - if (error.name === 'AbortError') { - return; - } - - setHasPendingValidation(false); - setHasValidData(false); - setValidationError(error.message); - setOffsetPreview(''); - }); - } - - setValidationError(''); - return true; - } - useEffect(() => { // Remove items from expireTypeList if related to taxonomies and there is no taxonmoy for the post type if (props.taxonomiesList.length === 0) { @@ -182,10 +126,6 @@ export const PostTypeSettingsPanel = function (props) { }); }, [postTypeTaxonomy]); - useEffect(() => { - setHasValidData(validateData()); - }, [isActive, expireOffset]); - useEffect(() => { if (!taxonomyLabel) { return; @@ -319,21 +259,15 @@ export const PostTypeSettingsPanel = function (props) { onChange={onChangeExpireOffset} /> - {offsetPreview && ( - -

{props.text.datePreview}

-
-
- {props.text.datePreviewCurrent}: - {currentTime} -
-
- {props.text.datePreviewComputed}: - {offsetPreview} -
-
-
- )} + ); @@ -352,8 +286,10 @@ export const PostTypeSettingsPanel = function (props) { settingsRows = applyFilters('expirationdate_settings_posttype', settingsRows, props, isActive, useState); + const fieldSetClassNames = props.isVisible ? 'pe-settings-fieldset' : 'pe-settings-fieldset hidden'; + return ( - +
{! hasValidData && ( @@ -363,6 +299,6 @@ export const PostTypeSettingsPanel = function (props) {
)} -
+ ); } diff --git a/assets/jsx/components/PostTypesSettingsPanels.jsx b/assets/jsx/components/PostTypesSettingsPanels.jsx index b24b76a6d..8b3fa1018 100644 --- a/assets/jsx/components/PostTypesSettingsPanels.jsx +++ b/assets/jsx/components/PostTypesSettingsPanels.jsx @@ -3,8 +3,11 @@ */ import { PostTypeSettingsPanel } from "./"; +import { useState } from "@wordpress/element"; export const PostTypesSettingsPanels = function (props) { + const [currentTab, setCurrentTab] = useState(Object.keys(props.settings)[0]); + let panels = []; for (const [postType, postTypeSettings] of Object.entries(props.settings)) { @@ -22,9 +25,39 @@ export const PostTypesSettingsPanels = function (props) { onDataIsInvalid={props.onDataIsInvalid} onValidationStarted={props.onValidationStarted} onValidationFinished={props.onValidationFinished} + isVisible={currentTab === postType} /> ); } - return (panels); + const onSelectTab = (event) => { + event.preventDefault(); + setCurrentTab(event.target.hash.replace('#', '').replace('-panel', '')); + } + + let tabs = []; + let selected = false; + + for (const [postType, postTypeSettings] of Object.entries(props.settings)) { + selected = currentTab === postType; + tabs.push( + + {postTypeSettings.label} + + ); + } + + return ( +
+ + {panels} +
+ ); } + diff --git a/assets/jsx/components/SettingsFieldset.jsx b/assets/jsx/components/SettingsFieldset.jsx index 516f68352..4833f6977 100644 --- a/assets/jsx/components/SettingsFieldset.jsx +++ b/assets/jsx/components/SettingsFieldset.jsx @@ -4,7 +4,7 @@ export const SettingsFieldset = function (props) { return ( -
+
{props.legend} {props.children}
diff --git a/assets/jsx/components/css/dateOffsetPreview.css b/assets/jsx/components/css/dateOffsetPreview.css new file mode 100644 index 000000000..b7a2f95db --- /dev/null +++ b/assets/jsx/components/css/dateOffsetPreview.css @@ -0,0 +1,31 @@ +.publishpress-future-date-preview .publishpress-future-date-preview-value { + font-family: monospace; + background-color: #e7e7e7; + padding: 2px 4px; +} + +.publishpress-future-date-preview.compact .publishpress-future-date-preview-label { + display: block; +} + +.publishpress-future-date-preview.compact { + margin-bottom: 8px; +} + +.publishpress-future-date-preview.compact h4 { + font-size: 11px; + font-weight: 500; + line-height: 1.4; + text-transform: uppercase; + display: inline-block; + margin-bottom: calc(8px); + padding: 0px; + flex-shrink: 0; + margin-right: 12px; + max-width: 75%; + margin-top: 0; +} + +.publishpress-future-notice.publishpress-future-notice-error { + color: #dc3232; +} diff --git a/assets/jsx/components/index.jsx b/assets/jsx/components/index.jsx index 7f59af328..d7da254c2 100644 --- a/assets/jsx/components/index.jsx +++ b/assets/jsx/components/index.jsx @@ -19,3 +19,4 @@ export { TokensControl } from "./TokensControl"; export { NonceControl } from "./NonceControl"; export { TrueFalseControl } from "./TrueFalseControl"; export { Spinner } from "./Spinner"; +export { DateOffsetPreview } from "./DateOffsetPreview"; diff --git a/assets/jsx/quick-edit.jsx b/assets/jsx/quick-edit.jsx index ccc2e10b0..16f437ec9 100644 --- a/assets/jsx/quick-edit.jsx +++ b/assets/jsx/quick-edit.jsx @@ -1,7 +1,7 @@ import { FutureActionPanelQuickEdit } from './components'; import { createStore } from './data'; import { getActionSettingsFromColumnData } from './utils'; -import { createRoot } from '@wordpress/element'; +import { createRoot } from 'react-dom/client'; import { select, dispatch } from '@wordpress/data'; import { inlineEditPost } from "&window"; import { @@ -14,7 +14,8 @@ import { strings, taxonomyName, nonce, - statusesSelectOptions + statusesSelectOptions, + hideCalendarByDefault } from "&config.quick-edit"; const storeName = 'publishpress-future/future-action-quick-edit'; @@ -115,6 +116,7 @@ inlineEditPost.edit = function (button, id) { strings={strings} taxonomyName={taxonomyName} nonce={nonce} + hideCalendarByDefault={hideCalendarByDefault} /> ); diff --git a/assets/jsx/settings-general.jsx b/assets/jsx/settings-general.jsx new file mode 100644 index 000000000..19e1846bd --- /dev/null +++ b/assets/jsx/settings-general.jsx @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2023. PublishPress, All rights reserved. + */ + +import { DateOffsetPreview } from "./components"; + +import { + StrictMode, + useState, + useEffect +} from "@wordpress/element"; + +import { createRoot } from 'react-dom/client'; + +import { + text, +} from "&config.settings-general"; + +const SettingsFormPanel = (props) => { + const [isValidForm, setIsValidForm] = useState(true); + const [validationError, setValidationError] = useState(''); + const [hasPendingValidation, setHasPendingValidation] = useState(false); + const [offset, setOffset] = useState(''); + + const onHasValidationError = (errorMessage) => { + if (errorMessage) { + setIsValidForm(false); + setValidationError(errorMessage); + } else { + setIsValidForm(true); + setValidationError(''); + } + } + + const onValidationStarted = (inProgress) => { + setHasPendingValidation(inProgress); + } + + const onValidationFinished = (isValid) => { + setHasPendingValidation(false); + setIsValidForm(isValid); + } + + useEffect(() => { + jQuery('#expired-custom-expiration-date').on('keyup', function () { + setOffset(jQuery(this).val()); + }); + + setOffset(jQuery('#expired-custom-expiration-date').val()); + }, []); + + return ( + + + + {! isValidForm && validationError && ( +
+

{text.error}: {validationError}

+
+ )} +
+ ) +}; + +const container = document.getElementById("expiration-date-preview"); +const component = (); + +createRoot(container).render(component); diff --git a/assets/jsx/settings-post-types.jsx b/assets/jsx/settings-post-types.jsx index 4c2e81128..57b110ac9 100644 --- a/assets/jsx/settings-post-types.jsx +++ b/assets/jsx/settings-post-types.jsx @@ -11,7 +11,9 @@ import { NonceControl } from "./components"; -import { StrictMode, createRoot, useState, useEffect } from "@wordpress/element"; +import { StrictMode, useState, useEffect } from "@wordpress/element"; + +import { createRoot } from 'react-dom/client'; import { nonce, diff --git a/composer.json b/composer.json index 72f854928..ede5a96ee 100644 --- a/composer.json +++ b/composer.json @@ -123,6 +123,10 @@ "php-cs-fixer fix .", "@fix:cs" ], + "prepare": [ + "@gen:lang", + "@build:js" + ], "dbox:up": "pdropbox upload && pdropbox share", "dbox:list": "pdropbox list", "dbox:remove": "pdropbox remove", diff --git a/composer.lock b/composer.lock index 7ae8d04df..7b7f34934 100644 --- a/composer.lock +++ b/composer.lock @@ -5944,12 +5944,12 @@ "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "ea37cb5b5eafaeb4f293819e4eb09822f3b60bdf" + "reference": "d40c7c43014c3c24135fdccb5600b69ca7e46c23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/ea37cb5b5eafaeb4f293819e4eb09822f3b60bdf", - "reference": "ea37cb5b5eafaeb4f293819e4eb09822f3b60bdf", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/d40c7c43014c3c24135fdccb5600b69ca7e46c23", + "reference": "d40c7c43014c3c24135fdccb5600b69ca7e46c23", "shasum": "" }, "require": { @@ -5996,7 +5996,7 @@ "type": "github" } ], - "time": "2024-08-05T20:48:53+00:00" + "time": "2024-08-06T14:21:15+00:00" }, { "name": "sebastian/cli-parser", diff --git a/dev-workspace/docker/Dockerfile b/dev-workspace/docker/Dockerfile index 257712d4b..f898341eb 100644 --- a/dev-workspace/docker/Dockerfile +++ b/dev-workspace/docker/Dockerfile @@ -1,4 +1,14 @@ +ARG NODE_VERSION=18 + +FROM node:$NODE_VERSION-alpine AS node + FROM publishpress/dev-workspace-terminal:generic-4.2.0 ENV PLUGIN_NAME="PublishPress Future" ENV PLUGIN_TYPE="FREE" + +COPY --from=node /usr/lib /usr/lib +COPY --from=node /usr/local/share /usr/local/share +COPY --from=node /usr/local/lib /usr/local/lib +COPY --from=node /usr/local/include /usr/local/include +COPY --from=node /usr/local/bin /usr/local/bin diff --git a/languages/post-expirator-es_ES.mo b/languages/post-expirator-es_ES.mo index 5c86c06ee..87c594340 100644 Binary files a/languages/post-expirator-es_ES.mo and b/languages/post-expirator-es_ES.mo differ diff --git a/languages/post-expirator-es_ES.po b/languages/post-expirator-es_ES.po index b11842bdd..1da0b7d77 100644 --- a/languages/post-expirator-es_ES.po +++ b/languages/post-expirator-es_ES.po @@ -5,8 +5,8 @@ msgstr "" "Project-Id-Version: Plugins - PublishPress Future: Automatically Unpublish " "WordPress Posts - Stable (latest release)\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2024-07-15T16:44:18+00:00\n" -"PO-Revision-Date: 2024-07-16 20:16+0200\n" +"POT-Creation-Date: 2024-08-05T20:36:02+00:00\n" +"PO-Revision-Date: 2024-08-06 20:46+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: es\n" @@ -18,12 +18,12 @@ msgstr "" #. Plugin Name of the plugin #: post-expirator.php -#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 -#: src/Modules/Expirator/Controllers/BulkEditController.php:164 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:143 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:346 -#: src/Modules/Expirator/Controllers/QuickEditController.php:246 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:84 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 +#: src/Modules/Expirator/Controllers/BulkEditController.php:165 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:144 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 +#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 msgid "PublishPress Future" msgstr "PublishPress Future" @@ -51,27 +51,27 @@ msgstr "PublishPress" msgid "http://publishpress.com" msgstr "https://publishpress.com" -#: legacy/classes/Display.class.php:94 +#: legacy/classes/Display.class.php:106 msgid "You do not have permission to configure PublishPress Future." msgstr "No tienes permisos para configurar PublishPress Future." -#: legacy/classes/Display.class.php:108 +#: legacy/classes/Display.class.php:120 msgid "Debug is disabled" msgstr "Depuración desactivada" -#: legacy/classes/Display.class.php:188 +#: legacy/classes/Display.class.php:204 msgid "Debugging Disabled" msgstr "Depuración desactivada" -#: legacy/classes/Display.class.php:193 +#: legacy/classes/Display.class.php:209 msgid "Debugging Enabled" msgstr "Depuración activada" -#: legacy/classes/Display.class.php:201 +#: legacy/classes/Display.class.php:217 msgid "Debugging Table Emptied" msgstr "Tabla de depuración vaciada" -#: legacy/classes/Display.class.php:207 +#: legacy/classes/Display.class.php:223 msgid "" "The legacy future actions migration has been enqueued and will run " "asynchronously." @@ -79,7 +79,7 @@ msgstr "" "La migración de acciones Future heredadas se ha puesto en cola y se " "ejecutará de forma asíncrona." -#: legacy/classes/Display.class.php:216 +#: legacy/classes/Display.class.php:232 msgid "" "The legacy actions arguments restoration has been enqueued and will run " "asynchronously." @@ -87,47 +87,47 @@ msgstr "" "La restauración de los argumentos de las acciones heredadas se ha puesto en " "cola y se ejecutará de forma asíncrona." -#: legacy/classes/Display.class.php:226 +#: legacy/classes/Display.class.php:243 msgid "The database schema was fixed." msgstr "Se ha corregido el esquema de la base de datos." -#: legacy/classes/Display.class.php:231 +#: legacy/classes/Display.class.php:248 msgid "" "The database schema could not be fixed. Please, contact the support team." msgstr "" "No se ha podido corregir el esquema de la base de datos. Por favor, contacta " "con el equipo de soporte." -#: legacy/classes/Display.class.php:322 legacy/classes/Display.class.php:380 +#: legacy/classes/Display.class.php:339 legacy/classes/Display.class.php:397 msgid "Saved Options!" msgstr "¡Opciones guardadas!" #. translators: %1$s is the plugin name, %2$s is the star rating markup -#: legacy/classes/Display.class.php:466 +#: legacy/classes/Display.class.php:483 msgid "If you like %1$s, please leave us a %2$s rating. Thank you!" msgstr "Si te gusta %1$s, por favor, déjanos una valoración de %2$s. ¡Gracias!" -#: legacy/classes/Display.class.php:481 +#: legacy/classes/Display.class.php:498 msgid "About PublishPress Future" msgstr "Acerca de PublishPress Future" -#: legacy/classes/Display.class.php:483 +#: legacy/classes/Display.class.php:500 msgid "About" msgstr "Acerca de" -#: legacy/classes/Display.class.php:489 +#: legacy/classes/Display.class.php:506 msgid "Future Documentation" msgstr "Documentación de Future" -#: legacy/classes/Display.class.php:491 +#: legacy/classes/Display.class.php:508 msgid "Documentation" msgstr "Documentación" -#: legacy/classes/Display.class.php:497 +#: legacy/classes/Display.class.php:514 msgid "Contact the PublishPress team" msgstr "Contacta con el equipo de PublishPress" -#: legacy/classes/Display.class.php:499 +#: legacy/classes/Display.class.php:516 msgid "Contact" msgstr "Contacto" @@ -135,151 +135,161 @@ msgstr "Contacto" msgid "No taxonomies found" msgstr "No se han encontrado taxonomías" -#: services.php:71 src/Modules/Settings/SettingsFacade.php:92 +#: services.php:74 src/Modules/Settings/SettingsFacade.php:93 msgid "l F jS, Y" msgstr "l, j F Y" -#: services.php:75 src/Modules/Settings/SettingsFacade.php:93 +#: services.php:78 src/Modules/Settings/SettingsFacade.php:94 msgid "g:ia" msgstr "g:ia" -#: services.php:76 src/Modules/Settings/SettingsFacade.php:94 +#: services.php:79 src/Modules/Settings/SettingsFacade.php:95 msgid "Post expires at EXPIRATIONTIME on ACTIONDATE" msgstr "La entrada caduca en EXPIRATIONTIME el ACTIONDATE" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:127 -#: src/Modules/Expirator/Controllers/BulkEditController.php:163 -#: src/Modules/Expirator/Controllers/QuickEditController.php:245 +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:76 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:84 +msgid "The table %s does not exist." +msgstr "La tabla %s no existe." + +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:89 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:107 +msgid "The table indexes are invalid: " +msgstr "Los índices de la tabla no son válidos: " + +#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 +#: src/Modules/Expirator/Controllers/BulkEditController.php:164 +#: src/Modules/Expirator/Controllers/QuickEditController.php:269 msgid "Categories" msgstr "Categorìas" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 -#: src/Modules/Expirator/Controllers/BulkEditController.php:165 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:347 -#: src/Modules/Expirator/Controllers/QuickEditController.php:247 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 +#: src/Modules/Expirator/Controllers/BulkEditController.php:166 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:363 +#: src/Modules/Expirator/Controllers/QuickEditController.php:271 msgid "Enable Future Action" msgstr "Activar caducidad de la entrada" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 -#: src/Modules/Expirator/Controllers/BulkEditController.php:166 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:348 -#: src/Modules/Expirator/Controllers/QuickEditController.php:248 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:45 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 +#: src/Modules/Expirator/Controllers/BulkEditController.php:167 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 +#: src/Modules/Expirator/Controllers/QuickEditController.php:272 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:46 msgid "Action" msgstr "Acción" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 -#: src/Modules/Expirator/Controllers/BulkEditController.php:169 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:351 -#: src/Modules/Expirator/Controllers/QuickEditController.php:251 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 +#: src/Modules/Expirator/Controllers/BulkEditController.php:170 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:367 +#: src/Modules/Expirator/Controllers/QuickEditController.php:275 msgid "Loading" msgstr "Cargando" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 -#: src/Modules/Expirator/Controllers/BulkEditController.php:167 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:349 -#: src/Modules/Expirator/Controllers/QuickEditController.php:249 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 +#: src/Modules/Expirator/Controllers/BulkEditController.php:168 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:365 +#: src/Modules/Expirator/Controllers/QuickEditController.php:273 msgid "Show Calendar" msgstr "Muestra el calendario" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 -#: src/Modules/Expirator/Controllers/BulkEditController.php:168 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:350 -#: src/Modules/Expirator/Controllers/QuickEditController.php:250 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:134 +#: src/Modules/Expirator/Controllers/BulkEditController.php:169 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 +#: src/Modules/Expirator/Controllers/QuickEditController.php:274 msgid "Hide Calendar" msgstr "Oculta el calendario" #. translators: the text between {} is the link to the settings page. #. translators: the text between {{}} is the link to the settings page. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:135 -#: src/Modules/Expirator/Controllers/BulkEditController.php:171 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:353 -#: src/Modules/Expirator/Controllers/QuickEditController.php:253 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:136 +#: src/Modules/Expirator/Controllers/BulkEditController.php:172 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 +#: src/Modules/Expirator/Controllers/QuickEditController.php:277 msgid "Timezone is controlled by the {WordPress Settings}." msgstr "La zona horaria se controla mediante los {Ajustes de WordPress}." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:139 -#: src/Modules/Expirator/Controllers/BulkEditController.php:175 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:357 -#: src/Modules/Expirator/Controllers/QuickEditController.php:257 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:140 +#: src/Modules/Expirator/Controllers/BulkEditController.php:176 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:376 +#: src/Modules/Expirator/Controllers/QuickEditController.php:281 msgid "No %s found." msgstr "No se ha encontrado %s." -#: src/Modules/Expirator/Controllers/BlockEditorController.php:142 -#: src/Modules/Expirator/Controllers/BulkEditController.php:179 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:360 -#: src/Modules/Expirator/Controllers/QuickEditController.php:260 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:143 +#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:379 +#: src/Modules/Expirator/Controllers/QuickEditController.php:284 msgid "You must assign a taxonomy to this post type to use this feature." msgstr "" "Debe asignar una taxonomía a este tipo de entrada para utilizar esta función." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:144 -#: src/Modules/Expirator/Controllers/BulkEditController.php:186 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 -#: src/Modules/Expirator/Controllers/QuickEditController.php:262 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:145 +#: src/Modules/Expirator/Controllers/BulkEditController.php:187 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:384 +#: src/Modules/Expirator/Controllers/QuickEditController.php:286 msgid "New %s" msgstr "Nuevo %s" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:146 -#: src/Modules/Expirator/Controllers/BulkEditController.php:188 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 -#: src/Modules/Expirator/Controllers/QuickEditController.php:264 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:147 +#: src/Modules/Expirator/Controllers/BulkEditController.php:189 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:386 +#: src/Modules/Expirator/Controllers/QuickEditController.php:288 msgid "%s to remove" msgstr "%s a eliminar" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:148 -#: src/Modules/Expirator/Controllers/BulkEditController.php:190 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 -#: src/Modules/Expirator/Controllers/QuickEditController.php:266 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:149 +#: src/Modules/Expirator/Controllers/BulkEditController.php:191 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:388 +#: src/Modules/Expirator/Controllers/QuickEditController.php:290 msgid "%s to add" msgstr "%s a añadir" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:150 -#: src/Modules/Expirator/Controllers/BulkEditController.php:192 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:368 -#: src/Modules/Expirator/Controllers/QuickEditController.php:268 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 +#: src/Modules/Expirator/Controllers/BulkEditController.php:193 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:391 +#: src/Modules/Expirator/Controllers/QuickEditController.php:292 msgid "Search for %s" msgstr "Búsqueda por %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 -#: src/Modules/Expirator/Controllers/BulkEditController.php:193 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 -#: src/Modules/Expirator/Controllers/QuickEditController.php:269 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 +#: src/Modules/Expirator/Controllers/BulkEditController.php:194 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:394 +#: src/Modules/Expirator/Controllers/QuickEditController.php:293 msgid "Select an action" msgstr "Selecciona una acción" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 -#: src/Modules/Expirator/Controllers/BulkEditController.php:194 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:370 -#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 +#: src/Modules/Expirator/Controllers/BulkEditController.php:195 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:395 +#: src/Modules/Expirator/Controllers/QuickEditController.php:294 msgid "Select a date" msgstr "Selecciona una fecha" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 -#: src/Modules/Expirator/Controllers/BulkEditController.php:195 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:371 -#: src/Modules/Expirator/Controllers/QuickEditController.php:271 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:154 +#: src/Modules/Expirator/Controllers/BulkEditController.php:196 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:396 +#: src/Modules/Expirator/Controllers/QuickEditController.php:295 msgid "Date cannot be in the past" msgstr "La fecha no puede estar en el pasado" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:156 -#: src/Modules/Expirator/Controllers/BulkEditController.php:198 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:374 -#: src/Modules/Expirator/Controllers/QuickEditController.php:274 -#: src/Modules/Settings/Controllers/Controller.php:245 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:157 +#: src/Modules/Expirator/Controllers/BulkEditController.php:199 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:399 +#: src/Modules/Expirator/Controllers/QuickEditController.php:298 +#: src/Modules/Settings/Controllers/Controller.php:246 msgid "Please select one or more %s" msgstr "Por favor, selecciona uno o más %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:159 -#: src/Modules/Expirator/Controllers/BulkEditController.php:201 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:377 -#: src/Modules/Expirator/Controllers/QuickEditController.php:277 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:160 +#: src/Modules/Expirator/Controllers/BulkEditController.php:202 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:402 +#: src/Modules/Expirator/Controllers/QuickEditController.php:301 msgid "New status" msgstr "Nuevo estado" @@ -300,76 +310,76 @@ msgid "Update Future Actions from Post Metadata" msgstr "" "Actualiza las acciones de Future a partir de los metadatos de la entrada" -#: src/Modules/Expirator/Controllers/BulkEditController.php:178 +#: src/Modules/Expirator/Controllers/BulkEditController.php:179 msgid "Future Action Update" msgstr "Actualizaciòn de las acciones de Future" -#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/BulkEditController.php:181 msgid "— No Change —" msgstr "— Sin cambios —" -#: src/Modules/Expirator/Controllers/BulkEditController.php:181 +#: src/Modules/Expirator/Controllers/BulkEditController.php:182 msgid "Add or update action for posts" msgstr "Añade o actualiza la acción para las entradas" -#: src/Modules/Expirator/Controllers/BulkEditController.php:182 +#: src/Modules/Expirator/Controllers/BulkEditController.php:183 msgid "Add action if none exists for posts" msgstr "Añade una acción si no hay ninguna para las entradas" -#: src/Modules/Expirator/Controllers/BulkEditController.php:183 +#: src/Modules/Expirator/Controllers/BulkEditController.php:184 msgid "Update the existing actions for posts" msgstr "Actualiza las acciones existentes para las entradas" -#: src/Modules/Expirator/Controllers/BulkEditController.php:184 +#: src/Modules/Expirator/Controllers/BulkEditController.php:185 msgid "Remove action from posts" msgstr "Quitar acción de las entradas" -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:345 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:361 msgid "Category" msgstr "Categorìa" -#: src/Modules/Expirator/Controllers/PluginsListController.php:45 +#: src/Modules/Expirator/Controllers/PluginsListController.php:46 msgid "Settings" msgstr "Ajustes" -#: src/Modules/Expirator/Controllers/PostListController.php:66 +#: src/Modules/Expirator/Controllers/PostListController.php:75 msgid "Future Action" msgstr "Acción Future" -#: src/Modules/Expirator/Controllers/RestAPIController.php:207 -#: src/Modules/Expirator/Controllers/RestAPIController.php:214 +#: src/Modules/Expirator/Controllers/RestAPIController.php:208 +#: src/Modules/Expirator/Controllers/RestAPIController.php:215 msgid "Invalid date time offset." msgstr "Desplazamiento de fecha y hora no válido." -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:86 msgid "Future" msgstr "Future" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:94 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:95 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:96 #: src/Views/tabs.php:59 msgid "Action Settings" msgstr "Ajustes de las acciones" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:103 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:104 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:42 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:105 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:43 msgid "Scheduled Actions" msgstr "Acciones programadas" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:173 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:174 msgid "Log format" msgstr "Formato del registro" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:180 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:181 msgid "List" msgstr "Lista" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:189 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:190 msgid "Popup" msgstr "Ventana emergente" -#: src/Modules/Expirator/Controllers/ShortcodeController.php:77 +#: src/Modules/Expirator/Controllers/ShortcodeController.php:79 msgid "" "The shortcode [futureaction] must be used inside the loop or with the " "post_id attribute." @@ -377,6 +387,10 @@ msgstr "" "El shortcode [futureaction] debe utilizarse dentro del bucle o con el " "atributo post_id." +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:96 +msgid "The column args length was not updated to 1000." +msgstr "La longitud de la columna de argumentos no se actualizó a 1000." + #: src/Modules/Expirator/ExpirationActions/ChangePostStatus.php:54 #: src/Modules/Expirator/ExpirationActions/PostStatusToDraft.php:52 #: src/Modules/Expirator/ExpirationActions/PostStatusToPrivate.php:52 @@ -411,12 +425,12 @@ msgid "Delete" msgstr "Borrar" #. translators: %s is the post type singular label -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:64 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:65 msgid "No terms were added to the %s." msgstr "No se han añadido términos a la %s." #. translators: %1$s is the taxonomy label, %2$s is the post type singular label, %3$s is the list of terms added, %4$s is the list of terms on the post -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:75 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:77 msgid "" "The following terms (%1$s) were added to the %2$s: \"%3$s\". The full list " "of terms on the post is: %4$s." @@ -425,7 +439,7 @@ msgstr "" "completa de términos en la entrada es: %4$s." #. translators: %s is the taxonomy name (plural) -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:118 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:120 msgid "Add extra %s" msgstr "Añadir extra %s" @@ -509,35 +523,35 @@ msgstr "%s ha sido quitado de la lista de fijos." msgid "Unstick" msgstr "No fijar" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:463 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:464 msgid "Email is disabled" msgstr "Correo electrónico desactivado" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email sent" msgstr "Correo electrónico enviado" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email not sent" msgstr "Correo electrónico no enviado" #. translators: %1$s: post title placeholder, %2$s: notification text, %3$s: action date placeholder, %4$s: post link placeholder -#: src/Modules/Expirator/Models/ExpirablePostModel.php:617 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:618 msgid "%1$s. %2$s on %3$s. The post link is %4$s" msgstr "%1$s. %2$s el día %3$s. El enlace de la entrada es %4$s" #. translators: %s is the post title -#: src/Modules/Expirator/Models/ExpirablePostModel.php:635 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:636 msgid "Future Action Complete \"%s\"" msgstr "Caducidad de la entrada completada «%s»" #. translators: 1: is the blog name, 2: the email subject -#: src/Modules/Expirator/Models/ExpirablePostModel.php:639 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:640 msgid "[%1$s] %2$s" msgstr "[%1$s] %2$s" #. translators: %s is the date/time offset and %s is the post type. -#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:135 +#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:137 msgid "" "Invalid date/time offset \"%s\" for post type \"%s\". Please ensure you use " "only English terms for the date/time offset, such as \"3 months\" or \"1 " @@ -547,87 +561,87 @@ msgstr "" "Asegúrate de utilizar únicamente términos en inglés para el desfase fecha/" "hora, como «3 months» o «1 week»." -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:48 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 msgid "Status" msgstr "Estado" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 msgid "Arguments" msgstr "Argumentos" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 msgid "Logs" msgstr "Registros" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 msgid "Scheduled Date" msgstr "Fecha programada" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:53 msgid "Recurrence" msgstr "Recurrente" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:60 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 msgid "Run" msgstr "Ejecutar" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:62 msgid "Process the action now" msgstr "Ejecuta la acción ahora" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:64 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 msgid "Cancel" msgstr "Cancelar" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:66 msgid "" "Cancel the action. This will prevent the action from running in the future" msgstr "Cancela la acción. Esto evitará que la acción se ejecute en el futuro" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:78 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:79 msgid "%s year" msgid_plural "%s years" msgstr[0] "%s año" msgstr[1] "%s años" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:83 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:84 msgid "%s month" msgid_plural "%s months" msgstr[0] "%s mes" msgstr[1] "%s meses" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:88 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:89 msgid "%s week" msgid_plural "%s weeks" msgstr[0] "%s semana" msgstr[1] "%s semanas" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:93 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:94 msgid "%s day" msgid_plural "%s days" msgstr[0] "%s día" msgstr[1] "%s días" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:98 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:99 msgid "%s hour" msgid_plural "%s hours" msgstr[0] "%s hora" msgstr[1] "%s horas" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:103 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:104 msgid "%s minute" msgid_plural "%s minutes" msgstr[0] "%s minuto" msgstr[1] "%s minutos" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:108 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:109 msgid "%s second" msgid_plural "%s seconds" msgstr[0] "%s segundo" @@ -642,7 +656,7 @@ msgid "Uninitialized" msgstr "Sin inicializar" #: src/Modules/Expirator/Tables/ScheduledActionsTable.php:273 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:339 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:340 msgid "Scheduled" msgstr "Programado" @@ -666,87 +680,87 @@ msgstr "En curso" msgid "All" msgstr "Todos" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:314 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:315 msgid "Search hook, args and claim ID" msgstr "Buscar gancho, argumentos e ID de reclamación" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:343 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:344 msgid "Completed" msgstr "Completado" #. translators: %1$s: post type label, %2$d: post ID, %3$s: post link tag start, %4$s: post title, %5$s: post link tag end -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:448 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:449 msgid "%1$s: [%2$d] %3$s%4$s%5$s" msgstr "%1$s: [%2$d] %3$s%4$s%5$s" #. translators: %s is the new status -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:483 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:484 msgid "New Status: %s" msgstr "Nuevo estado: %s" #. translators: %s is the list of terms -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:491 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:492 msgid "Terms: %s" msgstr "Términos: %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:594 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:595 msgid "View log" msgstr "Ver registro" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:605 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:606 msgid "Action: " msgstr "Acción: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:611 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:612 msgid "Status: " msgstr "Estado: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:617 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:618 msgid "Arguments: " msgstr "Argumentos: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:623 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:624 msgid "Scheduled date: " msgstr "Fecha programada: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:637 -#: src/Views/menu-diagnostics.php:190 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Views/menu-diagnostics.php:192 msgid "Date" msgstr "Fecha" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:639 #: src/Views/menu-debug-log.php:37 msgid "Message" msgstr "Mensaje" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:672 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:673 msgid "Async" msgstr "Asíncrona" #. translators: %s is the date interval in human readable format in the past -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:689 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:690 msgid " (%s ago)" msgstr " (hace %s)" #. translators: %s is the date interval in human readable format in the present or future -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:695 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:696 msgid " (%s)" msgstr " (%s)" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:719 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:720 msgid "Now!" msgstr "¡Ahora!" #. translators: %s: time interval -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:768 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:770 msgid "Every %s" msgstr "Cada %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:774 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:776 msgid "Non-repeating" msgstr "No-repetir" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:783 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:786 msgid "No Scheduled Actions." msgstr "No hay acciones programadas." @@ -762,12 +776,12 @@ msgstr "" #: src/Modules/ProFeaturesAds/views/actions-workflows-page.html.php:18 #: src/Modules/VersionNotices/Module.php:125 -#: src/Views/ad-banner-right-sidebar.php:35 +#: src/Views/ad-banner-right-sidebar.php:37 msgid "Upgrade to Pro" msgstr "Actualizar a Pro" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Modules/Settings/Controllers/Controller.php:198 +#: src/Modules/Settings/Controllers/Controller.php:199 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -782,11 +796,11 @@ msgstr "" "%2$s+1 week 2 days 4 hours 2 seconds%3$s or %2$snext Thursday%3$s. Por " "favor, introduce solo términos en inglés." -#: src/Modules/Settings/Controllers/Controller.php:209 +#: src/Modules/Settings/Controllers/Controller.php:210 msgid "Default Values" msgstr "Valores por defecto" -#: src/Modules/Settings/Controllers/Controller.php:210 +#: src/Modules/Settings/Controllers/Controller.php:211 msgid "" "Use the values below to set the default actions/values to be used for each " "for the corresponding post types. These values can all be overwritten when " @@ -797,40 +811,40 @@ msgstr "" "correspondientes. Estos valores se pueden sobrescribir al crear/editar la " "publicación/página." -#: src/Modules/Settings/Controllers/Controller.php:214 +#: src/Modules/Settings/Controllers/Controller.php:215 msgid "Active" msgstr "Activa" -#: src/Modules/Settings/Controllers/Controller.php:215 +#: src/Modules/Settings/Controllers/Controller.php:216 msgid "Activate the PublishPress Future actions for this post type" msgstr "Activa las acciones de PublishPress Future para este tipo de contenido" -#: src/Modules/Settings/Controllers/Controller.php:216 +#: src/Modules/Settings/Controllers/Controller.php:217 msgid "Default Action" msgstr "Acción por defecto" -#: src/Modules/Settings/Controllers/Controller.php:217 +#: src/Modules/Settings/Controllers/Controller.php:218 msgid "Select the default action for the post type." msgstr "Elige la acción de caducidad por defecto para el tipo de contenido." -#: src/Modules/Settings/Controllers/Controller.php:221 -#: src/Views/taxonomy-field.php:11 +#: src/Modules/Settings/Controllers/Controller.php:222 +#: src/Views/taxonomy-field.php:14 msgid "Select the taxonomy to be used for actions." msgstr "Selecciona la taxonomía que se utilizará para las acciones." -#: src/Modules/Settings/Controllers/Controller.php:225 +#: src/Modules/Settings/Controllers/Controller.php:226 msgid "Auto-enable" msgstr "Activación automática" -#: src/Modules/Settings/Controllers/Controller.php:226 +#: src/Modules/Settings/Controllers/Controller.php:227 msgid "Enabled for all new posts" msgstr "Activado para todas las nuevas entradas" -#: src/Modules/Settings/Controllers/Controller.php:227 +#: src/Modules/Settings/Controllers/Controller.php:228 msgid "Taxonomy" msgstr "Taxonomía" -#: src/Modules/Settings/Controllers/Controller.php:228 +#: src/Modules/Settings/Controllers/Controller.php:229 msgid "" "No taxonomies found for this post type. Taxonomy actions will not be " "available." @@ -838,12 +852,12 @@ msgstr "" "No se han encontrado taxonomías para este tipo de entrada. Las acciones de " "taxonomía no estarán disponibles." -#: src/Modules/Settings/Controllers/Controller.php:229 -#: src/Views/menu-general.php:159 +#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Views/menu-general.php:158 msgid "Who to Notify" msgstr "A quién avisar" -#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Modules/Settings/Controllers/Controller.php:231 msgid "" "Enter a comma separated list of emails that you would like to be notified " "when the action runs." @@ -851,45 +865,45 @@ msgstr "" "Introduce una lista de correos electrónicos separada por comas a los que te " "gustaría avisar cuando caduque la entrada." -#: src/Modules/Settings/Controllers/Controller.php:234 -#: src/Views/menu-general.php:67 +#: src/Modules/Settings/Controllers/Controller.php:235 +#: src/Views/menu-general.php:66 msgid "Default Date/Time Offset" msgstr "Duración por defecto de fecha/hora" -#: src/Modules/Settings/Controllers/Controller.php:237 -#: src/Views/menu-general.php:83 +#: src/Modules/Settings/Controllers/Controller.php:238 +#: src/Views/menu-general.php:82 msgid "PHP strtotime function" msgstr "Función strtotime de PHP" -#: src/Modules/Settings/Controllers/Controller.php:241 +#: src/Modules/Settings/Controllers/Controller.php:242 msgid "Default terms:" msgstr "Términos por defecto:" -#: src/Modules/Settings/Controllers/Controller.php:242 +#: src/Modules/Settings/Controllers/Controller.php:243 msgid "Save changes" msgstr "Guardar los cambios" -#: src/Modules/Settings/Controllers/Controller.php:243 +#: src/Modules/Settings/Controllers/Controller.php:244 msgid "Wait for the validation..." msgstr "Espera la validación…" -#: src/Modules/Settings/Controllers/Controller.php:246 +#: src/Modules/Settings/Controllers/Controller.php:247 msgid "Date Preview" msgstr "Vista previa de la fecha" -#: src/Modules/Settings/Controllers/Controller.php:247 +#: src/Modules/Settings/Controllers/Controller.php:248 msgid "Current Date" msgstr "Fecha actual" -#: src/Modules/Settings/Controllers/Controller.php:248 +#: src/Modules/Settings/Controllers/Controller.php:249 msgid "Computed Date" msgstr "Fecha calculada" -#: src/Modules/Settings/Controllers/Controller.php:249 +#: src/Modules/Settings/Controllers/Controller.php:250 msgid "Error" msgstr "Error" -#: src/Modules/Settings/Controllers/Controller.php:349 +#: src/Modules/Settings/Controllers/Controller.php:352 msgid "Form Validation Failure: Sorry, your nonce did not verify." msgstr "" "Fallo de validación del formulario: Lo sentimos, tu nonce no ha podido " @@ -904,65 +918,65 @@ msgstr "" "Estás usando PublishPress Future Free. La versión Pro tiene más " "características y soporte. %1$sActualizar a Pro%2$s" -#: src/Views/ad-banner-right-sidebar.php:10 +#: src/Views/ad-banner-right-sidebar.php:12 msgid "Upgrade to PublishPress Future Pro" msgstr "Actualizar a PublishPress Future Pro" -#: src/Views/ad-banner-right-sidebar.php:16 +#: src/Views/ad-banner-right-sidebar.php:18 msgid "Enhance the power of PublishPress Future with the Pro version:" msgstr "Mejora la potencia de PublishPress Future con la versión Pro:" -#: src/Views/ad-banner-right-sidebar.php:23 +#: src/Views/ad-banner-right-sidebar.php:25 msgid "Design custom workflows with multiple actions" msgstr "Diseña flujo de trabajo con acciones múltiples" -#: src/Views/ad-banner-right-sidebar.php:25 +#: src/Views/ad-banner-right-sidebar.php:27 msgid "Schedule actions based on the post's publishing date" msgstr "" "Programa la fecha de la acción en función de la fecha de publicación de la " "entrada" -#: src/Views/ad-banner-right-sidebar.php:27 +#: src/Views/ad-banner-right-sidebar.php:29 msgid "Move posts to custom statuses" msgstr "Mover entradas a estados personalizados" -#: src/Views/ad-banner-right-sidebar.php:29 +#: src/Views/ad-banner-right-sidebar.php:31 msgid "Use other plugins to control Future Actions" msgstr "Usa otros plugins para controlar las acciones de \"Future\"" -#: src/Views/ad-banner-right-sidebar.php:31 +#: src/Views/ad-banner-right-sidebar.php:33 msgid "Enjoy fast and professional support" msgstr "Disfruta de un soporte rápido y profesional" -#: src/Views/ad-banner-right-sidebar.php:43 +#: src/Views/ad-banner-right-sidebar.php:45 msgid "Need PublishPress Future Support?" msgstr "¿Necesitas soporte para PublishPress Future?" -#: src/Views/ad-banner-right-sidebar.php:49 +#: src/Views/ad-banner-right-sidebar.php:51 msgid "If you need help or have a new feature request, let us know." msgstr "" "Si necesitas ayuda o tienes una petición de nueva característica, háznoslo " "saber." -#: src/Views/ad-banner-right-sidebar.php:55 +#: src/Views/ad-banner-right-sidebar.php:57 msgid "Request Support" msgstr "Solicitar soporte" -#: src/Views/ad-banner-right-sidebar.php:66 +#: src/Views/ad-banner-right-sidebar.php:68 msgid "Detailed documentation is also available on the plugin website." msgstr "" "También hay disponible una documentación detallada en la web del plugin." -#: src/Views/ad-banner-right-sidebar.php:73 +#: src/Views/ad-banner-right-sidebar.php:75 msgid "View Knowledge Base" msgstr "Ver la base de conocimiento" #. translators: %1$s opens a span tag, %2$s is the action name, %3$s ends a span tag, %4$s is the a span tag, %5$s is the a span tag, %6$s is the a span tag -#: src/Views/expire-column.php:55 +#: src/Views/expire-column.php:57 msgid "%1$s%2$s%3$s on %5$s%4$s%6$s" msgstr "%1$s%2$s%3$s el %5$s%4$s%6$s" -#: src/Views/expire-column.php:92 +#: src/Views/expire-column.php:95 msgid "" "Action was not scheduled due to a configuration issue. Please attempt to " "schedule it again." @@ -970,15 +984,15 @@ msgstr "" "No se ha podido programar la acción debido a un problema de configuración. " "Intenta programarla de nuevo." -#: src/Views/expire-column.php:97 +#: src/Views/expire-column.php:103 msgid "No future action" msgstr "Ninguna acción Future" -#: src/Views/menu-advanced.php:25 +#: src/Views/menu-advanced.php:27 msgid "Advanced Options" msgstr "Opciones avanzadas" -#: src/Views/menu-advanced.php:27 +#: src/Views/menu-advanced.php:29 msgid "" "Please do not update anything here unless you know what it entails. For " "advanced users only." @@ -986,66 +1000,66 @@ msgstr "" "Por favor, no actualices aquí nada, salvo que sepas lo que implica. Solo " "para usuarios avanzados." -#: src/Views/menu-advanced.php:38 +#: src/Views/menu-advanced.php:40 msgid "Future Action Column Style" msgstr "Estilo de columna de «Acción Future»" -#: src/Views/menu-advanced.php:49 +#: src/Views/menu-advanced.php:51 msgid "Detailed" msgstr "Detallado" -#: src/Views/menu-advanced.php:51 +#: src/Views/menu-advanced.php:53 msgid "Displays all information in the Future Action column." msgstr "Muestra toda la información de la columna «Acción de Future»." -#: src/Views/menu-advanced.php:63 +#: src/Views/menu-advanced.php:65 msgid "Simplified" msgstr "Simplificado" -#: src/Views/menu-advanced.php:65 +#: src/Views/menu-advanced.php:67 msgid "Displays only the icon and date/time." msgstr "Muestra solo el icono y la fecha/hora." -#: src/Views/menu-advanced.php:74 +#: src/Views/menu-advanced.php:76 msgid "Time format in the date picker" msgstr "Formato de hora en el selector de fecha" -#: src/Views/menu-advanced.php:85 +#: src/Views/menu-advanced.php:87 msgid "Inherit from Site Settings" msgstr "Heredar desde los ajustes del sitio" -#: src/Views/menu-advanced.php:93 +#: src/Views/menu-advanced.php:95 msgid "24 hours" msgstr "24 horas" -#: src/Views/menu-advanced.php:101 +#: src/Views/menu-advanced.php:103 msgid "AM/PM" msgstr "AM/PM" -#: src/Views/menu-advanced.php:108 +#: src/Views/menu-advanced.php:110 msgid "Choose Which User Roles Can Use PublishPress Future" msgstr "Elige qué perfiles pueden usar PublishPress Fruture" -#: src/Views/menu-advanced.php:139 +#: src/Views/menu-advanced.php:146 msgid "Preserve Data After Deactivating the Plugin" msgstr "Preservar datos después de desactivar el plugin" -#: src/Views/menu-advanced.php:149 +#: src/Views/menu-advanced.php:156 msgid "Preserve data" msgstr "Preservar datos" -#: src/Views/menu-advanced.php:159 +#: src/Views/menu-advanced.php:166 msgid "Delete data" msgstr "Borrar datos" -#: src/Views/menu-advanced.php:164 +#: src/Views/menu-advanced.php:171 msgid "" "Toggle between preserving or deleting data after the plugin is deactivated." msgstr "" "Alterna entre preservar o guardar los datos después de desactivar el plugin." -#: src/Views/menu-advanced.php:175 src/Views/menu-display.php:184 -#: src/Views/menu-general.php:177 +#: src/Views/menu-advanced.php:182 src/Views/menu-display.php:185 +#: src/Views/menu-general.php:176 msgid "Save Changes" msgstr "Guardar los cambios" @@ -1065,83 +1079,75 @@ msgstr "La tabla de depuración está vacía." msgid "Timestamp" msgstr "Marca temporal" -#: src/Views/menu-diagnostics.php:26 +#: src/Views/menu-diagnostics.php:39 msgid "Advanced Diagnostics and Tools" msgstr "Herramientas y diagnósticos avanzados" -#: src/Views/menu-diagnostics.php:30 +#: src/Views/menu-diagnostics.php:43 msgid "WP-Cron Status Check" msgstr "Comprobación del estado de WP-Cron" -#: src/Views/menu-diagnostics.php:34 src/Views/menu-diagnostics.php:47 +#: src/Views/menu-diagnostics.php:47 src/Views/menu-diagnostics.php:60 msgid "Passed" msgstr "Aprobado" -#: src/Views/menu-diagnostics.php:37 +#: src/Views/menu-diagnostics.php:50 msgid "WP Cron Disabled" msgstr "WP Cron desactivado" -#: src/Views/menu-diagnostics.php:43 +#: src/Views/menu-diagnostics.php:56 msgid "Database Schema Check" msgstr "Comprobación del esquema de la base de datos" -#: src/Views/menu-diagnostics.php:51 +#: src/Views/menu-diagnostics.php:64 msgid "Error found on the database schema:" msgid_plural "Errors found on the database schema:" msgstr[0] "Se ha detectado un error en el esquema de la base de datos:" msgstr[1] "Se han detectado unos errores en el esquema de la base de datos:" -#: src/Views/menu-diagnostics.php:66 -msgid "The table _ppfuture_actions_args does not exist." -msgstr "La tabla _ppfuture_actions_args no existe." - -#: src/Views/menu-diagnostics.php:72 -msgid "The column args length was not updated to 1000." -msgstr "La longitud de la columna de argumentos no se actualizó a 1000." - -#: src/Views/menu-diagnostics.php:84 -msgid "Fix Database" -msgstr "Corregir base de datos" +#: src/Views/menu-diagnostics.php:86 +msgid "Try to Fix Database" +msgstr "Intentar corregir la base de datos" -#: src/Views/menu-diagnostics.php:93 +#: src/Views/menu-diagnostics.php:95 msgid "Debug Logging" msgstr "Registro de depuración" -#: src/Views/menu-diagnostics.php:97 src/Views/menu-display.php:94 -#: src/Views/menu-general.php:110 src/Views/menu-general.php:138 +#: src/Views/menu-diagnostics.php:99 src/Views/menu-display.php:95 +#: src/Views/menu-general.php:109 src/Views/menu-general.php:137 msgid "Enabled" msgstr "Activado" -#: src/Views/menu-diagnostics.php:100 +#: src/Views/menu-diagnostics.php:102 msgid "Disable Debugging" msgstr "Desactivar depuración" -#: src/Views/menu-diagnostics.php:106 +#: src/Views/menu-diagnostics.php:108 msgid "Purge Debug Log" msgstr "Purgar el registro de depuración" -#: src/Views/menu-diagnostics.php:114 +#: src/Views/menu-diagnostics.php:116 msgid "View Debug Logs" msgstr "Ver registro de depuración" -#: src/Views/menu-diagnostics.php:117 src/Views/menu-display.php:100 -#: src/Views/menu-general.php:118 src/Views/menu-general.php:147 +#: src/Views/menu-diagnostics.php:119 src/Views/menu-display.php:101 +#: src/Views/menu-general.php:117 src/Views/menu-general.php:146 msgid "Disabled" msgstr "Desactivado" -#: src/Views/menu-diagnostics.php:120 +#: src/Views/menu-diagnostics.php:122 msgid "Enable Debugging" msgstr "Activar depuración" -#: src/Views/menu-diagnostics.php:133 +#: src/Views/menu-diagnostics.php:135 msgid "Migrate Legacy Future Actions" msgstr "Migrar las acciones heredadas de Future" -#: src/Views/menu-diagnostics.php:137 +#: src/Views/menu-diagnostics.php:139 msgid "Run Migration" msgstr "Ejecutar migración" -#: src/Views/menu-diagnostics.php:140 +#: src/Views/menu-diagnostics.php:142 msgid "" "Migrate legacy future actions from WP Cron to the new Action Scheduler. This " "will run in the background and may take a while." @@ -1149,15 +1155,15 @@ msgstr "" "Migrar las acciones heredadas de Future de WP Cron al nuevo Programador de " "acciones. Esto se ejecutará en segundo plano y puede tomar un tiempo." -#: src/Views/menu-diagnostics.php:150 +#: src/Views/menu-diagnostics.php:152 msgid "Restore Legacy Action Arguments" msgstr "Restaura los argumentos de acción heredados" -#: src/Views/menu-diagnostics.php:154 +#: src/Views/menu-diagnostics.php:156 msgid "Run Data Restoration" msgstr "Ejecutar la restauración de datos" -#: src/Views/menu-diagnostics.php:157 +#: src/Views/menu-diagnostics.php:159 msgid "" "Restore legacy action arguments as Post Meta. This is useful if you have " "issues with 3rd party plugins that read that data. This will run in the " @@ -1167,11 +1173,11 @@ msgstr "" "tienes problemas con plugins de terceros que leen esos datos. Esto se " "ejecutará en segundo plano y puede tomar un tiempo." -#: src/Views/menu-diagnostics.php:170 +#: src/Views/menu-diagnostics.php:172 msgid "Legacy Cron Schedule" msgstr "Programación de Cron heredado" -#: src/Views/menu-diagnostics.php:178 +#: src/Views/menu-diagnostics.php:180 msgid "" "The below table will show all currently scheduled cron events for the plugin " "with the next run time." @@ -1179,30 +1185,30 @@ msgstr "" "La siguiente tabla mostrará todos los eventos cron actualmente programados " "para el plugin con la próxima hora de ejecución." -#: src/Views/menu-diagnostics.php:193 +#: src/Views/menu-diagnostics.php:195 msgid "Event" msgstr "Evento" -#: src/Views/menu-diagnostics.php:196 +#: src/Views/menu-diagnostics.php:198 msgid "Posts and expiration settings" msgstr "Ajustes de entradas y caducidad" -#: src/Views/menu-diagnostics.php:252 +#: src/Views/menu-diagnostics.php:254 msgid "This is a legacy feature and will be removed in a future version." msgstr "" "Se trata de una característica heredada que se eliminará en una versión " "futura." -#: src/Views/menu-display.php:36 +#: src/Views/menu-display.php:38 msgid "Default Formats" msgstr "Formatos por defecto" -#: src/Views/menu-display.php:40 +#: src/Views/menu-display.php:42 msgid "Date Format" msgstr "Formato de fecha" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:48 +#: src/Views/menu-display.php:50 msgid "" "The default format to use when displaying the action date within a post " "using the shortcode or within the footer. For information on valid " @@ -1212,16 +1218,16 @@ msgstr "" "de una entrada usando el shortcode o dentro del pie de página. Para " "información sobre las opciones de formato válidas, consulta: %s." -#: src/Views/menu-display.php:52 src/Views/menu-display.php:70 +#: src/Views/menu-display.php:54 src/Views/menu-display.php:72 msgid "PHP Date Function" msgstr "Función de fecha PHP" -#: src/Views/menu-display.php:58 +#: src/Views/menu-display.php:60 msgid "Time Format" msgstr "Formato de hora" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:66 +#: src/Views/menu-display.php:68 msgid "" "The default format to use when displaying the action time within a post " "using the shortcode or within the footer. For information on valid " @@ -1231,11 +1237,11 @@ msgstr "" "de una entrada usando el shortcode o dentro del pie de página. Para " "información sobre las opciones de formato válidas, consulta: %s." -#: src/Views/menu-display.php:79 +#: src/Views/menu-display.php:80 msgid "Post Footer Display" msgstr "Mostrar pie de pagina de la entrada" -#: src/Views/menu-display.php:81 +#: src/Views/menu-display.php:82 msgid "" "Enabling this below will display the action date automatically at the end of " "any post which is set to run an action." @@ -1243,11 +1249,11 @@ msgstr "" "Se mostrará la fecha de caducidad de forma automática al final de cualquier " "entrada que esté a punto de caducar." -#: src/Views/menu-display.php:88 +#: src/Views/menu-display.php:89 msgid "Show in Post Footer?" msgstr "¿Mostrar en el pie de página de la entrada?" -#: src/Views/menu-display.php:103 +#: src/Views/menu-display.php:104 msgid "" "This will enable or disable displaying the future action date in the post " "footer." @@ -1255,11 +1261,11 @@ msgstr "" "Esto activa o desactiva la visualización de la fecha de caducidad en pie de " "página." -#: src/Views/menu-display.php:111 +#: src/Views/menu-display.php:112 msgid "Footer Contents" msgstr "Contenidos del pie de página" -#: src/Views/menu-display.php:116 +#: src/Views/menu-display.php:117 msgid "" "Enter the text you would like to appear at the bottom of every post which " "has an action scheduled. The following placeholders will be replaced with " @@ -1269,31 +1275,31 @@ msgstr "" "entrada con caducidad. Los siguientes marcadores de posición se reemplazarán " "por la fecha de vencimiento de la entrada en el siguiente formato:" -#: src/Views/menu-display.php:134 +#: src/Views/menu-display.php:135 msgid "Footer Style" msgstr "Estilo del pie de página" -#: src/Views/menu-display.php:139 +#: src/Views/menu-display.php:140 msgid "The inline css which will be used to style the footer text." msgstr "" "El css incrustado que se utilizará para dar estilo al texto del pie de " "página." -#: src/Views/menu-display.php:142 +#: src/Views/menu-display.php:143 msgid "Example: " msgstr "Ejemplo: " -#: src/Views/menu-display.php:153 +#: src/Views/menu-display.php:154 msgid "Shortcode" msgstr "Shortcode" #. translators: %s is the shortcode code wrapped in code tags -#: src/Views/menu-display.php:156 +#: src/Views/menu-display.php:157 msgid "Valid %s attributes:" msgstr "Atributos válidos de %s:" #. translators: %1$s and %2$s are code tags that wrap the shortcode attribute names -#: src/Views/menu-display.php:161 +#: src/Views/menu-display.php:162 msgid "" "%1$stype%2$s - valid options are %1$sfull%2$s (default), %1$sdate%2$s, " "%1$stime%2$s" @@ -1303,18 +1309,18 @@ msgstr "" #. translators: %s is a code tag that wraps the shortcode attribute dateformat #. translators: %s is a code tag that wraps the shortcode attribute timeformat -#: src/Views/menu-display.php:171 src/Views/menu-display.php:177 +#: src/Views/menu-display.php:172 src/Views/menu-display.php:178 msgid "%s - format set here will override the value set on the settings page" msgstr "" "%s - el formato establecido aquí anulará el valor establecido en la página " "de ajustes" -#: src/Views/menu-general.php:63 +#: src/Views/menu-general.php:62 msgid "Defaults" msgstr "Valores por defecto" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Views/menu-general.php:75 +#: src/Views/menu-general.php:74 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -1329,39 +1335,39 @@ msgstr "" "month%3$s or %2$s+1 week 2 days 4 hours 2 seconds%3$s or %2$snext " "Thursday%3$s. Por favor, introduce solo términos en inglés." -#: src/Views/menu-general.php:93 +#: src/Views/menu-general.php:92 msgid "Email Notification" msgstr "Correo electrónico para notificación del vencimiento" -#: src/Views/menu-general.php:95 +#: src/Views/menu-general.php:94 msgid "Whenever an action runs, an email can be sent to alert users." msgstr "" "Cuando caduca un post, puede enviarse un correo electrónico alertando a los " "usuarios del vencimiento." -#: src/Views/menu-general.php:102 +#: src/Views/menu-general.php:101 msgid "Enable Email Notification?" msgstr "¿Activar la notificación por correo electrónico?" -#: src/Views/menu-general.php:121 +#: src/Views/menu-general.php:120 msgid "" "This will enable or disable the send of email notification on future action." msgstr "" "Esto activará o desactivará el envío de la notificación por correo " "electrónico después del vencimiento." -#: src/Views/menu-general.php:129 +#: src/Views/menu-general.php:128 msgid "Include Blog Administrators?" msgstr "¿Incluir a administradores de blog?" -#: src/Views/menu-general.php:150 +#: src/Views/menu-general.php:149 msgid "" "This will include all users with the role of \"Administrator\" in the email." msgstr "" "Esto incluirá a todos los usuarios con el perfil de «Administrador» en el " "correo electrónico de caducidad de la entrada." -#: src/Views/menu-general.php:166 +#: src/Views/menu-general.php:165 msgid "" "Enter a comma separate list of emails that you would like to be notified " "when the action runs. This will be applied to ALL post types. You can set " diff --git a/languages/post-expirator-fr_FR.mo b/languages/post-expirator-fr_FR.mo index 2118a75e5..ee7d70ba7 100644 Binary files a/languages/post-expirator-fr_FR.mo and b/languages/post-expirator-fr_FR.mo differ diff --git a/languages/post-expirator-fr_FR.po b/languages/post-expirator-fr_FR.po index 68d2e911a..6836c7f34 100644 --- a/languages/post-expirator-fr_FR.po +++ b/languages/post-expirator-fr_FR.po @@ -5,8 +5,8 @@ msgstr "" "Project-Id-Version: Plugins - PublishPress Future: Automatically Unpublish " "WordPress Posts - Stable (latest release)\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2024-07-15T16:44:18+00:00\n" -"PO-Revision-Date: 2024-07-16 20:14+0200\n" +"POT-Creation-Date: 2024-08-05T20:36:02+00:00\n" +"PO-Revision-Date: 2024-08-06 20:54+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -18,12 +18,12 @@ msgstr "" #. Plugin Name of the plugin #: post-expirator.php -#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 -#: src/Modules/Expirator/Controllers/BulkEditController.php:164 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:143 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:346 -#: src/Modules/Expirator/Controllers/QuickEditController.php:246 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:84 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 +#: src/Modules/Expirator/Controllers/BulkEditController.php:165 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:144 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 +#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 msgid "PublishPress Future" msgstr "PublishPress Future" @@ -51,28 +51,28 @@ msgstr "PublishPress" msgid "http://publishpress.com" msgstr "http://publishpress.com" -#: legacy/classes/Display.class.php:94 +#: legacy/classes/Display.class.php:106 msgid "You do not have permission to configure PublishPress Future." msgstr "" "Vous n’avez pas les droits nécessaires pour configurer PublishPress Future." -#: legacy/classes/Display.class.php:108 +#: legacy/classes/Display.class.php:120 msgid "Debug is disabled" msgstr "Débogage désactivé" -#: legacy/classes/Display.class.php:188 +#: legacy/classes/Display.class.php:204 msgid "Debugging Disabled" msgstr "Débogage désactivé" -#: legacy/classes/Display.class.php:193 +#: legacy/classes/Display.class.php:209 msgid "Debugging Enabled" msgstr "Débogage activé" -#: legacy/classes/Display.class.php:201 +#: legacy/classes/Display.class.php:217 msgid "Debugging Table Emptied" msgstr "Table de débogage vidée" -#: legacy/classes/Display.class.php:207 +#: legacy/classes/Display.class.php:223 msgid "" "The legacy future actions migration has been enqueued and will run " "asynchronously." @@ -80,7 +80,7 @@ msgstr "" "La migration des actions Future héritées a été mise en file d’attente et " "s’exécutera de manière asynchrone." -#: legacy/classes/Display.class.php:216 +#: legacy/classes/Display.class.php:232 msgid "" "The legacy actions arguments restoration has been enqueued and will run " "asynchronously." @@ -88,48 +88,48 @@ msgstr "" "La restauration des arguments des actions héritées a été mise en file " "d’attente et s’exécutera de manière asynchrone." -#: legacy/classes/Display.class.php:226 +#: legacy/classes/Display.class.php:243 msgid "The database schema was fixed." msgstr "Le schéma de la base de données a été corrigé." -#: legacy/classes/Display.class.php:231 +#: legacy/classes/Display.class.php:248 msgid "" "The database schema could not be fixed. Please, contact the support team." msgstr "" "Le schéma de la base de données n’a pas pu être corrigé. Veuillez contacter " "l’équipe de support." -#: legacy/classes/Display.class.php:322 legacy/classes/Display.class.php:380 +#: legacy/classes/Display.class.php:339 legacy/classes/Display.class.php:397 msgid "Saved Options!" msgstr "Options enregistrées !" #. translators: %1$s is the plugin name, %2$s is the star rating markup -#: legacy/classes/Display.class.php:466 +#: legacy/classes/Display.class.php:483 msgid "If you like %1$s, please leave us a %2$s rating. Thank you!" msgstr "" "Si vous appréciez %1$s, veuillez nous laisser une note de %2$s. Merci !" -#: legacy/classes/Display.class.php:481 +#: legacy/classes/Display.class.php:498 msgid "About PublishPress Future" msgstr "À propos de PublishPress Future" -#: legacy/classes/Display.class.php:483 +#: legacy/classes/Display.class.php:500 msgid "About" msgstr "À propos" -#: legacy/classes/Display.class.php:489 +#: legacy/classes/Display.class.php:506 msgid "Future Documentation" msgstr "Documentation de Future" -#: legacy/classes/Display.class.php:491 +#: legacy/classes/Display.class.php:508 msgid "Documentation" msgstr "Documentation" -#: legacy/classes/Display.class.php:497 +#: legacy/classes/Display.class.php:514 msgid "Contact the PublishPress team" msgstr "Contacter l’équipe PublishPress" -#: legacy/classes/Display.class.php:499 +#: legacy/classes/Display.class.php:516 msgid "Contact" msgstr "Contact" @@ -137,154 +137,164 @@ msgstr "Contact" msgid "No taxonomies found" msgstr "Aucune taxonomie trouvée" -#: services.php:71 src/Modules/Settings/SettingsFacade.php:92 +#: services.php:74 src/Modules/Settings/SettingsFacade.php:93 msgid "l F jS, Y" msgstr "I j F Y" -#: services.php:75 src/Modules/Settings/SettingsFacade.php:93 +#: services.php:78 src/Modules/Settings/SettingsFacade.php:94 msgid "g:ia" msgstr "g\\hia" -#: services.php:76 src/Modules/Settings/SettingsFacade.php:94 +#: services.php:79 src/Modules/Settings/SettingsFacade.php:95 msgid "Post expires at EXPIRATIONTIME on ACTIONDATE" msgstr "" "La publication expire à la date d’expiration (EXPIRATIONTIME) de la date " "d’action (ACTIONDATE)." -#: src/Modules/Expirator/Controllers/BlockEditorController.php:127 -#: src/Modules/Expirator/Controllers/BulkEditController.php:163 -#: src/Modules/Expirator/Controllers/QuickEditController.php:245 +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:76 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:84 +msgid "The table %s does not exist." +msgstr "La table %s n’existe pas." + +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:89 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:107 +msgid "The table indexes are invalid: " +msgstr "Les index de table sont invalides : " + +#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 +#: src/Modules/Expirator/Controllers/BulkEditController.php:164 +#: src/Modules/Expirator/Controllers/QuickEditController.php:269 msgid "Categories" msgstr "Catégories" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 -#: src/Modules/Expirator/Controllers/BulkEditController.php:165 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:347 -#: src/Modules/Expirator/Controllers/QuickEditController.php:247 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 +#: src/Modules/Expirator/Controllers/BulkEditController.php:166 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:363 +#: src/Modules/Expirator/Controllers/QuickEditController.php:271 msgid "Enable Future Action" msgstr "Activer l’action Future" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 -#: src/Modules/Expirator/Controllers/BulkEditController.php:166 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:348 -#: src/Modules/Expirator/Controllers/QuickEditController.php:248 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:45 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 +#: src/Modules/Expirator/Controllers/BulkEditController.php:167 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 +#: src/Modules/Expirator/Controllers/QuickEditController.php:272 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:46 msgid "Action" msgstr "Action" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 -#: src/Modules/Expirator/Controllers/BulkEditController.php:169 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:351 -#: src/Modules/Expirator/Controllers/QuickEditController.php:251 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 +#: src/Modules/Expirator/Controllers/BulkEditController.php:170 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:367 +#: src/Modules/Expirator/Controllers/QuickEditController.php:275 msgid "Loading" msgstr "Chargement" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 -#: src/Modules/Expirator/Controllers/BulkEditController.php:167 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:349 -#: src/Modules/Expirator/Controllers/QuickEditController.php:249 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 +#: src/Modules/Expirator/Controllers/BulkEditController.php:168 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:365 +#: src/Modules/Expirator/Controllers/QuickEditController.php:273 msgid "Show Calendar" msgstr "Afficher le calendrier" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 -#: src/Modules/Expirator/Controllers/BulkEditController.php:168 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:350 -#: src/Modules/Expirator/Controllers/QuickEditController.php:250 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:134 +#: src/Modules/Expirator/Controllers/BulkEditController.php:169 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 +#: src/Modules/Expirator/Controllers/QuickEditController.php:274 msgid "Hide Calendar" msgstr "Masquer le calendrier" #. translators: the text between {} is the link to the settings page. #. translators: the text between {{}} is the link to the settings page. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:135 -#: src/Modules/Expirator/Controllers/BulkEditController.php:171 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:353 -#: src/Modules/Expirator/Controllers/QuickEditController.php:253 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:136 +#: src/Modules/Expirator/Controllers/BulkEditController.php:172 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 +#: src/Modules/Expirator/Controllers/QuickEditController.php:277 msgid "Timezone is controlled by the {WordPress Settings}." msgstr "Le fuseau horaire est contrôlé par les {Reglages de WordPress}." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:139 -#: src/Modules/Expirator/Controllers/BulkEditController.php:175 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:357 -#: src/Modules/Expirator/Controllers/QuickEditController.php:257 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:140 +#: src/Modules/Expirator/Controllers/BulkEditController.php:176 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:376 +#: src/Modules/Expirator/Controllers/QuickEditController.php:281 msgid "No %s found." msgstr "Aucune %s trouvée" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:142 -#: src/Modules/Expirator/Controllers/BulkEditController.php:179 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:360 -#: src/Modules/Expirator/Controllers/QuickEditController.php:260 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:143 +#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:379 +#: src/Modules/Expirator/Controllers/QuickEditController.php:284 msgid "You must assign a taxonomy to this post type to use this feature." msgstr "" "Vous devez assigner une taxonomie à ce type de publication pour utiliser " "cette fonctionnalité." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:144 -#: src/Modules/Expirator/Controllers/BulkEditController.php:186 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 -#: src/Modules/Expirator/Controllers/QuickEditController.php:262 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:145 +#: src/Modules/Expirator/Controllers/BulkEditController.php:187 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:384 +#: src/Modules/Expirator/Controllers/QuickEditController.php:286 msgid "New %s" msgstr "Nouveau %s" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:146 -#: src/Modules/Expirator/Controllers/BulkEditController.php:188 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 -#: src/Modules/Expirator/Controllers/QuickEditController.php:264 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:147 +#: src/Modules/Expirator/Controllers/BulkEditController.php:189 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:386 +#: src/Modules/Expirator/Controllers/QuickEditController.php:288 msgid "%s to remove" msgstr "%s à retirer" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:148 -#: src/Modules/Expirator/Controllers/BulkEditController.php:190 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 -#: src/Modules/Expirator/Controllers/QuickEditController.php:266 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:149 +#: src/Modules/Expirator/Controllers/BulkEditController.php:191 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:388 +#: src/Modules/Expirator/Controllers/QuickEditController.php:290 msgid "%s to add" msgstr "%s à ajouter" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:150 -#: src/Modules/Expirator/Controllers/BulkEditController.php:192 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:368 -#: src/Modules/Expirator/Controllers/QuickEditController.php:268 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 +#: src/Modules/Expirator/Controllers/BulkEditController.php:193 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:391 +#: src/Modules/Expirator/Controllers/QuickEditController.php:292 msgid "Search for %s" msgstr "Recherche pour %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 -#: src/Modules/Expirator/Controllers/BulkEditController.php:193 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 -#: src/Modules/Expirator/Controllers/QuickEditController.php:269 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 +#: src/Modules/Expirator/Controllers/BulkEditController.php:194 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:394 +#: src/Modules/Expirator/Controllers/QuickEditController.php:293 msgid "Select an action" msgstr "Sélectionner une action" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 -#: src/Modules/Expirator/Controllers/BulkEditController.php:194 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:370 -#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 +#: src/Modules/Expirator/Controllers/BulkEditController.php:195 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:395 +#: src/Modules/Expirator/Controllers/QuickEditController.php:294 msgid "Select a date" msgstr "Sélectionner la date" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 -#: src/Modules/Expirator/Controllers/BulkEditController.php:195 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:371 -#: src/Modules/Expirator/Controllers/QuickEditController.php:271 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:154 +#: src/Modules/Expirator/Controllers/BulkEditController.php:196 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:396 +#: src/Modules/Expirator/Controllers/QuickEditController.php:295 msgid "Date cannot be in the past" msgstr "La date ne peut pas être dans le passé" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:156 -#: src/Modules/Expirator/Controllers/BulkEditController.php:198 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:374 -#: src/Modules/Expirator/Controllers/QuickEditController.php:274 -#: src/Modules/Settings/Controllers/Controller.php:245 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:157 +#: src/Modules/Expirator/Controllers/BulkEditController.php:199 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:399 +#: src/Modules/Expirator/Controllers/QuickEditController.php:298 +#: src/Modules/Settings/Controllers/Controller.php:246 msgid "Please select one or more %s" msgstr "Veuillez sélectionner un ou plusieurs %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:159 -#: src/Modules/Expirator/Controllers/BulkEditController.php:201 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:377 -#: src/Modules/Expirator/Controllers/QuickEditController.php:277 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:160 +#: src/Modules/Expirator/Controllers/BulkEditController.php:202 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:402 +#: src/Modules/Expirator/Controllers/QuickEditController.php:301 msgid "New status" msgstr "Nouvel état" @@ -306,76 +316,76 @@ msgstr "" "Mettre à jour les actions de Future à partir des métadonnées de la " "publication" -#: src/Modules/Expirator/Controllers/BulkEditController.php:178 +#: src/Modules/Expirator/Controllers/BulkEditController.php:179 msgid "Future Action Update" msgstr "Mise à jour des actions Future" -#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/BulkEditController.php:181 msgid "— No Change —" msgstr "— Aucune modification —" -#: src/Modules/Expirator/Controllers/BulkEditController.php:181 +#: src/Modules/Expirator/Controllers/BulkEditController.php:182 msgid "Add or update action for posts" msgstr "Ajouter ou mettre à jour l’action pour les publications" -#: src/Modules/Expirator/Controllers/BulkEditController.php:182 +#: src/Modules/Expirator/Controllers/BulkEditController.php:183 msgid "Add action if none exists for posts" msgstr "Ajouter une action si aucune n’existe pour les publications" -#: src/Modules/Expirator/Controllers/BulkEditController.php:183 +#: src/Modules/Expirator/Controllers/BulkEditController.php:184 msgid "Update the existing actions for posts" msgstr "Mise à jour des actions existantes pour les publications" -#: src/Modules/Expirator/Controllers/BulkEditController.php:184 +#: src/Modules/Expirator/Controllers/BulkEditController.php:185 msgid "Remove action from posts" msgstr "Retirer l’action de las publications" -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:345 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:361 msgid "Category" msgstr "Catégoria" -#: src/Modules/Expirator/Controllers/PluginsListController.php:45 +#: src/Modules/Expirator/Controllers/PluginsListController.php:46 msgid "Settings" msgstr "Réglages" -#: src/Modules/Expirator/Controllers/PostListController.php:66 +#: src/Modules/Expirator/Controllers/PostListController.php:75 msgid "Future Action" msgstr "Action Future" -#: src/Modules/Expirator/Controllers/RestAPIController.php:207 -#: src/Modules/Expirator/Controllers/RestAPIController.php:214 +#: src/Modules/Expirator/Controllers/RestAPIController.php:208 +#: src/Modules/Expirator/Controllers/RestAPIController.php:215 msgid "Invalid date time offset." msgstr "Décalage de la date et de l’heure invalide." -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:86 msgid "Future" msgstr "Future" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:94 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:95 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:96 #: src/Views/tabs.php:59 msgid "Action Settings" msgstr "Réglages des actions" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:103 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:104 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:42 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:105 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:43 msgid "Scheduled Actions" msgstr "Actions planifiées" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:173 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:174 msgid "Log format" msgstr "Format du journal" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:180 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:181 msgid "List" msgstr "Liste" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:189 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:190 msgid "Popup" msgstr "Fenêtre surgissante" -#: src/Modules/Expirator/Controllers/ShortcodeController.php:77 +#: src/Modules/Expirator/Controllers/ShortcodeController.php:79 msgid "" "The shortcode [futureaction] must be used inside the loop or with the " "post_id attribute." @@ -383,6 +393,11 @@ msgstr "" "Le code court [futureaction] doit être utilisé à l’intérieur de la boucle ou " "avec l’attribut post_id." +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:96 +msgid "The column args length was not updated to 1000." +msgstr "" +"La longueur de la colonne des arguments n’a pas été mise à jour à 1000." + #: src/Modules/Expirator/ExpirationActions/ChangePostStatus.php:54 #: src/Modules/Expirator/ExpirationActions/PostStatusToDraft.php:52 #: src/Modules/Expirator/ExpirationActions/PostStatusToPrivate.php:52 @@ -417,12 +432,12 @@ msgid "Delete" msgstr "Supprimer" #. translators: %s is the post type singular label -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:64 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:65 msgid "No terms were added to the %s." msgstr "Aucun terme n’a été ajouté à la %s." #. translators: %1$s is the taxonomy label, %2$s is the post type singular label, %3$s is the list of terms added, %4$s is the list of terms on the post -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:75 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:77 msgid "" "The following terms (%1$s) were added to the %2$s: \"%3$s\". The full list " "of terms on the post is: %4$s." @@ -431,7 +446,7 @@ msgstr "" "complète des termes de la publication est la suivante : %4$s." #. translators: %s is the taxonomy name (plural) -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:118 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:120 msgid "Add extra %s" msgstr "Ajouter des %s supplémentaires" @@ -515,35 +530,35 @@ msgstr "%s a été retirée de la liste des épinglées." msgid "Unstick" msgstr "Ne plus épingler" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:463 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:464 msgid "Email is disabled" msgstr "L’e-mail est désactivé" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email sent" msgstr "L’e-mail a été envoyé" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email not sent" msgstr "L’e-mail n’a pas été envoyé" #. translators: %1$s: post title placeholder, %2$s: notification text, %3$s: action date placeholder, %4$s: post link placeholder -#: src/Modules/Expirator/Models/ExpirablePostModel.php:617 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:618 msgid "%1$s. %2$s on %3$s. The post link is %4$s" msgstr "%1$s. %2$s le %3$s. Le lien de la publication est %s" #. translators: %s is the post title -#: src/Modules/Expirator/Models/ExpirablePostModel.php:635 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:636 msgid "Future Action Complete \"%s\"" msgstr "Action Future terminée « %s »" #. translators: 1: is the blog name, 2: the email subject -#: src/Modules/Expirator/Models/ExpirablePostModel.php:639 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:640 msgid "[%1$s] %2$s" msgstr "[%1$s] %2$s" #. translators: %s is the date/time offset and %s is the post type. -#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:135 +#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:137 msgid "" "Invalid date/time offset \"%s\" for post type \"%s\". Please ensure you use " "only English terms for the date/time offset, such as \"3 months\" or \"1 " @@ -554,87 +569,87 @@ msgstr "" "anglais pour le décalage de date/heure, tels que « 3 months » (3 mois) ou " "« 1 week » (1 semaine)." -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:48 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 msgid "Status" msgstr "État" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 msgid "Arguments" msgstr "Arguments" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 msgid "Logs" msgstr "Journaux" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 msgid "Scheduled Date" msgstr "Date planifiée" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:53 msgid "Recurrence" msgstr "Récurrence" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:60 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 msgid "Run" msgstr "Exécuter" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:62 msgid "Process the action now" msgstr "Traiter l’action maintenant" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:64 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 msgid "Cancel" msgstr "Anuler" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:66 msgid "" "Cancel the action. This will prevent the action from running in the future" msgstr "Annuler l’action. Cela empêchera l’exécution de l’action à l’avenir" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:78 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:79 msgid "%s year" msgid_plural "%s years" msgstr[0] "%s année" msgstr[1] "%s années" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:83 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:84 msgid "%s month" msgid_plural "%s months" msgstr[0] "%s mois" msgstr[1] "%s mois" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:88 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:89 msgid "%s week" msgid_plural "%s weeks" msgstr[0] "%s semaine" msgstr[1] "%s semaines" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:93 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:94 msgid "%s day" msgid_plural "%s days" msgstr[0] "%s jour" msgstr[1] "%s jours" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:98 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:99 msgid "%s hour" msgid_plural "%s hours" msgstr[0] "%s heure" msgstr[1] "%s heures" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:103 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:104 msgid "%s minute" msgid_plural "%s minutes" msgstr[0] "%s minute" msgstr[1] "%s minutes" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:108 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:109 msgid "%s second" msgid_plural "%s seconds" msgstr[0] "%s seconde" @@ -649,7 +664,7 @@ msgid "Uninitialized" msgstr "Non initialisé" #: src/Modules/Expirator/Tables/ScheduledActionsTable.php:273 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:339 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:340 msgid "Scheduled" msgstr "Planifié" @@ -673,87 +688,87 @@ msgstr "En cours d’exécution" msgid "All" msgstr "Tout" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:314 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:315 msgid "Search hook, args and claim ID" msgstr "Rechercher le crochet, les arguments et l’ID de la demande" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:343 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:344 msgid "Completed" msgstr "Terminé" #. translators: %1$s: post type label, %2$d: post ID, %3$s: post link tag start, %4$s: post title, %5$s: post link tag end -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:448 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:449 msgid "%1$s: [%2$d] %3$s%4$s%5$s" msgstr "%s : [%2$d] %3$s%4$s%5$s" #. translators: %s is the new status -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:483 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:484 msgid "New Status: %s" msgstr "Nouvel état : %s" #. translators: %s is the list of terms -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:491 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:492 msgid "Terms: %s" msgstr "Termes : %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:594 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:595 msgid "View log" msgstr "Voir le journal" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:605 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:606 msgid "Action: " msgstr "Action : " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:611 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:612 msgid "Status: " msgstr "État : " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:617 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:618 msgid "Arguments: " msgstr "Arguments : " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:623 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:624 msgid "Scheduled date: " msgstr "Date planifiée : " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:637 -#: src/Views/menu-diagnostics.php:190 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Views/menu-diagnostics.php:192 msgid "Date" msgstr "Date" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:639 #: src/Views/menu-debug-log.php:37 msgid "Message" msgstr "Message" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:672 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:673 msgid "Async" msgstr "Asynchrone" #. translators: %s is the date interval in human readable format in the past -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:689 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:690 msgid " (%s ago)" msgstr " (il y a %s)" #. translators: %s is the date interval in human readable format in the present or future -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:695 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:696 msgid " (%s)" msgstr " (%s)" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:719 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:720 msgid "Now!" msgstr "Maintenant !" #. translators: %s: time interval -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:768 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:770 msgid "Every %s" msgstr "Tous les %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:774 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:776 msgid "Non-repeating" msgstr "Pas de répétition" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:783 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:786 msgid "No Scheduled Actions." msgstr "Aucune action planifiée." @@ -769,12 +784,12 @@ msgstr "" #: src/Modules/ProFeaturesAds/views/actions-workflows-page.html.php:18 #: src/Modules/VersionNotices/Module.php:125 -#: src/Views/ad-banner-right-sidebar.php:35 +#: src/Views/ad-banner-right-sidebar.php:37 msgid "Upgrade to Pro" msgstr "Passez à la version Pro" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Modules/Settings/Controllers/Controller.php:198 +#: src/Modules/Settings/Controllers/Controller.php:199 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -788,11 +803,11 @@ msgstr "" "%2$s + 1 semaine 2 jours 4 heures 2 secondes%3$s ou %2$sprochain jeudi%3$s. " "Pour ces valeurs, veuillez utiliser uniquement des termes en anglais." -#: src/Modules/Settings/Controllers/Controller.php:209 +#: src/Modules/Settings/Controllers/Controller.php:210 msgid "Default Values" msgstr "Valeurs par défaut" -#: src/Modules/Settings/Controllers/Controller.php:210 +#: src/Modules/Settings/Controllers/Controller.php:211 msgid "" "Use the values below to set the default actions/values to be used for each " "for the corresponding post types. These values can all be overwritten when " @@ -803,40 +818,40 @@ msgstr "" "peuvent toutes être remplacées lors de la création/modification de la " "publication/page." -#: src/Modules/Settings/Controllers/Controller.php:214 +#: src/Modules/Settings/Controllers/Controller.php:215 msgid "Active" msgstr "Actif" -#: src/Modules/Settings/Controllers/Controller.php:215 +#: src/Modules/Settings/Controllers/Controller.php:216 msgid "Activate the PublishPress Future actions for this post type" msgstr "Activer les actions de PublishPress Future pour ce type de publication" -#: src/Modules/Settings/Controllers/Controller.php:216 +#: src/Modules/Settings/Controllers/Controller.php:217 msgid "Default Action" msgstr "Action par défaut" -#: src/Modules/Settings/Controllers/Controller.php:217 +#: src/Modules/Settings/Controllers/Controller.php:218 msgid "Select the default action for the post type." msgstr "Sélectionner l’action par défaut pour le type de publication." -#: src/Modules/Settings/Controllers/Controller.php:221 -#: src/Views/taxonomy-field.php:11 +#: src/Modules/Settings/Controllers/Controller.php:222 +#: src/Views/taxonomy-field.php:14 msgid "Select the taxonomy to be used for actions." msgstr "Sélectionner la taxonomie à utiliser pour les actions." -#: src/Modules/Settings/Controllers/Controller.php:225 +#: src/Modules/Settings/Controllers/Controller.php:226 msgid "Auto-enable" msgstr "Activer automatiquement" -#: src/Modules/Settings/Controllers/Controller.php:226 +#: src/Modules/Settings/Controllers/Controller.php:227 msgid "Enabled for all new posts" msgstr "Activé pour tous les nouvelles publications" -#: src/Modules/Settings/Controllers/Controller.php:227 +#: src/Modules/Settings/Controllers/Controller.php:228 msgid "Taxonomy" msgstr "Taxonomie" -#: src/Modules/Settings/Controllers/Controller.php:228 +#: src/Modules/Settings/Controllers/Controller.php:229 msgid "" "No taxonomies found for this post type. Taxonomy actions will not be " "available." @@ -844,12 +859,12 @@ msgstr "" "Aucune taxonomie n’a été trouvée pour ce type de publication. Les actions de " "taxonomie ne seront pas disponibles." -#: src/Modules/Settings/Controllers/Controller.php:229 -#: src/Views/menu-general.php:159 +#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Views/menu-general.php:158 msgid "Who to Notify" msgstr "Personne à notifier" -#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Modules/Settings/Controllers/Controller.php:231 msgid "" "Enter a comma separated list of emails that you would like to be notified " "when the action runs." @@ -857,45 +872,45 @@ msgstr "" "Saisir une liste d’e-mails séparés par des virgules que vous souhaitez voir " "notifiés lorsque l’action est exécutée." -#: src/Modules/Settings/Controllers/Controller.php:234 -#: src/Views/menu-general.php:67 +#: src/Modules/Settings/Controllers/Controller.php:235 +#: src/Views/menu-general.php:66 msgid "Default Date/Time Offset" msgstr "Décalage date/heure par défaut" -#: src/Modules/Settings/Controllers/Controller.php:237 -#: src/Views/menu-general.php:83 +#: src/Modules/Settings/Controllers/Controller.php:238 +#: src/Views/menu-general.php:82 msgid "PHP strtotime function" msgstr "Fonction strtotime de PHP" -#: src/Modules/Settings/Controllers/Controller.php:241 +#: src/Modules/Settings/Controllers/Controller.php:242 msgid "Default terms:" msgstr "Termes par défaut :" -#: src/Modules/Settings/Controllers/Controller.php:242 +#: src/Modules/Settings/Controllers/Controller.php:243 msgid "Save changes" msgstr "Enregistrer les modifications" -#: src/Modules/Settings/Controllers/Controller.php:243 +#: src/Modules/Settings/Controllers/Controller.php:244 msgid "Wait for the validation..." msgstr "Attendre la validation…" -#: src/Modules/Settings/Controllers/Controller.php:246 +#: src/Modules/Settings/Controllers/Controller.php:247 msgid "Date Preview" msgstr "Aperçu de la date" -#: src/Modules/Settings/Controllers/Controller.php:247 +#: src/Modules/Settings/Controllers/Controller.php:248 msgid "Current Date" msgstr "Date actuelle" -#: src/Modules/Settings/Controllers/Controller.php:248 +#: src/Modules/Settings/Controllers/Controller.php:249 msgid "Computed Date" msgstr "Date calculée" -#: src/Modules/Settings/Controllers/Controller.php:249 +#: src/Modules/Settings/Controllers/Controller.php:250 msgid "Error" msgstr "Erreur" -#: src/Modules/Settings/Controllers/Controller.php:349 +#: src/Modules/Settings/Controllers/Controller.php:352 msgid "Form Validation Failure: Sorry, your nonce did not verify." msgstr "" "Échec de la validation du formulaire : Désolé, votre nonce n’a pas été " @@ -910,66 +925,66 @@ msgstr "" "Vous utilisez PublishPress Future Free. La version Pro offre plus de " "fonctionnalités et de support. %1$sPasser à la version Pro%2$s" -#: src/Views/ad-banner-right-sidebar.php:10 +#: src/Views/ad-banner-right-sidebar.php:12 msgid "Upgrade to PublishPress Future Pro" msgstr "Passez à PublishPress Future Pro" -#: src/Views/ad-banner-right-sidebar.php:16 +#: src/Views/ad-banner-right-sidebar.php:18 msgid "Enhance the power of PublishPress Future with the Pro version:" msgstr "Augmentez la puissance de PublishPress Future avec la version Pro :" -#: src/Views/ad-banner-right-sidebar.php:23 +#: src/Views/ad-banner-right-sidebar.php:25 msgid "Design custom workflows with multiple actions" msgstr "Créer des flux de travail personnalisés avec des actions multiples" -#: src/Views/ad-banner-right-sidebar.php:25 +#: src/Views/ad-banner-right-sidebar.php:27 msgid "Schedule actions based on the post's publishing date" msgstr "" "Planifier les actions en fonction de la date de publication de la publication" -#: src/Views/ad-banner-right-sidebar.php:27 +#: src/Views/ad-banner-right-sidebar.php:29 msgid "Move posts to custom statuses" msgstr "Déplacer les publications vers des états personnalisés" -#: src/Views/ad-banner-right-sidebar.php:29 +#: src/Views/ad-banner-right-sidebar.php:31 msgid "Use other plugins to control Future Actions" msgstr "" "Utiliser les autres extensions pour contrôler les actions de « Future »" -#: src/Views/ad-banner-right-sidebar.php:31 +#: src/Views/ad-banner-right-sidebar.php:33 msgid "Enjoy fast and professional support" msgstr "Bénéficier du support rapide et professionnel" -#: src/Views/ad-banner-right-sidebar.php:43 +#: src/Views/ad-banner-right-sidebar.php:45 msgid "Need PublishPress Future Support?" msgstr "Vous avez besoin du support de PublishPress Future ?" -#: src/Views/ad-banner-right-sidebar.php:49 +#: src/Views/ad-banner-right-sidebar.php:51 msgid "If you need help or have a new feature request, let us know." msgstr "" "Si vous avez besoin d’aide ou si vous avez une nouvelle demande de " "fonctionnalité, faites-le nous savoir." -#: src/Views/ad-banner-right-sidebar.php:55 +#: src/Views/ad-banner-right-sidebar.php:57 msgid "Request Support" msgstr "Demande de support" -#: src/Views/ad-banner-right-sidebar.php:66 +#: src/Views/ad-banner-right-sidebar.php:68 msgid "Detailed documentation is also available on the plugin website." msgstr "" "Une documentation détaillée est également disponible sur le site de " "l’extension." -#: src/Views/ad-banner-right-sidebar.php:73 +#: src/Views/ad-banner-right-sidebar.php:75 msgid "View Knowledge Base" msgstr "Voir la base de connaissances" #. translators: %1$s opens a span tag, %2$s is the action name, %3$s ends a span tag, %4$s is the a span tag, %5$s is the a span tag, %6$s is the a span tag -#: src/Views/expire-column.php:55 +#: src/Views/expire-column.php:57 msgid "%1$s%2$s%3$s on %5$s%4$s%6$s" msgstr "%1$s%2$s%3$s sur %5$s%4$s%6$s" -#: src/Views/expire-column.php:92 +#: src/Views/expire-column.php:95 msgid "" "Action was not scheduled due to a configuration issue. Please attempt to " "schedule it again." @@ -977,15 +992,15 @@ msgstr "" "L’action n’a pas pu être planifiée en raison d’un problème de configuration. " "Veuillez essayer de la replanifier." -#: src/Views/expire-column.php:97 +#: src/Views/expire-column.php:103 msgid "No future action" msgstr "Aucune action future" -#: src/Views/menu-advanced.php:25 +#: src/Views/menu-advanced.php:27 msgid "Advanced Options" msgstr "Options avancées" -#: src/Views/menu-advanced.php:27 +#: src/Views/menu-advanced.php:29 msgid "" "Please do not update anything here unless you know what it entails. For " "advanced users only." @@ -993,67 +1008,67 @@ msgstr "" "Veuillez ne rien mettre à jour ici si vous ne savez pas ce que cela " "implique. Pour les utilisateurs/utilisatrices avancés uniquement." -#: src/Views/menu-advanced.php:38 +#: src/Views/menu-advanced.php:40 msgid "Future Action Column Style" msgstr "Style de colonne de l’action Future" -#: src/Views/menu-advanced.php:49 +#: src/Views/menu-advanced.php:51 msgid "Detailed" msgstr "Détaillé" -#: src/Views/menu-advanced.php:51 +#: src/Views/menu-advanced.php:53 msgid "Displays all information in the Future Action column." msgstr "Affiche toutes les informations de la colonne « Action de Future »." -#: src/Views/menu-advanced.php:63 +#: src/Views/menu-advanced.php:65 msgid "Simplified" msgstr "Simplifié" -#: src/Views/menu-advanced.php:65 +#: src/Views/menu-advanced.php:67 msgid "Displays only the icon and date/time." msgstr "Affiche uniquement l’icône et la date/heure." -#: src/Views/menu-advanced.php:74 +#: src/Views/menu-advanced.php:76 msgid "Time format in the date picker" msgstr "Format de l’heure dans le sélecteur de date" -#: src/Views/menu-advanced.php:85 +#: src/Views/menu-advanced.php:87 msgid "Inherit from Site Settings" msgstr "Hérite de réglages du site" -#: src/Views/menu-advanced.php:93 +#: src/Views/menu-advanced.php:95 msgid "24 hours" msgstr "24 heurs" -#: src/Views/menu-advanced.php:101 +#: src/Views/menu-advanced.php:103 msgid "AM/PM" msgstr "AM/PM" -#: src/Views/menu-advanced.php:108 +#: src/Views/menu-advanced.php:110 msgid "Choose Which User Roles Can Use PublishPress Future" msgstr "Choisissez les rôles pouvant utiliser PublishPress Future" -#: src/Views/menu-advanced.php:139 +#: src/Views/menu-advanced.php:146 msgid "Preserve Data After Deactivating the Plugin" msgstr "Conserver les données après la désactivation de l’extension" -#: src/Views/menu-advanced.php:149 +#: src/Views/menu-advanced.php:156 msgid "Preserve data" msgstr "Conserver les données" -#: src/Views/menu-advanced.php:159 +#: src/Views/menu-advanced.php:166 msgid "Delete data" msgstr "Supprimer les données" -#: src/Views/menu-advanced.php:164 +#: src/Views/menu-advanced.php:171 msgid "" "Toggle between preserving or deleting data after the plugin is deactivated." msgstr "" "Permutez entre la conservation ou la suppression des données après la " "désactivation de l’extension." -#: src/Views/menu-advanced.php:175 src/Views/menu-display.php:184 -#: src/Views/menu-general.php:177 +#: src/Views/menu-advanced.php:182 src/Views/menu-display.php:185 +#: src/Views/menu-general.php:176 msgid "Save Changes" msgstr "Enregistrer les modifications" @@ -1072,84 +1087,75 @@ msgstr "La table de débogage est actuellement vide." msgid "Timestamp" msgstr "Horodatage" -#: src/Views/menu-diagnostics.php:26 +#: src/Views/menu-diagnostics.php:39 msgid "Advanced Diagnostics and Tools" msgstr "Diagnostics et outils avancés" -#: src/Views/menu-diagnostics.php:30 +#: src/Views/menu-diagnostics.php:43 msgid "WP-Cron Status Check" msgstr "Vérification de l’état de WP-Cron" -#: src/Views/menu-diagnostics.php:34 src/Views/menu-diagnostics.php:47 +#: src/Views/menu-diagnostics.php:47 src/Views/menu-diagnostics.php:60 msgid "Passed" msgstr "Succès" -#: src/Views/menu-diagnostics.php:37 +#: src/Views/menu-diagnostics.php:50 msgid "WP Cron Disabled" msgstr "WP Cron désactivé" -#: src/Views/menu-diagnostics.php:43 +#: src/Views/menu-diagnostics.php:56 msgid "Database Schema Check" msgstr "Vérification du schéma de la base de données" -#: src/Views/menu-diagnostics.php:51 +#: src/Views/menu-diagnostics.php:64 msgid "Error found on the database schema:" msgid_plural "Errors found on the database schema:" msgstr[0] "Erreur détectée dans le schéma de la base de données :" msgstr[1] "Erreurs détectées dans le schéma de la base de données :" -#: src/Views/menu-diagnostics.php:66 -msgid "The table _ppfuture_actions_args does not exist." -msgstr "Le tableau _ppfuture_actions_args n’existe pas." - -#: src/Views/menu-diagnostics.php:72 -msgid "The column args length was not updated to 1000." -msgstr "" -"La longueur de la colonne des arguments n’a pas été mise à jour à 1000." - -#: src/Views/menu-diagnostics.php:84 -msgid "Fix Database" -msgstr "Corriger la base de données" +#: src/Views/menu-diagnostics.php:86 +msgid "Try to Fix Database" +msgstr "Essayer de corriger la base de données" -#: src/Views/menu-diagnostics.php:93 +#: src/Views/menu-diagnostics.php:95 msgid "Debug Logging" msgstr "Journalisation de débogage" -#: src/Views/menu-diagnostics.php:97 src/Views/menu-display.php:94 -#: src/Views/menu-general.php:110 src/Views/menu-general.php:138 +#: src/Views/menu-diagnostics.php:99 src/Views/menu-display.php:95 +#: src/Views/menu-general.php:109 src/Views/menu-general.php:137 msgid "Enabled" msgstr "Activé" -#: src/Views/menu-diagnostics.php:100 +#: src/Views/menu-diagnostics.php:102 msgid "Disable Debugging" msgstr "Désactiver le débogage" -#: src/Views/menu-diagnostics.php:106 +#: src/Views/menu-diagnostics.php:108 msgid "Purge Debug Log" msgstr "Purge le log de débogage" -#: src/Views/menu-diagnostics.php:114 +#: src/Views/menu-diagnostics.php:116 msgid "View Debug Logs" msgstr "Voir les logs de déboguage" -#: src/Views/menu-diagnostics.php:117 src/Views/menu-display.php:100 -#: src/Views/menu-general.php:118 src/Views/menu-general.php:147 +#: src/Views/menu-diagnostics.php:119 src/Views/menu-display.php:101 +#: src/Views/menu-general.php:117 src/Views/menu-general.php:146 msgid "Disabled" msgstr "Désactivé" -#: src/Views/menu-diagnostics.php:120 +#: src/Views/menu-diagnostics.php:122 msgid "Enable Debugging" msgstr "Activer le débogage" -#: src/Views/menu-diagnostics.php:133 +#: src/Views/menu-diagnostics.php:135 msgid "Migrate Legacy Future Actions" msgstr "Migrer les actions Future héritées" -#: src/Views/menu-diagnostics.php:137 +#: src/Views/menu-diagnostics.php:139 msgid "Run Migration" msgstr "Exécuter la migration" -#: src/Views/menu-diagnostics.php:140 +#: src/Views/menu-diagnostics.php:142 msgid "" "Migrate legacy future actions from WP Cron to the new Action Scheduler. This " "will run in the background and may take a while." @@ -1158,15 +1164,15 @@ msgstr "" "d’actions. Cette opération s’effectuera en arrière-plan et peut prendre un " "certain temps." -#: src/Views/menu-diagnostics.php:150 +#: src/Views/menu-diagnostics.php:152 msgid "Restore Legacy Action Arguments" msgstr "Restaurer les arguments d’action hérités" -#: src/Views/menu-diagnostics.php:154 +#: src/Views/menu-diagnostics.php:156 msgid "Run Data Restoration" msgstr "Exécuter la restauration des données" -#: src/Views/menu-diagnostics.php:157 +#: src/Views/menu-diagnostics.php:159 msgid "" "Restore legacy action arguments as Post Meta. This is useful if you have " "issues with 3rd party plugins that read that data. This will run in the " @@ -1177,11 +1183,11 @@ msgstr "" "lisent ces données. Ceci est effectué en arrière-plan et peut prendre un " "certain temps." -#: src/Views/menu-diagnostics.php:170 +#: src/Views/menu-diagnostics.php:172 msgid "Legacy Cron Schedule" msgstr "Calendrier Cron hérité" -#: src/Views/menu-diagnostics.php:178 +#: src/Views/menu-diagnostics.php:180 msgid "" "The below table will show all currently scheduled cron events for the plugin " "with the next run time." @@ -1189,30 +1195,30 @@ msgstr "" "Le tableau ci-dessous affiche tous les évènements cron actuellement " "planifiés pour l’extension avec la prochaine date d’exécution." -#: src/Views/menu-diagnostics.php:193 +#: src/Views/menu-diagnostics.php:195 msgid "Event" msgstr "Évènement" -#: src/Views/menu-diagnostics.php:196 +#: src/Views/menu-diagnostics.php:198 msgid "Posts and expiration settings" msgstr "Réglages des publications et de l’expiration" -#: src/Views/menu-diagnostics.php:252 +#: src/Views/menu-diagnostics.php:254 msgid "This is a legacy feature and will be removed in a future version." msgstr "" "Il s’agit d’une fonctionnalité héritée du passé qui sera supprimée dans une " "prochaine version." -#: src/Views/menu-display.php:36 +#: src/Views/menu-display.php:38 msgid "Default Formats" msgstr "Formats par défaut" -#: src/Views/menu-display.php:40 +#: src/Views/menu-display.php:42 msgid "Date Format" msgstr "Format de date" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:48 +#: src/Views/menu-display.php:50 msgid "" "The default format to use when displaying the action date within a post " "using the shortcode or within the footer. For information on valid " @@ -1222,16 +1228,16 @@ msgstr "" "publication à l’aide du code court ou dans le pied de page. Pour plus " "d’informations sur les options de formatage valides, voir : %s." -#: src/Views/menu-display.php:52 src/Views/menu-display.php:70 +#: src/Views/menu-display.php:54 src/Views/menu-display.php:72 msgid "PHP Date Function" msgstr "Fonction date de PHP" -#: src/Views/menu-display.php:58 +#: src/Views/menu-display.php:60 msgid "Time Format" msgstr "Format d’heure" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:66 +#: src/Views/menu-display.php:68 msgid "" "The default format to use when displaying the action time within a post " "using the shortcode or within the footer. For information on valid " @@ -1241,11 +1247,11 @@ msgstr "" "publication à l’aide du code court ou dans le pied de page. Pour plus " "d’informations sur les options de formatage valides, voir : %s." -#: src/Views/menu-display.php:79 +#: src/Views/menu-display.php:80 msgid "Post Footer Display" msgstr "Affichage dans le pied de page" -#: src/Views/menu-display.php:81 +#: src/Views/menu-display.php:82 msgid "" "Enabling this below will display the action date automatically at the end of " "any post which is set to run an action." @@ -1254,11 +1260,11 @@ msgstr "" "automatiquement à la fin de toutes les publications qui sont configurées " "pour exécuter une action." -#: src/Views/menu-display.php:88 +#: src/Views/menu-display.php:89 msgid "Show in Post Footer?" msgstr "Afficher dans le pied de page de la publication ?" -#: src/Views/menu-display.php:103 +#: src/Views/menu-display.php:104 msgid "" "This will enable or disable displaying the future action date in the post " "footer." @@ -1266,11 +1272,11 @@ msgstr "" "Cette option permet d’activer ou de désactiver l’affichage de la date de " "l’action Future dans le pied de page de la publication." -#: src/Views/menu-display.php:111 +#: src/Views/menu-display.php:112 msgid "Footer Contents" msgstr "Contenus du pied de page" -#: src/Views/menu-display.php:116 +#: src/Views/menu-display.php:117 msgid "" "Enter the text you would like to appear at the bottom of every post which " "has an action scheduled. The following placeholders will be replaced with " @@ -1281,30 +1287,30 @@ msgstr "" "suivants seront remplacés par la date de l’action future dans le format " "suivant :" -#: src/Views/menu-display.php:134 +#: src/Views/menu-display.php:135 msgid "Footer Style" msgstr "Style du pied de page" -#: src/Views/menu-display.php:139 +#: src/Views/menu-display.php:140 msgid "The inline css which will be used to style the footer text." msgstr "" "Les CSS en ligne qui seront utilisées pour styler le texte de pied de page." -#: src/Views/menu-display.php:142 +#: src/Views/menu-display.php:143 msgid "Example: " msgstr "Exemple : " -#: src/Views/menu-display.php:153 +#: src/Views/menu-display.php:154 msgid "Shortcode" msgstr "Code court" #. translators: %s is the shortcode code wrapped in code tags -#: src/Views/menu-display.php:156 +#: src/Views/menu-display.php:157 msgid "Valid %s attributes:" msgstr "Attributs %s valides :" #. translators: %1$s and %2$s are code tags that wrap the shortcode attribute names -#: src/Views/menu-display.php:161 +#: src/Views/menu-display.php:162 msgid "" "%1$stype%2$s - valid options are %1$sfull%2$s (default), %1$sdate%2$s, " "%1$stime%2$s" @@ -1314,18 +1320,18 @@ msgstr "" #. translators: %s is a code tag that wraps the shortcode attribute dateformat #. translators: %s is a code tag that wraps the shortcode attribute timeformat -#: src/Views/menu-display.php:171 src/Views/menu-display.php:177 +#: src/Views/menu-display.php:172 src/Views/menu-display.php:178 msgid "%s - format set here will override the value set on the settings page" msgstr "" "%s - le format défini ici remplacera la valeur définie sur la page des " "réglages." -#: src/Views/menu-general.php:63 +#: src/Views/menu-general.php:62 msgid "Defaults" msgstr "Défaut" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Views/menu-general.php:75 +#: src/Views/menu-general.php:74 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -1340,39 +1346,39 @@ msgstr "" "jeudi%3$s. Pour ces valeurs, veuillez utiliser uniquement des termes en " "anglais." -#: src/Views/menu-general.php:93 +#: src/Views/menu-general.php:92 msgid "Email Notification" msgstr "Notification par e-mail" -#: src/Views/menu-general.php:95 +#: src/Views/menu-general.php:94 msgid "Whenever an action runs, an email can be sent to alert users." msgstr "" "Chaque fois qu’une action est exécutée, un e-mail peut être envoyé pour " "alerter les utilisateurs/utilisatrices." -#: src/Views/menu-general.php:102 +#: src/Views/menu-general.php:101 msgid "Enable Email Notification?" msgstr "Activer la notification par e-mail ?" -#: src/Views/menu-general.php:121 +#: src/Views/menu-general.php:120 msgid "" "This will enable or disable the send of email notification on future action." msgstr "" "Ceci vous permet d’activer ou de désactiver l’envoi d’une notification par e-" "mail pour les actions Future." -#: src/Views/menu-general.php:129 +#: src/Views/menu-general.php:128 msgid "Include Blog Administrators?" msgstr "Inclure les Admins ?" -#: src/Views/menu-general.php:150 +#: src/Views/menu-general.php:149 msgid "" "This will include all users with the role of \"Administrator\" in the email." msgstr "" "Tous les utilisateurs et utilisatrices ayant le rôle d’administrateur ou " "administratrice seront inclus dans l’e-mail." -#: src/Views/menu-general.php:166 +#: src/Views/menu-general.php:165 msgid "" "Enter a comma separate list of emails that you would like to be notified " "when the action runs. This will be applied to ALL post types. You can set " diff --git a/languages/post-expirator-it_IT.mo b/languages/post-expirator-it_IT.mo index f7a2e6ca5..6d771b198 100644 Binary files a/languages/post-expirator-it_IT.mo and b/languages/post-expirator-it_IT.mo differ diff --git a/languages/post-expirator-it_IT.po b/languages/post-expirator-it_IT.po index 071be04d1..89ad594c3 100644 --- a/languages/post-expirator-it_IT.po +++ b/languages/post-expirator-it_IT.po @@ -5,8 +5,8 @@ msgstr "" "Project-Id-Version: Plugins - PublishPress Future: Automatically Unpublish " "WordPress Posts - Stable (latest release)\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2024-07-15T16:44:18+00:00\n" -"PO-Revision-Date: 2024-07-16 20:10+0200\n" +"POT-Creation-Date: 2024-08-05T20:36:02+00:00\n" +"PO-Revision-Date: 2024-08-06 20:25+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: it\n" @@ -18,12 +18,12 @@ msgstr "" #. Plugin Name of the plugin #: post-expirator.php -#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 -#: src/Modules/Expirator/Controllers/BulkEditController.php:164 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:143 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:346 -#: src/Modules/Expirator/Controllers/QuickEditController.php:246 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:84 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 +#: src/Modules/Expirator/Controllers/BulkEditController.php:165 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:144 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 +#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 msgid "PublishPress Future" msgstr "PublishPress Future" @@ -51,27 +51,27 @@ msgstr "PublishPress" msgid "http://publishpress.com" msgstr "http://publishpress.com" -#: legacy/classes/Display.class.php:94 +#: legacy/classes/Display.class.php:106 msgid "You do not have permission to configure PublishPress Future." msgstr "Non hai i permessi per configurare PublishPress Future." -#: legacy/classes/Display.class.php:108 +#: legacy/classes/Display.class.php:120 msgid "Debug is disabled" msgstr "Il debug è disabilitato" -#: legacy/classes/Display.class.php:188 +#: legacy/classes/Display.class.php:204 msgid "Debugging Disabled" msgstr "Debug disabilitato" -#: legacy/classes/Display.class.php:193 +#: legacy/classes/Display.class.php:209 msgid "Debugging Enabled" msgstr "Debug abilitato" -#: legacy/classes/Display.class.php:201 +#: legacy/classes/Display.class.php:217 msgid "Debugging Table Emptied" msgstr "Tabella di debug svuotata" -#: legacy/classes/Display.class.php:207 +#: legacy/classes/Display.class.php:223 msgid "" "The legacy future actions migration has been enqueued and will run " "asynchronously." @@ -79,7 +79,7 @@ msgstr "" "La migrazione delle azioni Future legacy è stata messa in coda e verrà " "eseguita in modo asincrono." -#: legacy/classes/Display.class.php:216 +#: legacy/classes/Display.class.php:232 msgid "" "The legacy actions arguments restoration has been enqueued and will run " "asynchronously." @@ -87,47 +87,47 @@ msgstr "" "Il ripristino degli argomenti delle azioni legacy è stato messo in coda e " "verrà eseguito in modo asincrono." -#: legacy/classes/Display.class.php:226 +#: legacy/classes/Display.class.php:243 msgid "The database schema was fixed." msgstr "Lo schema del database è stato corretto." -#: legacy/classes/Display.class.php:231 +#: legacy/classes/Display.class.php:248 msgid "" "The database schema could not be fixed. Please, contact the support team." msgstr "" "Non è stato possibile correggere lo schema del database. Contattare il team " "di assistenza." -#: legacy/classes/Display.class.php:322 legacy/classes/Display.class.php:380 +#: legacy/classes/Display.class.php:339 legacy/classes/Display.class.php:397 msgid "Saved Options!" msgstr "Opzioni salvate!" #. translators: %1$s is the plugin name, %2$s is the star rating markup -#: legacy/classes/Display.class.php:466 +#: legacy/classes/Display.class.php:483 msgid "If you like %1$s, please leave us a %2$s rating. Thank you!" msgstr "Se ti piace %1$s, lasciaci una valutazione di %2$s. Grazie!" -#: legacy/classes/Display.class.php:481 +#: legacy/classes/Display.class.php:498 msgid "About PublishPress Future" msgstr "Informazioni su PublishPress Future" -#: legacy/classes/Display.class.php:483 +#: legacy/classes/Display.class.php:500 msgid "About" msgstr "Chi siamo" -#: legacy/classes/Display.class.php:489 +#: legacy/classes/Display.class.php:506 msgid "Future Documentation" msgstr "Documentazione di Future" -#: legacy/classes/Display.class.php:491 +#: legacy/classes/Display.class.php:508 msgid "Documentation" msgstr "Documentazione" -#: legacy/classes/Display.class.php:497 +#: legacy/classes/Display.class.php:514 msgid "Contact the PublishPress team" msgstr "Contatta il team di PublishPress" -#: legacy/classes/Display.class.php:499 +#: legacy/classes/Display.class.php:516 msgid "Contact" msgstr "Contatto" @@ -135,152 +135,162 @@ msgstr "Contatto" msgid "No taxonomies found" msgstr "Nessuna tassonomia trovata" -#: services.php:71 src/Modules/Settings/SettingsFacade.php:92 +#: services.php:74 src/Modules/Settings/SettingsFacade.php:93 msgid "l F jS, Y" msgstr "l j F Y" -#: services.php:75 src/Modules/Settings/SettingsFacade.php:93 +#: services.php:78 src/Modules/Settings/SettingsFacade.php:94 msgid "g:ia" msgstr "G:i" -#: services.php:76 src/Modules/Settings/SettingsFacade.php:94 +#: services.php:79 src/Modules/Settings/SettingsFacade.php:95 msgid "Post expires at EXPIRATIONTIME on ACTIONDATE" msgstr "L'articolo scade alle EXPIRATIONTIME del ACTIONDATE" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:127 -#: src/Modules/Expirator/Controllers/BulkEditController.php:163 -#: src/Modules/Expirator/Controllers/QuickEditController.php:245 +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:76 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:84 +msgid "The table %s does not exist." +msgstr "La tabella %s non esiste." + +#: src/Framework/Logger/DBTableSchemas/DebugLogSchema.php:89 +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:107 +msgid "The table indexes are invalid: " +msgstr "Gli indici della tabella non sono validi: " + +#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 +#: src/Modules/Expirator/Controllers/BulkEditController.php:164 +#: src/Modules/Expirator/Controllers/QuickEditController.php:269 msgid "Categories" msgstr "Categorie" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 -#: src/Modules/Expirator/Controllers/BulkEditController.php:165 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:347 -#: src/Modules/Expirator/Controllers/QuickEditController.php:247 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 +#: src/Modules/Expirator/Controllers/BulkEditController.php:166 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:363 +#: src/Modules/Expirator/Controllers/QuickEditController.php:271 msgid "Enable Future Action" msgstr "Abilita scadenza articolo" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 -#: src/Modules/Expirator/Controllers/BulkEditController.php:166 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:348 -#: src/Modules/Expirator/Controllers/QuickEditController.php:248 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:45 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 +#: src/Modules/Expirator/Controllers/BulkEditController.php:167 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 +#: src/Modules/Expirator/Controllers/QuickEditController.php:272 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:46 msgid "Action" msgstr "Come applicare la scadenza" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 -#: src/Modules/Expirator/Controllers/BulkEditController.php:169 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:351 -#: src/Modules/Expirator/Controllers/QuickEditController.php:251 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 +#: src/Modules/Expirator/Controllers/BulkEditController.php:170 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:367 +#: src/Modules/Expirator/Controllers/QuickEditController.php:275 msgid "Loading" msgstr "Caricamento in corso" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 -#: src/Modules/Expirator/Controllers/BulkEditController.php:167 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:349 -#: src/Modules/Expirator/Controllers/QuickEditController.php:249 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 +#: src/Modules/Expirator/Controllers/BulkEditController.php:168 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:365 +#: src/Modules/Expirator/Controllers/QuickEditController.php:273 msgid "Show Calendar" msgstr "Mostra il calendario" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 -#: src/Modules/Expirator/Controllers/BulkEditController.php:168 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:350 -#: src/Modules/Expirator/Controllers/QuickEditController.php:250 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:134 +#: src/Modules/Expirator/Controllers/BulkEditController.php:169 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 +#: src/Modules/Expirator/Controllers/QuickEditController.php:274 msgid "Hide Calendar" msgstr "Nascondi il calendario" #. translators: the text between {} is the link to the settings page. #. translators: the text between {{}} is the link to the settings page. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:135 -#: src/Modules/Expirator/Controllers/BulkEditController.php:171 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:353 -#: src/Modules/Expirator/Controllers/QuickEditController.php:253 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:136 +#: src/Modules/Expirator/Controllers/BulkEditController.php:172 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 +#: src/Modules/Expirator/Controllers/QuickEditController.php:277 msgid "Timezone is controlled by the {WordPress Settings}." msgstr "Il fuso orario è controllato dalle {Impostazioni di WordPress}." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:139 -#: src/Modules/Expirator/Controllers/BulkEditController.php:175 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:357 -#: src/Modules/Expirator/Controllers/QuickEditController.php:257 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:140 +#: src/Modules/Expirator/Controllers/BulkEditController.php:176 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:376 +#: src/Modules/Expirator/Controllers/QuickEditController.php:281 msgid "No %s found." msgstr "Nessun %s trovato." -#: src/Modules/Expirator/Controllers/BlockEditorController.php:142 -#: src/Modules/Expirator/Controllers/BulkEditController.php:179 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:360 -#: src/Modules/Expirator/Controllers/QuickEditController.php:260 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:143 +#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:379 +#: src/Modules/Expirator/Controllers/QuickEditController.php:284 msgid "You must assign a taxonomy to this post type to use this feature." msgstr "" "Devi assegnare una tassonomia a questo tipo di contenuto per usare questa " "caratteristica." #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:144 -#: src/Modules/Expirator/Controllers/BulkEditController.php:186 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 -#: src/Modules/Expirator/Controllers/QuickEditController.php:262 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:145 +#: src/Modules/Expirator/Controllers/BulkEditController.php:187 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:384 +#: src/Modules/Expirator/Controllers/QuickEditController.php:286 msgid "New %s" msgstr "Nuovo %s" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:146 -#: src/Modules/Expirator/Controllers/BulkEditController.php:188 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 -#: src/Modules/Expirator/Controllers/QuickEditController.php:264 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:147 +#: src/Modules/Expirator/Controllers/BulkEditController.php:189 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:386 +#: src/Modules/Expirator/Controllers/QuickEditController.php:288 msgid "%s to remove" msgstr "%s da rimuovere" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:148 -#: src/Modules/Expirator/Controllers/BulkEditController.php:190 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 -#: src/Modules/Expirator/Controllers/QuickEditController.php:266 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:149 +#: src/Modules/Expirator/Controllers/BulkEditController.php:191 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:388 +#: src/Modules/Expirator/Controllers/QuickEditController.php:290 msgid "%s to add" msgstr "%s da aggiungere" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:150 -#: src/Modules/Expirator/Controllers/BulkEditController.php:192 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:368 -#: src/Modules/Expirator/Controllers/QuickEditController.php:268 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 +#: src/Modules/Expirator/Controllers/BulkEditController.php:193 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:391 +#: src/Modules/Expirator/Controllers/QuickEditController.php:292 msgid "Search for %s" msgstr "Ricerca per %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 -#: src/Modules/Expirator/Controllers/BulkEditController.php:193 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 -#: src/Modules/Expirator/Controllers/QuickEditController.php:269 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 +#: src/Modules/Expirator/Controllers/BulkEditController.php:194 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:394 +#: src/Modules/Expirator/Controllers/QuickEditController.php:293 msgid "Select an action" msgstr "Seleziona un'azione" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:152 -#: src/Modules/Expirator/Controllers/BulkEditController.php:194 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:370 -#: src/Modules/Expirator/Controllers/QuickEditController.php:270 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 +#: src/Modules/Expirator/Controllers/BulkEditController.php:195 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:395 +#: src/Modules/Expirator/Controllers/QuickEditController.php:294 msgid "Select a date" msgstr "Seleziona una data" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:153 -#: src/Modules/Expirator/Controllers/BulkEditController.php:195 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:371 -#: src/Modules/Expirator/Controllers/QuickEditController.php:271 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:154 +#: src/Modules/Expirator/Controllers/BulkEditController.php:196 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:396 +#: src/Modules/Expirator/Controllers/QuickEditController.php:295 msgid "Date cannot be in the past" msgstr "La data non può essere già passata" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:156 -#: src/Modules/Expirator/Controllers/BulkEditController.php:198 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:374 -#: src/Modules/Expirator/Controllers/QuickEditController.php:274 -#: src/Modules/Settings/Controllers/Controller.php:245 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:157 +#: src/Modules/Expirator/Controllers/BulkEditController.php:199 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:399 +#: src/Modules/Expirator/Controllers/QuickEditController.php:298 +#: src/Modules/Settings/Controllers/Controller.php:246 msgid "Please select one or more %s" msgstr "Seleziona uno o più %s" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:159 -#: src/Modules/Expirator/Controllers/BulkEditController.php:201 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:377 -#: src/Modules/Expirator/Controllers/QuickEditController.php:277 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:160 +#: src/Modules/Expirator/Controllers/BulkEditController.php:202 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:402 +#: src/Modules/Expirator/Controllers/QuickEditController.php:301 msgid "New status" msgstr "Nuovo stato" @@ -297,76 +307,76 @@ msgstr "Azioni di Future sincronizzate correttamente con metadati articoli." msgid "Update Future Actions from Post Metadata" msgstr "Aggiorna le azioni di Future dai metadati degli articoli" -#: src/Modules/Expirator/Controllers/BulkEditController.php:178 +#: src/Modules/Expirator/Controllers/BulkEditController.php:179 msgid "Future Action Update" msgstr "Aggiornamento azioni Future" -#: src/Modules/Expirator/Controllers/BulkEditController.php:180 +#: src/Modules/Expirator/Controllers/BulkEditController.php:181 msgid "— No Change —" msgstr "— Non cambiare —" -#: src/Modules/Expirator/Controllers/BulkEditController.php:181 +#: src/Modules/Expirator/Controllers/BulkEditController.php:182 msgid "Add or update action for posts" msgstr "Aggiungi o aggiorna azione per gli articoli" -#: src/Modules/Expirator/Controllers/BulkEditController.php:182 +#: src/Modules/Expirator/Controllers/BulkEditController.php:183 msgid "Add action if none exists for posts" msgstr "Aggiungi un'azione se non ne esistono per gli articoli" -#: src/Modules/Expirator/Controllers/BulkEditController.php:183 +#: src/Modules/Expirator/Controllers/BulkEditController.php:184 msgid "Update the existing actions for posts" msgstr "Aggiorna le azioni esistenti per gli articoli" -#: src/Modules/Expirator/Controllers/BulkEditController.php:184 +#: src/Modules/Expirator/Controllers/BulkEditController.php:185 msgid "Remove action from posts" msgstr "Rimuovi l'azione dagli articoli" -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:345 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:361 msgid "Category" msgstr "Categoria" -#: src/Modules/Expirator/Controllers/PluginsListController.php:45 +#: src/Modules/Expirator/Controllers/PluginsListController.php:46 msgid "Settings" msgstr "Impostazioni" -#: src/Modules/Expirator/Controllers/PostListController.php:66 +#: src/Modules/Expirator/Controllers/PostListController.php:75 msgid "Future Action" msgstr "Azione Future" -#: src/Modules/Expirator/Controllers/RestAPIController.php:207 -#: src/Modules/Expirator/Controllers/RestAPIController.php:214 +#: src/Modules/Expirator/Controllers/RestAPIController.php:208 +#: src/Modules/Expirator/Controllers/RestAPIController.php:215 msgid "Invalid date time offset." msgstr "Offset della data non valido." -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:86 msgid "Future" msgstr "Future" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:94 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:95 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:96 #: src/Views/tabs.php:59 msgid "Action Settings" msgstr "Impostazioni delle azioni" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:103 #: src/Modules/Expirator/Controllers/ScheduledActionsController.php:104 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:42 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:105 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:43 msgid "Scheduled Actions" msgstr "Azioni programmate" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:173 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:174 msgid "Log format" msgstr "Formato del registro" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:180 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:181 msgid "List" msgstr "Elenco" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:189 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:190 msgid "Popup" msgstr "Popup" -#: src/Modules/Expirator/Controllers/ShortcodeController.php:77 +#: src/Modules/Expirator/Controllers/ShortcodeController.php:79 msgid "" "The shortcode [futureaction] must be used inside the loop or with the " "post_id attribute." @@ -374,6 +384,11 @@ msgstr "" "Lo shortcode [futureaction] deve essere utilizzato dentro il loop o con " "l'attributo post_id." +#: src/Modules/Expirator/DBTableSchemas/ActionArgsSchema.php:96 +msgid "The column args length was not updated to 1000." +msgstr "" +"La lunghezza degli argomenti della colonna non sono stati aggiornati a 1000." + #: src/Modules/Expirator/ExpirationActions/ChangePostStatus.php:54 #: src/Modules/Expirator/ExpirationActions/PostStatusToDraft.php:52 #: src/Modules/Expirator/ExpirationActions/PostStatusToPrivate.php:52 @@ -408,12 +423,12 @@ msgid "Delete" msgstr "Elimina" #. translators: %s is the post type singular label -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:64 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:65 msgid "No terms were added to the %s." msgstr "Nessun termine è stato aggiunto a %s." #. translators: %1$s is the taxonomy label, %2$s is the post type singular label, %3$s is the list of terms added, %4$s is the list of terms on the post -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:75 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:77 msgid "" "The following terms (%1$s) were added to the %2$s: \"%3$s\". The full list " "of terms on the post is: %4$s." @@ -422,7 +437,7 @@ msgstr "" "completa dei termini nell'articolo è: %4$s." #. translators: %s is the taxonomy name (plural) -#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:118 +#: src/Modules/Expirator/ExpirationActions/PostCategoryAdd.php:120 msgid "Add extra %s" msgstr "Aggiungi %s extra" @@ -506,35 +521,35 @@ msgstr "%s è stato rimosso dalla lista in evidenza." msgid "Unstick" msgstr "Rimuovi in evidenza" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:463 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:464 msgid "Email is disabled" msgstr "L'email è disabilitata" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email sent" msgstr "Email inviata" -#: src/Modules/Expirator/Models/ExpirablePostModel.php:467 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:468 msgid "Email not sent" msgstr "Email non inviata" #. translators: %1$s: post title placeholder, %2$s: notification text, %3$s: action date placeholder, %4$s: post link placeholder -#: src/Modules/Expirator/Models/ExpirablePostModel.php:617 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:618 msgid "%1$s. %2$s on %3$s. The post link is %4$s" msgstr "%1$s. %2$s il %3$s. Il link dell'articolo è %4$s" #. translators: %s is the post title -#: src/Modules/Expirator/Models/ExpirablePostModel.php:635 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:636 msgid "Future Action Complete \"%s\"" msgstr "Scadenza articolo completata \"%s\"" #. translators: 1: is the blog name, 2: the email subject -#: src/Modules/Expirator/Models/ExpirablePostModel.php:639 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:640 msgid "[%1$s] %2$s" msgstr "[%1$s] %2$s" #. translators: %s is the date/time offset and %s is the post type. -#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:135 +#: src/Modules/Expirator/Models/PostTypeDefaultDataModel.php:137 msgid "" "Invalid date/time offset \"%s\" for post type \"%s\". Please ensure you use " "only English terms for the date/time offset, such as \"3 months\" or \"1 " @@ -544,87 +559,87 @@ msgstr "" "Assicurati di utilizzare solo termini inglesi per lo scostamento di data/" "ora, come \"3 months\" (3 mesi) o \"1 week\" (1 settimana)." -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:48 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 msgid "Status" msgstr "Stato" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:49 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 msgid "Arguments" msgstr "Argomenti" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:50 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 msgid "Logs" msgstr "Registri" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:51 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 msgid "Scheduled Date" msgstr "Data programmata" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:52 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:53 msgid "Recurrence" msgstr "Ricorrenza" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:60 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 msgid "Run" msgstr "Esegui" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:61 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:62 msgid "Process the action now" msgstr "Elabora ora l'azione" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:64 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 msgid "Cancel" msgstr "Annulla" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:65 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:66 msgid "" "Cancel the action. This will prevent the action from running in the future" msgstr "Annulla l'azione adesso per evitare che venga avviata in seguito" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:78 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:79 msgid "%s year" msgid_plural "%s years" msgstr[0] "%s anno" msgstr[1] "%s anni" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:83 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:84 msgid "%s month" msgid_plural "%s months" msgstr[0] "%s mese" msgstr[1] "%s mesi" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:88 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:89 msgid "%s week" msgid_plural "%s weeks" msgstr[0] "%s settimana" msgstr[1] "%s settimane" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:93 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:94 msgid "%s day" msgid_plural "%s days" msgstr[0] "%s giorno" msgstr[1] "%s giorni" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:98 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:99 msgid "%s hour" msgid_plural "%s hours" msgstr[0] "%s ora" msgstr[1] "%s ore" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:103 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:104 msgid "%s minute" msgid_plural "%s minutes" msgstr[0] "%s minuto" msgstr[1] "%s minuti" #. translators: %s: amount of time -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:108 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:109 msgid "%s second" msgid_plural "%s seconds" msgstr[0] "%s secondo" @@ -639,7 +654,7 @@ msgid "Uninitialized" msgstr "Non inizializzato" #: src/Modules/Expirator/Tables/ScheduledActionsTable.php:273 -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:339 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:340 msgid "Scheduled" msgstr "Programmato" @@ -663,87 +678,87 @@ msgstr "In esecuzione" msgid "All" msgstr "Tutto" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:314 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:315 msgid "Search hook, args and claim ID" msgstr "Cerca hook, argomenti e ID richiesta" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:343 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:344 msgid "Completed" msgstr "Completato" #. translators: %1$s: post type label, %2$d: post ID, %3$s: post link tag start, %4$s: post title, %5$s: post link tag end -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:448 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:449 msgid "%1$s: [%2$d] %3$s%4$s%5$s" msgstr "%1$s: [%2$d] %3$s%4$s%5$s" #. translators: %s is the new status -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:483 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:484 msgid "New Status: %s" msgstr "Nuovo stato: %s" #. translators: %s is the list of terms -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:491 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:492 msgid "Terms: %s" msgstr "Termini: %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:594 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:595 msgid "View log" msgstr "Visualizza registro" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:605 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:606 msgid "Action: " msgstr "Aazione: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:611 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:612 msgid "Status: " msgstr "Stato: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:617 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:618 msgid "Arguments: " msgstr "Argomenti: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:623 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:624 msgid "Scheduled date: " msgstr "Data programmata: " -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:637 -#: src/Views/menu-diagnostics.php:190 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Views/menu-diagnostics.php:192 msgid "Date" msgstr "Data" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:638 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:639 #: src/Views/menu-debug-log.php:37 msgid "Message" msgstr "Messaggio" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:672 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:673 msgid "Async" msgstr "Asincrono" #. translators: %s is the date interval in human readable format in the past -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:689 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:690 msgid " (%s ago)" msgstr " (%s fa)" #. translators: %s is the date interval in human readable format in the present or future -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:695 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:696 msgid " (%s)" msgstr " (%s)" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:719 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:720 msgid "Now!" msgstr "Adesso!" #. translators: %s: time interval -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:768 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:770 msgid "Every %s" msgstr "Ogni %s" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:774 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:776 msgid "Non-repeating" msgstr "Non ripetibile" -#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:783 +#: src/Modules/Expirator/Tables/ScheduledActionsTable.php:786 msgid "No Scheduled Actions." msgstr "Nessuna azione programmata." @@ -759,12 +774,12 @@ msgstr "" #: src/Modules/ProFeaturesAds/views/actions-workflows-page.html.php:18 #: src/Modules/VersionNotices/Module.php:125 -#: src/Views/ad-banner-right-sidebar.php:35 +#: src/Views/ad-banner-right-sidebar.php:37 msgid "Upgrade to Pro" msgstr "Aggiorna a Pro" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Modules/Settings/Controllers/Controller.php:198 +#: src/Modules/Settings/Controllers/Controller.php:199 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -778,11 +793,11 @@ msgstr "" "week 2 days 4 hours 2 seconds%3$s o %2$snext Thursday%3$s. Comunque " "ricordati che puoi inserire solo valori in inglese." -#: src/Modules/Settings/Controllers/Controller.php:209 +#: src/Modules/Settings/Controllers/Controller.php:210 msgid "Default Values" msgstr "Valori predefiniti" -#: src/Modules/Settings/Controllers/Controller.php:210 +#: src/Modules/Settings/Controllers/Controller.php:211 msgid "" "Use the values below to set the default actions/values to be used for each " "for the corresponding post types. These values can all be overwritten when " @@ -793,40 +808,40 @@ msgstr "" "possono essere tutti sovrascritti in fase di creazione/modifica di ciascun " "articolo/pagina." -#: src/Modules/Settings/Controllers/Controller.php:214 +#: src/Modules/Settings/Controllers/Controller.php:215 msgid "Active" msgstr "Attivo" -#: src/Modules/Settings/Controllers/Controller.php:215 +#: src/Modules/Settings/Controllers/Controller.php:216 msgid "Activate the PublishPress Future actions for this post type" msgstr "Abilita le azioni PublishPress Future per questo tipo di contenuto" -#: src/Modules/Settings/Controllers/Controller.php:216 +#: src/Modules/Settings/Controllers/Controller.php:217 msgid "Default Action" msgstr "Azione predefinita" -#: src/Modules/Settings/Controllers/Controller.php:217 +#: src/Modules/Settings/Controllers/Controller.php:218 msgid "Select the default action for the post type." msgstr "Seleziona l'azione di scadenza predefinita per il tipo di contenuto." -#: src/Modules/Settings/Controllers/Controller.php:221 -#: src/Views/taxonomy-field.php:11 +#: src/Modules/Settings/Controllers/Controller.php:222 +#: src/Views/taxonomy-field.php:14 msgid "Select the taxonomy to be used for actions." msgstr "Seleziona la tassonomia da utilizzare per le azioni." -#: src/Modules/Settings/Controllers/Controller.php:225 +#: src/Modules/Settings/Controllers/Controller.php:226 msgid "Auto-enable" msgstr "Abilitazione automatica" -#: src/Modules/Settings/Controllers/Controller.php:226 +#: src/Modules/Settings/Controllers/Controller.php:227 msgid "Enabled for all new posts" msgstr "Abilitato per tutti i nuovi articoli" -#: src/Modules/Settings/Controllers/Controller.php:227 +#: src/Modules/Settings/Controllers/Controller.php:228 msgid "Taxonomy" msgstr "Tassonomia" -#: src/Modules/Settings/Controllers/Controller.php:228 +#: src/Modules/Settings/Controllers/Controller.php:229 msgid "" "No taxonomies found for this post type. Taxonomy actions will not be " "available." @@ -834,12 +849,12 @@ msgstr "" "Non sono state trovate tassonomie per questo tipo di contenuto. Le azioni " "della tassonomia non saranno disponibili." -#: src/Modules/Settings/Controllers/Controller.php:229 -#: src/Views/menu-general.php:159 +#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Views/menu-general.php:158 msgid "Who to Notify" msgstr "Chi avvisare" -#: src/Modules/Settings/Controllers/Controller.php:230 +#: src/Modules/Settings/Controllers/Controller.php:231 msgid "" "Enter a comma separated list of emails that you would like to be notified " "when the action runs." @@ -847,45 +862,45 @@ msgstr "" "Inserisci un elenco di email separate da virgola a cui vuoi inviare una " "notifica quando l'azione è in esecuzione." -#: src/Modules/Settings/Controllers/Controller.php:234 -#: src/Views/menu-general.php:67 +#: src/Modules/Settings/Controllers/Controller.php:235 +#: src/Views/menu-general.php:66 msgid "Default Date/Time Offset" msgstr "Offset data/ora predefinito" -#: src/Modules/Settings/Controllers/Controller.php:237 -#: src/Views/menu-general.php:83 +#: src/Modules/Settings/Controllers/Controller.php:238 +#: src/Views/menu-general.php:82 msgid "PHP strtotime function" msgstr "Funzione PHP strtotime" -#: src/Modules/Settings/Controllers/Controller.php:241 +#: src/Modules/Settings/Controllers/Controller.php:242 msgid "Default terms:" msgstr "Termini predefiniti:" -#: src/Modules/Settings/Controllers/Controller.php:242 +#: src/Modules/Settings/Controllers/Controller.php:243 msgid "Save changes" msgstr "Salva modifiche" -#: src/Modules/Settings/Controllers/Controller.php:243 +#: src/Modules/Settings/Controllers/Controller.php:244 msgid "Wait for the validation..." msgstr "Aspetta, validazione in corso…" -#: src/Modules/Settings/Controllers/Controller.php:246 +#: src/Modules/Settings/Controllers/Controller.php:247 msgid "Date Preview" msgstr "Anteprima della data" -#: src/Modules/Settings/Controllers/Controller.php:247 +#: src/Modules/Settings/Controllers/Controller.php:248 msgid "Current Date" msgstr "Data attuale" -#: src/Modules/Settings/Controllers/Controller.php:248 +#: src/Modules/Settings/Controllers/Controller.php:249 msgid "Computed Date" msgstr "Data calcolata" -#: src/Modules/Settings/Controllers/Controller.php:249 +#: src/Modules/Settings/Controllers/Controller.php:250 msgid "Error" msgstr "Errore" -#: src/Modules/Settings/Controllers/Controller.php:349 +#: src/Modules/Settings/Controllers/Controller.php:352 msgid "Form Validation Failure: Sorry, your nonce did not verify." msgstr "Errore di convalida del modulo: il nonce non è stato verificato." @@ -898,65 +913,65 @@ msgstr "" "Stai utilizzando PublishPress Future Free. La versione Pro ha più " "caratteristiche e supporto. %1$sAggiorna a Pro%2$s" -#: src/Views/ad-banner-right-sidebar.php:10 +#: src/Views/ad-banner-right-sidebar.php:12 msgid "Upgrade to PublishPress Future Pro" msgstr "Aggiorna a PublishPress Future Pro" -#: src/Views/ad-banner-right-sidebar.php:16 +#: src/Views/ad-banner-right-sidebar.php:18 msgid "Enhance the power of PublishPress Future with the Pro version:" msgstr "Aumenta le potenzialità di PublishPress Future con la versione Pro:" -#: src/Views/ad-banner-right-sidebar.php:23 +#: src/Views/ad-banner-right-sidebar.php:25 msgid "Design custom workflows with multiple actions" msgstr "Disegna flussi di lavoro personalizzati con azioni multiple" -#: src/Views/ad-banner-right-sidebar.php:25 +#: src/Views/ad-banner-right-sidebar.php:27 msgid "Schedule actions based on the post's publishing date" msgstr "" "Programma la data dell'azione basata sulla data di pubblicazione " "dell'articolo" -#: src/Views/ad-banner-right-sidebar.php:27 +#: src/Views/ad-banner-right-sidebar.php:29 msgid "Move posts to custom statuses" msgstr "Sposta gli articoli negli stati personalizzati" -#: src/Views/ad-banner-right-sidebar.php:29 +#: src/Views/ad-banner-right-sidebar.php:31 msgid "Use other plugins to control Future Actions" msgstr "Utilizza gli altri plugin per controllare le azioni di \"Future\"" -#: src/Views/ad-banner-right-sidebar.php:31 +#: src/Views/ad-banner-right-sidebar.php:33 msgid "Enjoy fast and professional support" msgstr "Godi di un supporto rapido e professionale" -#: src/Views/ad-banner-right-sidebar.php:43 +#: src/Views/ad-banner-right-sidebar.php:45 msgid "Need PublishPress Future Support?" msgstr "Hai bisogno del supporto di PublishPress Future?" -#: src/Views/ad-banner-right-sidebar.php:49 +#: src/Views/ad-banner-right-sidebar.php:51 msgid "If you need help or have a new feature request, let us know." msgstr "" "Se hai bisogno di aiuto o hai delle richieste di funzionalità, faccelo " "sapere." -#: src/Views/ad-banner-right-sidebar.php:55 +#: src/Views/ad-banner-right-sidebar.php:57 msgid "Request Support" msgstr "Rchiesta di supporto" -#: src/Views/ad-banner-right-sidebar.php:66 +#: src/Views/ad-banner-right-sidebar.php:68 msgid "Detailed documentation is also available on the plugin website." msgstr "" "Una documentazione dettagliata è anche disponibile sul sito web del plugin." -#: src/Views/ad-banner-right-sidebar.php:73 +#: src/Views/ad-banner-right-sidebar.php:75 msgid "View Knowledge Base" msgstr "Vedi la documentazione" #. translators: %1$s opens a span tag, %2$s is the action name, %3$s ends a span tag, %4$s is the a span tag, %5$s is the a span tag, %6$s is the a span tag -#: src/Views/expire-column.php:55 +#: src/Views/expire-column.php:57 msgid "%1$s%2$s%3$s on %5$s%4$s%6$s" msgstr "%1$s%2$s%3$s il %5$s%4$s%6$s" -#: src/Views/expire-column.php:92 +#: src/Views/expire-column.php:95 msgid "" "Action was not scheduled due to a configuration issue. Please attempt to " "schedule it again." @@ -964,15 +979,15 @@ msgstr "" "L'azione non può essere programmata a causa di un problema di " "configurazione. Prova a riprogrammarla nuovamente." -#: src/Views/expire-column.php:97 +#: src/Views/expire-column.php:103 msgid "No future action" msgstr "Nessuna azione Future" -#: src/Views/menu-advanced.php:25 +#: src/Views/menu-advanced.php:27 msgid "Advanced Options" msgstr "Opzioni avanzate" -#: src/Views/menu-advanced.php:27 +#: src/Views/menu-advanced.php:29 msgid "" "Please do not update anything here unless you know what it entails. For " "advanced users only." @@ -980,67 +995,67 @@ msgstr "" "Si raccomanda di non aggiornare nulla qui se non se ne conoscono le " "conseguenze. Solo per utenti avanzati." -#: src/Views/menu-advanced.php:38 +#: src/Views/menu-advanced.php:40 msgid "Future Action Column Style" msgstr "Stile colonna delle azioni Future" -#: src/Views/menu-advanced.php:49 +#: src/Views/menu-advanced.php:51 msgid "Detailed" msgstr "Dettagliate" -#: src/Views/menu-advanced.php:51 +#: src/Views/menu-advanced.php:53 msgid "Displays all information in the Future Action column." msgstr "Visualizza tutte le informazioni nella colonna \"Azioni di Future\"." -#: src/Views/menu-advanced.php:63 +#: src/Views/menu-advanced.php:65 msgid "Simplified" msgstr "Semplificate" -#: src/Views/menu-advanced.php:65 +#: src/Views/menu-advanced.php:67 msgid "Displays only the icon and date/time." msgstr "Visualizza solo l'icona, la data e l'ora." -#: src/Views/menu-advanced.php:74 +#: src/Views/menu-advanced.php:76 msgid "Time format in the date picker" msgstr "Formato dell'ora nel selezionatore di data" -#: src/Views/menu-advanced.php:85 +#: src/Views/menu-advanced.php:87 msgid "Inherit from Site Settings" msgstr "Eredita dalle impostazioni del sito" -#: src/Views/menu-advanced.php:93 +#: src/Views/menu-advanced.php:95 msgid "24 hours" msgstr "24 ore" -#: src/Views/menu-advanced.php:101 +#: src/Views/menu-advanced.php:103 msgid "AM/PM" msgstr "AM/PM" -#: src/Views/menu-advanced.php:108 +#: src/Views/menu-advanced.php:110 msgid "Choose Which User Roles Can Use PublishPress Future" msgstr "Scegli quali ruoli utente possono utilizzare PublishPress Future" -#: src/Views/menu-advanced.php:139 +#: src/Views/menu-advanced.php:146 msgid "Preserve Data After Deactivating the Plugin" msgstr "Conserva i dati dopo la disattivazione del plugin" -#: src/Views/menu-advanced.php:149 +#: src/Views/menu-advanced.php:156 msgid "Preserve data" msgstr "Conserva i dati" -#: src/Views/menu-advanced.php:159 +#: src/Views/menu-advanced.php:166 msgid "Delete data" msgstr "Elimina i dati" -#: src/Views/menu-advanced.php:164 +#: src/Views/menu-advanced.php:171 msgid "" "Toggle between preserving or deleting data after the plugin is deactivated." msgstr "" "Attiva/disattiva la conservazione o l'eliminazione dei dati dopo la " "disattivazione del plugin." -#: src/Views/menu-advanced.php:175 src/Views/menu-display.php:184 -#: src/Views/menu-general.php:177 +#: src/Views/menu-advanced.php:182 src/Views/menu-display.php:185 +#: src/Views/menu-general.php:176 msgid "Save Changes" msgstr "Salva modifiche" @@ -1060,84 +1075,75 @@ msgstr "La tabella di debug è attualmente vuota." msgid "Timestamp" msgstr "Data e ora" -#: src/Views/menu-diagnostics.php:26 +#: src/Views/menu-diagnostics.php:39 msgid "Advanced Diagnostics and Tools" msgstr "Diagnostica e strumenti avanzati" -#: src/Views/menu-diagnostics.php:30 +#: src/Views/menu-diagnostics.php:43 msgid "WP-Cron Status Check" msgstr "Controllo stato di WP-Cron" -#: src/Views/menu-diagnostics.php:34 src/Views/menu-diagnostics.php:47 +#: src/Views/menu-diagnostics.php:47 src/Views/menu-diagnostics.php:60 msgid "Passed" msgstr "Approvato" -#: src/Views/menu-diagnostics.php:37 +#: src/Views/menu-diagnostics.php:50 msgid "WP Cron Disabled" msgstr "WP Cron disabilitato" -#: src/Views/menu-diagnostics.php:43 +#: src/Views/menu-diagnostics.php:56 msgid "Database Schema Check" msgstr "Controllo schema database" -#: src/Views/menu-diagnostics.php:51 +#: src/Views/menu-diagnostics.php:64 msgid "Error found on the database schema:" msgid_plural "Errors found on the database schema:" msgstr[0] "Trovato un errore nello schema del database:" msgstr[1] "Trovati degli errori nello schema del database:" -#: src/Views/menu-diagnostics.php:66 -msgid "The table _ppfuture_actions_args does not exist." -msgstr "La tabella _ppfuture_actions_args non esiste." - -#: src/Views/menu-diagnostics.php:72 -msgid "The column args length was not updated to 1000." -msgstr "" -"La lunghezza degli argomenti della colonna non sono stati aggiornati a 1000." - -#: src/Views/menu-diagnostics.php:84 -msgid "Fix Database" -msgstr "Correggi database" +#: src/Views/menu-diagnostics.php:86 +msgid "Try to Fix Database" +msgstr "Cerca di correggere il database" -#: src/Views/menu-diagnostics.php:93 +#: src/Views/menu-diagnostics.php:95 msgid "Debug Logging" msgstr "Registrazione di debug" -#: src/Views/menu-diagnostics.php:97 src/Views/menu-display.php:94 -#: src/Views/menu-general.php:110 src/Views/menu-general.php:138 +#: src/Views/menu-diagnostics.php:99 src/Views/menu-display.php:95 +#: src/Views/menu-general.php:109 src/Views/menu-general.php:137 msgid "Enabled" msgstr "Abilitato" -#: src/Views/menu-diagnostics.php:100 +#: src/Views/menu-diagnostics.php:102 msgid "Disable Debugging" msgstr "Disattiva il debugging" -#: src/Views/menu-diagnostics.php:106 +#: src/Views/menu-diagnostics.php:108 msgid "Purge Debug Log" msgstr "Svuota il registro di debug" -#: src/Views/menu-diagnostics.php:114 +#: src/Views/menu-diagnostics.php:116 msgid "View Debug Logs" msgstr "Visualizza i log di debug" -#: src/Views/menu-diagnostics.php:117 src/Views/menu-display.php:100 -#: src/Views/menu-general.php:118 src/Views/menu-general.php:147 +#: src/Views/menu-diagnostics.php:119 src/Views/menu-display.php:101 +#: src/Views/menu-general.php:117 src/Views/menu-general.php:146 msgid "Disabled" msgstr "Disabilitato" -#: src/Views/menu-diagnostics.php:120 +#: src/Views/menu-diagnostics.php:122 msgid "Enable Debugging" msgstr "Attiva il debugging" -#: src/Views/menu-diagnostics.php:133 +#: src/Views/menu-diagnostics.php:135 msgid "Migrate Legacy Future Actions" msgstr "Migrare le azioni Future legacy" -#: src/Views/menu-diagnostics.php:137 +#: src/Views/menu-diagnostics.php:139 msgid "Run Migration" msgstr "Esegui migrazione" -#: src/Views/menu-diagnostics.php:140 +#: src/Views/menu-diagnostics.php:142 msgid "" "Migrate legacy future actions from WP Cron to the new Action Scheduler. This " "will run in the background and may take a while." @@ -1146,15 +1152,15 @@ msgstr "" "Questa operazione verrà eseguita in background e potrebbe richiedere un po' " "di tempo." -#: src/Views/menu-diagnostics.php:150 +#: src/Views/menu-diagnostics.php:152 msgid "Restore Legacy Action Arguments" msgstr "Ripristina gli argomenti delle azioni precedenti" -#: src/Views/menu-diagnostics.php:154 +#: src/Views/menu-diagnostics.php:156 msgid "Run Data Restoration" msgstr "Avvia il ripristino del database" -#: src/Views/menu-diagnostics.php:157 +#: src/Views/menu-diagnostics.php:159 msgid "" "Restore legacy action arguments as Post Meta. This is useful if you have " "issues with 3rd party plugins that read that data. This will run in the " @@ -1164,11 +1170,11 @@ msgstr "" "se si hanno problemi con i plugin di terze parti che leggono questi dati. " "L'esecuzione averrà in background e potrebbe richiedere un po' di tempo." -#: src/Views/menu-diagnostics.php:170 +#: src/Views/menu-diagnostics.php:172 msgid "Legacy Cron Schedule" msgstr "Programma di Cron Legacy" -#: src/Views/menu-diagnostics.php:178 +#: src/Views/menu-diagnostics.php:180 msgid "" "The below table will show all currently scheduled cron events for the plugin " "with the next run time." @@ -1176,29 +1182,29 @@ msgstr "" "La tabella seguente mostra tutti gli eventi cron attualmente programmati per " "il plugin con il prossimo orario di esecuzione." -#: src/Views/menu-diagnostics.php:193 +#: src/Views/menu-diagnostics.php:195 msgid "Event" msgstr "Evento" -#: src/Views/menu-diagnostics.php:196 +#: src/Views/menu-diagnostics.php:198 msgid "Posts and expiration settings" msgstr "Impostazioni degli articoli e della scadenza" -#: src/Views/menu-diagnostics.php:252 +#: src/Views/menu-diagnostics.php:254 msgid "This is a legacy feature and will be removed in a future version." msgstr "" "Questa è una funzionalità legacy che sarà rimossa in una prossima versione." -#: src/Views/menu-display.php:36 +#: src/Views/menu-display.php:38 msgid "Default Formats" msgstr "Formati predefiniti" -#: src/Views/menu-display.php:40 +#: src/Views/menu-display.php:42 msgid "Date Format" msgstr "Formato data" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:48 +#: src/Views/menu-display.php:50 msgid "" "The default format to use when displaying the action date within a post " "using the shortcode or within the footer. For information on valid " @@ -1208,16 +1214,16 @@ msgstr "" "scadenza all'interno di un articolo utilizzando lo shortcode o nel footer. " "Per informazioni sulle opzioni di formattazione valide, vedere: %s." -#: src/Views/menu-display.php:52 src/Views/menu-display.php:70 +#: src/Views/menu-display.php:54 src/Views/menu-display.php:72 msgid "PHP Date Function" msgstr "Funzione data PHP" -#: src/Views/menu-display.php:58 +#: src/Views/menu-display.php:60 msgid "Time Format" msgstr "Formato ora" #. translators: %s is a link to the PHP date function documentation -#: src/Views/menu-display.php:66 +#: src/Views/menu-display.php:68 msgid "" "The default format to use when displaying the action time within a post " "using the shortcode or within the footer. For information on valid " @@ -1227,11 +1233,11 @@ msgstr "" "all'interno di un articolo utilizzando lo shortcode o nel footer. Per " "informazioni sulle opzioni di formattazione valide, vedere: %s." -#: src/Views/menu-display.php:79 +#: src/Views/menu-display.php:80 msgid "Post Footer Display" msgstr "Visualizzazione nel footer" -#: src/Views/menu-display.php:81 +#: src/Views/menu-display.php:82 msgid "" "Enabling this below will display the action date automatically at the end of " "any post which is set to run an action." @@ -1239,11 +1245,11 @@ msgstr "" "Abilitando l'opzione seguente verrà mostrata automaticamente la data di " "scadenza alla fine di ogni articolo che è impostato per scadere." -#: src/Views/menu-display.php:88 +#: src/Views/menu-display.php:89 msgid "Show in Post Footer?" msgstr "Mostrare nel footer dell'articolo?" -#: src/Views/menu-display.php:103 +#: src/Views/menu-display.php:104 msgid "" "This will enable or disable displaying the future action date in the post " "footer." @@ -1251,11 +1257,11 @@ msgstr "" "Questo abiliterà o disabiliterà la visualizzazione della data di scadenza " "dell'articolo nel footer dello stesso." -#: src/Views/menu-display.php:111 +#: src/Views/menu-display.php:112 msgid "Footer Contents" msgstr "Contenuto del footer" -#: src/Views/menu-display.php:116 +#: src/Views/menu-display.php:117 msgid "" "Enter the text you would like to appear at the bottom of every post which " "has an action scheduled. The following placeholders will be replaced with " @@ -1265,31 +1271,31 @@ msgstr "" "impostato con una scadenza. I seguenti segnaposto verranno sostituiti con la " "data di scadenza nel modo indicato:" -#: src/Views/menu-display.php:134 +#: src/Views/menu-display.php:135 msgid "Footer Style" msgstr "Stile del footer" -#: src/Views/menu-display.php:139 +#: src/Views/menu-display.php:140 msgid "The inline css which will be used to style the footer text." msgstr "" "Il css inline che verrà utilizzato per definire lo stile del testo del " "footer." -#: src/Views/menu-display.php:142 +#: src/Views/menu-display.php:143 msgid "Example: " msgstr "Esempio: " -#: src/Views/menu-display.php:153 +#: src/Views/menu-display.php:154 msgid "Shortcode" msgstr "Shortcode" #. translators: %s is the shortcode code wrapped in code tags -#: src/Views/menu-display.php:156 +#: src/Views/menu-display.php:157 msgid "Valid %s attributes:" msgstr "Attributi %s validi:" #. translators: %1$s and %2$s are code tags that wrap the shortcode attribute names -#: src/Views/menu-display.php:161 +#: src/Views/menu-display.php:162 msgid "" "%1$stype%2$s - valid options are %1$sfull%2$s (default), %1$sdate%2$s, " "%1$stime%2$s" @@ -1299,18 +1305,18 @@ msgstr "" #. translators: %s is a code tag that wraps the shortcode attribute dateformat #. translators: %s is a code tag that wraps the shortcode attribute timeformat -#: src/Views/menu-display.php:171 src/Views/menu-display.php:177 +#: src/Views/menu-display.php:172 src/Views/menu-display.php:178 msgid "%s - format set here will override the value set on the settings page" msgstr "" "%s - il formato impostato qui sovrascrive il valore configurato nella pagina " "delle impostazioni" -#: src/Views/menu-general.php:63 +#: src/Views/menu-general.php:62 msgid "Defaults" msgstr "Valori predefiniti" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Views/menu-general.php:75 +#: src/Views/menu-general.php:74 msgid "" "Set the offset to use for the default action date and time. For information " "on formatting, see %1$s\n" @@ -1324,39 +1330,39 @@ msgstr "" "month%3$s o %2$s+1 week 2 days 4 hours 2 seconds%3$s o %2$snext " "Thursday%3$s. Comunque ricordati che puoi inserire solo valori in inglese." -#: src/Views/menu-general.php:93 +#: src/Views/menu-general.php:92 msgid "Email Notification" msgstr "Email di notifica scadenza" -#: src/Views/menu-general.php:95 +#: src/Views/menu-general.php:94 msgid "Whenever an action runs, an email can be sent to alert users." msgstr "" "Ogni volta che un articolo scade, un'email può essere spedita per avvisare " "gli utenti della scadenza." -#: src/Views/menu-general.php:102 +#: src/Views/menu-general.php:101 msgid "Enable Email Notification?" msgstr "Abilita notifica email?" -#: src/Views/menu-general.php:121 +#: src/Views/menu-general.php:120 msgid "" "This will enable or disable the send of email notification on future action." msgstr "" "Questo abiliterà o disabiliterà l'invio della notifica via email alla " "scadenza dell'articolo." -#: src/Views/menu-general.php:129 +#: src/Views/menu-general.php:128 msgid "Include Blog Administrators?" msgstr "Includere gli amministratori del blog?" -#: src/Views/menu-general.php:150 +#: src/Views/menu-general.php:149 msgid "" "This will include all users with the role of \"Administrator\" in the email." msgstr "" "Ciò includerà tutti gli utenti con il ruolo di \"Amministratore\" nell'email " "di scadenza dell'articolo." -#: src/Views/menu-general.php:166 +#: src/Views/menu-general.php:165 msgid "" "Enter a comma separate list of emails that you would like to be notified " "when the action runs. This will be applied to ALL post types. You can set " diff --git a/languages/post-expirator-nl_NL.mo b/languages/post-expirator-nl_NL.mo index 2d35aa34c..9ea356d93 100644 Binary files a/languages/post-expirator-nl_NL.mo and b/languages/post-expirator-nl_NL.mo differ diff --git a/languages/post-expirator-nl_NL.po b/languages/post-expirator-nl_NL.po index 0f1cd2922..d3864687b 100644 --- a/languages/post-expirator-nl_NL.po +++ b/languages/post-expirator-nl_NL.po @@ -336,16 +336,16 @@ msgid "Unstick" msgstr "Unstick" #: src/Modules/Expirator/Models/ExpirablePostModel.php:449 -msgid "Email is disabled" -msgstr "E-mail is uitgeschakeld" +msgid "Email is disabled." +msgstr "E-mail is uitgeschakeld." #: src/Modules/Expirator/Models/ExpirablePostModel.php:453 -msgid "Email sent" -msgstr "E-mail verzonden" +msgid "Email sent." +msgstr "E-mail verzonden." #: src/Modules/Expirator/Models/ExpirablePostModel.php:453 -msgid "Email not sent" -msgstr "E-mail niet verzonden" +msgid "Email not sent." +msgstr "E-mail niet verzonden." #: src/Modules/Expirator/Models/ExpirablePostModel.php:524 msgid "%s. %s on %s. The post link is %s" diff --git a/languages/post-expirator-pt_BR.mo b/languages/post-expirator-pt_BR.mo index f860b26d7..597310c17 100644 Binary files a/languages/post-expirator-pt_BR.mo and b/languages/post-expirator-pt_BR.mo differ diff --git a/languages/post-expirator-pt_BR.po b/languages/post-expirator-pt_BR.po index 8634a9c11..c91c61882 100644 --- a/languages/post-expirator-pt_BR.po +++ b/languages/post-expirator-pt_BR.po @@ -387,16 +387,16 @@ msgid "Unstick" msgstr "Desafixar" #: src/Modules/Expirator/Models/ExpirablePostModel.php:418 -msgid "Email is disabled" -msgstr "O e-mail está desativado" +msgid "Email is disabled." +msgstr "O e-mail está desativado." #: src/Modules/Expirator/Models/ExpirablePostModel.php:422 -msgid "Email sent" -msgstr "Email enviado" +msgid "Email sent." +msgstr "Email enviado." #: src/Modules/Expirator/Models/ExpirablePostModel.php:422 -msgid "Email not sent" -msgstr "E-mail não enviado" +msgid "Email not sent." +msgstr "E-mail não enviado." #: src/Modules/Expirator/Models/ExpirablePostModel.php:564 msgid "%s. %s on %s. The post link is %s" diff --git a/languages/post-expirator.pot b/languages/post-expirator.pot index 241a62cd0..fdf050186 100644 --- a/languages/post-expirator.pot +++ b/languages/post-expirator.pot @@ -2,26 +2,26 @@ # This file is distributed under the same license as the PublishPress Future plugin. msgid "" msgstr "" -"Project-Id-Version: PublishPress Future 3.4.2\n" +"Project-Id-Version: PublishPress Future 3.4.4\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-08-05T20:36:02+00:00\n" +"POT-Creation-Date: 2024-08-21T02:08:19+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: post-expirator\n" #. Plugin Name of the plugin #: post-expirator.php -#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 -#: src/Modules/Expirator/Controllers/BulkEditController.php:165 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 +#: src/Modules/Expirator/Controllers/BulkEditController.php:166 #: src/Modules/Expirator/Controllers/ClassicEditorController.php:144 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:362 -#: src/Modules/Expirator/Controllers/QuickEditController.php:270 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:85 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:367 +#: src/Modules/Expirator/Controllers/QuickEditController.php:280 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:93 msgid "PublishPress Future" msgstr "" @@ -81,37 +81,37 @@ msgstr "" msgid "The database schema could not be fixed. Please, contact the support team." msgstr "" -#: legacy/classes/Display.class.php:339 -#: legacy/classes/Display.class.php:397 +#: legacy/classes/Display.class.php:342 +#: legacy/classes/Display.class.php:400 msgid "Saved Options!" msgstr "" #. translators: %1$s is the plugin name, %2$s is the star rating markup -#: legacy/classes/Display.class.php:483 +#: legacy/classes/Display.class.php:486 msgid "If you like %1$s, please leave us a %2$s rating. Thank you!" msgstr "" -#: legacy/classes/Display.class.php:498 +#: legacy/classes/Display.class.php:501 msgid "About PublishPress Future" msgstr "" -#: legacy/classes/Display.class.php:500 +#: legacy/classes/Display.class.php:503 msgid "About" msgstr "" -#: legacy/classes/Display.class.php:506 +#: legacy/classes/Display.class.php:509 msgid "Future Documentation" msgstr "" -#: legacy/classes/Display.class.php:508 +#: legacy/classes/Display.class.php:511 msgid "Documentation" msgstr "" -#: legacy/classes/Display.class.php:514 +#: legacy/classes/Display.class.php:517 msgid "Contact the PublishPress team" msgstr "" -#: legacy/classes/Display.class.php:516 +#: legacy/classes/Display.class.php:519 msgid "Contact" msgstr "" @@ -144,138 +144,138 @@ msgstr "" msgid "The table indexes are invalid: " msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:128 -#: src/Modules/Expirator/Controllers/BulkEditController.php:164 -#: src/Modules/Expirator/Controllers/QuickEditController.php:269 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:129 +#: src/Modules/Expirator/Controllers/BulkEditController.php:165 +#: src/Modules/Expirator/Controllers/QuickEditController.php:279 msgid "Categories" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:130 -#: src/Modules/Expirator/Controllers/BulkEditController.php:166 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:363 -#: src/Modules/Expirator/Controllers/QuickEditController.php:271 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 +#: src/Modules/Expirator/Controllers/BulkEditController.php:167 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:368 +#: src/Modules/Expirator/Controllers/QuickEditController.php:281 msgid "Enable Future Action" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:131 -#: src/Modules/Expirator/Controllers/BulkEditController.php:167 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:364 -#: src/Modules/Expirator/Controllers/QuickEditController.php:272 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 +#: src/Modules/Expirator/Controllers/BulkEditController.php:168 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 +#: src/Modules/Expirator/Controllers/QuickEditController.php:282 #: src/Modules/Expirator/Tables/ScheduledActionsTable.php:46 msgid "Action" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:132 -#: src/Modules/Expirator/Controllers/BulkEditController.php:170 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:367 -#: src/Modules/Expirator/Controllers/QuickEditController.php:275 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 +#: src/Modules/Expirator/Controllers/BulkEditController.php:171 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:372 +#: src/Modules/Expirator/Controllers/QuickEditController.php:285 msgid "Loading" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:133 -#: src/Modules/Expirator/Controllers/BulkEditController.php:168 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:365 -#: src/Modules/Expirator/Controllers/QuickEditController.php:273 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:134 +#: src/Modules/Expirator/Controllers/BulkEditController.php:169 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:370 +#: src/Modules/Expirator/Controllers/QuickEditController.php:283 msgid "Show Calendar" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:134 -#: src/Modules/Expirator/Controllers/BulkEditController.php:169 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 -#: src/Modules/Expirator/Controllers/QuickEditController.php:274 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:135 +#: src/Modules/Expirator/Controllers/BulkEditController.php:170 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:371 +#: src/Modules/Expirator/Controllers/QuickEditController.php:284 msgid "Hide Calendar" msgstr "" #. translators: the text between {} is the link to the settings page. #. translators: the text between {{}} is the link to the settings page. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:136 -#: src/Modules/Expirator/Controllers/BulkEditController.php:172 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:369 -#: src/Modules/Expirator/Controllers/QuickEditController.php:277 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:137 +#: src/Modules/Expirator/Controllers/BulkEditController.php:173 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:374 +#: src/Modules/Expirator/Controllers/QuickEditController.php:287 msgid "Timezone is controlled by the {WordPress Settings}." msgstr "" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:140 -#: src/Modules/Expirator/Controllers/BulkEditController.php:176 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:376 -#: src/Modules/Expirator/Controllers/QuickEditController.php:281 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:141 +#: src/Modules/Expirator/Controllers/BulkEditController.php:177 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:381 +#: src/Modules/Expirator/Controllers/QuickEditController.php:291 msgid "No %s found." msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:143 -#: src/Modules/Expirator/Controllers/BulkEditController.php:180 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:379 -#: src/Modules/Expirator/Controllers/QuickEditController.php:284 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:144 +#: src/Modules/Expirator/Controllers/BulkEditController.php:181 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:384 +#: src/Modules/Expirator/Controllers/QuickEditController.php:294 msgid "You must assign a taxonomy to this post type to use this feature." msgstr "" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:145 -#: src/Modules/Expirator/Controllers/BulkEditController.php:187 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:384 -#: src/Modules/Expirator/Controllers/QuickEditController.php:286 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:146 +#: src/Modules/Expirator/Controllers/BulkEditController.php:188 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:389 +#: src/Modules/Expirator/Controllers/QuickEditController.php:296 msgid "New %s" msgstr "" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:147 -#: src/Modules/Expirator/Controllers/BulkEditController.php:189 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:386 -#: src/Modules/Expirator/Controllers/QuickEditController.php:288 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:148 +#: src/Modules/Expirator/Controllers/BulkEditController.php:190 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:391 +#: src/Modules/Expirator/Controllers/QuickEditController.php:298 msgid "%s to remove" msgstr "" #. translators: %s is the name of the taxonomy in plural form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:149 -#: src/Modules/Expirator/Controllers/BulkEditController.php:191 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:388 -#: src/Modules/Expirator/Controllers/QuickEditController.php:290 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:150 +#: src/Modules/Expirator/Controllers/BulkEditController.php:192 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:393 +#: src/Modules/Expirator/Controllers/QuickEditController.php:300 msgid "%s to add" msgstr "" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:151 -#: src/Modules/Expirator/Controllers/BulkEditController.php:193 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:391 -#: src/Modules/Expirator/Controllers/QuickEditController.php:292 -msgid "Search for %s" -msgstr "" - #: src/Modules/Expirator/Controllers/BlockEditorController.php:152 #: src/Modules/Expirator/Controllers/BulkEditController.php:194 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:394 -#: src/Modules/Expirator/Controllers/QuickEditController.php:293 -msgid "Select an action" +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:396 +#: src/Modules/Expirator/Controllers/QuickEditController.php:302 +msgid "Search for %s" msgstr "" #: src/Modules/Expirator/Controllers/BlockEditorController.php:153 #: src/Modules/Expirator/Controllers/BulkEditController.php:195 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:395 -#: src/Modules/Expirator/Controllers/QuickEditController.php:294 -msgid "Select a date" +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:399 +#: src/Modules/Expirator/Controllers/QuickEditController.php:303 +msgid "Select an action" msgstr "" #: src/Modules/Expirator/Controllers/BlockEditorController.php:154 #: src/Modules/Expirator/Controllers/BulkEditController.php:196 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:396 -#: src/Modules/Expirator/Controllers/QuickEditController.php:295 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:400 +#: src/Modules/Expirator/Controllers/QuickEditController.php:304 +msgid "Select a date" +msgstr "" + +#: src/Modules/Expirator/Controllers/BlockEditorController.php:155 +#: src/Modules/Expirator/Controllers/BulkEditController.php:197 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:401 +#: src/Modules/Expirator/Controllers/QuickEditController.php:305 msgid "Date cannot be in the past" msgstr "" #. translators: %s is the name of the taxonomy in singular form. -#: src/Modules/Expirator/Controllers/BlockEditorController.php:157 -#: src/Modules/Expirator/Controllers/BulkEditController.php:199 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:399 -#: src/Modules/Expirator/Controllers/QuickEditController.php:298 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:158 +#: src/Modules/Expirator/Controllers/BulkEditController.php:200 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:404 +#: src/Modules/Expirator/Controllers/QuickEditController.php:308 #: src/Modules/Settings/Controllers/Controller.php:246 msgid "Please select one or more %s" msgstr "" -#: src/Modules/Expirator/Controllers/BlockEditorController.php:160 -#: src/Modules/Expirator/Controllers/BulkEditController.php:202 -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:402 -#: src/Modules/Expirator/Controllers/QuickEditController.php:301 +#: src/Modules/Expirator/Controllers/BlockEditorController.php:161 +#: src/Modules/Expirator/Controllers/BulkEditController.php:203 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:407 +#: src/Modules/Expirator/Controllers/QuickEditController.php:311 msgid "New status" msgstr "" @@ -291,31 +291,31 @@ msgstr "" msgid "Update Future Actions from Post Metadata" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:179 +#: src/Modules/Expirator/Controllers/BulkEditController.php:180 msgid "Future Action Update" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:181 +#: src/Modules/Expirator/Controllers/BulkEditController.php:182 msgid "— No Change —" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:182 +#: src/Modules/Expirator/Controllers/BulkEditController.php:183 msgid "Add or update action for posts" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:183 +#: src/Modules/Expirator/Controllers/BulkEditController.php:184 msgid "Add action if none exists for posts" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:184 +#: src/Modules/Expirator/Controllers/BulkEditController.php:185 msgid "Update the existing actions for posts" msgstr "" -#: src/Modules/Expirator/Controllers/BulkEditController.php:185 +#: src/Modules/Expirator/Controllers/BulkEditController.php:186 msgid "Remove action from posts" msgstr "" -#: src/Modules/Expirator/Controllers/ClassicEditorController.php:361 +#: src/Modules/Expirator/Controllers/ClassicEditorController.php:366 msgid "Category" msgstr "" @@ -332,34 +332,38 @@ msgstr "" msgid "Invalid date time offset." msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:86 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:94 msgid "Future" msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:95 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:96 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:103 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:104 #: src/Views/tabs.php:59 msgid "Action Settings" msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:104 -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:105 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:112 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:113 #: src/Modules/Expirator/Tables/ScheduledActionsTable.php:43 msgid "Scheduled Actions" msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:174 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:182 msgid "Log format" msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:181 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:189 msgid "List" msgstr "" -#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:190 +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:198 msgid "Popup" msgstr "" +#: src/Modules/Expirator/Controllers/ScheduledActionsController.php:266 +msgid "Successfully executed action: %s" +msgstr "" + #: src/Modules/Expirator/Controllers/ShortcodeController.php:79 msgid "The shortcode [futureaction] must be used inside the loop or with the post_id attribute." msgstr "" @@ -489,29 +493,29 @@ msgid "Unstick" msgstr "" #: src/Modules/Expirator/Models/ExpirablePostModel.php:464 -msgid "Email is disabled" +msgid "Email is disabled." msgstr "" #: src/Modules/Expirator/Models/ExpirablePostModel.php:468 -msgid "Email sent" +msgid "Email sent." msgstr "" #: src/Modules/Expirator/Models/ExpirablePostModel.php:468 -msgid "Email not sent" +msgid "Email not sent." msgstr "" #. translators: %1$s: post title placeholder, %2$s: notification text, %3$s: action date placeholder, %4$s: post link placeholder -#: src/Modules/Expirator/Models/ExpirablePostModel.php:618 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:619 msgid "%1$s. %2$s on %3$s. The post link is %4$s" msgstr "" #. translators: %s is the post title -#: src/Modules/Expirator/Models/ExpirablePostModel.php:636 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:637 msgid "Future Action Complete \"%s\"" msgstr "" #. translators: 1: is the blog name, 2: the email subject -#: src/Modules/Expirator/Models/ExpirablePostModel.php:640 +#: src/Modules/Expirator/Models/ExpirablePostModel.php:641 msgid "[%1$s] %2$s" msgstr "" @@ -785,7 +789,7 @@ msgid "No taxonomies found for this post type. Taxonomy actions will not be avai msgstr "" #: src/Modules/Settings/Controllers/Controller.php:230 -#: src/Views/menu-general.php:158 +#: src/Views/menu-general.php:182 msgid "Who to Notify" msgstr "" @@ -794,12 +798,12 @@ msgid "Enter a comma separated list of emails that you would like to be notified msgstr "" #: src/Modules/Settings/Controllers/Controller.php:235 -#: src/Views/menu-general.php:66 +#: src/Views/menu-general.php:68 msgid "Default Date/Time Offset" msgstr "" #: src/Modules/Settings/Controllers/Controller.php:238 -#: src/Views/menu-general.php:82 +#: src/Views/menu-general.php:84 msgid "PHP strtotime function" msgstr "" @@ -816,22 +820,26 @@ msgid "Wait for the validation..." msgstr "" #: src/Modules/Settings/Controllers/Controller.php:247 +#: src/Modules/Settings/Controllers/Controller.php:294 msgid "Date Preview" msgstr "" #: src/Modules/Settings/Controllers/Controller.php:248 +#: src/Modules/Settings/Controllers/Controller.php:295 msgid "Current Date" msgstr "" #: src/Modules/Settings/Controllers/Controller.php:249 +#: src/Modules/Settings/Controllers/Controller.php:296 msgid "Computed Date" msgstr "" #: src/Modules/Settings/Controllers/Controller.php:250 +#: src/Modules/Settings/Controllers/Controller.php:297 msgid "Error" msgstr "" -#: src/Modules/Settings/Controllers/Controller.php:352 +#: src/Modules/Settings/Controllers/Controller.php:391 msgid "Form Validation Failure: Sorry, your nonce did not verify." msgstr "" @@ -967,7 +975,7 @@ msgstr "" #: src/Views/menu-advanced.php:182 #: src/Views/menu-display.php:185 -#: src/Views/menu-general.php:176 +#: src/Views/menu-general.php:200 msgid "Save Changes" msgstr "" @@ -1020,8 +1028,8 @@ msgstr "" #: src/Views/menu-diagnostics.php:99 #: src/Views/menu-display.php:95 -#: src/Views/menu-general.php:109 -#: src/Views/menu-general.php:137 +#: src/Views/menu-general.php:133 +#: src/Views/menu-general.php:161 msgid "Enabled" msgstr "" @@ -1039,8 +1047,8 @@ msgstr "" #: src/Views/menu-diagnostics.php:119 #: src/Views/menu-display.php:101 -#: src/Views/menu-general.php:117 -#: src/Views/menu-general.php:146 +#: src/Views/menu-general.php:141 +#: src/Views/menu-general.php:170 msgid "Disabled" msgstr "" @@ -1176,42 +1184,62 @@ msgstr "" msgid "%s - format set here will override the value set on the settings page" msgstr "" -#: src/Views/menu-general.php:62 +#: src/Views/menu-general.php:64 msgid "Defaults" msgstr "" #. translators: %1$s is the link to the PHP strtotime function documentation, %2$s and %3$s are the opening and closing code tags. Please, do not translate the date format text, since PHP will not be able to calculate using non-english terms. -#: src/Views/menu-general.php:74 +#: src/Views/menu-general.php:76 msgid "" "Set the offset to use for the default action date and time. For information on formatting, see %1$s\n" " . For example, you could enter %2$s+1 month%3$s or %2$s+1 week 2 days 4 hours 2 seconds%3$s or %2$snext Thursday%3$s. Please, use only terms in English." msgstr "" -#: src/Views/menu-general.php:92 +#: src/Views/menu-general.php:95 +msgid "Calendar Visibility" +msgstr "" + +#: src/Views/menu-general.php:101 +msgid "Remember last state" +msgstr "" + +#: src/Views/menu-general.php:103 +msgid "Shows or hides the calendar based on the last user interaction." +msgstr "" + +#: src/Views/menu-general.php:108 +msgid "Always hidden" +msgstr "" + +#: src/Views/menu-general.php:110 +msgid "The calendar is always hidden by default." +msgstr "" + +#: src/Views/menu-general.php:116 msgid "Email Notification" msgstr "" -#: src/Views/menu-general.php:94 +#: src/Views/menu-general.php:118 msgid "Whenever an action runs, an email can be sent to alert users." msgstr "" -#: src/Views/menu-general.php:101 +#: src/Views/menu-general.php:125 msgid "Enable Email Notification?" msgstr "" -#: src/Views/menu-general.php:120 +#: src/Views/menu-general.php:144 msgid "This will enable or disable the send of email notification on future action." msgstr "" -#: src/Views/menu-general.php:128 +#: src/Views/menu-general.php:152 msgid "Include Blog Administrators?" msgstr "" -#: src/Views/menu-general.php:149 +#: src/Views/menu-general.php:173 msgid "This will include all users with the role of \"Administrator\" in the email." msgstr "" -#: src/Views/menu-general.php:165 +#: src/Views/menu-general.php:189 msgid "Enter a comma separate list of emails that you would like to be notified when the action runs. This will be applied to ALL post types. You can set post type specific emails on the Defaults tab." msgstr "" diff --git a/legacy/classes/Display.class.php b/legacy/classes/Display.class.php index 407f2ffdd..20c08bdd9 100644 --- a/legacy/classes/Display.class.php +++ b/legacy/classes/Display.class.php @@ -312,6 +312,9 @@ private function menu_general() $customExpirationDate = preg_replace('/["\'`]/', '', $customExpirationDate); update_option('expirationdateDefaultDateCustom', trim($customExpirationDate)); + + $hideCalendarByDefault = isset($_POST['expired-hide-calendar-by-default']) && $_POST['expired-hide-calendar-by-default'] == '1' ? 1 : 0; + update_option('expirationdateHideCalendarByDefault', $hideCalendarByDefault); // phpcs:enable if (! isset($_POST['allow-user-roles']) || ! is_array($_POST['allow-user-roles'])) { diff --git a/lib/vendor/composer/installed.php b/lib/vendor/composer/installed.php index ef695f2ed..2383f1afb 100644 --- a/lib/vendor/composer/installed.php +++ b/lib/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '11a497ed2a54de6f5e48ff9ad32e91acee999d45', + 'reference' => 'd457523da18351e29f2d36ef4d7bf1d3a68269ea', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '11a497ed2a54de6f5e48ff9ad32e91acee999d45', + 'reference' => 'd457523da18351e29f2d36ef4d7bf1d3a68269ea', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/package.json b/package.json index 52203c216..b89233943 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "@wordpress/api-fetch": "^6.22.0", "@wordpress/hooks": "^3.27.0", "@wordpress/url": "^3.28.0", - "react-select": "^5.7.0" + "react-select": "^5.7.0", + "postcss-loader": "^7" }, "devDependencies": { "@wordpress/scripts": "^25.2.0", @@ -34,6 +35,8 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "@babel/traverse": "^7.24.7", + "css-loader": "^7.1.2", + "style-loader": "^4.0.0", "braces": "^3.0.3", "child_process": "^1.0.2", "inquirer": "^9.1.5", diff --git a/phpstan.neon b/phpstan.neon index d2827999c..98a0a86d5 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,3 +19,5 @@ parameters: - dev-workspace - cache - .cache +rules: + - Spatie\Ray\PHPStan\RemainingRayCallRule diff --git a/post-expirator.php b/post-expirator.php index dfd416bf7..ca42f6c9a 100644 --- a/post-expirator.php +++ b/post-expirator.php @@ -5,7 +5,7 @@ * Plugin URI: http://wordpress.org/extend/plugins/post-expirator/ * Description: PublishPress Future allows you to schedule automatic changes to posts, pages and other content types. * Author: PublishPress - * Version: 3.4.3 + * Version: 3.4.4 * Author URI: http://publishpress.com * Text Domain: post-expirator * Domain Path: /languages @@ -50,7 +50,7 @@ } if (! defined('PUBLISHPRESS_FUTURE_VERSION')) { - define('PUBLISHPRESS_FUTURE_VERSION', '3.4.3'); + define('PUBLISHPRESS_FUTURE_VERSION', '3.4.4'); } if (! defined('PUBLISHPRESS_FUTURE_LIB_VENDOR_PATH')) { diff --git a/readme.txt b/readme.txt index d922fb41e..38db1827e 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Requires at least: 6.1 Requires PHP: 7.2.5 Tested up to: 6.6 License: GPLv2 or later -Stable tag: 3.4.3 +Stable tag: 3.4.4 PublishPress Future can make scheduled changes to your content. You can unpublish posts, move posts to a new status, update the categories, and more. @@ -173,6 +173,26 @@ Yes, the PublishPress Future plugin allows you to schedule automatic changes to The full changelog can be found on [GitHub](https://github.com/publishpress/PublishPress-Future/blob/main/CHANGELOG.md). +## [3.4.4] - 21 Aug, 2024 + +### Fixed + +- Improve notice message when scheduled action runs after pressing "run" (PR #896). +- Fixed support for the Event Espresso plugin (PR #900). +- Fixed React warning about createRoot being deprecated. +- Fixed empty fieldset displayed when the bos is disabled for the post type (Issue #792). +- Update language files. + +### Changed + +- Add tabs for post types in the post types settings page (PR #895). + +### Added + +- Added computed date preview to the general settings page (PR #897). +- Added option to hide the calendar by default in the future action panel (PR #899). +- Added new filter `publishpressfuture_posts_future_action_column_output` to the Future Action column. + ## [3.4.3] - 06 Aug, 2024 ### Changed @@ -276,30 +296,3 @@ The full changelog can be found on [GitHub](https://github.com/publishpress/Publ - Redirects to the settings page after activating the plugin, #764 - Fix access to the View Debug settings tab when debug is disabled - Fix the position of the "Upgrade to Pro" and "Settings" menu items in the admin bar - -## [3.3.1] - 19 Mar, 2024 - -### Added - -- Add validation for the date and time offset in the settings page, #683 -- Add form validation to the settings panel -- Add form validation to the metabox panel -- Add a date preview to the date/time offset setting field - -### Changed - -- The actions to move posts to another status where grouped in a single action, with a dropdown to select the status, #668 -- The actions "draft", "private" and "trash" are deprecated in favor of "change-status", #668 -- The metadata hash key has now a prefix "_" marking it as a private key, #695 -- Improved the name of some actions -- Change the label of the field to select terms when "Replace all terms" is selected, #664 - -### Fixed - -- Make it impossible to choose dates in the past, #443 -- Enter key submits quick-edit panel when selecting a taxonomy term, #586 -- The name of the taxonomy in the actions field is now updated in the settings panel when the taxonomy is changed, #676 -- Possible to add an action using an empty category setting, #587 -- Fix language files for ES, IT, FR, #685 -- Fix inconsistent text in the filter for "Pending" actions, #673 -- Improve the message when no actions are found: "No Future Actions", #666 diff --git a/src/Modules/Expirator/Controllers/BlockEditorController.php b/src/Modules/Expirator/Controllers/BlockEditorController.php index 6fc483b53..a4bb8288e 100644 --- a/src/Modules/Expirator/Controllers/BlockEditorController.php +++ b/src/Modules/Expirator/Controllers/BlockEditorController.php @@ -124,6 +124,7 @@ public function enqueueBlockEditorAssets() 'isDebugEnabled' => $container->get(ServicesAbstract::DEBUG)->isEnabled(), 'taxonomyName' => $taxonomyPluralName, 'taxonomyTerms' => $taxonomyTerms, + 'hideCalendarByDefault' => $settingsFacade->getHideCalendarByDefault(), 'strings' => [ 'category' => __('Categories', 'post-expirator'), 'panelTitle' => __('PublishPress Future', 'post-expirator'), diff --git a/src/Modules/Expirator/Controllers/BulkEditController.php b/src/Modules/Expirator/Controllers/BulkEditController.php index 9f93b5b33..2c33b6f16 100644 --- a/src/Modules/Expirator/Controllers/BulkEditController.php +++ b/src/Modules/Expirator/Controllers/BulkEditController.php @@ -160,6 +160,7 @@ public function enqueueScripts() 'postType' => $currentScreen->post_type, 'isNewPost' => false, 'nonce' => $nonce, + 'hideCalendarByDefault' => $settingsFacade->getHideCalendarByDefault(), 'strings' => [ 'category' => __('Categories', 'post-expirator'), 'panelTitle' => __('PublishPress Future', 'post-expirator'), diff --git a/src/Modules/Expirator/Controllers/ClassicEditorController.php b/src/Modules/Expirator/Controllers/ClassicEditorController.php index fb05ff520..897803253 100644 --- a/src/Modules/Expirator/Controllers/ClassicEditorController.php +++ b/src/Modules/Expirator/Controllers/ClassicEditorController.php @@ -263,7 +263,11 @@ public function enqueueScripts() { $currentScreen = get_current_screen(); - if ($currentScreen->base !== 'post') { + if ( + $currentScreen->base !== 'post' + // Add support to the Event Espresso plugin + && $currentScreen->id !== 'espresso_events' + ) { return; } @@ -357,6 +361,7 @@ public function enqueueScripts() 'taxonomyTerms' => $taxonomyTerms, 'postType' => $currentScreen->post_type, 'isNewPost' => $isNewPostPage, + 'hideCalendarByDefault' => $settingsFacade->getHideCalendarByDefault(), 'strings' => [ 'category' => __('Category', 'post-expirator'), 'panelTitle' => __('PublishPress Future', 'post-expirator'), diff --git a/src/Modules/Expirator/Controllers/PostListController.php b/src/Modules/Expirator/Controllers/PostListController.php index e06097384..897857bd5 100644 --- a/src/Modules/Expirator/Controllers/PostListController.php +++ b/src/Modules/Expirator/Controllers/PostListController.php @@ -102,11 +102,16 @@ private function renderColumn() $container = Container::getInstance(); $settings = $container->get(ServicesAbstract::SETTINGS); + ob_start(); PostExpirator_Display::getInstance()->render_template('expire-column', [ 'id' => $post->ID, 'postType' => $post->post_type, 'columnStyle' => $settings->getColumnStyle(), ]); + $output = ob_get_clean(); + + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo $this->hooks->applyFilters(ExpiratorHooks::FILTER_POSTS_FUTURE_ACTION_COLUMN_OUTPUT, $output); } public function manageSortableColumns() diff --git a/src/Modules/Expirator/Controllers/QuickEditController.php b/src/Modules/Expirator/Controllers/QuickEditController.php index ee3deef2c..7f84b3537 100644 --- a/src/Modules/Expirator/Controllers/QuickEditController.php +++ b/src/Modules/Expirator/Controllers/QuickEditController.php @@ -73,6 +73,10 @@ public function registerQuickEditCustomBox($columnName, $postType) return; } + if (! $this->isEnabledForPostType($postType)) { + return; + } + $container = Container::getInstance(); $settingsFacade = $container->get(ServicesAbstract::SETTINGS); @@ -175,27 +179,37 @@ public function processQuickEditUpdate($postId) $this->hooks->doAction(ExpiratorHooks::ACTION_UNSCHEDULE_POST_EXPIRATION, $postId); } - public function enqueueScripts() + private function isEnabledForPostType($postType) { - $currentScreen = get_current_screen(); - - if ($currentScreen->base !== 'edit') { - return; - } - $container = Container::getInstance(); $settingsFacade = $container->get(ServicesAbstract::SETTINGS); $actionsModel = $container->get(ServicesAbstract::EXPIRATION_ACTIONS_MODEL); - $postType = $currentScreen->post_type; $postTypeDefaultConfig = $settingsFacade->getPostTypeDefaults($postType); if (! in_array((string)$postTypeDefaultConfig['activeMetaBox'], ['active', '1', true])) { - return; + return false; } $hideMetabox = (bool)$this->hooks->applyFilters(HooksAbstract::FILTER_HIDE_METABOX, false, $postType); if ($hideMetabox) { + return false; + } + + return true; + } + + public function enqueueScripts() + { + $currentScreen = get_current_screen(); + + if ($currentScreen->base !== 'edit') { + return; + } + + $postType = $currentScreen->post_type; + + if (! $this->isEnabledForPostType($postType)) { return; } @@ -214,20 +228,15 @@ public function enqueueScripts() wp_enqueue_style('wp-components'); - $currentScreen = get_current_screen(); $container = Container::getInstance(); $settingsFacade = $container->get(ServicesAbstract::SETTINGS); $actionsModel = $container->get(ServicesAbstract::EXPIRATION_ACTIONS_MODEL); - $postType = $currentScreen->post_type; + $defaultDataModelFactory = $container->get(ServicesAbstract::POST_TYPE_DEFAULT_DATA_MODEL_FACTORY); + $debug = $container->get(ServicesAbstract::DEBUG); $postTypeDefaultConfig = $settingsFacade->getPostTypeDefaults($postType); - - - $defaultDataModelFactory = $container->get(ServicesAbstract::POST_TYPE_DEFAULT_DATA_MODEL_FACTORY); $defaultDataModel = $defaultDataModelFactory->create($postType); - $debug = $container->get(ServicesAbstract::DEBUG); - $taxonomyPluralName = ''; if (! empty($postTypeDefaultConfig['taxonomy'])) { $taxonomy = get_taxonomy($postTypeDefaultConfig['taxonomy']); @@ -265,6 +274,7 @@ public function enqueueScripts() 'postType' => $currentScreen->post_type, 'isNewPost' => false, 'nonce' => $nonce, + 'hideCalendarByDefault' => $settingsFacade->getHideCalendarByDefault(), 'strings' => [ 'category' => __('Categories', 'post-expirator'), 'panelTitle' => __('PublishPress Future', 'post-expirator'), diff --git a/src/Modules/Expirator/Controllers/ScheduledActionsController.php b/src/Modules/Expirator/Controllers/ScheduledActionsController.php index b83b51001..9d31cfa18 100644 --- a/src/Modules/Expirator/Controllers/ScheduledActionsController.php +++ b/src/Modules/Expirator/Controllers/ScheduledActionsController.php @@ -10,6 +10,7 @@ use PublishPress\Future\Core\HooksAbstract as CoreHooksAbstract; use PublishPress\Future\Framework\InitializableInterface; use PublishPress\Future\Modules\Expirator\HooksAbstract; +use PublishPress\Future\Modules\Expirator\Models\ExpirablePostModel; use PublishPress\Future\Modules\Expirator\Tables\ScheduledActionsTable as ScheduledActionsTable; defined('ABSPATH') or die('Direct access not allowed.'); @@ -77,6 +78,13 @@ public function initialize() CoreHooksAbstract::ACTION_ADMIN_ENQUEUE_SCRIPTS, [$this, 'enqueueScripts'] ); + + $this->hooks->addFilter( + HooksAbstract::FILTER_ACTION_SCHEDULER_ADMIN_NOTICE, + [$this, 'filterActionSchedulerAdminNotice'], + 10, + 3 + ); } public function onAdminMenu() @@ -237,4 +245,30 @@ public function enqueueScripts($screenId) ); } } + + public function filterActionSchedulerAdminNotice($html, $action, $notification) + { + if ($action->get_group() !== 'publishpress-future') { + return $html; + } + + if ($action->get_hook() === 'publishpressfuture_run_workflow') { + $args = $action->get_args(); + + if (isset($args['postId']) && isset($args['workflow']) && 'expire' === $args['workflow']) { + + $transientName = 'post-expirator-notice-' . (int) $args['postId']; + $noticeMessage = get_transient($transientName); + delete_transient($transientName); + + // translators: %s is the action description + $html = sprintf( + __('Successfully executed action: %s', 'post-expirator'), + $noticeMessage + ); + } + } + + return $html; + } } diff --git a/src/Modules/Expirator/HooksAbstract.php b/src/Modules/Expirator/HooksAbstract.php index a86158f2d..1f7fc78e6 100644 --- a/src/Modules/Expirator/HooksAbstract.php +++ b/src/Modules/Expirator/HooksAbstract.php @@ -65,6 +65,8 @@ abstract class HooksAbstract public const FILTER_EXPIRATION_NEW_STATUS = 'publishpressfuture_expiration_new_status'; public const FILTER_EXPIRATION_STATUSES = 'publishpressfuture_expiration_statuses'; public const FILTER_PREPARE_POST_EXPIRATION_OPTS = 'publishpressfuture_prepare_post_expiration_opts'; + public const FILTER_ACTION_SCHEDULER_ADMIN_NOTICE = 'action_scheduler_admin_notice_html'; + public const FILTER_POSTS_FUTURE_ACTION_COLUMN_OUTPUT = 'publishpressfuture_posts_future_action_column_output'; public static function getActionLegacyMultisiteDelete($blogId) diff --git a/src/Modules/Expirator/Models/ActionModelInterface.php b/src/Modules/Expirator/Models/ActionModelInterface.php index 15ac6835b..276e993eb 100644 --- a/src/Modules/Expirator/Models/ActionModelInterface.php +++ b/src/Modules/Expirator/Models/ActionModelInterface.php @@ -1,5 +1,7 @@ getNotificationText() . ' '; if (! $this->expirationEmailIsEnabled()) { - $expirationLog .= __('Email is disabled', 'post-expirator'); + $expirationLog .= __('Email is disabled.', 'post-expirator'); } else { $emailSent = $this->sendEmail($expirationAction); $expirationLog .= $emailSent - ? __('Email sent', 'post-expirator') : __('Email not sent', 'post-expirator'); + ? __('Email sent.', 'post-expirator') : __('Email not sent.', 'post-expirator'); } $this->logOnAction($expirationLog); + $this->registerNoticeMessage($postId, $expirationLog); $this->hooks->doAction(HooksAbstract::ACTION_POST_EXPIRED, $postId, $expirationLog); @@ -930,4 +931,9 @@ private function removeLegacyMetadataHash() { $this->deleteMeta(self::LEGACY_FLAG_METADATA_HASH); } + + private function registerNoticeMessage($postId, $message) + { + set_transient('post-expirator-notice-' . $postId, $message, MINUTE_IN_SECONDS); + } } diff --git a/src/Modules/Settings/Controllers/Controller.php b/src/Modules/Settings/Controllers/Controller.php index 374fb99d0..371da087a 100644 --- a/src/Modules/Settings/Controllers/Controller.php +++ b/src/Modules/Settings/Controllers/Controller.php @@ -260,6 +260,45 @@ public function onAdminEnqueueScript($screenId) ] ); } + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + if ( + (isset($_GET['page']) && $_GET['page'] === 'publishpress-future') + && (isset($_GET['tab']) && $_GET['tab'] === 'general') + ) { + //phpcs:enable WordPress.Security.NonceVerification.Recommended + wp_enqueue_script( + 'publishpressfuture-settings-general-panel', + POSTEXPIRATOR_BASEURL . 'assets/js/settings-general.js', + [ + 'wp-i18n', + 'wp-components', + 'wp-url', + 'wp-data', + 'wp-element', + 'wp-hooks', + 'wp-api-fetch', + 'wp-html-entities' + ], + POSTEXPIRATOR_VERSION, + true + ); + + wp_enqueue_style('wp-components'); + + wp_localize_script( + 'publishpressfuture-settings-general-panel', + 'publishpressFutureSettingsGeneralConfig', + [ + 'text' => [ + 'datePreview' => __('Date Preview', 'post-expirator'), + 'datePreviewCurrent' => __('Current Date', 'post-expirator'), + 'datePreviewComputed' => __('Computed Date', 'post-expirator'), + 'error' => __('Error', 'post-expirator'), + ], + ] + ); + } } private function getCurrentTab() diff --git a/src/Modules/Settings/SettingsFacade.php b/src/Modules/Settings/SettingsFacade.php index d5dd6a60b..e0fb0422b 100644 --- a/src/Modules/Settings/SettingsFacade.php +++ b/src/Modules/Settings/SettingsFacade.php @@ -274,4 +274,9 @@ public function getTimeFormatForDatePicker() { return $this->options->getOption('expirationdateTimeFormatForDatePicker', 'inherited'); } + + public function getHideCalendarByDefault() + { + return (bool)$this->options->getOption('expirationdateHideCalendarByDefault', false); + } } diff --git a/src/Views/menu-general.php b/src/Views/menu-general.php index b80085481..8888937a8 100644 --- a/src/Views/menu-general.php +++ b/src/Views/menu-general.php @@ -50,6 +50,8 @@ $expiredemailnotificationadminsenabled = 'checked="checked"'; } +$calendarHiddenByDefault = (bool) get_option('expirationdateHideCalendarByDefault', false); + $user_roles = wp_roles()->get_names(); $plugin_facade = PostExpirator_Facade::getInstance(); ?> @@ -83,7 +85,29 @@ '', '' ); ?>

+ +
+ + + + + + +
+ /> +
+

+
+ />
+

diff --git a/webpack.config.js b/webpack.config.js index 8f0213ecb..b3aa72283 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,191 +1,131 @@ const glob = require("glob"); const path = require("path"); +const defaultExternals = { + "react": "React", + "react-dom": "ReactDOM", + "&wp": "wp", + "@wordpress/element": "wp.element", + "@wordpress/components": "wp.components", + "@wordpress/data": "wp.data", + "@wordpress/plugins": "wp.plugins", + "@wordpress/hooks": "wp.hooks", + "@wordpress/url": "wp.url", +}; + +const defaultRules = [ + { + test: /\.(jsx)$/, // Identifies which file or files should be transformed. + use: {loader: "babel-loader"}, // + exclude: [ + /(node_modules|bower_components)/, + ]// JavaScript files to be ignored. + }, + { + test: /\.css$/i, + use: ["style-loader", "css-loader", "postcss-loader"], + } +]; + +const defaultResolve = { + extensions: ['.js', '.jsx'] +}; + +const defaultModule = { + rules: [ + ...defaultRules, + ] +}; + +const defaultOutput = { + path: path.join(__dirname, "assets", "js"), +} + +const defaultExports = { + devtool: 'source-map', + resolve: {...defaultResolve}, + module: {...defaultModule}, +} + module.exports = [ { - entry: glob.sync( - "./assets/jsx/settings-post-types.jsx", - ), - devtool: 'source-map', + ...defaultExports, + entry: glob.sync("./assets/jsx/settings-post-types.jsx",), + output: {...defaultOutput, filename: "settings-post-types.js"}, + externals: { + ...defaultExternals, + "&config.settings-post-types": "publishpressFutureSettingsConfig" + } + }, + { + ...defaultExports, + entry: glob.sync("./assets/jsx/settings-general.jsx",), output: { - path: path.join(__dirname, "assets", "js"), - filename: "settings-post-types.js" - }, - resolve: { - extensions: ['.jsx', '.js'] - }, - module: { - rules: [ - { - test: /\.(jsx)$/, // Identifies which file or files should be transformed. - use: {loader: "babel-loader"}, // Babel loader to transpile modern JavaScript. - exclude: [ - /(node_modules|bower_components)/, - ]// JavaScript files to be ignored. - } - ] - }, - resolve: { - extensions: ['.js', '.jsx'] + ...defaultOutput, + filename: "settings-general.js" }, externals: { - "react": "React", - "react-dom": "ReactDOM", - "&wp": "wp", - "@wordpress/element": "wp.element", - "@wordpress/components": "wp.components", - "@wordpress/data": "wp.data", - "@wordpress/plugins": "wp.plugins", - "@wordpress/hooks": "wp.hooks", - "@wordpress/url": "wp.url", - "&config.settings-post-types": "publishpressFutureSettingsConfig" + ...defaultExternals, + "&config.settings-general": "publishpressFutureSettingsGeneralConfig" } }, { + ...defaultExports, entry: glob.sync( "./assets/jsx/block-editor.jsx", ), - devtool: 'source-map', output: { - path: path.join(__dirname, "assets", "js"), + ...defaultOutput, filename: "block-editor.js" }, - resolve: { - extensions: ['.jsx', '.js'] - }, - module: { - rules: [ - { - test: /\.(jsx)$/, // Identifies which file or files should be transformed. - use: {loader: "babel-loader"}, // Babel loader to transpile modern JavaScript. - exclude: [ - /(node_modules|bower_components)/, - ]// JavaScript files to be ignored. - } - ] - }, externals: { - "react": "React", - "react-dom": "ReactDOM", - "&wp": "wp", - "@wordpress/element": "wp.element", - "@wordpress/components": "wp.components", - "@wordpress/data": "wp.data", - "@wordpress/plugins": "wp.plugins", - "@wordpress/hooks": "wp.hooks", + ...defaultExternals, "&window": "window", - "@wordpress/url": "wp.url", "&config.block-editor": "publishpressFutureBlockEditorConfig" } }, { + ...defaultExports, entry: glob.sync( "./assets/jsx/classic-editor.jsx", ), - devtool: 'source-map', output: { - path: path.join(__dirname, "assets", "js"), + ...defaultOutput, filename: "classic-editor.js" }, - resolve: { - extensions: ['.jsx', '.js'] - }, - module: { - rules: [ - { - test: /\.(jsx)$/, // Identifies which file or files should be transformed. - use: {loader: "babel-loader"}, // Babel loader to transpile modern JavaScript. - exclude: [ - /(node_modules|bower_components)/, - ]// JavaScript files to be ignored. - } - ] - }, externals: { - "react": "React", - "react-dom": "ReactDOM", - "&wp": "wp", - "@wordpress/element": "wp.element", - "@wordpress/components": "wp.components", - "@wordpress/data": "wp.data", - "@wordpress/plugins": "wp.plugins", - "@wordpress/hooks": "wp.hooks", - "@wordpress/url": "wp.url", + ...defaultExternals, "&config.classic-editor": "publishpressFutureClassicEditorConfig" } }, { + ...defaultExports, entry: glob.sync( "./assets/jsx/quick-edit.jsx", ), - devtool: 'source-map', output: { - path: path.join(__dirname, "assets", "js"), + ...defaultOutput, filename: "quick-edit.js" }, - resolve: { - extensions: ['.jsx', '.js'] - }, - module: { - rules: [ - { - test: /\.(jsx)$/, // Identifies which file or files should be transformed. - use: {loader: "babel-loader"}, // Babel loader to transpile modern JavaScript. - exclude: [ - /(node_modules|bower_components)/, - ]// JavaScript files to be ignored. - } - ] - }, externals: { - "react": "React", - "react-dom": "ReactDOM", - "&wp": "wp", - "@wordpress/element": "wp.element", - "@wordpress/components": "wp.components", - "@wordpress/data": "wp.data", - "@wordpress/plugins": "wp.plugins", - "@wordpress/hooks": "wp.hooks", + ...defaultExternals, "&config.quick-edit": "publishpressFutureQuickEditConfig", "&window": "window", - "@wordpress/url": "wp.url" } }, { + ...defaultExports, entry: glob.sync( "./assets/jsx/bulk-edit.jsx", ), - devtool: 'source-map', output: { - path: path.join(__dirname, "assets", "js"), + ...defaultOutput, filename: "bulk-edit.js" }, - resolve: { - extensions: ['.jsx', '.js'] - }, - module: { - rules: [ - { - test: /\.(jsx)$/, // Identifies which file or files should be transformed. - use: {loader: "babel-loader"}, // Babel loader to transpile modern JavaScript. - exclude: [ - /(node_modules|bower_components)/, - ]// JavaScript files to be ignored. - } - ] - }, externals: { - "react": "React", - "react-dom": "ReactDOM", - "&wp": "wp", - "@wordpress/element": "wp.element", - "@wordpress/components": "wp.components", - "@wordpress/data": "wp.data", - '@wordpress/plugins': 'wp.plugins', - "@wordpress/hooks": "wp.hooks", + ...defaultExternals, "&config.bulk-edit": "publishpressFutureBulkEditConfig", "&window": "window", - "@wordpress/url": "wp.url" } } ]; diff --git a/yarn.lock b/yarn.lock index 496ddfb95..04b049211 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4975,6 +4975,16 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1, cosmiconfig@^7.1.0: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^8.3.5: + version "8.3.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== + dependencies: + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + path-type "^4.0.0" + cross-fetch@3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" @@ -5029,6 +5039,20 @@ css-loader@^6.2.0: postcss-value-parser "^4.2.0" semver "^7.3.8" +css-loader@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.2.tgz#64671541c6efe06b0e22e750503106bdd86880f8" + integrity sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA== + dependencies: + icss-utils "^5.1.0" + postcss "^8.4.33" + postcss-modules-extract-imports "^3.1.0" + postcss-modules-local-by-default "^4.0.5" + postcss-modules-scope "^3.2.0" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.2.0" + semver "^7.5.4" + css-select@^4.1.3: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" @@ -7000,7 +7024,7 @@ immutable@^4.0.0: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -8022,6 +8046,11 @@ jest@^27.4.5: import-local "^3.0.2" jest-cli "^27.5.1" +jiti@^1.20.0: + version "1.21.6" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" + integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== + joi@^17.6.0: version "17.9.1" resolved "https://registry.yarnpkg.com/joi/-/joi-17.9.1.tgz#74899b9fa3646904afa984a11df648eca66c9018" @@ -8808,6 +8837,11 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -9516,6 +9550,15 @@ postcss-loader@^6.2.1: klona "^2.0.5" semver "^7.3.5" +postcss-loader@^7: + version "7.3.4" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.3.4.tgz#aed9b79ce4ed7e9e89e56199d25ad1ec8f606209" + integrity sha512-iW5WTTBSC5BfsBJ9daFMPVrLT36MrNiC6fqOZTTaHjBNX6Pfd5p+hSBqe/fEeNd7pc13QiAyGt7VdGMw4eRC4A== + dependencies: + cosmiconfig "^8.3.5" + jiti "^1.20.0" + semver "^7.5.4" + postcss-media-query-parser@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" @@ -9576,6 +9619,11 @@ postcss-modules-extract-imports@^3.0.0: resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== +postcss-modules-extract-imports@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" + integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== + postcss-modules-local-by-default@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" @@ -9585,6 +9633,15 @@ postcss-modules-local-by-default@^4.0.0: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" +postcss-modules-local-by-default@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" + integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== + dependencies: + icss-utils "^5.0.0" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.1.0" + postcss-modules-scope@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" @@ -9592,6 +9649,13 @@ postcss-modules-scope@^3.0.0: dependencies: postcss-selector-parser "^6.0.4" +postcss-modules-scope@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" + integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== + dependencies: + postcss-selector-parser "^6.0.4" + postcss-modules-values@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" @@ -9737,6 +9801,15 @@ postcss@^8.4.19, postcss@^8.4.5: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.33: + version "8.4.41" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681" + integrity sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.1" + source-map-js "^1.2.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -10454,6 +10527,11 @@ semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -10691,6 +10769,11 @@ sockjs@^0.3.24: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + source-map-loader@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-3.0.2.tgz#af23192f9b344daa729f6772933194cc5fa54fee" @@ -11045,6 +11128,11 @@ strip-outer@^1.0.1: dependencies: escape-string-regexp "^1.0.2" +style-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-4.0.0.tgz#0ea96e468f43c69600011e0589cb05c44f3b17a5" + integrity sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA== + style-search@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"