summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/file
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
commitfa9a33d818470a5796f0ff8797f98b510ed8de18 (patch)
treebde6a1eede376f9b5df5898ce812330152984d8e /wp-includes/blocks/file
parentReleasing progress-linux version 6.4.3+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.tar.xz
wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.zip
Merging upstream version 6.5+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/blocks/file')
-rw-r--r--wp-includes/blocks/file/block.json9
-rw-r--r--wp-includes/blocks/file/view.asset.php2
-rw-r--r--wp-includes/blocks/file/view.js59
-rw-r--r--wp-includes/blocks/file/view.min.asset.php2
-rw-r--r--wp-includes/blocks/file/view.min.js2
5 files changed, 44 insertions, 30 deletions
diff --git a/wp-includes/blocks/file/block.json b/wp-includes/blocks/file/block.json
index 0cc20b3..fd5da67 100644
--- a/wp-includes/blocks/file/block.json
+++ b/wp-includes/blocks/file/block.json
@@ -21,8 +21,8 @@
"attribute": "id"
},
"fileName": {
- "type": "string",
- "source": "html",
+ "type": "rich-text",
+ "source": "rich-text",
"selector": "a:not([download])"
},
"textLinkHref": {
@@ -42,8 +42,8 @@
"default": true
},
"downloadButtonText": {
- "type": "string",
- "source": "html",
+ "type": "rich-text",
+ "source": "rich-text",
"selector": "a[download]"
},
"displayPreview": {
@@ -72,7 +72,6 @@
},
"interactivity": true
},
- "viewScript": "file:./view.min.js",
"editorStyle": "wp-block-file-editor",
"style": "wp-block-file"
}
diff --git a/wp-includes/blocks/file/view.asset.php b/wp-includes/blocks/file/view.asset.php
index a9c9136..ce536d2 100644
--- a/wp-includes/blocks/file/view.asset.php
+++ b/wp-includes/blocks/file/view.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => '3fd0154de23a0ecc28af');
+<?php return array('dependencies' => array(), 'version' => '498971a8a9512421f3b5');
diff --git a/wp-includes/blocks/file/view.js b/wp-includes/blocks/file/view.js
index 9d66df5..feb8ec2 100644
--- a/wp-includes/blocks/file/view.js
+++ b/wp-includes/blocks/file/view.js
@@ -1,12 +1,34 @@
-"use strict";
-(self["__WordPressPrivateInteractivityAPI__"] = self["__WordPressPrivateInteractivityAPI__"] || []).push([[81],{
+import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity";
+/******/ // The require scope
+/******/ var __webpack_require__ = {};
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/define property getters */
+/******/ (() => {
+/******/ // define getter functions for harmony exports
+/******/ __webpack_require__.d = (exports, definition) => {
+/******/ for(var key in definition) {
+/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ }
+/******/ }
+/******/ };
+/******/ })();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ (() => {
+/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ })();
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
-/***/ 149:
-/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
-
-
-// EXTERNAL MODULE: ./node_modules/@wordpress/interactivity/src/index.js + 15 modules
-var src = __webpack_require__(754);
+;// CONCATENATED MODULE: external "@wordpress/interactivity"
+var x = (y) => {
+ var x = {}; __webpack_require__.d(x, y); return x
+}
+var y = (x) => (() => (x))
+const interactivity_namespaceObject = x({ ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
/**
* Uses a combination of user agent matching and feature detection to determine whether
@@ -53,6 +75,7 @@ const createActiveXObject = type => {
}
return ax;
};
+
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/view.js
/**
* WordPress dependencies
@@ -62,21 +85,13 @@ const createActiveXObject = type => {
* Internal dependencies
*/
-(0,src/* store */.h)({
- selectors: {
- core: {
- file: {
- hasPdfPreview: browserSupportsPdfs
- }
+(0,interactivity_namespaceObject.store)('core/file', {
+ state: {
+ get hasPdfPreview() {
+ return browserSupportsPdfs();
}
}
+}, {
+ lock: true
});
-/***/ })
-
-},
-/******/ function(__webpack_require__) { // webpackRuntimeModules
-/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
-/******/ var __webpack_exports__ = (__webpack_exec__(149));
-/******/ }
-]); \ No newline at end of file
diff --git a/wp-includes/blocks/file/view.min.asset.php b/wp-includes/blocks/file/view.min.asset.php
index 990e381..76f2ca1 100644
--- a/wp-includes/blocks/file/view.min.asset.php
+++ b/wp-includes/blocks/file/view.min.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array(), 'version' => '8a0237493a27c0d781aa');
+<?php return array('dependencies' => array(), 'version' => '9c04187f1796859989c3');
diff --git a/wp-includes/blocks/file/view.min.js b/wp-includes/blocks/file/view.min.js
index 8015cb7..35e9cfb 100644
--- a/wp-includes/blocks/file/view.min.js
+++ b/wp-includes/blocks/file/view.min.js
@@ -1 +1 @@
-"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[81],{149:function(i,t,e){var n=e(754);const o=i=>{let t;try{t=new window.ActiveXObject(i)}catch(i){t=void 0}return t};(0,n.h)({selectors:{core:{file:{hasPdfPreview:()=>!(window.navigator.userAgent.indexOf("Mobi")>-1)&&(!(window.navigator.userAgent.indexOf("Android")>-1)&&(!(window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2)&&!((window.ActiveXObject||"ActiveXObject"in window)&&!o("AcroPDF.PDF")&&!o("PDF.PdfCtrl"))))}}}})}},function(i){var t;t=149,i(i.s=t)}]); \ No newline at end of file
+import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const o=(e=>{var o={};return t.d(o,e),o})({store:()=>e.store}),r=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t};(0,o.store)("core/file",{state:{get hasPdfPreview(){return!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!r("AcroPDF.PDF")&&!r("PDF.PdfCtrl"))}}},{lock:!0}); \ No newline at end of file