code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.vue.ejs b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.vue.ejs <font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span class="d-none d-md-inline" v-text="$t('entity.action.edit')">Edit</span> </router-link> - <!--<button type="submit" - [routerLink]="['/', { outlets: { popup: '<%= entityInstance %>/'+ <%= entityInstance %>.id + '/delete'} }]" - replaceUrl="true" - queryParamsHandling="merge" - class="btn btn-danger btn-sm"> + <b-btn v-on:click="prepareRemove(<%= entityInstance %>)" + class="btn btn-danger btn-sm" + v-b-modal.removeEntity> <font-awesome-icon icon="times"></font-awesome-icon> <span class="d-none d-md-inline" v-text="$t('entity.action.delete')">Delete</span> - </button>--> + </b-btn> </div> </td> </tr> </tbody> </table> </div> + <b-modal ref="removeEntity" id="removeEntity" title="Confirm delete operation" v-bind:title="$t('entity.delete.title')" @ok="remove<%= entityAngularName %>()"> + <div class="modal-body"> + <p id="<%= jhiPrefixDashed %>-delete-<%= entityInstance %>-heading" v-bind:title="$t('<%= i18nKeyPrefix %>.delete.question')">Are you sure you want to delete this <%= entityClassHumanized %>?</p> + </div> + </b-modal> </div> </template> <script> mixins: [Principal], data() { return { + removeId: null, <%= entityInstance %>s: [] } }, axios.get(SERVER_API_URL + 'api/<%= entityInstance %>s').then(res => { vm.<%= entityInstance %>s = res.data; }); + }, + prepareRemove(instance) { + this.removeId = instance.id; + this.$refs.removeEntity.show(); + }, + remove<%= entityAngularName %>() { + let vm = this; + axios.delete(SERVER_API_URL + 'api/<%= entityInstance %>s/' + vm.removeId).then(res => { + vm.retrieve<%= entityAngularName %>s(); + vm.removeId = null; + }); } } }
2
diff --git a/pages/Compiler Options.md b/pages/Compiler Options.md @@ -83,4 +83,4 @@ Option | Type | Default ## Related * Setting compiler options in [`tsconfig.json`](./tsconfig.json.md) files. -* Setting compiler options in [MSBuild projects](./Compiler%20Options%20in%20MSBuild.md). +* Setting compiler options in [MSBuild projects](./Compiler-Options-in-MSBuild.md).
1
diff --git a/src/components/Profile-card/ProfileCard.style.js b/src/components/Profile-card/ProfileCard.style.js @@ -14,6 +14,7 @@ export const ProfileCardWrapper = styled.div` box-shadow: 0 2px 2px 0 rgba(0,0,0,.14); position: relative; margin: auto; + margin-bottom: 2.5rem; background: ${props => props.status === "Active" ? props.theme.menuColor : "gray"}; filter: ${props => props.status === "Inactive" ? "grayscale(1)" : ""}; top: 50%;
1
diff --git a/generators/kubernetes/templates/ingress.yml.ejs b/generators/kubernetes/templates/ingress.yml.ejs @@ -21,10 +21,6 @@ kind: Ingress metadata: name: <%= app.baseName.toLowerCase() %> namespace: <%= kubernetesNamespace %> - <%_ if (istio !== 'no') { _%> - annotations: - kubernetes.io/ingress.class: istio - <%_ } _%> spec: rules: - host: <%= app.baseName.toLowerCase() %>.<%= ingressDomain %>
2
diff --git a/docs/articles/documentation/test-api/selecting-page-elements/selectors.md b/docs/articles/documentation/test-api/selecting-page-elements/selectors.md @@ -201,7 +201,7 @@ const isNodeOk = ClientFunction((node, idx) => { /*...*/ }); Selector('ul').filter((node, idx) => { return isNodeOk(node, idx); -}), { isNodeOk }); +}, { isNodeOk }); ``` **Example** @@ -261,7 +261,7 @@ const isNodeOk = ClientFunction((node, idx, originNode) => { /*...*/ }); Selector('ul').find((node, idx, originNode) => { return isNodeOk(node, idx, originNode); -}), { isNodeOk }); +}, { isNodeOk }); ``` #### parent @@ -297,7 +297,7 @@ const isNodeOk = ClientFunction((node, idx, originNode) => { /*...*/ }); Selector('ul').parent((node, idx, originNode) => { return isNodeOk(node, idx, originNode); -}), { isNodeOk }); +}, { isNodeOk }); ``` #### child @@ -333,7 +333,7 @@ const isNodeOk = ClientFunction((node, idx, originNode) => { /*...*/ }); Selector('ul').child((node, idx, originNode) => { return isNodeOk(node, idx, originNode); -}), { isNodeOk }); +}, { isNodeOk }); ``` #### sibling @@ -369,7 +369,7 @@ const isNodeOk = ClientFunction((node, idx, originNode) => { /*...*/ }); Selector('ul').sibling((node, idx, originNode) => { return isNodeOk(node, idx, originNode); -}), { isNodeOk }); +}, { isNodeOk }); ``` **Example**
1
diff --git a/frameworks/keyed/react-hooks/src/main.jsx b/frameworks/keyed/react-hooks/src/main.jsx @@ -55,8 +55,8 @@ function listReducer(state, action) { const GlyphIcon = <span className="glyphicon glyphicon-remove" aria-hidden="true"></span>; const Row = memo(({ selected, item, dispatch }) => { - const select = useCallback(() => dispatch({ type: 'SELECT', id: item.id }), []), - remove = useCallback(() => dispatch({ type: 'REMOVE', id: item.id }), []); + const select = useCallback(() => dispatch({ type: 'SELECT', id: item.id }), [item.id]), + remove = useCallback(() => dispatch({ type: 'REMOVE', id: item.id }), [item.id]); return (<tr className={selected ? "danger" : ""}> <td className="col-md-1">{item.id}</td>
7
diff --git a/renderer.js b/renderer.js @@ -7,6 +7,9 @@ import * as THREE from 'three'; import {EffectComposer} from 'three/examples/jsm/postprocessing/EffectComposer.js'; import {minFov} from './constants.js'; +// XXX enable this when the code is stable; then, we will have many more places to add missing matrix updates +// THREE.Object3D.DefaultMatrixAutoUpdate = false; + let canvas = null, context = null, renderer = null, composer = null; function bindCanvas(c) {
0
diff --git a/Specs/Scene/ModelExperimental/ModelExperimentalSceneGraphSpec.js b/Specs/Scene/ModelExperimental/ModelExperimentalSceneGraphSpec.js @@ -7,6 +7,7 @@ import { Matrix4, ModelColorPipelineStage, ModelExperimentalSceneGraph, + ModelExperimentalUtility, Pass, ResourceCache, } from "../../../Source/Cesium.js"; @@ -71,12 +72,14 @@ describe( var sceneGraph = model._sceneGraph; // Reset the draw commands so we can inspect the draw command generation. model._drawCommandsBuilt = false; - sceneGraph._drawCommands = []; frameState.commandList = []; scene.renderForSpecs(); - expect(sceneGraph._drawCommands.length).toEqual(1); + + var drawCommands = sceneGraph.getDrawCommands(); + + expect(drawCommands.length).toEqual(1); + expect(drawCommands[0].pass).toEqual(Pass.OPAQUE); expect(frameState.commandList.length).toEqual(1); - expect(sceneGraph._drawCommands[0].pass).toEqual(Pass.OPAQUE); }); }); @@ -96,12 +99,14 @@ describe( var sceneGraph = model._sceneGraph; // Reset the draw commands so we can inspect the draw command generation. model._drawCommandsBuilt = false; - sceneGraph._drawCommands = []; frameState.commandList = []; scene.renderForSpecs(); - expect(sceneGraph._drawCommands.length).toEqual(1); + + var drawCommands = sceneGraph.getDrawCommands(); + + expect(drawCommands.length).toEqual(1); + expect(drawCommands[0].pass).toEqual(Pass.TRANSLUCENT); expect(frameState.commandList.length).toEqual(1); - expect(sceneGraph._drawCommands[0].pass).toEqual(Pass.TRANSLUCENT); }); }); @@ -124,13 +129,14 @@ describe( var sceneGraph = model._sceneGraph; // Reset the draw commands so we can inspect the draw command generation. model._drawCommandsBuilt = false; - sceneGraph._drawCommands = []; frameState.commandList = []; scene.renderForSpecs(); - expect(sceneGraph._drawCommands.length).toEqual(2); + + var drawCommands = sceneGraph.getDrawCommands(); + expect(drawCommands.length).toEqual(2); + expect(drawCommands[0].pass).toEqual(Pass.OPAQUE); + expect(drawCommands[1].pass).toEqual(Pass.TRANSLUCENT); expect(frameState.commandList.length).toEqual(2); - expect(sceneGraph._drawCommands[0].pass).toEqual(Pass.OPAQUE); - expect(sceneGraph._drawCommands[1].pass).toEqual(Pass.TRANSLUCENT); }); }); @@ -139,6 +145,10 @@ describe( ModelExperimentalSceneGraph.prototype, "buildDrawCommands" ).and.callThrough(); + spyOn( + ModelExperimentalSceneGraph.prototype, + "getDrawCommands" + ).and.callThrough(); return loadAndZoomToModelExperimental( { gltf: parentGltfUrl }, scene @@ -157,19 +167,23 @@ describe( expect( ModelExperimentalSceneGraph.prototype.buildDrawCommands ).toHaveBeenCalled(); + expect( + ModelExperimentalSceneGraph.prototype.getDrawCommands + ).toHaveBeenCalled(); expect(frameState.commandList.length).toEqual(primitivesCount); expect(model._drawCommandsBuilt).toEqual(true); - expect(sceneGraph._drawCommands.length).toEqual(primitivesCount); // Reset the draw command list to see if they're re-built. model._drawCommandsBuilt = false; - sceneGraph._drawCommands = []; frameState.commandList = []; scene.renderForSpecs(); expect( ModelExperimentalSceneGraph.prototype.buildDrawCommands ).toHaveBeenCalled(); + expect( + ModelExperimentalSceneGraph.prototype.getDrawCommands + ).toHaveBeenCalled(); expect(frameState.commandList.length).toEqual(primitivesCount); }); }); @@ -204,13 +218,13 @@ describe( expect(modelComponents.upAxis).toEqual(Axis.Z); expect(modelComponents.forwardAxis).toEqual(Axis.X); - expect(runtimeNodes[1].modelMatrix).toEqual( - modelComponents.nodes[0].matrix + expect(runtimeNodes[1].transform).toEqual( + ModelExperimentalUtility.getNodeTransform(modelComponents.nodes[0]) ); - expect(runtimeNodes[0].modelMatrix).toEqual( - Matrix4.multiplyByTranslation( - runtimeNodes[1].modelMatrix, - modelComponents.nodes[1].translation, + expect(runtimeNodes[0].transform).toEqual( + Matrix4.multiplyTransformation( + runtimeNodes[1].transform, + ModelExperimentalUtility.getNodeTransform(modelComponents.nodes[1]), new Matrix4() ) );
1
diff --git a/extensions/README.md b/extensions/README.md @@ -82,9 +82,9 @@ parties, extensions may be made official and incorporated in the STAC repository Please contact a STAC maintainer or open a Pull Request to add your extension to this table. -| Name | Scope | Description | Vendor | -| -------- | ----- | ----------- | ------ | -| None yet | | | | +| Name | Field Name Prefix | Scope | Description | Vendor | +| --------------------------------------------------- | ----------------- | ----- | ------------------------------------------------------------ | ---------------------------------------------- | +| [CARD4L](https://github.com/stac-extensions/card4l) | card4l | Item | How to comply to the CEOS CARD4L product family specifications (Optical and SAR) | [openEO Platform](https://platform.openeo.org) | ## Proposed extensions
0
diff --git a/io-manager.js b/io-manager.js @@ -275,9 +275,7 @@ ioManager.bindInput = () => { } case 82: { // R if (document.pointerLockElement) { - if (weaponsManager.canTry()) { - weaponsManager.menuTry(); - } else if (weaponsManager.canRotate()) { + if (weaponsManager.canRotate()) { weaponsManager.menuRotate(1); } // pe.equip('back');
2
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js @@ -66,6 +66,14 @@ RED.stack = (function() { } } entry.expand(); + } else if (entries.length === 2) { + if (entries[0] === entry) { + entries[0].collapse(); + entries[1].expand(); + } else { + entries[1].collapse(); + entries[0].expand(); + } } } else { entry.toggle();
11
diff --git a/articles/connections/apple-siwa/add-siwa-to-native-app.md b/articles/connections/apple-siwa/add-siwa-to-native-app.md @@ -22,16 +22,10 @@ For a native app, the Sign in with Apple login flow works as follows: ![Sign In with Apple Authentication Flow](/media/articles/connections/social/apple/apple-siwa-authn-flow.png) -* User authenticates via Apple's SDK on their iPhone or iPad. They receive an authorization code. The user does not have to leave the app and use a browser to log in. -* The application calls Auth0's `/oauth/token` endpoint with the following parameters: - - `subject_token`: the authorization code they received above - - `subject_token_type`: `http://auth0.com/oauth/token-type/apple-authz-code` - - `grant_type`: `urn:ietf:params:oauth:grant-type:token-exchange` - - `client_id`: their Auth0 Client ID - - `audience` and `scope` as needed (optional) - - Auth0 exchanges the `subject_token` (authorization code) with Apple for an ID token, access token, and refresh token from Apple. -* Auth0 saves the user profile, executes rules and authorization, then issues Auth0 access tokens (refresh tokens and ID tokens) as requested. These tokens are used to protect your APIs and users managed by Auth0. +* **Steps 1 & 2**: User authenticates via Apple's SDK on their iOS device, and receive an authorization code in the response. The user does not have to leave the app and use a browser to log in. +* **Step 3**: The application calls Auth0's `/oauth/token` endpoint to exchange the Apple authorization code for Auth0 tokens. +* **Step 4 & 5**: The Auth0 platform exchanges the Authorization code with Apple for tokens. Auth0 validates the tokens, and uses the claims in the tokens to construct the identity of the user. +* **Step 6**: Auth0 saves the user profile, executes rules and authorization, then issues Auth0 access tokens (refresh tokens and ID tokens) as requested. These tokens are used to protect your APIs and users managed by Auth0. ## Prerequisites @@ -41,7 +35,6 @@ Before you configure Sign In with Apple for your native app in Auth0, do the fol * [Set Up Apps in the Apple Developer Portal](/connections/apple-siwa/set-up-apple). Make a note of the following IDs and key for the application connection settings in the Auth0 Dashboard: - * **App ID** * **Apple Team ID** * **Client Secret Signing Key**
2
diff --git a/plugins/cleanpaste/trumbowyg.cleanpaste.js b/plugins/cleanpaste/trumbowyg.cleanpaste.js plugins: { cleanPaste: { init: function (trumbowyg) { - trumbowyg.pasteHandlers.push(function () { + trumbowyg.pasteHandlers.push(function (pasteEvent) { setTimeout(function () { try { - trumbowyg.$ed.html(cleanIt(trumbowyg.$ed.html())); + trumbowyg.saveRange(); + + var clipboardData = (pasteEvent.originalEvent || pasteEvent).clipboardData, + pastedData = clipboardData.getData('Text'), + node = trumbowyg.doc.getSelection().focusNode, + range = trumbowyg.doc.createRange(), + cleanedPaste = cleanIt(pastedData.trim()), + newNode = $(cleanedPaste)[0] || trumbowyg.doc.createTextNode(cleanedPaste); + + if (trumbowyg.$ed.html() === '') { + // simply append if there is no content in editor + trumbowyg.$ed[0].appendChild(newNode); + } else { + // insert pasted content behind last focused node + range.setStartAfter(node); + range.setEndAfter(node); + trumbowyg.doc.getSelection().removeAllRanges(); + trumbowyg.doc.getSelection().addRange(range); + + trumbowyg.range.insertNode(newNode); + } + + // now set cursor right after pasted content + range = trumbowyg.doc.createRange() + range.setStartAfter(newNode); + range.setEndAfter(newNode); + trumbowyg.doc.getSelection().removeAllRanges(); + trumbowyg.doc.getSelection().addRange(range); + + // prevent defaults + pasteEvent.stopPropagation(); + pasteEvent.preventDefault(); + + // save new node as focused node + trumbowyg.saveRange(); + trumbowyg.syncCode(); } catch (c) { } }, 0);
7
diff --git a/assets/src/libraries/BookList.js b/assets/src/libraries/BookList.js import React, { Component } from 'react'; import Book from './Book'; +import BookDetail from './BookDetail'; export default class BookList extends Component { constructor(props) { super(props); this.state = { - books: [] + books: [], + open: false, + currentBook: {} }; + this.showDetail = this.showDetail.bind(this); } componentWillMount() { @@ -21,16 +25,21 @@ export default class BookList extends Component { }); } + showDetail(book) { + this.setState({open: !this.state.open, currentBook: book}); + } + render() { let content; if (this.state.books) { content = this.state.books.map(book => { - return <Book key={book.id} book={book} service={this.props.service} /> + return <Book key={book.id} book={book} service={this.props.service} showDetail={this.showDetail} /> }); } return ( <div className="book-list"> + <BookDetail open={this.state.open} showDetail={this.showDetail} book={this.state.currentBook} /> {content} </div> );
0
diff --git a/package.json b/package.json "name": "thorium-react", "version": "0.1.0", "private": true, + "description": "React + Apollo Client Front End for Thorium simulator controls", + "repository": { + "type": "git", + "url": "git+https://github.com/Thorium-Sim/thorium-react.git" + }, + "author": "Alex Anderson <[email protected]>", + "license": "Unlicensed", + "bugs": { + "url": "https://github.com/Thorium-Sim/thorium-react/issues" + }, + "homepage": "https://github.com/Thorium-Sim/thorium-react#readme", "devDependencies": { "babel-core": "^6.22.1", "babel-eslint": "^7.1.1",
3
diff --git a/packages/inertia-vue3/src/useRemember.js b/packages/inertia-vue3/src/useRemember.js @@ -8,7 +8,7 @@ export default function useRemember(data, key) { } const restored = Inertia.restore(key) - const remembered = restored === undefined ? data : (isReactive(data) ? reactive(data) : ref(restored)) + const remembered = restored === undefined ? data : (isReactive(data) ? reactive(restored) : ref(restored)) watch(remembered, (value) => Inertia.remember(cloneDeep(value), key), { immediate: true, deep: true }) return remembered
1
diff --git a/suneditor/js/suneditor.js b/suneditor/js/suneditor.js @@ -1384,16 +1384,22 @@ SUNEDITOR.defaultLang = { var findA = true; var map = "B|U|I|STRIKE|FONT|SIZE|"; var check = new RegExp(map, "i"); + var cssText, i; while (!/^(?:P|BODY|HTML|DIV)$/i.test(selectionParent.nodeName)) { - var nodeName = (/^STRONG$/.test(selectionParent.nodeName) ? 'B' : (/^EM/.test(selectionParent.nodeName) ? 'I' : selectionParent.nodeName)); + if (selectionParent.nodeType === 3) { + selectionParent = selectionParent.parentNode; + continue; + } + + var nodeName = [(/^STRONG$/.test(selectionParent.nodeName) ? 'B' : (/^EM/.test(selectionParent.nodeName) ? 'I' : selectionParent.nodeName))]; /** Font */ - if (findFont && selectionParent.nodeType === 1 && (selectionParent.style.fontFamily.length > 0 || (/^FONT$/i.test(nodeName) && selectionParent.face.length > 0))) { - nodeName = 'FONT'; + if (findFont && selectionParent.nodeType === 1 && (selectionParent.style.fontFamily.length > 0 || (!!selectionParent.face && selectionParent.face.length > 0))) { + nodeName.push('FONT'); var selectFont = (selectionParent.style.fontFamily || selectionParent.face || SUNEDITOR.lang.toolbar.font).replace(/["']/g,""); - dom.changeTxt(editor.commandMap[nodeName], selectFont); + dom.changeTxt(editor.commandMap['FONT'], selectFont); findFont = false; - map = map.replace(nodeName + "|", ""); + map = map.replace('FONT' + "|", ""); check = new RegExp(map, "i"); } @@ -1409,19 +1415,28 @@ SUNEDITOR.defaultLang = { } /** span (font size) */ - if (findSize && /^SPAN$/i.test(nodeName) && selectionParent.style.fontSize.length > 0) { + if (findSize && selectionParent.style.fontSize.length > 0) { dom.changeTxt(editor.commandMap["SIZE"], selectionParent.style.fontSize.match(/\d+/)[0]); findSize = false; map = map.replace("SIZE|", ""); check = new RegExp(map, "i"); } + /** command */ - if (check.test(nodeName)) { - dom.addClass(editor.commandMap[nodeName], "on"); - map = map.replace(nodeName + "|", ""); + cssText = selectionParent.style.cssText; + if (/(?::|\s*)bold(?:;|\s)/.test(cssText)) nodeName.push('B'); + if (/(?::|\s*)underline(?:;|\s)/.test(cssText)) nodeName.push('U'); + if (/(?::|\s*)italic(?:;|\s)/.test(cssText)) nodeName.push('I'); + if (/(?::|\s*)line-through(?:;|\s)/.test(cssText)) nodeName.push('STRIKE'); + + for (i = 0; i < nodeName.length; i++) { + if (check.test(nodeName[i])) { + dom.addClass(editor.commandMap[nodeName[i]], "on"); + map = map.replace(nodeName[i] + "|", ""); check = new RegExp(map, "i"); } + } selectionParent = selectionParent.parentNode; }
3
diff --git a/token-metadata/0x0000000000004946c0e9F43F4Dee607b0eF1fA1c/metadata.json b/token-metadata/0x0000000000004946c0e9F43F4Dee607b0eF1fA1c/metadata.json "symbol": "CHI", "address": "0x0000000000004946c0e9F43F4Dee607b0eF1fA1c", "decimals": 0, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/rollup.config.js b/rollup.config.js @@ -3,7 +3,11 @@ import nodeResolve from 'rollup-plugin-node-resolve'; export default { plugins: [ - buble(), + buble({ + transforms: { + dangerousForOf: true + } + }), nodeResolve() ] };
0
diff --git a/src/graphql/util.js b/src/graphql/util.js @@ -378,7 +378,7 @@ export function createConnectionType( new GraphQLList( new GraphQLNonNull( new GraphQLObjectType({ - name: `${typeName}Edges`, + name: `${typeName}Edge`, interfaces: [Edge], fields: { node: { type: new GraphQLNonNull(nodeType) },
10
diff --git a/articles/api/authentication/_userinfo.md b/articles/api/authentication/_userinfo.md @@ -17,23 +17,27 @@ curl --request GET \ ``` ```javascript +// Script uses auth0.js v8. See Remarks for details. <script src="${auth0js_urlv8}"></script> <script type="text/javascript"> + // Initialize the Auth0 client var webAuth = new auth0.WebAuth({ domain: '${account.namespace}', clientID: '${account.clientId}' }); -</script> + // Parse the URL and extract the access_token webAuth.parseHash(window.location.hash, function(err, authResult) { if (err) { return console.log(err); } - webAuth.client.userInfo(authResult.accessToken, function(err, user) { - // Now you have the user's information + // This method will make a request to the /userinfo endpoint + // and return the user object, which contains the user's information, + // similar to the response below. }); }); +</script> ``` > RESPONSE SAMPLE: @@ -84,6 +88,15 @@ This endpoint will work only if `openid` was granted as a scope for the `access_ <%= include('../../_includes/_test-with-postman') %> +### Remarks +- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7). +- The auth0.js `parseHash` method, requires that your tokens are signed with `RS256`, rather than `HS256`. For more information about this, check the [Auth0.js v8 Migration Guide](/libraries/auth0js/migration-guide#the-parsehash-method). + + +### More Information +- [Auth0.js v8 Reference: Extract the authResult and get user info](/libraries/auth0js#extract-the-authresult-and-get-user-info) + + ## Get Token Info <h5 class="code-snippet-title">Examples</h5>
0
diff --git a/includes/Experiments.php b/includes/Experiments.php @@ -371,6 +371,7 @@ class Experiments extends Service_Base implements HasRequirements { 'label' => __( 'Improved Autosaves', 'web-stories' ), 'description' => __( 'Enable improved autosaves support', 'web-stories' ), 'group' => 'editor', + 'default' => true, ], /** * Author: @timarney
7
diff --git a/README.md b/README.md + # Sidewalk Webpage Want a Project Sidewalk server set up for your city/municipality? You can read about things we consider when choosing new deployment cities on our [Wiki](https://github.com/ProjectSidewalk/SidewalkWebpage/wiki/Considerations-when-Preparing-for-and-Deploying-to-New-Cities) including geographic diversity, presence of local advocates, funding, etc. You can also read some past discussions [here](https://github.com/ProjectSidewalk/SidewalkWebpage/issues/1379), [here](https://github.com/ProjectSidewalk/SidewalkWebpage/issues/1626), and [here](https://github.com/ProjectSidewalk/SidewalkWebpage/issues/281). @@ -35,7 +36,7 @@ WSL2 is recommended for much faster compile times (especially for Windows Home u 1. Run `git clone https://github.com/ProjectSidewalk/SidewalkWebpage.git`. ##### Transferring files from Windows to Linux VM -One issue you may encounter when setting up your dev environment within the Linux VM is transferring files (like the database dump and API keys) into the VM itself. +One issue you may encounter when setting up your dev environment within the Linux VM is transferring files (like the database dump) into the VM itself. 1. A simple solution is to open **File Explorer** and, inside the search box at the top, type in `\\wsl$` (this will connect you through network to the Linux VM). 1. Locate the Linux VM within your Project Sidewalk directory (you can right click on it to pin it in your File Explorer) and find the `/mnt` folder. @@ -62,8 +63,9 @@ Here are the instructions to run Project Sidewalk locally for the first time. If On Windows, we recommend [Windows Powershell](https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7) (built in to Win10). On Mac, use the basic terminal or, even better, [iTerm2](https://www.iterm2.com/). On Linux (or if you're using WSL2 on Windows), the default Linux Shell (such as [Bash](https://www.gnu.org/software/bash/)) is a great choice. -1. Email Mikey ([email protected]) and ask for the two API key files and a database dump. You will put the API key files into the root directory of the project. Rename the database dump `sidewalk-dump` and put it in the `SidewalkWebpage/db` directory (other files in this dir include `init.sh` and `schema.sql`, for example). -1. If the database dump is for a city other than DC, modify the `SIDEWALK_CITY_ID` line in `docker-compose.yml` to use the appropriate ID. You can find the list of IDs for the cities starting at line 7 of `conf/cityparams.conf`. +1. Email Mikey ([email protected]) and ask for a database dump and a Google Maps API key & secret (if you are not part of our team, you'll have to [create a Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key) yourself). Rename the database dump `sidewalk-dump` and put it in the `db/` directory (other files in this dir include `init.sh` and `schema.sql`, for example). +1. Modify the `GOOGLE_MAPS_API_KEY` and `GOOGLE_MAPS_SECRET` lines in the `docker-compose.yml` using the key and secret you've acquired. +1. Modify the `SIDEWALK_CITY_ID` line in the `docker-compose.yml` to use the ID of the appropriate city. You can find the list of IDs for the cities starting at line 7 of `conf/cityparams.conf`. 1. From the root SidewalkWebpage dir, run `make dev`. This will take time (20-30 mins or more depending on your Internet connection) as the command downloads the docker images, spins up the containers, and opens a Docker shell into the webpage container. The containers (running Ubuntu Stretch) will have all the necessary packages and tools so no installation is necessary. This command also initializes the database, though we still need to import the data. Successful output of this command will look like: ```
3
diff --git a/src/ipcHelper.js b/src/ipcHelper.js @@ -56,7 +56,7 @@ process.on('message', (messageData) => { ...messageContext, done: callback, - fail: (err) => callback(err, null), + fail: (err) => callback(err), succeed: (res) => callback(null, res), getRemainingTimeInMillis() {
2
diff --git a/src/App.js b/src/App.js @@ -60,6 +60,7 @@ LogBox.ignoreLogs([ 'Warning: componentWillUpdate has been renamed', 'Accessing view manager configs directly off UIManager', 'VirtualizedLists should never be nested', + 'When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.' ]) const navigationRef = createRef()
8
diff --git a/src/userscript.ts b/src/userscript.ts @@ -32941,10 +32941,40 @@ var $$IMU_EXPORT$$; obj.filename = match[1]; obj.url = src.replace(/\/[0-9]*x[0-9]*[a-z]*(?:-[0-9]+)?(\.[^/.]*)$/, "/999999999x0w-999$1"); + + if (/\.png(?:[?#].*)?$/i.test(obj.url)) { + // thanks to lrcn80 on reddit: https://github.com/qsniyg/maxurl/issues/962 + // http://is4.mzstatic.com/image/thumb/Music6/v4/4e/92/37/4e923792-948a-ae3a-dc5b-b7416c23807a/source/999999999x0w-999.png + // https://a1.mzstatic.com/us/r1000/063/Music6/v4/4e/92/37/4e923792-948a-ae3a-dc5b-b7416c23807a/source + // https://a1.mzstatic.com/us/r30/Music6/v4/4e/92/37/4e923792-948a-ae3a-dc5b-b7416c23807a/source -- same file + // https://is3-ssl.mzstatic.com/image/thumb/Music111/v4/e1/dc/68/e1dc6808-6d55-1e38-a34d-a3807d488859/191061355977.jpg/999999999x0w-999.png + // https://a1.mzstatic.com/us/r1000/063/Music111/v4/e1/dc/68/e1dc6808-6d55-1e38-a34d-a3807d488859/191061355977.jpg + // https://is2-ssl.mzstatic.com/image/thumb/Music113/v4/c5/9c/ee/c59ceefe-719d-8a49-e124-201ec8738b5d/cover.jpg/999999999x0w-999.png + // https://a1.mzstatic.com/us/r1000/063/Music113/v4/c5/9c/ee/c59ceefe-719d-8a49-e124-201ec8738b5d/cover.jpg + match = src.match(/\/([^/]+\/+v4\/+(?:[a-f0-9]{2}\/+){3}[-0-9a-f]{20,}\/[^/]+)\//); + if (match) { + obj.url = "https://a1.mzstatic.com/us/r1000/063/" + match[1]; + return obj; + } + } + // thanks to a-vrma on github for the idea to convert jpg to png: https://github.com/qsniyg/maxurl/issues/393 return fillobj_urls(add_full_extensions(obj.url, ["png", "jpg"], true), obj); } + if (domain_nosub === "mzstatic.com" && /^[as][0-9]+\./.test(domain)) { + // http://a3.mzstatic.com/us/r30/Music5/v4/2e/0d/6d/2e0d6d8f-bd38-9240-b150-0e989f00374e/cover170x170.jpeg + // https://s3.mzstatic.com/us/r30/Music5/v4/2e/0d/6d/2e0d6d8f-bd38-9240-b150-0e989f00374e/source -- 1800x1800 + // https://s1.mzstatic.com/eu/r30/Purple71/v4/a6/be/93/a6be93ed-e301-5e91-68c2-2c5df31a4b8a/sc2732x2048.jpeg + // https://s1.mzstatic.com/eu/r30/Purple71/v4/a6/be/93/a6be93ed-e301-5e91-68c2-2c5df31a4b8a/source + // doesn't work for all: + // https://a1.mzstatic.com/us/r1000/063/Music111/v4/e1/dc/68/e1dc6808-6d55-1e38-a34d-a3807d488859/191061355977.jpg + // https://a1.mzstatic.com/us/r1000/063/Music111/v4/e1/dc/68/e1dc6808-6d55-1e38-a34d-a3807d488859/source -- 404 + // https://a1.mzstatic.com/us/r1000/063/Music113/v4/c5/9c/ee/c59ceefe-719d-8a49-e124-201ec8738b5d/cover.jpg + // https://a1.mzstatic.com/us/r1000/063/Music113/v4/c5/9c/ee/c59ceefe-719d-8a49-e124-201ec8738b5d/source + return src.replace(/(\/v4\/+(?:[a-f0-9]{2}\/+){3}[-0-9a-f]{20,}\/+)[^/]+(?:[?#].*)?$/, "$1source"); + } + if (domain === "img-tmdetail.alicdn.com") { // https://img-tmdetail.alicdn.com/bao/uploaded///img.alicdn.com/bao/uploaded/TB1_5tiidknBKNjSZKPXXX6OFXa_!!0-item_pic.jpg_160x160q90.jpg // http://img.alicdn.com/bao/uploaded/TB1_5tiidknBKNjSZKPXXX6OFXa_!!0-item_pic.jpg
7
diff --git a/src/components/general/map-gen/MapGen.jsx b/src/components/general/map-gen/MapGen.jsx @@ -18,6 +18,7 @@ Aurora's Grove Aurora's Glade Aurora's Gully Phantom SpooKs +Deathdealers Deluxe Anima Mundi Anima Animae Blackglow @@ -93,6 +94,7 @@ Adventure's Start The Spurt Imaginarium Herbararium Hazy Daze +Orbie and Marten Luminary Middle School Robo-Petting Zoo Phoenix Fountain @@ -120,6 +122,7 @@ The Gamer's Gate Aquarius Watering Hole Artificial Asylum Bloodsap +The Hip House Fourth Wall Breaks Hollow Moon Vault Of The Sumner @@ -197,6 +200,7 @@ The Junction Smoothie's Corner Abandoned Home Kenichi's Lab +Downtownmarket Tomekeeper's Tower Bancore The Quiets
0
diff --git a/js/ascendex.js b/js/ascendex.js @@ -1381,8 +1381,8 @@ module.exports = class ascendex extends Exchange { const timeInForce = this.safeString (params, 'timeInForce'); const postOnly = this.isPostOnly (isMarketOrder, false, params); const reduceOnly = this.safeValue (params, 'reduceOnly', false); - const stopPrice = this.safeString2 (params, 'trigger', 'stopPrice'); - params = this.omit (params, [ 'timeInForce', 'postOnly', 'reduceOnly', 'stopPrice', 'trigger' ]); + const stopPrice = this.safeString2 (params, 'triggerPrice', 'stopPrice'); + params = this.omit (params, [ 'timeInForce', 'postOnly', 'reduceOnly', 'stopPrice', 'triggerPrice' ]); if (reduceOnly) { if (marketType !== 'swap') { throw new InvalidOrder (this.id + ' createOrder() does not support reduceOnly for ' + marketType + ' orders, reduceOnly orders are supported for perpetuals only');
10
diff --git a/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/EventPersistence.scala b/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/EventPersistence.scala @@ -298,7 +298,10 @@ class DefaultEventPersistence(recordPersistence: RecordPersistence) } else { orderBy.asc } - + val offsetClause = start match { + case None => SQLSyntax.empty + case Some(v) => sqls"offset ${v}" + } val results = sql"""select eventId, @@ -310,7 +313,7 @@ class DefaultEventPersistence(recordPersistence: RecordPersistence) from Events $whereClause ${orderByClause} - offset ${start.getOrElse(0)} + ${offsetClause} limit ${limitValue + 1}""" .map(rs => { (
7
diff --git a/assets/js/components/higherorder/withdata.js b/assets/js/components/higherorder/withdata.js @@ -255,7 +255,7 @@ const withData = ( // If we have zeroData, display the NoDataComponent. if ( zeroData ) { - return getNoDataComponent( moduleName, layoutOptions.inGrid, layoutOptions.fullWidth, layoutOptions.createGrid, module ); + return getNoDataComponent( moduleName, layoutOptions.inGrid, layoutOptions.fullWidth, layoutOptions.createGrid ); } // Render the Component when we have data, passing the datapoint.
2
diff --git a/assets/js/modules/tagmanager/hooks/useExistingTagEffect.test.js b/assets/js/modules/tagmanager/hooks/useExistingTagEffect.test.js */ import { renderHook, actHook as act } from '../../../../../tests/js/test-utils'; import { createTestRegistry } from '../../../../../tests/js/utils'; -import { CORE_SITE } from '../../../googlesitekit/datastore/site/constants'; +import { + AMP_MODE_SECONDARY, + CORE_SITE, +} from '../../../googlesitekit/datastore/site/constants'; import { MODULES_TAGMANAGER, CONTEXT_WEB } from '../datastore/constants'; import * as factories from '../datastore/__factories__'; import useExistingTagEffect from './useExistingTagEffect'; @@ -35,7 +38,7 @@ describe( 'useExistingTagEffect', () => { // Set set no existing tag. registry.dispatch( MODULES_TAGMANAGER ).receiveGetExistingTag( null ); registry.dispatch( CORE_SITE ).receiveSiteInfo( { - ampMode: 'reader', + ampMode: AMP_MODE_SECONDARY, } ); } );
14
diff --git a/src/encoded/audit/file.py b/src/encoded/audit/file.py @@ -43,35 +43,14 @@ def audit_file_pipeline_status(value, system): yield AuditFailure('inconsistent pipeline status', detail, level='INTERNAL_ACTION') -''' -@audit_checker('File', frame=['derived_from']) -def audit_file_md5sum_integrity(value, system): - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - md5sum = value['md5sum'] - try: - hexval = int(md5sum, 16) - if len(md5sum) != 32: - detail = 'File {} '.format(value['@id']) + \ - 'has an md5sum value of {}, '.format(md5sum) + \ - 'which is not 32 characters long.' - yield AuditFailure('inconsistent md5sum', - detail, level='INTERNAL_ACTION') - except ValueError: - detail = 'File {} '.format(value['@id']) + \ - 'has an md5sum value of {}, '.format(md5sum) + \ - 'which is not a valid hexadecimal number.' - yield AuditFailure('inconsistent md5sum', - detail, level='INTERNAL_ACTION') -''' + +# def audit_file_md5sum_integrity(value, system): # removed release 55 @audit_checker('File', frame=['derived_from']) def audit_file_bam_derived_from(value, system): if value['file_format'] != 'bam': return - if value['status'] in ['deleted', 'replaced', 'revoked']: - return if 'derived_from' not in value or \ 'derived_from' in value and len(value['derived_from']) == 0: return @@ -103,17 +82,11 @@ def audit_file_bam_derived_from(value, system): detail, level='INTERNAL_ACTION') -@audit_checker('File', frame=['object'], - condition=rfa('ENCODE3', - 'modENCODE', - 'modERN', - 'GGR')) +@audit_checker('File', frame=['object']) def audit_file_processed_empty_derived_from(value, system): if value['output_category'] in ['raw data', 'reference']: return - if value['status'] in ['deleted', 'replaced', 'revoked']: - return if 'derived_from' not in value or \ 'derived_from' in value and len(value['derived_from']) == 0: detail = 'derived_from is a list of files that were used to create a given file; ' + \ @@ -127,8 +100,6 @@ def audit_file_processed_empty_derived_from(value, system): @audit_checker('File', frame=['derived_from']) def audit_file_derived_from_revoked(value, system): - if value['status'] in ['deleted', 'replaced', 'revoked']: - return if 'derived_from' in value and len(value['derived_from']) > 0: for f in value['derived_from']: if f['status'] == 'revoked': @@ -143,8 +114,6 @@ def audit_file_derived_from_revoked(value, system): @audit_checker('file', frame=['derived_from']) def audit_file_assembly(value, system): - if value['status'] in ['deleted', 'replaced', 'revoked']: - return if 'derived_from' not in value: return for f in value['derived_from']: @@ -166,9 +135,6 @@ def audit_file_assembly(value, system): 'derived_from.replicate.experiment']) def audit_file_biological_replicate_number_match(value, system): - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - if 'replicate' not in value: return @@ -211,9 +177,6 @@ def audit_file_replicate_match(value, system): does. These tend to get confused when replacing objects. ''' - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - if 'replicate' not in value: return @@ -232,17 +195,13 @@ def audit_file_replicate_match(value, system): return -@audit_checker('file', frame=['award'], - condition=rfa("ENCODE3", "modERN", "GGR")) +@audit_checker('file', frame=['award']) def audit_file_platform(value, system): ''' A raw data file should have a platform specified. Should be in the schema. ''' - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - if value['file_format'] not in raw_data_formats: return @@ -268,21 +227,12 @@ def check_presence(file_to_check, files_list): 'controlled_by.replicate', 'controlled_by.dataset', 'controlled_by.paired_with', - 'controlled_by.platform'], - condition=rfa('Roadmap', - 'ENCODE2', - 'ENCODE2-Mouse', - 'ENCODE', - 'ENCODE3', - 'modERN')) + 'controlled_by.platform']) def audit_file_controlled_by(value, system): ''' A fastq in a ChIP-seq experiment should have a controlled_by ''' - if value['status'] in ['deleted', 'replaced', 'revoked', 'archived']: - return - if value['dataset'].get('assay_term_name') not in ['ChIP-seq', 'RAMPAGE', 'CAGE', @@ -434,12 +384,9 @@ def audit_file_controlled_by(value, system): @audit_checker('file', frame='object') def audit_file_flowcells(value, system): ''' - A fastq file could have its flowcell details. + A fastq file should have its flowcell details. ''' - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - if value['file_format'] not in ['fastq']: return @@ -456,9 +403,6 @@ def audit_paired_with(value, system): A paired_with should be the same replicate ''' - if value['status'] in ['deleted', 'replaced', 'revoked']: - return - if 'paired_end' not in value: return
2
diff --git a/config/redirects.js b/config/redirects.js @@ -1304,5 +1304,9 @@ module.exports = [ { from: '/quickstart/webapp/java-spring-mvc/getting-started', to: '/quickstart/webapp/java-spring-mvc' + }, + { + from: '/quickstart/webapp/java-spring-security-mvc/00-intro', + to: '/quickstart/webapp/java-spring-security-mvc' } ];
0
diff --git a/snomed-interaction-components/js/conceptDetailsPlugin.js b/snomed-interaction-components/js/conceptDetailsPlugin.js @@ -2300,7 +2300,7 @@ function conceptDetails(divElement, conceptId, options) { this.loadLanguageRefsets = function() { var branch = options.edition; - if (historyBranch){ + if (typeof historyBranch !== "undefined"){ branch = historyBranch; } else{
1
diff --git a/common/lib/util/multicaster.ts b/common/lib/util/multicaster.ts import Logger from './logger'; +type AnyFunction = (...args: any[]) => unknown; + +export interface MulticasterInstance extends Function { + (...args: unknown[]): void; + push: (fn: AnyFunction) => void; +} + class Multicaster { - members: Array<Function>; + members: Array<AnyFunction>; // Private constructor; use static Multicaster.create instead - private constructor(members?: Array<Function>) { - this.members = members || []; + private constructor(members?: Array<AnyFunction | undefined>) { + this.members = members as Array<AnyFunction> || []; } call(...args: unknown[]): void { @@ -24,16 +31,16 @@ class Multicaster { } } - push(...args: Array<Function>): void { + push(...args: Array<AnyFunction>): void { this.members.push(...args); } - static create(members?: Array<Function>) { + static create(members?: Array<AnyFunction | undefined>): MulticasterInstance { const instance = new Multicaster(members); return Object.assign( (...args: unknown[]) => instance.call(...args), { - push: (fn: Function) => instance.push(fn) + push: (fn: AnyFunction) => instance.push(fn) } ); }
7
diff --git a/docs/development/schema/owasp.threat-dragon.schema.json b/docs/development/schema/owasp.threat-dragon.schema.json "description": "The threat models used by OWASP Threat Dragon", "type": "object", "properties": { - "tdVersion": { + "version": { "description": "Threat Dragon version used in the model", "type": "string" }, }, "required": [ "height", "width" ] }, - "tdVersion": { - "description": "Threat Dragon version used in the diagram", - "type": "string", - "minLength": 5 - }, "thumbnail": { "description": "The path to the thumbnail image for the diagram", "type": "string" "description": "The title of the data-flow diagram", "type": "string" }, + "version": { + "description": "Threat Dragon version used in the diagram", + "type": "string", + "minLength": 5 + }, "diagramJson": { "description": "The data-flow diagram components", "type": "object",
13
diff --git a/test-complete/nodejs-optic-from-triples.js b/test-complete/nodejs-optic-from-triples.js @@ -45,7 +45,7 @@ describe('Node.js Optic from triples test', function(){ op.pattern(idCol, bb('age'), ageCol), op.pattern(idCol, bb('name'), nameCol), op.pattern(idCol, bb('team'), teamCol) - ], null, null) + ], null, null, {dedup: 'on'}) .orderBy(op.desc(ageCol)) db.rows.query(output, { format: 'json', structure: 'object', columnTypes: 'header' }) .then(function(output) { @@ -82,7 +82,7 @@ describe('Node.js Optic from triples test', function(){ op.pattern(playerIdCol, bb('age'), playerAgeCol), op.pattern(playerIdCol, bb('name'), playerNameCol), op.pattern(playerIdCol, bb('team'), playerTeamCol) - ]); + ], null, null, {dedup: 'on'}); const team_plan = op.fromTriples([
0
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 14.5.2 - Fixed: clarity of invalid option warning message for objects ([#5923](https://github.com/stylelint/stylelint/pull/5923)). - Fixed: `*-list` false negatives for invalid options ([#5924](https://github.com/stylelint/stylelint/pull/5924)).
6
diff --git a/elements/simple-toolbar/lib/simple-toolbar-menu.js b/elements/simple-toolbar/lib/simple-toolbar-menu.js @@ -40,6 +40,10 @@ const SimpleToolbarMenuBehaviors = function (SuperClass) { `, ]; } + constructor() { + super(); + this.tooltipDirection = "top"; + } static get simpleButtonLayoutStyles() { return [ ...super.simpleButtonLayoutStyles, @@ -103,8 +107,27 @@ const SimpleToolbarMenuBehaviors = function (SuperClass) { part="dropdown-icon" ></simple-icon-lite> </button> + ${this.tooltipTemplate} `; } + /** + * template for button tooltip + * + * @readonly + */ + get tooltipTemplate() { + return !this.tooltipVisible + ? "" + : html`<simple-tooltip + id="tooltip" + for="menubutton" + position="${this.tooltipDirection || "top"}" + part="tooltip" + fit-to-visible-bounds + >${this.currentTooltip || this.currentLabel}</simple-tooltip + >`; + } + static get tag() { return "simple-toolbar-menu"; }
11
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -18942,7 +18942,7 @@ function convertex3() { function convertdec2421() { var input = document.getElementById("dec2421-input").value; let result = document.getElementById("dec2421-result"); - const type = document.getElementById("dec2421-select"); + const type = document.getElementById("dec2421-select").value; if(type === "Decimal"){ var x = "_"; @@ -18967,7 +18967,9 @@ function convertdec2421() { x = x + +y + "_ "; } } - }else if(type === "Binary"){ + result.innerHTML = x; + } + else if(type === "Binary"){ var x = "_"; var y = ""; input = parseInt(input,2).toString(); @@ -18991,7 +18993,9 @@ function convertdec2421() { x = x + +y + "_ "; } } - }else if(type === "Octal"){ + result.innerHTML = x; + } + else if(type === "Octal"){ var x = "_"; var y = ""; input = parseInt(input,8).toString(); @@ -19015,7 +19019,9 @@ function convertdec2421() { x = x + +y + "_ "; } } - }else if(type === "Hexa decimal"){ + result.innerHTML = x; + } + else if(type == "Hexa decimal"){ var x = "_"; var y = ""; @@ -19039,9 +19045,9 @@ function convertdec2421() { if (y.length == 4) { x = x + +y + "_ "; } - } }result.innerHTML = x; } +} //---------------------------------------------------------------------------
1
diff --git a/packages/components/src/SearchInput/SearchInput.js b/packages/components/src/SearchInput/SearchInput.js @@ -31,12 +31,16 @@ function SearchInput(props, forwardedRef) { }); const textInputRef = useRef(); - const handleOnChange = (next, changeProps) => { + const handleOnChange = React.useCallback( + (next, changeProps) => { onChange(next, changeProps); setState(next); - }; + }, + [onChange, setState], + ); - const handleOnClearClick = (event) => { + const handleOnClearClick = React.useCallback( + (event) => { const clearValue = ''; setState(clearValue); onChange(clearValue, { event }); @@ -45,7 +49,9 @@ function SearchInput(props, forwardedRef) { if (textInputRef.current) { textInputRef.current.focus(); } - }; + }, + [onChange, onClear, setState], + ); const classes = cx(styles.SearchInput, className); @@ -57,10 +63,11 @@ function SearchInput(props, forwardedRef) { prefix={<SearchPrefix isLoading={isLoading} prefix={prefix} />} ref={mergeRefs([forwardedRef, textInputRef])} suffix={ - <> - {suffix} - <ClearButton onClick={handleOnClearClick} value={state} /> - </> + <SearchSuffix + onClick={handleOnClearClick} + suffix={suffix} + value={!!state} + /> } type="search" value={state} @@ -69,7 +76,18 @@ function SearchInput(props, forwardedRef) { ); } +const SearchSuffix = React.memo(({ onClick, suffix, value }) => { + return ( + <> + {suffix} + <ClearButton onClick={onClick} value={value ? true : undefined} /> + </> + ); +}); + const SearchPrefix = React.memo(({ isLoading = false, prefix }) => { + const SearchIcon = React.useMemo(() => <FiSearch />, []); + return ( <> <View css={[ui.opacity(0.5), ui.margin.right(-1)]}> @@ -77,7 +95,7 @@ const SearchPrefix = React.memo(({ isLoading = false, prefix }) => { <Spinner size={16} /> ) : ( <Text> - <Icon icon={<FiSearch />} size={12} /> + <Icon icon={SearchIcon} size={12} /> </Text> )} </View>
7
diff --git a/src/js/services/nanoService.js b/src/js/services/nanoService.js @@ -465,7 +465,7 @@ angular.module('canoeApp.services') } root.isValidSeed = function (seedHex) { - var isValidHash = /^[0123456789ABCDEF]+$/.test(seedHex) + var isValidHash = /^[0123456789ABCDEFabcdef]+$/.test(seedHex) return (isValidHash && (seedHex.length === 64)) } @@ -536,7 +536,7 @@ angular.module('canoeApp.services') root.createWallet = function (password, seed, cb) { $log.debug('Creating new wallet') var wallet = root.createNewWallet(password) - wallet.createSeed(seed) + wallet.createSeed(seed.toUpperCase()) // Recreate existing accounts wallet.enableBroadcast(false) var emptyAccounts = 0
11
diff --git a/scenes/scenes.json b/scenes/scenes.json "prototype.scn", "silk-fountains.scn", "moon.scn", - "terrain.scn" + "terrain.scn", + "space-station", + "space-doodles.scn", + "faced-mountain.scn", + "parkour.scn", + "tron-gothic-city.scn", + "tanabata-city.scn", + "sci-fi-neon.scn", + "city.scn" ]
0
diff --git a/test/schema.alias.test.js b/test/schema.alias.test.js @@ -28,7 +28,7 @@ describe('schema alias option', function() { string: 'hello', number: 1, date: new Date(), - buffer: Buffer.from('World'), + buffer: new Buffer('World'), boolean: false, mixed: [1, [], 'three', { four: 5 }], objectId: new Schema.Types.ObjectId(), @@ -73,7 +73,7 @@ describe('schema alias option', function() { string: 'hello', number: 1, date: new Date(), - buffer: Buffer.from('World'), + buffer: new Buffer('World'), boolean: false, mixed: [1, [], 'three', { four: 5 }], objectId: new Schema.Types.ObjectId(),
14
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -5,7 +5,8 @@ This release adds the following new features: * [REST API: Add PUT method to update a card](https://github.com/wekan/wekan/pull/1095) and [related fix](https://github.com/wekan/wekan/pull/1097); * [When finished input of checklist item, open new checklist - item](https://github.com/wekan/wekan/pull/1099). + item](https://github.com/wekan/wekan/pull/1099); +* [Improve UI design of checklist items](https://github.com/wekan/wekan/pull/1108). and fixes the following bugs:
7
diff --git a/aleph/views/base_api.py b/aleph/views/base_api.py @@ -252,4 +252,11 @@ def handle_es_error(err): error = err.info.get("error", {}) for root_cause in error.get("root_cause", []): message = root_cause.get("reason", message) - return jsonify({"status": "error", "message": message}, status=err.status_code) + try: + # Sometimes elasticsearch-py generates non-numeric status codes like + # "TIMEOUT", "N/A". Werkzeug converts them into status 0 which confuses + # web browsers. Replace the weird status codes with 500 instead. + status = int(err.status_code) + except ValueError: + status = 500 + return jsonify({"status": "error", "message": message}, status=status)
9
diff --git a/app/webpack/users/edit/ducks/user_settings.js b/app/webpack/users/edit/ducks/user_settings.js @@ -115,6 +115,7 @@ export function saveUserSettings( ) { delete params.user.blocked_user_ids; delete params.user.privileges; delete params.user.icon_url; + delete params.user.orcid; return inatjs.users.update( params, { useAuth: true } ).then( ( ) => { // fetching user settings here to get the source of truth
1
diff --git a/config-optic/qa-data/mapperReducer.sjs b/config-optic/qa-data/mapperReducer.sjs @@ -72,9 +72,21 @@ function fibReducer(previous, row) { return previous; } +function ageMapper(row) { + const result = row; + if(result.player_age < 21) + result.player_age = 'rookie'; + else if(result.player_age > 21 && result.player_age < 30) + result.player_age = 'premium'; + else + result.player_age = 'veteran'; + return result; +} + module.exports = { arrayMapper: arrayMapper, colorIdMapper: colorIdMapper, + ageMapper: ageMapper, arrayReducer: arrayReducer, fibReducer: fibReducer };
0
diff --git a/docs/guiding-principles.md b/docs/guiding-principles.md @@ -13,9 +13,9 @@ that closely resemble how your web pages are used. Utilities are included in this project based on the following guiding principles: -1. If it relates to rendering components, it deals with DOM nodes rather than - component instances, nor should it encourage dealing with component - instances. +1. If it relates to rendering components, then it should deal with DOM nodes + rather than component instances, and it should not encourage dealing with + component instances. 2. It should be generally useful for testing the application components in the way the user would use it. We _are_ making some trade-offs here because we're using a computer and often a simulated browser environment, but in
7
diff --git a/src/mavoscript.js b/src/mavoscript.js @@ -241,7 +241,7 @@ var _ = Mavo.Script = { scalar: (a, b) => "" + (a || "") + (b || ""), precedence: 10 }, - "object": { + "keyvalue": { symbol: ":", code: (...operands) => { var i = operands.length - 1;
10
diff --git a/src/plots/mapbox/layout_attributes.js b/src/plots/mapbox/layout_attributes.js @@ -135,9 +135,11 @@ var attrs = module.exports = overrideAll({ role: 'info', description: [ 'Sets the source data for this layer (mapbox.layer.source).', - 'Source can be either a URL,', - 'a geojson object (with `sourcetype` set to *geojson*)', - 'or an array of URLs (with `sourcetype` set to *vector* or *raster*).' + 'When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON', + 'or a GeoJSON object.', + 'When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or', + 'an array of tile URLs.', + 'When `sourcetype` is set to *image*, `source` can be a URL to an image.' ].join(' ') }, @@ -167,11 +169,13 @@ var attrs = module.exports = overrideAll({ description: [ 'Sets the layer type,', 'that is the how the layer data set in `source` will be rendered', - 'With `sourcetype` set to *geojson*, *circle*, *line*, *fill* and *symbol* are available', + 'With `sourcetype` set to *geojson*, the following values are allowed:', + '*circle*, *line*, *fill* and *symbol*.', 'but note that *line* and *fill* are not compatible with Point', 'GeoJSON geometries.', - 'With `sourcetype` set to *vector*, *circle*, *line*, *fill* and *symbol* are available.', - 'With `sourcetype` set to *raster* or `*image*`, only the *raster* value is available.' + 'With `sourcetype` set to *vector*, the following values are allowed:', + ' *circle*, *line*, *fill* and *symbol*.', + 'With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed.' ].join(' ') },
7
diff --git a/readme.md b/readme.md @@ -13,8 +13,7 @@ Bot Builder provides the most comprehensive experience for building conversation - [**Java** (preview release)](https://github.com/microsoft/botbuilder-java) - [**Python** (preview release)](https://github.com/microsoft/botbuilder-python). - Bot Framework Emulator - - [Bot Framework **V4 Emulator** (preview release)](https://github.com/microsoft/botframework-emulator). - - [Bot Frameowrk **V3 Emulator** (stable release)](https://github.com/Microsoft/BotFramework-Emulator/releases/tag/v3.5.36) + - [Bot Framework **V4 Emulator**](https://github.com/microsoft/botframework-emulator). - Bot Builder CLI tools (**stable release**) - [Chatdown CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/Chatdown) - [MSBot CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot)
2
diff --git a/src/ui.popup.js b/src/ui.popup.js @@ -12,11 +12,11 @@ var _ = Mavo.UI.Popup = $.Class({ if (this.element.offsetHeight) { // Is in the DOM, check if it fits - var popupBounds = this.element.getBoundingClientRect(); - - if (popupBounds.height + y > innerHeight) { - y = innerHeight - popupBounds.height - 20; + this.height = this.element.getBoundingClientRect().height || this.height; } + + if (this.height + y > innerHeight) { + y = innerHeight - this.height - 20; } $.style(this.element, { top: `${y}px`, left: `${x}px` }); @@ -67,11 +67,19 @@ var _ = Mavo.UI.Popup = $.Class({ } }; + this.element.style.transition = "none"; + this.element.removeAttribute("hidden"); + this.position(); + this.element.setAttribute("hidden", ""); + this.element.style.transition = ""; + document.body.appendChild(this.element); - requestAnimationFrame(e => this.element.removeAttribute("hidden")); // trigger transition + setTimeout(() => { + this.element.removeAttribute("hidden"); + }, 100); // trigger transition. rAF or timeouts < 100 don't seem to, oddly. $.events(document, "focus click", this.hideCallback, true); window.addEventListener("scroll", this.position);
7
diff --git a/assets/js/components/notifications/BannerNotification/index.js b/assets/js/components/notifications/BannerNotification/index.js @@ -99,6 +99,7 @@ function BannerNotification( { WinImageSVG, rounded = false, footer, + ctaComponent, } ) { // Closed notifications are invisible, but still occupy space. const [ isClosed, setIsClosed ] = useState( false ); @@ -335,7 +336,7 @@ function BannerNotification( { // ctaLink links are always buttons, in which case the dismiss should be a Link. // If there is only a dismiss however, it should be the primary action with a Button. - const DismissComponent = ctaLink || onCTAClick ? Link : Button; + const DismissComponent = ctaLink || ctaComponent ? Link : Button; return ( <section @@ -400,9 +401,11 @@ function BannerNotification( { { ( ctaLink || isDismissible || dismiss || - onCTAClick ) && ( + ctaComponent ) && ( <div className="googlesitekit-publisher-win__actions"> - { ( ctaLink || onCTAClick ) && ( + { ctaComponent } + + { ctaLink && ( <Button className="googlesitekit-notification__cta" href={ ctaLink }
10
diff --git a/package.json b/package.json "description": "Salesforce Lightning Design System for React", "license": "SEE LICENSE IN README.md", "engines": { - "node": ">=4.4.0", + "node": "6.x", "npm": "^3.9.0" }, "lint-staged": {
12
diff --git a/lib/waterline/utils/query/help-find.js b/lib/waterline/utils/query/help-find.js @@ -324,9 +324,7 @@ module.exports = function helpFind(WLModel, s2q, done) { var parentPk = parentRecord[parentKey]; // If we have child records for this parent, attach them. - if (childRecordsByParent[parentPk]) { - parentRecord[alias] = childRecordsByParent[parentPk]; - } + parentRecord[alias] = childRecordsByParent[parentPk] || []; }); @@ -418,7 +416,7 @@ module.exports = function helpFind(WLModel, s2q, done) { // If this is a to-many join, add the results to the alias on the parent record. if (singleJoin.collection === true) { - parentRecord[alias] = childTableResults; + parentRecord[alias] = childTableResults || []; } // If this is a to-one join, add the single result to the join key column
0
diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js @@ -846,16 +846,16 @@ define([ var mipmapSampler = context.cache.imageryLayer_mipmapSampler; if (!defined(mipmapSampler)) { var maximumSupportedAnisotropy = ContextLimits.maximumTextureFilterAnisotropy; - var minificationFilter = imageryLayer.minificationFilter; + var mipmapMinificationFilter = imageryLayer.minificationFilter; if (imageryLayer.minificationFilter === TextureMinificationFilter.NEAREST) { - minificationFilter = TextureMinificationFilter.NEAREST_MIPMAP_NEAREST; + mipmapMinificationFilter = TextureMinificationFilter.NEAREST_MIPMAP_NEAREST; } else if (imageryLayer.minificationFilter === TextureMinificationFilter.LINEAR) { - minificationFilter = TextureMinificationFilter.LINEAR_MIPMAP_LINEAR; + mipmapMinificationFilter = TextureMinificationFilter.LINEAR_MIPMAP_LINEAR; } mipmapSampler = context.cache.imageryLayer_mipmapSampler = new Sampler({ wrapS : TextureWrap.CLAMP_TO_EDGE, wrapT : TextureWrap.CLAMP_TO_EDGE, - minificationFilter : minificationFilter, + minificationFilter : mipmapMinificationFilter, magnificationFilter : imageryLayer.magnificationFilter, maximumAnisotropy : Math.min(maximumSupportedAnisotropy, defaultValue(imageryLayer._maximumAnisotropy, maximumSupportedAnisotropy)) });
10
diff --git a/src/modules/cell.js b/src/modules/cell.js var fontSize = this.internal.__cell__.table_font_size; var scaleFactor = this.internal.scaleFactor; - return Object.entries(model) + return Object.keys(model) + .map(function(key) { + return [key, model[key]]; + }) .map(function([key, value]) { return typeof value === "object" ? [key, value.text] : [key, value]; })
14
diff --git a/app-object.js b/app-object.js @@ -172,8 +172,12 @@ class AppManager extends EventTarget { ]; this.used = false; this.aimed = false; + this.lastAppId = 0; this.lastTimestamp = performance.now(); } + getNextAppId() { + return ++this.lastAppId; + } createApp(appId) { const app = new App(appId); this.apps.push(app);
0
diff --git a/src/index.js b/src/index.js @@ -766,7 +766,12 @@ export default class VueI18n { if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') { this._checkLocaleMessage(locale, this._warnHtmlInMessage, message) } - this._vm.$set(this._vm.messages, locale, merge({}, this._vm.messages[locale] || {}, message)) + this._vm.$set(this._vm.messages, locale, merge( + typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length + ? this._vm.messages[locale] + : {}, + message + )) } getDateTimeFormat (locale: Locale): DateTimeFormat {
7
diff --git a/website/client/tags/index.js b/website/client/tags/index.js @@ -165,7 +165,7 @@ export const tags = { return Loadable({ delay: 0, loader: () => - isRelease ? import('release/CHANGELOG.md') : import(`@semcore/${value}/CHANGELOG.md`), + isRelease ? import('@semcore/ui/CHANGELOG.md') : import(`@semcore/${value}/CHANGELOG.md`), loading: (props) => <Loading value={value} {...props} />, render(loaded, props) { return React.createElement(() => {
3
diff --git a/angular/projects/spark-angular/src/lib/components/inputs/Checkbox.stories.ts b/angular/projects/spark-angular/src/lib/components/inputs/Checkbox.stories.ts -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { storyWrapper } from '../../../../../../.storybook/helpers/storyWrapper'; import { SprkLabelModule } from '../../directives/inputs/sprk-label/sprk-label.module'; import { SprkSelectionContainerModule } from './sprk-selection-container/sprk-selection-container.module';
3
diff --git a/lib/carto/gcloud_user_settings.rb b/lib/carto/gcloud_user_settings.rb @@ -3,9 +3,6 @@ module Carto REDIS_PREFIX = 'do_settings' - STORE_ATTRIBUTES = [ :service_account, :bq_public_project, - :gcp_execution_project, :bq_project, :bq_dataset, :gcs_bucket ] - attr_reader :service_account, :bq_public_project, :gcp_execution_project, :bq_project, :bq_dataset, :gcs_bucket
2
diff --git a/README.md b/README.md @@ -64,7 +64,7 @@ To run the web server locally, from the root of the SidewalkWebpage directory: 1. SSH into containers: To ssh into the containers, run `make ssh target=[web|db]`. Note that `[web|db]` is not a literal syntax, it specifies which container you would want to ssh into. For example, you can do `make ssh target=web`. ### Programming environment -The IDE [IntelliJ IDEA](https://www.jetbrains.com/idea/) is highly recommended for development, particularly with Scala. You should be able to get a [student license](https://www.jetbrains.com/student/) to use get the "ultimate" edition of IntelliJ IDEA. If using IntelliJ IDEA, we would recommend installing the [Play Routes](https://plugins.jetbrains.com/plugin/10053-play-routes/) and [i18n support](https://plugins.jetbrains.com/plugin/12981-i18n-support/) plugins. +The IDE [IntelliJ IDEA](https://www.jetbrains.com/idea/) is highly recommended for development, particularly with Scala. You should be able to get a [student license](https://www.jetbrains.com/student/) to get the "ultimate" edition of IntelliJ IDEA. If using IntelliJ IDEA, we would recommend installing the [Play Routes](https://plugins.jetbrains.com/plugin/10053-play-routes/), [i18n support](https://plugins.jetbrains.com/plugin/12981-i18n-support/), and [HOCON](https://plugins.jetbrains.com/plugin/10481-hocon) plugins. To look at and run queries on your database, you will want to install a database client. [Valentina Studio](https://www.valentina-db.com/en/valentina-studio-overview) is a good cross-platform database client. People also like using [Postico](https://eggerapps.at/postico/) for Mac or [PGAdmin](https://www.pgadmin.org/download/) on Windows/Mac.
3
diff --git a/index.d.ts b/index.d.ts // types and interfaces // ---------------------------------------------------------------------------- -export type DoubledObject < T > = T +export type DoubledObject<T> = T; -export type DoubledObjectWithKey < T extends string > = { [K in T] : any } +export type DoubledObjectWithKey<T extends string> = { [K in T]: any }; -export type TestDouble < T > = T +export type TestDouble<T> = T; -export type TestDoubleConstructor < T > = Constructor<T> +export type TestDoubleConstructor<T> = Constructor<T>; interface Call { context: {}; @@ -16,7 +16,7 @@ interface Call { } interface Constructor<T> { - new (...args: any[]): T + new (...args: any[]): T; } export interface Captor { @@ -38,18 +38,22 @@ export interface Matchers { contains(a: string | any[] | {}): any; argThat(matcher: Function): any; not(v: any): any; - captor(): Captor + captor(): Captor; } -export const matchers: Matchers +export const matchers: Matchers; -export interface Stubber { - thenReturn<T>(...args: any[]): TestDouble<T>; +export interface Stubber<D> { + thenReturn<T>(first: Partial<D>): TestDouble<T>; thenDo<T>(f: Function): TestDouble<T>; thenThrow<T>(e: Error): TestDouble<T>; - thenResolve<T>(...args: any[]): TestDouble<T>; + thenCallback<T>(error: any, data: any): TestDouble<T>; +} + +export interface PromiseStubber<P> { + thenResolve<T>(first: Partial<P>, ...args: Array<Partial<P>>): TestDouble<T>; + thenDo<T>(f: Function): TestDouble<T>; thenReject<T>(e: Error): TestDouble<T>; - thenCallback<T>(...args: any[]): TestDouble<T>; } export interface TestdoubleConfig { @@ -64,6 +68,14 @@ export interface VerificationConfig { cloneArgs?: boolean; } +export interface WhenConfig { + ignoreExtraArgs?: boolean; + times?: number; + cloneArgs?: boolean; + defer?: boolean; + delay?: number; +} + // // general // ---------------------------------------------------------------------------- @@ -109,7 +121,9 @@ export function explain<T>(f: TestDouble<T>): Explanation; * @param {{ new (...args: any[]): T }} constructor * @returns {DoubledObject<T>} */ -export function constructor<T>(constructor: Constructor<T>): TestDoubleConstructor<T>; +export function constructor<T>( + constructor: Constructor<T> +): TestDoubleConstructor<T>; // // fake: functions @@ -132,8 +146,8 @@ declare function functionDouble(name?: string): TestDouble<Function>; */ declare function functionDouble<T>(name?: T): TestDouble<T>; -export { functionDouble as function } -export { functionDouble as func } +export { functionDouble as function }; +export { functionDouble as func }; // // fake: objects @@ -199,7 +213,10 @@ export function object<T>(object: T): DoubledObject<T>; * @param {string} [name] * @returns {TestDoubleConstructor<T>} */ -export function imitate<T>(constructor: Constructor<T>, name?: string): TestDoubleConstructor<T>; +export function imitate<T>( + constructor: Constructor<T>, + name?: string +): TestDoubleConstructor<T>; /** * Create a fake object or function. @@ -254,7 +271,8 @@ export function replace(path: {}, property: string, f?: any): any; * @param {...any[]} args * @returns {Stubber} */ -export function when(...args: any[]): Stubber; +export function when<P>(f: Promise<P>, config?: WhenConfig): PromiseStubber<P>; +export function when<D>(f: D, config?: WhenConfig): Stubber<D>; /** * Verify a specific function call to a stubbed function.
3
diff --git a/src/serialization/sb2.js b/src/serialization/sb2.js @@ -843,6 +843,7 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension for (let i = 0; i < blockMetadata.argMap.length; i++) { const expectedArg = blockMetadata.argMap[i]; const providedArg = sb2block[i + 1]; // (i = 0 is opcode) + // Whether the input is obscuring a shadow. let shadowObscured = false; // Positional argument is an input. @@ -866,15 +867,19 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension // Single block occupies the input. const parsedBlockDesc = parseBlock(providedArg, addBroadcastMsg, getVariableId, extensions, parseState, comments, commentIndex); - innerBlocks = [parsedBlockDesc[0]]; + innerBlocks = parsedBlockDesc[0] ? [parsedBlockDesc[0]] : []; // Update commentIndex commentIndex = parsedBlockDesc[1]; } parseState.expectedArg = parentExpectedArg; - // Check if innerBlocks is an empty list. - // This indicates that all the inner blocks from the sb2 have + + // Obscures any shadow. + shadowObscured = true; + + // Check if innerBlocks is not an empty list. + // An empty list indicates that all the inner blocks from the sb2 have // unknown opcodes and have been skipped. - if (innerBlocks.length === 0) continue; + if (innerBlocks.length > 0) { let previousBlock = null; for (let j = 0; j < innerBlocks.length; j++) { if (j === 0) { @@ -884,8 +889,6 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension } previousBlock = innerBlocks[j].id; } - // Obscures any shadow. - shadowObscured = true; activeBlock.inputs[expectedArg.inputName].block = ( innerBlocks[0].id ); @@ -893,6 +896,7 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension activeBlock.children.concat(innerBlocks) ); } + } // Generate a shadow block to occupy the input. if (!expectedArg.inputOp) { // Undefined inputOp. inputOp should always be defined for inputs.
9
diff --git a/components/Payment/Icons/PSP.js b/components/Payment/Icons/PSP.js import React from 'react' export const Visa = () => ( - <svg style={{verticalAlign: 'middle', marginTop: -1}} width='51' height='40' viewBox='0 -4 51 36'> - <path fill='#FFF' d='M.493 31.56h49.7V.254H.493' /> - <path fill='#004F8B' d='M18.65 23.845l2.294-16.342h3.67l-2.297 16.342H18.65M35.624 7.905c-.727-.33-1.866-.686-3.29-.686-3.624 0-6.177 2.215-6.2 5.392-.02 2.348 1.824 3.658 3.216 4.44 1.428.8 1.908 1.312 1.9 2.027-.008 1.094-1.14 1.595-2.194 1.595-1.468 0-2.248-.248-3.453-.858l-.473-.26-.515 3.66c.857.455 2.442.85 4.087.87 3.856 0 6.36-2.19 6.388-5.583.014-1.86-.963-3.274-3.08-4.44-1.282-.756-2.068-1.26-2.06-2.026 0-.68.665-1.406 2.102-1.406 1.2-.022 2.068.295 2.746.626l.328.19.498-3.543M45.03 7.518h-2.834c-.878 0-1.535.29-1.92 1.355l-5.45 14.978h3.853s.63-2.013.772-2.455l4.698.007c.11.572.447 2.45.447 2.45H48L45.03 7.517M40.51 18.052c.303-.942 1.46-4.57 1.46-4.57-.02.045.302-.945.488-1.558l.248 1.41.85 4.718h-3.046M15.573 7.514L11.98 18.66l-.38-2.266c-.67-2.61-2.753-5.44-5.083-6.855l3.285 14.29 3.88-.004L19.46 7.514h-3.887' /> - <path d='M8.65 7.504H2.732l-.047.34c4.603 1.353 7.648 4.622 8.913 8.55l-1.288-7.51C10.09 7.85 9.446 7.54 8.65 7.504' fill='#EE9F2D' /> + <svg style={{verticalAlign: 'middle'}} width='64' height='40'> + <g fill='none' fillRule='evenodd'> + <path fill='#F7B600' d='M0 39.708h63.274v-5.673H0z' /> + <path fill='#1A1F71' d='M0 5.976h63.274V.303H0zM31.09 12.226l-3.334 15.592h-4.034l3.335-15.592h4.034zm16.972 10.068l2.123-5.856 1.222 5.856h-3.345zm4.503 5.524h3.73l-3.26-15.592h-3.44c-.776 0-1.429.45-1.718 1.143l-6.053 14.45h4.236l.841-2.33h5.175l.489 2.33zm-10.531-5.09c.018-4.115-5.689-4.344-5.65-6.182.012-.559.545-1.154 1.71-1.306.578-.075 2.171-.135 3.978.698l.707-3.308c-.97-.351-2.22-.69-3.773-.69-3.988 0-6.794 2.119-6.816 5.155-.025 2.245 2.004 3.496 3.53 4.244 1.573.764 2.1 1.254 2.093 1.937-.011 1.046-1.255 1.509-2.413 1.527-2.03.031-3.205-.549-4.143-.986l-.732 3.418c.944.432 2.684.809 4.485.828 4.24 0 7.011-2.094 7.024-5.336zM25.327 12.225l-6.536 15.592h-4.264l-3.216-12.444c-.195-.765-.365-1.046-.958-1.37-.97-.527-2.572-1.02-3.98-1.326l.096-.452h6.864c.874 0 1.66.581 1.86 1.588l1.7 9.024 4.196-10.612h4.238z' /> + </g> </svg> )
13
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml @@ -27,6 +27,9 @@ jobs: with: node-version: '12' - run: node ./node-red/.github/scripts/update-node-red-docker.js + with: + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true - name: Create Docker Pull Request uses: peter-evans/create-pull-request@v2 with:
12
diff --git a/config.js b/config.js @@ -9,9 +9,6 @@ module.exports = { enable_cache: process.env.ENABLE_CACHE || false, redis_url: process.env.REDIS_URL || '', hasura_admin_key: process.env.HASURA_ADMIN_KEY || '', - hasura_url: - env === 'development' - ? 'https://staging-db.lunie.io/v1/graphql' - : 'https://production-db.lunie.io/v1/graphql', + hasura_url: process.env.HASURA_URL, enableTestnet: process.env.TESTNET === 'true' }
12
diff --git a/lib/core/initNav.js b/lib/core/initNav.js @@ -29,7 +29,7 @@ module.exports = function initNav (sections) { } _.forEach(sections, function (section, key) { - if (!Array.isArray(section)) { + if (Object.prototype.toString.call(section) !== '[object Array]') { section = [section]; } section = {
14
diff --git a/lib/taiko.js b/lib/taiko.js @@ -183,7 +183,7 @@ const checkIfElementAtPointOrChild = async (e, x, y) => { function isElementAtPointOrChild(value) { const node = document.elementFromPoint(value.x, value.y); - return this.contains(node); + return this.contains(node) || (window.getComputedStyle(node).getPropertyValue('opacity') < 0.1); } const { object: { objectId } } = await dom.resolveNode({ nodeId: e }); @@ -401,22 +401,29 @@ module.exports.focus = async (selector,options = {}) => { */ module.exports.write = async (text, into, options = { delay: 10 }) => { validate(); + let description; if (into && into.delay) { options.delay = into.delay; into = undefined; } + options = setNavigationOptions(options); + await doActionAwaitingNavigation(options, async () => { if (into) { const selector = isString(into) ? textField(into) : into; await _focus(selector); await _write(text, options); - return { description: `Wrote ${text} into the ` + description(selector, true) }; + description = `Wrote ${text} into the ` + description(selector, true); + return; } else { if (await _getActiveElementTag() !== 'BODY') { await _write(text, options); - return { description: `Wrote ${text} into the focused element.` }; + description = `Wrote ${text} into the focused element.`; + return; } - throw new Error('Not focused into a writable field. Please use "write(\'admin\', into(\'Username:\'))" or increse the delay.'); + throw new Error('Not focused into a writable field. Please use "write(\'admin\', into(\'Username:\'))" or increase the delay.'); } + }); + return { description: description }; }; const _getActiveElementTag = async () => { @@ -1362,7 +1369,7 @@ const filter_visible_nodes = async (nodeIds) => { let visible_nodes = []; function isHidden() { - return this.offsetParent === null || (window.getComputedStyle(this).getPropertyValue('opacity') < 0.1); + return this.offsetParent === null; } for (const nodeId of nodeIds) {
9
diff --git a/app/middlewares/error.js b/app/middlewares/error.js @@ -90,7 +90,7 @@ function getErrorHandler (err) { if (isTimeoutError(err)) { return createTimeoutError(); } else { - return createPgError(err); + return createGenericError(err); } } @@ -111,7 +111,7 @@ function createTimeoutError() { ); } -function createPgError(err) { +function createGenericError(err) { return new PgErrorHandler( err.message, err.context,
10
diff --git a/userscript.user.js b/userscript.user.js @@ -63539,29 +63539,57 @@ var $$IMU_EXPORT$$; return newsrc; } - if (domain_nosub === "likee.video") { - // example url thanks to remlap on discord: - // https://l.likee.video/v/J38TY0 - // https://likee.video/v/J38TY0 - // http://mobile.likee.video/s/88yy1FwVjrU - newsrc = website_query({ - website_regex: /^[a-z]+:\/\/[^/]+\/+([sv]\/+[0-9a-zA-Z]+)(?:[?#].*)?$/, - query_for_id: "https://likee.video/${id}", - process: function(done, resp, cache_key) { + if (domain_nosub === "likee.video" || domain_nosub === "likee.com") { + var get_json_from_likee = function(resp, cache_key) { var match = resp.responseText.match(/<script>\s*window\.data\s*=\s*({.*?})\s*;\s*<\/script/); if (!match) { console_error(cache_key, "Unable to find match for", resp); - return done(null, false); + return null; } + try { var json = JSON_parse(match[1]); + return json; + } catch (e) { + console_error(cache_key, e); + return null; + } + }; + + var query_likee = function(yyuid, post_id, cb) { + api_query("likee_api:" + yyuid + "/" + post_id, { + url: "https://likee.video/@" + yyuid + "/video/" + post_id + }, cb, function(done, resp, cache_key) { + var json = get_json_from_likee(resp, cache_key); + + if (!json) { + done(null, false); + } else { + done(json, 60*60); + } + }); + }; + var likee_json_to_obj = function(resp, json) { var obj = { extra: { - page: resp.finalUrl + page: resp ? resp.finalUrl : null } }; + if (json.share_url) { + if (!obj.extra.page) + obj.extra.page = json.share_url; + } + + if (json.post_yyuid && json.post_id) { + obj.extra.page = "https://likee.com/@" + json.post_yyuid + "/video/" + json.post_id; + + var cache_key = "likee_api:" + json.post_yyuid + "/" + json.post_id; + if (!api_cache.has(cache_key)) + api_cache.set(cache_key, json, 60*60); + } + if (json.msg_text) obj.extra.caption = json.msg_text; @@ -63578,10 +63606,66 @@ var $$IMU_EXPORT$$; urls.push(json.image2.replace(/(\/[0-9A-Za-z]+)_[12](\.[^/.]+)(?:[?#].*)?$/, "$1_4$2")); } - return done(fillobj_urls(urls, obj), 6*60*60); + return fillobj_urls(urls, obj); + }; + + // example url thanks to remlap on discord: + // https://l.likee.video/v/J38TY0 + // https://likee.video/v/J38TY0 + // http://mobile.likee.video/s/88yy1FwVjrU + newsrc = website_query({ + website_regex: /^[a-z]+:\/\/[^/]+\/+([sv]\/+[0-9a-zA-Z]+)(?:[?#].*)?$/, + cache_key: "likee_share_api", + query_for_id: "https://likee.video/${id}", + process: function(done, resp, cache_key) { + var match = resp.responseText.match(/<script>\s*window\.data\s*=\s*({.*?})\s*;\s*<\/script/); + if (!match) { + console_error(cache_key, "Unable to find match for", resp); + return done(null, false); + } + + var json = JSON_parse(match[1]); + + var obj = likee_json_to_obj(resp, json); + if (!obj) { + return done(null, false); + } else { + return done(obj, 6*60*60); + } } }); if (newsrc) return newsrc; + + // https://likee.com/@52791510/video/6830235012651511654 + match = src.match(/^[a-z]+:\/\/[^/]+\/+@([^/]+)\/+video\/+([0-9]+)(?:[?#].*)?$/); + if (match) { + var page_nullobj = { + url: src, + is_pagelink: true + }; + + if (options.do_request && options.cb) { + query_likee(match[1], match[2], function(json) { + if (!json) { + return options.cb(page_nullobj); + } + + var obj = likee_json_to_obj(null, json); + if (!obj) { + return options.cb(page_nullobj); + } else { + obj.push(page_nullobj); + return options.cb(obj); + } + }); + + return { + waiting: true + }; + } else { + return page_nullobj; + } + } } if (host_domain_nowww === "likee.com" && options && options.element && options.do_request && options.cb && !options.exclude_videos) {
7
diff --git a/server/game/cards/20-HMW/TheFather.js b/server/game/cards/20-HMW/TheFather.js @@ -3,7 +3,7 @@ const GameActions = require('../../GameActions'); class TheFather extends PlotCard { setupCardAbilities() { - this.forcedReaction({ + this.forcedInterrupt({ when: { onPhaseEnded: event => event.phase === 'dominance' && this.game.anyCardsInPlay(card => card.getType() === 'character' && card.isUnique()) },
1
diff --git a/docs/contributing.md b/docs/contributing.md @@ -88,7 +88,7 @@ Would you rather take 1 minute to create an incomplete issue report and wait mon ### Pull Request Template -Much like the issue template, the [pull request template](https://github.com/react-navigation/navigation-ex/blob/master/.github/PULL_REQUEST_TEMPLATE.md) lays out instructions to ensure your pull request gets reviewed in a timely manner and reduces the back and forth. Make sure to look it over before you start writing any code. +Much like the issue template, the [pull request template](https://github.com/react-navigation/navigation-ex/blob/master/.github/PULL_REQUEST.md) lays out instructions to ensure your pull request gets reviewed in a timely manner and reduces the back and forth. Make sure to look it over before you start writing any code. ### Forking the Repository
1
diff --git a/src/Engines/Markdown.js b/src/Engines/Markdown.js -const mdlib = require("markdown-it")(); +const mdlib = require("markdown-it")({ + html: true +}); const TemplateEngine = require("./TemplateEngine"); class Markdown extends TemplateEngine {
11
diff --git a/main.cpp b/main.cpp @@ -233,10 +233,11 @@ void android_main(struct android_app *app) { __android_log_print(ANDROID_LOG_ERROR, "exokit", "main cwd 1 %lx", (unsigned long)app->activity); __android_log_print(ANDROID_LOG_ERROR, "exokit", "main cwd 2 '%s'", app->activity->internalDataPath); + int setenvResult = setenv("HOME", app->activity->internalDataPath, 1); // initAssetStats(); - __android_log_print(ANDROID_LOG_ERROR, "exokit", "main cwd 3 %lx", (unsigned long)app); + __android_log_print(ANDROID_LOG_ERROR, "exokit", "main cwd 3 %x", setenvResult); jniOnload(app->activity->vm);
12
diff --git a/contracts/IssuanceController.sol b/contracts/IssuanceController.sol @@ -59,9 +59,9 @@ contract IssuanceController is Pausable, SelfDestructible, SafeDecimalMath { /* The time the prices were last updated */ uint public lastPriceUpdateTime; /* The USD price of havvens written in UNIT */ - uint public havvenPrice; + uint public usdToHavPrice; /* The USD price of ETH written in UNIT */ - uint public ethPrice; + uint public usdToEthPrice; /* ========== CONSTRUCTOR ========== */ @@ -74,14 +74,14 @@ contract IssuanceController is Pausable, SelfDestructible, SafeDecimalMath { * @param _ethPrice The current price of ETH in USD, expressed in UNIT. * @param _havvenPrice The current price of Havven in USD, expressed in UNIT. */ - constructor(address _owner, address _beneficiary, uint _delay, address _oracle, uint _ethPrice, uint _havvenPrice) + constructor(address _owner, address _beneficiary, uint _delay, address _oracle, uint _usdToEthPrice, uint _usdToHavPrice) SelfDestructible(_owner, _beneficiary, _delay) /* Owned is initialised in SelfDestructible */ public { oracle = _oracle; - ethPrice = _ethPrice; - havvenPrice = _havvenPrice; + usdToEthPrice = _usdToEthPrice; + usdToHavPrice = _usdToHavPrice; lastPriceUpdateTime = now; }
3
diff --git a/docs/index.html b/docs/index.html <td>respond to settings &lt;response enabled&gt;</td> <td>Change if this channel has settings changes resonded in it</td> </tr> + <tr> + <td>allow private room &lt;rooms enabled&gt;</td> + <td>Change if this users in this server are allowed to make private rooms</td> + </tr> </table> </div> <div id="ondemand" class="tabcontent"> <td>serverinfo</td> <td>Get info about the current server. </tr> + <tr> + <td>create &lt;room|raid|team&gt; &lt;@users to invite&gt; </td> + <td>Create a private room and invite mentioned users to it. (Mentions optional) <br /> - <span class="example">Example <code>create room @Tobiah#8452</code><span> + </tr> </table> </div> <div id="silly" class="tabcontent">
3
diff --git a/app/main.js b/app/main.js @@ -1165,16 +1165,15 @@ ipcMain.on("refresh-wallet", function (event) { }); ipcMain.on("rename-wallet", function (event, address, name) { - let sqlRes; let resp = { response: "ERR", msg: "not logged in" }; if (userInfo.loggedIn) { - sqlRes = userInfo.walletDb.exec("SELECT * FROM wallet WHERE addr = '" + address + "'"); - if (sqlRes.length > 0) { - userInfo.walletDb.exec("UPDATE wallet SET name = '" + name + "' WHERE addr = '" + address + "'"); + const count = sqlSelectColumns("SELECT count(*) FROM wallet WHERE addr = ?", address)[0][0]; + if (count) { + sqlRun("UPDATE wallet SET name = ? WHERE addr = ?", name, address); saveWallet(); resp = { response: "OK", @@ -1190,19 +1189,17 @@ ipcMain.on("rename-wallet", function (event, address, name) { }); ipcMain.on("get-wallet-by-name", function (event, name) { - let sqlRes; let resp = { response: "ERR", msg: "not logged in" }; if (userInfo.loggedIn) { - sqlRes = userInfo.walletDb.exec("SELECT * FROM wallet WHERE name = '" + name + "'"); - if (sqlRes.length > 0) { + const walletAddr = sqlSelectObjects("SELECT * FROM wallet WHERE name = ?", name)[0]; + if (walletAddr) { resp = { response: "OK", - wallets: sqlRes[0].values, - msg: "found: " + sqlRes.length + wallets: walletAddr }; } else { resp.msg = "name not found"; @@ -1322,16 +1319,16 @@ ipcMain.on("send", function (event, fromAddress, toAddress, fee, amount){ // Convert to satoshi let amountInSatoshi = Math.round(amount * 100000000); let feeInSatoshi = Math.round(fee * 100000000); - let sqlRes = userInfo.walletDb.exec("SELECT * FROM wallet WHERE addr = '" + fromAddress + "'"); - if (!sqlRes.length) { + let walletAddr = sqlSelectObjects("SELECT * FROM wallet WHERE addr = ?", fromAddress)[0]; + if (!walletAddr) { event.sender.send("send-finish", "error", tr("wallet.tabWithdraw.messages.unknownAddress","Source address is not in your wallet!")); return; } - if (sqlRes[0].values[0][3] < (parseFloat(amount) + parseFloat(fee))) { + if (walletAddr.lastbalance < (parseFloat(amount) + parseFloat(fee))) { event.sender.send("send-finish", "error", tr("wallet.tabWithdraw.messages.insufficientFundsSourceAddr", "Insufficient funds on source address!")); return; } - let privateKey = sqlRes[0].values[0][1]; + let privateKey = walletAddr.pk; const prevTxURL = "/addr/" + fromAddress + "/utxo"; const infoURL = "/status?q=getInfo"; @@ -1457,8 +1454,9 @@ ipcMain.on("send-many", function (event, fromAddressesAll, toAddress, fee, thres // filter out all zero balanced wallets let fromAddressesTemp = []; for (let i = 0; i < fromAddressesAll.length; i++) { - let sqlRes = userInfo.walletDb.exec("SELECT * FROM wallet WHERE addr = '" + fromAddressesAll[i] + "'"); - if (sqlRes[0].values[0][3] !== 0 && sqlRes[0].values[0][3] !== thresholdLimit) { + let walletAddr = sqlSelectObjects("SELECT * FROM wallet WHERE addr = ?", fromAddressesAll[i])[0]; + // TODO check walletAddrs is defined + if (walletAddr.lastbalance !== 0 && walletAddr.lastbalance !== thresholdLimit) { fromAddressesTemp.push(fromAddressesAll[i]); } } @@ -1486,16 +1484,16 @@ ipcMain.on("send-many", function (event, fromAddressesAll, toAddress, fee, thres let thresholdLimitInSatoshi = Math.round(thresholdLimit * satoshi); let balanceInSatoshi = 0; for (let i = 0; i < nFromAddresses; i++) { - let sqlRes = userInfo.walletDb.exec("SELECT * FROM wallet WHERE addr = '" + fromAddresses[i] + "'"); + let walletAddr = sqlSelectColumns("SELECT * FROM wallet WHERE addr = ?", fromAddresses[i])[0]; - if (!sqlRes.length) { + if (!walletAddr) { err = tr("wallet.tabWithdraw.messages.unknownAddress", "Source address is not in your wallet!"); console.log(err); event.sender.send("send-finish", "error", err); return; } - balanceInSatoshi = sqlRes[0].values[0][3]; + balanceInSatoshi = walletAddr.lastbalance; if (i === 0) { if (balanceInSatoshi < (parseFloat(thresholdLimit) + parseFloat(fee))) { err = tr("wallet.tabWithdraw.messages.insufficientFirstSource", "Insufficient funds on 1st source (Minimum: threshold limit + fee)!"); @@ -1513,7 +1511,7 @@ ipcMain.on("send-many", function (event, fromAddressesAll, toAddress, fee, thres } amountsInSatoshi[i] = Math.round(balanceInSatoshi * satoshi); } - privateKeys[i] = sqlRes[0].values[0][1]; + privateKeys[i] = walletAddr.pk; } if (privateKeys.length !== nFromAddresses) {
4
diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml @@ -7,7 +7,7 @@ on: description: The number of a pull request to CP required: true NEW_VERSION: - description: The new app version + description: The new app version (leave empty if running manually) required: false default: ''
7
diff --git a/gulpfile.js b/gulpfile.js @@ -804,7 +804,6 @@ function getRebuildBranchName() { gulp.task('recompile', gulp.series([ 'git-sync-develop', function(done) { - execSync('git stash save -m "Stash for rebuild"', { stdio: 'inherit' }); var branchName = getRebuildBranchName(); console.log('make-rebuild-branch: creating branch ' + branchName); execSync('git checkout -b ' + branchName, { stdio: 'inherit' });
2
diff --git a/apps/sched/README.md b/apps/sched/README.md @@ -70,11 +70,21 @@ let alarm = require("sched").newDefaultAlarm(); // Get a new timer with default values let timer = require("sched").newDefaultTimer(); -// Add/update an existing alarm -require("sched").setAlarm("mytimer", { +// Add/update an existing alarm (using fields from the object shown above) +require("sched").setAlarm("mytimer", { // as a timer msg : "Wake up", timer : 10 * 60 * 1000 // 10 minutes }); +require("sched").setAlarm("myalarm", { // as an alarm + msg : "Wake up", + t : 9 * 3600000 // 9 o'clock (in ms) +}); +require("sched").setAlarm("mydayalarm", { // as an alarm on a date + msg : "Wake up", + date : "2022-04-04", + t : 9 * 3600000 // 9 o'clock (in ms) +}); + // Ensure the widget and alarm timer updates to schedule the new alarm properly require("sched").reload();
7
diff --git a/src/programs/spawns.js b/src/programs/spawns.js @@ -18,7 +18,8 @@ class Spawns extends kernel.process { return this.suicide() } this.room = Game.rooms[this.data.room] - const spawns = this.room.find(FIND_MY_SPAWNS, {filter: s => s.isActive()}) + const maxspawns = CONTROLLER_STRUCTURES[STRUCTURE_SPAWN][this.room.controller.level] + const spawns = this.room.find(FIND_MY_SPAWNS, {filter: (s,i,c) => ((c.length>maxspawns)||(s.isActive()))}) let spawn for (spawn of spawns) {
4
diff --git a/test/unit/cli-domain-package-template.js b/test/unit/cli-domain-package-template.js @@ -91,7 +91,11 @@ describe('cli : domain : package-template', () => { }); it('should show error', () => { +<<<<<<< HEAD expect(error).to.equal('template.wha compilation failed - Error: Error requiring oc-template: "whazaaa" not found'); +======= + expect(error).to.equal('template.wha compilation failed - Error requiring oc-template: "whazaaa-compiler" not found'); +>>>>>>> updated cli package-template test for split api }); }); });
3
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -50,14 +50,6 @@ final class Assets { */ private $assets_registered = false; - /** - * Internal flag for whether fonts have been enqueued yet. - * - * @since 1.2.0 - * @var bool - */ - private $fonts_enqueued = false; - /** * Internal list of print callbacks already done. * @@ -204,12 +196,19 @@ final class Assets { * Enqueues Google fonts. * * @since 1.0.0 + * @since n.e.x.t This method is no longer used as fonts are loaded as a normal style dependency now. */ public function enqueue_fonts() { - if ( $this->fonts_enqueued ) { - return; + $this->get_assets()['googlesitekit-fonts']->enqueue(); } + /** + * Get Google fonts src for CSS. + * + * @since n.e.x.t + * @return false|string String URL src, or `false` if no font families to load. + */ + protected function get_fonts_src() { $font_families = array( 'Google+Sans:300,300i,400,400i,500,500i,700,700i', 'Roboto:300,300i,400,400i,500,500i,700,700i', @@ -217,62 +216,18 @@ final class Assets { $filtered_font_families = apply_filters( 'googlesitekit_font_families', $font_families ); - if ( ! is_array( $filtered_font_families ) || empty( $filtered_font_families ) ) { - return; + if ( empty( $filtered_font_families ) ) { + return false; } - $this->fonts_enqueued = true; - - if ( $this->context->is_amp() ) { - $fonts_url = add_query_arg( + return add_query_arg( array( - 'family' => implode( '|', $font_families ), + 'family' => implode( '|', $filtered_font_families ), 'subset' => 'latin-ext', 'display' => 'fallback', ), 'https://fonts.googleapis.com/css' ); - wp_enqueue_style( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion - 'googlesitekit-fonts', - $fonts_url, - array(), - null - ); - return; - } - - $action = current_action(); - if ( strpos( $action, '_enqueue_scripts' ) ) { - // Make sure we hook into the right `..._head` action if known. - $action = str_replace( '_enqueue_scripts', '_head', $action ); - } else { - // Or fall back to `wp_head`. - $action = 'wp_head'; - } - - add_action( - $action, - function() use ( $font_families ) { - ?> - <script> - - WebFontConfig = { - google: { families: [<?php echo "'" . implode( "','", $font_families ) . "'"; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?>] } - }; - - ( function() { - var wf = document.createElement( 'script' ); - wf.src = ( 'https:' === document.location.protocol ? 'https' : 'http' ) + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; - wf.type = 'text/javascript'; - wf.async = 'true'; - var s = document.getElementsByTagName( 'script' )[0]; - s.parentNode.insertBefore( wf, s ); - } )(); - - </script> - <?php - } - ); } /** @@ -656,6 +611,12 @@ final class Assets { 'src' => $base_url . 'css/adminbar.css', ) ), + new Stylesheet( + 'googlesitekit-fonts', + array( + 'src' => $this->get_fonts_src(), + ) + ), ); /**
14
diff --git a/src/sections/evidence/GeneBurden/Body.js b/src/sections/evidence/GeneBurden/Body.js @@ -155,7 +155,7 @@ const columns = [ }, }, { - id: 'pValueMantissa', + id: 'pValue', label: 'p-value', renderCell: ({ pValueMantissa, pValueExponent }) => { return <ScientificNotation number={[pValueMantissa, pValueExponent]} />; @@ -166,6 +166,9 @@ const columns = [ exportValue: ({ pValueMantissa, pValueExponent }) => { return `${pValueMantissa}x10${pValueExponent}`; }, + comparator: (a, b) => + a.pValueMantissa * 10 ** a.pValueExponent - + b.pValueMantissa * 10 ** b.pValueExponent, }, { id: 'literature', @@ -215,6 +218,8 @@ function Body(props) { <DataTable columns={columns} rows={rows} + order="asc" + sortBy="pValue" dataDownloader dataDownloaderFileStem={`geneburden-${ensemblId}-${efoId}`} showGlobalFilter
12
diff --git a/token-metadata/0x4FbB350052Bca5417566f188eB2EBCE5b19BC964/metadata.json b/token-metadata/0x4FbB350052Bca5417566f188eB2EBCE5b19BC964/metadata.json "symbol": "GRG", "address": "0x4FbB350052Bca5417566f188eB2EBCE5b19BC964", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/insight/src/pages/address/address.html b/packages/insight/src/pages/address/address.html </ion-grid> <h1>Transactions</h1> - <coin-list *ngIf="chainNetwork.chain === 'ETH'" [addrStr]="address.addrStr" [chainNetwork]="chainNetwork"></coin-list> - <transaction-list *ngIf="chainNetwork.chain === 'BTC' || chainNetwork.chain === 'BCH'" [queryType]="'address'" [queryValue]="address.addrStr" [chainNetwork]="chainNetwork"> </transaction-list> + <coin-list [addrStr]="address.addrStr" [chainNetwork]="chainNetwork"></coin-list> </div> </div>
13
diff --git a/storage.js b/storage.js @@ -1164,7 +1164,7 @@ function archiveJointAndDescendants(from_unit){ db.executeInTransaction(function doWork(conn, cb){ function addChildren(arrParentUnits){ - conn.query("SELECT DISTINCT child_unit FROM parenthoods WHERE parent_unit IN(?)", [arrParentUnits], function(rows){ + conn.query("SELECT DISTINCT child_unit FROM parenthoods WHERE parent_unit IN(" + arrParentUnits.map(db.escape).join(', ') + ")", function(rows){ if (rows.length === 0) return archive(); var arrChildUnits = rows.map(function(row){ return row.child_unit; });
1
diff --git a/test/test.js b/test/test.js @@ -899,4 +899,22 @@ module.exports = function (redom) { unmount(div, item); t.strictEquals(targetDiv.__redom_lifecycle, null); }); + + test('optimized list diff', function (t) { + t.plan(1); + var remounts = 0; + + function Item () { + this.el = el('p'); + this.onremount = function () { + remounts++; + }; + } + var items = list(el('list'), Item, 'id'); + + items.update('a b c d e f g'.split(' ').map(function (id) { return { id: id }; })); + items.update('a e c d b f g'.split(' ').map(function (id) { return { id: id }; })); + + t.equals(remounts, 1); + }); };
0
diff --git a/MSBot/MSBot.njsproj b/MSBot/MSBot.njsproj </PropertyGroup> <ItemGroup> <Content Include="tsconfig.json" /> - <TypeScriptCompile Include="src\BotConfigModel.ts" /> + <TypeScriptCompile Include="src\BotConfig.ts" /> <Content Include="package.json" /> <Content Include="README.md" /> <TypeScriptCompile Include="src\index.ts" />
13
diff --git a/lib/plugins/aws/provider/awsProvider.test.js b/lib/plugins/aws/provider/awsProvider.test.js @@ -908,14 +908,14 @@ describe('AwsProvider', () => { }); it('should set region for credentials', () => { + serverless.service.provider.profile = 'notDefault'; const credentials = newAwsProvider.getCredentials(); expect(credentials.region).to.equal(newOptions.region); }); it('should not set credentials if credentials is an empty object', () => { serverless.service.provider.credentials = {}; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should not set credentials if credentials has undefined values', () => { @@ -924,8 +924,7 @@ describe('AwsProvider', () => { secretAccessKey: undefined, sessionToken: undefined, }; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should not set credentials if credentials has empty string values', () => { @@ -934,8 +933,7 @@ describe('AwsProvider', () => { secretAccessKey: '', sessionToken: '', }; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should get credentials from provider declared credentials', () => { @@ -972,20 +970,17 @@ describe('AwsProvider', () => { it('should not set credentials if empty profile is set', () => { serverless.service.provider.profile = ''; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should not set credentials if profile is not set', () => { serverless.service.provider.profile = undefined; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should not set credentials if empty profile is set', () => { serverless.service.provider.profile = ''; - const credentials = newAwsProvider.getCredentials(); - expect(credentials).to.eql({ region: newOptions.region }); + expect(() => newAwsProvider.getCredentials()).to.throw('AWS provider credentials not found.'); }); it('should get credentials from provider declared temporary profile', () => {
1
diff --git a/src/ui/gauge.js b/src/ui/gauge.js @@ -8,28 +8,16 @@ phina.namespace(function() { superClass: 'phina.display.Shape', init: function(options) { - options = ({}).$safe(options, { - width: 256, - height: 32, - backgroundColor: 'transparent', - fill: 'white', - stroke: '#aaa', - strokeWidth: 4, - - value: 100, - maxValue: 100, - gaugeColor: '#44f', - cornerRadius: 0, - }); + options = ({}).$safe(options || {}, Gauge.defaults); this.superInit(options); - this._value = options.value; + this._value = (options.value !== undefined) ? options.value : options.maxValue; this.maxValue = options.maxValue; this.gaugeColor = options.gaugeColor; this.cornerRadius = options.cornerRadius; - this.visualValue = options.value; + this.visualValue = (options.value !== undefined) ? options.value : options.maxValue; this.animation = true; this.animationTime = 1*1000; }, @@ -126,6 +114,20 @@ phina.namespace(function() { phina.display.Shape.watchRenderProperty.call(this, 'gaugeColor'); phina.display.Shape.watchRenderProperty.call(this, 'cornerRadius'); }, + + _static: { + defaults: { + width: 256, + height: 32, + backgroundColor: 'transparent', + fill: 'white', + stroke: '#aaa', + strokeWidth: 4, + maxValue: 100, + gaugeColor: '#44f', + cornerRadius: 0, + }, + } }); });
12
diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json } }, "editor-tab": { - "properties": "@Properties", - "description": "@Description", - "appearance": "@Appearance" + "properties": "Properties", + "description": "Description", + "appearance": "Appearance" } }
2
diff --git a/documentation/plugins.md b/documentation/plugins.md @@ -73,30 +73,6 @@ use browserify or a script loader instead of the Common.js `require` in the abov Please consult the documentation for each individual plugin. -## Caveats with plugins that depend on other plugins - -The unexpected-express, unexpected-mitm, and unexpected-http plugins all depend -on unexpected-messy being available. If you use more than one of these in the same -test suite, it's important that only one version of unexpected-messy is installed. - -All three plugins list `unexpected-messy` under both `peerDependencies` and `dependencies` -in their package.json. This strategy is carefully thought out to be forward compatible -with how `peerDependencies` work with npm 3. Unfortunately, users of npm 1 and 2 will -sometimes be in for a bit of a rough ride. - -Unexpected's [use method](/api/use/) will throw an error if you install two different -versions of unexpected-messy, so there's a stop gap that prevents `expect` from -ending up in a broken state. Still, recovering from that error condition or an -`EPEERINVALID` error can be tricky. We recommend trying the following: - -1. Upgrade to `npm 3`, then remove the `node_modules` folder and run a fresh `npm install`. -2. If you're stuck on a previous npm version, you should still try to remove `node_modules` - and run a fresh `npm install`. -3. If that doesn't work, upgrade unexpected and the plugins you're using to the newest - versions at once. The newest versions should be using the same version of - unexpected-messy, which will resolve the problem in most cases. - - ## Mixing plugins All of these plugins should be able coexist in the same Unexpected instance and
2
diff --git a/exampleSite/content/fragments/nav/index.md b/exampleSite/content/fragments/nav/index.md @@ -12,3 +12,6 @@ The navbar of your website Navbar fragment can show a logo/image, a menu with support for external links and a special icon link useful for linking to Github or Gitlab. + +**Note:** Search doesn't look very good in this page because there are two +navbars in the page which is not expected. Please use search in other pages.
0
diff --git a/src/encoded/schemas/file.json b/src/encoded/schemas/file.json }, { "oneOf": [ + { + "not": { + "required": ["status"] + } + }, { "required": ["file_size"], "properties": {
3
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml @@ -111,10 +111,8 @@ jobs: - uses: actions/checkout@v2 - name: Forcefully install Firefox for Developers browser run: brew update && brew tap homebrew/cask-versions && brew install --cask firefox-developer-edition - - name: Get FF path - run: find / -name firefox* - name: Set up env variable for FF - run: echo "FIREFOX_DEV=value" >> $GITHUB_ENV + run: echo "FIREFOX_DEV=/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox-bin" >> $GITHUB_ENV - name: Read .nvmrc run: echo ::set-output name=NVMRC::$(cat .nvmrc) id: nvm
12
diff --git a/articles/integrations/aws-api-gateway/delegation/part-1.md b/articles/integrations/aws-api-gateway/delegation/part-1.md @@ -324,5 +324,5 @@ At this point, the AWS Lambda functions and the Amazon API Gateway methods are d <%= include('./_stepnav', { prev: ["0. Introduction", "/integrations/aws-api-gateway/delegation"], - next: ["2. Securing and Deploying", "/integrations/delegation/aws-api-gateway/part-2"] + next: ["2. Securing and Deploying", "/integrations/aws-api-gateway/delegation/part-2"] }) %>
1