Plugin Directory

Changeset 3311889


Ignore:
Timestamp:
06/15/2025 12:51:49 PM (10 months ago)
Author:
xssdevelopment
Message:

compress-pdf update version number

Location:
compress-pdf
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • compress-pdf/tags/1.0.2/trunk/build/block.json

    r3260510 r3311889  
    33  "apiVersion": 3,
    44  "name": "create-block/compress-pdf",
    5   "version": "1.0.1",
     5  "version": "1.0.2",
    66  "title": "Compress Pdf",
    77  "category": "widgets",
  • compress-pdf/tags/1.0.2/trunk/build/index.asset.php

    r3260510 r3311889  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'dcc95b81d99127b77099');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '8e5ba646f58c108a27c1');
  • compress-pdf/tags/1.0.2/trunk/build/index.js

    r3260510 r3311889  
    1 (()=>{"use strict";var e,i={354:()=>{const e=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,l=window.ReactJSXRuntime,t=(0,i.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#E5DBFF"}),(0,i.createElement)("path",{d:"M15.2597 24.2785V21.9081L14.0745 23.0933L13.0374 22.0563L16.0005 19.0932L18.9637 22.0563L17.9266 23.0933L16.7413 21.9451V24.2785H15.2597ZM10.0742 18.3525V16.871H21.9269V18.3525H10.0742ZM10.0742 16.1302V14.6487H21.9269V16.1302H10.0742ZM16.0005 13.9079L13.0374 10.9449L14.0745 9.90787L15.2597 11.0931V8.72266H16.7413V11.0931L17.9266 9.90787L18.9637 10.9449L16.0005 13.9079Z",fill:"#5A3BB2"})),r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/compress-pdf","version":"1.0.1","title":"Compress Pdf","category":"widgets","description":"Effortlessly reduce the size of your PDF files while maintaining quality, making them easier to store, share, and upload without sacrificing readability.","example":{},"supports":{"html":false},"textdomain":"compress-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');(0,e.registerBlockType)(r,{icon:t,edit:function(){const e=(0,i.useRef)(null),t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{[e,t].forEach((e=>{const i=e.current;if(i&&!i.isInitialized){i.isInitialized=!0;const e=i.getAttribute("min"),s=i.getAttribute("max"),l=i.value;ionRangeSlider(i,{min:e,max:s,from:l,step:1,grid:!0,grid_num:5,disable:!0})}}))}),[]),(0,i.createElement)("div",null,(0,l.jsx)("div",{className:"solution__compress-pdf",children:(0,l.jsx)("div",{className:"solution__container__wrapper",children:(0,l.jsxs)("div",{className:"solution__container",children:[(0,l.jsx)("div",{className:"solution__header",children:(0,s.__)("Compress PDF","compress-pdf")}),(0,l.jsxs)("div",{className:"solution__form",children:[(0,l.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("File:","compress-pdf")}),(0,l.jsx)("input",{type:"file",id:"file",name:"file",className:"solution__file-input",required:!0,disabled:!0})]}),(0,l.jsxs)("label",{htmlFor:"dpi",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("DPI:","compress-pdf")}),(0,l.jsx)("input",{ref:e,type:"number",id:"dpi",name:"dpi",className:"solution__input solution__range-linked",max:300,min:72,value:144,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Dots per inch from 72 to 300. Smaller value reduces size of PDF File but also quality.","compress-pdf")})]}),(0,l.jsxs)("label",{htmlFor:"image-quality",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("Image Quality:","compress-pdf")}),(0,l.jsx)("input",{ref:t,type:"number",id:"image-quality",name:"image-quality",className:"solution__input .solution__range-linked",max:100,min:0,value:75,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Values in % from 0 to 100. Smaller value reduces size of PDF File but also the quality.","compress-pdf")})]}),(0,l.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,s.__)("Submit","compress-pdf")})]})]})})}))}})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,e=[],l.O=(i,s,t,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){s=e[c][0],t=e[c][1],r=e[c][2];for(var a=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(l.O).every((e=>l.O[e](s[o])))?s.splice(o--,1):(a=!1,r<n&&(n=r));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,t,r]},l.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={57:0,350:0};l.O.j=i=>0===e[i];var i=(i,s)=>{var t,r,n=s[0],a=s[1],o=s[2],d=0;if(n.some((i=>0!==e[i]))){for(t in a)l.o(a,t)&&(l.m[t]=a[t]);if(o)var c=o(l)}for(i&&i(s);d<n.length;d++)r=n[d],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(c)},s=self.webpackChunk=self.webpackChunk||[];s.forEach(i.bind(null,0)),s.push=i.bind(null,s.push.bind(s))})();var t=l.O(void 0,[350],(()=>l(354)));t=l.O(t)})();
     1(()=>{"use strict";var e,i={354:()=>{const e=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,l=window.ReactJSXRuntime,t=(0,i.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#E5DBFF"}),(0,i.createElement)("path",{d:"M15.2597 24.2785V21.9081L14.0745 23.0933L13.0374 22.0563L16.0005 19.0932L18.9637 22.0563L17.9266 23.0933L16.7413 21.9451V24.2785H15.2597ZM10.0742 18.3525V16.871H21.9269V18.3525H10.0742ZM10.0742 16.1302V14.6487H21.9269V16.1302H10.0742ZM16.0005 13.9079L13.0374 10.9449L14.0745 9.90787L15.2597 11.0931V8.72266H16.7413V11.0931L17.9266 9.90787L18.9637 10.9449L16.0005 13.9079Z",fill:"#5A3BB2"})),r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/compress-pdf","version":"1.0.2","title":"Compress Pdf","category":"widgets","description":"Effortlessly reduce the size of your PDF files while maintaining quality, making them easier to store, share, and upload without sacrificing readability.","example":{},"supports":{"html":false},"textdomain":"compress-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');(0,e.registerBlockType)(r,{icon:t,edit:function(){const e=(0,i.useRef)(null),t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{[e,t].forEach((e=>{const i=e.current;if(i&&!i.isInitialized){i.isInitialized=!0;const e=i.getAttribute("min"),s=i.getAttribute("max"),l=i.value;ionRangeSlider(i,{min:e,max:s,from:l,step:1,grid:!0,grid_num:5,disable:!0})}}))}),[]),(0,i.createElement)("div",null,(0,l.jsx)("div",{className:"solution__compress-pdf",children:(0,l.jsx)("div",{className:"solution__container__wrapper",children:(0,l.jsxs)("div",{className:"solution__container",children:[(0,l.jsx)("div",{className:"solution__header",children:(0,s.__)("Compress PDF","compress-pdf")}),(0,l.jsxs)("div",{className:"solution__form",children:[(0,l.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("File:","compress-pdf")}),(0,l.jsx)("input",{type:"file",id:"file",name:"file",className:"solution__file-input",required:!0,disabled:!0})]}),(0,l.jsxs)("label",{htmlFor:"dpi",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("DPI:","compress-pdf")}),(0,l.jsx)("input",{ref:e,type:"number",id:"dpi",name:"dpi",className:"solution__input solution__range-linked",max:300,min:72,value:144,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Dots per inch from 72 to 300. Smaller value reduces size of PDF File but also quality.","compress-pdf")})]}),(0,l.jsxs)("label",{htmlFor:"image-quality",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("Image Quality:","compress-pdf")}),(0,l.jsx)("input",{ref:t,type:"number",id:"image-quality",name:"image-quality",className:"solution__input .solution__range-linked",max:100,min:0,value:75,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Values in % from 0 to 100. Smaller value reduces size of PDF File but also the quality.","compress-pdf")})]}),(0,l.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,s.__)("Submit","compress-pdf")})]})]})})}))}})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,e=[],l.O=(i,s,t,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){s=e[c][0],t=e[c][1],r=e[c][2];for(var a=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(l.O).every((e=>l.O[e](s[o])))?s.splice(o--,1):(a=!1,r<n&&(n=r));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,t,r]},l.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={57:0,350:0};l.O.j=i=>0===e[i];var i=(i,s)=>{var t,r,n=s[0],a=s[1],o=s[2],d=0;if(n.some((i=>0!==e[i]))){for(t in a)l.o(a,t)&&(l.m[t]=a[t]);if(o)var c=o(l)}for(i&&i(s);d<n.length;d++)r=n[d],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(c)},s=self.webpackChunk=self.webpackChunk||[];s.forEach(i.bind(null,0)),s.push=i.bind(null,s.push.bind(s))})();var t=l.O(void 0,[350],(()=>l(354)));t=l.O(t)})();
  • compress-pdf/tags/1.0.2/trunk/build/view.asset.php

    r3260510 r3311889  
    1 <?php return array('dependencies' => array(), 'version' => '51de7ef2e55ac9559d9a');
     1<?php return array('dependencies' => array(), 'version' => '6cfafcf4b96f3554df35');
  • compress-pdf/tags/1.0.2/trunk/build/view.js

    r3260510 r3311889  
    1 document.querySelectorAll(".solution__compress-pdf .solution__form").forEach((e=>{e.addEventListener("submit",(function(t){t.preventDefault();const n=e.getAttribute("id"),o=e.querySelector('[name="file"]'),d=e.querySelector('[name="dpi"]'),s=e.querySelector('[name="image-quality"]'),l=document.getElementById(`loadingSection_${n}`),i=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",l.style.display="flex",i.style.display="none",r.style.display="none";const c=new FormData;Array.from(o.files).forEach(((e,t)=>{c.append(`file[${t}]`,e)})),c.append("dpi",d.value),c.append("imageQuality",s.value),c.append("compressPDFFormNonce",wpApiSettingsCompressPDF.compressPDFNonce),fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/send-data`,{method:"POST",body:c}).then((e=>e.json())).then((e=>{e.id?function(e,t){const n=document.getElementById(`loadingSection_${t}`),o=document.getElementById(`errorSection_${t}`),d=document.getElementById(`resultMessage_${t}`),s=document.getElementById(`downloadSection_${t}`),l=document.getElementById(`downloadFilesContainer_${t}`);!function t(){fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/status/${e}`,{method:"GET",headers:{"X-WP-Nonce":wpApiSettingsCompressPDF.compressPDFNonce,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{if("done"===e.status)n.style.display="none",l.innerHTML="",e.output&&e.output.files&&e.output.files.length>0?(e.output.files.forEach((e=>{const t=document.createElement("button");t.type="button",t.className="solution__btn",t.innerHTML=`\n                                <div class="dashicons dashicons-download"></div>\n                                <span class="solution__download-file-name">${e.name}</span>\n                            `,t.addEventListener("click",(t=>{t.preventDefault();const n=document.createElement("a");n.href=e.path,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}));const n=document.createElement("div");n.className="solution__download-file-container",n.appendChild(t),l.appendChild(n)})),s.style.display="flex"):(o.style.display="flex",d.innerText="No files available for download.");else{if("error"===e.status)throw new Error("Processing failed: "+e.message);setTimeout(t,500)}})).catch((()=>{n.style.display="none",o.style.display="flex",d.innerText="An unexpected error occurred. Please try again."}))}()}(e.id,n):(l.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{l.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again."}))}));const t=document.getElementById(`restartDownloadBtn_${e.id}`),n=document.getElementById(`restartErrorBtn_${e.id}`);function o(){e.reset(),e.style.display="flex",document.getElementById(`loadingSection_${e.id}`).style.display="none",document.getElementById(`downloadSection_${e.id}`).style.display="none",document.getElementById(`errorSection_${e.id}`).style.display="none"}t&&t.addEventListener("click",o),n&&n.addEventListener("click",o)})),document.querySelectorAll(".solution__compress-pdf .solution__range-linked").forEach((e=>{const t=e.getAttribute("min"),n=e.getAttribute("max"),o=e.value;ionRangeSlider(e,{min:t,max:n,from:o,step:1,grid:!0,grid_num:5})}));
     1document.querySelectorAll(".solution__compress-pdf .solution__form").forEach((e=>{e.addEventListener("submit",(function(t){t.preventDefault();const n=e.getAttribute("id"),o=e.querySelector('[name="file"]'),d=e.querySelector('[name="dpi"]'),l=e.querySelector('[name="image-quality"]'),s=document.getElementById(`loadingSection_${n}`),i=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",s.style.display="flex",i.style.display="none",r.style.display="none";const c=new FormData;Array.from(o.files).forEach(((e,t)=>{c.append(`file[${t}]`,e)})),c.append("dpi",d.value),c.append("imageQuality",l.value),c.append("compressPDFFormNonce",wpApiSettingsCompressPDF.compressPDFNonce),fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/send-data`,{method:"POST",body:c}).then((e=>e.json())).then((e=>{e.id?function(e,t){const n=document.getElementById(`loadingSection_${t}`),o=document.getElementById(`errorSection_${t}`),d=document.getElementById(`resultMessage_${t}`),l=document.getElementById(`downloadSection_${t}`),s=document.getElementById(`downloadFilesContainer_${t}`);!function t(){fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/status/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{if("done"===e.status)n.style.display="none",s.innerHTML="",e.output&&e.output.files&&e.output.files.length>0?(e.output.files.forEach((e=>{const t=document.createElement("button");t.type="button",t.className="solution__btn",t.innerHTML=`\n                                <div class="dashicons dashicons-download"></div>\n                                <span class="solution__download-file-name">${e.name}</span>\n                            `,t.addEventListener("click",(t=>{t.preventDefault();const n=document.createElement("a");n.href=e.path,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}));const n=document.createElement("div");n.className="solution__download-file-container",n.appendChild(t),s.appendChild(n)})),l.style.display="flex"):(o.style.display="flex",d.innerText="No files available for download.");else{if("error"===e.status)throw new Error("Processing failed: "+e.message);setTimeout(t,500)}})).catch((()=>{n.style.display="none",o.style.display="flex",d.innerText="An unexpected error occurred. Please try again."}))}()}(e.id,n):(s.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{s.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again."}))}));const t=document.getElementById(`restartDownloadBtn_${e.id}`),n=document.getElementById(`restartErrorBtn_${e.id}`);function o(){e.reset(),e.style.display="flex",document.getElementById(`loadingSection_${e.id}`).style.display="none",document.getElementById(`downloadSection_${e.id}`).style.display="none",document.getElementById(`errorSection_${e.id}`).style.display="none"}t&&t.addEventListener("click",o),n&&n.addEventListener("click",o)})),document.querySelectorAll(".solution__compress-pdf .solution__range-linked").forEach((e=>{const t=e.getAttribute("min"),n=e.getAttribute("max"),o=e.value;ionRangeSlider(e,{min:t,max:n,from:o,step:1,grid:!0,grid_num:5})}));
  • compress-pdf/tags/1.0.2/trunk/compress-pdf.php

    r3260510 r3311889  
    55 * Requires at least: 6.6
    66 * Requires PHP:      7.2
    7  * Version:           1.0.1
     7 * Version:           1.0.2
    88 * Author:            Cross Service Solutions
    99 * License:           GPL-2.0-or-later
  • compress-pdf/tags/1.0.2/trunk/languages/compress-pdf.pot

    r3260510 r3311889  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Compress PDF 1.0.1\n"
     5"Project-Id-Version: Compress PDF 1.0.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/compress-pdf\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • compress-pdf/tags/1.0.2/trunk/readme.txt

    r3311876 r3311889  
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.2
    99License: GPLv2 or later
  • compress-pdf/tags/1.0.2/trunk/src/block.json

    r3260510 r3311889  
    33    "apiVersion": 3,
    44    "name": "create-block/compress-pdf",
    5     "version": "1.0.1",
     5    "version": "1.0.2",
    66    "title": "Compress Pdf",
    77    "category": "widgets",
  • compress-pdf/tags/1.0.2/trunk/src/view.js

    r3260510 r3311889  
    114114            method: 'GET',
    115115            headers: {
    116                 'X-WP-Nonce': wpApiSettingsCompressPDF.compressPDFNonce,
     116                // 'X-WP-Nonce': wpApiSettingsCompressPDF.compressPDFNonce,
    117117                'Content-Type': 'application/json'
    118118            }
  • compress-pdf/trunk/build/block.json

    r3260510 r3311889  
    33  "apiVersion": 3,
    44  "name": "create-block/compress-pdf",
    5   "version": "1.0.1",
     5  "version": "1.0.2",
    66  "title": "Compress Pdf",
    77  "category": "widgets",
  • compress-pdf/trunk/build/index.asset.php

    r3260510 r3311889  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'dcc95b81d99127b77099');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '8e5ba646f58c108a27c1');
  • compress-pdf/trunk/build/index.js

    r3260510 r3311889  
    1 (()=>{"use strict";var e,i={354:()=>{const e=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,l=window.ReactJSXRuntime,t=(0,i.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#E5DBFF"}),(0,i.createElement)("path",{d:"M15.2597 24.2785V21.9081L14.0745 23.0933L13.0374 22.0563L16.0005 19.0932L18.9637 22.0563L17.9266 23.0933L16.7413 21.9451V24.2785H15.2597ZM10.0742 18.3525V16.871H21.9269V18.3525H10.0742ZM10.0742 16.1302V14.6487H21.9269V16.1302H10.0742ZM16.0005 13.9079L13.0374 10.9449L14.0745 9.90787L15.2597 11.0931V8.72266H16.7413V11.0931L17.9266 9.90787L18.9637 10.9449L16.0005 13.9079Z",fill:"#5A3BB2"})),r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/compress-pdf","version":"1.0.1","title":"Compress Pdf","category":"widgets","description":"Effortlessly reduce the size of your PDF files while maintaining quality, making them easier to store, share, and upload without sacrificing readability.","example":{},"supports":{"html":false},"textdomain":"compress-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');(0,e.registerBlockType)(r,{icon:t,edit:function(){const e=(0,i.useRef)(null),t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{[e,t].forEach((e=>{const i=e.current;if(i&&!i.isInitialized){i.isInitialized=!0;const e=i.getAttribute("min"),s=i.getAttribute("max"),l=i.value;ionRangeSlider(i,{min:e,max:s,from:l,step:1,grid:!0,grid_num:5,disable:!0})}}))}),[]),(0,i.createElement)("div",null,(0,l.jsx)("div",{className:"solution__compress-pdf",children:(0,l.jsx)("div",{className:"solution__container__wrapper",children:(0,l.jsxs)("div",{className:"solution__container",children:[(0,l.jsx)("div",{className:"solution__header",children:(0,s.__)("Compress PDF","compress-pdf")}),(0,l.jsxs)("div",{className:"solution__form",children:[(0,l.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("File:","compress-pdf")}),(0,l.jsx)("input",{type:"file",id:"file",name:"file",className:"solution__file-input",required:!0,disabled:!0})]}),(0,l.jsxs)("label",{htmlFor:"dpi",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("DPI:","compress-pdf")}),(0,l.jsx)("input",{ref:e,type:"number",id:"dpi",name:"dpi",className:"solution__input solution__range-linked",max:300,min:72,value:144,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Dots per inch from 72 to 300. Smaller value reduces size of PDF File but also quality.","compress-pdf")})]}),(0,l.jsxs)("label",{htmlFor:"image-quality",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("Image Quality:","compress-pdf")}),(0,l.jsx)("input",{ref:t,type:"number",id:"image-quality",name:"image-quality",className:"solution__input .solution__range-linked",max:100,min:0,value:75,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Values in % from 0 to 100. Smaller value reduces size of PDF File but also the quality.","compress-pdf")})]}),(0,l.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,s.__)("Submit","compress-pdf")})]})]})})}))}})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,e=[],l.O=(i,s,t,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){s=e[c][0],t=e[c][1],r=e[c][2];for(var a=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(l.O).every((e=>l.O[e](s[o])))?s.splice(o--,1):(a=!1,r<n&&(n=r));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,t,r]},l.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={57:0,350:0};l.O.j=i=>0===e[i];var i=(i,s)=>{var t,r,n=s[0],a=s[1],o=s[2],d=0;if(n.some((i=>0!==e[i]))){for(t in a)l.o(a,t)&&(l.m[t]=a[t]);if(o)var c=o(l)}for(i&&i(s);d<n.length;d++)r=n[d],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(c)},s=self.webpackChunk=self.webpackChunk||[];s.forEach(i.bind(null,0)),s.push=i.bind(null,s.push.bind(s))})();var t=l.O(void 0,[350],(()=>l(354)));t=l.O(t)})();
     1(()=>{"use strict";var e,i={354:()=>{const e=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,l=window.ReactJSXRuntime,t=(0,i.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#E5DBFF"}),(0,i.createElement)("path",{d:"M15.2597 24.2785V21.9081L14.0745 23.0933L13.0374 22.0563L16.0005 19.0932L18.9637 22.0563L17.9266 23.0933L16.7413 21.9451V24.2785H15.2597ZM10.0742 18.3525V16.871H21.9269V18.3525H10.0742ZM10.0742 16.1302V14.6487H21.9269V16.1302H10.0742ZM16.0005 13.9079L13.0374 10.9449L14.0745 9.90787L15.2597 11.0931V8.72266H16.7413V11.0931L17.9266 9.90787L18.9637 10.9449L16.0005 13.9079Z",fill:"#5A3BB2"})),r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/compress-pdf","version":"1.0.2","title":"Compress Pdf","category":"widgets","description":"Effortlessly reduce the size of your PDF files while maintaining quality, making them easier to store, share, and upload without sacrificing readability.","example":{},"supports":{"html":false},"textdomain":"compress-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');(0,e.registerBlockType)(r,{icon:t,edit:function(){const e=(0,i.useRef)(null),t=(0,i.useRef)(null);return(0,i.useEffect)((()=>{[e,t].forEach((e=>{const i=e.current;if(i&&!i.isInitialized){i.isInitialized=!0;const e=i.getAttribute("min"),s=i.getAttribute("max"),l=i.value;ionRangeSlider(i,{min:e,max:s,from:l,step:1,grid:!0,grid_num:5,disable:!0})}}))}),[]),(0,i.createElement)("div",null,(0,l.jsx)("div",{className:"solution__compress-pdf",children:(0,l.jsx)("div",{className:"solution__container__wrapper",children:(0,l.jsxs)("div",{className:"solution__container",children:[(0,l.jsx)("div",{className:"solution__header",children:(0,s.__)("Compress PDF","compress-pdf")}),(0,l.jsxs)("div",{className:"solution__form",children:[(0,l.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("File:","compress-pdf")}),(0,l.jsx)("input",{type:"file",id:"file",name:"file",className:"solution__file-input",required:!0,disabled:!0})]}),(0,l.jsxs)("label",{htmlFor:"dpi",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("DPI:","compress-pdf")}),(0,l.jsx)("input",{ref:e,type:"number",id:"dpi",name:"dpi",className:"solution__input solution__range-linked",max:300,min:72,value:144,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Dots per inch from 72 to 300. Smaller value reduces size of PDF File but also quality.","compress-pdf")})]}),(0,l.jsxs)("label",{htmlFor:"image-quality",className:"solution__label",children:[(0,l.jsx)("span",{children:(0,s.__)("Image Quality:","compress-pdf")}),(0,l.jsx)("input",{ref:t,type:"number",id:"image-quality",name:"image-quality",className:"solution__input .solution__range-linked",max:100,min:0,value:75,required:!0,disabled:!0}),(0,l.jsx)("span",{className:"solution__hint",children:(0,s.__)("Values in % from 0 to 100. Smaller value reduces size of PDF File but also the quality.","compress-pdf")})]}),(0,l.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,s.__)("Submit","compress-pdf")})]})]})})}))}})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,e=[],l.O=(i,s,t,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){s=e[c][0],t=e[c][1],r=e[c][2];for(var a=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(l.O).every((e=>l.O[e](s[o])))?s.splice(o--,1):(a=!1,r<n&&(n=r));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,t,r]},l.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={57:0,350:0};l.O.j=i=>0===e[i];var i=(i,s)=>{var t,r,n=s[0],a=s[1],o=s[2],d=0;if(n.some((i=>0!==e[i]))){for(t in a)l.o(a,t)&&(l.m[t]=a[t]);if(o)var c=o(l)}for(i&&i(s);d<n.length;d++)r=n[d],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(c)},s=self.webpackChunk=self.webpackChunk||[];s.forEach(i.bind(null,0)),s.push=i.bind(null,s.push.bind(s))})();var t=l.O(void 0,[350],(()=>l(354)));t=l.O(t)})();
  • compress-pdf/trunk/build/view.asset.php

    r3260510 r3311889  
    1 <?php return array('dependencies' => array(), 'version' => '51de7ef2e55ac9559d9a');
     1<?php return array('dependencies' => array(), 'version' => '6cfafcf4b96f3554df35');
  • compress-pdf/trunk/build/view.js

    r3260510 r3311889  
    1 document.querySelectorAll(".solution__compress-pdf .solution__form").forEach((e=>{e.addEventListener("submit",(function(t){t.preventDefault();const n=e.getAttribute("id"),o=e.querySelector('[name="file"]'),d=e.querySelector('[name="dpi"]'),s=e.querySelector('[name="image-quality"]'),l=document.getElementById(`loadingSection_${n}`),i=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",l.style.display="flex",i.style.display="none",r.style.display="none";const c=new FormData;Array.from(o.files).forEach(((e,t)=>{c.append(`file[${t}]`,e)})),c.append("dpi",d.value),c.append("imageQuality",s.value),c.append("compressPDFFormNonce",wpApiSettingsCompressPDF.compressPDFNonce),fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/send-data`,{method:"POST",body:c}).then((e=>e.json())).then((e=>{e.id?function(e,t){const n=document.getElementById(`loadingSection_${t}`),o=document.getElementById(`errorSection_${t}`),d=document.getElementById(`resultMessage_${t}`),s=document.getElementById(`downloadSection_${t}`),l=document.getElementById(`downloadFilesContainer_${t}`);!function t(){fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/status/${e}`,{method:"GET",headers:{"X-WP-Nonce":wpApiSettingsCompressPDF.compressPDFNonce,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{if("done"===e.status)n.style.display="none",l.innerHTML="",e.output&&e.output.files&&e.output.files.length>0?(e.output.files.forEach((e=>{const t=document.createElement("button");t.type="button",t.className="solution__btn",t.innerHTML=`\n                                <div class="dashicons dashicons-download"></div>\n                                <span class="solution__download-file-name">${e.name}</span>\n                            `,t.addEventListener("click",(t=>{t.preventDefault();const n=document.createElement("a");n.href=e.path,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}));const n=document.createElement("div");n.className="solution__download-file-container",n.appendChild(t),l.appendChild(n)})),s.style.display="flex"):(o.style.display="flex",d.innerText="No files available for download.");else{if("error"===e.status)throw new Error("Processing failed: "+e.message);setTimeout(t,500)}})).catch((()=>{n.style.display="none",o.style.display="flex",d.innerText="An unexpected error occurred. Please try again."}))}()}(e.id,n):(l.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{l.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again."}))}));const t=document.getElementById(`restartDownloadBtn_${e.id}`),n=document.getElementById(`restartErrorBtn_${e.id}`);function o(){e.reset(),e.style.display="flex",document.getElementById(`loadingSection_${e.id}`).style.display="none",document.getElementById(`downloadSection_${e.id}`).style.display="none",document.getElementById(`errorSection_${e.id}`).style.display="none"}t&&t.addEventListener("click",o),n&&n.addEventListener("click",o)})),document.querySelectorAll(".solution__compress-pdf .solution__range-linked").forEach((e=>{const t=e.getAttribute("min"),n=e.getAttribute("max"),o=e.value;ionRangeSlider(e,{min:t,max:n,from:o,step:1,grid:!0,grid_num:5})}));
     1document.querySelectorAll(".solution__compress-pdf .solution__form").forEach((e=>{e.addEventListener("submit",(function(t){t.preventDefault();const n=e.getAttribute("id"),o=e.querySelector('[name="file"]'),d=e.querySelector('[name="dpi"]'),l=e.querySelector('[name="image-quality"]'),s=document.getElementById(`loadingSection_${n}`),i=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",s.style.display="flex",i.style.display="none",r.style.display="none";const c=new FormData;Array.from(o.files).forEach(((e,t)=>{c.append(`file[${t}]`,e)})),c.append("dpi",d.value),c.append("imageQuality",l.value),c.append("compressPDFFormNonce",wpApiSettingsCompressPDF.compressPDFNonce),fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/send-data`,{method:"POST",body:c}).then((e=>e.json())).then((e=>{e.id?function(e,t){const n=document.getElementById(`loadingSection_${t}`),o=document.getElementById(`errorSection_${t}`),d=document.getElementById(`resultMessage_${t}`),l=document.getElementById(`downloadSection_${t}`),s=document.getElementById(`downloadFilesContainer_${t}`);!function t(){fetch(`${wpApiSettingsCompressPDF.root}compress-pdf/v1/status/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{if("done"===e.status)n.style.display="none",s.innerHTML="",e.output&&e.output.files&&e.output.files.length>0?(e.output.files.forEach((e=>{const t=document.createElement("button");t.type="button",t.className="solution__btn",t.innerHTML=`\n                                <div class="dashicons dashicons-download"></div>\n                                <span class="solution__download-file-name">${e.name}</span>\n                            `,t.addEventListener("click",(t=>{t.preventDefault();const n=document.createElement("a");n.href=e.path,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}));const n=document.createElement("div");n.className="solution__download-file-container",n.appendChild(t),s.appendChild(n)})),l.style.display="flex"):(o.style.display="flex",d.innerText="No files available for download.");else{if("error"===e.status)throw new Error("Processing failed: "+e.message);setTimeout(t,500)}})).catch((()=>{n.style.display="none",o.style.display="flex",d.innerText="An unexpected error occurred. Please try again."}))}()}(e.id,n):(s.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{s.style.display="none",i.style.display="flex",a.innerText="An unexpected error occurred. Please try again."}))}));const t=document.getElementById(`restartDownloadBtn_${e.id}`),n=document.getElementById(`restartErrorBtn_${e.id}`);function o(){e.reset(),e.style.display="flex",document.getElementById(`loadingSection_${e.id}`).style.display="none",document.getElementById(`downloadSection_${e.id}`).style.display="none",document.getElementById(`errorSection_${e.id}`).style.display="none"}t&&t.addEventListener("click",o),n&&n.addEventListener("click",o)})),document.querySelectorAll(".solution__compress-pdf .solution__range-linked").forEach((e=>{const t=e.getAttribute("min"),n=e.getAttribute("max"),o=e.value;ionRangeSlider(e,{min:t,max:n,from:o,step:1,grid:!0,grid_num:5})}));
  • compress-pdf/trunk/compress-pdf.php

    r3260510 r3311889  
    55 * Requires at least: 6.6
    66 * Requires PHP:      7.2
    7  * Version:           1.0.1
     7 * Version:           1.0.2
    88 * Author:            Cross Service Solutions
    99 * License:           GPL-2.0-or-later
  • compress-pdf/trunk/languages/compress-pdf.pot

    r3260510 r3311889  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Compress PDF 1.0.1\n"
     5"Project-Id-Version: Compress PDF 1.0.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/compress-pdf\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • compress-pdf/trunk/readme.txt

    r3311876 r3311889  
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.2
    99License: GPLv2 or later
  • compress-pdf/trunk/src/block.json

    r3260510 r3311889  
    33    "apiVersion": 3,
    44    "name": "create-block/compress-pdf",
    5     "version": "1.0.1",
     5    "version": "1.0.2",
    66    "title": "Compress Pdf",
    77    "category": "widgets",
  • compress-pdf/trunk/src/view.js

    r3260510 r3311889  
    114114            method: 'GET',
    115115            headers: {
    116                 'X-WP-Nonce': wpApiSettingsCompressPDF.compressPDFNonce,
     116                // 'X-WP-Nonce': wpApiSettingsCompressPDF.compressPDFNonce,
    117117                'Content-Type': 'application/json'
    118118            }
Note: See TracChangeset for help on using the changeset viewer.