Plugin Directory

Changeset 3260525


Ignore:
Timestamp:
03/24/2025 04:55:36 AM (13 months ago)
Author:
xssdevelopment
Message:

Update pasword-protect-pdf to version 1.0.1

Location:
password-protect-pdf
Files:
8 deleted
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • password-protect-pdf/tags/1.0.1/build/block.json

    r3237558 r3260525  
    33  "apiVersion": 3,
    44  "name": "create-block/password-protect-pdf",
    5   "version": "1.0.0",
     5  "version": "1.0.1",
    66  "title": "Password Protect PDF",
    77  "category": "widgets",
  • password-protect-pdf/tags/1.0.1/build/index-rtl.css

    r3237558 r3260525  
    1 /*!****************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
    3   \****************************************************************************************************************************************************************************************************************************************************/
    4 .solution__password-protect-pdf {
    5   margin: 1rem;
    6 }
     1.solution__password-protect-pdf{margin:1rem}
  • password-protect-pdf/tags/1.0.1/build/index.asset.php

    r3237558 r3260525  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'ffad450162394797c1ec');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'e7b17c84ae730aaa936e');
  • password-protect-pdf/tags/1.0.1/build/index.css

    r3237558 r3260525  
    1 /*!****************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
    3   \****************************************************************************************************************************************************************************************************************************************************/
    4 .solution__password-protect-pdf {
    5   margin: 1rem;
    6 }
    7 
    8 /*# sourceMappingURL=index.css.map*/
     1.solution__password-protect-pdf{margin:1rem}
  • password-protect-pdf/tags/1.0.1/build/index.js

    r3237558 r3260525  
    1 /******/ (() => { // webpackBootstrap
    2 /******/    "use strict";
    3 /******/    var __webpack_modules__ = ({
    4 
    5 /***/ "./src/edit.js":
    6 /*!*********************!*\
    7   !*** ./src/edit.js ***!
    8   \*********************/
    9 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    10 
    11 __webpack_require__.r(__webpack_exports__);
    12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
    13 /* harmony export */   "default": () => (/* binding */ Edit),
    14 /* harmony export */   passwordProtectPDFIcon: () => (/* binding */ passwordProtectPDFIcon)
    15 /* harmony export */ });
    16 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
    17 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
    18 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
    19 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
    20 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
    21 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
    22 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
    23 /**
    24  * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
    25  * Those files can contain any CSS code that gets applied to the editor.
    26  *
    27  * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
    28  */
    29 
    30 
    31 
    32 
    33 function Edit() {
    34   return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('div', null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    35     className: "solution__password-protect-pdf",
    36     children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    37       className: "solution__container__wrapper",
    38       children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
    39         className: "solution__container",
    40         children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    41           className: "solution__header",
    42           children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Password Protect PDF', 'password-protect-pdf')
    43         }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
    44           className: "solution__form",
    45           children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("label", {
    46             htmlFor: "file",
    47             className: "solution__label",
    48             children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
    49               children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('File:', 'password-protect-pdf')
    50             }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
    51               type: "file",
    52               id: "file",
    53               name: "file",
    54               required: true,
    55               className: "solution__file-input",
    56               disabled: true
    57             })]
    58           }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("label", {
    59             htmlFor: "password",
    60             className: "solution__label",
    61             children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
    62               children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Password:', 'password-protect-pdf')
    63             }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
    64               type: "text",
    65               id: "password",
    66               name: "password",
    67               required: true,
    68               className: "solution__input",
    69               disabled: true
    70             })]
    71           }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("button", {
    72             disabled: true,
    73             className: "solution__btn",
    74             children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Submit', 'password-protect-pdf')
    75           })]
    76         })]
    77       })
    78     })
    79   }));
    80 }
    81 const passwordProtectPDFIcon = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('svg', {
    82   width: 32,
    83   height: 33,
    84   viewBox: "0 0 32 33",
    85   fill: "none",
    86   xmlns: "http://www.w3.org/2000/svg"
    87 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('rect', {
    88   y: "0.5",
    89   width: "32.0014",
    90   height: "32.0014",
    91   rx: "16.0007",
    92   fill: "#FFDEEB"
    93 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('path', {
    94   d: "M11.5558 24.2785C11.1484 24.2785 10.7996 24.1335 10.5094 23.8433C10.2193 23.5532 10.0742 23.2044 10.0742 22.797V15.3895C10.0742 14.982 10.2193 14.6333 10.5094 14.3431C10.7996 14.053 11.1484 13.9079 11.5558 13.9079H12.2966V12.4264C12.2966 11.4017 12.6577 10.5282 13.38 9.80601C14.1023 9.08377 14.9758 8.72266 16.0005 8.72266C17.0253 8.72266 17.8988 9.08377 18.6211 9.80601C19.3434 10.5282 19.7045 11.4017 19.7045 12.4264V13.9079H20.4453C20.8527 13.9079 21.2015 14.053 21.4916 14.3431C21.7818 14.6333 21.9269 14.982 21.9269 15.3895V22.797C21.9269 23.2044 21.7818 23.5532 21.4916 23.8433C21.2015 24.1335 20.8527 24.2785 20.4453 24.2785H11.5558ZM11.5558 22.797H20.4453V15.3895H11.5558V22.797ZM16.0005 20.5747C16.408 20.5747 16.7568 20.4297 17.0469 20.1396C17.337 19.8494 17.4821 19.5007 17.4821 19.0932C17.4821 18.6858 17.337 18.337 17.0469 18.0469C16.7568 17.7568 16.408 17.6117 16.0005 17.6117C15.5931 17.6117 15.2443 17.7568 14.9542 18.0469C14.664 18.337 14.519 18.6858 14.519 19.0932C14.519 19.5007 14.664 19.8494 14.9542 20.1396C15.2443 20.4297 15.5931 20.5747 16.0005 20.5747ZM13.7782 13.9079H18.2229V12.4264C18.2229 11.8091 18.0068 11.2844 17.5747 10.8523C17.1426 10.4202 16.6179 10.2042 16.0005 10.2042C15.3832 10.2042 14.8585 10.4202 14.4264 10.8523C13.9942 11.2844 13.7782 11.8091 13.7782 12.4264V13.9079Z",
    95   fill: "#A61E4D"
    96 }));
    97 
    98 /***/ }),
    99 
    100 /***/ "./src/index.js":
    101 /*!**********************!*\
    102   !*** ./src/index.js ***!
    103   \**********************/
    104 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    105 
    106 __webpack_require__.r(__webpack_exports__);
    107 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
    108 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
    109 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
    110 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
    111 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/block.json");
    112 
    113 
    114 
    115 
    116 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
    117   icon: _edit__WEBPACK_IMPORTED_MODULE_2__.passwordProtectPDFIcon,
    118   edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
    119 });
    120 
    121 /***/ }),
    122 
    123 /***/ "./src/editor.scss":
    124 /*!*************************!*\
    125   !*** ./src/editor.scss ***!
    126   \*************************/
    127 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    128 
    129 __webpack_require__.r(__webpack_exports__);
    130 // extracted by mini-css-extract-plugin
    131 
    132 
    133 /***/ }),
    134 
    135 /***/ "./src/style.scss":
    136 /*!************************!*\
    137   !*** ./src/style.scss ***!
    138   \************************/
    139 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    140 
    141 __webpack_require__.r(__webpack_exports__);
    142 // extracted by mini-css-extract-plugin
    143 
    144 
    145 /***/ }),
    146 
    147 /***/ "react/jsx-runtime":
    148 /*!**********************************!*\
    149   !*** external "ReactJSXRuntime" ***!
    150   \**********************************/
    151 /***/ ((module) => {
    152 
    153 module.exports = window["ReactJSXRuntime"];
    154 
    155 /***/ }),
    156 
    157 /***/ "@wordpress/blocks":
    158 /*!********************************!*\
    159   !*** external ["wp","blocks"] ***!
    160   \********************************/
    161 /***/ ((module) => {
    162 
    163 module.exports = window["wp"]["blocks"];
    164 
    165 /***/ }),
    166 
    167 /***/ "@wordpress/element":
    168 /*!*********************************!*\
    169   !*** external ["wp","element"] ***!
    170   \*********************************/
    171 /***/ ((module) => {
    172 
    173 module.exports = window["wp"]["element"];
    174 
    175 /***/ }),
    176 
    177 /***/ "@wordpress/i18n":
    178 /*!******************************!*\
    179   !*** external ["wp","i18n"] ***!
    180   \******************************/
    181 /***/ ((module) => {
    182 
    183 module.exports = window["wp"]["i18n"];
    184 
    185 /***/ }),
    186 
    187 /***/ "./src/block.json":
    188 /*!************************!*\
    189   !*** ./src/block.json ***!
    190   \************************/
    191 /***/ ((module) => {
    192 
    193 module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/password-protect-pdf","version":"1.0.0","title":"Password Protect PDF","category":"widgets","description":"Easily create password-protected PDF files, allowing you to protect and edit their contents seamlessly.","example":{},"supports":{"html":false},"textdomain":"password-protect-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');
    194 
    195 /***/ })
    196 
    197 /******/    });
    198 /************************************************************************/
    199 /******/    // The module cache
    200 /******/    var __webpack_module_cache__ = {};
    201 /******/   
    202 /******/    // The require function
    203 /******/    function __webpack_require__(moduleId) {
    204 /******/        // Check if module is in cache
    205 /******/        var cachedModule = __webpack_module_cache__[moduleId];
    206 /******/        if (cachedModule !== undefined) {
    207 /******/            return cachedModule.exports;
    208 /******/        }
    209 /******/        // Create a new module (and put it into the cache)
    210 /******/        var module = __webpack_module_cache__[moduleId] = {
    211 /******/            // no module.id needed
    212 /******/            // no module.loaded needed
    213 /******/            exports: {}
    214 /******/        };
    215 /******/   
    216 /******/        // Execute the module function
    217 /******/        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
    218 /******/   
    219 /******/        // Return the exports of the module
    220 /******/        return module.exports;
    221 /******/    }
    222 /******/   
    223 /******/    // expose the modules object (__webpack_modules__)
    224 /******/    __webpack_require__.m = __webpack_modules__;
    225 /******/   
    226 /************************************************************************/
    227 /******/    /* webpack/runtime/chunk loaded */
    228 /******/    (() => {
    229 /******/        var deferred = [];
    230 /******/        __webpack_require__.O = (result, chunkIds, fn, priority) => {
    231 /******/            if(chunkIds) {
    232 /******/                priority = priority || 0;
    233 /******/                for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
    234 /******/                deferred[i] = [chunkIds, fn, priority];
    235 /******/                return;
    236 /******/            }
    237 /******/            var notFulfilled = Infinity;
    238 /******/            for (var i = 0; i < deferred.length; i++) {
    239 /******/                var chunkIds = deferred[i][0];
    240 /******/                var fn = deferred[i][1];
    241 /******/                var priority = deferred[i][2];
    242 /******/                var fulfilled = true;
    243 /******/                for (var j = 0; j < chunkIds.length; j++) {
    244 /******/                    if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
    245 /******/                        chunkIds.splice(j--, 1);
    246 /******/                    } else {
    247 /******/                        fulfilled = false;
    248 /******/                        if(priority < notFulfilled) notFulfilled = priority;
    249 /******/                    }
    250 /******/                }
    251 /******/                if(fulfilled) {
    252 /******/                    deferred.splice(i--, 1)
    253 /******/                    var r = fn();
    254 /******/                    if (r !== undefined) result = r;
    255 /******/                }
    256 /******/            }
    257 /******/            return result;
    258 /******/        };
    259 /******/    })();
    260 /******/   
    261 /******/    /* webpack/runtime/compat get default export */
    262 /******/    (() => {
    263 /******/        // getDefaultExport function for compatibility with non-harmony modules
    264 /******/        __webpack_require__.n = (module) => {
    265 /******/            var getter = module && module.__esModule ?
    266 /******/                () => (module['default']) :
    267 /******/                () => (module);
    268 /******/            __webpack_require__.d(getter, { a: getter });
    269 /******/            return getter;
    270 /******/        };
    271 /******/    })();
    272 /******/   
    273 /******/    /* webpack/runtime/define property getters */
    274 /******/    (() => {
    275 /******/        // define getter functions for harmony exports
    276 /******/        __webpack_require__.d = (exports, definition) => {
    277 /******/            for(var key in definition) {
    278 /******/                if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    279 /******/                    Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    280 /******/                }
    281 /******/            }
    282 /******/        };
    283 /******/    })();
    284 /******/   
    285 /******/    /* webpack/runtime/hasOwnProperty shorthand */
    286 /******/    (() => {
    287 /******/        __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
    288 /******/    })();
    289 /******/   
    290 /******/    /* webpack/runtime/make namespace object */
    291 /******/    (() => {
    292 /******/        // define __esModule on exports
    293 /******/        __webpack_require__.r = (exports) => {
    294 /******/            if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    295 /******/                Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    296 /******/            }
    297 /******/            Object.defineProperty(exports, '__esModule', { value: true });
    298 /******/        };
    299 /******/    })();
    300 /******/   
    301 /******/    /* webpack/runtime/jsonp chunk loading */
    302 /******/    (() => {
    303 /******/        // no baseURI
    304 /******/       
    305 /******/        // object to store loaded and loading chunks
    306 /******/        // undefined = chunk not loaded, null = chunk preloaded/prefetched
    307 /******/        // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
    308 /******/        var installedChunks = {
    309 /******/            "index": 0,
    310 /******/            "./style-index": 0
    311 /******/        };
    312 /******/       
    313 /******/        // no chunk on demand loading
    314 /******/       
    315 /******/        // no prefetching
    316 /******/       
    317 /******/        // no preloaded
    318 /******/       
    319 /******/        // no HMR
    320 /******/       
    321 /******/        // no HMR manifest
    322 /******/       
    323 /******/        __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
    324 /******/       
    325 /******/        // install a JSONP callback for chunk loading
    326 /******/        var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
    327 /******/            var chunkIds = data[0];
    328 /******/            var moreModules = data[1];
    329 /******/            var runtime = data[2];
    330 /******/            // add "moreModules" to the modules object,
    331 /******/            // then flag all "chunkIds" as loaded and fire callback
    332 /******/            var moduleId, chunkId, i = 0;
    333 /******/            if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
    334 /******/                for(moduleId in moreModules) {
    335 /******/                    if(__webpack_require__.o(moreModules, moduleId)) {
    336 /******/                        __webpack_require__.m[moduleId] = moreModules[moduleId];
    337 /******/                    }
    338 /******/                }
    339 /******/                if(runtime) var result = runtime(__webpack_require__);
    340 /******/            }
    341 /******/            if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
    342 /******/            for(;i < chunkIds.length; i++) {
    343 /******/                chunkId = chunkIds[i];
    344 /******/                if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
    345 /******/                    installedChunks[chunkId][0]();
    346 /******/                }
    347 /******/                installedChunks[chunkId] = 0;
    348 /******/            }
    349 /******/            return __webpack_require__.O(result);
    350 /******/        }
    351 /******/       
    352 /******/        var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
    353 /******/        chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
    354 /******/        chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
    355 /******/    })();
    356 /******/   
    357 /************************************************************************/
    358 /******/   
    359 /******/    // startup
    360 /******/    // Load entry module and return exports
    361 /******/    // This entry module depends on other loaded chunks and execution need to be delayed
    362 /******/    var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
    363 /******/    __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
    364 /******/   
    365 /******/ })()
    366 ;
    367 //# sourceMappingURL=index.js.map
     1(()=>{"use strict";var e,s={354:()=>{const e=window.wp.blocks,s=window.wp.element,r=window.wp.i18n,t=window.ReactJSXRuntime,i=(0,s.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#FFDEEB"}),(0,s.createElement)("path",{d:"M11.5558 24.2785C11.1484 24.2785 10.7996 24.1335 10.5094 23.8433C10.2193 23.5532 10.0742 23.2044 10.0742 22.797V15.3895C10.0742 14.982 10.2193 14.6333 10.5094 14.3431C10.7996 14.053 11.1484 13.9079 11.5558 13.9079H12.2966V12.4264C12.2966 11.4017 12.6577 10.5282 13.38 9.80601C14.1023 9.08377 14.9758 8.72266 16.0005 8.72266C17.0253 8.72266 17.8988 9.08377 18.6211 9.80601C19.3434 10.5282 19.7045 11.4017 19.7045 12.4264V13.9079H20.4453C20.8527 13.9079 21.2015 14.053 21.4916 14.3431C21.7818 14.6333 21.9269 14.982 21.9269 15.3895V22.797C21.9269 23.2044 21.7818 23.5532 21.4916 23.8433C21.2015 24.1335 20.8527 24.2785 20.4453 24.2785H11.5558ZM11.5558 22.797H20.4453V15.3895H11.5558V22.797ZM16.0005 20.5747C16.408 20.5747 16.7568 20.4297 17.0469 20.1396C17.337 19.8494 17.4821 19.5007 17.4821 19.0932C17.4821 18.6858 17.337 18.337 17.0469 18.0469C16.7568 17.7568 16.408 17.6117 16.0005 17.6117C15.5931 17.6117 15.2443 17.7568 14.9542 18.0469C14.664 18.337 14.519 18.6858 14.519 19.0932C14.519 19.5007 14.664 19.8494 14.9542 20.1396C15.2443 20.4297 15.5931 20.5747 16.0005 20.5747ZM13.7782 13.9079H18.2229V12.4264C18.2229 11.8091 18.0068 11.2844 17.5747 10.8523C17.1426 10.4202 16.6179 10.2042 16.0005 10.2042C15.3832 10.2042 14.8585 10.4202 14.4264 10.8523C13.9942 11.2844 13.7782 11.8091 13.7782 12.4264V13.9079Z",fill:"#A61E4D"})),l=JSON.parse('{"UU":"create-block/password-protect-pdf"}');(0,e.registerBlockType)(l.UU,{icon:i,edit:function(){return(0,s.createElement)("div",null,(0,t.jsx)("div",{className:"solution__password-protect-pdf",children:(0,t.jsx)("div",{className:"solution__container__wrapper",children:(0,t.jsxs)("div",{className:"solution__container",children:[(0,t.jsx)("div",{className:"solution__header",children:(0,r.__)("Password Protect PDF","password-protect-pdf")}),(0,t.jsxs)("div",{className:"solution__form",children:[(0,t.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,t.jsx)("span",{children:(0,r.__)("File:","password-protect-pdf")}),(0,t.jsx)("input",{type:"file",id:"file",name:"file",required:!0,className:"solution__file-input",disabled:!0})]}),(0,t.jsxs)("label",{htmlFor:"password",className:"solution__label",children:[(0,t.jsx)("span",{children:(0,r.__)("Password:","password-protect-pdf")}),(0,t.jsx)("input",{type:"text",id:"password",name:"password",required:!0,className:"solution__input",disabled:!0})]}),(0,t.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,r.__)("Submit","password-protect-pdf")})]})]})})}))}})}},r={};function t(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return s[e](l,l.exports,t),l.exports}t.m=s,e=[],t.O=(s,r,i,l)=>{if(!r){var o=1/0;for(c=0;c<e.length;c++){r=e[c][0],i=e[c][1],l=e[c][2];for(var n=!0,a=0;a<r.length;a++)(!1&l||o>=l)&&Object.keys(t.O).every((e=>t.O[e](r[a])))?r.splice(a--,1):(n=!1,l<o&&(o=l));if(n){e.splice(c--,1);var d=i();void 0!==d&&(s=d)}}return s}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,i,l]},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={57:0,350:0};t.O.j=s=>0===e[s];var s=(s,r)=>{var i,l,o=r[0],n=r[1],a=r[2],d=0;if(o.some((s=>0!==e[s]))){for(i in n)t.o(n,i)&&(t.m[i]=n[i]);if(a)var c=a(t)}for(s&&s(r);d<o.length;d++)l=o[d],t.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return t.O(c)},r=self.webpackChunk=self.webpackChunk||[];r.forEach(s.bind(null,0)),r.push=s.bind(null,r.push.bind(r))})();var i=t.O(void 0,[350],(()=>t(354)));i=t.O(i)})();
  • password-protect-pdf/tags/1.0.1/build/style-index-rtl.css

    r3237558 r3260525  
    1 /*!***************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
    3   \***************************************************************************************************************************************************************************************************************************************************/
    4 :root {
    5   --solution-password-protect-pdf-primary-color: #4f46e5;
    6   --solution-password-protect-pdf-secondary-color: #eef2ff;
    7   --solution-password-protect-pdf-tertiary-color: #000;
    8   --solution-password-protect-pdf-background-color: #fff;
    9   --solution-password-protect-pdf-border-color: #e5e7eb;
    10   --solution-password-protect-pdf-input-border-color: #d1d5db;
    11   --solution-password-protect-pdf-shadow-color: rgba(149, 157, 165, 0.2);
    12   --solution-password-protect-pdf-btn-shadow-color: rgba(0, 0, 0, 0.05);
    13   --solution-password-protect-pdf-dropdown-bg-color: #fff;
    14   --solution-password-protect-pdf-dropdown-shadow-color-1: rgba(0, 0, 0, 0.1);
    15   --solution-password-protect-pdf-dropdown-shadow-color-2: rgba(0, 0, 0, 0.1);
    16 }
    17 
    18 .solution__password-protect-pdf .solution__container-wrapper {
    19   padding: 1rem;
    20   display: flex;
    21   flex-direction: column;
    22   gap: 1rem;
    23   color: var(--solution-password-protect-pdf-tertiary-color);
    24 }
    25 .solution__password-protect-pdf .solution__container {
    26   box-shadow: var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;
    27   border: 1px solid var(--solution-password-protect-pdf-border-color);
    28   background-color: var(--solution-password-protect-pdf-background-color);
    29   border-radius: 0.75rem;
    30   padding: 1.5rem 1.5rem 0.5rem;
    31   position: relative;
    32   display: flex;
    33   flex-direction: column;
    34   min-height: 250px;
    35   gap: 1rem;
    36 }
    37 .solution__password-protect-pdf .solution__header {
    38   font-size: 1.25rem;
    39   letter-spacing: 0.05em;
    40   font-weight: 500;
    41 }
    42 .solution__password-protect-pdf .solution__content {
    43   flex-grow: 1;
    44   display: grid;
    45 }
    46 .solution__password-protect-pdf .solution__form {
    47   display: flex;
    48   flex-direction: column;
    49   gap: 1rem;
    50 }
    51 .solution__password-protect-pdf .solution__label {
    52   white-space: nowrap;
    53   width: 100%;
    54   font-size: 0.75rem;
    55   font-weight: 500;
    56   display: flex;
    57   flex-direction: column;
    58   gap: 0.3rem;
    59 }
    60 .solution__password-protect-pdf .solution__hint {
    61   font-size: 0.75rem;
    62   font-weight: 500;
    63   color: var(--solution-password-protect-pdf-primary-color);
    64   white-space: wrap;
    65 }
    66 .solution__password-protect-pdf .solution__input {
    67   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    68   border-radius: 0.375rem;
    69   padding: 0.25rem 0.5rem;
    70   font-size: 1rem;
    71   line-height: 32px;
    72   outline: 1px solid transparent;
    73   outline-offset: -1px;
    74 }
    75 .solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button {
    76   margin-left: 1rem;
    77   padding: 0.5rem 1rem;
    78   border-radius: 0.75rem;
    79   border: none;
    80   background-color: var(--solution-password-protect-pdf-secondary-color);
    81   color: var(--solution-password-protect-pdf-primary-color);
    82   font-weight: 500;
    83   cursor: pointer;
    84 }
    85 .solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button {
    86   background-color: var(--solution-password-protect-pdf-secondary-color);
    87 }
    88 .solution__password-protect-pdf .solution__btn {
    89   display: inline-flex;
    90   align-items: center; /* Ensures the icon and text are aligned */
    91   justify-content: center;
    92   gap: 0.5rem; /* Adds space between the icon and the text */
    93   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);
    94   background: var(--solution-password-protect-pdf-secondary-color);
    95   color: var(--solution-password-protect-pdf-primary-color);
    96   padding: 0.5rem 1rem;
    97   border-radius: 1rem;
    98   font-weight: 600;
    99   cursor: pointer;
    100   border: none;
    101 }
    102 .solution__password-protect-pdf .solution__btn:hover {
    103   filter: brightness(0.98);
    104 }
    105 .solution__password-protect-pdf .solution__btn .dashicons {
    106   font-size: 1.2rem; /* Adjust the size of the icon */
    107   vertical-align: middle; /* Aligns the icon vertically with the text */
    108 }
    109 .solution__password-protect-pdf .solution__dropdown-wrapper {
    110   position: relative;
    111 }
    112 .solution__password-protect-pdf .solution__dropdown {
    113   position: relative;
    114   overflow: visible;
    115   background-color: transparent;
    116   box-shadow: none;
    117   width: 100%;
    118   border-radius: 0.75rem;
    119   max-height: 15rem;
    120   z-index: 10;
    121 }
    122 .solution__password-protect-pdf .solution__dropdown--hidden {
    123   display: none;
    124 }
    125 .solution__password-protect-pdf .solution__loading-section {
    126   display: none;
    127   position: absolute;
    128   top: 50%;
    129   right: 50%;
    130   transform: translate(50%, -50%);
    131 }
    132 .solution__password-protect-pdf .solution__loading-container {
    133   display: flex;
    134   justify-content: center;
    135   align-items: center;
    136   gap: 1rem;
    137   transition: 2s ease;
    138 }
    139 .solution__password-protect-pdf .solution__download-section {
    140   display: flex;
    141   justify-content: center;
    142   align-items: center;
    143   flex-direction: column;
    144   gap: 2rem;
    145   height: 100%;
    146 }
    147 .solution__password-protect-pdf .solution__download-section:last-child {
    148   margin-top: auto;
    149 }
    150 .solution__password-protect-pdf .solution__download-container {
    151   display: flex;
    152   flex-direction: column;
    153   flex-grow: 1;
    154   justify-content: center;
    155   align-items: center;
    156   gap: 1rem;
    157 }
    158 .solution__password-protect-pdf .solution__download-file-container {
    159   display: flex;
    160   flex-wrap: wrap;
    161   justify-content: flex-start;
    162   gap: 1rem;
    163 }
    164 .solution__password-protect-pdf .solution__download-file-name {
    165   white-space: nowrap;
    166   overflow: hidden;
    167   text-overflow: ellipsis;
    168   max-width: 12rem;
    169 }
    170 .solution__password-protect-pdf .solution__title-text {
    171   font-weight: 600;
    172 }
    173 .solution__password-protect-pdf .solution__text {
    174   font-weight: 500;
    175 }
    176 .solution__password-protect-pdf .solution__provided-text {
    177   display: flex;
    178   justify-content: center;
    179   font-size: 0.7rem;
    180   margin-top: 0.5rem;
    181 }
    182 .solution__password-protect-pdf .solution__error-section {
    183   display: flex;
    184   flex-direction: column;
    185   justify-self: center;
    186   align-self: center;
    187 }
    188 .solution__password-protect-pdf .solution__dot {
    189   background: var(--solution-password-protect-pdf-tertiary-color);
    190   height: 0.65em;
    191   width: 0.65em;
    192   border-radius: 50%;
    193   animation: move 0.6s ease infinite;
    194 }
    195 .solution__password-protect-pdf .solution__link {
    196   color: var(--solution-password-protect-pdf-tertiary-color);
    197 }
    198 .solution__password-protect-pdf .solution__select {
    199   display: flex;
    200   flex-direction: column;
    201   position: relative;
    202   gap: 0.3rem;
    203   /* Placeholder color */
    204   /* Style for selected option */
    205 }
    206 .solution__password-protect-pdf .solution__select .solution__select-input {
    207   height: 42px;
    208   padding: 0 0.5rem;
    209   border-radius: 0.375rem;
    210   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    211   color: var(--solution-password-protect-pdf-tertiary-color);
    212   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);
    213   -webkit-appearance: none;
    214      -moz-appearance: none;
    215           appearance: none;
    216   cursor: pointer;
    217   /* Arrow styling */
    218   background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");
    219   background-repeat: no-repeat;
    220   background-position: left 1rem center;
    221   background-size: 1rem;
    222 }
    223 .solution__password-protect-pdf .solution__select .solution__select-input:focus {
    224   outline: 1px solid var(--solution-password-protect-pdf-primary-color);
    225   box-shadow: 0 0 0 3px var(--solution-password-protect-pdf-secondary-color);
    226 }
    227 .solution__password-protect-pdf .solution__select .solution__select-input option {
    228   padding: 1rem;
    229 }
    230 .solution__password-protect-pdf .solution__select .solution__select-input option[disabled] {
    231   color: var(--solution-password-protect-pdf-input-border-color);
    232 }
    233 .solution__password-protect-pdf .solution__select .solution__select-input:required:invalid {
    234   color: var(--solution-password-protect-pdf-input-border-color);
    235 }
    236 .solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]) {
    237   color: var(--solution-password-protect-pdf-tertiary-color);
    238 }
    239 .solution__password-protect-pdf .solution_dropdown button {
    240   width: 100%;
    241 }
    242 .solution__password-protect-pdf .solution__dropdown-content {
    243   display: none;
    244   position: absolute;
    245   flex-direction: column;
    246   min-width: 100%;
    247   max-height: 150px;
    248   padding: 0.5rem 0;
    249   overflow: auto;
    250   background-color: #fff;
    251   box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    252   z-index: 10;
    253   margin-top: 3px;
    254   border-radius: 10px;
    255   top: 100%;
    256   right: 50%;
    257   transform: translate(50%, 0);
    258 }
    259 .solution__password-protect-pdf .solution__dropdown-content label {
    260   display: block;
    261   margin-top: 10px;
    262   padding: 0 1rem;
    263 }
    264 .solution__password-protect-pdf .solution__dropdown-button {
    265   min-width: 100%;
    266 }
    267 .solution__password-protect-pdf .solution__dropdown-content:hover,
    268 .solution__password-protect-pdf .solution__dropdown-button:focus + .solution__dropdown-content {
    269   display: flex;
    270 }
    271 .solution__password-protect-pdf .solution__group {
    272   display: flex;
    273   flex-wrap: wrap;
    274   gap: 10px;
    275 }
    276 .solution__password-protect-pdf .solution__group > div,
    277 .solution__password-protect-pdf .solution__group > label {
    278   flex: 1;
    279 }
    280 
    281 @keyframes move {
    282   0% {
    283     transform: translateX(-50%);
    284   }
    285   50% {
    286     transform: translateX(50%);
    287   }
    288   100% {
    289     transform: translateX(-50%);
    290   }
    291 }
     1:root{--solution-password-protect-pdf-primary-color:#4f46e5;--solution-password-protect-pdf-secondary-color:#eef2ff;--solution-password-protect-pdf-tertiary-color:#000;--solution-password-protect-pdf-background-color:#fff;--solution-password-protect-pdf-border-color:#e5e7eb;--solution-password-protect-pdf-input-border-color:#d1d5db;--solution-password-protect-pdf-shadow-color:hsla(210,8%,62%,.2);--solution-password-protect-pdf-btn-shadow-color:rgba(0,0,0,.05);--solution-password-protect-pdf-dropdown-bg-color:#fff;--solution-password-protect-pdf-dropdown-shadow-color-1:rgba(0,0,0,.1);--solution-password-protect-pdf-dropdown-shadow-color-2:rgba(0,0,0,.1)}.solution__password-protect-pdf .solution__container-wrapper{color:var(--solution-password-protect-pdf-tertiary-color);display:flex;flex-direction:column;gap:1rem;padding:1rem}.solution__password-protect-pdf .solution__container{background-color:var(--solution-password-protect-pdf-background-color);border:1px solid var(--solution-password-protect-pdf-border-color);border-radius:.75rem;box-shadow:var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;display:flex;flex-direction:column;gap:1rem;min-height:250px;padding:1.5rem 1.5rem .5rem;position:relative}.solution__password-protect-pdf .solution__header{font-size:1.25rem;font-weight:500;letter-spacing:.05em}.solution__password-protect-pdf .solution__content{display:grid;flex-grow:1}.solution__password-protect-pdf .solution__form{display:flex;flex-direction:column;gap:1rem}.solution__password-protect-pdf .solution__label{display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.3rem;white-space:nowrap;width:100%}.solution__password-protect-pdf .solution__hint{color:var(--solution-password-protect-pdf-primary-color);font-size:.75rem;font-weight:500;white-space:wrap}.solution__password-protect-pdf .solution__input{border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;font-size:1rem;line-height:32px;outline:1px solid transparent;outline-offset:-1px;padding:.25rem .5rem}.solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:.75rem;color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;font-weight:500;margin-left:1rem;padding:.5rem 1rem}.solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color)}.solution__password-protect-pdf .solution__btn{align-items:center;background:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:1rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;display:inline-flex;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem 1rem}.solution__password-protect-pdf .solution__btn:hover{filter:brightness(.98)}.solution__password-protect-pdf .solution__btn .dashicons{font-size:1.2rem;vertical-align:middle}.solution__password-protect-pdf .solution__dropdown-wrapper{position:relative}.solution__password-protect-pdf .solution__dropdown{background-color:transparent;border-radius:.75rem;box-shadow:none;max-height:15rem;overflow:visible;position:relative;width:100%;z-index:10}.solution__password-protect-pdf .solution__dropdown--hidden{display:none}.solution__password-protect-pdf .solution__loading-section{display:none;right:50%;position:absolute;top:50%;transform:translate(50%,-50%)}.solution__password-protect-pdf .solution__loading-container{align-items:center;display:flex;gap:1rem;justify-content:center;transition:2s ease}.solution__password-protect-pdf .solution__download-section{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center}.solution__password-protect-pdf .solution__download-section:last-child{margin-top:auto}.solution__password-protect-pdf .solution__download-container{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:1rem;justify-content:center}.solution__password-protect-pdf .solution__download-file-container{display:flex;flex-wrap:wrap;gap:1rem;justify-content:flex-start}.solution__password-protect-pdf .solution__download-file-name{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.solution__password-protect-pdf .solution__title-text{font-weight:600}.solution__password-protect-pdf .solution__text{font-weight:500}.solution__password-protect-pdf .solution__provided-text{display:flex;font-size:.7rem;justify-content:center;margin-top:.5rem}.solution__password-protect-pdf .solution__error-section{align-self:center;display:flex;flex-direction:column;justify-self:center}.solution__password-protect-pdf .solution__dot{animation:move .6s ease infinite;background:var(--solution-password-protect-pdf-tertiary-color);border-radius:50%;height:.65em;width:.65em}.solution__password-protect-pdf .solution__link{color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution__select{display:flex;flex-direction:column;gap:.3rem;position:relative}.solution__password-protect-pdf .solution__select .solution__select-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");background-position:left 1rem center;background-repeat:no-repeat;background-size:1rem;border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);color:var(--solution-password-protect-pdf-tertiary-color);cursor:pointer;height:42px;padding:0 .5rem}.solution__password-protect-pdf .solution__select .solution__select-input:focus{box-shadow:0 0 0 3px var(--solution-password-protect-pdf-secondary-color);outline:1px solid var(--solution-password-protect-pdf-primary-color)}.solution__password-protect-pdf .solution__select .solution__select-input option{padding:1rem}.solution__password-protect-pdf .solution__select .solution__select-input option[disabled]{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input:required:invalid{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]){color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution_dropdown button{width:100%}.solution__password-protect-pdf .solution__dropdown-content{background-color:#fff;border-radius:10px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;flex-direction:column;right:50%;margin-top:3px;max-height:150px;min-width:100%;overflow:auto;padding:.5rem 0;position:absolute;top:100%;transform:translate(50%);z-index:10}.solution__password-protect-pdf .solution__dropdown-content label{display:block;margin-top:10px;padding:0 1rem}.solution__password-protect-pdf .solution__dropdown-button{min-width:100%}.solution__password-protect-pdf .solution__dropdown-button:focus+.solution__dropdown-content,.solution__password-protect-pdf .solution__dropdown-content:hover{display:flex}.solution__password-protect-pdf .solution__group{display:flex;flex-wrap:wrap;gap:10px}.solution__password-protect-pdf .solution__group>div,.solution__password-protect-pdf .solution__group>label{flex:1}@keyframes move{0%{transform:translateX(-50%)}50%{transform:translateX(50%)}to{transform:translateX(-50%)}}
  • password-protect-pdf/tags/1.0.1/build/style-index.css

    r3237558 r3260525  
    1 /*!***************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
    3   \***************************************************************************************************************************************************************************************************************************************************/
    4 :root {
    5   --solution-password-protect-pdf-primary-color: #4f46e5;
    6   --solution-password-protect-pdf-secondary-color: #eef2ff;
    7   --solution-password-protect-pdf-tertiary-color: #000;
    8   --solution-password-protect-pdf-background-color: #fff;
    9   --solution-password-protect-pdf-border-color: #e5e7eb;
    10   --solution-password-protect-pdf-input-border-color: #d1d5db;
    11   --solution-password-protect-pdf-shadow-color: rgba(149, 157, 165, 0.2);
    12   --solution-password-protect-pdf-btn-shadow-color: rgba(0, 0, 0, 0.05);
    13   --solution-password-protect-pdf-dropdown-bg-color: #fff;
    14   --solution-password-protect-pdf-dropdown-shadow-color-1: rgba(0, 0, 0, 0.1);
    15   --solution-password-protect-pdf-dropdown-shadow-color-2: rgba(0, 0, 0, 0.1);
    16 }
    17 
    18 .solution__password-protect-pdf .solution__container-wrapper {
    19   padding: 1rem;
    20   display: flex;
    21   flex-direction: column;
    22   gap: 1rem;
    23   color: var(--solution-password-protect-pdf-tertiary-color);
    24 }
    25 .solution__password-protect-pdf .solution__container {
    26   box-shadow: var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;
    27   border: 1px solid var(--solution-password-protect-pdf-border-color);
    28   background-color: var(--solution-password-protect-pdf-background-color);
    29   border-radius: 0.75rem;
    30   padding: 1.5rem 1.5rem 0.5rem;
    31   position: relative;
    32   display: flex;
    33   flex-direction: column;
    34   min-height: 250px;
    35   gap: 1rem;
    36 }
    37 .solution__password-protect-pdf .solution__header {
    38   font-size: 1.25rem;
    39   letter-spacing: 0.05em;
    40   font-weight: 500;
    41 }
    42 .solution__password-protect-pdf .solution__content {
    43   flex-grow: 1;
    44   display: grid;
    45 }
    46 .solution__password-protect-pdf .solution__form {
    47   display: flex;
    48   flex-direction: column;
    49   gap: 1rem;
    50 }
    51 .solution__password-protect-pdf .solution__label {
    52   white-space: nowrap;
    53   width: 100%;
    54   font-size: 0.75rem;
    55   font-weight: 500;
    56   display: flex;
    57   flex-direction: column;
    58   gap: 0.3rem;
    59 }
    60 .solution__password-protect-pdf .solution__hint {
    61   font-size: 0.75rem;
    62   font-weight: 500;
    63   color: var(--solution-password-protect-pdf-primary-color);
    64   white-space: wrap;
    65 }
    66 .solution__password-protect-pdf .solution__input {
    67   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    68   border-radius: 0.375rem;
    69   padding: 0.25rem 0.5rem;
    70   font-size: 1rem;
    71   line-height: 32px;
    72   outline: 1px solid transparent;
    73   outline-offset: -1px;
    74 }
    75 .solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button {
    76   margin-right: 1rem;
    77   padding: 0.5rem 1rem;
    78   border-radius: 0.75rem;
    79   border: none;
    80   background-color: var(--solution-password-protect-pdf-secondary-color);
    81   color: var(--solution-password-protect-pdf-primary-color);
    82   font-weight: 500;
    83   cursor: pointer;
    84 }
    85 .solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button {
    86   background-color: var(--solution-password-protect-pdf-secondary-color);
    87 }
    88 .solution__password-protect-pdf .solution__btn {
    89   display: inline-flex;
    90   align-items: center; /* Ensures the icon and text are aligned */
    91   justify-content: center;
    92   gap: 0.5rem; /* Adds space between the icon and the text */
    93   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);
    94   background: var(--solution-password-protect-pdf-secondary-color);
    95   color: var(--solution-password-protect-pdf-primary-color);
    96   padding: 0.5rem 1rem;
    97   border-radius: 1rem;
    98   font-weight: 600;
    99   cursor: pointer;
    100   border: none;
    101 }
    102 .solution__password-protect-pdf .solution__btn:hover {
    103   filter: brightness(0.98);
    104 }
    105 .solution__password-protect-pdf .solution__btn .dashicons {
    106   font-size: 1.2rem; /* Adjust the size of the icon */
    107   vertical-align: middle; /* Aligns the icon vertically with the text */
    108 }
    109 .solution__password-protect-pdf .solution__dropdown-wrapper {
    110   position: relative;
    111 }
    112 .solution__password-protect-pdf .solution__dropdown {
    113   position: relative;
    114   overflow: visible;
    115   background-color: transparent;
    116   box-shadow: none;
    117   width: 100%;
    118   border-radius: 0.75rem;
    119   max-height: 15rem;
    120   z-index: 10;
    121 }
    122 .solution__password-protect-pdf .solution__dropdown--hidden {
    123   display: none;
    124 }
    125 .solution__password-protect-pdf .solution__loading-section {
    126   display: none;
    127   position: absolute;
    128   top: 50%;
    129   left: 50%;
    130   transform: translate(-50%, -50%);
    131 }
    132 .solution__password-protect-pdf .solution__loading-container {
    133   display: flex;
    134   justify-content: center;
    135   align-items: center;
    136   gap: 1rem;
    137   transition: 2s ease;
    138 }
    139 .solution__password-protect-pdf .solution__download-section {
    140   display: flex;
    141   justify-content: center;
    142   align-items: center;
    143   flex-direction: column;
    144   gap: 2rem;
    145   height: 100%;
    146 }
    147 .solution__password-protect-pdf .solution__download-section:last-child {
    148   margin-top: auto;
    149 }
    150 .solution__password-protect-pdf .solution__download-container {
    151   display: flex;
    152   flex-direction: column;
    153   flex-grow: 1;
    154   justify-content: center;
    155   align-items: center;
    156   gap: 1rem;
    157 }
    158 .solution__password-protect-pdf .solution__download-file-container {
    159   display: flex;
    160   flex-wrap: wrap;
    161   justify-content: flex-start;
    162   gap: 1rem;
    163 }
    164 .solution__password-protect-pdf .solution__download-file-name {
    165   white-space: nowrap;
    166   overflow: hidden;
    167   text-overflow: ellipsis;
    168   max-width: 12rem;
    169 }
    170 .solution__password-protect-pdf .solution__title-text {
    171   font-weight: 600;
    172 }
    173 .solution__password-protect-pdf .solution__text {
    174   font-weight: 500;
    175 }
    176 .solution__password-protect-pdf .solution__provided-text {
    177   display: flex;
    178   justify-content: center;
    179   font-size: 0.7rem;
    180   margin-top: 0.5rem;
    181 }
    182 .solution__password-protect-pdf .solution__error-section {
    183   display: flex;
    184   flex-direction: column;
    185   justify-self: center;
    186   align-self: center;
    187 }
    188 .solution__password-protect-pdf .solution__dot {
    189   background: var(--solution-password-protect-pdf-tertiary-color);
    190   height: 0.65em;
    191   width: 0.65em;
    192   border-radius: 50%;
    193   animation: move 0.6s ease infinite;
    194 }
    195 .solution__password-protect-pdf .solution__link {
    196   color: var(--solution-password-protect-pdf-tertiary-color);
    197 }
    198 .solution__password-protect-pdf .solution__select {
    199   display: flex;
    200   flex-direction: column;
    201   position: relative;
    202   gap: 0.3rem;
    203   /* Placeholder color */
    204   /* Style for selected option */
    205 }
    206 .solution__password-protect-pdf .solution__select .solution__select-input {
    207   height: 42px;
    208   padding: 0 0.5rem;
    209   border-radius: 0.375rem;
    210   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    211   color: var(--solution-password-protect-pdf-tertiary-color);
    212   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);
    213   -webkit-appearance: none;
    214      -moz-appearance: none;
    215           appearance: none;
    216   cursor: pointer;
    217   /* Arrow styling */
    218   background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");
    219   background-repeat: no-repeat;
    220   background-position: right 1rem center;
    221   background-size: 1rem;
    222 }
    223 .solution__password-protect-pdf .solution__select .solution__select-input:focus {
    224   outline: 1px solid var(--solution-password-protect-pdf-primary-color);
    225   box-shadow: 0 0 0 3px var(--solution-password-protect-pdf-secondary-color);
    226 }
    227 .solution__password-protect-pdf .solution__select .solution__select-input option {
    228   padding: 1rem;
    229 }
    230 .solution__password-protect-pdf .solution__select .solution__select-input option[disabled] {
    231   color: var(--solution-password-protect-pdf-input-border-color);
    232 }
    233 .solution__password-protect-pdf .solution__select .solution__select-input:required:invalid {
    234   color: var(--solution-password-protect-pdf-input-border-color);
    235 }
    236 .solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]) {
    237   color: var(--solution-password-protect-pdf-tertiary-color);
    238 }
    239 .solution__password-protect-pdf .solution_dropdown button {
    240   width: 100%;
    241 }
    242 .solution__password-protect-pdf .solution__dropdown-content {
    243   display: none;
    244   position: absolute;
    245   flex-direction: column;
    246   min-width: 100%;
    247   max-height: 150px;
    248   padding: 0.5rem 0;
    249   overflow: auto;
    250   background-color: #fff;
    251   box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    252   z-index: 10;
    253   margin-top: 3px;
    254   border-radius: 10px;
    255   top: 100%;
    256   left: 50%;
    257   transform: translate(-50%, 0);
    258 }
    259 .solution__password-protect-pdf .solution__dropdown-content label {
    260   display: block;
    261   margin-top: 10px;
    262   padding: 0 1rem;
    263 }
    264 .solution__password-protect-pdf .solution__dropdown-button {
    265   min-width: 100%;
    266 }
    267 .solution__password-protect-pdf .solution__dropdown-content:hover,
    268 .solution__password-protect-pdf .solution__dropdown-button:focus + .solution__dropdown-content {
    269   display: flex;
    270 }
    271 .solution__password-protect-pdf .solution__group {
    272   display: flex;
    273   flex-wrap: wrap;
    274   gap: 10px;
    275 }
    276 .solution__password-protect-pdf .solution__group > div,
    277 .solution__password-protect-pdf .solution__group > label {
    278   flex: 1;
    279 }
    280 
    281 @keyframes move {
    282   0% {
    283     transform: translateX(50%);
    284   }
    285   50% {
    286     transform: translateX(-50%);
    287   }
    288   100% {
    289     transform: translateX(50%);
    290   }
    291 }
    292 
    293 /*# sourceMappingURL=style-index.css.map*/
     1:root{--solution-password-protect-pdf-primary-color:#4f46e5;--solution-password-protect-pdf-secondary-color:#eef2ff;--solution-password-protect-pdf-tertiary-color:#000;--solution-password-protect-pdf-background-color:#fff;--solution-password-protect-pdf-border-color:#e5e7eb;--solution-password-protect-pdf-input-border-color:#d1d5db;--solution-password-protect-pdf-shadow-color:hsla(210,8%,62%,.2);--solution-password-protect-pdf-btn-shadow-color:rgba(0,0,0,.05);--solution-password-protect-pdf-dropdown-bg-color:#fff;--solution-password-protect-pdf-dropdown-shadow-color-1:rgba(0,0,0,.1);--solution-password-protect-pdf-dropdown-shadow-color-2:rgba(0,0,0,.1)}.solution__password-protect-pdf .solution__container-wrapper{color:var(--solution-password-protect-pdf-tertiary-color);display:flex;flex-direction:column;gap:1rem;padding:1rem}.solution__password-protect-pdf .solution__container{background-color:var(--solution-password-protect-pdf-background-color);border:1px solid var(--solution-password-protect-pdf-border-color);border-radius:.75rem;box-shadow:var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;display:flex;flex-direction:column;gap:1rem;min-height:250px;padding:1.5rem 1.5rem .5rem;position:relative}.solution__password-protect-pdf .solution__header{font-size:1.25rem;font-weight:500;letter-spacing:.05em}.solution__password-protect-pdf .solution__content{display:grid;flex-grow:1}.solution__password-protect-pdf .solution__form{display:flex;flex-direction:column;gap:1rem}.solution__password-protect-pdf .solution__label{display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.3rem;white-space:nowrap;width:100%}.solution__password-protect-pdf .solution__hint{color:var(--solution-password-protect-pdf-primary-color);font-size:.75rem;font-weight:500;white-space:wrap}.solution__password-protect-pdf .solution__input{border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;font-size:1rem;line-height:32px;outline:1px solid transparent;outline-offset:-1px;padding:.25rem .5rem}.solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:.75rem;color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;font-weight:500;margin-right:1rem;padding:.5rem 1rem}.solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color)}.solution__password-protect-pdf .solution__btn{align-items:center;background:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:1rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;display:inline-flex;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem 1rem}.solution__password-protect-pdf .solution__btn:hover{filter:brightness(.98)}.solution__password-protect-pdf .solution__btn .dashicons{font-size:1.2rem;vertical-align:middle}.solution__password-protect-pdf .solution__dropdown-wrapper{position:relative}.solution__password-protect-pdf .solution__dropdown{background-color:transparent;border-radius:.75rem;box-shadow:none;max-height:15rem;overflow:visible;position:relative;width:100%;z-index:10}.solution__password-protect-pdf .solution__dropdown--hidden{display:none}.solution__password-protect-pdf .solution__loading-section{display:none;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.solution__password-protect-pdf .solution__loading-container{align-items:center;display:flex;gap:1rem;justify-content:center;transition:2s ease}.solution__password-protect-pdf .solution__download-section{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center}.solution__password-protect-pdf .solution__download-section:last-child{margin-top:auto}.solution__password-protect-pdf .solution__download-container{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:1rem;justify-content:center}.solution__password-protect-pdf .solution__download-file-container{display:flex;flex-wrap:wrap;gap:1rem;justify-content:flex-start}.solution__password-protect-pdf .solution__download-file-name{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.solution__password-protect-pdf .solution__title-text{font-weight:600}.solution__password-protect-pdf .solution__text{font-weight:500}.solution__password-protect-pdf .solution__provided-text{display:flex;font-size:.7rem;justify-content:center;margin-top:.5rem}.solution__password-protect-pdf .solution__error-section{align-self:center;display:flex;flex-direction:column;justify-self:center}.solution__password-protect-pdf .solution__dot{animation:move .6s ease infinite;background:var(--solution-password-protect-pdf-tertiary-color);border-radius:50%;height:.65em;width:.65em}.solution__password-protect-pdf .solution__link{color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution__select{display:flex;flex-direction:column;gap:.3rem;position:relative}.solution__password-protect-pdf .solution__select .solution__select-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");background-position:right 1rem center;background-repeat:no-repeat;background-size:1rem;border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);color:var(--solution-password-protect-pdf-tertiary-color);cursor:pointer;height:42px;padding:0 .5rem}.solution__password-protect-pdf .solution__select .solution__select-input:focus{box-shadow:0 0 0 3px var(--solution-password-protect-pdf-secondary-color);outline:1px solid var(--solution-password-protect-pdf-primary-color)}.solution__password-protect-pdf .solution__select .solution__select-input option{padding:1rem}.solution__password-protect-pdf .solution__select .solution__select-input option[disabled]{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input:required:invalid{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]){color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution_dropdown button{width:100%}.solution__password-protect-pdf .solution__dropdown-content{background-color:#fff;border-radius:10px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;flex-direction:column;left:50%;margin-top:3px;max-height:150px;min-width:100%;overflow:auto;padding:.5rem 0;position:absolute;top:100%;transform:translate(-50%);z-index:10}.solution__password-protect-pdf .solution__dropdown-content label{display:block;margin-top:10px;padding:0 1rem}.solution__password-protect-pdf .solution__dropdown-button{min-width:100%}.solution__password-protect-pdf .solution__dropdown-button:focus+.solution__dropdown-content,.solution__password-protect-pdf .solution__dropdown-content:hover{display:flex}.solution__password-protect-pdf .solution__group{display:flex;flex-wrap:wrap;gap:10px}.solution__password-protect-pdf .solution__group>div,.solution__password-protect-pdf .solution__group>label{flex:1}@keyframes move{0%{transform:translateX(50%)}50%{transform:translateX(-50%)}to{transform:translateX(50%)}}
  • password-protect-pdf/tags/1.0.1/build/view.asset.php

    r3237558 r3260525  
    1 <?php return array('dependencies' => array(), 'version' => 'c15ecdb92febc27b4e9d');
     1<?php return array('dependencies' => array(), 'version' => '36841df1842c8245b753');
  • password-protect-pdf/tags/1.0.1/build/view.js

    r3237558 r3260525  
    1 /******/ (() => { // webpackBootstrap
    2 /*!*********************!*\
    3   !*** ./src/view.js ***!
    4   \*********************/
    5 document.querySelectorAll('.solution__password-protect-pdf .solution__form').forEach(form => {
    6   form.addEventListener('submit', function (event) {
    7     event.preventDefault();
    8     const formId = form.getAttribute('id');
    9     const fileInput = form.querySelector('[name="file"]');
    10     const passwordInput = form.querySelector('[name="userPass"]');
    11     const loadingSection = document.getElementById(`loadingSection_${formId}`);
    12     const errorSection = document.getElementById(`errorSection_${formId}`);
    13     const resultMessage = document.getElementById(`resultMessage_${formId}`);
    14     const downloadSection = document.getElementById(`downloadSection_${formId}`);
    15 
    16     // Hide the form, show the loading indicator, hide error and download sections
    17     form.style.display = 'none';
    18     loadingSection.style.display = 'flex';
    19     errorSection.style.display = 'none'; // Hide error section
    20     downloadSection.style.display = 'none';
    21     const formData = new FormData();
    22     Array.from(fileInput.files).forEach((file, index) => {
    23       formData.append(`file[${index}]`, file);
    24     });
    25     formData.append('userPass', passwordInput.value);
    26     formData.append('protectPDFFormNonce', wpApiSettings.protectPDFNonce);
    27     console.log(passwordInput.value);
    28     fetch(`${wpApiSettings.root}password-protect-pdf/v1/send-data`, {
    29       method: 'POST',
    30       body: formData
    31     }).then(response => response.json()).then(data => {
    32       if (data.id) {
    33         pollStatus(data.id, formId);
    34       } else {
    35         loadingSection.style.display = 'none';
    36         errorSection.style.display = 'flex';
    37         resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    38       }
    39     }).catch(() => {
    40       loadingSection.style.display = 'none';
    41       errorSection.style.display = 'flex';
    42       resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    43     });
    44   });
    45 
    46   // Add event listener for restart buttons
    47   const restartDownloadBtn = document.getElementById(`restartDownloadBtn_${form.id}`);
    48   const restartErrorBtn = document.getElementById(`restartErrorBtn_${form.id}`);
    49 
    50   // Function to restart the process and reset the form
    51   function resetForm() {
    52     form.reset();
    53     form.style.display = 'flex';
    54     document.getElementById(`loadingSection_${form.id}`).style.display = 'none'; // Hide loading
    55     document.getElementById(`downloadSection_${form.id}`).style.display = 'none'; // Hide download
    56     document.getElementById(`errorSection_${form.id}`).style.display = 'none'; // Hide error section
    57   }
    58   if (restartDownloadBtn) {
    59     restartDownloadBtn.addEventListener('click', resetForm);
    60   }
    61   if (restartErrorBtn) {
    62     restartErrorBtn.addEventListener('click', resetForm);
    63   }
    64 });
    65 function pollStatus(id, formId) {
    66   const loadingSection = document.getElementById(`loadingSection_${formId}`);
    67   const errorSection = document.getElementById(`errorSection_${formId}`);
    68   const resultMessage = document.getElementById(`resultMessage_${formId}`);
    69   const downloadSection = document.getElementById(`downloadSection_${formId}`);
    70   const downloadFilesContainer = document.getElementById(`downloadFilesContainer_${formId}`);
    71   function checkStatus() {
    72     fetch(`${wpApiSettings.root}password-protect-pdf/v1/status/${id}`).then(response => response.json()).then(data => {
    73       if (data.status === 'done') {
    74         loadingSection.style.display = 'none';
    75         downloadFilesContainer.innerHTML = ''; // Clear previous downloads
    76 
    77         if (data.output && data.output.files && data.output.files.length > 0) {
    78           data.output.files.forEach(file => {
    79             // Create download button
    80             const downloadButton = document.createElement('button');
    81             downloadButton.type = 'button';
    82             downloadButton.className = 'solution__btn';
    83             downloadButton.innerHTML = `
    84                                 <div class="dashicons dashicons-download"></div>
    85                                 <span class="solution__download-file-name">${file.name}</span>
    86                             `;
    87 
    88             // Set download functionality
    89             downloadButton.addEventListener('click', event => {
    90               event.preventDefault();
    91               const anchor = document.createElement('a');
    92               anchor.href = file.path;
    93               anchor.target = '_blank';
    94               document.body.appendChild(anchor);
    95               anchor.click();
    96               document.body.removeChild(anchor);
    97             });
    98 
    99             // Append elements to the container
    100             const fileContainer = document.createElement('div');
    101             fileContainer.className = 'solution__download-file-container';
    102             fileContainer.appendChild(downloadButton);
    103             downloadFilesContainer.appendChild(fileContainer);
    104           });
    105           downloadSection.style.display = 'flex'; // Show download section
    106         } else {
    107           errorSection.style.display = 'flex';
    108           resultMessage.innerText = 'No files available for download.';
    109         }
    110       } else if (data.status === 'error') {
    111         throw new Error('Processing failed: ' + data.message);
    112       } else {
    113         setTimeout(checkStatus, 500);
    114       }
    115     }).catch(() => {
    116       loadingSection.style.display = 'none';
    117       errorSection.style.display = 'flex'; // Show error section
    118       resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    119     });
    120   }
    121   checkStatus();
    122 }
    123 /******/ })()
    124 ;
    125 //# sourceMappingURL=view.js.map
     1document.querySelectorAll(".solution__password-protect-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="userPass"]'),s=document.getElementById(`loadingSection_${n}`),l=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",s.style.display="flex",l.style.display="none",r.style.display="none";const i=new FormData;Array.from(o.files).forEach(((e,t)=>{i.append(`file[${t}]`,e)})),i.append("userPass",d.value),i.append("protectPDFFormNonce",wpApiSettingsPasswordProtectPDF.protectPDFNonce),fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/send-data`,{method:"POST",body:i}).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(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/status/${e}`,{method:"GET",headers:{"X-WP-Nonce":wpApiSettingsPasswordProtectPDF.protectPDFNonce,"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):(s.style.display="none",l.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{s.style.display="none",l.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)}));
  • password-protect-pdf/tags/1.0.1/includes/process-machine.php

    r3237558 r3260525  
    127127// Check status of processing task
    128128function cross_service_solutions_password_protect_pdf_check_status($request) {
     129    $nonce = $request->get_header('X-WP-Nonce');
     130    if (!$nonce || !wp_verify_nonce($nonce, 'password_protect_pdf_form_nonce_action')) {
     131        return new WP_Error('nonce_invalid', 'Nonce verification failed', array(
     132            'status' => 403,
     133            'message' => 'The provided nonce is invalid or expired. Please refresh and try again.'
     134        ));
     135    }
     136
    129137    $api_key = esc_attr(get_option('cross_service_solutions_api_key'));
    130138    $id = sanitize_text_field($request['id']);
  • password-protect-pdf/tags/1.0.1/languages/password-protect-pdf.pot

    r3250041 r3260525  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Password Protect PDF with Cross Service Solutions integration 1.0.0\n"
     5"Project-Id-Version: Password Protect PDF with Cross Service Solutions integration 1.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/password-protect-pdf\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • password-protect-pdf/tags/1.0.1/password-protect-pdf.php

    r3237558 r3260525  
    55 * Requires at least: 6.6
    66 * Requires PHP:      7.2
    7  * Version:           1.0.0
     7 * Version:           1.0.1
    88 * Author:            Cross Service Solutions
    99 * License:           GPL-2.0-or-later
     
    103103function cross_service_solutions_password_protect_pdf_localize_script() {
    104104    // Localize the script registered by the viewScript in block.json
    105     wp_localize_script('create-block-password-protect-pdf-view-script', 'wpApiSettings', array(
     105    wp_localize_script('create-block-password-protect-pdf-view-script', 'wpApiSettingsPasswordProtectPDF', array(
    106106        'root' => esc_url_raw(rest_url()),
    107107        'protectPDFNonce' => wp_create_nonce('password_protect_pdf_form_nonce_action'),
  • password-protect-pdf/tags/1.0.1/readme.txt

    r3250041 r3260525  
    55Requires at least: 5.0
    66Tested up to: 6.7
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    9292== Changelog ==
    9393
     94= 1.0.1 =
     95* Implemented nonce validation for polling status GET request.
     96* Ensuring the global object in JavaScript is unique.
     97
    9498= 1.0.0 =
    9599* Initial release of the Protect PDF plugin.
  • password-protect-pdf/tags/1.0.1/src/block.json

    r3237558 r3260525  
    33    "apiVersion": 3,
    44    "name": "create-block/password-protect-pdf",
    5     "version": "1.0.0",
     5    "version": "1.0.1",
    66    "title": "Password Protect PDF",
    77    "category": "widgets",
  • password-protect-pdf/tags/1.0.1/src/view.js

    r3237558 r3260525  
    3030        });
    3131        formData.append('userPass', passwordInput.value);
    32         formData.append('protectPDFFormNonce', wpApiSettings.protectPDFNonce);
     32        formData.append('protectPDFFormNonce', wpApiSettingsPasswordProtectPDF.protectPDFNonce);
    3333
    34         fetch(`${wpApiSettings.root}password-protect-pdf/v1/send-data`, {
     34        fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/send-data`, {
    3535            method: 'POST',
    3636            body: formData,
     
    9393
    9494    function checkStatus() {
    95         fetch(`${wpApiSettings.root}password-protect-pdf/v1/status/${id}`)
     95        fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/status/${id}`, {
     96            method: 'GET',
     97            headers: {
     98                'X-WP-Nonce': wpApiSettingsPasswordProtectPDF.protectPDFNonce,
     99                'Content-Type': 'application/json'
     100            }
     101        })
    96102            .then((response) => response.json())
    97103            .then((data) => {
  • password-protect-pdf/trunk/build/block.json

    r3237558 r3260525  
    33  "apiVersion": 3,
    44  "name": "create-block/password-protect-pdf",
    5   "version": "1.0.0",
     5  "version": "1.0.1",
    66  "title": "Password Protect PDF",
    77  "category": "widgets",
  • password-protect-pdf/trunk/build/index-rtl.css

    r3237558 r3260525  
    1 /*!****************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
    3   \****************************************************************************************************************************************************************************************************************************************************/
    4 .solution__password-protect-pdf {
    5   margin: 1rem;
    6 }
     1.solution__password-protect-pdf{margin:1rem}
  • password-protect-pdf/trunk/build/index.asset.php

    r3237558 r3260525  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'ffad450162394797c1ec');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'e7b17c84ae730aaa936e');
  • password-protect-pdf/trunk/build/index.css

    r3237558 r3260525  
    1 /*!****************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
    3   \****************************************************************************************************************************************************************************************************************************************************/
    4 .solution__password-protect-pdf {
    5   margin: 1rem;
    6 }
    7 
    8 /*# sourceMappingURL=index.css.map*/
     1.solution__password-protect-pdf{margin:1rem}
  • password-protect-pdf/trunk/build/index.js

    r3237558 r3260525  
    1 /******/ (() => { // webpackBootstrap
    2 /******/    "use strict";
    3 /******/    var __webpack_modules__ = ({
    4 
    5 /***/ "./src/edit.js":
    6 /*!*********************!*\
    7   !*** ./src/edit.js ***!
    8   \*********************/
    9 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    10 
    11 __webpack_require__.r(__webpack_exports__);
    12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
    13 /* harmony export */   "default": () => (/* binding */ Edit),
    14 /* harmony export */   passwordProtectPDFIcon: () => (/* binding */ passwordProtectPDFIcon)
    15 /* harmony export */ });
    16 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
    17 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
    18 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
    19 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
    20 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
    21 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
    22 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
    23 /**
    24  * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
    25  * Those files can contain any CSS code that gets applied to the editor.
    26  *
    27  * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
    28  */
    29 
    30 
    31 
    32 
    33 function Edit() {
    34   return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('div', null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    35     className: "solution__password-protect-pdf",
    36     children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    37       className: "solution__container__wrapper",
    38       children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
    39         className: "solution__container",
    40         children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
    41           className: "solution__header",
    42           children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Password Protect PDF', 'password-protect-pdf')
    43         }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
    44           className: "solution__form",
    45           children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("label", {
    46             htmlFor: "file",
    47             className: "solution__label",
    48             children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
    49               children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('File:', 'password-protect-pdf')
    50             }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
    51               type: "file",
    52               id: "file",
    53               name: "file",
    54               required: true,
    55               className: "solution__file-input",
    56               disabled: true
    57             })]
    58           }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("label", {
    59             htmlFor: "password",
    60             className: "solution__label",
    61             children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
    62               children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Password:', 'password-protect-pdf')
    63             }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
    64               type: "text",
    65               id: "password",
    66               name: "password",
    67               required: true,
    68               className: "solution__input",
    69               disabled: true
    70             })]
    71           }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("button", {
    72             disabled: true,
    73             className: "solution__btn",
    74             children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Submit', 'password-protect-pdf')
    75           })]
    76         })]
    77       })
    78     })
    79   }));
    80 }
    81 const passwordProtectPDFIcon = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('svg', {
    82   width: 32,
    83   height: 33,
    84   viewBox: "0 0 32 33",
    85   fill: "none",
    86   xmlns: "http://www.w3.org/2000/svg"
    87 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('rect', {
    88   y: "0.5",
    89   width: "32.0014",
    90   height: "32.0014",
    91   rx: "16.0007",
    92   fill: "#FFDEEB"
    93 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('path', {
    94   d: "M11.5558 24.2785C11.1484 24.2785 10.7996 24.1335 10.5094 23.8433C10.2193 23.5532 10.0742 23.2044 10.0742 22.797V15.3895C10.0742 14.982 10.2193 14.6333 10.5094 14.3431C10.7996 14.053 11.1484 13.9079 11.5558 13.9079H12.2966V12.4264C12.2966 11.4017 12.6577 10.5282 13.38 9.80601C14.1023 9.08377 14.9758 8.72266 16.0005 8.72266C17.0253 8.72266 17.8988 9.08377 18.6211 9.80601C19.3434 10.5282 19.7045 11.4017 19.7045 12.4264V13.9079H20.4453C20.8527 13.9079 21.2015 14.053 21.4916 14.3431C21.7818 14.6333 21.9269 14.982 21.9269 15.3895V22.797C21.9269 23.2044 21.7818 23.5532 21.4916 23.8433C21.2015 24.1335 20.8527 24.2785 20.4453 24.2785H11.5558ZM11.5558 22.797H20.4453V15.3895H11.5558V22.797ZM16.0005 20.5747C16.408 20.5747 16.7568 20.4297 17.0469 20.1396C17.337 19.8494 17.4821 19.5007 17.4821 19.0932C17.4821 18.6858 17.337 18.337 17.0469 18.0469C16.7568 17.7568 16.408 17.6117 16.0005 17.6117C15.5931 17.6117 15.2443 17.7568 14.9542 18.0469C14.664 18.337 14.519 18.6858 14.519 19.0932C14.519 19.5007 14.664 19.8494 14.9542 20.1396C15.2443 20.4297 15.5931 20.5747 16.0005 20.5747ZM13.7782 13.9079H18.2229V12.4264C18.2229 11.8091 18.0068 11.2844 17.5747 10.8523C17.1426 10.4202 16.6179 10.2042 16.0005 10.2042C15.3832 10.2042 14.8585 10.4202 14.4264 10.8523C13.9942 11.2844 13.7782 11.8091 13.7782 12.4264V13.9079Z",
    95   fill: "#A61E4D"
    96 }));
    97 
    98 /***/ }),
    99 
    100 /***/ "./src/index.js":
    101 /*!**********************!*\
    102   !*** ./src/index.js ***!
    103   \**********************/
    104 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    105 
    106 __webpack_require__.r(__webpack_exports__);
    107 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
    108 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
    109 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
    110 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/edit.js");
    111 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/block.json");
    112 
    113 
    114 
    115 
    116 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, {
    117   icon: _edit__WEBPACK_IMPORTED_MODULE_2__.passwordProtectPDFIcon,
    118   edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"]
    119 });
    120 
    121 /***/ }),
    122 
    123 /***/ "./src/editor.scss":
    124 /*!*************************!*\
    125   !*** ./src/editor.scss ***!
    126   \*************************/
    127 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    128 
    129 __webpack_require__.r(__webpack_exports__);
    130 // extracted by mini-css-extract-plugin
    131 
    132 
    133 /***/ }),
    134 
    135 /***/ "./src/style.scss":
    136 /*!************************!*\
    137   !*** ./src/style.scss ***!
    138   \************************/
    139 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
    140 
    141 __webpack_require__.r(__webpack_exports__);
    142 // extracted by mini-css-extract-plugin
    143 
    144 
    145 /***/ }),
    146 
    147 /***/ "react/jsx-runtime":
    148 /*!**********************************!*\
    149   !*** external "ReactJSXRuntime" ***!
    150   \**********************************/
    151 /***/ ((module) => {
    152 
    153 module.exports = window["ReactJSXRuntime"];
    154 
    155 /***/ }),
    156 
    157 /***/ "@wordpress/blocks":
    158 /*!********************************!*\
    159   !*** external ["wp","blocks"] ***!
    160   \********************************/
    161 /***/ ((module) => {
    162 
    163 module.exports = window["wp"]["blocks"];
    164 
    165 /***/ }),
    166 
    167 /***/ "@wordpress/element":
    168 /*!*********************************!*\
    169   !*** external ["wp","element"] ***!
    170   \*********************************/
    171 /***/ ((module) => {
    172 
    173 module.exports = window["wp"]["element"];
    174 
    175 /***/ }),
    176 
    177 /***/ "@wordpress/i18n":
    178 /*!******************************!*\
    179   !*** external ["wp","i18n"] ***!
    180   \******************************/
    181 /***/ ((module) => {
    182 
    183 module.exports = window["wp"]["i18n"];
    184 
    185 /***/ }),
    186 
    187 /***/ "./src/block.json":
    188 /*!************************!*\
    189   !*** ./src/block.json ***!
    190   \************************/
    191 /***/ ((module) => {
    192 
    193 module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"create-block/password-protect-pdf","version":"1.0.0","title":"Password Protect PDF","category":"widgets","description":"Easily create password-protected PDF files, allowing you to protect and edit their contents seamlessly.","example":{},"supports":{"html":false},"textdomain":"password-protect-pdf","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","viewScript":"file:./view.js"}');
    194 
    195 /***/ })
    196 
    197 /******/    });
    198 /************************************************************************/
    199 /******/    // The module cache
    200 /******/    var __webpack_module_cache__ = {};
    201 /******/   
    202 /******/    // The require function
    203 /******/    function __webpack_require__(moduleId) {
    204 /******/        // Check if module is in cache
    205 /******/        var cachedModule = __webpack_module_cache__[moduleId];
    206 /******/        if (cachedModule !== undefined) {
    207 /******/            return cachedModule.exports;
    208 /******/        }
    209 /******/        // Create a new module (and put it into the cache)
    210 /******/        var module = __webpack_module_cache__[moduleId] = {
    211 /******/            // no module.id needed
    212 /******/            // no module.loaded needed
    213 /******/            exports: {}
    214 /******/        };
    215 /******/   
    216 /******/        // Execute the module function
    217 /******/        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
    218 /******/   
    219 /******/        // Return the exports of the module
    220 /******/        return module.exports;
    221 /******/    }
    222 /******/   
    223 /******/    // expose the modules object (__webpack_modules__)
    224 /******/    __webpack_require__.m = __webpack_modules__;
    225 /******/   
    226 /************************************************************************/
    227 /******/    /* webpack/runtime/chunk loaded */
    228 /******/    (() => {
    229 /******/        var deferred = [];
    230 /******/        __webpack_require__.O = (result, chunkIds, fn, priority) => {
    231 /******/            if(chunkIds) {
    232 /******/                priority = priority || 0;
    233 /******/                for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
    234 /******/                deferred[i] = [chunkIds, fn, priority];
    235 /******/                return;
    236 /******/            }
    237 /******/            var notFulfilled = Infinity;
    238 /******/            for (var i = 0; i < deferred.length; i++) {
    239 /******/                var chunkIds = deferred[i][0];
    240 /******/                var fn = deferred[i][1];
    241 /******/                var priority = deferred[i][2];
    242 /******/                var fulfilled = true;
    243 /******/                for (var j = 0; j < chunkIds.length; j++) {
    244 /******/                    if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
    245 /******/                        chunkIds.splice(j--, 1);
    246 /******/                    } else {
    247 /******/                        fulfilled = false;
    248 /******/                        if(priority < notFulfilled) notFulfilled = priority;
    249 /******/                    }
    250 /******/                }
    251 /******/                if(fulfilled) {
    252 /******/                    deferred.splice(i--, 1)
    253 /******/                    var r = fn();
    254 /******/                    if (r !== undefined) result = r;
    255 /******/                }
    256 /******/            }
    257 /******/            return result;
    258 /******/        };
    259 /******/    })();
    260 /******/   
    261 /******/    /* webpack/runtime/compat get default export */
    262 /******/    (() => {
    263 /******/        // getDefaultExport function for compatibility with non-harmony modules
    264 /******/        __webpack_require__.n = (module) => {
    265 /******/            var getter = module && module.__esModule ?
    266 /******/                () => (module['default']) :
    267 /******/                () => (module);
    268 /******/            __webpack_require__.d(getter, { a: getter });
    269 /******/            return getter;
    270 /******/        };
    271 /******/    })();
    272 /******/   
    273 /******/    /* webpack/runtime/define property getters */
    274 /******/    (() => {
    275 /******/        // define getter functions for harmony exports
    276 /******/        __webpack_require__.d = (exports, definition) => {
    277 /******/            for(var key in definition) {
    278 /******/                if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    279 /******/                    Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    280 /******/                }
    281 /******/            }
    282 /******/        };
    283 /******/    })();
    284 /******/   
    285 /******/    /* webpack/runtime/hasOwnProperty shorthand */
    286 /******/    (() => {
    287 /******/        __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
    288 /******/    })();
    289 /******/   
    290 /******/    /* webpack/runtime/make namespace object */
    291 /******/    (() => {
    292 /******/        // define __esModule on exports
    293 /******/        __webpack_require__.r = (exports) => {
    294 /******/            if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    295 /******/                Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    296 /******/            }
    297 /******/            Object.defineProperty(exports, '__esModule', { value: true });
    298 /******/        };
    299 /******/    })();
    300 /******/   
    301 /******/    /* webpack/runtime/jsonp chunk loading */
    302 /******/    (() => {
    303 /******/        // no baseURI
    304 /******/       
    305 /******/        // object to store loaded and loading chunks
    306 /******/        // undefined = chunk not loaded, null = chunk preloaded/prefetched
    307 /******/        // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
    308 /******/        var installedChunks = {
    309 /******/            "index": 0,
    310 /******/            "./style-index": 0
    311 /******/        };
    312 /******/       
    313 /******/        // no chunk on demand loading
    314 /******/       
    315 /******/        // no prefetching
    316 /******/       
    317 /******/        // no preloaded
    318 /******/       
    319 /******/        // no HMR
    320 /******/       
    321 /******/        // no HMR manifest
    322 /******/       
    323 /******/        __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
    324 /******/       
    325 /******/        // install a JSONP callback for chunk loading
    326 /******/        var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
    327 /******/            var chunkIds = data[0];
    328 /******/            var moreModules = data[1];
    329 /******/            var runtime = data[2];
    330 /******/            // add "moreModules" to the modules object,
    331 /******/            // then flag all "chunkIds" as loaded and fire callback
    332 /******/            var moduleId, chunkId, i = 0;
    333 /******/            if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
    334 /******/                for(moduleId in moreModules) {
    335 /******/                    if(__webpack_require__.o(moreModules, moduleId)) {
    336 /******/                        __webpack_require__.m[moduleId] = moreModules[moduleId];
    337 /******/                    }
    338 /******/                }
    339 /******/                if(runtime) var result = runtime(__webpack_require__);
    340 /******/            }
    341 /******/            if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
    342 /******/            for(;i < chunkIds.length; i++) {
    343 /******/                chunkId = chunkIds[i];
    344 /******/                if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
    345 /******/                    installedChunks[chunkId][0]();
    346 /******/                }
    347 /******/                installedChunks[chunkId] = 0;
    348 /******/            }
    349 /******/            return __webpack_require__.O(result);
    350 /******/        }
    351 /******/       
    352 /******/        var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
    353 /******/        chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
    354 /******/        chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
    355 /******/    })();
    356 /******/   
    357 /************************************************************************/
    358 /******/   
    359 /******/    // startup
    360 /******/    // Load entry module and return exports
    361 /******/    // This entry module depends on other loaded chunks and execution need to be delayed
    362 /******/    var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], () => (__webpack_require__("./src/index.js")))
    363 /******/    __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
    364 /******/   
    365 /******/ })()
    366 ;
    367 //# sourceMappingURL=index.js.map
     1(()=>{"use strict";var e,s={354:()=>{const e=window.wp.blocks,s=window.wp.element,r=window.wp.i18n,t=window.ReactJSXRuntime,i=(0,s.createElement)("svg",{width:32,height:33,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)("rect",{y:"0.5",width:"32.0014",height:"32.0014",rx:"16.0007",fill:"#FFDEEB"}),(0,s.createElement)("path",{d:"M11.5558 24.2785C11.1484 24.2785 10.7996 24.1335 10.5094 23.8433C10.2193 23.5532 10.0742 23.2044 10.0742 22.797V15.3895C10.0742 14.982 10.2193 14.6333 10.5094 14.3431C10.7996 14.053 11.1484 13.9079 11.5558 13.9079H12.2966V12.4264C12.2966 11.4017 12.6577 10.5282 13.38 9.80601C14.1023 9.08377 14.9758 8.72266 16.0005 8.72266C17.0253 8.72266 17.8988 9.08377 18.6211 9.80601C19.3434 10.5282 19.7045 11.4017 19.7045 12.4264V13.9079H20.4453C20.8527 13.9079 21.2015 14.053 21.4916 14.3431C21.7818 14.6333 21.9269 14.982 21.9269 15.3895V22.797C21.9269 23.2044 21.7818 23.5532 21.4916 23.8433C21.2015 24.1335 20.8527 24.2785 20.4453 24.2785H11.5558ZM11.5558 22.797H20.4453V15.3895H11.5558V22.797ZM16.0005 20.5747C16.408 20.5747 16.7568 20.4297 17.0469 20.1396C17.337 19.8494 17.4821 19.5007 17.4821 19.0932C17.4821 18.6858 17.337 18.337 17.0469 18.0469C16.7568 17.7568 16.408 17.6117 16.0005 17.6117C15.5931 17.6117 15.2443 17.7568 14.9542 18.0469C14.664 18.337 14.519 18.6858 14.519 19.0932C14.519 19.5007 14.664 19.8494 14.9542 20.1396C15.2443 20.4297 15.5931 20.5747 16.0005 20.5747ZM13.7782 13.9079H18.2229V12.4264C18.2229 11.8091 18.0068 11.2844 17.5747 10.8523C17.1426 10.4202 16.6179 10.2042 16.0005 10.2042C15.3832 10.2042 14.8585 10.4202 14.4264 10.8523C13.9942 11.2844 13.7782 11.8091 13.7782 12.4264V13.9079Z",fill:"#A61E4D"})),l=JSON.parse('{"UU":"create-block/password-protect-pdf"}');(0,e.registerBlockType)(l.UU,{icon:i,edit:function(){return(0,s.createElement)("div",null,(0,t.jsx)("div",{className:"solution__password-protect-pdf",children:(0,t.jsx)("div",{className:"solution__container__wrapper",children:(0,t.jsxs)("div",{className:"solution__container",children:[(0,t.jsx)("div",{className:"solution__header",children:(0,r.__)("Password Protect PDF","password-protect-pdf")}),(0,t.jsxs)("div",{className:"solution__form",children:[(0,t.jsxs)("label",{htmlFor:"file",className:"solution__label",children:[(0,t.jsx)("span",{children:(0,r.__)("File:","password-protect-pdf")}),(0,t.jsx)("input",{type:"file",id:"file",name:"file",required:!0,className:"solution__file-input",disabled:!0})]}),(0,t.jsxs)("label",{htmlFor:"password",className:"solution__label",children:[(0,t.jsx)("span",{children:(0,r.__)("Password:","password-protect-pdf")}),(0,t.jsx)("input",{type:"text",id:"password",name:"password",required:!0,className:"solution__input",disabled:!0})]}),(0,t.jsx)("button",{disabled:!0,className:"solution__btn",children:(0,r.__)("Submit","password-protect-pdf")})]})]})})}))}})}},r={};function t(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return s[e](l,l.exports,t),l.exports}t.m=s,e=[],t.O=(s,r,i,l)=>{if(!r){var o=1/0;for(c=0;c<e.length;c++){r=e[c][0],i=e[c][1],l=e[c][2];for(var n=!0,a=0;a<r.length;a++)(!1&l||o>=l)&&Object.keys(t.O).every((e=>t.O[e](r[a])))?r.splice(a--,1):(n=!1,l<o&&(o=l));if(n){e.splice(c--,1);var d=i();void 0!==d&&(s=d)}}return s}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,i,l]},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={57:0,350:0};t.O.j=s=>0===e[s];var s=(s,r)=>{var i,l,o=r[0],n=r[1],a=r[2],d=0;if(o.some((s=>0!==e[s]))){for(i in n)t.o(n,i)&&(t.m[i]=n[i]);if(a)var c=a(t)}for(s&&s(r);d<o.length;d++)l=o[d],t.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return t.O(c)},r=self.webpackChunk=self.webpackChunk||[];r.forEach(s.bind(null,0)),r.push=s.bind(null,r.push.bind(r))})();var i=t.O(void 0,[350],(()=>t(354)));i=t.O(i)})();
  • password-protect-pdf/trunk/build/style-index-rtl.css

    r3237558 r3260525  
    1 /*!***************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
    3   \***************************************************************************************************************************************************************************************************************************************************/
    4 :root {
    5   --solution-password-protect-pdf-primary-color: #4f46e5;
    6   --solution-password-protect-pdf-secondary-color: #eef2ff;
    7   --solution-password-protect-pdf-tertiary-color: #000;
    8   --solution-password-protect-pdf-background-color: #fff;
    9   --solution-password-protect-pdf-border-color: #e5e7eb;
    10   --solution-password-protect-pdf-input-border-color: #d1d5db;
    11   --solution-password-protect-pdf-shadow-color: rgba(149, 157, 165, 0.2);
    12   --solution-password-protect-pdf-btn-shadow-color: rgba(0, 0, 0, 0.05);
    13   --solution-password-protect-pdf-dropdown-bg-color: #fff;
    14   --solution-password-protect-pdf-dropdown-shadow-color-1: rgba(0, 0, 0, 0.1);
    15   --solution-password-protect-pdf-dropdown-shadow-color-2: rgba(0, 0, 0, 0.1);
    16 }
    17 
    18 .solution__password-protect-pdf .solution__container-wrapper {
    19   padding: 1rem;
    20   display: flex;
    21   flex-direction: column;
    22   gap: 1rem;
    23   color: var(--solution-password-protect-pdf-tertiary-color);
    24 }
    25 .solution__password-protect-pdf .solution__container {
    26   box-shadow: var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;
    27   border: 1px solid var(--solution-password-protect-pdf-border-color);
    28   background-color: var(--solution-password-protect-pdf-background-color);
    29   border-radius: 0.75rem;
    30   padding: 1.5rem 1.5rem 0.5rem;
    31   position: relative;
    32   display: flex;
    33   flex-direction: column;
    34   min-height: 250px;
    35   gap: 1rem;
    36 }
    37 .solution__password-protect-pdf .solution__header {
    38   font-size: 1.25rem;
    39   letter-spacing: 0.05em;
    40   font-weight: 500;
    41 }
    42 .solution__password-protect-pdf .solution__content {
    43   flex-grow: 1;
    44   display: grid;
    45 }
    46 .solution__password-protect-pdf .solution__form {
    47   display: flex;
    48   flex-direction: column;
    49   gap: 1rem;
    50 }
    51 .solution__password-protect-pdf .solution__label {
    52   white-space: nowrap;
    53   width: 100%;
    54   font-size: 0.75rem;
    55   font-weight: 500;
    56   display: flex;
    57   flex-direction: column;
    58   gap: 0.3rem;
    59 }
    60 .solution__password-protect-pdf .solution__hint {
    61   font-size: 0.75rem;
    62   font-weight: 500;
    63   color: var(--solution-password-protect-pdf-primary-color);
    64   white-space: wrap;
    65 }
    66 .solution__password-protect-pdf .solution__input {
    67   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    68   border-radius: 0.375rem;
    69   padding: 0.25rem 0.5rem;
    70   font-size: 1rem;
    71   line-height: 32px;
    72   outline: 1px solid transparent;
    73   outline-offset: -1px;
    74 }
    75 .solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button {
    76   margin-left: 1rem;
    77   padding: 0.5rem 1rem;
    78   border-radius: 0.75rem;
    79   border: none;
    80   background-color: var(--solution-password-protect-pdf-secondary-color);
    81   color: var(--solution-password-protect-pdf-primary-color);
    82   font-weight: 500;
    83   cursor: pointer;
    84 }
    85 .solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button {
    86   background-color: var(--solution-password-protect-pdf-secondary-color);
    87 }
    88 .solution__password-protect-pdf .solution__btn {
    89   display: inline-flex;
    90   align-items: center; /* Ensures the icon and text are aligned */
    91   justify-content: center;
    92   gap: 0.5rem; /* Adds space between the icon and the text */
    93   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);
    94   background: var(--solution-password-protect-pdf-secondary-color);
    95   color: var(--solution-password-protect-pdf-primary-color);
    96   padding: 0.5rem 1rem;
    97   border-radius: 1rem;
    98   font-weight: 600;
    99   cursor: pointer;
    100   border: none;
    101 }
    102 .solution__password-protect-pdf .solution__btn:hover {
    103   filter: brightness(0.98);
    104 }
    105 .solution__password-protect-pdf .solution__btn .dashicons {
    106   font-size: 1.2rem; /* Adjust the size of the icon */
    107   vertical-align: middle; /* Aligns the icon vertically with the text */
    108 }
    109 .solution__password-protect-pdf .solution__dropdown-wrapper {
    110   position: relative;
    111 }
    112 .solution__password-protect-pdf .solution__dropdown {
    113   position: relative;
    114   overflow: visible;
    115   background-color: transparent;
    116   box-shadow: none;
    117   width: 100%;
    118   border-radius: 0.75rem;
    119   max-height: 15rem;
    120   z-index: 10;
    121 }
    122 .solution__password-protect-pdf .solution__dropdown--hidden {
    123   display: none;
    124 }
    125 .solution__password-protect-pdf .solution__loading-section {
    126   display: none;
    127   position: absolute;
    128   top: 50%;
    129   right: 50%;
    130   transform: translate(50%, -50%);
    131 }
    132 .solution__password-protect-pdf .solution__loading-container {
    133   display: flex;
    134   justify-content: center;
    135   align-items: center;
    136   gap: 1rem;
    137   transition: 2s ease;
    138 }
    139 .solution__password-protect-pdf .solution__download-section {
    140   display: flex;
    141   justify-content: center;
    142   align-items: center;
    143   flex-direction: column;
    144   gap: 2rem;
    145   height: 100%;
    146 }
    147 .solution__password-protect-pdf .solution__download-section:last-child {
    148   margin-top: auto;
    149 }
    150 .solution__password-protect-pdf .solution__download-container {
    151   display: flex;
    152   flex-direction: column;
    153   flex-grow: 1;
    154   justify-content: center;
    155   align-items: center;
    156   gap: 1rem;
    157 }
    158 .solution__password-protect-pdf .solution__download-file-container {
    159   display: flex;
    160   flex-wrap: wrap;
    161   justify-content: flex-start;
    162   gap: 1rem;
    163 }
    164 .solution__password-protect-pdf .solution__download-file-name {
    165   white-space: nowrap;
    166   overflow: hidden;
    167   text-overflow: ellipsis;
    168   max-width: 12rem;
    169 }
    170 .solution__password-protect-pdf .solution__title-text {
    171   font-weight: 600;
    172 }
    173 .solution__password-protect-pdf .solution__text {
    174   font-weight: 500;
    175 }
    176 .solution__password-protect-pdf .solution__provided-text {
    177   display: flex;
    178   justify-content: center;
    179   font-size: 0.7rem;
    180   margin-top: 0.5rem;
    181 }
    182 .solution__password-protect-pdf .solution__error-section {
    183   display: flex;
    184   flex-direction: column;
    185   justify-self: center;
    186   align-self: center;
    187 }
    188 .solution__password-protect-pdf .solution__dot {
    189   background: var(--solution-password-protect-pdf-tertiary-color);
    190   height: 0.65em;
    191   width: 0.65em;
    192   border-radius: 50%;
    193   animation: move 0.6s ease infinite;
    194 }
    195 .solution__password-protect-pdf .solution__link {
    196   color: var(--solution-password-protect-pdf-tertiary-color);
    197 }
    198 .solution__password-protect-pdf .solution__select {
    199   display: flex;
    200   flex-direction: column;
    201   position: relative;
    202   gap: 0.3rem;
    203   /* Placeholder color */
    204   /* Style for selected option */
    205 }
    206 .solution__password-protect-pdf .solution__select .solution__select-input {
    207   height: 42px;
    208   padding: 0 0.5rem;
    209   border-radius: 0.375rem;
    210   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    211   color: var(--solution-password-protect-pdf-tertiary-color);
    212   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);
    213   -webkit-appearance: none;
    214      -moz-appearance: none;
    215           appearance: none;
    216   cursor: pointer;
    217   /* Arrow styling */
    218   background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");
    219   background-repeat: no-repeat;
    220   background-position: left 1rem center;
    221   background-size: 1rem;
    222 }
    223 .solution__password-protect-pdf .solution__select .solution__select-input:focus {
    224   outline: 1px solid var(--solution-password-protect-pdf-primary-color);
    225   box-shadow: 0 0 0 3px var(--solution-password-protect-pdf-secondary-color);
    226 }
    227 .solution__password-protect-pdf .solution__select .solution__select-input option {
    228   padding: 1rem;
    229 }
    230 .solution__password-protect-pdf .solution__select .solution__select-input option[disabled] {
    231   color: var(--solution-password-protect-pdf-input-border-color);
    232 }
    233 .solution__password-protect-pdf .solution__select .solution__select-input:required:invalid {
    234   color: var(--solution-password-protect-pdf-input-border-color);
    235 }
    236 .solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]) {
    237   color: var(--solution-password-protect-pdf-tertiary-color);
    238 }
    239 .solution__password-protect-pdf .solution_dropdown button {
    240   width: 100%;
    241 }
    242 .solution__password-protect-pdf .solution__dropdown-content {
    243   display: none;
    244   position: absolute;
    245   flex-direction: column;
    246   min-width: 100%;
    247   max-height: 150px;
    248   padding: 0.5rem 0;
    249   overflow: auto;
    250   background-color: #fff;
    251   box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    252   z-index: 10;
    253   margin-top: 3px;
    254   border-radius: 10px;
    255   top: 100%;
    256   right: 50%;
    257   transform: translate(50%, 0);
    258 }
    259 .solution__password-protect-pdf .solution__dropdown-content label {
    260   display: block;
    261   margin-top: 10px;
    262   padding: 0 1rem;
    263 }
    264 .solution__password-protect-pdf .solution__dropdown-button {
    265   min-width: 100%;
    266 }
    267 .solution__password-protect-pdf .solution__dropdown-content:hover,
    268 .solution__password-protect-pdf .solution__dropdown-button:focus + .solution__dropdown-content {
    269   display: flex;
    270 }
    271 .solution__password-protect-pdf .solution__group {
    272   display: flex;
    273   flex-wrap: wrap;
    274   gap: 10px;
    275 }
    276 .solution__password-protect-pdf .solution__group > div,
    277 .solution__password-protect-pdf .solution__group > label {
    278   flex: 1;
    279 }
    280 
    281 @keyframes move {
    282   0% {
    283     transform: translateX(-50%);
    284   }
    285   50% {
    286     transform: translateX(50%);
    287   }
    288   100% {
    289     transform: translateX(-50%);
    290   }
    291 }
     1:root{--solution-password-protect-pdf-primary-color:#4f46e5;--solution-password-protect-pdf-secondary-color:#eef2ff;--solution-password-protect-pdf-tertiary-color:#000;--solution-password-protect-pdf-background-color:#fff;--solution-password-protect-pdf-border-color:#e5e7eb;--solution-password-protect-pdf-input-border-color:#d1d5db;--solution-password-protect-pdf-shadow-color:hsla(210,8%,62%,.2);--solution-password-protect-pdf-btn-shadow-color:rgba(0,0,0,.05);--solution-password-protect-pdf-dropdown-bg-color:#fff;--solution-password-protect-pdf-dropdown-shadow-color-1:rgba(0,0,0,.1);--solution-password-protect-pdf-dropdown-shadow-color-2:rgba(0,0,0,.1)}.solution__password-protect-pdf .solution__container-wrapper{color:var(--solution-password-protect-pdf-tertiary-color);display:flex;flex-direction:column;gap:1rem;padding:1rem}.solution__password-protect-pdf .solution__container{background-color:var(--solution-password-protect-pdf-background-color);border:1px solid var(--solution-password-protect-pdf-border-color);border-radius:.75rem;box-shadow:var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;display:flex;flex-direction:column;gap:1rem;min-height:250px;padding:1.5rem 1.5rem .5rem;position:relative}.solution__password-protect-pdf .solution__header{font-size:1.25rem;font-weight:500;letter-spacing:.05em}.solution__password-protect-pdf .solution__content{display:grid;flex-grow:1}.solution__password-protect-pdf .solution__form{display:flex;flex-direction:column;gap:1rem}.solution__password-protect-pdf .solution__label{display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.3rem;white-space:nowrap;width:100%}.solution__password-protect-pdf .solution__hint{color:var(--solution-password-protect-pdf-primary-color);font-size:.75rem;font-weight:500;white-space:wrap}.solution__password-protect-pdf .solution__input{border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;font-size:1rem;line-height:32px;outline:1px solid transparent;outline-offset:-1px;padding:.25rem .5rem}.solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:.75rem;color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;font-weight:500;margin-left:1rem;padding:.5rem 1rem}.solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color)}.solution__password-protect-pdf .solution__btn{align-items:center;background:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:1rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;display:inline-flex;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem 1rem}.solution__password-protect-pdf .solution__btn:hover{filter:brightness(.98)}.solution__password-protect-pdf .solution__btn .dashicons{font-size:1.2rem;vertical-align:middle}.solution__password-protect-pdf .solution__dropdown-wrapper{position:relative}.solution__password-protect-pdf .solution__dropdown{background-color:transparent;border-radius:.75rem;box-shadow:none;max-height:15rem;overflow:visible;position:relative;width:100%;z-index:10}.solution__password-protect-pdf .solution__dropdown--hidden{display:none}.solution__password-protect-pdf .solution__loading-section{display:none;right:50%;position:absolute;top:50%;transform:translate(50%,-50%)}.solution__password-protect-pdf .solution__loading-container{align-items:center;display:flex;gap:1rem;justify-content:center;transition:2s ease}.solution__password-protect-pdf .solution__download-section{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center}.solution__password-protect-pdf .solution__download-section:last-child{margin-top:auto}.solution__password-protect-pdf .solution__download-container{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:1rem;justify-content:center}.solution__password-protect-pdf .solution__download-file-container{display:flex;flex-wrap:wrap;gap:1rem;justify-content:flex-start}.solution__password-protect-pdf .solution__download-file-name{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.solution__password-protect-pdf .solution__title-text{font-weight:600}.solution__password-protect-pdf .solution__text{font-weight:500}.solution__password-protect-pdf .solution__provided-text{display:flex;font-size:.7rem;justify-content:center;margin-top:.5rem}.solution__password-protect-pdf .solution__error-section{align-self:center;display:flex;flex-direction:column;justify-self:center}.solution__password-protect-pdf .solution__dot{animation:move .6s ease infinite;background:var(--solution-password-protect-pdf-tertiary-color);border-radius:50%;height:.65em;width:.65em}.solution__password-protect-pdf .solution__link{color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution__select{display:flex;flex-direction:column;gap:.3rem;position:relative}.solution__password-protect-pdf .solution__select .solution__select-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");background-position:left 1rem center;background-repeat:no-repeat;background-size:1rem;border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);color:var(--solution-password-protect-pdf-tertiary-color);cursor:pointer;height:42px;padding:0 .5rem}.solution__password-protect-pdf .solution__select .solution__select-input:focus{box-shadow:0 0 0 3px var(--solution-password-protect-pdf-secondary-color);outline:1px solid var(--solution-password-protect-pdf-primary-color)}.solution__password-protect-pdf .solution__select .solution__select-input option{padding:1rem}.solution__password-protect-pdf .solution__select .solution__select-input option[disabled]{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input:required:invalid{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]){color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution_dropdown button{width:100%}.solution__password-protect-pdf .solution__dropdown-content{background-color:#fff;border-radius:10px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;flex-direction:column;right:50%;margin-top:3px;max-height:150px;min-width:100%;overflow:auto;padding:.5rem 0;position:absolute;top:100%;transform:translate(50%);z-index:10}.solution__password-protect-pdf .solution__dropdown-content label{display:block;margin-top:10px;padding:0 1rem}.solution__password-protect-pdf .solution__dropdown-button{min-width:100%}.solution__password-protect-pdf .solution__dropdown-button:focus+.solution__dropdown-content,.solution__password-protect-pdf .solution__dropdown-content:hover{display:flex}.solution__password-protect-pdf .solution__group{display:flex;flex-wrap:wrap;gap:10px}.solution__password-protect-pdf .solution__group>div,.solution__password-protect-pdf .solution__group>label{flex:1}@keyframes move{0%{transform:translateX(-50%)}50%{transform:translateX(50%)}to{transform:translateX(-50%)}}
  • password-protect-pdf/trunk/build/style-index.css

    r3237558 r3260525  
    1 /*!***************************************************************************************************************************************************************************************************************************************************!*\
    2   !*** css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
    3   \***************************************************************************************************************************************************************************************************************************************************/
    4 :root {
    5   --solution-password-protect-pdf-primary-color: #4f46e5;
    6   --solution-password-protect-pdf-secondary-color: #eef2ff;
    7   --solution-password-protect-pdf-tertiary-color: #000;
    8   --solution-password-protect-pdf-background-color: #fff;
    9   --solution-password-protect-pdf-border-color: #e5e7eb;
    10   --solution-password-protect-pdf-input-border-color: #d1d5db;
    11   --solution-password-protect-pdf-shadow-color: rgba(149, 157, 165, 0.2);
    12   --solution-password-protect-pdf-btn-shadow-color: rgba(0, 0, 0, 0.05);
    13   --solution-password-protect-pdf-dropdown-bg-color: #fff;
    14   --solution-password-protect-pdf-dropdown-shadow-color-1: rgba(0, 0, 0, 0.1);
    15   --solution-password-protect-pdf-dropdown-shadow-color-2: rgba(0, 0, 0, 0.1);
    16 }
    17 
    18 .solution__password-protect-pdf .solution__container-wrapper {
    19   padding: 1rem;
    20   display: flex;
    21   flex-direction: column;
    22   gap: 1rem;
    23   color: var(--solution-password-protect-pdf-tertiary-color);
    24 }
    25 .solution__password-protect-pdf .solution__container {
    26   box-shadow: var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;
    27   border: 1px solid var(--solution-password-protect-pdf-border-color);
    28   background-color: var(--solution-password-protect-pdf-background-color);
    29   border-radius: 0.75rem;
    30   padding: 1.5rem 1.5rem 0.5rem;
    31   position: relative;
    32   display: flex;
    33   flex-direction: column;
    34   min-height: 250px;
    35   gap: 1rem;
    36 }
    37 .solution__password-protect-pdf .solution__header {
    38   font-size: 1.25rem;
    39   letter-spacing: 0.05em;
    40   font-weight: 500;
    41 }
    42 .solution__password-protect-pdf .solution__content {
    43   flex-grow: 1;
    44   display: grid;
    45 }
    46 .solution__password-protect-pdf .solution__form {
    47   display: flex;
    48   flex-direction: column;
    49   gap: 1rem;
    50 }
    51 .solution__password-protect-pdf .solution__label {
    52   white-space: nowrap;
    53   width: 100%;
    54   font-size: 0.75rem;
    55   font-weight: 500;
    56   display: flex;
    57   flex-direction: column;
    58   gap: 0.3rem;
    59 }
    60 .solution__password-protect-pdf .solution__hint {
    61   font-size: 0.75rem;
    62   font-weight: 500;
    63   color: var(--solution-password-protect-pdf-primary-color);
    64   white-space: wrap;
    65 }
    66 .solution__password-protect-pdf .solution__input {
    67   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    68   border-radius: 0.375rem;
    69   padding: 0.25rem 0.5rem;
    70   font-size: 1rem;
    71   line-height: 32px;
    72   outline: 1px solid transparent;
    73   outline-offset: -1px;
    74 }
    75 .solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button {
    76   margin-right: 1rem;
    77   padding: 0.5rem 1rem;
    78   border-radius: 0.75rem;
    79   border: none;
    80   background-color: var(--solution-password-protect-pdf-secondary-color);
    81   color: var(--solution-password-protect-pdf-primary-color);
    82   font-weight: 500;
    83   cursor: pointer;
    84 }
    85 .solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button {
    86   background-color: var(--solution-password-protect-pdf-secondary-color);
    87 }
    88 .solution__password-protect-pdf .solution__btn {
    89   display: inline-flex;
    90   align-items: center; /* Ensures the icon and text are aligned */
    91   justify-content: center;
    92   gap: 0.5rem; /* Adds space between the icon and the text */
    93   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);
    94   background: var(--solution-password-protect-pdf-secondary-color);
    95   color: var(--solution-password-protect-pdf-primary-color);
    96   padding: 0.5rem 1rem;
    97   border-radius: 1rem;
    98   font-weight: 600;
    99   cursor: pointer;
    100   border: none;
    101 }
    102 .solution__password-protect-pdf .solution__btn:hover {
    103   filter: brightness(0.98);
    104 }
    105 .solution__password-protect-pdf .solution__btn .dashicons {
    106   font-size: 1.2rem; /* Adjust the size of the icon */
    107   vertical-align: middle; /* Aligns the icon vertically with the text */
    108 }
    109 .solution__password-protect-pdf .solution__dropdown-wrapper {
    110   position: relative;
    111 }
    112 .solution__password-protect-pdf .solution__dropdown {
    113   position: relative;
    114   overflow: visible;
    115   background-color: transparent;
    116   box-shadow: none;
    117   width: 100%;
    118   border-radius: 0.75rem;
    119   max-height: 15rem;
    120   z-index: 10;
    121 }
    122 .solution__password-protect-pdf .solution__dropdown--hidden {
    123   display: none;
    124 }
    125 .solution__password-protect-pdf .solution__loading-section {
    126   display: none;
    127   position: absolute;
    128   top: 50%;
    129   left: 50%;
    130   transform: translate(-50%, -50%);
    131 }
    132 .solution__password-protect-pdf .solution__loading-container {
    133   display: flex;
    134   justify-content: center;
    135   align-items: center;
    136   gap: 1rem;
    137   transition: 2s ease;
    138 }
    139 .solution__password-protect-pdf .solution__download-section {
    140   display: flex;
    141   justify-content: center;
    142   align-items: center;
    143   flex-direction: column;
    144   gap: 2rem;
    145   height: 100%;
    146 }
    147 .solution__password-protect-pdf .solution__download-section:last-child {
    148   margin-top: auto;
    149 }
    150 .solution__password-protect-pdf .solution__download-container {
    151   display: flex;
    152   flex-direction: column;
    153   flex-grow: 1;
    154   justify-content: center;
    155   align-items: center;
    156   gap: 1rem;
    157 }
    158 .solution__password-protect-pdf .solution__download-file-container {
    159   display: flex;
    160   flex-wrap: wrap;
    161   justify-content: flex-start;
    162   gap: 1rem;
    163 }
    164 .solution__password-protect-pdf .solution__download-file-name {
    165   white-space: nowrap;
    166   overflow: hidden;
    167   text-overflow: ellipsis;
    168   max-width: 12rem;
    169 }
    170 .solution__password-protect-pdf .solution__title-text {
    171   font-weight: 600;
    172 }
    173 .solution__password-protect-pdf .solution__text {
    174   font-weight: 500;
    175 }
    176 .solution__password-protect-pdf .solution__provided-text {
    177   display: flex;
    178   justify-content: center;
    179   font-size: 0.7rem;
    180   margin-top: 0.5rem;
    181 }
    182 .solution__password-protect-pdf .solution__error-section {
    183   display: flex;
    184   flex-direction: column;
    185   justify-self: center;
    186   align-self: center;
    187 }
    188 .solution__password-protect-pdf .solution__dot {
    189   background: var(--solution-password-protect-pdf-tertiary-color);
    190   height: 0.65em;
    191   width: 0.65em;
    192   border-radius: 50%;
    193   animation: move 0.6s ease infinite;
    194 }
    195 .solution__password-protect-pdf .solution__link {
    196   color: var(--solution-password-protect-pdf-tertiary-color);
    197 }
    198 .solution__password-protect-pdf .solution__select {
    199   display: flex;
    200   flex-direction: column;
    201   position: relative;
    202   gap: 0.3rem;
    203   /* Placeholder color */
    204   /* Style for selected option */
    205 }
    206 .solution__password-protect-pdf .solution__select .solution__select-input {
    207   height: 42px;
    208   padding: 0 0.5rem;
    209   border-radius: 0.375rem;
    210   border: 1px solid var(--solution-password-protect-pdf-input-border-color);
    211   color: var(--solution-password-protect-pdf-tertiary-color);
    212   box-shadow: 0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);
    213   -webkit-appearance: none;
    214      -moz-appearance: none;
    215           appearance: none;
    216   cursor: pointer;
    217   /* Arrow styling */
    218   background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");
    219   background-repeat: no-repeat;
    220   background-position: right 1rem center;
    221   background-size: 1rem;
    222 }
    223 .solution__password-protect-pdf .solution__select .solution__select-input:focus {
    224   outline: 1px solid var(--solution-password-protect-pdf-primary-color);
    225   box-shadow: 0 0 0 3px var(--solution-password-protect-pdf-secondary-color);
    226 }
    227 .solution__password-protect-pdf .solution__select .solution__select-input option {
    228   padding: 1rem;
    229 }
    230 .solution__password-protect-pdf .solution__select .solution__select-input option[disabled] {
    231   color: var(--solution-password-protect-pdf-input-border-color);
    232 }
    233 .solution__password-protect-pdf .solution__select .solution__select-input:required:invalid {
    234   color: var(--solution-password-protect-pdf-input-border-color);
    235 }
    236 .solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]) {
    237   color: var(--solution-password-protect-pdf-tertiary-color);
    238 }
    239 .solution__password-protect-pdf .solution_dropdown button {
    240   width: 100%;
    241 }
    242 .solution__password-protect-pdf .solution__dropdown-content {
    243   display: none;
    244   position: absolute;
    245   flex-direction: column;
    246   min-width: 100%;
    247   max-height: 150px;
    248   padding: 0.5rem 0;
    249   overflow: auto;
    250   background-color: #fff;
    251   box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    252   z-index: 10;
    253   margin-top: 3px;
    254   border-radius: 10px;
    255   top: 100%;
    256   left: 50%;
    257   transform: translate(-50%, 0);
    258 }
    259 .solution__password-protect-pdf .solution__dropdown-content label {
    260   display: block;
    261   margin-top: 10px;
    262   padding: 0 1rem;
    263 }
    264 .solution__password-protect-pdf .solution__dropdown-button {
    265   min-width: 100%;
    266 }
    267 .solution__password-protect-pdf .solution__dropdown-content:hover,
    268 .solution__password-protect-pdf .solution__dropdown-button:focus + .solution__dropdown-content {
    269   display: flex;
    270 }
    271 .solution__password-protect-pdf .solution__group {
    272   display: flex;
    273   flex-wrap: wrap;
    274   gap: 10px;
    275 }
    276 .solution__password-protect-pdf .solution__group > div,
    277 .solution__password-protect-pdf .solution__group > label {
    278   flex: 1;
    279 }
    280 
    281 @keyframes move {
    282   0% {
    283     transform: translateX(50%);
    284   }
    285   50% {
    286     transform: translateX(-50%);
    287   }
    288   100% {
    289     transform: translateX(50%);
    290   }
    291 }
    292 
    293 /*# sourceMappingURL=style-index.css.map*/
     1:root{--solution-password-protect-pdf-primary-color:#4f46e5;--solution-password-protect-pdf-secondary-color:#eef2ff;--solution-password-protect-pdf-tertiary-color:#000;--solution-password-protect-pdf-background-color:#fff;--solution-password-protect-pdf-border-color:#e5e7eb;--solution-password-protect-pdf-input-border-color:#d1d5db;--solution-password-protect-pdf-shadow-color:hsla(210,8%,62%,.2);--solution-password-protect-pdf-btn-shadow-color:rgba(0,0,0,.05);--solution-password-protect-pdf-dropdown-bg-color:#fff;--solution-password-protect-pdf-dropdown-shadow-color-1:rgba(0,0,0,.1);--solution-password-protect-pdf-dropdown-shadow-color-2:rgba(0,0,0,.1)}.solution__password-protect-pdf .solution__container-wrapper{color:var(--solution-password-protect-pdf-tertiary-color);display:flex;flex-direction:column;gap:1rem;padding:1rem}.solution__password-protect-pdf .solution__container{background-color:var(--solution-password-protect-pdf-background-color);border:1px solid var(--solution-password-protect-pdf-border-color);border-radius:.75rem;box-shadow:var(--solution-password-protect-pdf-shadow-color) 0 8px 24px;display:flex;flex-direction:column;gap:1rem;min-height:250px;padding:1.5rem 1.5rem .5rem;position:relative}.solution__password-protect-pdf .solution__header{font-size:1.25rem;font-weight:500;letter-spacing:.05em}.solution__password-protect-pdf .solution__content{display:grid;flex-grow:1}.solution__password-protect-pdf .solution__form{display:flex;flex-direction:column;gap:1rem}.solution__password-protect-pdf .solution__label{display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.3rem;white-space:nowrap;width:100%}.solution__password-protect-pdf .solution__hint{color:var(--solution-password-protect-pdf-primary-color);font-size:.75rem;font-weight:500;white-space:wrap}.solution__password-protect-pdf .solution__input{border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;font-size:1rem;line-height:32px;outline:1px solid transparent;outline-offset:-1px;padding:.25rem .5rem}.solution__password-protect-pdf .solution__file-input::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:.75rem;color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;font-weight:500;margin-right:1rem;padding:.5rem 1rem}.solution__password-protect-pdf .solution__file-input:hover::-webkit-file-upload-button{background-color:var(--solution-password-protect-pdf-secondary-color)}.solution__password-protect-pdf .solution__btn{align-items:center;background:var(--solution-password-protect-pdf-secondary-color);border:none;border-radius:1rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-btn-shadow-color);color:var(--solution-password-protect-pdf-primary-color);cursor:pointer;display:inline-flex;font-weight:600;gap:.5rem;justify-content:center;padding:.5rem 1rem}.solution__password-protect-pdf .solution__btn:hover{filter:brightness(.98)}.solution__password-protect-pdf .solution__btn .dashicons{font-size:1.2rem;vertical-align:middle}.solution__password-protect-pdf .solution__dropdown-wrapper{position:relative}.solution__password-protect-pdf .solution__dropdown{background-color:transparent;border-radius:.75rem;box-shadow:none;max-height:15rem;overflow:visible;position:relative;width:100%;z-index:10}.solution__password-protect-pdf .solution__dropdown--hidden{display:none}.solution__password-protect-pdf .solution__loading-section{display:none;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.solution__password-protect-pdf .solution__loading-container{align-items:center;display:flex;gap:1rem;justify-content:center;transition:2s ease}.solution__password-protect-pdf .solution__download-section{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center}.solution__password-protect-pdf .solution__download-section:last-child{margin-top:auto}.solution__password-protect-pdf .solution__download-container{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:1rem;justify-content:center}.solution__password-protect-pdf .solution__download-file-container{display:flex;flex-wrap:wrap;gap:1rem;justify-content:flex-start}.solution__password-protect-pdf .solution__download-file-name{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.solution__password-protect-pdf .solution__title-text{font-weight:600}.solution__password-protect-pdf .solution__text{font-weight:500}.solution__password-protect-pdf .solution__provided-text{display:flex;font-size:.7rem;justify-content:center;margin-top:.5rem}.solution__password-protect-pdf .solution__error-section{align-self:center;display:flex;flex-direction:column;justify-self:center}.solution__password-protect-pdf .solution__dot{animation:move .6s ease infinite;background:var(--solution-password-protect-pdf-tertiary-color);border-radius:50%;height:.65em;width:.65em}.solution__password-protect-pdf .solution__link{color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution__select{display:flex;flex-direction:column;gap:.3rem;position:relative}.solution__password-protect-pdf .solution__select .solution__select-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%234f46e5%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7.41 8.58 12 13.17l4.59-4.59L18 10l-6 6-6-6z%27/%3E%3C/svg%3E");background-position:right 1rem center;background-repeat:no-repeat;background-size:1rem;border:1px solid var(--solution-password-protect-pdf-input-border-color);border-radius:.375rem;box-shadow:0 1px 2px 0 var(--solution-password-protect-pdf-shadow-color);color:var(--solution-password-protect-pdf-tertiary-color);cursor:pointer;height:42px;padding:0 .5rem}.solution__password-protect-pdf .solution__select .solution__select-input:focus{box-shadow:0 0 0 3px var(--solution-password-protect-pdf-secondary-color);outline:1px solid var(--solution-password-protect-pdf-primary-color)}.solution__password-protect-pdf .solution__select .solution__select-input option{padding:1rem}.solution__password-protect-pdf .solution__select .solution__select-input option[disabled]{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input:required:invalid{color:var(--solution-password-protect-pdf-input-border-color)}.solution__password-protect-pdf .solution__select .solution__select-input option:not([disabled]){color:var(--solution-password-protect-pdf-tertiary-color)}.solution__password-protect-pdf .solution_dropdown button{width:100%}.solution__password-protect-pdf .solution__dropdown-content{background-color:#fff;border-radius:10px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);display:none;flex-direction:column;left:50%;margin-top:3px;max-height:150px;min-width:100%;overflow:auto;padding:.5rem 0;position:absolute;top:100%;transform:translate(-50%);z-index:10}.solution__password-protect-pdf .solution__dropdown-content label{display:block;margin-top:10px;padding:0 1rem}.solution__password-protect-pdf .solution__dropdown-button{min-width:100%}.solution__password-protect-pdf .solution__dropdown-button:focus+.solution__dropdown-content,.solution__password-protect-pdf .solution__dropdown-content:hover{display:flex}.solution__password-protect-pdf .solution__group{display:flex;flex-wrap:wrap;gap:10px}.solution__password-protect-pdf .solution__group>div,.solution__password-protect-pdf .solution__group>label{flex:1}@keyframes move{0%{transform:translateX(50%)}50%{transform:translateX(-50%)}to{transform:translateX(50%)}}
  • password-protect-pdf/trunk/build/view.asset.php

    r3237558 r3260525  
    1 <?php return array('dependencies' => array(), 'version' => 'c15ecdb92febc27b4e9d');
     1<?php return array('dependencies' => array(), 'version' => '36841df1842c8245b753');
  • password-protect-pdf/trunk/build/view.js

    r3237558 r3260525  
    1 /******/ (() => { // webpackBootstrap
    2 /*!*********************!*\
    3   !*** ./src/view.js ***!
    4   \*********************/
    5 document.querySelectorAll('.solution__password-protect-pdf .solution__form').forEach(form => {
    6   form.addEventListener('submit', function (event) {
    7     event.preventDefault();
    8     const formId = form.getAttribute('id');
    9     const fileInput = form.querySelector('[name="file"]');
    10     const passwordInput = form.querySelector('[name="userPass"]');
    11     const loadingSection = document.getElementById(`loadingSection_${formId}`);
    12     const errorSection = document.getElementById(`errorSection_${formId}`);
    13     const resultMessage = document.getElementById(`resultMessage_${formId}`);
    14     const downloadSection = document.getElementById(`downloadSection_${formId}`);
    15 
    16     // Hide the form, show the loading indicator, hide error and download sections
    17     form.style.display = 'none';
    18     loadingSection.style.display = 'flex';
    19     errorSection.style.display = 'none'; // Hide error section
    20     downloadSection.style.display = 'none';
    21     const formData = new FormData();
    22     Array.from(fileInput.files).forEach((file, index) => {
    23       formData.append(`file[${index}]`, file);
    24     });
    25     formData.append('userPass', passwordInput.value);
    26     formData.append('protectPDFFormNonce', wpApiSettings.protectPDFNonce);
    27     console.log(passwordInput.value);
    28     fetch(`${wpApiSettings.root}password-protect-pdf/v1/send-data`, {
    29       method: 'POST',
    30       body: formData
    31     }).then(response => response.json()).then(data => {
    32       if (data.id) {
    33         pollStatus(data.id, formId);
    34       } else {
    35         loadingSection.style.display = 'none';
    36         errorSection.style.display = 'flex';
    37         resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    38       }
    39     }).catch(() => {
    40       loadingSection.style.display = 'none';
    41       errorSection.style.display = 'flex';
    42       resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    43     });
    44   });
    45 
    46   // Add event listener for restart buttons
    47   const restartDownloadBtn = document.getElementById(`restartDownloadBtn_${form.id}`);
    48   const restartErrorBtn = document.getElementById(`restartErrorBtn_${form.id}`);
    49 
    50   // Function to restart the process and reset the form
    51   function resetForm() {
    52     form.reset();
    53     form.style.display = 'flex';
    54     document.getElementById(`loadingSection_${form.id}`).style.display = 'none'; // Hide loading
    55     document.getElementById(`downloadSection_${form.id}`).style.display = 'none'; // Hide download
    56     document.getElementById(`errorSection_${form.id}`).style.display = 'none'; // Hide error section
    57   }
    58   if (restartDownloadBtn) {
    59     restartDownloadBtn.addEventListener('click', resetForm);
    60   }
    61   if (restartErrorBtn) {
    62     restartErrorBtn.addEventListener('click', resetForm);
    63   }
    64 });
    65 function pollStatus(id, formId) {
    66   const loadingSection = document.getElementById(`loadingSection_${formId}`);
    67   const errorSection = document.getElementById(`errorSection_${formId}`);
    68   const resultMessage = document.getElementById(`resultMessage_${formId}`);
    69   const downloadSection = document.getElementById(`downloadSection_${formId}`);
    70   const downloadFilesContainer = document.getElementById(`downloadFilesContainer_${formId}`);
    71   function checkStatus() {
    72     fetch(`${wpApiSettings.root}password-protect-pdf/v1/status/${id}`).then(response => response.json()).then(data => {
    73       if (data.status === 'done') {
    74         loadingSection.style.display = 'none';
    75         downloadFilesContainer.innerHTML = ''; // Clear previous downloads
    76 
    77         if (data.output && data.output.files && data.output.files.length > 0) {
    78           data.output.files.forEach(file => {
    79             // Create download button
    80             const downloadButton = document.createElement('button');
    81             downloadButton.type = 'button';
    82             downloadButton.className = 'solution__btn';
    83             downloadButton.innerHTML = `
    84                                 <div class="dashicons dashicons-download"></div>
    85                                 <span class="solution__download-file-name">${file.name}</span>
    86                             `;
    87 
    88             // Set download functionality
    89             downloadButton.addEventListener('click', event => {
    90               event.preventDefault();
    91               const anchor = document.createElement('a');
    92               anchor.href = file.path;
    93               anchor.target = '_blank';
    94               document.body.appendChild(anchor);
    95               anchor.click();
    96               document.body.removeChild(anchor);
    97             });
    98 
    99             // Append elements to the container
    100             const fileContainer = document.createElement('div');
    101             fileContainer.className = 'solution__download-file-container';
    102             fileContainer.appendChild(downloadButton);
    103             downloadFilesContainer.appendChild(fileContainer);
    104           });
    105           downloadSection.style.display = 'flex'; // Show download section
    106         } else {
    107           errorSection.style.display = 'flex';
    108           resultMessage.innerText = 'No files available for download.';
    109         }
    110       } else if (data.status === 'error') {
    111         throw new Error('Processing failed: ' + data.message);
    112       } else {
    113         setTimeout(checkStatus, 500);
    114       }
    115     }).catch(() => {
    116       loadingSection.style.display = 'none';
    117       errorSection.style.display = 'flex'; // Show error section
    118       resultMessage.innerText = 'An unexpected error occurred. Please try again.';
    119     });
    120   }
    121   checkStatus();
    122 }
    123 /******/ })()
    124 ;
    125 //# sourceMappingURL=view.js.map
     1document.querySelectorAll(".solution__password-protect-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="userPass"]'),s=document.getElementById(`loadingSection_${n}`),l=document.getElementById(`errorSection_${n}`),a=document.getElementById(`resultMessage_${n}`),r=document.getElementById(`downloadSection_${n}`);e.style.display="none",s.style.display="flex",l.style.display="none",r.style.display="none";const i=new FormData;Array.from(o.files).forEach(((e,t)=>{i.append(`file[${t}]`,e)})),i.append("userPass",d.value),i.append("protectPDFFormNonce",wpApiSettingsPasswordProtectPDF.protectPDFNonce),fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/send-data`,{method:"POST",body:i}).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(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/status/${e}`,{method:"GET",headers:{"X-WP-Nonce":wpApiSettingsPasswordProtectPDF.protectPDFNonce,"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):(s.style.display="none",l.style.display="flex",a.innerText="An unexpected error occurred. Please try again.")})).catch((()=>{s.style.display="none",l.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)}));
  • password-protect-pdf/trunk/includes/process-machine.php

    r3237558 r3260525  
    127127// Check status of processing task
    128128function cross_service_solutions_password_protect_pdf_check_status($request) {
     129    $nonce = $request->get_header('X-WP-Nonce');
     130    if (!$nonce || !wp_verify_nonce($nonce, 'password_protect_pdf_form_nonce_action')) {
     131        return new WP_Error('nonce_invalid', 'Nonce verification failed', array(
     132            'status' => 403,
     133            'message' => 'The provided nonce is invalid or expired. Please refresh and try again.'
     134        ));
     135    }
     136
    129137    $api_key = esc_attr(get_option('cross_service_solutions_api_key'));
    130138    $id = sanitize_text_field($request['id']);
  • password-protect-pdf/trunk/languages/password-protect-pdf.pot

    r3250041 r3260525  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Password Protect PDF with Cross Service Solutions integration 1.0.0\n"
     5"Project-Id-Version: Password Protect PDF with Cross Service Solutions integration 1.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/password-protect-pdf\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • password-protect-pdf/trunk/password-protect-pdf.php

    r3237558 r3260525  
    55 * Requires at least: 6.6
    66 * Requires PHP:      7.2
    7  * Version:           1.0.0
     7 * Version:           1.0.1
    88 * Author:            Cross Service Solutions
    99 * License:           GPL-2.0-or-later
     
    103103function cross_service_solutions_password_protect_pdf_localize_script() {
    104104    // Localize the script registered by the viewScript in block.json
    105     wp_localize_script('create-block-password-protect-pdf-view-script', 'wpApiSettings', array(
     105    wp_localize_script('create-block-password-protect-pdf-view-script', 'wpApiSettingsPasswordProtectPDF', array(
    106106        'root' => esc_url_raw(rest_url()),
    107107        'protectPDFNonce' => wp_create_nonce('password_protect_pdf_form_nonce_action'),
  • password-protect-pdf/trunk/readme.txt

    r3250041 r3260525  
    55Requires at least: 5.0
    66Tested up to: 6.7
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    9292== Changelog ==
    9393
     94= 1.0.1 =
     95* Implemented nonce validation for polling status GET request.
     96* Ensuring the global object in JavaScript is unique.
     97
    9498= 1.0.0 =
    9599* Initial release of the Protect PDF plugin.
  • password-protect-pdf/trunk/src/block.json

    r3237558 r3260525  
    33    "apiVersion": 3,
    44    "name": "create-block/password-protect-pdf",
    5     "version": "1.0.0",
     5    "version": "1.0.1",
    66    "title": "Password Protect PDF",
    77    "category": "widgets",
  • password-protect-pdf/trunk/src/view.js

    r3237558 r3260525  
    3030        });
    3131        formData.append('userPass', passwordInput.value);
    32         formData.append('protectPDFFormNonce', wpApiSettings.protectPDFNonce);
     32        formData.append('protectPDFFormNonce', wpApiSettingsPasswordProtectPDF.protectPDFNonce);
    3333
    34         fetch(`${wpApiSettings.root}password-protect-pdf/v1/send-data`, {
     34        fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/send-data`, {
    3535            method: 'POST',
    3636            body: formData,
     
    9393
    9494    function checkStatus() {
    95         fetch(`${wpApiSettings.root}password-protect-pdf/v1/status/${id}`)
     95        fetch(`${wpApiSettingsPasswordProtectPDF.root}password-protect-pdf/v1/status/${id}`, {
     96            method: 'GET',
     97            headers: {
     98                'X-WP-Nonce': wpApiSettingsPasswordProtectPDF.protectPDFNonce,
     99                'Content-Type': 'application/json'
     100            }
     101        })
    96102            .then((response) => response.json())
    97103            .then((data) => {
Note: See TracChangeset for help on using the changeset viewer.