code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/public/viewjs/components/productamountpicker.js b/public/viewjs/components/productamountpicker.js @@ -87,7 +87,7 @@ $(".input-group-productamountpicker").on("change", function() else { $("#qu-conversion-info").removeClass("d-none"); - $("#qu-conversion-info").text(__t("This equals %1$s %2$s in stock", destinationAmount.toLocaleString(), destinationQuName)); + $("#qu-conversion-info").text(__t("This equals %1$s %2$s in stock", destinationAmount.toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }), destinationQuName)); } $("#amount").val(destinationAmount.toFixed(4).replace(/0*$/g, ''));
7
diff --git a/src/transporters/amqp.js b/src/transporters/amqp.js @@ -130,7 +130,6 @@ class AmqpTransporter extends Transporter { .createChannel() .then((channel) => { this.channel = channel; - this.onConnected().then(resolve); this.logger.info("AMQP channel is created."); channel.prefetch(this.opts.prefetch); @@ -157,7 +156,10 @@ class AmqpTransporter extends Transporter { .on("return", (msg) => { this.logger.warn("AMQP channel returned a message.", msg); }); + + return this.onConnected(); }) + .then(resolve) .catch((err) => { /* istanbul ignore next*/ this.logger.error("AMQP failed to create channel.");
1
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -501,7 +501,7 @@ Contributions to `monaco-typescript`: - Many improvements in `monaco-typescript`: support for "deprecated" tags, API to participate in the web worker, improved lib.d.ts resolving. - New tokenization support for: Julia, Scala, Lexon, Terraform HCL, Dart, Systemverilog. - New semantic tokens provider [sample on the playground](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-semantic-tokens-provider-example). -- New [shadow dom sample](https://github.com/microsoft/monaco-editor-samples/tree/master/browser-amd-shadow-dom) +- New [shadow dom sample](https://github.com/microsoft/monaco-editor/tree/main/samples/browser-amd-shadow-dom) - New `overflowWidgetsDomNode` constructor option to pass in a parent for overflowing widgets. - New `minimap.size` option: `proportional`, `fill`, `fit`. - New `OnTypeRename` provider and option `renameOnType`.
1
diff --git a/app/stylesheets/builtin-pages/components/files-list.less b/app/stylesheets/builtin-pages/components/files-list.less .item { &:extend(.overflow-ellipsis); - padding: 2px 10px; + padding: 0 10px; -webkit-user-select: none; cursor: pointer; + height: 25px; + line-height: 25px; + + * { + line-height: 25px; + vertical-align: middle; + } &:hover { background: @border-menu;
4
diff --git a/lib/assets/javascripts/dashboard/views/dashboard/dialogs/delete-items/delete-items-view-model.js b/lib/assets/javascripts/dashboard/views/dashboard/dialogs/delete-items/delete-items-view-model.js @@ -40,8 +40,10 @@ module.exports = Backbone.Collection.extend({ if (this.isDeletingDatasets()) { this.setState('LoadingPrerequisites'); + // INFO: Don't request more than 3 in parallel to avoid + // getting 429 due to the API rate limit batchProcessItems({ - howManyInParallel: 5, + howManyInParallel: 1, items: this.toArray(), processItem: this._loadPrerequisitesForModel, done: setStateToConfirmDeletion,
12
diff --git a/src/connectors/pcloud.js b/src/connectors/pcloud.js @@ -13,3 +13,5 @@ Connector.trackArtSelector = `${playerPopupSelector} .cover img`; Connector.currentTimeSelector = `${playerPopupSelector} .playinfo .currtime`; Connector.durationSelector = `${playerPopupSelector} .playinfo .maxtime`; + +Connector.isTrackArtDefault = (url) => url.endsWith('audio.png');
7
diff --git a/docs/rules/no-v-for-template-key-on-child.md b/docs/rules/no-v-for-template-key-on-child.md @@ -20,8 +20,8 @@ In Vue.js 3.x, with the support for fragments, the `<template v-for>` key can be See [Migration Guide - `key` attribute > With `<template v-for>`](https://v3-migration.vuejs.org/breaking-changes/key-attribute.html#with-template-v-for) for more details. ::: warning Note -Do not use with the [vue/no-v-for-template-key] rule for Vue.js 2.x. -This rule conflicts with the [vue/no-v-for-template-key] rule. +This rule is targeted at Vue.js 3.x. +If you are using Vue.js 2.x, enable the [vue/no-v-for-template-key] rule instead. Don't enable both rules together; they are conflicting. ::: <eslint-code-block :rules="{'vue/no-v-for-template-key-on-child': ['error']}">
7
diff --git a/source/components/HOC/GlobalListeners.js b/source/components/HOC/GlobalListeners.js @@ -4,10 +4,10 @@ import React, { Component } from 'react'; import type { SyntheticMouseEvent } from 'react'; import { - addEventsToDocument, - addEventsToWindow, - removeEventsFromDocument, - removeEventsFromWindow, + addDocumentListeners, + addWindowListeners, + removeDocumentListeners, + removeWindowListeners, targetIsDescendant } from '../../utils'; @@ -15,6 +15,7 @@ type Props = { children: Function, optionsIsOpen: boolean, optionsRef: ?Object, + rootRef: ?Object, toggleOpen: Function }; @@ -24,70 +25,65 @@ export class GlobalListeners extends Component<Props> { }; componentWillReceiveProps(nextProps: Props) { - // check if optionsIsOpen is transferring from false to true - if (!this.props.optionsIsOpen && nextProps.optionsIsOpen) { - - // add all event listeners to window - addEventsToWindow(this._getWindowEvents()); - // add all event listeners to document - addEventsToDocument(this._getDocumentEvents()); + const { optionsIsOpen } = this.props; + + // if Options is transferring from closed to open, add listeners + // if Options is transferring from open to closed, remove listeners + if (!optionsIsOpen && nextProps.optionsIsOpen) { + addWindowListeners(this._getWindowListeners()); + addDocumentListeners(this._getDocumentListeners()); + } else if (optionsIsOpen && !nextProps.optionsIsOpen) { + this._removeGlobalListeners(); } } + // before unmounting, remove all global listeners componentWillUnmount() { - // when WindowHelpers unmounts, clear all event listeners from window and document - this._clearWindowAndDocument(); + this._removeGlobalListeners(); } - _removeAllEventsAndCloseOptions = () => { - const { optionsIsOpen, toggleOpen } = this.props; - // if Select is not currently rendering Options, return early - if (!optionsIsOpen) { return; } - - // otherwise remove all event handlers from document and window - // and close Options using Select's toggleOpen method - this._clearWindowAndDocument(); - toggleOpen(); + // removes all event listeners from document and window + _removeGlobalListeners() { + removeDocumentListeners(this._getDocumentListeners()); + removeWindowListeners(this._getWindowListeners()); } - _clearWindowAndDocument() { - removeEventsFromDocument(this._getDocumentEvents()); - removeEventsFromWindow(this._getWindowEvents()); + // removes all global listeners, then closes Options + _removeListenersAndToggle = () => { + const { optionsIsOpen, optionsRef } = this.props; + this._removeGlobalListeners(); + + // before toggle, ensure options is open and optionsRef exists on DOM + if (!optionsIsOpen || !optionsRef || !optionsRef.current) { return; } + this.props.toggleOpen(); } - _getDocumentEvents() { - return { + _getDocumentListeners = () => ({ click: this.handleDocumentClick, scroll: this.handleDocumentScroll - }; - } + }); - _getWindowEvents() { - return { + _getWindowListeners = () => ({ resize: this.handleWindowResize - }; - } + }); handleDocumentClick = (event: SyntheticMouseEvent<>) => { - const { optionsRef } = this.props; - - // check for valid Options ref currently on DOM - if (!optionsRef || !optionsRef.current) { return; } + const { optionsIsOpen, rootRef } = this.props; - // check if user has clicked a DOM element within Options - const isDescendant = targetIsDescendant(event, optionsRef.current); + // ensure Options is open + if (!optionsIsOpen || !rootRef || !rootRef.current) { return; } - // return early - if (isDescendant) { return; } + // return early if the user clicked an element within the parent component + // for example, the parent component could be Autocomplete or Select + if (targetIsDescendant(event, rootRef.current)) { return; } - // user has clicked outside of Options component - // remove all event listeners from document & window, close Options component - this._removeAllEventsAndCloseOptions(); + // otherwise, remove all listeners and close Options + this._removeListenersAndToggle(); }; - handleWindowResize = () => this._removeAllEventsAndCloseOptions(); + handleWindowResize = () => this._removeListenersAndToggle(); - handleDocumentScroll = () => this._removeAllEventsAndCloseOptions(); + handleDocumentScroll = () => this._removeListenersAndToggle(); render() { return <div>{this.props.children()}</div>;
7
diff --git a/lib/HueSensor.js b/lib/HueSensor.js @@ -387,9 +387,9 @@ function HueSensor (accessory, id, obj) { this.createButton(1, 'Button', SINGLE_DOUBLE_LONG) this.type = { key: 'buttonevent', - homekitValue: function (v) { return Math.floor(v / 1000) }, + homekitValue: function (v) { return v % 1000 }, homekitAction: function (v) { - const button = v - 1000 + const button = v % 1000 if (button === SHAKE) { return Characteristic.ProgrammableSwitchEvent.SINGLE_PRESS; } else if (button === DROP) {
7
diff --git a/docs/textinput.md b/docs/textinput.md @@ -638,6 +638,7 @@ The color of the `TextInput` underline. ### `clearButtonMode` When the clear button should appear on the right side of the text view. +This property is supported only for single-line TextInput component. | Type | Required | Platform | | ---------------------------------------------------------- | -------- | -------- |
7
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue win: null, doc: null, html: null, body: null, head: null, app: null, scrollTop: 0, timeout: null, - delay: 50, + delay: 0, mouseOverCmp: null, dimension: {w: 0, h: 0, x: 0, y: 0} },
12
diff --git a/polyfills/Array/prototype/includes/config.json b/polyfills/Array/prototype/includes/config.json "op_mob": "*", "ie_mob": "*", "firefox_mob": "*", - "samsung_mob": "*" + "samsung_mob": "*", + "bb": "10 - *" }, "license": "CC0", "spec": "https://github.com/tc39/Array.prototype.includes",
0
diff --git a/js/luno.js b/js/luno.js @@ -133,7 +133,7 @@ module.exports = class luno extends Exchange { let timestamp = order['creation_timestamp']; let status = (order['state'] === 'PENDING') ? 'open' : 'closed'; let side = (order['type'] === 'ASK') ? 'sell' : 'buy'; - if (typeof market == 'undefined') + if (typeof market === 'undefined') this.findMarket(order['pair']) let symbol = market['symbol']; let price = this.safeFloat (order, 'limit_price');
1
diff --git a/lib/elastic_model/elastic_model.rb b/lib/elastic_model/elastic_model.rb @@ -201,7 +201,7 @@ module ElasticModel return false unless lat.kind_of?(Numeric) && lon.kind_of?(Numeric) return false if lat < -90.0 || lat > 90.0 return false if lon < -180.0 || lon > 180.0 - return false if lat.nan? || lon.nan? + return false if lat.try(:nan?) || lon.try(:nan?) true end
1
diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts @@ -6,7 +6,7 @@ import { declare type PluginHook = () => void declare type PluginHookWithMiddlewareName = (middlewareName: string) => void -declare type PluginHookPromise = (request: Request) => Promise<any> +declare type PluginHookPromise = (request: Request) => Promise<any> | void interface PluginObject { beforePrefetch?: PluginHook
1
diff --git a/src/stores/ParityStore.js b/src/stores/ParityStore.js @@ -37,7 +37,12 @@ export default class ParityStore { const { ipcRenderer, remote } = electron; // Set/Update isParityRunning - this.setIsParityRunning(!!remote.getGlobal('isParityRunning')); + const isParityRunning = !!remote.getGlobal('isParityRunning'); + this.setIsParityRunning(isParityRunning); + // Request new token if there's none + if (isParityRunning && !token) { + this.requestNewToken(); + } ipcRenderer.on('parity-running', (_, isParityRunning) => { this.setIsParityRunning(isParityRunning);
1
diff --git a/README.md b/README.md [![CI](https://github.com/pikapkg/snowpack/workflows/CI/badge.svg?event=push)](https://github.com/pikapkg/snowpack/actions) -<p align="center"> - <img height="420" src="https://imgur.com/uXHFm5y.jpg" alt="cover image"> -</p> +![cover image](https://imgur.com/uXHFm5y.jpg) **Snowpack is a web app build tool that works without bundling.** Thanks to [ESM imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) Snowpack is able to remove the expensive (and unnecesary) bundling step from your dev workflow. That means no startup time spent waiting for your application to bundle PLUS no time wasted rebundling on every change.
3
diff --git a/assets/css/fonts.css b/assets/css/fonts.css } @font-face { - font-family: ExpensifyNewKansas-MediumItalic; + font-family: ExpensifyNewKansas-Medium; font-weight: 500; font-style: italic; src: url('/fonts/ExpensifyNewKansas-MediumItalic.woff2') format('woff2'), url('/fonts/ExpensifyNewKansas-MediumItalic.woff') format('woff');
4
diff --git a/workshops/reinvent2018/readme.md b/workshops/reinvent2018/readme.md @@ -291,13 +291,13 @@ Your AWS Cloud9 environment will begin to be setup. Once its ready continue with * Under getting started select Clone Git Repository * In the terminal window that pops up complete the clone command to be <pre> - git clone https://github.com/bobpskier/aws-qnabot-workshop.git TBD - THIS NEEDS TO BE UPDATED + git clone https://github.com/aws-samples/aws-ai-qna-bot.git </pre> 2) Run a script in your Cloud9 IDE that runs CloudFormation to setup an S3 bucket to host the website and uploads the two files <pre> - cd aws-qnabot-workshop/bin + cd aws-ai-qna-bot/workshops/reinvent2018/bin ./setupwebsite.sh </pre> @@ -387,7 +387,7 @@ that is our Sun. 7) Copy the from your snippet url, open web/index.html in Cloud9, and paste into index.html just below the '\<body\>' tag. -8) From the terminal window in Cloud9 make sure you are in the aws-qnabot-workshop/bin folder. Then run +8) From the terminal window in Cloud9 make sure you are in the aws-ai-qna-bot/workshops/reinvent2018/bin folder. Then run <pre> ./setupwebsite.sh @@ -755,7 +755,7 @@ the following steps: 2) Setup the lambda function by deploying a preconfigured CloudFormation template using sam ```$xslt - cd code/solarflare + cd aws-ai-qna-bot/workshops/reinvent2018/code/solarflare npm install cd ../../bin ./solarflare-setup.sh @@ -855,7 +855,7 @@ For this use case lets use the first argument to indicate how many recent solar 1) Run tests to validate syntax <pre> -cd aws-qnabot-workshoip/code/solarflare +cd aws-ai-qna-bot/workshops/reinvent2018/code/solarflare npm test </pre> @@ -868,7 +868,7 @@ If the tests are successful, continue with the next section to redeploy your fun 1) Execute the following commands to redeploy the updated function. <pre> -cd aws-qnabot-workshoip/code/solarflare +cd aws-ai-qna-bot/workshops/reinvent2018/code/solarflare ./solarflare-pkg.sh ./solarflare-deploy.sh </pre> @@ -957,7 +957,7 @@ Delete manually created resources throughout the laUbs: * Use your AWS Cloud9 IDE's terminal to remove the sample web site ```$xslt -cd aws-qnabot-workshop/bin +cd aws-ai-qna-bot/workshops/reinvent2018/bin ./removewebsite.sh ``` * Use the AWS Cloud9 Dashboard to Delete your development environment
3
diff --git a/components/mapbox/hooks/sources.js b/components/mapbox/hooks/sources.js @@ -37,6 +37,7 @@ function useSources(contour, voies, numeros, numero) { if (numero) { sources.push({ + generateId: true, name: 'positions', type: 'geojson', data: adresseToPositionsGeoJson(numero)
0
diff --git a/public/assets/homepage.js b/public/assets/homepage.js @@ -134,27 +134,31 @@ function logWebpageActivity(activity){ }); } +var vidBanner, bannerVid, + instructVideoContainer, instructVideos; +var DEFAULT_VIDEO = 1; +var TICK_SIZE = 500, requiredTicks = [18, 22, 17], + curVideo = 1, numTicks = 0; -$( document ).ready(function() { - - switchToVideo(1); +// Advances to the next instruction video if the instruction videos are in the user's viewport +// and enough "ticks" have gone by function autoAdvanceLaptopVideos() { - if (autoAdvanceLaptop) switchToVideo(1); - setTimeout(function () { - if (autoAdvanceLaptop) switchToVideo(2); - setTimeout(function () { - if (autoAdvanceLaptop) switchToVideo(3); - setTimeout(function () { - autoAdvanceLaptopVideos() - - }, 9000); - - }, 11000); - }, 9660); + numTicks++; + + if(numTicks >= requiredTicks[curVideo - 1] && isElementVerticallyVisible(instructVideoContainer)) { + numTicks = 0; + curVideo++; + + if(curVideo > requiredTicks.length) { + curVideo = DEFAULT_VIDEO; } - autoAdvanceLaptopVideos(); + switchToVideo(curVideo); + } +} + +$( document ).ready(function() { // Triggered when "Watch Now" or the arrow next to it is clicked // Logs "Click_module=WatchNow" in WebpageActivityTable $("#playlink").on('click', function(e){ @@ -202,10 +206,13 @@ $( document ).ready(function() { instructVideos = [$('#vid1')[0], $('#vid2')[0], $('#vid3')[0]]; + + // Auto advance instruction videos + switchToVideo(DEFAULT_VIDEO); + setInterval(autoAdvanceLaptopVideos, 500); }); -var vidBanner, bannerVid, - instructVideoContainer, instructVideos; +var pausedVideos = {}; // Throttle to 1 call/second to avoid lag var lazyPlayVideosThrottled = _.throttle(lazyPlayVideos, 1000); @@ -227,14 +234,16 @@ function lazyPlayVideos() { // Pauses a video if a certain element is outside of the viewport. // Plays the video otherwise. function lazyPlay(el, video) { - //console.log("inView = " + isElementInViewport(el), "isPlaying = " + isVideoPlaying(video)); + //console.log("inView = " + isElementVerticallyVisible(el), "isPlaying = " + isVideoPlaying(video)); if(isElementVerticallyVisible(el)) { if(!isVideoPlaying(video)) { + pausedVideos[video] = false; video.play(); } } else { if(isVideoPlaying(video)) { + pausedVideos[video] = true; video.pause(); } } @@ -242,15 +251,13 @@ function lazyPlay(el, video) { // Returns true if the given video is playing function isVideoPlaying(video) { - return video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2; + return !pausedVideos[video]; } // Returns true if the given element is in the vertical viewport function isElementVerticallyVisible(el) { var rect = el.getBoundingClientRect(); + var windowHeight = (window.innerHeight || document.documentElement.clientHeight); - return ( - rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && - rect.bottom >= 0 - ); + return (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0); } \ No newline at end of file
7
diff --git a/edit.js b/edit.js @@ -500,7 +500,7 @@ const [ canvas.width = 8192; canvas.height = 8192; const texture = new THREE.Texture(canvas); - texture.anisotropy = 16; + // texture.anisotropy = 16; texture.flipY = false; texture.needsUpdate = true; const material = new THREE.MeshBasicMaterial({ @@ -928,7 +928,7 @@ const [ canvas.width = 8192; canvas.height = 8192; const texture = new THREE.Texture(canvas); - texture.anisotropy = 16; + // texture.anisotropy = 16; texture.flipY = false; texture.needsUpdate = true;
2
diff --git a/src/components/ProductItem/styles.js b/src/components/ProductItem/styles.js @@ -53,18 +53,8 @@ export const styles = (theme) => ({ top: theme.spacing.unit }, "img": { - // height: "auto", width: "100%", - objectFit: "cover", - [theme.breakpoints.down("sm")]: { - height: 3200 - }, - [theme.breakpoints.down("md")]: { - height: 225 - }, - [theme.breakpoints.down("lg")]: { - height: 325 - } + height: "auto" }, "imgLoading": { alignItems: "center",
13
diff --git a/src/screens/EventDetailsScreen/component.js b/src/screens/EventDetailsScreen/component.js @@ -20,7 +20,6 @@ import LayoutColumn from "../../components/LayoutColumn"; import ShadowedScrollView from "../../components/ShadowedScrollView"; import SectionDivider from "../../components/SectionDivider"; import PerformanceList from "../../components/PerformanceList"; -// Move this to performance selector import { groupPerformancesByPeriod } from "../../selectors/performance"; import { whiteColor } from "../../constants/colors"; import text from "../../constants/text";
2
diff --git a/demos/pre/mpc.js b/demos/pre/mpc.js } var total_count = multiplication_count * (jiff_instance.party_count - 1); - var promise = jiff_instance.preprocessing('slt', 1 /* 10 */, null, null, null, null, null, null, null); + var promise = jiff_instance.preprocessing('smult', total_count /* 10 */, null, null, null, null, null, null, null); return promise; }; // The MPC implementation should go *HERE* var shares = jiff_instance.share(input); - var sum = shares[1]; - /* + var result = shares[1]; + for (var i = 2; i <= jiff_instance.party_count; i++) { - sum = sum.smult(shares[i]); + result = result.smult(shares[i]); } - */ - sum = sum.slt(shares[2]); + // Return a promise to the final output(s) - return jiff_instance.open(sum); + return jiff_instance.open(result); }; }((typeof exports === 'undefined' ? this.mpc = {} : exports), typeof exports !== 'undefined'));
13
diff --git a/token-metadata/0xcB8d1260F9c92A3A545d409466280fFdD7AF7042/metadata.json b/token-metadata/0xcB8d1260F9c92A3A545d409466280fFdD7AF7042/metadata.json "symbol": "NFT", "address": "0xcB8d1260F9c92A3A545d409466280fFdD7AF7042", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/models/carto/account_type.rb b/app/models/carto/account_type.rb @@ -6,7 +6,7 @@ module Carto INDIVIDUAL = 'Individual'.freeze FREE_2020 = 'Free 2020'.freeze - TRIAL_PLANS = [INDIVIDUAL, FREE_2020].freeze + TRIAL_PLANS = [FREE_2020].freeze TRIAL_DURATION = { INDIVIDUAL => 14.days, FREE_2020 => 1.year }.freeze FULLSTORY_SUPPORTED_PLANS = [FREE, PERSONAL30, INDIVIDUAL, FREE_2020].freeze
2
diff --git a/Source/ThirdParty/GltfPipeline/updateVersion.js b/Source/ThirdParty/GltfPipeline/updateVersion.js @@ -395,6 +395,7 @@ define([ } var joints = []; var jointNames = skin.jointNames; + if (defined(jointNames)) { for (i = 0; i < jointNames.length; i++) { var jointNodeIndex = globalMapping.nodes[jointNames[i]]; joints[i] = jointNodeIndex; @@ -404,6 +405,7 @@ define([ } skin.joints = joints; delete skin.jointNames; + } }); ForEach.scene(gltf, function(scene) { var sceneNodes = scene.nodes;
3
diff --git a/src/lib/client.js b/src/lib/client.js @@ -392,6 +392,7 @@ StreamClient.prototype = { } else { kwargs.headers['stream-auth-type'] = 'simple'; } + kwargs.timeout = 10 * 1000; // 10 seconds kwargs.headers.Authorization = signature; kwargs.headers['X-Stream-Client'] = this.userAgent();
12
diff --git a/Dockerfile b/Dockerfile @@ -7,7 +7,7 @@ ARG callbackUrl=https://resourcewatch.org/auth ARG controlTowerUrl=https://production-api.globalforestwatch.org ARG RW_GOGGLE_API_TOKEN_SHORTENER=not_valid ARG RW_MAPBOX_API_TOKEN=not_valid -ARG RW_FEATURE_FLAG_AREAS_V2=false +ARG RW_FEATURE_FLAG_AREAS_V2= ARG WRI_API_URL_V2=https://staging-api.globalforestwatch.org/v2 ENV NODE_ENV production
14
diff --git a/README.md b/README.md @@ -16,6 +16,19 @@ MUI-Datatables is a data tables component built on [Material-UI](https://www.mat <img src="https://user-images.githubusercontent.com/19170080/38026128-eac9d506-3258-11e8-92a7-b0d06e5faa82.gif" /> </div> +# Table of content +* [Install](#install) +* [Demo](#demo) +* [Usage](#usage) +* [API](#api) +* [Customize Columns](#customize-columns) +* [Customize Styling](#customize-styling) +* [Remote Data](#remote-data) +* [Localization](#localization) +* [Contributing](#contributing) +* [License](#licence) +* [Thanks](#thanks) + ## Install `npm install mui-datatables --save`
3
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -34,7 +34,7 @@ commands: steps: - restore_cache: keys: - - v1-dependencies-extension-{{ checksum "lunie-browser-extension/package.json" }} + - v1-dependencies-extension-{{ checksum "package.json" }} - v1-dependencies-extension- - run: yarn install @@ -42,7 +42,7 @@ commands: paths: - lunie-browser-extension/yarn.lock - lunie-browser-extension/node_modules - key: v1-dependencies-extension-{{ checksum "lunie-browser-extension/package.json" }} + key: v1-dependencies-extension-{{ checksum "package.json" }} sync: parameters:
4
diff --git a/native/components/tag-input.react.js b/native/components/tag-input.react.js @@ -33,7 +33,9 @@ const defaultProps = { tagColor: '#dddddd', tagTextColor: '#777777', inputColor: '#777777', + minHeight: 27, maxHeight: 75, + defaultInputWidth: 90, }; const tagDataPropType = PropTypes.oneOfType([ @@ -63,10 +65,16 @@ type Props<TagData> = { inputProps?: $PropertyType<Text, 'props'>, // path of the label in tags objects labelExtractor?: (tagData: TagData) => string, + // minimum height of this component + minHeight: number, // maximum height of this component maxHeight: number, // callback that gets triggered when the component height changes - onHeightChange: ?(height: number) => void, + onHeightChange?: (height: number) => void, + // inputWidth if text === "". we want this number explicitly because if we're + // forced to measure the component, there can be a short jump between the old + // value and the new value, which looks sketchy. + defaultInputWidth: number, }; type State = { inputWidth: number, @@ -90,14 +98,13 @@ class TagInput<TagData> extends React.PureComponent< inputColor: PropTypes.string, inputProps: PropTypes.object, labelExtractor: PropTypes.func, + minHeight: PropTypes.number, maxHeight: PropTypes.number, onHeightChange: PropTypes.func, + defaultInputWidth: PropTypes.number, }; props: Props<TagData>; - state: State = { - inputWidth: 90, - wrapperHeight: 36, - }; + state: State; wrapperWidth = windowWidth; spaceLeft = 0; // scroll to bottom @@ -109,9 +116,14 @@ class TagInput<TagData> extends React.PureComponent< static defaultProps = defaultProps; - static inputWidth(text: string, spaceLeft: number, wrapperWidth: number) { + static inputWidth( + text: string, + spaceLeft: number, + wrapperWidth: number, + defaultInputWidth: number, + ) { if (text === "") { - return 90; + return defaultInputWidth; } else if (spaceLeft >= 100) { return spaceLeft - 10; } else { @@ -119,18 +131,30 @@ class TagInput<TagData> extends React.PureComponent< } } + constructor(props: Props<TagData>) { + super(props); + this.state = { + inputWidth: props.defaultInputWidth, + wrapperHeight: 36, + }; + } + componentWillReceiveProps(nextProps: Props<TagData>) { const inputWidth = TagInput.inputWidth( nextProps.text, this.spaceLeft, this.wrapperWidth, + nextProps.defaultInputWidth, ); if (inputWidth !== this.state.inputWidth) { this.setState({ inputWidth }); } - const wrapperHeight = Math.min( + const wrapperHeight = Math.max( + Math.min( nextProps.maxHeight, this.contentHeight, + ), + nextProps.minHeight, ); if (wrapperHeight !== this.state.wrapperHeight) { this.setState({ wrapperHeight }); @@ -152,6 +176,7 @@ class TagInput<TagData> extends React.PureComponent< this.props.text, this.spaceLeft, this.wrapperWidth, + this.props.defaultInputWidth, ); if (inputWidth !== this.state.inputWidth) { this.setState({ inputWidth }); @@ -276,7 +301,10 @@ class TagInput<TagData> extends React.PureComponent< if (this.contentHeight === h) { return; } - const nextWrapperHeight = Math.min(this.props.maxHeight, h); + const nextWrapperHeight = Math.max( + Math.min(this.props.maxHeight, h), + this.props.minHeight, + ); if (nextWrapperHeight !== this.state.wrapperHeight) { this.setState( { wrapperHeight: nextWrapperHeight }, @@ -301,6 +329,7 @@ class TagInput<TagData> extends React.PureComponent< this.props.text, this.spaceLeft, this.wrapperWidth, + this.props.defaultInputWidth, ); if (inputWidth !== this.state.inputWidth) { this.setState({ inputWidth });
0
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852)) - Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854)) - Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856)) -- Remove the watching context ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858)) +- Remove support for `TAILWIND_MODE=watch` ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858)) ## [3.0.8] - 2021-12-28
3
diff --git a/plugins/image/app/views/image/os_images/private/_item.html.haml b/plugins/image/app/views/image/os_images/private/_item.html.haml -%tr{id: "image_#{image.id}", data: {search_name: image.name+'_'+image.id, marker_id: image.id}} +%tr{id: "image_#{image.id}", data: {search_name: "#{image.name}_#{image.id}", marker_id: image.id}} %td - if current_user.is_allowed?('image:image_suggested') and image.owner!=@scoped_project_id %i.fa.fa-share.fa-fw
1
diff --git a/html/base/inputs/DatePicker.stories.js b/html/base/inputs/DatePicker.stories.js @@ -14,7 +14,7 @@ export default { }, }; -export const datePickerStory = () => { +export const datePicker = () => { useEffect(() => { datePicker(); }, []); @@ -62,11 +62,11 @@ export const datePickerStory = () => { `; }; -datePickerStory.story = { +datePicker.story = { name: 'Default', }; -export const invalidDatePickerStory = () => { +export const invalidDatePicker = () => { useEffect(() => { datePicker(); }, []); @@ -126,11 +126,11 @@ export const invalidDatePickerStory = () => { `; }; -invalidDatePickerStory.story = { +invalidDatePicker.story = { name: 'Invalid', }; -export const disabledDatePickerStory = () => { +export const disabledDatePicker = () => { useEffect(() => { datePicker(); }, []); @@ -179,6 +179,6 @@ export const disabledDatePickerStory = () => { `; }; -disabledDatePickerStory.story = { +disabledDatePicker.story = { name: 'Disabled', };
3
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/analyses-quota/analyses-quota-options.js b/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/analyses-quota/analyses-quota-options.js @@ -51,14 +51,6 @@ var ANALYSES_WITH_QUOTA_MAP = { } }, 'data-observatory-measure': dataObservatoryQuota, - 'data-observatory-multiple-measures': _.extend(dataObservatoryQuota, { - transform: function (input, formModel) { - var measurements = formModel.get('measurements'); - var factor = measurements ? measurements.length : 1; - // the data-observatory analysis consume N rows x M measurements - return input * factor; - } - }), 'routing-sequential': routingAnalysisQuota, 'routing-to-layer-all-to-all': routingAnalysisQuota, 'routing-to-single-point': routingAnalysisQuota
2
diff --git a/src/components/core/loop/loopFix.js b/src/components/core/loop/loopFix.js export default function () { const swiper = this; const { - params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, + params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtl, } = swiper; let newIndex; swiper.allowSlidePrev = true; swiper.allowSlideNext = true; + + const snapTranslate = -snapGrid[activeIndex]; + const diff = snapTranslate - swiper.getTranslate(); + + // Fix For Negative Oversliding if (activeIndex < loopedSlides) { newIndex = (slides.length - (loopedSlides * 3)) + activeIndex; newIndex += loopedSlides; - swiper.slideTo(newIndex, 0, false, true); + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex > slides.length - (params.slidesPerView * 2))) { // Fix For Positive Oversliding newIndex = -slides.length + activeIndex + loopedSlides; newIndex += loopedSlides; - swiper.slideTo(newIndex, 0, false, true); + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } } swiper.allowSlidePrev = allowSlidePrev; swiper.allowSlideNext = allowSlideNext;
7
diff --git a/lib/inat_content_type_detector.rb b/lib/inat_content_type_detector.rb @@ -24,6 +24,10 @@ class InatContentTypeDetector type_from_mime_magic == "video/3gpp" return "audio/mp4" end + # fix for some .m4a audio files that file detects as video + if type == "video/mp4" && mime_types_for_filename.include?( "audio/mp4" ) + return "audio/mp4" + end type end end
11
diff --git a/app/templates/_tsconfig.json b/app/templates/_tsconfig.json "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "noImplicitAny": false + "noImplicitAny": false, + "skipLibCheck": true }, "exclude": [ "node_modules",
0
diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js @@ -867,7 +867,7 @@ function buildOptimisticChatReport( function buildOptimisticCreatedReportAction(ownerEmail) { const reportActionID = NumberUtils.rand64(); return { - [reportActionID]: { + 0: { actionName: CONST.REPORT.ACTIONS.TYPE.CREATED, pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, actorAccountID: currentUserAccountID, @@ -891,6 +891,7 @@ function buildOptimisticCreatedReportAction(ownerEmail) { }, ], automatic: false, + sequenceNumber: 0, avatar: lodashGet(allPersonalDetails, [currentUserEmail, 'avatar'], getDefaultAvatar(currentUserEmail)), created: DateUtils.getDBTime(), reportActionID: reportActionID,
13
diff --git a/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactViewHierarchyUpdateIdlingResource.java b/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactViewHierarchyUpdateIdlingResource.java @@ -24,7 +24,6 @@ public class ReactViewHierarchyUpdateIdlingResource implements IdlingResource { public final static String METHOD_SET_VIEW_LISTENER = "setViewHierarchyUpdateDebugListener"; private AtomicBoolean idleNow = new AtomicBoolean(false); - private AtomicBoolean wasAlreadyAsked = new AtomicBoolean(false); private ResourceCallback callback = null; @Override @@ -35,14 +34,6 @@ public class ReactViewHierarchyUpdateIdlingResource implements IdlingResource { @Override public boolean isIdleNow() { boolean ret = idleNow.get(); - if (ret) { - ret = wasAlreadyAsked.getAndSet(true); - if (!ret) { - if (callback != null) { - callback.onTransitionToIdle(); - } - } - } Log.i(LOG_TAG, "UI Module is idle : " + String.valueOf(ret)); return ret; } @@ -55,13 +46,15 @@ public class ReactViewHierarchyUpdateIdlingResource implements IdlingResource { // Proxy calls it public void onViewHierarchyUpdateFinished() { idleNow.set(true); + if (callback != null) { + callback.onTransitionToIdle(); + } Log.i(LOG_TAG, "UI Module transitions to idle."); } //Proxy calls it public void onViewHierarchyUpdateEnqueued() { idleNow.set(false); - wasAlreadyAsked.set(false); Log.i(LOG_TAG, "UI Module transitions to busy."); } }
2
diff --git a/src/commands/alert.js b/src/commands/alert.js @@ -2,18 +2,28 @@ const log = require('../util/logger.js') const config = require('../config.js') const Translator = require('../structs/Translator.js') const Profile = require('../structs/db/Profile.js') +const Feed = require('../structs/db/Feed.js') module.exports = async (bot, message, automatic) => { // automatic indicates invokation by the bot try { - const profile = await Profile.get(message.guild.id) + let [ profile, feeds ] = await Promise.all([ + Profile.get(message.guild.id), + Feed.getManyBy('guild', message.guild.id) + ]) const translate = Translator.createLocaleTranslator(profile ? profile.locale : undefined) - if (!profile || profile.feeds.length === 0) { + if (feeds.length === 0) { return await message.channel.send(Translator.translate('commands.alert.noFeeds')) } const contentArray = message.content.split(' ').map(item => item.trim()) - const guildID = profile.id - const guildName = profile.name + const guildID = message.guild.id + const guildName = message.guild.name const prefix = profile && profile.prefix ? profile.prefix : config.bot.prefix + if (!profile) { + profile = new Profile({ + _id: guildID, + name: guildName + }) + } switch (contentArray[1]) { case 'add': case 'remove':
1
diff --git a/userscript.user.js b/userscript.user.js @@ -62739,6 +62739,8 @@ var $$IMU_EXPORT$$; var popup_update_pos_func = null; var popup_hidecursor_func = nullfunc; var popup_hidecursor_timer = null; + var popup_client_rect_cache = null; + var last_popup_client_rect_cache = 0; var dragstart = false; var dragstartX = null; var dragstartY = null; @@ -63033,6 +63035,8 @@ var $$IMU_EXPORT$$; popup_zoom_func = nullfunc; popup_wheel_cb = null; popup_update_pos_func = null; + popup_client_rect_cache = null; + last_popup_client_rect_cache = 0; stop_processing(); stop_waiting(); @@ -65017,6 +65021,19 @@ var $$IMU_EXPORT$$; return obj.rect || obj.orig_rect; } + function get_popup_client_rect() { + if (!popups || !popups[0]) + return null; + + var current_date = Date.now(); + if (!popup_client_rect_cache || (current_date - last_popup_client_rect_cache) > 50) { + popup_client_rect_cache = get_bounding_client_rect(popups[0]); + last_popup_client_rect_cache = current_date; + } + + return popup_client_rect_cache; + }; + function is_popup_el(el) { var current = el; do { @@ -68376,6 +68393,7 @@ var $$IMU_EXPORT$$; var get_move_with_cursor = function() { // don't require this for now, because esc can also be used to close the popup //var close_el_policy = get_single_setting("mouseover_close_el_policy"); + // maybe disable if popup position == center, and "move within page" is activated? return settings.mouseover_move_with_cursor && !popup_hold;// && close_el_policy === "thumbnail"; }; @@ -68420,8 +68438,15 @@ var $$IMU_EXPORT$$; } }; + var popup_clientrect = null; var domovement = function(lefttop) { - var offsetD = lefttop ? popup.offsetHeight : popup.offsetWidth; + if (!popup_clientrect) { + popup_clientrect = get_popup_client_rect(); + } + + // offset* is very slow, slower than setting top/left! 250ms vs 30ms after a while + //var offsetD = lefttop ? popup.offsetHeight : popup.offsetWidth; + var offsetD = lefttop ? popup_clientrect.height : popup_clientrect.width; var viewportD = lefttop ? viewport[1] : viewport[0]; var mousepos = lefttop ? mouseY : mouseX; @@ -68761,7 +68786,7 @@ var $$IMU_EXPORT$$; popup_trigger_reason === "keyboard") { var img = popups[0].getElementsByTagName("img")[0]; if (img) { - var rect = get_bounding_client_rect(popups[0]); + var rect = get_popup_client_rect(); var our_jitter = jitter_base;
7
diff --git a/framer/Components/SliderComponent.coffee b/framer/Components/SliderComponent.coffee @@ -70,6 +70,9 @@ class exports.SliderComponent extends Layer else @fill.width = @width + # Set initial value + if not @value then @value = 0.5 + @fill.borderRadius = @sliderOverlay.borderRadius = @borderRadius @knob.draggable.enabled = true
12
diff --git a/src/mixins/crownConfig.js b/src/mixins/crownConfig.js @@ -179,8 +179,16 @@ export default { this.node.pool.component.addToPool(this.shape); } }, - updateNodeBounds: debounce(function(element, bounds) { - store.dispatch('updateNodeBounds', { node: this.node, bounds }); + updateNodeBounds: debounce(function(element, newBounds) { + const { x, y, width, height } = this.node.diagram.bounds; + if ( + (x === newBounds.x && y === newBounds.y) || + (width === newBounds.width && height === newBounds.height) + ) { + return; + } + + store.dispatch('updateNodeBounds', { node: this.node, bounds: newBounds }); }, saveDebounce), }, mounted() {
8
diff --git a/angular/projects/spark-angular/src/lib/components/inputs/Text.stories.ts b/angular/projects/spark-angular/src/lib/components/inputs/Text.stories.ts @@ -191,7 +191,7 @@ export const invalidHugeTextInput = () => ({ sprkInput variant="huge" /> - <label sprkLabel>Huge Text Input</label> + <label sprkLabel>Text Input Label</label> <span sprkFieldError> <sprk-icon iconName="exclamation-filled" @@ -229,7 +229,7 @@ export const disabledHugeTextInput = () => ({ variant="huge" disabled /> - <label isDisabled="true" sprkLabel>Huge Text Input</label> + <label isDisabled="true" sprkLabel>Text Input Label</label> </sprk-input-container> `, }); @@ -257,7 +257,7 @@ export const legacyHugeTextInput = () => ({ #textInput="ngModel" sprkInput /> - <label sprkLabel>Huge Text Input</label> + <label sprkLabel>Text Input Label</label> </sprk-huge-input-container> `, }); @@ -287,7 +287,7 @@ export const legacyInvalidHugeTextInput = () => ({ aria-invalid="true" sprkInput /> - <label sprkLabel>Huge Text Input</label> + <label sprkLabel>Text Input Label</label> <span sprkFieldError> <sprk-icon iconName="exclamation-filled" @@ -324,7 +324,7 @@ export const legacyDisabledHugeTextInput = () => ({ sprkInput disabled /> - <label class="sprk-b-Label--disabled" sprkLabel>Huge Text Input</label> + <label class="sprk-b-Label--disabled" sprkLabel>Text Input Label</label> </sprk-huge-input-container> `, });
3
diff --git a/src/components/nodes/task/index.js b/src/components/nodes/task/index.js @@ -40,9 +40,24 @@ export default { } const currentLoopCharacteristics = node.definition.get('loopCharacteristics') || {}; + if (value.markerFlags.loopCharacteristics === 'loop' && currentLoopCharacteristics.$type !== 'bpmn:StandardLoopCharacteristics') { setNodeProp(node, 'loopCharacteristics', moddle.create('bpmn:StandardLoopCharacteristics')); } + + if (value.markerFlags.loopCharacteristics === 'parallel_mi' ) { + if (currentLoopCharacteristics.$type === 'bpmn:MultiInstanceLoopCharacteristics' && !currentLoopCharacteristics.isSequential){ + return; + } + setNodeProp(node, 'loopCharacteristics', moddle.create('bpmn:MultiInstanceLoopCharacteristics')); + } + + if (value.markerFlags.loopCharacteristics === 'sequential_mi') { + if (currentLoopCharacteristics.$type === 'bpmn:MultiInstanceLoopCharacteristics' && currentLoopCharacteristics.isSequential){ + return; + } + setNodeProp(node, 'loopCharacteristics', moddle.create('bpmn:MultiInstanceLoopCharacteristics', {isSequential: true})); + } } const currentIsForCompensationValue = node.definition.get('isForCompensation'); @@ -94,5 +109,21 @@ export default { }; function getLoopCharacteristicsRadioValue(loopCharacteristics) { - return loopCharacteristics ? 'loop' : 'no_loop'; + if (!loopCharacteristics) { + return 'no_loop'; + } + + if (loopCharacteristics.$type === 'bpmn:StandardLoopCharacteristics') { + return 'loop'; + } + + if (loopCharacteristics.$type === 'bpmn:MultiInstanceLoopCharacteristics' && !loopCharacteristics.isSequential) { + return 'parallel_mi'; + } + + if (loopCharacteristics.$type === 'bpmn:MultiInstanceLoopCharacteristics' && loopCharacteristics.isSequential) { + return 'sequential_mi'; + } + + return 'no_loop'; }
12
diff --git a/packages/frontend/src/mixpanel/index.js b/packages/frontend/src/mixpanel/index.js import mixpanel from 'mixpanel-browser'; import { BROWSER_MIXPANEL_TOKEN } from '../config'; +import { isWhitelabel } from '../config/whitelabel'; function buildTrackingProps() { const sanitizedUrl = decodeURI(window.location.href) @@ -39,7 +40,7 @@ let Mixpanel = { register: () => {} }; -const shouldEnableTracking = false; // BROWSER_MIXPANEL_TOKEN +const shouldEnableTracking = BROWSER_MIXPANEL_TOKEN && isWhitelabel(); if (shouldEnableTracking) { mixpanel.init(BROWSER_MIXPANEL_TOKEN);
1
diff --git a/src/views/explore/style.js b/src/views/explore/style.js @@ -460,5 +460,5 @@ export const CategoryWrapper = styled.div` display: ${props => (props.selected ? 'flex' : 'none')}; flex-direction: column; justify-content: flex-start; - flex: auto; + flex: none; `;
1
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -580,7 +580,6 @@ final class Analytics extends Module // POST. 'create-property' => 'analytics', 'create-profile' => 'analytics', - 'settings' => '', 'create-account-ticket' => 'analyticsprovisioning', ); }
2
diff --git a/js/binance.js b/js/binance.js @@ -4024,7 +4024,7 @@ module.exports = class binance extends Exchange { const code = (this.options['defaultType'] === 'future') ? market['quote'] : market['base']; // sometimes not all the codes are correctly returned... if (code in balances) { - const parsed = this.parsePositionAccount (this.extend (position, { + const parsed = this.parseAccountPosition (this.extend (position, { 'crossMargin': balances[code]['crossMargin'], 'crossWalletBalance': balances[code]['crossWalletBalance'], }), market); @@ -4034,7 +4034,7 @@ module.exports = class binance extends Exchange { return result; } - parsePositionAccount (position, market = undefined) { + parseAccountPosition (position, market = undefined) { // // usdm // {
10
diff --git a/src/js/utils/styles.js b/src/js/utils/styles.js @@ -42,6 +42,14 @@ export const backgroundStyle = (background, theme) => { }; `; } + } else if (background.dark === false) { + return css` + color: ${theme.global.colors.text}; + `; + } else if (background.dark) { + return css` + color: ${theme.global.colors.darkBackground.text}; + `; } return undefined; }
1
diff --git a/packages/cx-core/src/widgets/grid/Grid.js b/packages/cx-core/src/widgets/grid/Grid.js @@ -1168,7 +1168,7 @@ class GridRowComponent extends VDOM.Component { } onMouseDown(e) { - if (isDragHandleEvent(e) || this.props.record.dragHandles.length == 0) + if (this.props.dragSource && (isDragHandleEvent(e) || this.props.record.dragHandles.length == 0)) ddMouseDown(e); let {instance, record} = this.props;
11
diff --git a/package.json b/package.json "glob": "7.1.1", "html-wiring": "1.2.0", "insight": "0.8.4", - "jhipster-core": "1.2.9", + "jhipster-core": "1.3.0", "js-yaml": "3.8.3", "lodash": "4.17.4", "mkdirp": "0.5.1",
3
diff --git a/Source/Core/Geometry.js b/Source/Core/Geometry.js /*global define*/ define([ + './Check', './defaultValue', './defined', './DeveloperError', './GeometryType', './PrimitiveType' ], function( + Check, defaultValue, defined, DeveloperError, @@ -67,10 +69,8 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); //>>includeStart('debug', pragmas.debug); - if (!defined(options.attributes)) { - throw new DeveloperError('options.attributes is required.'); - } //>>includeEnd('debug'); + Check.defined('options.attributes', options.attributes); /** * Attributes, which make up the geometry's vertices. Each property in this object corresponds to a @@ -173,10 +173,8 @@ define([ */ Geometry.computeNumberOfVertices = function(geometry) { //>>includeStart('debug', pragmas.debug); - if (!defined(geometry)) { - throw new DeveloperError('geometry is required.'); - } //>>includeEnd('debug'); + Check.defined('geometry', geometry); var numberOfVertices = -1; for ( var property in geometry.attributes) {
14
diff --git a/configs/data-driven-forms.json b/configs/data-driven-forms.json "https://data-driven-forms.org/hooks/use-field-api", "https://data-driven-forms.org/mappers/custom-mapper" ], - "stop_urls": [], + "stop_urls": [ + "https://data-driven-forms.org/mappers/checkbox(?!\\?)", + "https://data-driven-forms.org/mappers/checkbox-multiple(?!\\?)", + "https://data-driven-forms.org/mappers/date-picker(?!\\?)", + "https://data-driven-forms.org/mappers/dual-list-select(?!\\?)", + "https://data-driven-forms.org/mappers/field-array(?!\\?)", + "https://data-driven-forms.org/mappers/plain-text(?!\\?)", + "https://data-driven-forms.org/mappers/radio(?!\\?)", + "https://data-driven-forms.org/mappers/select(?!\\?)", + "https://data-driven-forms.org/mappers/slider(?!\\?)", + "https://data-driven-forms.org/mappers/sub-form(?!\\?)", + "https://data-driven-forms.org/mappers/switch(?!\\?)", + "https://data-driven-forms.org/mappers/tabs(?!\\?)", + "https://data-driven-forms.org/mappers/textarea(?!\\?)", + "https://data-driven-forms.org/mappers/text-field(?!\\?)", + "https://data-driven-forms.org/mappers/time-picker(?!\\?)", + "https://data-driven-forms.org/mappers/wizard(?!\\?)" + ], "selectors": { "lvl0": ".DocSearch-content h1", "lvl1": ".DocSearch-content h2",
8
diff --git a/assets/js/modules/analytics/datastore/properties.test.js b/assets/js/modules/analytics/datastore/properties.test.js @@ -90,9 +90,6 @@ describe( 'modules/analytics properties', () => { ); registry.dispatch( STORE_NAME ).createProperty( accountId ); - // TODO: This is failing and I'm not clear on why, when it works fine - // in `assets/js/googlesitekit/datastore/site/reset.test.js` - // expect( registry.select( STORE_NAME ).isDoingCreateProperty( accountId ) ).toEqual( true ); muteConsole( 'error' ); await subscribeUntil( registry,
2
diff --git a/assets/js/util/date-range/index.js b/assets/js/util/date-range/index.js @@ -23,7 +23,6 @@ export { } from './constants'; export { getDateString } from './get-date-string'; export { getPreviousDate } from './get-previous-date'; -export { getPreviousWeekDate } from './get-previous-week-date'; export { isValidDateInstance } from './is-valid-date-instance'; export { isValidDateRange } from './is-valid-date-range'; export { isValidDateString } from './is-valid-date-string';
2
diff --git a/build.py b/build.py # See the License for the specific language governing permissions and # limitations under the License. -# Usage: build.py <0 or more of accessible, core, generators, langfiles> +# Usage: build.py <0 or more of core, generators, langfiles> # build.py with no parameters builds all files. # core builds blockly_compressed, blockly_uncompressed, and blocks_compressed. -# accessible builds blockly_accessible_compressed, -# blockly_accessible_uncompressed, and blocks_compressed. # generators builds every <language>_compressed.js. # langfiles builds every msg/js/<LANG>.js file. # been renamed. The uncompressed file also allows for a faster development # cycle since there is no need to rebuild or recompile, just reload. # -# The second pair are: -# blockly_accessible_compressed.js -# blockly_accessible_uncompressed.js -# These files are analogous to blockly_compressed and blockly_uncompressed, -# but also include the visually-impaired module for Blockly. # # This script also generates: # blocks_compressed.js: The compressed Blockly language blocks. @@ -60,7 +53,7 @@ for arg in sys.argv[1:len(sys.argv)]: arg != 'generators' and arg != 'langfiles'): raise Exception("Invalid argument: \"" + arg + "\". Usage: build.py " - "<0 or more of accessible, core, generators, langfiles>") + "<0 or more of core, generators, langfiles>") import errno, glob, json, os, re, subprocess, threading, codecs @@ -153,7 +146,7 @@ this.BLOCKLY_BOOT = function(root) { # used on another, even if the directory name differs. m = re.search('[\\/]([^\\/]+)[\\/]core[\\/]blockly.js', add_dependency) add_dependency = re.sub('([\\/])' + re.escape(m.group(1)) + - '([\\/](core|accessible)[\\/])', '\\1" + dir + "\\2', add_dependency) + '([\\/](core)[\\/])', '\\1" + dir + "\\2', add_dependency) f.write(add_dependency + '\n') provides = [] @@ -204,9 +197,10 @@ class Gen_compressed(threading.Thread): self.gen_core() if ('accessible' in self.bundles): - self.gen_accessible() + print("The Blockly accessibility demo has moved to https://github.com/google/blockly-experimental") + return - if ('core' in self.bundles or 'accessible' in self.bundles): + if ('core' in self.bundles): self.gen_blocks() if ('generators' in self.bundles): @@ -244,35 +238,6 @@ class Gen_compressed(threading.Thread): self.do_compile(params, target_filename, filenames, "") - def gen_accessible(self): - target_filename = "blockly_accessible_compressed.js" - # Define the parameters for the POST request. - params = [ - ("compilation_level", "SIMPLE_OPTIMIZATIONS"), - ("use_closure_library", "true"), - ("language_out", "ES5"), - ("output_format", "json"), - ("output_info", "compiled_code"), - ("output_info", "warnings"), - ("output_info", "errors"), - ("output_info", "statistics"), - ("warning_level", "DEFAULT"), - ] - - # Read in all the source files. - filenames = calcdeps.CalculateDependencies(self.search_paths, - [os.path.join("accessible", "app.component.js")]) - filenames.sort() # Deterministic build. - for filename in filenames: - # Filter out the Closure files (the compiler will add them). - if filename.startswith(os.pardir + os.sep): # '../' - continue - f = codecs.open(filename, encoding="utf-8") - params.append(("js_code", "".join(f.readlines()).encode("utf-8"))) - f.close() - - self.do_compile(params, target_filename, filenames, "") - def gen_blocks(self): target_filename = "blocks_compressed.js" # Define the parameters for the POST request. @@ -552,11 +517,11 @@ developers.google.com/blockly/guides/modify/web/closure""") ["core", os.path.join(os.path.pardir, "closure-library")]) core_search_paths = sorted(core_search_paths) # Deterministic build. full_search_paths = calcdeps.ExpandDirectories( - ["accessible", "core", os.path.join(os.path.pardir, "closure-library")]) + ["core", os.path.join(os.path.pardir, "closure-library")]) full_search_paths = sorted(full_search_paths) # Deterministic build. if (len(sys.argv) == 1): - args = ['core', 'accessible', 'generators', 'defaultlangfiles'] + args = ['core', 'generators', 'defaultlangfiles'] else: args = sys.argv @@ -565,9 +530,6 @@ developers.google.com/blockly/guides/modify/web/closure""") if ('core' in args): Gen_uncompressed(core_search_paths, 'blockly_uncompressed.js').start() - if ('accessible' in args): - Gen_uncompressed(full_search_paths, 'blockly_accessible_uncompressed.js').start() - # Compressed is limited by network and server speed. Gen_compressed(full_search_paths, args).start()
2
diff --git a/docs/src/pages/quasar-cli/quasar-conf-js.md b/docs/src/pages/quasar-cli/quasar-conf-js.md @@ -214,7 +214,7 @@ return { More on cssAddon [here](/layout/grid/introduction-to-flexbox#flex-addons). ### Property: devServer -**Webpack devServer options**. Take a look at the [full list](https://webpack.js.org/configuration/dev-server/) of options. Some are overwritten by Quasar CLI based on "quasar dev" parameters and Quasar mode in order to ensure that everything is setup correctly. Note: if you're proxying the development server (i.e. using a cloud IDE), set the `public` setting to your public application URL. +**Webpack devServer options**. Take a look at the [full list](https://webpack.js.org/configuration/dev-server/) of options. Some are overwritten by Quasar CLI based on "quasar dev" parameters and Quasar mode in order to ensure that everything is setup correctly. Note: if you're proxying the development server (i.e. using a cloud IDE or local tunnel), set the `webSocketURL` setting in the `client` section to your public application URL to allow features like Live Reload and Hot Module Replacement to work as [described here](https://webpack.js.org/configuration/dev-server/#websocketurl). Most used properties are: @@ -223,7 +223,6 @@ Most used properties are: | port | Number | Port of dev server | | host | String | Local IP/Host to use for dev server | | open | Boolean/String | Unless it's set to `false`, Quasar will open up a browser pointing to dev server address automatically. Applies to SPA, PWA and SSR modes. If specifying a String then see explanations below. | -| public | String | Public address of the application (for use with reverse proxies) | | proxy | Object/Array | Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain. | | devMiddleware | Object | Configuration supplied to webpack-dev-middleware v4 | | https | Boolean/Object | Use HTTPS instead of HTTP |
2
diff --git a/pages/_error.js b/pages/_error.js @@ -44,7 +44,7 @@ class Error extends PureComponent { <h1>{statusCode}</h1> <p>This page could not be found</p> <Link route="home"> - <a className="c-button -a"> + <a className="c-button -primary"> Go to Resource Watch </a> </Link>
14
diff --git a/utils/files/__tests__/remoteFiles.spec.js b/utils/files/__tests__/remoteFiles.spec.js @@ -3,7 +3,6 @@ const remoteFiles = require('../remoteFiles') const fs = require('fs') const child_process = require('child_process') const zlib = require('zlib') -const env = Object.assign({}, process.env) const config = { s3Params: { Bucket: 'none', @@ -19,11 +18,14 @@ describe('remoteFiles', () => { global.fetch = jest .fn() .mockImplementation( - () => new Promise(resolve => resolve({ buffer: () => 'buffer' })), + () => + new Promise(resolve => resolve({ ok: true, buffer: () => 'buffer' })), ) }) - describe('getAnnexedFile', () => {}) + beforeEach(() => { + delete process.env.AWS_ACCESS_KEY_ID + }) describe('accessRemoteFile', () => { it('should return a promise', () => { @@ -47,7 +49,6 @@ describe('remoteFiles', () => { process.env.AWS_ACCESS_KEY_ID = 12 remoteFiles.accessRemoteFile(config).catch(err => { expect(err).toBeInstanceOf(Error) - process.env = env done() }) }) @@ -75,7 +76,6 @@ describe('remoteFiles', () => { config.s3Params.Key = 'this_is_not_valid' const response = remoteFiles.constructAwsRequest(config).catch(e => { expect(e) - process.env = env done() }) expect(response).toBeInstanceOf(Promise) @@ -84,7 +84,6 @@ describe('remoteFiles', () => { process.env.AWS_ACCESS_KEY_ID = 12 remoteFiles.constructAwsRequest(config).catch(e => { expect(e) - process.env = env done() }) })
7
diff --git a/docs/content/examples/charts/pie/MultiLevel.js b/docs/content/examples/charts/pie/MultiLevel.js -import { HtmlElement, Repeater } from 'cx/widgets'; +import { Content, HtmlElement, Repeater, Tab } from 'cx/widgets'; import { Controller, KeySelection } from 'cx/ui'; import { Svg, Text, Rectangle, Line } from 'cx/svg'; import { PieChart, PieSlice, Legend } from 'cx/charts'; @@ -82,7 +82,13 @@ export const MultiLevel = <cx> <Legend name="slice" vertical /> </div> - <CodeSnippet putInto="code" fiddle="kn9A3wlj">{` + <Content name="code"> + <div> + <Tab value-bind="$page.code.tab" tab="controller" mod="code"><code>Controller</code></Tab> + <Tab value-bind="$page.code.tab" tab="chart" mod="code" default><code>Chart</code></Tab> + </div> + + <CodeSnippet fiddle="kn9A3wlj" visible-expr="{$page.code.tab}=='controller'">{` class PageController extends Controller { init() { super.init(); @@ -96,7 +102,8 @@ export const MultiLevel = <cx> })); } } - ... + `}</CodeSnippet> + <CodeSnippet fiddle="kn9A3wlj" visible-expr="{$page.code.tab}=='chart'">{` <div class="widgets" controller={PageController}> <Legend /> <Svg style="width:400px; height:400px;"> @@ -147,6 +154,7 @@ export const MultiLevel = <cx> <Legend name="slice" vertical /> </div> `}</CodeSnippet> + </Content> </CodeSplit> </Md> </cx>
0
diff --git a/login.js b/login.js @@ -276,6 +276,16 @@ class LoginManager extends EventTarget { })); } + async getLatestBlock() { + const res = await fetch(`https://accounts.exokit.org/latestBlock`); + return await res.json(); + } + + async getEvents() { + const res = await fetch(`https://accounts.exokit.org/latestBlock`); + return await res.json(); + } + getAddress() { return loginToken && loginToken.address; }
0
diff --git a/app/views/users/_show.html.haml b/app/views/users/_show.html.haml .alert.alert-warning =t :profile_visibility_desc, site_name: @site.name - if @user.known_non_spammer? || is_curator? || is_me?( @user ) - - description = formatted_user_text( @user.description, attributes: %w(href rel target) ) + - description = formatted_user_text( @user.description, tags: ActionView::Base.sanitized_allowed_tags.to_a + %w(table thead tbody th tr td), attributes: %w(href rel target) ) %p.lead = stripped_first_paragraph_of_text( description, "\n\n" ) = remaining_paragraphs_of_text( description, "\n\n" )
11
diff --git a/site/documentation.md b/site/documentation.md @@ -136,16 +136,24 @@ for the original RabbitMQ protocol. * [Capturing Traffic with Wireshark](/amqp-wireshark.html) -### Distributed RabbitMQ +### Clustering - * [Replication and Distributed Feature Overview](distributed.html) * [Clustering](clustering.html) * [Cluster Formation and Peer Discovery](cluster-formation.html) * [Inter-node traffic compression](clustering-compression.html) + +### Replicated Queue Types, Streams, High Availability + * [Quorum Queues](quorum-queues.html): a modern highly available replicated queue type * [Streams](streams.html): a messaging abstraction that allows for repeatable consumption * [RabbitMQ Stream plugin](stream.html): the plugin and binary protocol behind RabbitMQ streams + +### Distributed RabbitMQ + + * [Replication and Distributed Feature Overview](distributed.html) * [Reliability](reliability.html) of distributed deployments, publishers and consumers + * [Federation](federation.html) + * [Shovel](shovel.html) ### Guidance
4
diff --git a/packages/react-dom/src/server/ReactDOMServerFormatConfig.js b/packages/react-dom/src/server/ReactDOMServerFormatConfig.js @@ -691,6 +691,7 @@ function pushStartOption( let children = null; let value = null; let selected = null; + let innerHTML = null; for (const propKey in props) { if (hasOwnProperty.call(props, propKey)) { const propValue = props[propKey]; @@ -716,10 +717,8 @@ function pushStartOption( } break; case 'dangerouslySetInnerHTML': - invariant( - false, - '`dangerouslySetInnerHTML` does not work on <option>.', - ); + innerHTML = propValue; + break; // eslint-disable-next-line-no-fallthrough case 'value': value = propValue; @@ -760,6 +759,7 @@ function pushStartOption( } target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); return children; }
11
diff --git a/src/app/controllers/Marlin/MarlinController.js b/src/app/controllers/Marlin/MarlinController.js @@ -608,7 +608,7 @@ class MarlinController { // Perform preemptive query to prevent starvation const now = new Date().getTime(); const timespan = Math.abs(now - this.query.lastQueryTime); - if (timespan > 2000) { + if (this.query.type && timespan > 2000) { this.query.issue(); return; }
1
diff --git a/scripts/sv_logger.js b/scripts/sv_logger.js @@ -171,11 +171,11 @@ on('explosionEvent', (source, ev) => { } }) -onNet('txaLogger:DeathNotice', (killer, cause) => { +onNet('txaLogger:DeathNotice', (killerSource, cause) => { let killerData = null; - if(killer !== null && killer !== false){ + if(killerSource !== null && killerSource !== false){ try { - killerData = getPlayerData(GetPlayerFromIndex(killer)); + killerData = getPlayerData(killerSource); } catch (error) {} } try {
2
diff --git a/src/index.js b/src/index.js @@ -3,16 +3,14 @@ const Core = require('./core') // Parent const Plugin = require('./core/Plugin') -// Orchestrators -const Dashboard = require('./plugins/Dashboard') - // Acquirers -const Dummy = require('./plugins/Dummy') +const Dashboard = require('./plugins/Dashboard') const DragDrop = require('./plugins/DragDrop') const FileInput = require('./plugins/FileInput') const GoogleDrive = require('./plugins/GoogleDrive') const Dropbox = require('./plugins/Dropbox') const Instagram = require('./plugins/Instagram') +const Url = require('./plugins/Url') const Webcam = require('./plugins/Webcam') // Progressindicators @@ -20,8 +18,6 @@ const StatusBar = require('./plugins/StatusBar') const ProgressBar = require('./plugins/ProgressBar') const Informer = require('./plugins/Informer') -// Modifiers - // Uploaders const Tus = require('./plugins/Tus') const XHRUpload = require('./plugins/XHRUpload') @@ -29,6 +25,8 @@ const Transloadit = require('./plugins/Transloadit') const AwsS3 = require('./plugins/AwsS3') // Helpers and utilities +const Form = require('./plugins/Form') +const ThumbnailGenerator = require('./plugins/ThumbnailGenerator') const GoldenRetriever = require('./plugins/GoldenRetriever') const ReduxDevTools = require('./plugins/ReduxDevTools') const ReduxStore = require('./plugins/Redux') @@ -36,7 +34,6 @@ const ReduxStore = require('./plugins/Redux') module.exports = { Core, Plugin, - Dummy, StatusBar, ProgressBar, Informer, @@ -44,6 +41,7 @@ module.exports = { GoogleDrive, Dropbox, Instagram, + Url, FileInput, Tus, XHRUpload, @@ -51,6 +49,8 @@ module.exports = { AwsS3, Dashboard, Webcam, + Form, + ThumbnailGenerator, GoldenRetriever, ReduxDevTools, ReduxStore
0
diff --git a/editor/upload.php b/editor/upload.php @@ -72,8 +72,9 @@ class ExSimpleXMLElement extends SimpleXMLElement } } -if (!isset($_SESSION['toolkits_logon_username'])) +if (!isset($_SESSION['toolkits_logon_username']) && !is_user_admin()) { + _debug("Session is invalid or expired"); die("Session is invalid or expired"); }
11
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,15 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.44.4] -- 2019-02-12 + +### Fixed +- Fix `Plotly.react` used with `uirevision` when removing traces [#3527] +- Fix `scattergl` update calls that change the number of on-graph text elements [#3536] +- Fix annotations SVG errors on trace-less subplots [#3534] +- Fix `ohlc` and `candlestick` hover on blank coordinates (bug introduced in 1.43.2) [#3537] + + ## [1.44.3] -- 2019-02-06 ### Fixed
3
diff --git a/commands/rssrefresh.js b/commands/rssrefresh.js @@ -32,7 +32,7 @@ module.exports = async (bot, message, command) => { await dbOps.failedLinks.reset(source.link) log.command.info(`Refreshed ${source.link} and is back on cycle`, message.guild) } catch (err) { - await message.channel.send(`Unable to refresh <${source.link}>.\n\n${err.message}`) + return await message.channel.send(`Unable to refresh <${source.link}>.\n\n${err.message}`) } await processing.edit(`Successfully refreshed <${source.link}>. It will now be retrieved on subsequent cycles.`) } catch (err) {
1
diff --git a/src/User.jsx b/src/User.jsx @@ -12,6 +12,8 @@ import { AppContext } from './components/app'; import styles from './User.module.css'; +import * as sounds from '../sounds.js'; + // export const User = ({ address, setAddress, setLoginFrom }) => { @@ -44,6 +46,10 @@ export const User = ({ address, setAddress, setLoginFrom }) => { setState({ openedPanel: null }); + const soundFiles = sounds.getSoundFiles(); + const audioSpec = soundFiles.menuBack[Math.floor(Math.random() * soundFiles.menuBack.length)]; + sounds.playSound(audioSpec); + }; const _setAddress = async address => { @@ -198,6 +204,18 @@ export const User = ({ address, setAddress, setLoginFrom }) => { }, [ address ] ); + // + + const _triggerClickSound = () => { + + const soundFiles = sounds.getSoundFiles(); + const audioSpec = soundFiles.menuClick[Math.floor(Math.random() * soundFiles.menuClick.length)]; + sounds.playSound(audioSpec); + + }; + + // + const open = state.openedPanel === 'LoginPanel'; const loggedIn = !!address; @@ -225,7 +243,16 @@ export const User = ({ address, setAddress, setLoginFrom }) => { } else { setState({ openedPanel: null }); } + + const soundFiles = sounds.getSoundFiles(); + const audioSpec = soundFiles.menuNext[Math.floor(Math.random() * soundFiles.menuNext.length)]; + sounds.playSound(audioSpec); + } + }} onMouseEnter={e => { + + _triggerClickSound(); + }}> <div className={styles.key}> <div className={styles.bow}> @@ -276,17 +303,20 @@ export const User = ({ address, setAddress, setLoginFrom }) => { <span>Log in</span> {/* <div className={ styles.background } /> */} </div> - <div className={ styles.methodBtn } onClick={ metaMaskLogin } > + <div className={ styles.methodBtn } onClick={ metaMaskLogin } onMouseEnter={ _triggerClickSound } > <img src="images/metamask.png" alt="metamask" width="28px" /> <span className={ styles.methodBtnText } >MetaMask</span> </div> - <a href={ `https://discord.com/api/oauth2/authorize?client_id=${ discordClientId }&redirect_uri=${ window.location.origin }%2Flogin&response_type=code&scope=identify` } > + <a + href={ `https://discord.com/api/oauth2/authorize?client_id=${ discordClientId }&redirect_uri=${ window.location.origin }%2Flogin&response_type=code&scope=identify` } + onMouseEnter={ _triggerClickSound } + > <div className={ styles.methodBtn } > <img src="images/discord.png" alt="discord" width="28px" /> <span className={ styles.methodBtnText } >Discord</span> </div> </a> - <div className={ styles.methodBtn } onClick={ handleCancelBtnClick } > + <div className={ styles.methodBtn } onClick={ handleCancelBtnClick } onMouseEnter={ _triggerClickSound } > <span className={ styles.methodBtnText } >Cancel</span> </div> </div>
0
diff --git a/preview.js b/preview.js @@ -3,6 +3,13 @@ import {storageHost, inappPreviewHost} from './constants'; const queue = []; let running = false; +let f; + +const next = ()=>{ + /** Unshift the queue to generate the next preview */ + const {url, ext, type, width, height, resolve, reject} = queue.shift(); + generatePreview(url, ext, type, width, height, resolve, reject); +} export const generatePreview = async (url, ext, type, width, height, resolve, reject) => { const previewHost = inappPreviewHost; @@ -33,15 +40,15 @@ export const generatePreview = async (url, ext, type, width, height, resolve, re const rejection = setTimeout(() => { reject('Preview Server Timed Out'); running = false; + /** discard old function */ + window.removeEventListener('message', f, false); if (queue.length > 0) { - const {url, ext, type, width, height, resolve, reject} = queue.shift(); - generatePreview(url, ext, type, width, height, resolve, reject); + next(); } }, 30 * 1000); - var f = function(event) { + f = (event) => { if (event.data.method === 'result') { - console.log('Preview generation result ', event.data.result); window.removeEventListener('message', f, false); let blob; if (type === 'webm') { @@ -60,8 +67,7 @@ export const generatePreview = async (url, ext, type, width, height, resolve, re }); running = false; if (queue.length > 0) { - const {url, ext, type, width, height, resolve, reject} = queue.shift(); - generatePreview(url, ext, type, width, height, resolve, reject); + next(); } } };
0
diff --git a/test-complete/nodejs-documents-transaction-timelimit.js b/test-complete/nodejs-documents-transaction-timelimit.js @@ -52,7 +52,7 @@ describe('Document transaction test', function() { */ var tid = 0; it('should commit the write document', function(done) { - db.transactions.open({transactionName: "nodeTransaction", timeLimit: 1}) + db.transactions.open({transactionName: "nodeTransaction", timeLimit: 2}) .result(function(response) { tid = response.txid; return db.documents.write({ @@ -70,7 +70,7 @@ it('should commit the write document', function(done) { .then(function(response) { //console.log(JSON.stringify(response, null, 2)); response['transaction-status']['transaction-name'].should.equal('nodeTransaction'); - response['transaction-status']['time-limit'].should.equal('1'); + response['transaction-status']['time-limit'].should.equal('2'); done(); }, done); /*.catch(function(error) {
3
diff --git a/app/src/renderer/connectors/lcdClient.js b/app/src/renderer/connectors/lcdClient.js @@ -90,12 +90,60 @@ Object.assign(Client.prototype, { }, tx: argReq("GET", "/txs"), - // staking - updateDelegations: req("POST", "/stake/delegations"), + /* ============ STAKE ============ */ + + // Get all delegations information from a delegator + getDelegator: function(addr) { + return req("GET", `/stake/delegators/${addr}`).call(this) + }, + // Get all txs from a delegator + getDelegatorTxs: function(addr) { + return req("GET", `/stake/delegators/${addr}/txs`).call(this) + }, + // Get a specific tx from a delegator + getDelegatorTx: function(addr, id, types) { + if types === "" { + return req("GET", `/stake/delegators/${addr}/txs`).call(this) + } else { + return req("GET", `/stake/delegators/${addr}/txs?type=${types}`).call(this) + } + }, + // // Query all validators that a delegator is bonded to + // getDelegatorValidators: function(delegatorAddr) { + // return req("GET", `/stake/delegators/${delegatorAddr}/validators`).call(this) + // }, + // // Query a validator info that a delegator is bonded to + // getDelegatorValidator: function(delegatorAddr, validatorAddr) { + // return req("GET", `/stake/delegators/${delegatorAddr}/validators/${validatorAddr}`).call(this) + // }, + + // Get a list containing all the validator candidates + getValidators: req("GET", "/stakes/validators/"), + // Get information from a validator + getValidator: function(addr) { + return req("GET", `/stake/validators/${addr}`).call(this) + }, + // // Get all of the validator bonded delegators + // getValidatorDelegators: function(addr) { + // return req("GET", `/stake/validator/${addr}/delegators`).call(this) + // }, + + // Get the list of the validators in the latest validator set + getValidatorSet: req("GET", "/validatorsets/latest"), + + + updateDelegations: function(delegatorAddr) { + return req("POST", `/stake/delegators/${delegatorAddr}/delegations`) + } + candidates: req("GET", "/stake/validators"), getValidators: req("GET", "/validatorsets/latest"), - queryDelegation: function(delegator, validator) { - return req("GET", `/stake/${delegator}/delegation/${validator}`).call(this) + // Query a delegation between a delegator and a validator + queryDelegation: function(delegatorAddr, validatorAddr) { + return req("GET", `/stake/delegators/${delegatorAddr}/delegations/${validatorAddr}`).call(this) + } + queryUnbonding: function(delegatorAddr, validatorAddr) { + return req("GET", `/stake/delegators/${delegatorAddr}/unbonding_delegations/${validatorAddr}`).call(this) } })
3
diff --git a/src/main/client/editor/actions/map/stopStrategies.js b/src/main/client/editor/actions/map/stopStrategies.js @@ -173,12 +173,12 @@ export function addStopToPattern (pattern, stop, index) { } else { // if shape coordinates do not exist, add pattern stop and get shape between stops (if multiple stops exist) patternStops.push(newStop) if (patternStops.length > 1) { - let previousStop = getState().editor.data.tables.stops.find(s => s.id === patternStops[patternStops.length - 2].stopId) + let previousStop = getState().editor.data.tables.stop.find(s => s.id === patternStops[patternStops.length - 2].stopId) console.log(previousStop) - getSegment([[previousStop.stop_lon, previousStop.stop_lat], [stop.stop_lon, stop.stop_lat]], getState().editor.editSettings.followStreets) + return getSegment([[previousStop.stop_lon, previousStop.stop_lat], [stop.stop_lon, stop.stop_lat]], getState().editor.editSettings.followStreets) .then(geojson => { dispatch(updateActiveGtfsEntity(pattern, 'trippattern', {patternStops: patternStops, shape: {type: 'LineString', coordinates: geojson.coordinates}})) - dispatch(saveActiveGtfsEntity('trippattern')) + return dispatch(saveActiveGtfsEntity('trippattern')) }) } else { dispatch(updateActiveGtfsEntity(pattern, 'trippattern', {patternStops: patternStops}))
1
diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js @@ -176,18 +176,15 @@ module.exports = class extends BaseGenerator { } } - _gitCommitAll(commitMsg, callback) { - const commit = () => { + _gitCommitAll(commitMsg) { + const gitAdd = this.gitExec(['add', '-A'], { maxBuffer: 1024 * 10000, silent: this.silent }); + if (gitAdd.code !== 0) this.error(`Unable to add resources in git:\n${gitAdd.stderr}`); + const gitCommit = this.gitExec(['commit', '-q', '-m', `"${commitMsg}"`, '-a', '--allow-empty', '--no-verify'], { silent: this.silent }); if (gitCommit.code !== 0) this.error(`Unable to commit in git:\n${gitCommit.stderr}`); this.success(`Committed with message "${commitMsg}"`); - callback(); - }; - const gitAdd = this.gitExec(['add', '-A'], { maxBuffer: 1024 * 10000, silent: this.silent }); - if (gitAdd.code !== 0) this.error(`Unable to add resources in git:\n${gitAdd.stderr}`); - commit(); } _regenerate(jhipsterVersion, blueprintInfo, callback) { @@ -195,10 +192,9 @@ module.exports = class extends BaseGenerator { const keystore = `${SERVER_MAIN_RES_DIR}config/tls/keystore.p12`; this.info(`Removing ${keystore}`); shelljs.rm('-Rf', keystore); - this._gitCommitAll(`Generated with JHipster ${jhipsterVersion}${blueprintInfo}`, () => { + this._gitCommitAll(`Generated with JHipster ${jhipsterVersion}${blueprintInfo}`); callback(); }); - }); } _retrieveLatestVersion(npmPackage, callback) { @@ -331,9 +327,8 @@ module.exports = class extends BaseGenerator { const gitInit = this.gitExec('init', { silent: this.silent }); if (gitInit.code !== 0) this.error(`Unable to initialize a new Git repository:\n${gitInit.stdout} ${gitInit.stderr}`); this.success('Initialized a new Git repository'); - this._gitCommitAll('Initial', () => { + this._gitCommitAll('Initial'); done(); - }); }; const gitRevParse = this.gitExec(['rev-parse', '-q', '--is-inside-work-tree'], { silent: this.silent }); if (gitRevParse.code !== 0) gitInit();
2
diff --git a/.travis.yml b/.travis.yml @@ -3,14 +3,16 @@ language: node_js node_js: - stable +sudo: required +before_install: + - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg + - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + - sudo apt-get update -qq + - sudo apt-get install -y -qq yarn + cache: yarn: false -addons: - apt: - config: - retries: true - before_deploy: yarn build deploy:
3
diff --git a/userscript.user.js b/userscript.user.js @@ -27425,9 +27425,14 @@ var $$IMU_EXPORT$$; // https://ae01.alicdn.com/kf/HT1N7knFG0dXXagOFbXQ/220255879/HT1N7knFG0dXXagOFbXQ.jpg // https://cbu01.alicdn.com/img/ibank/2016/379/147/3522741973_1026601309.310x310.jpg // https://cbu01.alicdn.com/img/ibank/2016/379/147/3522741973_1026601309.jpg + // thanks to nijaz-lab on github: https://github.com/qsniyg/maxurl/issues/578 + // https://ae01.alicdn.com/kf/HTB1TQqIOpXXXXbhXXXXq6xXFXXX3/Leggings-Fitness-Women-Sexy-Women-Jean-Skinny-Jeggings-Fake-Ripped-Holes-Pocket-Print-Stretchy-Slim-Leggings.jpg_Q90.jpg_.webp + // https://ae01.alicdn.com/kf/HTB1TQqIOpXXXXbhXXXXq6xXFXXX3/Leggings-Fitness-Women-Sexy-Women-Jean-Skinny-Jeggings-Fake-Ripped-Holes-Pocket-Print-Stretchy-Slim-Leggings.jpg_Q90.jpg + // https://ae01.alicdn.com/kf/HTB1TQqIOpXXXXbhXXXXq6xXFXXX3/Leggings-Fitness-Women-Sexy-Women-Jean-Skinny-Jeggings-Fake-Ripped-Holes-Pocket-Print-Stretchy-Slim-Leggings.jpg return src - .replace(/_[0-9]+x[0-9]+[^/]*?$/, "") .replace(/\.[0-9]+x[0-9]+(\.[^/.]*)(?:[?#].*)?$/, "$1") + .replace(/(\.[^/._?#]+)_(?:[0-9]+x[0-9]+|Q[0-9]+)\.[^/.]+$/, "$1") + .replace(/(\.[^/._?#]+)_\.webp(?:[?#].*)?$/, "$1") .replace(/\?.*/, ""); }
7
diff --git a/src/components/inspectors/CycleExpression.vue b/src/components/inspectors/CycleExpression.vue @@ -34,8 +34,8 @@ export default { props: ['value', 'repeatInput'], data() { const periods = [ - { name: periodNames.minute, value: 'M' }, - { name: periodNames.hour, value: 'H' }, + { name: periodNames.minute, value: 'M', isTime: true }, + { name: periodNames.hour, value: 'H', isTime: true }, { name: periodNames.day, value: 'D' }, { name: periodNames.month, value: 'M' }, ]; @@ -54,16 +54,19 @@ export default { }, immediate: true, }, - cycyleExpression: { - handler(cycyleExpression) { - this.$emit('input', cycyleExpression); + cycleExpression: { + handler(cycleExpression) { + this.$emit('input', cycleExpression); }, immediate: true, }, }, computed: { - cycyleExpression() { - return `R${this.repeat}${this.periodicity.value}`; + cycleExpression() { + if (this.periodicity.isTime) { + return `R/PT${this.repeat}${this.periodicity.value}`; + } + return `R/P${this.repeat}${this.periodicity.value}`; }, }, methods: {
3
diff --git a/src/setData/yearTwo.js b/src/setData/yearTwo.js @@ -693,11 +693,11 @@ export default ([ items: [ 2176571298, // Nightmare's End (Emblem) 2176571299, // Deep in the Woods (Emblem) - 2574262861, // Soulsknot (Transmat Effect) - 2574262860, // Arachnophile (Transmat Effect) 4224972854, // Dark Fluorescence (Shader) 4224972855, // Shadowstrike (Shader) - 566732136 // Amaranth Atrocity (Shader) + 566732136, // Amaranth Atrocity (Shader) + 2574262861, // Soulsknot (Transmat Effect) + 2574262860 // Arachnophile (Transmat Effect) ] } ]
5
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitUriMatcher.java b/app/src/main/java/com/github/mobile/core/commit/CommitUriMatcher.java @@ -45,11 +45,17 @@ public class CommitUriMatcher { if (repo == null) return null; + if (pathSegments.size() == 6) { + if ("pull".equals(pathSegments.get(2)) && "commits".equals(pathSegments.get(4))) { + return getSingleCommitIntent(repo, pathSegments); + } else { + return null; + } + } + switch (pathSegments.get(2)) { case "commit": return getSingleCommitIntent(repo, pathSegments); - case "pull": - return getSingleCommitIntent(repo, pathSegments); case "compare": return getCommitCompareIntent(repo, pathSegments); default: @@ -58,11 +64,7 @@ public class CommitUriMatcher { } private static Intent getSingleCommitIntent(Repository repo, List<String> pathSegments) { - String ref; - if (pathSegments.size() == 4 || pathSegments.size() == 6) - ref = pathSegments.get(pathSegments.size() - 1); - else - return null; + String ref = pathSegments.get(pathSegments.size() - 1); if (TextUtils.isEmpty(ref)) return null;
1
diff --git a/docs/docs/building-and-running.md b/docs/docs/building-and-running.md @@ -180,9 +180,7 @@ If you're using Docker Desktop on Windows, add `-f deploy/helm/docker-desktop-wi # update magda helm repo helm repo update # update magda chart dependencies -helm dep build deploy/helm/internal-charts/storage-api -helm dep build deploy/helm/magda-core -helm dep build deploy/helm/magda +yarn update-all-charts # deploy the magda chart from magda helm repo helm upgrade --install --timeout 9999s --wait -f deploy/helm/docker-desktop-windows.yml -f deploy/helm/minikube-dev.yml magda deploy/helm/local-deployment ```
14
diff --git a/src/cli/argument-parser.js b/src/cli/argument-parser.js @@ -96,7 +96,7 @@ export default class CLIArgumentParser { .option('--dev', 'enables mechanisms to log and diagnose errors') .option('--qr-code', 'outputs QR-code that repeats URLs used to connect the remote browsers') .option('--sf, --stop-on-first-fail', 'stop an entire test run if any test fails') - .option('--ts-config-path <path>', 'specifies the TypeScript configuration file location. If the tsConfigPath option is not specified, TestCafe looks for the tsconfig.json file in the current directory.') + .option('--ts-config-path <path>', 'use a custom TypeScript configuration file and specify its location') // NOTE: these options will be handled by chalk internally .option('--color', 'force colors in command line')
0
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -174,16 +174,12 @@ articles: - title: "For Users" url: "/multifactor-authentication/guardian/user-guide" - - title: "SMS" - url: "/multifactor-authentication" - - title: "Google Authenticator" url: "/multifactor-authentication/google-authenticator" - title: "Duo Security" url: "/multifactor-authentication/duo" - - title: "Anomaly Detection" url: "/anomaly-detection"
2
diff --git a/Source/Scene/FrameState.js b/Source/Scene/FrameState.js @@ -239,9 +239,9 @@ define([ /** * Distances to the near and far planes of the camera frustums * @type {Number[]} - * @default [1.0, 1000.0] + * @default [] */ - this.frustumSplits = [1.0, 1000.0]; + this.frustumSplits = []; } /**
4
diff --git a/app/views/carto/builder/visualizations/show.html.erb b/app/views/carto/builder/visualizations/show.html.erb <% if current_user.google_maps_api_key %> <!-- include google maps library --> - <script type='text/javascript' src="http://www.maps.google.com/maps/api/js?key=<%= current_user.google_maps_api_key %>&v=3.25"></script> + <script type='text/javascript' src="//maps.google.com/maps/api/js?key=<%= current_user.google_maps_api_key %>&v=3.25"></script> <% end %> <%= javascript_include_tag 'vendor_editor3.js' %> <%= javascript_include_tag 'common_editor3.js' %>
2
diff --git a/src/resources/parser/glb-parser.js b/src/resources/parser/glb-parser.js @@ -1160,7 +1160,7 @@ var createAnimation = function (gltfAnimation, animationIndex, gltfAccessors, bu var createNode = function (gltfNode, nodeIndex) { var entity = new GraphNode(); - if (gltfNode.hasOwnProperty('name')) { + if (gltfNode.hasOwnProperty('name') && gltfNode.name.length > 0) { entity.name = gltfNode.name; } else { entity.name = "node_" + nodeIndex;
4
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md # neo.mjs Contributing Guide - We are very excited that you are interested in contributing to neo.mjs.<br> No worries, you don't need to be a guru, ninja or rockstar to support the project. ## What you can do to help: ### 1. neo.mjs just got released, so the most important thing right now is to get more eyes on the project. - 1. Add a star to this repository. Ok, this one was easy. Thank you! 2. Tell your friends about neo.mjs. 3. Write blog posts or post on social media (Facebook, LinkedIn, Twitter, etc.) @@ -14,7 +12,6 @@ No worries, you don't need to be a guru, ninja or rockstar to support the projec 5. Interested to see a neo.mjs session at a developer conference? Definitely possible. Just reach out! ### 2. Use the issues tracker - 1. In case you got an idea for a new feature 2. In case you find a bug 1. Ideally, you create a new breaking test inside the tests folder. @@ -23,8 +20,7 @@ No worries, you don't need to be a guru, ninja or rockstar to support the projec This is a great help to figure out which tickets are the most important ones for the neo.mjs community. ### 3. Contribute to the neo.mjs code base - -1. Please **_always_** create a new issue inside our <a href="../../issues">Issues Tracker</a> first and wait for approval. +1. Please ***always*** create a new issue inside our <a href="../../issues">Issues Tracker</a> first and wait for approval. This ensures that your idea fits the scope of the project and makes it less likely to get a rejected PR. We will do our best to reply to new tickets within 7d max. In case we don't, feel free to bump the ticket. 2. In case you want to work on an existing ticket, please add a comment there and get the ticket assigned to you. @@ -37,7 +33,6 @@ No worries, you don't need to be a guru, ninja or rockstar to support the projec 6. Refer to the <a href="./.github/CODEBASE_OVERVIEW.md">codebase overview</a> to understand how our repository is structured. ### 4. In case you created a nice app or component using neo.mjs, please let us know about it. - 1. We are always interested to feature client projects in blog posts or on social media. <br><br>
13
diff --git a/player/js/elements/AudioElement.js b/player/js/elements/AudioElement.js @@ -17,7 +17,11 @@ function AudioElement(data, globalData, comp) { this.audio = this.globalData.audioController.createAudio(assetPath); this._currentTime = 0; this.globalData.audioController.addAudio(this); + this._volumeMultiplier = 1; + this._volume = 1; + this._previousVolume = null; this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; + this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : {k: [100]}, 1, 0.01, this); } AudioElement.prototype.prepareFrame = function (num) { @@ -29,6 +33,12 @@ AudioElement.prototype.prepareFrame = function (num) { } else { this._currentTime = num / this.data.sr; } + this._volume = this.lv.v[0]; + var totalVolume = this._volume * this._volumeMultiplier; + if ( this._previousVolume != totalVolume ) { + this._previousVolume = totalVolume; + this.audio.volume(totalVolume); + } }; extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement); @@ -71,7 +81,9 @@ AudioElement.prototype.setRate = function (rateValue) { }; AudioElement.prototype.volume = function (volumeValue) { - this.audio.volume(volumeValue); + this._volumeMultiplier = volumeValue; + this._previousVolume = volumeValue * this._volume; + this.audio.volume(this._previousVolume); }; AudioElement.prototype.getBaseElement = function () {
9
diff --git a/token-metadata/0xB8BAa0e4287890a5F79863aB62b7F175ceCbD433/metadata.json b/token-metadata/0xB8BAa0e4287890a5F79863aB62b7F175ceCbD433/metadata.json "symbol": "SWRV", "address": "0xB8BAa0e4287890a5F79863aB62b7F175ceCbD433", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app-object.js b/app-object.js @@ -244,6 +244,11 @@ class App extends THREE.Object3D { getPhysicsIds() { return this.physicsIds; } + activate() { + this.dispatchEvent({ + type: 'activate', + }); + } /* hit(hp) { this.hitTracker.hit(hp); } */
0
diff --git a/commands/strike.js b/commands/strike.js @@ -6,7 +6,9 @@ const softban = require('./softban.js'); const maxStrikesAtOnce = 5; -exports.command = async (message, args, database, bot) => { +let command = {}; + +command.command = async (message, args, database, bot) => { if(!await util.isMod(message.member) && !message.member.hasPermission('BAN_MEMBERS')) { await message.react(util.icons.error); return; @@ -49,30 +51,34 @@ exports.command = async (message, args, database, bot) => { } } catch (e) {} - let reason = args.join(' ') || 'No reason provided.'; + await command.add(message.guild, user, count, message.author, args.join(' '), message.channel, database, bot); +}; + +command.names = ['strike']; + +command.add = async (guild, user, count, moderator, reason, channel, database, bot) => { + reason = reason || 'No reason provided.'; let now = Math.floor(Date.now()/1000); + let member; //insert strike - let insert = await database.queryAll("INSERT INTO moderations (guildid, userid, action, value, created, reason, moderator) VALUES (?,?,?,?,?,?,?)",[message.guild.id, user.id, 'strike', count, now, reason, message.author.id]); + let insert = await database.queryAll("INSERT INTO moderations (guildid, userid, action, value, created, reason, moderator) VALUES (?,?,?,?,?,?,?)",[guild.id, user.id, 'strike', count, now, reason, moderator.id]); //count all strikes - let total = await database.query("SELECT SUM(value) AS sum FROM moderations WHERE guildid = ? AND userid = ? AND (action = 'strike' OR action = 'pardon')",[message.guild.id, user.id]); + let total = await database.query("SELECT SUM(value) AS sum FROM moderations WHERE guildid = ? AND userid = ? AND (action = 'strike' OR action = 'pardon')",[guild.id, user.id]); total = parseInt(total.sum); - if (member) { try { - await member.send(`You received ${count} ${count === 1 ? "strike" : "strikes"} in \`${message.guild.name}\` | ${reason}\nYou now have ${total} ${total === 1 ? "strike" : "strikes"}`); - } catch (e) {} + member = await guild.members.fetch(user); + await member.send(`You received ${count} ${count === 1 ? "strike" : "strikes"} in \`${guild.name}\` | ${reason}\nYou now have ${total} ${total === 1 ? "strike" : "strikes"}`); + } catch{} + await util.chatSuccess(channel, user, reason, "striked"); + await util.logMessageModeration(guild, moderator, user, reason, insert.insertId, "Strike", null, count, total); + await punish(guild, user, total, bot); } - await util.chatSuccess(message.channel, user, reason, "striked"); - await util.logMessageModeration(message, message.author, user, reason, insert.insertId, "Strike", null, count, total); - await punish(message, user, total, bot); -}; -exports.names = ['strike']; - -async function punish(message, user, total, bot) { - let config = await util.getGuildConfig(message.guild); +async function punish(guild, user, total, bot) { + let config = await util.getGuildConfig(guild); let punishment, member; let count = total; do { @@ -86,26 +92,28 @@ async function punish(message, user, total, bot) { switch (punishment.action) { case 'ban': - await ban.ban(message.guild, user, bot.user, `Reaching ${total} strikes`, punishment.duration); + await ban.ban(guild, user, bot.user, `Reaching ${total} strikes`, punishment.duration); break; case 'kick': try { - member = await message.guild.members.fetch(user.id); + member = await guild.members.fetch(user.id); } catch (e) { return; } - await kick.kick(message.guild, member, bot.user, `Reaching ${total} strikes`); + await kick.kick(guild, member, bot.user, `Reaching ${total} strikes`); break; case 'mute': - await mute.mute(message.guild, user, bot.user, `Reaching ${total} strikes`, punishment.duration); + await mute.mute(guild, user, bot.user, `Reaching ${total} strikes`, punishment.duration); break; case 'softban': try { - member = await message.guild.members.fetch(user.id); + member = await guild.members.fetch(user.id); } catch (e) { return; } - await softban.softban(message.guild, member, bot.user, `Reaching ${total} strikes`); + await softban.softban(guild, member, bot.user, `Reaching ${total} strikes`); break; } } + +module.exports = command;
5
diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js @@ -92,6 +92,11 @@ class RequestorStep extends React.Component { city: 'requestorAddressCity', state: 'requestorAddressState', zipCode: 'requestorAddressZipCode', + + addressStreet: 'requestorAddressStreet', + addressCity: 'requestorAddressCity', + addressState: 'requestorAddressState', + addressZipCode: 'requestorAddressZipCode', }; const renamedInputKey = lodashGet(renamedFields, inputKey, inputKey); const newState = {[renamedInputKey]: value};
9
diff --git a/framer/Layer.coffee b/framer/Layer.coffee @@ -439,8 +439,8 @@ class exports.Layer extends BaseClass set: (value) -> if value is null newValue = null - @off "change:parent", @ - Screen.off "resize", @ + @off "change:parent", @parentChanged + Screen.off "resize", @layout else newValue = _.defaults _.clone(value), left: 0, @@ -455,20 +455,25 @@ class exports.Layer extends BaseClass width: @width, height: @height if @parent? - @parent.on "change:width", => @layout() - @parent.on "change:height", => @layout() + if not (@layout in @parent.listeners("change:width")) + @parent.on "change:width", @layout + if not (@layout in @parent.listeners("change:height")) + @parent.on "change:height", @layout else - Screen.on "resize", => @layout() - @on "change:parent", (newParent, oldParent) => + if not (@layout in Screen.listeners("resize")) + Screen.on "resize", @layout + if not (@parentChanged in @listeners("change:parent")) + @on "change:parent", @parentChanged + @_setPropertyValue "constraintValues", newValue + + parentChanged: (newParent, oldParent) => if oldParent? - oldParent.off "change:width", @ - oldParent.off "change:height", @ + oldParent.off "change:width", @layout + oldParent.off "change:height", @layout else - Screen.off "resize", @ + Screen.off "resize", @layout @constraintValues = null - @_setPropertyValue "constraintValues", newValue - - layout: -> + layout: => return if not @constraintValues? parent = @parent ? Screen @frame = Utils.calculateLayoutFrame(parent, @)
7
diff --git a/src/components/ScreenSizeProvider.js b/src/components/ScreenSizeProvider.js @@ -13,7 +13,7 @@ type State = { size: ScreenSize }; -export const getScreenSize = (): ScreenSize => { +const getScreenSize = (): ScreenSize => { const { width } = Dimensions.get("window"); if (width >= 440) { return "large";
2
diff --git a/components/bases-locales/index.js b/components/bases-locales/index.js @@ -14,9 +14,12 @@ import Counter from '../ui/metrics/counter' import BaseAdresseLocale from './bases-adresse-locales/base-adresse-locale' import BalCoverMap from './bal-cover-map' import Notification from '../notification' +import allPartners from '../../partners.json' const BasesLocales = React.memo(({datasets, stats}) => { const [balSamples, setBalSamples] = useState([]) + const shufflePartners = shuffle(allPartners).slice(0, 3) + const mapData = { type: 'FeatureCollection', features: datasets.map(dataset => ({ @@ -103,8 +106,13 @@ const BasesLocales = React.memo(({datasets, stats}) => { </ButtonLink> </div> <div className='organismes-container'> - <h3>Organismes partenaires</h3> - <Partners /> + <h3>Quelques partenaires :</h3> + <Partners partnersList={shufflePartners} /> + </div> + <div className='centered'> + <ButtonLink href='/bases-locales/charte'> + Voir tous les partenaires + </ButtonLink> </div> </Section>
0