Changeset 13002
- Timestamp:
- 07/14/2021 04:44:28 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 28 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.jshintignore
r12995 r13002 9 9 src/**/js/block-*/**/*.js 10 10 src/**/js/block-*.js 11 src/**/js/friends.js 12 src/**/js/dynamic-widget-block.js -
trunk/Gruntfile.js
r13001 r13002 23 23 '!**/js/block-*/*.js', 24 24 '!**/js/block-*/**/*.js', 25 '!**/js/block-*.js' 25 '!**/js/block-*.js', 26 '!**/js/friends.js', 27 '!**/js/dynamic-widget-block.js' 26 28 ], 27 29 … … 41 43 '!bp-groups/css/blocks/groups.css', 42 44 '!bp-core/css/blocks/login-form.css', 43 '!bp-activity/css/blocks/latest-activities.css' 45 '!bp-activity/css/blocks/latest-activities.css', 46 '!bp-friends/css/blocks/friends.css' 44 47 ], 45 48 … … 169 172 src: ['bp-activity/sass/blocks/*.scss'], 170 173 dest: SOURCE_DIR + 'bp-activity/css/blocks/' 174 }, 175 friends_blocks: { 176 cwd: SOURCE_DIR, 177 extDot: 'last', 178 expand: true, 179 ext: '.css', 180 flatten: true, 181 src: ['bp-friends/sass/blocks/*.scss'], 182 dest: SOURCE_DIR + 'bp-friends/css/blocks/' 171 183 } 172 184 }, -
trunk/package.json
r12995 r13002 41 41 }, 42 42 "scripts": { 43 "start": "npm run dev:components && parcel watch src/js/bp-*/*s/blocks/*.js --out-dir src --no-source-maps",44 "dev": "npm run dev:components && parcel build src/js/bp-*/*s/blocks/*.js --out-dir src --no-source-maps --no-minify",45 "build": "npm run build:components && parcel build src/js/bp-*/*s/blocks/*.js --out-dir build",43 "start": "npm run dev:components && npm run dev:assets && parcel watch src/js/bp-*/*s/blocks/*.js --out-dir src --no-source-maps", 44 "dev": "npm run dev:components && npm run dev:assets && npm run dev:scripts && parcel build src/js/bp-*/*s/blocks/*.js --out-dir src --no-source-maps --no-minify", 45 "build": "npm run build:components && npm run build:assets && npm run build:scripts && parcel build src/js/bp-*/*s/blocks/*.js --out-dir build", 46 46 "watch:components": "parcel watch src/js/bp-core/js/block-components/block-components.js --out-dir src/bp-core/js --out-file block-components.js --no-source-maps --global bpBlock", 47 47 "dev:components": "parcel build src/js/bp-core/js/block-components/block-components.js --out-dir src/bp-core/js --out-file block-components.js --no-source-maps --no-minify --global bpBlock", … … 50 50 "dev:assets": "parcel build src/js/bp-core/js/block-assets/*.js --out-dir src/bp-core/js --no-source-maps --no-minify --global bpBlock", 51 51 "build:assets": "parcel build src/js/bp-core/js/block-assets/*.js --out-dir build/bp-core/js --global bpBlock", 52 "dev:scripts": "parcel build src/js/bp-*/*s/* --out-dir src --no-source-maps --no-minify", 53 "build:scripts": "parcel build src/js/bp-*/*s/* --out-dir build", 52 54 "wp-env": "wp-env", 53 55 "test-php": "npm run wp-env run phpunit 'php /var/www/html/wp-content/plugins/buddypress/vendor/phpunit/phpunit/phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.xml'", -
trunk/src/bp-activity/js/blocks/embed-activity.js
r12996 r13002 118 118 119 119 return newRequire; 120 })({" dEOc":[function(require,module,exports) {120 })({"DCTP":[function(require,module,exports) { 121 121 function _arrayWithHoles(arr) { 122 122 if (Array.isArray(arr)) return arr; … … 124 124 125 125 module.exports = _arrayWithHoles; 126 },{}]," RonT":[function(require,module,exports) {126 },{}],"LoeL":[function(require,module,exports) { 127 127 function _iterableToArrayLimit(arr, i) { 128 128 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; … … 153 153 154 154 module.exports = _iterableToArrayLimit; 155 },{}]," LGpM":[function(require,module,exports) {155 },{}],"jEQo":[function(require,module,exports) { 156 156 function _arrayLikeToArray(arr, len) { 157 157 if (len == null || len > arr.length) len = arr.length; … … 165 165 166 166 module.exports = _arrayLikeToArray; 167 },{}]," Vzqv":[function(require,module,exports) {167 },{}],"Dbv9":[function(require,module,exports) { 168 168 var arrayLikeToArray = require("./arrayLikeToArray"); 169 169 … … 178 178 179 179 module.exports = _unsupportedIterableToArray; 180 },{"./arrayLikeToArray":" LGpM"}],"sa4T":[function(require,module,exports) {180 },{"./arrayLikeToArray":"jEQo"}],"MWEO":[function(require,module,exports) { 181 181 function _nonIterableRest() { 182 182 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); … … 184 184 185 185 module.exports = _nonIterableRest; 186 },{}]," xkYc":[function(require,module,exports) {186 },{}],"DERy":[function(require,module,exports) { 187 187 var arrayWithHoles = require("./arrayWithHoles"); 188 188 … … 198 198 199 199 module.exports = _slicedToArray; 200 },{"./arrayWithHoles":" dEOc","./iterableToArrayLimit":"RonT","./unsupportedIterableToArray":"Vzqv","./nonIterableRest":"sa4T"}],"Sjre":[function(require,module,exports) {200 },{"./arrayWithHoles":"DCTP","./iterableToArrayLimit":"LoeL","./unsupportedIterableToArray":"Dbv9","./nonIterableRest":"MWEO"}],"Sjre":[function(require,module,exports) { 201 201 "use strict"; 202 202 … … 364 364 var _default = editEmbedActivityBlock; 365 365 exports.default = _default; 366 },{"@babel/runtime/helpers/slicedToArray":" xkYc"}],"zmBI":[function(require,module,exports) {366 },{"@babel/runtime/helpers/slicedToArray":"DERy"}],"zmBI":[function(require,module,exports) { 367 367 "use strict"; 368 368 -
trunk/src/bp-core/bp-core-cssjs.php
r12857 r13002 86 86 'bp-moment' => array( 'file' => "{$url}vendor/moment-js/moment{$min}.js", 'dependencies' => array(), 'footer' => true ), 87 87 'bp-livestamp' => array( 'file' => "{$url}vendor/livestamp{$min}.js", 'dependencies' => array( 'jquery', 'bp-moment' ), 'footer' => true ), 88 89 // Version 9.0. 90 'bp-dynamic-widget-block-script' => array( 'file' => "{$url}dynamic-widget-block.js", 'dependencies' => array( 'lodash', 'wp-url' ), 'footer' => true ), 88 91 ); 89 92 -
trunk/src/bp-core/bp-core-template-loader.php
r12726 r13002 86 86 function bp_get_asset_template_part( $slug, $name = null, $args = array() ) { 87 87 return bp_get_template_part( "assets/{$slug}", $name, $args ); 88 } 89 90 /** 91 * Get a dynamic template part. 92 * 93 * @since 9.0.0 94 * 95 * @param string $template The Template Pack's relative path to the templata. 96 * Optional. 97 * @param string $type Whether to use the template for JavaScript or PHP. 98 * Optional. Defaults to `js`. 99 * @param array $tokens The data to use to customize the template. Optional. 100 * @param array $allowed_tags The allowed tags to use. Optional. 101 * @return string HTML/JS output. 102 */ 103 function bp_get_dynamic_template_part( $template = '', $type = 'js', $tokens = array(), $allowed_tags = array() ) { 104 $template_string = ''; 105 106 if ( ! $template ) { 107 return ''; 108 } 109 110 // Use the BP Theme Compat API to allow template override. 111 $template_path = bp_locate_template( $template ); 112 if ( $template_path ) { 113 $template_string = file_get_contents( $template_path ); 114 } 115 116 if ( ! $template_string ) { 117 return ''; 118 } 119 120 if ( ! $allowed_tags ) { 121 $allowed_tags = array( 122 'li' => array( 'class' => true ), 123 'div' => array( 'class' => true ), 124 'span' => array( 'class' => true ), 125 'a' => array( 126 'href' => true, 127 'class' => true, 128 'data-bp-tooltip' => true, 129 ), 130 'img' => array( 131 'src' => true, 132 'class' => true, 133 'loading' => true, 134 ), 135 ); 136 } 137 138 if ( 'js' !== $type ) { 139 $template_string = wp_kses( $template_string, $allowed_tags ); 140 141 return bp_core_replace_tokens_in_text( $template_string, $tokens ); 142 } 143 144 return $template_string; 88 145 } 89 146 -
trunk/src/bp-friends/classes/class-bp-friends-component.php
r12994 r13002 47 47 public function includes( $includes = array() ) { 48 48 $includes = array( 49 'cssjs', 49 50 'cache', 50 51 'filters', … … 52 53 'functions', 53 54 'widgets', 55 'blocks', 54 56 ); 55 57 … … 134 136 'search_string' => __( 'Search Friends...', 'buddypress' ), 135 137 'notification_callback' => 'friends_format_notifications', 136 'global_tables' => $global_tables 138 'global_tables' => $global_tables, 139 'block_globals' => array( 140 'bp/friends' => array( 141 'widget_classnames' => array( 'widget_bp_core_friends_widget', 'buddypress' ), 142 ) 143 ), 137 144 ); 138 145 … … 348 355 */ 349 356 public function blocks_init( $blocks = array() ) { 350 parent::blocks_init( array() ); 357 parent::blocks_init( 358 array( 359 'bp/friends' => array( 360 'name' => 'bp/friends', 361 'editor_script' => 'bp-friends-block', 362 'editor_script_url' => plugins_url( 'js/blocks/friends.js', dirname( __FILE__ ) ), 363 'editor_script_deps' => array( 364 'wp-blocks', 365 'wp-element', 366 'wp-components', 367 'wp-i18n', 368 'wp-block-editor', 369 'bp-block-data', 370 'bp-block-components', 371 ), 372 'style' => 'bp-friends-block', 373 'style_url' => plugins_url( 'css/blocks/friends.css', dirname( __FILE__ ) ), 374 'attributes' => array( 375 'maxFriends' => array( 376 'type' => 'number', 377 'default' => 5, 378 ), 379 'friendDefault' => array( 380 'type' => 'string', 381 'default' => 'active', 382 ), 383 'linkTitle' => array( 384 'type' => 'boolean', 385 'default' => false, 386 ), 387 'postId' => array( 388 'type' => 'number', 389 'default' => 0, 390 ), 391 ), 392 'render_callback' => 'bp_friends_render_friends_block', 393 ), 394 ) 395 ); 351 396 } 352 397 } -
trunk/src/bp-groups/js/blocks/groups.js
r12996 r13002 118 118 119 119 return newRequire; 120 })({" LGpM":[function(require,module,exports) {120 })({"jEQo":[function(require,module,exports) { 121 121 function _arrayLikeToArray(arr, len) { 122 122 if (len == null || len > arr.length) len = arr.length; … … 138 138 139 139 module.exports = _arrayWithoutHoles; 140 },{"./arrayLikeToArray":" LGpM"}],"lZpU":[function(require,module,exports) {140 },{"./arrayLikeToArray":"jEQo"}],"lZpU":[function(require,module,exports) { 141 141 function _iterableToArray(iter) { 142 142 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); … … 144 144 145 145 module.exports = _iterableToArray; 146 },{}]," Vzqv":[function(require,module,exports) {146 },{}],"Dbv9":[function(require,module,exports) { 147 147 var arrayLikeToArray = require("./arrayLikeToArray"); 148 148 … … 157 157 158 158 module.exports = _unsupportedIterableToArray; 159 },{"./arrayLikeToArray":" LGpM"}],"NCaH":[function(require,module,exports) {159 },{"./arrayLikeToArray":"jEQo"}],"NCaH":[function(require,module,exports) { 160 160 function _nonIterableSpread() { 161 161 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); … … 177 177 178 178 module.exports = _toConsumableArray; 179 },{"./arrayWithoutHoles":"o3SL","./iterableToArray":"lZpU","./unsupportedIterableToArray":" Vzqv","./nonIterableSpread":"NCaH"}],"dEOc":[function(require,module,exports) {179 },{"./arrayWithoutHoles":"o3SL","./iterableToArray":"lZpU","./unsupportedIterableToArray":"Dbv9","./nonIterableSpread":"NCaH"}],"DCTP":[function(require,module,exports) { 180 180 function _arrayWithHoles(arr) { 181 181 if (Array.isArray(arr)) return arr; … … 183 183 184 184 module.exports = _arrayWithHoles; 185 },{}]," RonT":[function(require,module,exports) {185 },{}],"LoeL":[function(require,module,exports) { 186 186 function _iterableToArrayLimit(arr, i) { 187 187 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; … … 212 212 213 213 module.exports = _iterableToArrayLimit; 214 },{}]," sa4T":[function(require,module,exports) {214 },{}],"MWEO":[function(require,module,exports) { 215 215 function _nonIterableRest() { 216 216 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); … … 218 218 219 219 module.exports = _nonIterableRest; 220 },{}]," xkYc":[function(require,module,exports) {220 },{}],"DERy":[function(require,module,exports) { 221 221 var arrayWithHoles = require("./arrayWithHoles"); 222 222 … … 232 232 233 233 module.exports = _slicedToArray; 234 },{"./arrayWithHoles":" dEOc","./iterableToArrayLimit":"RonT","./unsupportedIterableToArray":"Vzqv","./nonIterableRest":"sa4T"}],"jS06":[function(require,module,exports) {234 },{"./arrayWithHoles":"DCTP","./iterableToArrayLimit":"LoeL","./unsupportedIterableToArray":"Dbv9","./nonIterableRest":"MWEO"}],"jS06":[function(require,module,exports) { 235 235 "use strict"; 236 236 … … 567 567 var _default = editGroupsBlock; 568 568 exports.default = _default; 569 },{"@babel/runtime/helpers/toConsumableArray":"I9dH","@babel/runtime/helpers/slicedToArray":" xkYc","./constants":"jS06"}],"jcTh":[function(require,module,exports) {569 },{"@babel/runtime/helpers/toConsumableArray":"I9dH","@babel/runtime/helpers/slicedToArray":"DERy","./constants":"jS06"}],"jcTh":[function(require,module,exports) { 570 570 "use strict"; 571 571 -
trunk/src/bp-members/js/blocks/members.js
r12996 r13002 118 118 119 119 return newRequire; 120 })({" LGpM":[function(require,module,exports) {120 })({"jEQo":[function(require,module,exports) { 121 121 function _arrayLikeToArray(arr, len) { 122 122 if (len == null || len > arr.length) len = arr.length; … … 138 138 139 139 module.exports = _arrayWithoutHoles; 140 },{"./arrayLikeToArray":" LGpM"}],"lZpU":[function(require,module,exports) {140 },{"./arrayLikeToArray":"jEQo"}],"lZpU":[function(require,module,exports) { 141 141 function _iterableToArray(iter) { 142 142 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); … … 144 144 145 145 module.exports = _iterableToArray; 146 },{}]," Vzqv":[function(require,module,exports) {146 },{}],"Dbv9":[function(require,module,exports) { 147 147 var arrayLikeToArray = require("./arrayLikeToArray"); 148 148 … … 157 157 158 158 module.exports = _unsupportedIterableToArray; 159 },{"./arrayLikeToArray":" LGpM"}],"NCaH":[function(require,module,exports) {159 },{"./arrayLikeToArray":"jEQo"}],"NCaH":[function(require,module,exports) { 160 160 function _nonIterableSpread() { 161 161 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); … … 177 177 178 178 module.exports = _toConsumableArray; 179 },{"./arrayWithoutHoles":"o3SL","./iterableToArray":"lZpU","./unsupportedIterableToArray":" Vzqv","./nonIterableSpread":"NCaH"}],"dEOc":[function(require,module,exports) {179 },{"./arrayWithoutHoles":"o3SL","./iterableToArray":"lZpU","./unsupportedIterableToArray":"Dbv9","./nonIterableSpread":"NCaH"}],"DCTP":[function(require,module,exports) { 180 180 function _arrayWithHoles(arr) { 181 181 if (Array.isArray(arr)) return arr; … … 183 183 184 184 module.exports = _arrayWithHoles; 185 },{}]," RonT":[function(require,module,exports) {185 },{}],"LoeL":[function(require,module,exports) { 186 186 function _iterableToArrayLimit(arr, i) { 187 187 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; … … 212 212 213 213 module.exports = _iterableToArrayLimit; 214 },{}]," sa4T":[function(require,module,exports) {214 },{}],"MWEO":[function(require,module,exports) { 215 215 function _nonIterableRest() { 216 216 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); … … 218 218 219 219 module.exports = _nonIterableRest; 220 },{}]," xkYc":[function(require,module,exports) {220 },{}],"DERy":[function(require,module,exports) { 221 221 var arrayWithHoles = require("./arrayWithHoles"); 222 222 … … 232 232 233 233 module.exports = _slicedToArray; 234 },{"./arrayWithHoles":" dEOc","./iterableToArrayLimit":"RonT","./unsupportedIterableToArray":"Vzqv","./nonIterableRest":"sa4T"}],"gr8I":[function(require,module,exports) {234 },{"./arrayWithHoles":"DCTP","./iterableToArrayLimit":"LoeL","./unsupportedIterableToArray":"Dbv9","./nonIterableRest":"MWEO"}],"gr8I":[function(require,module,exports) { 235 235 "use strict"; 236 236 … … 563 563 var _default = editMembersBlock; 564 564 exports.default = _default; 565 },{"@babel/runtime/helpers/toConsumableArray":"I9dH","@babel/runtime/helpers/slicedToArray":" xkYc","./constants":"gr8I"}],"XEHU":[function(require,module,exports) {565 },{"@babel/runtime/helpers/toConsumableArray":"I9dH","@babel/runtime/helpers/slicedToArray":"DERy","./constants":"gr8I"}],"XEHU":[function(require,module,exports) { 566 566 "use strict"; 567 567
Note: See TracChangeset
for help on using the changeset viewer.