code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/javascript/modules/location/locationManager.js b/javascript/modules/location/locationManager.js @@ -17,7 +17,17 @@ class LocationManager { async getLastKnownLocation() { if (!this._lastKnownLocation) { - const lastKnownLocation = await MapboxGLLocationManager.getLastKnownLocation(); + let lastKnownLocation; + + // as location can be brittle it might happen, + // that we get an exception from native land + // let's silently catch it and simply log out + // instead of throwing an exception + try { + lastKnownLocation = await MapboxGLLocationManager.getLastKnownLocation(); + } catch (error) { + console.log('locationManager Error: ', error); + } if (!this._lastKnownLocation && lastKnownLocation) { this._lastKnownLocation = lastKnownLocation;
1
diff --git a/test/common/tests.js b/test/common/tests.js @@ -490,31 +490,6 @@ module.exports = (sql, driver) => { }, 'bulk converts dates' (done) { - let t = new sql.Table('#bulkconverts') - t.create = true - t.columns.add('a', sql.Int, { nullable: false }) - t.columns.add('b', sql.DateTime2, { nullable: true }) - t.rows.add(1, new Date('2019-03-12T11:06:59.000Z')) - t.rows.add(2, '2019-03-12T11:06:59.000Z') - t.rows.add(3, 1552388819000) - - let req = new TestRequest() - req.bulk(t).then(result => { - assert.strictEqual(result.rowsAffected, 3) - - req = new sql.Request() - return req.batch(`select * from #bulkconverts`).then(result => { - assert.strictEqual(result.recordset.length, 3) - for (let i = 0; i < result.recordset.length; i++) { - assert.strictEqual(result.recordset[i].b.toISOString(), '2019-03-12T11:06:59.000Z') - } - - done() - }) - }).catch(done) - }, - - 'bulk throws errors for string datatypes' (done) { let t = new sql.Table('#bulkconverts') t.create = true t.columns.add('a', sql.Int, { @@ -552,7 +527,10 @@ module.exports = (sql, driver) => { }) table.rows.add(table.rows, ['JP1016']) - req.bulk(table, err => { + req.bulk(table).then(() => { + assert.fail('it should throw error while insertion') + done() + }).catch(err => { assert.strictEqual(err instanceof sql.RequestError, true) assert.strictEqual(err.message, 'An unknown error has occurred. This is likely because the schema of the BulkLoad does not match the schema of the table you are attempting to insert into.') assert.strictEqual(err.code, 'UNKNOWN') @@ -570,7 +548,10 @@ module.exports = (sql, driver) => { }) table.rows.add(table.rows, ['JP1016']) - req.bulk(table, err => { + req.bulk(table).then(() => { + assert.fail('it should throw error while insertion') + done() + }).catch(err => { assert.strictEqual(err instanceof sql.RequestError, true) assert.strictEqual(err.message, 'An unknown error has occurred. This is likely because the schema of the BulkLoad does not match the schema of the table you are attempting to insert into.') assert.strictEqual(err.code, 'UNKNOWN')
1
diff --git a/src/pages/Component/Log.less b/src/pages/Component/Log.less background: #444444; } } + .podCascader { - width: calc(100% - 386px); + width: calc(100% - 597px); :global { .ant-form-item-control-wrapper { - width: calc(100% - 75px); + width: calc(100% - 45px); } } }
1
diff --git a/lib/Common/DataStructures/DList.h b/lib/Common/DataStructures/DList.h @@ -594,17 +594,6 @@ class DListCounted : public DList<TData, TAllocator, RealCount> } \ } -#define FOREACH_DLISTCOUNTED_ENTRY(T, alloc, data, list) \ -{ \ - DListCounted<T, alloc>::Iterator __iter(list); \ - while (__iter.Next()) \ - { \ - T& data = __iter.Data(); - -#define NEXT_DLISTCOUNTED_ENTRY \ - } \ -} - #define FOREACH_DLIST_ENTRY_EDITING(T, alloc, data, list, iter) \ DList<T, alloc>::EditingIterator iter(list); \ while (iter.Next()) \
13
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -10,6 +10,7 @@ import * as Pusher from '../Pusher/pusher'; import LocalNotification from '../Notification/LocalNotification'; import PushNotification from '../Notification/PushNotification'; import * as PersonalDetails from './PersonalDetails'; +import * as User from './User'; import Navigation from '../Navigation/Navigation'; import * as ActiveClientManager from '../ActiveClientManager'; import Visibility from '../Visibility'; @@ -1181,6 +1182,18 @@ function addAction(reportID, text, file) { console.error(response.message); return; } + + if (response.jsonCode === 666 && reportID === conciergeChatReportID) { + Growl.error('You are blocked from chatting with Concierge.'); + Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, { + [optimisticReportActionID]: null, + }); + + // The fact that we're getting this error from the API means the BLOCKED_FROM_CONCIERGE nvp in the user details has changed since the last time we checked, so let's trigger an update + User.getUserDetails(); + return; + } + updateReportWithNewAction(reportID, response.reportAction); }); }
9
diff --git a/src/commands/dev/index.js b/src/commands/dev/index.js @@ -408,7 +408,7 @@ class DevCommand extends Command { functionWatcher.on('change', functionBuilder.build) functionWatcher.on('unlink', functionBuilder.build) } - const functionsPort = settings.functionsPort || 34567 + const functionsPort = settings.functionsPort // returns a value but we dont use it await serveFunctions({
2
diff --git a/core/connection.js b/core/connection.js @@ -220,8 +220,8 @@ Blockly.Connection.prototype.connect_ = function(childConnection) { // Sorin var unifyResult; - if (this.typeExpr && childConnection.typeExpr) { - unifyResult = this.typeExpr.unify(childConnection.typeExpr); + if (parentConnection.typeExpr && childConnection.typeExpr) { + unifyResult = parentConnection.typeExpr.unify(childConnection.typeExpr); if (unifyResult === false) { throw 'Attempt to connect incompatible types.'; } @@ -267,7 +267,7 @@ Blockly.Connection.prototype.connect_ = function(childConnection) { if (parentBlock.rendered && childBlock.rendered) { // Sorin - if (this.typeExpr && childConnection.typeExpr) { + if (parentConnection.typeExpr && childConnection.typeExpr) { childBlock.render(); parentBlock.render(); return;
1
diff --git a/docs/developer-guide/debugging.md b/docs/developer-guide/debugging.md @@ -46,7 +46,7 @@ The following features are abailable: * Automatic sanity checks are performed on uniforms and attributes. Passing an `undefined` value to a uniform is a common JavaScript mistake that will immediately generate a descriptive exception in deck.gl. This can be tracked from the console output. -* The `Deck` class and `DeckGL` react component habe a debug flag which instructs luma.gl to instruments the gl context (with a performance cost) which allows tracing all WebGL call errors, see below on luma debug priority levels. It also generates exceptions immediately when a WebGL operation fails, allowing you to pinpoint exactly where in the code the issue happened. Due to the asynchronous nature of the GPU, some WebGL execution errors are surfaced and caught later than the calls that generate them. +* The `Deck` class and `DeckGL` react component have a debug flag which instructs luma.gl to instruments the gl context (with a performance cost) which allows tracing all WebGL call errors, see below on luma debug priority levels. It also generates exceptions immediately when a WebGL operation fails, allowing you to pinpoint exactly where in the code the issue happened. Due to the asynchronous nature of the GPU, some WebGL execution errors are surfaced and caught later than the calls that generate them. In the browser console, setting `luma.log.priority` to various values will enable increasing levels of debugging.
1
diff --git a/_CodingChallenges/116-lissajous.md b/_CodingChallenges/116-lissajous.md @@ -19,7 +19,7 @@ videos: - title: "Polar Coordinates" video_id: "znOBmOrtz_M" - title: "2D Arrays in JavaScript" - url: "Tutorials/9-additional-topics/9.15-2d-arrays-in-javascript" + url: "/Tutorials/9-additional-topics/9.15-2d-arrays-in-javascript" --- In this Coding Challenge, I visualize a "Lissajous Curve Table" with Processing (Java). \ No newline at end of file
1
diff --git a/lib/plugins/interactiveCli/setupAws.js b/lib/plugins/interactiveCli/setupAws.js @@ -96,7 +96,7 @@ const steps = { module.exports = { check(serverless) { return BbPromise.try(() => { - if (serverless.service.provider.name !== 'aws') return null; + if (serverless.service.provider.name !== 'aws') return false; return BbPromise.all([ awsCredentials.resolveFileProfiles(), awsCredentials.resolveEnvCredentials(),
7
diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js @@ -2042,7 +2042,7 @@ axes.drawOne = function(gd, ax, opts) { if(!ax.visible) return; - var transFn = axes.makeTransTickFn(ax); + var transTickFn = axes.makeTransTickFn(ax); var transTickLabelFn = ax.ticklabelmode === 'period' ? axes.makeTransPeriodFn(ax) : axes.makeTransTickFn(ax); @@ -2092,13 +2092,13 @@ axes.drawOne = function(gd, ax, opts) { counterAxis: counterAxis, layer: plotinfo.gridlayer.select('.' + axId), path: gridPath, - transFn: transFn + transFn: transTickFn }); axes.drawZeroLine(gd, ax, { counterAxis: counterAxis, layer: plotinfo.zerolinelayer, path: gridPath, - transFn: transFn + transFn: transTickFn }); } } @@ -2135,7 +2135,7 @@ axes.drawOne = function(gd, ax, opts) { vals: tickVals, layer: mainAxLayer, path: tickPath, - transFn: transFn + transFn: transTickFn }); if(ax.mirror === 'allticks') { @@ -2155,7 +2155,7 @@ axes.drawOne = function(gd, ax, opts) { vals: tickVals, layer: plotinfo[axLetter + 'axislayer'], path: spTickPath, - transFn: transFn + transFn: transTickFn }); } @@ -2187,7 +2187,7 @@ axes.drawOne = function(gd, ax, opts) { cls: axId + 'tick2', repositionOnUpdate: true, secondary: true, - transFn: transFn, + transFn: transTickFn, labelFns: axes.makeLabelFns(ax, mainLinePosition + standoff * tickSigns[4]) }); }); @@ -2199,7 +2199,7 @@ axes.drawOne = function(gd, ax, opts) { vals: dividerVals, layer: mainAxLayer, path: axes.makeTickPath(ax, mainLinePosition, tickSigns[4], ax._depth), - transFn: transFn + transFn: transTickFn }); }); } else if(ax.title.hasOwnProperty('standoff')) {
10
diff --git a/tasks/stats.js b/tasks/stats.js @@ -137,7 +137,9 @@ function getMainBundleInfo() { '', 'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.', '', - 'Starting in `v2.0.0`, the strict partial bundle includes everything except the traces that require function constructor.', + 'Starting in `v2.0.0`, the strict partial bundle includes everything except the traces that require function constructors.', + 'Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues ', + 'such as inline CSS that we may not be able to include in the main bundle.', '' ]; }
3
diff --git a/README.md b/README.md @@ -73,7 +73,7 @@ Here's a rough outline: 1. [for Node.js](docs/1-installation.md#for-use-in-nodejs-or-browserify) 2. [for browsers](docs/1-installation.md#for-use-in-browsers) 3. [initial configuration](docs/1-installation.md#configuring-testdoublejs-setting-up-in-your-test-suite) -2. [Purpose of testdouble.js](docs/2-howto-purpose.md#background) +2. [Purpose of testdouble.js](docs/2-howto-purpose.md#purpose) 1. [in unit tests](docs/2-howto-purpose.md#test-doubles-and-unit-tests) 2. [in integration tests](docs/2-howto-purpose.md#test-doubles-and-integration-tests) 3. [Getting started tutorial](docs/3-getting-started.md#getting-started) @@ -131,5 +131,5 @@ Here's a rough outline: 2. [testdouble-jasmine](https://github.com/BrianGenisio/testdouble-jasmine) 11. [Frequently Asked Questions](docs/B-frequently-asked-questions.md#frequently-asked-questions) 1. [Why doesn't `td.replace()` work with external CommonJS modules?](docs/B-frequently-asked-questions.md#why-doesnt-tdreplace-work-with-external-commonjs-modules) -12. [Configuration](docs/C-configuration.md) +12. [Configuration](docs/C-configuration.md#configuration) 1. [td.config](docs/C-configuration.md#tdconfig)
1
diff --git a/src/resources/views/crud/columns/select_from_array.blade.php b/src/resources/views/crud/columns/select_from_array.blade.php $column['value'] = $column['value']($entry); } - if (function_exists('enum_exists') && $column['value'] instanceof \UnitEnum) { - $column['value'] = $column['value'] instanceof \BackedEnum ? $column['value']->value : $column['value']->name; - } - $list = []; if ($column['value'] !== null) { if (is_array($column['value'])) {
13
diff --git a/test/index.test.js b/test/index.test.js @@ -495,7 +495,7 @@ describe('mongoose module:', function() { return Promise.resolve(); }); - xit('throws an error on setting invalid options (gh-6899)', function() { + it('throws an error on setting invalid options (gh-6899)', function() { let threw = false; try { mongoose.set('someInvalidOption', true);
11
diff --git a/packages/optimizers/terser/src/TerserOptimizer.js b/packages/optimizers/terser/src/TerserOptimizer.js @@ -28,6 +28,12 @@ export default new Optimizer({ let config = { warnings: true, ...userConfig?.config, + compress: { + ...userConfig?.config?.compress, + toplevel: + bundle.env.outputFormat === 'esmodule' || + bundle.env.outputFormat === 'commonjs', + }, sourceMap: { filename: path.relative(options.projectRoot, bundle.filePath), },
12
diff --git a/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/SetupBanner.js b/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/SetupBanner.js @@ -33,7 +33,10 @@ import { } from '../../../../analytics-4/components/common'; import ErrorNotice from '../../../../../components/ErrorNotice'; import SpinnerButton from '../../../../../components/SpinnerButton'; -import { MODULES_ANALYTICS_4 } from '../../../datastore/constants'; +import { + MODULES_ANALYTICS_4, + PROPERTY_CREATE, +} from '../../../datastore/constants'; import { CORE_USER } from '../../../../../googlesitekit/datastore/user/constants'; import useExistingTagEffect from '../../../../analytics-4/hooks/useExistingTagEffect'; import { getBannerDismissalExpiryTime } from '../../../utils/banner-dismissal-expiry'; @@ -55,7 +58,8 @@ export default function SetupBanner( {} ) { select( CORE_USER ).getReferenceDate() ); - const { submitChanges } = useDispatch( MODULES_ANALYTICS_4 ); + const { submitChanges, selectProperty } = + useDispatch( MODULES_ANALYTICS_4 ); const handleSubmitChanges = useCallback( async () => { const { error } = await submitChanges(); @@ -114,7 +118,10 @@ export default function SetupBanner( {} ) { ) } </div> ); - } else if ( existingTag ) { + } else { + selectProperty( PROPERTY_CREATE ); + + if ( existingTag ) { title = __( 'No existing Google Analytics 4 property found, Site Kit will help you create a new one and insert it on your site', 'google-site-kit' @@ -139,6 +146,7 @@ export default function SetupBanner( {} ) { 'google-site-kit' ); } + } return ( <BannerNotification
12
diff --git a/src/data-structures/tree/avl-tree/README.md b/src/data-structures/tree/avl-tree/README.md @@ -25,24 +25,24 @@ AVL tree with balance factors (green) **Left-Left Rotation** -![Left-Left Rotation](http://btechsmartclass.com/DS/images/LL%20Rotation.png) +![Left-Left Rotation](http://btechsmartclass.com/data_structures/ds_images/LL%20Rotation.png) **Right-Right Rotation** -![Right-Right Rotation](http://btechsmartclass.com/DS/images/RR%20Rotation.png) +![Right-Right Rotation](http://btechsmartclass.com/data_structures/ds_images/RR%20Rotation.png) **Left-Right Rotation** -![Left-Right Rotation](http://btechsmartclass.com/DS/images/LR%20Rotation.png) +![Left-Right Rotation](http://btechsmartclass.com/data_structures/ds_images/LR%20Rotation.png) **Right-Left Rotation** -![Right-Right Rotation](http://btechsmartclass.com/DS/images/RL%20Rotation.png) +![Right-Right Rotation](http://btechsmartclass.com/data_structures/ds_images/RL%20Rotation.png) ## References * [Wikipedia](https://en.wikipedia.org/wiki/AVL_tree) * [Tutorials Point](https://www.tutorialspoint.com/data_structures_algorithms/avl_tree_algorithm.htm) -* [BTech](http://btechsmartclass.com/DS/U5_T2.html) +* [BTech](http://btechsmartclass.com/data_structures/avl-trees.html) * [AVL Tree Insertion on YouTube](https://www.youtube.com/watch?v=rbg7Qf8GkQ4&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=12&) * [AVL Tree Interactive Visualisations](https://www.cs.usfca.edu/~galles/visualization/AVLtree.html)
1
diff --git a/articles/support/tickets.md b/articles/support/tickets.md @@ -30,19 +30,7 @@ If you are an existing PSaaS Appliance customer, you will need to create an Auth * **Normal: General Support Question** - You are in development and have a question about how to configure something or how to resolve an error * **High: Production Application Issue** - Your Production application is experiencing a minor outage impacting some users/feature(s) * **Urgent: Production Application Offline** - Your Production application is experiencing a critical outage impacting all users - * Depending on the issue type you chose after you select the severity, you may need to answer the **What can we help you with?**. Choose one of the following: - * **Public Cloud Support Incident** - * **Appliance Support Incident** - * **Enhancement/Feature Request** - * **Billing or Payment** - * **Compliance/Legal** - * **Outage** - * **Do not understand self-service resources** - * **Enterprise Connections** - * **SDK/Library** - * **Management API** - * **Custom DB Connection** - * **SSO Integrations** + * Depending on the issue type you chose, after you select the severity you may need to answer the **What can we help you with?** question. Choose the answer that best matches your issue. ![Customer Reason](/media/articles/support/customer-reason.png) * After you make your selection, you can choose to answer some follow-up questions to further refine your request. You can also choose to skip this step by clicking the toggle. ![Follow-up questions](/media/articles/support/follow-up.png) @@ -54,7 +42,7 @@ Selection of severity is not available to Trial Tenant customers or those who ha ::: 1. Next, provide a clear summary of the question/issue in the **Subject** field. 1. In the **Description** box, provide as much detail as possible about the issue. When writing in this box, you can style your text with [Markdown](https://guides.github.com/features/mastering-markdown) and preview what you have written by clicking on **Preview**. - When writing your description, please try to include (if applicable): + When writing your description, please try to include the following information (if applicable): * What were you trying to do? * What did you expect to happen? * Where did things go wrong?
2
diff --git a/test/image/README.md b/test/image/README.md @@ -93,8 +93,11 @@ For example, # Run one test (e.g. the 'contour_nolines' test): $ npm run test-image -- contour_nolines -# Run all gl3d image test in batch: +# Run all gl3d image tests in batch: $ npm run test-image -- gl3d_* + +# Run all image tests that are not gl3d in batch: +npm run test-image -- "\!\(gl3d_\)*" ``` Developers on weak hardware might encounter batch timeout issue. These are most
0
diff --git a/packages/design-tools/src/__stories__/Typography/TypographyTools.stories.js b/packages/design-tools/src/__stories__/Typography/TypographyTools.stories.js @@ -379,7 +379,11 @@ const CombinedFormGroupInputSlider = React.memo( const handleOnChange = React.useCallback( (value) => { typographyStore.setState((prev) => { - const { unit } = CSSUnit.parse(prev[prop]); + // Handles unit changes + const unit = + CSSUnit.parse(value).unit || + CSSUnit.parse(prev[prop]).unit; + const { value: nextValue } = CSSUnit.parse(value); const next = unit ? `${nextValue}${unit}` : value;
7
diff --git a/docs/.eleventy/layouts/extend.njk b/docs/.eleventy/layouts/extend.njk @@ -15,6 +15,47 @@ layout: layouts/base.njk .toc, .grid-toc-buttons, .grid-extra-space video { filter: hue-rotate(45deg); } +.font-heading { + font-family: "Overpass", sans-serif; +} +.tc-blue { color: #267dd6; } +.tc-green { color: #24bd65; } +.tc-magenta { color: #b224d0; } +.tc-text { color: #24292e; } +.ol { + counter-reset: ol; + list-style: none; + padding: 0; +} +.ol li { + margin: 1em 0; + counter-increment: ol; + position: relative; + padding-left: 0.75rem; +} +.ol .ol-title { + margin: 0; + padding: 0; + font-size: 16px; + font-family: "Overpass", sans-serif; + font-weight: 700; + letter-spacing: 0.0625em; +} +.ol li::before { + top: -0.125em; + right: 100%; + position: absolute; + display: flex; + justify-content: center; + font-size: 14px; + font-family: "Overpass", sans-serif; + font-weight: 700; + width: 1.625em; + height: 1.625em; + border: 1.5px solid currentColor; + border-radius: 50%; + content: counter(ol); +} </style> <div class="grid-body-header">
7
diff --git a/token-metadata/0x0Ba45A8b5d5575935B8158a88C631E9F9C95a2e5/metadata.json b/token-metadata/0x0Ba45A8b5d5575935B8158a88C631E9F9C95a2e5/metadata.json "symbol": "TRB", "address": "0x0Ba45A8b5d5575935B8158a88C631E9F9C95a2e5", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/portal_api/pkg/analytics.go b/portal_api/pkg/analytics.go @@ -48,7 +48,7 @@ union all select gender, count() from certificatesv1 group by gender ` byDateQuery := `select d, count() from certificatesv1 group by toYYYYMMDD(effectiveStart) as d` - byStateQuery := `select facilityState, count() from certificatesv1 group by facilityState` + byStateQuery := `select facilityState, count() from certificatesv1 where facilityState != '' group by facilityState` byAgeQuery := `select a, count() from certificatesv1 group by floor(age/10)*10 as a` downloadByDate := `select d, count() from eventsv1 where type='download' group by toYYYYMMDD(dt) as d` validVerificationByDate := `select d, count() from eventsv1 where type='valid-verification' group by toYYYYMMDD(dt) as d`
8
diff --git a/static/scss/partials/_base.scss b/static/scss/partials/_base.scss @@ -27,7 +27,6 @@ body { li { margin-bottom: .25rem; margin-top: .25rem; - color: #FFFFFF; } a { @@ -121,9 +120,7 @@ p { } ul { - &.no-style a { + &.no-style { list-style: none; - color: #1db6dc; } } -
13
diff --git a/articles/support/index.md b/articles/support/index.md @@ -167,3 +167,22 @@ Critical Production issues should always be reported via the [Support Center](ht - Customers that have Developer or Developer Pro subscriptions map to the current "Standard" support plan. - Support plans previously known as "Enterprise" and "Premium" support map to the current "Enterprise" support plan. - The "Preferred" support plan is a new plan available for purchase as of October 2016. + +### Support Languages + +We provide all technical support in English, but we will make an effort to accommodate other languages if possible. + +## Pricing + +For pricing information on Auth0's subscription plans, please see [Pricing Page] or your [Account Settings](${manage_url}/#/account/billing/subscription). + +## Additional Support Resources + +### Auth0 Status +The [Auth0 status page](https://status.auth0.com) contains information on current production status and will be updated during an outage. After an outage, a root-cause analysis is performed and made available via the page. + +Please check the [status page](https://status.auth0.com) before filing a ticket. If the status page contains a notification about an outage, our team will already be working on restoring service as quickly as possible. Once the issue is resolved, the status page will be updated to reflect that. There is a button on the page to subscribe to notifications of any changes. A root-cause analysis will be published to the status page once an investigation has been done. + +### Whitehat Support Tickets + +All customers, even those with free subscription plans, may report security concerns via [Auth0 Whitehat](https://auth0.com/whitehat).
0
diff --git a/src/components/auth/Auth.js b/src/components/auth/Auth.js @@ -107,6 +107,7 @@ const getStylesFromProps = ({ theme }) => { paddingHorizontal: theme.sizes.default, paddingVertical: theme.sizes.default, backgroundColor: theme.colors.darkGray, + boxShadow: '0 3px 6px rgba(0, 0, 0, 0.24)', }, separator: { maxWidth: 276,
0
diff --git a/src/lifecycle.js b/src/lifecycle.js @@ -88,7 +88,8 @@ export default Base => this.props.collapseOnSortingChange) || oldState.filtered !== newResolvedState.filtered || oldState.showFilters !== newResolvedState.showFilters || - (!newResolvedState.frozen && + (oldState.sortedData && + !newResolvedState.frozen && oldState.resolvedData !== newResolvedState.resolvedData && this.props.collapseOnDataChange) ) {
1
diff --git a/ui/page/search/view.jsx b/ui/page/search/view.jsx @@ -27,7 +27,7 @@ export default function SearchPage(props: Props) { let modifiedUrlQuery = urlQuery ? urlQuery .trim() - .replace(/\s+/, '-') + .replace(/\s+/g, '-') .replace(INVALID_URI_CHARS, '') : ''; const isModifiedUriValid = isURIValid(modifiedUrlQuery);
14
diff --git a/kotobaweb/src/dashboard/reports/index.jsx b/kotobaweb/src/dashboard/reports/index.jsx @@ -80,6 +80,16 @@ class Questions extends PureComponent { const loginErrorMessage = <span>You must be logged in to do that. <a href="/api/login" className="text-info">Login</a></span>; const noDecksErrorMessage = <span>You don't have any custom decks yet. <a href="/dashboard/decks/new" className="text-info">Create one</a></span>; +function getParticipantsAsScorerElements(participants, pointsForParticipantId) { + return participants.sort((p2, p1) => pointsForParticipantId[p1._id] - pointsForParticipantId[p2._id]).map((p, i) => ( + <Scorer + {...p.discordUser} + index={i} + points={pointsForParticipantId[p._id]} + key={p._id} /> + )); +} + class ReportView extends Component { constructor() { super(); @@ -269,10 +279,6 @@ class ReportView extends Component { return <NotificationStripe show={this.state.showStripeMessage} message={this.state.stripeMessage} onClose={this.onStripeCloseClicked} isError={this.state.stripeMessageIsError} />; } - const firstParticipant = this.state.report.participants[0]; - const firstDiscordUser = firstParticipant.discordUser; - const firstParticipantAvatarUri = avatarUriForAvatar(firstDiscordUser.avatar, firstDiscordUser.id); - const participantForId = {}; this.state.report.participants.forEach((participant) => { participantForId[participant._id] = participant; @@ -298,7 +304,7 @@ class ReportView extends Component { </span> </div> <div className="d-flex flex-wrap mt-5 justify-content-center"> - { this.state.report.participants.map((participant, i) => <Scorer {...participant.discordUser} index={i} points={pointsForParticipantId[participant._id]} key={participant._id} />) } + { getParticipantsAsScorerElements(this.state.report.participants, pointsForParticipantId) } </div> <table className="table mt-5 table-bordered table-hover"> <thead>
7
diff --git a/userscript.user.js b/userscript.user.js @@ -888,7 +888,7 @@ var $$IMU_EXPORT$$; category: "rules", options: { glob: { - name: "Adblock-like" + name: "Simple (glob)" }, regex: { name: "Regex" @@ -1173,6 +1173,7 @@ var $$IMU_EXPORT$$; for (var i = 0; i < blacklist.length; i++) { var current = blacklist[i].replace(/^\s+|\s+$/, ""); + //console_log(current); if (current.length === 0) continue; @@ -1180,9 +1181,40 @@ var $$IMU_EXPORT$$; blacklist_regexes.push(new RegExp(current)); } else if (settings.bigimage_blacklist_engine === "glob") { var newcurrent = ""; + var sbracket = -1; + var cbracket = -1; for (var j = 0; j < current.length; j++) { + if (sbracket >= 0) { + if (current[j] === "]") { + newcurrent += current.substr(sbracket, j - sbracket + 1); + sbracket = -1; + } + continue; + } + + if (cbracket >= 0) { + if (current[j] === "}") { + var options = current.substr(cbracket + 1, j - cbracket - 1).split(","); + var newoptions = []; + for (var k = 0; k < options.length; k++) { + newoptions.push(options[k].replace(/(.)/g, "[$1]")); + } + if (newoptions.length > 0 && (newoptions.length > 1 || newoptions[0].length > 0)) + newcurrent += "(?:" + newoptions.join("|") + ")"; + cbracket = -1; + } + + continue; + } + if (current[j] !== "*") { - if (current[j] === ".") { + if (current[j] === "{") { + cbracket = j; + } else if (current[j] === "[") { + sbracket = j; + } else if (current[j] === "?") { + newcurrent += "[^/]"; + } else if (current[j] === ".") { newcurrent += "\\."; } else { newcurrent += current[j]; @@ -1199,9 +1231,9 @@ var $$IMU_EXPORT$$; } if (doublestar) - newcurrent += ".*"; + newcurrent += ".+"; else - newcurrent += "[^/]*"; + newcurrent += "[^/]+"; } current = newcurrent; @@ -31745,7 +31777,11 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { } function upgrade_settings(cb) { + try { create_blacklist_regexes(); + } catch(e) { + console_error(e); + } // TODO: merge this get_value in do_config for performance get_value("settings_version", function(version) {
7
diff --git a/story.js b/story.js @@ -158,8 +158,12 @@ class Conversation extends EventTarget { done, } = await aiScene.generateChatMessage(this.messages, this.remotePlayer.name); + if (!this.messages.some(m => m.text === comment && m.player === this.remotePlayer)) { this.addRemotePlayerMessage(comment); done && this.finish(); + } else { + this.finish(); + } }); } progressSelf() { @@ -172,8 +176,12 @@ class Conversation extends EventTarget { done, } = await aiScene.generateChatMessage(this.messages, this.localPlayer.name); + if (!this.messages.some(m => m.text === comment && m.player === this.localPlayer)) { this.addLocalPlayerMessage(comment); done && this.finish(); + } else { + this.finish(); + } }); } progressSelfOptions() {
0
diff --git a/packages/component-library/src/ChartContainer/ChartContainer.js b/packages/component-library/src/ChartContainer/ChartContainer.js @@ -15,7 +15,7 @@ const subtitleStyle = css` font-family: 'Roboto Condensed', 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; text-align: center; - margin: 0; + margin: 10px 0; `; /**
3
diff --git a/examples/DrawControl.ipynb b/examples/DrawControl.ipynb " circlemarker={},\n", " )\n", "\n", - "def handle_draw(self, action, geo_json):\n", + "def handle_draw(target, action, geo_json):\n", " print(action)\n", " print(geo_json)\n", "\n", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.8.2" } }, "nbformat": 4,
10
diff --git a/src/js/views/settings/NostrSettings.jsx b/src/js/views/settings/NostrSettings.jsx @@ -9,29 +9,41 @@ const bech32 = require('bech32-buffer'); const NostrSettings = () => { const [relays, setRelays] = useState(Array.from(Nostr.relays.values())); const [newRelayUrl, setNewRelayUrl] = useState(""); // added state to store the new relay URL + const [maxRelays, setMaxRelays] = useState(Nostr.maxRelays); setInterval(() => { setRelays(Array.from(Nostr.relays.values())); }, 1000); const handleConnectClick = (relay) => { + iris.local().get('relays').get(relay.url).put({ enabled: true }); relay.connect(); }; const handleDisconnectClick = (relay) => { + iris.local().get('relays').get(relay.url).put({ enabled: false }); relay.close(); }; const handleRemoveRelay = (relay) => { + iris.local().get('relays').get(relay.url).put(null); Nostr.removeRelay(relay.url); }; const handleAddRelay = (event) => { + iris.local().get('relays').get(newRelayUrl).put({ enabled: true }); event.preventDefault(); // prevent the form from reloading the page Nostr.addRelay(newRelayUrl); // add the new relay using the Nostr method setNewRelayUrl(""); // reset the new relay URL } + const maxRelaysChanged = (event) => { + // parse int + const maxRelays = parseInt(event.target.value); + Nostr.maxRelays = maxRelays; + setMaxRelays(maxRelays); + } + const getStatus = (relay) => { try { return relay.status; @@ -96,6 +108,13 @@ const NostrSettings = () => { </div> <h3>Relays</h3> + <p> + Max relays: <input + type="number" + value={maxRelays} + onChange={maxRelaysChanged} + /> + </p> <div id="peers" className="flex-table"> {relays.map((relay) => ( <div className="flex-row peer">
12
diff --git a/server/interpreter.js b/server/interpreter.js @@ -310,7 +310,7 @@ Interpreter.prototype.step = function() { (typeof e === 'object' || typeof e === 'function')) { throw TypeError('Unexpected exception value ' + String(e)); } - this.unwind_(Interpreter.Completion.THROW, e, undefined); + this.unwind_(Interpreter.CompletionType.THROW, e, undefined); } if (nextState) { stack.push(nextState); @@ -358,7 +358,7 @@ Interpreter.prototype.run = function() { !(e instanceof this.Object)) { throw TypeError('Unexpected exception value ' + String(e)); } - this.unwind_(Interpreter.Completion.THROW, e, undefined); + this.unwind_(Interpreter.CompletionType.THROW, e, undefined); nextState = undefined; } if (nextState) { @@ -2296,7 +2296,7 @@ Interpreter.prototype.setValue = function(scope, ref, value, perms) { * Completion Value Types. * @enum {number} */ -Interpreter.Completion = { +Interpreter.CompletionType = { NORMAL: 0, BREAK: 1, CONTINUE: 2, @@ -2315,12 +2315,12 @@ Interpreter.Completion = { * target label of a break statement can be the statement itself * (e.g., `foo: break foo;`). * @private - * @param {Interpreter.Completion} type Completion type. + * @param {Interpreter.CompletionType} type Completion type. * @param {Interpreter.Value=} value Value computed, returned or thrown. * @param {string=} label Target label for break or return. */ Interpreter.prototype.unwind_ = function(type, value, label) { - if (type === Interpreter.Completion.NORMAL) { + if (type === Interpreter.CompletionType.NORMAL) { throw TypeError('Should not unwind for NORMAL completions'); } @@ -2333,16 +2333,16 @@ Interpreter.prototype.unwind_ = function(type, value, label) { case 'CallExpression': case 'NewExpression': switch (type) { - case Interpreter.Completion.BREAK: - case Interpreter.Completion.CONTINUE: + case Interpreter.CompletionType.BREAK: + case Interpreter.CompletionType.CONTINUE: throw Error('Unsynatctic break/continue not rejected by Acorn'); - case Interpreter.Completion.RETURN: + case Interpreter.CompletionType.RETURN: state.value = value; return; } break; } - if (type === Interpreter.Completion.BREAK) { + if (type === Interpreter.CompletionType.BREAK) { if (label ? (state.labels && state.labels.indexOf(label) !== -1) : (state.isLoop || state.isSwitch)) { // Top of stack is now target of break. But we are breaking @@ -2350,7 +2350,7 @@ Interpreter.prototype.unwind_ = function(type, value, label) { stack.pop(); return; } - } else if (type === Interpreter.Completion.CONTINUE) { + } else if (type === Interpreter.CompletionType.CONTINUE) { if (label ? (state.labels && state.labels.indexOf(label) !== -1) : state.isLoop) { return; @@ -2361,7 +2361,7 @@ Interpreter.prototype.unwind_ = function(type, value, label) { // Unhandled completion. Terminate thread. this.thread.status = Interpreter.Thread.Status.ZOMBIE; - if (type === Interpreter.Completion.THROW) { + if (type === Interpreter.CompletionType.THROW) { // Log exception and stack trace. if (value instanceof this.Error) { console.log('Unhandled %s', value); @@ -4522,7 +4522,7 @@ stepFuncs_['BlockStatement'] = function (stack, state, node) { * @return {!Interpreter.State|undefined} */ stepFuncs_['BreakStatement'] = function (stack, state, node) { - this.unwind_(Interpreter.Completion.BREAK, undefined, + this.unwind_(Interpreter.CompletionType.BREAK, undefined, node['label'] ? node['label']['name'] : undefined); }; @@ -4681,7 +4681,7 @@ stepFuncs_['ConditionalExpression'] = function (stack, state, node) { * @return {!Interpreter.State|undefined} */ stepFuncs_['ContinueStatement'] = function (stack, state, node) { - this.unwind_(Interpreter.Completion.CONTINUE, undefined, + this.unwind_(Interpreter.CompletionType.CONTINUE, undefined, node['label'] ? node['label']['name'] : undefined); }; @@ -5103,7 +5103,7 @@ stepFuncs_['ReturnStatement'] = function (stack, state, node) { state.done_ = true; return new Interpreter.State(node['argument'], state.scope); } - this.unwind_(Interpreter.Completion.RETURN, state.value, undefined); + this.unwind_(Interpreter.CompletionType.RETURN, state.value, undefined); }; /** @@ -5230,7 +5230,7 @@ stepFuncs_['TryStatement'] = function (stack, state, node) { state.doneBlock_ = true; return new Interpreter.State(node['block'], state.scope); } - if (state.cv && state.cv.type === Interpreter.Completion.THROW && + if (state.cv && state.cv.type === Interpreter.CompletionType.THROW && !state.doneHandler_ && node['handler']) { state.doneHandler_ = true; var nextState = new Interpreter.State(node['handler'], state.scope);
10
diff --git a/src/Tracker.js b/src/Tracker.js @@ -6,7 +6,6 @@ const carbonToken = process.env.DISCORD_CARBON_TOKEN; const botsDiscordPwToken = process.env.DISCORD_BOTS_WEB_TOKEN; const botsDiscordPwUser = process.env.DISCORD_BOTS_WEB_USER; const updateInterval = process.env.TRACKERS_UPDATE_INTERVAL || 2600000; -const discordListToken = process.env.DISCORD_LIST_TOKEN; const cachetToken = process.env.CACHET_TOKEN; const cachetHost = process.env.CACHET_HOST; const metricId = process.env.CACHET_BOT_METRIC_ID; @@ -38,9 +37,6 @@ class Tracker { if (botsDiscordPwToken && botsDiscordPwUser) { setInterval(() => this.updateDiscordBotsWeb(this.client.guilds.size), updateInterval); } - if (discordListToken) { - setInterval(() => this.updateDiscordList(this.client.guilds.size), updateInterval); - } if (cachetToken && cachetHost && metricId) { setInterval(() => this.postHeartBeat(), heartBeatTime); } @@ -70,37 +66,12 @@ class Tracker { .then((parsedBody) => { this.logger.debug(parsedBody); }) - .catch((error) => this.logger.error(`Error updating carbonitex. Token: ${carbonToken} | Error Code: ${error.statusCode} | Guilds: ${guildsLen}`)); + .catch(error => this.logger.error(`Error updating carbonitex. Token: ${carbonToken} | Error Code: ${error.statusCode} | Guilds: ${guildsLen}`)); }) .catch(this.logger.error); } } - /** - * Updates discordlist.net if the corresponding token is provided - * @param {number} guildsLen number of guilds that this bot is present on - */ - updateDiscordList(guildsLen) { - if (discordListToken) { - this.logger.debug('Updating DiscordList'); - this.logger.debug(`${this.client.user.username} is on ${guildsLen} servers`); - - const requestBody = { - url: 'https://bots.discordlist.net/api', - body: { - token: discordListToken, - servers: guildsLen, - }, - json: true, - }; - request(requestBody) - .then((parsedBody) => { - this.logger.debug(parsedBody); - }) - .catch(error => this.logger.error(`Error updating DiscordList. Token: ${discordListToken} | Error Code: ${error.statusCode}`)); - } - } - /** * Updates bots.discord.pw if the corresponding token is provided * @param {number} guildsLen number of guilds that this bot is present on @@ -138,7 +109,6 @@ class Tracker { updateAll(guildsLen) { this.updateCarbonitex(guildsLen); this.updateDiscordBotsWeb(guildsLen); - this.updateDiscordList(guildsLen); } /**
2
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -6684,7 +6684,7 @@ function fiftnsixtnCalc() { for (var i = 0; i < input.length; i++) { print+="f"; - fiftn += (16 - parseInt(input[i],16)).toString(16); + fiftn += (15 - parseInt(input[i],16)).toString(16); } sixtn = (parseInt(fiftn,16) + 1).toString(16);
1
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/field/collection/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/field/collection/template.vue export default { mixins: [ VueFormGenerator.abstractField ], beforeMount(){ - console.log("value: ", this.value) - console.log("schema.items: ", this.schema.items) +// console.log("value: ", this.value) +// console.log("schema.items: ", this.schema.items) // this.model[this.schema.model] = this.value var model = this.value /* if model already has child items, create a schema for each */ } }, mounted(){ - console.log('this.model: ', this.model) +// console.log('this.model: ', this.model) if(this.schema.multifield){ $(this.$refs.collapsible).collapsible() } return false }, itemName(item, index) { + if(this.schema.fieldLabel) { const len = this.schema.fieldLabel.length for(let i=0; i<len; i++){ let label = this.schema.fieldLabel[i] let childItem = this.model.children[index] - console.log('child item: ', childItem) + // console.log('child item: ', childItem) if(childItem[label]){ return childItem[label] } } + } return parseInt(index) + 1 }, onAddItem(e){
9
diff --git a/.storybook/storybook-data.js b/.storybook/storybook-data.js @@ -481,27 +481,6 @@ module.exports = [ }, }, }, - { - id: 'settings--vrt-editing-settings-module', - kind: 'Settings', - name: 'VRT: Editing Settings Module', - story: 'VRT: Editing Settings Module', - parameters: { - fileName: './stories/settings.stories.js', - options: { - hierarchyRootSeparator: '|', - hierarchySeparator: {}, - delay: 2000, - clickSelectors: [ - '#googlesitekit-settings-module__header--analytics', - '.googlesitekit-settings-module__edit-button', - ], - hoverSelector: '.googlesitekit-settings-module__title', - postInteractionWait: 3000, - onReadyScript: 'mouse.js', - }, - }, - }, { id: 'settings--connect-more-services', kind: 'Settings',
2
diff --git a/src/main/index.js b/src/main/index.js @@ -34,12 +34,6 @@ if (process.platform === 'win32') { const squirrelWin32 = require('./squirrel-win32') shouldQuit = squirrelWin32.handleEvent(argv[0]) argv = argv.filter((arg) => !arg.includes('--squirrel')) - - if (shouldQuit) { - app.quit() - } else { - app.on('second-instance', (event, commandLine) => onAppOpen(commandLine)) - } } if (!shouldQuit && !config.IS_PORTABLE) { @@ -55,14 +49,11 @@ if (!shouldQuit && !config.IS_PORTABLE) { if (shouldQuit) { app.quit() } else { - app.on('second-instance', (event, commandLine, workingDirectory) => onAppOpen(commandLine)) -} - -if (!shouldQuit) { init() } function init () { + app.on('second-instance', (event, commandLine, workingDirectory) => onAppOpen(commandLine)) if (config.IS_PORTABLE) { const path = require('path') // Put all user data into the "Portable Settings" folder
7
diff --git a/angular/projects/spark-angular/src/lib/components/inputs/Text.stories.ts b/angular/projects/spark-angular/src/lib/components/inputs/Text.stories.ts @@ -150,7 +150,7 @@ disabledTextInput.story = { export const hugeTextInput = () => ({ moduleMetadata: modules, template: ` - <sprk-huge-input-container> + <sprk-input-container variant="huge"> <input placeholder="Placeholder" name="text_input_huge" @@ -161,7 +161,7 @@ export const hugeTextInput = () => ({ variant="huge" /> <label sprkLabel>Huge Text Input</label> - </sprk-huge-input-container> + </sprk-input-container> `, }); @@ -169,7 +169,7 @@ hugeTextInput.story = { name: 'Huge', parameters: { jest: [ - 'sprk-huge-input-container.component', + 'sprk-input-container.component', 'sprk-input.directive', 'sprk-label.directive', ], @@ -179,7 +179,7 @@ hugeTextInput.story = { export const invalidHugeTextInput = () => ({ moduleMetadata: modules, template: ` - <sprk-huge-input-container> + <sprk-input-container variant="huge"> <input placeholder="Placeholder" name="text_input_huge" @@ -194,12 +194,12 @@ export const invalidHugeTextInput = () => ({ <label sprkLabel>Huge Text Input</label> <span sprkFieldError> <sprk-icon - iconType="exclamation-filled-small" + iconType="exclamation-filled" additionalClasses="sprk-b-ErrorIcon" ></sprk-icon> <div class="sprk-b-ErrorText">There is an error on this field.</div> </span> - </sprk-huge-input-container> + </sprk-input-container> `, }); @@ -207,7 +207,7 @@ invalidHugeTextInput.story = { name: 'Huge Invalid', parameters: { jest: [ - 'sprk-huge-input-container.component', + 'sprk-input-container.component', 'sprk-input.directive', 'sprk-label.directive', 'sprk-field-error.directive', @@ -218,7 +218,7 @@ invalidHugeTextInput.story = { export const disabledHugeTextInput = () => ({ moduleMetadata: modules, template: ` - <sprk-huge-input-container> + <sprk-input-container variant="huge"> <input placeholder="Placeholder" name="text_input_huge" @@ -230,12 +230,110 @@ export const disabledHugeTextInput = () => ({ disabled /> <label class="sprk-b-Label--disabled" sprkLabel>Huge Text Input</label> - </sprk-huge-input-container> + </sprk-input-container> `, }); disabledHugeTextInput.story = { name: 'Huge Disabled', + parameters: { + jest: [ + 'sprk-input-container.component', + 'sprk-input.directive', + 'sprk-label.directive', + ], + }, +}; + +export const legacyHugeTextInput = () => ({ + moduleMetadata: modules, + template: ` + <sprk-huge-input-container> + <input + placeholder="Placeholder" + name="text_input_huge" + type="text" + [(ngModel)]="text_input_huge" + #textInput="ngModel" + sprkInput + variant="huge" + /> + <label sprkLabel>Huge Text Input</label> + </sprk-huge-input-container> + `, +}); + +legacyHugeTextInput.story = { + name: 'Legacy Huge (Deprecated)', + parameters: { + jest: [ + 'sprk-huge-input-container.component', + 'sprk-input.directive', + 'sprk-label.directive', + ], + }, +}; + +export const legacyInvalidHugeTextInput = () => ({ + moduleMetadata: modules, + template: ` + <sprk-huge-input-container> + <input + placeholder="Placeholder" + name="text_input_huge" + type="text" + [(ngModel)]="text_input_huge" + #textInput="ngModel" + class="sprk-b-TextInput--error" + aria-invalid="true" + sprkInput + variant="huge" + /> + <label sprkLabel>Huge Text Input</label> + <span sprkFieldError> + <sprk-icon + iconType="exclamation-filled" + additionalClasses="sprk-b-ErrorIcon" + ></sprk-icon> + <div class="sprk-b-ErrorText">There is an error on this field.</div> + </span> + </sprk-huge-input-container> + `, +}); + +legacyInvalidHugeTextInput.story = { + name: 'Legacy Huge Invalid (Deprecated)', + parameters: { + jest: [ + 'sprk-huge-input-container.component', + 'sprk-input.directive', + 'sprk-label.directive', + 'sprk-field-error.directive', + ], + }, +}; + +export const legacyDisabledHugeTextInput = () => ({ + moduleMetadata: modules, + template: ` + <sprk-huge-input-container> + <input + placeholder="Placeholder" + name="text_input_huge" + type="text" + [(ngModel)]="text_input_huge" + #textInput="ngModel" + sprkInput + variant="huge" + disabled + /> + <label class="sprk-b-Label--disabled" sprkLabel>Huge Text Input</label> + </sprk-huge-input-container> + `, +}); + +legacyDisabledHugeTextInput.story = { + name: 'Legacy Huge Disabled (Deprecated)', parameters: { jest: [ 'sprk-huge-input-container.component',
3
diff --git a/proto/server.js b/proto/server.js @@ -22,7 +22,11 @@ const app = express() let savedMarkers = {} const latexCommandCache = {} cacheLatexCommands() - +app.use(function(req, res, next) { + res.header("Access-Control-Allow-Origin", "*"); + res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + next(); +}); app.use('/teacher.js', babelify(__dirname + '/teacher.front.js')) app.use('/tests.js', babelify(__dirname + '/../test/tests.front.js')) app.use('/rich-text-editor-bundle.js', babelify(__dirname + '/rich-text-editor-bundle.js'))
12
diff --git a/packages/bitcore-node/test/integration/models/transaction.spec.ts b/packages/bitcore-node/test/integration/models/transaction.spec.ts @@ -3,12 +3,12 @@ import { expect } from 'chai'; import * as crypto from 'crypto'; import { CoinStorage, ICoin } from '../../../src/models/coin'; import { IBtcTransaction, SpendOp, TransactionStorage } from '../../../src/models/transaction'; +import { WalletAddressStorage } from '../../../src/models/walletAddress'; +import { EthTransactionStorage } from '../../../src/modules/ethereum/models/transaction'; import { SpentHeightIndicators } from '../../../src/types/Coin'; +import { unprocessedEthBlocks } from '../../data/ETH/unprocessedBlocksETH'; import { resetDatabase } from '../../helpers'; import { intAfterHelper, intBeforeHelper } from '../../helpers/integration'; -import { unprocessedEthBlocks } from '../../data/ETH/unprocessedBlocksETH'; -import { WalletAddressStorage } from '../../../src/models/walletAddress'; -import { EthTransactionStorage } from '../../../src/modules/ethereum/models/transaction'; async function makeMempoolTxChain(chain: string, network: string, startingTxid: string, chainLength = 1) { let txid = startingTxid; @@ -206,7 +206,7 @@ describe('Transaction Model', function() { describe('#batchImport', () => { const chain = 'ETH'; - const network = 'testnet'; + const network = 'regtest'; const wallet = new ObjectId(); const address = '0x3Ec3dA6E14BE9518A9a6e92DdCC6ACfF2CEFf4ef';
1
diff --git a/modules/layers/src/solid-polygon-layer/solid-polygon-layer.js b/modules/layers/src/solid-polygon-layer/solid-polygon-layer.js @@ -269,9 +269,9 @@ export default class SolidPolygonLayer extends Layer { geometry: new Geometry({ drawMode: GL.TRIANGLES, attributes: { - vertexPositions: {size: 2, isInstanced: true, value: new Float32Array([0, 1])}, - nextPositions: {size: 3, isInstanced: true, value: new Float32Array(3)}, - nextPositions64xyLow: {size: 2, isInstanced: true, value: new Float32Array(2)} + vertexPositions: {size: 2, constant: true, value: new Float32Array([0, 1])}, + nextPositions: {size: 3, constant: true, value: new Float32Array(3)}, + nextPositions64xyLow: {size: 2, constant: true, value: new Float32Array(2)} } }), uniforms: {
2
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue <template> -<div class="container"> +<div class="explorer container"> <template v-for="segment in pathSegments"> - <admin-components-action v-bind:model="{ target: segment.path, title: segment.name, command: 'selectPath', classes: 'btn waves-effect waves-light'}"></admin-components-action> + <admin-components-action + v-bind:model="{ + target: segment.path, + title: segment.name, + command: 'selectPath', + classes: 'btn waves-effect waves-light blue-grey darken-3' + }"> + </admin-components-action> </template> <div v-if="pt"> <ul v-if="pt" class="collection"> - <a class="collection-item" v-for="child in pt.children" v-if="checkIfAllowed(child.resourceType)"> - <admin-components-action v-bind:model="{ target: child.path, title: child.name, command: 'selectPath' }"></admin-components-action> - &nbsp; - <a traget="viewer" v-bind:href="viewUrl(child.path)" class="secondary-content"><i class="material-icons">send</i></a> - &nbsp; - <admin-components-action v-bind:model="{ target: child.path, command: 'editPage', classes: 'secondary-content'}"> + <a + class ="collection-item" + v-for ="child in pt.children" + v-if ="checkIfAllowed(child.resourceType)"> + <admin-components-action + v-bind:model="{ + target: child.path, + title: child.name, + command: 'selectPath' + }"> + </admin-components-action> + + <div class="secondary-content"> + <admin-components-action + v-bind:model="{ + target: child.path, + command: 'editPage' + }"> <i class="material-icons">edit</i> </admin-components-action> + <span> + <a + traget ="viewer" + v-bind:href ="viewUrl(child.path)"> + <i class="material-icons">visibility</i> + </a> + </span> + </div> </a> </ul> <script> export default { - props: ['model'] - , + props: ['model'], data: function() { var dataFrom = this.model.dataFrom
7
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -2837,6 +2837,11 @@ function solvehollowsphere() { var voltemp = ""; var tsatemp = ""; if (radius1 != "" && radius2 != "") { + if(radius1 <= radius2) + { + tsatemp="Outer radius should be greater than inner radius"; + } + else{ voltemp += "\\[ \\frac{4}{3} \\times \\pi \\times (" + radius1 + "^3-" + radius2 + "^3) \\]"; voltemp += "\\[Volume \\space of \\space Hollow \\space Sphere \\space is \\space " + eval(String(4 * 3.14159 * ((radius1 * radius1 * radius1) - (radius2 * radius2 * radius2)) / 3)) + "\\]"; voloutput.innerHTML = voltemp; @@ -2844,6 +2849,7 @@ function solvehollowsphere() { tsatemp += "\\[Total \\space Surface \\space Area \\space of \\space Hollow \\space Sphere \\space is \\space \\]"; tsatemp += "\\[" + eval(String(4 * 3.14159 * ((radius1 * radius1) - (radius2 * radius2)))) + "\\]"; + } tsaoutput.innerHTML = tsatemp; renderMathInElement(voloutput); renderMathInElement(tsaoutput);
1
diff --git a/modules/@apostrophecms/schema/index.js b/modules/@apostrophecms/schema/index.js @@ -1814,7 +1814,7 @@ module.exports = { } forSchema(manager.schema, doc); } else if (doc.metaType === 'widget') { - const manager = self.apos.doc.getManager(doc.type); + const manager = self.apos.area.getWidgetManager(doc.type); if (!manager) { return; }
4
diff --git a/articles/quickstart/spa/_includes/_install_auth0js.md b/articles/quickstart/spa/_includes/_install_auth0js.md ## Install auth0.js You need the auth0.js library to integrate Auth0 into your application. + Install auth0.js. + ```bash # installation with npm npm install --save auth0-js
0
diff --git a/cravat/constants.py b/cravat/constants.py @@ -245,6 +245,7 @@ base_smartfilters = [ ] module_tag_desc = { + 'allele frequency': 'modules for studying allele frequency across populations', 'cancer': 'tools for cancer research', 'clinical relevance': 'tools for assessing clinical relevance of variants', 'converters': 'modules for using the result of other tools as open-cravat input', @@ -257,7 +258,6 @@ module_tag_desc = { 'literature': 'modules for variant-related literature', 'multiple assays': 'modules for multiplex assays', 'non coding': 'modules for studying noncoding variants', - 'populations': 'modules for studying population statistics of variants', 'protein visualization': 'modules to visualize variants on protein structures', 'reporters': 'modules for generating output formats', 'variant effect prediction': 'modules to predict variant effects',
10
diff --git a/token-metadata/0x4639cd8cd52EC1CF2E496a606ce28D8AfB1C792F/metadata.json b/token-metadata/0x4639cd8cd52EC1CF2E496a606ce28D8AfB1C792F/metadata.json "symbol": "BREE", "address": "0x4639cd8cd52EC1CF2E496a606ce28D8AfB1C792F", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/encoded/tests/data/inserts/human_donor.json b/src/encoded/tests/data/inserts/human_donor.json "_test": "has references", "accession": "ENCDO000HUM", "award": "U41HG006992", - "children": [ - "ENCDO017AAA", - "ENCDO275AAA" - ], "documents": [ "encode:PanIsletD_Crawford_protocol" ],
3
diff --git a/src/layer/tile/GroupTileLayer.js b/src/layer/tile/GroupTileLayer.js @@ -4,9 +4,11 @@ import TileLayer from './TileLayer'; /** * @classdesc - * A layer used to display a group of tile layers + * A layer used to display a group of tile layers. <br> + * Its performance is better than add TileLayers seperately and it can prevent the warning: <br> + * "WARNING: Too many active WebGL contexts. Oldest context will be lost" on chrome * @category layer - * @extends Layer + * @extends TileLayer * @param {String|Number} id - tile layer's id * @param {Object} [options=null] - options defined in [TileLayer]{@link TileLayer#options} * @example @@ -41,6 +43,12 @@ class GroupTileLayer extends TileLayer { return new GroupTileLayer(layerJSON['id'], layers, layerJSON['options']); } + /** + * @param {String|Number} id - layer's id + * @param {TileLayer[]} layers - TileLayers to add + * @param {Object} [options=null] - construct options + * @param {*} [options.*=null] - options defined in [TileLayer]{@link TileLayer#options} + */ constructor(id, layers, options) { super(id, options); this.layers = layers || []; @@ -55,7 +63,7 @@ class GroupTileLayer extends TileLayer { } /** - * Export the tile layer's profile json. <br> + * Export the GroupTileLayer's profile json. <br> * Layer's profile is a snapshot of the layer in JSON format. <br> * It can be used to reproduce the instance by [fromJSON]{@link Layer#fromJSON} method * @return {Object} layer's profile JSON
3
diff --git a/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.tsx.ejs -%> import './header.<%= styleSheetExt %>'; -import React, { useState } from 'react'; +import React, { useState<% if (enableI18nRTL) { %>, useEffect<% } %> } from 'react'; import { Translate<% if (enableTranslation) { %>, Storage<% } %> } from 'react-jhipster'; import { Navbar, @@ -55,9 +55,7 @@ export interface IHeaderProps { const Header = (props: IHeaderProps) => { const [menuOpen, setMenuOpen] = useState(false); <%_ if (enableI18nRTL) { _%> - componentDidMount () { - document.querySelector('html').setAttribute('dir', isRTL(Storage.session.get('locale')) ? 'rtl' : 'ltr'); - }; + useEffect(() => document.querySelector('html').setAttribute('dir', isRTL(Storage.session.get('locale')) ? 'rtl' : 'ltr')); <%_ } _%> <%_ if (enableTranslation) { _%>
14
diff --git a/test/jasmine/tests/updatemenus_test.js b/test/jasmine/tests/updatemenus_test.js @@ -734,3 +734,69 @@ describe('update menus interactions', function() { return button; } }); + + +describe('update menus interaction with other components:', function() { + 'use strict'; + + afterEach(destroyGraphDiv); + + it('buttons show be drawn above sliders', function(done) { + + Plotly.plot(createGraphDiv(), [{ + x: [1, 2, 3], + y: [1, 2, 1] + }], { + sliders: [{ + xanchor: 'right', + x: -0.05, + y: 0.9, + len: 0.3, + steps: [{ + label: 'red', + method: 'restyle', + args: [{'line.color': 'red'}] + }, { + label: 'orange', + method: 'restyle', + args: [{'line.color': 'orange'}] + }, { + label: 'yellow', + method: 'restyle', + args: [{'line.color': 'yellow'}] + }] + }], + updatemenus: [{ + buttons: [{ + label: 'markers and lines', + method: 'restyle', + args: [{ 'mode': 'markers+lines' }] + }, { + label: 'markers', + method: 'restyle', + args: [{ 'mode': 'markers' }] + }, { + label: 'lines', + method: 'restyle', + args: [{ 'mode': 'lines' }] + }] + }] + }) + .then(function() { + var infoLayer = d3.select('g.infolayer'); + var containerClassNames = ['slider-container', 'updatemenu-container']; + var list = []; + + infoLayer.selectAll('*').each(function() { + var className = d3.select(this).attr('class'); + + if(containerClassNames.indexOf(className) !== -1) { + list.push(className); + } + }); + + expect(list).toEqual(containerClassNames); + }) + .then(done); + }); +});
0
diff --git a/addon/templates/components/polaris-avatar.hbs b/addon/templates/components/polaris-avatar.hbs {{#if shouldShowImage}} {{!-- TODO: replace this with polaris-image when implemented. --}} <img + {{! template-lint-disable no-invalid-interactive }} class="Polaris-Avatar__Image" src={{finalSource}} alt=""
8
diff --git a/package.json b/package.json "prettier": "^1.18.2", "solhint": "^2.1.0", "truffle": "^5.0.24", - "ethereumjs-abi": "^0.6.7", - "truffle-flattener": "^1.4.0" + "ethereumjs-abi": "^0.6.7" }, "prettier": { "trailingComma": "es5",
2
diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx @@ -26,6 +26,7 @@ const SplitPane = createClass({ if(paneSize){ this.setState({ size : paneSize, + dividerSize : paneSize, screenWidth : window.innerWidth }); } @@ -37,19 +38,24 @@ const SplitPane = createClass({ }, changeSize : function() { - const oldWidth = this.state.screenWidth; const oldLoc = this.state.size; - const newLoc = this.limitPosition(window.innerWidth * (oldLoc / oldWidth)); + const oldWidth = this.state.screenWidth; + let newLoc = oldLoc; + // Allow divider to increase in size to original position + if(window.innerWidth > oldWidth) { + newLoc = Math.min(oldLoc * (window.innerWidth / this.state.screenWidth), this.state.dividerSize); + } + // Limit current position to between 10% and 90% of visible space + newLoc = this.limitPosition(newLoc, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); + this.setState({ size : newLoc, screenWidth : window.innerWidth }); }, - limitPosition : function(x) { - const minWidth = 1; - const maxWidth = window.innerWidth - 13; - const result = Math.min(maxWidth, Math.max(minWidth, x)); + limitPosition : function(x, min = 1, max = window.innerWidth - 13) { + const result = Math.round(Math.min(max, Math.max(min, x))); return result; }, @@ -71,7 +77,8 @@ const SplitPane = createClass({ const newSize = this.limitPosition(e.pageX); this.setState({ - size : newSize + size : newSize, + dividerSize : newSize }); }, /*
11
diff --git a/samples/javascript_nodejs/09.message-routing/bot.js b/samples/javascript_nodejs/09.message-routing/bot.js // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -const { ActivityTypes, CardFactory } = require('botbuilder'); +const { ActivityTypes } = require('botbuilder'); const { DialogSet, DialogTurnStatus } = require('botbuilder-dialogs'); -const { GreetingState } = require('./dialogs/greeting/greetingState'); const { GreetingDialog } = require('./dialogs/greeting'); // Greeting Dialog ID
2
diff --git a/src/components/signup/SignupState.js b/src/components/signup/SignupState.js @@ -104,6 +104,9 @@ const Signup = ({ navigation, screenProps }: { navigation: any, screenProps: any const { init } = await import('../../init') const login = import('../../lib/login/GoodWalletLogin') const { goodWallet, userStorage } = await init() + + //for QA + global.wallet = goodWallet initAnalytics(goodWallet, userStorage).then(_ => fireSignupEvent('STARTED')) //the login also re-initialize the api with new jwt
0
diff --git a/sirepo/package_data/static/json/jspec-schema.json b/sirepo/package_data/static/json/jspec-schema.json "length": ["Length [m]", "Float"], "section_number": ["Number of Coolers", "Integer", 1], "magnetic_field": ["Magnetic Field [T]", "Float", 0.039], - "bet_x": ["Horizontal Beta [m]", "Float", 10.0, "Beta function in horizontal direction"], - "bet_y": ["Vertical Beta [m]", "Float", 10.0, "Beta function in vertical direction"], - "disp_x": ["Horizontal Dispersion [m]", "Float", 0.0, "Dispersion in horizontal direction"], - "disp_y": ["Vertical Dispersion [m]", "Float", 0.0, "Dispersion in vertical direction"], - "alpha_x": ["Horizontal Alpha", "Float", 0.0, "Alpha in horizontal direction"], - "alpha_y": ["Vertical Alpha", "Float", 0.0, "Alpha in vertical direction"], - "disp_dx": ["Horizontal Dispersion Derivative", "Float", 0.0, "Derivative of the dispersion in horizontal direction"], - "disp_dy": ["Vertical Dispersion Derivative", "Float", 0.0, "Derivative of the dispersion in vertical direction"] + "bet_x": ["Horizontal Beta [m]", "Float", 10.0, "Beta function"], + "bet_y": ["Vertical Beta [m]", "Float", 10.0, "Beta function"], + "disp_x": ["Horizontal Dispersion [m]", "Float", 0.0], + "disp_y": ["Vertical Dispersion [m]", "Float", 0.0], + "alpha_x": ["Horizontal Alpha", "Float", 0.0], + "alpha_y": ["Vertical Alpha", "Float", 0.0], + "disp_dx": ["Horizontal Dispersion Derivative", "Float", 0.0, "Derivative of the dispersion"], + "disp_dy": ["Vertical Dispersion Derivative", "Float", 0.0, "Derivative of the dispersion"] }, "electronBeam": { "gamma": ["Gamma", "Float", null, "Lorentz factor gamma for the cooling electron beam."],
7
diff --git a/public/javascripts/SVValidate/mobile/mobileValidate.js b/public/javascripts/SVValidate/mobile/mobileValidate.js @@ -21,7 +21,8 @@ $(document).ready(function() { resizeMobileValidation(); - //add the 'animate-button-0' class to all validaton buttons so an animation is performed on click + // Add the 'animate-button-0' class to all validaton buttons so an animation is performed to + // confirm click. document.getElementById("validation-agree-button-0").classList.add("animate-button-0"); document.getElementById("validation-not-sure-button-0").classList.add("animate-button-0"); document.getElementById("validation-disagree-button-0").classList.add("animate-button-0");
3
diff --git a/articles/extensions/github-deploy.md b/articles/extensions/github-deploy.md @@ -18,8 +18,11 @@ Set the following configuration variables: - **GITHUB_REPOSITORY**: The repository from which you want to deploy rules and database scripts. This can be either a public or private repository. - **GITHUB_BRANCH**: The branch that the extension will monitor for commits. - **GITHUB_TOKEN**: Your GitHub personal access token. Follow the instructions at [Creating an access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/#creating-a-token) to create a token with `repo` scope. +- **GITHUB_HOST**: The public accessible GitHub Enterprise _(version 2.11.3 and later)_ host name, no value is required when using github.com (optional). +- **GITHUB_API_PATH**: GitHub Enterprise API path prefix, no value is required when using github.com (optional). - **SLACK_INCOMING_WEBHOOK_URL**: The Webhook URL for Slack, used in order to receive Slack notifications for successful and failed deployments (optional). + Once you have provided this information, click **Install**. Navigate to the [Extensions](${manage_url}/#/extensions) page and click on the __Installed Extensions__ tab.
0
diff --git a/app/pages/lab/project-details.cjsx b/app/pages/lab/project-details.cjsx @@ -30,6 +30,14 @@ module.exports = React.createClass backgroundError: null disciplineTagList: disciplineTagList otherTagList: otherTagList + researchers: [] + + componentWillMount: -> + @props.project.get('project_roles', page_size: 100).then (roles) => + scientists = for role in roles when 'scientist' in role.roles + role.get 'owner' + Promise.all(scientists).then (researchers) => + @setState({ researchers }) splitTags: (kind) -> disciplineTagList = [] @@ -41,6 +49,12 @@ module.exports = React.createClass otherTagList.push(t) {disciplineTagList, otherTagList} + researcherOptions: -> + options = [] + for researcher in @state.researchers + options.push Object.assign value: researcher.id, label: researcher.display_name + options + render: -> # Failures on media GETs are acceptable here, # but the JSON-API lib doesn't cache failed requests, @@ -127,6 +141,11 @@ module.exports = React.createClass <AutoSave resource={@props.project}> <span className="form-label">Researcher Quote</span> <br /> + <Select + placeholder="Choose a Researcher" + onChange={@handleResearcherChange} + options={@researcherOptions()} + value={@props.project.configuration.researcherID} /> <textarea className="standard-input full" name="researcher_quote" value={@props.project.researcher_quote} onChange={handleInputChange.bind @props.project} /> </AutoSave> <small className="form-help">This text will appear on a project landing page alongside an avatar of the selected researcher. <CharLimit limit={255} string={@props.project.researcher_quote ? ''} /></small> @@ -181,6 +200,12 @@ module.exports = React.createClass allTags = newTags.concat @state.otherTagList @handleTagChange(allTags) + handleResearcherChange: (option) -> + @props.project.update({ + 'configuration.researcherID': option?.value || "" + }) + @props.project.save() + handleOtherTagChange: (options) -> newTags = options.map (option) -> option.value
11
diff --git a/src/components/pagination/pagination.js b/src/components/pagination/pagination.js @@ -194,7 +194,7 @@ const Pagination = { $el.addClass(`${params.modifierClass}${params.type}-dynamic`); if (typeof params.dynamicBullets !== 'object') { params.dynamicBullets = { - numOfMainBullets: 1 + numOfMainBullets: 1, }; } params.dynamicBullets.indexOnMainBullets = 0;
0
diff --git a/resource/js/components/SearchTypeahead.js b/resource/js/components/SearchTypeahead.js @@ -128,7 +128,7 @@ export default class SearchTypeahead extends React.Component { let isHidden = (this.state.input === this.props.keywordOnInit); return isHidden ? <span></span> : ( - <button type="button" className="btn btn-link search-clear" onClick={this.restoreInitialData}> + <button type="button" className="btn btn-link search-clear" onMouseDown={this.restoreInitialData}> <i className="icon-close" /> </button> );
7
diff --git a/packages/lib-grommet-theme/src/index.js b/packages/lib-grommet-theme/src/index.js @@ -119,6 +119,12 @@ const theme = deepFreeze({ } }, colors, + drop: { + background: { + dark: 'dark-1', + light: 'light-1' + } + }, edgeSize: { xxsmall: '5px', xsmall: `10px`,
12
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + with: + submodules: true - uses: borales/[email protected] with: cmd: install # will run `yarn install` command
12
diff --git a/src/core/operations/GenerateQRCode.mjs b/src/core/operations/GenerateQRCode.mjs @@ -38,12 +38,14 @@ class GenerateQRCode extends Operation { { "name": "Module size (px)", "type": "number", - "value": 5 + "value": 5, + "min": 1 }, { "name": "Margin (num modules)", "type": "number", - "value": 2 + "value": 2, + "min": 0 }, { "name": "Error correction",
0
diff --git a/bower.json b/bower.json ], "dependencies": { "angular": "1.4.6", - "angular-foundation": "kakysha/angular-foundation#0.7.2", + "angular-foundation": "kakysha/angular-foundation#0.7.3", "angular-gettext": "2.1.0", "angular-touch": "1.4.6", "angular-carousel": "*",
9
diff --git a/src/javaHelpers.js b/src/javaHelpers.js --------------------------------------------------------------- */ function contains(value) { - return this.indexOf(value) >= 0; + return this.includes(value); } function replaceAll(oldValue, newValue) {
14
diff --git a/core/jazz_ui/src/app/secondary-components/create-service/oss/create-service.component.ts b/core/jazz_ui/src/app/secondary-components/create-service/oss/create-service.component.ts @@ -97,7 +97,7 @@ export class CreateServiceComponent implements OnInit { public buildEnvironment:any = environment; public deploymentTargets = this.buildEnvironment["INSTALLER_VARS"]["CREATE_SERVICE"]["DEPLOYMENT_TARGETS"]; - public apigeeFeature = (this.buildEnvironment.INSTALLER_VARS.feature.apigee === true) ? true : false; + public apigeeFeature = this.buildEnvironment.INSTALLER_VARS.feature.apigee && this.buildEnvironment.INSTALLER_VARS.feature.apigee.toString() === "true" ? true : false; public selectedDeploymentTarget = ""; constructor (
9
diff --git a/src/encoded/schemas/mixins.json b/src/encoded/schemas/mixins.json "BruChase-seq", "genetic modification followed by DNase-seq", "CRISPRi followed by RNA-seq", - "genotyping by Hi-C" + "genotyping by Hi-C", + "Circ-seq" ] } },
0
diff --git a/js/bybit.js b/js/bybit.js @@ -5896,7 +5896,7 @@ module.exports = class bybit extends Exchange { if (symbols.length > 1) { throw new ArgumentsRequired (this.id + ' fetchPositions() does not accept an array with more than one symbol'); } - } else { + } else if (symbols !== undefined) { symbols = [ symbols ]; } symbols = this.marketSymbols (symbols); @@ -5971,11 +5971,12 @@ module.exports = class bybit extends Exchange { } const symbol = this.safeString (symbols, 0); market = this.market (symbol); - type = market['type']; request['symbol'] = market['id']; - } else { - [ type, params ] = this.handleMarketTypeAndParams ('fetchUSDCPositions', undefined, params); + } else if (symbols !== undefined) { + market = this.market (symbols); + request['symbol'] = market['id']; } + [ type, params ] = this.handleMarketTypeAndParams ('fetchUSDCPositions', market, params); request['category'] = (type === 'option') ? 'OPTION' : 'PERPETUAL'; const response = await this.privatePostOptionUsdcOpenapiPrivateV1QueryPosition (this.extend (request, params)); // @@ -6125,7 +6126,7 @@ module.exports = class bybit extends Exchange { if (symbols.length > 1) { throw new ArgumentsRequired (this.id + ' fetchPositions() does not accept an array with more than one symbol'); } - } else { + } else if (symbols !== undefined) { symbols = [ symbols ]; } await this.loadMarkets ();
7
diff --git a/src/js/components/DataTable/Header.js b/src/js/components/DataTable/Header.js @@ -95,7 +95,7 @@ const Header = ({ > {content} {searcher && resizer ? ( - <Box flex={false} direction="row" align="center" gap="small"> + <Box flex="shrink" direction="row" align="center" gap="small"> {searcher} {resizer} </Box>
1
diff --git a/src/govuk/components/accordion/accordion.mjs b/src/govuk/components/accordion/accordion.mjs @@ -315,8 +315,12 @@ Accordion.prototype.setExpanded = function (expanded, $section) { $button.setAttribute('aria-expanded', expanded) // Update aria-label combining - var $header = $section.querySelector('.' + this.sectionHeadingTextClass) - var ariaLabelParts = [$header.innerText.trim()] + var ariaLabelParts = [] + + var $headingText = $section.querySelector('.' + this.sectionHeadingTextClass) + if ($headingText) { + ariaLabelParts.push($headingText.innerText.trim()) + } var $summary = $section.querySelector('.' + this.sectionSummaryClass) if ($summary) {
10
diff --git a/token-metadata/0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0/metadata.json b/token-metadata/0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0/metadata.json "symbol": "LOOM", "address": "0xA4e8C3Ec456107eA67d3075bF9e3DF3A75823DB0", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/tasks/sync_packages.js b/tasks/sync_packages.js @@ -100,10 +100,18 @@ packagesSpecs.forEach(function(d) { ); } - function copyDist(cb) { + function copyMain(cb) { fs.copy(d.dist, path.join(pkgPath, d.main), cb); } + function copyLicense(cb) { + fs.copy( + path.join(constants.pathToRoot, 'LICENSE'), + path.join(pkgPath, 'LICENSE'), + cb + ); + } + function publishToNPM(cb) { if(process.env.DRYRUN) { console.log('dry run, did not publish ' + d.name); @@ -117,7 +125,8 @@ packagesSpecs.forEach(function(d) { initDirectory, writePackageJSON, writeREADME, - copyDist, + copyMain, + copyLicense, publishToNPM ], function(err) { if(err) throw err;
0
diff --git a/Source/Scene/Batched3DModel3DTileContent.js b/Source/Scene/Batched3DModel3DTileContent.js @@ -187,7 +187,7 @@ function getVertexShaderCallback(content) { function getFragmentShaderCallback(content) { return function (fs, programId) { var batchTable = content._batchTable; - var handleTranslucent = !defined(content._classificationType); + var handleTranslucent = !defined(content._tileset.classificationType); var gltf = content._model.gltf; if (defined(gltf)) { @@ -352,7 +352,7 @@ function initialize(content, arrayBuffer, byteOffset) { } var colorChangedCallback; - if (defined(content._classificationType)) { + if (defined(content._tileset.classificationType)) { colorChangedCallback = createColorChangedCallback(content); } @@ -407,7 +407,7 @@ function initialize(content, arrayBuffer, byteOffset) { new Matrix4() ); - if (!defined(content._classificationType)) { + if (!defined(content._tileset.classificationType)) { // PERFORMANCE_IDEA: patch the shader on demand, e.g., the first time show/color changes. // The pick shader still needs to be patched. content._model = new Model({ @@ -575,7 +575,7 @@ Batched3DModel3DTileContent.prototype.update = function (tileset, frameState) { if ( commandStart < commandEnd && (frameState.passes.render || frameState.passes.pick) && - !defined(this._classificationType) + !defined(tileset.classificationType) ) { this._batchTable.addDerivedCommands(frameState, commandStart); }
13
diff --git a/package.json b/package.json "js-beautify": "^1.10.0", "monaco-editor": "^0.17.0", "node-pty": "^0.10.0", - "node-sass": "^4.12.0", + "node-sass": "^4.14.0", "react": "^16.8.6", "react-autosuggest": "^9.4.3", "react-beautiful-dnd": "^11.0.3", "build": "NODE_ENV=production react-app-rewired build && npm run electron-build", "react-build": "NODE_ENV=production react-scripts build", "electron-build": "NODE_ENV=production electron-builder -mwl", - "electron-rebuild": "electron-rebuild -f -w node-pty", + "electron-rebuild": "electron-rebuild", "release": "npm run react-build && electron-builder --publish=always", "start-windows": "cross-env NODE_ENV=development concurrently \"cross-env BROWSER=none react-app-rewired start\" \"wait-on http://localhost:3000 && electron .\"", "start": "NODE_ENV=development concurrently \"cross-env BROWSER=none react-app-rewired start\" \"wait-on http://localhost:3000 && electron .\""
3
diff --git a/js/preload/passwordFill.js b/js/preload/passwordFill.js @@ -23,7 +23,8 @@ add a MutationObserver to the document, or DOMNodeInserted listener, but I wanted to keep it lightweight and not impact browser performace too much. */ -const keyIcon = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="key" class="svg-inline--fa fa-key fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"></path></svg>' +// "carbon:password" +const keyIcon = '<svg width="22px" height="22px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="vertical-align: -0.125em;-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M21 2a9 9 0 0 0-9 9a8.87 8.87 0 0 0 .39 2.61L2 24v6h6l10.39-10.39A9 9 0 0 0 30 11.74a8.77 8.77 0 0 0-1.65-6A9 9 0 0 0 21 2zm0 16a7 7 0 0 1-2-.3l-1.15-.35l-.85.85l-3.18 3.18L12.41 20L11 21.41l1.38 1.38l-1.59 1.59L9.41 23L8 24.41l1.38 1.38L7.17 28H4v-3.17L13.8 15l.85-.85l-.29-.95a7.14 7.14 0 0 1 3.4-8.44a7 7 0 0 1 10.24 6a6.69 6.69 0 0 1-1.09 4A7 7 0 0 1 21 18z" fill="currentColor"/><circle cx="22" cy="10" r="2" fill="currentColor"/></svg>' // Ref to added unlock button. var currentUnlockButton = null
3
diff --git a/src/components/emoji.js b/src/components/emoji.js @@ -60,7 +60,10 @@ const Emoji = props => { } } - var { unified, custom, short_names, imageUrl } = _getData(props), + let data = _getData(props) + if (!data) { return null } + + let { unified, custom, short_names, imageUrl } = data, style = {}, children = props.children, className = 'emoji-mart-emoji',
9
diff --git a/packages/yoroi-extension/features/06-connector-get-collateral.feature b/packages/yoroi-extension/features/06-connector-get-collateral.feature @@ -5,34 +5,40 @@ Feature: dApp connector get collateral Given I have opened the extension And I have completed the basic setup Then I should see the Create wallet screen - Given There is a Shelley wallet stored named shelley-simple-15 - Then Revamp. I switch to revamp version - Then I open the mock dApp tab @dApp-1023 Scenario: dApp, anonymous wallet, get collateral (DAPP-1023) + Given There is a Shelley wallet stored named shelley-collateral + Then Revamp. I switch to revamp version + Then I open the mock dApp tab And I request anonymous access to Yoroi Then I should see the connector popup for connection - And I select the only wallet named shelley-simple-15 with 5.5 balance + And I select the only wallet named shelley-collateral with 2 balance Then The popup window should be closed And The access request should succeed - And The wallet shelley-simple-15 is connected to the website localhost - Then The dApp should see collateral: {"utxo_id":"3677e75c7ba699bfdc6cd57d42f246f86f63aefd76025006ac78313fad2bba211","tx_hash":"3677e75c7ba699bfdc6cd57d42f246f86f63aefd76025006ac78313fad2bba21","tx_index":1,"receiver":"addr1qyv7qlaucathxkwkc503ujw0rv9lfj2rkj96feyst2rs9ey4tr5knj4fu4adelzqhxg8adu5xca4jra0gtllfrpcawyqzajfkn","amount":"1000000","assets":[]} for 1000000 + And The wallet shelley-collateral is connected to the website localhost + Then The dApp should see collateral: {"utxo_id":"021657dfc7f9e33d0ca9cb33b0487138d2f74286e9e00f19946f27e9a8c6f6071","tx_hash":"021657dfc7f9e33d0ca9cb33b0487138d2f74286e9e00f19946f27e9a8c6f607","tx_index":1,"receiver":"addr1q9nv4vttp9f00pttk2unp4jhprd67sgffkg9ak0sawvxa68vfz8ymjd9j2vdea8088ut8jpx4c6tr08dwuzs07leyrtsuc6l06","amount":"1000000","assets":[]} for 1000000 @dApp-1024 Scenario: dApp, authorized wallet, get collateral (DAPP-1024) + Given There is a Shelley wallet stored named shelley-collateral + Then Revamp. I switch to revamp version + Then I open the mock dApp tab And I request access to Yoroi Then I should see the connector popup for connection - And I select the only wallet named shelley-simple-15 with 5.5 balance + And I select the only wallet named shelley-collateral with 2 balance Then I enter the spending password asdfasdfasdf and click confirm Then The popup window should be closed And The access request should succeed - And The wallet shelley-simple-15 is connected to the website localhost - Then The dApp should see collateral: {"utxo_id":"3677e75c7ba699bfdc6cd57d42f246f86f63aefd76025006ac78313fad2bba211","tx_hash":"3677e75c7ba699bfdc6cd57d42f246f86f63aefd76025006ac78313fad2bba21","tx_index":1,"receiver":"addr1qyv7qlaucathxkwkc503ujw0rv9lfj2rkj96feyst2rs9ey4tr5knj4fu4adelzqhxg8adu5xca4jra0gtllfrpcawyqzajfkn","amount":"1000000","assets":[]} for 1000000 + And The wallet shelley-collateral is connected to the website localhost + Then The dApp should see collateral: {"utxo_id":"021657dfc7f9e33d0ca9cb33b0487138d2f74286e9e00f19946f27e9a8c6f6071","tx_hash":"021657dfc7f9e33d0ca9cb33b0487138d2f74286e9e00f19946f27e9a8c6f607","tx_index":1,"receiver":"addr1q9nv4vttp9f00pttk2unp4jhprd67sgffkg9ak0sawvxa68vfz8ymjd9j2vdea8088ut8jpx4c6tr08dwuzs07leyrtsuc6l06","amount":"1000000","assets":[]} for 1000000 @dApp-1025 Scenario: dApp, authorized wallet, get collateral, connector popup (DAPP-1025) + Given There is a Shelley wallet stored named shelley-simple-15 + Then Revamp. I switch to revamp version + Then I open the mock dApp tab And I request access to Yoroi Then I should see the connector popup for connection And I select the only wallet named shelley-simple-15 with 5.5 balance @@ -52,6 +58,9 @@ Feature: dApp connector get collateral @dApp-1026 Scenario: dApp, anonymous wallet, get collateral, connector popup (DAPP-1026) + Given There is a Shelley wallet stored named shelley-simple-15 + Then Revamp. I switch to revamp version + Then I open the mock dApp tab And I request anonymous access to Yoroi Then I should see the connector popup for connection And I select the only wallet named shelley-simple-15 with 5.5 balance
4
diff --git a/token-metadata/0x810908B285f85Af668F6348cD8B26D76B3EC12e1/metadata.json b/token-metadata/0x810908B285f85Af668F6348cD8B26D76B3EC12e1/metadata.json "symbol": "SPAZ", "address": "0x810908B285f85Af668F6348cD8B26D76B3EC12e1", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/Makefile b/Makefile @@ -3,8 +3,12 @@ prod: python manage.py collectstatic --noinput dev: - npm run-script start + npm start -sync-upstream: - @git fetch upstream - @git rebase upstream/master +test-backend: + coverage run manage.py test + +test-frontend: + npm test + +test: test-backend test-frontend
3
diff --git a/html/settings/_settings.scss b/html/settings/_settings.scss @@ -1238,7 +1238,7 @@ $sprk-label-padding: 0 !default; /// The font family applied to Input labels. $sprk-label-font-family: $sprk-font-family-body-two !default; /// The font size applied to Input labels. -$sprk-label-font-size: 1rem !default; +$sprk-label-font-size: 0.875rem !default; /// The font weight applied to Input labels. $sprk-label-font-weight: 400 !default; /// The line height applied to Input labels.
13
diff --git a/_data/conferences.yml b/_data/conferences.yml sub: ML note: '<b>NOTE</b>: Mandatory abstract deadline on May 19, 2021' +- title: ICMI + hindex: -1 + year: 2021 + id: icmi2021 + link: https://icmi.acm.org/2021/ + deadline: '2021-05-26 23:59:00' + timezone: UTC-7 + date: October 18-22, 2021 + place: Montreal, Canada + sub: CV + - title: CIKM hindex: 48 year: 2021 place: Gold Coast, Queensland, Australia sub: DM -- title: ICMI - hindex: -1 - year: 2021 - id: icmi2021 - link: https://icmi.acm.org/2021/ - deadline: '2021-05-26 23:59:00' - timezone: UTC-7 - date: October 18-22, 2021 - place: Montreal, Canada - sub: CV - - title: ICDM hindex: -1 year: 2021 sub: CV note: '<b>NOTE</b>: Mandatory abstract deadline on Apr 23, 2020. More info <a href=''https://britishmachinevisionassociation.github.io/bmvc''>here</a>.' -- title: CIKM - hindex: 48 - year: 2020 - id: cikm20 - link: https://cikm2020.org/ - deadline: '2020-05-01 23:59:59' - abstract_deadline: '2020-04-24 23:59:59' - timezone: UTC-12 - date: October 19-23, 2020 - place: Galway, Ireland - sub: DM - note: '<b>NOTE</b>: Mandatory abstract deadline on Apr 24, 2020. More info <a href=''https://cikm2020.org/call-for-papers-full-and-short-research-papers/''>here</a>.' - - title: RecSys hindex: 45 year: 2020
2
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -52,6 +52,52 @@ jobs: isCompactMode: true url: ${{ secrets.SLACK_WEBHOOK_URL }} + install-prod-node14: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 14.x + cache: 'yarn' + cache-dependency-path: '**/yarn.lock' + + - name: Cache/Restore node_modules + id: cache-dependencies + uses: actions/cache@v2 + with: + path: | + **/node_modules + key: ${{ runner.OS }}-node_modules-14.x-prod-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node_modules-14.x-prod- + ${{ runner.os }}-node_modules-14.x- + + - name: Remove unnecessary packages + run: | + rm -rf packages/slackbot-proxy + - name: lerna bootstrap --production + run: | + npx lerna bootstrap -- --production + + - name: Print dependencies + run: | + echo -n "node " && node -v + echo -n "npm " && npm -v + yarn list --depth=0 + + - name: Slack Notification + uses: weseek/ghaction-slack-notification@master + if: failure() + with: + type: ${{ job.status }} + job_name: '*Node CI for growi - install-prod-node14*' + channel: '#ci' + isCompactMode: true + url: ${{ secrets.SLACK_WEBHOOK_URL }} + lint: needs: install-node14 @@ -278,7 +324,7 @@ jobs: url: ${{ secrets.SLACK_WEBHOOK_URL }} launch-prod: - needs: build-prod + needs: [install-prod-node14, build-prod] runs-on: ubuntu-latest @@ -307,16 +353,13 @@ jobs: with: path: | **/node_modules - key: ${{ runner.OS }}-node_modules-14.x-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.OS }}-node_modules-14.x-prod-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.os }}-node_modules-14.x- + ${{ runner.os }}-node_modules-14.x-prod- - name: Remove unnecessary packages run: | rm -rf packages/slackbot-proxy - - name: lerna bootstrap --production - run: | - npx lerna bootstrap -- --production - name: Download built artifact uses: actions/download-artifact@v2
7
diff --git a/src/components/appNavigation/stackNavigation.js b/src/components/appNavigation/stackNavigation.js @@ -9,24 +9,34 @@ import { Button } from 'react-native-paper' /** * Component wrapping the stack navigator. - * It holds the pop push gotToRoot logic and inserts on top the NavBar component. + * It holds the pop push gotToRoot goToParent logic and inserts on top the NavBar component. + * This navigation actions are being passed via navigationConfig to children components */ class AppView extends Component<{ descriptors: any, navigation: any, navigationConfig: any }> { stack = [] + /** + * Pops from stack + * If there is no screen on the stack navigates to initial screen on stack (goToRoot) + * If we are currently in the first screen go to ths screen that created the stack (toToParent) + */ pop = () => { - const { navigation, navigationConfig } = this.props + const { navigation } = this.props const nextRoute = this.stack.pop() if (nextRoute) { navigation.navigate(nextRoute) } else if (navigation.state.index !== 0) { - navigation.navigate(navigation.state.routes[0]) - } else { this.goToRoot() + } else { + this.goToParent() } } + /** + * Push a route to the stack + * The stack is maintained in stack property to be able to navigate back and forward + */ push = (nextRoute, params) => { const { navigation } = this.props const activeKey = navigation.state.routes[navigation.state.index].key @@ -34,7 +44,18 @@ class AppView extends Component<{ descriptors: any, navigation: any, navigationC navigation.navigate(nextRoute, params) } + /** + * Navigates to root screen. First on stack + */ goToRoot = () => { + const { navigation } = this.props + navigation.navigate(navigation.state.routes[0]) + } + + /** + * Navigates to the screen that created the stack (backRouteName) + */ + goToParent = () => { const { navigation, navigationConfig } = this.props if (navigationConfig.backRouteName) { @@ -53,7 +74,7 @@ class AppView extends Component<{ descriptors: any, navigation: any, navigationC <SceneView navigation={descriptor.navigation} component={descriptor.getComponent()} - screenProps={{ ...navigationConfig, push: this.push, goToRoot: this.goToRoot }} + screenProps={{ ...navigationConfig, push: this.push, goToRoot: this.goToRoot, goToParent: this.goToParent }} /> </View> ) @@ -107,9 +128,9 @@ export const PushButton = (props: ButtonProps) => { * @param {ButtonProps} props */ export const BackButton = (props: ButtonProps) => { - const { disabled, navigationConfig, routeName, children, mode, color } = props + const { disabled, navigationConfig, children, mode, color } = props return ( - <Button mode={mode || 'text'} color={color || '#575757'} disabled={disabled} onPress={navigationConfig.goToRoot}> + <Button mode={mode || 'text'} color={color || '#575757'} disabled={disabled} onPress={navigationConfig.goToParent}> {children} </Button> )
0
diff --git a/admin-base/materialize/custom/_icon-browser.scss b/admin-base/materialize/custom/_icon-browser.scss width: auto; white-space: nowrap; z-index: 10; - padding: 0 0.75rem; .iconbrowser-options { + display: inline-block; + float: left; height: 48px; margin: 0; list-style: none; - > li { + width: 15%; + .dropdown-button { + position: relative; + height: 47px; + border: 0; + color: #fff; + background-color: color("blue-grey", "darken-1"); + display: block; + width: 100%; + padding: 0 0.75rem; + font-size: 14px; + text-overflow: ellipsis; + overflow: hidden; + text-align: left; + &:after { + position: absolute; + right: 0.75rem; + top: 50%; + margin-top: -7.5px; display: inline-block; - list-style-type: none; + color:color("blue-grey", "lighten-5"); + content: "\25BC"; + font-size: 10px; + transition: transform 0.2s ease; + } + &.active { + &:after { + transform: rotate(180deg); + } + } + } + } + .iconbrowser-filter { + display: inline-block; + float: left; + width: 85%; + height: 48px; + input { + height: 47px; + border-left: 0; + border-right: 0; } } .range-field { height: 48px; - width: 100%; - margin: 0; + width: calc(100% - 1.5rem); + position: absolute; + top: 48px; + left: 0.75rem; } } .modal-content { height: calc(100% - 96px - 56px); .col-browse { width: 100%; + .item-icon { + cursor: pointer; + width: auto; + max-width: 100%; + margin-bottom: 15px; + text-align: center; + background-color: color("blue-grey", "lighten-5"); + .item-content { + width: 100%; + color: color("blue-grey", "darken-2"); + position: absolute; + top: 50%; + transform: translateY(-60%); + padding: 0.75rem; + i { + color: color("blue-grey", "darken-1"); + } + > .truncate { + width: 100%; + } + } + &.selected { + background-color: color("blue-grey", "base"); + .item-content { + i, + > .truncate { + color: color("blue-grey", "lighten-5"); + } + } + } + } } } .modal-footer { .selected-path { > i { vertical-align: middle; + font-size: 2em; + padding-right: 0.75rem; } } }
7
diff --git a/NOTES.md b/NOTES.md @@ -21,11 +21,6 @@ https://webkit.org/blog/4096/introducing-shadow-dom-api/ Load Time + Runtime of module loading dependencies https://nolanlawson.com/2016/08/15/the-cost-of-small-modules/ -REDUX Demistified - - - https://hackernoon.com/if-not-redux-then-what-fc433234f5b4#.tyisp17cy - - https://hackernoon.com/thinking-in-redux-when-all-youve-known-is-mvc-c78a74d35133#.2v46lnu4c - - http://stackoverflow.com/questions/39977540/can-redux-be-seen-as-a-pub-sub-or-observer-pattern - Libraries compared by weight https://gist.github.com/Restuta/cda69e50a853aa64912d
2
diff --git a/src/encoded/tests/test_audit_experiment.py b/src/encoded/tests/test_audit_experiment.py @@ -2725,7 +2725,7 @@ def test_audit_experiment_chip_seq_consistent_mapped_read_length( def collect_audit_errors(result): errors = result.json['audit'] - collect_audit_errors(res) = [] + errors_list = [] for error_type in errors: - collect_audit_errors(res).extend(errors[error_type]) - return collect_audit_errors(res) + errors_list.extend(errors[error_type]) + return errors_list
1
diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb @@ -35,6 +35,7 @@ class Admin::PagesController < Admin::AdminController before_filter :login_required, :except => [:public, :datasets, :maps, :sitemap, :index, :user_feed] before_filter :load_viewed_entity + before_filter :set_new_dashboard_flag before_filter :ensure_organization_correct skip_before_filter :browser_is_html5_compliant?, only: [:public, :datasets, :maps, :user_feed] skip_before_filter :ensure_user_organization_valid, only: [:public] @@ -306,7 +307,6 @@ class Admin::PagesController < Admin::AdminController end def set_layout_vars_for_user(user, content_type) - set_new_dashboard_flag builder = user_maps_public_builder(user, visualization_version) most_viewed = builder.with_order('mapviews', :desc).build_paged(1, 1).first @@ -328,7 +328,6 @@ class Admin::PagesController < Admin::AdminController end def set_layout_vars_for_organization(org, content_type) - set_new_dashboard_flag most_viewed_vis_map = org.public_vis_by_type(Carto::Visualization::TYPE_DERIVED, 1, 1,
12
diff --git a/articles/api-auth/tutorials/implicit-grant.md b/articles/api-auth/tutorials/implicit-grant.md @@ -116,6 +116,12 @@ For details on the validations that should be performed by the API, refer to [Ve If you wish to execute special logic unique to the Implicit grant, you can look at the `context.protocol` property in your rule. If the value is `oidc-implicit-profile`, then the rule is running during the Implicit grant. +## Optional: Silent Authentication + +If you need to authenticate your users without a login page (for example, when the user is already logged in via [SSO](/sso) scenario) or get a new `access_token` (thus simulate refreshing an expired token), you can use Silent Authentication. + +For details on how to implement this, refer to [Silent Authentication](/api-auth/tutorials/silent-authentication). + ## Keep reading <i class="notification-icon icon-budicon-345"></i>&nbsp;[Implicit Grant overview](/api-auth/grant/implicit)<br/>
0
diff --git a/packages/cx/src/widgets/Button.d.ts b/packages/cx/src/widgets/Button.d.ts -import * as Cx from '../core'; -import * as React from 'react'; +import * as Cx from "../core"; +import * as React from "react"; import { Instance } from "../ui/Instance"; export interface ButtonProps extends Cx.HtmlElementProps { - /** Confirmation text or configuration object. See MsgBox.yesNo for more details. */ - confirm?: Cx.Prop<string | Cx.Config>, + confirm?: Cx.Prop<string | Cx.Config>; /** If true button appears in pressed state. Useful for implementing toggle buttons. */ - pressed?: Cx.BooleanProp, + pressed?: Cx.BooleanProp; /** Name of the icon to be put on the left side of the button. */ - icon?: Cx.StringProp, + icon?: Cx.StringProp; /** HTML tag to be used. Default is `button`. */ - tag?: string, + tag?: string; /** Base CSS class to be applied to the element. Default is 'button'. */ - baseClass?: string, + baseClass?: string; /** * Determines if button should receive focus on mousedown event. * Default is `false`, which means that focus can be set only using the keyboard `Tab` key. */ - focusOnMouseDown?: boolean, + focusOnMouseDown?: boolean; /** Add type="submit" to the button. */ - submit?: boolean, + submit?: boolean; /** Set to `true` to disable the button. */ - disabled?: Cx.BooleanProp, + disabled?: Cx.BooleanProp; /** Set to `false` to disable the button. */ - enabled?: Cx.BooleanProp, + enabled?: Cx.BooleanProp; /** * Click handler. @@ -40,13 +39,18 @@ export interface ButtonProps extends Cx.HtmlElementProps { * @param e - Event. * @param instance - Cx widget instance that fired the event. */ - onClick?: string | ((e: React.SyntheticEvent<any>, instance: Instance) => void), + onClick?: string | ((e: React.SyntheticEvent<any>, instance: Instance) => void); /** Button type. */ - type?: 'submit' | 'button', + type?: "submit" | "button"; /** If set to `true`, the Button will cause its parent Overlay (if one exists) to close. This, however, can be prevented if `onClick` explicitly returns `false`. */ - dismiss?: boolean + dismiss?: boolean; + + /** The form attribute specifies the form the button belongs to. + * The value of this attribute must be equal to the `id` attribute of a `<form>` element in the same document. + */ + form?: Cx.StringProp; } export class Button extends Cx.Widget<ButtonProps> {}
0
diff --git a/util.js b/util.js @@ -989,3 +989,41 @@ export const loadImage = u => new Promise((resolve, reject) => { img.crossOrigin = 'Anonymous'; img.src = u; }); + +const isTransferable = o => { + const ctor = o?.constructor; + return ctor === MessagePort || + ctor === ImageBitmap || + ctor === ImageData || + // ctor === AudioData || + // ctor === OffscreenCanvas || + ctor === ArrayBuffer || + ctor === Uint8Array || + ctor === Int8Array || + ctor === Uint16Array || + ctor === Int16Array || + ctor === Uint32Array || + ctor === Int32Array || + ctor === Float32Array || + ctor === Float64Array; +}; +export const getTransferables = o => { + const result = []; + const _recurse = o => { + if (Array.isArray(o)) { + for (const e of o) { + _recurse(e); + } + } else if (o && typeof o === 'object') { + if (isTransferable(o)) { + result.push(o); + } else { + for (const k in o) { + _recurse(o[k]); + } + } + } + }; + _recurse(o); + return result; +}; \ No newline at end of file
0
diff --git a/README.md b/README.md @@ -33,7 +33,7 @@ Features - [x] HDR environment maps - [X] Selection of tonemapping algorithms for IBL - [x] Support for headless rendering -- [ ] Support for Visual Studio Code integration +- [x] Support for Visual Studio Code integration - [x] Debug GUI for inspecting BRDF inputs If you would like to see this in action, [view the live demo](http://gltf.ux3d.io/). @@ -91,11 +91,11 @@ Example After execution, the screenshot is stored as ``output.png`` on the file system. -**Visual Studio** +**VS Code ** -For Visual Studio integration, please follow these instructions: +Modified VSCode gltf-vscode plugin: -TODO +[gltf-vscode](https://github.com/ux3d/gltf-vscode/tree/features/khronosRV-setup) Physically-Based Materials in glTF 2.0 --------------------------------------
3
diff --git a/client/components/AvailabilityGrid/AvailabilityGrid.js b/client/components/AvailabilityGrid/AvailabilityGrid.js @@ -70,12 +70,10 @@ class AvailabilityGrid extends React.Component { notAvailableOnDate: [], hourTime: [], openModal: false, - mouseDownOnGrid: false, rangeSelected: false, + startSelection: false, mouseDownRow: null, mouseDownCol: null, - lastMouseDownRow: null, - lastMouseDownCol: null, }; } @@ -225,46 +223,25 @@ class AvailabilityGrid extends React.Component { } @autobind - handleCellMouseDown(e) { - if (!this.props.heatmap) { - const cellBackground = getComputedStyle(e.target)['background-color']; - const cellIsSelected = cellBackground !== 'rgba(0, 0, 0, 0)'; - - this.updateCellAvailability(e); - - this.setState({ - mouseDownOnGrid: true, - mouseDownRow: Number(e.target.getAttribute('data-row')), - mouseDownCol: Number(e.target.getAttribute('data-col')), - rangeSelected: cellIsSelected, - }); - } - } + handleCellMouseDown(ev) { + if (this.props.heatmap) return; - @autobind - handleCellMouseUp() { - if (!this.props.heatmap) this.setState({ mouseDownOnGrid: false }); - } - - @autobind - handleCellMouseOver(ev) { - const cellBackgroundColor = getComputedStyle(ev.target)['background-color']; - const cellIsSelected = cellBackgroundColor !== 'rgba(0, 0, 0, 0)'; + let { startSelection } = this.state; const { - mouseDownOnGrid, rangeSelected, - lastMouseDownCol, - lastMouseDownRow, } = this.state; + const cellBackground = getComputedStyle(ev.target)['background-color']; + const cellIsSelected = cellBackground !== 'rgba(0, 0, 0, 0)'; + if (!startSelection) { + this.updateCellAvailability(ev); + } else { const { generateRange, updateAvailabilityForRange, } = this.constructor; - if (mouseDownOnGrid) { let updateAvail; - if (rangeSelected) { updateAvail = this.constructor.removeCellFromAvailability; } else { @@ -276,32 +253,32 @@ class AvailabilityGrid extends React.Component { const initialRow = this.state.mouseDownRow; const initialCol = this.state.mouseDownCol; - let rowRange = generateRange(thisRow, initialRow); - let colRange = generateRange(thisCol, initialCol); + const rowRange = generateRange(thisRow, initialRow); + const colRange = generateRange(thisCol, initialCol); updateAvailabilityForRange(rowRange, colRange, updateAvail); - if (rangeSelected) { - updateAvail = this.constructor.addCellToAvailability; - } else { - updateAvail = this.constructor.removeCellFromAvailability; + this.setState({ + lastMouseDownRow: thisRow, + lastMouseDownCol: thisCol, + }); } - if (thisRow < lastMouseDownRow) { - rowRange = generateRange(thisRow + 1, lastMouseDownRow); - updateAvailabilityForRange(rowRange, colRange, updateAvail); - } else if (thisCol < lastMouseDownCol) { - rowRange = generateRange(thisRow, initialRow); - colRange = generateRange(thisCol + 1, lastMouseDownCol); - updateAvailabilityForRange(rowRange, colRange, updateAvail); - } + startSelection = !startSelection; this.setState({ - lastMouseDownRow: thisRow, - lastMouseDownCol: thisCol, + startSelection, + mouseDownRow: Number(ev.target.getAttribute('data-row')), + mouseDownCol: Number(ev.target.getAttribute('data-col')), + rangeSelected: cellIsSelected, }); } + @autobind + handleCellMouseOver(ev) { + const cellBackgroundColor = getComputedStyle(ev.target)['background-color']; + const cellIsSelected = cellBackgroundColor !== 'rgba(0, 0, 0, 0)'; + if (!this.props.heatmap || !cellIsSelected) return; const { allTimesRender, allDatesRender, allDates, allTimes } = this.state; @@ -586,7 +563,6 @@ class AvailabilityGrid extends React.Component { data-col={j} className={`cell ${disabled}`} onMouseDown={this.handleCellMouseDown} - onMouseUp={this.handleCellMouseUp} onMouseOver={this.handleCellMouseOver} onMouseLeave={this.handleCellMouseLeave} />
11
diff --git a/src/structs/Client.js b/src/structs/Client.js @@ -8,10 +8,10 @@ const AssignedSchedule = require('../structs/db/AssignedSchedule.js') const FeedScheduler = require('../util/FeedScheduler.js') const storage = require('../util/storage.js') const log = require('../util/logger.js') -const dbOpsVips = require('../util/db/vips.js') const redisIndex = require('../structs/db/Redis/index.js') const connectDb = require('../rss/db/connect.js') const ClientManager = require('./ClientManager.js') +const Patron = require('./db/Patron.js') const EventEmitter = require('events') const DISABLED_EVENTS = ['TYPING_START', 'MESSAGE_DELETE', 'MESSAGE_UPDATE', 'PRESENCE_UPDATE', 'VOICE_STATE_UPDATE', 'VOICE_SERVER_UPDATE', 'USER_NOTE_UPDATE', 'CHANNEL_PINS_UPDATE'] const CLIENT_OPTIONS = { disabledEvents: DISABLED_EVENTS, messageCacheMaxSize: 100 } @@ -167,9 +167,6 @@ class Client extends EventEmitter { case 'finishedInit': storage.initialized = 2 break - case 'cycleVIPs': - if (bot.shard.id === message.shardId) await dbOpsVips.refresh(true) - break case 'runSchedule': if (bot.shard.id === message.shardId) this.scheduleManager.run(message.refreshRate) break @@ -191,11 +188,14 @@ class Client extends EventEmitter { try { await connectDb() if (!this.bot.shard || this.bot.shard.count === 0) { + if (Patron.compatible) { + await require('../../settings/api.js')() + } // await dbOpsGeneral.verifyFeedIDs() await redisIndex.flushDatabase() await ScheduleManager.initializeSchedules(this.customSchedules) await AssignedSchedule.deleteAll() - await FeedScheduler.assignSchedules(-1, Array.from(this.bot.guilds.keys()), await dbOpsVips.getValidServers()) + await FeedScheduler.assignSchedules(-1, this.bot.guilds.keyArray()) } if (!this.scheduleManager) { const refreshRates = new Set() @@ -236,9 +236,9 @@ class Client extends EventEmitter { if (config.web.enabled === true) { this.webClientInstance.enableCP() } - if (config._vip === true) { - this._vipInterval = setInterval(() => { - dbOpsVips.refresh().catch(err => log.general.error('Unable to refresh vips on timer', err, true)) + if (Patron.compatible) { + this._patronTimer = setInterval(() => { + Patron.refresh().catch(err => log.general.error(`Failed to refresh patrons on timer in Client`, err, true)) }, 600000) } } @@ -258,7 +258,7 @@ class Client extends EventEmitter { log.general.warning(`${this.SHARD_PREFIX}Discord.RSS has received stop command`) storage.initialized = 0 this.scheduleManager.stopSchedules() - clearInterval(this._vipInterval) + clearInterval(this._patronTimer) listeners.disableAll() if ((!storage.bot.shard || storage.bot.shard.count === 0) && config.web.enabled === true) { this.webClientInstance.disableCP()
4
diff --git a/src/web/html/index.html b/src/web/html/index.html <ul> <li id="input-tab-1" class="active-input-tab"> <div class="input-tab-content"> - New Tab + 1: New Tab </div> <button type="button" class="btn btn-primary bmd-btn-icon btn-close-tab" id="btn-close-tab-1"> <i class="material-icons">clear</i> <i class="material-icons">access_time</i> </span> </div> + <div id="output-wrapper"> + <div id="output-tabs" style="display: none"> + <ul> + <li id="output-tab-1" class="active-output-tab"> + <div class="output-tab-content"> + 1: New Tab + </div> + <button type="button" class="btn btn-primary bmd-btn-icon btn-close-tab" id="btn-close-tab-1"> + <i class="material-icons">clear</i> + </button> + </li> + </ul> + </div> <div class="textarea-wrapper"> <div id="output-highlighter" class="no-select"></div> <div id="output-html"></div> </div> </div> </div> + </div> <div class="modal" id="save-modal" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg" role="document">
0