code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/pages/tests/alerts.hbs b/src/pages/tests/alerts.hbs @@ -26,23 +26,23 @@ layout: blank {{/embed}} </div> -<div class="drizzle-c-Space-inset-xl"> - {{#embed "patterns.components.alerts.base" type="success" icon="check" viewBox="0 0 64 64"}} +<div class="drizzle-c-Space-inset-m"> + {{#embed "patterns.components.alerts.base" type="success" icon="check-mark" viewBox="0 0 64 64"}} {{#content "content"}} This is a success message. {{/content}} {{/embed}} </div> -<div class="drizzle-c-Space-inset-xl"> - {{#embed "patterns.components.alerts.base" type="success" icon="check" viewBox="0 0 64 64"}} +<div class="drizzle-c-Space-inset-m"> + {{#embed "patterns.components.alerts.base" type="success" icon="check-mark" viewBox="0 0 64 64"}} {{#content "content"}} Word. {{/content}} {{/embed}} </div> -<div class="drizzle-c-Space-inset-xl"> +<div class="drizzle-c-Space-inset-m"> {{#embed "patterns.components.alerts.base" type="info" icon="bell" viewBox="0 0 64 64"}} {{#content "content"}} This is important information. @@ -56,7 +56,7 @@ layout: blank This is some example page body copy that could be underneath an alert. </p> -<div class="drizzle-c-Space-inset-xl"> +<div class="drizzle-c-Space-inset-m"> {{#embed "patterns.components.alerts.base" type="fail" icon="exclamation" viewBox="0 0 64 64"}} {{#content "content"}} FAIL 12323454 56745 6723452345
3
diff --git a/nodejs/lib/util/http.ts b/nodejs/lib/util/http.ts @@ -15,7 +15,7 @@ const noop = function() {}; /*************************************************** * - * These Http ops are used for REST operations + * These Http operations are used for REST operations * and assume that the system is stateless - ie * there is no connection state that tells us * anything about the state of the network or the
10
diff --git a/app/scripts/controllers/computed-balances.js b/app/scripts/controllers/computed-balances.js @@ -20,9 +20,10 @@ class ComputedbalancesController { } updateAllBalances () { - for (let address in this.accountTracker.store.getState().accounts) { + Object.keys(this.balances).forEach((balance) => { + const address = balance.address this.balances[address].updateBalance() - } + }) } _initBalanceUpdating () {
11
diff --git a/create-snowpack-app/cli/README.md b/create-snowpack-app/cli/README.md @@ -32,4 +32,5 @@ npx create-snowpack-app new-dir --template @snowpack/app-template-NAME [--use-ya - [snowpack-vue-capacitor-2-demo](https://github.com/brodybits/snowpack-vue-capacitor-2-demo) Demo of Snowpack with Vue and [Capacitor mobile app framework](https://capacitorjs.com/) version 2, originally generated from `@snowpack/vue-template` template, see [discussion #905](https://github.com/snowpackjs/snowpack/discussions/905) - [snowpack-react-ssr](https://github.com/matthoffner/snowpack-react-ssr) (React + Server Side Rendering) - [snowpack-app-template-preact-hmr-tailwind](https://github.com/Mozart409/snowpack-app-template-preact-hmr-tailwind) (Snowpack + Preact + HMR + Tailwindcss) +- [snowpack-mdx-chakra](https://github.com/molebox/snowpack-mdx)(An opinionated template setup with MDX, Chakra-ui for styling, theme and components, and React Router v6 for routing.) - PRs that add a link to this list are welcome!
0
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -72,6 +72,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ if (basal <= currenttemp.rate * 1.2) { // high temp is running rT.reason += "; setting current basal of " + basal + " as temp"; rT.deliverAt = deliverAt; + rT.temp = 'absolute'; return tempBasalFunctions.setTempBasal(basal, 30, profile, rT, currenttemp); } else { //do nothing. rT.reason += ", temp " + currenttemp.rate + " <~ current basal " + basal + "U/hr";
12
diff --git a/src/pages/home/report/ReportActionContextMenu.js b/src/pages/home/report/ReportActionContextMenu.js @@ -44,10 +44,12 @@ const defaultProps = { session: {}, }; +/** + * Copies the message text, or html if it's an attachment, to the the clipboard + * + * @param {Object} reportAction + */ function copyToClipboard(reportAction) { - // If return value is true, we switch the `text` and `icon` on - // `ReportActionContextMenuItem` with `successText` and `successIcon` which will fallback to - // the `text` and `icon` const message = _.last(lodashGet(reportAction, 'message', null)); const html = lodashGet(message, 'html', ''); const text = lodashGet(message, 'text', ''); @@ -61,21 +63,15 @@ function copyToClipboard(reportAction) { } } -class ReportActionContextMenu extends React.Component { - constructor(props) { - super(props); - - /** - * A list of all the context actions in this menu. - */ - this.contextActions = [ +// A list of all the context actions in this menu. +const contextActions = [ { text: 'Copy to Clipboard', icon: ClipboardIcon, successText: 'Copied!', successIcon: Checkmark, shouldShow: true, - onPress: () => copyToClipboard(props.reportAction), + onPress: (props) => { copyToClipboard(props.reportAction); }, }, { @@ -102,18 +98,22 @@ class ReportActionContextMenu extends React.Component { { text: 'Delete Comment', icon: Trashcan, - shouldShow: props.reportAction.actorEmail === props.session.email, - onPress: () => deleteReportComment(this.props.reportID, this.props.reportAction), + shouldShow: props => props.reportAction.actorEmail === props.session.email, + onPress: (props) => { deleteReportComment(props.reportID, props.reportAction); }, }, ]; +class ReportActionContextMenu extends React.Component { + constructor(props) { + super(props); + this.wrapperStyle = getReportActionContextMenuStyles(this.props.isMini); } render() { return this.props.isVisible && ( <View style={this.wrapperStyle}> - {this.contextActions.map(contextAction => contextAction.shouldShow && ( + {contextActions.map(contextAction => contextAction.shouldShow(this.props) && ( <ReportActionContextMenuItem icon={contextAction.icon} text={contextAction.text} @@ -121,7 +121,7 @@ class ReportActionContextMenu extends React.Component { successText={contextAction.successText} isMini={this.props.isMini} key={contextAction.text} - onPress={contextAction.onPress} + onPress={() => contextAction.onPress(this.props)} /> ))} </View>
7
diff --git a/aura-components/src/main/components/ui/SVGLibrary/stamper.js b/aura-components/src/main/components/ui/SVGLibrary/stamper.js @@ -59,6 +59,7 @@ function StampSVG() { //eslint-disable-line no-unused-vars uses.forEach(function (use) { var src = use.getAttribute("href"); + if (src) { var srcSplit = src.split("#"); var url = srcSplit.shift(); var id = srcSplit.join("#"); @@ -72,6 +73,7 @@ function StampSVG() { //eslint-disable-line no-unused-vars embed(svgElement, svgFragment, use); }); } + } }); };
9
diff --git a/spec/requests/carto/api/visualizations_controller_spec.rb b/spec/requests/carto/api/visualizations_controller_spec.rb @@ -437,7 +437,6 @@ describe Carto::Api::VisualizationsController do @user_2 = FactoryGirl.create(:valid_user, private_maps_enabled: true) @carto_user2 = Carto::User.find(@user_2.id) @api_key = @user_1.api_key - @feature_flag = FactoryGirl.create(:feature_flag, name: 'vector_vs_raster', restricted: true) end before(:each) do @@ -1745,9 +1744,8 @@ describe Carto::Api::VisualizationsController do include_context 'visualization creation helpers' - def get_vizjson3_url(user, visualization, vector: nil) + def get_vizjson3_url(user, visualization) args = { user_domain: user.username, id: visualization.id, api_key: user.api_key } - args[:vector] = vector unless vector.nil? api_v3_visualizations_vizjson_url(args) end @@ -2012,47 +2010,6 @@ describe Carto::Api::VisualizationsController do end end - it 'includes vector flag (default true)' do - get_json get_vizjson3_url(@user_1, @visualization), @headers do |response| - response.status.should == 200 - vizjson3 = response.body - vizjson3[:vector].should be_nil - end - end - - it 'includes vector flag if vector_vs_raster feature flag is enabled and vector param is not present' do - set_feature_flag @visualization.user, 'vector_vs_raster', true - get_json get_vizjson3_url(@user_1, @visualization), @headers do |response| - response.status.should == 200 - vizjson3 = response.body - vizjson3.has_key?(:vector).should be_true - end - end - - it 'includes vector flag if vector_vs_raster feature flag is enabled and vector param is present' do - set_feature_flag @visualization.user, 'vector_vs_raster', true - - get_json get_vizjson3_url(@user_1, @visualization, vector: true), @headers do |response| - response.status.should == 200 - vizjson3 = response.body - vizjson3[:vector].should eq true - end - - get_json get_vizjson3_url(@user_1, @visualization, vector: false), @headers do |response| - response.status.should == 200 - vizjson3 = response.body - vizjson3[:vector].should eq false - end - end - - it 'includes vector flag (true if requested)' do - get_json api_v3_visualizations_vizjson_url(user_domain: @user_1.username, id: @visualization.id, api_key: @user_1.api_key, vector: true), @headers do |request| - request.status.should == 200 - vizjson3 = request.body - vizjson3[:vector].should == true - end - end - it 'returns datasource.template_name for visualizations with retrieve_named_map? true' do Carto::Visualization.any_instance.stubs(:retrieve_named_map?).returns(true) get_json get_vizjson3_url(@user_1, @visualization), @headers do |response|
2
diff --git a/src/video/canvas/texture.js b/src/video/canvas/texture.js if (atlas.meta.app.includes("texturepacker")) { this.format = "texturepacker"; // set the texture - if (typeof(texture) === "undefined") { + if (typeof(source) === "undefined") { var image = atlas.meta.image; this.source = me.utils.getImage(image); if (!this.source) {
1
diff --git a/src/context/actions/globalActions.js b/src/context/actions/globalActions.js @@ -102,7 +102,7 @@ export const resetToProjectUrl = () => ({ type: actionTypes.NEW_TEST_CLOSE_BROWSER_DOCS, }); -export const setValidCode = (verdict) => ({ +export const setValidCode = (validCode) => ({ type: actionTypes.SET_VALID_CODE, - validCode: verdict, + validCode, });
3
diff --git a/source/gltf/user_camera.js b/source/gltf/user_camera.js @@ -13,14 +13,14 @@ class UserCamera extends gltfCamera target = [0, 0, 0], yaw = 0, pitch = 0, - zoom = 1) + distance = 1) { super(); this.target = jsToGl(target); this.yaw = yaw; this.pitch = pitch; - this.zoom = zoom; + this.distance = distance; this.zoomFactor = 1.04; this.orbitSpeed = 1 / 180; this.panSpeed = 1; @@ -39,7 +39,7 @@ class UserCamera extends gltfCamera { // calculate direction from focus to camera (assuming camera is at positive z) // pitch rotates *around* x-axis, yaw rotates *around* y-axis - const direction = vec3.fromValues(0, 0, this.zoom); + const direction = vec3.fromValues(0, 0, this.distance); this.toGlobalOrientation(direction); const position = vec3.create(); @@ -63,7 +63,7 @@ class UserCamera extends gltfCamera this.pitch = vec3.angle(difference, projectedDifference); this.yaw = vec3.angle(projectedDifference, vec3.fromValues(1.0, 0.0, 0.0)); - this.zoom = vec3.length(difference); + this.distance = vec3.length(difference); } setPosition(position) @@ -73,7 +73,8 @@ class UserCamera extends gltfCamera setTarget(target) { - this.lookAt(target, this.getPosition()); + //this.lookAt(target, this.getPosition()); + this.target = target; } setRotation(yaw, pitch) @@ -82,9 +83,9 @@ class UserCamera extends gltfCamera this.pitch = pitch; } - setZoom(zoom) + setZoom(distance) { - this.zoom = zoom; + this.distance = distance; } reset(gltf, sceneIndex) @@ -98,11 +99,11 @@ class UserCamera extends gltfCamera { if (value > 0) { - this.zoom *= this.zoomFactor; + this.distance *= this.zoomFactor; } else { - this.zoom /= this.zoomFactor; + this.distance /= this.zoomFactor; } this.fitCameraPlanesToExtents(this.sceneExtents.min, this.sceneExtents.max); } @@ -141,7 +142,7 @@ class UserCamera extends gltfCamera this.fitCameraTargetToExtents(this.sceneExtents.min, this.sceneExtents.max); this.fitZoomToExtents(this.sceneExtents.min, this.sceneExtents.max); - const direction = vec3.fromValues(0, 0, this.zoom); + const direction = vec3.fromValues(0, 0, this.distance); vec3.add(this.getPosition(), this.target, direction); this.fitPanSpeedToScene(this.sceneExtents.min, this.sceneExtents.max); @@ -158,7 +159,7 @@ class UserCamera extends gltfCamera fitZoomToExtents(min, max) { const maxAxisLength = Math.max(max[0] - min[0], max[1] - min[1]); - this.zoom = this.getFittingZoom(maxAxisLength); + this.distance = this.getFittingZoom(maxAxisLength); } fitCameraTargetToExtents(min, max) @@ -171,12 +172,12 @@ class UserCamera extends gltfCamera fitCameraPlanesToExtents(min, max) { - // depends only on scene min/max and the camera zoom + // depends only on scene min/max and the camera distance // Manually increase scene extent just for the camera planes to avoid camera clipping in most situations. const longestDistance = 10 * vec3.distance(min, max); - let zNear = this.zoom - (longestDistance * 0.6); - let zFar = this.zoom + (longestDistance * 0.6); + let zNear = this.distance - (longestDistance * 0.6); + let zFar = this.distance + (longestDistance * 0.6); // minimum near plane value needs to depend on far plane value to avoid z fighting or too large near planes zNear = Math.max(zNear, zFar / MaxNearFarRatio);
10
diff --git a/articles/native-platforms/ios-objc/07-authorization.md b/articles/native-platforms/ios-objc/07-authorization.md @@ -31,7 +31,7 @@ It's required that you've got [Lock](https://github.com/auth0/Lock.iOS-OSX) inte ### 1. Create a Rule to Assigning Roles -First, you will create a rule that assigns your users either an `admin` role or a single `user` role. To do so, go to the [new rule page](${uiURL}/#/rules/new) and select the "*Set Roles to a User*" template, under *Access Control*. Then, replace this line from the default script: +First, you will create a rule that assigns your users either an `admin` role or a single `user` role. To do so, go to the [new rule page](${manage_url}/#/rules/new) and select the "*Set Roles to a User*" template, under *Access Control*. Then, replace this line from the default script: ``` if (user.email.indexOf('@example.com') > -1)
14
diff --git a/src/js/controllers/buy-bitcoin/amount.controller.js b/src/js/controllers/buy-bitcoin/amount.controller.js ongoingProcess.set('buyingBch', true); - walletService.getAddress(vm.wallet, true, function (err, toAddress) { + walletService.getAddress(vm.wallet, true, function onGetWalletAddress(err, toAddress) { if (err) { + ongoingProcess.set('buyingBch', false); console.log(err); - // Handle the error + + message = err.message || gettext.getString('Could not create address'); + popupService.showAlert(title, message); + return; } var toCashAddress = bitcoinCashJsService.translateAddresses(toAddress).cashaddr;
9
diff --git a/js/coreweb/bisweb_connectivityvis.js b/js/coreweb/bisweb_connectivityvis.js @@ -230,7 +230,7 @@ var createMatrix=function(nets,pairs,symm=false) { let network1=fixNetworkIndex(rois[node].attr[globalParams.internal.networkAttributeIndex]); let network2=fixNetworkIndex(rois[othernode].attr[globalParams.internal.networkAttributeIndex]); - + if(network1 != network2) matrix[network1-1][network2-1]+=1; if (symm) matrix[network2-1][network1-1]+=1;
1
diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js @@ -13,6 +13,7 @@ var click = require('../assets/click'); var delay = require('../assets/delay'); var doubleClick = require('../assets/double_click'); var failTest = require('../assets/fail_test'); +var touchEvent = require('../assets/touch_event'); var customAssertions = require('../assets/custom_assertions'); var assertHoverLabelStyle = customAssertions.assertHoverLabelStyle; @@ -21,6 +22,20 @@ var assertElemRightTo = customAssertions.assertElemRightTo; var assertElemTopsAligned = customAssertions.assertElemTopsAligned; var assertElemInside = customAssertions.assertElemInside; +function touch(path, options) { + var len = path.length; + Lib.clearThrottle(); + touchEvent('touchstart', path[0][0], path[0][1], options); + + path.slice(1, len).forEach(function(pt) { + Lib.clearThrottle(); + touchEvent('touchmove', pt[0], pt[1], options); + }); + + touchEvent('touchend', path[len - 1][0], path[len - 1][1], options); + return; +} + describe('hover info', function() { 'use strict'; @@ -2503,3 +2518,41 @@ describe('hovermode defaults to', function() { .then(done); }); }); + + +describe('touch devices', function() { + ['pan', 'zoom'].forEach(function(type) { + describe('dragmode:' + type, function() { + var data = [{x: [1, 2, 3], y: [1, 3, 2], type: 'bar'}]; + var layout = {width: 600, height: 400, dragmode: type}; + var gd; + + beforeEach(function(done) { + gd = createGraphDiv(); + Plotly.plot(gd, data, layout).then(done); + }); + + it('emits click events', function(done) { + var hoverHandler = jasmine.createSpy('hover'); + var clickHandler = jasmine.createSpy('click'); + gd.on('plotly_hover', hoverHandler); + gd.on('plotly_click', clickHandler); + + var gdBB = gd.getBoundingClientRect(); + var touchPoint = [[gdBB.left + 300, gdBB.top + 200]]; + + Promise.resolve() + .then(function() { + touch(touchPoint); + }) + .then(delay(HOVERMINTIME * 1.1)) + .then(function() { + expect(clickHandler).toHaveBeenCalled(); + expect(hoverHandler).not.toHaveBeenCalled(); + }) + .catch(failTest) + .then(done); + }); + }); + }); +});
0
diff --git a/src/styles/styles.js b/src/styles/styles.js @@ -1543,11 +1543,8 @@ const styles = { chatItemAttachBorder: { borderRightColor: themeColors.border, borderRightWidth: 1, - height: 32, - width: 32, marginBottom: 3, marginTop: 3, - justifyContent: 'center', }, composerSizeButton: {
13
diff --git a/docs/README.md b/docs/README.md @@ -69,6 +69,16 @@ Currently the following fragments are available. Their [usage example](https://g In order to create a new fragment for you website create a new `htmlcopyright_footere named after your fragment and place it under `[project_root]/layouts/partials/fragments`. Fragments are partials and follow the same rules. If you are not famcopyright_footer with partials please read their [documentation](https://gohugo.io/templates/partials/). +### Image resource fallthrough + +Some fragments (`hero` fragment for example) may display images, if configured in their resource files. The configuration always accepts a filename and the fragment would look for a file with that name in the following order. + +- If the resource controlling the fragment is located in it's own directory (`content/[page]/[fragment]/[filename].md), fragment will look for a file with name specified in that resource in that directory. +- If the specified file is not found in that directory or the controlling resource is in page directory, fragment will look in that page directory as well. +- If the file is not found in the page directory the fragment will look in images directory for that file. + +So the fragment will look in the following order `fragment > page > images (global)`. If you need to use an image in several pages you can put it in the `static/images` directory and the image would be avilable globally. But if an image may differ between two pages or even two fragments of same type, it's possible to have it using this mechanism. + ### Short-comings As mentioned, fragments are controlled by resource files. There is ocopyright_footerception and that is menus. Hugo does not allow menus to be defined in resource files. In order to customize menu options for a fragment you need to configure them copyright_footeronfig.toml` of your website. As of right now only three fragments use menus:
0
diff --git a/examples/realitytabs.html b/examples/realitytabs.html @@ -563,7 +563,7 @@ for (let i = 0; i < controllerMeshes.length; i++) { controllerMesh.add(rayMesh); controllerMesh.rayMesh = rayMesh; - const rayDot = (() => { + const dotMesh = (() => { const geometry = new THREE.SphereBufferGeometry(0.01, 5, 5); const material = new THREE.MeshBasicMaterial({ color: 0xe91e63, @@ -574,8 +574,8 @@ for (let i = 0; i < controllerMeshes.length; i++) { mesh.visible = true; return mesh; })(); - controllerMesh.add(rayDot); - controllerMesh.rayDot = rayDot; + controllerMesh.add(dotMesh); + controllerMesh.dotMesh = dotMesh; controllerMesh.ray = new THREE.Ray(); controllerMesh.update = () => { @@ -1594,9 +1594,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; for (let j = 0; j < keyMap.length; j++) { const [key, kx1, ky1, kx2, ky2] = keyMap[j]; @@ -1669,9 +1669,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1705,9 +1705,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1745,9 +1745,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1806,9 +1806,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1835,9 +1835,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1867,9 +1867,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1904,9 +1904,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1935,9 +1935,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i]; @@ -1970,9 +1970,9 @@ function animate(time, frame) { controllerMesh.rayMesh.scale.z = distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.position.z = -distance; + controllerMesh.dotMesh.position.z = -distance; controllerMesh.updateMatrixWorld(); - controllerMesh.rayDot.visible = true; + controllerMesh.dotMesh.visible = true; const gamepads = navigator.getGamepads(); const gamepad = gamepads[i];
10
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -119,8 +119,12 @@ const _getLoaders = () => { let currentAppRender = null; metaversefile.setApi({ async import(s) { - const m = await import(s); - return m; + return await import(s); + }, + async load(s) { + const m = await this.import(s); + const app = this.add(m); + return app; }, useFrame(fn) { const app = currentAppRender;
0
diff --git a/store/buildMatch.js b/store/buildMatch.js @@ -98,11 +98,11 @@ async function getMatch(matchId) { try { playersMatchData = await getPlayerMatchData(matchId); if (playersMatchData.length === 0) { - throw new Error('no players found for match %s'); + throw new Error('no players found for match'); } } catch (e) { console.error(e); - if (e.message.startsWith('Server failure during read query') || e.message.startsWith('no players found') || e.message.startsWith('Unexpected')) { + if (e.message.startsWith('Server failure during read query') || e.message.startsWith('no players found') || e.message.startsWith('Unexpected') || e.message.startsWith('[ERR_BUFFER_OUT_OF_BOUNDS]')) { // Delete and request new await cassandra.execute('DELETE FROM player_matches where match_id = ?', [Number(matchId)], { prepare: true }); const match = {
9
diff --git a/plugins/compute/app/assets/javascripts/compute/cloud_init_configuration.coffee b/plugins/compute/app/assets/javascripts/compute/cloud_init_configuration.coffee button.removeClass('disabled'); @addEventListenerOnSelect= (button) -> - $( "#server_image_id" ).unbind "change.automtion" - $( "#server_image_id" ).bind "change.automtion", () -> removeOsTypeButtons() + $( "#server_vmware_image_id" ).unbind "change" + $( "#server_vmware_image_id" ).bind "change", () -> removeOsTypeButtons() + $( "#server_baremetal_image_id" ).unbind "change" + $( "#server_baremetal_image_id" ).bind "change", () -> removeOsTypeButtons() @checkOsType = (button, os_image_option, action_path) -> attachPopover(button, 'Warning', "Missing property 'vmware_ostype' on the image provided. Please follow the steps described in the documentation to upload a compatible image. <a href='https://documentation.global.cloud.sap/docs/image/start/customer.html'>See customer images documentation</a>. Please choose manually.") addEventListenerOnSelect(button) addOsTypeButtons(button, action_path) + return # get script $('a[data-toggle="windowsAutomationScript"]').addClass('disabled')
9
diff --git a/src/components/general/map-gen/MapGen.jsx b/src/components/general/map-gen/MapGen.jsx @@ -874,12 +874,22 @@ export const MapGen = () => { // click useEffect(() => { - function click(e) { + /* function click(e) { + console.log('click', e); if ( state.openedPanel === 'MapGenPanel' ) { return false; } else { return true; } + } */ + function dblclick(e) { + // console.log('dbl click', e); + if ( state.openedPanel === 'MapGenPanel' ) { + setSelectedPhysicsObject(hoveredPhysicsObject); + return false; + } else { + return true; + } } function mouseUp(e) { if ( state.openedPanel === 'MapGenPanel') { @@ -892,8 +902,6 @@ export const MapGen = () => { console.log('did not get chunk', hoveredPhysicsObject); setSelectedPhysicsObject(null); } - - // selectObject(); } setMouseState(null); return false; @@ -901,13 +909,15 @@ export const MapGen = () => { return true; } } - registerIoEventHandler('click', click); + // registerIoEventHandler('click', click); + registerIoEventHandler('dblclick', dblclick); registerIoEventHandler('mouseup', mouseUp); return () => { - unregisterIoEventHandler('click', click); + // unregisterIoEventHandler('click', click); + unregisterIoEventHandler('dblclick', dblclick); unregisterIoEventHandler('mouseup', mouseUp); }; - }, [ state.openedPanel, mouseState, /*hoveredObject, */ hoveredPhysicsObject ] ); + }, [ state.openedPanel, terrainApp, mouseState, /*hoveredObject, */ hoveredPhysicsObject, selectedPhysicsObject ] ); // initialize terrain useEffect(async () => {
0
diff --git a/aura-impl/src/main/java/org/auraframework/impl/adapter/ServletUtilAdapterImpl.java b/aura-impl/src/main/java/org/auraframework/impl/adapter/ServletUtilAdapterImpl.java @@ -508,7 +508,7 @@ public class ServletUtilAdapterImpl implements ServletUtilAdapter { top == null ? null : top.getQualifiedName(), req); if (csp != null) { - rsp.setHeader(CSP.Header.SECURE, csp.getCspHeaderValue()); + rsp.addHeader(CSP.Header.SECURE, csp.getCspHeaderValue()); Collection<String> terms = csp.getFrameAncestors(); if (terms != null) { // not open to the world; figure whether we can express an X-FRAME-OPTIONS header:
14
diff --git a/src/traces/scatter/plot.js b/src/traces/scatter/plot.js @@ -458,8 +458,10 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition join.enter().append('g').classed('textpoint', true).append('text'); join.each(function(d) { - var sel = transition(d3.select(this).select('text')); - Drawing.translatePoint(d, sel, xa, ya); + var g = d3.select(this); + var sel = transition(g.select('text')); + var hasTextPt = Drawing.translatePoint(d, sel, xa, ya); + if(!hasTextPt) g.remove(); }); join.selectAll('text')
4
diff --git a/src/comments/commentsActions.js b/src/comments/commentsActions.js @@ -91,7 +91,9 @@ export const getComments = (postId, isFromAnotherComment = false) => { export const sendCommentV2 = (parentPost, body) => (dispatch, getState) => { - const { parent_author, parent_permlink, category, root_comment } = parentPost; + const { category, root_comment } = parentPost; + const parent_permlink = parentPost.permlink; + const parent_author = parentPost.author; const { auth } = getState(); if (!auth.isAuthenticated) { @@ -103,7 +105,7 @@ export const sendCommentV2 = (parentPost, body) => // dispatch error return; } - + debugger; const author = auth.user.name; const permlink = createCommentPermlink(parent_author, parent_permlink); const jsonMetadata = { tags: [category], app: `busy/${version}` };
3
diff --git a/components/explorer/explore-search.js b/components/explorer/explore-search.js @@ -84,7 +84,7 @@ function ExploreSearch() { return ( <> - <small className='example'>Rechercher une adresse, une voie, un lieu-dit ou une commune dans la Base Adresse Nationale</small> + <p className='example'>Rechercher une adresse, une voie, un lieu-dit ou une commune dans la Base Adresse Nationale</p> <SearchInput value={input} @@ -104,8 +104,8 @@ function ExploreSearch() { <style jsx>{` .example { - color: ${theme.colors.darkerGrey}; - font-style: italic; + font-size: 1.5em; + text-align: center; background-color: ${theme.colors.white}; }
0
diff --git a/samples/python/06.using-cards/dialogs/main_dialog.py b/samples/python/06.using-cards/dialogs/main_dialog.py @@ -185,7 +185,7 @@ class MainDialog(ComponentDialog): def create_oauth_card(self) -> Attachment: card = OAuthCard( text="BotFramework OAuth Card", - connection_name="test.com", + connection_name="OAuth connection", buttons=[ CardAction( type=ActionTypes.signin,
0
diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js @@ -77,7 +77,7 @@ function isSingleEmoji(message) { * @returns {Boolean} */ function containsOnlyEmojis(message) { - const match = message.match(CONST.REGEX.EMOJIS); + const match = message.replace(/ /g, '').match(CONST.REGEX.EMOJIS); if (!match) { return false; @@ -91,7 +91,7 @@ function containsOnlyEmojis(message) { return code; })); - const messageCodes = _.filter(_.map([...message], char => getEmojiUnicode(char)), string => string.length > 0 && string !== CONST.EMOJI_INVISIBLE_CODEPOINT); + const messageCodes = _.filter(_.map([...message.replace(/ /g, '')], char => getEmojiUnicode(char)), string => string.length > 0 && string !== CONST.EMOJI_INVISIBLE_CODEPOINT); return codes.length === messageCodes.length; }
8
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -2442,14 +2442,14 @@ RED.view = (function() { thisNode.selectAll(".node_button_button").attr("cursor",function(d) { return (activeSubflow||!isButtonEnabled(d))?"":"pointer"; }); - thisNode.selectAll(".node_right_button").attr("transform",function(d){ - var x = d.w-6; + thisNode.selectAll(".node_button").attr("transform",function(d){ + var x = d._def.align == "right"?d.w-6:-25; if (d._def.button.toggle && !d[d._def.button.toggle]) { - x = x - 8; + x = x - (d._def.align == "right"?8:-8); } return "translate("+x+",2)"; }); - thisNode.selectAll(".node_right_button rect").attr("fill-opacity",function(d){ + thisNode.selectAll(".node_button rect").attr("fill-opacity",function(d){ if (d._def.button.toggle) { return d[d._def.button.toggle]?1:0.2; }
11
diff --git a/engine/core/src/main/resources/view/core/Drawer.js b/engine/core/src/main/resources/view/core/Drawer.js @@ -624,7 +624,7 @@ export class Drawer { if (!this.loading) { if (this.loaded < 1) { this.changed |= this.renderPreloadScene(this.scope, step) - } else if (this.changed || (this.asyncRendering && this.asyncRenderingTime > 0)) { + } else if (this.changed || (this.asyncRendering && this.asyncRenderingTime > 0) || this.isAsynchronousAnimationOngoing(this.scope)) { if (this.currentFrame < 0) { this.changed |= this.renderDefaultScene(this.scope, step) } else if (this.intro) {
1
diff --git a/app/models/synchronization/adapter.rb b/app/models/synchronization/adapter.rb @@ -37,15 +37,12 @@ module CartoDB data_for_exception << "1st result:#{runner.results.first.inspect}" raise data_for_exception end - index_statements = @table_setup.generate_index_statements(user.database_schema, table_name) move_to_schema(result) geo_type = fix_the_geom_type!(user.database_schema, result.table_name) import_cleanup(user.database_schema, result.table_name) @table_setup.cartodbfy(result.table_name) - @table_setup.copy_privileges(user.database_schema, table_name, user.database_schema, result.table_name) overwrite(table_name, result, geo_type) setup_table(table_name, geo_type) - @table_setup.run_index_statements(index_statements, @database) @table_setup.recreate_overviews(table_name) end self
2
diff --git a/src/components/OrderHistoryTable/OrderHistoryTable.helpers.js b/src/components/OrderHistoryTable/OrderHistoryTable.helpers.js const symbolToLabel = (symbol) => { if (symbol.includes(':')) { - const pair = symbol.split(':') - return `${pair[0]}/${pair[1]}` + let [base, quote] = symbol.split(':') //eslint-disable-line + if (base.includes('t')) { + base = base.substring(1, base.length) + } + return `${base}/${quote}` } return `${symbol.substring(1, 4)}/${symbol.substring(4)}` }
7
diff --git a/test/jasmine/tests/scattermapbox_test.js b/test/jasmine/tests/scattermapbox_test.js @@ -1070,3 +1070,126 @@ describe('@noCI Test plotly events on a scattermapbox plot:', function() { }); }); }); + +describe('@noCI Test plotly events on a scattermapbox plot when css transform is present:', function() { + var mock = require('@mocks/mapbox_0.json'); + var pointPos = [440 / 2, 290 / 2]; + var nearPos = [460 / 2, 290 / 2]; + var blankPos = [10 / 2, 10 / 2]; + var mockCopy; + var gd; + + function transformPlot(gd, transformString) { + gd.style.webkitTransform = transformString; + gd.style.MozTransform = transformString; + gd.style.msTransform = transformString; + gd.style.OTransform = transformString; + gd.style.transform = transformString; + } + + beforeAll(function() { + Plotly.setPlotConfig({ + mapboxAccessToken: require('@build/credentials.json').MAPBOX_ACCESS_TOKEN + }); + }); + + beforeEach(function(done) { + gd = createGraphDiv(); + mockCopy = Lib.extendDeep({}, mock); + mockCopy.layout.width = 800; + mockCopy.layout.height = 500; + + transformPlot(gd, 'translate(-25%, -25%) scale(0.5)'); + Plotly.plot(gd, mockCopy).then(done); + }); + + afterEach(destroyGraphDiv); + + describe('click events', function() { + var futureData; + + beforeEach(function() { + futureData = undefined; + gd.on('plotly_click', function(data) { + futureData = data; + }); + }); + + it('@gl should not be trigged when not on data points', function() { + click(blankPos[0], blankPos[1]); + expect(futureData).toBe(undefined); + }); + + it('@gl should contain the correct fields', function() { + click(pointPos[0], pointPos[1]); + + var pt = futureData.points[0]; + + expect(Object.keys(pt)).toEqual([ + 'data', 'fullData', 'curveNumber', 'pointNumber', 'pointIndex', 'lon', 'lat' + ]); + + expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber'); + expect(typeof pt.data).toEqual(typeof {}, 'points[0].data'); + expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData'); + expect(pt.lat).toEqual(10, 'points[0].lat'); + expect(pt.lon).toEqual(10, 'points[0].lon'); + expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber'); + }); + }); + + describe('hover events', function() { + var futureData; + + beforeEach(function() { + gd.on('plotly_hover', function(data) { + futureData = data; + }); + }); + + it('@gl should contain the correct fields', function() { + mouseEvent('mousemove', blankPos[0], blankPos[1]); + mouseEvent('mousemove', pointPos[0], pointPos[1]); + + var pt = futureData.points[0]; + + expect(Object.keys(pt)).toEqual([ + 'data', 'fullData', 'curveNumber', 'pointNumber', 'pointIndex', 'lon', 'lat' + ]); + + expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber'); + expect(typeof pt.data).toEqual(typeof {}, 'points[0].data'); + expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData'); + expect(pt.lat).toEqual(10, 'points[0].lat'); + expect(pt.lon).toEqual(10, 'points[0].lon'); + expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber'); + }); + }); + + describe('unhover events', function() { + var futureData; + + beforeEach(function() { + gd.on('plotly_unhover', function(data) { + futureData = data; + }); + }); + + it('@gl should contain the correct fields', function(done) { + move(pointPos[0], pointPos[1], nearPos[0], nearPos[1], HOVERMINTIME + 10).then(function() { + var pt = futureData.points[0]; + + expect(Object.keys(pt)).toEqual([ + 'data', 'fullData', 'curveNumber', 'pointNumber', 'pointIndex', 'lon', 'lat' + ]); + + expect(pt.curveNumber).toEqual(0, 'points[0].curveNumber'); + expect(typeof pt.data).toEqual(typeof {}, 'points[0].data'); + expect(typeof pt.fullData).toEqual(typeof {}, 'points[0].fullData'); + expect(pt.lat).toEqual(10, 'points[0].lat'); + expect(pt.lon).toEqual(10, 'points[0].lon'); + expect(pt.pointNumber).toEqual(0, 'points[0].pointNumber'); + }).then(done); + }); + }); +});
0
diff --git a/core/task-executor/config/main/config.base.js b/core/task-executor/config/main/config.base.js @@ -41,8 +41,8 @@ config.metrics = { config.resources = { enable: formatter.parseBool(process.env.RESOURCES_ENABLE, false), worker: { - mem: parseFloat(process.env.WORKER_MEMORY) || 256, - cpu: parseFloat(process.env.WORKER_CPU) || 0.1 + mem: parseFloat(process.env.WORKER_MEMORY) || 512, + cpu: parseFloat(process.env.WORKER_CPU) || 0.5 }, defaultQuota: { 'limits.cpu': parseFloat(process.env.DEFAULT_QUOTA_CPU) || 30,
3
diff --git a/outline/manager.js b/outline/manager.js @@ -290,7 +290,7 @@ module.exports = function (doc) { const items = await getDashboardItems() function renderTab (div, item) { - div.dataset.name = item.tabName || item.paneName + div.dataset.globalPaneName = item.tabName || item.paneName div.textContent = item.label } @@ -386,8 +386,8 @@ module.exports = function (doc) { if (dashboardContainer.childNodes.length > 0 && options.pane) { outlineContainer.style.display = 'none' dashboardContainer.style.display = 'inherit' - const tab = dashboardContainer.querySelector(`[data-name="${options.pane}"]`) || - dashboardContainer.querySelector('[data-name]') + const tab = dashboardContainer.querySelector(`[data-global-pane-name="${options.pane}"]`) || + dashboardContainer.querySelector('[data-global-pane-name]') if (tab) { tab.click() return
10
diff --git a/src/renderer/layer/ImageGLRenderable.js b/src/renderer/layer/ImageGLRenderable.js @@ -285,6 +285,7 @@ const ImageGLRenderable = Base => { */ clearGLCanvas() { if (this.gl) { + this.gl.clearStencil(0xFF); this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.STENCIL_BUFFER_BIT); } }
12
diff --git a/lime/math/color/RGBA.hx b/lime/math/color/RGBA.hx @@ -24,6 +24,11 @@ abstract RGBA(#if flash Int #else UInt #end) from Int to Int from UInt to UInt { private static function __init__ ():Void { + __initColors(); + + } + + private static function __initColors() { __alpha16 = new UInt32Array (256); for (i in 0...256) { @@ -45,7 +50,6 @@ abstract RGBA(#if flash Int #else UInt #end) from Int to Int from UInt to UInt { __clamp[i] = 0xFF; } - }
5
diff --git a/articles/api/authentication/_userinfo.md b/articles/api/authentication/_userinfo.md @@ -12,8 +12,8 @@ Authorization: 'Bearer {ACCESS_TOKEN}' ```shell curl --request GET \ --url 'https://${account.namespace}/userinfo' \ - --header 'authorization: Bearer {ACCESS_TOKEN}' \ - --header 'content-type: application/json' + --header 'Authorization: Bearer {ACCESS_TOKEN}' \ + --header 'Content-Type: application/json' ``` ```javascript @@ -46,7 +46,6 @@ curl --request GET \ { "email_verified": false, "email": "[email protected]", - "clientID": "q2hnj2iu...", "updated_at": "2016-12-05T15:15:40.545Z", "name": "[email protected]", "picture": "https://s.gravatar.com/avatar/dummy.png",
2
diff --git a/react/src/components/pagination/SprkPagination.js b/react/src/components/pagination/SprkPagination.js @@ -195,21 +195,44 @@ const SprkPagination = (props) => { }; SprkPagination.propTypes = { - /** The pagination variant type. */ + /** + * The determinds what style of pagination to render. + */ variant: PropTypes.oneOf(['default', 'pager']), - /** The total number of items that the pagination component will page through. */ + /** + * The total number of items that the pagination component will contain. + */ totalItems: PropTypes.number.isRequired, - /** The number of items per page in the component. */ + /** + * The number of items to display per page + */ itemsPerPage: PropTypes.number.isRequired, - /** The current visible page of the component. */ + /** + * The current visible page of the component. + */ currentPage: PropTypes.number, - /** The callback for handling changes. */ + /** + * This function will be called every time the component updates. + * The function should accept a single object + * parameter with a property called newPage + * containing the current page number of the pagination component. + * + * Ex: `{ newPage: 3 }` + */ onChangeCallback: PropTypes.func.isRequired, - /** Any additional classes to include on the component. */ + /** + * Expects a space separated string + * of classes to be added to the + * component. + */ additionalClasses: PropTypes.string, - /** Screenreader text for the 'previous page' icon. */ + /** + * Screenreader text for the 'previous page' icon. + */ nextLinkText: PropTypes.string, - /** Screenreader text for the 'next page' icon. */ + /** + * Screenreader text for the 'next page' icon. + */ prevLinkText: PropTypes.string, /** The data-analytics string for the individual page links. */ analyticsStringPage: PropTypes.string, @@ -217,7 +240,14 @@ SprkPagination.propTypes = { analyticsStringNext: PropTypes.string, /** The data-analytics string for the 'next page' link. */ analyticsStringPrev: PropTypes.string, - /** The data-id string for the component. */ + /** + * Value assigned + * to the `data-id` attribute on the + * component. This is intended to be + * used as a selector for automated + * tools. This value should be unique + * per page. + */ idString: PropTypes.string, /** The icon name to be rendered for the previous link. */ prevIcon: PropTypes.string,
7
diff --git a/composer-samples/csharp_dotnetcore/projects/AskingQuestionsSample/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog b/composer-samples/csharp_dotnetcore/projects/AskingQuestionsSample/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog "text": "Please log in to your email account", "tokenProperty": "user.token", "allowInterruptions": true, - "maxTurnCount": 3 + "maxTurnCount": 3, + "property": "user.token", + "timeout": 900000 } ] }, "method": "GET", "url": "https://graph.microsoft.com/beta/me/mailFolders/inbox/messages", "headers": { - "Authorization": "Bearer ${user.token.token}" + "Authorization": "Bearer ${user.token}" }, "resultProperty": "user.getGraphEmails" }, ] } ], - "generator": "oauthinput.lg" + "generator": "oauthinput.lg", + "id": "oauthinput" }
1
diff --git a/vis/js/headstart.js b/vis/js/headstart.js @@ -9,7 +9,6 @@ import $ from "jquery"; import config from 'config'; import { mediator } from 'mediator'; -import 'hypher'; import 'lib/en.js'; import { BrowserDetect } from "exports-loader?exports=BrowserDetect!../lib/browser_detect.js";
2
diff --git a/sirepo/package_data/static/js/ml.js b/sirepo/package_data/static/js/ml.js @@ -1048,13 +1048,14 @@ SIREPO.app.directive('columnSelector', function(appState, mlService, panelState, if (! appState.models.columnInfo.selected) { appState.models.columnInfo.selected = []; } + let p = 0; + $scope.pages = [[]]; for (let i = 0; i < c.header.length; i++) { if (c.colsWithNonUniqueValues.hasOwnProperty(c.header[i])) { continue; } - const p = Math.floor(i / pageSize); - if (i % pageSize === 0) { - $scope.pages[p] = []; + if ($scope.pages[p].length === pageSize) { + $scope.pages[++p] = []; } $scope.pages[p].push(i); const m = mlService.columnReportName(i);
9
diff --git a/src/lib/objects.js b/src/lib/objects.js @@ -56,8 +56,8 @@ export function object<O: { +[field: string]: Decoder<_Any>, ... }>( decodersByKey: O, ): Decoder<$ObjMap<O, <T>(Decoder<T>) => T>> { const known = new Set(Object.keys(decodersByKey)); - return pojo.then((blob, accept, reject) => { - const actual = new Set(Object.keys(blob)); + return pojo.then((plainObj, accept, reject) => { + const actual = new Set(Object.keys(plainObj)); // At this point, "missing" will also include all fields that may // validly be optional. We'll let the underlying decoder decide and @@ -70,7 +70,7 @@ export function object<O: { +[field: string]: Decoder<_Any>, ... }>( Object.keys(decodersByKey).forEach((key) => { const decoder = decodersByKey[key]; - const rawValue = blob[key]; + const rawValue = plainObj[key]; const result: DecodeResult<mixed> = decoder.decode(rawValue); if (result.ok) { @@ -107,7 +107,7 @@ export function object<O: { +[field: string]: Decoder<_Any>, ... }>( // object. Lastly, any fields that are missing should be annotated on // the outer object itself. if (errors || missing.size > 0) { - let objAnn = annotateObject(blob); + let objAnn = annotateObject(plainObj); if (errors) { objAnn = merge(objAnn, errors); @@ -137,13 +137,13 @@ export function exact<O: { +[field: string]: Decoder<_Any>, ... }>( ): Decoder<$ObjMap<$Exact<O>, <T>(Decoder<T>) => T>> { // Check the inputted object for any superfluous keys const allowed = new Set(Object.keys(decodersByKey)); - const checked = pojo.then((blob, accept, reject) => { - const actual = new Set(Object.keys(blob)); + const checked = pojo.then((plainObj, accept, reject) => { + const actual = new Set(Object.keys(plainObj)); const superfluous = subtract(actual, allowed); if (superfluous.size > 0) { return reject(`Superfluous keys: ${Array.from(superfluous).join(', ')}`); } - return accept(blob); + return accept(plainObj); }); // Defer to the "object" decoder for doing the real decoding work. Since @@ -161,8 +161,8 @@ export function exact<O: { +[field: string]: Decoder<_Any>, ... }>( export function inexact<O: { +[field: string]: Decoder<_Any> }>( decodersByKey: O, ): Decoder<$ObjMap<O, <T>(Decoder<T>) => T> & { +[string]: mixed }> { - return pojo.then((blob) => { - const allkeys = new Set(Object.keys(blob)); + return pojo.then((plainObj) => { + const allkeys = new Set(Object.keys(plainObj)); const decoder = object(decodersByKey).transform( (safepart: $ObjMap<O, <T>(Decoder<T>) => T>) => { const safekeys = new Set(Object.keys(decodersByKey)); @@ -178,13 +178,13 @@ export function inexact<O: { +[field: string]: Decoder<_Any> }>( rv[k] = value; } } else { - rv[k] = blob[k]; + rv[k] = plainObj[k]; } }); return rv; }, ); - return decoder.decode(blob); + return decoder.decode(plainObj); }); } @@ -199,12 +199,12 @@ export function inexact<O: { +[field: string]: Decoder<_Any> }>( * a lookup table, or a cache. */ export function dict<T>(decoder: Decoder<T>): Decoder<{ [string]: T }> { - return pojo.then((blob, accept, reject) => { + return pojo.then((plainObj, accept, reject) => { let rv: { [key: string]: T } = {}; let errors: { [key: string]: Annotation } | null = null; - Object.keys(blob).forEach((key: string) => { - const value = blob[key]; + Object.keys(plainObj).forEach((key: string) => { + const value = plainObj[key]; const result = decoder.decode(value); if (result.ok) { if (errors === null) { @@ -220,7 +220,7 @@ export function dict<T>(decoder: Decoder<T>): Decoder<{ [string]: T }> { }); if (errors !== null) { - return reject(merge(annotateObject(blob), errors)); + return reject(merge(annotateObject(plainObj), errors)); } else { return accept(rv); }
10
diff --git a/tools/scripts/postinstall b/tools/scripts/postinstall @@ -241,7 +241,6 @@ function main() { meta[ k ] = pkg[ k ]; } } - meta.name = ''; // NOTE: we empty out the `name` field due to the presence of slashes in the package names (e.g., `'@stdlib/array/buffer'`; see https://docs.npmjs.com/files/package.json#name) meta.main = path.join( resolvePkg( pdir ), pkg.main ); debug( 'Resolved package entry point: %s', meta.main ); @@ -276,7 +275,7 @@ function main() { for ( i = 0; i < pkgs.length; i++ ) { pdir = pkgs[ i ].slice( PKG_DIR.length+1 ); // +1 to account for trailing `/` if ( pdir[ 0 ] !== '_' ) { - meta.dependencies[ '@stdlib/'+pdir ] = 'file:../'+pdir; + meta.dependencies[ '@stdlib/'+pdir.replace( /\//g, '-' ) ] = 'file:../'+pdir; } } debug( 'Renaming file...' );
14
diff --git a/core/command.js b/core/command.js @@ -95,12 +95,15 @@ class Command { return 'Command can only be used in server'; } if (this.serverAdminOnly_ && !isBotAdmin) { - let serverAdminRole = msg.channel.guild.roles.find((role) => { - return role.name.toLowerCase() === config.serverAdminRoleName.toLowerCase(); - }); + let isServerAdmin = userIsServerAdmin(msg, config); - if (!serverAdminRole || msg.member.roles.indexOf(serverAdminRole.id) === -1) { - ErisUtils.sendMessageAndDelete(msg, 'You must have a role called \'' + config.serverAdminRoleName + '\' in order to use that command.'); + if (!isServerAdmin) { + let errorMessage = 'You must be a server admin '; + if (config.serverAdminRoleName) { + errorMessage += 'or have a role called \'' + config.serverAdminRoleName + '\' '; + } + errorMessage += 'in order to do that.'; + ErisUtils.sendMessageAndDelete(msg, errorMessage); return 'User is not a server admin'; } } @@ -143,4 +146,22 @@ class Command { } } +function userIsServerAdmin(msg, config) { + debugger; + let permission = msg.member.permission.json; + if (permission.manageGuild || permission.administrator || permission.manageChannels) { + return true; + } + + let serverAdminRole = msg.channel.guild.roles.find((role) => { + return role.name.toLowerCase() === config.serverAdminRoleName.toLowerCase(); + }); + + if (serverAdminRole && msg.member.roles.indexOf(serverAdminRole.id) !== -1) { + return true; + } + + return false; +} + module.exports = Command;
11
diff --git a/gatsby-config.js b/gatsby-config.js module.exports = { siteMetadata: { - title: "Gatsby Starter Blog", - author: "Kyle Mathews", - description: "A starter blog demonstrating what Gatsby can do.", - siteUrl: "https://gatsbyjs.github.io/gatsby-starter-blog/", + title: 'Gatsby Starter Blog', + author: 'Kyle Mathews', + description: 'A starter blog demonstrating what Gatsby can do.', + siteUrl: 'https://gatsbyjs.github.io/gatsby-starter-blog/', }, + pathPrefix: '/gatsby-starter-blog', plugins: [ { resolve: `gatsby-source-filesystem`, options: { path: `${__dirname}/src/pages`, - name: "pages", + name: 'pages', }, }, { @@ -29,9 +30,9 @@ module.exports = { wrapperStyle: `margin-bottom: 1.0725rem`, }, }, - "gatsby-remark-prismjs", - "gatsby-remark-copy-linked-files", - "gatsby-remark-smartypants", + 'gatsby-remark-prismjs', + 'gatsby-remark-copy-linked-files', + 'gatsby-remark-smartypants', ], }, }, @@ -47,9 +48,9 @@ module.exports = { `gatsby-plugin-offline`, `gatsby-plugin-react-helmet`, { - resolve: "gatsby-plugin-typography", + resolve: 'gatsby-plugin-typography', options: { - pathToConfigModule: "src/utils/typography", + pathToConfigModule: 'src/utils/typography', }, }, ],
0
diff --git a/stories/index.tsx b/stories/index.tsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import _ from 'lodash'; -import GenericGriddle, { actions, components, selectors, plugins, ColumnDefinition, RowDefinition } from '../src/module'; +import GenericGriddle, { actions, components, selectors, plugins, utils, ColumnDefinition, RowDefinition } from '../src/module'; const { Cell, Row, Table, TableContainer, TableBody, TableHeading, TableHeadingCell } = components; const { SettingsWrapper, SettingsToggle, Settings } = components; @@ -125,6 +125,33 @@ storiesOf('Griddle main', module) </div> ); }) + .add('with sort disabled on name', () => { + const { setSortProperties } = utils.sortUtils; + const disableSortPlugin = (...columnsWithSortDisabled) => ({ + events: { + setSortProperties: (sortProperties) => { + const { columnId } = sortProperties; + if (columnsWithSortDisabled.findIndex(c => c === columnId) >= 0) { + return () => {}; + } + + return setSortProperties(sortProperties); + } + }, + }); + + return ( + <div> + <small>Sorts name by second character</small> + <Griddle data={fakeData} plugins={[LocalPlugin,disableSortPlugin('name')]}> + <RowDefinition> + <ColumnDefinition id="name" order={2} /> + <ColumnDefinition id="state" order={1} /> + </RowDefinition> + </Griddle> + </div> + ); + }) .add('with custom component on name', () => { return ( <div>
0
diff --git a/src/evaluator.mjs b/src/evaluator.mjs @@ -267,12 +267,20 @@ function IsInTailPosition(CallExpression) { return false; } -function ArgumentListEvaluation(Arguments) { - if (Arguments.length === 0) { +// #sec-argument-lists-runtime-semantics-argumentlistevaluation +function ArgumentListEvaluation(ArgumentList) { + // Arguments : ( ) + if (ArgumentList.length === 0) { return []; } - // this is wrong - return Arguments.map((Expression) => GetValue(EvaluateExpression(Expression))); + + // ArgumentList : ArgumentList , AssignmentExpression + let preceedingArgs = ArgumentListEvaluation(ArgumentList.slice(0, -1)); + ReturnIfAbrupt(preceedingArgs); + const ref = EvaluateExpression(ArgumentList[ArgumentList.length - 1]); + const arg = Q(GetValue(ref)); + preceedingArgs.push(arg); + return preceedingArgs; } function EvaluateCall(func, ref, args, tailPosition) {
7
diff --git a/test/deployments/index.js b/test/deployments/index.js @@ -15,12 +15,29 @@ const { toBytes32, wrap, networks } = require('../..'); describe('deployments', () => { networks .filter(n => n !== 'local') - .forEach(network => { - (['goerli'].indexOf(network) > -1 ? describe.skip : describe)(network, () => { + .reduce( + (memo, network) => + memo.concat( + { + network, + useOvm: false, + }, + { + network, + useOvm: true, + } + ), + [] + ) + .forEach(({ network, useOvm }) => { + (['goerli'].indexOf(network) > -1 ? describe.skip : describe)( + `${network}${useOvm ? '-ovm' : ''}`, + () => { const { getTarget, getSource, getStakingRewards, getSynths } = wrap({ network, fs, path, + useOvm, }); // we need this outside the test runner in order to generate tests per contract name @@ -39,12 +56,16 @@ describe('deployments', () => { const connections = loadConnections({ network, + useOvm, }); web3 = new Web3(new Web3.providers.HttpProvider(connections.providerUrl)); contracts = { - Synthetix: getContract({ source: 'Synthetix', target: 'ProxyERC20' }), + Synthetix: getContract({ + source: useOvm ? 'MintableSynthetix' : 'Synthetix', + target: 'ProxyERC20', + }), ExchangeRates: getContract({ target: 'ExchangeRates' }), }; }); @@ -142,7 +163,9 @@ describe('deployments', () => { synths.forEach(({ name, feed, index }) => { describe(name, () => { it('Synthetix has the synth added', async () => { - const foundSynth = await contracts.Synthetix.methods.synths(toBytes32(name)).call(); + const foundSynth = await contracts.Synthetix.methods + .synths(toBytes32(name)) + .call(); assert.strictEqual(foundSynth, targets[`Synth${name}`].address); }); if (feed) { @@ -263,6 +286,7 @@ describe('deployments', () => { }); }); }); - }); + } + ); }); });
1
diff --git a/src/containers/StartRepl.js b/src/containers/StartRepl.js @@ -129,11 +129,11 @@ class ReplAnalytics extends Component { paramArray.forEach(param => { let kv = param.split('=') if (kv[0] == 'i') { - window.analytics.identify(kv[1]) - const cValue = `replit_user_id=${kv[1]}` const cPath = 'path=/' document.cookie = `${cValue}; ${cPath}` + + window.analytics.identify(kv[1]) } }) }
12
diff --git a/karma.conf.js b/karma.conf.js @@ -22,6 +22,7 @@ module.exports = function (config) { dir: 'test/coverage/', includeAllSources: true }, + browserNoActivityTimeout: 30000, karmaTypescriptConfig: { tsconfig: './tsconfig.json', bundlerOptions: {
3
diff --git a/assets/js/components/TourTooltips.js b/assets/js/components/TourTooltips.js @@ -80,7 +80,7 @@ export const GA_ACTIONS = { COMPLETE: 'feature_tooltip_complete', }; -export default function TourTooltips( { steps, tourID, gaEventCategory, callback = () => {} } ) { +export default function TourTooltips( { steps, tourID, gaEventCategory, callback } ) { const stepKey = `${ tourID }-step`; const runKey = `${ tourID }-run`; const { setValue } = useDispatch( CORE_UI ); @@ -180,7 +180,9 @@ export default function TourTooltips( { steps, tourID, gaEventCategory, callback endTour(); } + if ( callback ) { callback( data ); + } }; // Start tour on initial render
2
diff --git a/modules/terceptAnalyticsAdapter.js b/modules/terceptAnalyticsAdapter.js @@ -2,7 +2,6 @@ import { ajax } from '../src/ajax.js'; import adapter from '../src/AnalyticsAdapter.js'; import adapterManager from '../src/adapterManager.js'; import CONSTANTS from '../src/constants.json'; -import * as url from '../src/url.js'; import * as utils from '../src/utils.js'; const emptyUrl = ''; @@ -117,7 +116,7 @@ function send(data, status) { } data.initOptions = initOptions; - let terceptAnalyticsRequestUrl = url.format({ + let terceptAnalyticsRequestUrl = utils.buildUrl({ protocol: 'https', hostname: (initOptions && initOptions.hostName) || defaultHostName, pathname: (initOptions && initOptions.pathName) || defaultPathName,
14
diff --git a/articles/migrations/index.md b/articles/migrations/index.md @@ -38,8 +38,7 @@ Auth0 is expanding into new global regions, and traffic originating from these r If you are using a custom database connection, rule, and/or custom email provider that connects to your environment, **and** you have implemented firewall restrictions for IP address ranges, then you are affected by this change. You will need to make sure the following IP addresses are in your firewall rules: ``` -13.55.232.24, 13.54.254.182, 13.210.52.131, 52.62.91.160, 52.63.36.78, 52.64.120.184, -54.66.205.24, 54.79.46.4, 54.153.131.0 +13.55.232.24, 13.54.254.182, 13.210.52.131, 52.62.91.160, 52.63.36.78, 52.64.84.177, 52.64.111.197, 52.64.120.184, 54.66.205.24, 54.79.46.4, 54.153.131.0 ``` If you have any questions, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}). @@ -57,8 +56,7 @@ Auth0 is expanding into new global regions, and traffic originating from these r If you are using a custom database connection, rule, and/or custom email provider that connects to your environment, **and** you have implemented firewall restrictions for IP address ranges, then you are affected by this change. You will need to make sure the following IP addresses are in your firewall rules: ``` -34.253.4.94, 35.156.51.163, 35.157.221.52, 52.28.184.187, 52.28.212.16, 52.29.176.99, -52.50.106.250, 52.57.230.214, 52.211.56.181, 52.213.216.142, 52.213.38.246, 52.213.74.69 +34.253.4.94, 35.156.51.163, 35.157.221.52, 52.16.193.66, 52.16.224.164, 52.28.45.240, 52.28.56.226, 52.28.184.187, 52.28.212.16, 52.29.176.99, 52.50.106.250, 52.57.230.214, 52.211.56.181, 52.213.216.142, 52.213.38.246, 52.213.74.69 ``` If you have any questions, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}).
0
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -12,6 +12,41 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 2.1.1 + +Released: 2021-09-20 + +| Package | Version | Package | Version | +|-|-|-|-| +| @uppy/angular | 0.2.3 | @uppy/progress-bar | 2.0.2 | +| @uppy/aws-s3-multipart | 2.0.3 | @uppy/provider-views | 2.0.2 | +| @uppy/aws-s3 | 2.0.3 | @uppy/react-native | 0.2.2 | +| @uppy/box | 1.0.2 | @uppy/react | 2.0.3 | +| @uppy/companion-client | 2.0.1 | @uppy/robodog | 2.0.4 | +| @uppy/core | 2.0.3 | @uppy/screen-capture | 2.0.2 | +| @uppy/dashboard | 2.0.3 | @uppy/status-bar | 2.0.2 | +| @uppy/drag-drop | 2.0.2 | @uppy/svelte | 1.0.3 | +| @uppy/drop-target | 1.0.2 | @uppy/thumbnail-generator | 2.0.3 | +| @uppy/dropbox | 2.0.2 | @uppy/transloadit | 2.0.2 | +| @uppy/facebook | 2.0.2 | @uppy/tus | 2.0.2 | +| @uppy/file-input | 2.0.2 | @uppy/unsplash | 1.0.2 | +| @uppy/form | 2.0.2 | @uppy/url | 2.0.2 | +| @uppy/golden-retriever | 2.0.3 | @uppy/utils | 4.0.1 | +| @uppy/google-drive | 2.0.2 | @uppy/vue | 0.4.1 | +| @uppy/image-editor | 1.0.2 | @uppy/webcam | 2.0.2 | +| @uppy/informer | 2.0.2 | @uppy/xhr-upload | 2.0.3 | +| @uppy/instagram | 2.0.2 | @uppy/zoom | 1.0.2 | +| @uppy/locales | 2.0.1 | uppy | 2.1.1 | +| @uppy/onedrive | 2.0.2 | - | - | + +- @uppy/unsplash: Fix "attempted to use private field on non-instance" in `SearchProvider` (#3201) +- @uppy/locales: Add 'done' to `nb_NO.js` (#3200) +- @uppy/transloadit: Fix unhandledPromiseRejection failures (#3197) +- @uppy/aws-s3-multipart: Fix AbortController is not defined on Node.js (Server Side Render) (#3169) +- @uppy/aws-s3-multipart: Fix `net::ERR_OUT_OF_MEMORY` (#3183) +- @uppy/dashboard: Fix `autoOpenFileEditor` (#3186) +- @uppy/dashboard: Update Google Drive for brand compliance (#3178) + ## 2.1.0 Released: 2021-09-01
0
diff --git a/src/PlaywrightSharp.Tests/Page/GoToTests.cs b/src/PlaywrightSharp.Tests/Page/GoToTests.cs @@ -35,7 +35,7 @@ namespace PlaywrightSharp.Tests.Page [Fact(Timeout = PlaywrightSharp.Playwright.DefaultTimeout)] public async Task ShouldWorkWithFileURL() { - string fileurl = "file://" + TestUtils.GetWebServerFile(Path.Combine("frames", "two-frames.html")).Replace("\\", "/"); + string fileurl = new Uri(TestUtils.GetWebServerFile(Path.Combine("frames", "two-frames.html"))).AbsoluteUri; await Page.GoToAsync(fileurl); Assert.Equal(fileurl.ToLower(), Page.Url.ToLower()); Assert.Equal(3, Page.Frames.Length);
7
diff --git a/src/observable/map/FilteredMap.js b/src/observable/map/FilteredMap.js @@ -91,9 +91,10 @@ export class FilteredMap extends BaseObservableMap { const isIncluded = this._filter(value, key); this._included.set(key, isIncluded); this._emitForUpdate(wasIncluded, isIncluded, key, value, params); - } + } else { this.emitUpdate(key, value, params); } + } _emitForUpdate(wasIncluded, isIncluded, key, value, params = null) { if (wasIncluded && !isIncluded) { @@ -191,5 +192,31 @@ export function tests() { // "filter changed values": assert => { // }, + + "emits must trigger once": assert => { + const source = new ObservableMap(); + let count_add = 0, count_update = 0, count_remove = 0; + source.add("num1", 1); + source.add("num2", 2); + source.add("num3", 3); + const oddMap = new FilteredMap(source, x => x % 2 !== 0); + oddMap.subscribe({ + onAdd() { + count_add += 1; + }, + onRemove() { + count_remove += 1; + }, + onUpdate() { + count_update += 1; + } + }); + source.set("num3", 4); + source.set("num3", 5); + source.set("num3", 7); + assert.strictEqual(count_add, 1); + assert.strictEqual(count_update, 1); + assert.strictEqual(count_remove, 1); + } } }
1
diff --git a/lib/global-admin/addon/templates/-saml-config.hbs b/lib/global-admin/addon/templates/-saml-config.hbs {{#if (eq providerName 'keycloak')}} <div class="col span-6"> <label class="acc-label pb-5"> - {{t "authPage.saml.disabled.entityId.labelText" appName=settings.appName}}{{field-required}} + {{t "authPage.saml.disabled.entityId.labelText" appName=settings.appName}} </label> {{input type="text"
2
diff --git a/assets/js/modules/analytics/util/property.test.js b/assets/js/modules/analytics/util/property.test.js @@ -29,13 +29,13 @@ describe( 'matchPropertyByURL', () => { /* eslint-enable */ ]; - it( 'should return a correct property that has matching website URL', async () => { - const property = await matchPropertyByURL( properties, 'https://www.example.com' ); + it( 'should return a correct property that has matching website URL', () => { + const property = matchPropertyByURL( properties, 'https://www.example.com' ); expect( property ).toEqual( properties[ 0 ] ); } ); - it( 'should return NULL when URL does not match', async () => { - const property = await matchPropertyByURL( properties, 'http://wrongsite.com' ); + it( 'should return NULL when URL does not match', () => { + const property = matchPropertyByURL( properties, 'http://wrongsite.com' ); expect( property ).toBeNull(); } ); } );
2
diff --git a/client/components/lists/list.js b/client/components/lists/list.js @@ -95,7 +95,7 @@ BlazeComponent.extendComponent({ $cards.sortable('cancel'); if (MultiSelection.isActive()) { - Cards.find(MultiSelection.getMongoSelector()).forEach((card, i) => { + Cards.find(MultiSelection.getMongoSelector(), {sort: ['sort']}).forEach((card, i) => { const newSwimlaneId = targetSwimlaneId ? targetSwimlaneId : card.swimlaneId || defaultSwimlaneId;
5
diff --git a/Apps/Sandcastle/gallery/Polyline Dash.html b/Apps/Sandcastle/gallery/Polyline Dash.html @@ -74,7 +74,7 @@ var cyanLine = viewer.entities.add({ width : 10, material : new Cesium.PolylineDashMaterialProperty({ color : Cesium.Color.CYAN, - dashPattern: 3087.0 + dashPattern: parseInt("110000001111", 2) }) } }); @@ -87,7 +87,7 @@ var yellowLine = viewer.entities.add({ width : 10, material : new Cesium.PolylineDashMaterialProperty({ color : Cesium.Color.YELLOW, - dashPattern: 43690.0 + dashPattern: parseInt("1010101010101010", 2) }) } });
14
diff --git a/src/lib/gundb/UserStorageClass.js b/src/lib/gundb/UserStorageClass.js @@ -4,14 +4,9 @@ import { find, flatten, get, -<<<<<<< HEAD identity, isArray, isEqual, -======= - isEqual, - isNull, ->>>>>>> 601947b6d61fb07a47a5edcca401a495407bc705 keys, maxBy, memoize, @@ -1008,9 +1003,13 @@ export class UserStorage { } return false } -<<<<<<< HEAD - return false -======= + }) + const updates = await Promise.all(promises) + if (updates.find(_ => _)) { + logger.debug('initFeed updating cache', this.feedIds, updates) + AsyncStorage.setItem('GD_feed', this.feedIds) + } + this.feed.get('byid').onThen(items => { if (items && items._) { delete items._ @@ -1041,15 +1040,7 @@ export class UserStorage { } }) .catch(e => logger.error('error caching feed items', e.message, e)) - res() - }, true) ->>>>>>> 601947b6d61fb07a47a5edcca401a495407bc705 }) - const updates = await Promise.all(promises) - if (updates.find(_ => _)) { - logger.debug('initFeed updating cache', this.feedIds, updates) - AsyncStorage.setItem('GD_feed', this.feedIds) - } } async startSystemFeed() { @@ -1896,7 +1887,7 @@ export class UserStorage { const gunGroupIndexValue = this.gun.get(group).get(value) const groupValue = await gunGroupIndexValue.then() - if (!isNull(groupValue)) { + if (groupValue && groupValue.profile) { return { gunProfile: gunGroupIndexValue.get('profile'), } @@ -1904,13 +1895,8 @@ export class UserStorage { } const searchField = initiatorType && `by${initiatorType}` -<<<<<<< HEAD - const byIndex = searchField && getProfile(`users/${searchField}`, initiator) - const byAddress = address && getProfile('users/bywalletAddress', address) -======= const byIndex = searchField && getProfile(this.trust[searchField] || `users/${searchField}`, initiator) const byAddress = address && getProfile(this.trust.bywalletAddress || `users/bywalletAddress`, address) ->>>>>>> 601947b6d61fb07a47a5edcca401a495407bc705 const [profileByIndex, profileByAddress] = await Promise.all([byIndex, byAddress])
0
diff --git a/.github/dependabot.yml b/.github/dependabot.yml @@ -10,11 +10,6 @@ updates: schedule: interval: monthly open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: monthly - open-pull-requests-limit: 10 ignore: - dependency-name: css-loader versions: @@ -28,3 +23,8 @@ updates: versions: - 10.1.0 - 10.1.1 +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: monthly + open-pull-requests-limit: 10
5
diff --git a/source/components/NumericInput.js b/source/components/NumericInput.js @@ -139,6 +139,7 @@ class NumericInputBase extends Component<Props, State> { const { fallbackInputValue } = this.state; const isBackwardDelete = inputType === 'deleteContentBackward'; const isForwardDelete = inputType === 'deleteContentForward'; + const deleteCaretCorrection = isBackwardDelete ? 0 : 1; /** * ========= HANDLE HARD EDGE-CASES ============= @@ -263,15 +264,25 @@ class NumericInputBase extends Component<Props, State> { }; } + // Case: Dot was deleted with minimum fraction digits constrain defined + + if (propsMinimumFractionDigits != null && hadDotBefore && !newNumberOfDots) { + return { + caretPosition: newCaretPosition + deleteCaretCorrection, + fallbackInputValue: '', + minimumFractionDigits: dynamicMinimumFractionDigits, + value: currentNumber, + }; + } + // Case: Valid change has been made const localizedNewNumber = newNumber.toLocaleString(LOCALE, numberLocaleOptions); const hasNumberChanged = value !== newNumber; const commasDiff = getNumberOfCommas(localizedNewNumber) - getNumberOfCommas(newValue); const haveCommasChanged = commasDiff > 0; - const commaDeleteCaretCorrection = isBackwardDelete ? 0 : 1; const onlyCommasChanged = !hasNumberChanged && haveCommasChanged; - const caretCorrection = onlyCommasChanged ? commaDeleteCaretCorrection : commasDiff; + const caretCorrection = onlyCommasChanged ? deleteCaretCorrection : commasDiff; return { caretPosition: Math.max(newCaretPosition + caretCorrection, 0), fallbackInputValue: '',
8
diff --git a/app/controllers/observations_controller.rb b/app/controllers/observations_controller.rb @@ -96,10 +96,13 @@ class ObservationsController < ApplicationController end params = request.params showing_partial = (params[:partial] && PARTIALS.include?(params[:partial])) + # Humans should see this, but scrapers like social media sites and curls + # will set Accept: */* + human_or_scraper = request.format.html? || request.format == "*/*" # the new default /observations doesn't need any observations # looked up now as it will use Angular/Node. This is for legacy # API methods, and HTML/views and partials - if request.format.html? && !showing_partial + if human_or_scraper && !showing_partial search_taxon = Taxon.find_by_id( params[:taxon_id] ) unless params[:taxon_id].blank? search_place = unless params[:place_id].blank? Place.find( params[:place_id] ) rescue nil
12
diff --git a/src/physics/body.js b/src/physics/body.js @@ -411,7 +411,7 @@ class Body { var data = json; if (typeof id !== "undefined" ) { - json[id]; + data = json[id]; } // Physic Editor Format (https://www.codeandweb.com/physicseditor)
1
diff --git a/parsers/ecdc.py b/parsers/ecdc.py @@ -107,7 +107,7 @@ def parse(): cases = retrieve_case_data() cases = flatten(cases) - write_tsv(f"{LOC}/ecdcWorld.tsv", cols, cases, "world") + write_tsv(f"{LOC}/ecdcWorld.tsv", cols, cases, "ecdc") if __name__ == "__main__": # for debugging
1
diff --git a/_src/_templates/partials/header.njk b/_src/_templates/partials/header.njk <nav> <ul class="site-nav"> <li{% if page.url == "/data/" %} aria-describedby="current-page"{% endif %}> - <a{% if page.url == "/data/" %} aria-current="page" class="active"{% endif %} href="/data">Get the Data</a> + <a{% if page.url == "/data/" %} aria-current="page" class="active"{% endif %} href="/data/">Get the Data</a> </li> <li{% if page.url == "/about-tracker/" %} aria-describedby="current-page"{% endif %}> {# todo make these links real #} - <a{% if page.url == "/about-tracker/" %} aria-current="page" class="active"{% endif %} href="/#">About the Data</a> + <a{% if page.url == "/about-tracker/" %} aria-current="page" class="active"{% endif %} href="/about-tracker/">About the Data</a> </li> <li{% if page.url == "/how-you-can-help/" %} aria-describedby="current-page"{% endif %}> {# todo make these links real #} - <a{% if page.url == "/how-you-can-help/" %} aria-current="page" class="active"{% endif %} href="/#">How You Can Help</a> + <a{% if page.url == "/how-you-can-help/" %} aria-current="page" class="active"{% endif %} href="/how-you-can-help/">How You Can Help</a> </li> </ul> </nav>
1
diff --git a/src/components/DateRangePicker.js b/src/components/DateRangePicker.js @@ -63,6 +63,22 @@ const getMarkedDateRange = (dateRange: DateRange) => { return markedDates; }; +const getCalendarMarkingProps = (dateRange: ?DateOrDateRange) => { + if (dateRange && typeof dateRange === "string") { + return { + markingType: "simple", + markedDates: getMarkedDate(dateRange) + }; + } else if (dateRange && typeof dateRange === "object") { + return { + markingType: "period", + markedDates: getMarkedDateRange(dateRange) + }; + } + + return {}; +}; + type Props = { onChange: DateOrDateRange => void, dateRange?: ?DateOrDateRange @@ -96,15 +112,7 @@ class DateRangePicker extends React.PureComponent<Props> { ? getSortedDateRange(this.props.dateRange) : this.props.dateRange; - let markingType; - let markedDates; - if (dateRange && typeof dateRange === "string") { - markingType = "simple"; - markedDates = getMarkedDate(dateRange); - } else if (dateRange && typeof dateRange === "object") { - markingType = "period"; - markedDates = getMarkedDateRange(dateRange); - } + const { markingType, markedDates } = getCalendarMarkingProps(dateRange); return ( <Calendar
5
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -3,9 +3,34 @@ import React from 'react'; import * as ReactThreeFiber from '@react-three/fiber'; import metaversefile from 'metaversefile'; import {getRenderer, scene, camera, appManager} from './app-object.js'; +import {rigManager} from './rig.js'; const localVector2D = new THREE.Vector2(); +class PlayerHand { + constructor() { + this.position = new THREE.Vector3(); + this.quaternion = new THREE.Quaternion(); + } +} +class LocalPlayer { + constructor() { + this.position = new THREE.Vector3(); + this.quaternion = new THREE.Quaternion(); + this.leftHand = new PlayerHand(); + this.rightHand = new PlayerHand(); + this.hands = [ + this.leftHand, + this.rightHand, + ]; + } +} +const localPlayer = new LocalPlayer(); +let localPlayerNeedsUpdate = false; +appManager.addEventListener('startframe', e => { + localPlayerNeedsUpdate = true; +}); + class ErrorBoundary extends React.Component { constructor(props) { super(props); @@ -78,35 +103,44 @@ function createPointerEvents(store) { } let currentAppRender = null; -let currentAppFrame = null; metaversefile.setApi({ async import(s) { const m = await import(s); return m; }, useFrame(fn) { - if (currentAppRender) { + const app = currentAppRender; + if (app) { appManager.addEventListener('frame', e => { - currentAppFrame = currentAppRender; - try { fn(e.data); - } catch(err) { - console.warn(err); - } - currentAppRender = null; }); - currentAppRender.addEventListener('destroy', () => { + app.addEventListener('destroy', () => { appManager.removeEventListener('frame', fn); }); } else { - throw new Error('useFrame cannot be called outside of the render function'); + throw new Error('useFrame cannot be called outside of render()'); } }, - usePlayer() { - if (currentAppFrame) { - return player; + useLocalPlayer() { + if (localPlayerNeedsUpdate) { + if (rigManager.localRig) { + localPlayer.position.fromArray(rigManager.localRig.inputs.hmd.position); + localPlayer.quaternion.fromArray(rigManager.localRig.inputs.hmd.quaternion); + localPlayer.leftHand.position.fromArray(rigManager.localRig.inputs.leftGamepad.position); + localPlayer.leftHand.quaternion.fromArray(rigManager.localRig.inputs.leftGamepad.quaternion); + localPlayer.rightHand.position.fromArray(rigManager.localRig.inputs.rightGamepad.position); + localPlayer.rightHand.quaternion.fromArray(rigManager.localRig.inputs.rightGamepad.quaternion); } else { + localPlayer.position.set(0, 0, 0); + localPlayer.quaternion.set(0, 0, 0, 1); + localPlayer.leftHand.position.set(0, 0, 0); + localPlayer.leftHand.quaternion.set(0, 0, 0, 1); + localPlayer.rightHand.position.set(0, 0, 0); + localPlayer.rightHand.quaternion.set(0, 0, 0, 1); + } + localPlayerNeedsUpdate = false; } + return localPlayer; }, add(m) { const appId = appManager.getNextAppId(); @@ -266,4 +300,4 @@ window.metaversefile = metaversefile; metaversefile.add(module); }); -export default {}; \ No newline at end of file +export default metaversefile; \ No newline at end of file
0
diff --git a/generators/app/index.js b/generators/app/index.js @@ -197,12 +197,6 @@ module.exports = class extends BaseBlueprintGenerator { type: String, }); - // This adds support for a `--prettier-java` flag - this.option('prettier-java', { - desc: `Launch prettier-java pre-formatting at generation (default: ${appDefaultConfig.prettierJava})`, - type: Boolean, - }); - // Just constructing help, stop here if (this.options.help) { return;
2
diff --git a/src/core/service/api/context/audio.js b/src/core/service/api/context/audio.js @@ -9,7 +9,7 @@ const eventNames = [ 'pause', 'stop', 'ended', - 'timeupdate', + 'timeUpdate', 'error', 'waiting', 'seeking', @@ -69,7 +69,7 @@ class InnerAudioContext { this._callbacks = {} this._options = {} eventNames.forEach(name => { - this._callbacks[name] = [] + this._callbacks[name.toLowerCase()] = [] }) props.forEach(item => { const name = item.name @@ -103,11 +103,12 @@ class InnerAudioContext { this._operate('stop') } seek (position) { - this._operate('play', { - currentTime: position + this._operate('seek', { + currentTime: position * 1e3 }) } destroy () { + clearInterval(audio.__timing) invokeMethod('destroyAudioInstance', { audioId: this.id }) @@ -123,6 +124,7 @@ class InnerAudioContext { eventNames.forEach(item => { const name = item[0].toUpperCase() + item.substr(1) + item = item.toLowerCase() InnerAudioContext.prototype[`on${name}`] = function (callback) { this._callbacks[item].push(callback) } @@ -135,6 +137,17 @@ eventNames.forEach(item => { } }) +function emit (audio, state, errMsg, errCode) { + audio._callbacks[state].forEach(callback => { + if (typeof callback === 'function') { + callback(state === 'error' ? { + errMsg, + errCode + } : {}) + } + }) +} + onMethod('onAudioStateChange', ({ state, audioId, @@ -142,14 +155,20 @@ onMethod('onAudioStateChange', ({ errCode }) => { const audio = innerAudioContexts[audioId] - audio && audio._callbacks[state].forEach(callback => { - if (typeof callback === 'function') { - callback(state === 'error' ? { - errMsg, - errCode - } : {}) + if (audio) { + emit(audio, state, errMsg, errCode) + if (state === 'play') { + const oldCurrentTime = audio.currentTime + audio.__timing = setInterval(() => { + const currentTime = audio.currentTime + if (currentTime !== oldCurrentTime) { + emit(audio, 'timeupdate') + } + }, 200) + } else if (state === 'pause' || state === 'stop' || state === 'error') { + clearInterval(audio.__timing) + } } - }) }) const innerAudioContexts = Object.create(null)
1
diff --git a/resources/prosody-plugins/mod_muc_size.lua b/resources/prosody-plugins/mod_muc_size.lua @@ -9,6 +9,7 @@ local it = require "util.iterators"; local json = require "util.json"; local iterators = require "util.iterators"; local array = require"util.array"; +local wrap_async_run = module:require "util".wrap_async_run; local tostring = tostring; local neturl = require "net.url"; @@ -192,9 +193,9 @@ function module.load() module:provides("http", { default_path = "/"; route = { - ["GET room-size"] = handle_get_room_size; + ["GET room-size"] = function (event) return wrap_async_run(event,handle_get_room_size) end; ["GET sessions"] = function () return tostring(it.count(it.keys(prosody.full_sessions))); end; - ["GET room"] = handle_get_room; + ["GET room"] = function (event) return wrap_async_run(event,handle_get_room) end; }; }); end
9
diff --git a/lib/player.js b/lib/player.js @@ -915,7 +915,7 @@ shaka.Player.prototype.selectTrack = function(track, opt_clearBuffer) { if (track.type != 'text') { - // Save current text stream to insure that it doesn't get overriden + // Save current text stream to insure that it doesn't get overridden // by a default one inside shaka.Player.configure() var activeStreams = this.streamingEngine_.getActiveStreams(); var currentTextStream = activeStreams['text']; @@ -924,8 +924,10 @@ shaka.Player.prototype.selectTrack = function(track, opt_clearBuffer) { var config = {abr: {enabled: false}}; this.configure(config); + if (currentTextStream) { streamsToSwitch['text'] = currentTextStream; } + } this.deferredSwitch_(streamsToSwitch, opt_clearBuffer); };
1
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -319,7 +319,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment chatReportID: oneOnOneChatReport.reportID, transactionID: oneOnOneIOUReportAction.originalMessage.IOUTransactionID, reportActionID: oneOnOneIOUReportAction.reportActionID, - clientID: oneOnOneIOUReportAction.sequenceNumber, + clientID: oneOnOneIOUReportAction.clientID, }); }); @@ -328,7 +328,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment chatReportID: groupChatReport.reportID, transactionID: groupIOUReportAction.originalMessage.IOUTransactionID, reportActionID: groupIOUReportAction.reportActionID, - clientID: groupIOUReportAction.sequenceNumber, + clientID: groupIOUReportAction.clientID, }, splits, onyxData: {optimisticData, successData, failureData},
4
diff --git a/token-metadata/0x408e41876cCCDC0F92210600ef50372656052a38/metadata.json b/token-metadata/0x408e41876cCCDC0F92210600ef50372656052a38/metadata.json "symbol": "REN", "address": "0x408e41876cCCDC0F92210600ef50372656052a38", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/server/scripts/scraper.js b/src/server/scripts/scraper.js //destructing the command line argumentsn const [,,...args]= process.argv +let scraper + switch(args[0]) { case '--only=users': - require('../services/scraper/users').scrape() + scraper = require('../services/scraper/users') break; case '--only=repos': - require('../services/scraper/repos').scrape() + scraper = require('../services/scraper/repos') break; default: - require('../services/scraper').scrape(); - + scraper = require('../services/scraper') } +(async () => { + try { + await scraper.scrape() + process.exit(0) + } catch(error) { + console.error(error) + process.exit(1) + } +})() \ No newline at end of file
3
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,45 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.31.0] -- 2017-10-05 + +### Added +- Add `table` trace type [#2030] +- Add `geo.center` making geo views fully reproducible using layout attributes [#2030] +- Add lasso and select-box drag modes to `scattergeo` and `choropleth` traces + [#2030] +- Add lasso and select-box drag modes to `bar` and `histogram` traces [#2045] +- Add `scale` option to `Plotly.toImage` and `Plotly.downloadImage` [#1979] +- Add `plot-schema.json` to `dist/`[#1999] + +### Changed +- Throttle lasso and select-box events for smoother behavior [#2040] +- Harmonize gl3d and gl2d zoom speed with cartesian behavior [#2041] + +### Fixed +- Fix numerous `restyle` and `relayout` bugs [#1999] +- Fix handling of extreme off-plot data points in scatter lines [#2060] +- Fix `hoverinfo` array support for `scattergeo`, `choropleth`, + `scatterternary` and `scattermapbox` traces [#2055] +- Fix `Plotly.plot` MathJax promise chain resolution [#1991] +- Fix legend double-click trace isolation behavior for graphs with + `visible: false` traces [#2019] +- Fix legend visibility toggling for traces with `groupby` transforms [#2019] +- Fix single-bin histogram edge case [#2028] +- Fix autorange for bar with base zero [#2050] +- Fix annotations arrow rendering when graph div is off the DOM [#2046] +- Fix hover for graphs with `scattergeo` markers outside 'usa' scope [#2030] +- Fix handling of cross anti-meridian geo `lonaxis` ranges [#2030] +- Fix miter limit for lines on geo subplots [#2030] +- Fix `marker.opacity` handling for `scattergeo` bubbles [#2030] +- Fix layout animation of secondary axes [#1999] +- Fix `sankey` hover text placement for empty `link.label` items [#2016] +- Fix `sankey` rendering of nodes with very small values [#2017, #2021] +- Fix `sankey` hover label positioning on pages that style the + 'svg-container' div node [#2027] +- Fix aggregation transforms restyle calls [#2031] + + ## [1.30.1] -- 2017-09-06 ### Fixed
3
diff --git a/src/shaders/metallic-roughness.frag b/src/shaders/metallic-roughness.frag @@ -140,15 +140,7 @@ vec3 getIBLContribution(MaterialInfo materialInfo, vec3 v) vec3 diffuse = diffuseLight * materialInfo.diffuseColor; vec3 specular = specularLight * (materialInfo.specularColor * brdf.x + brdf.y); - vec3 factor1 = vec3(1.0); - if (materialInfo.clearcoatFactor > 0.0) - { - vec3 l = -materialInfo.normal; - AngularInfo angularInfo = getAngularInfo(l, materialInfo.normal, v); - factor1 = materialInfo.clearcoatFactor * fresnelReflection(materialInfo,angularInfo); - } - - return diffuse + specular * factor1; + return diffuse + specular; } #endif //USE_IBL @@ -199,14 +191,8 @@ vec3 getPointShade(vec3 pointToLight, MaterialInfo materialInfo, vec3 view) vec3 diffuseContrib = (1.0 - F) * diffuse(materialInfo); vec3 specContrib = F * Vis * D; - vec3 factor1 = vec3(1.0); - if (materialInfo.clearcoatFactor > 0.0) - { - factor1 = materialInfo.clearcoatFactor * fresnelReflection(materialInfo, angularInfo); - } - // Obtain final intensity as reflectance (BRDF) scaled by the energy of the light (cosine law) - return angularInfo.NdotL * (diffuseContrib + specContrib) * factor1; + return angularInfo.NdotL * (diffuseContrib + specContrib); } return vec3(0.0, 0.0, 0.0); @@ -274,7 +260,6 @@ void main() vec4 baseColor = vec4(0.0, 0.0, 0.0, 1.0); vec3 diffuseColor = vec3(0.0); vec3 specularColor= vec3(0.0); - vec3 clearcoatColor= vec3(0.0); vec3 f0 = vec3(0.04); //values from the clearcoat extension float clearcoatFactor = 0.0; @@ -364,10 +349,6 @@ void main() diffuseColor = baseColor.rgb * (vec3(1.0) - f0) * (1.0 - metallic); specularColor = mix(f0, baseColor.rgb, metallic); - - //assuming that in the metallicRoughness setting f0 stays vec3(0.04) - clearcoatColor = mix(f0,baseColor.rgb,metallic); - #endif // ! MATERIAL_METALLICROUGHNESS #ifdef ALPHAMODE_MASK @@ -417,7 +398,6 @@ void main() normal, 0.0 //Clearcoat factor is null ); - MaterialInfo clearCoatInfo = MaterialInfo( clearcoatRoughness, vec3(0.04), //fixed from specification //todo use variable from functions @@ -434,11 +414,13 @@ void main() { vec3 lightColor = vec3(0); vec3 clearcoatColor = vec3(0); + vec3 pointToLight = vec3(0); Light light = u_Lights[i]; if (light.type == LightType_Directional) { lightColor = applyDirectionalLight(light, materialInfo, view); #ifdef MATERIAL_CLEARCOAT + pointToLight = -light.direction; clearcoatColor = applyDirectionalLight(light, clearCoatInfo, view); #endif } @@ -446,6 +428,7 @@ void main() { lightColor = applyPointLight(light, materialInfo, view); #ifdef MATERIAL_CLEARCOAT + pointToLight = light.position - v_Position; clearcoatColor = applyPointLight(light, clearCoatInfo, view); #endif } @@ -453,13 +436,14 @@ void main() { lightColor = applySpotLight(light, materialInfo, view); #ifdef MATERIAL_CLEARCOAT + pointToLight = light.position - v_Position; clearcoatColor = applySpotLight(light, clearCoatInfo, view); #endif } #ifdef MATERIAL_CLEARCOAT - vec3 pointToLight = -light.direction - v_Position; AngularInfo angularInfo = getAngularInfo(pointToLight, clearCoatInfo.normal, view); color += clearcoatBlending(lightColor, clearcoatColor, clearCoatInfo.clearcoatFactor, angularInfo); + // color += clearcoatColor; #else color += lightColor; #endif
2
diff --git a/lib/node_modules/@stdlib/math/base/blas/dasum/tools/Makefile b/lib/node_modules/@stdlib/math/base/blas/dasum/tools/Makefile @@ -26,6 +26,15 @@ examples_dir := $(root_dir)/examples NODE_GYP ?= node-gyp +# Define the C compiler: +C_COMPILER ?= gcc + +# Define the Fortran compiler: +FORTRAN_COMPILER ?= gfortran + +# Define the Fortran/C linker: +LINKER ?= gfortran + # TARGETS # @@ -34,7 +43,11 @@ NODE_GYP ?= node-gyp # This target is the default target. all: - $(QUIET) cd $(src_dir) && $(MAKE) all + $(QUIET) cd $(src_dir) && \ + C_COMPILER=$(C_COMPILER) \ + FORTRAN_COMPILER=$(FORTRAN_COMPILER) \ + LINKER=$(LINKER) \ + $(MAKE) all .PHONY: all @@ -54,7 +67,11 @@ addon: # This target compiles and runs example files. examples: - $(QUIET) cd $(examples_dir) && $(MAKE) all && $(MAKE) run + $(QUIET) cd $(examples_dir) && \ + C_COMPILER=$(C_COMPILER) \ + LINKER=$(LINKER) \ + $(MAKE) all && \ + $(MAKE) run .PHONY: examples @@ -64,7 +81,11 @@ examples: # This target lists compiled libraries. list-libs: - $(QUIET) cd $(src_dir) && $(MAKE) list-libs + $(QUIET) cd $(src_dir) && \ + C_COMPILER=$(C_COMPILER) \ + FORTRAN_COMPILER=$(FORTRAN_COMPILER) \ + LINKER=$(LINKER) \ + $(MAKE) list-libs .PHONY: list-libs
12
diff --git a/src/components/WithIon.js b/src/components/WithIon.js @@ -9,8 +9,13 @@ import get from 'lodash.get'; import has from 'lodash.has'; import Ion from '../lib/Ion'; +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + export default function (mapIonToState) { - return WrappedComponent => class WithIon extends React.Component { + return (WrappedComponent) => { + class WithIon extends React.Component { constructor(props) { super(props); @@ -63,22 +68,22 @@ export default function (mapIonToState) { * * @param {object} mapping * @param {string} [mapping.path] a specific path of the store object to map to the state - * @param {mixed} [mapping.defaultValue] Used in conjunction with mapping.path to return if the there is nothing - * at mapping.path - * @param {boolean} [mapping.addAsCollection] rather than setting a single state value, this will add things to - * an array - * @param {string} [mapping.collectionId] the name of the ID property to use for the collection - * @param {string} [mapping.pathForProps] the statePropertyName can contain the string %DATAFROMPROPS% wich will - * be replaced with data from the props matching this path. That way, the component can connect to an Ion key - * that uses data from this.props. + * @param {mixed} [mapping.defaultValue] Used in conjunction with mapping.path to return if the there is + * nothing at mapping.path + * @param {boolean} [mapping.addAsCollection] rather than setting a single state value, this will add things + * to an array + * @param {string} [mapping.collectionID] the name of the ID property to use for the collection + * @param {string} [mapping.pathForProps] the statePropertyName can contain the string %DATAFROMPROPS% wich + * will be replaced with data from the props matching this path. That way, the component can connect to an + * Ion key that uses data from this.props. * * For example, if a component wants to connect to the Ion key "report_22" and * "22" comes from this.props.match.params.reportID. The statePropertyName would be set to * "report_%DATAFROMPROPS%" and pathForProps would be set to "match.params.reportID" - * @param {string} [mapping.prefillWithKey] the name of the Ion key to prefill the component with. Useful for - * loading the existing data in Ion while making an XHR to request updated data. - * @param {function} [mapping.loader] a method that will be called after connection to Ion in order to load it - * with data. Typically this will be a method that makes an XHR to load data from the API. + * @param {string} [mapping.prefillWithKey] the name of the Ion key to prefill the component with. Useful + * for loading the existing data in Ion while making an XHR to request updated data. + * @param {function} [mapping.loader] a method that will be called after connection to Ion in order to load + * it with data. Typically this will be a method that makes an XHR to load data from the API. * @param {mixed[]} [mapping.loaderParams] An array of params to be passed to the loader method * @param {string} statePropertyName the name of the state property that Ion will add the data to * @param {object} reactComponent a reference to the react component whose state needs updated by Ion @@ -150,5 +155,9 @@ export default function (mapIonToState) { /> ); } + } + + WithIon.displayName = `WithIon(${getDisplayName(WrappedComponent)})`; + return WithIon; }; }
4
diff --git a/editor/common/parseBlocks.js b/editor/common/parseBlocks.js @@ -46,16 +46,11 @@ function parseMarkDown(mdStr, parseExampleUI) { const headerText = headerParts[2]; const headerLevel = headerParts[1].length; - const {propertyName, propertyDefault, propertyType, prefixCode} = parseHeader(headerText); blocks.push({ type: 'header', level: headerLevel, value: headerText, - propertyName, - propertyDefault, - propertyType, - prefixCode, inline: false }); } @@ -201,39 +196,42 @@ function parseSingleFileBlocks(fileName, root, detailed, blocksStore) { let previousCommand; + let headerPendingInlining = null; + function addBlocks(parentCommand) { for (const command of parentCommand.children) { - if (command instanceof UseCommand) { + if ((command instanceof UseCommand) || (command instanceof ImportCommand)) { closeTextBlock(); outBlocks.push({ type: 'use', target: command.name.trim(), - args: parseArgs(command.args), - // use command can't be used inline - inline: false - }); - previousCommand = command; - } - else if (command instanceof ImportCommand) { - closeTextBlock(); - outBlocks.push({ - type: 'use', - target: command.name.trim(), - args: [], + args: command.args ? parseArgs(command.args) : [], // use command can't be used inline inline: false }); previousCommand = command; + headerPendingInlining = null; } else if (command instanceof TextNode) { if (detailed) { - textBlockText = command.value; + let text = command.value; + if (headerPendingInlining) { + const lines = text.split('\n'); + headerPendingInlining.value += lines.shift(); + if (lines.length > 0) { + headerPendingInlining = null; + } + text = lines.join('\n'); + } + + textBlockText = text; closeTextBlock(); } else { textBlockText += command.value; } previousCommand = command; + } else if (command instanceof IfCommand) { if (detailed) { @@ -241,7 +239,13 @@ function parseSingleFileBlocks(fileName, root, detailed, blocksStore) { // There is always an ElseCommand inserted between IfCommand and ElifCommand return addBlocks(command); } - + // DONT parse inline if block in header + let prevBlock = outBlocks[outBlocks.length - 1]; + if (headerPendingInlining || (prevBlock && prevBlock.type === 'header' && isInlineCommand())) { + prevBlock.value += compositeIfCommand(command); + headerPendingInlining = prevBlock; + } + else { const type = command instanceof ElseCommand ? 'else' : command instanceof ElifCommand ? 'elif' : 'if'; @@ -260,13 +264,16 @@ function parseSingleFileBlocks(fileName, root, detailed, blocksStore) { previousCommand = new CloseIfCommand(); } } + } else { // Display if, for in the text block. - textBlockText += compositeCommand(command); + textBlockText += compositeIfCommand(command); } } else if (command instanceof ForCommand) { if (detailed) { + headerPendingInlining = null; + outBlocks.push({ type: 'for', inline: isInlineCommand(), @@ -281,7 +288,7 @@ function parseSingleFileBlocks(fileName, root, detailed, blocksStore) { }); } else { - textBlockText += compositeCommand(command); + textBlockText += compositeForCommand(command); } } else { @@ -294,6 +301,18 @@ function parseSingleFileBlocks(fileName, root, detailed, blocksStore) { closeTextBlock(); + for (let block of outBlocks) { + if (block.type === 'header') { + const {propertyName, propertyDefault, propertyType, prefixCode} = parseHeader(block.value); + Object.assign(block, { + propertyName, + propertyDefault, + propertyType, + prefixCode + }); + } + } + const {topLevel, topLevelHasPrefix} = updateBlocksLevels(outBlocks); updateBlocksKeys(outBlocks);
8
diff --git a/packages/cx/src/widgets/HtmlElement.d.ts b/packages/cx/src/widgets/HtmlElement.d.ts @@ -14,8 +14,11 @@ interface HtmlElementProps extends Cx.HtmlElementProps { /** HTML to be injected into the element. */ html?: string, - styled?: boolean + styled?: boolean, + /** Allow any prop if HtmlElement is used directly. + * e.g. `<HtmlElement tag="form" onSubmit="submit" />`*/ + [key: string]: any } export class HtmlElement extends Cx.Widget<HtmlElementProps> {}
11
diff --git a/articles/quickstart/webapp/nodejs/01-login.md b/articles/quickstart/webapp/nodejs/01-login.md @@ -18,14 +18,14 @@ github: ## Configure Node.js to Use Auth0 -### Install and load the Dependencies +### Install the Dependencies To follow along this guide, install the following dependencies. * [passport](http://www.passportjs.org/) - an authentication middleware for Node.js * [passport-auth0](https://github.com/auth0/passport-auth0) - an Auth0 authentication strategy for Passport -* [express-session](https://www.npmjs.com/package/express-session) - an Express middleware to manage sessions -* [connect-ensure-login](https://github.com/jaredhanson/connect-ensure-login) - a middleware to ensure the user is logged in order to access certain routes +* [express-session](https://www.npmjs.com/package/express-session) - a middleware to manage sessions +* [connect-ensure-login](https://github.com/jaredhanson/connect-ensure-login) - a middleware to ensure a user must be logged in, in order to access certain routes ```bash # installation with npm
7
diff --git a/package.json b/package.json "style-loader": "^0.19.0", "swimmer": "^1.1.1", "url-loader": "^0.6.1", + "update-notifier": "^2.4.0", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.8.2",
1
diff --git a/src/components/View/index.js b/src/components/View/index.js @@ -52,7 +52,10 @@ class View extends Component { if (process.env.NODE_ENV !== 'production') { React.Children.toArray(this.props.children).forEach(item => { - invariant(typeof item !== 'string', 'A text node cannot be a child of a <View>'); + invariant( + typeof item !== 'string', + `Unexpected text node: ${item}. A text node cannot be a child of a <View>.` + ); }); }
7
diff --git a/lib/assets/javascripts/dashboard/views/account/account-main-view.js b/lib/assets/javascripts/dashboard/views/account/account-main-view.js @@ -4,7 +4,6 @@ const PrivateHeaderView = require('dashboard/components/private-header-view'); const HeaderViewModel = require('dashboard/views/account/header-view-model'); const TrialNotificationView = require('dashboard/components/trial-notification/trial-notification-view'); const AccountContentView = require('./account-content-view'); -const SupportView = require('dashboard/components/support-view.js'); const UpgradeMessage = require('dashboard/components/upgrade-message-view.js'); const FooterView = require('dashboard/components/footer/footer-view'); const VendorScriptsView = require('dashboard/components/vendor-scripts/vendor-scripts-view'); @@ -63,12 +62,6 @@ module.exports = CoreView.extend({ this.$('#app').append(accountContentView.render().el); this.addView(accountContentView); - const supportView = new SupportView({ - userModel: this._userModel - }); - this.$('#app').append(supportView.render().el); - this.addView(supportView); - const upgradeMessage = new UpgradeMessage({ userModel: this._userModel, configModel: this._configModel
2
diff --git a/package.json b/package.json }, "license": "MIT", "dependencies": { - "minecraft-data": "^2.61.0", + "minecraft-data": "^2.62.1", "minecraft-protocol": "^1.13.0", "mojangson": "^0.2.4", "prismarine-biome": "^1.1.0", "prismarine-block": "^1.6.0", "prismarine-chunk": "^1.20.0", "prismarine-entity": "^1.0.0", - "prismarine-item": "^1.4.0", + "prismarine-item": "^1.5.0", "prismarine-physics": "^1.0.0", "prismarine-recipe": "^1.1.0", - "prismarine-windows": "^1.4.0", + "prismarine-windows": "^1.5.0", "protodef": "^1.8.0", "sprintf-js": "^1.1.1", "vec3": "^0.1.5"
3
diff --git a/config/environments/production.rb b/config/environments/production.rb @@ -54,7 +54,7 @@ Rails.application.configure do # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true + # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise.
13
diff --git a/articles/hooks/extensibility-points/post-change-password.md b/articles/hooks/extensibility-points/post-change-password.md @@ -88,18 +88,19 @@ When you run a Hook based on the starter code, the response object is: ## Sample script: Send a notification email upon password change -In this example, we use a Hook to have SendGrid send a notification email to the user upon password change. +In this example, we use a Hook to have SendGrid send a notification email to the user upon password change. The example requires a valid SendGrid API key to be stored in [Hook Secrets](/hooks/secrets) as `SENDGRID_API_KEY`. ```js module.exports = function (user, context, cb) { const request = require('request'); + const sendgridApiKey = context.webtask.secrets.SENDGRID_API_KEY; // https://sendgrid.api-docs.io/v3.0/mail-send request.post({ url: 'https://api.sendgrid.com/v3/mail/send', headers: { - 'Authorization': 'Bearer YOUR_API_KEY' + 'Authorization': 'Bearer ' + sendgridApiKey }, json: { personalizations: [{
4
diff --git a/lib/assets/core/test/spec/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.spec.js b/lib/assets/core/test/spec/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.spec.js @@ -54,16 +54,19 @@ describe('editor/widgets/widgets-form/schema/widgets-form-time-series-schema-mod }); it('should call ._onColumnChanged when column changes', function () { - spyOn(this.model, 'updateSchema'); + spyOn(this.model, '_onColumnChanged'); this.model._initBinds(); - this.model._timeSeriesQueryModel.trigger('change:buckets'); - expect(this.model.updateSchema).toHaveBeenCalled(); + this.model.trigger('change:column'); + expect(this.model._onColumnChanged).toHaveBeenCalled(); }); it('should call .updateSchema when _timeSeriesQueryModel buckets change', function () { - spyOn(this.model, '_onColumnChanged'); + spyOn(this.model, 'updateSchema'); this.model._initBinds(); + + this.model._timeSeriesQueryModel.trigger('change:buckets'); + expect(this.model.updateSchema).toHaveBeenCalled(); }); describe('.updateSchema', function () {
1
diff --git a/server/preprocessing/other-scripts/test/test-openaire.R b/server/preprocessing/other-scripts/test/test-openaire.R @@ -34,5 +34,3 @@ output_json = vis_layout(input_data$text, input_data$metadata, max_clusters=MAX_ add_stop_words=ADDITIONAL_STOP_WORDS, testing=TRUE, list_size=-1) print(output_json) \ No newline at end of file - -fromJSON(output_json)$area \ No newline at end of file
2
diff --git a/lib/assets/core/javascripts/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.js b/lib/assets/core/javascripts/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.js var _ = require('underscore'); +var moment = require('moment'); var WidgetsFormBaseSchema = require('./widgets-form-base-schema-model'); var checkAndBuildOpts = require('../../../../helpers/required-opts'); @@ -101,6 +102,10 @@ module.exports = WidgetsFormBaseSchema.extend({ options: AGGREGATION_OPTIONS } }); + + if (!this.has('aggregation')) { + this.set('aggregation', 'month'); + } } else { this.schema = _.extend(this.schema, { bins: {
12
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md - To contribute to this project we would recommend fork this and find a friend to pair. - After you finish working on your fork, make a Pull Request and find two reviewers so we could make this collaborative. - Unit tests are mandatory to new features, but you dont need to test any plugin specific functionality -- If you plan to make any refactory, discuss with old contributors at #kamu channel on ThoughtWorks Slack first +- If you plan to make any refactory, discuss with old contributors at https://gitter.im/pykamu/Contributors - Create a card on Trello with Tech Debts for your story if you can identify any. - We don't demand to you paying all the tech debts you create during the development of new features, but we would encourage creating a second pull request paying the tech debts before submiting new features - After your first feature pull request approval you could be invited to be a reviewer as well so you could help new contributors
0
diff --git a/token-metadata/0x5b5bB9765eff8D26c24B9FF0DAa09838a3Cd78E9/metadata.json b/token-metadata/0x5b5bB9765eff8D26c24B9FF0DAa09838a3Cd78E9/metadata.json "symbol": "BI", "address": "0x5b5bB9765eff8D26c24B9FF0DAa09838a3Cd78E9", "decimals": 4, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/script/s3-deploy.sh b/script/s3-deploy.sh @@ -30,4 +30,6 @@ else export DEPLOY_DIR export DEPLOY_ARCHIVE fi -disable_parallel_processing=true bundle exec s3_website push --site _site --config-dir config +disable_parallel_processing=true +bundle exec s3_website install +java -cp $(bundle show s3_website)/*.jar s3.website.Push --site _site --config-dir config
4
diff --git a/package.json b/package.json "markdown-it-anchor": "5.2.5", "markdown-it-table-of-contents": "0.4.4", "node-fetch": "2.6.0", - "performance-leaderboard": "1.0.3", + "performance-leaderboard": "2.0.0", "puppeteer": "2.1.1", "semver": "7.1.3", "sharp": "0.25.2",
3
diff --git a/js/xenaQuery.js b/js/xenaQuery.js @@ -111,7 +111,7 @@ function mutationAttrs(list) { "chr": row.position.chrom, "start": row.position.chromstart, "end": row.position.chromend, - "gene": row.genes[0], + "gene": _.getIn(row, ['genes', 0]), "reference": row.ref, "alt": row.alt, "altGene": row.altGene,
9
diff --git a/README.md b/README.md # Pattern Lab -![Pattern Lab Logo](/patternlab.png 'Pattern Lab Logo') - [![Build Status](https://travis-ci.org/pattern-lab/patternlab-node.svg?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node) ![current release](https://img.shields.io/npm/v/@pattern-lab/patternlab-node.svg) ![license](https://img.shields.io/github/license/pattern-lab/patternlab-node.svg) [![Coverage Status](https://coveralls.io/repos/github/pattern-lab/patternlab-node/badge.svg?branch=master)](https://coveralls.io/github/pattern-lab/patternlab-node?branch=master) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![node (scoped)](https://img.shields.io/node/v/@pattern-lab/patternlab-node.svg)]() [![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node) +![Pattern Lab Logo](/patternlab.png 'Pattern Lab Logo') + This monorepo contains the core of Pattern Lab Node and all related engines, UI kits, plugins and utilities. Pattern Lab helps you and your team build thoughtful, pattern-driven user interfaces using atomic design principles. If you want to see what it looks like, check out this [online demo of Pattern Lab output](http://demo.patternlab.io/).
5
diff --git a/sandbox/src/ConfigOverrides.jsx b/sandbox/src/ConfigOverrides.jsx @@ -18,15 +18,15 @@ const defaultOverrides = { } }; -const sendEvent = configuration => { +const sendEvent = datastreamConfigOverrides => { return window.alloy("sendEvent", { renderDecisions: true, - configuration: { - ...configuration + datastreamConfigOverrides: { + ...datastreamConfigOverrides } }); }; -const setConsent = configuration => { +const setConsent = datastreamConfigOverrides => { return window.alloy("setConsent", { consent: [ { @@ -39,26 +39,26 @@ const setConsent = configuration => { } } ], - configuration: { - ...configuration + datastreamConfigOverrides: { + ...datastreamConfigOverrides } }); }; -const getIdentity = configuration => { +const getIdentity = datastreamConfigOverrides => { return window.alloy("getIdentity", { namespaces: ["ECID"], - configuration: { - ...configuration + datastreamConfigOverrides: { + ...datastreamConfigOverrides } }); }; -const appendIdentityToUrl = configuration => { +const appendIdentityToUrl = datastreamConfigOverrides => { return window .alloy("appendIdentityToUrl", { url: "https://example.com", - configuration: { - ...configuration + datastreamConfigOverrides: { + ...datastreamConfigOverrides } }) .then(url => console.log("URL with appended identity: ", url)); @@ -155,7 +155,7 @@ export default function ConfigOverrides() { <code> alloy("sendEvent",{" "} {JSON.stringify( - { renderDecisions: true, configuration: overrides }, + { renderDecisions: true, datastreamConfigOverrides: overrides }, null, 2 )}
10