code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/Route.js b/src/Route.js @@ -138,7 +138,7 @@ export default class Route { } _next = false; finished = true; - _res.statusCode = err.code || err.status || 403; + _res.statusCode = err.code || err.status || 400; return _res.send( `{"error":"${typeof err === 'string' ? err : err.message}"}` ); @@ -231,13 +231,12 @@ export default class Route { middleware.run(res, req); } else { middleware(req, res, _handleNext, _next); - _next = false; } } } } - if (_direct || !fetchUrl || req.path === path) { + if (_next && (_direct || !fetchUrl || req.path === path)) { req.rawPath = path || req.path; req.baseUrl = _baseUrl || req.baseUrl; @@ -261,18 +260,8 @@ export default class Route { } if (bodyResponse) { req.body = bodyResponse; - - if ( - !isRaw && - validation && - validation.validationStringify && - processValidation(req, res, _config, validation) - ) { - return; } - routeFunction(req, res); - } else { if ( !isRaw && validation && @@ -283,7 +272,6 @@ export default class Route { } routeFunction(req, res); - } }); } else { if (
7
diff --git a/packages/insomnia-app/app/ui/components/panes/grpc-request-pane/index.tsx b/packages/insomnia-app/app/ui/components/panes/grpc-request-pane/index.tsx -import React, { FunctionComponent } from 'react'; +import React, { FunctionComponent, useCallback } from 'react'; import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'; import styled from 'styled-components'; import { getCommonHeaderNames, getCommonHeaderValues } from '../../../../common/common-headers'; +import { hotKeyRefs } from '../../../../common/hotkeys'; +import { executeHotKey } from '../../../../common/hotkeys-listener'; import type { GrpcRequest } from '../../../../models/grpc-request'; import type { Settings } from '../../../../models/settings'; import { useGrpc } from '../../../context/grpc'; @@ -11,6 +13,7 @@ import { OneLineEditor } from '../../codemirror/one-line-editor'; import { GrpcMethodDropdown } from '../../dropdowns/grpc-method-dropdown/grpc-method-dropdown'; import { ErrorBoundary } from '../../error-boundary'; import { KeyValueEditor } from '../../key-value-editor/key-value-editor'; +import { KeydownBinder } from '../../keydown-binder'; import { GrpcTabbedMessages } from '../../viewers/grpc-tabbed-messages'; import { Pane, PaneBody, PaneHeader } from '../pane'; import useActionHandlers from './use-action-handlers'; @@ -66,7 +69,16 @@ export const GrpcRequestPane: FunctionComponent<Props> = ({ // Used to refresh input fields to their default value when switching between requests. // This is a common pattern in this codebase. const uniquenessKey = `${forceRefreshKey}::${activeRequest._id}`; + + const { start } = handleAction; + const _handleKeyDown = useCallback((event: KeyboardEvent) => { + if (method && !running) { + executeHotKey(event, hotKeyRefs.REQUEST_SEND, start); + } + }, [method, running, start]); + return ( + <KeydownBinder onKeydown={_handleKeyDown}> <Pane type="request"> <PaneHeader> <StyledUrlBar> @@ -164,5 +176,6 @@ export const GrpcRequestPane: FunctionComponent<Props> = ({ )} </PaneBody> </Pane> + </KeydownBinder> ); };
9
diff --git a/token-metadata/0xF2f9A7e93f845b3ce154EfbeB64fB9346FCCE509/metadata.json b/token-metadata/0xF2f9A7e93f845b3ce154EfbeB64fB9346FCCE509/metadata.json "symbol": "POWER", "address": "0xF2f9A7e93f845b3ce154EfbeB64fB9346FCCE509", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/articles/appliance/infrastructure/dns.md b/articles/appliance/infrastructure/dns.md @@ -90,7 +90,7 @@ The hostname (e.g. **manage-project**.yourdomain.com) must be at least three cha The following are reserved tenant names and **may not** be used for the **app** tenant. -<table> +<table class="table"> <tr> <td>login</td> <td>admin</td> @@ -152,7 +152,7 @@ In the PSaaS Appliance, you may map any arbitrary domain name to a tenant using Suppose these were your standard domains: -<table> +<table class="table"> <tr> <td>Root Tenant Authority</td> <td>Sample Tenant</td>
0
diff --git a/js/feature/mergedTrack.js b/js/feature/mergedTrack.js @@ -60,6 +60,19 @@ const MergedTrack = extend(TrackBase, function (config, browser) { console.warn("Could not create track " + tconf); } }); + + Object.defineProperty(this, "height", { + get() { + return this._height || 100; + }, + set(h) { + this._height = h; + for (let t of this.tracks) { + t.height = h; + t.config.height = h; + } + } + }); }); MergedTrack.prototype.getFeatures = function (chr, bpStart, bpEnd, bpPerPixel) {
1
diff --git a/src/components/Overlay/Header/index.css b/src/components/Overlay/Header/index.css .OverlayHeader-title { float: left; height: 100%; - padding-top: 17px; font-size: 10pt; - text-align: center; + display: flex; + justify-content: center; + align-items: center; /* max width = 300px */ width: 33%;
7
diff --git a/src/reducers/account/index.js b/src/reducers/account/index.js @@ -14,7 +14,8 @@ import { getLedgerKey, getBalance, selectAccount, - setLocalStorage + setLocalStorage, + getAccountBalance } from '../../actions/account' import { @@ -28,7 +29,8 @@ const initialState = { actionsPending: [], canEnableTwoFactor: null, twoFactor: null, - ledgerKey: null + ledgerKey: null, + accountsBalance: undefined } const recoverCodeReducer = handleActions({ @@ -159,7 +161,24 @@ const account = handleActions({ accountFound: !!payload, accountId: payload } - }) + }), + [getAccountBalance]: (state, { error, payload, ready, meta }) => + (!ready || error) + ? { + ...state, + // accountsBalance: state.accountsBalance || {} + accountsBalance: { + ...state.accountsBalance, + [meta.accountId]: undefined + } + } + : ({ + ...state, + accountsBalance: { + ...state.accountsBalance, + [meta.accountId]: payload + } + }), }, initialState) export default reduceReducers(
9
diff --git a/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analysis-form-models/georeference-form-model.js b/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analysis-form-models/georeference-form-model.js @@ -128,7 +128,7 @@ module.exports = BaseAnalysisFormModel.extend({ latitude: { type: 'Select', title: _t('editor.layers.analysis-form.latitude'), - options: this._columnOptions.filterByType(['string', 'number']), + options: this._columnOptions.filterByType('number'), dialogMode: 'float', validators: this._getFieldValidator('latitude'), placeholder: _t('editor.layers.analysis-form.georeference.select-latitude'), @@ -137,7 +137,7 @@ module.exports = BaseAnalysisFormModel.extend({ longitude: { type: 'Select', title: _t('editor.layers.analysis-form.longitude'), - options: this._columnOptions.filterByType(['string', 'number']), + options: this._columnOptions.filterByType('number'), dialogMode: 'float', validators: this._getFieldValidator('longitude'), placeholder: _t('editor.layers.analysis-form.georeference.select-longitude'),
11
diff --git a/app/models/carto/oauth_app.rb b/app/models/carto/oauth_app.rb @@ -12,11 +12,11 @@ module Carto validates :redirect_uri, presence: true validate :validate_uri - before_validation :generate_keys + before_validation :ensure_keys_generated private - def generate_keys + def ensure_keys_generated self.client_id ||= SecureRandom.urlsafe_base64(9) self.client_secret ||= SecureRandom.urlsafe_base64(18) end
10
diff --git a/README.md b/README.md @@ -140,27 +140,10 @@ These pages are generated by the Plotly [graphing-library-docs repo](https://git For more info about contributing to Plotly documentation, please read through [contributing guidelines](https://github.com/plotly/graphing-library-docs/blob/master/README.md). ### To support MathJax - -*Before* the plotly.js script tag, add: - -```html -<script src="mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script> -``` - -You can get the relevant MathJax files from the internet e.g. -"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js" - -By default, plotly.js will modify the global MathJax configuration on load. -This can lead to undesirable behavior if plotly.js is loaded alongside -other libraries that also rely on MathJax. To disable this global configuration -process, set the `MathJaxConfig` property to `'local'` in the `window.PlotlyConfig` -object. This property must be set before the plotly.js script tag, for example: - +Load relevant MathJax (v2) files *Before* the plotly.js script tag: ```html -<script> - window.PlotlyConfig = {MathJaxConfig: 'local'} -</script> -<script src="plotly.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script> +<script src="https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js"></script> ``` ---
3
diff --git a/data/packages/com.joaosantos.package-common-wrapper.yml b/data/packages/com.joaosantos.package-common-wrapper.yml @@ -8,7 +8,7 @@ licenseName: MIT License topics: - frameworks hunter: JoaoSant0s -gitTagPrefix: _ +gitTagPrefix: 'package-common-wrapper-' gitTagIgnore: '' minVersion: '' image: null
10
diff --git a/examples/with-firebase-authentication/pages/index.js b/examples/with-firebase-authentication/pages/index.js @@ -5,16 +5,21 @@ import 'firebase/firestore' import 'isomorphic-unfetch' import clientCredentials from '../credentials/client' -export default class Index extends Component { - static async getInitialProps({ req, query }) { +export async function getServerSideProps({ req, query }) { const user = req && req.session ? req.session.decodedToken : null // don't fetch anything from firebase if the user is not found // const snap = user && await req.firebaseServer.database().ref('messages').once('value') // const messages = snap && snap.val() const messages = null - return { user, messages } + return { + props: { + user, + messages, + }, + } } +export default class Index extends Component { constructor(props) { super(props) this.state = {
14
diff --git a/src/library/managers/ShipManager.js b/src/library/managers/ShipManager.js @@ -196,7 +196,7 @@ Saves and loads list to and from localStorage remove :function( rosterId ){ console.log("removing ship", rosterId); var thisShip = this.list["x"+rosterId]; - if(thisShip != "undefined"){ + if(typeof thisShip != "undefined"){ // initializing for fleet sanitizing of zombie ships var shipTargetFleetID = this.locateOnFleet(rosterId); // check whether the designated ship is on fleet or not
1
diff --git a/src/commands/resolve/sender/local-resolve-command.js b/src/commands/resolve/sender/local-resolve-command.js @@ -56,19 +56,15 @@ class LocalResolveCommand extends Command { await Promise.all(normalizeNquadsPromises); - const updateHandlerIdDataPromises = [ - this.handlerIdService.cacheHandlerIdData(handlerId, nquads), - this.handlerIdService.updateHandlerIdStatus( + await this.handlerIdService.cacheHandlerIdData(handlerId, nquads); + await this.handlerIdService.updateHandlerIdStatus( handlerId, HANDLER_ID_STATUS.RESOLVE.RESOLVE_LOCAL_END, - ), - this.handlerIdService.updateHandlerIdStatus( + ); + await this.handlerIdService.updateHandlerIdStatus( handlerId, HANDLER_ID_STATUS.RESOLVE.RESOLVE_END, - ), - ]; - - await Promise.all(updateHandlerIdDataPromises); + ); return Command.empty(); } catch (e) {
3
diff --git a/packages/build/src/plugins/functions/index.js b/packages/build/src/plugins/functions/index.js @@ -55,15 +55,16 @@ const functionsBuild = async function({ constants: { FUNCTIONS_SRC, FUNCTIONS_DI // Print the list of paths to the bundled functions const logResults = async function(FUNCTIONS_DIST) { - const paths = await getLoggedPaths(FUNCTIONS_DIST) - console.log(`Functions bundled in ${FUNCTIONS_DIST}`) - console.log(paths) + const files = await readdirp.promise(FUNCTIONS_DIST) + + if (files.length === 0) { + console.log('No functions were bundled') + return } -const getLoggedPaths = async function(FUNCTIONS_DIST) { - const files = await readdirp.promise(FUNCTIONS_DIST) const paths = files.map(getLoggedPath).join('\n') - return paths + console.log(`Functions bundled in ${FUNCTIONS_DIST} +${paths}`) } const getLoggedPath = function({ path }) {
7
diff --git a/assets/filters/mode7.js b/assets/filters/mode7.js @@ -2,10 +2,6 @@ Phaser.Filter.Mode7 = function (game) { Phaser.Filter.call(this, game); this.uniforms.angle = {type: "1f", value: 0}; - this.uniforms.sin1 = {type: "1f", value: 1}; - this.uniforms.sin2 = {type: "1f", value: 0}; - this.uniforms.cos1 = {type: "1f", value: 0}; - this.uniforms.cos2 = {type: "1f", value: 1}; this.uniforms.scale = {type: "1f", value: .28}; this.uniforms.distance = {type: "1f", value: 1}; this.uniforms.lookY = {type: "1f", value: 4.5}; @@ -19,15 +15,14 @@ Phaser.Filter.Mode7 = function (game) { "uniform sampler2D uSampler;", "precision highp float;", - "uniform highp float sin1;", - "uniform highp float sin2;", - "uniform highp float cos1;", - "uniform highp float cos2;", "uniform highp float scale;", "uniform highp float lookY;", "uniform highp float inclination;", "uniform highp float distance;", + "uniform highp float angle;", + "highp float cos_;", + "highp float sin_;", "void main(void) {", " vec2 uv = vTextureCoord;", @@ -38,7 +33,9 @@ Phaser.Filter.Mode7 = function (game) { " warped.y -= distance;", " warped /= scale;", - " warped *= mat2(sin1, sin2, cos1, cos2);", // rotate the new uvs + " cos_ = cos(angle);", + " sin_ = sin(angle);", + " warped *= mat2(cos_, -sin_, sin_, cos_);", // rotate the new uvs " warped += vec2(0.5, 0.5);", // centred " bool isDraw = uv.y > 0.5 - lookY;", @@ -60,10 +57,6 @@ Object.defineProperty(Phaser.Filter.Mode7.prototype, 'angle', { }, set: function(value) { this.uniforms.angle.value = value; - this.uniforms.sin1.value = -Math.sin(value) - this.uniforms.cos1.value = Math.cos(value) - this.uniforms.sin2.value = Math.sin(value - 0.5*Math.PI) - this.uniforms.cos2.value = Math.cos(value - 0.5*Math.PI) } });
12
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js @@ -151,7 +151,6 @@ module.exports = class MetamaskController extends EventEmitter { // initializeProvider () { - const keyringController = this.keyringController let provider = MetaMaskProvider({ static: { @@ -173,7 +172,7 @@ module.exports = class MetamaskController extends EventEmitter { // new style msg signing approvePersonalMessage: this.approvePersonalMessage.bind(this), signPersonalMessage: nodeify(this.signPersonalMessage).bind(this), - personalRecoverSigner: nodeify(keyringController.recoverPersonalMessage).bind(keyringController), + personalRecoverSigner: nodeify(this.recoverPersonalMessage).bind(this), }) return provider } @@ -493,6 +492,11 @@ module.exports = class MetamaskController extends EventEmitter { }) } + recoverPersonalMessage (msgParams) { + const keyringController = this.keyringController + return keyringController.recoverPersonalMessage(msgParams) + } + markAccountsFound (cb) { this.configManager.setLostAccounts([]) this.sendUpdate()
11
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 "bool": "bool", "json": "JSON", "bin": "buffer", - "env": "env variable" + "env": "env variable", + "cred": "credential" }, "menu": { "input": "input",
3
diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js import _ from 'underscore'; +import {isDevelopment} from './Environment/Environment'; import CONST from '../CONST'; /** @@ -7,7 +8,7 @@ import CONST from '../CONST'; * @returns {Boolean} */ function canUseAllBetas(betas) { - return _.contains(betas, CONST.BETAS.ALL); + return isDevelopment() || _.contains(betas, CONST.BETAS.ALL); } /**
13
diff --git a/edit.js b/edit.js @@ -1790,7 +1790,10 @@ const [ const pointOffset = scratchStack.f32.byteOffset + 14*Float32Array.BYTES_PER_ELEMENT; const normalOffset = scratchStack.f32.byteOffset + 17*Float32Array.BYTES_PER_ELEMENT; const distanceOffset = scratchStack.f32.byteOffset + 20*Float32Array.BYTES_PER_ELEMENT; - const objectOffset = scratchStack.f32.byteOffset + 21*Float32Array.BYTES_PER_ELEMENT; + const objectIdOffset = scratchStack.u32.byteOffset + 21*Float32Array.BYTES_PER_ELEMENT; + const positionOffset = scratchStack.u32.byteOffset + 22*Float32Array.BYTES_PER_ELEMENT; + const quaternionOffset = scratchStack.u32.byteOffset + 25*Float32Array.BYTES_PER_ELEMENT; + // const objectOffset = scratchStack.f32.byteOffset + 21*Float32Array.BYTES_PER_ELEMENT; // const faceIndexOffset = scratchStack.f32.byteOffset + 22*Float32Array.BYTES_PER_ELEMENT; /* const raycastArgs = { @@ -1816,15 +1819,14 @@ const [ pointOffset, normalOffset, distanceOffset, - objectOffset, + objectIdOffset, + positionOffset, + quaternionOffset, // faceIndexOffset ); const objectId = scratchStack.u32[21]; - const objectType = scratchStack.i32[22]; - const objectNameLength = _getStringLength(scratchStack.u8, 23 * Uint32Array.BYTES_PER_ELEMENT); - const objectName = new TextDecoder().decode(new Uint8Array(moduleInstance.buffer, 23 * Uint32Array.BYTES_PER_ELEMENT, objectNameLength)); - const objectPosition = scratchStack.f32.slice(23 + MAX_NAME_LENGTH/Float32Array.BYTES_PER_ELEMENT, 23 + MAX_NAME_LENGTH/Float32Array.BYTES_PER_ELEMENT + 3); - const objectQuaternion = scratchStack.f32.slice(23 + MAX_NAME_LENGTH/Float32Array.BYTES_PER_ELEMENT + 3, 23 + MAX_NAME_LENGTH/Float32Array.BYTES_PER_ELEMENT + 3 + 4); + const objectPosition = scratchStack.f32.slice(22, 25); + const objectQuaternion = scratchStack.f32.slice(25, 29); return scratchStack.u32[13] ? { point: scratchStack.f32.slice(14, 17), @@ -1833,8 +1835,6 @@ const [ meshId: scratchStack.u32[21], // faceIndex: scratchStack.u32[22], objectId, - objectType, - objectName, objectPosition, objectQuaternion, } : null;
4
diff --git a/types/config.d.ts b/types/config.d.ts @@ -76,8 +76,6 @@ type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]> // Theme related config interface ThemeConfig { - extend: Partial<Omit<ThemeConfig, 'extend'>> - /** Responsiveness */ screens: ResolvableTo<ScreensConfig> @@ -317,7 +315,7 @@ interface OptionalConfig { future: Partial<FutureConfig> experimental: Partial<ExperimentalConfig> darkMode: Partial<DarkModeConfig> - theme: Partial<ThemeConfig> + theme: Partial<ThemeConfig & { extend: Partial<ThemeConfig> }> corePlugins: Partial<CorePluginsConfig> plugins: Partial<PluginsConfig> /** Custom */
7
diff --git a/common/lib/client/realtimepresence.ts b/common/lib/client/realtimepresence.ts @@ -241,14 +241,17 @@ class RealtimePresence extends Presence { // Return type is any to avoid conflict with base Presence class get(this: RealtimePresence, params: RealtimePresenceParams, callback: StandardCallback<PresenceMessage[]>): any { - if(!callback && typeof(params) == 'function') - params = callback; + const args = Array.prototype.slice.call(arguments); + if(args.length == 1 && typeof(args[0]) == 'function') + args.unshift(null); + params = args[0] as RealtimePresenceParams; + callback = args[1] as StandardCallback<PresenceMessage[]>; const waitForSync = !params || ('waitForSync' in params ? params.waitForSync : true); if(!callback) { if(this.channel.realtime.options.promises) { - return Utils.promisify(this, 'get', arguments); + return Utils.promisify(this, 'get', args); } callback = noop; }
1
diff --git a/__tests__/applyAtRule.test.js b/__tests__/applyAtRule.test.js @@ -4,9 +4,7 @@ import defaultConfig from '../stubs/defaultConfig.stub.js' import tailwind from '../src/index' function run(input, config = {}) { - return postcss([ - tailwind({ experimental: { applyComplexClasses: true }, ...config }), - ]).process(input, { from: undefined }) + return postcss([tailwind(config)]).process(input, { from: undefined }) } test('it copies class declarations into itself', () => {
2
diff --git a/assets/js/components/dashboard-sharing/ModuleRecoveryAlert.js b/assets/js/components/dashboard-sharing/ModuleRecoveryAlert.js */ import { Fragment, useCallback, useEffect, useState } from '@wordpress/element'; import { sprintf, __ } from '@wordpress/i18n'; + /** * Internal dependencies */ @@ -35,6 +36,9 @@ import Spinner from '../Spinner'; const { useDispatch, useSelect } = Data; export default function ModuleRecoveryAlert() { + const [ checkboxes, setCheckboxes ] = useState( null ); + const [ recoveringModules, setRecoveringModules ] = useState( false ); + const recoverableModules = useSelect( ( select ) => select( CORE_MODULES ).getRecoverableModules() ); @@ -46,9 +50,9 @@ export default function ModuleRecoveryAlert() { return undefined; } - const accessibleModules = Object.keys( modules ).map( ( module ) => ( { - slug: module, - hasModuleAccess: select( CORE_MODULES ).hasModuleAccess( module ), + const accessibleModules = Object.keys( modules ).map( ( slug ) => ( { + slug, + hasModuleAccess: select( CORE_MODULES ).hasModuleAccess( slug ), } ) ); if ( @@ -64,23 +68,8 @@ export default function ModuleRecoveryAlert() { .map( ( { slug } ) => slug ); } ); - const [ checkboxes, setCheckboxes ] = useState( null ); - const [ recoveringModules, setRecoveringModules ] = useState( false ); - const { recoverModule } = useDispatch( CORE_MODULES ); - useEffect( () => { - if ( userAccessibleModules !== undefined && checkboxes === null ) { - const checked = {}; - - userAccessibleModules.forEach( ( module ) => { - checked[ module ] = true; - } ); - - setCheckboxes( checked ); - } - }, [ checkboxes, userAccessibleModules ] ); - const updateCheckboxes = useCallback( ( slug ) => setCheckboxes( ( currentCheckboxes ) => ( { @@ -100,6 +89,18 @@ export default function ModuleRecoveryAlert() { ).finally( () => setRecoveringModules( false ) ); }, [ checkboxes, recoverModule ] ); + useEffect( () => { + if ( userAccessibleModules !== undefined && checkboxes === null ) { + const checked = {}; + + userAccessibleModules.forEach( ( module ) => { + checked[ module ] = true; + } ); + + setCheckboxes( checked ); + } + }, [ checkboxes, userAccessibleModules ] ); + if ( recoverableModules === undefined || Object.keys( recoverableModules ).length === 0
7
diff --git a/install/index.php b/install/index.php @@ -79,7 +79,7 @@ if (!count($failed)) { 'active' => true, 'group' => 'admin', 'password' => $app->hash('admin'), - 'i18n' => 'en', + 'i18n' => $app->helper('i18n')->locale, '_created' => $created, '_modified'=> $created, ];
12
diff --git a/content/questions/closure-and-hoisting/index.md b/content/questions/closure-and-hoisting/index.md @@ -46,3 +46,5 @@ Definition: "Closure" is said to occur when a function remembers and accesses it When the internal functions `b` are returned from all the three functions, each function `b` gets a "closure" over the value of `a` defined in its parent function's scope. However, the value of `a` closed over by `b` in all cases is the "latest" value of `a`, or in other words, `b` has closure over the variable `a` itself, not its value. Hence, even when the value of `a` is changed, `b` always has the most recent value assigned to `a`. That is why, in `withVar`, even though `a` is undefined when `b` is first defined, however, by the time `b` is executed (inside the `console.log`), the value of `a` has been updated to `24`, and that is what is returned by `b` . Similarly, in `withLet`, there is no more "Temporal Dead Zone" for `a` by the time `b` is executed. And finally, the "updated" value of `a` is returned by `changingValue`. + +This example also demonstrates that the code inside a JS function does not "run" till the function is actually invoked (by using the parens, like `withVar`). That is why, in `withVar` and `withLet`, even though function `b` returns `a`, which at that line is not declared at all. But the code actually only runs when `b` is invoked in their respective `console.log`s.
0
diff --git a/src/index.js b/src/index.js @@ -43,31 +43,57 @@ export {default as FirstPersonState} from './core/controllers/first-person-state export {default as OrbitState} from './core/controllers/orbit-state'; export {default as MapState} from './core/controllers/map-state'; +// Deprecated Core Lib Classes +export {default as OrbitViewport} from './core/viewports/orbit-viewport'; +export {default as PerspectiveViewport} from './core/deprecated/viewports/perspective-viewport'; +export {default as OrthographicViewport} from './core/deprecated/viewports/orthographic-viewport'; +export {assembleShaders} from 'luma.gl'; // Forward the luma.gl version (note: now integrated with Model) + +// EXPERIMENTAL FEATURES (May change in minor version bumps, use at your own risk) +import {default as EffectManager} from './core/experimental/lib/effect-manager'; +import {default as Effect} from './core/experimental/lib/effect'; + // Experimental Pure JS (non-React) bindings import {default as DeckGLJS} from './core/pure-js/deck-js'; import {default as MapControllerJS} from './core/pure-js/map-controller-js'; -// Experimental Features (May change in minor version bumps, use at your own risk) +// Experimental Data Accessor Helpers import {get} from './core/lib/utils/get'; import {count} from './core/lib/utils/count'; -import {default as EffectManager} from './core/experimental/lib/effect-manager'; -import {default as Effect} from './core/experimental/lib/effect'; -// Deprecated Core Lib Classes -export {default as OrbitViewport} from './core/viewports/orbit-viewport'; -export {default as PerspectiveViewport} from './core/deprecated/viewports/perspective-viewport'; -export {default as OrthographicViewport} from './core/deprecated/viewports/orthographic-viewport'; -export {assembleShaders} from 'luma.gl'; // Forward the luma.gl version (note: now integrated with Model) +// Experimental Aggregation Utilities +import {default as BinSorter} from './core/utils/bin-sorter'; +import {linearScale} from './core/utils/scale-utils'; +import {quantizeScale} from './core/utils/scale-utils'; +import {clamp} from './core/utils/scale-utils'; +import {defaultColorRange} from './core/utils/color-utils'; + +// Experimental 64 bit helpers +// TODO - just expose as layer methods instead? +import {enable64bitSupport} from './core/lib/utils/fp64'; +import {fp64ify} from './core/lib/utils/fp64'; Object.assign(experimental, { - get, - count, + // Pure JS (non-React) support + DeckGLJS, + MapControllerJS, + + // Effects base classes EffectManager, Effect, - // Pure JS (i.e. non-React) support - DeckGLJS, // Integrate into `LayerManager`? - MapControllerJS // Integrate into `MapController` JS class? + // The following are mainly for sub-layers + get, + count, + + BinSorter, + linearScale, + quantizeScale, + clamp, + defaultColorRange, + + enable64bitSupport, + fp64ify }); //
0
diff --git a/assets/js/components/dashboard-sharing/DashboardSharingSettings/Footer.js b/assets/js/components/dashboard-sharing/DashboardSharingSettings/Footer.js @@ -37,10 +37,7 @@ import Notice from './Notice'; import { CORE_MODULES } from '../../../googlesitekit/modules/datastore/constants'; import { CORE_UI } from '../../../googlesitekit/datastore/ui/constants'; import Spinner from '../../Spinner'; -import { - EDITING_MANAGEMENT_KEY, - EDITING_USER_ROLE_SELECT_SLUG_KEY, -} from './constants'; +import { EDITING_USER_ROLE_SELECT_SLUG_KEY } from './constants'; import ErrorText from '../../ErrorText'; import { trackEvent } from '../../../util'; import useViewContext from '../../../hooks/useViewContext'; @@ -73,7 +70,6 @@ export default function Footer( { closeDialog } ) { // Reset the state to enable modules in when not editing or saving. setValue( EDITING_USER_ROLE_SELECT_SLUG_KEY, undefined ); - setValue( EDITING_MANAGEMENT_KEY, false ); closeDialog(); }, [ viewContext, saveSharingSettings, setValue, closeDialog ] );
2
diff --git a/deploy/base.coffee b/deploy/base.coffee @@ -256,6 +256,8 @@ class Base if err then reject(err) else resolve() createCyCache: (project) -> + throw new Error("Brian! Remove this!") + cache.path = cache.path.replace("development", "production") # cache = path.join(@buildPathToAppResources(), ".cy", "production", "cache")
0
diff --git a/src/module.d.ts b/src/module.d.ts @@ -361,14 +361,14 @@ export namespace utils { const rowUtils: PropertyBag<Function>; interface SortProperties{ - setSortColumn(sortProperties: ((GriddleSortKey : any) => void)) : any; + setSortColumn(sortProperties: ((key : GriddleSortKey) => void)) : void; sortProperty: GriddleSortKey; columnId: string; } namespace sortUtils { - function defaultSort(data: any[], column: string, sortAscending?: boolean) : any; - function setSortProperties(sortProperties: SortProperties) : any; + function defaultSort(data: any[], column: string, sortAscending?: boolean) : number; + function setSortProperties(sortProperties: SortProperties) : () => void; } }
7
diff --git a/android/fastlane/README.md b/android/fastlane/README.md @@ -28,10 +28,10 @@ fastlane android test Runs all the tests -### android build +### android build_beta ``` -fastlane android build +fastlane android build_beta ``` Build application @@ -60,13 +60,37 @@ fastlane android beta Build and deploy to Beta lane +### android deploy_play_store_beta + +``` +fastlane android deploy_play_store_beta +``` + +Build & Deploy to Play Store Beta channel + ### android deploy_hockey ``` fastlane android deploy_hockey ``` -Deploy to HockeyApp +Upload to HockeyApp + +### android deploy_fabric + +``` +fastlane android deploy_fabric +``` + +Upload to Beta by Fabric + +### android deploy_store + +``` +fastlane android deploy_store +``` + +Upload to Play Store ---
3
diff --git a/ios/PrideLondonApp/AppDelegate.m b/ios/PrideLondonApp/AppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { #if DEBUG == 0 - [[Fabric sharedSDK] setDebug: YES]; [Fabric with:@[[Crashlytics class]]]; #endif [BugsnagReactNative start];
2
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -3773,9 +3773,10 @@ RED.view = (function() { var yp = d.h / 2 - (this.__labelLineCount__ / 2) * 24 + 13; if ((!d._def.align && d.inputs !== 0 && d.outputs === 0) || "right" === d._def.align) { + if (this.__iconGroup__) { this.__iconGroup__.classList.add("red-ui-flow-node-icon-group-right"); this.__iconGroup__.setAttribute("transform", "translate("+(d.w-30)+",0)"); - + } this.__textGroup__.classList.add("red-ui-flow-node-label-right"); this.__textGroup__.setAttribute("transform", "translate("+(d.w-38)+","+yp+")"); } else {
9
diff --git a/rollup.config.js b/rollup.config.js @@ -20,11 +20,6 @@ export default { ], plugins: [ glslify(), - resolve({ - browser: true, - preferBuiltins: false, - dedupe: ['gl-matrix', 'axios', 'jpeg-js', 'fast-png'] - }), copy({ targets: [ {
2
diff --git a/lib/node_modules/@stdlib/math/base/tools/sum-series/test/es2015-generator/index.js b/lib/node_modules/@stdlib/math/base/tools/sum-series/test/es2015-generator/index.js @@ -18,15 +18,14 @@ tape( 'the function calculates the sum of an infinite series provided by a gener t.ok( abs( actual - expected ) < EPS, 'returned result is within tolerance. actual: ' + actual + '; expected: ' + expected + '.' ); t.end(); - // TODO: remove once switch to ESLint is complete - /* jshint esnext: true */ + /* eslint-disable no-restricted-syntax, no-plusplus, require-jsdoc */ function* generator( x ) { var k = 0; - var m_mult = -x; - var m_prod = -1; + var mMult = -x; + var mProd = -1; while ( true ) { - m_prod *= m_mult; - yield ( m_prod / ++k ); + mProd *= mMult; + yield ( mProd / ++k ); } } });
14
diff --git a/src/govuk/components/checkboxes/checkboxes.js b/src/govuk/components/checkboxes/checkboxes.js @@ -56,11 +56,12 @@ Checkboxes.prototype.syncAll = function () { } Checkboxes.prototype.syncWithInputState = function ($input) { - var inputIsChecked = $input.checked - $input.setAttribute('aria-expanded', inputIsChecked) - var $content = this.$module.querySelector('#' + $input.getAttribute('aria-controls')) + if ($content) { + var inputIsChecked = $input.checked + + $input.setAttribute('aria-expanded', inputIsChecked) $content.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked) } }
7
diff --git a/extension/data/modules/comment.js b/extension/data/modules/comment.js @@ -490,6 +490,15 @@ function comments () { // Get the context TBApi.getJSON(contextUrl, {raw_json: 1}).then(data => { TBStorage.purifyObject(data); + + // data[1] is a listing containing comments + // if there are no comments in the listing, the thing we're trying to get context for has been + // removed/deleted and has no parents (if it had parents, the parents would still show up here) + if (!data[1].data.children.length) { + TBui.textFeedback('Content inaccessible; removed or deleted?', TBui.FEEDBACK_NEGATIVE); + return; + } + const commentOptions = { parentLink: true, contextLink: true,
9
diff --git a/checkfiles/checkfiles.py b/checkfiles/checkfiles.py @@ -371,6 +371,12 @@ def process_fastq_file(job, fastq_data_stream, session, url): '^(@[a-zA-Z\d]+[a-zA-Z\d_-]*:[a-zA-Z\d-]+:[a-zA-Z\d_-]' + '+:\d+:\d+:\d+:\d+[/1|/2]*[\s_][12]:[YXN]:[0-9]+:([ACNTG\+]*|[0-9]*))$' ) + + srr_read_name_pattern = re.compile( + '^(@SRR[\d.]+\s[a-zA-Z\d]+[a-zA-Z\d_-]*:[a-zA-Z\d-]+:[a-zA-Z\d_-]' + + '+:\d+:\d+:\d+:\d+\slength=[\d]+)$' + ) + read_numbers_set = set() signatures_set = set() signatures_no_barcode_set = set()
0
diff --git a/src/containers/CommentContainer.js b/src/containers/CommentContainer.js @@ -92,6 +92,10 @@ class CommentContainer extends Component { commentBody: null, } + static contextTypes = { + onLaunchNativeEditor: PropTypes.func.isRequired, + } + static childContextTypes = { onClickDeleteComment: PropTypes.func.isRequired, onClickEditComment: PropTypes.func.isRequired,
11
diff --git a/test/services/credential-service/credentials.test.js b/test/services/credential-service/credentials.test.js @@ -19,17 +19,17 @@ describe('Credential tests', () => { beforeEach(() => db.flushdb()); describe("'oauth2' specific cases", () => { - const policy = 'oauth2'; + const type = 'oauth2'; it('should not insert a credential that already exists', () => { - return insertCredential(policy).then(newCredential => { - return should(insertCredential(policy)).be.rejected(); + return insertCredential(type).then(newCredential => { + return should(insertCredential(type)).be.rejected(); }); }); it('should insert a credential without password specified if autoGeneratePassword is set to true', () => { return credentialService - .insertCredential(username, policy, {}) + .insertCredential(username, type, {}) .then(newCredential => { should.exist(newCredential); should.exist(newCredential.secret); @@ -38,7 +38,7 @@ describe('Credential tests', () => { }); it('should insert a credential with id but different type that already exists', () => { - return insertCredential(policy) + return insertCredential(type) .then(() => credentialService.insertCredential(username, 'basic-auth', credential)) .then(newCredential => { should.exist(newCredential); @@ -48,11 +48,11 @@ describe('Credential tests', () => { }); describe('support for multiple credentials', () => { - ['key-auth', 'jwt'].forEach(policy => { - it(policy, () => { + ['key-auth', 'jwt'].forEach(type => { + it(type, () => { return Promise.all([ - insertCredential(policy), - insertCredential(policy) + insertCredential(type), + insertCredential(type) ]) .then(() => credentialService.getCredentials(username)) .then(results => { @@ -63,21 +63,21 @@ describe('Credential tests', () => { }); const tests = [ - { policy: 'oauth2', passwordKey: 'secret' }, - { policy: 'basic-auth', passwordKey: 'password' }, - { policy: 'key-auth' }, - { policy: 'jwt' } + { type: 'oauth2', passwordKey: 'secret' }, + { type: 'basic-auth', passwordKey: 'password' }, + { type: 'key-auth' }, + { type: 'jwt' } ]; - tests.forEach(({ policy, passwordKey }) => { - describe(`policy: '${policy}'`, () => { + tests.forEach(({ type, passwordKey }) => { + describe(`credential type: '${type}'`, () => { it('should insert a credential', () => { - return insertCredential(policy); + return insertCredential(type); }); it("should get a credential and strip 'passwordKey' props", () => { - return insertCredential(policy) - .then(credential => credentialService.getCredential(credential.id, policy)) + return insertCredential(type) + .then(credential => credentialService.getCredential(credential.id, type)) .then(credential => { should.exist(credential); if (passwordKey) { @@ -89,11 +89,11 @@ describe('Credential tests', () => { }); it('should deactivate a credential', () => { - return insertCredential(policy) + return insertCredential(type) .then(credential => { - return credentialService.deactivateCredential(credential.id, policy).then(res => { + return credentialService.deactivateCredential(credential.id, type).then(res => { should.exist(res); - return credentialService.getCredential(credential.id, policy); + return credentialService.getCredential(credential.id, type); }); }) .then(credential => { @@ -103,11 +103,11 @@ describe('Credential tests', () => { }); it('should reactivate a credential', () => { - return insertCredential(policy) + return insertCredential(type) .then(credential => { - return credentialService.activateCredential(credential.id, policy).then(res => { + return credentialService.activateCredential(credential.id, type).then(res => { should.exist(res); - return credentialService.getCredential(credential.id, policy); + return credentialService.getCredential(credential.id, type); }); }) .then(credential => {
10
diff --git a/lib/wifi.js b/lib/wifi.js @@ -417,29 +417,36 @@ function wifiNetworks(callback) { let cmd = 'chcp 65001 && netsh wlan show networks mode=Bssid'; exec(cmd, util.execOptsWin, function (error, stdout) { - const parts = stdout.toString('utf8').split(os.EOL + os.EOL + 'SSID '); - parts.shift(); + const ssidParts = stdout.toString('utf8').split(os.EOL + os.EOL + 'SSID '); + ssidParts.shift(); + + ssidParts.forEach(ssidPart => { + const ssidLines = ssidPart.split(os.EOL); + if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(':') >= 0) { + const bssidsParts = ssidPart.split('BSSID '); + bssidsParts.shift(); + + bssidsParts.forEach((bssidPart) => { + const bssidLines = bssidPart.split(os.EOL); + const bssidLine = bssidLines[0].split(':'); + bssidLine.shift(); + const bssid = bssidLine.join(':').trim().toLowerCase(); + const channel = bssidLines[3].split(':').pop().trim(); + const quality = bssidLines[1].split(':').pop().trim(); - parts.forEach(part => { - const lines = part.split(os.EOL); - if (lines && lines.length >= 8 && lines[0].indexOf(':') >= 0) { - let bssid = lines[4].split(':'); - bssid.shift(); - bssid = bssid.join(':').trim().toLowerCase(); - const channel = lines[7].split(':').pop().trim(); - const quality = lines[5].split(':').pop().trim(); result.push({ - ssid: lines[0].split(':').pop().trim(), + ssid: ssidLines[0].split(':').pop().trim(), bssid, mode: '', channel: channel ? parseInt(channel, 10) : null, frequency: wifiFrequencyFromChannel(channel), signalLevel: wifiDBFromQuality(quality), quality: quality ? parseInt(quality, 10) : null, - security: [lines[2].split(':').pop().trim()], - wpaFlags: [lines[3].split(':').pop().trim()], + security: [ssidLines[2].split(':').pop().trim()], + wpaFlags: [ssidLines[3].split(':').pop().trim()], rsnFlags: [] }); + }); } });
7
diff --git a/bin/cli.js b/bin/cli.js @@ -68,15 +68,15 @@ let showCorrectUsage = function () { console.log(' --force Force all necessary directory modifications without prompts'); console.log(); console.log('Commands:'); - console.log(' create <appname> Create a new boilerplate app in working directory'); - console.log(' run <path> [requires docker] Run app at path inside container on your local machine'); - console.log(' restart <app-path-or-name> [requires docker] Restart an app with the specified name'); - console.log(' stop <app-path-or-name> [requires docker] Stop an app with the specified name'); + console.log(' create <appname> Create a new boilerplate app in your working directory'); + console.log(' run <path> [requires docker] Run the app at path inside container on your local machine'); + console.log(' restart <app-path-or-name> [requires docker] Restart the app at path'); + console.log(' stop <app-path-or-name> [requires docker] Stop the app'); console.log(' list [requires docker] List all running Docker containers on your local machine'); - console.log(' logs <app-path-or-name> [requires docker] Get logs for the app with the specified name'); + console.log(' logs <app-path-or-name> [requires docker] Get logs for the specified app'); console.log(' -f Follow the logs'); - console.log(' deploy <app-path> [requires kubectl] Deploy app at path to your Kubernetes cluster'); - console.log(' deploy-update <app-path> [requires kubectl] Deploy update to app which was previously deployed'); + console.log(' deploy <app-path> [requires kubectl] Deploy the app at path to your Kubernetes cluster'); + console.log(' deploy-update <app-path> [requires kubectl] Deploy update to an app which was previously deployed'); console.log(' undeploy <app-path> [requires kubectl] Shutdown all core app services running on your cluster'); console.log(' add-secret [requires kubectl] Upload a TLS key and cert pair to your cluster'); console.log(` -s Optional secret name; defaults to "${DEFAULT_TLS_SECRET_NAME}"`);
7
diff --git a/src/handleInput.js b/src/handleInput.js @@ -37,7 +37,8 @@ export default async function handleInput( if ( event.input.length >= 3 && state !== 'ASKING_NOT_USEFUL_FEEDBACK' && - state !== 'ASKING_ARTICLE_SUBMISSION_REASON' + state !== 'ASKING_ARTICLE_SUBMISSION_REASON' && + state !== 'ASKING_REPLY_REQUEST_REASON' ) { // If input contains more than 3 words, // consider it as a new query and start over.
11
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb @@ -17,6 +17,13 @@ class ApplicationController < ActionController::Base render file: Rails.root.join('public/404'), status: 404, layout: false end + rescue_from CanCan::AccessDenied do |exception| + respond_to do |format| + format.json { head :forbidden } + format.html { redirect_to main_app.root_url, alert: exception.message } + end + end + protected # store last visited url unless it's the login/sign up path,
9
diff --git a/lib/assets/javascripts/dashboard/dashboard.js b/lib/assets/javascripts/dashboard/dashboard.js @@ -205,6 +205,6 @@ function resetOrderWhenLikesIsApplied () { const dashboardOrder = localStorageInstance.get('dashboard.order'); if (dashboardOrder === 'likes') { - localStorageInstance.set({'dashboard.order': 'mapviews'}); + localStorageInstance.set({'dashboard.order': 'updated_at'}); } }
12
diff --git a/test/jasmine/tests/heatmap_test.js b/test/jasmine/tests/heatmap_test.js @@ -168,8 +168,8 @@ describe('heatmap convertColumnXYZ', function() { }; } - var xa = makeMockAxis(), - ya = makeMockAxis(); + var xa = makeMockAxis(); + var ya = makeMockAxis(); it('should convert x/y/z columns to z(x,y)', function() { trace = { @@ -305,8 +305,13 @@ describe('heatmap calc', function() { Plots.supplyDefaults(gd); var fullTrace = gd._fullData[0]; + var fullLayout = gd._fullLayout; - return Heatmap.calc(gd, fullTrace)[0]; + var out = Heatmap.calc(gd, fullTrace)[0]; + out._xcategories = fullLayout.xaxis._categories; + out._ycategories = fullLayout.yaxis._categories; + + return out; } it('should fill in bricks if x/y not given', function() { @@ -404,6 +409,25 @@ describe('heatmap calc', function() { expect(out.y).toBeCloseToArray([-0.5, 0.5]); expect(out.z).toBeCloseTo2DArray([[17, 18, 19]]); }); + + it('should handle the category x/y/z/ column case', function() { + var out = _calc({ + x: ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'], + y: ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C'], + z: [0, 50, 100, 50, 0, 255, 100, 510, 1010] + }); + + expect(out.x).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]); + expect(out.y).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]); + expect(out.z).toBeCloseTo2DArray([ + [0, 50, 100], + [50, 0, 510], + [100, 255, 1010] + ]); + + expect(out._xcategories).toEqual(['a', 'b', 'c']); + expect(out._ycategories).toEqual(['A', 'B', 'C']); + }); }); describe('heatmap plot', function() {
0
diff --git a/src/components/KeyboardSpacer/index.android.js b/src/components/KeyboardSpacer/index.android.js /** - * On Android the keyboard covers the input fields on the bottom of the view. This component moves the - * view up with the keyboard allowing the user to see what they are typing. + * On Android we do not need to implement a keyboard spacer, so we return a null component. + * + * @returns {null} + * @constructor */ -import React from 'react'; -import {StatusBar} from 'react-native'; -import BaseKeyboardSpacer from './BaseKeyboardSpacer'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; +const KeyboardSpacer = () => null; -const KeyboardSpacer = () => ( - <BaseKeyboardSpacer - topSpacing={StatusBar.currentHeight} - keyboardShowMethod="keyboardDidShow" - keyboardHideMethod="keyboardDidHide" - /> -); - -KeyboardSpacer.propTypes = windowDimensionsPropTypes; -KeyboardSpacer.displayName = 'KeyboardSpacer'; - -export default withWindowDimensions(KeyboardSpacer); +export default KeyboardSpacer;
12
diff --git a/desktop/core/library/_midi.js b/desktop/core/library/_midi.js @@ -23,7 +23,7 @@ function OperatorMidi (orca, x, y, passive) { let rawVelocity = this.listen(this.ports.input.velocity) let rawLength = this.listen(this.ports.input.length) - if (rawChannel === '.' || orca.valueOf(rawChannel) > 15 || rawOctave === 0 || rawOctave > 8 || rawNote === '.' || rawVelocity === '0' || rawLength === '0') { return } + if (rawChannel === '.' || orca.valueOf(rawChannel) > 15 || rawOctave === 0 || rawOctave > 8 || rawNote === '.') { return } // 0 - 16 const channel = clamp(orca.valueOf(rawChannel), 0, 15) @@ -32,9 +32,9 @@ function OperatorMidi (orca, x, y, passive) { // 0 - 11 const note = ['C', 'c', 'D', 'd', 'E', 'F', 'f', 'G', 'g', 'A', 'a', 'B'].indexOf(rawNote === 'e' ? 'F' : rawNote === 'b' ? 'C' : rawNote) // 0 - F(127) - const velocity = rawVelocity === '.' ? 127 : parseInt((clamp(orca.valueOf(rawVelocity), 1, 15) / 15) * 127) + const velocity = rawVelocity === '.' ? 127 : parseInt((clamp(orca.valueOf(rawVelocity), 0, 15) / 15) * 127) // 0 - F(15) - const length = clamp(orca.valueOf(rawLength), 1, 15) + const length = clamp(orca.valueOf(rawLength), 0, 15) if (note < 0) { console.warn(`Unknown note:${rawNote}`); return }
7
diff --git a/articles/logout/index.md b/articles/logout/index.md @@ -183,9 +183,14 @@ To log out a user from both Auth0 and their SAML identity provider, they must be The external SAML identity provider will need to know where to send SAML logout responses. The __SingleLogout service URL__ that will consume this response is the following: ```text -https://${account.namespace}/logout +https://${account.namespace}/v2/logout ``` +When viewing the logout metadata for your Auth0 Connection, you might notice two `SingleLogoutService` bindings. + +* The first is the **SAML Request Binding** (also known as the **Protocol Binding**), which is used for the transaction from Auth0 to the IdP. If the IdP provides a choice, select `HTTP-Redirect`. +* The second is the **SAML Response Binding**, which is used for transactions from the IdP to Auth0. It indicates to Auth0 what protocol the IdP will use to respond. If the IdP provides a choice, indicate that `HTTP-POST ` should be used for Authentication Assertions. + ### Unable to Logout Using a SAML Identity Provider When logging in (with Auth0 as the SAML Service Provider), the SAML identity provider uniquely identifies the user's session with a `SessionIndex` attribute in the `AuthnStatement` element of the SAML assertion. The `SessionIndex` value must be used again when the user logs out.
0
diff --git a/src/view/resolvers/ReferenceExpressionProxy.js b/src/view/resolvers/ReferenceExpressionProxy.js @@ -82,7 +82,9 @@ export default class ReferenceExpressionProxy extends LinkModel { })); const pathChanged = () => { - const model = base.joinAll( + const model = + base && + base.joinAll( members.reduce((list, m) => { const k = m.get(); if (isArray(k)) return list.concat(k);
9
diff --git a/light-mapper.js b/light-mapper.js import * as THREE from 'three'; -import {getRenderer} from './renderer.js'; +import {getRenderer, scene} from './renderer.js'; +import {WebaverseShaderMaterial} from './materials.js'; const localVector = new THREE.Vector3(); const localVector2 = new THREE.Vector3(); @@ -124,12 +125,14 @@ export class LightMapper extends EventTarget { chunkSize, terrainSize, range, + debug, }) { super(); this.chunkSize = chunkSize; this.terrainSize = terrainSize; - this.range = range; // XXX support this + this.range = range; + // this.debug = debug; const skylightData = new Uint8Array(terrainSize * terrainSize * terrainSize); const skylightTex = new THREE.DataTexture3D(skylightData, terrainSize, terrainSize, terrainSize); @@ -163,6 +166,95 @@ export class LightMapper extends EventTarget { -terrainSize / 2 ); this.lightTexSize = new THREE.Vector3(terrainSize, terrainSize, terrainSize); + + if (debug) { + const maxInstances = terrainSize * terrainSize * terrainSize; + const instancedCubeGeometry = new THREE.InstancedBufferGeometry(); + { + const cubeGeometry = new THREE.BoxBufferGeometry(0.8, 0.8, 0.8); + for (const k in cubeGeometry.attributes) { + instancedCubeGeometry.setAttribute(k, cubeGeometry.attributes[k]); + } + instancedCubeGeometry.setIndex(cubeGeometry.index); + } + const debugMaterial = new WebaverseShaderMaterial({ + uniforms: { + uSkylightTex: { + value: this.skylightTex, + needsUpdate: true, + }, + uAoTex: { + value: this.aoTex, + needsUpdate: true, + }, + }, + vertexShader: `\ + varying vec3 vNormal; + varying vec3 vUv; + + const float terrainSize = ${terrainSize.toFixed(8)}; + + void main() { + float instance = float(gl_InstanceID); + float x = mod(instance, terrainSize); + instance = (instance - x) / terrainSize; + float y = mod(instance, terrainSize); + instance = (instance - y) / terrainSize; + float z = instance; + + vec3 offset = vec3(x, y, z); + vUv = offset / terrainSize; + + gl_Position = projectionMatrix * modelViewMatrix * vec4(position + offset, 1.0); + + vNormal = normalMatrix * normal; + } + `, + fragmentShader: `\ + precision highp sampler3D; + + uniform sampler3D uSkylightTex; + uniform sampler3D uAoTex; + + varying vec3 vNormal; + varying vec3 vUv; + + const float terrainSize = ${terrainSize.toFixed(8)}; + + void main() { + float skylight = texture(uSkylightTex, vUv).r; + float ao = texture(uAoTex, vUv).r; + + float c = 1. - (skylight * 255. / 8.); + + if (c > 0.0) { + gl_FragColor = vec4(vNormal, c); + } else { + discard; + } + } + `, + // color: 0xFFFFFF, + transparent: true, + // opacity: 0.1, + }); + const debugMesh = new THREE.InstancedMesh(instancedCubeGeometry, debugMaterial, maxInstances); + const heightOffset = -60; + // debugMesh.position.y += heightOffset; + // debugMesh.updateMatrixWorld(); + // debugMesh.count = 0; + debugMesh.frustumCulled = false; + scene.add(debugMesh); + + this.addEventListener('coordupdate', e => { + const {coord} = e.data; + // console.log('coord update', coord.toArray().join(',')); + debugMesh.position.copy(coord) + // .multiplyScalar(terrainSize); + debugMesh.position.y += heightOffset; + debugMesh.updateMatrixWorld(); + }); + } } drawChunk(chunk, { skylights,
0
diff --git a/src/lang/en.json b/src/lang/en.json "WeaponTypesSolarian": "Solarian Weapon Crystals", "WeaponTypesSpecial": "Special Weapons", "WillSave": "Will", - - "LocalizationTerminator": "", - "Units": { "Speed": "ft." - } + }, + + "LocalizationTerminator": "" } } \ No newline at end of file
0
diff --git a/examples/MultiSwitch/example.js b/examples/MultiSwitch/example.js @@ -7,17 +7,17 @@ var ms = new MultiSwitch({ required: true, multiselect: false, dataProvider: [ - { "id": "1", "text": "Ministria e Puneve te Jashtme 1", "buttonClass": 'btn btn-xs btn-default'}, - { "id": "2", "text": "Ministria e Drejtesise 1", "buttonClass": 'btn btn-xs btn-default'}, - { "id": "3", "text": "Ministria e Brendshme 1", "buttonClass": 'btn btn-xs btn-success'}, - { "id": "4", "text": "Ministria e Mbrojtjes 1", "buttonClass": 'btn btn-xs btn-default'} + { "id": "1", "text": "Ministria e Puneve te Jashtme 1", "buttonClass": 'btn btn-sm btn-default'}, + { "id": "2", "text": "Ministria e Drejtesise 1", "buttonClass": 'btn btn-sm btn-default'}, + { "id": "3", "text": "Ministria e Brendshme 1", "buttonClass": 'btn btn-sm btn-success'}, + { "id": "4", "text": "Ministria e Mbrojtjes 1", "buttonClass": 'btn btn-sm btn-default'} ], valueField: "id", labelField: "text", classField: "buttonClass", - defaultClass: 'btn btn-xs btn-default', - selectedClass: 'btn btn-xs btn-success', - value: [{ "id": "3", "text": "Ministria e Brendshme", "buttonClass": 'btn btn-xs btn-success'}], + defaultClass: 'btn btn-sm btn-default', + selectedClass: 'btn btn-sm btn-success', + value: [{ "id": "3", "text": "Ministria e Brendshme", "buttonClass": 'btn btn-sm btn-success'}], onclick : function(e){ console.log("From MultiSwitch ClickAction"); //e.preventDefault(); @@ -33,17 +33,17 @@ var ms2 = new MultiSwitch({ required: true, multiselect: false, dataProvider: [ - { "id": "1", "text": "Ministria e Puneve te Jashtme 2", "buttonClass": 'btn btn-xs btn-default'}, - { "id": "2", "text": "Ministria e Drejtesise 2", "buttonClass": 'btn btn-xs btn-default'}, - { "id": "3", "text": "Ministria e Brendshme 2", "buttonClass": 'btn btn-xs btn-success'}, - { "id": "4", "text": "Ministria e Mbrojtjes 2", "buttonClass": 'btn btn-xs btn-default'} + { "id": "1", "text": "Ministria e Puneve te Jashtme 2", "buttonClass": 'btn btn-sm btn-default'}, + { "id": "2", "text": "Ministria e Drejtesise 2", "buttonClass": 'btn btn-sm btn-default'}, + { "id": "3", "text": "Ministria e Brendshme 2", "buttonClass": 'btn btn-sm btn-success'}, + { "id": "4", "text": "Ministria e Mbrojtjes 2", "buttonClass": 'btn btn-sm btn-default'} ], valueField: "id", labelField: "text", classField: "buttonClass", - defaultClass: 'btn btn-xs btn-default', - selectedClass: 'btn btn-xs btn-success', - value: [{ "id": "3", "text": "Ministria e Brendshme", "buttonClass": 'btn btn-xs btn-success'}], + defaultClass: 'btn btn-sm btn-default', + selectedClass: 'btn btn-sm btn-success', + value: [{ "id": "3", "text": "Ministria e Brendshme", "buttonClass": 'btn btn-sm btn-success'}], onclick : function(e){ console.log("From MultiSwitch ClickAction"); //e.preventDefault();
14
diff --git a/test/unit/specs/components/common/__snapshots__/AppHeader.spec.js.snap b/test/unit/specs/components/common/__snapshots__/AppHeader.spec.js.snap // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`AppHeader has the expected html structure 1 1`] = ` -"<nav id=\\"app-header\\"> +"<nav id=\\"app-header\\" class=\\"\\"> <div class=\\"container\\"> <!----> <a href=\\"#/\\" class=\\"header-item header-item-logo router-link-exact-active router-link-active\\"><img src=\\"~@/assets/images/cosmos.png\\"></a> @@ -12,7 +12,7 @@ exports[`AppHeader has the expected html structure 1 1`] = ` `; exports[`AppHeader has the expected html structure 2 1`] = ` -"<nav id=\\"app-header\\"> +"<nav id=\\"app-header\\" class=\\"mobile\\"> <div class=\\"container\\"> <div class=\\"header-item\\"></div> <a href=\\"#/\\" class=\\"header-item header-item-logo router-link-exact-active router-link-active\\"><img src=\\"~@/assets/images/cosmos.png\\"></a> @@ -25,7 +25,7 @@ exports[`AppHeader has the expected html structure 2 1`] = ` `; exports[`AppHeader has the expected html structure 3 1`] = ` -"<nav id=\\"app-header\\"> +"<nav id=\\"app-header\\" class=\\"\\"> <div class=\\"container\\"> <!----> <a href=\\"#/\\" class=\\"header-item header-item-logo router-link-exact-active router-link-active\\"><img src=\\"~@/assets/images/cosmos.png\\"></a> @@ -36,7 +36,7 @@ exports[`AppHeader has the expected html structure 3 1`] = ` `; exports[`AppHeader has the expected html structure 4 1`] = ` -"<nav id=\\"app-header\\"> +"<nav id=\\"app-header\\" class=\\"mobile\\"> <div class=\\"container\\"> <div class=\\"header-item\\"></div> <a href=\\"#/\\" class=\\"header-item header-item-logo router-link-exact-active router-link-active\\"><img src=\\"~@/assets/images/cosmos.png\\"></a>
3
diff --git a/src/widgets/time-series/torque-time-slider-view.js b/src/widgets/time-series/torque-time-slider-view.js @@ -50,21 +50,15 @@ module.exports = cdb.core.View.extend({ }, _initBinds: function () { - this._torqueLayerModel.bind('change:start change:end', this._updateChartandTimeslider, this); - this._torqueLayerModel.bind('change:step', this._onChangeStep, this); - this._torqueLayerModel.bind('change:steps', this._updateChartandTimeslider, this); + this.listenTo(this._torqueLayerModel, 'change:start change:end', this._updateChartandTimeslider); + this.listenTo(this._torqueLayerModel, 'change:step', this._onChangeStep); + this.listenTo(this._torqueLayerModel, 'change:steps', this._updateChartandTimeslider); - this.add_related_model(this._torqueLayerModel); + this.listenTo(this._chartView.model, 'change:width', this._updateChartandTimeslider); + this.listenTo(this._chartView.model, 'change:height', this._onChangeChartHeight); - this._chartView.model.bind('change:width', this._updateChartandTimeslider, this); - this._chartView.model.bind('change:height', this._onChangeChartHeight, this); - this.add_related_model(this._chartView.model); - - this._dataviewModel.on('change:bins', this._updateChartandTimeslider, this); - this._dataviewModel.filter.on('change:min change:max', this._onFilterMinMaxChange, this); - - this.add_related_model(this._dataviewModel); - this.add_related_model(this._dataviewModel.filter); + this.listenTo(this._dataviewModel, 'change:bins', this._updateChartandTimeslider); + this.listenTo(this._dataviewModel.filter, 'change:min change:max', this._onFilterMinMaxChange); }, clean: function () {
14
diff --git a/src/dataset.js b/src/dataset.js @@ -64,32 +64,26 @@ export const checkAndSerialize = (item, limitBytes, index) => { * @ignore */ export const chunkBySize = (items, limitBytes) => { - const toJsonArray = array => `[${array.join(',')}]`; + if (!items.length) return []; - let lastChunkBytes = 2; // add 2 bytes for [] wrapper - const chunks = []; - // Split payloads into buckets of valid size + let lastChunkBytes = 2; // Add 2 bytes for [] wrapper. + const chunks = [[]]; // Prepopulate with an empty array. + + // Split payloads into buckets of valid size. for (const payload of items) { // eslint-disable-line const bytes = Buffer.byteLength(payload); - // Ensure last item is always an array - if (!Array.isArray(_.last(chunks))) chunks.push([]); + if (lastChunkBytes + bytes < limitBytes) { - // If the item fits in the last chunk, push it there. _.last(chunks).push(payload); lastChunkBytes += bytes + 1; // add 1 byte for ',' separator } else { - // Otherwise, the last chunk is full. Serialize it and create a new chunk. - const chunk = chunks.pop(); - chunks.push(toJsonArray(chunk)); chunks.push([payload]); lastChunkBytes = bytes + 2; // add 2 bytes for [] wrapper } } - // Stringify last chunk - const lastChunk = chunks.pop(); - chunks.push(toJsonArray(lastChunk)); - return chunks; + // Stringify each chunk. + return chunks.map(chunk => `[${chunk.join(',')}]`); }; /**
7
diff --git a/README.md b/README.md @@ -319,7 +319,8 @@ Run tests and view test results right from your favorite IDE. Work with page elements in a way that is native to your framework. * [Aurelia](https://github.com/miherlosev/testcafe-aurelia-selectors) -* [React](https://github.com/DevExpress/testcafe-react-selectors/) +* [React](https://github.com/DevExpress/testcafe-react-selectors) +* [Vue](https://github.com/devexpress/testcafe-vue-selectors) ### Plugins for Task Runners
0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -125,6 +125,8 @@ Long-lived tokens compromise your security. Following this process is <strong>NO Use panels when you want to separate long information from the main body of the document. +Try to add a meaningful title to the panel. Avoid using "NOTE" or "WARNING". + We support two types of panels: **panel** and **panel-warning**.
0
diff --git a/CHANGELOG.md b/CHANGELOG.md ### New features -#### Add formGroup parameter to character count component +#### Add classes to the form group wrapper of the character count component -- [Pull request #1553: Include formGroup on character count and pass through to textarea to allow class to be added to character count form group](https://github.com/alphagov/govuk-frontend/pull/1553). +You can now add classes to the form group wrapper of the character count component. + +```javascript +govukCharacterCount({ + formGroup: { + classes: 'app-character-count--custom-modifier' + } +}) +``` + +- [Pull request #1553: Include formGroup on character count and pass through to textarea to allow class to be added to character count form group](https://github.com/alphagov/govuk-frontend/pull/1553). Thanks to [Emma Lewis](https://github.com/LBHELewis). ### Fixes
7
diff --git a/src/og/control/LayerAnimation.js b/src/og/control/LayerAnimation.js @@ -39,6 +39,22 @@ class LayerAnimation extends Control { this._timeoutStart = 0; } + _setFrame(frameIndex) { + if (this._getFrameIndex(this._currentIndex) !== frameIndex) { + for (let i = 0, len = this._getFramesNum(); i < len; i++) { + if (i !== frameIndex) { + this._removeFrameFromPlanet(i); + } else { + this._appendFrameToPlanet(i); + } + } + } + } + + _getFramesNum() { + return Math.ceil(this._layersArr.length / this._frameSize); + } + _getFrameIndex(layerIndex) { return Math.floor(layerIndex / this._frameSize); } @@ -184,6 +200,7 @@ class LayerAnimation extends Control { if (this._playIndex !== 0) { this._clearInterval(); this._playIndex = 0; + this._setFrame(0); this.setCurrentIndex(0); this.events.dispatch(this.events.stop); }
0
diff --git a/README.md b/README.md @@ -20,7 +20,7 @@ and more. * [Quick start options](#quick-start-options) * [Modules](#modules) -* [Building plotly.js](##building-plotlyjs) +* [Building plotly.js](#building-plotlyjs) * [Bugs and feature requests](#bugs-and-feature-requests) * [Documentation](#documentation) * [Contributing](#contributing) @@ -106,7 +106,7 @@ Important: the plotly.js code base contains some non-ascii characters. Therefore ## Building plotly.js -Building instructions using `webpack`, `browserify` and other build frameworks in [`BUILDING.md`](https://github.com/plotly/plotly.js/blob/master/BUILDING.md) +Building instructions using `webpack`, `browserify` and other build frameworks are in [`BUILDING.md`](https://github.com/plotly/plotly.js/blob/master/BUILDING.md) ## Bugs and feature requests
3
diff --git a/sources/osgShader/ShaderProcessor.js b/sources/osgShader/ShaderProcessor.js @@ -156,15 +156,31 @@ ShaderProcessor.prototype = { }; } )(), - _convertExtensionsToWebGL2: function ( strExtension ) { - return strExtension.replace( '#extension GL_EXT_shader_texture_lod', '// bla' ); - }, + _convertExtensionsToWebGL2: ( function () { + + var cbRenamer = function ( match, extension ) { + return 'core_' + extension; + }; + + var cbDefiner = function ( match, extension ) { + return '#define ' + extension; + }; + + var extensions = '(GL_EXT_shader_texture_lod|GL_OES_standard_derivatives|GL_EXT_draw_buffers|GL_EXT_frag_depth)'; + var definer = new RegExp( '#\\s*extension\\s+' + extensions + '.*', 'g' ); + var renamer = new RegExp( extensions, 'g' ); + + return function ( strShader ) { + strShader = strShader.replace( definer, cbDefiner ); // replace #extension by #define + strShader = strShader.replace( renamer, cbRenamer ); // rename extension + return strShader; + }; + } )(), _convertToWebGL2: ( function () { var frags = []; - var replaceMRT = function ( str ) { - var number = parseInt( str.match( /\d+/ ), 10 ); + var replaceMRT = function ( match, number ) { var varName = 'glFragData_' + number; frags[ number ] = 'layout(location = ' + number + ') out vec4 ' + varName + ';'; return varName; @@ -178,18 +194,15 @@ ShaderProcessor.prototype = { strShader = strShader.replace( /(texture2D|textureCube)\s*\(/g, 'texture(' ); strShader = strShader.replace( /(textureCubeLodEXT)\s*\(/g, 'textureLod(' ); - strShader = strShader.replace( /#\s*extension \s*GL_EXT_shader_texture_lod/, '// core in gl2 : GL_EXT_shader_texture_lod' ); - strShader = strShader.replace( /#\s*extension \s*GL_OES_standard_derivatives/, '// core in gl2 : GL_OES_standard_derivatives' ); - strShader = strShader.replace( /#\s*extension \s*GL_EXT_draw_buffers/, '// core in gl2 : GL_EXT_draw_buffers' ); - strShader = strShader.replace( /#\s*extension \s*GL_EXT_frag_depth /, '// core in gl2 : GL_EXT_frag_depth ' ); + strShader = this._convertExtensionsToWebGL2( strShader ); if ( isFragment ) { frags.length = 0; - strShader = strShader.replace( /gl_FragData\s*\[\s*\d+\s*\]/g, replaceMRT ); + strShader = strShader.replace( /gl_FragData\s*\[\s*(\d+)\s*\]/g, replaceMRT ); if ( !frags.length ) frags.push( 'out vec4 glFragColor_0;' ); strShader = strShader.replace( /gl_FragColor/g, 'glFragColor_0' ); - strShader = strShader.replace( /void\s*main\s*\(/g, frags.join( '\n' ) + '\nvoid main(' ); + strShader = strShader.replace( /void\s+main\s*\(/g, frags.join( '\n' ) + '\nvoid main(' ); } return strShader; @@ -199,7 +212,7 @@ ShaderProcessor.prototype = { _hasVersion: function ( shader ) { // match first line starting with # var version = shader.match( /^#(.*)$/m ); - return version && version[ 0 ].replace( ' ', '' ).indexOf( 'version' ) !== -1; + return version && version[ 0 ].indexOf( 'version' ) !== -1; }, // process shader
7
diff --git a/src/schemas/json/aiproj.json b/src/schemas/json/aiproj.json { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "description": "Settings for project analysis by the application inspector", "properties": { "BlackBoxSettings": { "description": "Autocheck vulnerabilities after scanning", "type": "boolean" }, - "Scope": { + "ScanScope": { "description": "Scan scope", "type": "string", "enum": ["Domain", "Folder", "Path"] }, "UserPackagePrefixes": { "description": "Prefixes of custom packages", - "type": "string" + "type": ["string", "null"] }, "Version": { "description": "JDK version", "description": "Project name", "type": "string" }, - "ScanAppType": { + "ScanModules": { "description": "Enabled modules", "type": "array", "items": {
10
diff --git a/index.css b/index.css @@ -1249,6 +1249,9 @@ header.builtin.import .wallet.import, header.builtin.locked .wallet.locked, head height: 100vh; outline: none; } +#canvas.hover { + pointer-events: none; +} .crosshair { position: absolute; top: 0;
0
diff --git a/docs/plugins/README.md b/docs/plugins/README.md @@ -25,9 +25,9 @@ React Static ships with a plugin API to extend React Static's functionality. - [react-static-plugin-source-filesystem](/packages/react-static-plugin-source-filesystem) - Creates routes from files in a directory - [react-static-plugin-mdx](/packages/react-static-plugin-mdx) - Adds support for MDX - Type checking - - [react-static-plugin-typescript](packages/react-static-plugin-typescript) - Allows you to write your components in TypeScript + - [react-static-plugin-typescript](/packages/react-static-plugin-typescript) - Allows you to write your components in TypeScript - Assets - - [react-static-plugin-sitemap](packages/react-static-plugin-sitemap) - Exports sitemap information as XML + - [react-static-plugin-sitemap](/packages/react-static-plugin-sitemap) - Exports sitemap information as XML ### Unofficial Plugins via NPM
1
diff --git a/src/km.js b/src/km.js properties: ['openFile'], }); if (!v) return; - if (/\.dws$/.test(v)) { + if (/\.dws$/i.test(v)) { $.confirm( `Run Latent Expression of ${v.replace(/^.*[\\/]/, '')}?`, 'Load Workspace', - x => D.ide.exec([` )${(x ? '' : 'x')}load ${v}\n`], 0), + (x) => D.ide.exec([` )${(x ? '' : 'x')}load ${v}\n`], 0), ); } else { D.ide.exec([` )ED file://${v}\n`], 0); const t = JSON.stringify(`${x}\n`); w.webContents.executeJavaScript(`e.textContent += ${t}; h.scrollTop = h.scrollHeight`); }; - f(cn.getLog().filter(x => x).join('\n')); + f(cn.getLog().filter((x) => x).join('\n')); cn.addLogListener(f); w.on('closed', () => { delete D.logw; cn.rmLogListener(f); }); }, }); - const pfKey = i => () => D.ide.pfKey(i); + const pfKey = (i) => () => D.ide.pfKey(i); for (let i = 1; i <= 48; i++) D.commands[`PF${i}`] = pfKey(i); // order: used to measure how "complicated" precondition: 'tracer && !session', keybindings: stlkbs, label: 'Skip to line', - run: e => ed.STL(e), + run: (e) => ed.STL(e), }); me.addAction({ id: 'dyalog-fix', precondition: '!tracer && !session', keybindings: fxkbs, label: 'Fix', - run: e => ed.FX(e), + run: (e) => ed.FX(e), }); }; D.remDefaultMap = (me) => {
8
diff --git a/src/Page/TextLayerItem.jsx b/src/Page/TextLayerItem.jsx @@ -9,11 +9,11 @@ import { isPage, isRotate } from '../shared/propTypes'; const BROKEN_FONT_ALARM_THRESHOLD = 0.1; export class TextLayerItemInternal extends PureComponent { - state = { - transform: null, + componentDidMount() { + this.alignTextItem(); } - componentDidMount() { + componentDidUpdate() { this.alignTextItem(); } @@ -99,9 +99,7 @@ export class TextLayerItemInternal extends PureComponent { const ascent = fontData ? fontData.ascent : 1; - this.setState({ - transform: `scaleX(${targetWidth / actualWidth}) translateY(${(1 - ascent) * 100}%)`, - }); + element.style.transform = `scaleX(${targetWidth / actualWidth}) translateY(${(1 - ascent) * 100}%)`; } getElementWidth = (element) => { @@ -112,7 +110,6 @@ export class TextLayerItemInternal extends PureComponent { render() { const { fontSize, top, left } = this; const { fontName, scale, str: text } = this.props; - const { transform } = this.state; return ( <div @@ -126,7 +123,6 @@ export class TextLayerItemInternal extends PureComponent { transformOrigin: 'left bottom', whiteSpace: 'pre', pointerEvents: 'all', - transform, }} ref={(ref) => { this.item = ref; }} >
7
diff --git a/src/og/control/LayerSwitcher.js b/src/og/control/LayerSwitcher.js @@ -59,13 +59,6 @@ class LayerSwitcher extends Control { var lineDiv = document.createElement("div"); lineDiv.className = "layersEntry" var that = this; - // var center = document.createElement("div"); - // center.classList.add("ogViewExtentBtn"); - // center.onclick = function () { - // that.planet.flyExtent(obj.getExtent()); - // }; - - var inp = document.createElement("input"); inp.type = type; inp.name = "ogBaseLayerRadiosId" + (id || ""); @@ -94,7 +87,6 @@ class LayerSwitcher extends Control { container.removeChild(lineDiv); }; - // lineDiv.appendChild(center); lineDiv.appendChild(inp); lineDiv.appendChild(lbl);
2
diff --git a/buildtools/webpack-migration b/buildtools/webpack-migration #!/bin/bash -ex +function jscodeshift { + node_modules/.bin/jscodeshift $* | tee /tmp/jscodeshift.log + grep --quiet '^0 errors$' /tmp/jscodeshift.log + rm /tmp/jscodeshift.log +} + node node_modules/googshift/filename-case-from-module.js src '*.js' node node_modules/googshift/filename-case-from-module.js contribs/gmf/src '*.js' node node_modules/googshift/filename-case-from-module.js contribs/gmf/apps '*.js' -node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_provide_to_goog_module.js src contribs/gmf/src examples contribs/gmf/examples test contribs/gmf/test contribs/gmf/apps -node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --absolute-module=true src contribs/gmf/src examples contribs/gmf/examples test contribs/gmf/test -node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js contribs/gmf/apps +jscodeshift --transform=node_modules/googshift/transforms/goog_provide_to_goog_module.js src contribs/gmf/src examples contribs/gmf/examples test contribs/gmf/test contribs/gmf/apps +jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --absolute-module=true src contribs/gmf/src examples contribs/gmf/examples test contribs/gmf/test +jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js contribs/gmf/apps git add -A # To be removed when we use the new OpenLayers version buildtools/git-grep-sed " from 'ol/" "s/ from 'ol\/\(.*\)';/ from \'ol\/\L\1\';/g" # To be removed when we use the new OpenLayers version buildtools/git-grep-sed 'ngInject' 's|\* @ngInject|*//* @ngInject|g'
9
diff --git a/src/reducers/tokens/index.js b/src/reducers/tokens/index.js @@ -19,12 +19,17 @@ const likelyContractsReducer = handleActions({ }, initialState) const tokensReducer = handleActions({ - [tokens.tokensDetails.set]: (state, { payload }) => ({ + [tokens.likelyContracts.get]: (state, { ready, error, payload, meta }) => + (!ready || error) + ? state + : ({ ...state, - tokens: { - ...state.tokens, - ...payload + tokens: [...payload, ...meta].reduce((x, contract) => ({ + ...x, + [contract]: { + contract } + }), {}) }), [tokens.tokensDetails.getMetadata]: (state, { ready, error, payload, meta }) => (!ready || error)
9
diff --git a/README.md b/README.md # [![LOGO][logo-image]][logo-url] **React Most Wanted** -[![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![License][license-image]][license-url] [![Code Style][code-style-image]][code-style-url] +[![Build Status][travis-image]][travis-url] [![License][license-image]][license-url] [![Code Style][code-style-image]][code-style-url] RMW is a set of features and best practices **that you can choose from** and use around your React projects, built on [Create React App](https://github.com/facebookincubator/create-react-app). You can checkout the demo at [react-most-wanted.com](https://react-most-wanted.com). @@ -49,8 +49,6 @@ This project uses [MIT license](https://github.com/TarikHuber/react-most-wanted/ [logo-url]: https://github.com/TarikHuber/react-most-wanted/blob/master/README.md [travis-image]: https://travis-ci.org/TarikHuber/react-most-wanted.svg?branch=master [travis-url]: https://travis-ci.org/TarikHuber/react-most-wanted -[daviddm-image]: https://img.shields.io/david/TarikHuber/react-most-wanted.svg?style=flat-square -[daviddm-url]: https://david-dm.org/TarikHuber/react-most-wanted [license-image]: https://img.shields.io/npm/l/express.svg [license-url]: https://github.com/TarikHuber/react-most-wanted/master/LICENSE [code-style-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
2
diff --git a/assets/js/googlesitekit/data/create-notifications-store.test.js b/assets/js/googlesitekit/data/create-notifications-store.test.js @@ -44,7 +44,7 @@ describe( 'createNotificationsStore store', () => { let apiFetchSpy; let dispatch; let registry; - let selectors; + let select; let storeDefinition; let store; @@ -59,7 +59,7 @@ describe( 'createNotificationsStore store', () => { registry.registerStore( STORE_NAME, storeDefinition ); dispatch = registry.dispatch( STORE_NAME ); store = registry.stores[ STORE_NAME ].store; - selectors = registry.select( STORE_NAME ); + select = registry.select( STORE_NAME ); apiFetchSpy = jest.spyOn( { apiFetch }, 'apiFetch' ); } ); @@ -104,7 +104,7 @@ describe( 'createNotificationsStore store', () => { dispatch.removeNotification( 'not_a_real_id' ); muteConsole( 'error' ); //Ignore the API fetch error here. - expect( selectors.getNotifications() ).toEqual( undefined ); + expect( select.getNotifications() ).toEqual( undefined ); } ); it( 'does not fail when no matching notification is found', () => { @@ -114,7 +114,7 @@ describe( 'createNotificationsStore store', () => { dispatch.removeNotification( 'not_a_real_id' ); muteConsole( 'error' ); //Ignore the API fetch error here. - expect( selectors.getNotifications() ).toEqual( [ notification ] ); + expect( select.getNotifications() ).toEqual( [ notification ] ); } ); it( 'removes the notification from client notifications', () => { @@ -138,7 +138,7 @@ describe( 'createNotificationsStore store', () => { expect( state.clientNotifications ).toMatchObject( {} ); muteConsole( 'error' ); // Mute API fetch failure here. - expect( selectors.getNotifications() ).toMatchObject( {} ); + expect( select.getNotifications() ).toMatchObject( {} ); } ); it( 'does not remove server notifications and emits a warning if they are sent to removeNotification', async () => { @@ -154,7 +154,7 @@ describe( 'createNotificationsStore store', () => { const clientNotification = { id: 'client_notification' }; - selectors.getNotifications(); + select.getNotifications(); dispatch.addNotification( clientNotification ); await subscribeUntil( registry, @@ -168,7 +168,7 @@ describe( 'createNotificationsStore store', () => { expect( global.console.warn ).toHaveBeenCalledWith( `Cannot remove server-side notification with ID "${ serverNotifications[ 0 ].id }"; this may be changed in a future release.` ); expect( - selectors.getNotifications() + select.getNotifications() ).toEqual( expect.arrayContaining( serverNotifications ) ); } ); } ); @@ -214,21 +214,21 @@ describe( 'createNotificationsStore store', () => { { status: 200 } ); - const initialNotifications = selectors.getNotifications(); + const initialNotifications = select.getNotifications(); // Notifications will be their initial value while being fetched. expect( initialNotifications ).toEqual( undefined ); await subscribeUntil( registry, () => ( - selectors.getNotifications() !== undefined + select.getNotifications() !== undefined ), ); - const notifications = selectors.getNotifications(); + const notifications = select.getNotifications(); expect( fetch ).toHaveBeenCalledTimes( 1 ); expect( notifications ).toEqual( response ); - const notificationsSelect = selectors.getNotifications(); + const notificationsSelect = select.getNotifications(); expect( fetch ).toHaveBeenCalledTimes( 1 ); expect( notificationsSelect ).toEqual( notifications ); } ); @@ -243,7 +243,7 @@ describe( 'createNotificationsStore store', () => { // returned when server notifications haven't loaded yet, but client // notifications have been dispatched. muteConsole( 'error' ); // Ignore the API fetch failure here. - expect( selectors.getNotifications() ).toEqual( [ notification ] ); + expect( select.getNotifications() ).toEqual( [ notification ] ); } ); it( 'dispatches an error if the request fails', async () => { @@ -262,14 +262,14 @@ describe( 'createNotificationsStore store', () => { ); muteConsole( 'error' ); - selectors.getNotifications(); + select.getNotifications(); await subscribeUntil( registry, // TODO: We may want a selector for this, but for now this is fine // because it's internal-only. () => store.getState().isFetchingNotifications === false, ); - const notifications = selectors.getNotifications(); + const notifications = select.getNotifications(); expect( fetch ).toHaveBeenCalledTimes( 1 ); expect( notifications ).toEqual( undefined );
10
diff --git a/src/main/java/org/cboard/jdbc/JdbcDataProvider.java b/src/main/java/org/cboard/jdbc/JdbcDataProvider.java @@ -148,6 +148,7 @@ public class JdbcDataProvider extends DataProvider implements Aggregatable { druidDS.setBreakAfterAcquireFailure(true); druidDS.setConnectionErrorRetryAttempts(5); datasourceMap.put(key, druidDS); + ds = datasourceMap.get(key); } } }
1
diff --git a/includes/Core/Modules/Modules.php b/includes/Core/Modules/Modules.php @@ -443,8 +443,8 @@ final class Modules { $this->set_active_modules_option( $option ); - if ( is_callable( array( $module, 'on_activation' ) ) ) { - call_user_func( array( $module, 'on_activation' ) ); + if ( $module instanceof Module_With_Activation ) { + $module->on_activation(); } return true; @@ -481,8 +481,8 @@ final class Modules { $this->set_active_modules_option( array_values( $option ) ); - if ( is_callable( array( $module, 'on_deactivation' ) ) ) { - call_user_func( array( $module, 'on_deactivation' ) ); + if ( $module instanceof Module_With_Deactivation ) { + $module->on_deactivation(); } return true;
14
diff --git a/packages/@uppy/companion/src/server/helpers/utils.js b/packages/@uppy/companion/src/server/helpers/utils.js @@ -38,7 +38,7 @@ exports.jsonStringify = (data) => { * @param {string} text */ exports.sanitizeHtml = (text) => { - return text.replace(/<\/?[^>]+(>|$)/g, '') + return text ? text.replace(/<\/?[^>]+(>|$)/g, '') : text } /**
14
diff --git a/publish/deployed/local-ovm/config.json b/publish/deployed/local-ovm/config.json "ReadProxyAddressResolver": { "deploy": true }, - "BinaryOptionMarketFactory": { - "deploy": true - }, - "BinaryOptionMarketManager": { - "deploy": true - }, - "BinaryOptionMarketData": { - "deploy": true - }, - "Depot": { - "deploy": true - }, "TradingRewards": { "deploy": true }, "ExchangeState": { "deploy": true }, - "EtherCollateral": { - "deploy": true - }, "FeePool": { "deploy": true },
2
diff --git a/client/app/actions/index.js b/client/app/actions/index.js @@ -98,6 +98,7 @@ export const giveStoryEstimate = (storyId, value) => (dispatch, getState) => { if (state.stories[storyId] && state.stories[storyId].estimations[state.userId] === value) { command.name = 'clearStoryEstimate'; + delete command.payload.value; } else { command.name = 'giveStoryEstimate'; }
1
diff --git a/components/core/ProfilePhoto.js b/components/core/ProfilePhoto.js @@ -34,7 +34,12 @@ function BoringAvatar({ avatarCss, ...props }) { let avatarUrl = `https://source.boringavatars.com/marble/${props.size}/${props.userId}?square&colors=${colors}`; return ( <Dismissible captureResize={false} captureScroll={true}> - <img src={avatarUrl} css={[avatarCss, STYLES_AVATAR]} alt="profile preview" /> + <img + src={avatarUrl} + css={[avatarCss, STYLES_AVATAR]} + style={props.style} + alt="profile preview" + /> </Dismissible> ); }
1
diff --git a/packages/fcl/src/current-user/index.js b/packages/fcl/src/current-user/index.js @@ -19,6 +19,7 @@ const DEL_CURRENT_USER = "DEL_CURRENT_USER" const GET_AS_PARAM = "GET_AS_PARAM" const CHALLENGE_RESPONSE_EVENT = "FCL::CHALLENGE::RESPONSE" +const CHALLENGE_CANCEL_EVENT = "FCL::CHALLENGE::CANCEL" const DATA = `{ "VERSION": "0.2.0", @@ -88,7 +89,13 @@ async function authenticate() { }) const replyFn = async ({data}) => { + if (data.type === CHALLENGE_CANCEL_EVENT) { + unrender() + window.removeEventListener("message", replyFn) + return + } if (data.type !== CHALLENGE_RESPONSE_EVENT) return + unrender() window.removeEventListener("message", replyFn)
11
diff --git a/src/components/ProductItem/ProductItem.js b/src/components/ProductItem/ProductItem.js @@ -7,8 +7,8 @@ import Hidden from "@material-ui/core/Hidden"; import Typography from "@material-ui/core/Typography"; import LoadingIcon from "mdi-material-ui/Loading"; import Link from "components/Link"; -import Badge from "components/Badge"; -import { inventoryStatus, isProductLowQuantity, INVENTORY_STATUS, priceByCurrencyCode } from "lib/utils"; +import ProductItemBadges from "components/ProductItemBadges"; +import { priceByCurrencyCode } from "lib/utils"; import { styles } from "./styles"; @withStyles(styles, { withTheme: true }) @@ -101,18 +101,11 @@ class ProductItem extends Component { ); } - renderBadge() { - - } - renderProductMedia() { - const { classes, product } = this.props; - const status = inventoryStatus(product); + const { classes } = this.props; return ( <div className={classes.productMedia}> - {status && <Badge type={status.type} label={status.label} />} - {isProductLowQuantity(product) && <Badge type={INVENTORY_STATUS.LOW_QUANTITY} label="Low Inventory" />} {this.renderProductImage()} </div> ); @@ -138,10 +131,14 @@ class ProductItem extends Component { } render() { + const { product } = this.props; + return ( <div> <Link route={this.productDetailHref}> + <ProductItemBadges product={product}> {this.renderProductMedia()} + </ProductItemBadges> {this.renderProductInfo()} </Link> </div>
5
diff --git a/src/css_composer/model/CssRule.js b/src/css_composer/model/CssRule.js import Styleable from 'domain_abstract/model/Styleable'; +import { isEmpty, forEach } from 'underscore'; var Backbone = require('backbone'); var Selectors = require('selector_manager/model/Selectors'); @@ -118,6 +119,25 @@ module.exports = Backbone.Model.extend(Styleable).extend({ return result; }, + toJSON(...args) { + const obj = Backbone.Model.prototype.toJSON.apply(this, args); + + if (this.em.getConfig('avoidDefaults')) { + const defaults = this.defaults; + + forEach(defaults, (value, key) => { + if (obj[key] === value) { + delete obj[key]; + } + }); + + if (isEmpty(obj.selectors)) delete obj.selectors; + if (isEmpty(obj.style)) delete obj.style; + } + + return obj; + }, + /** * Compare the actual model with parameters * @param {Object} selectors Collection of selectors
7
diff --git a/demo/context.js b/demo/context.js // eslint-disable-next-line no-unused-vars -import { createElement, Component, createContext, Fragment } from "ceviche"; +import { createElement, Component, createContext, Fragment } from "preact"; const { Provider, Consumer } = createContext(); class ThemeProvider extends Component {
10
diff --git a/lib/ContextModule.js b/lib/ContextModule.js @@ -166,7 +166,7 @@ webpackContext.id = ${JSON.stringify(id)};`; } getSourceWithBlocks(blocks, id) { - let hasMultipleChunks = false; + let hasMultipleOrNoChunks = false; const map = blocks .filter(block => block.dependencies[0].module) .map(function(block) { @@ -181,7 +181,7 @@ webpackContext.id = ${JSON.stringify(id)};`; }).reduce(function(map, item) { const chunks = item.block.chunks || []; if(chunks.length !== 1) { - hasMultipleChunks = true; + hasMultipleOrNoChunks = true; } map[item.userRequest] = [item.dependency.module.id] .concat(chunks.map(chunk => chunk.id)); @@ -189,7 +189,7 @@ webpackContext.id = ${JSON.stringify(id)};`; return map; }, {}); - const requestPrefix = hasMultipleChunks ? + const requestPrefix = hasMultipleOrNoChunks ? "Promise.all(ids.slice(1).map(__webpack_require__.e))" : "__webpack_require__.e(ids[1])";
10
diff --git a/src/plots/cartesian/align_period.js b/src/plots/cartesian/align_period.js @@ -44,9 +44,8 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) { // var isMiddle = 'middle' === alignment; var isEnd = 'end' === alignment; - var offset = (new Date()).getTimezoneOffset() * 60000; var period0 = trace[axLetter + 'period0']; - var base = (dateTime2ms(period0, calendar) || 0) - offset; + var base = dateTime2ms(period0, calendar) || 0; var newVals = []; var len = vals.length; @@ -55,9 +54,9 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) { var dateStr = ms2DateTime(v, 0, calendar); var d = new Date(dateStr); - var year = d.getFullYear(); - var month = d.getMonth(); - var day = d.getDate(); + var year = d.getUTCFullYear(); + var month = d.getUTCMonth(); + var day = d.getUTCDate(); var newD; var startTime; @@ -73,8 +72,8 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) { var d1 = day + nDays; if(nDays || nMonths || nYears) { if(nDays) { - startTime = (new Date(year, month, day)).getTime(); - var monthDays = new Date(y1, m1 + 1, 0).getDate(); + startTime = Date.UTC(year, month, day); + var monthDays = new Date(y1, m1 + 1, 0).getUTCDate(); if(d1 > monthDays) { d1 -= monthDays; m1 += 1; @@ -83,13 +82,13 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) { y1 += 1; } } - endTime = (new Date(y1, m1, d1)).getTime(); + endTime = Date.UTC(y1, m1, d1); } else if(nMonths) { - startTime = (new Date(year, nYears ? month : roundMonth(month, nMonths))).getTime(); + startTime = Date.UTC(year, nYears ? month : roundMonth(month, nMonths)); endTime = incrementMonth(startTime, mPeriod ? mPeriod : nMonths, calendar); } else { - startTime = (new Date(year, 0)).getTime(); - endTime = (new Date(y1, 0)).getTime(); + startTime = Date.UTC(year, 0); + endTime = Date.UTC(y1, 0); } newD = new Date(
2
diff --git a/tests/e2e/specs/Modeler.spec.js b/tests/e2e/specs/Modeler.spec.js @@ -17,15 +17,11 @@ const generateXML = (nodeName) => { </bpmn:definitions>`; }; -function dragFromSourceToDest(source, dest, positionX, positionY){ +function dragFromSourceToDest(source, dest, position) { const dataTransfer = new DataTransfer(); cy.get(`[data-test=${ source }]`).trigger('dragstart', { dataTransfer }); cy.get(dest).trigger('dragenter', { force: true }); - cy.get(dest).trigger('drop', positionX, positionY); -} - -function generateRandomPoint() { - return Math.floor(Math.random() * 500) + 150; + cy.get(dest).trigger('drop', { x: position.x, y: position.y }); } function typeIntoTextInput(selector, value) { @@ -51,6 +47,7 @@ describe('Modeler', () => { beforeEach(() => { cy.visit('/'); cy.reload(); + cy.viewport(1280, 720); }); it('Renders the application without errors', () => { @@ -66,8 +63,7 @@ describe('Modeler', () => { dragFromSourceToDest( type, '.paper-container', - generateRandomPoint(), - generateRandomPoint(), + 200, 200 ); }); cy.get('.modeler').children().should('have.length', emptyChildrenCount + nodeTypes.length); @@ -95,7 +91,7 @@ describe('Modeler', () => { dragFromSourceToDest( 'processmaker-modeler-task', '.paper-container', - { x: generateRandomPoint(), y: generateRandomPoint()}, + 200, 200 ); cy.get('.joint-viewport').find('.joint-type-processmaker-components-nodes-task').click({force: true}); @@ -109,7 +105,7 @@ describe('Modeler', () => { dragFromSourceToDest( 'processmaker-modeler-exclusive-gateway', '.paper-container', - { x: generateRandomPoint(), y: generateRandomPoint()}, + 200, 200 ); cy.get('.joint-viewport').find('.joint-type-processmaker-modeler-bpmn-exclusivegateway').click({force: true}); @@ -123,7 +119,7 @@ describe('Modeler', () => { dragFromSourceToDest( 'processmaker-modeler-text-annotation', '.paper-container', - { x: generateRandomPoint(), y: generateRandomPoint()}, + 200, 200 ); cy.get('.joint-viewport').find('.joint-type-standard-polyline').click({force: true}); @@ -137,7 +133,7 @@ describe('Modeler', () => { dragFromSourceToDest( 'processmaker-modeler-pool', '.paper-container', - { x: generateRandomPoint(), y: generateRandomPoint()}, + 200, 200 ); cy.get('.joint-viewport').find('.joint-type-processmaker-modeler-bpmn-pool').click({force: true});
2
diff --git a/src/app/Http/Controllers/Operations/UpdateOperation.php b/src/app/Http/Controllers/Operations/UpdateOperation.php @@ -59,7 +59,7 @@ trait UpdateOperation * * @param int $id * - * @return Response + * @return \Illuminate\Contracts\View\View */ public function edit($id) { @@ -82,7 +82,7 @@ trait UpdateOperation /** * Update the specified resource in the database. * - * @return Response + * @return \Illuminate\Http\Response */ public function update() {
1
diff --git a/src/tests/addons.test.js b/src/tests/addons.test.js @@ -5,6 +5,8 @@ const cliPath = require('./utils/cliPath') const exec = require('./utils/exec') const sitePath = path.join(__dirname, 'dummy-site') +let siteId + const execOptions = { stdio: [0, 1, 2], cwd: sitePath, @@ -30,6 +32,7 @@ test.before(async t => { t.truthy(matches.hasOwnProperty(1)) t.truthy(matches[1]) + siteId = matches[1] // Set the site id execOptions.env.NETLIFY_SITE_ID = matches[1] }) @@ -71,6 +74,8 @@ test.after('cleanup', async t => { console.log('Performing cleanup') // Run cleanup await deleteAddon('demo') - console.log('deleting test site: '+ siteName) - await exec(`${cliPath} sites:delete ${siteName}`, execOptions) + console.log(`deleting test site "${siteName}". ${siteId}`) + if (siteId) { + await exec(`${cliPath} sites:delete ${siteId} --force`, execOptions) + } })
12
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js } if (this.options.title == undefined) { - this.options.title = this.$element.attr('title'); + this.options.title = this.$element[0].title; } if (this.options.selectedTextFormat == 'static') { } //strip all HTML tags and trim the result, then unescape any escaped tags - this.$button.attr('title', htmlUnescape($.trim(title.replace(/<[^>]*>?/g, '')))); - this.$button.find('.filter-option-inner-inner').html(title); + this.$button[0].title = htmlUnescape(title.replace(/<[^>]*>?/g, '').trim()); + this.$button.find('.filter-option-inner-inner')[0].innerHTML = title; this.$element.trigger('rendered.bs.select'); },
4
diff --git a/src/lime/graphics/Image.hx b/src/lime/graphics/Image.hx @@ -629,6 +629,7 @@ class Image #if flash var buffer = new ImageBuffer(null, bitmapData.width, bitmapData.height); buffer.__srcBitmapData = bitmapData; + buffer.transparent = bitmapData.transparent; return new Image(buffer); #else return bitmapData.image;
12
diff --git a/package.json b/package.json "strip-bom": "^2.0.0", "testcafe-browser-tools": "2.0.16", "testcafe-hammerhead": "24.5.4", - "testcafe-legacy-api": "5.1.1", + "testcafe-legacy-api": "5.1.2", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.1.0", "testcafe-reporter-minimal": "^2.1.0",
3
diff --git a/src/app.js b/src/app.js @@ -76,7 +76,7 @@ async function main(){ require('./apiv2')(app, db); require('./donations/kofi')(app, db); - async function getExtra(favorite = false){ + async function getExtra(page = null, favorite = false){ const output = {}; output.twemoji = twemoji; @@ -85,16 +85,15 @@ async function main(){ output.packs = lib.getPacks(); - if(favorite){ - const profile = await db - .collection('usernames') - .find( { uuid: favorite }) - .toArray(); + if('recaptcha_site_key' in credentials) + output.recaptcha_site_key = credentials.recaptcha_site_key; - const favorites = profile[0] + const patreonEntry = await db.collection('donations').findOne({type: 'patreon'}); - output.favorites = favorites; - } + if(patreonEntry != null) + output.donations = { patreon: patreonEntry.amount || 0 }; + + if (page != 'index') return output; const devs = { metalcupcake5: "a dev or something idk", @@ -103,6 +102,7 @@ async function main(){ MartinNemi03: "Lazy Developer", FantasmicGalaxy: "" } + output.devs = [] for(const dev in devs){ const profile = await db @@ -111,23 +111,22 @@ async function main(){ .toArray(); if(!profile[0]) continue; - profile[0].message = devs[dev]; output.devs.push(profile[0]); } - if('recaptcha_site_key' in credentials) - output.recaptcha_site_key = credentials.recaptcha_site_key; - - const patreonEntry = await db.collection('donations').findOne({type: 'patreon'}); + if(favorite && favorite.length == 32){ + const profile = await db + .collection('usernames') + .find( { uuid: favorite } ) + .toArray(); - if(patreonEntry == null) - return output; + if(!profile[0]) return output; + const favorites = profile[0]; - output.donations = { - patreon: patreonEntry.amount || 0 - }; + output.favorites = favorites; + } return output; } @@ -146,15 +145,16 @@ async function main(){ const items = await lib.getItems(profile.members[profile.uuid], true, req.cookies.pack); const calculated = await lib.getStats(db, profile, allProfiles, items); - res.render('stats', { req, items, calculated, _, constants, helper, extra: await getExtra(), page: 'stats' }); + res.render('stats', { req, items, calculated, _, constants, helper, extra: await getExtra('stats'), page: 'stats' }); }catch(e){ console.error(e); + const favorite = req.cookies.favorite || false; res.render('index', { req, error: e, player: playerUsername, - extra: await getExtra(), + extra: await getExtra('index', favorite), helper, page: 'index' }); @@ -349,7 +349,7 @@ Disallow: /item /head /leather /resources app.all('/favicon.ico?v2', express.static(path.join(__dirname, 'public'))); app.all('/api', async (req, res, next) => { - res.render('api', { error: null, player: null, extra: await getExtra(), helper, page: 'api' }); + res.render('api', { error: null, player: null, extra: await getExtra('api'), helper, page: 'api' }); }); app.all('/:player/:profile?', async (req, res, next) => { @@ -358,7 +358,7 @@ Disallow: /item /head /leather /resources app.all('/', async (req, res, next) => { const favorite = req.cookies.favorite || false; - res.render('index', { error: null, player: null, extra: await getExtra(favorite), helper, page: 'index' }); + res.render('index', { error: null, player: null, extra: await getExtra('index', favorite), helper, page: 'index' }); }); app.all('*', async (req, res, next) => {
7
diff --git a/style/monogatari.css b/style/monogatari.css @@ -31,7 +31,7 @@ html { h1, h2 { padding: 0.03em; - font-size: 7vmax; + font-size: 5rem; } h3 { @@ -43,7 +43,7 @@ body { width: 100vw; max-height: 100vh; max-width: 100vw; - font-size: 2vmax; + font-size: 1.5rem; text-align: center; -webkit-background-size: cover; -moz-background-size: cover; @@ -63,8 +63,8 @@ li { } button { - width: 15vmax; - height: 5vmax; + width: 10rem; + height: 3.5rem; background: rgba(0, 0, 0, 0.5); color: #f7f7f7; padding: 0; @@ -148,8 +148,8 @@ section > div:not(.row) { border-radius: 4px; } -.modal > p { - font-size: 2.5vmax; +.modal p { + font-size: 2rem; } .modal > .row { @@ -179,7 +179,7 @@ section > div:not(.row) { transition: all 0.5s; overflow-y: scroll; padding: 2vmin; - font-size: 1.5vmax; + font-size: 1.25rem; color: rgba(66, 66, 66, 0.9); } @@ -252,6 +252,10 @@ section > div:not(.row) { padding: 1vmin; } +[data-ui="input-message"] { + font-size: 1.5rem; +} + [data-ui="input"] input, textarea { padding: 1vmin; @@ -259,6 +263,11 @@ textarea { min-width: 50%; } +[data-ui="input"] button { + width: 5rem; + height: 3rem; +} + [data-ui="player"] { max-height: 50vh; max-width: 50vw; @@ -294,7 +303,7 @@ textarea { background-color: rgba(0, 0, 0, 0.5); min-height: 20%; max-height: 25%; - overflow-y: scroll; + overflow-y: auto; width: 100%; z-index: 10; text-align: left;
7
diff --git a/scripts/config.js b/scripts/config.js @@ -2,7 +2,7 @@ let utily = require("utily"); let pkg = require("../package.json"); //Generate the header -module.exports = function() { +exports.getHeader = function() { let header = []; header.push("/**"); header.push(" * @name {{ name }} v{{ version }}");
10
diff --git a/src/server/routes/index.js b/src/server/routes/index.js @@ -33,12 +33,25 @@ module.exports = function(crowi, app) { /* eslint-disable max-len, comma-spacing, no-multi-spaces */ - app.get('/' , applicationInstalled, loginRequired , autoReconnectToSearch, page.showTopPage); - // API v3 app.use('/api-docs', require('./apiv3/docs')(crowi)); app.use('/_api/v3', require('./apiv3')(crowi)); + app.get('/' , applicationInstalled, loginRequired , autoReconnectToSearch, page.showTopPage); + + app.get('/login/error/:reason' , applicationInstalled, login.error); + app.get('/login' , applicationInstalled, login.preLogin, login.login); + app.get('/login/invited' , applicationInstalled, login.invited); + app.post('/login/activateInvited' , applicationInstalled, form.invited , csrf, login.invited); + app.post('/login' , applicationInstalled, form.login , csrf, loginPassport.loginWithLocal, loginPassport.loginWithLdap, loginPassport.loginFailure); + + app.post('/register' , applicationInstalled, form.register , csrf, login.register); + app.get('/register' , applicationInstalled, login.preLogin, login.register); + app.get('/logout' , applicationInstalled, logout.logout); + + app.get('/admin' , applicationInstalled, loginRequiredStrictly , adminRequired , admin.index); + app.get('/admin/app' , applicationInstalled, loginRequiredStrictly , adminRequired , admin.app.index); + // installer if (!isInstalled) { const installer = require('./installer')(crowi); @@ -47,23 +60,6 @@ module.exports = function(crowi, app) { return; } - app.get('/login/error/:reason' , login.error); - app.get('/login' , applicationInstalled, login.preLogin, login.login); - app.get('/login/invited' , login.invited); - app.post('/login/activateInvited' , form.invited , csrf, login.invited); - app.post('/login' , form.login , csrf, loginPassport.loginWithLocal, loginPassport.loginWithLdap, loginPassport.loginFailure); - app.post('/_api/login/testLdap' , loginRequiredStrictly , form.login , loginPassport.testLdapCredentials); - - app.post('/register' , form.register , csrf, login.register); - app.get('/register' , applicationInstalled , login.preLogin, login.register); - app.get('/logout' , logout.logout); - - app.get('/admin' , loginRequiredStrictly , adminRequired , admin.index); - app.get('/admin/app' , loginRequiredStrictly , adminRequired , admin.app.index); - - // security admin - app.get('/admin/security' , loginRequiredStrictly , adminRequired , admin.security.index); - // OAuth app.get('/passport/google' , loginPassport.loginWithGoogle, loginPassport.loginFailure); app.get('/passport/github' , loginPassport.loginWithGitHub, loginPassport.loginFailure); @@ -77,6 +73,11 @@ module.exports = function(crowi, app) { app.get('/passport/oidc/callback' , loginPassport.loginPassportOidcCallback , loginPassport.loginFailure); app.post('/passport/saml/callback' , loginPassport.loginPassportSamlCallback , loginPassport.loginFailure); + app.post('/_api/login/testLdap' , loginRequiredStrictly , form.login , loginPassport.testLdapCredentials); + + // security admin + app.get('/admin/security' , loginRequiredStrictly , adminRequired , admin.security.index); + // markdown admin app.get('/admin/markdown' , loginRequiredStrictly , adminRequired , admin.markdown.index);
12
diff --git a/edit.js b/edit.js @@ -6728,10 +6728,6 @@ function animate(timestamp, frame) { _tickPlanetAnimation(factor); } */ - /* if (session) { - wristMenu.update(frame, session, renderer.xr.getReferenceSpace()); - } */ - if (geometryWorker) { pxMeshes = pxMeshes.filter(pxMesh => { if (pxMesh.update()) {
2
diff --git a/src/components/common/view/Icon/config.json b/src/components/common/view/Icon/config.json "width": 790 }, "search": [ - "profile-privacy" + "privacy-policy" ] }, { }, { "uid": "c4d7dc6f17825456e410da3f2e693a7f", - "css": "profile-privacy", + "css": "privacy-policy", "code": 59550, "src": "custom_icons", "selected": true,
10
diff --git a/assets/src/edit-story/components/library/mediaLibrary.js b/assets/src/edit-story/components/library/mediaLibrary.js @@ -172,7 +172,7 @@ function MediaLibrary( { onInsert } ) { const insertMediaElement = ( attachment, width ) => { const { src, mimeType, oWidth, oHeight } = attachment; - const height = getRelativeHeight( oWidth, oHeight, DEFAULT_WIDTH ); + const height = getRelativeHeight( oWidth, oHeight, width ); if ( SUPPORTED_IMAGE_TYPES.includes( mimeType ) ) { onInsert( 'image', { src,
4
diff --git a/website/content/docs/add-to-your-site.md b/website/content/docs/add-to-your-site.md @@ -45,18 +45,8 @@ The first file, `admin/index.html`, is the entry point for the Netlify CMS admin <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script> </body> </html> - -<!-- -The main script that builds the page and powers the Netlify CMS can be included from -two deffirent sources, - -- https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js -- https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js - -For any reason if the script url used above fails, the other source can be used instead. ---> - ``` +In the above code the `script` is loaded from `unpkg` CDN. Should there be any issue with it, `jsDelivr` can be used as an alterntive option. The `src` for that would be `https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js` The second file, `admin/config.yml`, is the heart of your Netlify CMS installation, and a bit more complex. The [Configuration](#configuration) section covers the details.
5
diff --git a/articles/api-auth/tutorials/authorization-code-grant.md b/articles/api-auth/tutorials/authorization-code-grant.md @@ -119,7 +119,7 @@ For details on the validations that should be performed refer to [Verify Access ## More reading - [Calling APIs from Server-side Web Apps](/api-auth/grant/authorization-code) -- [Configuring your tenant for API Authorization](/api-auth/tutorials/configuring-tenant-for-api-auth) +- [How to refresh a token](/tokens/preview/refresh-token) - [How to configure an API in Auth0](/apis) - [Web App Quickstarts](/quickstart/webapp) - [Client Authentication for Server-side Web Apps](/client-auth/server-side-web)
0
diff --git a/geoportal/src/main/resources/metadata/details/arcgis-details.xslt b/geoportal/src/main/resources/metadata/details/arcgis-details.xslt <xsl:value-of select="local-name()"/> </xsl:with-param> </xsl:call-template> + <xsl:text> </xsl:text> <xsl:value-of select="@value"/> + <br/> </xsl:when> <xsl:when test="./*[@value]"> <dt> <xsl:value-of select="local-name()"/> </xsl:with-param> </xsl:call-template> - </dt> + <dd> <xsl:apply-templates select="*"/> + </dd> + </dt> </xsl:when> <xsl:when test="*"> <dt>
7