code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/test/unit/validate.test.js b/test/unit/validate.test.js @@ -39,16 +39,17 @@ describe('Recurly.validate', function () { }); it('should parse discover', function () { + assert(recurly.validate.cardType('6010999990139424') !== 'discover'); + assert(recurly.validate.cardType('6011040090139424') !== 'discover'); assert(recurly.validate.cardType('6011000090139424') === 'discover'); - assert(recurly.validate.cardType('64400000901394243') === 'discover'); - assert(recurly.validate.cardType('650611009013942423') === 'discover'); - assert(recurly.validate.cardType('601179999013942423') === 'discover'); + assert(recurly.validate.cardType('6011039990139424') === 'discover'); }); it('should parse union_pay', function () { - assert(recurly.validate.cardType('6221261111113245') === 'union_pay'); - assert(recurly.validate.cardType('6282000123842342') === 'union_pay'); - assert(recurly.validate.cardType('6250941006528599') === 'union_pay'); + assert(recurly.validate.cardType('6210939911113245') !== 'union_pay'); + assert(recurly.validate.cardType('6210950011113245') !== 'union_pay'); + assert(recurly.validate.cardType('6210940011113245') === 'union_pay'); + assert(recurly.validate.cardType('6210949911113245') === 'union_pay'); assert(recurly.validate.cardType('8171999927660000') === 'union_pay'); assert(recurly.validate.cardType('8171999900000000021') === 'union_pay'); });
3
diff --git a/token-metadata/0xD46bA6D942050d489DBd938a2C909A5d5039A161/metadata.json b/token-metadata/0xD46bA6D942050d489DBd938a2C909A5d5039A161/metadata.json "symbol": "AMPL", "address": "0xD46bA6D942050d489DBd938a2C909A5d5039A161", "decimals": 9, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/assets/js/components/setup/compatibility-checks.js b/assets/js/components/setup/compatibility-checks.js @@ -78,7 +78,7 @@ export default class CompatibilityChecks extends Component { this.state = { complete: isSiteKitConnected, error: null, - helperPlugin: {}, + developerPlugin: {}, }; } @@ -91,15 +91,15 @@ export default class CompatibilityChecks extends Component { await testCallback(); } } catch ( error ) { - const helperPlugin = await data.get( TYPE_CORE, 'site', 'helper-plugin' ); - this.setState( { error, helperPlugin } ); + const developerPlugin = await data.get( TYPE_CORE, 'site', 'developer-plugin' ); + this.setState( { error, developerPlugin } ); } this.setState( { complete: true } ); } helperCTA() { - const { installed, active, installURL, activateURL, configureURL } = this.state.helperPlugin; + const { installed, active, installURL, activateURL, configureURL } = this.state.developerPlugin; if ( ! installed && installURL ) { return { @@ -130,7 +130,7 @@ export default class CompatibilityChecks extends Component { } renderError( error ) { - const { installed } = this.state.helperPlugin; + const { installed } = this.state.developerPlugin; const { labelHTML, href, external } = this.helperCTA(); switch ( error ) {
10
diff --git a/modules/clipboard.js b/modules/clipboard.js @@ -299,7 +299,8 @@ function matchStyles(node, delta) { if (style.fontStyle && computeStyle(node).fontStyle === 'italic') { formats.italic = true; } - if (style.fontWeight && (computeStyle(node).fontWeight === 'bold' || computeStyle(node).fontWeight === '700')) { + if (style.fontWeight && (computeStyle(node).fontWeight.startsWith('bold') || + parseInt(computeStyle(node).fontWeight) >= 700)) { formats.bold = true; } if (Object.keys(formats).length > 0) {
9
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js @@ -21,7 +21,7 @@ function currentCardIsInThisList(listId, swimlaneId) { currentCard.listId === listId && currentCard.swimlaneId === swimlaneId ); - else return currentCard && currentCard.listId === listId; + else return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; // https://github.com/wekan/wekan/issues/1623 // https://github.com/ChronikEwok/wekan/commit/cad9b20451bb6149bfb527a99b5001873b06c3de
1
diff --git a/index.html b/index.html @@ -14874,7 +14874,6 @@ N is the population size. <br> <br> <!--BCD Addition --> - <div class="main" style="padding-left: 3.125rem;"> <div class="col-6"> <div class="form-group"> <h2>BCD Code Addition </h2>
1
diff --git a/Gruntfile.js b/Gruntfile.js @@ -8,6 +8,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-replace'); @@ -23,6 +24,7 @@ module.exports = function(grunt) { 'concat:js', 'babel', 'less:uncompressed', + 'sass:dist', 'replace', 'build_complete', 'uglify', @@ -124,13 +126,18 @@ module.exports = function(grunt) { } }, clean: { - pre: ['dist'], - post: ['**/*.tmp.*','**/*.tmp'], + pre: ['dist/*'], + post: ['dist/**/*.tmp.*','dist/**/*.tmp'], js: ['dist/*.js'] }, copy: { less: { - files: [{expand: true, flatten: true, src: ['src/less/*.less'], dest: 'dist/less'}] + files: [{ + expand: true, + flatten: true, + src: ['src/less/*.less'], + dest: 'dist/less' + }] }, less_plugins: { files: less_plugin_files @@ -147,7 +154,10 @@ module.exports = function(grunt) { }, main: { files: [ - {src: ['src/less/.wrapper.css'], dest: 'dist/css/selectize.css'} + { + src: ['src/less/.wrapper.css'], + dest: 'dist/css/selectize.css' + } ] }, js: { @@ -160,6 +170,7 @@ module.exports = function(grunt) { {expand: true, flatten: false, src: ['dist/css/*.css'], dest: ''}, {expand: true, flatten: false, src: ['dist/less/*.less'], dest: ''}, {expand: true, flatten: false, src: ['dist/less/plugins/*.less'], dest: ''}, + {expand: true, flatten: false, src: ['dist/css-scss/*.css'], dest: ''}, ] } }, @@ -173,6 +184,18 @@ module.exports = function(grunt) { } } }, + sass: { + dist: { + files: [{ + style: 'expanded', + expand: true, + flatten: true, + src: ['src/scss/*.scss'], + dest: 'dist/css-scss', + ext: '.css' + }] + } + }, concat: { options: { stripBanners: true, @@ -251,8 +274,7 @@ module.exports = function(grunt) { 'src/**', ], tasks: [ - 'concat:js', - 'build_complete', + 'default', 'shell:builddocs', ] }
9
diff --git a/client/package.json b/client/package.json }, "homepage": "https://github.com/opentable/oc/tree/master/oc-client", "dependencies": { - "handlebars": "4.0.5", "minimal-request": "2.2.0", "nice-cache": "0.0.5", + "oc-template-handlebars": "1.0.0", "stringformat": "0.0.5" }, "engines": {
3
diff --git a/docs/5.api/rpc/contracts.md b/docs/5.api/rpc/contracts.md @@ -850,14 +850,14 @@ http post https://rpc.testnet.near.org jsonrpc=2.0 id=dontcare method=query \ "id": "dontcare" } ``` - - -**Note**: Currently, the response includes a `proof` field directly in the `result`, and a `proof` fields on each element of the `values` list. In the future, the `result.proof` will be included only if the result is **not empty**, and the `proof` field will be removed from all `values`. When parsing the result, you should accept objects with or without these fields set. - </p> -</details> -#### RPC 50kB Limit {#rpc-50kb-limit} +**Note**: Currently, the response includes a `proof` field directly in the +`result`, and a `proof` fields on each element of the `values` list. In +the future, the `result.proof` will be included only if the result is **not empty**, +and the `proof` field will be removed from all `values`. When parsing the result, you +should accept objects with or without these fields set. +</details> > **Heads up** >
13
diff --git a/app/views/carto/admin/mobile_apps/index.html.erb b/app/views/carto/admin/mobile_apps/index.html.erb <div class="CDB-Text FormAccount-Content"> <%= render :partial => 'admin/shared/api_keys_subheader' %> - <div class="Filters-separator"></div> <%= render :partial => 'carto/admin/mobile_apps/mobile_plan_info' %>
2
diff --git a/detox/scripts/build_universal_framework.sh b/detox/scripts/build_universal_framework.sh @@ -8,7 +8,7 @@ if [ "${XCODEVERSION}" == "`echo -e "${XCODEVERSION}\n12.0" | sort --version-sor FRAMEWORK_SCRIPT="build_universal_framework_modern.sh" else echo "Xcode 11 and below; using legacy script for building" - FRAMEWORK_SCRIPT="build_universal_framework.sh" + FRAMEWORK_SCRIPT="build_universal_framework_legacy.sh" fi "${SCRIPTPATH}/${FRAMEWORK_SCRIPT}" "$@" \ No newline at end of file
4
diff --git a/src/pages/cart.js b/src/pages/cart.js @@ -15,6 +15,9 @@ import Link from "components/Link"; import { Router } from "routes"; const styles = (theme) => ({ + cartEmptyMessageContainer: { + margin: "80px 0" + }, checkoutButtonsContainer: { backgroundColor: theme.palette.reaction.black02, padding: theme.spacing.unit * 2 @@ -80,7 +83,7 @@ class CartPage extends Component { } renderCartItems() { - const { cart, hasMoreCartItems, loadMoreCartItems } = this.props; + const { cart, classes, hasMoreCartItems, loadMoreCartItems } = this.props; if (cart && Array.isArray(cart.items) && cart.items.length) { return ( @@ -97,7 +100,7 @@ class CartPage extends Component { } return ( - <Grid item xs={12}> + <Grid item xs={12} className={classes.cartEmptyMessageContainer}> <CartEmptyMessage onClick={this.handleClick} /> </Grid> );
3
diff --git a/src/pages/MetricDocs/Documentation/Documentation.js b/src/pages/MetricDocs/Documentation/Documentation.js @@ -45,15 +45,20 @@ const AreaTypes = { }; -const Markdown: ComponentType<*> = ({ payload, className="" }) => { +const Markdown: ComponentType<*> = ({ payload, className="", toc=false }) => { - const data = useMarkdown(payload ? payload.replace(/([#]+)/g, '###$1') : null); + payload = toc ? "# Table of contents\n\r\n\r" + payload : payload; + + const data = useMarkdown( + payload ? payload.replace(/([#]+)/g, '###$1') : null, + toc + ); if ( !payload ) return null else if ( !data ) return <Loading/>; return <MarkdownContent - className={ `govuk-body markdown page ${className}` } + className={ `govuk-body markdown page ${className} ${ toc ? "with-toc" : "" }` } dangerouslySetInnerHTML={ { __html: data } } />; @@ -77,7 +82,7 @@ const AssociatingLogs: ComponentType<*> = ({ data }) => { return <section> <h3 className={ "govuk-heading-m" }>Changes and updates</h3> - <MarkdownContent className={ "markdown page" }> + <MarkdownContent className={ "markdown page no-left-margin" }> <p>Logs of changes made to the metric over time.</p> <p> Note that all log entries come into effect from the date on which they are @@ -112,7 +117,9 @@ const AssociatingLogs: ComponentType<*> = ({ data }) => { } /> { - data ? null : <span>No records for this metric.</span> + !data || !(data?.length) + ? <span>There are no logs associated with this metric.</span> + : null } </section>; @@ -183,7 +190,7 @@ const AdditionalDetails: ComponentType<*> = ({ documentation }) => { </span> }, content: { - children: <Markdown payload={ documentation?.[docName]?.body }/> + children: <Markdown payload={ documentation?.[docName]?.body } toc/> } } }
7
diff --git a/token-metadata/0xed0849BF46CfB9845a2d900A0A4E593F2dD3673c/metadata.json b/token-metadata/0xed0849BF46CfB9845a2d900A0A4E593F2dD3673c/metadata.json "symbol": "SGA", "address": "0xed0849BF46CfB9845a2d900A0A4E593F2dD3673c", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/js/editor/textmarkers.js b/src/js/editor/textmarkers.js @@ -65,6 +65,7 @@ export function getTextMarkerConstructors(nodes) { if (mark.matchAgainst === 'key') { const key = getKeyNameForNode(node); if (key) { + const address = getKeyAddressForNode(node); const check = (mark.matchPattern === key); // If a matching mark type is found, make a copy of it and store @@ -72,6 +73,7 @@ export function getTextMarkerConstructors(nodes) { if (check) { const clone = Object.assign({}, mark); clone.key = key; + clone.address = address; clone.node = node; marks.push(clone); break; @@ -98,7 +100,10 @@ export function getTextMarkerConstructors(nodes) { // - replace the node with the parent node const filteredMarks = marks.reduce((accumulator, mark) => { // Automatically pass through any marker not of type `color` - if (mark.type !== 'color') accumulator.push(mark); + if (mark.type !== 'color') { + accumulator.push(mark); + return accumulator; + } // Compare this mark's address with the last item on the accumulator if (accumulator.length === 0 || accumulator[accumulator.length - 1].address !== mark.address) {
1
diff --git a/src/components/networked-video-source.js b/src/components/networked-video-source.js @@ -42,13 +42,19 @@ AFRAME.registerComponent('networked-video-source', { if (newStream) { this.video.srcObject = newStream; - var playResult = this.video.play(); + const playResult = this.video.play(); if (playResult instanceof Promise) { playResult.catch((e) => naf.log.error(`Error play video stream`, e)); } + if (this.videoTexture) { + this.videoTexture.dispose(); + } + + this.videoTexture = new THREE.VideoTexture(this.video); + const mesh = this.el.getObject3D('mesh'); - mesh.material.map = new THREE.VideoTexture(this.video); + mesh.material.map = this.videoTexture; mesh.material.needsUpdate = true; } @@ -57,31 +63,35 @@ AFRAME.registerComponent('networked-video-source', { }, _clearMediaStream() { - if (this.video) { - this.video.srcObject = null; - this.video = null; + this.stream = null; + + if (this.videoTexture) { + + if (this.videoTexture.image instanceof HTMLVideoElement) { + // Note: this.videoTexture.image === this.video + const video = this.videoTexture.image; + video.pause(); + video.srcObject = null; + video.load(); + } + + this.videoTexture.dispose(); + this.videoTexture = null; } }, remove: function() { - if (!this.videoTexture) return; - - if (this.stream) { this._clearMediaStream(); - } }, setupVideo: function() { - var el = this.el; - if (!this.video) { - var video = document.createElement('video'); + const video = document.createElement('video'); video.setAttribute('autoplay', true); video.setAttribute('playsinline', true); video.setAttribute('muted', true); - } - this.video = video; } + } }); \ No newline at end of file
7
diff --git a/packages/react/src/components/ReadOnlyValue/ReadOnlyValue.mdx b/packages/react/src/components/ReadOnlyValue/ReadOnlyValue.mdx @@ -24,7 +24,7 @@ import { ReadOnlyValue } from 'carbon-addons-iot-react'; | Name | Type | Default | Description | | :-------- | :---------------------------------------------------------- | :-------- | :---------------------------------------------- | ----------------------------------- | | label | string | '' | read only label text | -| value | string | node | '' | read only value text or custom node | +| value | string, node | string | '' | read only value text or custom node | | type | enum: <br/>'stacked'<br/>'inline'<br/> 'inline_small' <br/> | stacked | Type of how should be the read only be rendered | | testId | string | 'testId' | Test id for selecting the element | | className | string | undefined | Custom class for component |
1
diff --git a/components/widgets/VegaChartTooltip.js b/components/widgets/VegaChartTooltip.js @@ -51,12 +51,12 @@ class VegaChartTooltip extends React.Component { <div className="c-chart-tooltip"> { this.props.item.x.label && ( <div className="labels"> - <span>{this.props.item.y && this.props.item.y.label}</span> + { this.props.item.y.label && <span>{this.props.item.y.label}</span> } <span>{this.props.item.x.label}</span> </div> )} <div className="values"> - <span>{this.getParsedY()}</span> + { this.props.item.y.value && <span>{this.getParsedY()}</span> } <span>{this.getParsedX()}</span> </div> </div>
7
diff --git a/includes/Core/Nonces/Nonces.php b/includes/Core/Nonces/Nonces.php @@ -127,9 +127,7 @@ final class Nonces { 'callback' => function() { return new WP_REST_Response( $this->get_nonces() ); }, - 'permission_callback' => function () { - return current_user_can( 'edit_posts' ); - }, + 'permission_callback' => '__return_true', ), ) ),
2
diff --git a/src/components/RoomHeaderAvatars.js b/src/components/RoomHeaderAvatars.js @@ -37,7 +37,7 @@ const RoomHeaderAvatars = (props) => { avatarImageURLs={props.avatarImageURLs} avatarTooltips={[]} defaultSubscriptIcon={() => Expensicons.Workspace} - size={props.showSubscript ? 'large' : 'default'} + size="large" /> ); }
12
diff --git a/js/webcomponents/bisweb_filetreepipeline.js b/js/webcomponents/bisweb_filetreepipeline.js @@ -318,7 +318,7 @@ class FileTreePipeline extends HTMLElement { //format the saved modules to use the pipeline creation tool. //TODO: Format this to use biswebnode maybe? - let command = ['', 'home', 'zach', 'javascript', 'bisweb', 'js', 'bin', 'bisweb.js'].join('/'); + let command = ['', 'home', 'zach', 'javascript', 'bisweb', 'js', 'bin', 'bisweb.js'].join(sep); let pipeline = { 'command' : 'node ' + command, 'inputs' : [{
1
diff --git a/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs b/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs @@ -274,6 +274,10 @@ public class UserResource { */ @GetMapping("/users") @Timed +<<<<<<< HEAD +======= + @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") +>>>>>>> acf8794f7... Replace Secured by PreAuthorize <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%> <%_ if (!reactive) { _%> public ResponseEntity<List<UserDTO>> getAllUsers(Pageable pageable) {
14
diff --git a/src/languages/hy.js b/src/languages/hy.js @@ -7,7 +7,7 @@ Category: lisp function(hljs) { var keywords = { - built_in: + 'builtin-name': // keywords '!= % %= & &= * ** **= *= *map ' + '+ += , --build-class-- --import-- -= . / // //= ' +
10
diff --git a/ui/scss/component/_button.scss b/ui/scss/component/_button.scss &:focus:not(:focus-visible) { // Need to repeat these styles because of video.js weirdness - // TODO: verify that this "weirdness" actually exists + // see: https://github.com/lbryio/lbry-desktop/pull/5549#discussion_r580406932 background-repeat: no-repeat; background-position: center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 -2 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-monitor'%3E%3Crect x='2' y='3' width='20' height='14' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='8' y1='21' x2='16' y2='21'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12' y2='21'%3E%3C/line%3E%3C/svg%3E");
14
diff --git a/packages/build/src/core/main.js b/packages/build/src/core/main.js @@ -19,13 +19,13 @@ const { doDryRun } = require('./dry') /** * Netlify Build - * @param {object} options - build configuration options - * @param {string} [options.config] - Netlify config file path - * @param {string} [options.token] - Netlify API token for authentication - * @param {string} [options.context] - Build context - * @param {boolean} [options.dry] - printing commands without executing them - * @param {string} [options.cwd] - Current directory - * @return {object} manifest information. @TODO implement + * @param {object} flags - build configuration CLI flags + * @param {string} [flags.config] - Netlify config file path + * @param {string} [flags.cwd] - Current directory + * @param {string} [flags.token] - Netlify API token for authentication + * @param {string} [flags.siteId] - Netlify Site ID + * @param {string} [flags.context] - Build context + * @param {boolean} [flags.dry] - printing commands without executing them */ const build = async function(flags = {}) { const buildTimer = startTimer()
10
diff --git a/package.json b/package.json ], "dependencies": { "filter-react-dom-props": "0.0.2", - "postinstall-build": "DominikGuzei/postinstall-build#master", "react-modal": "3.1.12" }, "peerDependencies": { "js": "babel source -d lib -s", "build": "cross-env npm run clean && npm run sass && npm run js", "clean": "rimraf ./lib", - "prebuild": "npm run clean", - "prepublishOnly": "npm run build", + "prepare": "npm run clean && npm run build", "sass": "cpx \"./source/themes/**/*\" ./lib/themes", "storybook": "start-storybook -p 6543 -c storybook", - "postinstall": "postinstall-build lib --only-as-dependency --avoid-prune", "watch": "nodemon npm run js && npm run sass" }, "babel": {
14
diff --git a/articles/tutorials/using-auth0-to-secure-an-api.md b/articles/tutorials/using-auth0-to-secure-an-api.md @@ -8,35 +8,10 @@ To secure CLI programs, Auth0 requires [Proof Key for Code Exchange (PKCE) by OA ## Implicit Flow vs. PKCE by OAuth Public Clients -Traditionally, public clients, such as mobile and single page apps and CLIs, used the [implicit flow](/api-auth/grant/implicit) to obtain a token. The implicit flow doesn't require __client authentication__, which is fitting for public clients because there's no easy way to store a `client_secret`. +Traditionally, public clients, such as mobile and single page apps and CLIs, used the [implicit flow](/api-auth/grant/implicit) to obtain a token. The implicit flow doesn't require __client authentication__, which is fitting for public clients (represented in Auth0 as a [native client](/clients) because there's no easy way to store a `client_secret`. Requiring [PKCE](/protocols) increases security by adding a cryptographic challenge in the token exchange. This prevents unauthorized apps from intercepting the response from the authorization server and getting the token. -### Update the Token Endpoint Authentication Method - -Prior to beginning, be sure to set `token_endpoint_auth_method` to `none` so that this exchange works without a client secret. - -```har -{ - "method": "PATCH", - "url": "https://${account.namespace}.auth0.com/api/v2/clients/${account.clientId}", - "httpVersion": "HTTP/1.1", - "cookies": [], - "headers": [{ - "name": "Authorization", - "value": "Bearer MGMT_API_ACCESS_TOKEN" - }], - "queryString": [], - "postData": { - "mimeType": "application/json", - "text": "{ \"token_endpoint_auth_method\": \"none\" }" - }, - "headersSize": -1, - "bodySize": -1, - "comment": "" -} -``` - ## Configuration To secure a CLI program by requiring PKCE, the CLI program needs to:
0
diff --git a/test/testBGZipLineReader.js b/test/testBGZipLineReader.js @@ -4,27 +4,6 @@ import {assert} from 'chai'; suite("testBGZipLineReader", function () { - test("long lines", async function () { - this.timeout(10000); - const config = { - url: 'https://www.dropbox.com/s/04ozbw88ea4wkbz/gcnv_large.bed.gz?dl=0' - }; - - const reader = new BGZipLineReader(config); - const headerLine = await reader.nextLine(); - const columnCount = headerLine.split("\t").length; - - let lineCount = 0; - let line; - while((line = await reader.nextLine())) { - const tokens = line.split("\t"); - assert.equal(tokens.length, columnCount); - lineCount++; - } - assert.equal(lineCount, 2); - - }) - test("long lines - local file", async function () { const config = {
1
diff --git a/components/Form/InputField/InputField.js b/components/Form/InputField/InputField.js @@ -26,8 +26,8 @@ export default class InputField extends Component { label: PropTypes.node, description: PropTypes.node, children: PropTypes.element.isRequired, - error: PropTypes.string, - valueReplay: PropTypes.string, + error: PropTypes.node, + valueReplay: PropTypes.node, required: PropTypes.bool, optionalLabel: PropTypes.string, };
11
diff --git a/src/primitives.js b/src/primitives.js @@ -248,7 +248,7 @@ function transformNormal(mi, v, dst) { /** * Reorients directions by the given matrix.. * @param {number[]|TypedArray} array The array. Assumes value floats per element. - * @param {Matrix} matrix A matrix to multiply by. + * @param {module:twgl/m4.Mat4} matrix A matrix to multiply by. * @return {number[]|TypedArray} the same array that was passed in * @memberOf module:twgl/primitives */ @@ -261,7 +261,7 @@ function reorientDirections(array, matrix) { * Reorients normals by the inverse-transpose of the given * matrix.. * @param {number[]|TypedArray} array The array. Assumes value floats per element. - * @param {Matrix} matrix A matrix to multiply by. + * @param {module:twgl/m4.Mat4} matrix A matrix to multiply by. * @return {number[]|TypedArray} the same array that was passed in * @memberOf module:twgl/primitives */ @@ -274,7 +274,7 @@ function reorientNormals(array, matrix) { * Reorients positions by the given matrix. In other words, it * multiplies each vertex by the given matrix. * @param {number[]|TypedArray} array The array. Assumes value floats per element. - * @param {Matrix} matrix A matrix to multiply by. + * @param {module:twgl/m4.Mat4} matrix A matrix to multiply by. * @return {number[]|TypedArray} the same array that was passed in * @memberOf module:twgl/primitives */ @@ -289,7 +289,7 @@ function reorientPositions(array, matrix) { * 'binorm' or 'tan' as directions, and 'norm' as normals. * * @param {Object.<string, (number[]|TypedArray)>} arrays The vertices to reorient - * @param {Matrix} matrix matrix to reorient by. + * @param {module:twgl/m4.Mat4} matrix matrix to reorient by. * @return {Object.<string, (number[]|TypedArray)>} same arrays that were passed in. * @memberOf module:twgl/primitives */ @@ -408,7 +408,7 @@ function createXYQuadVertices(size, xOffset, yOffset) { * @param {number} [depth] Depth of the plane. Default = 1 * @param {number} [subdivisionsWidth] Number of steps across the plane. Default = 1 * @param {number} [subdivisionsDepth] Number of steps down the plane. Default = 1 - * @param {Matrix4} [matrix] A matrix by which to multiply all the vertices. + * @param {module:twgl/m4.Mat4} [matrix] A matrix by which to multiply all the vertices. * @return {@module:twgl.BufferInfo} The created plane BufferInfo. * @memberOf module:twgl/primitives * @function createPlaneBufferInfo @@ -424,7 +424,7 @@ function createXYQuadVertices(size, xOffset, yOffset) { * @param {number} [depth] Depth of the plane. Default = 1 * @param {number} [subdivisionsWidth] Number of steps across the plane. Default = 1 * @param {number} [subdivisionsDepth] Number of steps down the plane. Default = 1 - * @param {Matrix4} [matrix] A matrix by which to multiply all the vertices. + * @param {module:twgl/m4.Mat4} [matrix] A matrix by which to multiply all the vertices. * @return {Object.<string, WebGLBuffer>} The created plane buffers. * @memberOf module:twgl/primitives * @function createPlaneBuffers @@ -439,7 +439,7 @@ function createXYQuadVertices(size, xOffset, yOffset) { * @param {number} [depth] Depth of the plane. Default = 1 * @param {number} [subdivisionsWidth] Number of steps across the plane. Default = 1 * @param {number} [subdivisionsDepth] Number of steps down the plane. Default = 1 - * @param {Matrix4} [matrix] A matrix by which to multiply all the vertices. + * @param {module:twgl/m4.Mat4} [matrix] A matrix by which to multiply all the vertices. * @return {Object.<string, TypedArray>} The created plane vertices. * @memberOf module:twgl/primitives */
14
diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js @@ -867,6 +867,44 @@ describe('Test select box and lasso per trace:', function() { .then(done); }, LONG_TIMEOUT_INTERVAL); + it('should work on scatterpolar traces', function(done) { + var assertPoints = makeAssertPoints(['r', 'theta']); + var assertSelectedPoints = makeAssertSelectedPoints(); + + var fig = Lib.extendDeep({}, require('@mocks/polar_subplots')); + fig.layout.width = 800; + fig.layout.dragmode = 'select'; + addInvisible(fig); + + Plotly.plot(gd, fig).then(function() { + return _run( + [[150, 150], [350, 250]], + function() { + assertPoints([[1, 0], [2, 45]]); + assertSelectedPoints({0: [0, 1]}); + }, + [200, 200], + BOXEVENTS, 'scatterpolar select' + ); + }) + .then(function() { + return Plotly.relayout(gd, 'dragmode', 'lasso'); + }) + .then(function() { + return _run( + [[150, 150], [350, 150], [350, 250], [150, 250], [150, 150]], + function() { + assertPoints([[1, 0], [2, 45]]); + assertSelectedPoints({0: [0, 1]}); + }, + [200, 200], + LASSOEVENTS, 'scatterpolar lasso' + ); + }) + .catch(fail) + .then(done); + }); + it('should work on choropleth traces', function(done) { var assertPoints = makeAssertPoints(['location', 'z']); var assertSelectedPoints = makeAssertSelectedPoints();
0
diff --git a/lib/shared/addon/azure-ad/service.js b/lib/shared/addon/azure-ad/service.js @@ -5,7 +5,7 @@ import { get, set } from '@ember/object'; const additionalRedirectParams = { response_mode: "query", response_type: "code", - prompt: "consent", + // prompt: "consent", }; export default Service.extend({
2
diff --git a/presave.js b/presave.js @@ -12,11 +12,17 @@ var H5PEditor = H5PEditor || {}; H5PPresave['H5P.InteractiveVideo'] = function (content, finished) { var presave = H5PEditor.Presave; - if (isContentInValid(content)) { + if (isContentInValid()) { throw new presave.exceptions.InvalidContentSemanticsException('Invalid Interactive Video Error') } - var score = content.interactiveVideo.assets.interactions + var librarisToCheck = [].concat(content.interactiveVideo.assets.interactions); + + if( hasSummary() ){ + librarisToCheck.push({action: content.interactiveVideo.summary.task}); + } + + var score = librarisToCheck .map(function (element) { if (element.hasOwnProperty('action')) { return element.action; @@ -46,7 +52,16 @@ H5PPresave['H5P.InteractiveVideo'] = function (content, finished) { * Check if required parameters is present * @return {boolean} */ - function isContentInValid(content) { + function isContentInValid() { return !presave.checkNestedRequirements(content, 'content.interactiveVideo.assets.interactions') || !Array.isArray(content.interactiveVideo.assets.interactions); } + + /** + * Check if required summary is present + * @return {boolean} + */ + function hasSummary() { + return presave.checkNestedRequirements(content, 'content.interactiveVideo.summary.task.library') && presave.checkNestedRequirements(content, 'content.interactiveVideo.summary.task.params'); + } + };
0
diff --git a/embark-ui/src/containers/HomeContainer.js b/embark-ui/src/containers/HomeContainer.js @@ -6,9 +6,8 @@ import {Page} from "tabler-react"; import {commands as commandsAction, listenToProcessLogs, processLogs as processLogsAction} from "../actions"; import DataWrapper from "../components/DataWrapper"; import Processes from '../components/Processes'; -import Versions from '../components/Versions'; import Console from '../components/Console'; -import {getProcesses, getCommands, getVersions, getProcessLogs} from "../reducers/selectors"; +import {getProcesses, getCommands, getProcessLogs} from "../reducers/selectors"; import deepEqual from 'deep-equal'; class HomeContainer extends Component { @@ -38,9 +37,6 @@ class HomeContainer extends Component { <DataWrapper shouldRender={this.props.processes.length > 0 } {...this.props} render={({processes}) => ( <Processes processes={processes} /> )} /> - <DataWrapper shouldRender={this.props.versions.length > 0 } {...this.props} render={({versions}) => ( - <Versions versions={versions} /> - )} /> <DataWrapper shouldRender={this.props.processes.length > 0 } {...this.props} render={({processes, postCommand, processLogs}) => ( <Console postCommand={postCommand} commands={this.props.commands} processes={processes} processLogs={processLogs} /> @@ -52,7 +48,6 @@ class HomeContainer extends Component { HomeContainer.propTypes = { processes: PropTypes.arrayOf(PropTypes.object), - versions: PropTypes.arrayOf(PropTypes.object), postCommand: PropTypes.func, commands: PropTypes.arrayOf(PropTypes.object), error: PropTypes.string, @@ -61,7 +56,6 @@ HomeContainer.propTypes = { function mapStateToProps(state) { return { - versions: getVersions(state), processes: getProcesses(state), commands: getCommands(state), error: state.errorMessage,
2
diff --git a/ui/app/add-token.js b/ui/app/add-token.js @@ -303,7 +303,6 @@ AddTokenScreen.prototype.renderConfirmation = function () { h('div.add-token', [ h('div.add-token__wrapper', [ h('div.add-token__title-container.add-token__confirmation-title', [ - h('div.add-token__title', t('addToken')), h('div.add-token__description', t('likeToAddTokens')), ]), h('div.add-token__content-container.add-token__confirmation-content', [ @@ -339,18 +338,42 @@ AddTokenScreen.prototype.displayTab = function (selectedTab) { this.setState({ displayedTab: selectedTab }) } +AddTokenScreen.prototype.renderTabs = function () { + const { displayedTab, errors } = this.state + + return displayedTab === 'CUSTOM_TOKEN' + ? this.renderCustomForm() + : h('div', [ + h('div.add-token__wrapper', [ + h('div.add-token__content-container', [ + h('div.add-token__info-box', [ + h('div.add-token__info-box__close'), + h('div.add-token__info-box__title', t('whatsThis')), + h('div.add-token__info-box__copy', t('keepTrackTokens')), + h('div.add-token__info-box__copy--blue', t('learnMore')), + ]), + h('div.add-token__input-container', [ + h('input.add-token__input', { + type: 'text', + placeholder: t('searchTokens'), + onChange: e => this.setState({ searchQuery: e.target.value }), + }), + h('div.add-token__search-input-error-message', errors.tokenSelector), + ]), + this.renderTokenList(), + ]), + ]), + ]) +} + AddTokenScreen.prototype.render = function () { const { - errors, isShowingConfirmation, displayedTab, } = this.state const { goHome } = this.props - return isShowingConfirmation - ? this.renderConfirmation() - : ( - h('div.add-token', [ + return h('div.add-token', [ h('div.add-token__header', [ h('div.add-token__header__cancel', { onClick: () => goHome(), @@ -359,7 +382,7 @@ AddTokenScreen.prototype.render = function () { h('span', t('cancel')), ]), h('div.add-token__header__title', t('addTokens')), - h('div.add-token__header__tabs', [ + !isShowingConfirmation && h('div.add-token__header__tabs', [ h('div.add-token__header__tabs__tab', { className: classnames('add-token__header__tabs__tab', { @@ -380,30 +403,11 @@ AddTokenScreen.prototype.render = function () { ]), ]), - displayedTab === 'CUSTOM_TOKEN' - ? this.renderCustomForm() - : h('div', [ - h('div.add-token__wrapper', [ - h('div.add-token__content-container', [ - h('div.add-token__info-box', [ - h('div.add-token__info-box__close'), - h('div.add-token__info-box__title', t('whatsThis')), - h('div.add-token__info-box__copy', t('keepTrackTokens')), - h('div.add-token__info-box__copy--blue', t('learnMore')), - ]), - h('div.add-token__input-container', [ - h('input.add-token__input', { - type: 'text', - placeholder: t('searchTokens'), - onChange: e => this.setState({ searchQuery: e.target.value }), - }), - h('div.add-token__search-input-error-message', errors.tokenSelector), - ]), - this.renderTokenList(), - ]), - ]), - ]), - h('div.add-token__buttons', [ + isShowingConfirmation + ? this.renderConfirmation() + : this.renderTabs(), + + !isShowingConfirmation && h('div.add-token__buttons', [ h('button.btn-cancel.add-token__button--cancel', { onClick: goHome, }, t('cancel')), @@ -412,5 +416,4 @@ AddTokenScreen.prototype.render = function () { }, t('next')), ]), ]) - ) }
4
diff --git a/src/ui.bar.js b/src/ui.bar.js @@ -16,25 +16,16 @@ var _ = Mavo.UI.Bar = $.Class({ this.noResize = true; } - this.order = this.mavo.element.getAttribute("mv-bar") || this.element.getAttribute("mv-bar"); + this.controls = _.getControls(this.mavo.element.getAttribute("mv-bar") || this.element.getAttribute("mv-bar")); - if (this.order) { - this.order = this.order == "none"? [] : this.order.split(/\s+/); - } - else { - this.order = Object.keys(_.controls); - } - - this.order = this.order.filter(id => _.controls[id]); - - if (this.order.length) { + if (this.controls.length) { // Measure height of 1 row this.targetHeight = this.element.offsetHeight; } this.element.innerHTML = ""; - for (let id of this.order) { + for (let id of this.controls) { let o = _.controls[id]; if (o.create) { @@ -78,7 +69,7 @@ var _ = Mavo.UI.Bar = $.Class({ } } - if (this.order.length && !this.noResize) { + if (this.controls.length && !this.noResize) { this.resize(); if (self.ResizeObserver) { @@ -150,6 +141,34 @@ var _ = Mavo.UI.Bar = $.Class({ }, static: { + getControls: function(attribute) { + if (attribute) { + var ids = attribute == "none"? [] : attribute.split(/\s+/); + + // Is there ANY non-negative key? + var excludeOnly = !/(\s+|^)(?!no\-)[a-z]+(\s+|$)/.test(attribute); + + var keys = excludeOnly? Object.keys(_.controls) : []; + + for (var key of ids) { + var negative = /^\s*no\-/i.test(key); + var id = Mavo.match(key, /([a-z]+)\s*$/i, 1); + + if (negative) { + Mavo.delete(keys, id); + } + else if (id in _.controls) { + keys.push(id); + } + } + } + else { + return Object.keys(_.controls); + } + + return keys; + }, + controls: { status: { create: function() {
11
diff --git a/src/component/child/index.js b/src/component/child/index.js @@ -5,7 +5,7 @@ import * as postRobot from 'post-robot/src'; import { SyncPromise as Promise } from 'sync-browser-mocks/src/promise'; import { BaseComponent } from '../base'; import { getParentComponentWindow, getComponentMeta, getParentDomain, getParentRenderWindow, isXComponentWindow } from '../window'; -import { extend, onCloseWindow, replaceObject, get, onDimensionsChange, trackDimensions, dimensionsMatchViewport, cycle, getDomain } from '../../lib'; +import { extend, onCloseWindow, replaceObject, get, onDimensionsChange, trackDimensions, dimensionsMatchViewport, cycle, getDomain, memoized } from '../../lib'; import { POST_MESSAGE, CONTEXT_TYPES, CLOSE_REASONS, INITIAL_PROPS } from '../../constants'; import { normalizeChildProps } from './props'; @@ -280,12 +280,17 @@ export class ChildComponent extends BaseComponent { }); } - autoResize() { + enableAutoResize({ width = true, height = true } = {}) { + this.autoResize = { width, height }; + this.watchForResize(); + } + + getAutoResize() { let width = false; let height = false; - let autoResize = this.component.autoResize; + let autoResize = this.autoResize || this.component.autoResize; if (typeof autoResize === 'object') { width = Boolean(autoResize.width); @@ -298,9 +303,10 @@ export class ChildComponent extends BaseComponent { return { width, height }; } + @memoized watchForResize() { - let { width, height } = this.autoResize(); + let { width, height } = this.getAutoResize(); if (!width && !height) { return;
11
diff --git a/spark/components/promo/vanilla/promo.stories.js b/spark/components/promo/vanilla/promo.stories.js @@ -76,7 +76,7 @@ export const withImage = () => (` <a href="#" class="sprk-o-Stack__item sprk-o-Stack__item--half@s "> <img class="sprk-c-Promo__image" - src="https://sparkdesignsystem.com/assets/toolkit/images/blue-house.jpg" + src="https://spark-assets.netlify.com/blue-house.jpg" alt="Spark placeholder image." /> </a> @@ -139,7 +139,7 @@ export const withReversedImage = () => (` <a href="#" class="sprk-o-Stack__item sprk-o-Stack__item--half@s"> <img class="sprk-c-Promo__image" - src="https://sparkdesignsystem.com/assets/toolkit/images/blue-house.jpg" + src="https://spark-assets.netlify.com/blue-house.jpg" alt="Spark placeholder image." /> </a>
3
diff --git a/articles/appliance/webtask/dedicated-domains.md b/articles/appliance/webtask/dedicated-domains.md @@ -9,6 +9,10 @@ Some extensions, such as the [Authorization Extension](/extensions/authorization Beginning with PSaaS Appliance version `13451`, you may now configure Webtask on a dedicated domain. This mirrors how the Auth0 Public Cloud handles Webtask domains and enables you to use extensions with ease in multi-tenant environments. +::: note +If you do not use Webtask or [Web Extensions](/appliance/extensions), you do not need to implement Webtask dedicated domains. +::: + To configure Webtask on a dedicated domain, you will need to set up a DNS zone to host the name entries for *each* tenant. As with the authentication domain, the Webtask dedicated domain requires a valid certificate issued by a public certificate authority (CA). If you're not certain how many tenants you'll be hosting, we recommend using a wildcard certificate such as `*.your-webtask-dedicated-domain`. This will give to each container a URL of the form: @@ -17,25 +21,45 @@ This will give to each container a URL of the form: tenant-name.webtask-dedicated-domain/container-name ``` +```panel PSaaS Appliance Hosted Using the Auth0 Dedicated Service +If your PSaaS Appliance is hosted in the Auth0 Dedicated Service, we recommend setting up a DNS zone and issuing certificates using the following recommended nomenclature: + +For Development environments: `*.wt.<customer>-dev.auth0.com` +For Production environments: `*.wt.<customer>.auth0.com` +``` + For example, let's say that your tenant name is **acme** and your Webtask dedicated domain is **wt.example.com**. If you create a container named **hello**, your Webtask URL will be **acme.wt.example.com/hello**. +Note that you can still use the original Webtask URL (for example, `webtask.example.com/api/run/acme/hello`). The primary difference is that, during runtime, the Webtask will remove any headers bearing cookies from the request. + ## Requirements For each environment (such as Development, Testing, or Production), you will need: -* A certificate for your Webtask's dedicated domain +* A certificate for your Webtask dedicated domain * A DNS zone for each domain to manage the name records of your tenants ### Sample Architecture To clarify the requirements, let's look at a sample setup. -What You Have: +The following are applicable to your environment as it current exists: * Your Production environment is accessible via **example.com** * Your primary Auth0 tenant is **identity.example.com** * Your current certificate is **identity.example.com** (or similar) +You plan to implement the following change: + +* You want a Webtask dedicated domain configured to be **wt.example.com** -* You want your Webtask dedicated domain to be **wt.example.com** -* \ No newline at end of file +To implement your change, you'll need: + +* A DNS zone for **wt.example.com* +* A certificate with the names of all your tenants *or* a wildcard certificate for `*.wt.example.com` + +Once complete, you'll be able to use the following for all containers under your primary tenant: + +```text +identity.wt.example.com/your-container-name +``` \ No newline at end of file
0
diff --git a/views/tabarea.es b/views/tabarea.es @@ -119,6 +119,7 @@ export class ControlledTabArea extends PureComponent { openedWindow: {}, } windowRefs = {} + resizeContainer = React.createRef() dispatchTabChangeEvent = (tabInfo, autoSwitch=false) => dispatch({ type: '@@TabSwitch', @@ -424,7 +425,7 @@ export class ControlledTabArea extends PureComponent { <div className={classNames('poi-tabs-container', { 'poi-tabs-container-doubletabbed': this.props.doubleTabbed, 'poi-tabs-container-singletabbed': !this.props.doubleTabbed, - })} ref={r => this.setState({ resizeContainer: r })}> + })} ref={this.resizeContainer}> <ResizableArea className={classNames({ 'width-resize': this.props.doubleTabbed && this.props.editable })} minimumWidth={{ px: 0, percent: this.props.doubleTabbed ? 10 : 100 }} @@ -432,7 +433,7 @@ export class ControlledTabArea extends PureComponent { initWidth={this.props.mainPanelWidth} minimumHeight={{ px: 0, percent: 100 }} initHeight={{ px: 0, percent: 100 }} - parentContainer={this.state.resizeContainer} + parentContainer={this.resizeContainer.current} disable={{ width: !this.props.doubleTabbed || !this.props.editable, height: true }} onResized={({ width }) => { config.set('poi.tabarea.mainpanelwidth', width)
4
diff --git a/packages/gallery/src/components/helpers/virtualization.ts b/packages/gallery/src/components/helpers/virtualization.ts @@ -47,33 +47,41 @@ export function getItemsInViewportOrMarginByActiveGroup({ ? backwardItemScrollMargin : backwardItemMargin; - let accoumilatedRightMargin = 0; - let accoumilatedLeftMargin = 0; - - function shouldRenderGroup(group) { + const activeGroupIndex = groups.findIndex((group) => { const { items } = group; const first = items[0]; const last = items[items.length - 1]; const firstIndex = first.idx ?? first.fullscreenIdx; const lastIndex = last.idx ?? last.fullscreenIdx; - const groupPrecOfScreen = group[unit] / size; - if (firstIndex > activeIndex) { + return firstIndex <= activeIndex && lastIndex >= activeIndex; + }); + + const activeGroup = groups[activeGroupIndex]; + const activeGroupPrecOfScreen = activeGroup[unit] / size; + let accoumilatedRightMargin = activeGroupPrecOfScreen; + let accoumilatedLeftMargin = activeGroupPrecOfScreen; + const groupsToRender: any[] = [activeGroup]; + for ( + let index = 1; + accoumilatedRightMargin < rightRenderBuffer || + accoumilatedLeftMargin < leftRenderBuffer; + index++ + ) { + const groupToRight = groups[activeGroupIndex + index]; + const groupToLeft = groups[activeGroupIndex - index]; + if (groupToRight && accoumilatedRightMargin < rightRenderBuffer) { + const groupPrecOfScreen = groupToRight[unit] / size; accoumilatedRightMargin += groupPrecOfScreen; - if (accoumilatedRightMargin > rightRenderBuffer) { - return false; + groupsToRender.push(groupToRight); } - } - if (lastIndex < activeIndex) { + if (groupToLeft && accoumilatedLeftMargin < leftRenderBuffer) { + const groupPrecOfScreen = groupToLeft[unit] / size; accoumilatedLeftMargin += groupPrecOfScreen; - if (accoumilatedLeftMargin > leftRenderBuffer) { - return false; - } + groupsToRender.push(groupToLeft); } - return true; } return groups.map((group) => { - const shouldRender = shouldRenderGroup(group); - return { group, shouldRender }; + return { group, shouldRender: groupsToRender.includes(group) }; }); }
3
diff --git a/README.md b/README.md @@ -8,6 +8,8 @@ targeted at developers and map designers. - :link: Design your maps online at **http://maputnik.com/editor/** (all in local storage) - :link: Use the [Maputnik CLI](https://github.com/maputnik/editor/wiki/Maputnik-CLI) for local style development +Mapbox has built one of the best and most amazing OSS ecosystems. A key component to ensure its longevity and independance is an OSS map designer. + ## Documentation The documentation can be found in the [Wiki](https://github.com/maputnik/editor/wiki). You are welcome to collaborate! @@ -17,8 +19,6 @@ The documentation can be found in the [Wiki](https://github.com/maputnik/editor/ [![Design Map from Scratch](https://j.gifs.com/g5XMgl.gif)](https://youtu.be/XoDh0gEnBQo) -Mapbox has built one of the best and most amazing OSS ecosystems. A key component to ensure its longevity and independance is an OSS map designer. - ## Develop Maputnik is written in ES6 and is using [React](https://github.com/facebook/react) and [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/api/).
5
diff --git a/reports/reportSlack.js b/reports/reportSlack.js @@ -56,11 +56,11 @@ export default class ReportSlack extends Report { method: "POST", resposnseType: "json", data: { - text: content.message, attachments: [ { color: this.params.colors[message], - title: message + title: message, + text: content.message } ] }
7
diff --git a/packages/webpack-plugin/lib/json-compiler/index.js b/packages/webpack-plugin/lib/json-compiler/index.js @@ -241,7 +241,7 @@ module.exports = function (raw) { async.waterfall([ (callback) => { if (srcRoot) { - callback(null, path.join(context, srcRoot, page) + '.mpx') + callback(null, path.join(context, srcRoot, page)) } else { this.resolve(context, page, (err, result) => { if (err) return callback(err)
1
diff --git a/.travis.yml b/.travis.yml @@ -14,15 +14,15 @@ script: - npm test # Make sure it still builds successfully - the build isn't actually used yet: - npm run build -# before_deploy: -# - node ./travis/bumpversion.js -# deploy: -# provider: npm -# # Do not throw away the updated package.json we generated in `before_deploy`: -# skip_cleanup: true -# email: '$NPM_EMAIL' -# api_key: '$NPM_TOKEN' -# # Note: do not deploy on pull request, because $TRAVIS_BRANCH will be the target branch. -# tag: '$TRAVIS_BRANCH' -# on: -# all_branches: true +before_deploy: + - node ./travis/bumpversion.js +deploy: + provider: npm + # Do not throw away the updated package.json we generated in `before_deploy`: + skip_cleanup: true + email: '$NPM_EMAIL' + api_key: '$NPM_TOKEN' + # Note: do not deploy on pull request, because $TRAVIS_BRANCH will be the target branch. + tag: '$TRAVIS_BRANCH' + on: + all_branches: true
13
diff --git a/sources/us/wa/clark.json b/sources/us/wa/clark.json "state": "wa", "county": "Clark" }, - "data": "https://data.openaddresses.io/cache/uploads/nvkelso/2806bc/clark_county_vancouver_wa_tax_parcels.zip", - "protocol": "http", - "compression": "zip", + "data": "https://services2.arcgis.com/ylxwjFBdCPBzP16d/arcgis/rest/services/SitusAddress/FeatureServer/0", + "protocol": "ESRI", "conform": { - "format": "shapefile-polygon", + "format": "geojson", "number": "HSNBR", "street": [ "STDIR",
4
diff --git a/tests/__snapshots__/story-based-tests.snapshot-test.js.snap b/tests/__snapshots__/story-based-tests.snapshot-test.js.snap @@ -24599,7 +24599,7 @@ exports[`DOM snapshots SLDSInput Docs site Error 1`] = ` className="slds-button__icon" > <use - xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#warning" + xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#error" /> </svg> <span
3
diff --git a/constants.js b/constants.js @@ -97,5 +97,4 @@ export const defaultDioramaSize = 512; export const defaultAvatarUrl = './avatars/scillia_drophunter_v15_vian.vrm'; // export const defaultAvatarUrl = './avatars/scillia_drophunter_v25_gloria_vian.vrm'; -// export const defaultAvatarUrl = './avatars/scilly_drophunter_v27_Guilty.vrm'; // export const defaultAvatarUrl = './avatars/ann.vrm';
2
diff --git a/token-metadata/0x0bb217E40F8a5Cb79Adf04E1aAb60E5abd0dfC1e/metadata.json b/token-metadata/0x0bb217E40F8a5Cb79Adf04E1aAb60E5abd0dfC1e/metadata.json "symbol": "SWFTC", "address": "0x0bb217E40F8a5Cb79Adf04E1aAb60E5abd0dfC1e", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/grails-app/controllers/streama/FileController.groovy b/grails-app/controllers/streama/FileController.groovy @@ -226,7 +226,12 @@ class FileController { } def localPath = Paths.get(uploadService.localPath) - def dirPath = localPath.resolve( uploadService.localPath + path).toAbsolutePath() + def dirPath + if(path.contains(uploadService.localPath)){ + dirPath = localPath.resolve(path).toAbsolutePath() + }else{ + dirPath = localPath.resolve( uploadService.localPath + path).toAbsolutePath() + } if (!dirPath.startsWith(localPath)) { result.code = "FileNotInLocalPath"
1
diff --git a/assets/js/app/dashboard/02_dashboard-controller.js b/assets/js/app/dashboard/02_dashboard-controller.js $scope.loading = false hasInitiallyLoaded = true if($scope.status && $scope.info) { + $scope.error = false drawCharts(); errorCount = 0; nextLoad();
12
diff --git a/tests/e2e/specs/modules/tagmanager/setup.test.js b/tests/e2e/specs/modules/tagmanager/setup.test.js @@ -37,6 +37,7 @@ import { setupSiteKit, useRequestInterception, } from '../../../utils'; +import liveContainerVersionFixture from '../../../../../assets/js/modules/tagmanager/datastore/__fixtures__/live-container-version.json'; async function proceedToTagManagerSetup() { await visitAdminPage( 'admin.php', 'page=googlesitekit-settings' ); @@ -59,8 +60,8 @@ describe( 'Tag Manager module setup', () => { status: 200, } ); } else if ( request.url().match( 'modules/tagmanager/data/live-container-version' ) ) { - // A 404 is returned for containers without a published version. - request.respond( { status: 404, body: JSON.stringify( { code: 404 } ) } ); + // Return a live container version without GA. + request.respond( { status: 200, body: JSON.stringify( liveContainerVersionFixture ) } ); } else if ( request.url().match( /^https:\/\/www\.googletagmanager\.com\/(gtm\.js|amp\.json)/ ) ) { request.respond( { status: 200 } ); } else {
14
diff --git a/js/node/pipelinemodule.js b/js/node/pipelinemodule.js @@ -194,7 +194,6 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { //a variable is generated by a job if the symbolic reference to that variable first appears in that job, e.g. if you have a variable 'out1', if it is first referenced by a job 'job1' then out1 is considered a variable generated by job1 let variablesGeneratedByJob = []; let variablesWithDependencies = []; - //let variablesNamingOrder = []; let optionsArray = []; //construct array of variables from array of options (if applicable) @@ -229,7 +228,6 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { } if (pipelineOptions.variables[j].name === variableName) { - //let variable = pipelineOptions.variables[j]; //a variable with its files specified should be added to the dictionary of expanded variables @@ -257,7 +255,6 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { //note that a variable that does not contain one name will contain exactly the same number of names as any other variable that does not specify one name, e.g. %output1% will always have the same number of names as %output2% let numOutputs = 1, listMatches = {}; for (let key of variablesReferencedByCurrentJob) { - //console.log('expanded variables', expandedVariables); //options with the list designator (#{name}#) should be counted as one input, so we should ignore them here let listMatchString = new RegExp('#(' + key + ')#', 'g'); let listMatch = listMatchString.exec(job.options); @@ -269,8 +266,12 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { } - for (let variable of variablesWithDependencies) { + //variables with lower indices precede variables with higher indexes in the job hierarchy, and may therefore be variables that determine how the higher-indexed jobs are generated. + //by this logic, we want to make sure we process the lower indexed jobs first (sort in ascending order by index) to ensure that higher-indexed jobs have the relevant information on how they are generated + variablesWithDependencies.sort( (a,b) => { return a.index - b.index; }); + console.log('variables with dependencies for job', job.name, variablesWithDependencies); + for (let variable of variablesWithDependencies) { //console.log('\n\n-----------------------------\n'); //if names have already been generated then the output is produced by a node upstream, so don't overwrite the names if (expandedVariables[variable.name].length === 0) { @@ -293,8 +294,9 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { let outname= variableNaming[variable.name]+variableSuffix[variable.name]; outname=outname.trim().replace(/ /g,'-'); - console.log('preemptive outname', outname); + console.log('inputs used by job', inputsUsedByJob); inputsUsedByJob.forEach( (input) => { + if (listMatches[input.name]) { //mark entry as a list input.isList = true; @@ -311,8 +313,6 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { } else { let marker=`%${input.name}%`; let ind=outname.indexOf(marker); - //console.log('Naming=',variable.name,'list=',variableNaming[variable.name], `looking for %${input.name}% ind=${ind}`); - //console.log('expandedVariables', expandedVariables[input.name]); if (ind>=0) { // console.log('Found ',ind); let fn=(expandedVariables[input.name].length > 1 ? expandedVariables[input.name][i] : expandedVariables[input.name][0]); @@ -405,7 +405,7 @@ let makePipeline = function(pipelineOptions,odir='',debug=false) { } - console.log('command', command, subcommand, commandArray); + //console.log('command', command, subcommand, commandArray); formattedJobOutput.command = command + ' ' + subcommand + ' ' + commandArray.join(' ')+paramfile; allJobOutputs.push(formattedJobOutput); } @@ -618,8 +618,10 @@ class PipelineModule extends BaseModule { } let p=Promise.resolve('Not creating'); - if (vals.odir!=='none') + if (vals.odir!=='none') { + vals.odir = path.resolve(path.normalize(vals.odir)); p=bis_genericio.makeDirectory(vals.odir); + } p.then( (m) => { if (vals.odir==='none') { console.log('---- Not creating dummy directory none');
1
diff --git a/sparta.go b/sparta.go @@ -8,6 +8,8 @@ import ( "fmt" "math/rand" "net/http" + "os" + "path/filepath" "reflect" "regexp" "runtime" @@ -1062,6 +1064,27 @@ func validateSpartaPreconditions(lambdaAWSInfos []*LambdaAWSInfo, if len(errorText) != 0 { return errors.New(strings.Join(errorText[:], "\n")) } + // Check that the sysinfo package is installed. This + // may not be installed on OSX, since it's excluded + // via a build tag + goPath := userGoPath() + // Check that the file exists + sysinfoPath := filepath.Join(goPath, "src", + "github.com", + "zcalusic", + "sysinfo", + "sysinfo.go") + logger.WithFields(logrus.Fields{ + "sysinfoPath": sysinfoPath, + }).Debug("Checking installation status of github.com/zcalusic/sysinfo") + _, sysinfoErr := os.Stat(sysinfoPath) + if os.IsNotExist(sysinfoErr) { + logger.WithFields(logrus.Fields{ + "sysinfoMarkerPath": sysinfoPath, + "os": runtime.GOOS, + }).Error("The `github.com/zcalusic/sysinfo` package is not installed") + return errors.New("Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms. When you `go get` the package, you may see errors as in `undefined: syscall.Utsname`. These are expected and can be ignored") + } return nil }
0
diff --git a/Apps/Sandcastle/gallery/development/Multiple Shadows.html b/Apps/Sandcastle/gallery/development/Multiple Shadows.html shadowMap.enabled = true; var model = scene.primitives.add(Cesium.Model.fromGltf({ - url : '../../SampleData/models/ShadowTester/Shadow_Tester_Point.gltf', + url : '../../SampleData/models/ShadowTester/Shadow_Tester_Point.glb', modelMatrix : Cesium.Transforms.headingPitchRollToFixedFrame(center, new Cesium.HeadingPitchRoll(heading, 0.0, 0.0)) }));
3
diff --git a/app/models/carto/dbdirect_ip.rb b/app/models/carto/dbdirect_ip.rb @@ -12,7 +12,6 @@ module Carto MAX_IP_MASK_HOST_BITS = 8 def validate_ips - support_legacy_ips_format # Check type unless ips.nil? || ips.kind_of?(Array) || ips.any? { |ip| !is.kind_of?(String) } errors.add(:ips, "IPs must be either be nil or an array of strings ") @@ -20,6 +19,7 @@ module Carto end ok = true if ips.present? + # Validate each IP ips.each do |ip| error = IpChecker.validate( ip, @@ -37,11 +37,5 @@ module Carto end ok end - - def support_legacy_ips_format - if ips.present? && ips.kind_of?(String) - self.ips = ips.split(',') - end - end end end
2
diff --git a/src/web/HTMLIngredient.mjs b/src/web/HTMLIngredient.mjs @@ -293,6 +293,16 @@ class HTMLIngredient { this.manager.addDynamicListener(".arg-selector", "change", this.argSelectorChange, this); break; + case "label": + html += `<div class="form-group"> + <label>${this.name}</label> + <input type="hidden" + class="form-control arg" + id="${this.id}" + arg-name="${this.name}" + value=""> + </div>`; + break; default: break; }
0
diff --git a/features/e2e/resource_management.feature b/features/e2e/resource_management.feature @@ -6,8 +6,8 @@ Feature: Resource Management And I log in as test_user Then I am redirected to domain path "identity/home" + @admin Scenario: The Resource Management page is reachable When I visit project path "resource-management" Then the page status code is successful And I see "Manage Project Resources" -
5
diff --git a/src/plots/cartesian/dragbox.js b/src/plots/cartesian/dragbox.js @@ -989,7 +989,7 @@ function zoomAxRanges(axList, r0Fraction, r1Fraction, updates, linkedAxes) { } // zoom linked axes about their centers - if(linkedAxes.length) { + if(linkedAxes && linkedAxes.length) { var linkedR0Fraction = (r0Fraction + (1 - r1Fraction)) / 2; zoomAxRanges(linkedAxes, linkedR0Fraction, 1 - linkedR0Fraction, updates, [], []); }
0
diff --git a/token-metadata/0xB020eD54651831878E5C967e0953A900786178f9/metadata.json b/token-metadata/0xB020eD54651831878E5C967e0953A900786178f9/metadata.json "symbol": "BAZT", "address": "0xB020eD54651831878E5C967e0953A900786178f9", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/test/unit/specs/store/wallet.spec.js b/test/unit/specs/store/wallet.spec.js @@ -142,7 +142,7 @@ describe(`Module: Wallet`, () => { it(`should load denoms`, async () => { const commit = jest.fn() - await actions.loadDenoms({ commit, rootState: mockRootState }) + await actions.loadDenoms({ state, commit, rootState: mockRootState }) expect(commit).toHaveBeenCalledWith(`setDenoms`, [ `mycoin`, `fermion`,
1
diff --git a/packages/app/test/integration/service/v5.non-public-page.test.ts b/packages/app/test/integration/service/v5.non-public-page.test.ts @@ -321,9 +321,39 @@ describe('PageService page operations with non-public pages', () => { // }); }); describe('Delete', () => { - // test('', async() => { - // // write test code - // }); + + const deletePage = async(page, user, options, isRecursively) => { + const mockedDeleteRecursivelyMainOperation = jest.spyOn(crowi.pageService, 'deleteRecursivelyMainOperation').mockReturnValue(null); + const mockedCreateAndSendNotifications = jest.spyOn(crowi.pageService, 'createAndSendNotifications').mockReturnValue(null); + + const deletedPage = await crowi.pageService.deletePage(page, user, options, isRecursively); + + const argsForDeleteRecursivelyMainOperation = mockedDeleteRecursivelyMainOperation.mock.calls[0]; + + mockedDeleteRecursivelyMainOperation.mockRestore(); + mockedCreateAndSendNotifications.mockRestore(); + + if (isRecursively) { + await crowi.pageService.deleteRecursivelyMainOperation(...argsForDeleteRecursivelyMainOperation); + } + + return deletedPage; + }; + describe('Delete single page with grant RESTRICTED', () => { + test('should be able to delete', async() => {}); + }); + describe('Delete multiple pages with grant RESTRICTED', () => { + test('should be able to delete', async() => {}); + }); + describe('Delete single page with grant USER_GROUP', () => { + test('should NOT be able to delete by a user who does NOT belong to the group', async() => {}); + test('should be able to delete by a user who belongs to the group', async() => {}); + }); + describe('Delete multiple pages with grant USER_GROUP', () => { + test('should NOT be able to delete by a user who does NOT belong to the group', async() => {}); + test('should be able to delete by a user who belongs to the group', async() => {}); + }); + }); describe('Delete completely', () => { // test('', async() => {
6
diff --git a/src/widgets/histogram/chart.js b/src/widgets/histogram/chart.js @@ -946,16 +946,20 @@ module.exports = cdb.core.View.extend({ var loExtent = extent[0]; var hiExtent = extent[1]; - var leftX = this.xScale(loExtent) - this.options.handleWidth / 2; - var rightX = this.xScale(hiExtent) - this.options.handleWidth / 2; + this._moveHandle(loExtent, 'left'); + this._moveHandle(hiExtent, 'right'); - this.chart.select('.CDB-Chart-handle-left') - .attr('transform', 'translate(' + leftX + ', 0)'); + this._setAxisTipAccordingToBins(); + }, - this.chart.select('.CDB-Chart-handle-right') - .attr('transform', 'translate(' + rightX + ', 0)'); + _moveHandle: function (position, selector) { + var handle = this.chart.select('.CDB-Chart-handle-' + selector); + var x = this.xScale(position) - this.options.handleWidth / 2; + var display = (position >= 0 && position <= 100) ? 'inline' : 'none'; - this._setAxisTipAccordingToBins(); + handle + .style('display', display) + .attr('transform', 'translate(' + x + ', 0)'); }, _generateAxisTip: function (className) {
11
diff --git a/src/components/calendar/Calendar.js b/src/components/calendar/Calendar.js @@ -2585,9 +2585,9 @@ export class Calendar extends Component { } renderDayNames(weekDays) { - const dayNames = weekDays.map(weekDay => + const dayNames = weekDays.map( (weekDay, index) => ( - <th key={weekDay} scope="col"> + <th key={index} scope="col"> <span>{weekDay}</span> </th> )
7
diff --git a/src/broker/saslAuthenticator/oauthBearer.js b/src/broker/saslAuthenticator/oauthBearer.js @@ -10,15 +10,15 @@ module.exports = class OAuthBearerAuthenticator { async authenticate() { const { sasl } = this.connection - if (sasl.oauthBearerResolver == null) { + if (sasl.oauthBearerProvider == null) { throw new KafkaJSSASLAuthenticationError( - 'SASL OAUTHBEARER: Missing OAuth Bearer Token resolver' + 'SASL OAUTHBEARER: Missing OAuth Bearer Token provider' ) } - const { oauthBearerResolver } = sasl + const { oauthBearerProvider } = sasl - const oauthBearerToken = await oauthBearerResolver() + const oauthBearerToken = await oauthBearerProvider() if (oauthBearerToken.value == null) { throw new KafkaJSSASLAuthenticationError('SASL OAUTHBEARER: Invalid OAuth Bearer Token')
10
diff --git a/bin/oref0-setup.sh b/bin/oref0-setup.sh @@ -992,6 +992,7 @@ if prompt_yn "" N; then cd $HOME/src/Logger sudo apt-get install -y bluez-tools sudo npm run global-install + cgm-transmitter $DEXCOM_CGM_TX_ID touch /tmp/reboot-required fi
12
diff --git a/api/src/utils/upsert.js b/api/src/utils/upsert.js @@ -27,7 +27,9 @@ export async function upsertManyPosts(publicationID, newPosts, publicationType) // step 1: get the existing objects in mongodb let fingerprints = newPosts.map(p=>p.fingerprint) - let existingPosts = await schema.find({fingerprint: {$in: fingerprints}}).lean() + let lookup = {fingerprint: {$in: fingerprints}} + lookup[schemaField] = publicationID + let existingPosts = await schema.find().lean() let existingPostsMap = {} for (let p of existingPosts) { existingPostsMap[p.fingerprint] = p
4
diff --git a/src/geometry/Path.js b/src/geometry/Path.js @@ -36,7 +36,15 @@ class Path extends Geometry { * @param {Object} [options=null] animation options * @param {Number} [options.duration=1000] duration * @param {String} [options.easing=out] animation easing - * @param {Function} [cb=null] callback function in animation + * @param {Function} [cb=null] callback function in animation, function parameters: frame, currentCoord + * @example + * line.animateShow({ + * duration : 2000, + * easing : linear + * }, function (frame, currentCoord) { + * //frame is the animation frame + * //currentCoord is current coordinate of animation + * }); * @return {LineString} this */ animateShow(options = {}, cb) {
3
diff --git a/src/components/link.js b/src/components/link.js @@ -7,8 +7,12 @@ class Link extends IdyllComponent { } render() { + let props = this.props; + if (props.url) { + props.href = props.url; + } return ( - <a {...this.props}> + <a {...props}> {this.props.text} </a> );
3
diff --git a/package.json b/package.json "abaculus": "cartodb/abaculus#2.0.3-cdb1", "canvas": "cartodb/node-canvas#1.6.2-cdb2", "carto": "cartodb/carto#0.15.1-cdb3", - "cartodb-psql": "0.10.1", + "cartodb-psql": "^0.10.1", "debug": "~2.2.0", "dot": "~1.0.2", "grainstore": "~1.6.0",
4
diff --git a/bin/components/operation.js b/bin/components/operation.js @@ -70,7 +70,7 @@ Operation.buildParameters = function buildParameters(enforcer, exception, defini definition.parameters.forEach((definition, index) => { const child = paramException.at(index); const parameter = new Parameter(enforcer, child, definition, map); - if (!child.hasException) { + if (!child.hasException || (parameter.in && parameter.name)) { const data = result[parameter.in]; data.empty = false; data.map[parameter.name] = parameter;
2
diff --git a/src/userscript.ts b/src/userscript.ts @@ -100886,11 +100886,13 @@ var $$IMU_EXPORT$$; // thanks to DevWannabe-dot on github: https://github.com/qsniyg/maxurl/issues/906 // https://static.metacritic.com/images/products/music/9/679a9b797240b0b1772b8d8b5aeea862-98.jpg // https://static.metacritic.com/images/products/music/9/679a9b797240b0b1772b8d8b5aeea862.jpg -- 840x840 + // https://static.metacritic.com/images/products/movies/7/c3bc8e9e12d20563ee08f95b3baced93-98.jpg + // https://static.metacritic.com/images/products/movies/7/c3bc8e9e12d20563ee08f95b3baced93.jpg -- 800x1185 // https://static.metacritic.com/images/avatars/000kai_1570835677_sml.jpg -- 30x30 // https://static.metacritic.com/images/avatars/000kai_1570835677_med.jpg -- 90x90 // https://static.metacritic.com/images/avatars/000kai_1570835677_lrg.jpg -- 300x300 return src - .replace(/(\/images\/+products\/+music\/+[0-9a-f]\/+[0-9a-f]{20,})-[0-9]+\./, "$1.") + .replace(/(\/images\/+products\/+.+?\/+[0-9a-f]\/+[0-9a-f]{20,})-[0-9]+\./, "$1.") .replace(/(\/images\/+avatars\/+[^/]+)_(?:sml|med)\./, "$1_lrg."); }
7
diff --git a/deployment/kubernetes/charts/origin/templates/notifications.ingress.yaml b/deployment/kubernetes/charts/origin/templates/notifications.ingress.yaml @@ -18,7 +18,7 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/enable-cors: "true" nginx.ingress.kubernetes.io/cors-allow-methods: "GET" - nginx.ingress.kubernetes.io/cors-allow-origin: "https://{{ template "dapp.host" . }}" + nginx.ingress.kubernetes.io/cors-allow-origin: "*" nginx.ingress.kubernetes.io/limit-rps: "5" spec: tls:
11
diff --git a/src/plugins/dialog/video.js b/src/plugins/dialog/video.js @@ -540,7 +540,7 @@ export default { url = 'https://player.vimeo.com/video/' + url.slice(url.lastIndexOf('/') + 1); } - this.plugins.video.create_video.call(this, this.plugins.video[(!/youtu\.?be/.test(url) && !/vimeo\.com/.test(url) ? "createVideoTag" : "createIframeTag")].call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal); + this.plugins.video.create_video.call(this, this.plugins.video[(!/embed|\/e\/|\.php|\.html?/.test(url) && !/vimeo\.com/.test(url) ? "createVideoTag" : "createIframeTag")].call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal); } catch (error) { throw Error('[SUNEDITOR.video.upload.fail] cause : "' + error.message + '"'); } finally {
7
diff --git a/common/lib/client/paginatedresource.ts b/common/lib/client/paginatedresource.ts @@ -102,7 +102,7 @@ class PaginatedResource { items = this.bodyHandler(body, headers, unpacked); } catch(e) { /* If we got an error, the failure to parse the body is almost certainly - * due to that, so cb with that in preference to the parse error */ + * due to that, so callback with that in preference over the parse error */ callback(err || e); return; }
7
diff --git a/ui/component/viewers/videoViewer/view.jsx b/ui/component/viewers/videoViewer/view.jsx @@ -21,7 +21,6 @@ const SEEK_BACKWARD_KEYCODE = ARROW_LEFT_KEYCODE; const SEEK_STEP = 10; // time to seek in seconds const VIDEO_JS_OPTIONS: { poster?: string } = { - autoplay: true, controls: true, preload: 'auto', playbackRates: [0.25, 0.5, 0.75, 1, 1.1, 1.25, 1.5, 2], @@ -112,9 +111,14 @@ function VideoViewer(props: Props) { if (!requireRedraw) { player = videojs(videoNode, videoJsOptions, function() { - const self = this; - self.volume(volume); - self.muted(muted); + player.volume(volume); + player.muted(muted); + player.ready(() => { + // In the future this should be replaced with something that checks if the + // video is actually playing after calling play() + // If it's not, fall back to the play button + player.play(); + }); }); }
7
diff --git a/magda-web-client/src/Components/Dataset/Add/DatasetAddCommon.ts b/magda-web-client/src/Components/Dataset/Add/DatasetAddCommon.ts @@ -732,7 +732,7 @@ export function createBlankState(user: User): State { }, datasetPublishing: { state: "draft", - level: "organization", + level: "creatorOrgUnit", contactPointDisplay: "team" }, spatialCoverage: {
12
diff --git a/test/renderer/AbstractIssue.test.js b/test/renderer/AbstractIssue.test.js @@ -4,18 +4,22 @@ const { constants } = require('./../../lib/slack/renderer'); const issuesOpened = require('./../fixtures/webhooks/issues.opened.json'); describe('AbstractIssue rendering', () => { - test('works for getHexColorbyState', async () => { - const color = AbstractIssue.getHexColorbyState(issuesOpened.issue.state); - expect(color).toEqual(constants.OPEN_GREEN); - }); + let abstractIssueMessage; - test('works for getAuthor', async () => { - const abstractIssueMessage = new AbstractIssue({ + beforeEach(() => { + abstractIssueMessage = new AbstractIssue({ abstractIssue: issuesOpened.issue, repository: issuesOpened.repository, eventType: 'issues.opened', unfurl: false, }); + }); + test('works for getHexColorbyState', async () => { + const color = AbstractIssue.getHexColorbyState(issuesOpened.issue.state); + expect(color).toEqual(constants.OPEN_GREEN); + }); + + test('works for getAuthor', async () => { expect(abstractIssueMessage.getAuthor()).toEqual({ author_name: 'wilhelmklopp', author_link: 'https://github.com/wilhelmklopp', @@ -24,24 +28,12 @@ describe('AbstractIssue rendering', () => { }); test('works for getPreText', async () => { - const abstractIssueMessage = new AbstractIssue({ - abstractIssue: issuesOpened.issue, - repository: issuesOpened.repository, - eventType: 'issues.opened', - unfurl: false, - }); expect(abstractIssueMessage.getPreText('Issue')).toEqual( '[github-slack/public-test] Issue opened by wilhelmklopp', ); }); test('works for core', async () => { - const abstractIssueMessage = new AbstractIssue({ - abstractIssue: issuesOpened.issue, - repository: issuesOpened.repository, - eventType: 'issues.opened', - unfurl: false, - }); expect(abstractIssueMessage.getCore()).toEqual({ text: issuesOpened.issue.body, title: `#${issuesOpened.issue.number} ${issuesOpened.issue.title}`, @@ -51,12 +43,6 @@ describe('AbstractIssue rendering', () => { }); test('works for getFooter', async () => { - const abstractIssueMessage = new AbstractIssue({ - abstractIssue: issuesOpened.issue, - repository: issuesOpened.repository, - eventType: 'issues.opened', - unfurl: false, - }); expect(abstractIssueMessage.getFooter()).toEqual({ footer: `<${issuesOpened.issue.html_url}|View it on GitHub>`, footer_icon: 'https://assets-cdn.github.com/favicon.ico', @@ -64,12 +50,6 @@ describe('AbstractIssue rendering', () => { }); test('works for getBaseMessage', async () => { - const abstractIssueMessage = new AbstractIssue({ - abstractIssue: issuesOpened.issue, - repository: issuesOpened.repository, - eventType: 'issues.opened', - unfurl: false, - }); expect(abstractIssueMessage.getBaseMessage()).toMatchSnapshot(); }); });
7
diff --git a/etc/marklogic-template/tmpl/container.tmpl b/etc/marklogic-template/tmpl/container.tmpl <?js if (!doc.longname || doc.kind !== 'module') { ?> <h2><?js if (doc.ancestors && doc.ancestors.length) { ?> <span class="ancestors"><?js= doc.ancestors.join('') ?></span> - <?js } ?> - <?js= doc.name ?> - <?js if (doc.variation) { ?> + <?js } ?><?js= doc.name ?><?js if (doc.variation) { ?> <sup class="variation"><?js= doc.variation ?></sup> <?js } ?></h2> <?js if (doc.classdesc) { ?>
2
diff --git a/index.mjs b/index.mjs @@ -5,7 +5,6 @@ import path from 'path'; import fs from 'fs'; import express from 'express'; import vite from 'vite'; -import fetch from 'node-fetch'; import wsrtc from 'wsrtc/wsrtc-server.mjs'; Error.stackTraceLimit = 300;
2
diff --git a/edit.js b/edit.js @@ -227,6 +227,11 @@ const HEIGHTFIELD_SHADER = { mod((vPosition.x) / 2.0, 1.0), mod((vPosition.z) / 2.0, 1.0) ); + uv.x *= 1.0/8.0; + uv.y *= 512.0/4096.0; + if (vPosition.y < 290.0) { + uv.x += 3.0/8.0; + } vec2 uv2 = vec2(0.1 + vWorldPosition.y/30.0, 0.5); vec3 c = texture2D(heightColorTex, uv2).rgb; vec3 diffuseColor = mix(texture2D(tex, uv).rgb, vec3(0.), gl_FragCoord.z/gl_FragCoord.w/30.0); @@ -1799,15 +1804,44 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => { }); heightfieldMaterial.uniforms.heightColorTex.value.needsUpdate = true; + (async () => { + const canvas = document.createElement('canvas'); + canvas.width = 4096; + canvas.height = 4096; + heightfieldMaterial.uniforms.tex.value.image = canvas; + heightfieldMaterial.uniforms.tex.value.minFilter = THREE.LinearFilter; + heightfieldMaterial.uniforms.tex.value.flipY = false; + + const atlas = atlaspack(canvas); + const rects = new Map(); + + for (const u of [ + 'Grass_1.png', + 'Grass_2.png', + 'Grass_3.png', + 'Ground_1.png', + 'Ground_2.png', + 'Ground_3.png', + 'Ground_4.png', + 'Ground_5.png', + ]) { + await new Promise((accept, reject) => { const img = new Image(); img.onload = () => { - heightfieldMaterial.uniforms.tex.value.needsUpdate = true; - }; - img.onerror = err => { - console.warn(err); + img.id = 'img-' + rects.size; + atlas.pack(img); + const rect = atlas.uv()[img.id]; + rects.set(img.id, rect); + + accept(); }; - img.src = './Grass_3.png'; - heightfieldMaterial.uniforms.tex.value.image = img; + img.onerror = reject; + img.src = `./textures/${u}`; + }); + } + + heightfieldMaterial.uniforms.tex.value.needsUpdate = true; + })(); const slabArrayBuffer = new ArrayBuffer(slabTotalSize); const geometry = new THREE.BufferGeometry();
0
diff --git a/test/jasmine/tests/gl3d_plot_interact_test.js b/test/jasmine/tests/gl3d_plot_interact_test.js @@ -403,7 +403,11 @@ describe('Test gl3d plots', function() { layout: { scene: { camera: { - up: { x:-0.5777, y:-0.5777, z:0.5777 } + up: { + x: -0.5777, + y: -0.5777, + z: 0.5777 + } } } } @@ -426,7 +430,11 @@ describe('Test gl3d plots', function() { layout: { scene: { camera: { - up: { x:0, y:0, z:100 } + up: { + x: -0.0001, + y: 0, + z: 123.45 + } } } } @@ -449,8 +457,6 @@ describe('Test gl3d plots', function() { layout: { scene: { camera: { - eye: { x:1, y:1, z:1 }, - center: { x:0, y:0, z:0 } } } } @@ -473,7 +479,10 @@ describe('Test gl3d plots', function() { layout: { scene: { camera: { - up: { x:null, z:0 } + up: { + x: null, + z: 0 + } } } } @@ -496,7 +505,11 @@ describe('Test gl3d plots', function() { layout: { scene: { camera: { - up: { x:0, y:0, z:0 } + up: { + x: 0, + y: 0, + z: 0 + } } } }
0
diff --git a/src/utils/get-error-pcc.js b/src/utils/get-error-pcc.js @@ -3,7 +3,7 @@ export default (string) => { return null; } - const [, pcc = null] = string.match(/NO AGREEMENT EXISTS FOR AGENCY - ([A-Z0-9]+)/); + const [, pcc = null] = string.match(/NO AGREEMENT EXISTS FOR AGENCY - ([A-Z0-9]+)/) || []; return pcc; };
0
diff --git a/lib/recurly/paypal/strategy/braintree.js b/lib/recurly/paypal/strategy/braintree.js @@ -4,7 +4,7 @@ import {PayPalStrategy} from './index'; const debug = require('debug')('recurly:paypal:strategy:braintree'); -export const BRAINTREE_CLIENT_VERSION = '3.11.0'; +export const BRAINTREE_CLIENT_VERSION = '3.50.0'; /** * Braintree-specific PayPal handler
3
diff --git a/GH-Release.sh b/GH-Release.sh #!/bin/bash set -e -#set -x GIT_BRANCH=${JOB_NAME#*/*/} GIT_COMMIT=$(git rev-parse HEAD) -if ! [ "${GIT_BRANCH}" = "ride4" ]; then +if ! [ "${GIT_BRANCH}" = "master" ]; then echo "skipping creating release for ${GIT_BRANCH}" exit 0 else @@ -66,16 +65,14 @@ else echo jq not found, not removing draft releases fi -if [ "$COMMIT_SHA" = "master" ] || [ "$COMMIT_SHA" = "ride4" ]; then - COMMIT_SHA=c6fe399aeeae1e489a486dfa2126399200ef54bb ## first release after setting target_commitish correctly -fi +echo "SHA: ${COMMIT_SHA}" if [ $GH_VERSION_ND_LAST = 0 ]; then echo "No releases of $VERSION_AB found, not populating changelog" - JSON_BODY=$(echo "Release of RIDE $VERSION_AB\n\nInitial version of RIDE $VERSION_AB" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))') + JSON_BODY=$(echo -e "Pre-Release of RIDE $VERSION_AB\n\nWARNING: This is a pre-release version of RIDE. We cannot guarantee the stability of this product at this time.\n\nInitial version of RIDE $VERSION_AB" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))') else echo using log from $COMMIT_SHA from $GH_VERSION_ND_LAST - JSON_BODY=$( ( echo -e "Release of RIDE $VERSION_AB\n\nChangelog:"; git log --format='%s' ${COMMIT_SHA}.. ) | grep -v -i todo | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))') + JSON_BODY=$( ( echo -e "Pre-Release of RIDE $VERSION_AB\n\nWARNING: This is a pre-release version of RIDE. We cannot guarantee the stability of this product at this time.\n\nChangelog:"; git log --format='%s' ${COMMIT_SHA}.. ) | grep -v -i todo | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))') fi
13
diff --git a/gears/carto_gears_api/Gemfile.lock b/gears/carto_gears_api/Gemfile.lock PATH remote: . specs: - carto_gears_api (0.0.5) - pg (= 0.15) - rails (= 4.2.8) + carto_gears_api (0.0.6) + pg (= 0.15.0) + rails (= 4.2.10) values (= 1.8.0) GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.8) - actionpack (= 4.2.8) - actionview (= 4.2.8) - activejob (= 4.2.8) + actionmailer (4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.8) - actionview (= 4.2.8) - activesupport (= 4.2.8) + actionpack (4.2.10) + actionview (= 4.2.10) + activesupport (= 4.2.10) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.8) - activesupport (= 4.2.8) + actionview (4.2.10) + activesupport (= 4.2.10) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (4.2.8) - activesupport (= 4.2.8) + activejob (4.2.10) + activesupport (= 4.2.10) globalid (>= 0.3.0) - activemodel (4.2.8) - activesupport (= 4.2.8) + activemodel (4.2.10) + activesupport (= 4.2.10) builder (~> 3.1) - activerecord (4.2.8) - activemodel (= 4.2.8) - activesupport (= 4.2.8) + activerecord (4.2.10) + activemodel (= 4.2.10) + activesupport (= 4.2.10) arel (~> 6.0) - activesupport (4.2.8) + activesupport (4.2.10) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -47,54 +47,55 @@ GEM builder (3.2.3) byebug (9.0.6) concurrent-ruby (1.0.5) + crass (1.0.3) diff-lcs (1.1.3) erubis (2.7.0) - globalid (0.4.0) + globalid (0.4.1) activesupport (>= 4.2.0) - i18n (0.8.1) - loofah (2.0.3) + i18n (0.9.3) + concurrent-ruby (~> 1.0) + loofah (2.1.1) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.4) - mime-types (>= 1.16, < 4) + mail (2.7.0) + mini_mime (>= 0.1.1) metaclass (0.0.4) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.1.0) - minitest (5.10.1) + mini_mime (1.0.0) + mini_portile2 (2.3.0) + minitest (5.11.3) mocha (1.1.0) metaclass (~> 0.0.1) - nokogiri (1.7.1) - mini_portile2 (~> 2.1.0) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) pg (0.15.0) - rack (1.6.5) + rack (1.6.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.8) - actionmailer (= 4.2.8) - actionpack (= 4.2.8) - actionview (= 4.2.8) - activejob (= 4.2.8) - activemodel (= 4.2.8) - activerecord (= 4.2.8) - activesupport (= 4.2.8) + rails (4.2.10) + actionmailer (= 4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) + activemodel (= 4.2.10) + activerecord (= 4.2.10) + activesupport (= 4.2.10) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.8) + railties (= 4.2.10) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.8) - activesupport (>= 4.2.0.beta, < 5.0) + rails-dom-testing (1.0.9) + activesupport (>= 4.2.0, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.8) - actionpack (= 4.2.8) - activesupport (= 4.2.8) + railties (4.2.10) + actionpack (= 4.2.10) + activesupport (= 4.2.10) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.0.0) + rake (12.3.0) rspec-core (2.12.2) rspec-expectations (2.12.1) diff-lcs (~> 1.1.3) @@ -109,13 +110,13 @@ GEM sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.0) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - thor (0.19.4) + thor (0.20.0) thread_safe (0.3.6) - tzinfo (1.2.3) + tzinfo (1.2.4) thread_safe (~> 0.1) values (1.8.0)
3
diff --git a/etc/eslint/rules/style.js b/etc/eslint/rules/style.js @@ -1310,7 +1310,9 @@ rules[ 'object-curly-newline' ] = [ 'error', { 'minProperties': 1, 'consistent': true }, - 'ObjectPattern': 'never' + 'ObjectPattern': 'never', + 'ImportDeclaration': 'never', + 'ExportDeclaration': 'never' }]; /**
12
diff --git a/Roll20-Audio-Master/script.json b/Roll20-Audio-Master/script.json { "name": "Roll20 Audio Master", "script": "Roll20AM.js", - "version": "2.08", - "previousversions": ["1.04","1.03","1.02","1.01","1.0","1,05"], + "version": "2.10", + "previousversions": ["1.04","1.03","1.02","1.01","1.0","1,05","2.08",], "description": "# Roll20 Audio Master\r\r###### Hear the dice, hear the action!\r###### The script allows control of the jukebox via the chat interface and expands upon the standard jukebox functionality with some additional commands.\r\r### Basic Command Syntax\r###### Optional arguments are encased in square brackets, mutually exclusive options are separated by a forward slash\r!roll20AM --action,action settings, or options|track name to act on|or playlist name to act on\r\r### Specific Commands\r###### See the in game help handout for details on listed keywords\r --play,[swap],[loop],[mode:shuffle/trueRandom/together/single],[delay:seconds]|track/list to play|track/list to play|...\r --stop,[soft],[ignore],[delay:seconds]|track/list to stop|track/list to stop|...\r --vcontrol,volume:value,[ignore],[fade/mute/unmute,[tickTime:seconds],[volTick:number],[stop]],[delay:seconds]|track to change|track to change|...\r --listCreate,listName:name,[access:gm/player][mode:shuffle/trueRandom/together/single]|track to add|track to add|...\r --listEdit,listName:name,[add/remove],[mode:shuffle/trueRandom/single/together],[access:gm/player]|track to add|track to add|...\r --cancelDelay\r --config,[menu:Which Menu]", - "authors": "Scott C.", + "authors": ["Scott C.","Victor B"], "roll20userid": "459831", "useroptions": [], "dependencies": [],
3
diff --git a/packages/app/src/stores/editor.tsx b/packages/app/src/stores/editor.tsx @@ -102,9 +102,9 @@ export const usePageTagsForEditors = (pageId: Nullable<string>): SWRResponse<str return { ...swrResult, - sync: (newTags?: string[]): void => { + sync: (newTagsOnEdit?: string[]): void => { const { mutate } = swrResult; - mutate(newTags || tagsInfoData?.tags || [], false); + mutate(newTagsOnEdit || tagsInfoData?.tags || [], false); }, }; };
10
diff --git a/packages/utils/src/backend/index.js b/packages/utils/src/backend/index.js @@ -25,7 +25,7 @@ function useBackend(baseURL, timeout = 10000) { backend.login = (username, password) => api.post('/login', { username, password }) // Login backend.confirmationLogin = id => api.post('/confirm/login', { id }) // Confirmation-based login backend.recoverAccount = username => api.post('/account/recover', { username: username }) // Ask for a password reset - backend.loadGist = handle => api.get('/gist/' + handle) // Load recipe/gist anonymously + backend.loadPattern = handle => api.get('/pattern/' + handle) // Load pattern anonymously backend.loadPatrons = handle => api.get('/patrons') // Load patron list // Users @@ -44,11 +44,11 @@ function useBackend(baseURL, timeout = 10000) { backend.removeModel = (handle, token) => api.delete('/models/' + handle, auth(token)) // Remove model //backend.removeModels = (data, token) => api.post('/remove/models', data, auth(token)) // Delete multiple models - // Recipes - backend.loadRecipe = (handle, token) => api.get('/recipes/' + handle, auth(token)) // Load recipe - backend.createRecipe = (data, token) => api.post('/recipes', data, auth(token)) // Create recipe - backend.removeRecipe = (handle, token) => api.delete('/recipes/' + handle, auth(token)) // Remove recipe - backend.saveRecipe = (handle, data, token) => api.put('/recipes/' + handle, data, auth(token)) // Update recipe + // Patterns + backend.loadPattern = (handle, token) => api.get('/patterns/' + handle, auth(token)) // Load pattern + backend.createPattern = (data, token) => api.post('/patterns', data, auth(token)) // Create pattern + backend.removePattern = (handle, token) => api.delete('/patterns/' + handle, auth(token)) // Remove pattern + backend.savePattern = (handle, data, token) => api.put('/patterns/' + handle, data, auth(token)) // Update pattern // Admin backend.adminSearch = (query, token) => api.post('/admin/search', { query }, auth(token)) // Search users as admin
10
diff --git a/src/DatabaseSchema.php b/src/DatabaseSchema.php @@ -44,14 +44,14 @@ class DatabaseSchema } /** - * Maps the columns from raw db values into an usable array. + * Map the tables from raw db values into an usable array. * - * @param Doctrine\DBAL\Schema\Schema $rawColumns + * @param Doctrine\DBAL\Schema\Schema $rawTables * @return array */ - private static function mapTables($rawColumns) + private static function mapTables($rawTables) { - return LazyCollection::make($rawColumns->getTables())->mapWithKeys(function ($table, $key) { + return LazyCollection::make($rawTables->getTables())->mapWithKeys(function ($table, $key) { return [$table->getName() => $table]; })->toArray(); }
10
diff --git a/src/styles/schema-styles.js b/src/styles/schema-styles.js @@ -10,6 +10,7 @@ export default css` width: 100%; box-sizing: content-box; border-bottom: 1px dotted transparent; + transition: max-height 0.3s ease-out; } .td { display: block; @@ -24,6 +25,26 @@ export default css` .collapsed-all-descr .key { overflow:hidden; } +.expanded-all-descr .key-descr .descr-expand-toggle { + display:none; +} + +.key-descr .descr-expand-toggle { + display:inline-block; + user-select:none; + color: var(--fg); + cursor: pointer; + transform: rotate(45deg); + transition: transform .2s ease; +} + +.expanded-descr .key-descr .descr-expand-toggle { + transform: rotate(270deg) +} + +.key-descr .descr-expand-toggle:hover { + color: var(--primary-color); +} .expanded-descr .more-content { display:none; } @@ -40,9 +61,6 @@ export default css` overflow:hidden; display: none; } -.collapsed-all-descr .tr { - max-height:20px; -} .xxx-of-key { font-size: calc(var(--font-size-small) - 2px);
7
diff --git a/edit.js b/edit.js @@ -1183,6 +1183,136 @@ class CollisionRaycaster { } const collisionRaycaster = new CollisionRaycaster(); +const physicsMaterial = new THREE.ShaderMaterial({ + uniforms: { + uNear: { + type: 'f', + value: 0, + }, + uFar: { + type: 'f', + value: 1, + }, + }, + vertexShader: `\ + // attribute float id; + // attribute float index; + // varying float vId; + // varying float vIndex; + void main() { + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.); + // vId = id; + // vIndex = index; + } + `, + fragmentShader: `\ + // varying vec2 vTexCoords; + + // varying float vId; + // varying float vIndex; + + uniform float uNear; + uniform float uFar; + vec2 encodePixelDepth(float v) { + float x = fract(v); + v -= x; + v /= 255.0; + float y = fract(v); + return vec2(x, y); + } + void main() { + gl_FragColor = vec4(encodePixelDepth(gl_FragCoord.z/gl_FragCoord.w), 0.0, 0.0); + } + `, + // side: THREE.DoubleSide, +}); +class PhysicsRaycaster { + constructor() { + this.renderer = new THREE.WebGLRenderer({ + alpha: true, + }); + this.renderer.setSize(1024, 1); + this.renderer.setPixelRatio(1); + this.renderer.setClearColor(new THREE.Color(0x000000), 0); + const renderTarget = new THREE.WebGLRenderTarget(1024, 1, { + type: THREE.FloatType, + format: THREE.RGBAFormat, + }); + this.renderer.setRenderTarget(renderTarget); + this.renderTarget = renderTarget; + this.scene = new THREE.Scene(); + this.scene.overrideMaterial = physicsMaterial; + this.camera = new THREE.OrthographicCamera(Math.PI, Math.PI, Math.PI, Math.PI, 0.001, 1000); + this.index = 0; + this.pixels = new Float32Array(1024*1*4); + this.depths = new Float32Array(1024*1); + } + + raycastMeshes(container, position, quaternion, uSize, vSize, dSize) { + const oldParent = container.parent; + this.scene.add(container); + if (oldParent) { + this.scene.position.copy(oldParent.position); + this.scene.quaternion.copy(oldParent.quaternion); + this.scene.scale.copy(oldParent.scale); + } + container.traverse(o => { + if (o.isMesh) { + o.oldVisible = o.visible; + o.visible = !o.isBuildMesh; + } + }); + + this.camera.position.copy(position); + this.camera.quaternion.copy(quaternion); + this.camera.updateMatrixWorld(); + + this.camera.left = uSize / -2; + this.camera.right = uSize / 2; + this.camera.top = vSize / 2; + this.camera.bottom = vSize / -2; + this.camera.near = 0.001; + this.camera.far = dSize; + this.camera.updateProjectionMatrix(); + + this.scene.overrideMaterial.uniforms.uNear.value = this.camera.near; + this.scene.overrideMaterial.uniforms.uFar.value = this.camera.far; + + this.renderer.setViewport(this.index++, 0, 1, 1); + this.renderer.render(this.scene, this.camera); + + container.traverse(o => { + if (o.isMesh) { + o.visible = o.oldVisible; + } + }); + if (oldParent) { + oldParent.add(container); + } else { + container.parent.remove(container); + } + } + readRaycast() { + this.renderer.readRenderTargetPixels(this.renderTarget, 0, 0, 1024, 1, this.pixels); + + let j = 0; + for (let i = 0; i < this.depths.length; i++) { + if (this.pixels[j] !== 0) { + let v = + this.pixels[j] + + this.pixels[j+1] * 255.0; + this.depths[i] = this.camera.near + v * (this.camera.far - this.camera.near); + } else { + this.depths[i] = Infinity; + } + j += 4; + } + + this.index = 0; + } +} +const physicsRaycaster = new PhysicsRaycaster(); + const collisionCubeGeometry = new THREE.BoxBufferGeometry(0.05, 0.05, 0.05); const sideCollisionCubeMaterial = new THREE.MeshBasicMaterial({ color: 0xFF0000, @@ -1740,6 +1870,23 @@ const hpMesh = (() => { })(); scene.add(hpMesh); + +const physicsMeshContainer = new THREE.Object3D(); +scene.add(physicsMeshContainer); +const pxMesh = (() => { + const geometry = new THREE.TetrahedronBufferGeometry(1, 0); + const material = new THREE.MeshBasicMaterial({ + color: 0x0000FF, + }); + const mesh = new THREE.Mesh(geometry, material); + mesh.frustumCulled = false; + return mesh; +})(); +// pxMesh.position.set(0, 20, 0); +pxMesh.quaternion.setFromUnitVectors(new THREE.Vector3(0, 0, -1), new THREE.Vector3(0, -1, 0)); +pxMesh.velocity = new THREE.Vector3(0, -0.1, 0); +physicsMeshContainer.add(pxMesh); + const _applyVelocity = (position, timeDiff) => { position.add(localVector4.copy(velocity).multiplyScalar(timeDiff)); }; @@ -2822,6 +2969,15 @@ function animate(timestamp, frame) { wireframeMaterial.uniforms.uSelectId.value.set(0, 0, 0); } */ + physicsRaycaster.raycastMeshes(chunkMeshContainer, pxMesh.position, pxMesh.quaternion, 1, 1, 10); + physicsRaycaster.readRaycast(); + if (physicsRaycaster.depths[0] < pxMesh.velocity.length()*1.1) { + pxMesh.position.add(pxMesh.velocity.multiplyScalar(physicsRaycaster.depths[0])); + pxMesh.velocity.set(0, 0, 0); + } else { + pxMesh.position.add(pxMesh.velocity); + } + lastTeleport = currentTeleport; lastWeaponDown = currentWeaponDown;
0
diff --git a/Source/dom/style/Style.js b/Source/dom/style/Style.js @@ -247,6 +247,9 @@ Style.define('sharedStyleId', { if (parentLayer && parentLayer.setSharedStyleID) { parentLayer.setSharedStyleID(null) } + if (this._sharedStyle) { + this._sharedStyle = undefined + } return }
9
diff --git a/app/templates/components/forms/orders/order-form.hbs b/app/templates/components/forms/orders/order-form.hbs 'By clicking "Pay Now", I acknowledge that I have read and that I agree with all the terms of services and privacy policy of Open Event.'}} </p> <div class="center aligned"> - <button type="submit" class="ui teal submit button">{{t 'Pay Now'}}</button> + <button type="submit" class="ui teal submit button">{{t 'Proceed to Checkout'}}</button> </div> </div> </div>
10
diff --git a/src/audio/audio.js b/src/audio/audio.js if (sound && typeof sound !== "undefined") { sound.stop(instance_id); // remove the defined onend callback (if any defined) - sound.off("end", instance_id); + sound.off("end", undefined, instance_id); } };
1
diff --git a/packages/spark-core/components/_dropdown.scss b/packages/spark-core/components/_dropdown.scss } .sprk-c-Dropdown__header { - padding: $sprk-dropdown-padding $sprk-dropdown-padding - ($sprk-dropdown-padding / 2) $sprk-dropdown-padding; + padding: ($sprk-dropdown-padding / 2) $sprk-dropdown-padding; // When the dropdown has a header, this adjust its padding because the header takes over as the "first item" + .sprk-c-Dropdown__links {
3
diff --git a/lib/sketchLink.js b/lib/sketchLink.js /* - Link from sketch a, port i to sketch b, port j, with curvature s. + Link from sketch "fromSketch", port "outputPortIndex" (at the moment all sketches only + have one output port, so outputPortIndex should always be 0) to sketch "toSketch", + port "inputPortIndex", with curvature of the line specified by "curvature". */ -function SketchLink(a, i, b, j, s) { - this.a = a; - this.i = i; - this.b = b; - this.j = j; - this.s = def(s, 0); +function SketchLink(fromSketch, outputPortIndex, toSketch, inputPortIndex, curvature) { + this.a = fromSketch; + this.i = outputPortIndex; + this.b = toSketch; + this.j = inputPortIndex; + this.s = def(curvature, 0); this._displayMode = 0; this._displayIndex = 0; this.color = fadedColor(0.5); - // If a has no out links on port i, set this to be its out link. + // If fromSketch has no out links on port outputPortIndex, set this to be its out link. - if (i >= a.out.length || a.out[i] === undefined) - a.out[i] = []; - a.out[i].push(this); + if (i >= fromSketch.out.length || fromSketch.out[outputPortIndex] === undefined) + fromSketch.out[outputPortIndex] = []; + fromSketch.out[outputPortIndex].push(this); - // Set this to be the in link for sketch b, port j. + // Set this to be the in link for sketch toSketch, port inputPortIndex. - b.in[j] = this; + toSketch.in[inputPortIndex] = this; } SketchLink.prototype = {
10
diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js @@ -199,15 +199,15 @@ function hasReportDraftComment(report, reportsWithDraft = {}) { * @returns {String} */ function getBrickRoadIndicatorStatusForReport(report, reportActions) { - const errors = lodashGet(report, 'errors', {}); - const errorFields = lodashGet(report, 'errorFields', {}); + const reportErrors = lodashGet(report, 'errors', {}); + const reportErrorFields = lodashGet(report, 'errorFields', {}); const reportID = lodashGet(report, 'reportID'); const reportsActions = lodashGet(reportActions, `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {}); - const hasFieldErrors = _.some(errorFields, fieldErrors => !_.isEmpty(fieldErrors)); + const hasReportFieldErrors = _.some(reportErrorFields, fieldErrors => !_.isEmpty(fieldErrors)); const hasReportActionErrors = _.some(reportsActions, action => !_.isEmpty(action.errors)); - if (_.isEmpty(errors) && !hasFieldErrors && !hasReportActionErrors) { + if (_.isEmpty(reportErrors) && !hasReportFieldErrors && !hasReportActionErrors) { return ''; } return CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
10
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -779,10 +779,9 @@ When writing docs you can use the following variables instead of hard-coding the | Variable | Description | Default Value | | :---------------------------- | :----------------------------------------- | :-------------------------------------- | | `manage_url` | The url to the management portal. | `https://manage.auth0.com` | -| `auth0js_url` | The url to the auth0.js v7 CDN location. | | +| `auth0js_url` | The url to the auth0.js CDN location. | | | `auth0js_urlv8` | The url to the auth0.js v8 CDN location. | | | `lock_url` | The url to the Lock script CDN location. | | -| `lock_passwordless_url` | The url to the Passwordless Lock script CDN location. | | | `env.DOMAIN_URL_SUPPORT` | Support Center URL | `https://support.auth0.com` | ### User Specific Variables
2