code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/userscript.user.js b/userscript.user.js @@ -1669,7 +1669,7 @@ var $$IMU_EXPORT$$; mouseover_scrollx_behavior: "gallery", scroll_zoom_behavior: "fitfull", // thanks to regis on discord for the idea - scroll_incremental_mult: 2, + scroll_incremental_mult: 1.25, mouseover_move_with_cursor: false, zoom_out_to_close: false, // thanks to 07416 on github for the idea: https://github.com/qsniyg/maxurl/issues/20#issuecomment-439599984
12
diff --git a/src/plugins/Url/UrlUI.js b/src/plugins/Url/UrlUI.js @@ -8,6 +8,7 @@ class UrlUI extends Component { } componentDidMount () { + this.input.value = '' // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. @@ -32,7 +33,6 @@ class UrlUI extends Component { class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} - value="" onkeyup={this.handleKeyPress} ref={(input) => { this.input = input }} /> <button
0
diff --git a/articles/logs/index.md b/articles/logs/index.md @@ -23,11 +23,13 @@ Please note that administrative actions will show up in the logs as `API Operati ### How long is log file data available? -The length of time for which your data is stored varies depending on your plan. +The length of time log file data is stored varies depending on your plan. -You can see how long data is kept for your existing plan using the **Learn More** banner. - -![](/media/articles/logs/log-storage-period.png) +Plan | Log Retention +-----|-------------- +Developer | 2 Days +Developer Pro | 10 Days +Enterprise | 30 Days ### How do I view or export log file data?
0
diff --git a/plugins/picture-in-picture/style.css b/plugins/picture-in-picture/style.css -/* Make entire window draggable */ -body { - -webkit-app-region: drag; -} -button { - -webkit-app-region: no-drag; -} - ytmusic-player-bar.pip svg, ytmusic-player-bar.pip yt-formatted-string { filter: drop-shadow(2px 4px 6px black); color: white; } + +ytmusic-player-bar.pip ytmusic-player-expanding-menu { + border-radius: 30px; + background-color: rgba(0, 0, 0, 0.3); + backdrop-filter: blur(5px) brightness(20%); +}
7
diff --git a/Source/Core/EllipsoidGeometry.js b/Source/Core/EllipsoidGeometry.js @@ -480,6 +480,7 @@ define([ var normalIndex = 0; var tangentIndex = 0; var bitangentIndex = 0; + var vertexCountHalf = vertexCount / 2.0; var ellipsoid; var ellipsoidOuter = Ellipsoid.fromCartesian3(radii); @@ -521,13 +522,23 @@ define([ if (vertexFormat.tangent || vertexFormat.bitangent) { var tangent = scratchTangent; - if ((!isTopOpen && i < numThetas*2) || (!isBotOpen && i > vertexCount - numThetas*2 - 1)) { - Cartesian3.cross(Cartesian3.UNIT_X, normal, tangent); - Cartesian3.normalize(tangent, tangent); + + // Use UNIT_X for the poles + var offset1 = 0; + var offset2 = vertexCountHalf; + var unit; + if (isInner[i]) { + offset1 = vertexCountHalf; + offset2 = vertexCount; + } + if ((!isTopOpen && (i >= offset1 && i < (offset1 + numThetas*2)) || + (!isBotOpen && i > offset2 - numThetas*2 - 1)) { + unit = Cartesian3.UNIT_X; } else { - Cartesian3.cross(Cartesian3.UNIT_Z, normal, tangent); - Cartesian3.normalize(tangent, tangent); + unit = Cartesian3.UNIT_Z; } + Cartesian3.cross(unit, normal, tangent); + Cartesian3.normalize(tangent, tangent); if (vertexFormat.tangent) { tangents[tangentIndex++] = tangent.x;
1
diff --git a/src/canvas/baseCanvas.js b/src/canvas/baseCanvas.js @@ -277,7 +277,7 @@ class BaseCanvas extends Canvas { newNode = this.addNode(_existNode, true); } else { let _nodeObj = null; - if (_node instanceof Node || _node._type === 'node') { + if (_node instanceof Node || _node.__type === 'node') { _nodeObj = _node; } else { const _Node = _node.Class || Node; @@ -331,7 +331,7 @@ class BaseCanvas extends Canvas { return true; }).map((node) => { let _nodeObj = null; - if (node instanceof Node || node._type === 'node') { + if (node instanceof Node || node.__type === 'node') { _nodeObj = node; } else { const _Node = node.Class || Node; @@ -412,10 +412,10 @@ class BaseCanvas extends Canvas { let _sourceType = link._sourceType; let _targetType = link._targetType; - if (link.sourceNode instanceof Node || link.sourceNode._type === 'node') { + if (link.sourceNode instanceof Node || link.sourceNode.__type === 'node') { _sourceType = 'node'; sourceNode = link.sourceNode; - } else if (link.sourceNode instanceof Group || link.sourceNode._type === 'group') { + } else if (link.sourceNode instanceof Group || link.sourceNode.__type === 'group') { _sourceType = 'group'; sourceNode = link.sourceNode; } else { @@ -433,10 +433,10 @@ class BaseCanvas extends Canvas { } } - if (link.targetNode instanceof Node || link.targetNode._type === 'node') { + if (link.targetNode instanceof Node || link.targetNode.__type === 'node') { _targetType = 'node'; targetNode = link.targetNode; - } else if (link.targetNode instanceof Group || link.targetNode._type === 'group') { + } else if (link.targetNode instanceof Group || link.targetNode.__type === 'group') { _targetType = 'group'; targetNode = link.targetNode; } else { @@ -462,13 +462,13 @@ class BaseCanvas extends Canvas { let sourceEndpoint = null; let targetEndpoint = null; - if (link.sourceEndpoint && link.sourceEndpoint instanceof Endpoint || link.sourceEndpoint._type === 'endpoint') { + if (link.sourceEndpoint && link.sourceEndpoint instanceof Endpoint || link.sourceEndpoint.__type === 'endpoint') { sourceEndpoint = link.sourceEndpoint; } else { sourceEndpoint = sourceNode.getEndpoint(link.source, 'source'); } - if (link.targetEndpoint && link.targetEndpoint instanceof Endpoint || link.targetEndpoint._type === 'endpoint') { + if (link.targetEndpoint && link.targetEndpoint instanceof Endpoint || link.targetEndpoint.__type === 'endpoint') { targetEndpoint = link.targetEndpoint; } else { targetEndpoint = targetNode.getEndpoint(link.target, 'target'); @@ -697,7 +697,7 @@ class BaseCanvas extends Canvas { let result = []; edges.forEach((_edge) => { let edgeIndex = -1; - if (_edge instanceof Edge || _edge._type === 'edge') { + if (_edge instanceof Edge || _edge.__type === 'edge') { edgeIndex = _.findIndex(this.edges, (item) => { if (item.type === 'node') { return _edge.sourceNode.id === item.sourceNode.id && _edge.targetNode.id === item.targetNode.id;
3
diff --git a/src/sdk/base/common.js b/src/sdk/base/common.js @@ -442,7 +442,7 @@ Woogeen.Common = (function() { } else if (result = linuxRegex.exec(userAgent)) { info.os = { name: 'Linux', - versoin: 'Unknown' + version: 'Unknown' }; } else if (result = androidRegex.exec(userAgent)) { info.os = {
1
diff --git a/src/commands/build/index.js b/src/commands/build/index.js @@ -25,24 +25,11 @@ class BuildCommand extends Command { const { dry = false } = parseRawFlags(raw) const [token] = this.getConfigToken() - const config = await this.getConfig() + // Try current directory first, then site root + const config = (await getConfigPath()) || (await getConfigPath(undefined, this.netlify.site.root)) return { config, token, dry } } - - // Try current directory first, then site root - async getConfig() { - try { - return await getConfigPath() - } catch (error) { - try { - return await getConfigPath(undefined, this.netlify.site.root) - } catch (error) { - console.error(error.message) - this.exit(1) - } - } - } } // Netlify Build programmatic options
11
diff --git a/models/cards.js b/models/cards.js @@ -1412,15 +1412,24 @@ Cards.mutations({ assignAssignee(assigneeId) { // If there is not any assignee, allow one assignee, not more. + /* if (this.getAssignees().length === 0) { return { $addToSet: { assignees: assigneeId, }, }; - } else { - return false; - } + */ + // Allow more that one assignee: + // https://github.com/wekan/wekan/issues/3302 + return { + $addToSet: { + assignees: assigneeId, + }, + }; + //} else { + // return false, + //} }, unassignMember(memberId) {
11
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -218,7 +218,11 @@ jobs: docker run --volumes-from configs --network net0 -e API_SERVER -e AUTH_SERVER --workdir /usr/src/app kindlyops/apitest cucumber echo $WEBUI_TEST_CERT|base64 -d - > fullchain.pem echo $WEBUI_TEST_KEY|base64 -d - > privkey.pem - docker run -d --volume `pwd`/fullchain.pem:/certs/fullchain.pem --volume `pwd`/privkey.pem:/certs/privkey.pem --network net0 -h webui --name havenweb -e ELM_APP_KEYCLOAK_CLIENT_ID=havendev --publish 127.0.0.1:80:8080 kindlyops/havenweb:$CIRCLE_SHA1 + # creating dummy container which will hold a volume with config + docker create -v /certs --name certs alpine:3.4 /bin/true + docker cp fullchain.pem certs:/certs + docker cp privkey.pem certs:/certs + docker run -d --volumes-from certs --network net0 -h webui --name havenweb -e ELM_APP_KEYCLOAK_CLIENT_ID=havendev --publish 127.0.0.1:80:8080 kindlyops/havenweb:$CIRCLE_SHA1 cd webui && npm install cypress npx cypress run - notify-failed
4
diff --git a/src/components/stepFour/index.js b/src/components/stepFour/index.js @@ -304,31 +304,27 @@ export class stepFour extends React.Component { <div className="hidden"> <DisplayField side='left' - title={'Wallet address'} - value={tierStore.tiers[0].walletAddress} - description="Where the money goes after investors transactions." - /> - <DisplayField - side='right' title={'RATE'} value={tier.rate ? tier.rate : 0 + ' ETH'} description={DESCRIPTION.RATE} /> - </div> <DisplayField - side='left' + side='right' title={'Max cap'} value={tier.supply ? tier.supply : ''} description="How many tokens will be sold on this tier." /> + </div> + <div className="hidden"> <DisplayField - side='right' + side='left' title={'Allow modifying'} value={tier.updatable ? tier.updatable : 'off'} description={DESCRIPTION.ALLOW_MODIFYING} /> </div> </div> + </div> ) }) const ABIEncodedOutputsCrowdsale = tierStore.tiers.map((tier, index) => { @@ -450,13 +446,26 @@ export class stepFour extends React.Component { </p> </div> <div className="hidden"> - <div className="item"> <div className="publish-title-container"> <p className="publish-title" data-step="1">Crowdsale Contract</p> </div> + <div className="hidden"> + <div className="hidden"> + <div className="left"> + <div className="display-container"> <p className="label">Whitelist with cap</p> <p className="description">Crowdsale Contract</p> </div> + </div> + + <DisplayField + side='right' + title={'Wallet address'} + value={tierStore.tiers[0].walletAddress} + description="Where the money goes after investors transactions." + /> + </div> + </div> <div className="publish-title-container"> <p className="publish-title" data-step="2">Token Setup</p> </div>
2
diff --git a/docs/source/index.blade.php b/docs/source/index.blade.php @extends('_layouts.master') @section('body') +<div class="flex flex-col"> <div class="min-h-screen bg-pattern bg-center bg-smoke-light border-t-6 border-tailwind-teal flex items-center justify-center leading-tight p-6 pb-16"> <div> <div> </div> </div> </div> +</div> <div class="px-6"> <div class="my-12 text-center uppercase">
1
diff --git a/content/intro-to-storybook/ember/en/test.md b/content/intro-to-storybook/ember/en/test.md @@ -51,7 +51,7 @@ $ git commit -m "taskbox UI" Add the package as a dependency. ```bash -npm install -D storybook-chromatic +npm install -D chromatic ``` One fantastic thing about this addon is that it will use Git history to keep track of your UI components.
3
diff --git a/src/components/general/inventory/Inventory.jsx b/src/components/general/inventory/Inventory.jsx @@ -92,6 +92,7 @@ const InventoryObject = forwardRef(({ <div className={styles.inventoryObject} ref={ref}> <div className={styles.background} /> + <div className={styles.highlight} /> <canvas className={styles.canvas}
0
diff --git a/src/components/profile/Profile.js b/src/components/profile/Profile.js @@ -155,10 +155,23 @@ export function Profile({ match }) { Mixpanel.people.set({ relogin_date: new Date().toString(), enabled_2FA: account.has2fa, - [account.accountId]: formatNEAR(account.balance.total) }) - Mixpanel.alias(account.accountId) + [accountId]: formatNEAR(account.balance.total) }) + Mixpanel.alias(accountId) + },[]) + useEffect(() => { + if (userRecoveryMethods) { + let id = Mixpanel.get_distinct_id() + Mixpanel.identify(id) + let methods = userRecoveryMethods.map(method => method.kind) + Mixpanel.people.set({recovery_method: methods}) + } + },[userRecoveryMethods]) + + useEffect(()=> { if(twoFactor){ + let id = Mixpanel.get_distinct_id() + Mixpanel.identify(id) Mixpanel.people.set({ create_2FA_at: twoFactor.createdAt, enable_2FA_kind:twoFactor.kind,
3
diff --git a/src/core/utils/bin-sorter.js b/src/core/utils/bin-sorter.js @@ -80,7 +80,7 @@ export default class BinSorter { */ getMaxCount() { let maxCount = 0; - this.sortedBins.forEach(x => (maxCount = maxCount > x ? maxCount : x)); + this.sortedBins.forEach(x => (maxCount = maxCount > x.counts ? maxCount : x.counts)); return maxCount; }
1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -15,6 +15,7 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra | Label | Purpose | |--------|---------| | `type: bug` | bug report confirmed by a plotly team member | +| `type: regression` | bug that introduced a change in behavior from one version to the next | | `type: feature` | planned feature additions | | `type: performance` | performance related tasks | | `type: maintenance` | source code cleanup resulting in no enhancement for users |
0
diff --git a/src/sdk/base/stream.js b/src/sdk/base/stream.js { resolution:[object(Resolution)] | undefined, framerate: [number(FramerateFPS)] | undefined, - bitrateMultiple: [number(BitrateMultiple)] |undefined, + bitrateMultiplier: [number(bitrateMultiplier)] |undefined, keyFrameInterval: [number(KeyFrameIntervalSecond)] | undefined } | undefined } if (mediaInfo.video && mediaInfo.video.transcoding && mediaInfo.video.transcoding .parameters.bitrate) { - mediaInfo.video.transcoding.parameters.bitrateMultiple = Array.from( + mediaInfo.video.transcoding.parameters.bitrateMultiplier = Array.from( mediaInfo.video.transcoding.parameters.bitrate, bitrate => extractBitrateMultiplier(bitrate)); - mediaInfo.video.transcoding.parameters.bitrateMultiple.push(1.0); - mediaInfo.video.transcoding.parameters.bitrateMultiple = mediaInfo.video - .transcoding.parameters.bitrateMultiple.sort(); + mediaInfo.video.transcoding.parameters.bitrateMultiplier.push(1.0); + mediaInfo.video.transcoding.parameters.bitrateMultiplier = mediaInfo.video + .transcoding.parameters.bitrateMultiplier.sort(); delete mediaInfo.video.transcoding.parameters.bitrate; } return mediaInfo;
1
diff --git a/website/ops.js b/website/ops.js @@ -1150,7 +1150,8 @@ module.exports={ verifyLoginAndDictAccess: function(email, sessionkey, dictDB, dictID, callnext){ var yesterday=(new Date()); yesterday.setHours(yesterday.getHours()-24); yesterday=yesterday.toISOString(); var db=new sqlite3.Database(path.join(module.exports.siteconfig.dataDir, "lexonomy.sqlite"), sqlite3.OPEN_READWRITE); - db.get("select email, ske_apiKey, ske_username from users where email=$email and sessionKey=$key and sessionLast>=$yesterday", {$email: email.toLowerCase(), $key: sessionkey, $yesterday: yesterday}, function(err, row){ + if (email != undefined) email = email.toLowerCase(); + db.get("select email, ske_apiKey, ske_username from users where email=$email and sessionKey=$key and sessionLast>=$yesterday", {$email: email, $key: sessionkey, $yesterday: yesterday}, function(err, row){ if(!row || module.exports.siteconfig.readonly){ db.close(); callnext({loggedin: false, email: null});
1
diff --git a/.travis.yml b/.travis.yml @@ -36,3 +36,13 @@ deploy: skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN +- provider: s3 + on: + branch: master + access_key_id: $AWS_ACCESS_KEY_ID + secret_access_key: $AWS_SECRET_ACCESS_KEY + bucket: $AWS_BUCKET_NAME + acl: public_read + detect_encoding: true + skip_cleanup: true + local_dir: build
12
diff --git a/accessibility-checker/src-ts/lib/ACEngineManager.ts b/accessibility-checker/src-ts/lib/ACEngineManager.ts @@ -124,8 +124,8 @@ try { fs.writeFile(path.join(engineDir, "ace-node.js"), data, function (err) { try { err && console.log(err); - ace = require("./engine/ace-node"); - checker = new ace.Checker(); + var ace_ibma = require("./engine/ace-node"); + checker = new ace_ibma.Checker(); } catch (e) { console.log(e); return reject(e);
3
diff --git a/components/base-adresse-nationale/numero/coordinates-copy.js b/components/base-adresse-nationale/numero/coordinates-copy.js @@ -61,6 +61,7 @@ function CoordinatesCopy({coordinates, setCopyError, setIsCopySucceded, setIsCop onClick={handleClick} > Copier la position GPS + <Clipboard style={{marginLeft: '1em', verticalAlign: 'middle'}} /> </Button> )} <style jsx>{`
0
diff --git a/package.json b/package.json "build": "webpack --config webpack.umd.js --progress", "pretest": "webpack --config webpack.umd.js", "test": "karma start", - "coveralls": "coveralls < coverage/lcov.info" }, "repository": { "type": "git",
2
diff --git a/src/lib/bmp-converter.js b/src/lib/bmp-converter.js @@ -11,6 +11,8 @@ export default bmpImage => new Promise(resolve => { const image = document.createElement('img'); image.addEventListener('load', () => { + canvas.width = image.naturalWidth; + canvas.height = image.naturalHeight; ctx.drawImage(image, 0, 0); const dataUrl = canvas.toDataURL('image/png');
12
diff --git a/packages/openneuro-components/src/header/Header.tsx b/packages/openneuro-components/src/header/Header.tsx @@ -36,6 +36,7 @@ export const Header = ({ renderUploader, }: HeaderProps) => { const [isOpen, setOpen] = React.useState(false) + return ( <> <header> @@ -73,6 +74,7 @@ export const Header = ({ onClick={e => { console.log(e) e.preventDefault() + setOpen(prev => !prev) navigateToNewSearch() }} > @@ -80,14 +82,26 @@ export const Header = ({ </NavLink> </li> <li> - <span className="no-a" onClick={toggleSupport}> + <span + className="no-a" + onClick={() => { + setOpen(prev => !prev) + toggleSupport() + }} + > Support </span> </li> <li> - <NavLink to="/faq">FAQ</NavLink> + <NavLink to="/faq" onClick={() => setOpen(prev => !prev)}> + FAQ + </NavLink> + </li> + {profile ? ( + <li onClick={() => setOpen(prev => !prev)}> + {renderUploader()} </li> - {profile ? <li>{renderUploader()}</li> : null} + ) : null} </ul> </div> <div className="navbar-account">
12
diff --git a/detox/test/ios/example.xcodeproj/xcshareddata/xcschemes/example Release Xcode.xcscheme b/detox/test/ios/example.xcodeproj/xcshareddata/xcschemes/example Release Xcode.xcscheme isEnabled = "YES"> </CommandLineArgument> </CommandLineArguments> - <EnvironmentVariables> - <EnvironmentVariable - key = "__LLEO__" - value = "YES" - isEnabled = "YES"> - </EnvironmentVariable> - </EnvironmentVariables> <AdditionalOptions> </AdditionalOptions> </LaunchAction>
2
diff --git a/src/lib/coerce.js b/src/lib/coerce.js @@ -408,19 +408,19 @@ exports.coerce = function(containerIn, containerOut, attributes, attribute, dflt * returns false if there is no user input. */ exports.coerce2 = function(containerIn, containerOut, attributes, attribute, dflt) { - var propOut = exports.coerce(containerIn, containerOut, attributes, attribute, dflt); + var valOut = exports.coerce(containerIn, containerOut, attributes, attribute, dflt); var attr = attributes[attribute]; var theDefault = (dflt !== undefined) ? dflt : (attr || {}).dflt; if( theDefault !== undefined && - theDefault !== propOut + theDefault !== valOut ) { - return propOut; + return valOut; } var valIn = nestedProperty(containerIn, attribute).get(); - return (valIn !== undefined && valIn !== null) ? propOut : false; + return (valIn !== undefined && valIn !== null) ? valOut : false; }; /*
10
diff --git a/src/time.jsx b/src/time.jsx @@ -43,6 +43,10 @@ export default class Time extends React.Component { ); }; + state = { + height: null + } + componentDidMount() { // code to ensure selected time will always be in focus within time window when it first appears this.list.scrollTop = Time.calcCenterPosition( @@ -51,6 +55,11 @@ export default class Time extends React.Component { : this.list.clientHeight, this.centerLi ); + if (this.props.monthRef && this.header) { + this.setState({ + height: this.props.monthRef.clientHeight - this.header.clientHeight + }); + } } handleClick = time => { @@ -143,10 +152,7 @@ export default class Time extends React.Component { }; render() { - let height = null; - if (this.props.monthRef && this.header) { - height = this.props.monthRef.clientHeight - this.header.clientHeight; - } + const { height } = this.state; return ( <div
1
diff --git a/main/menu.js b/main/menu.js @@ -64,11 +64,23 @@ function buildAppMenu (options = {}) { } } + var preferencesAction = { + label: l('appMenuPreferences'), + accelerator: 'CmdOrCtrl+,', + click: function (item, window) { + sendIPCToWindow(window, 'addTab', { + url: 'file://' + __dirname + '/pages/settings/index.html' + }) + } + } + var template = [ ...(options.secondary ? tabTaskActions : []), ...(options.secondary ? [{ type: 'separator' }] : []), ...(options.secondary ? personalDataItems : []), ...(options.secondary ? [{ type: 'separator' }] : []), + ...(options.secondary ? [preferencesAction] : []), + ...(options.secondary ? [{ type: 'separator' }] : []), ...(process.platform === 'darwin' ? [ { @@ -81,15 +93,7 @@ function buildAppMenu (options = {}) { { type: 'separator' }, - { - label: l('appMenuPreferences'), - accelerator: 'CmdOrCtrl+,', - click: function (item, window) { - sendIPCToWindow(window, 'addTab', { - url: 'file://' + __dirname + '/pages/settings/index.html' - }) - } - }, + preferencesAction, { label: 'Services', role: 'services', @@ -141,8 +145,8 @@ function buildAppMenu (options = {}) { sendIPCToWindow(window, 'print') } }, - ...(process.platform === 'linux' ? [{ type: 'separator' }] : []), - ...(process.platform === 'linux' ? [quitAction] : []) + ...(!options.secondary && process.platform === 'linux' ? [{ type: 'separator' }] : []), + ...(!options.secondary && process.platform === 'linux' ? [quitAction] : []) ] }, { @@ -191,16 +195,8 @@ function buildAppMenu (options = {}) { sendIPCToWindow(window, 'findInPage') } }, - ...(process.platform !== 'darwin' ? [{ type: 'separator' }] : []), - ...(process.platform !== 'darwin' ? [{ - label: l('appMenuPreferences'), - accelerator: 'CmdOrCtrl+,', - click: function (item, window) { - sendIPCToWindow(window, 'addTab', { - url: 'file://' + __dirname + '/pages/settings/index.html' - }) - } - }] : []) + ...(!options.secondary && process.platform !== 'darwin' ? [{ type: 'separator' }] : []), + ...(!options.secondary && process.platform !== 'darwin' ? [preferencesAction] : []) ] }, { @@ -382,7 +378,9 @@ function buildAppMenu (options = {}) { } }] : []) ] - } + }, + ...(options.secondary && process.platform !== 'darwin' ? [{ type: 'separator' }] : []), + ...(options.secondary && process.platform !== 'darwin' ? [quitAction] : []) ] return Menu.buildFromTemplate(template) }
7
diff --git a/gameplay/avalonRoom.js b/gameplay/avalonRoom.js @@ -506,7 +506,7 @@ module.exports = function(host_, roomId_, io_){ }; this.getGameDataForSpectators = function(){ - return false; + // return false; var playerRoles = this.playersInGame; //set up the spectator data object
1
diff --git a/factory-ai-vision/EdgeSolution/modules/WebModule/backend_v2/vision_on_edge/cameras/migrations/0005_auto_20200922_0641.py b/factory-ai-vision/EdgeSolution/modules/WebModule/backend_v2/vision_on_edge/cameras/migrations/0005_auto_20200922_0641.py # Generated by Django 3.0.8 on 2020-09-22 06:41 +import json +import uuid + from django.db import migrations, models -import vision_on_edge.cameras.constants + +def gen_default_lines(): + """gen_default_lines. + """ + template = { + "useCountingLine": + True, + "countingLines": [{ + "id": "$UUID_PLACE_HOLDER", + "type": "Line", + "label": [{ + "x": 229, + "y": 215 + }, { + "x": 916, + "y": 255 + }] + }] + } + template['countingLines'][0]['id'] = str(uuid.uuid4()) + return json.dumps(template) + + +def gen_default_zones(): + """gen_default_zones. + """ + template = { + "useDangerZone": + True, + "dangerZones": [{ + "id": "$UUID_PLACE_HOLDER", + "type": "BBox", + "label": { + "x1": 23, + "y1": 58, + "x2": 452, + "y2": 502 + } + }] + } + template['dangerZones'][0]['id'] = str(uuid.uuid4()) + return json.dumps(template) class Migration(migrations.Migration): @@ -14,11 +58,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='camera', name='danger_zones', - field=models.CharField(blank=True, default=vision_on_edge.cameras.constants.gen_default_zones, max_length=1000), + field=models.CharField(blank=True, default=gen_default_zones, max_length=1000), ), migrations.AlterField( model_name='camera', name='lines', - field=models.CharField(blank=True, default=vision_on_edge.cameras.constants.gen_default_lines, max_length=1000), + field=models.CharField(blank=True, default=gen_default_lines, max_length=1000), ), ]
5
diff --git a/app/services/stream_copy.js b/app/services/stream_copy.js @@ -34,8 +34,11 @@ module.exports = { const runningClient = client; const cancelingClient = new Client(runningClient.connectionParameters); cancelingClient.cancel(runningClient, pgstream); + + const err = new Error('Connection closed by client'); pgstream.unpipe(res); - done(new Error('Connection closed by client')); + // see https://node-postgres.com/api/pool#release-err-error- + done(err); return cb(err); } }) @@ -45,7 +48,7 @@ module.exports = { .on('error', err => { if (!connectionClosedByClient) { pgstream.unpipe(res); - done(new Error('Connection closed by client')); + done(); return cb(err); } })
4
diff --git a/lib/blog.js b/lib/blog.js const URL = process.env.NEXT_PUBLIC_GHOST_URL const KEY = process.env.GHOST_KEY +const LIMIT = 9 +const INCLUDE = 'authors,tags' +const FULL_URL = `${URL}/ghost/api/v3/content/posts?key=${KEY}&limit=${LIMIT}&include=${INCLUDE}` const options = { method: 'GET', @@ -7,12 +10,32 @@ const options = { mode: 'cors' } -export async function getPosts() { +function buildTagFilter(tags) { + if (tags) { + return '&filter=tags:' + tags.replaceAll(',', '%2Btags:') + } + + return '' +} + +function buildQuery(props) { + const tagsFilter = props?.tags ? buildTagFilter(props.tags) : '' + + if (props?.page && props.page.length > 0) { + return `${FULL_URL}&page=${props.page}${tagsFilter}` + } + + return `${FULL_URL}${tagsFilter}` +} + +export async function getPosts(props) { + const query = buildQuery(props) + try { - const res = await fetch(`${URL}/ghost/api/v3/content/posts?key=${KEY}&include=authors,tags&limit=all`, options) + const res = await fetch(query, options) if (res.ok) { const data = await res.json() - return data.posts + return data } } catch (error) { console.log(error) @@ -24,6 +47,7 @@ export async function getPosts() { export async function getSinglePost(slug) { try { const res = await fetch(`${URL}/ghost/api/v3/content/posts/slug/${slug}/?key=${KEY}`) + if (res.ok) { const data = await res.json() return data.posts[0]
0
diff --git a/experimental/common-expression-language/prebuilt-functions.md b/experimental/common-expression-language/prebuilt-functions.md @@ -145,6 +145,7 @@ or you can browse the functions based on [alphabetical order](#alphabetical-list |[getProperty](#getProperty) | Return the value of the given property in a JSON object. | |[coalesce](#coalesce) | Return the first non-null value from one or more parameters. | |[xPath](#xPath) | Check XML for nodes or values that match an XPath(XML Path Language) expression, and return the matching nodes or values. | +|[setPathToValue](#setPathToValue) | Ensure a path in memory exists and set the leaf to a value. | ### Regex functions |Function |Explanation| @@ -2617,7 +2618,30 @@ replace('the old string', 'old', 'new') And returns this result: `"the new string"` -<a name="setProperty"> +<a name="setPathToValue"></a> + +### setPathToValue + +Ensure a path in memory exists and set the leaf to the supplied value. Paths can start with shortcuts and can include named property references or computed references using []. If part of the path is missing for a named reference or index, an object or array is added. An existing object or array will be used if it matches the path, otherwise a new object or array of the minimum size will overwrite the existing value. + +``` +setPathToValue(<path>, <value>) +``` + +| Parameter | Required | Type | Description | +| --------- | -------- | ---- | ----------- | +| <*path*> | Yes | PathExpression | The memory path expression to modify | +| <*value*> | Yes | Any | The value to set for the specified path | +||||| + +*Example* + +``` +setPathToValue($users[@name].preferences[2], 're' + 'd') +``` +If @name was "bob", this would set the memory path ```dialog.users.bob.preferences[2]``` to the string "red" and return the value that was set. The function would ensure that there was an object at .users and .bob and the the array at .preferences had at least 3 elements. + +<a name="setProperty"></a> ### setProperty @@ -2630,7 +2654,6 @@ setProperty(<object>, '<property>', <value>) | Parameter | Required | Type | Description | | --------- | -------- | ---- | ----------- | | <*object*> | Yes | Object | The JSON object from where you want to set a property | -| <*property*> | Yes | String | The name for the property to set | | <*value*> | Yes | Any | The value to set for the specified property | |||||
0
diff --git a/src/material-table.js b/src/material-table.js @@ -84,7 +84,7 @@ export default class MaterialTable extends React.Component { * Warn consumer of deprecated prop. */ if (this.props.options.sorting !== undefined) { - console.error( + console.warn( 'Property `sorting` has been deprecated, please start using `maxColumnSort` instead. https://github.com/material-table-core/core/pull/619' ); }
12
diff --git a/lib/node_modules/@stdlib/repl/help/datapackage.json b/lib/node_modules/@stdlib/repl/help/datapackage.json { - "name": "stdlib-help-text", + "name": "stdlib-alias-help", "version": "", "title": "Standard Library Aliases and Help Texts", "description": "A mapping between standard library aliases and help texts.", "resources": [ { - "name": "stdlib-help-text-json", + "name": "stdlib-alias-help-json", "title": "Standard Library Aliases and Help Texts", "description": "A mapping between standard library aliases and help texts.", "format": "json", "path": "./data/data.json" }, { - "name": "stdlib-help-text-csv", + "name": "stdlib-alias-help-csv", "title": "Standard Library Aliases and Help Texts", "description": "A mapping between standard library aliases and help texts.", "format": "csv",
10
diff --git a/CLI/commands/transfer_manager.js b/CLI/commands/transfer_manager.js @@ -663,7 +663,7 @@ async function matmManage() { if (getApprovals.length > 0) { let options = [] getApprovals.forEach((item) => { - options.push(`From ${item.from} to ${item.to}`) + options.push(`${web3.utils.toAscii(item.description)}\nFrom: ${item.from}\nTo: ${item.to}\nAmount: ${web3.utils.fromWei(item.allowance)}\nExpiry date: ${moment.unix(item.expiryTime).format('MM/DD/YYYY HH:mm')}\n`) }) let index = readlineSync.keyInSelect(options, 'Select an existing approval: ', {
7
diff --git a/dashboard/apps/job_manager.fma/js/job_manager.js b/dashboard/apps/job_manager.fma/js/job_manager.js @@ -299,12 +299,15 @@ function addHistoryEntries(jobs) { var row = table.insertRow(table.rows.length); var menu = row.insertCell(0); menu.className += ' actions-control'; - var name = row.insertCell(1); - var done = row.insertCell(2); - var time = row.insertCell(3); + var thumbnail = row.insertCell(1); + thumbnail.style.width = "60px"; + var name = row.insertCell(2); + var done = row.insertCell(3); + var time = row.insertCell(4); menu.innerHTML = createHistoryMenu(job._id); - name.innerHTML = '<div class="job-' + job.state + '">' + createPreviewThumbnail(job, 50, 50) + job.name + '</div>'; + thumbnail.innerHTML = createPreviewThumbnail(job, 50, 50); + name.innerHTML = '<div class="job-' + job.state + '">' + job.name + '</div>'; done.innerHTML = moment(job.finished_at).fromNow(); time.innerHTML = moment.utc(job.finished_at - job.started_at).format('HH:mm:ss'); });
7
diff --git a/src/implementations/vanilla/src/basics/form-elements/dropdown/dropdown.scss b/src/implementations/vanilla/src/basics/form-elements/dropdown/dropdown.scss @import '~helpers/css/layers.scss'; .hig__dropdown { + min-width: 300px; + max-width: 450px; + .hig__text-field__input{ font-weight: 600; }
12
diff --git a/_src/_templates/states.njk b/_src/_templates/states.njk @@ -116,7 +116,7 @@ layout: base.njk <div class="state-flex-header">Total test results<div class="total-info">Positive + Negative</div> </div> <div class="state-flex-data"> - {% if state.posNeg %}{{ state.posNeg | thousands }} + {% if state.positive and state.negative %}{{ (state.positive + state.negative) | thousands }} {% else %}N/A{% endif %} </div> </div>
1
diff --git a/src/userscript.ts b/src/userscript.ts @@ -40018,9 +40018,13 @@ var $$IMU_EXPORT$$; // https://news.mynavi.jp/article/20180219-586202/index_images/index.jpg/iapp // https://news.mynavi.jp/article/20180219-586202/index_images/index.jpg // https://news.mynavi.jp/article/20180219-586202/images/001l.jpg + // thanks to nimbuz on discord: + // https://news.mynavi.jp/article/20220217-2274602/images/003.jpg/webp + // https://news.mynavi.jp/article/20220217-2274602/images/003l.jpg return src .replace(/\/index_images\/[^/]*(?:\/[^/]*)?$/, "/images/001l.jpg") - .replace(/\/images\/([0-9]+)(\.[^/.]*)$/, "/images/$1l$2"); + .replace(/\/images\/([0-9]+)(\.[^/.]*)$/, "/images/$1l$2") + .replace(/(\/images\/+[0-9]+l?\.[^/.]+)\/+webp(?:[?#].*)?$/, "$1"); } if (domain === "cdn.deview.co.jp") {
7
diff --git a/assets/sass/components/setup/_googlesitekit-adsense-connect-cta.scss b/assets/sass/components/setup/_googlesitekit-adsense-connect-cta.scss } .googlesitekit-setup-module__action { - - .mdc-button { - margin-right: 24px; - } + display: flex; + flex-wrap: wrap; + gap: 8px 24px; @media (min-width: $bp-desktop) { - - .mdc-button { - margin-right: 48px; - } + column-gap: 48px; } }
7
diff --git a/test/jasmine/tests/svg_text_utils_test.js b/test/jasmine/tests/svg_text_utils_test.js @@ -117,12 +117,12 @@ describe('svg+text utils', function() { it('whitelists http hrefs', function() { var node = mockTextSVGElement( - '<a href="https://bl.ocks.org/">bl.ocks.org</a>' + '<a href="http://bl.ocks.org/">bl.ocks.org</a>' ); expect(node.text()).toEqual('bl.ocks.org'); assertAnchorAttrs(node); - assertAnchorLink(node, 'https://bl.ocks.org/'); + assertAnchorLink(node, 'http://bl.ocks.org/'); }); it('whitelists https hrefs', function() { @@ -512,3 +512,115 @@ describe('svg+text utils', function() { }); }); }); + +describe('sanitizeHTML', function() { + 'use strict'; + + describe('convertToTspans', function() { + var stringFromCodePoint; + + beforeAll(function() { + stringFromCodePoint = String.fromCodePoint; + }); + + afterEach(function() { + String.fromCodePoint = stringFromCodePoint; + }); + + function mockHTML(txt) { + return util.sanitizeHTML(txt); + } + + afterEach(function() { + d3.selectAll('.text-tester').remove(); + }); + + it('checks for XSS attack in href', function() { + var innerHTML = mockHTML( + '<a href="javascript:alert(\'attack\')">XSS</a>' + ); + + expect(innerHTML).toEqual('<a>XSS</a>'); + }); + + it('checks for XSS attack in href (with plenty of white spaces)', function() { + var innerHTML = mockHTML( + '<a href = " javascript:alert(\'attack\')">XSS</a>' + ); + + expect(innerHTML).toEqual('<a>XSS</a>'); + }); + + it('whitelists relative hrefs (interpreted as http)', function() { + var innerHTML = mockHTML( + '<a href="/mylink">mylink</a>' + ); + + expect(innerHTML).toEqual('<a href="/mylink">mylink</a>'); + }); + + it('whitelists http hrefs', function() { + var innerHTML = mockHTML( + '<a href="http://bl.ocks.org/">bl.ocks.org</a>' + ); + + expect(innerHTML).toEqual('<a href="http://bl.ocks.org/">bl.ocks.org</a>'); + }); + + it('whitelists https hrefs', function() { + var innerHTML = mockHTML( + '<a href="https://chart-studio.plotly.com">plotly</a>' + ); + + expect(innerHTML).toEqual('<a href="https://chart-studio.plotly.com">plotly</a>'); + }); + + it('whitelists mailto hrefs', function() { + var innerHTML = mockHTML( + '<a href="mailto:[email protected]">support</a>' + ); + + expect(innerHTML).toEqual('<a href="mailto:[email protected]">support</a>'); + }); + + it('drops XSS attacks in href', function() { + // "XSS" gets interpreted as a relative link (http) + var textCases = [ + '<a href="XSS\" onmouseover="alert(1)\" style="font-size:300px">Subtitle</a>', + '<a href="XSS" onmouseover="alert(1)" style="font-size:300px">Subtitle</a>' + ]; + + textCases.forEach(function(textCase) { + var innerHTML = mockHTML(textCase); + + expect(innerHTML).toEqual('<a style="font-size:300px" href="XSS">Subtitle</a>'); + }); + }); + + it('accepts href and style in <a> in any order and tosses other stuff', function() { + var textCases = [ + '<a href="x" style="y">z</a>', + '<a href=\'x\' style="y">z</a>', + '<A HREF="x"StYlE=\'y\'>z</a>', + '<a style=\'y\'href=\'x\'>z</A>', + '<a \t\r\n href="x" \n\r\t style="y" \n \t \r>z</a>', + '<a magic="true" href="x" weather="cloudy" style="y" speed="42">z</a>', + '<a href="x" style="y">z</a href="nope" style="for real?">', + ]; + + textCases.forEach(function(textCase) { + var innerHTML = mockHTML(textCase); + + expect(innerHTML).toEqual('<a style="y" href="x">z</a>'); + }); + }); + + it('allows encoded URIs in href', function() { + var innerHTML = mockHTML( + '<a href="https://example.com/?q=date%20%3E=%202018-01-01">click</a>' + ); + + expect(innerHTML).toEqual('<a href="https://example.com/?q=date%20%3E=%202018-01-01">click</a>'); + }); + }); +});
0
diff --git a/README.md b/README.md @@ -33,7 +33,7 @@ Check this out: - it has all "MOST WANTED" features built in. That is where the name comes from :wink: We come to the features a little bit later. - it is customizable - it uses Firebase :smile: -- it is Best Practice Project PWA (Progressive Web Application) +- it is a Best Practice Project PWA (Progressive Web Application) - you will love it once you start using it :smile: ## What are those "Most Wanted" features? @@ -49,16 +49,16 @@ Let's take a look at some of them: - push notifications UI integration - theming - internationalisation -- build in CI (Continuouos Integration) -- build in CD (Continuouos Deployment) +- built in CI (Continuous Integration) +- built in CD (Continuous Deployment) - realtime forms (isn't that awesome :smile: ) - ... and a lot more I just can't remember -# Are there more in depth informations about this project? +# Is there more in depth information about this project? Sure. It is a project made over years and still fully supported. Reason for that is that we use it in our company for production projects so it has to work for at least some years. Good enough for the JavaScript ecosystem :wink: -The informations you are seeking are skatered over some Medium articles writen by me at the time I was working on solving some problems in this project. So they should explain some core parts in detail: +The information you are seeking is scattered over some Medium articles written by me at the time I was working on solving some problems in this project. So they should explain some core parts in detail: - [Beyond create-react-app](https://codeburst.io/beyond-create-react-app-cra-a2063196a124) - [Organising your Firebase CLoud Functions](https://codeburst.io/organizing-your-firebase-cloud-functions-67dc17b3b0da) @@ -73,15 +73,15 @@ We have you covered. Here is a [codelab](https://codelabs-preview.appspot.com/?f ## I have a problem. Where to ask? -It depends on your problem. If you have a question please join our [gitter room](https://gitter.im/react-most-wanted/Lobby). If you notice a issue in the project don't hasitate to fill out a issue report to this project [here](https://github.com/TarikHuber/react-most-wanted/issues). +It depends on your problem. If you have a question please join our [gitter room](https://gitter.im/react-most-wanted/Lobby). If you notice an issue in the project don't hesitate to fill out an issue report to this project [here](https://github.com/TarikHuber/react-most-wanted/issues). ## I like this. Can I help somehow? YEEEEEEES :smile: Everyone is welcome to send PRs and if you don't know where to start just write to me on [twitter](https://twitter.com/TarikHuber). There is always some work to do. -And if you don't have time to code with use show some :blue_heart: and give this project a :star: and tell the :earth_africa: about it +And if you don't have time to code with us show some :blue_heart: and give this project a :star: and tell the :earth_africa: about it -## There are way to much :smile: in this README. Are you crazy? +## There are way too much :smile: in this README. Are you crazy? YES! :trollface:
1
diff --git a/jobs/upcoming.js b/jobs/upcoming.js @@ -52,14 +52,16 @@ module.exports = async () => { const wikiRow = wiki.split('\n').filter((v) => v !== ''); - const allWikiDates = wikiRow.filter((_, index) => index % 8 === 0); - const wikiDates = allWikiDates.slice(0, 30); + const allWikiDates = wikiRow.filter((_, index) => index % 7 === 0); + const wikiDates = allWikiDates.slice(0, 30).map((date) => date.replace(/~|\[[0-9]{1,2}\]/gi, '') + .replace(/(~|early|mid|late|end|tbd|tba)/gi, ' ') + .split('/')[0].trim()); - const allWikiPayloads = wikiRow.filter((_, index) => (index + 3) % 8 === 0); - const wikiPayloads = allWikiPayloads.slice(0, 30); + const allWikiPayloads = wikiRow.filter((_, index) => (index + 2) % 7 === 0); + const wikiPayloads = allWikiPayloads.slice(0, 30).map((payload) => payload.replace(/\[[0-9]{1,2}\]/gi, '')); - const allWikiLaunchpads = wikiRow.filter((_, index) => (index + 6) % 8 === 0); - const wikiLaunchpads = allWikiLaunchpads.slice(0, 30); + const allWikiLaunchpads = wikiRow.filter((_, index) => (index + 5) % 7 === 0); + const wikiLaunchpads = allWikiLaunchpads.slice(0, 30).map((launchpad) => launchpad.replace(/\[[0-9]{1,2}\]/gi, '')); // Set base flight number to automatically reorder launches on the wiki // If the most recent past launch is still on the wiki, don't offset the flight number @@ -104,6 +106,9 @@ module.exports = async () => { // 2020 Nov 4 const dayPattern = /^\s*[0-9]{4}\s*([a-z]{3}|[a-z]{3,9})\s*[0-9]{1,2}\s*$/i; + // 2020 Nov [14:10] + const vagueHourPattern = /^\s*[0-9]{4}\s*([a-z]{3}|[a-z]{3,9})\s*(\[?\s*[0-9]{2}:[0-9]{2}\s*\]?)\s*$/i; + // 2020 Nov 4 [14:10] const hourPattern = /^\s*[0-9]{4}\s*([a-z]{3}|[a-z]{3,9})\s*[0-9]{1,2}\s*(\[?\s*[0-9]{2}:[0-9]{2}\s*\]?)\s*$/i; @@ -115,7 +120,7 @@ module.exports = async () => { // Remove extra stuff humans might add // NOTE: Add to this when people add unexpected things to dates in the wiki - const cleanedwikiDate = wikiDate.replace(/(~|early|mid|late|end|tbd|tba)/gi, ' ').split('/')[0].trim(); + const cleanedwikiDate = wikiDate; // Set date precision if (cleanedwikiDate.includes('Q')) { @@ -137,6 +142,8 @@ module.exports = async () => { precision = 'month'; } else if (dayPattern.test(cleanedwikiDate)) { precision = 'day'; + } else if (vagueHourPattern.test(cleanedwikiDate)) { + precision = 'month'; } else if (hourPattern.test(cleanedwikiDate)) { precision = 'hour'; } else {
1
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -53,7 +53,7 @@ class FileTreePanel extends HTMLElement { let biswebElementMenu = $(`<div class='bisweb-elements-menu'></div>`); listElement.append(biswebElementMenu); - this.makeButtons(listElement); + this.makeStaticButtons(listElement); //https://stackoverflow.com/questions/11703093/how-to-dismiss-a-twitter-bootstrap-popover-by-clicking-outside let dismissPopoverFn = (e) => { @@ -320,14 +320,22 @@ class FileTreePanel extends HTMLElement { if (!this.renderedTagSelectMenu) { - //append the tag selecting menu to the bottom of the file tree div + //create load button and static tag select menu let tagSelectDiv = $(`<div></div>`); this.staticTagSelectMenu = this.createTagSelectMenu({ 'setDefaultValue': false, 'listenForTagEvents': true }); tagSelectDiv.append(this.staticTagSelectMenu); let elementsDiv = $('.bisweb-elements-menu'); - elementsDiv.prepend(tagSelectDiv); - elementsDiv.prepend($(`<br><label>Tag Selected Element:</label></br>`)); + + let loadImageButton = $(`<br><button type='button' class='btn btn-success btn-sm load-image-button'>Load image</button><br>`); + loadImageButton.on('click', () => { + this.loadImageFromTree(); + }); + + elementsDiv.append(loadImageButton); + elementsDiv.append($(`<br><label>Tag Selected Element:</label></br>`)); + elementsDiv.append(tagSelectDiv); + this.renderedTagSelectMenu = true; } else { $('.bisweb-elements-menu').find('select').prop('disabled', 'disabled'); @@ -343,7 +351,7 @@ class FileTreePanel extends HTMLElement { * * @param {HTMLElement} listElement - The element of the files tab where the buttons should be created. */ - makeButtons(listElement) { + makeStaticButtons(listElement) { let buttonGroupDisplay = $(` <div class='btn-group'> <div class='btn-group top-bar' role='group' aria-label='Viewer Buttons' style='float: left;'> @@ -405,14 +413,8 @@ class FileTreePanel extends HTMLElement { saveStudyButton.prop('disabled', 'true'); - let loadImageButton = $(`<button type='button' class='btn btn-success btn-sm load-image-button' disabled>Load image</button>`); - loadImageButton.on('click', () => { - this.loadImageFromTree(); - }); - - topButtonBar.append(loadImageButton); topButtonBar.append(loadStudyDirectoryButton); - bottomButtonBar.append(loadStudyJSONButton); + topButtonBar.append(loadStudyJSONButton); bottomButtonBar.append(saveStudyButton); listElement.append(buttonGroupDisplay);
5
diff --git a/test/jasmine/tests/transform_sort_test.js b/test/jasmine/tests/transform_sort_test.js @@ -134,6 +134,21 @@ describe('Test sort transform calc:', function() { expect(out[0].y).toEqual([0, 2, 4, 3, 1]); }); + it('should sort via categorical targets', function() { + var trace = extend({ + transforms: [{ target: 'marker.size' }] + }); + trace.x = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']; + + var out = _transform([trace]); + + expect(out[0].x).toEqual(['F', 'D', 'C', 'E', 'A', 'G', 'B']); + expect(out[0].y).toEqual([3, 1, 3, 2, 1, 1, 2]); + expect(out[0].ids).toEqual(['p2', 'z', 'n2', 'p1', 'n0', 'p3', 'n1']); + expect(out[0].marker.size).toEqual([0, 1, 5, 6, 10, 10, 20]); + expect(out[0].marker.color).toEqual([0.3, 0.1, 0.3, 0.2, 0.1, 0.4, 0.2]); + }); + it('should sort via custom targets', function() { var out = _transform([extend({ transforms: [{
0
diff --git a/server/lib/actions.js b/server/lib/actions.js @@ -398,8 +398,8 @@ export default function (server, actions, payload, task) { * } */ - var formatter; if (_.has(action, 'slack')) { + let formatter; formatter = action.slack.message ? action.slack.message : 'Series Alarm {{ payload._id}}: {{payload.hits.total}}'; message = mustache.render(formatter, {payload: payload}); priority = action.slack.priority ? action.slack.priority : 'INFO'; @@ -434,15 +434,15 @@ export default function (server, actions, payload, task) { * "port" : 9200, * "path": "/{{payload.watcher_id}}", * "body" : "{{payload.watcher_id}}:{{payload.hits.total}}", + * "headers": {'Content-Type': 'text/plain'}, * "use_https" : false * } */ - var querystring = require('querystring'); - var options; - var req; if (_.has(action, 'webhook')) { - var http = action.webhook.use_https ? require('https') : require('http'); + const http = action.webhook.use_https ? require('https') : require('http'); + let options; + let req; options = { hostname: action.webhook.host ? action.webhook.host : 'localhost', @@ -453,7 +453,7 @@ export default function (server, actions, payload, task) { auth: action.webhook.auth ? action.webhook.auth : undefined }; - var dataToWrite = action.webhook.body ? mustache.render(action.webhook.body, {payload: payload}) : action.webhook.params; + let dataToWrite = action.webhook.body ? mustache.render(action.webhook.body, {payload: payload}) : action.webhook.params; if (dataToWrite) { options.headers['Content-Length'] = Buffer.byteLength(dataToWrite); } @@ -487,9 +487,9 @@ export default function (server, actions, payload, task) { * } */ - var esMessage; - var esFormatter; if (_.has(action, 'elastic')) { + let esMessage; + let esFormatter; esFormatter = action.local.message ? action.local.message : '{{ payload }}'; esMessage = mustache.render(esFormatter, {payload: payload}); priority = action.local.priority ? action.local.priority : 'INFO'; @@ -515,6 +515,8 @@ export default function (server, actions, payload, task) { if (_.has(action, 'pushapps')) { const querystring = require('querystring'); const http = require('http'); + let options; + let req; options = { hostname: 'https://api.pushapps.mobi/v1',
7
diff --git a/ui/app/components/modals/account-details-modal.js b/ui/app/components/modals/account-details-modal.js @@ -61,7 +61,7 @@ AccountDetailsModal.prototype.render = function () { let exportPrivateKeyFeatureEnabled = true // This feature is disabled for hardware wallets - if (keyring.type.search('Hardware') !== -1) { + if (keyring && keyring.type.search('Hardware') !== -1) { exportPrivateKeyFeatureEnabled = false }
9
diff --git a/node-binance-api.js b/node-binance-api.js @@ -94,7 +94,7 @@ module.exports = function() { quantity: quantity }; if ( typeof flags.type !== "undefined" ) opt.type = flags.type; - if ( opt.type == "LIMIT" ) { + if ( opt.type.includes("LIMIT") ) { opt.price = price; opt.timeInForce = "GTC"; }
12
diff --git a/utils/pre-swap-checker/contracts/PreSwapChecker.sol b/utils/pre-swap-checker/contracts/PreSwapChecker.sol @@ -37,7 +37,7 @@ contract PreSwapChecker { bytes32 domainSeparator = Types.hashDomain(DOM_NAME, DOM_VERSION, swap); // max size of the number of errors that could exist - bytes32[] memory errors = new bytes32[](10); + bytes32[] memory errors = new bytes32[](14); uint8 errorCount; // Check self transfer @@ -166,7 +166,7 @@ contract PreSwapChecker { /** * @notice Checks for valid interfaces for * ERC165 tokens, ERC721 - * @param tokenAddress address address of potential ERC721 token + * @param tokenAddress address potential ERC721 token address * @return bool whether address has valid interface */ function hasValidERC71Interface(
3
diff --git a/src/components/AddressTypeahead.js b/src/components/AddressTypeahead.js @@ -89,7 +89,7 @@ class AddressTypeahead extends Component { region: Settings.get('country') }} // filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only cities - filterReverseGeocodingByTypes={['street_address']} /> + filterReverseGeocodingByTypes={[ 'street_address', 'route', 'geocode' ]} /> ); } }
11
diff --git a/packages/components/providers/baidu/BaiduMapTilingScheme.ts b/packages/components/providers/baidu/BaiduMapTilingScheme.ts @@ -22,12 +22,14 @@ class BaiduMapMercatorTilingScheme { this._projection.project = function (cartographic, result) { result = result || {} - if (options.toWGS84) { + if (options.projectionTransforms && options.projectionTransforms.from !== options.projectionTransforms.to) { + if (options.projectionTransforms.to.toUpperCase() === 'WGS84') { result = coordtransform.wgs84togcj02(CesiumMath.toDegrees(cartographic.longitude), CesiumMath.toDegrees(cartographic.latitude)) result = coordtransform.gcj02tobd09(result[0], result[1]) } else { result = coordtransform.gcj02tobd09(CesiumMath.toDegrees(cartographic.longitude), CesiumMath.toDegrees(cartographic.latitude)) } + } result[0] = Math.min(result[0], 180) result[0] = Math.max(result[0], -180) result[1] = Math.min(result[1], 74.000022) @@ -40,12 +42,14 @@ class BaiduMapMercatorTilingScheme { result = result || {} result = projection.mercatorToLngLat(new Point(cartographic.x, cartographic.y)) result[0] = ((result[0] + 180) % 360) - 180 - if (options.toWGS84) { + if (options.projectionTransforms && options.projectionTransforms.from !== options.projectionTransforms.to) { + if (options.projectionTransforms.to.toUpperCase() === 'WGS84') { result = coordtransform.bd09togcj02(result.lng, result.lat) result = coordtransform.gcj02towgs84(result[0], result[1]) } else { result = coordtransform.bd09togcj02(result.lng, result.lat) } + } return new Cartographic(Cesium.Math.toRadians(result[0]), Cesium.Math.toRadians(result[1])) }
1
diff --git a/tools/make/lib/benchmark/cpp.mk b/tools/make/lib/benchmark/cpp.mk @@ -11,6 +11,7 @@ benchmark-cpp: echo "Running benchmark: $$file"; \ cd `dirname $$file` && \ $(MAKE) clean && \ + CXX_COMPILER="$(CXX)" \ BOOST=$(DEPS_BOOST_BUILD_OUT) $(MAKE) && \ $(MAKE) run || exit 1; \ done @@ -28,6 +29,7 @@ benchmark-cpp-files: echo "Running benchmark: $$file"; \ cd `dirname $$file` && \ $(MAKE) clean && \ + CXX_COMPILER="$(CXX)" \ BOOST=$(DEPS_BOOST_BUILD_OUT) $(MAKE) && \ $(MAKE) run || exit 1; \ done
12
diff --git a/.travis.yml b/.travis.yml @@ -20,14 +20,14 @@ matrix: include: - os: linux language: node_js - node_js: "9" + node_js: "10.1.0" sudo: required language: generic - os: osx osx_image: xcode9.3 language: node_js - node_js: "9" + node_js: "10.1.0" env: - CSC_LINK=certs/mac.p12 - secure: "oZ3OGN4i7s4hENVOBB63XAmhFwN1aY8AnMHt+KrLQv8FMdGvPdUI0gXfcYZfV4mfT5BPoT5cnbdrxduV9cuj1nc/jB6F18hfBV4ftI8TXYnlOnJUbpOrpy6YNXC30mmL6P8fzEMHXfABTr8zrHy4IPBniVPWPGGDMw446ZikcL2uLwS2k90c6dT4WOY3uTeLt1eq9Nyi7t+e4VstHXEXFHz5lngVO4og4494ssPhFc0UajycnpH58PJU4UaZF8oc0ZHavUjbEgwb2oMirrDnS290KINFw27RoDAW75zdL0s/ujm9CEj34bGAH/NmrFeVGL/a/YFtLWZDKJRlfMlukug9SmMQEbAb6fvcst7n/K5bQ7oUcKGY3vC+N1UYnQzdxZ0o4XWWfUKmAox9eDItCV4ZXECq3HhrkrJMIBJ+4pZ0hA1ipULZ4gglO99MjktdH8inyDQ9WiM7Xz6lHQFVF98lFqUP0pnUIdSQIJOfwJ+QjnPHfSx4WWqn9nuZPoEqc6Ehp0UsG9EB8ZmcLrh2Q4tROrifmF6It3S2sKM79SB9m+d1/GUjANE4oS7txk+8Au9UY5/XsbreLQ3/GVEJasNSudm6MNYCT1TcB6aCWfT13BWhnTHix2nBMUpYDGSRzFTb/NH9d2gOl7R6VS+8FWcu69WE6wYKKyLyHB4LZHg="
12
diff --git a/src/core/Core.js b/src/core/Core.js @@ -144,19 +144,13 @@ class Uppy { } addFile (file) { + Utils.getFileType(file).then((fileType) => { const updatedFiles = Object.assign({}, this.state.files) - const fileName = file.name || 'noname' const fileExtension = Utils.getFileNameAndExtension(fileName)[1] const isRemote = file.isRemote || false const fileID = Utils.generateFileID(fileName) - - // const fileType = Utils.getFileType(file) - // const fileTypeGeneral = fileType[0] - // const fileTypeSpecific = fileType[1] - - Utils.getFileType(file).then((fileType) => { const fileTypeGeneral = fileType[0] const fileTypeSpecific = fileType[1]
5
diff --git a/articles/compliance/index.md b/articles/compliance/index.md --- title: Auth0 and General Data Protection Regulation description: How Auth0 complies with the EU's General Data Protection Regulation (GDPR) +classes: topic-page --- + <div class="topic-page-header"> <div data-name="example" class="topic-page-badge"></div> <h1>General Data Protection Regulation</h1>
0
diff --git a/articles/appliance/infrastructure/security.md b/articles/appliance/infrastructure/security.md @@ -91,8 +91,8 @@ Auth0 requires [remote access](/appliance/remote-access-options) to your PSaaS A ### Initial Configuration -Auth0's remote access method for initial configuration requires SSH access via Jumphost (the preferred method) or VPN. After the initial setup, please feel free to disable this connection. +Auth0's remote access method for initial configuration requires SSH access via Jumphost. After the initial setup, please feel free to disable this connection. ### Updates, Maintenance, and Troubleshooting -Typically, updates are performed via the Auth0 Dashboard. If Auth0 needs to remote in to identify and troubleshoot issues, an Auth0 Customer Success Engineer will need access to the PSaaS Appliance through SSH access via Jumphost (the preferred method) or over VPN. This connection can be enabled for and disabled after the agreed-upon time frames for work. \ No newline at end of file +Typically, updates are performed via the Auth0 Dashboard. If Auth0 needs to remote in to identify and troubleshoot issues, an Auth0 Customer Success Engineer will need access to the PSaaS Appliance through SSH access via Jumphost. This connection can be enabled for and disabled after the agreed-upon time frames for work.
2
diff --git a/tests/phpunit/integration/Core/Permissions/PermissionsTest.php b/tests/phpunit/integration/Core/Permissions/PermissionsTest.php @@ -236,11 +236,9 @@ class PermissionsTest extends TestCase { $this->assertFalse( user_can( $contributor, Permissions::VIEW_SHARED_DASHBOARD ) ); $dismissed_items = new Dismissed_Items( $contributor_user_options ); $dismissed_items->add( 'shared_dashboard_splash', 0 ); - $this->assertTrue( $dismissed_items->is_dismissed( 'shared_dashboard_splash' ) ); $this->assertTrue( user_can( $contributor, Permissions::VIEW_SHARED_DASHBOARD ) ); $dismissed_items = new Dismissed_Items( $author_user_options ); $dismissed_items->add( 'shared_dashboard_splash', 0 ); - $this->assertTrue( $dismissed_items->is_dismissed( 'shared_dashboard_splash' ) ); $this->assertFalse( user_can( $author, Permissions::VIEW_SHARED_DASHBOARD ) ); // Test user should have the sharedRole that is set for the module being checked
2
diff --git a/userscript.user.js b/userscript.user.js @@ -53936,7 +53936,7 @@ var $$IMU_EXPORT$$; do_update_setting(setting, value, meta); } - settings[setting] = new_value; + //settings[setting] = new_value; check_disabled_options(); show_warnings(); }); @@ -53995,7 +53995,7 @@ var $$IMU_EXPORT$$; savebutton.innerText = _("save"); savebutton.onclick = function() { do_update_setting(setting, textarea.value, meta); - settings[setting] = textarea.value; + //settings[setting] = textarea.value; }; sub_ta_td.appendChild(textarea); @@ -54107,7 +54107,7 @@ var $$IMU_EXPORT$$; if (recording_keys) { if (keysequence_valid(options_chord)) { do_update_setting(setting, options_chord, meta); - settings[setting] = options_chord; + //settings[setting] = options_chord; do_cancel(); } @@ -54262,6 +54262,16 @@ var $$IMU_EXPORT$$; document.body.appendChild(saved_el); } + function get_single_setting_raw(value) { + if (value instanceof Array) + return value[0]; + return value; + } + + function get_single_setting(setting) { + return get_single_setting_raw(settings[setting]); + } + function parse_value(value) { try { return JSON_parse(value); @@ -54333,6 +54343,7 @@ var $$IMU_EXPORT$$; if (value === settings[key]) return false; + value = deepcopy(value); settings[key] = value; if (is_extension) { @@ -54535,12 +54546,12 @@ var $$IMU_EXPORT$$; var settings_done = 0; var total_settings = Object.keys(settings).length + old_settings_keys.length; - var process_setting = function(setting) { - get_value(setting, function(value) { - settings_done++; - update_setting_from_host(setting, value); + var add_value_change_listeners = function(cb) { + if (typeof GM_addValueChangeListener === "undefined") { + return cb(); + } - if (typeof GM_addValueChangeListener !== "undefined") { + for (var setting in settings) { GM_addValueChangeListener(setting, function(name, oldValue, newValue, remote) { if (remote === false) return; @@ -54551,8 +54562,20 @@ var $$IMU_EXPORT$$; }); } + cb(); + }; + + var process_setting = function(setting) { + get_value(setting, function(value) { + settings_done++; + update_setting_from_host(setting, value); + if (settings_done >= total_settings) - upgrade_settings(start); + upgrade_settings(function(value) { + add_value_change_listeners(function() { + start(value); + }); + }); }); }; @@ -57586,16 +57609,6 @@ var $$IMU_EXPORT$$; return false; } - function get_single_setting_raw(value) { - if (value instanceof Array) - return value[0]; - return value; - } - - function get_single_setting(setting) { - return get_single_setting_raw(settings[setting]); - } - function get_close_behavior() { return get_single_setting("mouseover_close_behavior"); }
7
diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js @@ -1825,7 +1825,7 @@ describe('Test splom select:', function() { .then(done, done.fail); }); - it('should be able to select and then clear using API', function(done) { + it('@gl should be able to select and then clear using API', function(done) { function _assert(msg, exp) { return function() { var uid = gd._fullData[0].uid;
0
diff --git a/src/components/SidePane.jsx b/src/components/SidePane.jsx @@ -108,6 +108,7 @@ function File({ function dragOverHandler(e) { if (file.isFolder) { e.preventDefault(); + // e.stopPropagation(); e.currentTarget.classList.add('is-being-dragged-over'); e.currentTarget.style.outline = '1px dashed'; } @@ -119,6 +120,7 @@ function File({ } } function dropHandler(e) { + e.stopPropagation(); if (file.isFolder) { e.preventDefault(); onFileDrop(e.dataTransfer.getData('text/plain'), file); @@ -284,6 +286,18 @@ export class SidePane extends Component { fileBeingRenamed: file }); } + + dragOverHandler(e) { + e.preventDefault(); + } + dropHandler(e) { + e.preventDefault(); + this.props.onFileDrop(e.dataTransfer.getData('text/plain'), { + children: this.props.files + }); + // e.currentTarget.style.outline = null; + } + render() { const { files, onFileSelect, selectedFile, onRemoveFile } = this.props; const moreProps = { @@ -295,7 +309,11 @@ export class SidePane extends Component { }; return ( - <div class="sidebar"> + <div + class="sidebar" + onDragOver={this.dragOverHandler.bind(this)} + onDrop={this.dropHandler.bind(this)} + > <div class="flex jc-sb" style="padding: 5px 4px"> Files <div class="flex flex-v-center">
11
diff --git a/src/post/Write/PostEditor.js b/src/post/Write/PostEditor.js @@ -177,7 +177,15 @@ class PostEditor extends Component { } setRawContent(content) { - this.setState({ editorState: EditorState.createWithContent(convertFromRaw(content)) }); + // setTimeout is required as getDecorator are not immediately. + setTimeout(() => { + this.setState({ + editorState: EditorState.createWithContent( + convertFromRaw(content), + this.state.editorState.getDecorator() + ) + }); + }); } resetState() { @@ -188,7 +196,7 @@ class PostEditor extends Component { const selection = this.state.editorState.getSelection(); const newState = this.state.editorState; const hasSelectedText = !selection.isCollapsed(); - const selectionCoords = getSelectionCoords(this.editor, this.toolbar); + const selectionCoords = getSelectionCoords(this.editorContainer, this.toolbar); let shouldUpdateState = false; if (hasSelectedText && selectionCoords) { @@ -302,7 +310,7 @@ class PostEditor extends Component { user={this.props.user} /> - <div className={className} ref={(c) => { this.editor = c; }}> + <div className={className} ref={(c) => { this.editorContainer = c; }}> <Editor blockRendererFn={this.blockRendererFn} blockStyleFn={getBlockStyle}
1
diff --git a/packages/driver/src/cy/commands/actions/scroll.coffee b/packages/driver/src/cy/commands/actions/scroll.coffee @@ -221,7 +221,9 @@ module.exports = (Commands, Cypress, cy, state, config) -> $utils.throwErrByPath("scrollTo.invalid_target", {args: { x, y }}) if options.log - deltaOptions = $utils.filterOutOptions(options, {duration: 0, easing: 'swing'}) + deltaOptions = $utils.stringify( + $utils.filterOutOptions(options, {duration: 0, easing: 'swing'}) + ) messageArgs = [] if !position @@ -230,15 +232,23 @@ module.exports = (Commands, Cypress, cy, state, config) -> else messageArgs.push(position) if deltaOptions - messageArgs.push($utils.stringify(deltaOptions)) + messageArgs.push(deltaOptions) log = { message: messageArgs.join(', '), consoleProps: -> - obj = { ## merge into consoleProps without mutating it - "Scrolled Element": $dom.getElements(options.$el) - } + obj = {} + + if position + obj.Position = position + else + obj.X = x + obj.Y = y + if deltaOptions + obj.Options = deltaOptions + + obj["Scrolled Element"] = $dom.getElements(options.$el) return obj }
0
diff --git a/packages/bootstrap-chat/src/FormResponse.jsx b/packages/bootstrap-chat/src/FormResponse.jsx @@ -115,14 +115,6 @@ class FormResponse extends React.Component { {question} </Col> <Col sm={5}> - onKeyPress={(e) => { - console.log("Pressed"); - if (e.key === "Enter") { - tryMessageSend(); - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - } - }} <FormControl type="text" style={{ fontSize: "16px" }} @@ -135,6 +127,14 @@ class FormResponse extends React.Component { return { responses: new_res }; }); }} + onKeyPress={(e) => { + console.log("Pressed"); + if (e.key === "Enter") { + tryMessageSend(); + e.stopPropagation(); + e.nativeEvent.stopImmediatePropagation(); + } + }} /> </Col> </FormGroup>
5
diff --git a/__tests__/__helpers__/FixtureFS.js b/__tests__/__helpers__/FixtureFS.js @@ -2,6 +2,7 @@ const path = require('path') const _fs = require('fs') const pify = require('pify') const setTestTimeout = require('./set-test-timeout') +setTestTimeout(60000) const FixtureFS = async function () { // This is all in a conditional so that Jest won't attempt to @@ -32,7 +33,6 @@ const FixtureFS = async function () { const FixturePromise = FixtureFS() async function makeFixture (dir) { - setTestTimeout(60000) return process.browser ? makeBrowserFixture(dir) : makeNodeFixture(dir) }
12
diff --git a/src/modules/app/services/waves/node/content/Transactions.js b/src/modules/app/services/waves/node/content/Transactions.js return fetch(`${this.network.node}/transactions/unconfirmed`) .then((list) => list.filter((item) => item.recipient === address || item.sender === address)) - .then(Waves.tools.siftTransaction) + .then((list) => list.map(Waves.tools.siftTransaction)) + .then((list) => Promise.all(list)) .then((list = []) => list.map(this._pipeTransaction(true))); }
1
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -1264,7 +1264,7 @@ final class Analytics extends Module /** * Determines whether the given metric expression is for an AdSense metric. * - * @since n.e.x.t + * @since 1.8.0 * * @param string $metric Metric expression. * @return bool True if AdSense metric, false otherwise.
14
diff --git a/src/server/service/page.js b/src/server/service/page.js @@ -297,23 +297,35 @@ class PageService { .pipe(writeStream); } - async revertDeletedDescendants(pages, user, options = {}) { + async revertDeletedPages(pages, user, options = {}) { const Page = this.crowi.model('Page'); const pageCollection = mongoose.connection.collection('pages'); + const revisionCollection = mongoose.connection.collection('revisions'); + const removePageBulkOp = pageCollection.initializeUnorderedBulkOp(); - // const revertPageBulkOp = pageCollection.initializeUnorderedBulkOp(); + const revertPageBulkOp = pageCollection.initializeUnorderedBulkOp(); + const revertRevisionBulkOp = revisionCollection.initializeUnorderedBulkOp(); + pages.forEach((page) => { - // e.g. fromPath = /trash/test, toPath = /test - // const fromPath = page.path; + // e.g. page.path = /trash/test, toPath = /test const toPath = Page.getRevertDeletedPageName(page.path); - console.log(toPath); removePageBulkOp.find({ path: toPath, redirectTo: page.path }).remove(); - // this.revertDeletedPage(page, user, options); + revertPageBulkOp.find({ _id: page._id }).update({ $set: { path: toPath, status: STATUS_PUBLISHED, lastUpdateUser: user } }); + revertRevisionBulkOp.find({ path: page.path }).update({ $set: { path: toPath } }, { multi: true }); }); + try { await removePageBulkOp.execute(); + await revertPageBulkOp.execute(); + await revertRevisionBulkOp.execute(); + } + catch (err) { + if (err.code !== 11000) { + throw new Error('Failed to revert pages: ', err); + } + } } async revertDeletedPage(page, user, options = {}, isRecursively = false) { @@ -356,14 +368,14 @@ class PageService { .lean() .cursor(); - const revertDeletedDescendants = this.revertDeletedDescendants.bind(this); + const revertDeletedPages = this.revertDeletedPages.bind(this); let count = 0; const writeStream = new Writable({ objectMode: true, async write(batch, encoding, callback) { try { count += batch.length; - revertDeletedDescendants(batch); + revertDeletedPages(batch); logger.debug(`Reverting pages progressing: (count=${count})`); } catch (err) {
13
diff --git a/source/tab/launch.js b/source/tab/launch.js @@ -12,7 +12,13 @@ export function attachLaunchButton(input) { if (input.dataset.bcup === "attached" || itemIsIgnored(input)) { return; } - const { borderTopLeftRadius, borderBottomLeftRadius } = window.getComputedStyle(input, null); + const { + borderTopLeftRadius, + borderBottomLeftRadius, + boxSizing, + paddingLeft, + paddingRight + } = window.getComputedStyle(input, null); const tryToAttach = () => { const bounds = input.getBoundingClientRect(); const { width, height } = bounds; @@ -23,18 +29,23 @@ export function attachLaunchButton(input) { setTimeout(tryToAttach, 250); return; } + // Calculate button location + const inputLeftPadding = parseInt(paddingLeft, 10) || 0; + const inputRightPadding = parseInt(paddingRight, 10) || 0; const buttonWidth = 0.8 * height; - const newInputWidth = width - buttonWidth; - let left = input.offsetLeft + newInputWidth; + const calculateLeft = () => + input.offsetLeft + + width + + (boxSizing === "border-box" ? 0 - buttonWidth : inputLeftPadding - inputRightPadding); + let left = calculateLeft(); let top = input.offsetTop; const buttonZ = findBestZIndexInContainer(input.offsetParent); - // Update input style - updateOffsetParentPositioning(input.offsetParent); + // Input padding setStyle(input, { - width: `${newInputWidth}px`, - borderTopRightRadius: 0, - borderBottomRightRadius: 0 + paddingRight: `${inputRightPadding + buttonWidth}px` }); + // Update input style + updateOffsetParentPositioning(input.offsetParent); // Create and add button const button = el("button", { type: "button", @@ -68,7 +79,7 @@ export function attachLaunchButton(input) { }); const reprocessButton = () => { try { - left = input.offsetLeft + newInputWidth; + left = calculateLeft(); top = input.offsetTop; setStyle(button, { top: `${top}px`,
7
diff --git a/constants.js b/constants.js @@ -38,6 +38,7 @@ export const localstorageHost = 'https://localstorage.webaverse.com'; export const loginEndpoint = 'https://login.exokit.org'; export const tokensHost = `https://${chainName}all-tokens.webaverse.com`; export const landHost = `https://${chainName}sidechain-land.webaverse.com`; +export const aiHost = `https://ai.webaverse.com`; export const web3MainnetSidechainEndpoint = 'https://mainnetsidechain.exokit.org'; export const web3TestnetSidechainEndpoint = 'https://testnetsidechain.exokit.org'; export const homeScnUrl = 'https://webaverse.github.io/street/street.scn';
0
diff --git a/src/commands/Rooms/Create.js b/src/commands/Rooms/Create.js @@ -60,7 +60,7 @@ class Create extends Command { */ run(message) { const type = message.strippedContent.match(this.regex)[1]; - const optName = message.strippedContent.match(this.regex)[2].trim().replace(/[^\w|-]/ig, ''); + const optName = message.strippedContent.match(this.regex)[2]; this.bot.settings.getChannelSetting(message.channel, 'createPrivateChannel') .then((createPrivateChannelAllowed) => { if (createPrivateChannelAllowed && type) {
2
diff --git a/server/game/cards/08-MotC/WinterCourtHosts.js b/server/game/cards/08-MotC/WinterCourtHosts.js @@ -4,7 +4,7 @@ const AbilityDsl = require('../../abilitydsl.js'); class WinterCourtHosts extends DrawCard { setupCardAbilities() { this.reaction({ - title: 'Draw a card.', + title: 'Draw a card', limit: AbilityDsl.limit.unlimitedPerConflict(), when: { onCardPlayed: (event, context) => {
2
diff --git a/assets/js/feature-tours/index.js b/assets/js/feature-tours/index.js @@ -40,7 +40,7 @@ const allTrafficWidget = { slug: 'allTrafficWidget', contexts: [ VIEW_CONTEXT_DASHBOARD, VIEW_CONTEXT_DASHBOARD_VIEW_ONLY ], version: '1.25.0', - gaEventCategory: `${ VIEW_CONTEXT_DASHBOARD }_all-traffic-widget`, + gaEventCategory: ( viewContext ) => `${ viewContext }_all-traffic-widget`, checkRequirements: async ( registry ) => { // Here we need to wait for the underlying selector to be resolved before selecting `isModuleConnected`. await registry.__experimentalResolveSelect( CORE_MODULES ).getModules();
2
diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js @@ -44,7 +44,13 @@ class ContractDeployer { } let contractName = arg.substr(1); self.events.request('contracts:contract', contractName, (referedContract) => { - cb(null, referedContract.deployedAddress); + if(referedContract.deployedAddress !== undefined) { + return cb(null, referedContract.deployedAddress); + } + + // Because we're referring to a contract that is not being deployed (ie. an interface), + // we still need to provide a valid address so that the ABI checker won't fail. + cb(null, '0x0000000000000000000000000000000000000000'); }); }
9
diff --git a/app-template/bitcoincom/appConfig.json b/app-template/bitcoincom/appConfig.json "windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c", "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", - "version": "5.2.0", - "fullVersion": "5.2-rc1", + "version": "5.2.1", + "fullVersion": "5.2-hotfix1", "androidVersion": "502000", "_extraCSS": "", "_enabledExtensions": {
3
diff --git a/contracts/EtherNomin.sol b/contracts/EtherNomin.sol @@ -123,21 +123,21 @@ contract EtherNomin is ExternStateProxyFeeToken { function EtherNomin(address _havven, address _oracle, address _beneficiary, - uint initialEtherPrice, - address _owner, TokenState initialState) + uint _initialEtherPrice, + address _owner, TokenState _initialState) ExternStateProxyFeeToken("Ether-Backed USD Nomins", "eUSD", 15 * UNIT / 10000, // nomin transfers incur a 15 bp fee _havven, // the havven contract is the fee authority - initialState, + _initialState, _owner) public { oracle = _oracle; beneficiary = _beneficiary; - etherPrice = initialEtherPrice; + etherPrice = _initialEtherPrice; lastPriceUpdateTime = now; - emit PriceUpdated(etherPrice); + emit PriceUpdated(_initialEtherPrice); // It should not be possible to transfer to the nomin contract itself. frozen[this] = true; @@ -200,13 +200,13 @@ contract EtherNomin is ExternStateProxyFeeToken { /* Return the equivalent fiat value of the given quantity * of ether at the current price. * Reverts if the price is stale. */ - function fiatValue(uint eth) + function fiatValue(uint etherWei) public view priceNotStale returns (uint) { - return safeMul_dec(eth, etherPrice); + return safeMul_dec(etherWei, etherPrice); } /* Return the current fiat value of the contract's balance. @@ -653,9 +653,9 @@ contract EtherNomin is ExternStateProxyFeeToken { event PoolDiminished(uint nominsDestroyed); - event Purchased(address buyer, address indexed buyerIndex, uint nomins, uint eth); + event Purchased(address buyer, address indexed buyerIndex, uint nomins, uint etherWei); - event Sold(address seller, address indexed sellerIndex, uint nomins, uint eth); + event Sold(address seller, address indexed sellerIndex, uint nomins, uint etherWei); event PriceUpdated(uint newPrice);
10
diff --git a/src/components/fields/derived.js b/src/components/fields/derived.js @@ -305,7 +305,7 @@ export const NumericReciprocal = connectToContainer(UnconnectedNumeric, { const {fullValue, updatePlot} = plotProps; if (isNumeric(fullValue)) { - plotProps.fullValue = Math.round(1 / fullValue); + plotProps.fullValue = 1 / fullValue; } plotProps.updatePlot = v => { @@ -316,7 +316,7 @@ export const NumericReciprocal = connectToContainer(UnconnectedNumeric, { } }; - plotProps.min = 1; + plotProps.min = 0; }, });
11
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.8.3 (unreleased) -### Breaking - -### Feature - ### Bugfix - Change ImageGallery image scale from preview to large. @tisto - Also use `settings.internalApiPath` in url helpers `isInternalURL`, `flattenToAppUrl` and `flattenHTMLToAppURL` @tiberiuichim -- Fix getBlocks helper when blocks_layout has no `items` (default PloneSite with no volto homepage) +- Fix getBlocks helper when blocks_layout has no `items` (default PloneSite with no volto homepage) @avoinea ### Internal
6
diff --git a/package.json b/package.json "compile": "lerna run compile", "hint": "yarn solhint \"./contracts/**/*.sol\"", "lint": "yarn eslint \"./**/test/**/*.js\" \"./packages/**/*.js\"", - "ganache": "ganache-cli -p 8545 --gasLimit 0xfffffffffff", + "ganache": "ganache-cli -d -p 8545 --gasLimit 0xfffffffffff --time '2019-02-15T15:53:00+00:00'", "publish": "lerna publish", "test": "yarn clean && lerna run test" },
12
diff --git a/src/components/FindWallet/WalletTable.tsx b/src/components/FindWallet/WalletTable.tsx @@ -700,10 +700,16 @@ const WalletTable = ({ data, filters, walletData }) => { <Container> <WalletContentHeader> <th> + {filteredWallets.length === walletCardData.length ? ( <p> - <strong>Showing {filteredWallets.length} wallets</strong> out of{" "} - {walletCardData.length} + <strong>Showing all wallets</strong> </p> + ) : ( + <p> + <strong>Showing {filteredWallets.length}</strong> of{" "} + {walletCardData.length} wallets + </p> + )} </th> <th> <StyledSelect
7
diff --git a/src/client/js/components/PageEditor/CodeMirrorEditor.js b/src/client/js/components/PageEditor/CodeMirrorEditor.js @@ -548,36 +548,71 @@ export default class CodeMirrorEditor extends AbstractEditor { ); } + /** + * return a function to replace a selected range with prefix + selection + suffix + * + * The cursor after replacing is inserted between the selection and the suffix. + */ createReplaceSelectionHandler(prefix, suffix) { return () => { - const selection = this.getCodeMirror().getDoc().getSelection(); - this.getCodeMirror().getDoc().replaceSelection(prefix + selection + suffix); + const cm = this.getCodeMirror(); + const selection = cm.getDoc().getSelection(); + const curStartPos = cm.getCursor('from'); + const curEndPos = cm.getCursor('to'); + + const curPosAfterReplacing = {}; + curPosAfterReplacing.line = curEndPos.line; + if (curStartPos.line === curEndPos.line) { + curPosAfterReplacing.ch = curEndPos.ch + prefix.length; + } + else { + curPosAfterReplacing.ch = curEndPos.ch; + } + + cm.getDoc().replaceSelection(prefix + selection + suffix); + cm.setCursor(curPosAfterReplacing); + cm.focus(); }; } + /** + * return a function to add prefix to selected each lines + * + * The cursor after editing is inserted between the end of the selection. + */ createAddPrefixToEachLinesHandler(prefix) { return () => { - const startLineNum = this.getCodeMirror().getCursor('from').line; - const endLineNum = this.getCodeMirror().getCursor('to').line; + const cm = this.getCodeMirror(); + const startLineNum = cm.getCursor('from').line; + const endLineNum = cm.getCursor('to').line; const lines = []; for (let i = startLineNum; i <= endLineNum; i++) { - lines.push(prefix + this.getCodeMirror().getDoc().getLine(i)); + lines.push(prefix + cm.getDoc().getLine(i)); } - const replacement = lines.join('\n') + '\n'; - this.getCodeMirror().getDoc().replaceRange(replacement, {line: startLineNum, ch: 0}, {line: endLineNum + 1, ch: 0}); + cm.getDoc().replaceRange(replacement, {line: startLineNum, ch: 0}, {line: endLineNum + 1, ch: 0}); + + cm.setCursor(endLineNum, cm.getDoc().getLine(endLineNum).length); + cm.focus(); }; } + /** + * make a selected line a header + * + * The cursor after editing is inserted between the end of the line. + */ makeHeaderHandler() { - const lineNum = this.getCodeMirror().getCursor('from').line; - const line = this.getCodeMirror().getDoc().getLine(lineNum); + const cm = this.getCodeMirror(); + const lineNum = cm.getCursor('from').line; + const line = cm.getDoc().getLine(lineNum); let prefix = '#'; if (!line.startsWith('#')) { prefix += ' '; } - this.getCodeMirror().getDoc().replaceRange(prefix, {line: lineNum, ch: 0}, {line: lineNum, ch: 0}); + cm.getDoc().replaceRange(prefix, {line: lineNum, ch: 0}, {line: lineNum, ch: 0}); + cm.focus(); } showHandsonTableHandler() { @@ -589,7 +624,7 @@ export default class CodeMirrorEditor extends AbstractEditor { <Button key='nav-item-bold' bsSize="small" onClick={ this.createReplaceSelectionHandler('**', '**') }><i className={'fa fa-bold'}></i></Button>, <Button key='nav-item-italic' bsSize="small" onClick={ this.createReplaceSelectionHandler('*', '*') }><i className={'fa fa-italic'}></i></Button>, <Button key='nav-item-strikethough' bsSize="small" onClick={ this.createReplaceSelectionHandler('~~', '~~') }><i className={'fa fa-strikethrough'}></i></Button>, - <Button key='nav-item-header' bsSize="small" onClick={ this.makeHeaderHandler }>H</Button>, + <Button key='nav-item-header' bsSize="small" onClick={ this.makeHeaderHandler }><i className={'fa fa-header'}></i></Button>, <Button key='nav-item-code' bsSize="small" onClick={ this.createReplaceSelectionHandler('`', '`') }><i className={'fa fa-code'}></i></Button>, <Button key='nav-item-quote' bsSize="small" onClick={ this.createAddPrefixToEachLinesHandler('> ') }><i className={'fa fa-quote-right'}></i></Button>, <Button key='nav-item-ul' bsSize="small" onClick={ this.createAddPrefixToEachLinesHandler('- ') }><i className={'fa fa-list'}></i></Button>,
12
diff --git a/src/web/widgets/Axes/MDIPanel.jsx b/src/web/widgets/Axes/MDIPanel.jsx @@ -33,8 +33,8 @@ class MDIPanel extends PureComponent { disabled={!canClick} content={( <div className="text-left"> - {c.command.split('\n').map(line => ( - <div>{line}</div> + {c.command.split('\n').map((line, index) => ( + <div key={`${c.id}_${index + 1}`}>{line}</div> ))} </div> )}
1
diff --git a/docs/README.md b/docs/README.md @@ -16,7 +16,7 @@ Check out the list of [Integrations and Usages of Mermaid](./integrations.md) **Mermaid was nominated and won the JS Open Source Awards (2019) in the category "The most exciting use of technology"!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.** -# New [Configuration Protocols in version 8.6.0](https://github.com/NeilCuzon/mermaid/edit/develop/docs/8.6.0_docs.md) +# New [Configuration Protocols in version 8.6.0](https://mermaid-js.github.io/mermaid/#/8.6.0_docs) ## New diagrams in 8.5
1
diff --git a/src/embedding-utils.js b/src/embedding-utils.js @@ -2,11 +2,15 @@ import ReporterPluginHost from './reporter/plugin-host'; import TestRunErrorFormattableAdapter from './errors/test-run/formattable-adapter'; import * as testRunErrors from './errors/test-run'; import TestRun from './test-run'; +import COMMAND_TYPE from './test-run/commands/type'; +import Assignable from './utils/assignable'; export default { TestRunErrorFormattableAdapter, TestRun, testRunErrors, + COMMAND_TYPE, + Assignable, buildReporterPlugin (pluginFactory, outStream) { var plugin = pluginFactory();
0
diff --git a/view/adminhtml/web/vue/app.vue b/view/adminhtml/web/vue/app.vue @@ -82,6 +82,7 @@ define(["Vue"], function(Vue) { 'type': 'category', 'title': this.config.translation.addNode, "id": new Date().getTime(), + "content": null, "columns": [] }); }
1
diff --git a/commands/rsstest.js b/commands/rsstest.js @@ -18,7 +18,7 @@ module.exports = async (bot, message, command) => { const { rssName } = data const source = guildRss.sources[rssName] const grabMsg = await message.channel.send(`Grabbing a random feed article...`) - const article = FeedFetcher.fetchRandomArticle(source.link) + const article = await FeedFetcher.fetchRandomArticle(source.link) article._delivery = { rssName, channelId: message.channel.id,
1
diff --git a/assets/js/components/button.js b/assets/js/components/button.js @@ -56,6 +56,7 @@ class Button extends Component { ariaHaspopup, ariaExpanded, ariaControls, + ...extraProps } = this.props; // Use a button if disabled, even if a href is provided to ensure expected behavior. @@ -81,6 +82,7 @@ class Button extends Component { aria-expanded={ ariaExpanded } aria-controls={ ariaControls } role={ 'a' === SemanticButton ? 'button' : undefined } + { ...extraProps } > { icon } <span className="mdc-button__label">{ children }</span>
11
diff --git a/src/prerenderContent/prerenderObj.js b/src/prerenderContent/prerenderObj.js import * as React from "react"; import * as ReactDOMServer from "react-dom/server"; import * as Scrivito from "scrivito"; -import Helmet from "react-helmet"; +import { HelmetProvider } from "react-helmet-async"; + import App, { helmetContext } from "../App"; import filenameFromUrl from "./filenameFromUrl"; import generateHtml from "./generateHtml"; import generatePreloadDump from "./generatePreloadDump"; export default async function prerenderObj(obj) { - // Tell helmet to pretend to run on a node server, not in a browser - // See https://github.com/nfl/react-helmet/issues/310 for details - Helmet.canUseDOM = false; + HelmetProvider.canUseDOM = false; const { result, preloadDump } = await Scrivito.renderPage(obj, () => { const bodyContent = ReactDOMServer.renderToString(<App />);
14
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1226,7 +1226,7 @@ const itemSpecs3 = [ "name": "dragon-fly", "start_url": "https://avaer.github.io/dragon-fly/manifest.json" }, - /* { + { "name": "pistol", "start_url": "https://avaer.github.io/pistol/manifest.json" }, @@ -1237,7 +1237,15 @@ const itemSpecs3 = [ { "name": "pickaxe", "start_url": "https://avaer.github.io/pickaxe/manifest.json" - }, */ + }, + { + "name": "hoverboard", + "start_url": "https://avaer.github.io/hoverboard/manifest.json" + }, + { + "name": "hovercraft", + "start_url": "https://avaer.github.io/hovercraft/manifest.json" + }, { "name": "cityscape", "start_url": "https://raw.githubusercontent.com/metavly/cityscape/master/manifest.json"
0
diff --git a/osdCamicroscope_Lymph.php b/osdCamicroscope_Lymph.php @@ -57,6 +57,7 @@ include 'shared/osdHeader.php'; $string = file_get_contents("customized/lymph/markup_types.json"); $json_data = json_decode($string, true); $a = 'NA'; + $selected_idx = 1; foreach ($json_data as $key1 => $value1) { $load_caption = $json_data[$key1]["caption"]; $load_dbname = $json_data[$key1]["DBName"]; @@ -65,9 +66,15 @@ include 'shared/osdHeader.php'; $load_lineaffect = $json_data[$key1]["lineaffect"]; - echo '<input type="radio" name="marktype" value="' . $load_dbname . '" id="' . $load_dbname . '" class="radio_markup" ' . 'color="' . $load_color . '" linewidth=' . $load_linewidth . ' lineaffect=' . $load_lineaffect . '>'; echo '<input type="checkbox" name="markvisualized" id="' . $load_dbname . '_visualized' . '" checked>'; - $temp = '<label for="abc" class=radio_markup> ' . $load_caption . '</label><br>'; + if ($selected_idx == 1) { + echo '<input type="radio" name="marktype" value="' . $load_dbname . '" id="' . $load_dbname . '" class="radio_markup" ' . 'color="' . $load_color . '" linewidth=' . $load_linewidth . ' lineaffect=' . $load_lineaffect . ' checked>'; + } else { + echo '<input type="radio" name="marktype" value="' . $load_dbname . '" id="' . $load_dbname . '" class="radio_markup" ' . 'color="' . $load_color . '" linewidth=' . $load_linewidth . ' lineaffect=' . $load_lineaffect . '>'; + } + $selected_idx = $selected_idx + 1; + //$temp = '<label for="abc" class=radio_markup> ' . $load_caption . '</label><br>'; + $temp = '<label class=radio_markup> ' . $load_caption . '</label><br>'; echo $temp; } ?>
12
diff --git a/src/constants/parade-coordinates.js b/src/constants/parade-coordinates.js @@ -20,7 +20,7 @@ export const terminals = [ }, { key: "finish", - coordinates: { longitude: -0.1265, latitude: 51.50499 }, + coordinates: { longitude: -0.12664, latitude: 51.50497 }, text: { text: "B", type: "xSmall", color: "whiteColor" }, style: terminalStyle } @@ -155,8 +155,7 @@ export const route = [ { longitude: -0.12692, latitude: 51.5056 }, { longitude: -0.1268, latitude: 51.50534 }, { longitude: -0.12672, latitude: 51.50517 }, - { longitude: -0.12664, latitude: 51.50497 }, - { longitude: -0.1265, latitude: 51.50499 } + { longitude: -0.12664, latitude: 51.50497 } ]; export type Terminals = {
2
diff --git a/articles/overview/apis.md b/articles/overview/apis.md @@ -13,7 +13,7 @@ crews: crew-2 An API is an entity that represents an external resource, capable of accepting and responding to protected resource requests made by clients. At the [OAuth2 spec](https://tools.ietf.org/html/rfc6749) an API maps to the **Resource Server**. -When a client wants to access an API's protected resources it must provide an access token. The same access token can be used to access the API's resources without having to authenticate again, until it expires. +When a client wants to access an API's protected resources it must provide an [access token](/tokens/access-token). The same access token can be used to access the API's resources without having to authenticate again, until it expires. Each API has a set of defined permissions. Clients can request a subset of those defined permissions when they execute the authorization flow, and include them in the access token as part of the **scope** request parameter.
0
diff --git a/assets/js/modules/analytics-4/utils/banner-dismissal-expiry.js b/assets/js/modules/analytics-4/utils/banner-dismissal-expiry.js * Internal dependencies */ import { getTimeInSeconds } from '../../../util/index'; +import { stringToDate } from '../../../util/date-range/string-to-date'; /** * Gets the time in seconds to expire a dismissal of the GA4 Activation Banner. @@ -30,17 +31,17 @@ import { getTimeInSeconds } from '../../../util/index'; * @return {number} Time in seconds for a dismissal to expire. */ export function getBannerDismissalExpiryTime( referenceDateString ) { - const referenceDate = new Date( referenceDateString ); + const referenceDate = stringToDate( referenceDateString ); // If dismissed before May 2023, show the banner again after 30 days. - if ( referenceDate < new Date( '2023-05-01' ) ) { + if ( referenceDate < stringToDate( '2023-05-01' ) ) { return getTimeInSeconds( 'month' ); } // If dismissed in May 2023, show the banner again in June 2023. if ( - new Date( '2023-05-01' ) <= referenceDate && - referenceDate < new Date( '2023-06-01' ) + stringToDate( '2023-05-01' ) <= referenceDate && + referenceDate < stringToDate( '2023-06-01' ) ) { return Math.max( 31 * getTimeInSeconds( 'day' ) -
14
diff --git a/src/components/common/buttons/CustomButton.js b/src/components/common/buttons/CustomButton.js // @flow import React from 'react' -import { StyleSheet, View } from 'react-native' -import { Button as BaseButton, DefaultTheme, Text, withTheme } from 'react-native-paper' -import normalize from 'react-native-elements/src/helpers/normalizeText' +import { View } from 'react-native' +import { Button as BaseButton, DefaultTheme, Text } from 'react-native-paper' +import { withStyles } from '../../../lib/styles' import Icon from '../view/Icon' type IconFunction = (string, number) => React.Node @@ -21,15 +21,39 @@ export type ButtonProps = { icon?: string | IconFunction, iconAlignment?: string, iconSize?: number, + styles?: any, } type TextContentProps = { children: any, dark?: boolean, uppercase?: boolean, + styles: any, } -const TextContent = ({ children, dark, uppercase }: TextContentProps) => { +const mapPropsToStyles = ({ theme }) => ({ + button: { + justifyContent: 'center', + borderColor: theme.colors.primary, + }, + buttonWrapperText: { + minHeight: 28, + justifyContent: 'center', + }, + leftIcon: { + marginRight: theme.sizes.default, + }, + rightIcon: { + marginLeft: theme.sizes.default, + }, + buttonText: { + fontWeight: 'bold', + lineHeight: 0, + paddingTop: 1, + }, +}) + +const TextContent = withStyles(mapPropsToStyles)(({ children, dark, uppercase, styles }: TextContentProps) => { if (typeof children === 'string') { return ( <View style={styles.buttonWrapperText}> @@ -43,7 +67,7 @@ const TextContent = ({ children, dark, uppercase }: TextContentProps) => { } return children -} +}) type IconButtonProps = { theme: DefaultTheme, @@ -77,7 +101,7 @@ const IconButton = ({ theme, dark, icon, size, style }: IconButtonProps) => { * @returns {React.Node} */ const CustomButton = (props: ButtonProps) => { - const { theme, mode, style, children, icon, iconAlignment, iconSize, ...buttonProps } = props + const { theme, mode, style, children, icon, iconAlignment, iconSize, styles, ...buttonProps } = props const disabled = props.loading || props.disabled const dark = mode === 'contained' const uppercase = mode !== 'text' @@ -110,20 +134,4 @@ CustomButton.defaultProps = { mode: 'contained', } -const styles = StyleSheet.create({ - button: { - justifyContent: 'center', - }, - buttonWrapperText: { - minHeight: 28, - justifyContent: 'center', - }, - leftIcon: { - marginRight: normalize(8), - }, - rightIcon: { - marginLeft: normalize(8), - }, -}) - -export default withTheme(CustomButton) +export default withStyles(mapPropsToStyles)(CustomButton)
3
diff --git a/src/js/Nostr.ts b/src/js/Nostr.ts @@ -381,7 +381,9 @@ export default { }, publish: async function (event: any) { if (!event.sig) { - event.tags = event.tags || []; + if (!event.tags) { + event.tags = []; + } event.content = event.content || ''; event.created_at = event.created_at || Math.floor(Date.now() / 1000); event.pubkey = iris.session.getKey().secp256k1.rpub; @@ -989,6 +991,16 @@ export default { this.keyValueEvents.set(key, event); } }, + handleNoteOrBoost(event: Event) { + const mentionIndex = event.tags.findIndex( + (tag) => tag[0] === 'e' && tag[3] === 'mention', + ); + if (event.content === `#[${mentionIndex}]`) { + this.handleBoost(event); + } else { + this.handleNote(event); + } + }, handleEvent(event: Event) { if (!event) return; if (this.eventsById.has(event.id)) { @@ -1015,7 +1027,7 @@ export default { break; case 1: this.maybeAddNotification(event); - this.handleNote(event); + this.handleNoteOrBoost(event); break; case 4: this.handleDirectMessage(event);
9
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,16 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.42.3] -- 2018-11-06 + +### Fixed +- Fix `histogram` binning for typed array inputs (bug introduced in 1.42.0) [#3211] +- Fix textfont color `restyle` calls for `pie` traces [#3214] +- Fix textfont color `editType` for `bar` traces [#3214] +- Fix array `hoverinfo` support for `ohlc` and `candelestick` [#3213] +- Correctly list `parcats` hoverinfo attributes which does not support array inputs [#3213] + + ## [1.42.2] -- 2018-11-01 ### Fixed
3
diff --git a/tests/e2e/config/bootstrap.js b/tests/e2e/config/bootstrap.js @@ -42,6 +42,7 @@ const OBSERVED_CONSOLE_MESSAGE_TYPES = { warning: 'warn', error: 'error', log: 'log', + info: 'log', }; /** @@ -129,7 +130,9 @@ function observeConsoleLogging() { // See: https://core.trac.wordpress.org/ticket/47183 if ( text.startsWith( 'Failed to decode downloaded font:' ) || - text.startsWith( 'OTS parsing error:' ) + text.startsWith( 'OTS parsing error:' ) || + text.includes( 'Download the React DevTools for a better development experience' ) || + text.includes( 'https://fb.me/react-unsafe-component-lifecycles' ) ) { return; }
8
diff --git a/articles/api/management/v2/tokens-flows.md b/articles/api/management/v2/tokens-flows.md @@ -52,7 +52,9 @@ Furthermore, you can generate a token using [JWT.io](https://jwt.io/): - Use the [JWT.io Debugger](https://jwt.io/#debugger-io) to manually type the claims and generate a token. - Use one of the [JWT.io libraries](https://jwt.io/#libraries-io). -<div class="alert alert-danger">Long-lived tokens compromise your security. Following this process is <strong>NOT</strong> recommended.</div> +::: warning +Long-lived tokens compromise your security. Following this process is <strong>NOT</strong> recommended. +::: ### Use the JWT.io Debugger
14
diff --git a/src/components/Mosaic.js b/src/components/Mosaic.js @@ -4,8 +4,8 @@ import { mx } from '../theme' import { range, shuffle } from 'lodash' const Base = Box.extend` - display: grid; - grid-template-columns: repeat(4, 1fr); + display: flex; + flex-flow: row wrap; justify-content: center; align-items: center; @@ -13,12 +13,17 @@ const Base = Box.extend` background-position: center; background-repeat: no-repeat; background-size: cover; + margin: 0; height: 4rem; + width: 100%; + max-width: 25%; } ${mx[1]} { - grid-template-columns: repeat(8, 1fr); - div { height: 6rem; } + div { + max-width: 12.5%; + height: 6rem; + } } `
14