code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/assets/js/modules/adsense/components/setup/SetupSiteAdded.js b/assets/js/modules/adsense/components/setup/SetupSiteAdded.js @@ -32,7 +32,6 @@ import { __ } from '@wordpress/i18n'; */ import Data from 'googlesitekit-data'; import Button from '../../../../components/Button'; -import { trackEvent } from '../../../../util'; import { MODULES_ADSENSE } from '../../datastore/constants'; import SiteSteps from '../common/SiteSteps'; import { ErrorNotices } from '../common'; @@ -51,7 +50,6 @@ export default function SetupSiteAdded( { finishSetup } ) { const success = await completeSiteSetup(); if ( success ) { - await trackEvent( 'adsense_setup', 'complete_adsense_setup' ); finishSetup(); } }, [ isDoingSubmitChanges, finishSetup, completeSiteSetup ] );
2
diff --git a/extensions/projection/README.md b/extensions/projection/README.md @@ -28,8 +28,8 @@ projections per Asset is not currently handled by this extension. | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:proj4 | string \|null | PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:wkt2 | string \|null | WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:proj4 | string \|null | [PROJ4 string](https://proj.org/usage/projections.html) representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:wkt2 | string \|null | [WKT2](http://docs.opengeospatial.org/is/12-063r5/12-063r5.html) string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:geometry | [Polygon Object](https://geojson.org/schema/Polygon.json) | Defines the footprint of this Item. | | proj:bbox | [number] | Bounding box of the Item in the asset CRS in 2 or 3 dimensions. | @@ -42,13 +42,13 @@ Points, `proj:epsg` should be set to null. It should also be set to null if a CR there is no valid EPSG code. **proj:proj4** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a -'projection') used by the asset data. This value is a PROJ4 string. +'projection') used by the asset data. This value is a [PROJ4 string](https://proj.org/usage/projections.html). If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control Points, `proj:proj4` should be set to null. It should also be set to null if a CRS exists, but for which a PROJ4 string does not exist. **proj:wkt2** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a -'projection') used by the asset data. This value is a WKT2 string. +'projection') used by the asset data. This value is a [WKT2](http://docs.opengeospatial.org/is/12-063r5/12-063r5.html) string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control Points, proj:wkt2 should be set to null. It should also be set to null if a CRS exists, but for which a WKT2 string does not exist.
0
diff --git a/contracts/SecurityTokenRegistry.sol b/contracts/SecurityTokenRegistry.sol @@ -248,7 +248,7 @@ contract SecurityTokenRegistry is ISecurityTokenRegistry, EternalStorage { require(_newOwner != address(0), "Address should not be 0x"); require(getAddress(Encoder.getKey("registeredTickers_owner", ticker)) == msg.sender, "Not authorised"); _transferTickerOwnership(msg.sender, _newOwner, ticker); - set(Encoder.getKey("registeredTickers_owner", _ticker), _newOwner); + set(Encoder.getKey("registeredTickers_owner", ticker), _newOwner); } /** @@ -347,7 +347,7 @@ contract SecurityTokenRegistry is ISecurityTokenRegistry, EternalStorage { require(getUint(Encoder.getKey("registeredTickers_expiryDate", ticker)) >= now, "Ticker should not be expired"); // No need to update the _name - this is the token name, not the ticker name - set(Encoder.getKey("registeredTickers_status", _ticker), true); + set(Encoder.getKey("registeredTickers_status", ticker), true); if (getUint(Encoder.getKey("stLaunchFee")) > 0) require(IERC20(getAddress(Encoder.getKey("polyToken"))).transferFrom(msg.sender, address(this), getUint(Encoder.getKey("stLaunchFee"))), "Sufficent allowance is not provided"); @@ -412,8 +412,8 @@ contract SecurityTokenRegistry is ISecurityTokenRegistry, EternalStorage { * @return address */ function getSecurityTokenAddress(string _ticker) public view returns (address) { - string memory __ticker = Util.upper(_ticker); - return getAddress(Encoder.getKey("tickerToSecurityToken", __ticker)); + string memory ticker = Util.upper(_ticker); + return getAddress(Encoder.getKey("tickerToSecurityToken", ticker)); } /**
1
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -1346,6 +1346,9 @@ class Avatar { this.startEyeTargetQuaternion = new THREE.Quaternion(); this.lastNeedsEyeTarget = false; this.lastEyeTargetTime = -Infinity; + this.lastStepped = [0, 0]; + this.lastWalkFactor = 0; + this.lastJumpState = false; } static bindAvatar(object) { const model = object.scene; @@ -2047,6 +2050,21 @@ class Avatar { const idleAnimation = _getIdleAnimation('walk'); + if (this.jumpState && !this.lastJumpState) { + console.log('jump state 1'); + const candidateAudios = jumpSoundFiles; + const audio = candidateAudios[Math.floor(Math.random() * candidateAudios.length)]; + audio.currentTime = 0; + audio.paused && audio.play(); + } else if (this.lastJumpState && !this.jumpState) { + console.log('jump state 2'); + const candidateAudios = landSoundFiles; + const audio = candidateAudios[Math.floor(Math.random() * candidateAudios.length)]; + audio.currentTime = 0; + audio.paused && audio.play(); + } + this.lastJumpState = this.jumpState; + /* // walk sound effect { const soundManager = metaversefile.useSoundManager();
0
diff --git a/test/IntersectionUtils.test.js b/test/IntersectionUtils.test.js -import { Vector3, Quaternion, Euler, Triangle, Sphere, Plane } from 'three'; +import { Vector3, Quaternion, Euler, Triangle, Sphere, Plane, Line3 } from 'three'; import { sphereIntersectTriangle } from '../src/math/MathUtilities.js'; import { SeparatingAxisTriangle } from '../src/math/SeparatingAxisTriangle.js'; import { OrientedBox } from '../src/math/OrientedBox.js'; @@ -172,6 +172,139 @@ describe( 'Triangle Intersections', () => { } ); +} ); + +describe( 'Triangle Intersection line', () => { + + const t1 = new SeparatingAxisTriangle(); + const t2 = new Triangle(); + const target = new Line3(); + const expected = new Line3(); + + const expectVerticesToBeClose = ( a, b ) => { + + expect( a.x ).toBeCloseTo( b.x ); + expect( a.y ).toBeCloseTo( b.y ); + expect( a.z ).toBeCloseTo( b.z ); + + }; + + const expectLinesToBeClose = ( a, b ) => { + + try { + + expectVerticesToBeClose( a.start, b.start ); + expectVerticesToBeClose( a.end, b.end ); + + } catch { + + expectVerticesToBeClose( a.end, b.start ); + expectVerticesToBeClose( a.start, b.end ); + + } + + }; + + it( "sould intersect on point", () => { + + t1.a.set( 0, 0, 0 ); + t1.b.set( 0, 0, 2 ); + t1.c.set( 2, 0, 0 ); + t1.needsUpdate = true; + + t2.a.set( 1, - 1, 0 ); + t2.b.set( 1, 1, 0 ); + t2.c.set( 1, 0, - 1 ); + + expect( t1.intersectsTriangle( t2, target ) ).toBe( true ); + + expected.start.set( 1, 0, 0 ); + expected.end.set( 1, 0, 0 ); + + expectLinesToBeClose( target, expected ); + + } ); + + test( "should intersect in middle", () => { + + t1.a.set( 0, 0, 0 ); + t1.b.set( 0, 0, 5 ); + t1.c.set( 5, 0, 0 ); + t1.needsUpdate = true; + + t2.a.set( 1, - 1, 1 ); + t2.b.set( 1, - 1, - 1 ); + t2.c.set( 1, 1, 1 ); + + expect( t1.intersectsTriangle( t2, target ) ).toBe( true ); + + expected.start.set( 1, 0, 0 ); + expected.end.set( 1, 0, 1 ); + + expectLinesToBeClose( target, expected ); + + } ); + + + test( "should intersect on common side", () => { + + t1.a.set( 0, 0, 0 ); + t1.b.set( 3, 0, 0 ); + t1.c.set( 0, 1, 2 ); + t1.needsUpdate = true; + + t2.a.set( 1, 0, 0 ); + t2.b.set( 2, 0, 0 ); + t2.c.set( 0, 1, - 2 ); + + expect( t1.intersectsTriangle( t2, target ) ).toBe( true ); + + expected.start.set( 1, 0, 0 ); + expected.end.set( 2, 0, 0 ); + + expectLinesToBeClose( target, expected ); + + } ); + + test( "should be coplanar and line is null", () => { + + t1.a.set( 0, 0, 0 ); + t1.b.set( 3, 0, 0 ); + t1.c.set( 0, 0, 2 ); + t1.needsUpdate = true; + + t2.a.set( 1, 0, 0 ); + t2.b.set( 2, 0, 0 ); + t2.c.set( 0, 0, - 2 ); + + expect( t1.intersectsTriangle( t2, target ) ).toBe( true ); + + expected.start.set( 0, 0, 0 ); + expected.end.set( 0, 0, 0 ); + + expectLinesToBeClose( target, expected ); + + } ); + + test( "triangles almost coplanar should intersect on point", () => { + + t1.a.set( 0.0720, 0.2096, 0.3220 ); + t1.b.set( 0.0751, 0.2148, 0.3234 ); + t1.c.set( 0.0693, 0.2129, 0.3209 ); + t1.needsUpdate = true; + + t2.a.set( 0.0677, 0.2170, 0.3196 ); + t2.b.set( 0.0607, 0.2135, 0.3165 ); + t2.c.set( 0.0693, 0.2129, 0.3209 ); + + expect( t1.intersectsTriangle( t2, target ) ).toBe( true ); + + expected.start.set( 0.0693, 0.2129, 0.3209 ); + expected.end.set( 0.0693, 0.2129, 0.3209 ); + + expectLinesToBeClose( target, expected ); + + } ); } );
0
diff --git a/binding.gyp b/binding.gyp "<!(echo $MLSDK)/lumin/stl/libc++/lib", "<!(echo $MLSDK)/lumin/usr/lib", "<!(echo $MLSDK)/lib/lumin", - "<(module_root_dir)/mllib", + "<(module_root_dir)/libnode.a", + "<(module_root_dir)/node_modules/native-canvas-deps/lib2/magicleap", + "<(module_root_dir)/node_modules/native-audio-deps/lib2/magicleap", + "<(module_root_dir)/node_modules/native-video-deps/lib2/magicleap", ], 'libraries': [ '-lskia',
4
diff --git a/lib/assets/javascripts/dashboard/components/dashboard-header-view.js b/lib/assets/javascripts/dashboard/components/dashboard-header-view.js @@ -136,7 +136,6 @@ module.exports = CoreView.extend({ model: this.model, viewModel: this._viewModel, router: this.router, // optional - horizontalOffset: -110, tick: 'center', template: require('dashboard/components/dashboard-header/breadcrumbs/dropdown.tpl') }));
2
diff --git a/lib/plugins/ray_trace.js b/lib/plugins/ray_trace.js @@ -24,25 +24,5 @@ function inject (bot) { } } - const rayTraceEntity = (maxSteps = 256, vectorLength = 5 / 16) => { - const { height, position, yaw, pitch } = bot.entity - const cursor = position.offset(0, height, 0) - - const x = -Math.sin(yaw) * Math.cos(pitch) - const y = Math.sin(pitch) - const z = -Math.cos(yaw) * Math.cos(pitch) - - const step = new Vec3(x, y, z).scaled(vectorLength) - - // TODO: Filter only those entities that relative positions are in same direction - - for (let i = 0; i < maxSteps; ++i) { - cursor.add(step) - - // TODO: Check boundingBox of entity - } - } - bot.blockInSight = rayTraceBlock - bot.entityInSight = rayTraceEntity }
2
diff --git a/.github/workflows/master_covid19static.yml b/.github/workflows/master_covid19static.yml @@ -38,5 +38,5 @@ jobs: with: app-name: 'covid19static' slot-name: 'production' - publish-profile: ${{ secrets.AzureAppService_PublishProfile_ee1e6b471f6e4800932ff51b6bbebcfc }} + publish-profile: ${{ secrets.AzureAppServiceProd }} package: ./build
14
diff --git a/assets/js/components/setup/SetupUsingProxyViewOnly.js b/assets/js/components/setup/SetupUsingProxyViewOnly.js @@ -127,7 +127,7 @@ export default function SetupUsingProxyViewOnly() { } ) } </p> - <p className="googlesitekit-setup__description"> + <p> { __( 'Get insights about how people find and use your site as well as how to improve and monetize your content, directly in your WordPress dashboard.', 'google-site-kit'
2
diff --git a/src/queries/fragments.js b/src/queries/fragments.js @@ -82,7 +82,7 @@ export const fullUser = ` isCollaborateable } metaAttributes { title description robots image } - categoryUsers { + categorySummary { id role category { id name slug }
10
diff --git a/QuestionListsHelper.user.js b/QuestionListsHelper.user.js // @description Adds more information about questions to question lists // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 3.2 +// @version 3.3 // // @include https://stackoverflow.com/* // @include https://serverfault.com/* @@ -646,12 +646,6 @@ const initEventListeners = async function () { const siteSpecificCloseReasonId = form.siteSpecificCloseReasonId.value ?? undefined; const siteSpecificOtherText = form.siteSpecificOtherText.value ?? undefined; const duplicateOfQuestionId = form.duplicateOfQuestionId.value ?? undefined; - const belongsOnBaseHostAddress = form.belongsOnBaseHostAddress.value ?? undefined; - - // TODO: Test migration - if (belongsOnBaseHostAddress) { - return; // Use normal form submit action - } // Remove dialog wrapper closeWrapper.remove();
2
diff --git a/character-controller.js b/character-controller.js @@ -81,7 +81,6 @@ function loadPhysxCharacterController() { const dynamic = !!(this.isRemotePlayer || this.isNpcPlayer); if (dynamic) { const halfHeight = height/2; - // console.log('npc controller', {avatarHeight, contactOffset, radius, height, halfHeight}); const physicsObject = physicsManager.addCapsuleGeometry( this.position, localQuaternion.copy(this.quaternion) @@ -95,8 +94,9 @@ function loadPhysxCharacterController() { halfHeight, physicsMaterial ); - physicsManager.disablePhysicsObject(physicsObject); physicsManager.setGravityEnabled(physicsObject, false); + physicsManager.setLinearLockFlags(physicsObject.physicsId, false, false, false); + physicsManager.setAngularLockFlags(physicsObject.physicsId, false, false, false); this.physicsObject = physicsObject; // console.log('character controller physics id', physicsObject.physicsId); }
0
diff --git a/modules/xerte/parent_templates/Nottingham/common_html5/js/xenith.js b/modules/xerte/parent_templates/Nottingham/common_html5/js/xenith.js @@ -4043,29 +4043,24 @@ var XENITH = (function ($, parent) { var self = parent.VARIABLES = {}; tempText = tempText.replace(regExp, x_checkDecimalSeparator(variables[k].value)); } else { - // if it's first attempt to replace vars on this page look at vars in image & mathjax tags first + // if it's first attempt to replace vars on this page look at vars in image, iframe, a & mathjax tags first // these are simply replaced with no surrounding tag so vars can be used as image sources etc. - if (tempText.indexOf('[' + variables[k].name + ']') != -1) { - var $tempText = $(tempText).length == 0 ? $('<span>' + tempText + '</span>') : $(tempText); - for (var m=0; m<$tempText.find('img').length; m++){ - var tempImgTag = $tempText.find('img')[m].outerHTML, - regExp2 = new RegExp('\\[' + variables[k].name + '\\]', 'g'); - tempImgTag = tempImgTag.replace(regExp2, x_checkDecimalSeparator(variables[k].value)); - $($tempText.find('img')[m]).replaceWith(tempImgTag); - } - tempText = $tempText.map(function(){ return this.outerHTML; }).get().join(''); - } + var tags = ['img', '.mathjax', 'iframe', 'a']; + + for (var p=0; p<tags.length; p++) { + var thisTag = tags[p]; if (tempText.indexOf('[' + variables[k].name + ']') != -1) { var $tempText = $(tempText).length == 0 ? $('<span>' + tempText + '</span>') : $(tempText); - for (var m=0; m<$tempText.find('.mathjax').length; m++){ - var tempImgTag = $tempText.find('.mathjax')[m].outerHTML, + for (var m=0; m<$tempText.find(thisTag).length; m++){ + var tempTag = $tempText.find(thisTag)[m].outerHTML, regExp2 = new RegExp('\\[' + variables[k].name + '\\]', 'g'); - tempImgTag = tempImgTag.replace(regExp2, x_checkDecimalSeparator(variables[k].value)); - $($tempText.find('.mathjax')[m]).replaceWith(tempImgTag); + tempTag = tempTag.replace(regExp2, x_checkDecimalSeparator(variables[k].value)); + $($tempText.find(thisTag)[m]).replaceWith(tempTag); } tempText = $tempText.map(function(){ return this.outerHTML; }).get().join(''); } + } // replace with the variable text (this looks at both original variable mark up (e.g. [a]) & the tag it's replaced with as it might be updating a variable value that's already been inserted) var regExp = new RegExp('\\[' + variables[k].name + '\\]|<span class="x_var x_var_' + variables[k].name + '">(.*?)</span>', 'g');
11
diff --git a/website/lexonomy.py b/website/lexonomy.py @@ -735,7 +735,7 @@ def publicsearch(dictID): if not configs["publico"]["public"]: return {"success": False} else: - total, entries, first = ops.listEntries(dictDB, dictID, configs, configs['xema']['root'], request.forms.searchtext) + total, entries, first = ops.listEntries(dictDB, dictID, configs, configs['xema']['root'], request.forms.searchtext, request.forms.modifier, request.forms.howmany) return {"success": True, "entries": entries, "total": total} @post(siteconfig["rootPath"]+"<dictID>/configread.json")
11
diff --git a/core/task-executor/lib/templates/worker.js b/core/task-executor/lib/templates/worker.js @@ -60,6 +60,14 @@ const jobTemplate = { } } }, + { + name: 'NAMESPACE', + valueFrom: { + fieldRef: { + fieldPath: 'metadata.namespace' + } + } + }, { name: 'DEFAULT_STORAGE', valueFrom: {
0
diff --git a/src/maintenance/index.js b/src/maintenance/index.js @@ -20,7 +20,7 @@ const createLogger = require('../util/logger/create.js') * @param {import('discord.js').Client} bot */ async function prunePreInit (guildIdsByShard, channelIdsByShard) { - const feeds = await Feed.getAll() + const feeds = await Feed.getAllByPagination() await Promise.all([ checkIndexes(), ScheduleStats.deleteAll(),
7
diff --git a/site/rabbit.ent b/site/rabbit.ent @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<!ENTITY version-java-client "5.5.0"> +<!ENTITY version-java-client "5.5.1"> <!ENTITY version-dotnet-client "5.1.0"> <!ENTITY version-server "3.7.9"> <!ENTITY version-server-series "v3.7.x">
12
diff --git a/docs/whats-new.md b/docs/whats-new.md @@ -16,22 +16,40 @@ deck.gl layers can now specify additional type information about properties. Whe ## deck.gl v5.3 -Release date: TBD, target May, 2018 +Release date: TBD, target May 25, 2018 +<table style="border: 0;" align="center"> + <tbody> + <tr> + <td> + <img height=150 src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/orthographic.gif" /> + <p><i>Orthographic Mode</i></p> + </td> + </tr> + </tbody> +</table> + + +### Deck/DeckGL classes -### Deep Picking +#### Deep Picking deck.gl can now pick occluded objects using the new `Deck.pickMultipleObjects` method, which returns a list of all objects under the mouse, instead of just the top-most object. +### Automatic Interactivity + +A new `Deck.initialViewState` property allows the application to enable map or view interactivity simply by supplying an initial view state, e.g. `{longitude, latitude, zoom}`. deck.gl will automatically initialize a Controller class and listen to view state changes, without the application having to track the view state. + + ### Switching between Perspective and Orthographic mode -The [`View`](/docs/api-reference/view.md) class can now build an orthographic projection matrix from the same "field of view" parameter it uses to create perspective mode. This makes switching between different projection modes easier than ever (just set the new `orthographic` property to `true`). +The [`View`](/docs/api-reference/view.md) classes can now build an orthographic projection matrix from the same "field of view" parameter it uses to create perspective mode (rather than requiring a separate set of parameters). This makes switching between perspective and orhtographic projection modes easier then ever (simply set the new `View.orthographic` prop to `true` to activate orthographic projection). ## deck.gl v5.2 -Release date: TBD, target April, 2018 +Release date: April 24, 2018 <table style="border: 0;" align="center"> <tbody>
0
diff --git a/assets/js/modules/adsense/datastore/report.test.js b/assets/js/modules/adsense/datastore/report.test.js @@ -75,16 +75,16 @@ describe( 'modules/adsense report', () => { { status: 200 } ); - const initialReport = registry.select( STORE_NAME ).getReport(); + const initialReport = registry.select( STORE_NAME ).getReport( {} ); expect( initialReport ).toEqual( undefined ); await subscribeUntil( registry, () => ( - registry.select( STORE_NAME ).getReport() !== undefined + registry.select( STORE_NAME ).getReport( {} ) !== undefined ), ); - const report = registry.select( STORE_NAME ).getReport(); + const report = registry.select( STORE_NAME ).getReport( {} ); expect( fetch ).toHaveBeenCalledTimes( 1 ); expect( report ).toEqual( fixtures.report );
1
diff --git a/index.js b/index.js const chalk = require('chalk') +process.env.CALIBRE_HOST = process.env.CALIBRE_HOST || 'https://calibreapp.com/' + const Site = require('./src/api/site') const Snapshot = require('./src/api/snapshot') const Test = require('./src/api/test') const TestProfile = require('./src/api/test_profile') -process.env.CALIBRE_HOST = process.env.CALIBRE_HOST || 'https://calibreapp.com' - if (!process.env.CALIBRE_API_TOKEN) { console.log( chalk.grey(
5
diff --git a/packages/project-disaster-trail/src/components/Game/OrbManagerHelpers.js b/packages/project-disaster-trail/src/components/Game/OrbManagerHelpers.js import { cloneDeep, sampleSize } from "lodash"; -export function createRandomLayout(kitItems, bounds, config) { - if (!kitItems.length) { +export function createRandomLayout(possibleItems, bounds, config) { + if (!possibleItems.length) { return []; } // create an empty array. const orbCollection = []; - // create a number of orbs based on each kitItems weighting to achieve the correct distribution. Add the x, y, and velocity properties to its existing properties for that item - for (let i = 0; i < kitItems.length; i += 1) { - const kitData = kitItems[i]; - const totalGeneratedOrbs = Math.round(config.orbCount * kitData.weighting); + // create a number of orbs based on each possibleItems weighting to achieve the correct distribution. Add the x, y, and velocity properties to its existing properties for that item + for (let i = 0; i < possibleItems.length; i += 1) { + const itemData = possibleItems[i]; + const totalGeneratedOrbs = Math.round(config.orbCount * itemData.weighting); for (let j = 0; j < totalGeneratedOrbs; j += 1) { - const orbId = `${kitData.type}-${j}`; - kitData.x = Math.random() * bounds.width; - kitData.y = Math.random() * (bounds.height - config.orbSize * 2); - kitData.velocity = { + const orbId = `${itemData.type}-${j}`; + itemData.x = Math.random() * bounds.width; + itemData.y = Math.random() * (bounds.height - config.orbSize * 2); + itemData.velocity = { x: config.minVelocityX + Math.random() * (config.maxVelocityX - config.minVelocityX), @@ -26,7 +26,7 @@ export function createRandomLayout(kitItems, bounds, config) { }; orbCollection.push( - Object.assign({}, { orbId }, { touched: false }, kitData) + Object.assign({}, { orbId }, { touched: false }, itemData) ); } } @@ -40,39 +40,39 @@ export function createRandomLayout(kitItems, bounds, config) { // and setting a `delay` in each orb for sequential animations // // use `totalGeneratedOrbs` to control how many orbs should be made at once -// note that this creates `n` number of orbs based on what's found in the kit +// note that this creates `n` number of orbs based on what's found in the possibleItems // // use `columnsInRow` to define how many columns (ie instances across, remember columns hold things up) // the grid will auto populate the number of rows required to display all the orbs export function createFixedLayout( - kitItems, + possibleItems, bounds, config, totalGeneratedOrbs = 50, columnsInRow = 15 ) { - if (!kitItems.length) { + if (!possibleItems.length) { return []; } // create an empty array. let orbCollection = []; - for (let i = 0, orbCount = kitItems.length; i < orbCount; i += 1) { - const kitData = kitItems[i]; + for (let i = 0, orbCount = possibleItems.length; i < orbCount; i += 1) { + const itemData = possibleItems[i]; const jCount = totalGeneratedOrbs / orbCount; for (let j = 0; j < jCount; j += 1) { - const orbId = `${kitData.type}-${j}`; - kitData.x = 0; - kitData.y = 0; - kitData.velocity = { + const orbId = `${itemData.type}-${j}`; + itemData.x = 0; + itemData.y = 0; + itemData.velocity = { x: 0, y: 0 }; orbCollection.push( - Object.assign({}, { orbId }, { touched: false }, kitData) + Object.assign({}, { orbId }, { touched: false }, itemData) ); } }
10
diff --git a/lib/components/breadcrumb.vue b/lib/components/breadcrumb.vue <template> <ol class="breadcrumb"> - <li v-if="items" v-for="item in items" :class="['breadcrumb-item', item.active ? 'active' : null]" @click="onclick(item)"> + <li v-for="item in items2" :class="['breadcrumb-item', item.__active ? 'active' : null]" + @click="onclick(item)"> <span v-if="item.active" v-html="item.text"></span> - <b-link v-else :to="item.to||item.href||item.link" v-html="item.text"></b-link> + <b-link v-else :to="item.to" :href="item.href || item.link" v-html="item.text"></b-link> </li> <slot></slot> </ol> computed: { componentType() { return this.to ? 'router-link' : 'a'; + }, + items2() { + const last = this.items.length > 0 && this.items[this.items.length - 1]; + + return this.items.map(item => { + if (typeof item === 'string') { + return {text: item, link: '#', active: item === last}; + } + + if (item.active !== true && item.active !== false) { + item.__active = item === last; + } else { + item.__active = item.active; + } + + return item; + }); } }, props: {
7
diff --git a/src/components/core/MeshUIComponent.js b/src/components/core/MeshUIComponent.js @@ -426,11 +426,9 @@ export default function MeshUIComponent( Base = class {} ) { case "letterSpacing" : case "interLine" : - if ( this.isBlock && this[ "bestFit" ] == true ) { - parsingNeedsUpdate = true; + if ( this.isBlock && this[ "bestFit" ] == true ) parsingNeedsUpdate = true; layoutNeedsUpdate = true; this[ prop ] = options[ prop ]; - } break; case "margin" :
1
diff --git a/src/core/Core.js b/src/core/Core.js @@ -437,6 +437,7 @@ class Uppy { this._calculateTotalProgress() this.emit('file-removed', removedFile) + this.log(`File removed: ${removedFile.id}`) // Clean up object URLs. if (removedFile.preview && Utils.isObjectURL(removedFile.preview)) {
0
diff --git a/src/components/AvatarWithImagePicker.js b/src/components/AvatarWithImagePicker.js @@ -80,7 +80,7 @@ class AvatarWithImagePicker extends React.Component { this.showErrorModal = this.showErrorModal.bind(this); this.isValidSize = this.isValidSize.bind(this); this.updateAvatarImage = this.updateAvatarImage.bind(this); - this.openAvatarCropModal = this.openAvatarCropModal.bind(this); + this.openAvatarCropModal = this.showAvatarCropModal.bind(this); this.state = { isMenuVisible: false, isErrorModalVisible: false, @@ -170,7 +170,7 @@ class AvatarWithImagePicker extends React.Component { /** Validates if an image has a valid resolution and opens an avatar crop modal * @param {Object} image */ - openAvatarCropModal(image) { + showAvatarCropModal(image) { this.isValidResolution(image.uri) .then((isValidResolution) => { if (isValidResolution) { @@ -200,7 +200,7 @@ class AvatarWithImagePicker extends React.Component { text: this.props.translate('avatarWithImagePicker.uploadPhoto'), onSelected: () => { openPicker({ - onPicked: this.openAvatarCropModal, + onPicked: this.showAvatarCropModal, }); }, },
10
diff --git a/simplex-noise.js b/simplex-noise.js @@ -31,6 +31,12 @@ const module = {exports}; (function() { 'use strict'; + const MAX_VERTICES = 256; + const MAX_VERTICES_MASK = MAX_VERTICES -1; + function lerp(a, b, t) { + return a * ( 1 - t ) + b * t; + } + var F2 = 0.5 * (Math.sqrt(3.0) - 1.0); var G2 = (3.0 - Math.sqrt(3.0)) / 6.0; var F3 = 1.0 / 3.0; @@ -56,6 +62,11 @@ const module = {exports}; this.permMod12[i] = this.perm[i] % 12; } + const r = new Float32Array(MAX_VERTICES); + for (let i = 0; i < MAX_VERTICES; i++) { + r[i] = random(); + } + this.r = r; } SimplexNoise.prototype = { grad3: new Float32Array([1, 1, 0, @@ -81,6 +92,23 @@ const module = {exports}; -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]), + noise1D: function(xin) { + const amplitude = 1; + const scale = 1; + const scaledX = xin * scale; + const xFloor = Math.floor(scaledX); + const t = scaledX - xFloor; + const tRemapSmoothstep = t * t * ( 3 - 2 * t ); + + /// Modulo using & + const xMin = xFloor & MAX_VERTICES_MASK; + const xMax = ( xMin + 1 ) & MAX_VERTICES_MASK; + + const {r} = this; + const y = lerp( r[ xMin ], r[ xMax ], tRemapSmoothstep ); + + return y * amplitude; + }, noise2D: function(xin, yin) { var permMod12 = this.permMod12; var perm = this.perm;
0
diff --git a/semcore/notice-bubble/src/NoticeBubble.js b/semcore/notice-bubble/src/NoticeBubble.js @@ -8,7 +8,6 @@ import fire from '@semcore/utils/lib/fire'; import isNode from '@semcore/utils/lib/isNode'; import { callAllEventHandlers } from '@semcore/utils/lib/assignProps'; import CloseXS from '@semcore/icon/lib/Close/xs'; -import { useUID } from '@semcore/utils/lib/uniqueID'; import { Timer } from './utils'; import style from './style/notice-bubble.shadow.css'; @@ -37,10 +36,9 @@ const Notices = (props) => { const { styles, data = [], tag: SView = ViewInfo, visible } = props; return data.map((notice) => { - const uid = useUID(); return sstyled(styles)( <Animation - key={uid} + key={notice.uid} visible={notice.visible || visible} duration={250} keyframes={[animationNotice['@enter'], animationNotice['@exit']]} @@ -87,13 +85,9 @@ class NoticeBubbleContainerRoot extends Component { handleChange = (notices) => { const info = notices.filter((notice) => notice.type === 'info'); - const { length: iLength } = info; const warning = notices.filter((notice) => notice.type === 'warning'); - const { length: wLength } = warning; - this.setState({ - notices: iLength ? [info[iLength - 1]] : [], - warnings: wLength ? [warning[wLength - 1]] : [], - }); + + this.setState({ notices: info, warnings: warning }); }; render() {
0
diff --git a/assets/js/components/settings/SettingsApp.js b/assets/js/components/settings/SettingsApp.js @@ -51,7 +51,7 @@ function SettingsApp() { const viewContext = useContext( ViewContextContext ); - const handleTabChange = useCallback( async () => { + const handleTabChange = useCallback( () => { trackEvent( viewContext, 'tab_select', basePath ); }, [ basePath, viewContext ] );
2
diff --git a/package.json b/package.json "main": "index.js", "dependencies": { "babel-core": "^6.18.2", - "babel-plugin-transform-amd-system-wrapper": "^0.3.2", + "babel-plugin-transform-amd-system-wrapper": "^0.3.3", "babel-plugin-transform-cjs-system-wrapper": "^0.5.0", "babel-plugin-transform-es2015-modules-systemjs": "^6.6.5", "babel-plugin-transform-global-system-wrapper": "^0.2.0",
3
diff --git a/src/components/ArchivedReportFooter.js b/src/components/ArchivedReportFooter.js @@ -8,7 +8,6 @@ import withLocalize, {withLocalizePropTypes} from './withLocalize'; import compose from '../libs/compose'; import personalDetailsPropType from '../pages/personalDetailsPropType'; import ONYXKEYS from '../ONYXKEYS'; -import * as Localize from '../libs/Localize'; const propTypes = { /** The reason this report was archived */ @@ -54,7 +53,7 @@ const defaultProps = { const ArchivedReportFooter = (props) => { const archiveReason = lodashGet(props.reportClosedAction, 'originalMessage.reason', CONST.REPORT.ARCHIVE_REASON.DEFAULT); - const policyName = archiveReason === CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY ? props.report.oldPolicyName : lodashGet(props.policies, `${ONYXKEYS.COLLECTION.POLICY}${props.report.policyID}.name`, Localize.translateLocal('workspace.common.unavailable')); + let policyName = lodashGet(props.policies, `${ONYXKEYS.COLLECTION.POLICY}${props.report.policyID}.name`, props.translate('workspace.common.unavailable')); let displayName = lodashGet(props.personalDetails, `${props.report.ownerEmail}.displayName`, props.report.ownerEmail); let oldDisplayName; @@ -65,6 +64,10 @@ const ArchivedReportFooter = (props) => { oldDisplayName = lodashGet(props.personalDetails, `${oldLogin}.displayName`, oldLogin); } + if (archiveReason === CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY) { + policyName = props.report.oldPolicyName; + } + return ( <Banner text={props.translate(`reportArchiveReasons.${archiveReason}`, {
4
diff --git a/src/components/Widgets/Markdown/unified.js b/src/components/Widgets/Markdown/unified.js @@ -7,29 +7,29 @@ import htmlToRehype from 'rehype-parse'; import rehypeToRemark from 'rehype-remark'; import remarkToMarkdown from 'remark-stringify'; import rehypeSanitize from 'rehype-sanitize'; +import rehypeReparse from 'rehype-raw'; import rehypeMinifyWhitespace from 'rehype-minify-whitespace'; -const remarkParseConfig = { fences: true }; -const remarkStringifyConfig = { listItemIndent: '1', fences: true }; -const rehypeParseConfig = { fragment: true }; /** * Remove empty nodes, including the top level parents of deeply nested empty nodes. */ const rehypeRemoveEmpty = () => { const isVoidElement = node => ['img', 'hr'].includes(node.tagName); - const isNonEmptyText = node => node.type === 'text' && node.value; + const isNonEmptyLeaf = node => ['text', 'raw'].includes(node.type) && node.value; const isNonEmptyNode = node => { - return isVoidElement(node) || isNonEmptyText(node) || find(node.children, isNonEmptyNode); + return isVoidElement(node) + || isNonEmptyLeaf(node) + || find(node.children, isNonEmptyNode); }; const transform = node => { - if (isVoidElement(node) || isNonEmptyText(node)) { + if (isVoidElement(node) || isNonEmptyLeaf(node)) { return node; } if (node.children) { node.children = node.children.reduce((acc, childNode) => { - if (isVoidElement(childNode) || isNonEmptyText(childNode)) { + if (isVoidElement(childNode) || isNonEmptyLeaf(childNode)) { return acc.concat(childNode); } return find(childNode.children, isNonEmptyNode) ? acc.concat(transform(childNode)) : acc; @@ -91,12 +91,13 @@ const rehypePaperEmoji = () => { export const markdownToHtml = markdown => { const result = unified() - .use(markdownToRemark, remarkParseConfig) - .use(remarkToRehype) + .use(markdownToRemark, { fences: true }) + .use(remarkToRehype, { allowDangerousHTML: true }) + .use(rehypeReparse) .use(rehypeRemoveEmpty) .use(rehypeSanitize) .use(rehypeMinifyWhitespace) - .use(rehypeToHtml) + .use(rehypeToHtml, { allowDangerousHTML: true }) .processSync(markdown) .contents; return result; @@ -104,14 +105,14 @@ export const markdownToHtml = markdown => { export const htmlToMarkdown = html => { const result = unified() - .use(htmlToRehype, rehypeParseConfig) + .use(htmlToRehype, { fragment: true }) .use(rehypePaperEmoji) .use(rehypeSanitize) .use(rehypeRemoveEmpty) .use(rehypeMinifyWhitespace) .use(rehypeToRemark) .use(remarkNestedList) - .use(remarkToMarkdown, remarkStringifyConfig) + .use(remarkToMarkdown, { listItemIndent: '1', fences: true }) .processSync(html) .contents; return result;
11
diff --git a/vis/js/list.js b/vis/js/list.js @@ -465,7 +465,6 @@ list.populateMetaData = function(nodes) { if (config.viper_outlink) { list_metadata.select(".viper_outlink") .html(function (d) { - console.log(d) var has_doi = !(d.doi === "") return viperOutlinkTemplate({ has_doi, @@ -681,12 +680,13 @@ list.filterList = function(search_words, filter_param) { this.hideEntriesByParam(all_list_items, filter_param); this.hideEntriesByParam(all_map_items, filter_param); + + debounce(this.count_visible_items_to_header, config.debounce)() }; // Returns true if document has parameter or if no parameter is passed list.findEntriesWithParam = function (param, d) { if (param === 'open_access') { - console.log('filtering by OA status. Status: ' + d.oa) return d.oa } else if (param === 'publication') { return d.resulttype === 'publication'
1
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.13.1 (unreleased) -### Breaking - ### Feature - Render form with vertical tabs, setting the property `verticalFormTabs` in config.js @giuliaghisini ### Bugfix - - fix console warning due to uncontrolled selectWidget component @nileshgulia1 -### Internal + +- Imported locales by razzle and fixed import locale @giuliaghisini +- Fix console warning due to uncontrolled selectWidget component @nileshgulia1 ## 7.13.0 (2020-09-07) - Fix `null` response issue when passing custom `Accept:` headers to actions #1771 @avoinea - Removed all `<<<<<HEAD` artifacts from translations @steffenri - Increase z-index of `block-add-button` @steffenri -- imported locales by razzle and fixed import locale @giuliaghisini ### Internal
6
diff --git a/_pages/search.html b/_pages/search.html @@ -44,13 +44,10 @@ header: } </style> -<form action="search"> <div class="searchbox"> <span>&#x1f50e</span> <input id="query" type="text" autocomplete="off" placeholder="What are you looking for?"> <img src="/images/site/ajax-loader.gif" id="spinner" width="50px" height="40px"/> </div> -</form> - <div class="note">Powered by Azure Search</div> @@ -87,14 +84,18 @@ header: // Main function to query Azure Search and process results // function runSearch() { - let query = $("#query").val(); + let query = $("#query").val() + if(!query) { + $("#spinner").hide(); + return + } // Query Azure Search $.get(`${AZURE_SEARCH_URL}&search=${query}`, function(data) { $("#spinner").hide() saveTerm() - if(data && data.value.length > 0) { + if(data) { //} && data.value.length > 0) { // Clear results $("#results").html("") @@ -138,7 +139,7 @@ header: </div>`) } } - }); + }) } //
7
diff --git a/src/lib/geolocation.test.js b/src/lib/geolocation.test.js @@ -232,6 +232,7 @@ describe("locationStatusStream", () => { watchPosition.mockImplementationOnce(cb => { callback = cb; }); + // See https://github.com/ReactiveX/rxjs/blob/master/doc/marble-testing.md const scheduler = new TestScheduler((actual, expected) => { expect(actual).toEqual(expected); }); @@ -253,6 +254,7 @@ describe("locationStatusStream", () => { watchPosition.mockImplementationOnce(cb => { callback = cb; }); + // See https://github.com/ReactiveX/rxjs/blob/master/doc/marble-testing.md const scheduler = new TestScheduler((actual, expected) => { expect(actual).toEqual(expected); });
0
diff --git a/src/technologies.json b/src/technologies.json 32, 75 ], - "includes": "MailChimp", "description": "Mailchimp is a marketing automation platform and email marketing service.", "icon": "mailchimp.svg", "scripts": "mailchimp-woocommerce-public\\.min\\.js(?:\\?ver=([\\d.]+))?\\;version:\\1", 32, 75 ], - "includes": "MailChimp", "description": "Mailchimp is a marketing automation platform and email marketing service.", "icon": "mailchimp.svg", "js": { 32, 75 ], - "includes": "MailChimp", "description": "Mailchimp is a marketing automation platform and email marketing service.", "icon": "mailchimp.svg", "js": { 5 ], "icon": "Taggbox.svg", - "script": "(widget|web)\\.taggbox\\.com", + "scripts": "(widget|web)\\.taggbox\\.com", "url": "(widget|web)\\.taggbox\\.com", "saas": true, "pricing": ["low", "recurring", "freemium"],
1
diff --git a/server/game/cards/01 - Core/SavvyPolitician.js b/server/game/cards/01 - Core/SavvyPolitician.js @@ -7,7 +7,7 @@ class SavvyPolitician extends DrawCard { 'onCardHonored': event => event.card === this }, target: { - cardCondition: card => card.location === 'play area' && card.getType() === 'character' + cardCondition: card => card.location === 'play area' && card.getType() === 'character' && !card.isHonored }, handler: context => { this.game.addMessage('{0} uses {1}\'s ability to honor {2}', this.controller, this, context.target);
2
diff --git a/js/webview/phishDetector.js b/js/webview/phishDetector.js @@ -77,7 +77,7 @@ function checkPhishingStatus () { // if we have a password input, set a lower threshold if (document.querySelector('input[type=password]')) { - debugPhishing("found password input, resetting minScore") + debugPhishing('found password input, resetting minScore') minPhishingScore = 0.9 } @@ -185,6 +185,7 @@ function checkPhishingStatus () { var totalFormLength = 0 var formWithoutActionFound = false var formWithSimplePathFound = false + var insecureFormFound = false var sensitiveFormFound = false // loop through each form @@ -204,7 +205,6 @@ function checkPhishingStatus () { // if no action, form might be fake if (!fa || loc.split('?')[0].indexOf(fa.split('?')[0]) !== -1) { // we also check if the form just submits to the same page with a different query string - debugPhishing('form without action detected') formWithoutActionFound = true continue } @@ -221,7 +221,6 @@ function checkPhishingStatus () { var slashCt = fa.replace(window.location.toString(), '').replace(window.location.pathname, '').split('/').length - 1 if (fa.indexOf('javascript:') !== 0 && slashCt < 2) { - debugPhishing('form with simple path for action detected') formWithSimplePathFound = true } else if (slashCt < 3) { debugPhishing('non-absolute form path detected') @@ -245,19 +244,25 @@ function checkPhishingStatus () { } if (aTest.protocol !== 'https:') { - debugPhishing('submitting form without https') - phishingScore += 0.15 + insecureFormFound = true } } if (formWithoutActionFound === true) { + debugPhishing('form without action detected') phishingScore += 0.3 phishingScore += Math.min(0.2, totalFormLength * 0.0001) } if (formWithSimplePathFound === true) { + debugPhishing('form with simple path for action detected') phishingScore += 0.75 } + + if (insecureFormFound) { + debugPhishing('submitting form without https') + phishingScore += 0.15 + } } if (!sensitiveFormFound && !document.querySelector('input[type=password]')) { debugPhishing('no sensitive forms found, increasing minScore')
3
diff --git a/lib/jiff-client.js b/lib/jiff-client.js } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('>=', self.holders); + op_id = self.jiff.counters.gen_op_id('sgteq',self.holders); } return self.islt(o, op_id).inot(); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('>', self.holders); + op_id = self.jiff.counters.gen_op_id('sgt', self.holders); } return o.islt(self, op_id); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('<=', self.holders); + op_id = self.jiff.counters.gen_op_id('slteq', self.holders); } return o.islt(self, op_id).inot(); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('c>=', self.holders); + op_id = self.jiff.counters.gen_op_id('cgteq', self.holders); } return self.iclt(cst, op_id).inot(); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('c<=', self.holders); + op_id = self.jiff.counters.gen_op_id('clteq', self.holders); } return self.icgt(cst, op_id).inot(); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('c<', self.holders); + op_id = self.jiff.counters.gen_op_id('clt', self.holders); } var final_deferred = $.Deferred(); } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('=', self.holders); + op_id = self.jiff.counters.gen_op_id('seq', self.holders); } return self.issub(o).iclteq(0, op_id); if (!self.jiff.helpers.array_equals(self.holders, o.holders)) { throw new Error('shares must be held by the same parties (!=)'); } + if (op_id == null) { + op_id = self.jiff.counters.gen_op_id('sneq', self.holders); + } return self.iseq(o, op_id).inot(); }; //jiff.preprocessing_function_map['!='] = jiff.preprocessing_function_map['=']; } if (op_id == null) { - op_id = self.jiff.counters.gen_op_id('c=', self.holders); + op_id = self.jiff.counters.gen_op_id('ceq', self.holders); } return self.icsub(cst).iclteq(0, op_id); if (!(self.isConstant(cst))) { throw new Error('parameter should be a number (!=)'); } + if (op_id == null) { + op_id = self.jiff.counters.gen_op_id('cneq', self.holders); + } return self.iceq(cst, op_id).inot(); }; //jiff.preprocessing_function_map['c!='] = jiff.preprocessing_function_map['c=']; jiff.protocols.clt_bits = function (constant, bits, op_id) { if (op_id == null) { // Generate base operation id if needed. - op_id = jiff.counters.gen_op_id('c<bits', bits[0].holders); + op_id = jiff.counters.gen_op_id('clt_bits', bits[0].holders); } // Decompose result into bits
14
diff --git a/src/sensors/DataSearch.js b/src/sensors/DataSearch.js @@ -46,8 +46,6 @@ class DataSearch extends Component { setReact(props) { const { react } = props; if (props.react) { - props.watchComponent(this.internalComponent, react); - newReact = pushToAndClause(react, this.internalComponent) props.watchComponent(props.componentId, newReact); } else {
3
diff --git a/tests/test_IssuanceController.py b/tests/test_IssuanceController.py @@ -455,7 +455,7 @@ class TestIssuanceController(HavvenTestCase): exchanger = self.participantAddresses[0] nominsToSend = 5 * UNIT nominsReceived = self.nomin.amountReceived(nominsToSend) - havBalance = (nominsReceived / self.usdToHavPrice) * UNIT + havBalance = nominsReceived * UNIT // self.usdToHavPrice # Set up the contract so it contains some nomins and havvens self.nomin.giveNomins(MASTER, exchanger, nominsToSend) @@ -471,7 +471,7 @@ class TestIssuanceController(HavvenTestCase): self.assertEqual(self.nomin.balanceOf(exchanger), 0) self.assertEqual(self.nomin.balanceOf(self.issuanceControllerContract.address), nominsReceived) self.assertEqual(self.nomin.feePool(), nominsToSend - nominsReceived) - self.assertClose(self.havven.balanceOf(exchanger), havBalance) + self.assertEqual(self.havven.balanceOf(exchanger), havBalance) self.assertEqual(self.havven.balanceOf(self.issuanceControllerContract.address), 1000 * UNIT - havBalance) def test_exchangeForAllHavvens(self):
1
diff --git a/public/js/office.web.js b/public/js/office.web.js @@ -31,12 +31,12 @@ $(() => { } function showUserInRoom(user, room) { - let userView = $(`#${user.id}`).length; + let userView = $(`#${user.id}`); - if (userView == 0) { + if (!userView.length) { userView = $(`<div id="${user.id}" class="thumbnail user-room"><img user-presence class="rounded-circle" style="margin:2px;display:flex;" user-id="${user.id}" title="${user.name}" width="50px" src="${user.imageUrl}"></div>`); } else { - userView = $(`#${user.id}`).detach(); + userView.detach(); } userInRoomDecorator(user, room); @@ -59,13 +59,14 @@ $(() => { } function userInMeetDecorator(user, userView){ - let userMeetClass = "rounded-circle user-not-in-call user-room" + const userMeetDefaultClasses = "rounded-circle user-room"; - if (user.inMeet !== undefined && user.inMeet) { - userMeetClass = "rounded-circle user-in-call user-room"; + if (user.inMeet) { + userView.toggleClass('user-in-call', user.inMeet); + userView.toggleClass('user-not-call', !user.inMeet); } - userView.attr("class",userMeetClass); + userView.attr("class", userMeetDefaultClasses); } function userInRoomDecorator(user, room) { @@ -123,9 +124,10 @@ $(() => { } function isUserInVideoConference(){ - if($("#exampleModalCenter").data('bs.modal')){ - return $("#exampleModalCenter").data('bs.modal')._isShown; - } + const dataModal = $("#exampleModalCenter").data("bs.modal"); + + if(dataModal) { return dataModal._isShown; } + return false; } @@ -172,7 +174,6 @@ $(() => { } } - function getRoomName(roomId){ return $("[room-id="+roomId+"]").attr("room-name") } @@ -189,11 +190,8 @@ $(() => { return lastRoom; } - function isValidRoom(room){ - if(room==null || room==undefined || room== "undefined"){ - return false - } - return true; + function isValidRoom2(room) { + return !(room === null || room === undefined || room === "undefined") } function getDefaultRoom(){ @@ -202,14 +200,14 @@ $(() => { function getUrlRoom(){ const currentRoom = location.hash; - if(currentRoom==null || currentRoom==undefined){ + + if(currentRoom === null || currentRoom === undefined){ return null; } else { return currentRoom.split("#")[1] } } - function syncOffice(usersInRoom){ for (const key in usersInRoom) { userInroom = usersInRoom[key];
7
diff --git a/includes/Core/Util/View_Only_Pointer.php b/includes/Core/Util/View_Only_Pointer.php namespace Google\Site_Kit\Core\Util; use Google\Site_Kit\Core\Admin\Pointer; -use Google\Site_Kit\Core\Dismissals\Dismissed_Items; use Google\Site_Kit\Core\Permissions\Permissions; /** @@ -65,19 +64,16 @@ final class View_Only_Pointer { } $dismissed_wp_pointers = get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ); - if ( ! $dismissed_wp_pointers ) { return true; } $dismissed_wp_pointers = explode( ',', $dismissed_wp_pointers ); - if ( in_array( self::SLUG, $dismissed_wp_pointers, true ) ) { return false; } return true; - }, ) );
2
diff --git a/data/networks.json b/data/networks.json { "id": "emoney-testnet", "title": "e-Money Testnet", - "chain_id": "lilmermaid-4", + "chain_id": "lilmermaid-5", "api_url": "http://lilmermaid.validator.network/light", "rpc_url": "wss://lilmermaid.validator.network/websocket", "bech32_prefix": "emoney",
12
diff --git a/modules/RTC/RTC.js b/modules/RTC/RTC.js @@ -311,7 +311,7 @@ export default class RTC extends Listenable { continue; } - const mediaTrack = endpointMediaTypes[trackMediaType]; + const mediaTrack = this.remoteTracks[endpoint][trackMediaType]; if (mediaTrack) { remoteTracks.push(mediaTrack);
1
diff --git a/lib/core.js b/lib/core.js */ var core = new (function () { + var ownPropFunc = Object.prototype.hasOwnProperty; var _mix = function (targ, src, merge, includeProto) { for (var p in src) { // Don't copy stuff from the prototype - if (src.hasOwnProperty(p) || includeProto) { + if (ownPropFunc.call(src, p) || includeProto) { if (merge && // Assumes the source property is an Object you can // actually recurse down into
9
diff --git a/src/components/datetime.js b/src/components/datetime.js @@ -117,7 +117,7 @@ module.exports = function(app) { 'is-open="minDateOpen" ' + 'datetime-picker="yyyy-MM-dd" ' + 'enable-time="false" ' + - 'ng-model="component.minDate" />' + + 'ng-model="component.datePicker.minDate" />' + '<span class="input-group-btn">' + '<button type="button" class="btn btn-default" ng-click="minDateOpen = true"><i class="fa fa-calendar"></i></button>' + '</span>' + @@ -132,7 +132,7 @@ module.exports = function(app) { 'is-open="maxDateOpen" ' + 'datetime-picker="yyyy-MM-dd" ' + 'enable-time="false" ' + - 'ng-model="component.maxDate" />' + + 'ng-model="component.datePicker.maxDate" />' + '<span class="input-group-btn">' + '<button type="button" class="btn btn-default" ng-click="maxDateOpen = true"><i class="fa fa-calendar"></i></button>' + '</span>' +
1
diff --git a/src/features/desktopCapturer/Component.js b/src/features/desktopCapturer/Component.js @@ -19,33 +19,13 @@ const messages = defineMessages({ id: 'feature.desktopCapturer.headline', defaultMessage: '!!!Choose what to share', }, - text: { - id: 'feature.desktopCapturer.text', - defaultMessage: '!!!Tell your friends and colleagues how awesome Franz is and help us to spread the word.', + shareSourceTextDisabled: { + id: 'feature.desktopCapturer.shareSourceTextDisabled', + defaultMessage: '!!!Select source', }, - actionsEmail: { - id: 'feature.desktopCapturer.action.email', - defaultMessage: '!!!Share as email', - }, - actionsFacebook: { - id: 'feature.desktopCapturer.action.facebook', - defaultMessage: '!!!Share on Facebook', - }, - actionsTwitter: { - id: 'feature.desktopCapturer.action.twitter', - defaultMessage: '!!!Share on Twitter', - }, - actionsLinkedIn: { - id: 'feature.desktopCapturer.action.linkedin', - defaultMessage: '!!!Share on LinkedIn', - }, - shareTextEmail: { - id: 'feature.desktopCapturer.shareText.email', - defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com', - }, - shareTextTwitter: { - id: 'feature.desktopCapturer.shareText.twitter', - defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @FranzMessenger', + shareSourceText: { + id: 'feature.desktopCapturer.shareSourceText', + defaultMessage: '!!!Share {name}', }, }); @@ -87,8 +67,6 @@ export default @injectSheet(styles) @inject('stores') @observer class DesktopCap if (!state.selectedSource && state.sources.length > 0) { state.selectedSource = state.sources.filter(source => source.displayId)[0].id; } - - console.log('sources', sources); } close() { @@ -119,7 +97,6 @@ export default @injectSheet(styles) @inject('stores') @observer class DesktopCap <H1 className={classes.headline}> {intl.formatMessage(messages.headline)} </H1> - <p>{intl.formatMessage(messages.text)}</p> <div className={classes.sourcesContainer}> {(sources.filter(source => source.displayId) || []).map(source => ( <SourceItem @@ -144,7 +121,7 @@ export default @injectSheet(styles) @inject('stores') @observer class DesktopCap </div> <div> <Button - label={`Share ${sharedSource ? sharedSource.name : 'Select source'}`} + label={sharedSource ? intl.formatMessage(messages.shareSourceText, { name: sharedSource.name }) : intl.formatMessage(messages.shareSourceTextDisabled)} className={classes.cta} onClick={() => { shareSourceWithClientWebview();
6
diff --git a/devtools/lightning-inspect.js b/devtools/lightning-inspect.js @@ -661,6 +661,18 @@ window.attachInspector = function({Element, ElementCore, Stage, Component, Eleme } }); + Element.prototype.$testId = null; + Object.defineProperty(Element.prototype, 'testId', { + get: function() { + return this.$testId; + }, + set: function(v) { + if (this.$testId !== v) { + this.$testId = v; + val(this, 'data-testid', v, null); + } + } + }); var checkColors = function(elementRenderer) { let element = elementRenderer._element;
0
diff --git a/src/views/dashboard/index.js b/src/views/dashboard/index.js @@ -146,6 +146,16 @@ class DashboardPure extends Component { </Column> </AppViewWrapper> ); + } else { + return ( + <AppViewWrapper> + <Head title={title} description={description} /> + <Titlebar noComposer /> + <Column type="primary" alignItems="center"> + <UpsellToReload /> + </Column> + </AppViewWrapper> + ); } } }
1
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js @@ -2,12 +2,6 @@ const path = require( 'path' ); const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); const mainConfig = require( '../webpack.config' ); const mapValues = require( 'lodash/mapValues' ); -const FeatureFlagsPlugin = require( 'webpack-feature-flags-plugin' ); - -/** - * Internal dependencies - */ -const flagsConfig = require( '../webpack.feature-flags.config' ); module.exports = async ( { config } ) => { // Site Kit loads its API packages as externals, @@ -31,13 +25,6 @@ module.exports = async ( { config } ) => { config.plugins = [ ...config.plugins, new MiniCssExtractPlugin(), - new FeatureFlagsPlugin( - flagsConfig, - { - modes: [ 'development', 'production' ], - mode: config.mode, - }, - ), ]; config.module.rules.push(
2
diff --git a/src/data/_contributors.yaml b/src/data/_contributors.yaml @@ -550,8 +550,7 @@ jennygove: given: Jenny family: Gove description: - en: > - Jenny Gove is a UX Research Lead at Google, where she conducts research + en: Jenny Gove is a UX Research Lead at Google, where she conducts research on smartphone experiences. She obtained her PhD from the University of Southampton, UK.
1
diff --git a/provision.go b/provision.go @@ -256,6 +256,17 @@ func (ctx *workflowContext) rollback() { // Private - START // +// userGoPath returns either $GOPATH or the new $HOME/go path +// introduced with Go 1.8 +func userGoPath() string { + gopath := os.Getenv("GOPATH") + if gopath == "" { + home := os.Getenv("HOME") + gopath = filepath.Join(home, "go") + } + return gopath +} + // Encapsulate calling a workflow hook func callWorkflowHook(hook WorkflowHook, ctx *workflowContext) error { if nil == hook { @@ -557,7 +568,7 @@ func buildGoBinary(executableOutput string, return gopathVersionErr } - gopath := os.ExpandEnv("$GOPATH") + gopath := userGoPath() containerGoPath := "/usr/src/gopath" // Get the package path in the current directory // so that we can it to the container path
9
diff --git a/js/core/bis_fileserverclient.js b/js/core/bis_fileserverclient.js @@ -78,20 +78,24 @@ class BisFileServerClient extends BisBaseServerClient { //add the event listeners for the control port let closeEvent = this.socket.addEventListener('close', () => { - console.log('Socket closing'); + console.log('---- Socket closing'); + if (this.authenticatingEvent) { + let id=this.authenticatingEvent.id; + bisasyncutil.rejectServerEvent(id,'failure to authenticate'); + } }); // Handle Data From Server let messageEvent = this.socket.addEventListener('message', (event) => { this.handleServerResponse(event); + this.hostname=address; }); let errorEvent = this.socket.addEventListener('error', (event) => { - console.log('error event', event); this.alertEvent('Failed to connect to server: '+address+'. It may not exist.',true); - this.socket=removeEventListener('close', closeEvent); - this.socket=removeEventListener('message', messageEvent); - this.socket=removeEventListener('error', errorEvent); + this.socket.removeEventListener('close', closeEvent); + this.socket.removeEventListener('message', messageEvent); + this.socket.removeEventListener('error', errorEvent); this.socket=null; }); @@ -242,7 +246,7 @@ class BisFileServerClient extends BisBaseServerClient { */ authenticate(password='',hostname=null) { - password = password || ''; + this.password = password || ''; hostname = hostname || 'ws://localhost:8081'; if (this.authenticated) @@ -262,7 +266,6 @@ class BisFileServerClient extends BisBaseServerClient { this.authenticatingEvent=bisasyncutil.addServerEvent(successCB,failureCB,'authenticate'); if (password.length>0 || this.hasGUI===false) { - this.password=password || ''; this.connectToServer(hostname); } else { // Useless if no GUI @@ -511,7 +514,14 @@ class BisFileServerClient extends BisBaseServerClient { this.initiateDataUploadHandshakeAndGetPort(metadata).then( (port) => { - let server=`ws://localhost:${port}`; + let server=this.hostname || null; + if (server) { + let ind=server.lastIndexOf(":"); + server=server.substr(0,ind)+`:${port}`; + } else { + server=`ws://localhost:${port}`; + } + if (verbose) console.log("Connecting to data server ",server);
11
diff --git a/doc/gh-pages.template.md b/doc/gh-pages.template.md @@ -3,7 +3,7 @@ layout: default description: "PowerTip is a jQuery plugin for creating smooth, modern tooltips." --- -PowerTip features a very flexible design that is easy to customize, gives you a number of different ways to use the tooltips, has APIs for developers, and supports adding complex data to tooltips. It is being actively developed and maintained, and provides a very fluid user experience. +PowerTip is a jQuery tooltip plugin with a smooth user experience that features a very flexible design which is easy to customize, gives you a variety of different ways to create tooltips, supports adding complex data to tooltips, and has a robust API for developers seeking greater integration with their web applications. <p id="buttons"> <a href="https://github.com/stevenbenner/jquery-powertip/releases/download/v<%= pkg.version %>/jquery.powertip-<%= pkg.version %>.zip" class="button" id="download-link">Download v<%= pkg.version %></a>
7
diff --git a/articles/api/authentication/_passwordless.md b/articles/api/authentication/_passwordless.md @@ -30,6 +30,7 @@ curl --request POST \ ``` ```javascript +// Script uses auth0.js v8. See Remarks for details. <script src="${auth0js_urlv8}"></script> <script type="text/javascript"> var webAuth = new auth0.WebAuth({ @@ -38,10 +39,31 @@ curl --request POST \ }); </script> +// Send a verification code using email webAuth.passwordlessStart({ - connection: 'Username-Password-Authentication', - send: 'code', // code or link - email: '[email protected]' // either send an email param or a phoneNumber param + connection: 'email', + send: 'code', + email: 'USER_EMAIL' + }, function (err,res) { + // handle errors or continue + } +); + +// Send a link using email +webAuth.passwordlessStart({ + connection: 'email', + send: 'link', + email: 'USER_EMAIL' + }, function (err,res) { + // handle errors or continue + } +); + +// Send a verification code using SMS +webAuth.passwordlessStart({ + connection: 'sms', + send: 'code', + phoneNumber: 'USER_PHONE_NUMBER' }, function (err,res) { // handle errors or continue } @@ -80,6 +102,7 @@ You have three options for [passwordless authentication](/connections/passwordle ### Remarks - If you sent a verification code, using either email or SMS, after you get the code, you have to authenticate the user using the [/oauth/ro endpoint](#authenticate-user), using `email` or `phone_number` as the `username`, and the verification code as the `password`. +- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7). ### Error Codes @@ -121,6 +144,7 @@ curl --request POST \ ``` ```javascript +// Script uses auth0.js v8. See Remarks for details. <script src="${auth0js_urlv8}"></script> <script type="text/javascript"> var webAuth = new auth0.WebAuth({ @@ -129,10 +153,31 @@ curl --request POST \ }); </script> +// Verify code sent via email webAuth.passwordlessVerify({ connection: 'email', - email: '[email protected]', - verificationCode: '389945' + email: 'USER_EMAIL', + verificationCode: 'VERIFICATION_CODE_SENT' + }, function (err,res) { + // handle errors or continue + } +); + +// Verify code sent within link using email +webAuth.passwordlessVerify({ + connection: 'email', + email: 'USER_EMAIL', + verificationCode: 'VERIFICATION_CODE_SENT_WITHIN_LINK' + }, function (err,res) { + // handle errors or continue + } +); + +// Verify code sent via SMS +webAuth.passwordlessVerify({ + connection: 'sms', + phoneNumber: 'USER_PHONE_NUMBER', + verificationCode: 'VERIFICATION_CODE_SENT' }, function (err,res) { // handle errors or continue } @@ -180,6 +225,7 @@ Once you have a verification code, use this endpoint to login the user with thei - The `profile` scope value requests access to the End-User's default profile Claims, which are: `name`, `family_name`, `given_name`, `middle_name`, `nickname`, `preferred_username`, `profile`, `picture`, `website`, `gender`, `birthdate`, `zoneinfo`, `locale`, and `updated_at`. - The `email` scope value requests access to the `email` and `email_verified` Claims. +- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7). ### Error Codes
0
diff --git a/src/core/operations/Substitute.mjs b/src/core/operations/Substitute.mjs @@ -20,7 +20,7 @@ class Substitute extends Operation { this.name = "Substitute"; this.module = "Default"; - this.description = "A substitution cipher allowing you to specify bytes to replace with other byte values. This can be used to create Caesar ciphers but is more powerful as any byte value can be substituted, not just letters, and the substitution values need not be in order.<br><br>Enter the bytes you want to replace in the Plaintext field and the bytes to replace them with in the Ciphertext field.<br><br>Non-printable bytes can be specified using string escape notation. For example, a line feed character can be written as either <code>\n</code> or <code>\x0a</code>.<br><br>Byte ranges can be specified using a hyphen. For example, the sequence <code>0123456789</code> can be written as <code>0-9</code>."; + this.description = "A substitution cipher allowing you to specify bytes to replace with other byte values. This can be used to create Caesar ciphers but is more powerful as any byte value can be substituted, not just letters, and the substitution values need not be in order.<br><br>Enter the bytes you want to replace in the Plaintext field and the bytes to replace them with in the Ciphertext field.<br><br>Non-printable bytes can be specified using string escape notation. For example, a line feed character can be written as either <code>\\n</code> or <code>\\x0a</code>.<br><br>Byte ranges can be specified using a hyphen. For example, the sequence <code>0123456789</code> can be written as <code>0-9</code>.<br><br>Note that blackslash characters are used to escape special characters, so will need to be escaped themselves if you want to use them on their own (e.g.<code>\\\\</code>)."; this.infoURL = "https://wikipedia.org/wiki/Substitution_cipher"; this.inputType = "string"; this.outputType = "string";
3
diff --git a/src/web/widgets/Console/Terminal.jsx b/src/web/widgets/Console/Terminal.jsx @@ -149,6 +149,22 @@ class Terminal extends PureComponent { const focus = false; this.term.open(el, focus); + // Fix an issue that caused the vertical scrollbar unclickable + // @see https://github.com/sourcelair/xterm.js/issues/512 + const viewport = el.querySelector('.terminal .xterm-viewport'); + if (viewport) { + viewport.style.overflowY = 'scroll'; + } + const rows = el.querySelector('.terminal .xterm-rows'); + if (rows) { + const scrollbarWidth = this.getScrollbarWidth() || 0; + rows.style.position = 'absolute'; + rows.style.top = '0px'; + rows.style.right = `${scrollbarWidth}px`; + rows.style.left = '5px'; + rows.style.overflow = 'hidden'; + } + setTimeout(() => { this.resize(); }, 0); @@ -175,6 +191,30 @@ class Terminal extends PureComponent { this.resize(); }, 0); } + // http://www.alexandre-gomes.com/?p=115 + getScrollbarWidth() { + const inner = document.createElement('p'); + inner.style.width = '100%'; + inner.style.height = '200px'; + + const outer = document.createElement('div'); + outer.style.position = 'absolute'; + outer.style.top = '0px'; + outer.style.left = '0px'; + outer.style.visibility = 'hidden'; + outer.style.width = '200px'; + outer.style.height = '150px'; + outer.style.overflow = 'hidden'; + outer.appendChild(inner); + + document.body.appendChild(outer); + const w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + const w2 = (w1 === inner.offsetWidth) ? outer.clientWidth : inner.offsetWidth; + document.body.removeChild(outer); + + return (w1 - w2); + } resize() { if (!(this.term && this.term.element)) { return;
1
diff --git a/source/guides/references/configuration.md b/source/guides/references/configuration.md @@ -45,7 +45,7 @@ Option | Default | Description ----- | ---- | ---- `fileServerFolder` | root project folder |Path to folder where application files will attempt to be served from `fixturesFolder` | `cypress/fixtures` | Path to folder containing fixture files (Pass `false` to disable) -`ignoreTestFiles` | `*.hot-update.js` | A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses `minimatch` with the options: `{dot: true, matchBase: true}`. We suggest using {% url "http://globtester.com" http://globtester.com %} to test what files would match. +`ignoreTestFiles` | `*.hot-update.js` | A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses `minimatch` with the options: `{dot: true, matchBase: true}`. We suggest using {% url "https://globster.xyz" https://globster.xyz %} to test what files would match. `integrationFolder` | `cypress/integration` | Path to folder containing integration test files `pluginsFile` | `cypress/plugins/index.js` | Path to plugins file. (Pass `false` to disable) `screenshotsFolder` | `cypress/screenshots` | Path to folder where screenshots will be saved from {% url `cy.screenshot()` screenshot %} command or after a test fails during `cypress run`
14
diff --git a/src/content/id/fundamentals/getting-started/codelabs/your-first-pwapp/index.md b/src/content/id/fundamentals/getting-started/codelabs/your-first-pwapp/index.md @@ -4,6 +4,7 @@ description: Dalam codelab ini, Anda akan membangun sebuah Aplikasi Web Progresi translators: - abdsomad +{# wf_auto_generated #} {# wf_updated_on: 2016-10-10T14:59:33Z #} {# wf_published_on: 2016-01-01 #}
8
diff --git a/src/lib/stringUtil.js b/src/lib/stringUtil.js export function trimToMaxLength(string, maxLength) { + if ((string === undefined) || (string === null)) { + return string; // is this right, or should we return empty string? + } if (string.length < maxLength) { return string; }
9
diff --git a/articles/extensions/account-link.md b/articles/extensions/account-link.md @@ -16,8 +16,6 @@ The **Account Link** extension prompts users that may have created a second acco To install this extension, click on the __Account Link__ box in the list of provided extensions on the [Extensions](${manage_url}/#/extensions) page of the dashboard. The __Install Extension__ window will open. -![Install Account Link Extension](/media/articles/extensions/account-link/install-extension.png) - The extension will create a new **Application** named `auth0-account-link` to use internally and a new **Rule** to redirect users to the extension if they login with a new account that has an email matching an existing account. This application needs to have enabled all the connections that you want to perform account linking with. ## Setup
2
diff --git a/source/core/RegExp.js b/source/core/RegExp.js A regular expression for detecting an email address. */ -RegExp.email = /\b([\w.%+-]+@(?:[\w-]+\.)+[A-Z]{2,})\b/i; +RegExp.email = /\b([\w.%+-]+@(?:[a-z0-9-]+\.)+[a-z]{2,})\b/i; /** Property: RegExp.url
7
diff --git a/tests/phpunit/integration/Core/Tracking/REST_Tracking_Consent_ControllerTest.php b/tests/phpunit/integration/Core/Tracking/REST_Tracking_Consent_ControllerTest.php @@ -37,13 +37,13 @@ class REST_Tracking_Consent_ControllerTest extends TestCase { public function test_register() { $tracking_consent_mock = $this->getTrackingConsentMock( array( 'register', 'get' ) ); $tracking_consent_mock->expects( $this->once() )->method( 'register' ); - $REST_Controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); - $this->force_set_property( $REST_Controller, 'consent', $tracking_consent_mock ); + $controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); + $this->force_set_property( $controller, 'consent', $tracking_consent_mock ); remove_all_filters( 'googlesitekit_apifetch_preload_paths' ); remove_all_filters( 'googlesitekit_rest_routes' ); - $REST_Controller->register(); + $controller->register(); $this->assertTrue( has_filter( 'googlesitekit_apifetch_preload_paths' ) ); $this->assertTrue( has_filter( 'googlesitekit_rest_routes' ) ); @@ -51,7 +51,7 @@ class REST_Tracking_Consent_ControllerTest extends TestCase { public function test_unauthorized_get_request() { $controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); - $REST_Controller->register(); + $controller->register(); $request = new WP_REST_Request( WP_REST_Server::READABLE, '/' . REST_Routes::REST_ROOT . '/core/user/data/tracking' ); $response = rest_get_server()->dispatch( $request ); @@ -62,8 +62,8 @@ class REST_Tracking_Consent_ControllerTest extends TestCase { } public function test_read_tracking_status_from_rest_api() { - $REST_Controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); - $REST_Controller->register(); + $controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); + $controller->register(); // Create a user with access to the WP REST API and log in. $user = $this->factory()->user->create_and_get( array( 'role' => 'administrator' ) ); @@ -79,8 +79,8 @@ class REST_Tracking_Consent_ControllerTest extends TestCase { } public function test_unauthorized_post_request() { - $REST_Controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); - $REST_Controller->register(); + $controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); + $controller->register(); $request = new WP_REST_Request( WP_REST_Server::CREATABLE, @@ -104,8 +104,8 @@ class REST_Tracking_Consent_ControllerTest extends TestCase { } public function test_modify_status_of_tracking() { - $REST_Controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); - $REST_Controller->register(); + $controller = new REST_Tracking_Consent_Controller( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) ); + $controller->register(); // Create a user with access to the WP REST API and log in. $user = $this->factory()->user->create_and_get( array( 'role' => 'administrator' ) );
10
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -61,6 +61,8 @@ const animationsSelectMap = { 'sword and shield slash.fbx': new THREE.Vector3(0, Infinity, 0), 'sword and shield attack (4).fbx': new THREE.Vector3(0, Infinity, 0), 'One Hand Sword Combo.fbx': new THREE.Vector3(0, Infinity, 0), + 'magic standing idle.fbx': new THREE.Vector3(0, Infinity, 0), + 'Skateboarding.fbx': new THREE.Vector3(0, Infinity, 0), 'Throw.fbx': new THREE.Vector3(0, Infinity, 0), }; const animationsDistanceMap = { @@ -99,6 +101,8 @@ const animationsDistanceMap = { 'sword and shield slash.fbx': new THREE.Vector3(0, Infinity, 0), 'sword and shield attack (4).fbx': new THREE.Vector3(0, Infinity, 0), 'One Hand Sword Combo.fbx': new THREE.Vector3(0, Infinity, 0), + 'magic standing idle.fbx': new THREE.Vector3(0, Infinity, 0), + 'Skateboarding.fbx': new THREE.Vector3(0, Infinity, 0), 'Throw.fbx': new THREE.Vector3(0, Infinity, 0), }; let animations; @@ -138,6 +142,8 @@ let animations; `sword and shield slash.fbx`, `sword and shield attack (4).fbx`, `One Hand Sword Combo.fbx`, + `magic standing idle.fbx`, + `Skateboarding.fbx`, `Throw.fbx`, ]; for (const name of animationFileNames) { @@ -295,6 +301,7 @@ const loadPromise = (async () => { // animation.isHit = /slash/i.test(animation.name); // animation.isHit = /attack/i.test(animation.name); animation.isHit = /combo/i.test(animation.name); + // animation.isMagic = /magic/i.test(animation.name); animation.isForward = /forward/i.test(animation.name); animation.isBackward = /backward/i.test(animation.name); animation.isLeft = /left/i.test(animation.name);
0
diff --git a/package.json b/package.json "scripts": { "bootstrap": "lerna bootstrap", "clean:all": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules", + "clean:install": "npm run clean:all && npm install", "clean:obsolete-snapshots": "npm test -- -u", "compile": "lerna run compile", "deploy": "lerna run --scope terra-site deploy", + "jest": "jest", + "jest:coverage": "jest --coverage", "lint": "npm run lint:js && npm run lint:scss", "lint:js": "eslint --ext .js,.jsx .", "lint:scss": "lerna run lint:scss", - "jest": "jest", - "jest:coverage": "jest --coverage", + "prepush": "node scripts/prepush/index.js", "pretest": "npm run lint", - "preinstall": "npm run clean:all", "postinstall": "npm run bootstrap", + "start": "cd packages/terra-site && npm run start", "test": "lerna exec --concurrency 1 npm run test:spec && npm run test:nightwatch-default", - "test:nightwatch-default": "node ./packages/terra-toolkit/lib/scripts/nightwatch-process.js --env default-tiny,default-small,default-medium,default-large,default-huge,default-enormous", - "prepush": "node scripts/prepush/index.js", - "start": "cd packages/terra-site && npm run start" + "test:nightwatch-default": "node ./packages/terra-toolkit/lib/scripts/nightwatch-process.js --env default-tiny,default-small,default-medium,default-large,default-huge,default-enormous" }, "devDependencies": { "babel-cli": "^6.18.0",
10
diff --git a/server/fetchdata.js b/server/fetchdata.js @@ -7,7 +7,7 @@ const fs = require('fs'); const mkdirp = require('mkdirp'); const path = require('path'); -var apiUrl = 'https://fiveringsdb.com/'; +var apiUrl = 'https://api.fiveringsdb.com/'; function fetchImage(urlPath, id, imagePath, timeout) { setTimeout(function() {
3
diff --git a/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-number/input-number-dialog-content.js b/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-number/input-number-dialog-content.js @@ -106,7 +106,7 @@ module.exports = CoreView.extend({ _updateRangeValue: function () { if (this.model.get('fixed') !== null && this.model.get('fixed') !== undefined && this.model.get('attribute')) { var editorAttrs = this.options.editorAttrs; - var range = (editorAttrs && this.options.editorAttrs.defaultRange) || [this.model.get('fixed'), this.model.get('fixed')]; + var range = (editorAttrs && editorAttrs.defaultRange) || [this.model.get('fixed'), this.model.get('fixed')]; this.model.set('range', range); this.model.unset('fixed'); }
2
diff --git a/src/components/validationStatus.vue b/src/components/validationStatus.vue <span class="validation-container__list--id">{{ error.id }}</span> <span class="validation-container__list--message"> <span class="validation-container__list--key">{{ error.errorKey }}</span> - <span>{{ error.message }}</span> + <div>{{ error.message }}</div> </span> <span class="validation-container__list--errorCategory" :style="[ error.category === 'error' @@ -85,6 +85,8 @@ $primary-white: #F0F3F7; $seconadry-grey: #555555; $border-color: #aaaaaa; $text-size-sm: 0.85rem; +$id-container-width: 5rem; +$message-container-width: 18rem; $validation-container-height: 20rem; $validation-container-width: 28rem; $status-bar-container-height: 2.5rem; @@ -115,6 +117,7 @@ $warning-color: #F0AD4E; overflow: scroll; margin-bottom: 2.5rem; border: 1px solid $border-color; + text-align: left; &__defaultMessage { display: flex; @@ -125,21 +128,21 @@ $warning-color: #F0AD4E; } &__list { - display: flex; - justify-content: space-between; + display: grid; + grid-template-columns: $id-container-width $message-container-width 1fr; padding: 1rem; + &--id { + color: $seconadry-grey; + text-transform: none; + } + &--message { - display: flex; - align-items: flex-start; - flex-direction: column; text-transform: capitalize; } &--errorCategory { - display: flex; - align-items: center; - justify-content: center; + justify-self: center; color: $primary-white; border-radius: 0.75rem; height: $message-label-pill-width; @@ -151,10 +154,6 @@ $warning-color: #F0AD4E; font-weight: 700; } - &--id { - color: $seconadry-grey; - text-transform: none; - } } .label-background-warning { background-color: $warning-color;
14
diff --git a/src/kiri/init.js b/src/kiri/init.js if (id) loadSettingsFromServer(id); }); break; - case cca('s'): // complete slice + case cca('S'): // slice + case cca('s'): // slice + if (evt.shiftKey) { + API.show.alert('CAPS lock on?'); + } API.function.slice(); break; - case cca('p'): // prepare print + case cca('P'): // prepare + case cca('p'): // prepare + if (evt.shiftKey) { + API.show.alert('CAPS lock on?'); + } if (API.mode.get() !== 'SLA') { // hidden in SLA mode API.function.print(); } break; - case cca('P'): // position widget - positionSelection(); + case cca('X'): // export + case cca('x'): // export + if (evt.shiftKey) { + API.show.alert('CAPS lock on?'); + } + API.function.export(); break; - case cca('r'): // recent files - API.modal.show('files'); + case cca('o'): // position widget + positionSelection(); break; - case cca('R'): // position widget + case cca('O'): // position widget rotateInputSelection(); break; - case cca('x'): // export print - API.function.export(); + case cca('r'): // recent files + API.modal.show('files'); break; case cca('q'): // preferences API.modal.show('prefs');
9
diff --git a/modules/Layout.js b/modules/Layout.js @@ -164,7 +164,7 @@ function Layout(layout, options) { // Handler for touch events function touchHandler(l,e) { - if (l.type=="btn" && l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) { + if (l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) { if (e.type==2 && l.cbl) l.cbl(e); else if (l.cb) l.cb(e); } if (l.c) l.c.forEach(n => touchHandler(n,e));
11
diff --git a/src/VR.js b/src/VR.js @@ -406,14 +406,14 @@ class FakeVRDisplay extends MRDisplay { get depthNear() { return GlobalContext.xrState.depthNear[0]; } - set depthNear(depthNear) {} + set depthNear(depthNear) { + GlobalContext.xrState.depthNear[0] = depthNear; + } get depthFar() { return GlobalContext.xrState.depthFar[0]; } - set depthFar(depthFar) {} - - getState() { - return GlobalContext.xrState; + set depthFar(depthFar) { + GlobalContext.xrState.depthFar[0] = depthFar; } /* setSize(width, height) {
11
diff --git a/README.md b/README.md @@ -146,5 +146,5 @@ Authors and contributors are listed in the [AUTHORS.en.txt][8] file. [4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options [5]: https://highlightjs.org/download/ [6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html -[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE -[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt +[7]: https://github.com/highlightjs/highlight.js/blob/master/LICENSE +[8]: https://github.com/highlightjs/highlight.js/blob/master/AUTHORS.en.txt
1
diff --git a/packages/vulcan-accounts/imports/ui/components/LoginFormInner.jsx b/packages/vulcan-accounts/imports/ui/components/LoginFormInner.jsx @@ -33,20 +33,21 @@ export class AccountsLoginFormInner extends TrackerComponent { const resetStoreAndThen = hook => { return () => { - props.client.resetStore(); + props.client.resetStore().then(() => { hook(); + }) } } const postLogInAndThen = hook => { return () => { - props.client.resetStore(); - + props.client.resetStore().then(() => { if(Callbacks['users.postlogin']) { // execute any post-sign-in callbacks runCallbacks('users.postlogin'); } else { // or else execute the hook hook(); } + }) } }
1
diff --git a/server/game/cards/15-DotE/Bribery.js b/server/game/cards/15-DotE/Bribery.js @@ -7,19 +7,27 @@ class Bribery extends DrawCard { cost: ability.costs.payXGold(() => this.getMinXValue(), () => 99), target: { cardCondition: (card, context) => ( - card.isMatch({ location: 'play area', type: 'character', kneeled: false }) && - (!context.xValue || card.getPrintedCost() <= context.xValue) - ), - gameAction: 'kneel' + card.isMatch({ location: 'play area', type: 'character' }) && + (!context.xValue || card.getPrintedCost() <= context.xValue) && + ( + card.isMatch({ kneeled: false }) && card.allowGameAction('kneel') || + card.isMatch({ trait: ['Ally', 'Mercenary'] }) + ) + ) }, handler: context => { + const buttons = []; + this.context = context; + if(!context.target.kneeled && context.target.allowGameAction('kneel')) { + buttons.push({ text: 'Kneel', method: 'kneelCharacter' }); + } + if(context.target.hasTrait('Ally') || context.target.hasTrait('Mercenary')) { - let buttons = [ - { text: 'Kneel', method: 'kneelCharacter' }, - { text: 'Take control', method: 'takeControl' } - ]; + buttons.push({ text: 'Take control', method: 'takeControl' }); + } + if(buttons.length > 1) { this.game.promptWithMenu(context.player, this, { activePrompt: { menuTitle: 'Take control of character?', @@ -28,14 +36,17 @@ class Bribery extends DrawCard { source: this }); } else { - this.kneelCharacter(context.player); + this[buttons[0].method](context.player); } } }); } getMinXValue() { - const characters = this.game.filterCardsInPlay(card => card.isMatch({ type: 'character', kneeled: false })); + const characters = this.game.filterCardsInPlay(card => ( + card.isMatch({ type: 'character', kneeled: false })) || + card.isMatch({ type: 'character', trait: ['Ally', 'Mercenary'] }) + ); const costs = characters.map(card => card.getPrintedCost()); return Math.min(...costs); }
11
diff --git a/src/manage/index.js b/src/manage/index.js import React from 'react' -import { Dummy as Navigation, Dummy as Sidebar, Dummy as Main } from './dummy-components' +import { Dummy as Navigation, Dummy as Sidebar } from './dummy-components' +import { Heading1 } from '../components' + +const Main = () => ( + <div> + <Heading1>Default App</Heading1> + </div> +) export default () => ( <div>
4
diff --git a/src/components/controls/controls.vue b/src/components/controls/controls.vue :class="[{ 'ignore-pointer': canvasDragPosition, 'controls-column-compressed' : compressed }]" data-test="controls-column" > - <b-card no-body class="controls rounded-0 border-top-0 border-bottom-0 border-left-0" - :style="{ height: parentHeight }" - > - <b-input-group size="sm" v-show="!compressed"> - <b-input-group-prepend> - <span class="input-group-text border-left-0 border-top-0 rounded-0"><i class="fas fa-filter" /></span> - </b-input-group-prepend> - - <b-form-input ref="filter" - :placeholder="$t('Filter Controls')" - class="border-top-0 border-right-0 rounded-0" - type="text" - v-model="filterQuery" - /> - </b-input-group> - + <b-card no-body class="controls rounded-0 border-top-0 border-bottom-0 border-left-0" :style="{ height: parentHeight }"> <b-list-group flush class="overflow-auto w-auto" :class="{ 'd-flex align-items-center': compressed }"> <b-list-group-item v-for="(control, index) in controls" </div> </b-list-group-item> </b-list-group> - </b-card> </b-col> </template> @@ -59,7 +43,6 @@ export default { }, data() { return { - filterQuery: '', draggingElement: null, draggingControl: null, xOffset: null, @@ -70,7 +53,6 @@ export default { controls() { return this.nodeTypes .filter(nodeType => nodeType.control) - .filter(nodeType => nodeType.label.toLowerCase().includes(this.filterQuery.toLowerCase())) .map(nodeType => ({ type: nodeType.id, icon: nodeType.icon,
2
diff --git a/app/addons/documents/mango/components/ExecutionStats.js b/app/addons/documents/mango/components/ExecutionStats.js @@ -29,9 +29,12 @@ export default class ExecutionStats extends React.Component { return Math.floor(seconds) + ' seconds'; } const minutes = Math.floor(seconds / 60); - seconds = seconds - (minutes * 60); + seconds = Math.floor(seconds - (minutes * 60)); - return minutes + 'minute, ' + seconds + 'seconds'; + const minuteText = minutes > 1 ? 'minutes' : 'minute'; + const secondsText = seconds > 1 ? 'seconds' : 'second'; + + return [minutes, ' ', minuteText, ', ', seconds, ' ', secondsText].join(''); } getWarning(executionStats, warning) { @@ -70,7 +73,7 @@ export default class ExecutionStats extends React.Component { {this.executionStatsLine("documents examined", executionStats.total_docs_examined)} {this.executionStatsLine("documents examined (quorum)", executionStats.total_quorum_docs_examined)} {this.executionStatsLine("results returned", executionStats.results_returned, true)} - {this.executionStatsLine("execution time", executionStats.execution_time_ms, false, "ms")} + {this.executionStatsLine("execution time", Math.round(executionStats.execution_time_ms), false, "ms")} </div> ); }
7
diff --git a/scss/elements/_tip.scss b/scss/elements/_tip.scss @@ -45,7 +45,7 @@ $siimple-tip-background: $siimple-grey-2; @each $color, $value in $siimple-default-colors { &#{&}--#{$color} { - background-color: $value; + border-left-color: $value; } &#{&}--#{$color}::before { background-color: $value; @@ -58,7 +58,7 @@ $siimple-tip-background: $siimple-grey-2; &--question::before { content: "?"; } - &--heart { + &--heart::before { content: "\2764"; } }
1
diff --git a/token-metadata/0x8a854288a5976036A725879164Ca3e91d30c6A1B/metadata.json b/token-metadata/0x8a854288a5976036A725879164Ca3e91d30c6A1B/metadata.json "symbol": "GET", "address": "0x8a854288a5976036A725879164Ca3e91d30c6A1B", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/app/src/components/Sidebar.tsx b/packages/app/src/components/Sidebar.tsx @@ -27,16 +27,22 @@ const sidebarMinWidth = 240; const sidebarMinimizeWidth = 20; const sidebarFixedWidthInDrawerMode = 320; +const isSwrDataLoading = (swrData: any, swrError: Error | undefined) => { + return swrError == null && swrData === undefined; +}; const GlobalNavigation = () => { const SidebarNav = dynamic(() => import('./Sidebar/SidebarNav').then(mod => mod.SidebarNav), { ssr: false }); - const { data: isDrawerMode } = useDrawerMode(); - const { data: currentContents } = useCurrentSidebarContents(); - const { data: isCollapsed, mutate: mutateSidebarCollapsed } = useSidebarCollapsed(); + const { data: isDrawerMode, error: errorIsDrawerMode } = useDrawerMode(); + const { data: currentContents, error: errorCurrentContents } = useCurrentSidebarContents(); + const { data: isCollapsed, error: errorIsCollapsed, mutate: mutateSidebarCollapsed } = useSidebarCollapsed(); const { scheduleToPut } = useUserUISettings(); - const [isClient, setIsClient] = useState(false); + const isLoadingIsDrawerMode = isSwrDataLoading(isDrawerMode, errorIsDrawerMode); + const isLoadingCurrentContents = isSwrDataLoading(currentContents, errorCurrentContents); + const isLoadingIsCollapsed = isSwrDataLoading(isCollapsed, errorIsCollapsed); + const isLoading = isLoadingIsDrawerMode || isLoadingCurrentContents || isLoadingIsCollapsed; const itemSelectedHandler = useCallback((selectedContents) => { if (isDrawerMode) { @@ -57,21 +63,9 @@ const GlobalNavigation = () => { }, [currentContents, isCollapsed, isDrawerMode, mutateSidebarCollapsed, scheduleToPut]); - useEffect(() => { - // Change content in side effect to avoid error thrown by having different rendered content between the server and the client. - // https://en.reactjs.org/docs/react-dom.html#hydrate - // > ReactDOM.hydrate expects that the rendered content is identical between the server and the client. - setIsClient(true); - }, []); - - const SidebarNavElem = () => { - if (isClient) { - return <SidebarNav onItemSelected={itemSelectedHandler} />; - } - return <SidebarNavSkeleton/>; - }; - - return SidebarNavElem(); + return isLoading + ? <SidebarNavSkeleton/> + : <SidebarNav onItemSelected={itemSelectedHandler} />; };
4
diff --git a/content/guides/references/migration-guide.md b/content/guides/references/migration-guide.md @@ -1294,7 +1294,7 @@ result of each test retry. "state": "failed", "body": "function () {\n expect(true).to.be["false"];\n}", "stack": "AssertionError: expected true to be false\n' + - ' at Context.eval (...cypress/e2e/spec.js:5:21", + ' at Context.eval (...cypress/integration/spec.js:5:21", "error": "expected true to be false", "timings": { "lifecycle": 16, @@ -1334,14 +1334,14 @@ result of each test retry. "state": "failed", "body": "function () {\n expect(true).to.be["false"];\n}", "displayError": "AssertionError: expected true to be false\n' + - ' at Context.eval (...cypress/e2e/spec.js:5:21", + ' at Context.eval (...cypress/integration/spec.js:5:21", "attempts": [{ "state": "failed", "error": { "message": "expected true to be false", "name": "AssertionError", "stack": "AssertionError: expected true to be false\n' + - ' at Context.eval (...cypress/e2e/spec.js:5:21" + ' at Context.eval (...cypress/integration/spec.js:5:21" }, "screenshots": [{ "name": null, @@ -1511,20 +1511,20 @@ The globals `__dirname` and `__filename` no longer include a leading slash. <Badge type="danger">Before</Badge> `__dirname` / `__filename` ```js -// cypress/e2e/app_spec.js +// cypress/integration/app_spec.js it('include leading slash < 5.0', () => { - expect(__dirname).to.equal('/cypress/e2e') - expect(__filename).to.equal('/cypress/e2e/app_spec.js') + expect(__dirname).to.equal('/cypress/integration') + expect(__filename).to.equal('/cypress/integration/app_spec.js') }) ``` <Badge type="success">After</Badge> `__dirname` / `__filename` ```js -// cypress/e2e/app_spec.js +// cypress/integration/app_spec.js it('do not include leading slash >= 5.0', () => { - expect(__dirname).to.equal('cypress/e2e') - expect(__filename).to.equal('cypress/e2e/app_spec.js') + expect(__dirname).to.equal('cypress/integration') + expect(__filename).to.equal('cypress/integration/app_spec.js') }) ```
13
diff --git a/layouts/articles/single.html b/layouts/articles/single.html {{ end }} </article> -{{ if eq (getenv "HUGO_ENV") "production" | or (eq $.Site.Params.env -"production") }} +{{ if eq (getenv "HUGO_ENV") "production" | or (eq $.Site.Params.env "production") }} <script type="text/javascript"> var HYVOR_TALK_WEBSITE = 5716; var HYVOR_TALK_CONFIG = {
1
diff --git a/types/index.d.ts b/types/index.d.ts @@ -1543,7 +1543,7 @@ declare namespace Knex { references(columnName: string): ReferencingColumnBuilder; onDelete(command: string): ColumnBuilder; onUpdate(command: string): ColumnBuilder; - defaultTo(value: Value): ColumnBuilder; + defaultTo(value: Value | null): ColumnBuilder; unsigned(): ColumnBuilder; notNullable(): ColumnBuilder; nullable(): ColumnBuilder;
11
diff --git a/story.js b/story.js @@ -255,6 +255,9 @@ export const listenHack = () => { let currentFieldMusic = null; let currentFieldMusicIndex = 0; window.document.addEventListener('keydown', async e => { + const inputFocused = document.activeElement && ['INPUT', 'TEXTAREA'].includes(document.activeElement.nodeName); + + if (!inputFocused) { switch (e.which) { case 48: { // 0 await musicManager.waitForLoad(); @@ -298,6 +301,7 @@ export const listenHack = () => { break; } } + } }); window.document.addEventListener('click', async e => {
0
diff --git a/docs/docs.md b/docs/docs.md @@ -37,6 +37,8 @@ note: - include a file named `logo.png` or `logo.jpg` or `logo.svg` in your folder. it will automatically be used on your page. [documentation for logos](docs/guides/writing/#logo) - if you add a promotion, upload an image to your folder, then add it to the promotion block with a link pointing to `/<path>/<to></your></folder>/<imagename>.ext`. **do not use an external link pointing to externally hosted content!** [docs](/docs/guides/writing/#promotion-boxes) +**WARNING:** malformed yaml (incorrect syntax, often indentation-related) currently causes the build process to crash, breaking site updates. **Please verify your yaml is valid** before committing it. https://yamlchecker.com is an easy way to validate the syntax. + ```yaml --- #BASIC INFO
0
diff --git a/local_modules/Settings/Views/SettingsView.web.js b/local_modules/Settings/Views/SettingsView.web.js @@ -246,20 +246,20 @@ class SettingsView extends View const labelLayer = commonComponents_forms.New_fieldTitle_labelLayer("NOTIFY ME WHEN", self.context) div.appendChild(labelLayer) - const notifyFundsComeIn = commonComponents_switchToggles.New_fieldValue_switchToggle({ + const switch_notifyFundsComeIn = commonComponents_switchToggles.New_fieldValue_switchToggle({ name: "notify_when_funds_come_in", note: "Funds come in", border: true, }, self.context) - div.appendChild(notifyFundsComeIn.layer) + div.appendChild(switch_notifyFundsComeIn.layer) - const notifyConfirmedOutgoing = commonComponents_switchToggles.New_fieldValue_switchToggle({ + const switch_notifyConfirmedOutgoing = commonComponents_switchToggles.New_fieldValue_switchToggle({ name: "notify_when_outgoing_tx_confirmed", note: "Outgoing transactions are confirmed", border: false, }, self.context) - div.appendChild(notifyConfirmedOutgoing.layer) + div.appendChild(switch_notifyConfirmedOutgoing.layer) } self.form_containerLayer.appendChild(div) }
10
diff --git a/renderer/components/Channels/ChannelCreateForm.js b/renderer/components/Channels/ChannelCreateForm.js @@ -14,7 +14,7 @@ import { Label, Toggle, TransactionFeeInput, - IntegerInput, + // IntegerInput, } from 'components/Form' import { CryptoValue } from 'containers/UI' import { CurrencyFieldGroup } from 'containers/Form' @@ -313,7 +313,7 @@ class ChannelCreateForm extends React.Component { </> )} - <Flex alignItems="center" justifyContent="space-between" mt={2}> + {/* <Flex alignItems="center" justifyContent="space-between" mt={2}> <Flex> <Span color="gray" fontSize="s" mr={2}> <Padlock /> @@ -333,7 +333,7 @@ class ChannelCreateForm extends React.Component { variant="thin" width={80} /> - </Flex> + </Flex> */} </Box> ) }
13
diff --git a/index.d.ts b/index.d.ts @@ -3022,10 +3022,10 @@ declare module 'mongoose' { export interface Facet { /** [`$facet` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/facet/) */ - $facet: Record<string, FacetPipelineStep[]> + $facet: Record<string, FacetPipelineStage[]> } - export type FacetPipelineStep = Exclude<PipelineStage, PipelineStage.CollStats | PipelineStage.Facet | PipelineStage.GeoNear | PipelineStage.IndexStats | PipelineStage.Out | PipelineStage.Merge | PipelineStage.PlanCacheStats> + export type FacetPipelineStage = Exclude<PipelineStage, PipelineStage.CollStats | PipelineStage.Facet | PipelineStage.GeoNear | PipelineStage.IndexStats | PipelineStage.Out | PipelineStage.Merge | PipelineStage.PlanCacheStats> export interface GeoNear { /** [`$geoNear` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/) */
10
diff --git a/karma.conf.js b/karma.conf.js @@ -10,6 +10,11 @@ module.exports = function (config) { browserName: 'chrome', version: '49' }, + sl_firefox_70: { + base: 'SauceLabs', + browserName: 'firefox', + version: '70' + }, sl_safari_8: { base: 'SauceLabs', browserName: 'safari',
0
diff --git a/app/routerTransition.js b/app/routerTransition.js @@ -19,7 +19,7 @@ import counterpart from "counterpart"; // Actions import PrivateKeyActions from "actions/PrivateKeyActions"; import SettingsActions from "actions/SettingsActions"; -import notify from "actions/NotificationActions"; +import {Notification} from "bitshares-ui-style-guide"; ChainStore.setDispatchFrequency(60); @@ -637,13 +637,11 @@ class RouterTransitioner { console.error("onResetError:", err, failingNodeUrl); this._willTransitionToInProgress = false; this._oldChain = "old"; - notify.addNotification({ + Notification.error({ message: counterpart.translate("settings.connection_error", { url: failingNodeUrl || "", error: err - }), - level: "error", - autoDismiss: 10 + }) }); let apiLatencies = SettingsStore.getState().apiLatencies; delete apiLatencies[failingNodeUrl];
14
diff --git a/src/components/a11y/a11y.js b/src/components/a11y/a11y.js @@ -146,9 +146,9 @@ const A11y = { // Wrapper const $wrapperEl = swiper.$wrapperEl; - const randomWrapperId = `swiper-wrapper-${swiper.a11y.getRandomNumber(16)}`; + const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${swiper.a11y.getRandomNumber(16)}`; let live; - swiper.a11y.addElId($wrapperEl, randomWrapperId); + swiper.a11y.addElId($wrapperEl, wrapperId); if (swiper.params.autoplay && swiper.params.autoplay.enabled) { live = 'off'; @@ -184,7 +184,7 @@ const A11y = { $nextEl.on('keydown', swiper.a11y.onEnterKey); } swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); - swiper.a11y.addElControls($nextEl, randomWrapperId); + swiper.a11y.addElControls($nextEl, wrapperId); } if ($prevEl) { swiper.a11y.makeElFocusable($prevEl); @@ -193,7 +193,7 @@ const A11y = { $prevEl.on('keydown', swiper.a11y.onEnterKey); } swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); - swiper.a11y.addElControls($prevEl, randomWrapperId); + swiper.a11y.addElControls($prevEl, wrapperId); } // Pagination
0
diff --git a/packages/bitcore-wallet-service/src/lib/server.ts b/packages/bitcore-wallet-service/src/lib/server.ts @@ -3865,10 +3865,12 @@ export class WalletService { toAddress: output.address, amount: output.amount }; + if (proposal.outputs) { const txpOut = proposal.outputs.find( o => o.toAddress === output.address && o.amount === output.amount ); output.message = txpOut ? txpOut.message : null; + } }); tx.customData = proposal.customData;
9
diff --git a/index.d.ts b/index.d.ts @@ -334,11 +334,7 @@ declare namespace Moleculer { generateSnapshot(): HistogramMetricSnapshot[]; static generateLinearBuckets(start: number, width: number, count: number): number[]; - static generateExponentialBuckets( - start: number, - factor: number, - count: number - ): number[]; + static generateExponentialBuckets(start: number, factor: number, count: number): number[]; } namespace MetricTypes { @@ -584,7 +580,7 @@ declare namespace Moleculer { call<TResult, TParams>( actionName: string, params: TParams, - opts?: CallingOptions, + opts?: CallingOptions ): Promise<TResult>; mcall<T>( @@ -721,7 +717,11 @@ declare namespace Moleculer { version?: string | number; } - type StartedStoppedHandler = () => Promise<void[]> | Promise<void> | void; + type ServiceSyncLifecycleHandler = <S = ServiceSettingSchema>(this: Service<S>) => void; + type ServiceAsyncLifecycleHandler = <S = ServiceSettingSchema>( + this: Service<S> + ) => void | Promise<void>; + interface ServiceSchema<S = ServiceSettingSchema> { name: string; version?: string | number; @@ -734,9 +734,9 @@ declare namespace Moleculer { hooks?: ServiceHooks; events?: ServiceEvents; - created?: (() => void) | (() => void)[]; - started?: StartedStoppedHandler | StartedStoppedHandler[]; - stopped?: StartedStoppedHandler | StartedStoppedHandler[]; + created?: ServiceSyncLifecycleHandler | ServiceSyncLifecycleHandler[]; + started?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; + stopped?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; [name: string]: any; } @@ -967,6 +967,9 @@ declare namespace Moleculer { options?: GenericObject; } + type BrokerSyncLifecycleHandler = (broker: ServiceBroker) => void; + type BrokerAsyncLifecycleHandler = (broker: ServiceBroker) => void | Promise<void>; + interface BrokerOptions { namespace?: string | null; nodeID?: string | null; @@ -1030,9 +1033,9 @@ declare namespace Moleculer { ContextFactory?: typeof Context; Promise?: PromiseConstructorLike; - created?: (broker: ServiceBroker) => void; - started?: (broker: ServiceBroker) => void; - stopped?: (broker: ServiceBroker) => void; + created?: BrokerSyncLifecycleHandler; + started?: BrokerAsyncLifecycleHandler; + stopped?: BrokerAsyncLifecycleHandler; /** * If true, process.on("beforeExit/exit/SIGINT/SIGTERM", ...) handler won't be registered!
7
diff --git a/src/main/resources/spring.xml b/src/main/resources/spring.xml <property name="applicationContextSchedulerContextKey" value="applicationContext"/> </bean> - <import resource="spring-cacher-redis.xml"/> - <!--<import resource="spring-cacher-ehcache.xml"/>--> + <!--<import resource="spring-cacher-redis.xml"/>--> + <import resource="spring-cacher-ehcache.xml"/> </beans> \ No newline at end of file
12
diff --git a/tools/metadata/test/metadata.ts b/tools/metadata/test/metadata.ts @@ -18,16 +18,6 @@ describe('Metadata: Mainnet', async () => { it('checks that ETH does not exist', async () => { expect(findTokenByAddress(ADDRESS_ZERO, result.tokens)).to.be.undefined }) - it('checks that WETH exists', async () => { - expect(findTokenByAddress(wethAddresses[chainIds.MAINNET], result.tokens)) - .to.not.be.undefined - expect(findTokensBySymbol('WETH', result.tokens)[0].address).to.equal( - wethAddresses[chainIds.MAINNET] - ) - expect(firstTokenBySymbol('WETH', result.tokens).address).to.equal( - wethAddresses[chainIds.MAINNET] - ) - }) }) describe('Metadata: Rinkeby', async () => {
2
diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js @@ -13,12 +13,27 @@ var columnCastTpl = dot.template("date_part('epoch', {{=it.column}})"); var BIN_MIN_NUMBER = 6; var BIN_MAX_NUMBER = 48; +var filteredQueryTpl = dot.template([ + 'filtered_source AS (', + ' SELECT *', + ' FROM ({{=it._query}}) _cdb_filtered_source', + ' WHERE', + ' {{=it._column}} IS NOT NULL', + ' AND', + ' {{=it._column}} != \'infinity\'::float', + ' AND', + ' {{=it._column}} != \'-infinity\'::float', + ' AND', + ' {{=it._column}} != \'NaN\'::float', + ')' +].join(' \n')); + var basicsQueryTpl = dot.template([ 'basics AS (', ' SELECT', ' max({{=it._column}}) AS max_val, min({{=it._column}}) AS min_val,', ' avg({{=it._column}}) AS avg_val, count(1) AS total_rows', - ' FROM ({{=it._query}}) _cdb_basics', + ' FROM filtered_source', ')' ].join(' \n')); @@ -27,7 +42,7 @@ var overrideBasicsQueryTpl = dot.template([ ' SELECT', ' max({{=it._end}}) AS max_val, min({{=it._start}}) AS min_val,', ' avg({{=it._column}}) AS avg_val, count(1) AS total_rows', - ' FROM ({{=it._query}}) _cdb_basics', + ' FROM filtered_source', ')' ].join('\n')); @@ -38,7 +53,7 @@ var iqrQueryTpl = dot.template([ ' SELECT quartile, max(_cdb_iqr_column) AS quartile_max from (', ' SELECT {{=it._column}} AS _cdb_iqr_column, ntile(4) over (order by {{=it._column}}', ' ) AS quartile', - ' FROM ({{=it._query}}) _cdb_rank) _cdb_quartiles', + ' FROM filtered_source) _cdb_quartiles', ' WHERE quartile = 1 or quartile = 3', ' GROUP BY quartile', ' ) _cdb_iqr', @@ -57,7 +72,7 @@ var binsQueryTpl = dot.template([ ' )', ' )', ' END AS bins_number', - ' FROM basics, iqrange, ({{=it._query}}) _cdb_bins', + ' FROM basics, iqrange, filtered_source', ' LIMIT 1', ')' ].join('\n')); @@ -77,11 +92,34 @@ var nullsQueryTpl = dot.template([ ')' ].join('\n')); +var infinitiesQueryTpl = dot.template([ + 'infinities AS (', + ' SELECT', + ' count(*) AS infinities_count', + ' FROM ({{=it._query}}) _cdb_histogram_infinities', + ' WHERE', + ' {{=it._column}} = \'infinity\'::float', + ' OR', + ' {{=it._column}} = \'-infinity\'::float', + ')' +].join('\n')); + +var nansQueryTpl = dot.template([ + 'nans AS (', + ' SELECT', + ' count(*) AS nans_count', + ' FROM ({{=it._query}}) _cdb_histogram_infinities', + ' WHERE {{=it._column}} = \'NaN\'::float', + ')' +].join('\n')); + var histogramQueryTpl = dot.template([ 'SELECT', ' (max_val - min_val) / cast(bins_number as float) AS bin_width,', ' bins_number,', ' nulls_count,', + ' infinities_count,', + ' nans_count,', ' avg_val,', ' CASE WHEN min_val = max_val', ' THEN 0', @@ -91,9 +129,8 @@ var histogramQueryTpl = dot.template([ ' max({{=it._column}})::numeric AS max,', ' avg({{=it._column}})::numeric AS avg,', ' count(*) AS freq', - 'FROM ({{=it._query}}) _cdb_histogram, basics, nulls, bins', - 'WHERE {{=it._column}} IS NOT NULL', - 'GROUP BY bin, bins_number, bin_width, nulls_count, avg_val', + 'FROM filtered_source, basics, nulls, infinities, nans, bins', + 'GROUP BY bin, bins_number, bin_width, nulls_count, infinities_count, nans_count, avg_val', 'ORDER BY bin' ].join('\n')); @@ -168,7 +205,12 @@ Histogram.prototype.sql = function(psql, override, callback) { var _query = this.query; - var basicsQuery, binsQuery; + var filteredQuery, basicsQuery, binsQuery; + + filteredQuery = filteredQueryTpl({ + _query: _query, + _column: _column + }); if (override && _.has(override, 'start') && _.has(override, 'end') && _.has(override, 'bins')) { debug('overriding with %j', override); @@ -215,11 +257,20 @@ Histogram.prototype.sql = function(psql, override, callback) { var histogramSql = [ "WITH", [ + filteredQuery, basicsQuery, binsQuery, nullsQueryTpl({ _query: _query, _column: _column + }), + infinitiesQueryTpl({ + _query: _query, + _column: _column + }), + nansQueryTpl({ + _query: _query, + _column: _column }) ].join(',\n'), histogramQueryTpl({ @@ -241,6 +292,8 @@ Histogram.prototype.format = function(result, override) { var width = getWidth(override); var binsStart = getBinStart(override); var nulls = 0; + var infinities = 0; + var nans = 0; var avg; if (result.rows.length) { @@ -249,10 +302,12 @@ Histogram.prototype.format = function(result, override) { width = firstRow.bin_width || width; avg = firstRow.avg_val; nulls = firstRow.nulls_count; + infinities = firstRow.infinities_count; + nans = firstRow.nans_count; binsStart = override.hasOwnProperty('start') ? getBinStart(override) : firstRow.min; buckets = result.rows.map(function(row) { - return _.omit(row, 'bins_number', 'bin_width', 'nulls_count', 'avg_val'); + return _.omit(row, 'bins_number', 'bin_width', 'nulls_count', 'infinities_count', 'nans_count', 'avg_val'); }); } @@ -261,6 +316,8 @@ Histogram.prototype.format = function(result, override) { bins_count: binsCount, bins_start: binsStart, nulls: nulls, + infinities: infinities, + nans: nans, avg: avg, bins: buckets };
9
diff --git a/token-metadata/0x4B4F5286e0f93E965292B922B9Cd1677512F1222/metadata.json b/token-metadata/0x4B4F5286e0f93E965292B922B9Cd1677512F1222/metadata.json "symbol": "YUNO", "address": "0x4B4F5286e0f93E965292B922B9Cd1677512F1222", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/.circleci/config.yml b/.circleci/config.yml version: 2 jobs: - test_examples: + test_examples_node: working_directory: ~/stac docker: - image: circleci/node:12 @@ -12,7 +12,7 @@ jobs: - run: name: validate command: npm run check-examples - test_examples_2: + test_examples_python: working_directory: ~/stac docker: - image: circleci/python:3.8 @@ -55,8 +55,8 @@ workflows: version: 2 ci: jobs: - - test_examples - - test_examples_2 + - test_examples_node + - test_examples_python - test_docs - publish_schemas: filters:
0