code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/content/en/tools/chrome-devtools/javascript/breakpoints.md b/src/content/en/tools/chrome-devtools/javascript/breakpoints.md @@ -2,7 +2,7 @@ project_path: /web/tools/_project.yaml book_path: /web/tools/_book.yaml description: Learn about all the ways you can pause your code in Chrome DevTools. -{# wf_updated_on: 2018-12-19 #} +{# wf_updated_on: 2019-02-16 #} {# wf_published_on: 2017-02-03 #} {# wf_blink_components: Platform>DevTools #} @@ -320,7 +320,7 @@ Ensuring the target function is in scope can be tricky if you're calling `debug()` from the DevTools Console. Here's one strategy: 1. Set a [line-of-code breakpoint](#loc) somewhere where the function is - scope. + in scope. 1. Trigger the breakpoint. 1. Call `debug()` in the DevTools Console while the code is still paused on your line-of-code breakpoint.
1
diff --git a/lib/connection.js b/lib/connection.js @@ -1385,7 +1385,7 @@ Connection.prototype.setClient = function setClient(client) { * * Syncs all the indexes for the models registered with this connection. * - * @param {import('mongodb').CreateIndexesOptions & { continueOnError?: boolean } } options + * @param {Object} options * @param {Boolean} options.continueOnError `false` by default. If set to `true`, mongoose will not throw an error if one model syncing failed, and will return an object where the keys are the names of the models, and the values are the results/errors for each model. * @returns */
13
diff --git a/src/program/grammar.imba b/src/program/grammar.imba @@ -42,9 +42,14 @@ def denter indent,outdent,stay,o = {} let cases = { '$1==$S2\t': indent - '$1==$S2': stay + '$1==$S2': { + cases: {'$1==$S6': stay,'@default': {token: '@rematch',switchTo: '@*$1'}} + } '@default': outdent } + for k,v of ['next','switchTo'] + if indent[k] and indent[k].indexOf('*') == -1 + indent[k] += '*$1' # for own k,v of cases let rule = [/^(\t*)(?=[^\t\n])/,{cases: cases}] @@ -65,7 +70,7 @@ export const states = { root: [ [/^@comment/,'comment','@>_comment'] # want to push this state _ before the token [/^(\t+)(?=[^\t\n])/,{cases: { - '$1==$S2\t': {token: 'white.indent',next: '@>_indent'} + '$1==$S2\t': {token: 'white.indent',next: '@>_indent*$1'} '@default': 'white.indent' }}] 'block_' @@ -509,17 +514,17 @@ export const states = { [/\{/, '{', '@object_body'] [/(@variable)/,'identifier.$F'] [/(\s*\,\s*)/,'separator'] - [/\s(in|of)@B/,'keyword',switchTo: '@for_source='] + [/\s(in|of)@B/,'keyword',switchTo: '@>for_source='] [/[ \t]+/, 'white'] ] for_source: [ - denter({switchTo: '@>for_body'},-1,-1) + denter({switchTo: '@>for_body'},-1,{switchTo: '@for_body'}) 'expr_' [/[ \t]+/, 'white'] ] for_body: [ - denter(null,-1,0) + denter(2,-1,0) 'block_' ] @@ -966,7 +971,7 @@ export const states = { # 5 = the monarch substate -- for identifiers++ def rewrite-state raw - let state = ['$S1','$S2','$S3','$S4','$S5'] + let state = ['$S1','$S2','$S3','$S4','$S5','$S6'] if raw.match(/\@(pop|push|popall)/) return raw @@ -974,7 +979,6 @@ def rewrite-state raw raw = raw.slice(1) if raw[0] == '@' if raw.indexOf('.') >= 0 - console.log 'return raw state',raw return raw raw = rewrite-token(raw) @@ -982,10 +986,10 @@ def rewrite-state raw # return raw if raw[0] == '>' - state[1] = '$S2\t' + state[1] = '$S6\t' raw = raw.slice(1) - for part in raw.split(/(?=[\/\&\=])/) + for part in raw.split(/(?=[\/\&\=\*])/) if part[0] == '&' if part[1] == '-' or part[1] == '_' state[2] = '$S3' + part.slice(1) @@ -998,6 +1002,8 @@ def rewrite-state raw state[3] = part.slice(1) elif part[0] == '/' state[4] = part.slice(1) + elif part[0] == '*' + state[5] = part.slice(1) else state[0] = part return state.join('.') @@ -1008,6 +1014,7 @@ def rewrite-token raw raw = raw.replace('$F','$S4') raw = raw.replace('$&','$S3') raw = raw.replace('$I','$S2') + raw = raw.replace('$T','$S2') # if orig != raw # console.log 'rewriting token',orig,raw
7
diff --git a/components/Vote/Election.js b/components/Vote/Election.js @@ -226,18 +226,18 @@ class Election extends Component { this.selectRecommendation = () => { const { vote } = this.state - const { data: { election } } = this.props + const { data: { election }, vt } = this.props const recommended = election.candidacies .filter(c => c.recommendation) const voteEqRecommendation = recommended - .filter(e => vote.find(u => u.id === e.id)) - .filter(e => recommended.find(v => v.id === e.id)) + .filter(e => !vote.find(u => u.id === e.id)) + .concat(vote.filter(e => !recommended.find(u => u.id === e.id))) .length < 1 let replace = true - if (!voteEqRecommendation) { - replace = window.confirm('Wollen Sie Ihre Wahl durch die Empfehlung ersetzen?') + if (vote.length > 0 && !voteEqRecommendation) { + replace = window.confirm(vt('vote/election/confirmRecommendation')) } if (replace) { this.setState({
12
diff --git a/packages/phenomic-plugin-bundler-webpack/src/index.js b/packages/phenomic-plugin-bundler-webpack/src/index.js import path from "path" +// import url from "url" +// import pkg from "phenomic/package.json" import findCacheDir from "find-cache-dir" +// import webpack, { BannerPlugin, optimize, DefinePlugin } from "webpack" import webpack, { BannerPlugin, optimize } from "webpack" import webpackDevMiddleware from "webpack-dev-middleware" @@ -15,10 +18,35 @@ const requireSourceMapSupport = `require('${ .replace(/\\/g, "/") }');` +// const wrap = JSON.stringify + +const getWebpackConfig = (config) => { + const userWebpackConfig = require(path.join(config.path, "webpack.config.js")) + return { + ...userWebpackConfig, + // plugins: [ + // ...(userWebpackConfig.plugins || []), + // new DefinePlugin({ "process.env": { + // NODE_ENV: wrap( + // config.production + // ? "production" + // : process.env.NODE_ENV + // ), + // + // PHENOMIC_USER_PATHNAME: wrap(process.env.PHENOMIC_USER_PATHNAME), + // PHENOMIC_USER_URL: wrap(url.format(config.baseUrl)), + // PHENOMIC_NAME: wrap(pkg.name[0].toUpperCase() + pkg.name.slice(1)), + // PHENOMIC_VERSION: wrap(pkg.version), + // PHENOMIC_HOMEPAGE: wrap(pkg.homepage), + // PHENOMIC_REPOSITORY: wrap(pkg.repository), + // } }), + // ], + } +} + export default function() { return { name: "phenomic-plugin-bundler-webpack", - type: "bundler", getMiddleware(config) { debug("get middleware") const compiler = webpack(getWebpackConfig(config)) @@ -31,7 +59,7 @@ export default function() { }, buildForPrerendering(config) { debug("build for prerendering") - const webpackConfig = require(path.join(config.path, "webpack.config.js")) + const webpackConfig = getWebpackConfig(config) const specialConfig = { ...webpackConfig, target: "node", @@ -70,9 +98,8 @@ export default function() { }, build(config) { debug("build") - const webpackConfig = require(path.join(config.path, "webpack.config.js")) return new Promise((resolve, reject) => { - webpack(webpackConfig).run(function(error /* , stats */) { + webpack(getWebpackConfig(config)).run(function(error /* , stats */) { error ? reject(error) : resolve()
4
diff --git a/articles/email/templates.md b/articles/email/templates.md @@ -231,9 +231,8 @@ In addition to the [common variables](#common-variables) available for all email ``` #### Redirect To Results for the Verification Email Template -You can [configure a **Redirect To** URL](#configuring-redirect-to) to send the users to after the email verification action was attempted. When redirecting, Auth0 will include the following parameters: +You can [configure a **Redirect To** URL](#configuring-redirect-to) to send the users to after the email verification action was attempted. By default, Auth0 includes the following parameters: -* `email` indicating the email of the user * `success` with value `true` or `false` indicating whether the email verification was successful * `message` with an additional description of the outcome. Some possible values are: * `Your email was verified. You can continue using the application.` (with `success=true`) @@ -260,9 +259,8 @@ In addition to the [common variables](#common-variables) available for all email #### Redirect To Results for the Change Password Template -You can [configure a **Redirect To** URL](#configuring-redirect-to) to send the users to after the password change action was attempted. When redirecting, Auth0 will include the following parameters: +You can [configure a **Redirect To** URL](#configuring-redirect-to) to send the users to after the password change action was attempted. By default, Auth0 includes the following parameters: -* `email` indicating the email of the user * `success` with value `true` or `false` indicating whether the password change was successful * `message` with an additional description of the outcome. Some possible values are: * `You can now login to the application with the new password.` (with `success=true`)
2
diff --git a/docs/en/API-reference.md b/docs/en/API-reference.md @@ -6,8 +6,8 @@ The `Dayjs` object is immutable, that is, all API operations that change the `Da - [API Reference](#api-reference) - [Parsing](#parsing) - - [Constructor `.dayjs(existing?: string | number | Date | Dayjs)`](#constructor-dayjsexisting-string-number-date-dayjs) - - [ISO 8601 string](#iso-8601httpsenwikipediaorgwikiiso8601-string) + - [Constructor `.dayjs(existing?: string | number | Date | Dayjs)`](#constructor-dayjsexisting-string--number--date--dayjs) + - [ISO 8601 string](#iso-8601-string) - [Unix Timestamp (milliseconds since the Unix Epoch - Jan 1 1970, 12AM UTC)](#unix-timestamp-milliseconds-since-the-unix-epoch---jan-1-1970-12am-utc) - [Native Javascript Date object](#native-javascript-date-object) - [Clone `.clone() | dayjs(original: Dayjs)`](#clone-clone-dayjsoriginal-dayjs)
1
diff --git a/packages/insomnia-app/app/ui/components/codemirror/code-editor.js b/packages/insomnia-app/app/ui/components/codemirror/code-editor.js @@ -20,7 +20,6 @@ import DropdownItem from '../base/dropdown/dropdown-item'; import { query as queryXPath } from 'insomnia-xpath'; import deepEqual from 'deep-equal'; import zprint from 'zprint-clj'; -import YAML from 'yaml'; const TAB_KEY = 9; const TAB_SIZE = 4; @@ -421,14 +420,6 @@ class CodeEditor extends React.Component { } } - _prettifyYAML(code) { - try { - return YAML.stringify(YAML.parse(code), null, this._indentChars()); - } catch (e) { - return code; - } - } - static _prettifyEDN(code) { try { return zprint(code, null); @@ -781,8 +772,6 @@ class CodeEditor extends React.Component { code = this._prettifyXML(code); } else if (CodeEditor._isEDN(this.props.mode)) { code = CodeEditor._prettifyEDN(code); - } else if (CodeEditor._isYAML(this.props.mode)) { - code = this._prettifyYAML(code); } else { code = this._prettifyJSON(code); } @@ -813,12 +802,7 @@ class CodeEditor extends React.Component { _canPrettify() { const { mode } = this.props; - return ( - CodeEditor._isJSON(mode) || - CodeEditor._isXML(mode) || - CodeEditor._isEDN(mode) || - CodeEditor._isYAML(mode) - ); + return CodeEditor._isJSON(mode) || CodeEditor._isXML(mode) || CodeEditor._isEDN(mode); } _showFilterHelp() { @@ -891,8 +875,6 @@ class CodeEditor extends React.Component { contentTypeName = 'JSON'; } else if (CodeEditor._isXML(mode)) { contentTypeName = 'XML'; - } else if (CodeEditor._isYAML(mode)) { - contentTypeName = 'YAML'; } else if (CodeEditor._isEDN(mode)) { contentTypeName = 'EDN'; }
2
diff --git a/app/models/carto/api_key.rb b/app/models/carto/api_key.rb @@ -74,8 +74,6 @@ module Carto after_destroy :drop_db_role after_destroy :remove_from_redis - attr_writer :redis_client - def granted_apis @granted_apis ||= process_granted_apis end
2
diff --git a/assets/sass/components/global/_googlesitekit-DeviceSizeTabBar.scss b/assets/sass/components/global/_googlesitekit-DeviceSizeTabBar.scss svg { color: $c-device-icon-gray; - - path { - fill: $c-device-icon-gray; - } } &.mdc-tab--active { svg { color: $c-white; - - path { - fill: $c-white; - } } }
2
diff --git a/app/models/audit/AuditTaskInteractionTable.scala b/app/models/audit/AuditTaskInteractionTable.scala @@ -209,17 +209,21 @@ object AuditTaskInteractionTable { |FROM ( | SELECT (timestamp - LAG(timestamp, 1) OVER(PARTITION BY user_id ORDER BY timestamp)) AS diff | FROM ( - | SELECT user_id, timestamp - | FROM validation_task_interaction - | INNER JOIN mission ON mission.mission_id = validation_task_interaction.mission_id - | WHERE action IN ('ValidationButtonClick_Agree', 'ValidationButtonClick_Disagree', 'ValidationButtonClick_NotSure', 'ValidationKeyboardShortcut_Agree', 'ValidationKeyboardShortcut_Disagree', 'ValidationKeyboardShortcut_NotSure') - | AND mission.user_id = '$userId' + | SELECT user_id, end_timestamp AS timestamp + | FROM label_validation + | WHERE end_timestamp IS NOT NULL + | AND user_id = '$userId' | UNION | SELECT user_id, timestamp | FROM audit_task_interaction | INNER JOIN audit_task ON audit_task.audit_task_id = audit_task_interaction.audit_task_id | WHERE action IN ('ViewControl_MouseDown', 'LabelingCanvas_MouseDown') | AND audit_task.user_id = '$userId' + | UNION + | SELECT user_id, timestamp + | FROM webpage_activity + | WHERE activity LIKE 'Visit_Labeling_Guide%' + | AND user_id = '$userId' | )"timestamps" |) "time_diffs" |WHERE diff < '00:05:00.000' AND diff > '00:00:00.000';""".stripMargin
7
diff --git a/lib/file.js b/lib/file.js @@ -453,13 +453,13 @@ File.prototype.extractHashStyleTasks = function(config, pos, content) { }; File.prototype.ignoreCodeList = function(name, config) { - if (config.ignoreList(name)) return true + if (config && config.ignoreList(name)) return true if (!this.isCodeFile()) return true; return !config.includeList(name); }; File.prototype.ignoreHashList = function(name, config) { - if (config.ignoreList(name)) return true + if (config && config.ignoreList(name)) return true if (this.isCodeFile()) { return !config.code.include_lists.find(list => list === name) && !config.lists.find(list => list.name === name); }
1
diff --git a/edit.js b/edit.js @@ -97,7 +97,6 @@ const localMatrix3 = new THREE.Matrix4(); const localFrustum = new THREE.Frustum(); const cubicBezier = easing(0, 1, 0, 1); -const chunkOffset = new THREE.Vector3(0, 0, 0); let skybox = null; let skybox2 = null; @@ -1235,7 +1234,6 @@ const [ }; const context = renderer.getContext(); currentVegetationMesh = _makeVegetationMesh(); - currentVegetationMesh.position.copy(chunkOffset); chunkMeshContainer.add(currentVegetationMesh); currentVegetationMesh.onBeforeRender = () => { context.enable(context.SAMPLE_ALPHA_TO_COVERAGE); @@ -2220,7 +2218,6 @@ planet.addEventListener('load', async e => { const {data: chunkSpec} = e; const chunkMesh = _makeChunkMesh(chunkSpec.seedString, chunkSpec.parcelSize, chunkSpec.subparcelSize); - chunkMesh.position.copy(chunkOffset); chunkMeshContainer.add(chunkMesh); chunkMeshes.push(chunkMesh); _setCurrentChunkMesh(chunkMesh);
2
diff --git a/src/popup/app.css b/src/popup/app.css @@ -25,11 +25,10 @@ body, font-family: var(--sans); color: var(--txt); display: flex; - - /* padding-top: 56px; */ flex-flow: column nowrap; - min-width: 0; overflow: hidden; + min-width: 564px; + min-height: 564px; } a {
12
diff --git a/backend/nomad/jobs/rolling_restart.go b/backend/nomad/jobs/rolling_restart.go @@ -33,7 +33,7 @@ func (w *rollingRestart) Do() (*structs.Response, error) { if origJob.Meta == nil { origJob.Meta = make(map[string]string) } - origJob.Meta["restarted"] = timestamp.String() + origJob.Meta["hashi-ui.restarted"] = timestamp.String() origJob.Stop = boolToPtr(false) // force start _, _, err = w.client.Jobs().Register(origJob, nil)
10
diff --git a/src/widgets/histogram/content-view.js b/src/widgets/histogram/content-view.js @@ -9,6 +9,8 @@ var DropdownView = require('../dropdown/widget-dropdown-view'); var AnimateValues = require('../animate-values.js'); var animationTemplate = require('./animation-template.tpl'); +var TOOLTIP_TRIANGLE_HEIGHT = 4; + /** * Widget content view for a histogram */ @@ -333,11 +335,13 @@ module.exports = cdb.core.View.extend({ var $tooltip = this.$('.js-tooltip'); if (info && info.data) { - var bottom = this.defaults.chartHeight + 23 - info.top; + var bottom = this.defaults.chartHeight - info.top; $tooltip.css({ bottom: bottom, left: info.left }); $tooltip.text(info.data); - $tooltip.css({ left: info.left - $tooltip.width() / 2 }); + $tooltip.css({ + left: info.left - $tooltip.width() / 2, + bottom: bottom + $tooltip.height() + (TOOLTIP_TRIANGLE_HEIGHT * 1.5) }); $tooltip.fadeIn(70); } else { this._clearTooltip();
2
diff --git a/runtime.js b/runtime.js @@ -4,7 +4,7 @@ import {VOXLoader} from './VOXLoader.js'; // import {GLTFExporter} from './GLTFExporter.js'; import {getExt, mergeMeshes} from './util.js'; // import {bake} from './bakeUtils.js'; -import {makeIconMesh} from './vr-ui.js'; +import {makeIconMesh, makeTextMesh} from './vr-ui.js'; import {appManager} from './app-object.js'; import wbn from './wbn.js'; // import {storageHost} from './constants.js'; @@ -389,7 +389,9 @@ const _loadWebBundle = async file => { return mesh; }; -const _loadLink = async () => { +const _loadLink = async file => { + const text = await file.text(); + const geometry = new THREE.CircleBufferGeometry(1, 32) .applyMatrix4(new THREE.Matrix4().makeScale(0.5, 1, 1)); const material = new THREE.ShaderMaterial({ @@ -463,6 +465,10 @@ const _loadLink = async () => { // portalMesh.position.y = 1; // scene.add(portalMesh); + const textMesh = makeTextMesh(text.slice(0, 80), undefined, 0.2, 'center', 'middle'); + textMesh.position.y = 1.2; + portalMesh.add(textMesh); + const appId = ++appIds; const app = appManager.createApp(appId); appManager.setAnimationLoop(appId, () => {
0
diff --git a/package.json b/package.json "name": "find-and-replace", "main": "./lib/find", "description": "Find and replace within buffers and across the project.", - "version": "0.215.2", + "version": "0.215.3", "license": "MIT", "activationCommands": { "atom-workspace": [
6
diff --git a/src/client/js/components/Admin/Customize/CustomizeFunctionSetting.jsx b/src/client/js/components/Admin/Customize/CustomizeFunctionSetting.jsx @@ -21,34 +21,35 @@ class CustomizeFunctionSetting extends React.Component { super(props); this.state = { - isDropdownOpen: false, - isDropdownOpen2: false, - isDropdownOpen3: false, - isDropdownOpen4: false, + isDropdownOpenS: false, // S + isDropdownOpen: false, // M + isDropdownOpenL: false, // L + isDropdownOpenXL: false, // XL }; - this.onToggleDropdown = this.onToggleDropdown.bind(this); - this.onToggleDropdown2 = this.onToggleDropdown2.bind(this); - this.onToggleDropdown3 = this.onToggleDropdown3.bind(this); - this.onToggleDropdown4 = this.onToggleDropdown4.bind(this); + this.onToggleDropdownS = this.onToggleDropdownS.bind(this); // S + this.onToggleDropdown = this.onToggleDropdown.bind(this); // M + this.onToggleDropdownL = this.onToggleDropdownL.bind(this); // L + this.onToggleDropdownXL = this.onToggleDropdownXL.bind(this); // XL this.onClickSubmit = this.onClickSubmit.bind(this); } + onToggleDropdownS() { + this.setState({ isDropdownOpenS: !this.state.isDropdownOpenS }); + } + onToggleDropdown() { this.setState({ isDropdownOpen: !this.state.isDropdownOpen }); } - onToggleDropdown2() { - this.setState({ isDropdownOpen2: !this.state.isDropdownOpen2 }); + onToggleDropdownL() { + this.setState({ isDropdownOpenL: !this.state.isDropdownOpenL }); } - onToggleDropdown3() { - this.setState({ isDropdownOpen3: !this.state.isDropdownOpen3 }); + onToggleDropdownXL() { + this.setState({ isDropdownOpenXL: !this.state.isDropdownOpenXL }); } - onToggleDropdown4() { - this.setState({ isDropdownOpen4: !this.state.isDropdownOpen4 }); - } async onClickSubmit() { const { t, adminCustomizeContainer } = this.props; @@ -130,7 +131,7 @@ class CustomizeFunctionSetting extends React.Component { <div className="my-0 w-100"> <label>{t('admin:customize_setting.function_options.list_num_desc_in_page_contents_modal')}</label> </div> - <Dropdown isOpen={this.state.isDropdownOpen4} toggle={this.onToggleDropdown4}> + <Dropdown isOpen={this.state.isDropdownOpenS} toggle={this.onToggleDropdownS}> <DropdownToggle className="text-right col-6" caret> <span className="float-left">{adminCustomizeContainer.state.pageListLimitForUserPage}</span> </DropdownToggle> @@ -186,7 +187,7 @@ class CustomizeFunctionSetting extends React.Component { <div className="my-0 w-100"> <label>{t('admin:customize_setting.function_options.list_num_desc_in_draft_and_search_pages')}</label> </div> - <Dropdown isOpen={this.state.isDropdownOpen3} toggle={this.onToggleDropdown3}> + <Dropdown isOpen={this.state.isDropdownOpenL} toggle={this.onToggleDropdownL}> <DropdownToggle className="text-right col-6" caret> <span className="float-left">{adminCustomizeContainer.state.pageListLimitForUserPage}</span> </DropdownToggle> @@ -214,7 +215,7 @@ class CustomizeFunctionSetting extends React.Component { <div className="my-0 w-100"> <label>{t('admin:customize_setting.function_options.list_num_desc_in_notfound_and_trash_pages')}</label> </div> - <Dropdown isOpen={this.state.isDropdownOpen2} toggle={this.onToggleDropdown2}> + <Dropdown isOpen={this.state.isDropdownOpenXL} toggle={this.onToggleDropdownXL}> <DropdownToggle className="text-right col-6" caret> <span className="float-left">{adminCustomizeContainer.state.pageListLimitForNotFoundAndTrashPage}</span> </DropdownToggle>
10
diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js @@ -348,6 +348,7 @@ function setPassword(password, validateCode, accountID) { } // This request can fail if the password is not complex enough + // eslint-disable-next-line rulesdir/prefer-localization Onyx.merge(ONYXKEYS.ACCOUNT, {error: response.message}); }) .finally(() => {
8
diff --git a/src/components/row.js b/src/components/row.js @@ -323,7 +323,7 @@ function Row(props) { fontWeight: 600, }} > - State bulletin not sufficient to determine districts + Awaiting patient-level details from State Bulletin </div> </React.Fragment> )}
3
diff --git a/css/downloadManager.css b/css/downloadManager.css .download-progress { width: calc(100% - 1em); - height: 3px; + height: 4px; margin-top: 0.33em; background: rgb(22, 122, 224); border-radius: 2px; } .dark-mode .download-progress { - background: rgb(28, 160, 255); + background: lightskyblue; } .download-progress[hidden] {
7
diff --git a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js /* eslint-disable react/no-array-index-key */ import React, { Component } from 'react'; -import { View } from 'react-native'; -import * as Animatable from 'react-native-animatable'; +import { Animated, Easing, View } from 'react-native'; // Styles import styles from './pinAnimatedInputStyles'; @@ -15,22 +14,71 @@ class PinAnimatedInput extends Component { constructor(props) { super(props); this.state = {}; + + this.dots = []; + + this.dots[0] = new Animated.Value(0); + this.dots[1] = new Animated.Value(0); + this.dots[2] = new Animated.Value(0); + this.dots[3] = new Animated.Value(0); + } + + _startLoadingAnimation = () => { + [...Array(4)].map((item, index) => { + this.dots[index].setValue(0); + }); + Animated.sequence([ + ...this.dots.map((item) => + Animated.timing(item, { + toValue: 1, + duration: 250, + easing: Easing.linear, + useNativeDriver: false, //setting it to false as animation is not being used + }), + ), + ]).start((o) => { + if (o.finished) { + this._startLoadingAnimation(); + } + }); + }; + + _stopLoadingAnimation = () => { + [...Array(4)].map((item, index) => { + this.dots[index].stopAnimation(); + }); + }; + + UNSAFE_componentWillReceiveProps(nextProps) { + const { loading } = this.props; + if (loading !== nextProps.loading) { + if (nextProps.loading) { + this._startLoadingAnimation(); + } else { + this._stopLoadingAnimation(); + } + } } render() { const { pin } = this.props; - var dotsArr = Array(4).fill(''); + const marginBottom = []; + + [...Array(4)].map((item, index) => { + marginBottom[index] = this.dots[index].interpolate({ + inputRange: [0, 0.5, 1], + outputRange: [0, 20, 0], + }); + }); + return ( <View style={[styles.container]}> - {dotsArr.map((val, index) => { + {this.dots.map((val, index) => { if (pin.length > index) { return ( - <Animatable.View - animation="fadeIn" - duration={100} + <Animated.View key={`passwordItem-${index}`} - style={[styles.input, styles.inputWithBackground]} - useNativeDriver + style={[styles.input, styles.inputWithBackground, { bottom: marginBottom[index] }]} /> ); } @@ -40,6 +88,5 @@ class PinAnimatedInput extends Component { ); } } - export default PinAnimatedInput; /* eslint-enable */
13
diff --git a/demo/components/create-container-demo.js b/demo/components/create-container-demo.js @@ -8,7 +8,7 @@ import { import { VictoryTooltip } from "victory-core"; -const Charts = ({ CustomContainer }) => { // eslint-disable-line react/prop-types +const Charts = ({ behaviors }) => { // eslint-disable-line react/prop-types const containerStyle = { display: "flex", flexDirection: "row", @@ -16,11 +16,13 @@ const Charts = ({ CustomContainer }) => { // eslint-disable-line react/prop-type alignItems: "center", justifyContent: "center" }; - const chartStyle = { parent: { border: "1px solid #ccc", margin: "2%", maxWidth: "40%" } }; + const CustomContainer = createContainer(...behaviors); + const behaviorsList = behaviors.map((behavior) => `"${behavior}"`).join(", "); return ( <div className="demo"> + <pre>{`createContainer(${behaviorsList})`}</pre> <div style={containerStyle}> {/* A */} <VictoryChart style={chartStyle} @@ -72,16 +74,11 @@ const Charts = ({ CustomContainer }) => { // eslint-disable-line react/prop-type </VictoryChart> {/* B */} - <VictoryScatter - style={{ - parent: chartStyle.parent, - data: { - fill: (datum, active) => active ? "tomato" : "black" - } - }} + <VictoryChart + style={{ parent: chartStyle.parent }} containerComponent={ <CustomContainer - dimension="x" + labels={(d) => round(d.x, 2)} cursorLabel={(d) => round(d.x, 2)} selectionStyle={{ stroke: "tomato", strokeWidth: 2, fill: "tomato", fillOpacity: 0.1 @@ -90,16 +87,24 @@ const Charts = ({ CustomContainer }) => { // eslint-disable-line react/prop-type defaultCursorValue={0.99} /> } + > + <VictoryScatter + style={{ + data: { + fill: (datum, active) => active ? "tomato" : "black" + } + }} size={(datum, active) => active ? 5 : 3} y={(d) => d.x * d.x} /> + </VictoryChart> + {/* C */} <VictoryChart style={chartStyle} containerComponent={ <CustomContainer selectedDomain={{ x: [0, 0] }} - dimension="y" /> } > @@ -155,7 +160,7 @@ const Charts = ({ CustomContainer }) => { // eslint-disable-line react/prop-type </VictoryGroup> </VictoryChart> - {/* C */} + {/* D */} <VictoryStack style={chartStyle} containerComponent={ @@ -230,12 +235,10 @@ class App extends React.Component { render() { return ( <div className="demo"> - <pre>createContainer("brush", "voronoi")</pre> - <Charts CustomContainer={createContainer("brush", "voronoi")} /> - <pre>createContainer("zoom", "voronoi")</pre> - <Charts CustomContainer={createContainer("zoom", "voronoi")} /> - <pre>createContainer("cursor", "voronoi")</pre> - <Charts CustomContainer={createContainer("cursor", "voronoi")} /> + <Charts behaviors={["zoom", "voronoi"]} /> + <Charts behaviors={["zoom", "cursor"]} /> + <Charts behaviors={["cursor", "voronoi"]} /> + <Charts behaviors={["brush", "voronoi"]} /> </div> ); }
7
diff --git a/app/shared/actions/governance/proposals.js b/app/shared/actions/governance/proposals.js @@ -223,6 +223,17 @@ export function voteProposal(scope, voter, proposal_name, vote, vote_json) { setTimeout(() => { dispatch(getVoteInfo(scope, account)); }, 500); + // If this is an offline transaction, also store the ABI + if (!connection.sign) { + return eos(connection).getAbi(defaultContract).then((contract) => + dispatch({ + payload: { + contract, + tx + }, + type: types.SYSTEM_GOVERNANCE_VOTE_PROPOSAL_SUCCESS + })); + } return dispatch({ payload: { tx }, type: types.SYSTEM_GOVERNANCE_VOTE_PROPOSAL_SUCCESS
11
diff --git a/detox/src/devices/drivers/DeviceDriverBase.js b/detox/src/devices/drivers/DeviceDriverBase.js @@ -108,7 +108,6 @@ class DeviceDriverBase { } createPayloadFile(notification) { - const fs = require('fs'); const notificationFilePath = path.join(this.createRandomDirectory(), `payload.json`); fs.writeFileSync(notificationFilePath, JSON.stringify(notification, null, 2)); return notificationFilePath;
2
diff --git a/docs/CORDOVA_INSTALL.md b/docs/CORDOVA_INSTALL.md @@ -40,11 +40,20 @@ For running the app in Debug mode on your device: ### Android Notes -[Cordova: Android - Installing the Requirements](https://cordova.apache.org/docs/en/latest/guide/platforms/android/#installing-the-requirements) +[Cordova: Android - 'dev' - Installing the Requirements](https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html#installing-the-requirements) +* **Note that this link goes to 'dev', not 'latest', as the 'latest' version appears to point to out-dated documentation.** Cordova requires you to make various locations available via your PATH variable. +* Your shell configuration file, e.g. `.bash_profile` on MacOS, might be amended like so: + + ``` + export JAVA_HOME="$(/usr/libexec/java_home)" + export ANDROID_HOME="$HOME/Library/Android/sdk" + export PATH="$PATH:$JAVA_HOME:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools" + ``` + * How to find `android_path`: * http://stackoverflow.com/questions/34532063/finding-android-sdk-on-mac-and-adding-to-path
3
diff --git a/test/integration/offline.js b/test/integration/offline.js @@ -546,6 +546,34 @@ describe('Offline', () => { done(); }); }); + + it('should support handler returning Promise that defers', done => { + const offline = new OfflineBuilder(new ServerlessBuilder(serverless)) + .addFunctionHTTP('index', { + path: 'index', + method: 'GET', + }, () => + new Promise((resolve, reject) => + setTimeout(() => + resolve({ + statusCode: 200, + body: JSON.stringify({ message: 'Hello World' }), + }), + 10) + ) + ).toObject(); + + offline.inject({ + method: 'GET', + url: '/index', + payload: { data: 'input' }, + }, res => { + expect(res.headers).to.have.property('content-type').which.contains('application/json'); + expect(res.statusCode).to.eq(200); + expect(res.payload).to.eq('{"message":"Hello World"}'); + done(); + }); + }); }); context('with HEAD support', () => {
0
diff --git a/src/reducers/ledger/index.js b/src/reducers/ledger/index.js @@ -8,7 +8,8 @@ import { refreshAccountOwner, setLedgerTxSigned, clearSignInWithLedgerModalState, - showLedgerModal + showLedgerModal, + hideLedgerModal } from '../../actions/account'; import { HIDE_SIGN_IN_WITH_LEDGER_ENTER_ACCOUNT_ID_MODAL } from '../../utils/wallet'; @@ -130,6 +131,13 @@ const ledgerActions = handleActions({ txSigned: undefined }; }, + [hideLedgerModal]: (state) => { + return { + ...state, + modal: {}, + txSigned: undefined + }; + }, }, initialState); export default reduceReducers(
9
diff --git a/bake.html b/bake.html textarea.value = JSON.stringify(statsSpec, null, 2); textarea.classList.remove('hidden'); + const {dst} = q; + if (dst) { + fetch(dst, { + method: 'POST', + headers: { + 'Content-Type': 'text/plain', + }, + body: err.stack, + }).then(res => res.blob()); + } + + window.parent.postMessage({ + method: 'error', + error: err.stack, + }, '*'); } })().catch(console.warn); </script>
0
diff --git a/package.json b/package.json "lower-case": "^1.1.4", "moment": "^2.24.0", "moment-timezone": "^0.5.25", - "mongodb": "^3.2.5", + "mongodb": "^3.2.4", "path": "^0.12.7", "path-to-regexp": "^3.0.0", "request": "^2.88.0",
13
diff --git a/src/compiler/nodes.imba1 b/src/compiler/nodes.imba1 @@ -7130,8 +7130,7 @@ export class TagContent < TagLike elif isStatic return "{bvar} || {ref}.insert$({value.c(o)})" elif value isa TagTextContent and isOnlyChild and !(parent isa TagSwitchFragment) - value = value.@nodes[0] if value.@nodes:length == 1 - return "({vvar}={value.c(o)},{vvar}==={key} || {ref}.text$({key}={vvar}))" + return "({vvar}={value.c(o)},{vvar}==={key} || {ref}.text$(String({key}={vvar})))" else parts.push("{vvar}={value.c(o)}") @@ -7269,7 +7268,7 @@ export class Tag < TagLike @className = null def isAbstract - !isSlot and !isFragment + isSlot or isFragment def attrs @attributes
7
diff --git a/token-metadata/0x56d811088235F11C8920698a204A5010a788f4b3/metadata.json b/token-metadata/0x56d811088235F11C8920698a204A5010a788f4b3/metadata.json "symbol": "BZRX", "address": "0x56d811088235F11C8920698a204A5010a788f4b3", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/shared/styles/variables/_colors.scss b/packages/shared/styles/variables/_colors.scss @@ -47,14 +47,23 @@ $c-dark: $c-dark-primary !default; // Text colors on theme colors bg // Using YIQ by default -$c-on-primary: color-yiq($c-primary) !default; -$c-on-secondary: color-yiq($c-secondary) !default; -$c-on-info: color-yiq($c-info) !default; -$c-on-success: color-yiq($c-success) !default; -$c-on-warning: color-yiq($c-warning) !default; -$c-on-danger: color-yiq($c-danger) !default; -$c-on-light: color-yiq($c-light) !default; -$c-on-dark: color-yiq($c-dark) !default; +// $c-on-primary: color-yiq($c-primary) !default; +// $c-on-secondary: color-yiq($c-secondary) !default; +// $c-on-info: color-yiq($c-info) !default; +// $c-on-success: color-yiq($c-success) !default; +// $c-on-warning: color-yiq($c-warning) !default; +// $c-on-danger: color-yiq($c-danger) !default; +// $c-on-light: color-yiq($c-light) !default; +// $c-on-dark: color-yiq($c-dark) !default; + +$c-on-primary: $c-white !default; +$c-on-secondary: $c-white !default; +$c-on-info: $c-white !default; +$c-on-success: $c-white !default; +$c-on-warning: $c-white !default; +$c-on-danger: $c-white !default; +$c-on-light: $c-white !default; +$c-on-dark: $c-white !default; // Map colors palette $colors-map: (
7
diff --git a/packages/turf-meta/index.d.ts b/packages/turf-meta/index.d.ts @@ -105,9 +105,9 @@ export function geomReduce<Reducer extends any, G extends Geometries, P = Proper /** * http://turfjs.org/docs/#geomeach */ -export function geomEach<G extends Geometries, P = Properties>( +export function geomEach<G extends (Geometries | null), P = Properties>( geojson: Feature<G, P> | FeatureCollection<G, P> | G | GeometryCollection | Feature<GeometryCollection, P>, - callback: (currentGeometry: G | null, + callback: (currentGeometry: G, featureIndex: number, featureProperties: P, featureBBox: BBox,
11
diff --git a/tasks/noci_test.sh b/tasks/noci_test.sh @@ -9,11 +9,12 @@ root=$(dirname $0)/.. npm run test-jasmine -- --tags=noCI --nowatch || EXIT_STATE=$? # mapbox image tests take too much resources on CI - -# since the update to [email protected], we must use 'new' image-exporter +# +# since the update to [email protected], we must use orca # as mapbox-gl versions >0.22.1 aren't supported on [email protected] used in the # 'old' image server -$root/../image-exporter/bin/plotly-graph-exporter.js $root/test/image/mocks/mapbox_* \ +$root/../orca/bin/orca.js graph \ + $root/test/image/mocks/mapbox_* \ --plotly $root/build/plotly.js \ --mapbox-access-token "pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ" \ --output-dir $root/test/image/baselines/ \
10
diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml @@ -46,7 +46,7 @@ jobs: ./android/app/build.gradle \ ./ios/ExpensifyCash/Info.plist \ ./ios/ExpensifyCashTests/Info.plist - git cm -m "Update version to ${{ steps.bumpVersion.outputs.newVersion }}" + git commit -m "Update version to ${{ steps.bumpVersion.outputs.newVersion }}" git tag ${{ steps.bumpVersion.outputs.newVersion }} - name: Push new version
10
diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php use Utopia\App; use Utopia\Exception; use Utopia\Validator\Boolean; -use Utopia\Validator\FloatValidator as Float; +use Utopia\Validator\FloatValidator; use Utopia\Validator\Integer; use Utopia\Validator\Numeric; use Utopia\Validator\Range; @@ -392,7 +392,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float') ->param('collectionId', '', new UID(), 'Collection unique ID. You can create a new collection using the Database service [server integration](/docs/server/database#createCollection).') ->param('attributeId', '', new Key(), 'Attribute ID.') ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Float(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('default', null, new FloatValidator(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) ->param('array', false, new Boolean(), 'Is attribute an array?', true) ->inject('response') ->inject('dbForExternal')
10
diff --git a/docs/src/pages/vue-components/scroll-area.md b/docs/src/pages/vue-components/scroll-area.md @@ -18,7 +18,7 @@ This is especially useful for desktop as scrollbars are hidden on a mobile devic The following examples are best seen on desktop as they make too little sense on a mobile device. ::: tip -You can also take a look at [Layout Drawer](/layout/drawer) too see some more examples of it in action. +You can also take a look at [Layout Drawer](/layout/drawer) to see some more examples of it in action. ::: ### Basic
1
diff --git a/test/v3/param-style.test.js b/test/v3/param-style.test.js @@ -169,16 +169,16 @@ describe('v3/param-style', () => { describe('spaceDelimited', () => { it('primitive', () => { - expect(param.spaceDelimited('string', 'blue').match).to.equal(false); + expect(param.spaceDelimited('string', 'blue')).to.be.undefined; }); it('array', () => { - const actual = param.spaceDelimited('array', 'blue black brown').value; + const actual = param.spaceDelimited('array', 'blue%20black%20brown').value; expect(actual).to.deep.equal(['blue', 'black', 'brown']); }); it('object', () => { - const actual = param.spaceDelimited('object', 'R 100 G 200 B 150').value; + const actual = param.spaceDelimited('object', 'R%20100%20G%20200%20B%20150').value; expect(actual).to.deep.equal({ R: '100', G: '200', B: '150' }); }); @@ -186,10 +186,6 @@ describe('v3/param-style', () => { describe('pipeDelimited', () => { - it('primitive', () => { - expect(param.pipeDelimited('string', 'blue').match).to.equal(false); - }); - it('array', () => { const actual = param.pipeDelimited('array', 'blue|black|brown').value; expect(actual).to.deep.equal(['blue', 'black', 'brown']);
3
diff --git a/resources/views/laravel-medialibrary/v5/advanced-usage/using-your-own-model.md b/resources/views/laravel-medialibrary/v5/advanced-usage/using-your-own-model.md @@ -19,7 +19,7 @@ class Media extends BaseMedia In the config file of the package you must specify the name of your custom class: ```php -// config/laravel-medialibrary.php +// config/medialibrary.php ... 'media_model' => App\Models\CustomMedia::class ...
10
diff --git a/api/Methods/index.php b/api/Methods/index.php @@ -11,6 +11,9 @@ require 'classes/apc.caching.php'; $app = new \Slim\Slim(); $oCache = new CacheAPC(); +$app->response->headers->set('Content-Type', 'application/json'); +$app->response->headers->set("Access-Control-Allow-Origin", "*"); + $services = require 'config.php'; if (!empty($_SESSION['api_key'])) {
12
diff --git a/app/views/accessibilityChoropleth.scala.html b/app/views/accessibilityChoropleth.scala.html <div id="legend" style="display:none;"> <strong style="font-size: 18px">Percent of Neighborhood Complete</strong> <nav class='legend clearfix'> - <span style='background:#08306b;'></span> - <span style='background:#08519c;'></span> - <span style='background:#08719c;'></span> - <span style='background:#2171b5;'></span> - <span style='background:#4292c6;'></span> - <span style='background:#6baed6;'></span> - <span style='background:#9ecae1;'></span> - <span style='background:#c6dbef;'></span> - <span style='background:#deebf7;'></span> - <span style='background:#f7fbff;'></span> + <span style='background:#99000a;'></span> + <span style='background:#b3000c;'></span> + <span style='background:#cc000e;'></span> + <span style='background:#e6000f;'></span> + <span style='background:#ff1a29;'></span> + <span style='background:#ff3341;'></span> + <span style='background:#ff4d58;'></span> + <span style='background:#ff6670;'></span> + <span style='background:#ff8088;'></span> + <span style='background:#ff99a0;'></span> <label>100%</label> <label></label> <label></label>
3
diff --git a/website_code/php/error_library.php b/website_code/php/error_library.php @@ -51,10 +51,10 @@ function receive_message($user_name, $type, $level, $subject, $content){ /* - * If error email message turned on, send an error email message + * If error email list is set, send an error email message to those users */ - if(isset($xerte_toolkits_site->error_email_message) && $xerte_toolkits_site->error_email_message=="true"){ + if(isset($xerte_toolkits_site->email_error_list) && trim($xerte_toolkits_site->email_error_list) != false){ email_message($user_name, $type, $level, $subject, $content);
4
diff --git a/packages/bitcore-client/src/client.ts b/packages/bitcore-client/src/client.ts @@ -66,8 +66,7 @@ export class Client { this.baseUrl }/wallet/${pubKey}/utxos?includeSpent=${includeSpent}`; const signature = this.sign({ method: 'GET', url, payload }); - return requestStream({ - uri: url, + return requestStream(url, { headers: { 'x-signature': signature }, body: payload, json: true
13
diff --git a/store/buildMatch.js b/store/buildMatch.js @@ -102,7 +102,7 @@ async function getMatch(matchId) { } } catch (e) { console.error(e); - if (e.message.startsWith('Server failure during read query') || e.message.startsWith('no players found') || e.message.startsWith('Unexpected end of JSON input') || e.message.startsWith('Unexpected token')) { + if (e.message.startsWith('Server failure during read query') || e.message.startsWith('no players found') || e.message.startsWith('Unexpected')) { // Delete and request new await cassandra.execute('DELETE FROM player_matches where match_id = ?', [Number(matchId)], { prepare: true }); const match = {
9
diff --git a/lib/tasks/services.rake b/lib/tasks/services.rake @@ -146,7 +146,7 @@ namespace :cartodb do assert_valid_arg args, :soft_limit, accepted_values: ['true', 'false'] service_quota_key = "soft_#{service}_limit=" - user.send(service_quota_key, soft_limit) + org.send(service_quota_key, soft_limit) org.save puts "Changed the organization soft limit for service #{service} to #{soft_limit}."
1
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php @@ -19,7 +19,7 @@ use Appwrite\Utopia\Database\Validator\CustomId; use MaxMind\Db\Reader; use Utopia\App; use Appwrite\Event\Audit; -use Utopia\Audit\Audit as Audits; +use Utopia\Audit\Audit as EventAudit; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; @@ -1105,7 +1105,7 @@ App::get('/v1/account/logs') ->inject('usage') ->action(function (?int $limit, ?int $offset, Response $response, Document $user, Locale $locale, Reader $geodb, Database $dbForProject, Stats $usage) { - $audit = new Audits($dbForProject); + $audit = new EventAudit($dbForProject); $logs = $audit->getLogsByUser($user->getId(), $limit, $offset);
10
diff --git a/website/src/docs/uppy.md b/website/src/docs/uppy.md @@ -318,6 +318,36 @@ Subscribe to an uppy-event. See below for the full list of events. Uppy exposes events that you can subscribe to in your app: +### `file-added` + +Fired each time file is added. + +```javascript +uppy.on('file-added', (fileID) => { + console.log('Added file', uppy.getFile(fileID)) +}) +``` + +### `file-removed` + +Fired each time file is removed. + +```javascript +uppy.on('file-removed', (fileID) => { + console.log('Removed file', fileID) +}) +``` + +### `upload` + +Fired when upload starts. + +```javascript +uppy.on('upload', () => { + console.log('Starting upload...') +}) +``` + ### `upload-progress` Fired each time file upload progress is available, `data` object looks like this:
0
diff --git a/docs/dom-testing-library/api-queries.md b/docs/dom-testing-library/api-queries.md @@ -96,6 +96,12 @@ The example below will find the input node for the following DOM structures: // Wrapper labels <label>Username <input /></label> +// Wrapper labels where the label text is in another child element +<label> + <span>Username</span> + <input /> +</label> + // aria-label attributes // Take care because this is not a label that users can see on the page, // so the purpose of your input must be obvious to visual users. @@ -135,12 +141,6 @@ You may also need to filter down the results of the query. For that you can use the `selector` option: ```js -// Label containing multiple elements -<label> - <span>Username</span> - <input /> -</label> - // Multiple elements labelled via aria-labelledby <label id="username">Username</label> <input aria-labelledby="username" />
5
diff --git a/token-metadata/0x3aFfCCa64c2A6f4e3B6Bd9c64CD2C969EFd1ECBe/metadata.json b/token-metadata/0x3aFfCCa64c2A6f4e3B6Bd9c64CD2C969EFd1ECBe/metadata.json "symbol": "DSLA", "address": "0x3aFfCCa64c2A6f4e3B6Bd9c64CD2C969EFd1ECBe", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/app/src/stores/renderer.tsx b/packages/app/src/stores/renderer.tsx import { HtmlElementNode } from 'rehype-toc'; -import useSWR, { Key, SWRResponse } from 'swr'; +import useSWR, { SWRResponse } from 'swr'; import useSWRImmutable from 'swr/immutable'; import { RendererConfig } from '~/interfaces/services/renderer'; import { RendererOptions, - generateSimpleViewOptions, generatePreviewOptions, generateOthersOptions, + generateSimpleViewOptions, generatePreviewOptions, generateViewOptions, generateTocOptions, } from '~/services/renderer/renderer'; import { getGrowiFacade } from '~/utils/growi-facade'; @@ -148,7 +148,19 @@ export const useSearchResultOptions = useSelectedPagePreviewOptions; export const useTimelineOptions = useSelectedPagePreviewOptions; export const useCustomSidebarOptions = (): SWRResponse<RendererOptions, Error> => { - const key: Key = 'customSidebarOptions'; + const { data: rendererConfig } = useRendererConfig(); + + const isAllDataValid = rendererConfig != null; + + const key = isAllDataValid + ? ['customSidebarOptions', rendererConfig] + : null; - return _useOptionsBase(key, generateOthersOptions); + return useSWRImmutable<RendererOptions, Error>( + key, + (rendererId, rendererConfig, pagePath, highlightKeywords) => generateSimpleViewOptions(rendererConfig, pagePath, highlightKeywords), + { + fallbackData: isAllDataValid ? generateSimpleViewOptions(rendererConfig, '/') : undefined, + }, + ); };
7
diff --git a/publish/releases.json b/publish/releases.json { "sip": 142, "layer": "base", + "released": "base", "sources": [ "DebtCache", "FeePool", { "sip": 145, "layer": "base", + "released": "base", "sources": ["DebtCache"] }, { "sip": 170, - "layer": "base" + "layer": "base", + "released": "base" }, { "sip": 174, "layer": "both", + "released": "base", "sources": ["Exchanger", "Issuer", "SynthRedeemer"] } ],
3
diff --git a/lib/node_modules/@stdlib/stats/incr/apcorr/lib/main.js b/lib/node_modules/@stdlib/stats/incr/apcorr/lib/main.js @@ -56,6 +56,7 @@ var abs = require( '@stdlib/math/base/special/abs' ); */ function incrapcorr( meanx, meany ) { var acc; + var N = 0; if ( arguments.length ) { if ( !isNumber( meanx ) ) { throw new TypeError( 'invalid argument. First argument must be a number primitive. Value: `' + meanx + '`.' ); @@ -79,8 +80,12 @@ function incrapcorr( meanx, meany ) { */ function accumulator( x, y ) { if ( arguments.length === 0 ) { + if ( N === 0 ) { + return null; + } return abs( acc() ); } + N += 1; return abs( acc( x, y ) ); } }
9
diff --git a/src/client/autoVersion.js b/src/client/autoVersion.js @@ -22,19 +22,22 @@ module.exports = function(client, options) { // The version string is interpreted by https://github.com/PrismarineJS/node-minecraft-data const brandedMinecraftVersion = response.version.name; // 1.8.9, 1.7.10 const protocolVersion = response.version.protocol;// 47, 5 - - debug(`Server version: ${brandedMinecraftVersion}, protocol: ${protocolVersion}`); - - let minecraftVersion; - if (brandedMinecraftVersion.indexOf(' ') !== -1) { - // Spigot and Glowstone++ prepend their name; strip it off - minecraftVersion = brandedMinecraftVersion.split(' ')[1]; - } else { - minecraftVersion = brandedMinecraftVersion; + let versions = brandedMinecraftVersion.match(/((\d+\.)+\d+)/g).map(function (version) { + return minecraft_data.versionsByMinecraftVersion["pc"][version] + }).filter(function (info) { + return info + }).sort(function (a, b) { + return b.version - a.version + }) + if (versions.length === 0) { + versions = minecraft_data.postNettyVersionsByProtocolVersion["pc"][protocolVersion]; + if (!versions) { + throw new Error(`unsupported/unknown protocol version: ${protocolVersion}, update minecraft-data`); + } } + const minecraftVersion = versions[0].minecraftVersion; - const versionInfo = minecraft_data.versionsByMinecraftVersion["pc"][minecraftVersion]; - if (!versionInfo) throw new Error(`unsupported/unknown protocol version: ${protocolVersion}, update minecraft-data`); + debug(`Server version: ${minecraftVersion}, protocol: ${protocolVersion}`); options.version = minecraftVersion; options.protocolVersion = protocolVersion;
7
diff --git a/edit.js b/edit.js @@ -84,12 +84,11 @@ function mod(a, b) { (async () => { const q = parseQuery(location.search); - if (q.w) { - const url = q.w + '.' + presenceHost; + if (q.u) { await planet.connect({ online: true, roomName: 'lol', - url, + url: q.u, }); } else { await planet.connect({
4
diff --git a/readme.md b/readme.md @@ -557,7 +557,7 @@ const ComponentWithFeatureToggles = props => { } ``` -#### `useFlagVarition(flagName: string): FlagVariation` +#### `useFlagVariation(flagName: string): FlagVariation` Given you want to use React hooks within a functional component you can read a variation as follows:
1
diff --git a/framer/VekterTextLayer.coffee b/framer/VekterTextLayer.coffee @@ -110,13 +110,13 @@ class StyledTextBlock firstStyle.setText(text) @inlineStyles = [firstStyle] - setTextOverflow: (textOverflow, autoHeight) -> - if textOverflow in ["ellipsis", "clip"] and not autoHeight + setTextOverflow: (textOverflow, maxLines=1) -> + if textOverflow in ["ellipsis", "clip"] @setStyle("overflow", "hidden") multiLineOverflow = textOverflow is "ellipsis" if multiLineOverflow - @setStyle("WebkitLineClamp", 1) + @setStyle("WebkitLineClamp", maxLines) @setStyle("WebkitBoxOrient", "vertical") @setStyle("display", "-webkit-box") else @@ -179,17 +179,27 @@ class StyledText for block in @blocks blockDiv = block.createElement() block.element = blockDiv - block.setTextOverflow(@textOverflow, @autoHeight) + # block.setTextOverflow(@textOverflow, @autoHeight) @element.appendChild blockDiv + getText: -> + @blocks.map((b) -> b.text).join("\n") + setText: (text) -> - firstBlock = _.first(@blocks) - firstBlock.setText(text) - @blocks = [firstBlock] + values = text.split("\n") + @blocks = @blocks.slice(0, values.length) + for value, index in values + if @blocks[index]? + block = @blocks[index] + else + block = new StyledTextBlock + text: value + inlineStyles: [_.clone(@blocks[index-1].inlineStyles[0])] + @blocks.push(block) + block.setText(value) setTextOverflow: (textOverflow) -> @textOverflow = textOverflow - @blocks.map (b) => b.setTextOverflow(textOverflow, @autoHeight) setStyle: (style, value) -> @blocks.map (block) -> block.setStyle(style, value) @@ -203,10 +213,9 @@ class StyledText measure: (currentSize) -> constraints = {} if not @autoWidth - constraints.width = currentSize.width + constraints.width = currentSize.width * currentSize.multiplier if not @autoHeight - constraints.height = currentSize.height - + constraints.height = currentSize.height * currentSize.multiplier m = getMeasureElement(constraints) measuredWidth = 0 measuredHeight = 0 @@ -215,13 +224,21 @@ class StyledText for block in @blocks size = block.measure() measuredWidth = Math.max(measuredWidth, size.width) - if constraints.height? and (measuredHeight + size.height) > constraints.height + constrainedHeight = if constraints.height? then constraints.height / currentSize.multiplier else null + if not @autoWidth and + @textOverflow? and @textOverflow in ["clip", "ellipsis"] and + constrainedHeight? and (measuredHeight + size.height) > constrainedHeight fontSize = parseFloat(@getStyle("fontSize", block)) lineHeight = parseFloat(@getStyle("lineHeight", block)) - availableHeight = constraints.height - measuredHeight - visibleLines = Math.floor(availableHeight / (fontSize*lineHeight)) - block.setStyle("WebkitLineClamp", visibleLines) - size = block.measure() + availableHeight = constrainedHeight - measuredHeight + print lineHeight, availableHeight, fontSize, availableHeight / (fontSize*lineHeight) + visibleLines = Math.max(1, Math.floor(availableHeight / (fontSize*lineHeight))) + # print visibleLines + block.setTextOverflow(@textOverflow, visibleLines) + size.height = availableHeight + # print constrainedHeight, size + else + block.setTextOverflow(null) measuredHeight += size.height m.removeChild @element @@ -321,7 +338,9 @@ class exports.VekterTextLayer extends Layer @define "truncate", get: -> @textOverflow is "ellipsis" - set: (truncate) -> @textOverflow = if truncate then "ellipsis" else null + set: (truncate) -> + @autoSize = false + @textOverflow = if truncate then "ellipsis" else null @define "whiteSpace", textProperty(@, "whiteSpace", null, _.isString) @define "direction", textProperty(@, "direction", null, _.isString) @@ -344,7 +363,7 @@ class exports.VekterTextLayer extends Layer set: (value) -> @direction = value @define "text", - get: -> @_styledText.blocks.map((b) -> b.text).join("\n") + get: -> @_styledText.getText() set: (value) -> @_styledText.setText(value) @renderText() @@ -354,4 +373,8 @@ class exports.VekterTextLayer extends Layer return if @__constructor @_styledText.render() @_updateHTMLScale() - @size = @_styledText.measure(@size) + calculatedSize = @_styledText.measure + width: @size.width + height: @size.height + multiplier: @context.pixelMultiplier + @size = calculatedSize
7
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 13.2.0 - Security: updated to `postcss-selector-parser@6` due to a vulnerability in one of `postcss-selector-parser@3` dependencies ([#4595](https://github.com/stylelint/stylelint/pull/4595)). Due to this update: - `selector-descendant-combinator-no-non-space` will ignore selectors containing comments
6
diff --git a/src/Services/Air/Air.js b/src/Services/Air/Air.js @@ -27,12 +27,15 @@ module.exports = (settings) => { return service.createReservation(bookingParams).catch((err) => { if (err instanceof AirRuntimeError.SegmentBookingFailed || err instanceof AirRuntimeError.NoValidFare) { + if (!options.restrictWaitlist) { // will not have a UR if waitlisting restricted const code = err.data['universal:UniversalRecord'].LocatorCode; return service.cancelUR({ LocatorCode: code, }).then(() => Promise.reject(err)); } return Promise.reject(err); + } + return Promise.reject(err); }); }); },
0
diff --git a/docs/src/components/DocApi.vue b/docs/src/components/DocApi.vue @@ -37,7 +37,7 @@ q-card.doc-api.q-my-lg(v-if="ready", flat, bordered) q-tab-panels(v-model="currentTab", animated) q-tab-panel(v-for="tab in tabs", :name="tab", :key="tab" class="q-pa-none") .row.no-wrap.api-container(v-if="aggregationModel[tab]") - .col-auto.row.items-center.bg-grey-1.text-grey-7.q-py-lg + .col-auto.row.no-wrap.bg-grey-1.text-grey-7.q-py-lg q-tabs( v-model="currentInnerTab[tab]", active-color="primary",
1
diff --git a/source/offline/CacheManager.js b/source/offline/CacheManager.js import { Database, iterate, promisify as _ } from './Database.js'; -/*global caches, fetch, setTimeout, Response */ +/*global caches, fetch, setTimeout, Request, Response */ + +const bearerParam = /[?&]access_token=[^&]+/; +const downloadParam = /[?&]download=1\b/; + +const processResponse = (request, response) => { + if (downloadParam.test(request.url)) { + response = new Response(response.body, response); + response.headers.set('Content-Disposition', 'attachment'); + } + return response; +}; class CacheManager { constructor(rules) { @@ -28,58 +39,62 @@ class CacheManager { async getIn(cacheName, request) { const rules = this.rules[cacheName]; const cache = await caches.open(cacheName); - let response = await cache.match(request, { ignoreSearch: true }); - if (!rules) { - return response || fetch(request); - } + const cacheUrl = request.url + .replace(bearerParam, '') + .replace(downloadParam, ''); + const response = await cache.match(cacheUrl); if (response) { - this.setIn(cacheName, request, null); - if (/[?&]download=1\b/.test(request.url)) { - response = new Response(response.body, response); - response.headers.set('Content-Disposition', 'attachment'); + if (rules) { + this.setIn(cacheName, cacheUrl, null, request); } - return response; + return processResponse(request, response); + } else if (!rules) { + return fetch(request); } return this.fetchAndCacheIn(cacheName, request); } async fetchAndCacheIn(cacheName, request) { - const response = await fetch(request); + let url = request.url; + if (request.mode === 'no-cors' || downloadParam.test(url)) { + url = url.replace(downloadParam, ''); + request = new Request(url, { + mode: 'cors', + referrer: 'no-referrer', + }); + } + let response = await fetch(request); // Cache if valid if (response && response.status < 400) { - let clone = response.clone(); - if (clone.headers.has('Content-Disposition')) { - clone = new Response(response.body, response); - clone.headers.delete('Content-Disposition'); - } - this.setIn(cacheName, request, clone); + url = url.replace(bearerParam, ''); + this.setIn(cacheName, url, response.clone(), null); + response = processResponse(request, response); } return response; } - async putIn(cacheName, request, response) { + async putIn(cacheName, cacheUrl, response) { if (response) { // TODO: Handle quota error const cache = await caches.open(cacheName); - await cache.put(request, response); + await cache.put(cacheUrl, response); } } - async setIn(cacheName, request, response) { + async setIn(cacheName, cacheUrl, response, request) { const rules = this.rules[cacheName]; if (rules.noExpire) { - this.putIn(cacheName, request, response); + this.putIn(cacheName, cacheUrl, response); return; } const db = this.db; await db.transaction(cacheName, 'readwrite', async (transaction) => { const store = transaction.objectStore(cacheName); - const url = request.url; - const existing = await _(store.get(url)); + const existing = await _(store.get(cacheUrl)); const now = Date.now(); const created = existing && !response ? existing.created : now; store.put({ - url, + url: cacheUrl, created, lastAccess: now, }); @@ -93,7 +108,7 @@ class CacheManager { // Wait for transaction to complete before adding to cache to ensure // anything in the cache is definitely tracked in the db so can be // cleaned up. - await this.putIn(cacheName, request, response); + await this.putIn(cacheName, cacheUrl, response); this.removeExpiredIn(cacheName); }
7
diff --git a/assets/js/modules/optimize/settings/settings-main.test.js b/assets/js/modules/optimize/settings/settings-main.test.js @@ -45,7 +45,7 @@ describe( 'SettingsMain', () => { rerender( <SettingsMain isOpen={ true } isEditing={ true } /> ); await wait( () => container.querySelector( '.mdc-text-field__input' ) ); - fireEvent.changeText( container.querySelector( '.mdc-text-field__input' ), 'OPT-2222222' ); + fireEvent.change( container.querySelector( '.mdc-text-field__input' ), { target: { value: 'OPT-2222222' } } ); expect( select( STORE_NAME ).haveSettingsChanged() ).toBe( true ); rerender( <SettingsMain isOpen={ true } isEditing={ false } /> ); @@ -66,13 +66,11 @@ describe( 'SettingsMain', () => { rerender( <SettingsMain isOpen={ true } isEditing={ true } /> ); await wait( () => container.querySelector( '.mdc-text-field__input' ) ); - fireEvent.changeText( container.querySelector( '.mdc-text-field__input' ), 'OPT-2222222' ); + fireEvent.change( container.querySelector( '.mdc-text-field__input' ), { target: { value: 'OPT-2222222' } } ); expect( select( STORE_NAME ).haveSettingsChanged() ).toBe( true ); rerender( <SettingsMain isOpen={ false } isEditing={ true } /> ); - expect( select( STORE_NAME ).getSettings() ).toEqual( { - newSettings, - } ); + expect( select( STORE_NAME ).getSettings() ).toEqual( newSettings ); } ); } );
1
diff --git a/test/jasmine/tests/gl3d_hover_click_test.js b/test/jasmine/tests/gl3d_hover_click_test.js @@ -13,6 +13,7 @@ var assertHoverLabelStyle = customAssertions.assertHoverLabelStyle; var assertHoverLabelContent = customAssertions.assertHoverLabelContent; var mock = require('@mocks/gl3d_marker-arrays.json'); +var mesh3dcoloringMock = require('@mocks/gl3d_mesh3d_coloring.json'); var multipleScatter3dMock = require('@mocks/gl3d_multiple-scatter3d-traces.json'); // lines, markers, text, error bars and surfaces each @@ -544,6 +545,59 @@ describe('Test gl3d trace click/hover:', function() { .then(done); }); + it('@gl should display correct face colors', function(done) { + var fig = mesh3dcoloringMock; + + Plotly.newPlot(gd, fig) + .then(delay(20)) + .then(function() { mouseEvent('mouseover', 200, 200); }) + .then(delay(20)) + .then(function() { + assertHoverText( + 'x: 1', + 'y: 0', + 'z: 1', + 'face color: #0F0', + 'face color' + ); + }) + .then(function() { mouseEvent('mouseover', 300, 200); }) + .then(delay(20)) + .then(function() { + assertHoverText( + 'x: 1', + 'y: 1', + 'z: 1', + 'face color: #0FF', + 'face color' + ); + }) + .then(function() { mouseEvent('mouseover', 300, 300); }) + .then(delay(20)) + .then(function() { + assertHoverText( + 'x: 1', + 'y: 1', + 'z: 0', + 'face color: #00F', + 'face color' + ); + }) + .then(function() { mouseEvent('mouseover', 200, 300); }) + .then(delay(20)) + .then(function() { + assertHoverText( + 'x: 0', + 'y: 0', + 'z: 0', + 'face color: #000', + 'face color' + ); + }) + .catch(failTest) + .then(done); + }); + it('@gl should pick latest & closest points on hover if two points overlap', function(done) { var _mock = Lib.extendDeep({}, mock4);
0
diff --git a/universe.js b/universe.js @@ -9,7 +9,7 @@ import cameraManager from './camera-manager.js'; import {makeTextMesh} from './vr-ui.js'; import {parseQuery, parseCoord} from './util.js'; import {arrowGeometry, arrowMaterial} from './shaders.js'; -import {homeScnUrl} from './constants.js'; +import {landHost, homeScnUrl} from './constants.js'; const localVector = new THREE.Vector3(); const localVector2 = new THREE.Vector3(); @@ -137,6 +137,15 @@ const update = () => { } return geometry; }; */ +const getParcels = async () => { + const res = await fetch(`${landHost}/1-100`); + if (res.ok) { + const j = await res.json(); + return j; + } else { + return []; + } +}; const enterWorld = async worldSpec => { let warpPhysicsId; const _pre = () => { @@ -291,6 +300,7 @@ window.addEventListener('popstate', e => { export { bindInterface, update, + getParcels, enterWorld, pushUrl, handleUrlUpdate,
0
diff --git a/quasar/lang/en-us.js b/quasar/lang/en-us.js @@ -87,25 +87,5 @@ export default { tree: { noNodes: 'No nodes available', noResults: 'No matching nodes found' - }, - media: { - oldBrowser: 'To view this video please enable JavaScript and/or consider upgrading to a browser that supports HTML5 video.', - pause: 'Pause', - play: 'Play', - settings: 'Settings', - fullscreen: 'Full Screen', - mute: 'Mute', - unmute: 'Unmute', - speed: 'Speed', // Playback rate - language: 'Language', - waitingVideo: 'Waiting for video', - waitingAudio: 'Waiting for audio', - ratePoint5: '.5x', - rateNormal: 'Normal', - rate1Point5: '1.5x', - rate2: '2x', - trackLanguageOff: 'Off', - noLoadVideo: 'Unable to load video', - noLoadAudio: 'Unable to load audio' } }
2
diff --git a/src/client/client4.js b/src/client/client4.js @@ -2129,6 +2129,9 @@ export default class Client4 { if (global && global.window && global.window.analytics && global.window.analytics.initialized) { global.window.analytics.track('event', properties, options); } else if (global && global.analytics) { + if (global.analytics_context) { + options.context = global.analytics_context; + } global.analytics.track(Object.assign({ event: 'event' }, {properties}, options));
14
diff --git a/src/template.json b/src/template.json "type": "" }, "eac": 10, + "expansionBays": { + "value": 0 + }, "kac": 10, "cover": "partial", "hp": {
0
diff --git a/components/evenement/add-to-calendar.js b/components/evenement/add-to-calendar.js @@ -39,7 +39,7 @@ function AddToCalendar({eventData}) { } // Add to calendar button init - useEffect(() => atcb_init()) + useEffect(() => atcb_init(), []) return ( <div className='atcb'>
7
diff --git a/articles/connections/database/custom-db/index.md b/articles/connections/database/custom-db/index.md @@ -17,7 +17,7 @@ useCase: If you have your own user database, you can use it as an identity provider in Auth0 to authenticate users. ::: panel Feature availability -- Only **Enterprise** subscription plans include the ability to use a custom database for authentication requests. +Only **Enterprise** subscription plans include the ability to use a custom database for authentication requests. For more information refer to [Auth0 pricing plans](https://auth0.com/pricing). :::
2
diff --git a/templates/master/index.js b/templates/master/index.js @@ -13,7 +13,7 @@ var base={ }, "Email":{ "Type":"String", - "Description":"Email address for the admin user. Will be used for loging in and for setting the admin password.", + "Description":"Email address for the admin user. Will be used for loging in and for setting the admin password. This email will receive the temporary password for the admin user.", "AllowedPattern":".+\@.+\..+", "ConstraintDescription":"Must be valid email address eg. [email protected]" },
7
diff --git a/token-metadata/0x5cAf454Ba92e6F2c929DF14667Ee360eD9fD5b26/metadata.json b/token-metadata/0x5cAf454Ba92e6F2c929DF14667Ee360eD9fD5b26/metadata.json "symbol": "DEV", "address": "0x5cAf454Ba92e6F2c929DF14667Ee360eD9fD5b26", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/contracts/IssuanceController.sol b/contracts/IssuanceController.sol @@ -257,7 +257,7 @@ contract IssuanceController is SafeDecimalMath, SelfDestructible, Pausable { nomin.approve(this, amount); nomin.transferFrom(msg.sender, this, amount); - // // And send them the Havvens. + // And send them the Havvens. // havven.transfer(msg.sender, amountReceived); // We don't emit our own events here because we assume that anyone
2
diff --git a/build/transpile.js b/build/transpile.js @@ -248,7 +248,6 @@ class Transpiler { [ /parseFloat\s*/g, 'float'], [ /parseInt\s*/g, 'int'], [ /self\[([^\]+]+)\]/g, 'getattr(self, $1)' ], - [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /Math\.floor\s*\(([^\)]+)\)/g, 'int(math.floor($1))' ], [ /Math\.abs\s*\(([^\)]+)\)/g, 'abs($1)' ], [ /Math\.pow\s*\(([^\)]+)\)/g, 'math.pow($1)' ], @@ -258,6 +257,7 @@ class Transpiler { [ /([a-zA-Z0-9_\.]*\([^\)]+\)|[^\s]+)\s+\?\s*([^\:]+)\s+\:\s*([^\n]+)/g, '$2 if $1 else $3'], [ /([^\s]+)\.slice \(([^\,\)]+)\,\s?([^\)]+)\)/g, '$1[$2:$3]' ], [ /([^\s]+)\.slice \(([^\)\:]+)\)/g, '$1[$2:]' ], + [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /(^|\s)\/\//g, '$1#' ], [ /([^\n\s]) #/g, '$1 #' ], // PEP8 E261 [ /\.indexOf/g, '.find'],
5
diff --git a/VisionOnEdge/ui/src/components/CapturePhoto/CapturePhotos.tsx b/VisionOnEdge/ui/src/components/CapturePhoto/CapturePhotos.tsx import React, { useState } from 'react'; -import { Flex, Dropdown, Button, Image, Text } from '@fluentui/react-northstar'; +import { Flex, Dropdown, Button, Image, Text, DropdownItemProps } from '@fluentui/react-northstar'; import { Link } from 'react-router-dom'; import { useCameras } from '../../hooks/useCameras'; +import { Camera } from '../../State'; export const CapturePhotos: React.FC = () => { const [capturedPhotos, setCapturePhotos] = useState<string[]>([]); + const [selectedCamera, setSelectedCamera] = useState<Camera>(null); return ( <> - <CameraSelector /> - <RTSPVideo setCapturePhotos={setCapturePhotos} /> + <CameraSelector setSelectedCamera={setSelectedCamera} /> + <RTSPVideo setCapturePhotos={setCapturePhotos} selectedCameraId={selectedCamera?.id} /> <CapturedImagesContainer captruedPhotos={capturedPhotos} /> </> ); }; -const CameraSelector = (): JSX.Element => { - const availableCameraNames = useCameras().map((ele) => ele.name); +const CameraSelector = ({ setSelectedCamera }): JSX.Element => { + const availableCameras = useCameras(); + + const items: DropdownItemProps[] = availableCameras.map((ele) => ({ + header: ele.name, + content: { + key: ele.id, + }, + })); + + const onDropdownChange = (_, data): void => { + const { key } = data.value.content; + const selectedCamera = availableCameras.find((ele) => ele.id === key); + if (selectedCamera) setSelectedCamera(selectedCamera); + }; return ( <Flex gap="gap.small" vAlign="center"> <Text>Select Camera</Text> - <Dropdown items={availableCameraNames} /> + <Dropdown items={items} onChange={onDropdownChange} /> <Link to="/addCamera">Add Camera</Link> </Flex> ); }; -const RTSPVideo = ({ setCapturePhotos }): JSX.Element => { +const RTSPVideo = ({ setCapturePhotos, selectedCameraId }): JSX.Element => { const [streamId, setStreamId] = useState<string>(''); const onCreateStream = (): void => { - fetch(`/streams/connect?camera_id=0`) + // TODO: Use `selectedCameraId` when BE is ready + fetch(`/streams/connect?camera_id=${0}`) .then((response) => response.json()) .then((data) => { if (data?.status === 'ok') { @@ -97,7 +113,7 @@ const RTSPVideo = ({ setCapturePhotos }): JSX.Element => { const CapturedImagesContainer = ({ captruedPhotos }): JSX.Element => { return ( - <Flex styles={{ overflow: 'scroll' }}> + <Flex styles={{ overflow: 'scroll' }} gap="gap.small"> {captruedPhotos.map((src, i) => ( <Image key={i} src={src} /> ))}
9
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -202,6 +202,9 @@ metaversefile.setApi({ useUi() { return ui; }, + useActivate(fn) { + // XXX implement this + }, async add(m) { const appId = appManager.getNextAppId(); const app = appManager.createApp(appId);
0
diff --git a/token-metadata/0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190/metadata.json b/token-metadata/0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190/metadata.json "symbol": "DTH", "address": "0x5adc961D6AC3f7062D2eA45FEFB8D8167d44b190", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/.github/workflows/newcomers-alert.yml b/.github/workflows/newcomers-alert.yml @@ -5,7 +5,7 @@ on: jobs: good-first-issue-notify: if: contains(github.event.issue.labels.*.name, 'good first issue') || contains(github.event.issue.labels.*.name, 'newcomers-only') - name: Notify Slack on new good-first-issue + name: Notify Slack for new good-first-issue runs-on: ubuntu-latest steps: - name: Notify slack
7
diff --git a/package.json b/package.json "dependencies": { "arraybuffer-loader": "^1.0.6", "autoprefixer": "^9.0.1", + "base64-loader": "1.0.0", "bowser": "1.9.4", "classnames": "2.2.6", "computed-style-to-inline-style": "3.0.0", "lodash.debounce": "4.0.8", "lodash.defaultsdeep": "4.6.0", "lodash.omit": "4.5.0", + "lodash.throttle": "4.0.1", "minilog": "3.1.0", "omggif": "1.0.9", "papaparse": "5.1.1", "scratch-storage": "1.3.3", "scratch-svg-renderer": "0.2.0-prerelease.20200610220938", "scratch-vm": "0.2.0-prerelease.20200820211625", + "startaudiocontext": "1.2.1", "style-loader": "^0.23.0", + "text-encoding": "0.7.0", "to-style": "1.3.3", - "wav-encoder": "1.3.0" + "wav-encoder": "1.3.0", + "xhr": "2.5.0" }, "peerDependencies": { "react": "^16.0.0", "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.0.1", "babel-loader": "^8.0.4", - "base64-loader": "1.0.0", "chromedriver": "84.0.1", "enzyme": "^3.5.0", "enzyme-adapter-react-16": "1.3.0", "html-webpack-plugin": "^3.2.0", "jest": "^21.0.0", "jest-junit": "^7.0.0", - "lodash.throttle": "4.0.1", "mkdirp": "^1.0.3", "raf": "^3.4.0", "react-test-renderer": "16.2.0", "redux-mock-store": "^1.2.3", "rimraf": "^2.6.1", "selenium-webdriver": "3.6.0", - "startaudiocontext": "1.2.1", - "text-encoding": "0.7.0", "uglifyjs-webpack-plugin": "^1.2.5", "web-audio-test-api": "^0.5.2", "webpack": "^4.6.0", "webpack-cli": "^3.1.0", - "webpack-dev-server": "^3.1.3", - "xhr": "2.5.0" + "webpack-dev-server": "^3.1.3" }, "jest": { "setupFiles": [
5
diff --git a/edit.js b/edit.js @@ -12,7 +12,9 @@ import './gif.js'; // import {makeWristMenu, makeHighlightMesh, makeRayMesh} from './vr-ui.js'; import {makeLineMesh, makeTeleportMesh} from './teleport.js'; import perlin from './perlin.js'; -perlin.seed(Math.random()); +import alea from './alea.js'; +const rng = alea('lol'); +perlin.seed(rng()); const apiHost = 'https://ipfs.exokit.org/ipfs'; const presenceEndpoint = 'wss://presence.exokit.org';
0
diff --git a/Gruntfile.js b/Gruntfile.js @@ -410,7 +410,7 @@ module.exports = function (grunt) { /** * `grunt affected_specs` compile all Builder specs and launch a webpage in the browser. */ - grunt.registerTask('affected_specs', 'Build all Builder specs', [ + grunt.registerTask('test:browser', 'Build all Builder specs', [ 'affected', 'bootstrap_webpack_builder_specs', 'webpack:builder_specs',
10
diff --git a/packages/react-jsx-highcharts/src/utils/events.js b/packages/react-jsx-highcharts/src/utils/events.js -import { mapKeys, lowerFirst } from 'lodash-es'; import pickBy from './pickBy'; export const getEventHandlerProps = props => { @@ -11,10 +10,14 @@ export const getNonEventHandlerProps = props => { export const getEventsConfig = props => { const eventProps = getEventHandlerProps(props); + const eventsConfig = {}; - return mapKeys(eventProps, (handler, eventName) => { - return lowerFirst(eventName.replace(/^on/, '')); + Object.entries(eventProps).forEach(([eventName, value]) => { + const configName = eventName.slice(2)[0].toLowerCase()+eventName.slice(3); + eventsConfig[configName] = value; }); + + return eventsConfig; } export const addEventHandlersManually = (Highcharts, context, props) => { @@ -30,6 +33,6 @@ export const addEventHandlers = (updateFn, props, redraw = true) => { updateFn({ events }, redraw); }; -const _isEventKey = (key, value) => (key.indexOf('on') === 0) && typeof value === 'function'; +const _isEventKey = (key, value) => (key.indexOf('on') === 0) && key.length > 2 && typeof value === 'function'; export default addEventHandlers;
14
diff --git a/lib/assets/javascripts/new-dashboard/router/index.js b/lib/assets/javascripts/new-dashboard/router/index.js @@ -4,12 +4,15 @@ import HelloWorld from 'new-dashboard/components/HelloWorld'; Vue.use(Router); -// TODO: Change to match user in URL -const user = 'jesusowner'; -const prefix = `/u/${user}/dashboard`; +function getRouterPrefix (userBaseURL) { + return userBaseURL.replace(location.origin, ''); +} + +const dashboardBaseURL = '/dashboard'; +const baseRouterPrefix = `${getRouterPrefix(window.CartoConfig.data.user_data.base_url)}${dashboardBaseURL}`; export default new Router({ - base: prefix, + base: baseRouterPrefix, mode: 'history', routes: [ {
12
diff --git a/src/apps.json b/src/apps.json "22" ], "headers": { - "Server": "Cherokee/([\\d.]+)\\;version:\\1" + "Server": "Cherokee(?:/([\\d.]+))?\\;version:\\1" }, "icon": "Cherokee.png", "website": "http://www.cherokee-project.com"
7
diff --git a/DepthPass.js b/DepthPass.js @@ -28,7 +28,7 @@ const oldMaterialCache = new WeakMap(); class DepthPass extends Pass { - constructor( scene, camera, {width, height} ) { + constructor( scene, camera, {width, height, filterFn} ) { super(); @@ -36,6 +36,7 @@ class DepthPass extends Pass { this.camera = camera; this.width = width; this.height = height; + this.filterFn = filterFn; const depthTexture = new DepthTexture(); // depthTexture.type = UnsignedShortType; @@ -140,12 +141,13 @@ class DepthPass extends Pass { const scene = this.scene; const cache = this._visibilityCache; + const self = this; scene.traverse( function ( object ) { cache.set( object, object.visible ); - if ( object.isPoints || object.isLine || object.isLowPriority ) object.visible = false; + if ( object.isPoints || object.isLine || !self.filterFn(object) ) object.visible = false; } );
0
diff --git a/package.json b/package.json "gl-select-box": "^1.0.2", "gl-spikes2d": "^1.0.1", "gl-surface3d": "^1.3.4", + "gl-streamtube3d": "[email protected]:gl-vis/gl-streamtube3d", "glslify": "^6.1.1", "has-hover": "^1.0.1", "has-passive-events": "^1.0.0",
0
diff --git a/client/templates/topic/topicInfoItemList.js b/client/templates/topic/topicInfoItemList.js @@ -44,6 +44,7 @@ export class TopicInfoItemListContext { return item; }); this.isReadonly = isReadonly; + this.topicParentId = topicParentId; this.getSeriesId = () => { return topicParentId; };
12
diff --git a/languages/wizard_en-GB.xml b/languages/wizard_en-GB.xml </Buttons> <Instructions> <header>Hotspot instructions:</header> - <rectangle>Draw a rectangle by pressing the left mouse button and dragging</rectangle> - <polygon>Click to add points to the polygon. Click the first (red) point to stop</polygon> - <reset>Press the reset button to start over</reset> - <edit>The hotspot can be moved and change by clicking on it</edit> - <save>To save your selection, click the Ok button. If you want to go back without saving, click the cancel button.</save> - <forceRectangle>Only rectangles can be drawn, flexible hotspots are not available</forceRectangle> + <rectangle>Draw a rectangle by pressing the left mouse button and dragging.</rectangle> + <polygon>Click to add points to the polygon. Click the first (red) point to stop.</polygon> + <reset>Press the &#8634; reset button to start over.</reset> + <edit>The hotspot can be moved and changed by clicking on it.</edit> + <save>To save your selection, click the &#9745; Ok button. If you want to go back without saving, click the &#9746; cancel button.</save> + <forceRectangle>Only rectangles can be drawn, flexible hotspots are not available.</forceRectangle> </Instructions> <Error> <selectFile>Select image first!</selectFile>
7
diff --git a/core/server/services/invitations/accept.js b/core/server/services/invitations/accept.js const errors = require('@tryghost/errors'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const models = require('../../models'); const security = require('@tryghost/security'); +const messages = {inviteNotFound: 'Invite not found.', + inviteExpired: 'Invite is expired.', + inviteEmailAlreadyExist: { + message: 'Could not create an account, email is already in use.', + context: 'Attempting to create an account with existing email address.', + help: 'Use different email address to register your account.' + }}; async function accept(invitation) { const data = invitation.invitation[0]; @@ -11,19 +18,19 @@ async function accept(invitation) { let invite = await models.Invite.findOne({token: inviteToken, status: 'sent'}, options); if (!invite) { - throw new errors.NotFoundError({message: i18n.t('errors.api.invites.inviteNotFound')}); + throw new errors.NotFoundError({message: tpl(messages.inviteNotFound)}); } if (invite.get('expires') < Date.now()) { - throw new errors.NotFoundError({message: i18n.t('errors.api.invites.inviteExpired')}); + throw new errors.NotFoundError({message: tpl(messages.inviteExpired)}); } let user = await models.User.findOne({email: data.email}); if (user) { throw new errors.ValidationError({ - message: i18n.t('errors.api.invites.inviteEmailAlreadyExist.message'), - context: i18n.t('errors.api.invites.inviteEmailAlreadyExist.context'), - help: i18n.t('errors.api.invites.inviteEmailAlreadyExist.help') + message: tpl(messages.inviteEmailAlreadyExist.message), + context: tpl(messages.inviteEmailAlreadyExist.context), + help: tpl(messages.inviteEmailAlreadyExist.help) }); }
14
diff --git a/public/app/js/main.js b/public/app/js/main.js @@ -150,7 +150,7 @@ $(document).ready(function() { /* update stream or load from cache */ - var feedsUnsubscribed, storedEpisodes, lastAudioInfo, lastQueueInfos, + var storedEpisodes, lastAudioInfo, lastQueueInfos, lastAudioURL, lastAudioTime; localforageGetMulti([ @@ -159,9 +159,6 @@ $(document).ready(function() { "cbus-last-audio-time", "cbus-last-queue-urls", "cbus_episode_progresses", "cbus_feeds" ], function(r) { - if (r.hasOwnProperty("cbus_feeds_qnp")) { - feedsUnsubscribed = r["cbus_feeds_qnp"]; - } if (r.hasOwnProperty("cbus_cache_episodes")) { storedEpisodes = r["cbus_cache_episodes"]; } @@ -183,11 +180,11 @@ $(document).ready(function() { if (r.hasOwnProperty("cbus-last-queue-urls")) { lastQueueURLs = r["cbus-last-queue-urls"]; } - if (r.hasOwnProperty("cbus_episode_progresses")) { - cbus.data.episodeProgresses = r["cbus_episode_progresses"]; - } - if (r.hasOwnProperty("cbus_feeds")) { + cbus.data.episodeProgresses = r["cbus_episode_progresses"] || []; + cbus.data.feedsQNP = r["cbus_feeds_qnp"] || []; + + if (r["cbus_feeds"]) { cbus.data.feeds = r["cbus_feeds"].sort(cbus.const.podcastSort); } else { cbus.data.feeds = []; @@ -217,12 +214,6 @@ $(document).ready(function() { cbus.data.syncOffline() }) - if (feedsUnsubscribed) { - cbus.data.feedsQNP = feedsUnsubscribed - } else { - cbus.data.feedsQNP = [] - } - cbus.data.episodesUnsubbed = [] if (storedEpisodes) {
1
diff --git a/themes/navy/source/scss/main.scss b/themes/navy/source/scss/main.scss @@ -263,6 +263,10 @@ td:nth-child(1) { transform: rotate(90deg); } +div.description a { + text-decoration: underline !important; + color: -webkit-link !important; +} // Importing Vendored Keycard SCSS @import 'animations';
7
diff --git a/dc-worker.js b/dc-worker.js @@ -392,7 +392,6 @@ const _handleMethod = async ({method, args}) => { // console.log('draw cube damage chunks', chunks); if (chunks) { - _injectDamages(chunks, instanceKey); return { result: _chunksToResult(chunks), transfers: [], @@ -420,7 +419,6 @@ const _handleMethod = async ({method, args}) => { ); if (chunks) { - _injectDamages(chunks, instanceKey); return { result: _chunksToResult(chunks), transfers: [], @@ -442,7 +440,6 @@ const _handleMethod = async ({method, args}) => { ); if (chunks) { - _injectDamages(chunks, instanceKey); return { result: _chunksToResult(chunks), transfers: [], @@ -464,7 +461,6 @@ const _handleMethod = async ({method, args}) => { ); if (chunks) { - _injectDamages(chunks, instanceKey); return { result: _chunksToResult(chunks), transfers: [],
2
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -517,7 +517,7 @@ RED.editor = (function() { } else if (node.type.indexOf("subflow:")===0) { var subflow = RED.nodes.subflow(node.type.substring(8)); label = RED._("subflow.editSubflowInstance",{name:RED.utils.sanitize(subflow.name)}) - } else { + } else if (node._def !== undefined) { if (typeof node._def.paletteLabel !== "undefined") { try { label = RED.utils.sanitize((typeof node._def.paletteLabel === "function" ? node._def.paletteLabel.call(node._def) : node._def.paletteLabel)||"");
9
diff --git a/articles/extensions/user-import-export.md b/articles/extensions/user-import-export.md @@ -38,4 +38,4 @@ There are two ways of using this extension, they are described below: ### Observations -This extension is not supported in the Appliance. +The Delegated Administration extension is available in the Appliance beginning with version 10755 when User search is enabled.
3
diff --git a/userscript.user.js b/userscript.user.js @@ -62283,6 +62283,12 @@ var $$IMU_EXPORT$$; } if (domain === "imagery.zoogletools.com" || + // https://s3.amazonaws.com/content.sitezoogle.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/photo/rnr-interview.jpg + // https://s3.amazonaws.com/content.sitezoogle.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/original/rnr-interview.jpg + amazon_container === "content.sitezoogle.com" || + // http://content.sitezoogle.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/photo/rnr-interview.jpg + // http://content.sitezoogle.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/original/rnr-interview.jpg + domain === "content.sitezoogle.com" || // https://s3.amazonaws.com/zoogle-imager-production-2020/u/333257/1349c4b77893af624e4e8ca9650d49bfcdeac1ef/original/untitled-1.jpg/!!/b%3AW1siZXh0cmFjdCIseyJsZWZ0IjoxMDMsInRvcCI6NTMsIndpZHRoIjo1NzQ0LCJoZWlnaHQiOjI5NzZ9XSxbInJlc2l6ZSIsMTYwMF0sWyJtYXgiXSxbIndlIl1d.jpg // https://s3.amazonaws.com/zoogle-imager-production-2020/u/333257/1349c4b77893af624e4e8ca9650d49bfcdeac1ef/original/untitled-1.jpg amazon_container === "zoogle-imager-production-2020") { @@ -62290,8 +62296,18 @@ var $$IMU_EXPORT$$; // https://s3.amazonaws.com/zoogle-imager-production-2020/u/333257/1349c4b77893af624e4e8ca9650d49bfcdeac1ef/original/untitled-1.jpg // atob("W1siZXh0cmFjdCIseyJsZWZ0IjoxMDMsInRvcCI6NTMsIndpZHRoIjo1NzQ0LCJoZWlnaHQiOjI5NzZ9XSxbInJlc2l6ZSIsMTYwMF0sWyJtYXgiXSxbIndlIl1d") // = [["extract",{"left":103,"top":53,"width":5744,"height":2976}],["resize",1600],["max"],["we"]] + // thanks to nimuxoha on github: https://github.com/qsniyg/maxurl/issues/363 + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/thumb/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/thumbnail/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/small/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/medium/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/large/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/photo/rnr-interview.jpg + // https://imagery.zoogletools.com/u/243801/88f8a590bc091005ed1823c00dca5bc173e97c89/original/rnr-interview.jpg return { - url: src.replace(/(\/u\/+[0-9]+\/+[0-9a-f]{10,}\/+[^/]+\/+[^/]+)\/+!!\/.*/, "$1"), + url: src + .replace(/(\/u\/+[0-9]+\/+[0-9a-f]{10,}\/+)[a-z]+(\/+[^/]+\.[^/.]+)(?:[?#].*)?$/, "$1original$2") + .replace(/(\/u\/+[0-9]+\/+[0-9a-f]{10,}\/+[^/]+\/+[^/]+)\/+!!\/.*/, "$1"), can_head: false // 403 }; }
7
diff --git a/src/js/bs3/settings.js b/src/js/bs3/settings.js @@ -258,7 +258,7 @@ define([ 'link': 'note-icon-link', 'unlink': 'note-icon-chain-broken', 'magic': 'note-icon-magic', - 'menuCheck': 'note-icon-check', + 'menuCheck': 'note-icon-menu-check', 'minus': 'note-icon-minus', 'orderedlist': 'note-icon-orderedlist', 'pencil': 'note-icon-pencil',
1
diff --git a/lib/connection_config.js b/lib/connection_config.js @@ -113,6 +113,11 @@ class ConnectionConfig { this.timezone = '+' + this.timezone.substr(1); } if (this.ssl) { + if (typeof this.ssl !== 'object') { + throw new TypeError( + "SSL profile must be an object, instead it's a " + typeof this.ssl + ); + } // Default rejectUnauthorized to true this.ssl.rejectUnauthorized = this.ssl.rejectUnauthorized !== false; }
1
diff --git a/src/components/Explorer/queryTemplate.js b/src/components/Explorer/queryTemplate.js @@ -52,7 +52,7 @@ ${tier ? `AND leagues.tier = '${tier.value}'` : ''} GROUP BY hero_id ORDER BY total ${(order && order.value) || 'DESC'}`; } else { - const groupVal = `${group.value}${group.bucket ? ` / ${group.bucket} * ${group.bucket}` : ''}`; + const groupVal = group ? `${group.value}${group.bucket ? ` / ${group.bucket} * ${group.bucket}` : ''}` : null; query = `SELECT ${(group) ? [`${group.groupKeySelect || groupVal} ${group.alias || ''}`,
9
diff --git a/views/components/productpicker.blade.php b/views/components/productpicker.blade.php </select> <div class="invalid-feedback">{{ $L('You have to select a product') }}</div> <div id="custom-productpicker-error" class="form-text text-danger d-none"></div> + <div class="form-text text-info small">{{ $L('Type a new product name or barcode and hit TAB to start a workflow') }}</div> <div id="flow-info-addbarcodetoselection" class="form-text text-muted small d-none"><strong><span id="addbarcodetoselection"></span></strong> {{ $L('will be added to the list of barcodes for the selected product on submit') }}</div> </div>
0
diff --git a/server/logger.js b/server/logger.js @@ -12,6 +12,6 @@ const transports = process.env.NODE_ENV === 'test' ] module.exports = new (winston.Logger)({ - level: process.env.NODE_ENV === 'development' ? 'debug' : 'info', + level: process.env.LOG_LEVEL || process.env.NODE_ENV === 'development' ? 'debug' : 'info', transports })
11