diff --git a/user/plugins/admin/CHANGELOG.md b/user/plugins/admin/CHANGELOG.md index 1a34675..acb4373 100644 --- a/user/plugins/admin/CHANGELOG.md +++ b/user/plugins/admin/CHANGELOG.md @@ -1,3 +1,23 @@ +# v1.10.8 +## 03/19/2021 + +1. [](#improved) + * Include alt text and title for images added to the editor [#2098](https://github.com/getgrav/grav-plugin-admin/issues/2098) +1. [](#bugfix) + * Fixed issue replacing `wildcard` field names in flex collections [#2092](https://github.com/getgrav/grav-plugin-admin/pull/2092) + * Fixed legacy Pages having old `modular` reference instead of `module` [#2093](https://github.com/getgrav/grav-plugin-admin/issues/2093) + * Fixed issue where Add New modal would close if selecting an item outside of the modal window. It is now necessary go through the Cancel button and clicking the overlay won't trigger the closing of the modal [#2089](https://github.com/getgrav/grav-plugin-admin/issues/2089), [#2065](https://github.com/getgrav/grav-plugin-admin/issues/2065) + +# v1.10.7 +## 03/17/2021 + +1. [](#improved) + * Force height of Flex pages admin to fit available space + * Updated languages from Crowdin.com + * Better field type definitions for file, pagemedia, filepicker and pagemediafield +1. [](#bugfix) + * Fixed error when checking missing log file [#2088](https://github.com/getgrav/grav-plugin-admin/issues/2088) + # v1.10.6 ## 02/23/2021 @@ -7,7 +27,7 @@ * Flex pages admin better uses available space [#2075](https://github.com/getgrav/grav/issues/2075) 1. [](#bugfix) * Regression: Fixed enabling/disabling plugin or theme corrupting configuration - * Fixed unnecessary closing bracket cuasing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079) + * Fixed unnecessary closing bracket causing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079) * Fixed wrong language in Admin Tools [#2077](https://github.com/getgrav/grav-plugin-admin/issues/2077) # v1.10.5 diff --git a/user/plugins/admin/admin.php b/user/plugins/admin/admin.php index 1a16fe9..f2f773f 100644 --- a/user/plugins/admin/admin.php +++ b/user/plugins/admin/admin.php @@ -123,7 +123,24 @@ public function getFormFieldTypes() 'array' => true ], 'file' => [ - 'array' => true + 'array' => true, + 'media_field' => true, + 'validate' => [ + 'type' => 'ignore' + ] + ], + 'pagemedia' => [ + 'array' => true, + 'media_field' => true, + 'validate' => [ + 'type' => 'ignore' + ] + ], + 'filepicker' => [ + 'media_picker_field' => true + ], + 'pagemediaselect' => [ + 'media_picker_field' => true ], 'permissions' => [ 'ignore_empty' => true, diff --git a/user/plugins/admin/blueprints.yaml b/user/plugins/admin/blueprints.yaml index 8a66f14..851e3c6 100644 --- a/user/plugins/admin/blueprints.yaml +++ b/user/plugins/admin/blueprints.yaml @@ -1,7 +1,7 @@ name: Admin Panel slug: admin type: plugin -version: 1.10.6 +version: 1.10.8 description: Adds an advanced administration panel to manage your site icon: empire author: diff --git a/user/plugins/admin/classes/plugin/AdminController.php b/user/plugins/admin/classes/plugin/AdminController.php index a502beb..3590a0b 100644 --- a/user/plugins/admin/classes/plugin/AdminController.php +++ b/user/plugins/admin/classes/plugin/AdminController.php @@ -144,18 +144,18 @@ public function taskSave() switch ($this->view) { case 'pages': - return $this->taskSavePage(); + return $this->savePage(); case 'user': - return $this->taskSaveUser(); + return $this->saveUser(); default: - return $this->taskSaveDefault(); + return $this->saveDefault(); } } /** * @return bool */ - protected function taskSaveDefault() + protected function saveDefault() { // Handle standard data types. $type = $this->getDataType(); @@ -451,7 +451,7 @@ protected function taskForgot() * * @return bool */ - protected function taskSaveUser() + protected function saveUser() { /** @var UserCollectionInterface $users */ $users = $this->grav['accounts']; @@ -1358,7 +1358,7 @@ public function taskSaveNewFolder() /** * @return bool */ - protected function taskSavePage() + protected function savePage() { $reorder = true; diff --git a/user/plugins/admin/composer.lock b/user/plugins/admin/composer.lock index bece331..65ff65b 100644 --- a/user/plugins/admin/composer.lock +++ b/user/plugins/admin/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "laminas/laminas-xml", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-xml.git", - "reference": "844dc64557b1ad8a2e0eadb741510ba992674f99" + "reference": "2eada592359aec9d9e55339270b621295cff3a4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/844dc64557b1ad8a2e0eadb741510ba992674f99", - "reference": "844dc64557b1ad8a2e0eadb741510ba992674f99", + "url": "https://api.github.com/repos/laminas/laminas-xml/zipball/2eada592359aec9d9e55339270b621295cff3a4f", + "reference": "2eada592359aec9d9e55339270b621295cff3a4f", "shasum": "" }, "require": { @@ -62,28 +62,30 @@ "type": "community_bridge" } ], - "time": "2020-11-18T20:46:37+00:00" + "time": "2021-02-17T22:44:58+00:00" }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642" + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" }, "type": "library", "extra": { @@ -122,7 +124,7 @@ "type": "community_bridge" } ], - "time": "2020-09-14T14:23:00+00:00" + "time": "2021-02-25T21:54:58+00:00" }, { "name": "p3k/picofeed", @@ -757,16 +759,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { @@ -806,9 +808,9 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" + "source": "https://github.com/guzzle/promises/tree/1.4.1" }, - "time": "2020-09-30T07:37:28+00:00" + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", @@ -1659,27 +1661,22 @@ }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1692,7 +1689,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1706,9 +1703,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/1.1.1" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/http-message", @@ -2473,16 +2470,16 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "f6f060bdc473c3f3b1f00e2ebdeb3d02eda77f82" + "reference": "cfa8d92f95294747e3abc04969efee51ed374424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/f6f060bdc473c3f3b1f00e2ebdeb3d02eda77f82", - "reference": "f6f060bdc473c3f3b1f00e2ebdeb3d02eda77f82", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/cfa8d92f95294747e3abc04969efee51ed374424", + "reference": "cfa8d92f95294747e3abc04969efee51ed374424", "shasum": "" }, "require": { @@ -2524,7 +2521,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v4.4.19" + "source": "https://github.com/symfony/browser-kit/tree/v4.4.20" }, "funding": [ { @@ -2540,20 +2537,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-18T10:52:56+00:00" }, { "name": "symfony/console", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "24026c44fc37099fa145707fecd43672831b837a" + "reference": "c98349bda966c70d6c08b4cd8658377c94166492" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/24026c44fc37099fa145707fecd43672831b837a", - "reference": "24026c44fc37099fa145707fecd43672831b837a", + "url": "https://api.github.com/repos/symfony/console/zipball/c98349bda966c70d6c08b4cd8658377c94166492", + "reference": "c98349bda966c70d6c08b4cd8658377c94166492", "shasum": "" }, "require": { @@ -2613,7 +2610,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.19" + "source": "https://github.com/symfony/console/tree/v4.4.20" }, "funding": [ { @@ -2629,11 +2626,11 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-22T18:44:15+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2678,7 +2675,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v4.4.19" + "source": "https://github.com/symfony/css-selector/tree/v4.4.20" }, "funding": [ { @@ -2698,16 +2695,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "21032c566558255e551d23f4a516434c9e3a9a78" + "reference": "be133557f1b0e6672367325b508e65da5513a311" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/21032c566558255e551d23f4a516434c9e3a9a78", - "reference": "21032c566558255e551d23f4a516434c9e3a9a78", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/be133557f1b0e6672367325b508e65da5513a311", + "reference": "be133557f1b0e6672367325b508e65da5513a311", "shasum": "" }, "require": { @@ -2751,7 +2748,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v4.4.19" + "source": "https://github.com/symfony/dom-crawler/tree/v4.4.20" }, "funding": [ { @@ -2767,11 +2764,11 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-14T12:29:41+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2834,7 +2831,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.19" + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.20" }, "funding": [ { @@ -2933,16 +2930,16 @@ }, { "name": "symfony/finder", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "25d79cfccfc12e84e7a63a248c3f0720fdd92db6" + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/25d79cfccfc12e84e7a63a248c3f0720fdd92db6", - "reference": "25d79cfccfc12e84e7a63a248c3f0720fdd92db6", + "url": "https://api.github.com/repos/symfony/finder/zipball/2543795ab1570df588b9bbd31e1a2bd7037b94f6", + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6", "shasum": "" }, "require": { @@ -2974,7 +2971,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.19" + "source": "https://github.com/symfony/finder/tree/v4.4.20" }, "funding": [ { @@ -2990,7 +2987,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-12T10:48:09+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3407,7 +3404,7 @@ }, { "name": "symfony/process", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -3448,7 +3445,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.19" + "source": "https://github.com/symfony/process/tree/v4.4.20" }, "funding": [ { @@ -3547,16 +3544,16 @@ }, { "name": "symfony/yaml", - "version": "v4.4.19", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9" + "reference": "29e61305e1c79d25f71060903982ead8f533e267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9", - "reference": "17ed9f14c1aa05b1a5cf2e2c5ef2d0be28058ef9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/29e61305e1c79d25f71060903982ead8f533e267", + "reference": "29e61305e1c79d25f71060903982ead8f533e267", "shasum": "" }, "require": { @@ -3598,7 +3595,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v4.4.19" + "source": "https://github.com/symfony/yaml/tree/v4.4.20" }, "funding": [ { @@ -3614,7 +3611,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-02-22T15:36:50+00:00" }, { "name": "theseer/tokenizer", @@ -3668,30 +3665,35 @@ }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3715,9 +3717,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], diff --git a/user/plugins/admin/languages/ca.yaml b/user/plugins/admin/languages/ca.yaml index 42ce992..09126f0 100644 --- a/user/plugins/admin/languages/ca.yaml +++ b/user/plugins/admin/languages/ca.yaml @@ -594,8 +594,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Força SSL globalment, si està habilitat, quan el lloc web és accedir per HTTP, Grav envia un redireccionament a la pàgina HTTPS" NEWS_FEED: "Canal de notícies" EXTERNAL_URL: "URL externa" - SESSION_PATH: "El camí de la sessió" - SESSION_PATH_HELP: "Utilitza només si has escollit una URL base personalitzada (has reescrit el domini del lloc web/subcarpeta)" CUSTOM_BASE_URL: "URL base personalitzada" CUSTOM_BASE_URL_HELP: "Utilitza si vols reescriure el domini del lloc web o utilitzar una subcarpeta diferent que la que utilitza Grav. Per exemple: http://localhost" FILEUPLOAD_PREVENT_SELF: 'No es pot utilitzar "%s" fora de les pàgines.' diff --git a/user/plugins/admin/languages/cs.yaml b/user/plugins/admin/languages/cs.yaml index 5e530cf..89dbf33 100644 --- a/user/plugins/admin/languages/cs.yaml +++ b/user/plugins/admin/languages/cs.yaml @@ -393,7 +393,7 @@ PLUGIN_ADMIN: DETECT_CHANGES_HELP: "Twig bude automaticky aktualizovat cache pokud detekuje změnu v Twig šabloně" AUTOESCAPE_VARIABLES: "Automaticky escapovat proměnné" AUTOESCAPE_VARIABLES_HELP: "Escapování všech proměnných bude mít pravděpodobně za následek nefunkčnost webu" - ASSETS: "Assety" + ASSETS: "Zdroje" CSS_PIPELINE: "Sloučit CSS soubory" CSS_PIPELINE_HELP: "Spojí všechny CSS soubory do jednoho" CSS_PIPELINE_INCLUDE_EXTERNALS: "Zahrnout externí CSS do sloučeného CSS" @@ -414,8 +414,10 @@ PLUGIN_ADMIN: JAVASCRIPT_PIPELINE_BEFORE_EXCLUDES_HELP: "Vykreslit sloučené JS před jakékoliv jiné nezahrnuté JS reference" JAVASCRIPT_MINIFY: "Minifikovat JavaScripty" JAVASCRIPT_MINIFY_HELP: "Minifikuje všechny JavaScriptové soubory" - ENABLED_TIMESTAMPS_ON_ASSETS: "Povolit časové značky na assetech" - ENABLED_TIMESTAMPS_ON_ASSETS_HELP: "Všechny assetu budou mít v URL i čas vytvoření" + ENABLED_TIMESTAMPS_ON_ASSETS: "Povolit časová razítka na zdrojích" + ENABLED_TIMESTAMPS_ON_ASSETS_HELP: "Povolit zdroji časová razítka" + ENABLED_SRI_ON_ASSETS: "Povolit SRI na zdrojích" + ENABLED_SRI_ON_ASSETS_HELP: "Povolit zdroji SRI" COLLECTIONS: "Kolekce" ERROR_HANDLER: "Hlášení chyb" DISPLAY_ERRORS: "Zobrazit chyby" @@ -652,8 +654,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Globálně vynutit SSL, je-li povoleno, web dosažený prostřednictvím protokolu HTTP, Grav přesměruje na HTTPS stránku" NEWS_FEED: "Novinky" EXTERNAL_URL: "Externí adresa URL" - SESSION_PATH: "Adresa k session" - SESSION_PATH_HELP: "Užívejte, jen když zvolíte vlastní základní adresu URL (přepíšete doménu stránky / podsložky)" SESSION_SAMESITE: "Atribut SameSite relace" SESSION_SAMESITE_HELP: "Lax|Strict|None. Více informací naleznete na https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite" CUSTOM_BASE_URL: "Vlastní základní adresa URL" @@ -1087,3 +1087,8 @@ PLUGIN_ADMIN: RESIZE_QUALITY: "Kvalita změny rozlišení" RESIZE_QUALITY_HELP: "Kvalita použitá při změně velikosti obrázku. Hodnota mezi 0 a 1." PIXELS: "pixely" + ACCESS_ADMIN_CONFIGURATION_SECURITY: "Spravovat nastavení zabezpečení" + SESSION_DOMAIN: "Doména relace" + SESSION_DOMAIN_HELP: "Používejte pouze v případě, pokud přepíšete doménu webu, například v Docker Containeru." + SESSION_PATH: "Cesta relace" + SESSION_PATH_HELP: "Používejte pouze v případě, pokud přepíšete cestu webu, například v Docker Containeru." diff --git a/user/plugins/admin/languages/da.yaml b/user/plugins/admin/languages/da.yaml index 1d92cbd..6800047 100644 --- a/user/plugins/admin/languages/da.yaml +++ b/user/plugins/admin/languages/da.yaml @@ -637,8 +637,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Gennemtving SSL globalt, hvis aktiveret, når webstedet nås via HTTP, Grav sender en omdirigering til HTTPS-siden" NEWS_FEED: "Nyhedsfeed" EXTERNAL_URL: "Ekstern URL" - SESSION_PATH: "Sessionssti" - SESSION_PATH_HELP: "Benyt kun, hvis du vælger en tilpasset basis-URL (du omskrive webstedsdomæne/undermappe)" CUSTOM_BASE_URL: "Tilpasset basis-URL" CUSTOM_BASE_URL_HELP: "Benyt, hvis du ønsker at omskrive webstedsdomæne eller benytte en anden undermappe end den, Grav benytter. Eksempel: http://localhost" FILEUPLOAD_PREVENT_SELF: 'Kan ikke benytte "%s" uden for sider.' diff --git a/user/plugins/admin/languages/de.yaml b/user/plugins/admin/languages/de.yaml index 518b1db..d8199f4 100644 --- a/user/plugins/admin/languages/de.yaml +++ b/user/plugins/admin/languages/de.yaml @@ -416,6 +416,8 @@ PLUGIN_ADMIN: JAVASCRIPT_MINIFY_HELP: "Komprimiert die JavaScript Dateien nach dem pipelining" ENABLED_TIMESTAMPS_ON_ASSETS: "Zeitstempel für Assets aktivieren" ENABLED_TIMESTAMPS_ON_ASSETS_HELP: "Aktviert die Zeitstempel für Assets" + ENABLED_SRI_ON_ASSETS: "SRI-г хэсгүүдэд идэвхжүүлэх" + ENABLED_SRI_ON_ASSETS_HELP: "SRI-г хэсэгт идэвхжүүлэх" COLLECTIONS: "Sammlungen" ERROR_HANDLER: "Fehlerbehandlung" DISPLAY_ERRORS: "Fehler Anzeigen" @@ -439,6 +441,7 @@ PLUGIN_ADMIN: IMAGES_DEBUG: "Bild Debug Wasserzeichen" IMAGES_DEBUG_HELP: "Wasserzeichen mit der Auflösung der Bilder anzeigen um Retina-Displays zu testen" IMAGES_LOADING: "Bildladeverhalten" + IMAGES_LOADING_HELP: "Ачаалах шинж чанар нь хөтөч нь дэлгэцэн дээрх зураг, iframe-ийг ачаалах хугацааг хэрэглэгчид ойртох хүртэл хойшлуулах боломжийг олгодог. Ачаалал нь гурван утгыг дэмждэг: авто, удаан, эрчтэй" IMAGES_SEOFRIENDLY: "SEO freundliche Bildnamen" IMAGES_SEOFRIENDLY_HELP: "Wenn diese Option aktiviert ist, wird zuerst der Bildname und dann ein kleinerer Hash angezeigt, um verarbeitete Vorgänge anzuzeigen" UPLOAD_LIMIT: "Datei Upload Limit" @@ -499,6 +502,8 @@ PLUGIN_ADMIN: PLUGIN_STATUS: "Plugin Status" INCLUDE_DEFAULT_LANG: "Standardsprache hinzufügen" INCLUDE_DEFAULT_LANG_HELP: "Dies wird alle URLs der Standardsprache um die Sprache ergänzen z.B. '/en/blog/post' oder '/de/blog/post'" + INCLUDE_DEFAULT_LANG_FILE_EXTENSION: "Файлын өргөтгөлд анхдагч хэлийг оруулах" + INCLUDE_DEFAULT_LANG_HELP_FILE_EXTENSION: "Хэрэв энэ нь идэвхжсэн бол энэ нь файлын өргөтгөлд анхдагч хэлийг урьдчилж оруулах болно (жишээлбэл. `.en.md`). `.md` файлын өргөтгөл ашиглан анхдагч хэлийг хадгалахын тулд үүнийг идэвхгүй болго." PAGES_FALLBACK_ONLY: "Seiten nur 'fallback'" PAGES_FALLBACK_ONLY_HELP: "'Fallback' nur um Seiteninhalte durch unterstützte Sprachen zu finden, Standardverhalten ist es, jede Sprache anzuzeigen, die gefunden wird, wenn eine aktive Sprache fehlt" ALLOW_URL_TAXONOMY_FILTERS: "URL Kategoriefilter" @@ -638,6 +643,7 @@ PLUGIN_ADMIN: REDIS_PORT_HELP: "Der Redis-Server Port" REDIS_PASSWORD: "Redis Passwort/Geheimnis" REDIS_DATABASE: "Redis-Datenbank-ID" + REDIS_DATABASE_HELP: "Redis жишээ мэдээллийн баазын ID" ALL: "Alle" FROM: "von" TO: "an" @@ -648,8 +654,8 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Globales SSL erzwingen, wenn aktiviert sendet Grav für eine HTTP Anfrage eine Weiterleitung zur HTTPS-Seite" NEWS_FEED: "Neuigkeiten" EXTERNAL_URL: "Externe URL" - SESSION_PATH: "Der Session-Pfad" - SESSION_PATH_HELP: "Nur verwenden, wenn Sie eine benutzerdefinierte Base-URL nutzen (rewrite der Site-Domain / Unterordner)" + SESSION_SAMESITE: "SameSite хэсгийн шинж чанар" + SESSION_SAMESITE_HELP: "Lax|Strict|None. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite дээр орон дэлгэрэнгүй мэдээлэл авна уу" CUSTOM_BASE_URL: "Benutzerdefinierte Base-URL" CUSTOM_BASE_URL_HELP: "Verwenden Sie diese Einstellung, wenn ein Rewrite der Site-Domain durchgeführt oder ein anderer Unterordner als der von Grav verwendete genutzt werden soll. Beispiel: http://localhost" FILEUPLOAD_PREVENT_SELF: 'Kann "%s" nicht außerhalb von Seiten verwenden.' diff --git a/user/plugins/admin/languages/el.yaml b/user/plugins/admin/languages/el.yaml index 5d1ff61..172e2f2 100644 --- a/user/plugins/admin/languages/el.yaml +++ b/user/plugins/admin/languages/el.yaml @@ -603,8 +603,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Γενικός εξαναγκασμός SSL, αν ενεργοποιηθεί όταν η σελίδα είναι προσβάσιμη μέσω HTTP, το Grav αποστέλλει ανακατεύθυνση στη σελίδα HTTPS" NEWS_FEED: "Ροή ειδήσεων" EXTERNAL_URL: "Εξωτερική διεύθυνση URL" - SESSION_PATH: "Η διαδρομή συνεδρίας" - SESSION_PATH_HELP: "Χρησιμοποιήστε το μόνο εάν επιλέξετε μια προσαρμοσμένη διεύθυνση URL βάσης (ξαναγράφετε το site domain / υποφάκελο)" CUSTOM_BASE_URL: "Προσαρμοσμένο URL βάσης" CUSTOM_BASE_URL_HELP: "Χρησιμοποιήστε το αν θέλετε να ξαναγράψετε τον τομέα του ιστότοπου ή να χρησιμοποιήσετε κάποιον υποφάκελο, διαφορετικό από εκείνο που χρησιμοποιείται από το Grav. Παράδειγμα: http://localhost" FILEUPLOAD_PREVENT_SELF: 'Δεν είναι δυνατό να χρησιμοποιήσετε «%s» εκτός σελίδων.' diff --git a/user/plugins/admin/languages/en.yaml b/user/plugins/admin/languages/en.yaml index 3d942d9..8dda921 100644 --- a/user/plugins/admin/languages/en.yaml +++ b/user/plugins/admin/languages/en.yaml @@ -416,6 +416,8 @@ PLUGIN_ADMIN: JAVASCRIPT_MINIFY_HELP: "Minify the JS during pipelining" ENABLED_TIMESTAMPS_ON_ASSETS: "Enable timestamps on assets" ENABLED_TIMESTAMPS_ON_ASSETS_HELP: "Enable asset timestamps" + ENABLED_SRI_ON_ASSETS: "Enable SRI on assets" + ENABLED_SRI_ON_ASSETS_HELP: "Enable asset SRI" COLLECTIONS: "Collections" ERROR_HANDLER: "Error handler" DISPLAY_ERRORS: "Display errors" @@ -1092,3 +1094,8 @@ PLUGIN_ADMIN: SESSION_DOMAIN_HELP: "Use only if you you rewrite the site domain for example in a Docker Container." SESSION_PATH: "Session path" SESSION_PATH_HELP: "Use only if you you rewrite the site path for example in a Docker Container." + REDIRECT_OPTION_NO_REDIRECT: "No redirect" + REDIRECT_OPTION_DEFAULT_REDIRECT: "Use default redirect code" + REDIRECT_OPTION_301: "301 - Moved permanently" + REDIRECT_OPTION_302: "302 - Moved temporarily" + REDIRECT_OPTION_303: "303 - See Other" diff --git a/user/plugins/admin/languages/eo.yaml b/user/plugins/admin/languages/eo.yaml index 204a010..88a7c2b 100644 --- a/user/plugins/admin/languages/eo.yaml +++ b/user/plugins/admin/languages/eo.yaml @@ -605,8 +605,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Devigi SSL-n ĉie, se ŝaltite, kiam retejo estos atingita per HTTP, Grav sendos alidirekton al la HTTPS-paĝo" NEWS_FEED: "Novaĵfluo" EXTERNAL_URL: "Eksterna URLo" - SESSION_PATH: "La dosierindiko de la sesio" - SESSION_PATH_HELP: "Uzi nur se oni elektas laŭmendan bazan URL-n (oni reskribas la domajnan / sub-dosierujon)" CUSTOM_BASE_URL: "Memdefinita baza URLo" CUSTOM_BASE_URL_HELP: "Uzu se oni volas reskribi la retpaĝan domajnon aŭ uzi malsaman subdosierujon al tiun de Grav. Ekz-e http://localhost" FILEUPLOAD_PREVENT_SELF: 'Ne eblas uzi "%s" ekster paĝoj.' diff --git a/user/plugins/admin/languages/es.yaml b/user/plugins/admin/languages/es.yaml index 32bc2ca..786e052 100644 --- a/user/plugins/admin/languages/es.yaml +++ b/user/plugins/admin/languages/es.yaml @@ -652,8 +652,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Forzar SSL globalmente, si esta habilitado, cuando el sitio es requerido por medio de HTTP, Grav envía un direccionamiento a la página HTTPS" NEWS_FEED: "Noticias" EXTERNAL_URL: "URL externo" - SESSION_PATH: "La ruta de la sesión" - SESSION_PATH_HELP: "Úselo solo si ha elegido una URL base personalizada (usted ha reescrito el dominio del sitio /subcarpeta)" SESSION_SAMESITE: "El atributo SameSite de la sesión" SESSION_SAMESITE_HELP: "Lax|Strict|None. Ver https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite, para mas información" CUSTOM_BASE_URL: "URL base personalizada" @@ -858,18 +856,25 @@ PLUGIN_ADMIN: MODULE_TEMPLATE: "Plantilla de Módulo" ADD_MODULE_CONTENT: "Adicionar Contenido al Módulo" CHANGELOG: "Historial de Cambios" + PAGE_ACCESS: "Acceso a Página" PAGE PERMISSIONS: "Permisos de Página" PAGE_ACCESS_HELP: "Usuarios con los siguientes permisos de acceso, pueden acceder a esta página." + PAGE_VISIBILITY_REQUIRES_ACCESS: "Visibilidad del Menú Requiere Acceso" PAGE_VISIBILITY_REQUIRES_ACCESS_HELP: "Cambiar a \"Sí\" si la página debe mostrarse sólo en menús donde el usuario puede acceder a ellas." PAGE_INHERIT_PERMISSIONS: "Heredar Permisos" PAGE_INHERIT_PERMISSIONS_HELP: "Heredar ACL de la página superior." PAGE_AUTHORS: "Autores de la página" + PAGE_AUTHORS_HELP: "Usuarios definidos como Autores de Página tienen acceso al nivel propietario a esta pagina definida en el grupo de página 'Autores' especiales." PAGE_GROUPS: "Grupos de página" PAGE_GROUPS_HELP: "Miembros de Grupos de Página tienen acceso especial a esta página." READ: "Lectura" PUBLISH: "Publicar" + LIST: "Lista" ACCESS_SITE: "Sitio" + ACCESS_SITE_LOGIN: "Ingresar al Sitio" ACCESS_ADMIN: "Administrador" + ACCESS_ADMIN_LOGIN: "Ingresar a Admin" + ACCESS_ADMIN_SUPER: "Super Usuario" ACCESS_ADMIN_CACHE: "Limpiar Caché" ACCESS_ADMIN_CONFIGURATION: "Configuración" ACCESS_ADMIN_CONFIGURATION_SYSTEM: "Administrar configuración del sistema" @@ -885,6 +890,10 @@ PLUGIN_ADMIN: ACCESS_ADMIN_TOOLS: "Acceso a Herramientas" ACCESS_ADMIN_USERS: "Administrar usuarios" USERS: "Usuarios" + ACL: "Control de Acceso" + DEBUGGER_CENSORED: "Censurar datos sensibles" + DEBUGGER_CENSORED_HELP: "SOLAMENTE para Clockwork: Si se selecciona sí, censurar información potencialmente sensible (parámetros POST, cookies, archivos, configuraciones y la mayoría de datos array/objetos en los mensajes de registro)." + LANGUAGE_TRANSLATIONS: "Traducciones" LANGUAGE_TRANSLATIONS_HELP: "Si es falso, las keys de traducción son usadas en vez de los strings traducidos. Esta característica puede ser usada para ayudar a arreglar traducciones incorrectas o para encontrar strings en Inglés dentro del código." LOGOS: "Logos" COLOR_SCHEME_LABEL: "Paleta de colores" diff --git a/user/plugins/admin/languages/et.yaml b/user/plugins/admin/languages/et.yaml index 8122979..5baa5b2 100644 --- a/user/plugins/admin/languages/et.yaml +++ b/user/plugins/admin/languages/et.yaml @@ -102,6 +102,7 @@ PLUGIN_ADMIN: BACKUP_NOT_FOUND: "Varukoopiat ei leitud" BACKUP_DATE: "Varukoopia kuupäev" STATISTICS: "Statistika" + VIEWS_STATISTICS: "Lehekülgede vaatamise statistika" TODAY: "Täna" WEEK: "Nädal" MONTH: "Kuu" @@ -173,6 +174,7 @@ PLUGIN_ADMIN: INVALID_PARAMETERS: "Vigased parameetrid" NO_FILES_SENT: "Faile ei saadetud ära" EXCEEDED_FILESIZE_LIMIT: "PHP seadete faili suuruse limiit on ületatud" + EXCEEDED_POSTMAX_LIMIT: "Ületab PHP seadete post_max_size väärtuse" UNKNOWN_ERRORS: "Tundmatud vead" EXCEEDED_GRAV_FILESIZE_LIMIT: "Grav seadefaili limiit on ületatud" UNSUPPORTED_FILE_TYPE: "Failitüüp ei ole toetatud" @@ -328,6 +330,7 @@ PLUGIN_ADMIN: LANGUAGES: "Keeled" SUPPORTED: "Toetatud" SUPPORTED_HELP: "Komadega eraldatud nimekiri 2-tähelistest keelekoodidest (näiteks 'et,en,de')" + SUPPORTED_PLACEHOLDER: "nt. en, et" TRANSLATIONS_FALLBACK: "Tõlke varukeel" TRANSLATIONS_FALLBACK_HELP: "Otsib tõlget järjestikuselt teistest keeltest, kui valitud keeles tõlget ei ole" ACTIVE_LANGUAGE_IN_SESSION: "Sessiooni aktiivne keel" @@ -337,6 +340,7 @@ PLUGIN_ADMIN: EXPIRES_HELP: "Seab aegumise (`expires`) päise. Väärtus on sekundites." CACHE_CONTROL: "HTTP vahemälu juhtimine" CACHE_CONTROL_HELP: "Seab puhvri juhtimise käsundi, nagu `no-cache, no-store, must-revalidate`" + CACHE_CONTROL_PLACEHOLDER: "nt. avalik, max-age=31536000" LAST_MODIFIED: "Viimati muudetud" LAST_MODIFIED_HELP: "Seab viimati muudetud (`last modified`) päise, mis võib aidata optimeerida puhverserveri ja veebilehitseja puhverdamist" ETAG: "ETag" @@ -553,6 +557,7 @@ PLUGIN_ADMIN: FRONTMATTER_PROCESS_TWIG_HELP: "Kui sisselülitatud, saad kasutada Twigi konfiguratsioonimuutujaid lehe frontmatter-s" FRONTMATTER_IGNORE_FIELDS: "Ignoreeri frontmatter-i välju" FRONTMATTER_IGNORE_FIELDS_HELP: "Teatud frontmatteri väljad võivad sisaldada Twigi, kuid ei tohiks saada töödeldud, nagu näiteks 'forms'" + FRONTMATTER_IGNORE_FIELDS_PLACEHOLDER: "nt. vormid" PACKAGE_X_INSTALLED_SUCCESSFULLY: "Pakk %s on paigaldatud" ORDERING_DISABLED_BECAUSE_PARENT_SETTING_ORDER: "Vanem defineerib järjestuse, järjestamine väljalülitatud" ORDERING_DISABLED_BECAUSE_PAGE_NOT_VISIBLE: "Lehekülg pole nähtav, järjekorra muutmine on välja lülitatud" @@ -602,6 +607,7 @@ PLUGIN_ADMIN: REDIS_PORT: "Redis port" REDIS_PORT_HELP: "Redis serveri port" REDIS_PASSWORD: "Redis parool/salasõna" + REDIS_DATABASE: "Redis andmebaasi ID" ALL: "kõik" FROM: "alates" TO: "kuni" @@ -612,8 +618,6 @@ PLUGIN_ADMIN: FORCE_SSL_HELP: "Kogu saidil kasutatakse SSL-i. Kui see on sisse lülitatud, siis HHTP ühendusega lehele saabunud kasutajad suunatakse HTTPS lehele" NEWS_FEED: "Uudised" EXTERNAL_URL: "Väline URL" - SESSION_PATH: "Sessiooni asukoht" - SESSION_PATH_HELP: "Kasuta ainult juhul, kui oled valinud modifitseeritud base URL-i (suunad ümber saidi domeeni / alamkataloogi)" CUSTOM_BASE_URL: "Kohandatud baas URL" CUSTOM_BASE_URL_HELP: "Kasuta, kui soovid ülekirjutada saidi domeeni või kasutada teistsugust alamkataloogi kui Grav. Nt: http://localhost" FILEUPLOAD_PREVENT_SELF: 'Väljaspool lehti ei saa "%s" kasutada.' @@ -753,12 +757,140 @@ PLUGIN_ADMIN: BACKUPS_PROFILE_SCHEDULE_AT: "Käivita ajastatud töö" COMMAND: "Käsk" EXTRA_ARGUMENTS: "Lisaargumendid" + EXPERIMENTAL: "Eksperimentaalne" + ACCOUNTS_TYPE: "Konto tüüp" + ACCOUNTS_STORAGE: "Konto salvestamine" + FLEX: "Flex objekt (EKSPERIMENTAALNE)" + REGULAR: "Tavaline" + FILE: "Fail" + SANITIZE_SVG: "Puhasta SVG" + ACCOUNTS: "Kontod" + USER_ACCOUNTS: "Kasutajakontod" + USER_GROUPS: "Kasutajagrupid" + GROUP_NAME: "Grupi nimi" + DISPLAY_NAME: "Näidatav nimi" + ICON: "Ikoonid" + ACCESS: "Juurdepääs" + NO_ACCESS: "Ligipääs puudub" + SUPER_USER: "Super kasutaja" + ALLOWED: "Lubatud" + DENIED: "Keelatud" + MODULE: "Moodul" + ADD_MODULE: "Lisa moodul" + MODULE_SETUP: "Mooduli seadistamine" + MODULE_TEMPLATE: "Mooduli mall" + CHANGELOG: "Muudatuste logi" + PAGE_ACCESS: "Lehe ligipääs" + PAGE PERMISSIONS: "Lehe õigused" + READ: "Lugemine" + PUBLISH: "Avaldamine" + LIST: "Nimekiri" + ACCESS_SITE: "Sait" + ACCESS_SITE_LOGIN: "Saidile sisselogimine" + ACCESS_ADMIN: "Admin" + ACCESS_ADMIN_LOGIN: "Admini sisselogimine" + ACCESS_ADMIN_SUPER: "Super kasutaja" + ACCESS_ADMIN_CACHE: "Tühjenda vahemälu" + ACCESS_ADMIN_CONFIGURATION: "Seadistused" + ACCESS_ADMIN_CONFIGURATION_SYSTEM: "Halda süsteemi seadeid" + ACCESS_ADMIN_CONFIGURATION_SITE: "Halda saidi seadeid" + ACCESS_ADMIN_CONFIGURATION_MEDIA: "Halda meedia seadeid" + ACCESS_ADMIN_CONFIGURATION_INFO: "Vaata serveri seadeid" + ACCESS_ADMIN_SETTINGS: "Seaded" + ACCESS_ADMIN_PAGES: "Halda lehti" + ACCESS_ADMIN_MAINTENANCE: "Saidi haldamine" + ACCESS_ADMIN_STATISTICS: "Saidi statistika" + ACCESS_ADMIN_PLUGINS: "Halda pluginaid" + ACCESS_ADMIN_THEMES: "Halda teemasid" + ACCESS_ADMIN_TOOLS: "Ligipääs tööriistadele" + ACCESS_ADMIN_USERS: "Halda kasutajaid" + USERS: "Kasutajad" + ACL: "Ligipääsu haldamine" + FLEX_CACHING: "Paindlik vahemälu" + LANGUAGE_TRANSLATIONS: "Tõlked" + RESET: "Lähtesta" + LOGOS: "Logod" + PRESETS: "Eelseadistused" + COLOR_SCHEME_LABEL: "Värviteema" + COLOR_SCHEME_NAME: "Kohandatud värviskeemi nimi" + COLOR_SCHEME_NAME_PLACEHOLDER: "Sinise varjunid" + PRIMARY_ACCENT_LABEL: "Peamine lisavärv" + WEB_FONTS_LABEL: "Veebifondid" + HEADER_FONT_LABEL: "Päise font" + CUSTOM_CSS_LABEL: "Kohandatud CSS" + CUSTOM_FOOTER: "Kohandatud jalus" + LOAD_PRESET: "Laadi eelseadistus" + EXPORT: "Ekspordi" + CODEMIRROR_THEME: "Redaktori teema" + GENERAL: "Üldine" + CONTENT_EDITOR: "Sisuredaktor" + BAD_FILENAME: "Vigane failinimi" + SHOW_SENSITIVE: "Näita tundlikku infot" CONFIGURATION: "Seadistused" + CUSTOMIZATION: "Kohandamine" + EXTRAS: "Lisad" + BASICS: "Peamine" ADMIN_CACHING: "Luba adminiliidese vahemälu kasutamine" ADMIN_CACHING_HELP: "Adminiliidese vahemällu lugemist saab kasutada sõltumata saidi avalikust poolest" + LOGO_TEXT: "Logo tekst" CONTENT_PADDING: "Sisu padding" CONTENT_PADDING_HELP: "Lülita sisse või välja sisu padding sisuala ümber suurema ruumi tekitamiseks" + SIDEBAR_HOVER_DELAY_APPEND: "millisekundit" + SIDEBAR_ACTIVATION_TAB: "Kaart" + SIDEBAR_SIZE: "Külgriba suurus" + SIDEBAR_SIZE_AUTO: "Automaatne laius" + SIDEBAR_SIZE_SMALL: "Väike laius" + EDIT_MODE: "Muutmise režiim" + FRONTEND_PREVIEW_TARGET_NEW: "Uuel kaardil" + FRONTEND_PREVIEW_TARGET_CURRENT: "Praegune kaart" + PARENT_DROPDOWN_FOLDER: "Näita kausta" TIMEOUT: "Aegumine" TIMEOUT_HELP: "Määrab sessiooni aegumise sekundites" DASHBOARD: "Töölaud" NOTIFICATIONS: "Teated" + PLUGINS_NOTIFICATIONS: "Pluginate teavitused" + THEMES_NOTIFICATIONS: "Teemade teavitused" + LOGO_BG_HELP: "Logo taust" + LOGO_LINK_HELP: "Logo link" + NAV_BG_HELP: "Menüü taust" + NAV_TEXT_HELP: "Menüü tekst" + NAV_LINK_HELP: "Menüü link" + NAV_SELECTED_BG_HELP: "Valitud menüü taust" + NAV_SELECTED_LINK_HELP: "Valitud menüü link" + PAGE_BG_HELP: "Lehe taust" + PAGE_TEXT_HELP: "Lehe tekst" + PAGE_LINK_HELP: "Lehe link" + CONTENT_BG_HELP: "Sisu taust" + CONTENT_TEXT_HELP: "Sisu tekst" + CONTENT_LINK_HELP: "Sisu link" + CONTENT_LINK2_HELP: "Sisu link 2" + CONTENT_HEADER_HELP: "Sisu päis" + BUTTON_BG_HELP: "Nupu taust" + BUTTON_TEXT_HELP: "Nupu tekst" + NOTICE_BG_HELP: "Teavituse taust" + NOTICE_TEXT_HELP: "Teavituse tekst" + UPDATES_BG_HELP: "Uuenduste taust" + UPDATES_TEXT_HELP: "Uuenduste tekst" + BUTTON_COLORS: "Nupu värvid" + CONTENT_COLORS: "Sisu värvid" + LOGO_COLORS: "Logo värvid" + NAV_COLORS: "Menüü värvid" + NOTICE_COLORS: "Teavituste värvid" + PAGE_COLORS: "Lehe värvid" + TOOLBAR_COLORS: "Tööriistariba värvid" + UPDATE_COLORS: "Uuenda värve" + POPULARITY: "Populaarsus" + VISITOR_TRACKING: "Külastajate jälgimine" + IGNORE_URLS: "Ignoreeri" + IGNORE_URLS_HELP: "URL-id, mida ignoreerida" + RESIZE_WIDTH: "Muuda laiust" + RESIZE_HEIGHT: "Muuda kõrgust" + RES_MIN_WIDTH: "Resolutsiooni minimaalne laius" + RES_MIN_HEIGHT: "Resolutsiooni minimaalne kõrgus" + RES_MAX_WIDTH: "Resolutsiooni maksimaalne laius" + RES_MAX_HEIGHT: "Resolutsiooni maksimaalne kõrgus" + RESIZE_QUALITY: "Suuruse muutmise kvaliteet" + PIXELS: "pikslit" + ACCESS_ADMIN_CONFIGURATION_SECURITY: "Halda turvalisuse seadeid" + SESSION_DOMAIN: "Sessiooni domeen" + SESSION_PATH: "Sessiooni kaust" diff --git a/user/plugins/admin/languages/fa.yaml b/user/plugins/admin/languages/fa.yaml index 56b728b..d9c318e 100644 --- a/user/plugins/admin/languages/fa.yaml +++ b/user/plugins/admin/languages/fa.yaml @@ -3,7 +3,7 @@ PLUGIN_ADMIN: ADMIN_NOSCRIPT_MSG: "لطفاً جاوا اسکریپت را در مرورگرتان فعال کنید." ADMIN_BETA_MSG: "این یک نسخه تکمیل نشده است! استفاده از آن در محصولتان شمارا با خطر مواجه میکند..." ADMIN_REPORT_ISSUE: "یک مشکل پیدا شد؟ لطفاً آن را در گیت هاب گزارش کنید." - EMAIL_FOOTER: " استفاده شده از Grav\n - سیستم مدیریت محتوای فایل محور" + EMAIL_FOOTER: "قدرت گرفته از گراو - سامانه مدیریت محتوی مدرن و بی نیاز به پایگاه داده" LOGIN_BTN: "ورود" LOGIN_BTN_FORGOT: "فراموش کرده اید" LOGIN_BTN_RESET: "تنظیم مجدد رمز عبور" @@ -17,11 +17,11 @@ PLUGIN_ADMIN: RESET_LINK_EXPIRED: "لینک بازتنظیم منقضی شده است لطفا دوباره تلاش کنید" RESET_PASSWORD_RESET: "کلمه عبور مجدد تنظیم شده است" RESET_INVALID_LINK: "از لینک باز تنظیم نامعتبر استفاده شده است. لطفا دوباره تلاش کنید" - FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL: "فرامین مربوط به تنظیم مجدد کلمه عبور به ایمیل ( S%) شما ارسال شده است" - FORGOT_FAILED_TO_EMAIL: "ارسال فرامین به ایمیل ناموفق بود ، لطفا دوباره تلاش کنید" - FORGOT_CANNOT_RESET_EMAIL_NO_EMAIL: "نمی توان رمز عبور را برای %S تنظیم مجدد کرد ، نشانی پست الکترونیکی تنظیم نشده است" + FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL: "فرامین مربوط به تنظیم مجدد کلمه عبور به رایانامه( S%) شما ارسال شده است" + FORGOT_FAILED_TO_EMAIL: "ارسال توضیحات از طریق رایانامه ممکن نبود، لطفاً مجددا تلاش کنید" + FORGOT_CANNOT_RESET_EMAIL_NO_EMAIL: "نمی توان رمز عبور را برای %S تنظیم مجدد کرد ، نشانی رایانامه تنظیم نشده است" FORGOT_USERNAME_DOES_NOT_EXIST: "کاربر با نام کاربری %s موجود نیست" - FORGOT_EMAIL_NOT_CONFIGURED: "قادر به تنظیم مجدد رمز عبور نیست. این سایت برای ارسال ایمیل پیکربندی نشده است" + FORGOT_EMAIL_NOT_CONFIGURED: "قادر به تنظیم مجدد رمز عبور نیست. این سایت برای ارسال رایانامه پیکربندی نشده است" FORGOT_EMAIL_SUBJECT: "%s درخواست تنظیم مجدد رمزعبور" FORGOT_EMAIL_BODY: "
عزیز %1$s,
\nیک درخواست ایجاد شده توسط %4$s برای تنظیم مجدد رمز عبور شما.
\n\n
برای تنظیم مجدد رمز عبور بر روی این کلیک کنید\n
\n
یا لینک زیر را کپی و در نوار آدرس مرورگر خود قرار دهید و اجرا کنید:
%2$s
\nبا سپاس و احترام,
%3$s
".concat(error.stack, "
") : '';
- utils_toastr.error("Fetch Failed: \n ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ALL, " ").concat(type_translation, "\n \n ").concat(length, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.OF_YOUR, " ").concat(type_translation.toLowerCase(), " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE, "\n
\n ")); - var existing_slugs = external_jQuery_default()('[data-update-packages]').attr('data-packages-slugs') || ''; - - if (existing_slugs) { - existing_slugs = existing_slugs.split(','); - } else { - existing_slugs = []; - } - - var slugs = unique_default()(existing_slugs.concat(Object.keys(resources))).join(); - external_jQuery_default()('[data-update-packages]').attr('data-packages-slugs', "".concat(slugs)); - Object.keys(resources).forEach(function (item) { - // listing page - var container = external_jQuery_default()("[data-gpm-".concat(singles[index], "=\"").concat(item, "\"]")); - var element = container.find('.gpm-name'); - var url = element.find('a'); - var content_wrapper = container.parents('.content-wrapper'); - - if (type === 'plugins' && !element.find('.badge.update').length) { - element.append("").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE, "!")); - content_wrapper.addClass('has-updates'); - } else if (type === 'themes') { - element.append("")); - content_wrapper.addClass('has-updates'); - } // details page - - - if (container.length) { - var details = external_jQuery_default()(".grav-update.".concat(singles[index])); - - if (details.length) { - var releaseType = resources[item].type === 'testing' ? 'test release' : ''; - details.html("\n\n ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UPDATE, " ").concat(singles[index].charAt(0).toUpperCase() + singles[index].substr(1).toLowerCase(), "\n \n v").concat(resources[item].available, " ").concat(releaseType, " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.OF_THIS, " ").concat(singles[index], " ").concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE, "!\n
\n ")).css('display', 'block'); - is_current_package_latest = false; - } - } - }); - external_jQuery_default()('[data-update-packages]').removeClass('hidden'); - }); - external_jQuery_default()('.content-wrapper').addClass('updates-checked'); - - if (!is_current_package_latest) { - external_jQuery_default()('.warning-reinstall-not-latest-release').removeClass('hidden'); - } - } - }]); - - return Updates; -}(); - - -var updates_Instance = new Updates(); - // automatically refresh UI for updates (graph, sidebar, plugin/themes pages) after every fetch - -Instance.on('fetched', function (response, raw) { - updates_Instance.setPayload(response.payload || {}); - updates_Instance.grav().resources(); -}); - -if (external_GravAdmin_namespaceObject.config.enable_auto_updates_check === '1') { - Instance.fetch(); -} -// EXTERNAL MODULE: ./node_modules/chartist/dist/chartist.js -var chartist = __webpack_require__(69259); -var chartist_default = /*#__PURE__*/__webpack_require__.n(chartist); -;// CONCATENATED MODULE: ./app/dashboard/chart.js -function chart_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { chart_typeof = function _typeof(obj) { return typeof obj; }; } else { chart_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return chart_typeof(obj); } - -function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } - -function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = chart_getPrototypeOf(object); if (object === null) break; } return object; } - -function chart_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) chart_setPrototypeOf(subClass, superClass); } - -function chart_setPrototypeOf(o, p) { chart_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return chart_setPrototypeOf(o, p); } - -function chart_createSuper(Derived) { var hasNativeReflectConstruct = chart_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = chart_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = chart_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return chart_possibleConstructorReturn(this, result); }; } - -function chart_possibleConstructorReturn(self, call) { if (call && (chart_typeof(call) === "object" || typeof call === "function")) { return call; } return chart_assertThisInitialized(self); } - -function chart_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function chart_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function chart_getPrototypeOf(o) { chart_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return chart_getPrototypeOf(o); } - -function chart_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function chart_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function chart_createClass(Constructor, protoProps, staticProps) { if (protoProps) chart_defineProperties(Constructor.prototype, protoProps); if (staticProps) chart_defineProperties(Constructor, staticProps); return Constructor; } - - - - - - // let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; - -var defaults = { - data: { - series: [100, 0] - }, - options: { - Pie: { - donut: true, - donutWidth: 10, - startAngle: 0, - total: 100, - showLabel: false, - height: 150, - // chartPadding: !isFirefox ? 10 : 25 // workaround for older versions of firefox - chartPadding: 5 - }, - Bar: { - height: 164, - chartPadding: 20, - // workaround for older versions of firefox - axisX: { - showGrid: false, - labelOffset: { - x: 0, - y: 0 - } - }, - axisY: { - offset: 15, - showLabel: true, - showGrid: true, - labelOffset: { - x: 5, - y: 5 - }, - scaleMinSpace: 25 - } - } - } -}; - -var Chart = /*#__PURE__*/function () { - function Chart(element) { - var _this = this; - - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - chart_classCallCheck(this, Chart); - - this.element = external_jQuery_default()(element) || []; - - if (!this.element[0]) { - return; - } - - var type = (this.element.data('chart-type') || 'pie').toLowerCase(); - this.type = type.charAt(0).toUpperCase() + type.substr(1).toLowerCase(); - options = Object.assign({}, defaults.options[this.type], options); - data = Object.assign({}, defaults.data, data); - Object.assign(this, { - options: options, - data: data - }); - this.chart = (chartist_default())[this.type](this.element.find('.ct-chart').empty()[0], this.data, this.options); - this.chart.on('created', function () { - _this.element.find('.hidden').removeClass('hidden'); // FIX: workaround for chartist issue not allowing HTML in labels anymore - // https://github.com/gionkunz/chartist-js/issues/937 - - - _this.element.find('.ct-label').each(function (index, label) { - label = external_jQuery_default()(label); - var text = label.html().replace('<', '<').replace('>', '>'); - label.html(text); - }); - }); - } - - chart_createClass(Chart, [{ - key: "updateData", - value: function updateData(data) { - Object.assign(this.data, data); - this.chart.update(this.data); - } - }]); - - return Chart; -}(); - - -; -var UpdatesChart = /*#__PURE__*/function (_Chart) { - chart_inherits(UpdatesChart, _Chart); - - var _super = chart_createSuper(UpdatesChart); - - function UpdatesChart(element) { - var _this2; - - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - chart_classCallCheck(this, UpdatesChart); - - _this2 = _super.call(this, element, options, data); - - _this2.chart.on('draw', function (data) { - return _this2.draw(data); - }); - - Instance.on('fetched', function (response) { - if (!response.payload) { - return; - } - - var payload = response.payload.grav; - var missing = (response.payload.resources.total + (payload.isUpdatable ? 1 : 0)) * 100 / (response.payload.installed + (payload.isUpdatable ? 1 : 0)); - var updated = 100 - missing; - - _this2.updateData({ - series: [updated, missing] - }); - - if (response.payload.resources.total) { - updates_Instance.maintenance('show'); - } - }); - return _this2; - } - - chart_createClass(UpdatesChart, [{ - key: "draw", - value: function draw(data) { - if (data.index) { - return; - } - - var notice = external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN[data.value === 100 ? 'FULLY_UPDATED' : 'UPDATES_AVAILABLE']; - this.element.find('.numeric span').text("".concat(Math.round(data.value), "%")); - this.element.find('.js__updates-available-description').html(notice); - this.element.find('.hidden').removeClass('hidden'); - } - }, { - key: "updateData", - value: function updateData(data) { - _get(chart_getPrototypeOf(UpdatesChart.prototype), "updateData", this).call(this, data); // missing updates - - - if (this.data.series[0] < 100) { - this.element.closest('#updates').find('[data-update-packages]').fadeIn(); - } - } - }]); - - return UpdatesChart; -}(Chart); -var charts = {}; -external_jQuery_default()('[data-chart-name]').each(function () { - var element = external_jQuery_default()(this); - var name = element.data('chart-name') || ''; - var options = element.data('chart-options') || {}; - var data = element.data('chart-data') || {}; - - if (name === 'updates') { - charts[name] = new UpdatesChart(element, options, data); - } else { - charts[name] = new Chart(element, options, data); - } -}); -var Instances = charts; -;// CONCATENATED MODULE: ./app/dashboard/cache.js -function cache_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function cache_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function cache_createClass(Constructor, protoProps, staticProps) { if (protoProps) cache_defineProperties(Constructor.prototype, protoProps); if (staticProps) cache_defineProperties(Constructor, staticProps); return Constructor; } - - - - - -var getUrl = function getUrl() { - var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - - if (type) { - type = "cleartype:".concat(type, "/"); - } - - return "".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/cache.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "clearCache/").concat(type, "admin-nonce").concat(external_GravAdmin_namespaceObject.config.param_sep).concat(external_GravAdmin_namespaceObject.config.admin_nonce); -}; - -var Cache = /*#__PURE__*/function () { - function Cache() { - var _this = this; - - cache_classCallCheck(this, Cache); - - this.element = external_jQuery_default()('[data-clear-cache]'); - external_jQuery_default()('body').on('click', '[data-clear-cache]', function (event) { - return _this.clear(event, event.target); - }); - } - - cache_createClass(Cache, [{ - key: "clear", - value: function clear(event, element) { - var _this2 = this; - - var type = ''; - - if (event && event.preventDefault) { - event.preventDefault(); - } - - if (typeof event === 'string') { - type = event; - } - - element = element ? external_jQuery_default()(element) : external_jQuery_default()("[data-clear-cache-type=\"".concat(type, "\"]")); - type = type || external_jQuery_default()(element).data('clear-cache-type') || ''; - var url = element.data('clearCache') || getUrl(type); - this.disable(); - utils_request(url, function () { - return _this2.enable(); - }); - } - }, { - key: "enable", - value: function enable() { - this.element.removeAttr('disabled').find('> .fa').removeClass('fa-refresh fa-spin fa-retweet').addClass('fa-retweet'); - } - }, { - key: "disable", - value: function disable() { - this.element.attr('disabled', 'disabled').find('> .fa').removeClass('fa-retweet').addClass('fa-refresh fa-spin'); - } - }]); - - return Cache; -}(); - - -var cache_Instance = new Cache(); - -;// CONCATENATED MODULE: ./app/dashboard/backup.js - - - - -external_jQuery_default()('[data-backup][data-ajax*="backup/"]').on('click', function () { - var element = external_jQuery_default()(this); - var url = element.data('ajax'); - var inDropdown = element.closest('.dropdown-menu'); - (inDropdown.length ? inDropdown : element).closest('.button-group').find('> button:first').attr('disabled', 'disabled').find('> .fa').removeClass('fa-life-ring').addClass('fa-spin fa-refresh'); - utils_request(url, function () - /* response */ - { - if (Instances && Instances.backups) { - Instances.backups.updateData({ - series: [0, 100] - }); - Instances.backups.element.find('.numeric').html("0 ".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DAYS.toLowerCase(), "")); - } - - (inDropdown.length ? inDropdown : element).closest('.button-group').find('> button:first').removeAttr('disabled').find('> .fa').removeClass('fa-spin fa-refresh').addClass('fa-life-ring'); - }); -}); -external_jQuery_default()('[data-backup][data-ajax*="backupDelete"]').on('click', function () { - var element = external_jQuery_default()(this); - var url = element.data('ajax'); - var tr = element.closest('tr'); - tr.addClass('deleting'); - utils_request(url, function (response) { - if (response.status === 'success') { - tr.remove(); - } else { - tr.removeClass('deleting'); - } - }); -}); -;// CONCATENATED MODULE: ./app/dashboard/index.js - - - -/* harmony default export */ const dashboard = ({ - Chart: { - Chart: Chart, - UpdatesChart: UpdatesChart, - Instances: Instances - }, - Cache: cache_Instance -}); -// EXTERNAL MODULE: ./node_modules/sortablejs/modular/sortable.complete.esm.js -var sortable_complete_esm = __webpack_require__(88408); -// EXTERNAL MODULE: ./node_modules/debounce/index.js -var debounce = __webpack_require__(20296); -var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); -// EXTERNAL MODULE: ./app/utils/storage.js -var storage = __webpack_require__(92511); -;// CONCATENATED MODULE: ./app/pages/tree.js -function tree_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function tree_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function tree_createClass(Constructor, protoProps, staticProps) { if (protoProps) tree_defineProperties(Constructor.prototype, protoProps); if (staticProps) tree_defineProperties(Constructor, staticProps); return Constructor; } - - - -var sessionKey = 'grav:admin:pages'; - -if (!sessionStorage.getItem(sessionKey)) { - sessionStorage.setItem(sessionKey, '{}'); -} - -var PagesTree = /*#__PURE__*/function () { - function PagesTree(query) { - var _this = this; - - var elements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - tree_classCallCheck(this, PagesTree); - - this.query = query; - this.elements = external_jQuery_default()(elements !== undefined ? elements : this.query); - this.session = JSON.parse(sessionStorage.getItem(sessionKey) || '{}'); - - if (!this.elements.length) { - return; - } - - this.restore(); - this.elements.find('.page-icon').on('click', function (event) { - return _this.toggle(event.target); - }); - this.elements.data('tree_init', 1); - external_jQuery_default()('[data-page-toggleall]').on('click', function (event) { - var element = external_jQuery_default()(event.target).closest('[data-page-toggleall]'); - var action = element.data('page-toggleall'); - - _this[action](); - }); - } - - tree_createClass(PagesTree, [{ - key: "reload", - value: function reload() { - var elements = external_jQuery_default()(this.query).filter(function (index, element) { - return !external_jQuery_default()(element).data('tree_init'); - }); - - if (!elements.length) { - return; - } - - this.constructor(this.query, elements); - } - }, { - key: "toggle", - value: function toggle(elements) { - var _this2 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - elements = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")).find('[data-toggle="children"]'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this2.getState(element.closest('[data-toggle="children"]')); - - _this2[state.isOpen ? 'collapse' : 'expand'](state.id, dontStore); - }); - } - }, { - key: "collapse", - value: function collapse(elements) { - var _this3 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - elements = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")).find('[data-toggle="children"]'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this3.getState(element); - - if (state.isOpen) { - state.children.hide(); - state.icon.removeClass('children-open').addClass('children-closed'); - - if (!dontStore) { - delete _this3.session[state.id]; - } - } - }); - - if (!dontStore) { - this.save(); - } - } - }, { - key: "expand", - value: function expand(elements) { - var _this4 = this; - - var dontStore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (typeof elements === 'string') { - var element = external_jQuery_default()("[data-nav-id=\"".concat(elements, "\"]")); - var parents = element.parents('[data-nav-id]'); // loop back through parents, we don't want to expand an hidden child - - if (parents.length) { - parents = parents.find('[data-toggle="children"]:first'); - parents = parents.add(element.find('[data-toggle="children"]:first')); - return this.expand(parents, dontStore); - } - - elements = element.find('[data-toggle="children"]:first'); - } - - elements = external_jQuery_default()(elements || this.elements); - elements.each(function (index, element) { - element = external_jQuery_default()(element); - - var state = _this4.getState(element); - - if (!state.isOpen) { - state.children.show(); - state.icon.removeClass('children-closed').addClass('children-open'); - - if (!dontStore) { - _this4.session[state.id] = 1; - } - } - }); - - if (!dontStore) { - this.save(); - } - } - }, { - key: "restore", - value: function restore() { - var _this5 = this; - - this.collapse(null, true); - Object.keys(this.session).forEach(function (key) { - _this5.expand(key, 'no-store'); - }); - } - }, { - key: "save", - value: function save() { - return sessionStorage.setItem(sessionKey, JSON.stringify(this.session)); - } - }, { - key: "getState", - value: function getState(element) { - element = external_jQuery_default()(element); - return { - id: element.closest('[data-nav-id]').data('nav-id'), - children: element.closest('li.page-item').find('ul:first'), - icon: element.find('.page-icon'), - - get isOpen() { - return this.icon.hasClass('children-open'); - } - - }; - } - }]); - - return PagesTree; -}(); - - -var tree_Instance = new PagesTree('[data-toggle="children"]'); - -// EXTERNAL MODULE: ./node_modules/selectize/dist/js/selectize.js -var selectize = __webpack_require__(25703); -var selectize_default = /*#__PURE__*/__webpack_require__.n(selectize); -;// CONCATENATED MODULE: ./app/utils/selectize-required-fix.js -/** - * This is a plugin to override the `.refreshValidityState` method of - * the Selectize library (https://selectize.github.io/selectize.js/). - * The library is not maintained anymore (as of 2017-09-13) and contains - * a bug which causes Microsoft Edge to not work with selectized [required] - * form fields. This plugin should be removed if - * https://github.com/selectize/selectize.js/pull/1320 is ever merged - * and a new version of Selectize gets released. - */ - -selectize_default().define('required-fix', function (options) { - var _this = this; - - this.refreshValidityState = function () { - if (!_this.isRequired) return false; - var invalid = !_this.items.length; - _this.isInvalid = invalid; - - if (invalid) { - _this.$control_input.attr('required', ''); - - _this.$input.removeAttr('required'); - } else { - _this.$control_input.removeAttr('required'); - - _this.$input.attr('required'); - } - }; -}); -;// CONCATENATED MODULE: ./app/pages/filter.js -function filter_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { filter_typeof = function _typeof(obj) { return typeof obj; }; } else { filter_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return filter_typeof(obj); } - -function filter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function filter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function filter_createClass(Constructor, protoProps, staticProps) { if (protoProps) filter_defineProperties(Constructor.prototype, protoProps); if (staticProps) filter_defineProperties(Constructor, staticProps); return Constructor; } - - - - - - - - - -/* @formatter:off */ - -/* eslint-disable */ - -var options = [{ - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.MODULE, - key: 'Module', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.VISIBLE, - key: 'Visible', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ROUTABLE, - key: 'Routable', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.PUBLISHED, - key: 'Published', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_MODULE, - key: 'NonModule', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_VISIBLE, - key: 'NonVisible', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_ROUTABLE, - key: 'NonRoutable', - cat: 'mode' -}, { - flag: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.NON_PUBLISHED, - key: 'NonPublished', - cat: 'mode' -}]; -/* @formatter:on */ - -/* eslint-enable */ - -var PagesFilter = /*#__PURE__*/function () { - function PagesFilter(filters, search) { - var _this = this; - - filter_classCallCheck(this, PagesFilter); - - this.filters = external_jQuery_default()(filters); - this.search = external_jQuery_default()(search); - this.options = options; - this.tree = tree_Instance; - var storage = JSON.parse(localStorage.getItem('grav:admin:pages:filter') || '{}'); - - if (!this.filters.length || !this.search.length) { - return; - } - - this.labels = this.filters.data('filter-labels'); - this.search.on('input', debounce_default()(function () { - return _this.filter(); - }, 250)); - this.filters.on('change', function () { - return _this.filter(); - }); // restore state - - if (storage.flags || storage.query) { - this.setValues(storage); - this.filter(); - } - - this._initSelectize(); - } - - filter_createClass(PagesFilter, [{ - key: "filter", - value: function filter(value) { - var _this2 = this; - - var data = { - flags: '', - query: '' - }; - - if (filter_typeof(value) === 'object') { - Object.assign(data, value); - } - - if (typeof value === 'string') { - data.query = value; - } - - if (typeof value === 'undefined') { - data.flags = this.filters.val(); - data.query = this.search.val(); - } - - if (!Object.keys(data).filter(function (key) { - return data[key] !== ''; - }).length) { - this.resetValues(); - return; - } - - data.flags = data.flags.replace(/(\s{1,})?,(\s{1,})?/g, ','); - this.setValues({ - flags: data.flags, - query: data.query - }, 'silent'); - utils_request("".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/pages-filter.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "filterPages"), { - method: 'post', - body: data - }, function (response) { - _this2.refreshDOM(response); - }); - } - }, { - key: "refreshDOM", - value: function refreshDOM(response) { - var _this3 = this; - - var items = external_jQuery_default()('[data-nav-id]'); - - if (!response) { - items.removeClass('search-match').show(); - this.tree.restore(); - return; - } - - items.removeClass('search-match').hide(); - response.results.forEach(function (page) { - var match = items.filter("[data-nav-id=\"".concat(page, "\"]")).addClass('search-match').show(); - match.parents('[data-nav-id]').addClass('search-match').show(); - - _this3.tree.expand(page, 'no-store'); - }); - } - }, { - key: "setValues", - value: function setValues(_ref, silent) { - var _ref$flags = _ref.flags, - flags = _ref$flags === void 0 ? '' : _ref$flags, - _ref$query = _ref.query, - query = _ref$query === void 0 ? '' : _ref$query; - var flagsArray = flags.replace(/(\s{1,})?,(\s{1,})?/g, ',').split(','); - - if (this.filters.val() !== flags) { - var selectize = this.filters.data('selectize'); - this.filters[selectize ? 'setValue' : 'val'](flagsArray, silent); - } - - if (this.search.val() !== query) { - this.search.val(query); - } - - localStorage.setItem('grav:admin:pages:filter', JSON.stringify({ - flags: flags, - query: query - })); - } - }, { - key: "resetValues", - value: function resetValues() { - this.setValues('', 'silent'); - this.refreshDOM(); - } - }, { - key: "_initSelectize", - value: function _initSelectize() { - var _this4 = this; - - var extras = { - type: this.filters.data('filter-types') || {}, - access: this.filters.data('filter-access-levels') || {} - }; - Object.keys(extras).forEach(function (cat) { - Object.keys(extras[cat]).forEach(function (key) { - _this4.options.push({ - cat: cat, - key: key, - flag: extras[cat][key] - }); - }); - }); - this.filters.selectize({ - maxItems: null, - valueField: 'key', - labelField: 'flag', - searchField: ['flag', 'key'], - options: this.options, - optgroups: this.labels, - optgroupField: 'cat', - optgroupLabelField: 'name', - optgroupValueField: 'id', - optgroupOrder: this.labels.map(function (item) { - return item.id; - }), - plugins: ['optgroup_columns', 'required-fix'] - }); - } - }]); - - return PagesFilter; -}(); - - -var filter_Instance = new PagesFilter('input[name="page-filter"]', 'input[name="page-search"]'); - -// EXTERNAL MODULE: ./node_modules/speakingurl/index.js -var speakingurl = __webpack_require__(989); -var speakingurl_default = /*#__PURE__*/__webpack_require__.n(speakingurl); -;// CONCATENATED MODULE: ./app/utils/jquery-utils.js -var _this = undefined; - - - // jQuery no parents filter - -(external_jQuery_default()).expr[":"].noparents = external_jQuery_default().expr.createPseudo(function (text) { - return function (element) { - return external_jQuery_default()(element).parents(text).length < 1; - }; -}); // Slugify -// CommonJS and ES6 version of https://github.com/madflow/jquery-slugify - -(external_jQuery_default()).fn.slugify = function (source, options) { - return _this.each(function (element) { - var target = external_jQuery_default()(element); - var source = external_jQuery_default()(source); - target.on('keyup change', function () { - target.data('locked', target.val() !== '' && target.val() !== undefined); - }); - source.on('keyup change', function () { - if (target.data('locked') === true) { - return true; - } - - var isInput = target.is('input') || target.is('textarea'); - target[isInput ? 'val' : 'text'](external_jQuery_default().slugify(source.val(), options)); - }); - }); -}; // Static method. - - -(external_jQuery_default()).slugify = function (sourceString, options) { - options = external_jQuery_default().extend({}, (external_jQuery_default()).slugify.options, options); - options.lang = options.lang || external_jQuery_default()('html').prop('lang'); - - if (typeof options.preSlug === 'function') { - sourceString = options.preSlug(sourceString); - } - - sourceString = options.slugFunc(sourceString, options); - - if (typeof options.postSlug === 'function') { - sourceString = options.postSlug(sourceString); - } - - return sourceString; -}; // Default plugin options - - -(external_jQuery_default()).slugify.options = { - preSlug: null, - postSlug: null, - slugFunc: function slugFunc(input, opts) { - return speakingurl_default()(input, opts); - } -}; -;// CONCATENATED MODULE: ./app/pages/page/add.js - - - - -var custom = false; -var folder = external_jQuery_default()('[data-remodal-id="modal"] input[name="data[folder]"], [data-remodal-id="module"] input[name="data[folder]"]'); -var title = external_jQuery_default()('[data-remodal-id="modal"] input[name="data[title]"], [data-remodal-id="module"] input[name="data[title]"]'); - -var getFields = function getFields(type, target) { - target = external_jQuery_default()(target); - var query = "[data-remodal-id=\"".concat(target.closest('[data-remodal-id]').data('remodal-id'), "\"]"); - return { - title: type === 'title' ? external_jQuery_default()(target) : external_jQuery_default()("".concat(query, " input[name=\"data[title]\"]")), - folder: type === 'folder' ? external_jQuery_default()(target) : external_jQuery_default()("".concat(query, " input[name=\"data[folder]\"]")) - }; -}; - -title.on('input focus blur', function (event) { - if (custom) { - return true; - } - - var elements = getFields('title', event.currentTarget); - var slug = external_jQuery_default().slugify(elements.title.val(), { - custom: { - "'": '' - } - }); - elements.folder.val(slug); -}); -folder.on('input', function (event) { - var elements = getFields('folder', event.currentTarget); - var input = elements.folder.get(0); - var value = elements.folder.val(); - var selection = { - start: input.selectionStart, - end: input.selectionEnd - }; - value = value.toLowerCase().replace(/\s/g, '-').replace(/[^a-z0-9_\-]/g, ''); - elements.folder.val(value); - custom = !!value; // restore cursor position - - input.setSelectionRange(selection.start, selection.end); -}); -folder.on('focus blur', function (event) { - return getFields('title', event.currentTarget).title.trigger('input'); -}); -external_jQuery_default()(document).on('change', '[name="data[route]"]', function (event) { - var rawroute = external_jQuery_default()(event.currentTarget).val(); - var pageTemplate = external_jQuery_default()('[name="data[name]"]'); - var URI = "".concat(external_GravAdmin_namespaceObject.config.base_url_relative, "/ajax.json/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "getChildTypes"); - - if (pageTemplate.length === 0) { - return; - } - - utils_request(URI, { - method: 'post', - body: { - rawroute: rawroute - } - }, function (response) { - var type = response.child_type; - - if (type !== '' && type !== 'default') { - pageTemplate.val(type); - pageTemplate.data('selectize').setValue(type); - } - }); -}); -;// CONCATENATED MODULE: ./app/pages/page/move.js - -external_jQuery_default()(document).on('click', '[data-page-move] button[name="task"][value="save"]', function (event) { - /* let route = $('form#blueprints:first select[name="data[route]"]'); - let moveTo = $('[data-page-move] select').val(); - if (route.length && route.val() !== moveTo) { - let selectize = route.data('selectize'); - route.val(moveTo); - if (selectize) selectize.setValue(moveTo); - }*/ - var modal = external_jQuery_default()(event.currentTarget).closest('[data-remodal-id]'); - var parents = modal.data('parents') || {}; - var finder = parents.finder; - - if (!parents || !finder) { - return true; - } - - var field = parents.field; - var parentLabel = parents.parentLabel; - var parentName = parents.parentName; - var selection = finder.findLastActive().item[0]; - var value = selection._item[finder.config.valueKey]; - var name = selection._item[finder.config.labelKey]; - field.val(value); - parentLabel.text(value); - parentName.text(name); - finder.config.defaultPath = value; - external_jQuery_default()('').css({ - backgroundColor: 'rgba(255, 255, 255, 0.1)', - position: 'fixed', - top: 0, - left: 0, - width: '100vw', - height: '100vh', - zIndex: 15000 - }).appendTo(external_jQuery_default()('body')); -}); -/* -$(document).on('click', '[data-remodal-id="parents"] [data-parents-select]', (event) => { - const modal = $(event.currentTarget).closest('[data-remodal-id]'); - const parents = modal.data('parents'); - const finder = parents.finder; - const field = parents.field; - const parentLabel = parents.parentLabel; - const parentName = parents.parentName; - const selection = finder.findLastActive().item[0]; - const value = selection._item[finder.config.valueKey]; - const name = selection._item[finder.config.labelKey]; - - field.val(value); - parentLabel.text(value); - parentName.text(name); - finder.config.defaultPath = value; - - const remodal = $.remodal.lookup[$(`[data-remodal-id="${modal.data('remodalId')}"]`).data('remodal')]; - remodal.close(); -}); -*/ -;// CONCATENATED MODULE: ./app/pages/page/delete.js - -external_jQuery_default()(document).on('click', '[data-remodal-target="delete"]', function () { - var confirm = external_jQuery_default()('[data-remodal-id="delete"] [data-delete-action]'); - var link = external_jQuery_default()(this).data('delete-url'); - confirm.data('delete-action', link); -}); -external_jQuery_default()(document).on('click', '[data-delete-action]', function () { - var remodal = (external_jQuery_default()).remodal.lookup[external_jQuery_default()('[data-remodal-id="delete"]').data('remodal')]; - __webpack_require__.g.location.href = external_jQuery_default()(this).data('delete-action'); - remodal.close(); -}); -;// CONCATENATED MODULE: ./app/pages/page/unset.js - -external_jQuery_default()(document).on('click', '.dz-unset', function () { - var file_upload = external_jQuery_default()(this).closest('.files-upload'); - external_jQuery_default()(this).closest('.dz-image-preview').remove(); - var unset_image = external_jQuery_default()(this).closest('.dz-image-preview').find('[data-dz-name]').text().trim(); - var images = JSON.parse(file_upload.find('input[data-grav-field="hidden"]').val()) || {}; - var image_array = {}; - external_jQuery_default().each(images, function (ind, obj) { - if (!ind.endsWith(unset_image)) { - image_array[ind] = obj; - } - }); - file_upload.find('input[data-grav-field="hidden"]').val(JSON.stringify(image_array)); -}); -;// CONCATENATED MODULE: ./app/pages/page/disable-buttons.js - -external_jQuery_default()('.disable-after-click').on('click', function () { - external_jQuery_default()(this).addClass('pointer-events-disabled'); -}); -// EXTERNAL MODULE: ./node_modules/dropzone/dist/dropzone.js -var dist_dropzone = __webpack_require__(32025); -var dropzone_default = /*#__PURE__*/__webpack_require__.n(dist_dropzone); -;// CONCATENATED MODULE: ./app/forms/fields/files.js -function files_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function files_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function files_createClass(Constructor, protoProps, staticProps) { if (protoProps) files_defineProperties(Constructor.prototype, protoProps); if (staticProps) files_defineProperties(Constructor, staticProps); return Constructor; } - - - // import EXIF from 'exif-js'; - - - // translations - -var Dictionary = { - dictCancelUpload: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_CANCEL_UPLOAD, - dictCancelUploadConfirmation: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_CANCEL_UPLOAD_CONFIRMATION, - dictDefaultMessage: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_DEFAULT_MESSAGE, - dictFallbackMessage: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_FALLBACK_MESSAGE, - dictFallbackText: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_FALLBACK_TEXT, - dictFileTooBig: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_FILE_TOO_BIG, - dictInvalidFileType: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_INVALID_FILE_TYPE, - dictMaxFilesExceeded: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_MAX_FILES_EXCEEDED, - dictRemoveFile: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_REMOVE_FILE, - dictResponseError: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROPZONE_RESPONSE_ERROR -}; -(dropzone_default()).autoDiscover = false; -(dropzone_default()).options.gravPageDropzone = {}; - -(dropzone_default()).confirm = function (question, accepted, rejected) { - var doc = external_jQuery_default()(document); - var modalSelector = '[data-remodal-id="delete-media"]'; - - var removeEvents = function removeEvents() { - doc.off('confirmation', modalSelector, accept); - doc.off('cancellation', modalSelector, reject); - external_jQuery_default()(modalSelector).find('.remodal-confirm').removeClass('pointer-events-disabled'); - }; - - var accept = function accept() { - accepted && accepted(); - removeEvents(); - }; - - var reject = function reject() { - rejected && rejected(); - removeEvents(); - }; - - (external_jQuery_default()).remodal.lookup[external_jQuery_default()(modalSelector).data('remodal')].open(); - doc.on('confirmation', modalSelector, accept); - doc.on('cancellation', modalSelector, reject); -}; - -var DropzoneMediaConfig = { - timeout: 0, - thumbnailWidth: 200, - thumbnailHeight: 150, - addRemoveLinks: false, - dictDefaultMessage: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.DROP_FILES_HERE_TO_UPLOAD.replace(/</g, '<').replace(/>/g, '>'), - dictRemoveFileConfirmation: '[placeholder]', - previewTemplate: "\n".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD, " ").concat(file.name, "
\n").concat(response.message, "") - }); - } - }, { - key: "onDropzoneComplete", - value: function onDropzoneComplete(file) { - if (!file.accepted && !file.rejected) { - var data = { - status: 'error', - message: "".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_UNSUPPORTED, ": ").concat(file.name.match(/\..+/).join('')) - }; - return this.handleError({ - file: file, - data: data, - mode: 'removeFile', - msg: "
".concat(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_ERROR_ADD, " ").concat(file.name, "
\n").concat(data.message, "") - }); - } - - if (this.options.reloadPage) { - __webpack_require__.g.location.reload(); - } - } - }, { - key: "b64_to_utf8", - value: function b64_to_utf8(str) { - str = str.replace(/\s/g, ''); - return decodeURIComponent(escape(window.atob(str))); - } - }, { - key: "onDropzoneRemovedFile", - value: function onDropzoneRemovedFile(file) { - var _this5 = this; - - if (!file.accepted || file.rejected) { - return; - } - - var url = file.removeUrl || this.urls["delete"] || this.options.url; - var path = (url || '').match(/path:(.*)\//); - var body = { - filename: file.name, - uri: this.getURI() - }; - - if (file.sessionParams) { - body.task = 'filessessionremove'; - body.session = file.sessionParams; - } - - var customPost = this.container.data('filePostRemove') || {}; - - if (Object.keys(customPost).length) { - body = {}; - Object.keys(customPost).forEach(function (key) { - body[key] = customPost[key]; - }); - } - - body['filename'] = file.name; - body['admin-nonce'] = external_GravAdmin_namespaceObject.config.admin_nonce; - utils_request(url, { - method: 'post', - body: body - }, function () { - if (!path) { - return; - } - - path = _this5.b64_to_utf8(path[1]); - - var input = _this5.container.find('[name][type="hidden"]'); - - var data = JSON.parse(input.val() || '{}'); - delete data[path]; - input.val(JSON.stringify(data)); - }); - } - }, { - key: "onDropzoneError", - value: function onDropzoneError(file, response, xhr) { - var message = xhr ? response.error.message : response; - external_jQuery_default()(file.previewElement).find('[data-dz-errormessage]').html(message); - return this.handleError({ - file: file, - data: { - status: 'error' - }, - msg: "
".concat(message, "") - }); - } - }, { - key: "handleError", - value: function handleError(options) { - var file = options.file, - data = options.data, - mode = options.mode, - msg = options.msg; - - if (data.status !== 'error' && data.status !== 'unauthorized') { - return; - } - - switch (mode) { - case 'addBack': - if (file instanceof File) { - this.dropzone.addFile.call(this.dropzone, file); - } else { - this.dropzone.files.push(file); - this.dropzone.options.addedfile.call(this.dropzone, file); - this.dropzone.options.thumbnail.call(this.dropzone, file, file.extras.url); - } - - break; - - case 'removeFile': - default: - if (~this.dropzone.files.indexOf(file)) { - file.rejected = true; - this.dropzone.removeFile.call(this.dropzone, file, { - silent: true - }); - } - - break; - } - - var modal = external_jQuery_default()('[data-remodal-id="generic"]'); - modal.find('.error-content').html(msg); - (external_jQuery_default()).remodal.lookup[modal.data('remodal')].open(); - } - }]); - - return FilesField; -}(); - - -function UriToMarkdown(uri) { - uri = uri.replace(/@3x|@2x|@1x/, ''); - uri = uri.replace(/\(/g, '%28'); - uri = uri.replace(/\)/g, '%29'); - return uri.match(/\.(jpe?g|png|gif|svg|mp4|webm|ogv|mov)$/i) ? "![](".concat(uri, ")") : "[".concat(decodeURI(uri), "](").concat(uri, ")"); -} -var instances = []; -var cache = external_jQuery_default()(); - -var onAddedNodes = function onAddedNodes(event, target -/* , record, instance */ -) { - var files = external_jQuery_default()(target).find('.dropzone.files-upload'); - - if (!files.length) { - return; - } - - files.each(function (index, file) { - file = external_jQuery_default()(file); - - if (!~cache.index(file)) { - addNode(file); - } - }); -}; - -var addNode = function addNode(container) { - container = external_jQuery_default()(container); - var input = container.find('input[type="file"]'); - var settings = container.data('grav-file-settings') || {}; - - if (settings.accept && ~settings.accept.indexOf('*')) { - settings.accept = ['']; - } - - var options = { - url: container.data('file-url-add') || (container.closest('form').attr('action') || external_GravAdmin_namespaceObject.config.current_url) + '.json', - paramName: settings.paramName || 'file', - dotNotation: settings.name || 'file', - acceptedFiles: settings.accept ? settings.accept.join(',') : input.attr('accept') || container.data('media-types'), - maxFilesize: typeof settings.filesize !== 'undefined' ? settings.filesize : 256, - maxFiles: settings.limit || null, - resizeWidth: settings.resizeWidth || null, - resizeHeight: settings.resizeHeight || null, - resizeQuality: settings.resizeQuality || null, - resolution: settings.resolution || null, - accept: function accept(file, done) { - ACCEPT_FUNC(file, done, settings); - } - }; - cache = cache.add(container); - container = container[0]; - instances.push(new FilesField({ - container: container, - options: options - })); -}; - -var files_Instance = function () { - external_jQuery_default()('.dropzone.files-upload').each(function (i, container) { - return addNode(container); - }); - external_jQuery_default()('body').on('mutation._grav', onAddedNodes); - return instances; -}(); -;// CONCATENATED MODULE: ./app/forms/fields/editor/buttons.js - - - - -var replacer = function replacer(_ref) { - var name = _ref.name, - replace = _ref.replace, - codemirror = _ref.codemirror, - button = _ref.button, - _ref$mode = _ref.mode, - mode = _ref$mode === void 0 ? 'replaceSelections' : _ref$mode, - runner = _ref.runner; - button.on("click.editor.".concat(name), function () { - strategies[mode]({ - token: '$1', - template: replace, - codemirror: codemirror, - runner: runner - }); - }); -}; - -var strategies = { - replaceSelections: function replaceSelections(_ref2) { - var template = _ref2.template, - token = _ref2.token, - codemirror = _ref2.codemirror, - runner = _ref2.runner; - var replacements = []; - var ranges = []; - var selections = codemirror.getSelections(); - var list = codemirror.listSelections(); - var accumulator = {}; - selections.forEach(function (selection, index) { - var markup = template.replace(token, selection); - var cursor = markup.indexOf('$cur'); - var _list$index$anchor = list[index].anchor, - line = _list$index$anchor.line, - ch = _list$index$anchor.ch; - markup = markup.replace('$cur', ''); - markup = runner ? runner(selection, markup, list) : markup; - replacements.push(markup); - - if (!accumulator[line]) { - accumulator[line] = 0; - } - - ch += accumulator[line] + (cursor === -1 ? markup.length : cursor); - var range = { - ch: ch, - line: line - }; - ranges.push({ - anchor: range, - head: range - }); - accumulator[line] += markup.length - selection.length; - }); - codemirror.replaceSelections(replacements); - codemirror.setSelections(ranges); - codemirror.focus(); - }, - replaceLine: function replaceLine(_ref3) { - var template = _ref3.template, - token = _ref3.token, - codemirror = _ref3.codemirror, - runner = _ref3.runner; - var list = codemirror.listSelections(); - var range; - list.forEach(function (selection) { - var lines = { - min: Math.min(selection.anchor.line, selection.head.line), - max: Math.max(selection.anchor.line, selection.head.line) - }; - codemirror.eachLine(lines.min, lines.max + 1, function (handler) { - var markup = template.replace(token, handler.text); - var line = codemirror.getLineNumber(handler); - markup = runner ? runner(handler, markup) : markup; - codemirror.replaceRange(markup, { - line: line, - ch: 0 - }, { - line: line, - ch: markup.length - }); - range = { - line: line, - ch: markup.length - }; - }); - }); - codemirror.setSelection(range, range, 'end'); - codemirror.focus(); - }, - replaceRange: function replaceRange() {} -}; - -var flipDisabled = function flipDisabled(codemirror, button, type) { - var hasHistory = codemirror.historySize()[type]; - var element = button.find('a'); - button[hasHistory ? 'removeClass' : 'addClass']('button-disabled'); - - if (!hasHistory) { - element.attr('title-disabled', element.attr('title')); - element.attr('data-hint-disabled', element.attr('data-hint')); - element.removeAttr('title').removeAttr('data-hint'); - } else { - element.attr('title', element.attr('title-disabled')); - element.attr('data-hint', element.attr('data-hint-disabled')); - element.removeAttr('title-disabled').removeAttr('data-hint-disabled'); - } -}; - -/* harmony default export */ const buttons = ({ - navigation: [{ - undo: { - identifier: 'undo', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UNDO, - label: '', - modes: [], - action: function action(_ref4) { - var codemirror = _ref4.codemirror, - button = _ref4.button, - textarea = _ref4.textarea; - button.addClass('button-disabled'); - codemirror.on('change', function () { - return flipDisabled(codemirror, button, 'undo'); - }); - button.on('click.editor.undo', function () { - codemirror.undo(); - }); - } - } - }, { - redo: { - identifier: 'redo', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.REDO, - label: '', - modes: [], - action: function action(_ref5) { - var codemirror = _ref5.codemirror, - button = _ref5.button, - textarea = _ref5.textarea; - button.addClass('button-disabled'); - codemirror.on('change', function () { - return flipDisabled(codemirror, button, 'redo'); - }); - button.on('click.editor.redo', function () { - codemirror.redo(); - }); - } - } - }, { - headers: { - identifier: 'headers', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.HEADERS, - label: '', - modes: ['gfm', 'markdown'], - children: [{ - h1: { - identifier: 'h1', - label: '1', - modes: ['gfm', 'markdown'], - action: function action(_ref6) { - var codemirror = _ref6.codemirror, - button = _ref6.button, - textarea = _ref6.textarea; - replacer({ - name: 'h1', - replace: '# $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h2: { - identifier: 'h2', - label: '2', - modes: ['gfm', 'markdown'], - action: function action(_ref7) { - var codemirror = _ref7.codemirror, - button = _ref7.button, - textarea = _ref7.textarea; - replacer({ - name: 'h2', - replace: '## $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h3: { - identifier: 'h3', - label: '3', - modes: ['gfm', 'markdown'], - action: function action(_ref8) { - var codemirror = _ref8.codemirror, - button = _ref8.button, - textarea = _ref8.textarea; - replacer({ - name: 'h3', - replace: '### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h4: { - identifier: 'h4', - label: '4', - modes: ['gfm', 'markdown'], - action: function action(_ref9) { - var codemirror = _ref9.codemirror, - button = _ref9.button, - textarea = _ref9.textarea; - replacer({ - name: 'h4', - replace: '#### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h5: { - identifier: 'h5', - label: '5', - modes: ['gfm', 'markdown'], - action: function action(_ref10) { - var codemirror = _ref10.codemirror, - button = _ref10.button, - textarea = _ref10.textarea; - replacer({ - name: 'h5', - replace: '##### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - h6: { - identifier: 'h6', - label: '6', - modes: ['gfm', 'markdown'], - action: function action(_ref11) { - var codemirror = _ref11.codemirror, - button = _ref11.button, - textarea = _ref11.textarea; - replacer({ - name: 'h6', - replace: '###### $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }] - } - }, { - bold: { - identifier: 'bold', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.BOLD, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-B', 'Cmd-B'], - action: function action(_ref12) { - var codemirror = _ref12.codemirror, - button = _ref12.button, - textarea = _ref12.textarea; - replacer({ - name: 'bold', - replace: '**$1$cur**', - codemirror: codemirror, - button: button - }); - } - } - }, { - italic: { - identifier: 'italic', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ITALIC, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-I', 'Cmd-I'], - action: function action(_ref13) { - var codemirror = _ref13.codemirror, - button = _ref13.button, - textarea = _ref13.textarea; - replacer({ - name: 'italic', - replace: '_$1$cur_', - codemirror: codemirror, - button: button - }); - } - } - }, { - strike: { - identifier: 'strike', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.STRIKETHROUGH, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref14) { - var codemirror = _ref14.codemirror, - button = _ref14.button, - textarea = _ref14.textarea; - replacer({ - name: 'strike', - replace: '~~$1$cur~~', - codemirror: codemirror, - button: button - }); - } - } - }, { - delimiter: { - identifier: 'delimiter', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.SUMMARY_DELIMITER, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref15) { - var codemirror = _ref15.codemirror, - button = _ref15.button, - textarea = _ref15.textarea; - replacer({ - name: 'delimiter', - replace: "".concat(external_GravAdmin_namespaceObject.config.site.delimiter, "$1"), - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - link: { - identifier: 'link', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.LINK, - label: '', - modes: ['gfm', 'markdown'], - shortcut: ['Ctrl-K', 'Cmd-K'], - action: function action(_ref16) { - var codemirror = _ref16.codemirror, - button = _ref16.button, - textarea = _ref16.textarea; - replacer({ - name: 'link', - replace: '[$1]($cur)', - codemirror: codemirror, - button: button - }); - } - } - }, { - image: { - identifier: 'image', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.IMAGE, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref17) { - var codemirror = _ref17.codemirror, - button = _ref17.button, - textarea = _ref17.textarea; - replacer({ - name: 'image', - replace: '![$1](http://$cur)', - codemirror: codemirror, - button: button - }); - } - } - }, { - blockquote: { - identifier: 'blockquote', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.BLOCKQUOTE, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref18) { - var codemirror = _ref18.codemirror, - button = _ref18.button, - textarea = _ref18.textarea; - replacer({ - name: 'blockquote', - replace: '> $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - listUl: { - identifier: 'listUl', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.UNORDERED_LIST, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref19) { - var codemirror = _ref19.codemirror, - button = _ref19.button, - textarea = _ref19.textarea; - replacer({ - name: 'listUl', - replace: '* $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine' - }); - } - } - }, { - listOl: { - identifier: 'listOl', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.ORDERED_LIST, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref20) { - var codemirror = _ref20.codemirror, - button = _ref20.button, - textarea = _ref20.textarea; - replacer({ - name: 'listOl', - replace: '. $1', - codemirror: codemirror, - button: button, - mode: 'replaceLine', - runner: function runner(line, markup) { - var lineNo = codemirror.getLineNumber(line); - var previousLine = codemirror.getLine(lineNo - 1) || ''; - var match = previousLine.match(/^(\d+)\./); - var prefix = 1 + (match ? Number(match[1]) : 0); - return "".concat(prefix).concat(markup); - } - }); - } - } - }], - states: [{ - code: { - identifier: 'editor', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.EDITOR, - label: '', - action: function action(_ref21) { - var codemirror = _ref21.codemirror, - button = _ref21.button, - textarea = _ref21.textarea, - ui = _ref21.ui; - - if (textarea.data('grav-editor-mode') === 'editor') { - button.addClass('editor-active'); - } - - button.on('click.states.editor', function () { - button.siblings().removeClass('editor-active'); - button.addClass('editor-active'); - textarea.data('grav-editor-mode', 'editor'); - var previewContainer = textarea.data('grav-editor-preview-container'); - var content = textarea.parent('.grav-editor-content'); - content.addClass('is-active'); - ui.navigation.find('.grav-editor-actions').css('visibility', 'visible'); - - if (previewContainer) { - previewContainer.removeClass('is-active'); - } - }); - } - } - }, { - preview: { - identifier: 'preview', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.PREVIEW, - label: '', - modes: ['gfm', 'markdown'], - action: function action(_ref22) { - var codemirror = _ref22.codemirror, - button = _ref22.button, - textarea = _ref22.textarea, - ui = _ref22.ui; - - if (textarea.data('grav-editor-mode') === 'preview') { - button.addClass('editor-active'); - } - - button.on('click.states.preview', function () { - var previewContainer = textarea.data('grav-editor-preview-container'); - var content = textarea.parent('.grav-editor-content'); - button.siblings().removeClass('editor-active'); - button.addClass('editor-active'); - textarea.data('grav-editor-mode', 'preview'); - - if (!previewContainer) { - previewContainer = external_jQuery_default()(''); - content.after(previewContainer); - textarea.data('grav-editor-preview-container', previewContainer); - } - - previewContainer.css({ - height: content.height() - }); - previewContainer.addClass('is-active'); - content.removeClass('is-active'); - ui.navigation.find('.grav-editor-actions').css('visibility', 'hidden'); - var url = "".concat(textarea.data('grav-urlpreview'), "/task").concat(external_GravAdmin_namespaceObject.config.param_sep, "processmarkdown"); - var params = textarea.closest('form').serializeArray(); - var body = {}; - params.map(function (obj) { - body[obj.name] = obj.value; - }); - utils_request(url, { - method: 'post', - body: body - }, function (response) { - return previewContainer.html(response.preview); - }); - }); - } - } - }, { - fullscreen: { - identifier: 'fullscreen', - title: external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FULLSCREEN, - label: '', - action: function action(_ref23) { - var codemirror = _ref23.codemirror, - button = _ref23.button, - textarea = _ref23.textarea; - button.on('click.editor.fullscreen', function () { - var container = textarea.closest('.grav-editor'); - var wrapper = codemirror.getWrapperElement(); - var contentWrapper = external_jQuery_default()('.content-wrapper'); - - if (!container.hasClass('grav-editor-fullscreen')) { - textarea.data('fullScreenRestore', { - scrollTop: __webpack_require__.g.pageYOffset, - scrollLeft: __webpack_require__.g.pageXOffset, - width: wrapper.style.width, - height: wrapper.style.height - }); - wrapper.style.width = ''; - wrapper.style.height = textarea.parent('.grav-editor-content').height() + 'px'; - __webpack_require__.g.document.documentElement.style.overflow = 'hidden'; - var hints = container.find('.grav-editor-toolbar .hint--top'); - - if (hints) { - hints.removeClass('hint--top').addClass('hint--bottom'); - external_jQuery_default()(hints[hints.length - 1]).addClass('hint--bottom-left'); - } - - if (contentWrapper) { - contentWrapper.css('overflow', 'visible'); - } - } else { - __webpack_require__.g.document.documentElement.style.overflow = ''; - var state = textarea.data('fullScreenRestore'); - wrapper.style.width = state.width; - wrapper.style.height = state.height; - __webpack_require__.g.scrollTo(state.scrollLeft, state.scrollTop); - - var _hints = container.find('.grav-editor-toolbar .hint--bottom'); - - if (_hints) { - _hints.removeClass('hint--bottom').addClass('hint--top'); - - external_jQuery_default()(_hints[_hints.length - 1]).removeClass('hint--bottom-left'); - } - - if (contentWrapper) { - contentWrapper.css('overflow', 'auto'); - } - } - - container.toggleClass('grav-editor-fullscreen'); - setTimeout(function () { - codemirror.refresh(); // this.preview.parent().css('height', this.code.height()); - - external_jQuery_default()(__webpack_require__.g).trigger('resize'); - }, 5); - }); - } - } - }] -}); -// EXTERNAL MODULE: ./node_modules/codemirror/lib/codemirror.js -var codemirror = __webpack_require__(4631); -var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror); -// EXTERNAL MODULE: ./node_modules/watchjs/src/watch.js -var watch = __webpack_require__(29950); -// EXTERNAL MODULE: ./node_modules/js-yaml/index.js -var js_yaml = __webpack_require__(93320); -var js_yaml_default = /*#__PURE__*/__webpack_require__.n(js_yaml); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/css/css.js -var css = __webpack_require__(36629); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/gfm/gfm.js -var gfm = __webpack_require__(42425); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/htmlmixed/htmlmixed.js -var htmlmixed = __webpack_require__(16531); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/javascript/javascript.js -var javascript = __webpack_require__(96876); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/markdown/markdown.js -var markdown = __webpack_require__(49047); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/php/php.js -var php = __webpack_require__(36702); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/sass/sass.js -var sass = __webpack_require__(81201); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/twig/twig.js -var twig = __webpack_require__(54702); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/xml/xml.js -var xml = __webpack_require__(29589); -// EXTERNAL MODULE: ./node_modules/codemirror/mode/yaml/yaml.js -var yaml = __webpack_require__(53631); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/edit/continuelist.js -var continuelist = __webpack_require__(23350); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/mode/overlay.js -var overlay = __webpack_require__(14146); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/selection/active-line.js -var active_line = __webpack_require__(20017); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/lint.js -var lint = __webpack_require__(3256); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/lint.css -var lint_lint = __webpack_require__(46226); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/css-lint.js -var css_lint = __webpack_require__(41423); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/javascript-lint.js -var javascript_lint = __webpack_require__(96477); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/json-lint.js -var json_lint = __webpack_require__(62193); -// EXTERNAL MODULE: ./node_modules/codemirror/addon/lint/yaml-lint.js -var yaml_lint = __webpack_require__(82783); -;// CONCATENATED MODULE: ./app/forms/fields/editor.js -function editor_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function editor_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function editor_createClass(Constructor, protoProps, staticProps) { if (protoProps) editor_defineProperties(Constructor.prototype, protoProps); if (staticProps) editor_defineProperties(Constructor, staticProps); return Constructor; } - - - - - - -__webpack_require__.g.jsyaml = (js_yaml_default()); // Modes - - - - - - - - - - - // Add-ons - - - - - - - - - - -var IS_MOUSEDOWN = false; -var ThemesMap = ['paper']; -var Defaults = { - codemirror: { - mode: 'htmlmixed', - theme: 'paper', - lineWrapping: true, - dragDrop: true, - autoCloseTags: true, - matchTags: true, - autoCloseBrackets: true, - matchBrackets: true, - indentUnit: 4, - indentWithTabs: false, - tabSize: 4, - hintOptions: { - completionSingle: false - }, - extraKeys: { - 'Enter': 'newlineAndIndentContinueMarkdownList' - } - } -}; - -var EditorField = /*#__PURE__*/function () { - function EditorField(options) { - var _this = this; - - editor_classCallCheck(this, EditorField); - - var body = external_jQuery_default()('body'); - this.editors = external_jQuery_default()(); - this.options = Object.assign({}, Defaults, options); - this.buttons = buttons; - this.buttonStrategies = strategies; - (0,watch.watch)(buttons, function () - /* key, modifier, prev, next */ - { - _this.editors.each(function (index, editor) { - return external_jQuery_default()(editor).data('toolbar').renderButtons(); - }); - }); - external_jQuery_default()('[data-grav-editor]').each(function (index, editor) { - return _this.addEditor(editor); - }); - external_jQuery_default()(function () { - body.trigger('grav-editor-ready'); - }); - body.on('mutation._grav', this._onAddedNodes.bind(this)); - body.on('mouseup._grav', function () { - if (!IS_MOUSEDOWN) { - return true; - } - - body.unbind('mousemove._grav'); - IS_MOUSEDOWN = false; - }); - body.on('mousedown._grav', '.grav-editor-resizer', function (event) { - event && event.preventDefault(); - IS_MOUSEDOWN = true; - var target = external_jQuery_default()(event.currentTarget); - var container = target.siblings('.grav-editor-content'); - var editor = container.find('.CodeMirror'); - var codemirror = container.find('textarea').data('codemirror'); - body.on('mousemove._grav', function (event) { - editor.css('height', Math.max(100, event.pageY - container.offset().top)); - codemirror.refresh(); - }); - }); - } - - editor_createClass(EditorField, [{ - key: "addButton", - value: function addButton(button, options) { - if (options && (options.before || options.after)) { - var index = this.buttons.navigation.findIndex(function (obj) { - var key = Object.keys(obj).shift(); - return obj[key].identifier === (options.before || options.after); - }); - - if (!~index) { - options = 'end'; - } else { - this.buttons.navigation.splice(options.before ? index : index + 1, 0, button); - } - } - - if (options === 'start') { - this.buttons.navigation.splice(0, 0, button); - } - - if (!options || options === 'end') { - this.buttons.navigation.push(button); - } - } - }, { - key: "addEditor", - value: function addEditor(textarea) { - textarea = external_jQuery_default()(textarea); - var options = Object.assign({}, this.options.codemirror, textarea.data('grav-editor').codemirror); - var theme = options.theme || 'paper'; - this.editors = this.editors.add(textarea); - - if (theme && !~ThemesMap.indexOf(theme)) { - ThemesMap.push(theme); // let themeCSS = `https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.12.0/theme/${theme}.min.css`; - // $('head').append($('').attr('href', themeCSS)); - } - - if (options.mode === 'yaml') { - Object.assign(options.extraKeys, { - Tab: function Tab(cm) { - cm.replaceSelection(' ', 'end'); - } - }); - } - - var editor = codemirror_default().fromTextArea(textarea.get(0), options); - textarea.data('codemirror', editor); - textarea.data('toolbar', new Toolbar(textarea)); - textarea.addClass('code-mirrored'); - - if (options.toolbar === false) { - textarea.data('toolbar').ui.navigation.addClass('grav-editor-hide-toolbar'); - } - - editor.on('change', function () { - return editor.save(); - }); - } - }, { - key: "_onAddedNodes", - value: function _onAddedNodes(event, target - /* , record, instance */ - ) { - var _this2 = this; - - var editors = external_jQuery_default()(target).find('[data-grav-editor]'); - - if (!editors.length) { - return; - } - - editors.each(function (index, editor) { - editor = external_jQuery_default()(editor); - - if (!~_this2.editors.index(editor)) { - _this2.addEditor(editor); - } - }); - } - }]); - - return EditorField; -}(); - - -var Toolbar = /*#__PURE__*/function () { - editor_createClass(Toolbar, null, [{ - key: "templates", - value: function templates() { - return { - navigation: "\n \n " - }; - } - }]); - - function Toolbar(editor) { - editor_classCallCheck(this, Toolbar); - - this.editor = external_jQuery_default()(editor); - this.codemirror = this.editor.data('codemirror'); - this.buttons = buttons.navigation; - this.ui = { - navigation: external_jQuery_default()(Toolbar.templates().navigation) - }; - this.editor.parent('.grav-editor-content').before(this.ui.navigation).after(this.ui.states); - this.renderButtons(); - } - - editor_createClass(Toolbar, [{ - key: "renderButtons", - value: function renderButtons() { - var _this3 = this; - - var map = { - 'actions': 'navigation', - 'modes': 'states' - }; - ['actions', 'modes'].forEach(function (type) { - _this3.ui.navigation.find(".grav-editor-".concat(type)).empty().append('
\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD, \" \").concat(file.name, \"
\\n\").concat(response.message, \"\")\n });\n }\n }, {\n key: \"onDropzoneComplete\",\n value: function onDropzoneComplete(file) {\n if (!file.accepted && !file.rejected) {\n var data = {\n status: 'error',\n message: \"\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_UNSUPPORTED, \": \").concat(file.name.match(/\\..+/).join(''))\n };\n return this.handleError({\n file: file,\n data: data,\n mode: 'removeFile',\n msg: \"
\".concat(grav_config__WEBPACK_IMPORTED_MODULE_3__.translations.PLUGIN_ADMIN.FILE_ERROR_ADD, \" \").concat(file.name, \"
\\n\").concat(data.message, \"\")\n });\n }\n\n if (this.options.reloadPage) {\n __webpack_require__.g.location.reload();\n }\n }\n }, {\n key: \"b64_to_utf8\",\n value: function b64_to_utf8(str) {\n str = str.replace(/\\s/g, '');\n return decodeURIComponent(escape(window.atob(str)));\n }\n }, {\n key: \"onDropzoneRemovedFile\",\n value: function onDropzoneRemovedFile(file) {\n var _this5 = this;\n\n if (!file.accepted || file.rejected) {\n return;\n }\n\n var url = file.removeUrl || this.urls[\"delete\"] || this.options.url;\n var path = (url || '').match(/path:(.*)\\//);\n var body = {\n filename: file.name,\n uri: this.getURI()\n };\n\n if (file.sessionParams) {\n body.task = 'filessessionremove';\n body.session = file.sessionParams;\n }\n\n var customPost = this.container.data('filePostRemove') || {};\n\n if (Object.keys(customPost).length) {\n body = {};\n Object.keys(customPost).forEach(function (key) {\n body[key] = customPost[key];\n });\n }\n\n body['filename'] = file.name;\n body['admin-nonce'] = grav_config__WEBPACK_IMPORTED_MODULE_3__.config.admin_nonce;\n (0,_utils_request__WEBPACK_IMPORTED_MODULE_2__.default)(url, {\n method: 'post',\n body: body\n }, function () {\n if (!path) {\n return;\n }\n\n path = _this5.b64_to_utf8(path[1]);\n\n var input = _this5.container.find('[name][type=\"hidden\"]');\n\n var data = JSON.parse(input.val() || '{}');\n delete data[path];\n input.val(JSON.stringify(data));\n });\n }\n }, {\n key: \"onDropzoneError\",\n value: function onDropzoneError(file, response, xhr) {\n var message = xhr ? response.error.message : response;\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(file.previewElement).find('[data-dz-errormessage]').html(message);\n return this.handleError({\n file: file,\n data: {\n status: 'error'\n },\n msg: \"
\".concat(message, \"\")\n });\n }\n }, {\n key: \"handleError\",\n value: function handleError(options) {\n var file = options.file,\n data = options.data,\n mode = options.mode,\n msg = options.msg;\n\n if (data.status !== 'error' && data.status !== 'unauthorized') {\n return;\n }\n\n switch (mode) {\n case 'addBack':\n if (file instanceof File) {\n this.dropzone.addFile.call(this.dropzone, file);\n } else {\n this.dropzone.files.push(file);\n this.dropzone.options.addedfile.call(this.dropzone, file);\n this.dropzone.options.thumbnail.call(this.dropzone, file, file.extras.url);\n }\n\n break;\n\n case 'removeFile':\n default:\n if (~this.dropzone.files.indexOf(file)) {\n file.rejected = true;\n this.dropzone.removeFile.call(this.dropzone, file, {\n silent: true\n });\n }\n\n break;\n }\n\n var modal = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-remodal-id=\"generic\"]');\n modal.find('.error-content').html(msg);\n (jquery__WEBPACK_IMPORTED_MODULE_0___default().remodal.lookup)[modal.data('remodal')].open();\n }\n }]);\n\n return FilesField;\n}();\n\n\nfunction UriToMarkdown(uri) {\n uri = uri.replace(/@3x|@2x|@1x/, '');\n uri = uri.replace(/\\(/g, '%28');\n uri = uri.replace(/\\)/g, '%29');\n var title = uri.split('.').slice(0, -1).join('.');\n return uri.match(/\\.(jpe?g|png|gif|svg|mp4|webm|ogv|mov)$/i) ? \"![\".concat(title, \"](\").concat(uri, \" \\\"\").concat(title, \"\\\")\") : \"[\".concat(decodeURI(uri), \"](\").concat(uri, \")\");\n}\nvar instances = [];\nvar cache = jquery__WEBPACK_IMPORTED_MODULE_0___default()();\n\nvar onAddedNodes = function onAddedNodes(event, target\n/* , record, instance */\n) {\n var files = jquery__WEBPACK_IMPORTED_MODULE_0___default()(target).find('.dropzone.files-upload');\n\n if (!files.length) {\n return;\n }\n\n files.each(function (index, file) {\n file = jquery__WEBPACK_IMPORTED_MODULE_0___default()(file);\n\n if (!~cache.index(file)) {\n addNode(file);\n }\n });\n};\n\nvar addNode = function addNode(container) {\n container = jquery__WEBPACK_IMPORTED_MODULE_0___default()(container);\n var input = container.find('input[type=\"file\"]');\n var settings = container.data('grav-file-settings') || {};\n\n if (settings.accept && ~settings.accept.indexOf('*')) {\n settings.accept = [''];\n }\n\n var options = {\n url: container.data('file-url-add') || (container.closest('form').attr('action') || grav_config__WEBPACK_IMPORTED_MODULE_3__.config.current_url) + '.json',\n paramName: settings.paramName || 'file',\n dotNotation: settings.name || 'file',\n acceptedFiles: settings.accept ? settings.accept.join(',') : input.attr('accept') || container.data('media-types'),\n maxFilesize: typeof settings.filesize !== 'undefined' ? settings.filesize : 256,\n maxFiles: settings.limit || null,\n resizeWidth: settings.resizeWidth || null,\n resizeHeight: settings.resizeHeight || null,\n resizeQuality: settings.resizeQuality || null,\n resolution: settings.resolution || null,\n accept: function accept(file, done) {\n ACCEPT_FUNC(file, done, settings);\n }\n };\n cache = cache.add(container);\n container = container[0];\n instances.push(new FilesField({\n container: container,\n options: options\n }));\n};\n\nvar Instance = function () {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('.dropzone.files-upload').each(function (i, container) {\n return addNode(container);\n });\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('mutation._grav', onAddedNodes);\n return instances;\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcmF2Ly4vYXBwL2Zvcm1zL2ZpZWxkcy9maWxlcy5qcz82MTc5Il0sIm5hbWVzIjpbIkRpY3Rpb25hcnkiLCJkaWN0Q2FuY2VsVXBsb2FkIiwidHJhbnNsYXRpb25zIiwiZGljdENhbmNlbFVwbG9hZENvbmZpcm1hdGlvbiIsImRpY3REZWZhdWx0TWVzc2FnZSIsImRpY3RGYWxsYmFja01lc3NhZ2UiLCJkaWN0RmFsbGJhY2tUZXh0IiwiZGljdEZpbGVUb29CaWciLCJkaWN0SW52YWxpZEZ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ZUhlaWdodCkgJiYgaGFzTWF4KSkge1xuICAgICAgICByZWFkZXIub25sb2FkID0gZnVuY3Rpb24oZXZlbnQpIHtcbiAgICAgICAgICAgIGNvbnN0IGltYWdlID0gbmV3IEltYWdlKCk7XG4gICAgICAgICAgICBpbWFnZS5zcmMgPSBldmVudC50YXJnZXQucmVzdWx0O1xuICAgICAgICAgICAgaW1hZ2Uub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGRvbmUodHJhbnNsYXRpb25zLlBMVUdJTl9BRE1JTi5GSUxFX0VSUk9SX1VQTE9BRCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaW1hZ2Uub25sb2FkID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlc29sdXRpb24ubWluKSB7XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlc29sdXRpb24ubWluKS5mb3JFYWNoKChhdHRyKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzb2x1dGlvbi5taW5bYXR0cl0gJiYgdGhpc1thdHRyXSA8IHJlc29sdXRpb24ubWluW2F0dHJdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IgKz0gdHJhbnNsYXRpb25zLlBMVUdJTl9GT1JNLlJFU09MVVRJT05fTUlOLnJlcGxhY2UoL3t7YXR0cn19L2csIGF0dHIpLnJlcGxhY2UoL3t7bWlufX0vZywgcmVzb2x1dGlvbi5taW5bYXR0cl0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIShzZXR0aW5ncy5yZXNpemVXaWR0aCB8fCBzZXR0aW5ncy5yZXNpemVIZWlnaHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNvbHV0aW9uLm1heCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVzb2x1dGlvbi5tYXgpLmZvckVhY2goKGF0dHIpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzb2x1dGlvbi5tYXhbYXR0cl0gJiYgdGhpc1thdHRyXSA+IHJlc29sdXRpb24ubWF4W2F0dHJdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yICs9IHRyYW5zbGF0aW9ucy5QTFVHSU5fRk9STS5SRVNPTFVUSU9OX01BWC5yZXBsYWNlKC97e2F0dHJ9fS9nLCBhdHRyKS5yZXBsYWNlKC97e21heH19L2csIHJlc29sdXRpb24ubWF4W2F0dHJdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIFVSTC5yZXZva2VPYmplY3RVUkwoaW1hZ2Uuc3JjKTsgLy8gcmVsZWFzZSBtZW1vcnlcbiAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3IgPyBkb25lKGVycm9yKSA6IGRvbmUoKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG5cbiAgICAgICAgcmVhZGVyLnJlYWRBc0RhdGFVUkwoZmlsZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGVycm9yID8gZG9uZShlcnJvcikgOiBkb25lKCk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgRmlsZXNGaWVsZCB7XG4gICAgY29uc3RydWN0b3IoeyBjb250YWluZXIgPSAnLmRyb3B6b25lLmZpbGVzLXVwbG9hZCcsIG9wdGlvbnMgPSB7fSB9ID0ge30pIHtcbiAgICAgICAgdGhpcy5jb250YWluZXIgPSAkKGNvbnRhaW5lcik7XG4gICAgICAgIGlmICghdGhpcy5jb250YWluZXIubGVuZ3RoKSB7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ZpbmQoJ1tkYXRhLWZpbGVdJyk7XG4gICAgICAgIGxldCBkcm9wem9uZSA9IHRoaXM7XG4gICAgICAgIGlmICghZmlsZXMubGVuZ3RoKSB7IHJldHVybjsgfVxuXG4gICAgICAgIGZpbGVzLmVhY2goKGluZGV4LCBmaWxlKSA9PiB7XG4gICAgICAgICAgICBmaWxlID0gJChmaWxlKTtcbiAgICAgICAgICAgIGxldCBkYXRhID0gZmlsZS5kYXRhKCdmaWxlJyk7XG4gICAgICAgICAgICBsZXQgbW9jayA9IHtcbiAgICAgICAgICAgICAgICBuYW1lOiBkYXRhLm5hbWUsXG4gICAgICAgICAgICAgICAgc2l6ZTogZGF0YS5zaXplLFxuICAgICAgICAgICAgICAgIHR5cGU6IGRhdGEudHlwZSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6IERyb3B6b25lLkFEREVELFxuICAgICAgICAgICAgICAgIGFjY2VwdGVkOiB0cnVlLFxuICAgICAgICAgICAgICAgIHVybDogdGhpcy5vcHRpb25zLnVybCxcbiAgICAgICAgICAgICAgICByZW1vdmVVcmw6IGRhdGEucmVtb3ZlXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBkcm9wem9uZS5maWxlcy5wdXNoKG1vY2spO1xuICAgICAgICAgICAgZHJvcHpvbmUub3B0aW9ucy5hZGRlZGZpbGUuY2FsbChkcm9wem9uZSwgbW9jayk7XG4gICAgICAgICAgICBpZiAobW9jay50eXBlLm1hdGNoKC9eaW1hZ2VcXC8vKSkge1xuICAgICAgICAgICAgICAgIGRyb3B6b25lLm9wdGlvbnMudGh1bWJuYWlsLmNhbGwoZHJvcHpvbmUsIG1vY2ssIGRhdGEucGF0aCk7XG4gICAgICAgICAgICAgICAgZHJvcHpvbmUuY3JlYXRlVGh1bWJuYWlsRnJvbVVybChtb2NrLCBkYXRhLnBhdGgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmaWxlLnJlbW92ZSgpO1xuICAgICAgICB9KTtcblxuICAgIH1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lsZS5jYWxsKHRoaXMuZHJvcHpvbmUsIGZpbGUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZHJvcHpvbmUuZmlsZXMucHVzaChmaWxlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcm9wem9uZS5vcHRpb25zLmFkZGVkZmlsZS5jYWxsKHRoaXMuZHJvcHpvbmUsIGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRyb3B6b25lLm9wdGlvbnMudGh1bWJuYWlsLmNhbGwodGhpcy5kcm9wem9uZSwgZmlsZSwgZmlsZS5leHRyYXMudXJsKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ3JlbW92ZUZpbGUnOlxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBpZiAofnRoaXMuZHJvcHpvbmUuZmlsZXMuaW5kZXhPZihmaWxlKSkge1xuICAgICAgICAgICAgICAgICAgICBmaWxlLnJlamVjdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcm9wem9uZS5yZW1vdmVGaWxlLmNhbGwodGhpcy5kcm9wem9uZSwgZmlsZSwgeyBzaWxlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgbW9kYWwgPSAkKCdbZGF0YS1yZW1vZGFsLWlkPVwiZ2VuZXJpY1wiXScpO1xuICAgICAgICBtb2RhbC5maW5kKCcuZXJyb3ItY29udGVudCcpLmh0bWwobXNnKTtcbiAgICAgICAgJC5yZW1vZGFsLmxvb2t1cFttb2RhbC5kYXRhKCdyZW1vZGFsJyldLm9wZW4oKTtcbiAgICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBVcmlUb01hcmtkb3duKHVyaSkge1x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RpbmdzLnJlc29sdXRpb24gfHwgbnVsbCxcbiAgICAgICAgYWNjZXB0OiBmdW5jdGlvbihmaWxlLCBkb25lKSB7IEFDQ0VQVF9GVU5DKGZpbGUsIGRvbmUsIHNldHRpbmdzKTsgfVxuICAgIH07XG5cbiAgICBjYWNoZSA9IGNhY2hlLmFkZChjb250YWluZXIpO1xuICAgIGNvbnRhaW5lciA9IGNvbnRhaW5lclswXTtcbiAgICBpbnN0YW5jZXMucHVzaChuZXcgRmlsZXNGaWVsZCh7IGNvbnRhaW5lciwgb3B0aW9ucyB9KSk7XG59O1xuXG5leHBvcnQgbGV0IEluc3RhbmNlID0gKCgpID0+IHtcbiAgICAkKCcuZHJvcHpvbmUuZmlsZXMtdXBsb2FkJykuZWFjaCgoaSwgY29udGFpbmVyKSA9PiBhZGROb2RlKGNvbnRhaW5lcikpO1xuICAgICQoJ2JvZHknKS5vbignbXV0YXRpb24uX2dyYXYnLCBvbkFkZGVkTm9kZXMpO1xuXG4gICAgcmV0dXJuIGluc3RhbmNlcztcbn0pKCk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./app/forms/fields/files.js\n"); - this.open = function () { - _$selector.trigger('selector:open'); - }; // whether the selector is open +/***/ }), +/***/ "./app/forms/fields/iconpicker.js": +/*!****************************************!* + !*** ./app/forms/fields/iconpicker.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - this.isOpened = function () { - return _$list.is(':visible'); - }; // add a selected value to the list +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ IconpickerField,\n/* harmony export */ \"Instance\": () => /* binding */ Instance\n/* harmony export */ });\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ \"jquery\");\n/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/* Icon Picker by QueryLoop\n * Author: @eliorivero\n * URL: http://queryloop.com/\n * License: GPLv2\n */\n\nvar defaults = {\n 'mode': 'dialog',\n // show overlay 'dialog' panel or slide down 'inline' panel\n 'closeOnPick': true,\n // whether to close panel after picking or 'no'\n 'save': 'class',\n // save icon 'class' or 'code'\n 'size': '',\n 'classes': {\n 'launcher': '',\n // extra classes for launcher buttons\n 'clear': 'remove-times',\n // extra classes for button that removes preview and clears field\n 'highlight': '',\n // extra classes when highlighting an icon\n 'close': '' // extra classes for close button\n\n },\n 'iconSets': {\n // example data structure. Used to specify which launchers will be created\n 'genericon': 'Genericon',\n // create a launcher to pick genericon icons\n 'fa': 'FontAwesome' // create a launcher to pick fontawesome icons\n\n }\n};\n\nvar QL_Icon_Picker = /*#__PURE__*/function () {\n function QL_Icon_Picker(element, options) {\n _classCallCheck(this, QL_Icon_Picker);\n\n this.iconSet = '';\n this.iconSetName = '';\n this.$field = '';\n this.element = element;\n this.settings = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, defaults, options);\n this._defaults = defaults;\n this.init();\n }\n\n _createClass(QL_Icon_Picker, [{\n key: \"init\",\n value: function init() {\n var $brick = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.element);\n var pickerId = $brick.data('pickerid');\n var $preview = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n this.$field = $brick.find('input'); // Add preview area\n\n this.makePreview($brick, pickerId, $preview); // Make button to clear field and remove preview\n\n this.makeClear(pickerId, $preview); // Make buttons that open the panel of icons\n\n this.makeLaunchers($brick, pickerId); // Prepare display styles, inline and dialog\n\n this.makeDisplay($brick);\n }\n }, {\n key: \"makePreview\",\n value: function makePreview($brick, pickerId, $preview) {\n var $icon = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n var iconValue = this.$field.val();\n $preview.prependTo($brick);\n $icon.prependTo($preview);\n\n if (iconValue !== '') {\n $preview.addClass('icon-preview-on');\n $icon.addClass(iconValue);\n }\n }\n }, {\n key: \"makeClear\",\n value: function makeClear(pickerId, $preview) {\n var base = this;\n var $clear = jquery__WEBPACK_IMPORTED_MODULE_0___default()(''); // Hide button to remove icon and preview and append it to preview area\n\n $clear.hide().prependTo($preview); // If there's a icon saved in the field, show remove icon button\n\n if (base.$field.val() !== '') {\n $clear.show();\n }\n\n $preview.on('click', '.remove-icon', function (e) {\n e.preventDefault();\n base.$field.val('');\n $preview.removeClass('icon-preview-on').find('i').removeClass();\n jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).hide();\n });\n }\n }, {\n key: \"makeDisplay\",\n value: function makeDisplay($brick) {\n var base = this;\n var close = base.settings.classes.close;\n var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body');\n var $close = jquery__WEBPACK_IMPORTED_MODULE_0___default()('');\n\n if (base.settings.mode === 'inline') {\n $brick.find('.icon-set').append($close).removeClass('dialog').addClass('ip-inline ' + base.settings.size).parent().addClass('icon-set-wrap');\n } else if (base.settings.mode === 'dialog') {\n jquery__WEBPACK_IMPORTED_MODULE_0___default()('.icon-set').addClass('dialog ' + base.settings.size);\n\n if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.icon-picker-overlay').length <= 0) {\n $body.append('