code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/os/ui/text/tuieditor.js b/src/os/ui/text/tuieditor.js @@ -466,6 +466,13 @@ os.ui.text.TuiEditorCtrl.prototype.setTargetBlankPropertyInLinks = function() {
* Codemirror has the same issues that it did in simpleMDE with initalization.
* Codemirror issue #798. when its put in a textarea with display none it needs a refresh
* After Codemirror is added, call refresh on it
+ *
+ * Another issue: this broke at some point. The line that reads codeMirror['0'].innerText != 'xxxxxxxxxx'
+ * had codeMirror.length instead. Turns out codeMirror.length is always defined no matter what.
+ * But it will say 'xxxxxxxxxx' for innerText unless it is actually loaded.
+ * Note that for some reason this issue is speed sensitive.
+ * This is some borked thing deep in CodeMirror that is screwing things up.
+ *
* Commented on tuieditor issue #191
* @private
*/
@@ -473,7 +480,8 @@ os.ui.text.TuiEditorCtrl.prototype.fixCodemirrorInit_ = function() {
if (this.element) {
this.cmFixAttempt_ = this.cmFixAttempt_ ? this.cmFixAttempt_ + 1 : 1;
var codeMirror = this.element.find('.te-md-container .CodeMirror');
- if (this['tuiEditor'] && codeMirror.length) {
+ if (codeMirror.length) {
+ if (this['tuiEditor'] && codeMirror['0'].innerText != 'xxxxxxxxxx') {
this.timeout_(function() {
this['tuiEditor'].mdEditor.cm.refresh();
}.bind(this));
@@ -481,6 +489,7 @@ os.ui.text.TuiEditorCtrl.prototype.fixCodemirrorInit_ = function() {
goog.Timer.callOnce(this.fixCodemirrorInit_, 250, this);
}
}
+ }
};
| 1 |
diff --git a/package.json b/package.json "homepage": "https://react.lightningdesignsystem.com",
"dependencies": {
"airbnb-prop-types": "^2.5.3",
- "babel-preset-stage-1": "^6.5.0",
+ "babel-preset-stage-1": "^6.22.0",
"classnames": "^2.1.3",
"lodash.assign": "^4.0.9",
"lodash.compact": "^3.0.0",
"@salesforce-ux/design-system": "git+ssh://[email protected]/salesforce-ux/design-system-internal.git#v2.4.0-alpha.1-dist",
"@salesforce-ux/icons": "7.x",
"async": "^2.0.0-rc.5",
- "babel": "^6.5.2",
- "babel-cli": "^6.9.0",
- "babel-core": "^6.9.0",
- "babel-loader": "^6.2.2",
+ "babel-cli": "^6.24.1",
+ "babel-core": "^6.24.0",
+ "babel-loader": "^6.4.1",
"babel-plugin-import-noop": "^1.0.1",
"babel-plugin-istanbul": "^4.1.4",
- "babel-plugin-root-import": "^5.0.0",
+ "babel-plugin-root-import": "^5.1.0",
"babel-plugin-transform-class-properties": "^6.24.1",
- "babel-plugin-transform-es2015-modules-amd": "^6.8.0",
- "babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
- "babel-preset-es2015": "^6.9.0",
- "babel-preset-react": "^6.5.0",
- "babel-preset-stage-1": "^6.5.0",
+ "babel-plugin-transform-es2015-modules-amd": "^6.24.0",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.24.0",
+ "babel-preset-env": "^1.5.2",
+ "babel-preset-es2015": "^6.24.0",
+ "babel-preset-react": "^6.23.0",
+ "babel-preset-stage-1": "^6.22.0",
"basic-auth": "^1.0.4",
"chai": "^4.0.1",
"chai-enzyme": "^0.6.1",
| 3 |
diff --git a/test/functional/specs/C2580.js b/test/functional/specs/C2580.js @@ -48,8 +48,7 @@ test("C2580: Command queueing test.", async () => {
await getLibraryInfoCommand();
await t.expect(getAlloyCommandQueueLength()).eql(2);
const alloyLibrary = fs.readFileSync("dist/standalone/alloy.js", "utf-8");
- const logger = createConsoleLogger(t, "log");
+ const logger = await createConsoleLogger();
await injectScript(alloyLibrary);
- const newMessages = await logger.getNewMessages();
- await t.expect(newMessages).match(/Executing getLibraryInfo command/);
+ await logger.log.expectMessageMatching(/Executing getLibraryInfo command/);
});
| 3 |
diff --git a/types/index.d.ts b/types/index.d.ts @@ -86,7 +86,7 @@ declare class Infobox {
get(keys: string | string[]): Sentence | undefined | unknown
image(): Image | null
images: () => Image | null
- json(options: object): object
+ json(options?: object): object
keyValue(): object
links(clue?: string): Link[]
template: () => string
| 1 |
diff --git a/src/traces/contourcarpet/calc.js b/src/traces/contourcarpet/calc.js @@ -126,18 +126,15 @@ function heatmappishCalc(gd, trace) {
// prepare the raw data
// run makeCalcdata on x and y even for heatmaps, in case of category mappings
var carpet = trace.carpetTrace;
- var aax = carpet.aaxis,
- bax = carpet.baxis,
- isContour = Registry.traceIs(trace, 'contour'),
- zsmooth = isContour ? 'best' : trace.zsmooth,
- a,
+ var aax = carpet.aaxis;
+ var bax = carpet.baxis;
+ var a,
a0,
da,
b,
b0,
db,
- z,
- i;
+ z;
// cancel minimum tick spacings (only applies to bars and boxes)
aax._minDtick = 0;
@@ -157,40 +154,6 @@ function heatmappishCalc(gd, trace) {
trace._emptypoints = findEmpties(z);
trace._interpz = interp2d(z, trace._emptypoints, trace._interpz);
- function noZsmooth(msg) {
- zsmooth = trace._input.zsmooth = trace.zsmooth = false;
- Lib.notifier('cannot fast-zsmooth: ' + msg);
- }
-
- // check whether we really can smooth (ie all boxes are about the same size)
- if(zsmooth === 'fast') {
- if(aax.type === 'log' || bax.type === 'log') {
- noZsmooth('log axis found');
- }
- else {
- if(a.length) {
- var avgda = (a[a.length - 1] - a[0]) / (a.length - 1),
- maxErrX = Math.abs(avgda / 100);
- for(i = 0; i < a.length - 1; i++) {
- if(Math.abs(a[i + 1] - a[i] - avgda) > maxErrX) {
- noZsmooth('a scale is not linear');
- break;
- }
- }
- }
- if(b.length && zsmooth === 'fast') {
- var avgdy = (b[b.length - 1] - b[0]) / (b.length - 1),
- maxErrY = Math.abs(avgdy / 100);
- for(i = 0; i < b.length - 1; i++) {
- if(Math.abs(b[i + 1] - b[i] - avgdy) > maxErrY) {
- noZsmooth('b scale is not linear');
- break;
- }
- }
- }
- }
- }
-
// create arrays of brick boundaries, to be used by autorange and heatmap.plot
var xlen = maxRowLength(z),
xIn = trace.xtype === 'scaled' ? '' : a,
| 2 |
diff --git a/docs/api/Settings.md b/docs/api/Settings.md @@ -102,7 +102,7 @@ Store a value of a setting for a given key on a specific layer.
## Get a Document setting
```js
-var setting = Settings.layerSettingForKey(document, 'my-key')
+var setting = Settings.documentSettingForKey(document, 'my-key')
```
Return the value of a setting for a given key on a specific document.
| 4 |
diff --git a/lib/tests/run_tests.js b/lib/tests/run_tests.js @@ -32,14 +32,23 @@ module.exports = {
}
async.waterfall([
- function getFiles(next) {
- if (filePath.substr(-1) !== '/') {
- return fs.access(filePath, (err) => {
+ function checkIfDir(next) {
+ if (filePath.substr(-1) === '/') {
+ return next(null, null);
+ }
+ fs.stat(filePath, (err, stats) => {
if (err) {
return next(`File "${filePath}" doesn't exist or you don't have permission to it`.red);
}
+ if (stats.isDirectory()) {
+ return next(null, null);
+ }
next(null, [filePath]);
});
+ },
+ function getFiles(files, next) {
+ if (files) {
+ return next(null, files);
}
getFilesFromDir(filePath, (err, files) => {
if (err) {
| 1 |
diff --git a/static/admin/config.yml b/static/admin/config.yml @@ -5,6 +5,7 @@ backend:
name: github
repo: liferay-design/liferay.design
branch: master # Branch to update (optional; defaults to master)
+ open_authoring: true
local_backend: true
media_folder: static/images/uploads
| 11 |
diff --git a/articles/sso/current/index.md b/articles/sso/current/index.md @@ -8,7 +8,7 @@ toc: false
Single Sign On (SSO) occurs when a user logs in to one application and is then signed in to other applications automatically, regardless of the platform, technology, or domain the user is using.
::: note
-[Universal login](/hosted-pages/login) is the easiest and most secure way to implement SSO with Auth0. If you need to use embedded [Lock](/libraries/lock) or an embedded custom authentication UI in your application, check out the [Cross-Origin Authentication](/cross-origin-authentication) page for information on safely conducting SSO.
+[Universal login](/hosted-pages/login) is the easiest and most secure way to implement SSO with Auth0. If for some reason you cannot use universal login with your application, check out the [Lock](/libraries/lock) page or the [Auth0.js](/libraries/auth0js) page for more information on embedded authentication.
:::
## In This Section
| 3 |
diff --git a/src/components/general/character-select/CharacterSelect.jsx b/src/components/general/character-select/CharacterSelect.jsx @@ -270,8 +270,8 @@ export const CharacterSelect = () => {
sounds.playSoundName('menuBoop');
(async () => {
- const localPlayer = await metaversefile.useLocalPlayer();
- await localPlayer.setAvatarUrl(character.avatarUrl);
+ const localPlayer = metaversefile.useLocalPlayer();
+ await localPlayer.setPlayerSpec(character.avatarUrl, character);
})();
setTimeout(() => {
| 12 |
diff --git a/accessibility-checker-engine/src/v2/checker/accessibility/rules/rpt-ariaLabeling-rules.ts b/accessibility-checker-engine/src/v2/checker/accessibility/rules/rpt-ariaLabeling-rules.ts @@ -67,7 +67,7 @@ let a11yRulesLabeling: Rule[] = [
for (let j = 0; j < els.length; j++) { // Loop over all the parents of the landmark nodes
// Find nearest landmark parent based on the tagName or the role attribute
- let tagNameTrigger = ["ASIDE","FOOTER","FORM","HEADER","MAIN","NAV","SECTION","FORM"].includes(els[j].tagName)
+ let tagNameTrigger = ["ASIDE","FOOTER","FORM","HEADER","MAIN","NAV","SECTION"].includes(els[j].tagName)
let roleNameTrigger = false;
if (els[j].hasAttribute("role")) {
roleNameTrigger = ["complementary","contentinfo","form","banner","main","navigation","region","form","search"].includes(els[j].getAttribute("role"))
| 2 |
diff --git a/iris/mutations/channel/deleteChannel.js b/iris/mutations/channel/deleteChannel.js @@ -51,7 +51,9 @@ export default async (
if (
currentUserCommunityPermissions.isOwner ||
- currentUserChannelPermissions.isOwner
+ currentUserChannelPermissions.isOwner ||
+ currentUserCommunityPermissions.isModerator ||
+ currentUserChannelPermissions.isModerator
) {
// all checks passed
// delete the channel requested from the client side user
| 11 |
diff --git a/features/run.sh b/features/run.sh @@ -20,6 +20,6 @@ for endpoint in Embedded Proxy; do
fi
# profiles are defined in the cucumber.js file at the root of this project
- ./node_modules/.bin/cucumber-js --format progress-bar --profile "${protocol}${endpoint}"
+ ./node_modules/.bin/cucumber-js --format progress-bar --profile "${protocol}${endpoint}" --world-parameters "{\"host\": \"${host}\", \"port\": \"${port}\"}"
done
done
| 13 |
diff --git a/app/shared/containers/Tools.js b/app/shared/containers/Tools.js @@ -73,10 +73,6 @@ class ToolsContainer extends Component<Props> {
];
} else {
panes = [
- {
- menuItem: t('tools_menu_contracts'),
- render: () => <Tab.Pane><ContractInterface /></Tab.Pane>,
- },
{
menuItem: t('tools_menu_index'),
render: () => <Tab.Pane><Tools {...this.props} /></Tab.Pane>,
@@ -92,6 +88,10 @@ class ToolsContainer extends Component<Props> {
menuItem: t('tools_menu_wallets'),
render: () => <Tab.Pane><ToolsWallets {...this.props} /></Tab.Pane>,
},
+ {
+ menuItem: t('tools_menu_contracts'),
+ render: () => <Tab.Pane><ContractInterface /></Tab.Pane>,
+ },
{
menuItem: <Menu.Header className="ui">{t('tools_menu_utilities_header')}</Menu.Header>
},
| 12 |
diff --git a/src/charts/Bar.js b/src/charts/Bar.js @@ -59,7 +59,7 @@ class Bar {
})
if (w.config.dataLabels.enabled) {
- if (this.totalItems > w.config.plotOptions.bar.dataLabels.maxItems) {
+ if (this.totalItems > this.barOptions.dataLabels.maxItems) {
console.warn(
'WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.'
)
@@ -1024,7 +1024,7 @@ class Bar {
x,
y,
text,
- i,
+ i: this.barOptions.distributed ? j : i,
j,
parent: elDataLabelsWrap,
dataLabelsConfig: modifiedDataLabelsConfig,
| 11 |
diff --git a/iris/mutations/channel/restoreChannel.js b/iris/mutations/channel/restoreChannel.js @@ -44,7 +44,9 @@ export default async (
if (
currentUserCommunityPermissions.isOwner ||
- currentUserChannelPermissions.isOwner
+ currentUserChannelPermissions.isOwner ||
+ currentUserCommunityPermissions.isModerator ||
+ currentUserChannelPermissions.isModerator
) {
return await restoreChannel(channelId);
}
| 11 |
diff --git a/examples/p5.js/querying-note-state/sketch.js b/examples/p5.js/querying-note-state/sketch.js @@ -7,12 +7,9 @@ async function setup() {
// Display available inputs in console (use the name to retrieve it)
console.log(WebMidi.inputs);
- const input = WebMidi.getInputByName("nanoKEY2 KEYBOARD");
+ const input = WebMidi.getInputByName("MPK mini 3");
channel = input.channels[1];
- // Once WebMidi is enabled, we can start using it in draw()
- ready = true;
-
// Create canvas
createCanvas(500, 200);
@@ -20,7 +17,8 @@ async function setup() {
function draw() {
- if (!WebMidi.enabled) return;
+ // Check if WebMidi is enabled and channel has been assigned before moving on
+ if (!channel) return;
// Draw blank keys
for (let i = 0; i < 8; i++) {
@@ -28,7 +26,7 @@ function draw() {
// Default fill is white
fill("white");
- // Each key has its own color. When its pressed, we draw it in color (instead of white)
+ // Each key has its own color. When it's pressed, we draw it in color (instead of white)
if (i === 0 && channel.getNoteState("C4")) {
fill("yellow");
} else if (i === 1 && channel.getNoteState("D4")) {
| 7 |
diff --git a/src/display/api.js b/src/display/api.js @@ -1248,17 +1248,17 @@ class PDFPageProxy {
*/
_tryCleanup(resetStats = false) {
if (!this.pendingCleanup ||
- Object.keys(this.intentStates).some(function(intent) {
+ Object.keys(this.intentStates).some((intent) => {
const intentState = this.intentStates[intent];
return (intentState.renderTasks.length !== 0 ||
!intentState.operatorList.lastChunk);
- }, this)) {
+ })) {
return;
}
- Object.keys(this.intentStates).forEach(function(intent) {
+ Object.keys(this.intentStates).forEach((intent) => {
delete this.intentStates[intent];
- }, this);
+ });
this.objs.clear();
this.annotationsPromise = null;
if (resetStats && this._stats instanceof StatTimer) {
@@ -1443,18 +1443,18 @@ class LoopbackPort {
}
if (!this._defer) {
- this._listeners.forEach(function(listener) {
+ this._listeners.forEach((listener) => {
listener.call(this, { data: obj, });
- }, this);
+ });
return;
}
const cloned = new WeakMap();
const e = { data: cloneValue(obj), };
this._deferred.then(() => {
- this._listeners.forEach(function(listener) {
+ this._listeners.forEach((listener) => {
listener.call(this, e);
- }, this);
+ });
});
}
| 14 |
diff --git a/lib/NormalModule.js b/lib/NormalModule.js @@ -61,7 +61,8 @@ class NonErrorEmittedError extends WebpackError {
}
}
-const dependencyTemplatesHashMap = new WeakMap();
+/** @type {Map<string, string>} */
+const dependencyTemplatesHashMap = new Map();
class NormalModule extends Module {
constructor({
| 4 |
diff --git a/components/measurement/Hero.js b/components/measurement/Hero.js @@ -55,7 +55,9 @@ const Hero = ({ status, color, icon, label, info }) => {
</Box>
</Flex>
{info && <Flex flexWrap='wrap' justifyContent='center'>
+ <Text fontSize={28}>
{info}
+ </Text>
</Flex>}
</Container>
</HeroContainer>
| 12 |
diff --git a/CHANGES.md b/CHANGES.md @@ -25,6 +25,7 @@ Change Log
* Only one node is supported.
* Only one mesh per node is supported.
* Only one primitive per mesh is supported.
+* Updated documentation links to reflect new locations on cesium.com.
### 1.41 - 2018-01-02
| 3 |
diff --git a/src/utils/serve-functions.js b/src/utils/serve-functions.js @@ -91,9 +91,6 @@ function buildClientContext(headers) {
}
}
-function createHandler(dir) {
- const functions = getFunctions(dir)
-
const clearCache = action => path => {
console.log(`${NETLIFYDEVLOG} ${path} ${action}, reloading...`)
Object.keys(require.cache).forEach(k => {
@@ -101,6 +98,10 @@ function createHandler(dir) {
})
console.log(`${NETLIFYDEVLOG} ${path} ${action}, successfully reloaded!`)
}
+
+function createHandler(dir) {
+ const functions = getFunctions(dir)
+
const watcher = chokidar.watch(dir, { ignored: /node_modules/ })
watcher.on('change', clearCache('modified')).on('unlink', clearCache('deleted'))
| 5 |
diff --git a/bin/gltf-pipeline.js b/bin/gltf-pipeline.js @@ -145,6 +145,7 @@ var argv = yargs
type: 'number'
},
'draco.unifiedQuantization': {
+ default : false,
describe: 'Quantize positions of all primitives using the same quantization grid defined by the unified bounding box of all primitives. If this option is not set, quantization is applied on each primitive separately which can result in gaps appearing between different primitives. Default is false.',
type: 'boolean'
},
@@ -190,8 +191,8 @@ for (i = 0; i < length; ++i) {
if (arg.indexOf('texcomp') >= 0) {
texcompOptions = argv.texcomp;
}
- if (arg.indexOf('draco') >= 0) {
- dracoOptions = argv.draco;
+ if (arg.indexOf('draco') >= 0 || arg === '-d') {
+ dracoOptions = defaultValue(argv.draco, {});
}
}
| 9 |
diff --git a/src/libs/ValidationUtils.js b/src/libs/ValidationUtils.js @@ -256,7 +256,7 @@ function validateIdentity(identity) {
* @param {Boolean} [isCountryCodeOptional]
* @returns {Boolean}
*/
-function isValidUSPhone(phoneNumber, isCountryCodeOptional) {
+function isValidUSPhone(phoneNumber = '', isCountryCodeOptional) {
// Remove non alphanumeric characters from the phone number
const sanitizedPhone = phoneNumber.replace(CONST.REGEX.NON_ALPHA_NUMERIC, '');
const isUsPhone = isCountryCodeOptional
| 9 |
diff --git a/renderer/components/withIntl.js b/renderer/components/withIntl.js @@ -19,8 +19,6 @@ if (typeof window !== 'undefined' && window.OONITranslations) {
}
const withIntl = (Page) => {
- const IntlPage = injectIntl(Page)
-
return class PageWithIntl extends Component {
render () {
const locale = getLocale()
@@ -33,7 +31,7 @@ const withIntl = (Page) => {
return (
<IntlProvider locale={locale} messages={messages} initialNow={now}>
- <IntlPage {...this.props} />
+ <Page {...this.props} />
</IntlProvider>
)
}
| 2 |
diff --git a/articles/connections/passwordless/guides/best-practices.md b/articles/connections/passwordless/guides/best-practices.md @@ -53,8 +53,6 @@ Auth0 has the following protections against brute force attacks:
* Only three failed attempts to input any single one-time-use code are allowed. After this, a new code will need to be requested.
* The one-time-use code issued will be valid for three minutes (by default) before it expires.
-If you choose to extend the amount of time it takes for your one-time-use code to expire, you should also extend the length of the one-time code. Otherwise, an attacker has a larger window of time to attempt to guess a short code.
-
The one-time-use code expiration time can be altered in the passwordless connection settings in the [Dashboard](${manage_url}/#/connections/passwordless).
## Link accounts
| 2 |
diff --git a/app/controllers/observations_controller.rb b/app/controllers/observations_controller.rb @@ -794,7 +794,7 @@ class ObservationsController < ApplicationController
Photo.subclasses.each do |klass|
klass_key = klass.to_s.underscore.pluralize.to_sym
next unless params["#{klass_key}_to_sync"] && params["#{klass_key}_to_sync"][fieldset_index]
- next unless photo = observation.photos.last
+ next unless photo = observation.observation_photos.last.try(:photo)
photo_o = photo.to_observation
PHOTO_SYNC_ATTRS.each do |a|
hashed_params[observation.id.to_s] ||= {}
| 1 |
diff --git a/app/builtin-pages/views/dat-sidebar.js b/app/builtin-pages/views/dat-sidebar.js @@ -269,7 +269,7 @@ function update () {
${renderTabs(currentSection, [
{id: 'files', label: 'Files', onclick: onClickTab('files')},
{id: 'log', label: 'History', onclick: onClickTab('log')},
- {id: 'metadata', label: 'Metadata', onclick: onClickTab('metadata')},
+ {id: 'metadata', label: 'About', onclick: onClickTab('metadata')},
stagingTab
].filter(Boolean))}
${({
| 10 |
diff --git a/src/lib/util.js b/src/lib/util.js @@ -61,7 +61,6 @@ const util = {
* @returns {Boolean}
*/
onlyZeroWidthSpace: function (text) {
- if (!text) return false;
if (typeof text !== 'string') text = text.textContent;
return text === '' || this.onlyZeroWidthRegExp.test(text);
},
| 13 |
diff --git a/src/components/mdx/anchor-link.js b/src/components/mdx/anchor-link.js @@ -11,13 +11,17 @@ import IconExternalLink from "../icons/external-link"
export default ({ href, className, children, ...props }) => {
if (!href || !children) return (<a {...props}/>)
+ const isImageLink = typeof children === "object" &&
+ children.props &&
+ children.props.className === "gatsby-resp-image-wrapper"
+
const isExternal = !!href.match(/^https?:/)
const isHash = href.indexOf("#") === 0
- const useRegularLink = isExternal || isHash
+ const useRegularLink = isImageLink || isExternal || isHash
return useRegularLink ? (
- isExternal ? (
+ (isExternal && !isImageLink) ? (
<a href={href} className={className || linkClassName} {...props}>
<span className={contentClassName}>{children}</span>
<IconExternalLink className={externalIconClassName}/>
| 9 |
diff --git a/vis/stylesheets/modules/list/_header.scss b/vis/stylesheets/modules/list/_header.scss margin-right: 10px;
}
+@media screen and (max-width: 1650px) {
+ #filter_container input {
+ width: 240px;
+ }
+}
+
+@media screen and (max-width: 1600px) {
+ #filter_container input {
+ width: 220px;
+ }
+}
+
+@media screen and (max-width: 1500px) {
+ #filter_container input {
+ width: 200px;
+ }
+}
+
+@media screen and (max-width: 1460px) {
+ #filter_container input {
+ width: 180px;
+ }
+}
+
@media screen and (max-width: 1220px) {
.btn-sm, .btn-group-sm > .btn {
| 7 |
diff --git a/components/amazon_ses/actions/send-an-email/send-an-email.mjs b/components/amazon_ses/actions/send-an-email/send-an-email.mjs @@ -5,7 +5,7 @@ export default {
key: "amazon_ses-send-an-email",
name: "Send an Email",
description: "Send an email using Amazon SES",
- version: "0.8.1",
+ version: "0.8.2",
type: "action",
props: {
amazon_ses: {
@@ -18,24 +18,24 @@ export default {
description: "The AWS region tied to your SES identity",
},
CcAddresses: {
- type: "any",
+ type: "string[]",
label: "CC Addresses",
description: "An array of email addresses you want to CC",
optional: true,
},
BccAddresses: {
- type: "any",
+ type: "string[]",
label: "BCC Addresses",
description: "An array of email addresses you want to BCC",
optional: true,
},
ToAddresses: {
- type: "any",
+ type: "string[]",
label: "To Addresses",
description: "An array of email addresses you want to send email to",
},
ReplyToAddresses: {
- type: "any",
+ type: "string[]",
label: "Reply To Addresses",
description: "An array of Reply-To addresses",
optional: true,
| 12 |
diff --git a/packages/idyll-document/test/__snapshots__/schema2element.js.snap b/packages/idyll-document/test/__snapshots__/schema2element.js.snap exports[`ReactJsonSchema can parse a schema 1`] = `
ShallowWrapper {
- "length": 1,
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): <div>
<TextContainer>
@@ -3965,8 +3964,16 @@ Late Var Range:",
"adapter": ReactSixteenAdapter {
"options": Object {
"enableComponentDidUpdateOnSetState": true,
+ "lifecycles": Object {
+ "componentDidUpdate": Object {
+ "onSetState": true,
},
+ "getSnapshotBeforeUpdate": true,
},
},
+ },
+ "attachTo": undefined,
+ "hydrateIn": undefined,
+ },
}
`;
| 3 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1649,7 +1649,32 @@ const _handleDamageCick = () => {
/* _getAvatarCapsule(localVector);
localVector.add(p); */
const collision = geometryManager.geometryWorker.collidePhysics(geometryManager.physics, radius, halfHeight, cylinderMesh.position, cylinderMesh.quaternion, 1);
- console.log('got collision', collision);
+ if (collision) {
+ if (damagePhysicsMesh) {
+ const collisionId = collision.id;
+ const physics = physicsManager.getGeometry(collisionId);
+
+ if (physics) {
+ let geometry = new THREE.BufferGeometry();
+ geometry.setAttribute('position', new THREE.BufferAttribute(physics.positions, 3));
+ geometry.setIndex(new THREE.BufferAttribute(physics.indices, 1));
+ geometry = geometry.toNonIndexed();
+ geometry.computeVertexNormals();
+
+ damagePhysicsMesh.geometry.dispose();
+ damagePhysicsMesh.geometry = geometry;
+ // damagePhysicsMesh.scale.setScalar(1.05);
+ damagePhysicsMesh.physicsId = collisionId;
+
+ const physicsTransform = physicsManager.getPhysicsTransform(collisionId);
+ damagePhysicsMesh.position.copy(physicsTransform.position);
+ damagePhysicsMesh.quaternion.copy(physicsTransform.quaternion);
+ damagePhysicsMesh.material.uniforms.uTime.value = (Date.now()%1500)/1500;
+ damagePhysicsMesh.material.uniforms.uTime.needsUpdate = true;
+ damagePhysicsMesh.visible = true;
+ }
+ }
+ }
/* if (highlightedPhysicsObject) {
if (highlightPhysicsMesh.physicsId !== highlightedPhysicsId) {
const physics = physicsManager.getGeometry(highlightedPhysicsId);
| 0 |
diff --git a/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs b/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs @@ -186,7 +186,8 @@ public class <%= serviceClassName %><% if (service === 'serviceImpl') { %> imple
@Override
<%_ } _%>
public void delete(<%= pkType %> id) {
- log.debug("Request to delete <%= entityClass %> : {}", id);<%- include('../../common/delete_template', {viaService: viaService}); -%>
+ log.debug("Request to delete <%= entityClass %> : {}", id);
+<%- include('../../common/delete_template', {viaService: viaService}); -%>
}
<%_ if (searchEngine === 'elasticsearch') { _%>
| 1 |
diff --git a/packages/vue/src/components/organisms/SfStoreLocator/SfSToreLocator.stories.js b/packages/vue/src/components/organisms/SfStoreLocator/SfSToreLocator.stories.js @@ -251,15 +251,13 @@ storiesOf("Organisms|StoreLocator", module)
},
components: { SfStoreLocator },
template: `
- <sf-store-locator :stores="stores" :center="center" :zoom="zoom" >
- <template #default="{centerOn, registerStore}">
+ <sf-store-locator :stores="stores" :center="center" :zoom="zoom" v-slot="{centerOn, registerStore}" >
<div v-for="(store, index) in stores" :key="index">
<!-- This is just an example showing that is necessary to trigger register store function to have the store appear on the map -->
{{registerStore(store)}}
<img :style="{height: '150px'}" :src="store.picture" :alt="store.title" />
- <button @click="centerOn(store)">click to zoom</button>
+ <button @click="centerOn(store.latlng)">click to zoom</button>
</div>
- </template>
</sf-store-locator>
`
}),
| 1 |
diff --git a/js/keybindings.js b/js/keybindings.js @@ -113,8 +113,14 @@ ipc.on('goForward', function () {
} catch (e) { }
})
+var menuBarShortcuts = ['mod+t', 'shift+mod+p', 'mod+n'] // shortcuts that are already used for menu bar items
+
function defineShortcut (keyMapName, fn) {
Mousetrap.bind(keyMap[keyMapName], function (e, combo) {
+ // these shortcuts are already used by menu bar items, so also using them here would result in actions happening twice
+ if (menuBarShortcuts.indexOf(combo) !== -1) {
+ return
+ }
// mod+left and mod+right are also text editing shortcuts, so they should not run when an input field is focused
if (combo === 'mod+left' || combo === 'mod+right') {
getWebview(tabs.getSelected()).executeJavaScript('document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA"', function (isInputFocused) {
@@ -172,7 +178,7 @@ settings.get('keyMap', function (keyMapSettings) {
addTab(tabs.add(restoredTab, tabs.getIndex(tabs.getSelected()) + 1), {
focus: false,
leaveEditMode: true,
- enterEditMode: false,
+ enterEditMode: false
})
})
| 7 |
diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js @@ -94,7 +94,7 @@ class InitialSettingsPage extends React.Component {
this.getWalletBalance = this.getWalletBalance.bind(this);
this.getDefaultMenuItems = this.getDefaultMenuItems.bind(this);
- this.getMenuItems = this.getMenuItems.bind(this);
+ this.getMenuItemsList = this.getMenuItemsList.bind(this);
this.getMenuItem = this.getMenuItem.bind(this);
}
@@ -158,7 +158,7 @@ class InitialSettingsPage extends React.Component {
* Add free policies (workspaces) to the list of menu items and returns the list of menu items
* @returns {Array} the menu item list
*/
- getMenuItems() {
+ getMenuItemsList() {
const menuItems = _.chain(this.props.policies)
.filter(policy => policy && policy.type === CONST.POLICY.TYPE.FREE && policy.role === CONST.POLICY.ROLE.ADMIN)
.map(policy => ({
@@ -270,7 +270,7 @@ class InitialSettingsPage extends React.Component {
</Text>
)}
</View>
- {_.map(this.getMenuItems(), (item, index) => this.getMenuItem(item, index))}
+ {_.map(this.getMenuItemsList(), (item, index) => this.getMenuItem(item, index))}
</View>
</ScrollView>
</ScreenWrapper>
| 10 |
diff --git a/ui/src/components/Property/Link.jsx b/ui/src/components/Property/Link.jsx @@ -35,7 +35,7 @@ class ValueLink extends Component {
hoverOpenDelay={100}
>
<Link to={href} className="ValueLink">
- <Bp3Tag minimal interactive>
+ <Bp3Tag minimal interactive multiline>
<Tag.Icon field={prop.type.group} />
<span>{content}</span>
<Count count={count} className="no-fill" />
| 11 |
diff --git a/world.js b/world.js @@ -290,6 +290,7 @@ const _addObject = (dynamic, arrayName) => (contentId, position = new THREE.Vect
});
if (pendingAddPromise) {
const result = pendingAddPromise;
+ result.instanceId = instanceId;
pendingAddPromise = null;
return result;
} else {
| 0 |
diff --git a/src/pages/about-data/visualization-guide/dashboard.module.scss b/src/pages/about-data/visualization-guide/dashboard.module.scss @@ -28,6 +28,11 @@ $chart-gutter-md: 100px;
@media (min-width: $viewport-md) {
max-width: $chart-two-col-lg-max-width * 2 + $chart-gutter-md;
}
+ @media (min-width: $viewport-lg) {
+ display: flex;
+ justify-content: center;
+ max-width: inherit;
+ }
}
.charts-container-inner {
| 1 |
diff --git a/vr-ui.js b/vr-ui.js @@ -10,10 +10,10 @@ const localMatrix = new THREE.Matrix4();
const localMatrix2 = new THREE.Matrix4();
const localRaycater = new THREE.Raycaster();
-const makeTextMesh = (text = '', fontSize = 1, anchorX = 'left', anchorY = 'middle') => {
+const makeTextMesh = (text = '', font = './GeosansLight.ttf', fontSize = 1, anchorX = 'left', anchorY = 'middle') => {
const textMesh = new TextMesh();
textMesh.text = text;
- textMesh.font = './GeosansLight.ttf';
+ textMesh.font = font;
textMesh.fontSize = fontSize;
textMesh.color = 0x000000;
textMesh.anchorX = anchorX;
@@ -44,7 +44,7 @@ const makeWristMenu = ({scene, ray, highlightMesh, addPackage}) => {
);
object.add(background);
- const textMesh = makeTextMesh(name, size*0.1);
+ const textMesh = makeTextMesh(name, undefined, size*0.1);
textMesh.position.x = -size/2;
textMesh.position.y = size/2;
textMesh.position.z = 0.001;
@@ -166,7 +166,7 @@ const makeWristMenu = ({scene, ray, highlightMesh, addPackage}) => {
imgMesh.position.z = 0.001;
object.add(imgMesh);
- const textMesh = makeTextMesh(name, size*0.05);
+ const textMesh = makeTextMesh(name, undefined, size*0.05);
textMesh.position.x = -packageWidth/2 + packageHeight;
textMesh.position.y = packageHeight/2;
textMesh.position.z = 0.001;
@@ -321,7 +321,7 @@ const makeWristMenu = ({scene, ray, highlightMesh, addPackage}) => {
imgMesh.position.z = 0.001;
object.add(imgMesh);
- const textMesh = makeTextMesh(name, size*0.05);
+ const textMesh = makeTextMesh(name, undefined, size*0.05);
textMesh.position.x = -packageWidth/2 + packageHeight;
textMesh.position.y = packageHeight/2;
textMesh.position.z = 0.001;
| 0 |
diff --git a/packages/node_modules/@node-red/runtime/lib/api/settings.js b/packages/node_modules/@node-red/runtime/lib/api/settings.js @@ -36,7 +36,15 @@ function extend(target, source) {
} else {
// Object
if (target.hasOwnProperty(keys[i])) {
+ // Target property exists. Need to handle the case
+ // where the existing property is a string/number/boolean
+ // and is being replaced wholesale.
+ var targetType = typeof target[keys[i]];
+ if (targetType === 'string' || targetType === 'number' || targetType === 'boolean') {
+ target[keys[i]] = value;
+ } else {
target[keys[i]] = extend(target[keys[i]],value);
+ }
} else {
target[keys[i]] = value;
}
| 11 |
diff --git a/src/pages/signin/SignInPageLayout/SignInPageContent.js b/src/pages/signin/SignInPageLayout/SignInPageContent.js @@ -53,7 +53,7 @@ const SignInPageContent = props => (
>
<View style={[
styles.componentHeightLarge,
- ...(props.isSmallScreenWidth ? styles.mb2 : [styles.mt6, styles.mb5]),
+ ...(props.isSmallScreenWidth ? [styles.mb2] : [styles.mt6, styles.mb5]),
]}
>
<ExpensifyCashLogo
| 11 |
diff --git a/lib/sandbox.js b/lib/sandbox.js @@ -1371,7 +1371,8 @@ function sandBox(script, name, verbose, debug, context) {
}
} else {
if (adapter.config.subscribe) {
- sandbox.log('Cannot use sync getState, use callback instead getState("' + id + '", function (err, state){}); or disable the "Do not subscribe all states on start" option in instance configuration.', 'error');
+ sandbox.log('The "getState" method cannot be used synchronously, because the adapter setting "Do not subscribe to all states on start" is enabled.', 'error');
+ sandbox.log(`Please disable that setting or use "getState" with a callback, e.g.: getState("${id}", (err, state) => { ... });`, 'error');
} else {
if (states[id]) {
if (sandbox.verbose) sandbox.log('getState(id=' + id + ', timerId=' + timers[id] + ') => ' + JSON.stringify(states[id]), 'info');
| 7 |
diff --git a/src/NetworkConnection.js b/src/NetworkConnection.js @@ -7,7 +7,7 @@ class NetworkConnection {
this.setupDefaultDCSubs();
this.connectedClients = {};
- this.dcIsActive = {};
+ this.activeMessageChannels = {};
this.connected = false;
this.onConnectedEvent = new Event('connected');
@@ -115,18 +115,18 @@ class NetworkConnection {
messageChannelOpen(id) {
NAF.log.write('Opened data channel from ' + id);
- this.dcIsActive[id] = true;
+ this.activeMessageChannels[id] = true;
this.entities.completeSync();
}
messageChannelClosed(id) {
NAF.log.write('Closed data channel from ' + id);
- this.dcIsActive[id] = false;
+ this.activeMessageChannels[id] = false;
this.entities.removeEntitiesFromUser(id);
}
- dcIsConnectedTo(user) {
- return this.dcIsActive.hasOwnProperty(user) && this.dcIsActive[user];
+ hasActiveMessageChannel(user) {
+ return this.activeMessageChannels.hasOwnProperty(user) && this.activeMessageChannels[user];
}
broadcastData(dataType, data, guaranteed) {
@@ -140,7 +140,7 @@ class NetworkConnection {
}
sendData(toClient, dataType, data, guaranteed) {
- if (this.dcIsConnectedTo(toClient)) {
+ if (this.hasActiveMessageChannel(toClient)) {
if (guaranteed) {
this.adapter.sendDataGuaranteed(toClient, dataType, data);
} else {
| 10 |
diff --git a/js/webcomponents/bisweb_grapherelement.js b/js/webcomponents/bisweb_grapherelement.js @@ -250,6 +250,7 @@ class GrapherModule extends HTMLElement {
return Promise.reject();
}
+ console.log('currentdata', this.currentdata);
let dim = numeric.dim(this.currentdata.y);
this.numframes = dim[1];
this.formatChartData(this.currentdata.y,
@@ -261,7 +262,7 @@ class GrapherModule extends HTMLElement {
return new Promise((resolve) => {
setTimeout(() => {
- this.createChart();
+ this.createChart({ xaxisLabel : 'frame', yaxisLabel : 'intensity (average per-pixel value)'});
resolve();
}, 1);
});
@@ -377,7 +378,7 @@ class GrapherModule extends HTMLElement {
this.currentdata = {
x: y[0].length,
y: y,
- numVoxels: numVoxels,
+ numvoxels: numVoxels,
datasets: parsedDataSet,
colors: parsedColors,
chartType: 'bar'
@@ -725,13 +726,11 @@ class GrapherModule extends HTMLElement {
*/
getCanvasDimensions() {
- console.log('this', this);
let dim;
if (this.lastviewer) {
dim = this.lastviewer.getViewerDimensions();
} else {
//use the dimensions of added viewer instead
- console.log('dimensions', this.viewer.getViewerDimensions());
dim = this.viewer.getViewerDimensions();
}
| 1 |
diff --git a/postcss/css-compile-variables.js b/postcss/css-compile-variables.js -import { Color } from "color";
+const Color = require("color");
let aliasMap;
let resolvedMap;
@@ -44,6 +44,21 @@ function extractAlias(decl) {
}
}
+function addResolvedVariablesToRootSelector( root, variables, { Rule, Declaration }) {
+ const newRule = new Rule({ selector: ":root", source: root.source });
+ // Add base css variables to :root
+ for (const [key, value] of Object.entries(variables)) {
+ const declaration = new Declaration({ prop: `--${key}`, value });
+ newRule.append(declaration);
+ }
+ // Add derived css variables to :root
+ resolvedMap.forEach((value, key) => {
+ const declaration = new Declaration({ prop: key, value });
+ newRule.append(declaration);
+ });
+ root.append(newRule);
+}
+
/* *
* @type {import('postcss').PluginCreator}
*/
@@ -54,32 +69,15 @@ module.exports = (opts = {}) => {
return {
postcssPlugin: "postcss-compile-variables",
- Once(root) {
+ Once(root, {Rule, Declaration}) {
/*
Go through the CSS file once to extract all aliases.
We use the extracted alias when resolving derived variables
later.
*/
root.walkDecls(decl => extractAlias(decl));
- },
-
- Declaration(declaration) {
- resolveDerivedVariable(declaration, variables);
- },
-
- OnceExit(root, { Rule, Declaration }) {
- const newRule = new Rule({ selector: ":root", source: root.source })
- // Add base css variables to :root
- for (const [key, value] of Object.entries(variables)) {
- const declaration = new Declaration({ prop: `--${key}`, value });
- newRule.append(declaration);
- }
- // Add derived css variables to :root
- resolvedMap.forEach((value, key) => {
- const declaration = new Declaration({ prop: key, value });
- newRule.append(declaration);
- });
- root.append(newRule);
+ root.walkDecls(decl => resolveDerivedVariable(decl, variables));
+ addResolvedVariablesToRootSelector(root, variables, { Rule, Declaration });
},
};
};
| 5 |
diff --git a/lib/model.js b/lib/model.js @@ -3187,10 +3187,14 @@ function assignVals(o) {
}
if (o.isVirtual && !o.justOne && !Array.isArray(rawIds[i])) {
+ if (rawIds[i] == null) {
+ rawIds[i] = [];
+ } else {
rawIds[i] = [rawIds[i]];
}
+ }
- if (o.isVirtual && docs[i].constructor.name === 'model' && docs[i].$init) {
+ if (o.isVirtual && docs[i].constructor.name === 'model') {
// If virtual populate and doc is already init-ed, need to walk through
// the actual doc to set rather than setting `_doc` directly
mpath.set(o.path, rawIds[i], docs[i]);
| 1 |
diff --git a/src/models/responseResolver.js b/src/models/responseResolver.js @@ -82,7 +82,7 @@ function create (proxy, postProcess) {
return result;
}
- function predicatesFor (request, matchers) {
+ function predicatesFor (request, matchers, logger) {
var predicates = [];
matchers.forEach(function (matcher) {
@@ -106,8 +106,6 @@ function create (proxy, postProcess) {
}
else {
Object.keys(value).forEach(function (field) {
- var logger = { warn: function () {} }; // TODO: pass real logger
-
if (field === 'xpath') {
xpathValue(predicate, fieldName, request[fieldName], value.xpath, logger);
}
@@ -139,8 +137,8 @@ function create (proxy, postProcess) {
return i;
}
- function indexOfStubToAddResponseTo (responseConfig, request, stubs) {
- var predicates = predicatesFor(request, responseConfig.proxy.predicateGenerators || []),
+ function indexOfStubToAddResponseTo (responseConfig, request, stubs, logger) {
+ var predicates = predicatesFor(request, responseConfig.proxy.predicateGenerators || [], logger),
stringify = require('json-stable-stringify');
for (var index = stubIndexFor(responseConfig, stubs) + 1; index < stubs.length; index += 1) {
@@ -151,8 +149,8 @@ function create (proxy, postProcess) {
return -1;
}
- function canAddResponseToExistingStub (responseConfig, request, stubs) {
- return indexOfStubToAddResponseTo(responseConfig, request, stubs) >= 0;
+ function canAddResponseToExistingStub (responseConfig, request, stubs, logger) {
+ return indexOfStubToAddResponseTo(responseConfig, request, stubs, logger) >= 0;
}
function newIsResponse (response, addWaitBehavior, addDecorateBehavior) {
@@ -172,15 +170,15 @@ function create (proxy, postProcess) {
return result;
}
- function addNewResponse (responseConfig, request, response, stubs) {
+ function addNewResponse (responseConfig, request, response, stubs, logger) {
var stubResponse = newIsResponse(response, responseConfig.proxy.addWaitBehavior, responseConfig.proxy.addDecorateBehavior),
- responseIndex = indexOfStubToAddResponseTo(responseConfig, request, stubs);
+ responseIndex = indexOfStubToAddResponseTo(responseConfig, request, stubs, logger);
stubs[responseIndex].responses.push(stubResponse);
}
- function addNewStub (responseConfig, request, response, stubs) {
- var predicates = predicatesFor(request, responseConfig.proxy.predicateGenerators || []),
+ function addNewStub (responseConfig, request, response, stubs, logger) {
+ var predicates = predicatesFor(request, responseConfig.proxy.predicateGenerators || [], logger),
stubResponse = newIsResponse(response, responseConfig.proxy.addWaitBehavior, responseConfig.proxy.addDecorateBehavior),
newStub = { predicates: predicates, responses: [stubResponse] },
index = responseConfig.proxy.mode === 'proxyAlways' ? stubs.length : stubIndexFor(responseConfig, stubs);
@@ -188,16 +186,16 @@ function create (proxy, postProcess) {
stubs.splice(index, 0, newStub);
}
- function recordProxyResponse (responseConfig, request, response, stubs) {
+ function recordProxyResponse (responseConfig, request, response, stubs, logger) {
if (['proxyOnce', 'proxyAlways'].indexOf(responseConfig.proxy.mode) < 0) {
responseConfig.proxy.mode = 'proxyOnce';
}
if (responseConfig.proxy.mode === 'proxyAlways' && canAddResponseToExistingStub(responseConfig, request, stubs)) {
- addNewResponse(responseConfig, request, response, stubs);
+ addNewResponse(responseConfig, request, response, stubs, logger);
}
else {
- addNewStub(responseConfig, request, response, stubs);
+ addNewStub(responseConfig, request, response, stubs, logger);
}
}
@@ -217,7 +215,7 @@ function create (proxy, postProcess) {
// Run behaviors here to persist decorated response
return Q(behaviors.execute(request, response, responseConfig._behaviors, logger));
}).then(function (response) {
- recordProxyResponse(responseConfig, request, response, stubs);
+ recordProxyResponse(responseConfig, request, response, stubs, logger);
return Q(response);
});
}
| 4 |
diff --git a/src/pages/EnablePayments/TermsStep.js b/src/pages/EnablePayments/TermsStep.js @@ -106,7 +106,7 @@ class TermsStep extends React.Component {
)}
<Button
success
- style={[styles.mb4, styles.mt4]}
+ style={[styles.mv4]}
text={this.props.translate('termsStep.enablePayments')}
isLoading={this.props.walletTerms.loading}
onPress={() => {
| 14 |
diff --git a/src/components/editorials/EditorialRenderables.js b/src/components/editorials/EditorialRenderables.js @@ -30,11 +30,20 @@ const headerStyle = css(
const bodyStyle = css(
s.relative,
- s.zIndex4,
s.fullWidth,
s.selfEnd,
)
+const subtitleStyle = css(
+ { ...bodyStyle },
+ s.zIndex2,
+)
+
+const toolsStyle = css(
+ { ...bodyStyle },
+ s.zIndex4,
+)
+
const linkStyle = css(
s.absolute,
s.flood,
@@ -61,8 +70,10 @@ export const PostEditorial = (props: EditorialProps) => (
<header className={headerStyle}>
<EditorialTitle label={props.editorial.get('title')} />
</header>
- <div className={bodyStyle}>
+ <div className={subtitleStyle}>
<EditorialSubtitle label={props.editorial.get('subtitle')} />
+ </div>
+ <div className={toolsStyle}>
<EditorialTools isPostLoved={props.isPostLoved} postPath={props.postPath} />
</div>
<EditorialOverlay />
@@ -132,7 +143,7 @@ export const CuratedPost = (props: PostProps) => (
<EditorialTitle label={`${props.title} `} />
<EditorialTitle label={`@${props.username}`} />
</header>
- <div className={bodyStyle}>
+ <div className={toolsStyle}>
<EditorialTools isPostLoved={props.isPostLoved} postPath={props.detailPath} />
</div>
<EditorialOverlay />
@@ -171,7 +182,7 @@ export const LinkEditorial = (props: EditorialProps) => (
<header className={headerStyle}>
<EditorialTitle label={props.editorial.get('title')} />
</header>
- <div className={bodyStyle}>
+ <div className={subtitleStyle}>
<EditorialSubtitle label={props.editorial.get('subtitle')} />
</div>
<EditorialOverlay />
| 11 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1255,11 +1255,11 @@ const _updateMenu = () => {
menu2El.classList.toggle('open', menuOpen === 2);
menu3El.classList.toggle('open', menuOpen === 3);
menu4El.classList.toggle('open', menuOpen === 4);
- unmenuEl.classList.toggle('closed', menuOpen !== 0 || !!appManager.grabbedObjects[0] || !!highlightedObject || !!editedObject || !!highlightedWorld);
- objectMenuEl.classList.toggle('open', !!highlightedObject && !appManager.grabbedObjects[0] && !editedObject && !highlightedWorld && menuOpen !== 4);
+ unmenuEl.classList.toggle('closed', menuOpen !== 0 || !!appManager.grabbedObjects[0] || !!highlightedObject || !!editedObject);
+ objectMenuEl.classList.toggle('open', !!highlightedObject && !appManager.grabbedObjects[0] && !editedObject && menuOpen !== 4);
grabMenuEl.classList.toggle('open', !!appManager.grabbedObjects[0]);
editMenuEl.classList.toggle('open', !!editedObject);
- worldMenuEl.classList.toggle('open', !!highlightedWorld && !editedObject && menuOpen === 0);
+ worldMenuEl.classList.toggle('open', !editedObject && menuOpen === 0);
locationIcon.classList.toggle('open', false);
locationIcon.classList.toggle('highlight', false);
profileIcon.classList.toggle('open', false);
@@ -1369,14 +1369,6 @@ const _updateMenu = () => {
itemIcon.classList.toggle('open', true);
itemLabel.innerText = 'lightsaber';
- lastSelectedBuild = -1;
- lastCameraFocus = -1;
- } else if (highlightedWorld) {
- locationIcon.classList.toggle('open', true);
- locationIcon.classList.toggle('highlight', !!highlightedWorld);
-
- worldMenuEl.classList.toggle('open', true);
-
lastSelectedBuild = -1;
lastCameraFocus = -1;
} else {
@@ -1386,7 +1378,7 @@ const _updateMenu = () => {
lastCameraFocus = -1;
}
- locationLabel.innerText = (highlightedWorld ? highlightedWorld.name : 'Overworld') + ` @${coord.x},${coord.z}`;
+ locationLabel.innerText = `Overworld @${coord.x},${coord.z}`;
};
const loadoutEl = document.getElementById('loadout');
@@ -1607,7 +1599,7 @@ const weaponsManager = {
return 4/this.gridSnap;
}
},
- setWorld(newCoord, newHighlightedWorld) {
+ /* setWorld(newCoord, newHighlightedWorld) {
lastCoord.copy(coord);
coord.copy(newCoord);
@@ -1617,7 +1609,7 @@ const weaponsManager = {
if (!coord.equals(lastCoord) || highlightedWorld !== lastHighlightedWorld) {
_updateMenu();
}
- },
+ }, */
async destroyWorld() {
if (highlightedWorld) {
const {name} = highlightedWorld;
| 2 |
diff --git a/token-metadata/0xBB1fA4FdEB3459733bF67EbC6f893003fA976a82/metadata.json b/token-metadata/0xBB1fA4FdEB3459733bF67EbC6f893003fA976a82/metadata.json "symbol": "XPAT",
"address": "0xBB1fA4FdEB3459733bF67EbC6f893003fA976a82",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/apply/LoginCodeForm.js b/src/components/apply/LoginCodeForm.js import React, { Component } from 'react'
-import { api } from 'data.json'
+import { url as apiUrl } from 'api'
import { Label, Input, Text, cx } from '@hackclub/design-system'
import { withFormik } from 'formik'
import yup from 'yup'
@@ -112,7 +112,7 @@ const LoginCodeForm = withFormik({
return null
}
const strippedLoginCode = data.loginCode.replace(/\D/g, '')
- fetch(`${api}/v1/users/${props.userId}/exchange_login_code`, {
+ fetch(`${apiUrl}/v1/users/${props.userId}/exchange_login_code`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ login_code: strippedLoginCode })
| 1 |
diff --git a/src/components/general/character/Emotions.jsx b/src/components/general/character/Emotions.jsx @@ -101,9 +101,11 @@ export const Emotions = ({
if (action.type === 'facepose') {
const {emotion, value} = action;
const emotionIndex = emotions.indexOf(emotion);
+ if (emotionIndex !== -1) {
const emotionState = emotionStates[emotionIndex];
emotionState.setValue(value);
}
+ }
};
localPlayer.addEventListener('actionadd', actionadd);
@@ -114,9 +116,11 @@ export const Emotions = ({
if (action.type === 'facepose') {
const {emotion} = action;
const emotionIndex = emotions.indexOf(emotion);
+ if (emotionIndex !== -1) {
const emotionState = emotionStates[emotionIndex];
emotionState.setValue(0);
}
+ }
};
localPlayer.addEventListener('actionremove', actionremove);
| 9 |
diff --git a/components/mapbox/ban-map/index.js b/components/mapbox/ban-map/index.js @@ -90,14 +90,21 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
}, [address, isCenterControlDisabled, map])
const isAddressVisible = useCallback(() => {
- const {lng, lat} = map.getCenter()
+ const bounds = map.getBounds()
+ const currentBBox = [
+ bounds._sw.lng,
+ bounds._sw.lat,
+ bounds._ne.lng,
+ bounds._ne.lat
+ ]
+
const currentZoom = map.getZoom()
- const isCurrentCenterInBBox = isPointInBBox([lng, lat], address.displayBBox)
+ const isAddressInCurrentBBox = isPointInBBox(address.displayBBox, currentBBox)
const maxRange = currentZoom < ZOOM_RANGE[address.type].max
const minRange = currentZoom > ZOOM_RANGE[address.type].min
- return isCurrentCenterInBBox && maxRange && minRange
+ return isAddressInCurrentBBox && maxRange && minRange
}, [map, address])
useEffect(() => {
| 14 |
diff --git a/SSAOPass.js b/SSAOPass.js @@ -35,12 +35,13 @@ const oldMaterialCache = new WeakMap();
class SSAOPass extends Pass {
- constructor( scene, camera, width, height, depthPass ) {
+ constructor( scene, camera, width, height, filterFn, depthPass ) {
super();
this.width = ( width !== undefined ) ? width : 512;
this.height = ( height !== undefined ) ? height : 512;
+ this.filterFn = filterFn;
this.depthPass = depthPass;
this.clear = true;
| 0 |
diff --git a/templates/public-vpc-support/index.js b/templates/public-vpc-support/index.js @@ -106,6 +106,7 @@ module.exports=Promise.resolve(require('../master')).then(function(base){
base.Conditions.BuildExamples={"Fn::Equals":[true,true]}
base.Conditions.CreateDomain={"Fn::Equals":[true,true]}
base.Conditions.DontCreateDomain={"Fn::Equals":[true,false]}
+ base.Conditions.SingleNode={"Fn::Equals":[{"Ref":"ElasticSearchNodeCount"},"1"]}
base.Conditions.VPCEnabled={ "Fn::Not": [
{ "Fn::Equals": [ "",
{ "Fn::Join": [ "", { "Ref": "VPCSecurityGroupIdList" } ] }
| 1 |
diff --git a/RefreshEmptyModQueue.user.js b/RefreshEmptyModQueue.user.js // @description If current mod queue is empty, reload page occasionally
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.2.2
+// @version 1.3
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
initRefresh();
}
+ // When ajax requests have completed
+ $(document).ajaxComplete(function(event, xhr, settings) {
+
+ // If post deleted, remove from queue
+ if(!settings.url.includes('/comments/') && settings.url.includes('/vote/10')) {
+ const pid = settings.url.match(/\/\d+\//)[0].replace(/\//g, '');
+ $('#flagged-' + pid).remove();
+
+ // Refresh if no flags in current queue
+ initRefresh();
+ }
+ });
+
// When flags are handled
$(document).ajaxStop(function(event, xhr, settings) {
+
// Refresh if no flags in current queue
initRefresh();
});
| 2 |
diff --git a/extensions/dbm_dashboard/dashboard_EXT/actions/mods/eval/index.js b/extensions/dbm_dashboard/dashboard_EXT/actions/mods/eval/index.js module.exports = {
run: (DBM, req, res, Dashboard) => {
try {
+ // eslint-disable-next-line no-eval
let evaled = eval(req.body.code)
if (typeof evaled !== 'string') evaled = require('util').inspect(evaled)
return evaled.toString()
| 8 |
diff --git a/website/site/data/updates.yml b/website/site/data/updates.yml updates:
+ - date: 2018-03-06
+ version: '1.3.5'
+ description: Fixes styling issues
+ - date: 2018-03-06
+ version: '1.3.4'
+ description: Fixes editorial workflow entry failure.
+ - date: 2018-03-06
+ version: '1.3.3'
+ description: Fixes load failure
+ - date: 2018-03-06
+ version: '1.3.2'
+ description: Fixes date widget default format, collection load failure when entry fails.
- date: 2018-03-03
version: '1.3.1'
description: Fixes editorial workflow failure for unknown collections.
| 3 |
diff --git a/articles/connections/calling-an-external-idp-api.md b/articles/connections/calling-an-external-idp-api.md @@ -154,3 +154,22 @@ For more information on how to request specific scopes for an Identity Provider
:::
## From the frontend
+
+If you are working with a public client (SPA, native desktop, or mobile app) then this is the place to be.
+
+To recap, the process for calling IdP APIs from a backend process includes the steps:
+1. Get an access token in order to access the Auth0 Management API
+2. Use said token to retrieve the user's full profile from the Auth0 Management API
+3. Extract the IdP's access token from the user's full profile, and use it to call the IdP's API
+
+You cannot follow the same process from a frontend app because it's a public client that **cannot hold credentials securely**. The credential we are referring to, is the non interactive client's secret which you use to make the call to `/oauth/token`, at the first step of the process.
+
+SPA's code can be viewed and altered and native/mobile apps can be decompiled and inspected. As such, they cannot be trusted to hold sensitive information like secret keys or passwords.
+
+There are some alternatives you can use, all of which are listed in this section.
+
+### Option 1: use Auth0.js
+
+### Option 2: build a proxy
+
+### Option 3: use webtasks
| 0 |
diff --git a/pages/bases-locales/publication.js b/pages/bases-locales/publication.js @@ -38,11 +38,11 @@ const getStep = submission => {
}
}
-const PublicationPage = React.memo(({isRedirected, defaultSubmission, initialError, submissionId}) => {
+const PublicationPage = React.memo(({isRedirected, defaultSubmission, submissionError, submissionId}) => {
const [submission, setSubmission] = useState(defaultSubmission)
const [step, setStep] = useState(getStep(submission))
const [authType, setAuthType] = useState()
- const [error, setError] = useState(initialError)
+ const [error, setError] = useState(submissionError)
const handleFile = async file => {
try {
@@ -81,7 +81,10 @@ const PublicationPage = React.memo(({isRedirected, defaultSubmission, initialErr
}, [submission])
useEffect(() => {
+ // Prevent reset submissionError at first render
+ if (step !== 1) {
setError(null)
+ }
}, [step])
useEffect(() => {
@@ -122,7 +125,8 @@ const PublicationPage = React.memo(({isRedirected, defaultSubmission, initialErr
)}
<div className='current-step'>
- {step === 1 && (
+ {/* Hide file handler to prevent the submitmission of a different file from the original */}
+ {!submissionError && step === 1 && (
<ManageFile handleFile={handleFile} error={error} handleError={setError} />
)}
@@ -171,6 +175,7 @@ const PublicationPage = React.memo(({isRedirected, defaultSubmission, initialErr
PublicationPage.getInitialProps = async ({query}) => {
const {url, submissionId} = query
+ const isRedirected = Boolean(url)
let submission
if (submissionId) {
@@ -180,13 +185,14 @@ PublicationPage.getInitialProps = async ({query}) => {
submission = await submissionsBal(decodeURIComponent(url))
} catch (error) {
return {
- initialError: error.message
+ isRedirected,
+ submissionError: error.message
}
}
}
return {
- isRedirected: Boolean(url),
+ isRedirected,
defaultSubmission: submission,
submissionId,
user: {}
@@ -205,14 +211,14 @@ PublicationPage.propTypes = {
publicationUrl: PropTypes.string
}),
submissionId: PropTypes.string,
- initialError: PropTypes.string
+ submissionError: PropTypes.string
}
PublicationPage.defaultProps = {
isRedirected: false,
defaultSubmission: null,
submissionId: null,
- initialError: null
+ submissionError: null
}
export default PublicationPage
| 7 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -678,6 +678,10 @@ metaversefile.setApi({
throw new Error('useResize cannot be called outside of render()');
}
},
+ getAppByInstanceId(instanceId) {
+ const r = _makeRegexp(instanceId);
+ return apps.find(app => r.test(app.instanceId));
+ },
getAppByName(name) {
const r = _makeRegexp(name);
return apps.find(app => r.test(app.name));
| 0 |
diff --git a/phaser.js b/phaser.js @@ -19902,8 +19902,8 @@ PIXI.WebGLSpriteBatch.prototype.render = function (sprite, matrix)
var b = wt.b / resolution;
var c = wt.c / resolution;
var d = wt.d / resolution;
- var tx = sprite.roundPx ? Math.floor(wt.tx) : wt.tx;
- var ty = sprite.roundPx ? Math.floor(wt.ty) : wt.ty;
+ var tx = sprite.roundPx ? wt.tx | 0 : wt.tx;
+ var ty = sprite.roundPx ? wt.ty | 0 : wt.ty;
var ch = texture.crop.height;
| 12 |
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- - uses: actions/[email protected]
+ - uses: actions/[email protected]
with:
# You can target a repository in a different organization
# to the issue
| 12 |
diff --git a/site/src/components/Home.js b/site/src/components/Home.js @@ -455,7 +455,7 @@ class HomePage extends Component {
color: primary,
}}
>
- Read More
+ Read Now
</SecondaryLink>
</div>
</ImageCard>
| 3 |
diff --git a/src/apps.json b/src/apps.json ],
"icon": "BugSnag.png",
"js": {
- "Bugsnag": ""
+ "Bugsnag": "",
+ "bugsnag": "",
+ "bugsnagClient": ""
},
- "script": "bugsnag.*\\.js",
+ "script": "/bugsnag.*\\.js",
"website": "http://bugsnag.com"
},
"Bugzilla": {
| 7 |
diff --git a/src/scss/components/_modal.scss b/src/scss/components/_modal.scss .background {
position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
+ top: -5vh;
+ right: -5vw;
+ bottom: -5vh;
+ left: -5vw;
+ width: auto;
opacity: 0.2;
max-width: none;
| 1 |
diff --git a/.eslintrc.json b/.eslintrc.json "accessor-pairs": "warn",
"array-callback-return": "error",
- "complexity": "warn",
+ "complexity": ["warn", 25],
"consistent-return": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
| 11 |
diff --git a/src/technologies.json b/src/technologies.json "icon": "FancyBox.png",
"implies": "jQuery",
"js": {
- "$.fancybox.version": "^(.+)$\\;version:\\1"
+ "$.fancybox.version": "^(.+)$\\;version:\\1",
+ "jQuery.fancybox.version": "^(.+)$\\;version:\\1",
+ "Fancybox.version": "^(.+)$\\;version:\\1"
},
"scripts": "jquery\\.fancybox(?:\\.pack|\\.min)?\\.js(?:\\?v=([\\d.]+))?$\\;version:\\1",
"website": "http://fancyapps.com/fancybox"
| 7 |
diff --git a/src/ApiGateway.js b/src/ApiGateway.js @@ -919,11 +919,16 @@ module.exports = class ApiGateway {
}
createResourceRoutes() {
- if (!this._options.resourceRoutes) return true
+ if (!this._options.resourceRoutes) {
+ return
+ }
+
const resourceRoutesOptions = this._options.resourceRoutes
const resourceRoutes = parseResources(this._service.resources)
- if (!resourceRoutes || !Object.keys(resourceRoutes).length) return true
+ if (!resourceRoutes || !Object.keys(resourceRoutes).length) {
+ return
+ }
this._printBlankLine()
serverlessLog('Routes defined in resources:')
| 2 |
diff --git a/metaverse_modules/overworld/index.js b/metaverse_modules/overworld/index.js @@ -12,6 +12,9 @@ export default e => {
name: 'street',
type: 'scene',
start_url: './scenes/street.scn',
+ components: {
+ mode: 'detached',
+ },
},
{
name: 'barrier',
| 0 |
diff --git a/server/services/updateViper.php b/server/services/updateViper.php @@ -12,23 +12,23 @@ use headstart\search;
$INI_DIR = dirname(__FILE__) . "/../preprocessing/conf/";
$ini_array = library\Toolkit::loadIni($INI_DIR);
-# persistence is a SQLitePersistence class with added Viper functionalities
-$persistence = new headstart\persistence\ViperUpdater($ini_array["connection"]["sqlite_db"]);
+
# define options
# vis_changed, required: true/false
# object_ids, optional: series of unique object IDs as given by openaire
# funder, optional: funder ID
# project_id, optional: project_id
+# test: flag for testing purposes
$shortopts = "";
$longopts = array(
"vis_changed:",
"object_ids::",
"funder::",
- "project_id::"
+ "project_id::",
+ "test::"
);
-
# parse options and determine action
$options = getopt($shortopts, $longopts);
@@ -43,6 +43,15 @@ if ($options['vis_changed'] == 'true') {
};
+
+# persistence is a SQLitePersistence class with added Viper functionalities
+if (array_key_exists('test', $options)) {
+ $persistence = new headstart\persistence\ViperUpdater('server/storage/headstart_test.sqlite');
+} else {
+ $persistence = new headstart\persistence\ViperUpdater($ini_array["connection"]["sqlite_db"]);
+}
+
+
# main logic
# currently defaults to getCandidates if no specific action is identified
if ($action == 'getByObjectIDs') {
@@ -120,8 +129,6 @@ function runUpdate($acronymtitle, $params) {
$decoded_params = decodeParams($params);
$post_params = $decoded_params[0];
$param_types = $decoded_params[1];
- var_dump($param_types);
- var_dump($post_params);
$result = search("openaire", $acronymtitle,
$params, $param_types,
";", null, false, false);
| 3 |
diff --git a/components/slack/new-message-in-conversation.js b/components/slack/new-message-in-conversation.js const slack = require('https://github.com/PipedreamHQ/pipedream/components/slack/slack.app.js')
-
module.exports = {
name: "Slack - New Message In Conversation(s)",
dedupe: "unique",
@@ -77,6 +76,13 @@ module.exports = {
}
return record.val
},
+ async getBotName(id) {
+ return this.maybeCached(`bots:${id}`, async () => {
+ const info = await this.slack.sdk().bots.info({ bot: id })
+ if (!info.ok) throw new Error(info.error)
+ return info.bot.name
+ })
+ },
async getUserName(id) {
return this.maybeCached(`users:${id}`, async () => {
const info = await this.slack.sdk().users.info({ user: id })
@@ -108,7 +114,7 @@ module.exports = {
},
},
async run(event) {
- if (event.subtype != null) {
+ if (event.subtype != null && event.subtype != "bot_message") {
// This source is designed to just emit an event for each new message received.
// Due to inconsistencies with the shape of message_changed and message_deleted
// events, we are ignoring them for now. If you want to handle these types of
@@ -120,13 +126,22 @@ module.exports = {
return
}
if (this.resolveNames) {
+ if (event.user) {
event.user_id = event.user
event.user = await this.getUserName(event.user)
+ } else if (event.bot_id) {
+ event.bot = await this.getBotName(event.bot_id)
+ }
event.channel_id = event.channel
event.channel = await this.getConversationName(event.channel)
+ if (event.team) {
event.team_id = event.team
event.team = await this.getTeamName(event.team)
}
+ }
+ if (!event.client_msg_id) {
+ event.client_msg_id = `${Date.now()}-${Math.random().toString(36).substr(2, 10)}`
+ }
this.$emit(event, { id: event.client_msg_id })
},
| 9 |
diff --git a/test/tests.js b/test/tests.js @@ -15,6 +15,7 @@ import "./base/DateComboBox.tests.js";
import "./base/DelegateFocusMixin.tests.js";
import "./base/DirectionCursorMixin.tests.js";
import "./base/Explorer.tests.js";
+import "./base/FilterListBox.tests.js";
import "./base/FormElementMixin.tests.js";
import "./base/ItemsAPIMixin.tests.js";
import "./base/ItemsCursorMixin.tests.js";
| 8 |
diff --git a/src/os/ui/header/scrollheader.js b/src/os/ui/header/scrollheader.js @@ -92,11 +92,7 @@ os.ui.header.ScrollHeaderCtrl = function($scope, $element, $timeout, $attrs) {
* @type {boolean}
* @private
*/
- // Turning off position: sticky as there are some issues with z-index
- // and creating new stacking contexts. Return this line once those
- // issues are addressed.
- // this.supportsSticky_ = Modernizr.csspositionsticky || false;
- this.supportsSticky_ = false;
+ this.supportsSticky_ = Modernizr.csspositionsticky || false;
if (this.supportsSticky_) {
this.timeout_(function() {
this.element_.css('position', 'sticky');
| 1 |
diff --git a/src/core/operations/ToTable.mjs b/src/core/operations/ToTable.mjs @@ -20,7 +20,7 @@ class ToTable extends Operation {
this.name = "To Table";
this.module = "Default";
- this.description = "Data can be split on different characters and rendered as an HTML or ASCII table with an optional header row.<br><br>Supports the CSV (Comma Separated Values) file format by default. Change the cell delimiter argument to <code>\\t</code> to support TSV (Tab Separated Values) or <code>|</code> for PSV (Pipe Separated Values).<br><br>You can enter as many delimiters as you like. Each character will be treat as a separate possible delimiter.";
+ this.description = "Data can be split on different characters and rendered as an HTML, ASCII or Markdown table with an optional header row.<br><br>Supports the CSV (Comma Separated Values) file format by default. Change the cell delimiter argument to <code>\\t</code> to support TSV (Tab Separated Values) or <code>|</code> for PSV (Pipe Separated Values).<br><br>You can enter as many delimiters as you like. Each character will be treat as a separate possible delimiter.";
this.infoURL = "https://wikipedia.org/wiki/Comma-separated_values";
this.inputType = "string";
this.outputType = "html";
@@ -43,7 +43,7 @@ class ToTable extends Operation {
{
"name": "Format",
"type": "option",
- "value": ["ASCII", "HTML"]
+ "value": ["ASCII", "HTML", "Markdown"]
}
];
}
@@ -66,6 +66,10 @@ class ToTable extends Operation {
case "ASCII":
return asciiOutput(tableData);
case "HTML":
+ return htmlOutput(tableData);
+ case "Markdown":
+ return markdownOutput(tableData);
+
default:
return htmlOutput(tableData);
}
@@ -183,6 +187,53 @@ class ToTable extends Operation {
return output;
}
}
+
+ function markdownOutput(tableData) {
+ const headerDivider = "-";
+ const verticalBorder = "|";
+
+ let output = "";
+ const longestCells = [];
+
+ // Find longestCells value per column to pad cells equally.
+ tableData.forEach(function(row, index) {
+ row.forEach(function(cell, cellIndex) {
+ if (longestCells[cellIndex] === undefined || cell.length > longestCells[cellIndex]) {
+ longestCells[cellIndex] = cell.length;
+ }
+ });
+ });
+
+ // Ignoring the checkbox, as current Mardown renderer in CF doesn't handle table without headers
+ const row = tableData.shift();
+ output += outputRow(row, longestCells);
+ let rowOutput = verticalBorder;
+ row.forEach(function(cell, index) {
+ rowOutput += " " + headerDivider + " " + verticalBorder;
+ });
+ output += rowOutput += "\n";
+
+ // Add the rest of the table rows.
+ tableData.forEach(function(row, index) {
+ output += outputRow(row, longestCells);
+ });
+
+ return output;
+
+ /**
+ * Outputs a row of correctly padded cells.
+ */
+ function outputRow(row, longestCells) {
+ let rowOutput = verticalBorder;
+ row.forEach(function(cell, index) {
+ rowOutput += " " + cell + " ".repeat(longestCells[index] - cell.length) + " " + verticalBorder;
+ });
+ rowOutput += "\n";
+ return rowOutput;
+ }
+
+ }
+
}
}
| 0 |
diff --git a/test/unit/util/project-fetcher-hoc.test.jsx b/test/unit/util/project-fetcher-hoc.test.jsx @@ -35,11 +35,17 @@ describe('ProjectFetcherHOC', () => {
expect(mockSetProjectIdFunc.mock.calls[0][0]).toBe('100');
});
test('when there is a reduxProjectId and isFetchingWithProjectId is true, it loads the project', () => {
+ const mockedOnFetchedProject = jest.fn();
const originalLoad = storage.load;
storage.load = jest.fn((type, id) => Promise.resolve({data: id}));
const Component = ({projectId}) => <div>{projectId}</div>;
const WrappedComponent = ProjectFetcherHOC(Component);
- const mounted = mountWithIntl(<WrappedComponent store={store} />);
+ const mounted = mountWithIntl(
+ <WrappedComponent
+ store={store}
+ onFetchedProjectData={mockedOnFetchedProject}
+ />
+ );
mounted.setProps({
reduxProjectId: '100',
isFetchingWithId: true,
@@ -49,5 +55,10 @@ describe('ProjectFetcherHOC', () => {
storage.AssetType.Project, '100', storage.DataFormat.JSON
);
storage.load = originalLoad;
+ // nextTick needed since storage.load is async, and onFetchedProject is called in its then()
+ process.nextTick(
+ () => expect(mockedOnFetchedProject)
+ .toHaveBeenLastCalledWith('100', LoadingState.FETCHING_WITH_ID)
+ );
});
});
| 7 |
diff --git a/app/src/scripts/dataset/dataset.statuses.jsx b/app/src/scripts/dataset/dataset.statuses.jsx @@ -25,6 +25,7 @@ class Statuses extends Reflux.Component {
return (
<span className="clearfix status-wrap">
+ <Status type="stars" title={stars} display={true} />
<Status
type="public"
minimal={minimal}
@@ -44,7 +45,6 @@ class Statuses extends Reflux.Component {
display={status.invalid && minimal}
/>
<Status type="monitored" display={uploaderSubscribed} />
- <Status type="stars" title={stars} display={true} />
</span>
)
}
| 5 |
diff --git a/token-metadata/0xBd2949F67DcdC549c6Ebe98696449Fa79D988A9F/metadata.json b/token-metadata/0xBd2949F67DcdC549c6Ebe98696449Fa79D988A9F/metadata.json "symbol": "EMTRG",
"address": "0xBd2949F67DcdC549c6Ebe98696449Fa79D988A9F",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/traces/surface/convert.js b/src/traces/surface/convert.js @@ -105,10 +105,6 @@ function isColormapCircular(colormap) {
);
}
-var highlyComposites = [1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260];
-
-var MIN_RESOLUTION = 140; //35; //highlyComposites[9];
-
var shortPrimes = [
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,
101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199,
@@ -143,68 +139,94 @@ function getFactors(a) {
return powers;
}
+function greatestCommonDivisor(a, b) {
+ var A = getFactors(a);
+ var B = getFactors(b);
+
+ var n = 1;
+ for(var i = 0; i < shortPrimes.length; i++) {
+ n *= Math.min(A[i], B[i]);
+ }
+
+ return n;
+}
+
+function leastCommonMultiple(a, b) {
+ return (a * b) / greatestCommonDivisor(a, b);
+}
+
+function leastSingleDivisor(a) {
+ var A = getFactors(a);
+
+ for(var i = shortPrimes.length - 1; i >= 0; i--) {
+ if (A[i] > 1) {
+ return A[i]
+ }
+ }
+ return a;
+}
+
proto.calcXstep = function(xlen) {
- var maxDist = this.getXat(0, 0) - this.getXat(xlen - 1, 0)
+ var maxDist = Math.abs(this.getXat(0, 0) - this.getXat(xlen - 1, 0));
var minDist = Infinity;
for(var i = 1; i < xlen; i++) {
- var dist = this.getXat(i, 0) - this.getXat(i - 1, 0);
+ var dist = Math.abs(this.getXat(i, 0) - this.getXat(i - 1, 0));
if(minDist > dist) {
minDist = dist;
}
}
- console.log("minDist=", minDist);
- console.log("maxDist=", maxDist);
-
return (minDist === Infinity || maxDist === 0) ? 1 : minDist / maxDist;
}
proto.calcYstep = function(ylen) {
- var maxDist = this.getYat(0, 0) - this.getYat(0, ylen - 1)
+ var maxDist = Math.abs(this.getYat(0, 0) - this.getYat(0, ylen - 1));
var minDist = Infinity;
for(var i = 1; i < ylen; i++) {
- var dist = this.getYat(0, i) - this.getYat(0, i - 1);
+ var dist = Math.abs(this.getYat(0, i) - this.getYat(0, i - 1));
if(minDist > dist) {
minDist = dist;
}
}
- console.log("minDist=", minDist);
- console.log("maxDist=", maxDist);
-
return (minDist === Infinity || maxDist === 0) ? 1 : minDist / maxDist;
}
-proto.estimateScale = function(width, height) {
+var highlyComposites = [1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260];
+
+var MIN_RESOLUTION = highlyComposites[7];
+var MAX_RESOLUTION = highlyComposites[14];
- var res = Math.max(width, height);
+proto.estimateScale = function(width, height) {
- console.log("width=", width);
- console.log("height=", height);
+ var resSrc = Math.max(width, height);
var xStep = this.calcXstep(width);
var yStep = this.calcYstep(height);
- console.log("xStep=", xStep);
- console.log("yStep=", yStep);
- console.log("1/xStep=", 1/xStep);
- console.log("1/yStep=", 1/yStep);
+ var xSegs = Math.round(1.0 / xStep);
+ var ySegs = Math.round(1.0 / yStep);
- var scale = MIN_RESOLUTION / res;
- return (scale > 1) ? scale : 1;
-};
+ console.log("xSegs=", xSegs);
+ console.log("ySegs=", ySegs);
+ var resDst = leastCommonMultiple(xSegs, ySegs);
+ console.log("BEFORE: resDst=", resDst);
-/*
-proto.estimateScale = function(width, height) {
+ while(resDst < MIN_RESOLUTION) {
+ resDst *= leastSingleDivisor(resDst);
+ }
- var res = Math.max(width, height);
+ while(resDst > MAX_RESOLUTION) {
+ resDst *= 2
+ }
+
+ console.log("AFTER: resDst=", resDst);
- var scale = MIN_RESOLUTION / res;
+ var scale = resDst / resSrc;
return (scale > 1) ? scale : 1;
};
-*/
proto.refineCoords = function(coords) {
| 4 |
diff --git a/src/renderer/home/index.jsx b/src/renderer/home/index.jsx @@ -115,7 +115,7 @@ class Home extends PureComponent {
className={classes.scrollFix}
>
<Grid item>
- <SKLogo />
+ <img src={SKLogo} />
</Grid>
{/* <Grid item>
<Typography variant="h2" className={classes.primaryTintText}>
| 1 |
diff --git a/avatars/vrarmik/ShoulderTransforms.js b/avatars/vrarmik/ShoulderTransforms.js @@ -6,14 +6,23 @@ import VRArmIK from './VRArmIK.js';
class ShoulderTransforms {
constructor(rig) {
this.chest = new THREE.Object3D();
+ this.chest.name = 'ikChest';
this.upperChest = new THREE.Object3D();
+ this.upperChest.name = 'ikUpperChest';
this.root = new THREE.Object3D();
+ this.root.name = 'ikRoot';
this.hips = new THREE.Object3D();
+ this.hips.name = 'ikHips';
this.spine = new THREE.Object3D();
+ this.spine.name = 'ikSpine';
this.neck = new THREE.Object3D();
+ this.neck.name = 'ikNeck';
this.head = new THREE.Object3D();
+ this.head.name = 'ikHead';
this.eyel = new THREE.Object3D();
+ this.eyel.name = 'ikEyeLeft';
this.eyer = new THREE.Object3D();
+ this.eyer.name = 'ikEyeRight';
this.root.add(this.hips);
this.hips.add(this.spine);
@@ -29,8 +38,10 @@ class ShoulderTransforms {
// this.transform.add(this.rightShoulder);
this.leftShoulderAnchor = new THREE.Object3D();
+ this.leftShoulderAnchor.name = 'ikLeftShoulder';
this.upperChest.add(this.leftShoulderAnchor);
this.rightShoulderAnchor = new THREE.Object3D();
+ this.rightShoulderAnchor.name = 'ikRightShoulder';
this.upperChest.add(this.rightShoulderAnchor);
this.leftArm = new ArmTransforms();
| 0 |
diff --git a/layouts/partials/helpers/fragments.html b/layouts/partials/helpers/fragments.html {{- $name := replace .Name "/index" "" -}}
{{- if ne $root.File nil -}}
{{- $directory_same_name := in ($page_scratch.Get "fragments_directory_name") (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
- {{- if and (not .Params.disabled) (isset .Params "fragment") (not (where ($page_scratch.Get "page_fragments") ".Name" $name)) (not $directory_same_name) -}}
+ {{- if and (not .Params.disabled) (isset .Params "fragment") (not $directory_same_name) -}}
{{- if or $is_404 (ne .Params.fragment "404") -}}
- {{- if eq .Params.fragment "config" -}}
+ {{- if and (eq .Params.fragment "config") (not (where ($page_scratch.Get "page_config") ".Name" $name)) -}}
{{- $page_scratch.Add "page_config" . -}}
- {{- else -}}
+ {{- else if not (where ($page_scratch.Get "page_fragments") ".Name" $name) -}}
{{- $page_scratch.Add "page_fragments" . -}}
{{- $page_scratch.Add "fragments_directory_name" (printf "%s%s/" $root.File.Dir (replace $name ".md" "")) -}}
{{- if isset .Params "padding" -}}
| 2 |
diff --git a/webpack/builder/webpack.prod.config.js b/webpack/builder/webpack.prod.config.js // more control of the output bundle in order to fix unexpected behavior in old browsers.
const webpack = require('webpack');
+const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+const WebpackDeleteAfterEmit = require('webpack-delete-after-emit');
const { resolve } = require('path');
-const PACKAGE = require('../../package.json');
-const version = PACKAGE.version;
+const { version } = require('../../package.json');
+const entryPoints = require('./entryPoints');
+const rootDir = file => resolve(__dirname, '../../', file);
const isVendor = (module, count) => {
const userRequest = module.userRequest;
return userRequest && userRequest.indexOf('node_modules') >= 0;
};
-const entryPoints = {
- builder_embed: ['whatwg-fetch', resolve(__dirname, '../../', 'lib/assets/javascripts/builder/public_editor.js')],
- dataset: resolve(__dirname, '../../', 'lib/assets/javascripts/builder/dataset.js'),
- builder: resolve(__dirname, '../../', 'lib/assets/javascripts/builder/editor.js')
-};
-
module.exports = env => {
return {
entry: entryPoints,
output: {
filename: `${version}/javascripts/[name].js`,
- path: resolve(__dirname, '../../', 'public/assets')
+ path: rootDir('public/assets')
},
resolve: {
modules: require('../common/modules.js'),
@@ -68,6 +66,27 @@ module.exports = env => {
__ENV__: JSON.stringify('prod')
}),
+ new ExtractTextPlugin({
+ filename: `./${version}/stylesheets/[name].css`
+ }),
+
+ new CopyWebpackPlugin([
+ {
+ from: rootDir('app/assets/images'),
+ to: `./${version}/images/`,
+ toType: 'dir'
+ }
+ ]),
+
+ new WebpackDeleteAfterEmit({
+ globs: [
+ `${version}/javascripts/common_editor3.js`,
+ `${version}/javascripts/common_editor3.js.map`,
+ `${version}/javascripts/editor3.js`,
+ `${version}/javascripts/editor3.js.map`
+ ]
+ }),
+
// Minify
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
@@ -91,7 +110,7 @@ module.exports = env => {
test: /\.js$/,
loader: 'shim-loader',
include: [
- resolve(__dirname, '../../', 'node_modules/internal-carto.js')
+ rootDir('node_modules/internal-carto.js')
],
options: {
shim: {
@@ -111,20 +130,69 @@ module.exports = env => {
test: /\.tpl$/,
use: 'tpl-loader',
include: [
- resolve(__dirname, '../../', 'lib/assets/javascripts/builder'),
- resolve(__dirname, '../../', 'lib/assets/javascripts/dashboard'),
- resolve(__dirname, '../../', 'lib/assets/javascripts/deep-insights'),
- resolve(__dirname, '../../', 'node_modules/internal-carto.js')
+ rootDir('lib/assets/javascripts/builder'),
+ rootDir('lib/assets/javascripts/dashboard'),
+ rootDir('lib/assets/javascripts/deep-insights'),
+ rootDir('node_modules/internal-carto.js')
]
},
{
test: /\.mustache$/,
use: 'raw-loader',
include: [
- resolve(__dirname, '../../', 'lib/assets/javascripts/builder'),
- resolve(__dirname, '../../', 'lib/assets/javascripts/deep-insights'),
- resolve(__dirname, '../../', 'node_modules/internal-carto.js')
+ rootDir('lib/assets/javascripts/builder'),
+ rootDir('lib/assets/javascripts/deep-insights'),
+ rootDir('node_modules/internal-carto.js')
]
+ },
+ {
+ test: /\.s?css$/,
+ use: ExtractTextPlugin.extract({
+ use: [
+ {
+ loader: 'css-loader',
+ options: {
+ alias: {
+ // This is because of Carto.js _leaflet partial
+ '../../img': '../img'
+ },
+ sourceMap: false
+ }
+ },
+ {
+ loader: 'sass-loader',
+ options: {
+ data: `$assetsDir: "/assets/${version}";`,
+ sourceMap: false,
+ includePaths: [
+ rootDir('node_modules/cartoassets/src/scss')
+ ]
+ }
+ }
+ ]
+ })
+ },
+ {
+ test: /\.(ttf|eot|woff|woff2|svg)(.+#.+)?$/,
+ use: {
+ loader: 'file-loader',
+ options: {
+ name: `[name].[ext]`,
+ outputPath: `${version}/fonts/`,
+ publicPath: `/assets/${version}/fonts/`
+ }
+ }
+ },
+ {
+ test: /\.(png|gif)$/,
+ use: {
+ loader: 'file-loader',
+ options: {
+ name: `[name].[ext]`,
+ outputPath: `${version}/images/`,
+ publicPath: `/assets/${version}/images/`
+ }
+ }
}
]
},
| 4 |
diff --git a/src/components/selections/select.js b/src/components/selections/select.js @@ -26,9 +26,7 @@ var newSelections = require('./draw_newselection/newselections');
var Lib = require('../../lib');
var polygon = require('../../lib/polygon');
var throttle = require('../../lib/throttle');
-var axisIds = require('../../plots/cartesian/axis_ids');
-var getFromId = axisIds.getFromId;
-var id2name = axisIds.id2name;
+var getFromId = require('../../plots/cartesian/axis_ids').getFromId;
var clearGlCanvases = require('../../lib/clear_gl_canvases');
var redrawReglTraces = require('../../plot_api/subroutines').redrawReglTraces;
@@ -693,6 +691,8 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
if(!gd.calcdata) return [];
var searchTraces = [];
+ var xAxisIds = xAxes.map(getAxId);
+ var yAxisIds = yAxes.map(getAxId);
var cd, trace, i;
for(i = 0; i < gd.calcdata.length; i++) {
@@ -704,30 +704,16 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
} else if(trace.type === 'splom') {
- var fullLayout = gd._fullLayout;
- var splomAxes = fullLayout._splomAxes;
- var xSplomAxesIds = Object.keys(splomAxes.x);
- var ySplomAxesIds = Object.keys(splomAxes.y);
-
- for(var j = 0; j < xSplomAxesIds.length; j++) {
- for(var k = 0; k < ySplomAxesIds.length; k++) {
- var info = createSearchInfo(trace._module, cd,
- fullLayout[id2name(xSplomAxesIds[j])],
- fullLayout[id2name(ySplomAxesIds[k])]
- );
+ // FIXME: make sure we don't have more than single axis for splom
+ if(trace._xaxes[xAxisIds[0]] && trace._yaxes[yAxisIds[0]]) {
+ var info = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
info.scene = gd._fullLayout._splomScenes[trace.uid];
searchTraces.push(info);
}
- }
- } else if(
- trace.type === 'sankey'
- ) {
+ } else if(trace.type === 'sankey') {
var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
searchTraces.push(sankeyInfo);
} else {
- var xAxisIds = xAxes.map(getAxId);
- var yAxisIds = yAxes.map(getAxId);
-
if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
| 13 |
diff --git a/appveyor.yml b/appveyor.yml @@ -186,9 +186,7 @@ install:
# [1]: https://github.com/felixrieseberg/windows-build-tools
# [2]: https://github.com/nodejs/node-gyp#installation
- cmd: npm install --global --production windows-build-tools
- - cmd: set PATH=%PATH:C:\msys64\usr\bin\python2.EXE;=%
- - cmd: set PATH=%USERPROFILE%\.windows-build-tools\python27;%PATH%
- - cmd: echo %PATH%
+ - cmd: npm config set python "%USERPROFILE%\.windows-build-tools\python27\python.exe"
# Perform installation tasks:
- cmd: '%WIN_MAKE% install'
| 12 |
diff --git a/src/v2-routes/v2-capsules.js b/src/v2-routes/v2-capsules.js const express = require("express")
const v2 = express.Router()
+const asyncHandle = require("express-async-handler")
-// Returns all capsule data
-v2.get("/", (req, res, next) => {
- global.db.collection("dragon").find({},{"_id": 0 }).toArray((err, doc) => {
- if (err) {
- return next(err)
- }
- res.json(doc)
- })
-})
+// Returns all Dragon data
+v2.get("/", asyncHandle(async (req, res) => {
+ const data = await global.db
+ .collection("dragon")
+ .find({},{"_id": 0 })
+ .toArray()
+ res.json(data)
+}))
-// Returns Dragon data
-v2.get("/:capsule", (req, res, next) => {
+// Returns specific Dragon data
+v2.get("/:capsule", asyncHandle(async (req, res) => {
const capsule = req.params.capsule
- global.db.collection("dragon").find({"id": capsule},{"_id": 0 }).toArray((err, doc) => {
- if (err) {
- return next(err)
- }
- res.json(doc)
- })
-})
+ const data = global.db
+ .collection("dragon")
+ .find({"id": capsule},{"_id": 0 })
+ .toArray()
+ res.json(data)
+}))
module.exports = v2
| 3 |
diff --git a/src/containers/language-selector.jsx b/src/containers/language-selector.jsx @@ -13,11 +13,13 @@ class LanguageSelector extends React.Component {
bindAll(this, [
'handleChange'
]);
+ document.documentElement.lang = this.props.currentLocale;
}
handleChange (e) {
const newLocale = e.target.value;
if (this.props.supportedLocales.includes(newLocale)) {
this.props.onChangeLanguage(newLocale);
+ document.documentElement.lang = newLocale;
}
}
render () {
@@ -27,7 +29,6 @@ class LanguageSelector extends React.Component {
children,
...props
} = this.props;
- document.documentElement.lang = this.props.currentLocale; //update the lang attribute of the html for screenreaders
return (
<LanguageSelectorComponent
onChange={this.handleChange}
| 12 |
diff --git a/packages/vulcan-lib/lib/server/mutators.js b/packages/vulcan-lib/lib/server/mutators.js @@ -89,8 +89,9 @@ export const createMutator = async ({ collection, document, data, currentUser, v
for(let fieldName of Object.keys(schema)) {
let autoValue;
if (schema[fieldName].onCreate) {
+ // OpenCRUD backwards compatibility: keep both newDocument and data for now, but phase our newDocument eventually
// eslint-disable-next-line no-await-in-loop
- autoValue = await schema[fieldName].onCreate({ newDocument: clone(newDocument), currentUser });
+ autoValue = await schema[fieldName].onCreate({ newDocument: clone(newDocument), data: clone(newDocument), currentUser });
} else if (schema[fieldName].onInsert) {
// OpenCRUD backwards compatibility
// eslint-disable-next-line no-await-in-loop
| 10 |
diff --git a/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js b/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js @@ -6,7 +6,13 @@ import { activatePlugin, createURL, visitAdminPage } from '@wordpress/e2e-test-u
/**
* Internal dependencies
*/
-import { wpApiFetch, deactivateAllOtherPlugins, resetSiteKit } from '../../../utils';
+import {
+ deactivateAllOtherPlugins,
+ resetSiteKit,
+ setSearchConsoleProperty,
+ wpApiFetch,
+ useRequestInterception,
+} from '../../../utils';
async function proceedToSetUpAnalytics() {
await Promise.all( [
@@ -29,13 +35,7 @@ const setReferenceUrl = async() => {
describe( 'setting up the Analytics module with an existing account and no existing tag', () => {
beforeAll( async() => {
await page.setRequestInterception( true );
- page.on( 'request', request => {
- if ( ! request._allowInterception ) {
-
- // prevent errors for requests that happen after interception is disabled.
- return;
- }
-
+ useRequestInterception( request => {
if ( request.url().startsWith( 'https://accounts.google.com/o/oauth2/auth' ) ) {
request.respond( {
status: 302,
@@ -63,6 +63,7 @@ describe( 'setting up the Analytics module with an existing account and no exist
await activatePlugin( 'e2e-tests-site-verification-plugin' );
await activatePlugin( 'e2e-tests-oauth-callback-plugin' );
await activatePlugin( 'e2e-tests-module-setup-analytics-api-mock' );
+ await setSearchConsoleProperty();
await visitAdminPage( 'admin.php', 'page=googlesitekit-settings' );
await page.waitForSelector( '.mdc-tab-bar' );
| 3 |
diff --git a/components/circle-link.js b/components/circle-link.js @@ -3,11 +3,11 @@ import PropTypes from 'prop-types'
import theme from '@/styles/theme'
-function CircleLink({size, href, isExternal, icon, fontSize, isImportant, isDisable, children}) {
+function CircleLink({size, href, isExternal, icon, label, fontSize, isImportant, isDisable, children}) {
return (
<>
{isExternal ? (
- <a href={href} className={isDisable ? 'disable' : ''}>
+ <a href={href} className={isDisable ? 'disable' : ''} aria-label={label ? label : children}>
<div className='circle'>
{icon}
</div>
@@ -15,7 +15,7 @@ function CircleLink({size, href, isExternal, icon, fontSize, isImportant, isDisa
</a>
) : (
<Link href={href}>
- <a className={isDisable ? 'disable' : ''}>
+ <a className={isDisable ? 'disable' : ''} aria-label={label ? label : children}>
<div className='circle'>
{icon}
</div>
@@ -71,6 +71,7 @@ CircleLink.propTypes = {
size: PropTypes.string.isRequired,
href: PropTypes.string.isRequired,
icon: PropTypes.object.isRequired,
+ label: PropTypes.string,
fontSize: PropTypes.string,
children: PropTypes.node,
isExternal: PropTypes.bool,
@@ -84,6 +85,7 @@ CircleLink.defaultProps = {
isExternal: false,
isDisable: false,
isImportant: false,
+ label: null
}
export default CircleLink
| 0 |
diff --git a/src/leader-election.js b/src/leader-election.js @@ -90,6 +90,19 @@ LeaderElection.prototype = {
return PROMISE_RESOLVED_TRUE;
}
let stopCriteria = false;
+ let stopCriteriaPromiseResolve;
+ /**
+ * Resolves when a stop criteria is reached.
+ * Uses as a performance shortcut so we do not
+ * have to await the responseTime when it is already clear
+ * that the election failed.
+ */
+ const stopCriteriaPromise = new Promise(res => {
+ stopCriteriaPromiseResolve = () => {
+ stopCriteria = true;
+ res();
+ };
+ });
const recieved = [];
const handleMessage = (msg) => {
if (msg.context === 'leader' && msg.token != this.token) {
@@ -101,24 +114,31 @@ LeaderElection.prototype = {
* other has higher token
* -> stop applying and let other become leader.
*/
- stopCriteria = true;
+ stopCriteriaPromiseResolve();
}
}
if (msg.action === 'tell') {
// other is already leader
- stopCriteria = true;
+ stopCriteriaPromiseResolve();
this.hasLeader = true;
}
}
};
this.broadcastChannel.addEventListener('internal', handleMessage);
const applyPromise = _sendMessage(this, 'apply') // send out that this one is applying
- .then(() => sleep(this._options.responseTime / 2))
+ .then(() => Promise.race([
+ sleep(this._options.responseTime / 2),
+ stopCriteriaPromise.then(() => Promise.reject(new Error()))
+ ]))
// send again in case another instance was just created
.then(() => _sendMessage(this, 'apply'))
// let others time to respond
- .then(() => sleep(this._options.responseTime / 2))
+ .then(() => Promise.race([
+ sleep(this._options.responseTime / 2),
+ stopCriteriaPromise.then(() => Promise.reject(new Error()))
+ ]))
+ .catch(() => { })
.then(() => {
this.broadcastChannel.removeEventListener('internal', handleMessage);
if (!stopCriteria) {
| 7 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -38,6 +38,7 @@ import * as procgen from './procgen/procgen.js';
import {getHeight} from './avatars/util.mjs';
import performanceTracker from './performance-tracker.js';
import renderSettingsManager from './rendersettings-manager.js';
+import questManager from './quest-manager.js';
import {murmurhash3} from './procgen/murmurhash3.js';
import debug from './debug.js';
import * as sceneCruncher from './scene-cruncher.js';
@@ -402,6 +403,9 @@ metaversefile.setApi({
useChatManager() {
return chatManager;
},
+ useQuests() {
+ return questManager;
+ },
useLoreAI() {
return loreAI;
},
| 0 |
diff --git a/data/operators/amenity/library.json b/data/operators/amenity/library.json "operator": "Chicago Public Library"
}
},
+ {
+ "displayName": "Cincinnati and Hamilton County Public Library",
+ "id": "cincinnatiandhamiltoncountypubliclibrary-f8d891",
+ "locationSet": {
+ "include": ["us-oh.geojson"]
+ },
+ "matchNames": [
+ "cincinnati public library",
+ "plch",
+ "public library of cincinnati and hamilton county"
+ ],
+ "tags": {
+ "amenity": "library",
+ "operator": "Cincinnati and Hamilton County Public Library",
+ "operator:wikidata": "Q5492644"
+ }
+ },
{
"displayName": "City of San Antonio",
"id": "cityofsanantonio-9284e0",
"operator": "Plymouth City Council"
}
},
- {
- "displayName": "Public Library of Cincinnati and Hamilton County",
- "id": "publiclibraryofcincinnatiandhamiltoncounty-9284e0",
- "locationSet": {"include": ["001"]},
- "tags": {
- "amenity": "library",
- "operator": "Public Library of Cincinnati and Hamilton County"
- }
- },
{
"displayName": "Purdue University",
"id": "purdueuniversity-9284e0",
| 10 |
diff --git a/gobblefile.js b/gobblefile.js @@ -100,7 +100,7 @@ function buildESLib(dest, excludedModules) {
banner: banner,
cache: false,
sourceMap: true
- }).transform(transpile, { accept: ['.js'] }).transform(replacePlaceholders);
+ }).transform(transpile, { accept: ['.js', '.mjs'] }).transform(replacePlaceholders);
}
// Builds a UMD bundle for browser/PhantomJS tests.
| 11 |
diff --git a/browser/lib/transport/xhrrequest.js b/browser/lib/transport/xhrrequest.js @@ -33,8 +33,8 @@ var XHRRequest = (function() {
/* Safari mysteriously returns 'Identity' for transfer-encoding when in fact
* it is 'chunked'. So instead, decide that it is chunked when
* transfer-encoding is present or content-length is absent. ('or' because
- * while streaming does not work with cloudflare, it still strips the
- * transfer-encoding header out) */
+ * when using http2 streaming, there's no transfer-encoding header, but can
+ * still deduce streaming from lack of content-length) */
function isEncodingChunked(xhr) {
return xhr.getResponseHeader
&& (xhr.getResponseHeader('transfer-encoding')
| 7 |
diff --git a/packages/embark/src/lib/modules/deployment/contract_deployer.js b/packages/embark/src/lib/modules/deployment/contract_deployer.js @@ -302,7 +302,7 @@ class ContractDeployer {
next();
},
function estimateCorrectGas(next) {
- if (contract.gas === 'auto') {
+ if (contract.gas === 'auto' || !contract.gas) {
return self.blockchain.estimateDeployContractGas(deployObject, (err, gasValue) => {
if (err) {
return next(err);
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.