code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/web/RecipeWaiter.js b/src/web/RecipeWaiter.js @@ -26,7 +26,6 @@ var RecipeWaiter = function(app, manager) { RecipeWaiter.prototype.initialiseOperationDragNDrop = function() { var recList = document.getElementById("rec-list"); - // Recipe list Sortable.create(recList, { group: "recipe", @@ -45,7 +44,9 @@ RecipeWaiter.prototype.initialiseOperationDragNDrop = function() { } }.bind(this), onSort: function(evt) { + if (evt.from.id === "rec-list") { document.dispatchEvent(this.manager.statechange); + } }.bind(this) });
2
diff --git a/packages/gatsby-image/src/index.js b/packages/gatsby-image/src/index.js @@ -89,7 +89,7 @@ const isWebpSupported = () => { const noscriptImg = props => { const { - opacity = ``, + opacity = `1`, src, srcSet, sizes = ``, @@ -97,9 +97,9 @@ const noscriptImg = props => { alt = ``, width = ``, height = ``, - transitionDelay = ``, + transitionDelay = `0.5s`, } = props - return `<img width=${width} height=${height} src="${src}" srcset="${srcSet}" alt="${alt}" title="${title}" sizes="${sizes}" style="position:absolute;top:0;left:0;transition:opacity 0.5s;transition-delay:${transitionDelay};opacity:${opacity};width:100%;height:100%;object-fit:cover;object-position:center"/>` + return `<img width="${width}" height="${height}" src="${src}" srcset="${srcSet}" alt="${alt}" title="${title}" sizes="${sizes}" style="position:absolute;top:0;left:0;transition:opacity 0.5s;transition-delay:${transitionDelay};opacity:${opacity};width:100%;height:100%;object-fit:cover;object-position:center"/>` } const Img = props => {
12
diff --git a/src/encoded/commands/generate_ontology.py b/src/encoded/commands/generate_ontology.py @@ -364,7 +364,25 @@ slim_shims = { 'EFO:0007601': 'spinal cord', 'EFO:0005480': 'spleen', 'EFO:0005912': 'uterus', - 'EFO:0005718': 'uterus' + 'EFO:0005718': 'uterus', + 'EFO:0005284': 'blood', + 'EFO:0002869': 'bone element', + 'EFO:0004389': 'bone element', + 'EFO:0002717': 'bone marrow', + 'EFO:0001084': 'embryo', + 'EFO:0002078': 'embryo', + 'EFO:0005914': 'embryo', + 'EFO:0005915': 'embryo', + 'EFO:0005916': 'embryo', + 'EFO:0005650': 'limb', + 'EFO:0005744': 'limb', + 'EFO:0002324': 'lymphoid tissue', + 'EFO:0002787': 'lymphoid tissue', + 'EFO:0007096': 'skin of body', + 'EFO:0007098': 'skin of body', + 'EFO:0007095': 'skin of body', + 'EFO:0007097': 'skin of body', + 'EFO:0002779': 'skin of body' } }
0
diff --git a/pagerenderer/vue/ui.apps/src/main/content/jcr_root/apps/pagerender/vue/components/placeholder/template.vue b/pagerenderer/vue/ui.apps/src/main/content/jcr_root/apps/pagerender/vue/components/placeholder/template.vue #L% --> <template> - <div v-if="isEditMode" style="border: 1px solid #c0c0c0; clear: both; padding: 4px; margin: 4px; text-align: center; width: auto;" + <div v-if="isEditMode" class="per-drop-target" v-on:allowDrop="allowDrop" v-on:drop="drop" v-bind:data-per-path="model.path" data-per-droptarget="true" v-bind:data-per-location="model.location"> {{componentName}} </div> @@ -61,3 +61,17 @@ export default { } } </script> + +<style> + .per-drop-target { + border: 1px solid #c0c0c0; + clear: both; + padding: 4px; + margin: 4px; + text-align: center; + width: calc(100% - 8px); + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } +</style>
7
diff --git a/packages/app/src/styles/_on-edit.scss b/packages/app/src/styles/_on-edit.scss @@ -181,6 +181,12 @@ body.on-edit { } } + .grw-copy-dropdown { + .btn-copy { + padding: 3px !important; // overwrite padding + } + } + &.builtin-editor { /***************** * Editor styles
12
diff --git a/test/context/directory/pages.test.js b/test/context/directory/pages.test.js @@ -33,36 +33,45 @@ const pagesTarget = [ ]; describe('#directory context pages', () => { - it('should process pages even without error_page HTML file', async () => { - const repoDir = path.join(testDataDir, 'directory', 'pages4'); - const noErrorPageHtml = (() => { - const newPages = { ...pages }; - delete newPages['error_page.html']; - return newPages; - })(); - createDir(repoDir, { [constants.PAGES_DIRECTORY]: noErrorPageHtml }); + it('should process pages', async () => { + const repoDir = path.join(testDataDir, 'directory', 'pages1'); + createDir(repoDir, { [constants.PAGES_DIRECTORY]: pages }); - const config = { AUTH0_INPUT_FILE: repoDir }; + const config = { AUTH0_INPUT_FILE: repoDir, AUTH0_KEYWORD_REPLACE_MAPPINGS: { env: 'test' } }; const context = new Context(config, mockMgmtClient()); await context.load(); - expect(context.assets.pages.find((page) => page.name === 'error_page')).to.deep.equal({ - html: '', - name: 'error_page', - show_log_link: false, - url: 'https://example.com/error', - }); + expect(context.assets.pages).to.deep.equal(pagesTarget); }); - it('should process pages', async () => { - const repoDir = path.join(testDataDir, 'directory', 'pages1'); - createDir(repoDir, { [constants.PAGES_DIRECTORY]: pages }); + it('should process login and error pages without HTML files', async () => { + const repoDir = path.join(testDataDir, 'directory', 'pages4'); - const config = { AUTH0_INPUT_FILE: repoDir, AUTH0_KEYWORD_REPLACE_MAPPINGS: { env: 'test' } }; + const pagesNoHtml = { + 'login.json': '{ "name": "login", "enabled": false }', + 'error_page.json': + '{ "name": "error_page", "url": "https://example.com/error", "show_log_link": false }', + }; + + createDir(repoDir, { [constants.PAGES_DIRECTORY]: pagesNoHtml }); + + const config = { AUTH0_INPUT_FILE: repoDir }; const context = new Context(config, mockMgmtClient()); await context.load(); - expect(context.assets.pages).to.deep.equal(pagesTarget); + expect(context.assets.pages).to.deep.equal([ + { + html: '', + name: 'error_page', + show_log_link: false, + url: 'https://example.com/error', + }, + { + html: '', + name: 'login', + enabled: false, + }, + ]); }); it('should ignore unknown file', async () => {
10
diff --git a/app/collections/create-form.cjsx b/app/collections/create-form.cjsx @@ -32,12 +32,12 @@ module.exports = React.createClass } apiClient.type('collections').create(collection).save() - .catch (e) => - @setState error: e .then (collection) => @refs.name.value = '' @refs.private.value = true @props.onSubmit collection + .catch (e) => + @setState error: e handleNameInputChange: -> @setState collectionNameLength: @refs.name.value.length
5
diff --git a/packages/stockflux-launcher/public/app.dev.json b/packages/stockflux-launcher/public/app.dev.json "devtools_port": 9091, "runtime": { "arguments": "--enable-aggressive-domstorage-flushing", - "version": "13.76.43.31" + "version": "12.69.43.22" }, "startup_app": { "name": "stockflux-launcher",
3
diff --git a/modules/proxistoreBidAdapter.js b/modules/proxistoreBidAdapter.js @@ -9,7 +9,7 @@ function _mapSizes(sizes) { function _createServerRequest(bidRequests, bidderRequest) { const payload = { - bidId: bidRequests.map(req => req.bidId)[0], + bidId: bidRequests.map(req => req.bidId), auctionId: bidRequests[0].auctionId, transactionId: bidRequests[0].transactionId, sizes: _mapSizes(bidRequests.map(x => x.sizes)),
4
diff --git a/validators/tsv/validate.js b/validators/tsv/validate.js @@ -13,8 +13,10 @@ const validate = ( let issues = [] // validate tsv const tsvPromises = files.map(function(file) { - return new Promise(resolve => { - utils.files.readFile(file).then(contents => { + return new Promise((resolve, reject) => { + utils.files + .readFile(file) + .then(contents => { // Push TSV to list for custom column verification after all data dictionaries have been read tsvs.push({ file: file, @@ -53,11 +55,14 @@ const validate = ( return resolve() }) }) + .catch(reject) }) }) - return new Promise(resolve => - Promise.all(tsvPromises).then(() => resolve(issues)), + return new Promise((resolve, reject) => + Promise.all(tsvPromises) + .then(() => resolve(issues)) + .catch(reject), ) }
9
diff --git a/packages/app/src/server/service/page.ts b/packages/app/src/server/service/page.ts @@ -3091,13 +3091,12 @@ class PageService { const pageOperations = await PageOperation.find({ actionType: PageActionType.Rename }); - for (const pageOp of pageOperations) { + const operatingPageIds = pageOperations.map(pageOp => pageOp.page._id.toString()); for (const pageItem of pages) { const pageItemId = pageItem._id.toString(); - const operatingPageId = pageOp.page._id.toString(); - if (operatingPageId === pageItemId) { + if (operatingPageIds.includes(pageItemId)) { const pageOperationProcessInfo = { [PageActionType.Rename]: { isProcessing: true }, }; @@ -3106,7 +3105,6 @@ class PageService { break; } } - } return pages; }
4
diff --git a/packages/magda-web/src/SearchFilters/DragBar.js b/packages/magda-web/src/SearchFilters/DragBar.js @@ -73,18 +73,18 @@ class DragBar extends Component { let y = null; let data = that.props.dragBarData; if(i === 0){ - if (d3Event.y >=0 && d3Event.y <= data[1]){ + if (d3Event.y >=0 && d3Event.y< data[1]){ y = d3Event.y; - } else if(d3Event.y > data[1]){ - y = data[1]; + } else if(d3Event.y >= data[1]){ + y = data[1] - 1; } else{ y = r; } } else{ - if (d3Event.y >=data[0] && d3Event.y <= that.props.height - 2*r){ + if (d3Event.y >data[0] && d3Event.y <= that.props.height - 2*r){ y = d3Event.y; - } else if(d3Event.y < data[0]){ - y = data[0]; + } else if(d3Event.y <= data[0]){ + y = data[0] -1; } else { y = that.props.height - 2*r; }
7
diff --git a/lib/messages/deployment-status.js b/lib/messages/deployment-status.js @@ -34,12 +34,12 @@ class DeploymentStatus extends Message { fallback: `[${this.repository.full_name}] Deploying ${center}`, text: `Deploying ${centerWithLink}`, }; - } else if (this.deploymentStatus.state == 'in_progress') { + } else if (this.deploymentStatus.state === 'in_progress') { return { fallback: `[${this.repository.full_name}] Deployment in progress for ${center}`, text: `Deployment in progress ${centerWithLink}`, }; - } else if (this.deploymentStatus.state == 'queued') { + } else if (this.deploymentStatus.state === 'queued') { return { fallback: `[${this.repository.full_name}] Deployment queued for ${center}`, text: `Deployment queued ${centerWithLink}`,
1
diff --git a/src/containers/NavBar/Modals/ExportFileModal.jsx b/src/containers/NavBar/Modals/ExportFileModal.jsx @@ -509,19 +509,16 @@ const ExportFileModal = ({ isExportModalOpen, closeExportModal }) => { const createPathToServer = statement => { let filePath = path.relative(projectFilePath, statement.serverFilePath); filePath = filePath.replace(/\\/g, '/'); - testFileCode += `const app = require('../${filePath}'); + testFileCode = `const app = require('../${filePath}'); const supertest = require('supertest') - const superReq = supertest(app)\n` + const request = supertest(app)\n` testFileCode += '\n'; - testFileCode += `app.${statement.method}('${statement.route}', async (req, res) => { - res.${statement.serverResponse} -})` }; const addEndpointTestStatements = () => { - testFileCode += `\n test('${endpointTestCase.endpointTestStatement}', async userFunc => {`; + testFileCode += `\n test('${endpointTestCase.endpointTestStatement}', async (done) => {`; endpointTestCase.endpointStatements.forEach(statement => { switch (statement.type) { case 'endpoint': @@ -530,13 +527,13 @@ const ExportFileModal = ({ isExportModalOpen, closeExportModal }) => { return statement; } }); - testFileCode += 'userFunc();' + testFileCode += 'done();' testFileCode += '});'; testFileCode += '\n'; }; const addEndpoint = statement => { - testFileCode += `const response = await superReq.${statement.method}('${statement.route}')` + testFileCode += `const response = await request.${statement.method}('${statement.route}')` testFileCode += '\n';
3
diff --git a/docs/grid/sizes.html b/docs/grid/sizes.html @@ -37,31 +37,31 @@ prev: "grid-tutorial" <div class="siimple-table-row"> <div class="siimple-table-cell"><b>Extra small</b></div> <div class="siimple-table-cell" align="center"><b>xs</b></div> - <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col-<b>xs</b>--[1-12]</code></div> + <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col--<b>xs</b>-[1-12]</code></div> <div class="siimple-table-cell" align="center"><code class="siimple-code">&lt; 480px</code></div> </div> <div class="siimple-table-row"> <div class="siimple-table-cell"><b>Small</b></div> <div class="siimple-table-cell" align="center"><b>sm</b></div> - <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col-<b>sm</b>--[1-12]</code></div> + <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col--<b>sm</b>-[1-12]</code></div> <div class="siimple-table-cell" align="center"><code class="siimple-code">&lt; 600px</code></div> </div> <div class="siimple-table-row"> <div class="siimple-table-cell"><b>Medium</b></div> <div class="siimple-table-cell" align="center"><b>md</b></div> - <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col-<b>md</b>--[1-12]</code></div> + <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col--<b>md</b>-[1-12]</code></div> <div class="siimple-table-cell" align="center"><code class="siimple-code">&lt; 768px</code></div> </div> <div class="siimple-table-row"> <div class="siimple-table-cell"><b>Large</b></div> <div class="siimple-table-cell" align="center"><b>lg</b></div> - <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col-<b>lg</b>--[1-12]</code></div> + <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col--<b>lg</b>-[1-12]</code></div> <div class="siimple-table-cell" align="center"><code class="siimple-code">&lt; 960px</code></div> </div> <div class="siimple-table-row"> <div class="siimple-table-cell"><b>Extra large</b></div> <div class="siimple-table-cell" align="center"><b>xl</b></div> - <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col-<b>xl</b>--[1-12]</code></div> + <div class="siimple-table-cell"><code class="siimple-code">siimple-grid-col--<b>xl</b>-[1-12]</code></div> <div class="siimple-table-cell" align="center"><code class="siimple-code">&lt; 1280px</code></div> </div> <div class="siimple-table-row"> @@ -73,16 +73,16 @@ prev: "grid-tutorial" </div> </div> <div class="siimple-paragraph"> - You can combine different column classes to specify how the grid will be displayed on different devices. For example, if you create a grid with two columns and add the class <code class="siimple-code">siimple-grid-col--6</code> and <code class="siimple-code">siimple-grid-col-sm--12</code>, your grid will have two columns on screens with sizes greater than <code class="siimple-code">600px</code>, and one column on mobile devices. + You can combine different column classes to specify how the grid will be displayed on different devices. For example, if you create a grid with two columns and add the class <code class="siimple-code">siimple-grid-col--6</code> and <code class="siimple-code">siimple-grid-col--sm-12</code>, your grid will have two columns on screens with sizes greater than <code class="siimple-code">600px</code>, and one column on mobile devices. </div> <div class="sd-snippet-demo"> <div class="siimple-grid"> <div class="siimple-grid-row"> - <div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col-sm--12"> - <div class="demo-grid">col--6 col-sm--12</div> + <div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col--sm-12"> + <div class="demo-grid">col--6 col--sm-12</div> </div> - <div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col-sm--12"> - <div class="demo-grid">col--6 col-sm--12</div> + <div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col--sm-12"> + <div class="demo-grid">col--6 col--sm-12</div> </div> </div> </div> @@ -90,11 +90,11 @@ prev: "grid-tutorial" <pre class="sd-snippet-code"> &lt;div class="siimple-grid"&gt; &lt;div class="siimple-grid-row"&gt; - &lt;div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col-sm--12"&gt; - col--6 col-sm--12 + &lt;div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col--sm-12"&gt; + col--6 col--sm-12 &lt;/div&gt; - &lt;div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col-sm--12"&gt; - col--6 col-sm--12 + &lt;div class="siimple-grid-col siimple-grid-col--6 siimple-grid-col--sm-12"&gt; + col--6 col--sm-12 &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
1
diff --git a/configs/cockroachlabs.json b/configs/cockroachlabs.json "sitemap_urls": [ "https://www.cockroachlabs.com/sitemap.xml" ], - "stop_urls": [], + "stop_urls": [ + "#see-also" + ], "selectors": { "lvl0": "#main-content .post-header h1", "lvl1": "#main-content .post-content h2",
8
diff --git a/package.json b/package.json "dependencies": { "backbone": "1.2.3", "cartocolor": "4.0.0", - "cartodb.js": "CartoDB/cartodb.js#12477-histogram-nulls", + "cartodb.js": "CartoDB/cartodb.js#v4", "d3": "3.5.17", "d3-interpolate": "1.1.2", "jquery": "2.1.4",
12
diff --git a/src/components/select/Select.js b/src/components/select/Select.js @@ -533,7 +533,8 @@ export default class SelectComponent extends Field { get selectData() { const selectData = _.get(this.root, 'submission.metadata.selectData', {}); - return selectData[this.path]; + const bsonSerializedPath = _.replace(this.path, '.', '_'); + return selectData[bsonSerializedPath]; } get shouldLoad() { @@ -1418,7 +1419,8 @@ export default class SelectComponent extends Field { if (!submission.metadata.selectData) { submission.metadata.selectData = {}; } - submission.metadata.selectData[this.path] = this.templateData[value]; + const bsonSerializedPath = _.replace(this.path, '.', '_'); + submission.metadata.selectData[bsonSerializedPath] = this.templateData[value]; } const displayEntireObject = this.isEntireObjectDisplay();
14
diff --git a/tests/backstop/scenarios.js b/tests/backstop/scenarios.js @@ -41,8 +41,6 @@ const storybookHost = require( './detect-storybook-host' ); const rootURL = `${ storybookHost }iframe.html?id=`; -const newBackstopTests = []; - const storybookDir = path.resolve( __dirname, '../../.storybook' ); const storyFiles = flatten( storybookConfig.stories @@ -52,6 +50,7 @@ const storyFiles = flatten( .map( ( absGlob ) => glob.sync( absGlob, { cwd: storybookDir } ) ) ); +const csfScenarios = []; storyFiles.forEach( ( storyFile ) => { const code = fs.readFileSync( storyFile ).toString(); @@ -108,18 +107,18 @@ storyFiles.forEach( ( storyFile ) => { value.scenario && value.scenario.constructor === Object ) { - const newBackstopTest = { + const scenario = { label: `${ defaultTitle }/${ value.storyName }`, ...value.scenario, url: `${ rootURL }${ storyID }`, }; - newBackstopTests.push( newBackstopTest ); + csfScenarios.push( scenario ); } } } ); -const legacyBackstopTests = legacyStorybookScenarios.map( ( story ) => { +const legacyScenarios = legacyStorybookScenarios.map( ( story ) => { return { label: `${ story.kind }/${ story.name }`, url: `${ rootURL }${ story.id }`, @@ -134,4 +133,4 @@ const legacyBackstopTests = legacyStorybookScenarios.map( ( story ) => { }; } ); -module.exports = [ ...legacyBackstopTests, ...newBackstopTests ]; +module.exports = [ ...legacyScenarios, ...csfScenarios ];
10
diff --git a/token-metadata/0xCec2387e04F9815BF12670dBf6cf03bba26DF25F/metadata.json b/token-metadata/0xCec2387e04F9815BF12670dBf6cf03bba26DF25F/metadata.json "symbol": "YFILD", "address": "0xCec2387e04F9815BF12670dBf6cf03bba26DF25F", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/components/FeedbackWidget.tsx b/src/components/FeedbackWidget.tsx @@ -39,13 +39,6 @@ const FixedDot = styled(NakedButton)<{ @media (min-width: ${({ theme }) => theme.breakpoints.l}) { width: ${({ isExpanded }) => (isExpanded ? "15rem" : "3rem")}; border-radius: ${({ isExpanded }) => (isExpanded ? "50px" : "50%")}; - #feedback-wrapper { - width: ${({ isExpanded }) => (isExpanded ? "13.5rem" : "3rem")}; - position: ${({ isExpanded }) => (isExpanded ? "absolute" : "flex")}; - } - #expanded-prompt { - display: ${({ isExpanded }) => (isExpanded ? "flex" : "none")}; - } } right: 1rem; z-index: 98; /* Below the mobile menu */ @@ -254,23 +247,25 @@ const FeedbackWidget: React.FC<IProps> = ({ className }) => { id="dot" > <Box - id="feedback-wrapper" - width="3rem" display="flex" justifyContent="space-evenly" + width={{ base: "3rem", lg: isExpanded ? "13.5rem" : "3rem" }} + position={{ + base: "inherit", + lg: isExpanded ? "absolute" : "inherit", + }} > <StyledFeedbackGlyph /> {isExpanded && ( <ScaleFade in={isExpanded} delay={0.25}> <Text - id="expanded-prompt" as="div" color="white" fontWeight="bold" noOfLines={2} height="100%" alignItems="center" - display="none" + display={{ base: "none", lg: isExpanded ? "flex" : "none" }} > <Translation id="feedback-card-prompt-page" /> </Text>
14
diff --git a/test/builders/v3/launch-query.test.js b/test/builders/v3/launch-query.test.js @@ -227,7 +227,7 @@ test('It should return launches with Bulgaria nationality', async () => { }); test('It should return launches with an SSL manufacturer', async () => { - const response = await request(app.callback()).get('/v3/launches?manufacturer=SSL'); + const response = await request(app.callback()).get('/v3/launches/past?manufacturer=SSL'); expect(response.statusCode).toBe(200); response.body.forEach(item => { item.rocket.second_stage.payloads.forEach(payload => {
1
diff --git a/packages/app/src/components/PageCreateModal.jsx b/packages/app/src/components/PageCreateModal.jsx @@ -237,7 +237,7 @@ const PageCreateModal = (props) => { data-testid="btn-create-page-under-below" className="grw-btn-create-page btn btn-outline-primary rounded-pill text-nowrap ml-3" onClick={createInputPage} - disabled={isUsersHomePage(pageNameInput)} + disabled={isUsersHomePageHoge} > <i className="icon-fw icon-doc"></i>{t('Create')} </button>
12
diff --git a/generators/openshift/templates/db/_mongodb.yml b/generators/openshift/templates/db/_mongodb.yml @@ -216,7 +216,7 @@ objects: port: 27017 targetPort: 27017 - - name: mongodb-bc + name: mongodb protocol: TCP port: 80 targetPort: 27017
10
diff --git a/src/react/src/routes/SprkDividerDocs/SprkDividerDocs.js b/src/react/src/routes/SprkDividerDocs/SprkDividerDocs.js import React from 'react'; -import CentralColumnLayout from '../../container/CentralColumnLayout/CentralColumnLayout'; +import CentralColumnLayout from '../../containers/CentralColumnLayout/CentralColumnLayout'; import { SprkDivider } from '@sparkdesignsystem/spark-core-react';
3
diff --git a/src/containers/views/DataFileEdit.js b/src/containers/views/DataFileEdit.js @@ -64,7 +64,9 @@ export class DataFileEdit extends Component { } handleClickSave(e) { - const { datafileChanged, putDataFile, params } = this.props; + const { datafile, datafileChanged, putDataFile, params } = this.props; + const { path, relative_path } = datafile; + const data_dir = path.replace(relative_path, ""); const [directory, ...rest] = params.splat || [""]; const filename = rest.join('.'); @@ -73,7 +75,7 @@ export class DataFileEdit extends Component { if (datafileChanged) { const value = this.refs.editor.getValue(); - const new_path = this.refs.inputpath.refs.input.value; + const new_path = data_dir + this.refs.inputpath.refs.input.value; putDataFile(directory, filename, value, new_path); } } @@ -126,7 +128,7 @@ export class DataFileEdit extends Component { <InputPath onChange={onDataFileChanged} type="data files" - path={path} // TODO: Support using `relative_path` from API instead + path={relative_path} ref="inputpath" /> <Editor editorChanged={datafileChanged}
4
diff --git a/books/test/test_views.py b/books/test/test_views.py import json from django.contrib.auth.models import User -from django.test import TestCase +from django.test import TestCase, Client from django.utils import timezone from books.models import Book, Library, BookCopy # VIEWS + +class BookCopyAutocompleteView(TestCase): + def setUp(self): + self.client = Client() + self.endpoint = '/book-autocomplete/' + + def test_endpoint_working(self): + """Tests if the endpoint book-autocomplete/ is working""" + response = self.client.get(self.endpoint) + + self.assertEqual(200, response.status_code) + + def test_user_not_logged_in(self): + """Tests if request that has no user logged in returns nothing""" + response = self.client.get('/book-autocomplete/') + + response = json.loads(response.content) + + # Asserts that no result is returned + self.assertTrue(len(response.get('results')) == 0) + self.assertFalse(response.get('pagination').get('more')) + + def test_user_logged_in_receives_result(self): + """Tests if a user can receive results when logged in""" + + # creates and logs user + self.user = User.objects.create_user(username="user") + self.user.set_password("user") + self.user.save() + self.client.force_login(user=self.user) + + # saves a library + self.library = Library.objects.create(name="Santiago", slug="slug") + + # saves a new book + title = "the title of my new super book" + self.book = Book.objects.create(author="Author", title=title, subtitle="The subtitle", + publication_date=timezone.now()) + + # creates a book copy + self.bookCopy = BookCopy.objects.create(book=self.book, library=self.library) + + response = self.client.get('/book-autocomplete/') + + response = json.loads(response.content) + + # Asserts that the newly created book is returned + self.assertTrue(len(response.get('results')) > 0) + self.assertEqual(response.get('results')[0].get('text'), title) + + class BookCopyBorrowViewCase(TestCase): def setUp(self): self.user = User.objects.create_user(username="claudia") @@ -46,7 +97,8 @@ class BookCopyReturnView(TestCase): self.book = Book.objects.create(author="Author", title="the title", subtitle="The subtitle", publication_date=timezone.now()) self.library = Library.objects.create(name="Santiago", slug="slug") - self.bookCopy = BookCopy.objects.create(book=self.book, library=self.library, user=self.user, borrow_date=timezone.now()) + self.bookCopy = BookCopy.objects.create(book=self.book, library=self.library, user=self.user, + borrow_date=timezone.now()) self.request = self.client.post('/api/copies/' + str(self.bookCopy.id) + '/return')
0
diff --git a/src/js/easymde.js b/src/js/easymde.js @@ -844,13 +844,11 @@ function drawLink(editor) { var options = editor.options; var url = 'https://'; if (options.promptURLs) { - url = prompt(options.promptTexts.link, 'https://'); + url = prompt(options.promptTexts.link, url); if (!url) { return false; } - - url = encodeURI(url); - if (/[()]/.test(url)) url = escapePromptURL(url); + url = escapePromptURL(url); } _replaceSelection(cm, stat.link, options.insertTexts.link, url); } @@ -864,25 +862,21 @@ function drawImage(editor) { var options = editor.options; var url = 'https://'; if (options.promptURLs) { - url = prompt(options.promptTexts.image, 'https://'); + url = prompt(options.promptTexts.image, url); if (!url) { return false; } - - url = encodeURI(url); - if (/[()]/.test(url)) url = escapePromptURL(url); + url = escapePromptURL(url); } _replaceSelection(cm, stat.image, options.insertTexts.image, url); } /** - * Escape URLs to prevent breaking up rendered Markdown links + * Encode and escape URLs to prevent breaking up rendered Markdown links. * @param url {string} The url of the link or image */ function escapePromptURL(url) { - url = url.replace(/\(/g,'\\(').replace(/\)/g,'\\)'); - - return url; + return encodeURI(url).replace(/([\\()])/g, '\\$1'); } /**
7
diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js @@ -30,7 +30,7 @@ Onyx.connect({ * AuthScreens unmounts when the app is closed with the back button so we manage the * push subscription when the session changes here. */ -let previousAccountID = ''; +let previousAccountID; Onyx.connect({ key: ONYXKEYS.SESSION, callback: (session) => {
4
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 11.0.0 - Changed: `--report-needless-disables` CLI flag now reports needless disables and runs linting ([#4151](https://github.com/stylelint/stylelint/pull/4151)). - Changed: display a violation at 1:1 for each file instead of throwing an error on unrecognised rules ([#4237](https://github.com/stylelint/stylelint/pull/4237)).
6
diff --git a/tests/e2e/specs/dashboard/notifications.test.js b/tests/e2e/specs/dashboard/notifications.test.js @@ -52,7 +52,6 @@ describe( 'core site notifications', () => { // Go to the main dashboard and wait for notifications to be requested. await Promise.all( [ - // page.waitForResponse( ( res ) => res.url().match( 'google-site-kit/v1/core/site/data/notifications' ) ), goToSiteKitDashboard(), ] ); @@ -77,7 +76,6 @@ describe( 'core site notifications', () => { // Refresh the page, and make sure that notifications are refetched and does not include the dismissed notification. await Promise.all( [ - // page.waitForResponse( ( res ) => res.url().match( 'google-site-kit/v1/core/site/data/notifications' ) ), page.reload(), ] ); @@ -109,7 +107,6 @@ describe( 'core site notifications', () => { // Go to the main dashboard and wait for notifications to be requested. await Promise.all( [ - // page.waitForResponse( ( res ) => res.url().match( 'google-site-kit/v1/core/site/data/notifications' ) ), goToSiteKitDashboard(), ] );
2
diff --git a/README.md b/README.md @@ -119,7 +119,7 @@ If you like, you can also use a pre-built bundle, for example from [unpkg CDN](h <img src="https://saucelabs.com/browser-matrix/transloadit-uppy.svg" alt="Sauce Test Status"/> </a> -Note: we aim to support IE10+ and recent versions of Safari, Edge, Chrome, Firefox and Opera. IE6 on the chart above means we recommend setting Uppy to target a `<form>` element, so when Uppy has not yet loaded or is not supported, upload still works. Even on the refrigerator browser. Or, yes, IE6. +Note: we aim to support IE10+ and recent versions of Safari, Edge, Chrome, Firefox and Opera. ## FAQ
2
diff --git a/src/transformers/replaceStrings.js b/src/transformers/replaceStrings.js -module.exports = async (html, config) => { - const regexes = config.replaceStrings || false - if (typeof regexes === 'object') { - Object.entries(regexes).map(([k, v]) => { +const { isObject, isEmptyObject } = require('../utils/helpers') + +module.exports = async (html, config) => { + if (isObject(config.replaceStrings) && !isEmptyObject(config.replaceStrings)) { + Object.entries(config.replaceStrings).map(([k, v]) => { const regex = new RegExp(k, 'gi') html = html.replace(regex, v) })
1
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -30,12 +30,14 @@ export const NODE_URL = process.env.REACT_APP_NODE_URL || 'https://rpc.nearproto const KEY_UNIQUE_PREFIX = '_4:' const KEY_WALLET_ACCOUNTS = KEY_UNIQUE_PREFIX + 'wallet:accounts_v2' const KEY_ACTIVE_ACCOUNT_ID = KEY_UNIQUE_PREFIX + 'wallet:active_account_id_v2' -const ACCESS_KEY_FUNDING_AMOUNT = process.env.REACT_APP_ACCESS_KEY_FUNDING_AMOUNT || '100000000' +const ACCESS_KEY_FUNDING_AMOUNT = process.env.REACT_APP_ACCESS_KEY_FUNDING_AMOUNT || nearApiJs.utils.format.parseNearAmount('0.01') const ACCOUNT_ID_REGEX = /^(([a-z\d]+[-_])*[a-z\d]+\.)*([a-z\d]+[-_])*[a-z\d]+$/ const ACCOUNT_NO_CODE_HASH = '11111111111111111111111111111111' const METHOD_NAMES_LAK = ["add_request", "add_request_and_confirm", "delete_request", "confirm"] const METHOD_NAMES_CONFIRM = ["confirm"] +console.log('ACCESS_KEY_FUNDING_AMOUNT', ACCESS_KEY_FUNDING_AMOUNT) + export const keyAccountConfirmed = (accountId) => `wallet.account:${accountId}:${NETWORK_ID}:confirmed` const WALLET_METADATA_METHOD = '__wallet__metadata' @@ -490,11 +492,15 @@ class Wallet { async addAccessKey(accountId, contractId, publicKey, fullAccess = false) { const { account, has2fa } = await this.getAccountAndState() + let allowance = ACCESS_KEY_FUNDING_AMOUNT if (has2fa) { // default method names will be limited access key multisig contract methods let method_names = METHOD_NAMES_LAK if (contractId !== accountId) { - method_names = [] + fullAccess = false + method_names = [''] + } else { + allowance = '0' } const request = { // always adding keys to our account @@ -507,7 +513,7 @@ class Wallet { permission: { // not always adding a key FOR our account receiver_id: contractId, - allowance: '0', + allowance, method_names } } : null)
3
diff --git a/src/components/explorer/UrlBasedQueryContainer.js b/src/components/explorer/UrlBasedQueryContainer.js @@ -10,8 +10,7 @@ import { LEVEL_ERROR } from '../common/Notice'; import { addNotice } from '../../actions/appActions'; import { selectBySearchParams, fetchSampleSearches, updateQuerySourceLookupInfo, updateQueryCollectionLookupInfo, fetchQuerySourcesByIds, fetchQueryCollectionsByIds, demoQuerySourcesByIds, demoQueryCollectionsByIds } from '../../actions/explorerActions'; -import { DEFAULT_COLLECTION_OBJECT_ARRAY, autoMagicQueryLabel, generateQueryParamString, - decodeQueryParamString, serializeQueriesForUrl } from '../../lib/explorerUtil'; +import { DEFAULT_COLLECTION_OBJECT_ARRAY, autoMagicQueryLabel, decodeQueryParamString, serializeQueriesForUrl } from '../../lib/explorerUtil'; import { getDateRange, solrFormat, PAST_MONTH } from '../../lib/dateUtil'; import { notEmptyString } from '../../lib/formValidators'; @@ -81,6 +80,7 @@ function composeUrlBasedQueryContainer() { // react-router decided to decode url components, partially because the JSON parser isn't that clever this.updateQueriesFromQParam(location.query.q, autoName); } else if (location.query.qs) { + // it uses the "new" full JSON way of serializing the queries this.updateQueriesFromQSParam(location.query.qs, autoName); } else { addAppNotice({ level: LEVEL_ERROR, message: formatMessage(localMessages.errorInURLParams) }); @@ -92,7 +92,8 @@ function composeUrlBasedQueryContainer() { const { formatMessage } = this.props.intl; const { addAppNotice } = this.props; try { - const queriesFromUrl = JSON.parse(queryString); + const cleanedQueryString = decodeURIComponent(queryString); + const queriesFromUrl = JSON.parse(cleanedQueryString); this.updateQueriesFromString(queriesFromUrl, autoName); } catch (f) { addAppNotice({ level: LEVEL_ERROR, message: formatMessage(localMessages.errorInURLParams) }); @@ -258,15 +259,15 @@ function composeUrlBasedQueryContainer() { const queriesToSerialize = nonEmptyQueries.map((q, idx) => ({ index: idx, q: q.q, color: q.color })); dispatch(push({ pathname: '/queries/demo/search', search: `?qs=${serializeQueriesForUrl(queriesToSerialize)}` })); } else { - const queriesToSerialize = generateQueryParamString(queries.map(q => ({ + const queriesToSerialize = queries.map(q => ({ label: q.label, q: q.q, color: q.color, startDate: q.startDate, endDate: q.endDate, - sources: q.sources, // de-aggregate media bucket into sources and collections - collections: q.collections, - }))); + sources: q.sources.map(s => s.media_id), // de-aggregate media bucket into sources and collections + collections: q.collections.map(c => c.tags_id), + })); dispatch(push({ pathname: '/queries/search', search: `?qs=${serializeQueriesForUrl(queriesToSerialize)}` })); } },
9
diff --git a/articles/tokens/refresh-token/current/index.md b/articles/tokens/refresh-token/current/index.md @@ -10,21 +10,21 @@ Usually, a user will need a new access token only after the previous one expires Refresh tokens are subject to strict storage requirements to ensure that they are not leaked. Also, [Refresh tokens can be revoked](#revoke-a-refresh-token) by the Authorization Server. -## Overview - -The response of an [authentication request](/api-auth) can result in an `access_token` and/or an `id_token` being issued by Auth0. The `access_token` is used to make authenticated calls to a secured API, while the `id_token` contains user profile attributes represented in the form of _claims_. Both JWTs have an expiration date indicated by the `exp` claim (among other security measures, like signing). - -A refresh token allows the application to request Auth0 to issue a new `access_token` or `id_token` directly, without having to re-authenticate the user. This will work as long as the refresh token has not been revoked. - -::: warning -The behaviour in this document is applicable to [OIDC-conformant](/api-auth/tutorials/adoption) clients. A client can be configured as OIDC-conformant in 2 ways: +::: panel-warning OIDC-conformant clients +The behaviour in this document is applicable to [OIDC-conformant clients](/api-auth/tutorials/adoption/oidc-conformant). A client can be configured as OIDC-conformant in two ways: 1. By enabling the **OIDC Conformant** flag for a Client 2. By passing an `audience` to the `/authorize` endpoint -Please read the [OIDC-conformant Clients documentation](/api-auth/tutorials/adoption/oidc-conformant) for more information on this. +For more information on our authentication pipeline, refer to [Introducing OIDC Conformant Authentication](/api-auth/intro). ::: +## Overview + +The response of an [authentication request](/api-auth) can result in an `access_token` and/or an `id_token` being issued by Auth0. The `access_token` is used to make authenticated calls to a secured API, while the `id_token` contains user profile attributes represented in the form of _claims_. Both JWTs have an expiration date indicated by the `exp` claim (among other security measures, like signing). + +A refresh token allows the application to request Auth0 to issue a new `access_token` or `id_token` directly, without having to re-authenticate the user. This will work as long as the refresh token has not been revoked. + ## Restrictions You can only get a refresh token if you are implementing: [Authorization Code Grant](/api-auth/grant/authorization-code), [Authorization Code Grant (PKCE)](/api-auth/grant/authorization-code-pkce) or [Resource Owner Password Grant](/api-auth/grant/password).
14
diff --git a/assets/src/edit-story/components/form/dateTime/dateTime.js b/assets/src/edit-story/components/form/dateTime/dateTime.js import styled from 'styled-components'; import PropTypes from 'prop-types'; import { rgba } from 'polished'; -import { useCallback, useRef, useState } from 'react'; +import { useCallback, useRef, useState, useEffect } from 'react'; /** * Internal dependencies @@ -67,6 +67,21 @@ function DateTime({ [onClose] ); + useEffect(() => { + // Set tabIndex to -1 for every except for the first button. + if (forwardedRef.current) { + const buttons = forwardedRef.current.querySelectorAll( + '.react-calendar__viewContainer button' + ); + for (const btn of buttons) { + // Skip the first. + if (buttons[0] !== btn) { + btn.tabIndex = '-1'; + } + } + } + }, [forwardedRef]); + useKeyDownEffect(forwardedRef, 'esc', handleClose); useRovingTabIndex({ ref: forwardedRef });
12
diff --git a/Source/Core/AxisAlignedBoundingBox.js b/Source/Core/AxisAlignedBoundingBox.js /*global define*/ define([ './Cartesian3', + './Check', './defaultValue', './defined', './DeveloperError', './Intersect' ], function( Cartesian3, + Check, defaultValue, defined, DeveloperError, @@ -170,12 +172,9 @@ define([ */ AxisAlignedBoundingBox.intersectPlane = function(box, plane) { //>>includeStart('debug', pragmas.debug); - if (!defined(box)) { - throw new DeveloperError('box is required.'); - } - if (!defined(plane)) { - throw new DeveloperError('plane is required.'); - } + Check.defined('box', box); + Check.defined('plane', plane); + //>>includeEnd('debug'); intersectScratch = Cartesian3.subtract(box.maximum, box.minimum, intersectScratch);
14
diff --git a/packages/app/src/components/Admin/ImportData/GrowiArchive/UploadForm.jsx b/packages/app/src/components/Admin/ImportData/GrowiArchive/UploadForm.jsx import React from 'react'; import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next'; import AppContainer from '~/client/services/AppContainer'; import { toastError } from '~/client/util/apiNotification'; @@ -102,9 +102,15 @@ UploadForm.propTypes = { onVersionMismatch: PropTypes.func, }; +const UploadFormWrapperFc = (props) => { + const { t } = useTranslation(); + + return <UploadForm t={t} {...props} />; +}; + /** * Wrapper component for using unstated */ -const UploadFormWrapper = withUnstatedContainers(UploadForm, [AppContainer]); +const UploadFormWrapper = withUnstatedContainers(UploadFormWrapperFc, [AppContainer]); -export default withTranslation()(UploadFormWrapper); +export default UploadFormWrapper;
14
diff --git a/articles/quickstart/spa/vanillajs/_includes/_centralized_login.md b/articles/quickstart/spa/vanillajs/_includes/_centralized_login.md @@ -380,7 +380,7 @@ const updateUI = async () => { "ipt-access-token" ).innerHTML = await auth0.getTokenSilently(); - document.getElementById("ipt-user-profile").innerHTML = JSON.stringify( + document.getElementById("ipt-user-profile").textContent = JSON.stringify( await auth0.getUser() );
14
diff --git a/src/components/table-ajax/__spec__.js b/src/components/table-ajax/__spec__.js @@ -143,7 +143,7 @@ describe('TableAjax', () => { beforeEach(() => { jasmine.Ajax.install(); - jasmine.clock().install(); + jest.useFakeTimers(); options = { currentPage: '1', pageSize: '10', @@ -154,7 +154,6 @@ describe('TableAjax', () => { afterEach(() => { jasmine.Ajax.uninstall(); - jasmine.clock().uninstall(); }); it('resets the select all component', () => { @@ -187,7 +186,7 @@ describe('TableAjax', () => { request = jasmine.Ajax.requests.mostRecent(); expect(request).toBe(undefined); - jasmine.clock().tick(51); + jest.runTimersToTime(51); request = jasmine.Ajax.requests.mostRecent(); expect(request.url).toEqual('/test?page=1&rows=10'); }); @@ -198,7 +197,7 @@ describe('TableAjax', () => { request = jasmine.Ajax.requests.mostRecent(); expect(request).toBe(undefined); - jasmine.clock().tick(251); + jest.runTimersToTime(251); request = jasmine.Ajax.requests.mostRecent(); expect(request.url).toEqual('/test?page=1&rows=10'); }); @@ -206,14 +205,14 @@ describe('TableAjax', () => { it('stores the request', () => { expect(instance._request).toBe(null); instance.emitOnChangeCallback('data', options); - jasmine.clock().tick(251); + jest.runTimersToTime(251); request = jasmine.Ajax.requests.mostRecent(); expect(instance._request).toBeDefined(); }); it('on success emits the returned data', () => { instance.emitOnChangeCallback('data', options); - jasmine.clock().tick(251); + rest.runTimersToTime(251); request = jasmine.Ajax.requests.mostRecent(); request.respondWith({ "status": 200, @@ -226,7 +225,7 @@ describe('TableAjax', () => { it('on success sets the totalRecords', () => { spyOn(instance, 'setState'); instance.emitOnChangeCallback('data', options); - jasmine.clock().tick(251); + jest.runTimersToTime(251); request = jasmine.Ajax.requests.mostRecent(); request.respondWith({ @@ -243,7 +242,7 @@ describe('TableAjax', () => { options = { currentPage: '1', pageSize: '5' } instance.emitOnChangeCallback('data', options); - jasmine.clock().tick(251); + jest.runTimersToTime(251); request = jasmine.Ajax.requests.mostRecent(); request.respondWith({
14
diff --git a/public/javascripts/Gallery/src/cards/CardContainer.js b/public/javascripts/Gallery/src/cards/CardContainer.js @@ -93,9 +93,9 @@ function CardContainer(uiCardContainer) { // the cardId from the card-tags DOM element (as well as perform an additional prepend to put the ID in // the correct form). // TODO(micdun): this is pretty janky, think of better way? - let cardId = event.target.id ? event.target.id : + let clickedImage = event.target.classList.contains("static-gallery-image") + let cardId = clickedImage ? event.target.id : "label_id_" + event.target.closest(".card-tags").id; - console.log(cardId); // Sets/Updates the label being displayed in the expanded modal. modal.updateCardIndex(findCardIndex(cardId)); });
4
diff --git a/contracts/delegate/contracts/Delegate.sol b/contracts/delegate/contracts/Delegate.sol @@ -111,7 +111,6 @@ contract Delegate is IDelegate, Ownable { /** * @notice Get a Buy Quote from the Delegate - * * @param delegateAmount uint256 The amount the Delegate would send * @param delegateToken address The token that the Delegate would send * @param consumerToken address The token that the Consumer would send @@ -180,7 +179,6 @@ contract Delegate is IDelegate, Ownable { /** * @notice Get a Maximum Quote from the Delegate - * * @param delegateToken address The token that the Delegate will send * @param consumerToken address The token that the Consumer will send * @return (uint256, uint256) @@ -210,7 +208,6 @@ contract Delegate is IDelegate, Ownable { /** * @notice Provide an Order (Simple) * @dev Rules get reset with new maxDelegateAmount - * * @param nonce uint256 A single use identifier for the Order. * @param expiry uint256 The expiry in seconds since unix epoch. * @param consumerWallet address The Maker of the Order who sets price. @@ -279,7 +276,6 @@ contract Delegate is IDelegate, Ownable { /** * @notice Provide an Unsigned Order (Simple) * @dev Requires that sender has authorized the delegate (Swap) - * * @param nonce uint256 a single use identifier for the order * @param consumerAmount uint256 the amount or identifier of the token the Maker sends * @param consumerToken address the address of the token the Maker sends
2
diff --git a/diorama.js b/diorama.js @@ -24,9 +24,6 @@ const localVector2D2 = new THREE.Vector2(); const localVector4D = new THREE.Vector4(); const localMatrix = new THREE.Matrix4(); -// I like... macaroni and cheese, is that ok? -// we all want unlimited power, don't we? - // this function maps the speed histogram to a position, integrated up to the given timestamp const mapTime = (speedHistogram = new SpeedHistogram, time = 0) => { const {elements} = speedHistogram;
2
diff --git a/assets/js/components/common/Downlink.jsx b/assets/js/components/common/Downlink.jsx @@ -118,7 +118,7 @@ class Downlink extends Component { <InputNumber style={{ width: "100%" }} defaultValue={1} - min={1} + min={0} max={223} onChange={(port) => this.setState({ port })} />
11
diff --git a/includes/Core/Authentication/Verification_Meta.php b/includes/Core/Authentication/Verification_Meta.php @@ -14,9 +14,9 @@ use Google\Site_Kit\Core\Storage\User_Options; use Google\Site_Kit\Core\Storage\Transients; /** - * Class representing the site verification tag for a user. + * Class representing the site verification meta tag for a user. * - * @since 1.0.0 + * @since n.e.x.t * @access private * @ignore */
3
diff --git a/install/install.sh b/install/install.sh @@ -156,7 +156,7 @@ echo 2 # copy over cli tool echo 3 -printf "%s" "Copying CLI tool from $INSTALL_PATH/install/rctf.py to ${RCTF_CLI_INSTALL_PATH}..." +#printf "%s" "Copying CLI tool from $INSTALL_PATH/install/rctf.py to ${RCTF_CLI_INSTALL_PATH}..." echo 4 if [ ! -f "$RCTF_CLI_INSTALL_PATH" ]; then cp install/rctf.py "$RCTF_CLI_INSTALL_PATH"
1
diff --git a/README.md b/README.md <h1 align="center"> - <img align="center" src="https://raw.githubusercontent.com/sullof/tron-web/add-logo/assets/TronWeb-logo.png" width="400"/> + <img align="center" src="https://raw.githubusercontent.com/tronprotocol/tron-web/master/assets/TronWeb-logo.png" width="400"/> </h1> <p align="center">
4
diff --git a/src/traces/table/attributes.js b/src/traces/table/attributes.js @@ -110,7 +110,7 @@ var attrs = module.exports = overrideAll({ role: 'style', description: [ 'Sets the cell fill color. It accepts either a specific color', - ' or an array of colors.' + ' or an array of colors or a 2D array of colors.' ].join('') } }, @@ -190,7 +190,7 @@ var attrs = module.exports = overrideAll({ dflt: 'white', description: [ 'Sets the cell fill color. It accepts either a specific color', - ' or an array of colors.' + ' or an array of colors or a 2D array of colors.' ].join('') } },
0
diff --git a/src/components/Toolbar/LandmarkTool.js b/src/components/Toolbar/LandmarkTool.js @@ -86,6 +86,9 @@ class LandmarkOptions { } render() { let properties = this.features.map(feature => feature.properties); + if (this.features.length && !this.selectFeature) { + this.selectFeature = 0; + } return html` <div class="ui-option"> @@ -100,7 +103,7 @@ class LandmarkOptions { <li class="option-list__item"> ${properties.length > 1 ? Parameter({ - label: "Community:", + label: "Edit:", element: Select( properties, this.handleSelectFeature @@ -110,12 +113,12 @@ class LandmarkOptions { </li> </ul> - ${this.features.length && LandmarkFormTemplate({ + ${this.features.length ? LandmarkFormTemplate({ name: properties[this.selectFeature].name, saved: false, onSave: this.onSave, setName: this.setName - })} + }) : "Add landmarks using the polygon and marker buttons on the top right of the map."} `; } }
9
diff --git a/articles/tokens/jwt.md b/articles/tokens/jwt.md @@ -190,5 +190,5 @@ _Comparison of the length of an encoded JWT and an encoded SAML_ ::: next-steps * [JWT Handbook](https://auth0.com/resources/ebooks/jwt-handbook) * [10 Things You Should Know About Tokens](https://auth0.com/blog/ten-things-you-should-know-about-tokens-and-cookies/) -* [Cookies vs Tokens. Getting auth right with Angular.JS](https://auth0.com/blog/angularjs-authentication-with-cookies-vs-token/) +* [Web Apps vs Web APIs / Cookies vs Tokens](https://auth0.com/docs/design/web-apps-vs-web-apis-cookies-vs-tokens) :::
1
diff --git a/gulpfile.js b/gulpfile.js @@ -475,16 +475,23 @@ gulp.task('tools', function(done) { runSequence('webpack','css',nexttool); }); -gulp.task('build', function(callback) { +gulp.task('buildint', function(callback) { runSequence('commonfiles', 'tools', + 'buildtest', + callback); +}); + +gulp.task('build', function(callback) { + + runSequence('buildint', 'createserver', 'packageserver', - 'buildtest', callback); }); + gulp.task('zip', function() { bis_gutil.createZIPFile(options.zip,options.baseoutput,options.outdir,internal.setup.version,options.distdir); @@ -500,7 +507,7 @@ gulp.task('package2', function(done) { }); gulp.task('package', function(done) { - runSequence('build', + runSequence('buildint', 'package2', done); });
2
diff --git a/packages/inferno-component/src/index.ts b/packages/inferno-component/src/index.ts @@ -283,12 +283,12 @@ export default class Component<P, S> implements ComponentLifecycle<P, S> { } } + const shouldUpdate = this.shouldComponentUpdate(nextProps, nextState, context); + this.props = nextProps; this.state = nextState; this.context = context; - const shouldUpdate = this.shouldComponentUpdate(nextProps, nextState, context); - if (shouldUpdate || force) { this._blockSetState = true; this.componentWillUpdate(nextProps, nextState, context);
12
diff --git a/src/ApiGateway.js b/src/ApiGateway.js @@ -28,6 +28,7 @@ module.exports = class ApiGateway { this.exitCode = 0; this.requests = {}; + this.lastRequestOptions = null; this.velocityContextOptions = velocityContextOptions; } @@ -177,8 +178,20 @@ module.exports = class ApiGateway { process.exit(1); } + const protocol = `http${this.options.httpsProtocol ? 's' : ''}`; + this.printBlankLine(); - this.serverlessLog(`Offline [http] listening on http${this.options.httpsProtocol ? 's' : ''}://${this.options.host}:${this.options.port}`); + this.serverlessLog(`Offline [${protocol}] listening on ${protocol}://${this.options.host}:${this.options.port}`); + this.serverlessLog('Enter "rp" to replay the last request'); + + process.openStdin().addListener('data', data => { + // note: data is an object, and when converted to a string it will + // end with a linefeed. so we (rather crudely) account for that + // with toString() and then trim() + if (data.toString().trim() === 'rp') { + this._injectLastRequest(); + } + }); } _createRoutes(event, funOptions, protectedRoutes, funName, servicePath, serviceRuntime, defaultContentType, key, fun) { @@ -260,6 +273,18 @@ module.exports = class ApiGateway { method: routeMethod, path: fullPath, handler: (request, h) => { // Here we go + // Store current request as the last one + this.lastRequestOptions = { + method: request.method, + url: request.url.href, + headers: request.headers, + payload: request.payload, + }; + + if (request.auth.credentials && request.auth.strategy) { + this.lastRequestOptions.auth = request.auth; + } + // Payload processing const encoding = detectEncoding(request); @@ -921,4 +946,14 @@ module.exports = class ApiGateway { return splittedStack.slice(0, splittedStack.findIndex(item => item.match(/server.route.handler.createLambdaContext/))).map(line => line.trim()); } + + _injectLastRequest() { + if (this.lastRequestOptions) { + this.serverlessLog('Replaying HTTP last request'); + this.server.inject(this.lastRequestOptions); + } + else { + this.serverlessLog('No last HTTP request to replay!'); + } + } };
0
diff --git a/userscript.user.js b/userscript.user.js @@ -7413,6 +7413,17 @@ var $$IMU_EXPORT$$; }); }; + common_functions.snap_norm_obj = function(obj) { + // ids are not very human-readable, maybe add an option? + match = obj.url.match(/:\/\/[^/]+\/+[0-9a-f]{2}\/+([^/]{10,})\//); + if (match) { + // = causes issues with ffmpeg (thanks to remlap on discord for reporting), - can cause issues with command-line args + obj.filename = match[1].replace(/[-=]/g, ""); + } + + return obj; + }; + common_functions.snap_to_obj = function(snap) { var caption = null; @@ -7422,13 +7433,17 @@ var $$IMU_EXPORT$$; caption = caption.replace(/^\s*([\s\S]*)\s*$/, "$1"); } - return { + var obj = { url: snap.media.mediaUrl,//snap.snapUrls.mediaUrl, extra: { caption: caption || null }, need_blob: true }; + + common_functions.snap_norm_obj(obj); + + return obj; }; common_functions.get_snapchat_info_from_el = function(el) { @@ -60176,11 +60191,7 @@ var $$IMU_EXPORT$$; url: src }; - // ids are not very human-readable, maybe add an option? - match = src.match(/:\/\/[^/]+\/+[0-9a-f]{2}\/+([^/]{10,})\//); - if (match) { - obj.filename = match[1]; - } + common_functions.snap_norm_obj(obj); // awful hack but whatever if (host_domain_nosub === "snapchat.com")
7
diff --git a/tools/middleware/liveReloadMiddleware.js b/tools/middleware/liveReloadMiddleware.js -/** - * Copyright 2017-present, Callstack. - * All rights reserved. - * - * MIT License - * - * Copyright (c) 2017 Mike Grabowski - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Updated by Victor Vlasenko (SysGears INC) to prevent memory leaks and slow down, - * due to new compiler plugin registration on each HTTP request - */ - -/** - * Live reload middleware - */ function liveReloadMiddleware(compiler) { let watchers = []; - /** - * On new `build`, notify all registered watchers to reload - */ compiler.plugin('done', () => { const headers = { 'Content-Type': 'application/json; charset=UTF-8', }; watchers.forEach(watcher => { - watcher.res.writeHead(205, headers); - watcher.res.end(JSON.stringify({ changed: true })); + watcher.writeHead(205, headers); + watcher.end(JSON.stringify({ changed: true })); }); watchers = []; }); return (req, res, next) => { - /** - * React Native client opens connection at `/onchange` - * and awaits reload signal (http status code - 205) - */ if (req.path === '/onchange') { - const watcher = { req, res }; + const watcher = res; watchers.push(watcher); req.on('close', () => { watchers.splice(watchers.indexOf(watcher), 1); }); - - return; - } - + } else { next(); + } }; }
4
diff --git a/_CodingChallenges/145-2d-ray-casting.md b/_CodingChallenges/145-2d-ray-casting.md @@ -136,7 +136,7 @@ videos: video_id: "uSzGdfdOoG8" - title: "Coding Challenge: Rendering Ray Casting" author: "Coding Train" - video_id: "/CodingChallenges/146-rendering-ray-casting" + url: "/CodingChallenges/146-rendering-ray-casting" --- In this video, I implement a basic ray casting engine with line segment "surfaces" and vector "rays." The result simulates a light source casting shadows in a 2D canvas.
1
diff --git a/src/core/Game.js b/src/core/Game.js @@ -890,6 +890,7 @@ Phaser.Game.prototype = { } catch (webGLRendererError) { + PIXI.defaultRenderer = null; this.renderer = null; this.multiTexture = false; PIXI._enableMultiTextureToggle = false;
12
diff --git a/server/app/app.py b/server/app/app.py @@ -84,7 +84,7 @@ def favicon(): @webbp.route("/health", methods=["GET"]) -@cache_control_always(no_cache=True) +@cache_control_always(no_store=True) def health(): config = current_app.app_config return health_check(config) @@ -184,7 +184,7 @@ class AnnotationsObsAPI(Resource): def get(self, data_adaptor): return common_rest.annotations_obs_get(request, data_adaptor, current_app.annotations) - @cache_control(no_cache=True) + @cache_control(no_store=True) @rest_get_data_adaptor def put(self, data_adaptor): return common_rest.annotations_obs_put(request, data_adaptor, current_app.annotations) @@ -198,14 +198,14 @@ class AnnotationsVarAPI(Resource): class DataVarAPI(Resource): - @cache_control(no_cache=True) + @cache_control(no_store=True) @rest_get_data_adaptor def put(self, data_adaptor): return common_rest.data_var_put(request, data_adaptor) class DiffExpObsAPI(Resource): - @cache_control(no_cache=True) + @cache_control(no_store=True) @rest_get_data_adaptor def post(self, data_adaptor): return common_rest.diffexp_obs_post(request, data_adaptor) @@ -217,7 +217,7 @@ class LayoutObsAPI(Resource): def get(self, data_adaptor): return common_rest.layout_obs_get(request, data_adaptor) - @cache_control(no_cache=True) + @cache_control(no_store=True) @rest_get_data_adaptor def put(self, data_adaptor): return common_rest.layout_obs_put(request, data_adaptor)
4
diff --git a/articles/api/management/v2/tokens.md b/articles/api/management/v2/tokens.md @@ -10,10 +10,6 @@ toc: true In order to call the endpoints of [Auth0 Management API v2](/api/management/v2), you need a token, what we refer to as Auth0 Management APIv2 Token. This token is a [JWT](/jwt), contains specific granted permissions (known as __scopes__), and is signed with a client API key and secret for the entire tenant. - ::: panel-info What are these scopes? - The scopes are permissions that should be granted by the owner. Each [Auth0 Management API v2](/api/management/v2) endpoint requires specific scopes. For example, the [Get all clients](/api/management/v2#!/Clients/get_clients) endpoint requires the scopes `read:clients` and `read:client_keys`, while the [Create a client](/api/management/v2#!/Clients/post_clients) endpoint requires the scope `create:clients`. From that we can deduce that if we need to read _and_ create clients, then our token should include three scopes: `read:clients`, `read:client_keys` and `create:clients`. - ::: - There are two ways to get a Management APIv2 Token: [get one manually using the Dashboard](#get-a-token-manually), or [automate the process](#automate-the-process) (build a simple command line tool that generates tokens). In this article we will see how you can do either. ## Get a token manually @@ -68,7 +64,11 @@ Toggle the slider from `Unauthorized` to `Authorized` for your client. ### 3. Choose the Scopes -The last step, before you get a token, is to select which scopes (permissions) should be granted to this client: for example, should it be able only to read users or create and delete as well? +The last step, before you get a token, is to select which scopes should be granted to this client. + + ::: panel-info What are the scopes? + The scopes are permissions that should be granted by the owner. Each [Auth0 Management API v2](/api/management/v2) endpoint requires specific scopes. For example, the [Get all clients](/api/management/v2#!/Clients/get_clients) endpoint requires the scopes `read:clients` and `read:client_keys`, while the [Create a client](/api/management/v2#!/Clients/post_clients) endpoint requires the scope `create:clients`. From that we can deduce that if we need to read _and_ create clients, then our token should include three scopes: `read:clients`, `read:client_keys` and `create:clients`. + ::: If you followed this article so far, then you already are at the _Non Interactive Clients_ tab of the `Auth0 Management API`. If not, go to [APIs](${manage_url}/#/apis), click the **Edit** icon for `Auth0 Management API`, go to _Non Interactive Clients_ and expand your non interactive client, using the pointing down arrow, next to the _Authorized_ toggle. @@ -187,6 +187,8 @@ For example, in order to [Get all clients](/api/management/v2#!/Clients/get_clie You can get the curl command for each endpoint from the Management API v2 Explorer. Go to the endpoint you want to call, and click the <em>get curl command</em> link at the <em>Test this endpoint</em> section. </div> +That's it! You are done! + ### Sample Implementation: Python This python script gets a Management API v2 access token, uses it to call the [Get all clients](/api/management/v2#!/Clients/get_clients) endpoint, and prints the response in the console:
5
diff --git a/token-metadata/0x4B4701f3f827E1331fb22FF8e2BEaC24b17Eb055/metadata.json b/token-metadata/0x4B4701f3f827E1331fb22FF8e2BEaC24b17Eb055/metadata.json "symbol": "DISTX", "address": "0x4B4701f3f827E1331fb22FF8e2BEaC24b17Eb055", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/lib/tedious.js b/lib/tedious.js @@ -246,9 +246,9 @@ class ConnectionPool extends base.ConnectionPool { setTimeout(() => { if (!emittedConnectEvent) { - reject(new base.ConnectionError('Tedious connection timed out after 10 seconds')) + reject(new base.ConnectionError('Tedious connection timed out after options.connectTimeout')) } - }, 10 * 1000) + }, cfg.options.connectTimeout) tedious.on('error', err => { if (err.code === 'ESOCKET') {
11
diff --git a/assets/src/edit-story/components/library/test/_utils/index.js b/assets/src/edit-story/components/library/test/_utils/index.js @@ -37,6 +37,9 @@ export async function arrange({ mediaResponse = [] }) { video: ['video/mp4'], }, allowedFileTypes: ['png', 'jpeg', 'jpg', 'gif', 'mp4'], + capabilities: { + hasUploadMediaAction: true, + }, }; const getMediaPromise = Promise.resolve({ data: mediaResponse,
7
diff --git a/src/dots.js b/src/dots.js 'use strict'; import React from 'react'; -import createReactClass from 'create-react-class'; import classnames from 'classnames'; var getDotCount = function (spec) { @@ -11,15 +10,14 @@ var getDotCount = function (spec) { }; -export var Dots = createReactClass({ - - clickHandler: function (options, e) { +export class Dots extends React.Component { + clickHandler(options, e) { // In Autoplay the focus stays on clicked button even after transition // to next slide. That only goes away by click somewhere outside e.preventDefault(); this.props.clickHandler(options); - }, - render: function () { + } + render() { var dotCount = getDotCount({ slideCount: this.props.slideCount, @@ -58,6 +56,5 @@ export var Dots = createReactClass({ {dots} </ul> ); - } -}); +}
2
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,14 @@ 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.47.2] -- 2019-04-15 + +### Fixed +- Fix bar `'auto'` and `'inside'` `textposition` rendering on log size axes [#3762, #3773] +- Fix matching axes autorange algorithm for date axes [#3772] +- Fix SVG gradient rendering (colorbar and marker gradient) when `<base>` is present on page [#3765] + + ## [1.47.1] -- 2019-04-10 ### Fixed
3
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -138,7 +138,19 @@ Three additional helpers exist that are refreshed every second: There is also a search bar in the top right of the dashboard. This fuzzy-searches image mocks based on their file name and trace type. -#### Other npm scripts +#### Step 5: Regenerate plot-schema in "test" folder then review & commit potential changes + +```bash +npm run schema +``` + +#### Step 6: Review & commit potential changes made to test/plot-schema.json + +> If you are editing attribute descriptions or implementing a new feature this file located in test folder would record the proposed changes to the API. This test file is different from the other plot-schema.json file located in the dist folder and should only be updated by maintainers at the release time. + +**IMPORTANT:** please do not change and commit any files in the "dist" folder + +#### Other npm scripts that may be of interest in development - `npm run preprocess`: pre-processes the css and svg source file in js. This script must be run manually when updating the css and svg source files.
3
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js (function() { 'use strict'; - - // Solution from https://stackoverflow.com/a/24719409/584192 - function jQueryXhrOverride() { - var xhr = jQuery.ajaxSettings.xhr(); - var setRequestHeader = xhr.setRequestHeader; - xhr.setRequestHeader = function(name, value) { - if (name == 'X-Requested-With') return; - setRequestHeader.call(this, name, value); - }; - return xhr; - } - - var reviewFromBottom = false; // Special characters must be escaped with \\
2
diff --git a/src/models/Service.js b/src/models/Service.js @@ -59,6 +59,7 @@ export default class Service { autorun(() => { if (!this.isEnabled) { this.webview = null; + this.isAttached = false; this.unreadDirectMessageCount = 0; this.unreadIndirectMessageCount = 0; }
11
diff --git a/server/views/topics/apicache.py b/server/views/topics/apicache.py @@ -235,7 +235,7 @@ def topic_tag_counts(user_mc_key, topics_id, tag_sets_id, sample_size): ''' snapshots_id, timespans_id, foci_id, q = filters_from_args(request.args) timespan_query = "timespans_id:{}".format(timespans_id) - if q is None: + if (q is None) or (len(q) == 0): query = timespan_query else: query = "({}) AND ({})".format(q, timespan_query)
9
diff --git a/grunt/dataPacksJobTask.js b/grunt/dataPacksJobTask.js @@ -77,8 +77,6 @@ module.exports = function (grunt) { vlocity.datapacksjob.runJob(dataPacksJobsData, jobName, action, function(result) { - grunt.log.ok('DataPacks Job Success - ' + action + ' - ' + jobName); - notifier.notify({ title: 'Vlocity deployment tools', message: 'Success - ' + jobName + '\n'+ @@ -86,12 +84,11 @@ module.exports = function (grunt) { icon: path.join(__dirname, '..', 'images', 'toast-logo.png'), sound: true }, function (err, response) { + grunt.log.ok('DataPacks Job Success - ' + action + ' - ' + jobName); callback(result); }); }, function(result) { - grunt.fail.warn('DataPacks Job Failed - ' + action + ' - ' + jobName + ' - ' + result.errorMessage); - notifier.notify({ title: 'Vlocity deployment tools', message: 'Failed - ' + jobName + '\n'+ @@ -99,6 +96,7 @@ module.exports = function (grunt) { icon: path.join(__dirname, '..', 'images', 'toast-logo.png'), sound: true }, function (err, response) { + grunt.fatal('DataPacks Job Failed - ' + action + ' - ' + jobName + ' - ' + (result.errorMessage || result)); callback(result); }); }, skipUpload); @@ -111,7 +109,6 @@ module.exports = function (grunt) { function runTaskForAllJobFiles(taskName, callback) { var dataPacksJobsData = {}; - var properties = grunt.config.get('properties'); if (properties['vlocity.dataPacksJobFolder']) {
7
diff --git a/src/components/VaccinationsMap/InfoCard/InfoCard.js b/src/components/VaccinationsMap/InfoCard/InfoCard.js @@ -100,14 +100,14 @@ export const InfoCard = ({ data, areaName, date, postcode, areaType, <h3 className={ "govuk-heading-s" }>1st dose</h3> <div className={ "number-row" }> <ColourReference colour={ constants.colourBucketReference[firstColourIdx] }/> - <span className={ "number" }>{ numeral(first).format("0,0.0") + "%" }</span> + <span className={ "number" }>{ first ? numeral(first).format("0,0.0") + "%" : "N/A" }</span> </div> </NumberBox> <NumberBox> <h3 className={ "govuk-heading-s" }>2nd dose</h3> <div className={ "number-row" }> <ColourReference colour={ constants.colourBucketReference[completeColourIdx] }/> - <span className={ "number" }>{ numeral(complete).format("0,0.0") + "%" }</span> + <span className={ "number" }>{ complete ? numeral(complete).format("0,0.0") + "%" : "N/A" }</span> </div> </NumberBox> </NumbersContainer>
9
diff --git a/server/game/cards/13.4-BtRK/CityOfSpiders.js b/server/game/cards/13.4-BtRK/CityOfSpiders.js @@ -37,6 +37,8 @@ class CityOfSpiders extends PlotCard { this.game.resolveAbility(whenRevealed, context); } + this.resolving = false; + return true; } }
1
diff --git a/source/drag-drop/Drag.js b/source/drag-drop/Drag.js @@ -397,6 +397,38 @@ const Drag = Class({ return files; }, + /** + Method: O.Drag#getFileSystemEntries + + Returns: + {FileSystemEntry[]|null} An array of all file system entries represented by the drag. + */ + getFileSystemEntries () { + const items = this.getFromPath( 'event.dataTransfer.items' ); + let entries = null; + if ( items ) { + const l = items.length; + for ( let i = 0; i < l; i += 1 ) { + const item = items[i]; + if ( item.kind === 'file' ) { + if ( item.getAsEntry ) { + if ( !entries ) { + entries = []; + } + entries.push( item.getAsEntry() ); + } + else if ( item.webkitGetAsEntry ) { + if ( !entries ) { + entries = []; + } + entries.push( item.webkitGetAsEntry() ); + } + } + } + } + return entries; + }, + /** Method: O.Drag#getDataOfType
0
diff --git a/src/samples_loader_tasks.erl b/src/samples_loader_tasks.erl @@ -125,7 +125,7 @@ perform_loading_task(Name, Quota) -> BinDir = path_config:component_path(bin), Cmd = BinDir ++ "/cbdocloader", - Args = ["-n", Host ++ ":" ++ integer_to_list(Port), + Args = ["-n", misc:maybe_add_brackets(Host) ++ ":" ++ integer_to_list(Port), "-b", Name, "-s", integer_to_list(Quota), "-t", "2",
9
diff --git a/src/controllers/contacts.ts b/src/controllers/contacts.ts @@ -512,9 +512,9 @@ export const getLatestContacts = async (req, res) => { const local = moment.utc(dateToReturn).local().toDate() const where: { [k: string]: any } = { updatedAt: { [Op.gte]: local }, deleted: false, tenant }; const contacts = await models.Contact.findAll({ where }); - const invites = await models.Invite.findAll({ where: { updated_at: {[Op.gte]: dateToReturn}, tenant } }); + const invites = await models.Invite.findAll({ where: { updated_at: {[Op.gte]: local}, tenant } }); const chats = await models.Chat.findAll({ where }); - const subscriptions = await models.Subscription.findAll({ where: { updated_at: {[Op.gte]: dateToReturn}, tenant } }); + const subscriptions = await models.Subscription.findAll({ where: { updated_at: {[Op.gte]: local}, tenant } }); const contactsResponse = contacts.map((contact) => jsonUtils.contactToJson(contact)); const invitesResponse = invites.map((invite) => jsonUtils.contactToJson(invite));
14
diff --git a/.drone.star b/.drone.star @@ -70,6 +70,7 @@ def setupServerAndApp(): "commands": [ "cd /var/www/owncloud/server/", "php occ config:system:set trusted_domains 1 --value=owncloud", + "php occ config:system:set dav.propfind.depth_infinity --value=true", ], }]
11
diff --git a/assets/js/modules/analytics/common/account-create/create-account-field.js b/assets/js/modules/analytics/common/account-create/create-account-field.js @@ -54,6 +54,7 @@ export default function CreateAccountField( { <Input name={ name } value={ value } + id={ `googlesitekit_analytics_account_create_${ name }` } /> </TextField> );
12
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md - [ ] This PR has **no** breaking changes. - [ ] I have added my changes to the [CHANGELOG](https://github.com/radiantearth/stac-spec/blob/dev/CHANGELOG.md) **or** a CHANGELOG entry is not required. +- [ ] This PR affects the [STAC API spec](https://github.com/radiantearth/stac-api-spec), and I have opened issue/PR #XXX to +track the change.
0
diff --git a/assets/js/modules/subscribe-with-google/datastore/base.js b/assets/js/modules/subscribe-with-google/datastore/base.js @@ -38,26 +38,16 @@ let baseModuleStore = Modules.createModuleStore( 'subscribe-with-google', { // Rename generated pieces to adhere to our convention. baseModuleStore = ( ( { actions, selectors, ...store } ) => { - // eslint-disable-next-line sitekit/acronym-case - const { setAmpContainerID, setGaPropertyID, ...restActions } = actions; - // eslint-disable-next-line sitekit/acronym-case - const { getAmpContainerID, getGaPropertyID, ...restSelectors } = selectors; + const { ...restActions } = actions; + const { ...restSelectors } = selectors; return { ...store, actions: { ...restActions, - // eslint-disable-next-line sitekit/acronym-case - setAMPContainerID: setAmpContainerID, - // eslint-disable-next-line sitekit/acronym-case - setGAPropertyID: setGaPropertyID, }, selectors: { ...restSelectors, - // eslint-disable-next-line sitekit/acronym-case - getAMPContainerID: getAmpContainerID, - // eslint-disable-next-line sitekit/acronym-case - getGAPropertyID: getGaPropertyID, }, }; } )( baseModuleStore );
2
diff --git a/gameplay/avalon/phases/assassination.js b/gameplay/avalon/phases/assassination.js @@ -273,12 +273,12 @@ Assassination.prototype.getStatusMessage = function(indexOfPlayer){ } if(indexOfPlayer === indexOfAssassin){ - return "Shoot Merlin." + return "Choose someone to assassinate." } // If it is any other player who isn't special role else{ var usernameOfAssassin = this.thisRoom.playersInGame[indexOfAssassin].username; - return "Waiting for " + usernameOfAssassin + " to assassinate Merlin or Tristan and Isolde." + return "Waiting for " + usernameOfAssassin + " to assassinate." } }
10
diff --git a/package.json b/package.json "es6-promise": "3.2.1", "lodash.throttle": "4.1.1", "namespace-emitter": "1.0.0", - "pretty-bytes": "3.0.1", + "prettier-bytes": "1.0.3", "tus-js-client": "1.4.1", "whatwg-fetch": "1.0.0", "yo-yo": "1.3.1"
0
diff --git a/site/themes/embark/layout/partial/footer.swig b/site/themes/embark/layout/partial/footer.swig <li class="o-list-bare__item"><a class="u-link-ghost" href="https://status.im/" target="_blank">Status</a></li> <li class="o-list-bare__item"><a class="u-link-ghost" href="https://keycard.tech/" target="_blank">Keycard</a></li> <li class="o-list-bare__item"><a class="u-link-ghost" href="https://dap.ps/" target="_blank">dap.ps</a></li> - <li class="o-list-bare__item"><a class="u-link-ghost" href="https://embark.status.im/" target="_blank">Embark</a></li> + <li class="o-list-bare__item"><a class="u-link-ghost" href="https://teller.exchange/" target="_blank">Teller</a></li> + <li class="o-list-bare__item"><a class="u-link-ghost" href="https://assemble.fund/" target="_blank">Assemble</a></li> <li class="o-list-bare__item"><a class="u-link-ghost" href="https://subspace.status.im/" target="_blank">Subspace</a></li> <li class="o-list-bare__item"><a class="u-link-ghost" href="https://vac.dev/" target="_blank">Vac</a></li> + <li class="o-list-bare__item"><a class="u-link-ghost" href="https://nimbus.team/" target="_blank">Nimbus</a></li> </ul> </div> </div>
3
diff --git a/package.json b/package.json "karma-firefox-launcher": "^1.0.0", "karma-jasmine": "^1.1.0", "karma-jasmine-spec-tags": "^1.0.1", + "karma-verbose-reporter": "0.0.6", "madge": "^1.6.0", "node-sass": "^4.5.0", "npm-link-check": "^1.2.0",
0
diff --git a/lib/node_modules/@stdlib/_tools/benchmarks/bundle/test/test.cli.js b/lib/node_modules/@stdlib/_tools/benchmarks/bundle/test/test.cli.js @@ -143,13 +143,19 @@ tape( 'when invoked with a `-V` flag, the command-line interface prints the vers }); tape( 'the command-line interface generates a bundle', opts, function test( t ) { - var cmd = [ + var opts; + var cmd; + + cmd = [ process.execPath, fpath, join( __dirname, 'fixtures', 'main' ) ]; + opts = { + 'maxBuffer': 400*1024 + }; - exec( cmd.join( ' ' ), done ); + exec( cmd.join( ' ' ), opts, done ); function done( error, stdout, stderr ) { if ( error ) { @@ -168,15 +174,21 @@ tape( 'the command-line interface generates a bundle', opts, function test( t ) }); tape( 'the command-line interface supports providing a custom glob pattern', opts, function test( t ) { - var cmd = [ + var opts; + var cmd; + + cmd = [ process.execPath, fpath, join( __dirname, 'fixtures', 'main' ), '--pattern', '*.js' ]; + opts = { + 'maxBuffer': 400*1024 + }; - exec( cmd.join( ' ' ), done ); + exec( cmd.join( ' ' ), opts, done ); function done( error, stdout, stderr ) { if ( error ) {
12
diff --git a/src/components/draft-js-plugins-editor/index.js b/src/components/draft-js-plugins-editor/index.js import React from 'react'; import DraftEditor from 'draft-js-plugins-editor'; import debounce from 'debounce'; +import Textarea from 'react-textarea-autosize'; import { isAndroid, toPlainText, fromPlainText } from 'shared/draft-utils'; import type DraftEditorProps from 'draft-js/lib/DraftEditorProps'; @@ -62,9 +63,8 @@ class AndroidFallbackInput extends React.Component<Props, FallbackState> { return ( <div className="DraftEditor-root"> <div className="DraftEditor-editorContainer"> - <input + <Textarea {...this.props} - type="text" value={this.state.value} onChange={this.onChange} className={'DraftEditor-content ' + (this.props.className || '')}
1
diff --git a/test/functional/fixtures/api/es-next/take-screenshot/test.js b/test/functional/fixtures/api/es-next/take-screenshot/test.js @@ -5,7 +5,7 @@ var assertionHelper = require('../../../../assertion-helper.js'); var SCREENSHOT_PATH_MESSAGE_RE = /^___test-screenshots___[\\/]\d{4,4}-\d{2,2}-\d{2,2}_\d{2,2}-\d{2,2}-\d{2,2}[\\/]test-1$/; -var CUSTOM_SCREENSHOT_PATH_MESSAGE = '___test-screenshots___'; +var CUSTOM_SCREENSHOT_DIR = '___test-screenshots___'; describe('[API] t.takeScreenshot()', function () { @@ -24,7 +24,7 @@ describe('[API] t.takeScreenshot()', function () { return runTests('./testcafe-fixtures/take-screenshot.js', 'Take a screenshot with a custom path (OS separator)', { setScreenshotPath: true }) .then(function () { - expect(testReport.screenshotPath).eql(CUSTOM_SCREENSHOT_PATH_MESSAGE); + expect(testReport.screenshotPath).eql(CUSTOM_SCREENSHOT_DIR); expect(assertionHelper.checkScreenshotsCreated(false, 2, 'custom')).eql(true); }); }); @@ -33,7 +33,7 @@ describe('[API] t.takeScreenshot()', function () { return runTests('./testcafe-fixtures/take-screenshot.js', 'Take a screenshot with a custom path (DOS separator)', { setScreenshotPath: true }) .then(function () { - expect(testReport.screenshotPath).contains(CUSTOM_SCREENSHOT_PATH_MESSAGE); + expect(testReport.screenshotPath).contains(CUSTOM_SCREENSHOT_DIR); expect(assertionHelper.checkScreenshotsCreated(false, 2, 'custom')).eql(true); }); }); @@ -92,8 +92,10 @@ describe('[API] t.takeScreenshot()', function () { return runTests('./testcafe-fixtures/take-screenshot.js', 'Take screenshots with same path', { setScreenshotPath: true }).then(function () { + const screenshotFileName = path.join(CUSTOM_SCREENSHOT_DIR, '1.png'); + expect(testReport.warnings).eql([ - 'The file at "___test-screenshots___\\1.png" already exists. It has just been rewritten ' + + `The file at "${screenshotFileName}" already exists. It has just been rewritten ` + 'with a recent screenshot. This situation can possibly cause issues. To avoid them, make sure ' + 'that each screenshot has a unique path. If a test runs in multiple browsers, consider ' + 'including the user agent in the screenshot path or generate a unique identifier in another way.'
1
diff --git a/src/components/Drawer.js b/src/components/Drawer.js @@ -12,7 +12,7 @@ const { StyleRoot } = require('radium'); import { withTheme } from './Theme'; const Button = require('../components/Button'); -const MXFocusTrap = require('../components/MXFocusTrap'); +const RestrictFocusToChildren = require('../components/RestrictFocusToChildren'); const { themeShape } = require('../constants/App'); @@ -244,7 +244,7 @@ class Drawer extends React.Component { return ( <StyleRoot> - <MXFocusTrap> + <RestrictFocusToChildren> <div className='mx-drawer' onKeyUp={typeof this.props.onKeyUp === 'function' ? this.props.onKeyUp : this._handleKeyUp} style={styles.componentWrapper}> <div className='mx-drawer-scrim' @@ -287,7 +287,7 @@ class Drawer extends React.Component { </div> </div> </div> - </MXFocusTrap> + </RestrictFocusToChildren> </ StyleRoot> ); }
14
diff --git a/public/javascripts/SVValidate/src/panorama/Panorama.js b/public/javascripts/SVValidate/src/panorama/Panorama.js @@ -17,6 +17,7 @@ function Panorama (labelList) { validationTimestamp: new Date().getTime() }; var panorama = undefined; + // Determined manually by matching appearance of labels on the audit page and appearance of // labels on the validation page. Zoom is determined by FOV, not by how "close" the user is. var zoomLevel = { @@ -288,10 +289,12 @@ function Panorama (labelList) { function setPanorama (panoId, heading, pitch, zoom) { setProperty("panoId", panoId); setProperty("prevPanoId", panoId); + if (init) { panorama.setPano(panoId); panorama.set('pov', {heading: heading, pitch: pitch}); panorama.set('zoom', zoomLevel[zoom]); + _addListeners(); init = false; } else { @@ -300,6 +303,7 @@ function Panorama (labelList) { // load in time. function changePano() { _createNewPanorama(); + _addListeners(); panorama.setPano(panoId); panorama.set('pov', {heading: heading, pitch: pitch}); panorama.set('zoom', zoomLevel[zoom]); @@ -307,7 +311,6 @@ function Panorama (labelList) { } setTimeout(changePano, 300); } - _addListeners(); return this; }
1
diff --git a/plugins/identity/app/views/identity/projects/_wizard_steps.html.haml b/plugins/identity/app/views/identity/projects/_wizard_steps.html.haml %tbody %tr %th{width:"30%"} Package - %td= @quota_inquiry.payload["package"] + %td= quota_data["package"] - else - if quota_data
1
diff --git a/colors.js b/colors.js +let warned = false + module.exports = { black: '#000', white: '#fff', @@ -85,7 +87,26 @@ module.exports = { 800: '#1e40af', 900: '#1e3a8a', }, - lightBlue: { + get lightBlue() { + if (!warned) { + console.log('warn - As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`.') + console.log('warn - Please update your color palette to eliminate this warning.') + warned = true + } + return { + 50: '#f0f9ff', + 100: '#e0f2fe', + 200: '#bae6fd', + 300: '#7dd3fc', + 400: '#38bdf8', + 500: '#0ea5e9', + 600: '#0284c7', + 700: '#0369a1', + 800: '#075985', + 900: '#0c4a6e', + } + }, + sky: { 50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd',
10
diff --git a/src/components/Widgets/ListControl.js b/src/components/Widgets/ListControl.js @@ -89,17 +89,21 @@ export default class ListControl extends Component { handleChangeFor(index) { return (newValue, newMetadata) => { - const { value, onChange } = this.props; + const { value, metadata, onChange, forID } = this.props; const parsedValue = (this.valueType === valueTypes.SINGLE) ? newValue.first() : newValue; - onChange(value.set(index, parsedValue), newMetadata); + const parsedMetadata = { + [forID]: Object.assign(metadata ? metadata.toJS() : {}, newMetadata ? newMetadata[forID] : {}), + }; + onChange(value.set(index, parsedValue), parsedMetadata); }; } handleRemove(index) { return (e) => { e.preventDefault(); - const { value, onChange } = this.props; - onChange(value.remove(index)); + const { value, metadata, onChange, forID } = this.props; + const parsedMetadata = { [forID]: metadata.remove(metadata.keySeq().get(0)) }; + onChange(value.remove(index), parsedMetadata); }; } @@ -193,3 +197,7 @@ export default class ListControl extends Component { />); } } + + +// WEBPACK FOOTER // +// ./components/Widgets/ListControl.js
9
diff --git a/tileschema.json.j2 b/tileschema.json.j2 "attribution": "Qwant Maps <a href=\"http://www.openmaptiles.org/\" target=\"_blank\">&copy; OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">&copy; OpenStreetMap contributors</a>", "center": [-12.2168, 28.6135, 4], "description": "Une adaptation des tuiles OpenMapTiles pour Qwant Maps", - "maxzoom": 14, + "maxzoom": 15, "minzoom": 0, "pixel_scale": "256", "vector_layers": [{ - "maxzoom": 14, + "maxzoom": 15, "fields": { "class": "String" }, "id": "water", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String", "id": "waterway", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "class": "String", "subclass": "String" "id": "landcover", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "class": "String" }, "id": "landuse", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String", "id": "mountain_peak", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "class": "String" }, "id": "park", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "admin_level": "Number", "disputed": "Number", "id": "boundary", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "class": "String" }, "id": "aeroway", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "brunnel": "String", "ramp": "Number", "id": "transportation", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "render_min_height": "Number", "render_height": "Number" "id": "building", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String", "id": "water_name", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String", "id": "transportation_name", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String", "id": "place", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "housenumber": "String" }, "id": "housenumber", "description": "" }, { - "maxzoom": 14, + "maxzoom": 15, "fields": { "name:mt": "String", "name:pt": "String",
12
diff --git a/lib/applydamage.js b/lib/applydamage.js @@ -346,9 +346,9 @@ export default class ApplyDamageDialog extends Application { } if (type === 'FP') { - this.actor.update({ "data.FP.value": data.newvalue }) + this.actor.update({ "data.FP.value": this._calculator.FP.value - injury }) } else { - this.actor.update({ "data.HP.value": data.newvalue }) + this.actor.update({ "data.HP.value": this._calculator.HP.value - injury }) } this._renderTemplate('chat-damage-results.html', data).then(html => {
1
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -117,6 +117,7 @@ const _getLoaders = () => { }; let currentAppRender = null; +let recursion = 0; metaversefile.setApi({ async import(s) { return await import(s); @@ -143,6 +144,24 @@ metaversefile.setApi({ throw new Error('useFrame cannot be called outside of render()'); } }, + useBeforeRender() { + recursion++; + if (recursion === 1) { + // scene.directionalLight.castShadow = false; + if (rigManager.localRig) { + rigManager.localRig.model.visible = true; + } + } + }, + useAfterRender() { + recursion--; + if (recursion === 0) { + // scene.directionalLight.castShadow = true; + if (rigManager.localRig) { + rigManager.localRig.model.visible = false; + } + } + }, useCleanup(fn) { const app = currentAppRender; if (app) {
0
diff --git a/Gruntfile.js b/Gruntfile.js @@ -426,7 +426,6 @@ module.exports = function (grunt) { 'bootstrap_webpack_builder_specs', 'webpack:builder_specs', 'jasmine:affected', - 'js_dashboard', 'generate_dashboard_specs', 'bootstrap_webpack_builder_specs', 'webpack:builder_specs', @@ -450,8 +449,6 @@ module.exports = function (grunt) { * `grunt dashboard_specs` compile dashboard specs */ grunt.registerTask('dashboard_specs', 'Build only dashboard specs', [ - 'js_builder', - 'js_dashboard', 'generate_dashboard_specs', 'bootstrap_webpack_builder_specs', 'webpack:builder_specs',
2
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js @@ -106,13 +106,12 @@ class PluginManager { try { Plugin = require(pluginPath); // eslint-disable-line global-require } catch (error) { - if (isModuleNotFoundError(error, pluginPath)) { - if (this.cliCommands[0] === 'plugin') return; - // Plugin not installed + if (!isModuleNotFoundError(error, pluginPath)) throw error; - if (this.cliOptions.help) { + // Plugin not installed + if (this.cliOptions.help || this.cliCommands[0] === 'plugin') { // User may intend to install plugins just listed in serverless config - // Therefore skip on MODULE_NOT_FOUND cases + // Therefore skip on MODULE_NOT_FOUND case return; } @@ -121,11 +120,8 @@ class PluginManager { ' Make sure it\'s installed and listed in the "plugins" section', ' of your serverless config file.', ].join(''); - throw new this.serverless.classes.Error(errorMessage); } - throw error; - } this.addPlugin(Plugin); }); }
7
diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js @@ -302,10 +302,41 @@ function signInWithShortLivedToken(email, shortLivedToken) { * User forgot the password so let's send them the link to reset their password */ function resetPassword() { - Onyx.merge(ONYXKEYS.ACCOUNT, {loading: true, forgotPassword: true}); - DeprecatedAPI.ResetPassword({email: credentials.login}) - .finally(() => { - Onyx.merge(ONYXKEYS.ACCOUNT, {loading: false, validateCodeExpired: false}); + API.write('RequestPasswordReset', { + email: credentials.login + }, + { + optimisticData: [ + { + onyxMethod:'merge', + key: ONYXKEYS.ACCOUNT, + value: { + isLoading: true, + forgotPassword: true + } + }, + ], + successData: [ + { + onyxMethod:'merge', + key: ONYXKEYS.ACCOUNT, + value: { + isLoading: false, + validateCodeExpired: false, + forgotPassword: false + } + }, + ], + failureData: [ + { + onyxMethod:'merge', + key: ONYXKEYS.ACCOUNT, + value: { + isLoading: false, + validateCodeExpired: false + } + }, + ], }); }
14
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 v-bind:style = "`height: ${editViewHeight}`" v-bind:src = "pagePath" v-on:load = "editViewLoaded" - frameborder = "0"> - </iframe> + frameborder = "0"></iframe> </div> </template> @@ -56,14 +55,25 @@ export default { console.log('===== METHOD: editViewLoaded =====') perHelperModelAction('getConfig', perAdminView.pageView.path) - /* - this method should be called from the component in the iframe - once data has been returned, and we can remove the timeout... - */ + var iframeBody = ev.target.contentDocument.body + console.log('iframeBody: ', iframeBody) var self = this - setTimeout(function(){ + + // create an observer to check for 'pace-done' class in iframe body + var observer = new MutationObserver(function(mutations) { + console.log('mutations: ', mutations); + mutations.forEach(function(mutation) { + console.log('observer mutation: ', mutation); + if(mutation.target.classList.contains('pace-done')){ + console.log('vue app inside iframe has loaded!') self.setEditViewHeight(self.getIframeHeight('editview')) - }, 1000); + // stop observing + observer.disconnect() + } + }) + }) + // start observing + observer.observe(iframeBody, { attributes: true }) }, resizeOverlay: function(event) { @@ -94,6 +104,7 @@ export default { } return targetEl }, + click: function(e) { console.log('>>> click event',e) if(!e) return
4
diff --git a/src/components/ContactCard/contact.style.js b/src/components/ContactCard/contact.style.js @@ -74,7 +74,7 @@ const ContactWrapper = styled.section` form{ padding: 50px; input{ - width: 70%; + width: 100%; } }
7
diff --git a/guide/command-handling/README.md b/guide/command-handling/README.md -# File and folder structure +# Command handling As mentioned in a previous chapter, unless your bot project is a small one, it's not a very good idea to have a single file with a giant if/else if chain for commands. If you want to implement features into your bot and make your development process a lot less painful, you'll definitely want to use (or in this case, create) a command handler. Let's get started on that!
10