code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/Source/Core/sampleTerrain.js b/Source/Core/sampleTerrain.js /*global define*/
define([
+ './Check',
'../ThirdParty/when',
'./defined',
'./DeveloperError'
], function(
+ Check,
when,
defined,
DeveloperError) {
@@ -45,15 +47,18 @@ define([
*/
function sampleTerrain(terrainProvider, level, positions) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(terrainProvider)) {
- throw new DeveloperError('terrainProvider is required.');
- }
- if (!defined(level)) {
- throw new DeveloperError('level is required.');
- }
- if (!defined(positions)) {
- throw new DeveloperError('positions is required.');
- }
+ // if (!defined(terrainProvider)) {
+ // throw new DeveloperError('terrainProvider is required.');
+ // }
+ // if (!defined(level)) {
+ // throw new DeveloperError('level is required.');
+ // }
+ // if (!defined(positions)) {
+ // throw new DeveloperError('positions is required.');
+ // }
+ Check.typeOf.object('terrainProvider',terrainProvider);
+ Check.typeOf.number('level',level);
+ Check.defined('positions',positions);
//>>includeEnd('debug');
var deferred = when.defer();
| 14 |
diff --git a/packages/mjml-image/src/index.js b/packages/mjml-image/src/index.js @@ -50,6 +50,10 @@ export default class MjImage extends BodyComponent {
return {
img: {
border: this.getAttribute('border'),
+ 'border-left': this.getAttribute('left'),
+ 'border-right': this.getAttribute('right'),
+ 'border-top': this.getAttribute('top'),
+ 'border-bottom': this.getAttribute('bottom'),
'border-radius': this.getAttribute('border-radius'),
display: 'block',
outline: 'none',
@@ -80,8 +84,9 @@ export default class MjImage extends BodyComponent {
const paddingRight = this.getShorthandAttrValue('padding', 'right')
const paddingLeft = this.getShorthandAttrValue('padding', 'left')
- const border = this.getShorthandBorderValue()
- const allPaddings = paddingLeft + paddingRight + border * 2
+ const borderRight = this.getShorthandBorderValue('right')
+ const borderLeft = this.getShorthandBorderValue('left')
+ const allPaddings = paddingLeft + paddingRight + borderRight + borderLeft
return min([
parseInt(containerWidth, 10) - allPaddings,
| 9 |
diff --git a/packages/build/src/error/monitor/normalize.js b/packages/build/src/error/monitor/normalize.js @@ -48,7 +48,7 @@ const NORMALIZE_REGEXPS = [
// Numbers, e.g. number of issues/problems
[/\d+/g, '0'],
// Hexadecimal strings
- [/[0-9a-fA-F]{6,}/, 'hex'],
+ [/[0-9a-fA-F]{6,}/g, 'hex'],
// On unknown inputs, we print the inputs
[/(does not accept any inputs but you specified: ).*/, '$1'],
[/(Unknown inputs for plugin).*/, '$1'],
| 7 |
diff --git a/index.html b/index.html </div>
+</div>
+
<div class="collapse" id="skews">
<h1 style="font-family:mathfont; text-align:center;">SKEWNESS CALCULATOR </h1>
<input type="text" name="skewinput" class="form__field" id="skewinput" width="5em" placeholder="Enter data set seperated by space">
| 1 |
diff --git a/app/models/user.rb b/app/models/user.rb @@ -52,17 +52,12 @@ class User < Sequel::Model
'instagram' => 'http://instagram.com/accounts/manage_access/'
}.freeze
- INDUSTRIES = ['Academic and Education', 'Architecture and Engineering', 'Banking and Finance',
- 'Business Intelligence and Analytics', 'Utilities and Communications', 'GIS and Mapping',
- 'Government', 'Health', 'Marketing and Advertising', 'Media, Entertainment and Publishing',
- 'Natural Resources', 'Non-Profits', 'Real Estate', 'Software and Technology',
- 'Transportation and Logistics'].freeze
-
- JOB_ROLES = ['Founder / Executive', 'Developer', 'Student', 'VP / Director', 'Manager / Lead',
- 'Personal / Non-professional', 'Media', 'Individual Contributor'].freeze
-
- DEPRECATED_JOB_ROLES = ['Researcher', 'GIS specialist', 'Designer', 'Consultant / Analyst',
- 'CIO / Executive', 'Marketer', 'Sales', 'Journalist', 'Hobbyist', 'Government official'].freeze
+ INDUSTRIES = [
+ "Apparel & Fashion", "Banking & Financial Services", "Business Services", "Consulting Services",
+ "Consumer & Retail", "Education & Research", "Energy & Mining", "Government", "Health & Medical", "Insurance",
+ "Manufacturing", "Marketing & Advertising", "Natural Resources & Environment", "Non-Profit", "Other", "Real Estate",
+ "Software & Technology", "Transportation & Logistics", "Utilities & Communications"
+ ].freeze
# Make sure the following date is after Jan 29, 2015,
# which is the date where a message to accept the Terms and
| 3 |
diff --git a/src/components/ArrowKeyFocusManager.js b/src/components/ArrowKeyFocusManager.js @@ -37,10 +37,14 @@ class ArrowKeyFocusManager extends Component {
return;
}
- let newFocusedIndex = this.props.focusedIndex > 0 ? this.props.focusedIndex - 1 : this.props.maxIndex;
+ const currentFocusedIndex = this.props.focusedIndex > 0 ? this.props.focusedIndex - 1 : this.props.maxIndex;
+ let newFocusedIndex = currentFocusedIndex;
while (this.props.disabledIndexes.includes(newFocusedIndex)) {
newFocusedIndex = newFocusedIndex > 0 ? newFocusedIndex - 1 : this.props.maxIndex;
+ if (newFocusedIndex === currentFocusedIndex) { // all indexes are disabled
+ return; // no-op
+ }
}
this.props.onFocusedIndexChanged(newFocusedIndex);
@@ -51,10 +55,14 @@ class ArrowKeyFocusManager extends Component {
return;
}
- let newFocusedIndex = this.props.focusedIndex < this.props.maxIndex ? this.props.focusedIndex + 1 : 0;
+ const currentFocusedIndex = this.props.focusedIndex < this.props.maxIndex ? this.props.focusedIndex + 1 : 0;
+ let newFocusedIndex = currentFocusedIndex;
while (this.props.disabledIndexes.includes(newFocusedIndex)) {
newFocusedIndex = newFocusedIndex < this.props.maxIndex ? newFocusedIndex + 1 : 0;
+ if (newFocusedIndex === currentFocusedIndex) { // all indexes are disabled
+ return; // no-op
+ }
}
this.props.onFocusedIndexChanged(newFocusedIndex);
| 9 |
diff --git a/pages/community/user-groups.md b/pages/community/user-groups.md * [RheinMain Kotlin](http://kotlin.rocks), Germany
* [Serbia Kotlin User Group](https://www.meetup.com/Serbia-Kotlin-User-Group/), Serbia
* [Vienna Kotlin](https://www.meetup.com/Kotlin-Vienna/), Austria
- * [Warsaw Kotlin User Group](https://www.meetup.com/Kotlin-Warsaw/), Poland
+ * [Kotlin Warsaw](https://www.meetup.com/Kotlin-Warsaw/), Poland
* [Yorkshire Kotlin Meetup](http://www.meetup.com/Kotlin-Yorkshire-Meetup-Group/), United Kingdom
| 10 |
diff --git a/src/server/routes/forgot-password.js b/src/server/routes/forgot-password.js @@ -22,7 +22,7 @@ module.exports = function(crowi, app) {
return mailService.send({
to: email,
- subject: 'forgotPasswordMailTest',
+ subject: 'Password Reset',
template: path.join(crowi.localeDir, `${i18n}/notifications/passwordReset.txt`),
// TODO: need to set appropriate values by GW-6828
// vars: {
| 10 |
diff --git a/web/kiri/manifest.json b/web/kiri/manifest.json {
"name": "Kiri:Moto 3.5",
- "short_name": "KiriMoto",
+ "short_name": "Kiri:Moto",
"description": "Slicer for 3D printers, CNC mills, laser cutters and more",
"start_url": "/kiri/",
"id": "/kiri/",
| 3 |
diff --git a/package-lock.json b/package-lock.json {
"name": "orbit-db",
- "version": "0.20.0-rc.7",
+ "version": "0.20.0-rc8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
}
},
"orbit-db-counterstore": {
- "version": "1.5.0-rc.2",
- "resolved": "https://registry.npmjs.org/orbit-db-counterstore/-/orbit-db-counterstore-1.5.0-rc.2.tgz",
- "integrity": "sha512-1z0R3jkAtyVUvcieq2rDf6kChgSzz+KoA8+MK8JadlKisncgZFDtSURolnbRvwCAVQwLulHp+hdyNXO+miXKcQ==",
+ "version": "1.5.0-rc3",
+ "resolved": "https://registry.npmjs.org/orbit-db-counterstore/-/orbit-db-counterstore-1.5.0-rc3.tgz",
+ "integrity": "sha512-yqjphHuDslH26kjlRgu9JT4CFmHZOc4UBTqsduL/+6ygNs2WG4LtAhGqlCJeGHP345O2UoddPwBZUdFuJI0m6Q==",
"requires": {
"crdts": "~0.1.2",
- "orbit-db-store": "^2.6.0-rc.2"
+ "orbit-db-store": "^2.6.0-rc3"
}
},
"orbit-db-docstore": {
- "version": "1.5.1-rc.2",
- "resolved": "https://registry.npmjs.org/orbit-db-docstore/-/orbit-db-docstore-1.5.1-rc.2.tgz",
- "integrity": "sha512-Y7W4PPoDJt0IgQWiRIDBbwzQ/tijUDXuV6n5FagiqaXDB2/SgOvOcnylXvHZ9g9G4KokRtdENO5GNGIyOhI8NA==",
+ "version": "1.5.1-rc3",
+ "resolved": "https://registry.npmjs.org/orbit-db-docstore/-/orbit-db-docstore-1.5.1-rc3.tgz",
+ "integrity": "sha512-Pn8uuRh7cAN/mo+5dEK71sj8EHajqeDZUjDTx1vy08s9JIhOfqqPN20aI/g67wGY1qnT7FNOdCqhxyDmtUmb6A==",
"requires": {
- "orbit-db-store": "^2.6.0-rc.2",
+ "orbit-db-store": "^2.6.0-rc3",
"p-map": "~1.1.1"
},
"dependencies": {
}
},
"orbit-db-eventstore": {
- "version": "1.5.0-rc.2",
- "resolved": "https://registry.npmjs.org/orbit-db-eventstore/-/orbit-db-eventstore-1.5.0-rc.2.tgz",
- "integrity": "sha512-x181rGlBLD1OLXgp0QPb2e/nWi0LHUSd1TXDIKi9OVX0GBkNLnGAZdDNWz2l42g3m/QMivPudUYKok8ZMEIH4w==",
+ "version": "1.5.0-rc3",
+ "resolved": "https://registry.npmjs.org/orbit-db-eventstore/-/orbit-db-eventstore-1.5.0-rc3.tgz",
+ "integrity": "sha512-sqCSrQby7RsviWmOv8N3Vh/dA0juHmB+XhACWvmr5tOdIbizHVBhihp10j1N7XDyWMMFI1k+3cvjk3w5Wgj5GQ==",
"requires": {
- "orbit-db-store": "^2.6.0-rc.2"
+ "orbit-db-store": "^2.6.0-rc3"
}
},
"orbit-db-feedstore": {
- "version": "1.5.0-rc.2",
- "resolved": "https://registry.npmjs.org/orbit-db-feedstore/-/orbit-db-feedstore-1.5.0-rc.2.tgz",
- "integrity": "sha512-ShiFk6+AoktA9lcrpAaSLpP9Y+VnqjWq7YuJDCUaepjQ/Ua2FdiQ+D0+mVb7lu7RAzyCDIDAPfysXNCRgSA8rQ==",
+ "version": "1.5.0-rc3",
+ "resolved": "https://registry.npmjs.org/orbit-db-feedstore/-/orbit-db-feedstore-1.5.0-rc3.tgz",
+ "integrity": "sha512-OKqy6/BVC8a97G8sGgoosYHXxGQrqjY7M/cDYIG67LwT1YWOcKu3Ul3e2dmi7q9KPXpnrssgsFTqe5XPUcQqug==",
"requires": {
- "orbit-db-eventstore": "^1.5.0-rc.2"
+ "orbit-db-eventstore": "^1.5.0-rc3"
}
},
"orbit-db-identity-provider": {
}
},
"orbit-db-kvstore": {
- "version": "1.5.0-rc.3",
- "resolved": "https://registry.npmjs.org/orbit-db-kvstore/-/orbit-db-kvstore-1.5.0-rc.3.tgz",
- "integrity": "sha512-ihgVBJBS8bWdMvNf48ETpYREvEbtq24tYG8Okj/A+0zK3tP0HJ1s9wFalf0MnRQmqyWenEUjYC9ZIABBR+305w==",
+ "version": "1.5.0-rc4",
+ "resolved": "https://registry.npmjs.org/orbit-db-kvstore/-/orbit-db-kvstore-1.5.0-rc4.tgz",
+ "integrity": "sha512-i84nspoR2PP5J7so+W/2uJmujYQtflP5VDW/4dPdzEF2HmKHR4i7wPeww+yekFon9845kTyfGxOarTQ3lEVw4Q==",
"requires": {
- "orbit-db-store": "^2.6.0-rc.2"
+ "orbit-db-store": "^2.6.0-rc3"
}
},
"orbit-db-pubsub": {
}
},
"orbit-db-store": {
- "version": "2.6.0-rc.2",
- "resolved": "https://registry.npmjs.org/orbit-db-store/-/orbit-db-store-2.6.0-rc.2.tgz",
- "integrity": "sha512-Xjzuzo77igK790I0ruuX+EIvJ95LJrdDCujSh+bbSb5n7RNo3w7rqOXrxIw7C4iexIcbLqjeboe0CmaHvBaZBg==",
+ "version": "2.6.0-rc3",
+ "resolved": "https://registry.npmjs.org/orbit-db-store/-/orbit-db-store-2.6.0-rc3.tgz",
+ "integrity": "sha512-a967cwLLjR+JIDbA2vUwDQ6i7+LSRydx7zy69zsQsAGK+A7vQylpqtUkN/N14Zz++RKbbrqG2a5CWzBWA90Ejg==",
"requires": {
"ipfs-log": "^4.3.0-rc.3",
"logplease": "^1.2.14",
| 4 |
diff --git a/src/og/scene/Planet.js b/src/og/scene/Planet.js @@ -1124,10 +1124,10 @@ export class Planet extends RenderNode {
gl.disable(gl.POLYGON_OFFSET_FILL);
if (frustumIndex === cam.FARTHEST_FRUSTUM_INDEX) {
- if (this._skipPreRender && (!this._renderCompletedActivated || cam.isMoved)) {
+ //if (this._skipPreRender && (!this._renderCompletedActivated || cam.isMoved)) {
this._collectRenderNodes();
- }
- this._skipPreRender = true;
+ //}
+ //this._skipPreRender = true;
// Here is the planet node dispatches a draw event before
// rendering begins and we have got render nodes.
| 2 |
diff --git a/packages/vulcan-forms/lib/components/FormComponent.jsx b/packages/vulcan-forms/lib/components/FormComponent.jsx @@ -7,7 +7,7 @@ import merge from 'lodash/merge';
import find from 'lodash/find';
import isObjectLike from 'lodash/isObjectLike';
import isEqual from 'lodash/isEqual';
-import { isEmptyValue } from '../modules/utils.js';
+import * as FormUtils from '../modules/utils.js';
class FormComponent extends Component {
constructor(props) {
@@ -82,7 +82,7 @@ class FormComponent extends Component {
*/
handleChange = (name, value) => {
// if value is an empty string, delete the field
- if (value === '') {
+ if (this.props.isEmptyValue(value)) {
value = null;
}
// if this is a number field, convert value before sending it up to Form
@@ -120,7 +120,12 @@ class FormComponent extends Component {
getValue = props => {
let value;
const p = props || this.props;
- const { document, currentValues, defaultValue, datatype } = p;
+ const {
+ document,
+ currentValues,
+ defaultValue,
+ isEmptyValue,
+ } = p;
// for intl field fetch the actual field value by adding .value to the path
const path = p.locale ? `${this.getPath(p)}.value` : this.getPath(p);
const documentValue = get(document, path);
@@ -331,6 +336,11 @@ FormComponent.propTypes = {
addToDeletedValues: PropTypes.func,
clearFieldErrors: PropTypes.func.isRequired,
currentUser: PropTypes.object,
+ isEmptyValue: PropTypes.func,
+};
+
+FormComponent.defaultProps = {
+ isEmptyValue: FormUtils.isEmptyValue,
};
FormComponent.contextTypes = {
| 11 |
diff --git a/src/components/Feeds/ResourceFeed.js b/src/components/Feeds/ResourceFeed.js @@ -33,13 +33,13 @@ const ResourceFeed = data => {
const renderResults = () => {
return orgs.length > 0 ? (
<Box as="pre" whiteSpace="break-spaces">
- {orgs.map(business => (
+ {orgs.map(org => (
<ResultCard
- name={business.data.Entity_Name}
- category={business.data.Category}
- description={business.data.Description}
- location={business.data.Zip_Code}
- websiteUrl={business.data.Website}
+ name={org.data.Entity_Name}
+ category={org.data.Category}
+ description={org.data.Description}
+ location={org.data.Zip_Code}
+ websiteUrl={org.data.Website}
/>
))}
</Box>
| 10 |
diff --git a/token-metadata/0xa9fBB83a2689F4fF86339a4b96874d718673b627/metadata.json b/token-metadata/0xa9fBB83a2689F4fF86339a4b96874d718673b627/metadata.json "symbol": "ANTS",
"address": "0xa9fBB83a2689F4fF86339a4b96874d718673b627",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/tests/phpunit/integration/Core/Modules/ModulesTest.php b/tests/phpunit/integration/Core/Modules/ModulesTest.php @@ -47,7 +47,7 @@ class ModulesTest extends TestCase {
$modules->get_available_modules()
);
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
array(
'adsense' => 'Google\\Site_Kit\\Modules\\AdSense',
'analytics' => 'Google\\Site_Kit\\Modules\\Analytics',
@@ -87,7 +87,7 @@ class ModulesTest extends TestCase {
// Analytics is no longer present due to the filter above.
// Optimize is no longer present due to its dependency on Analytics.
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
array(
'adsense' => 'Google\\Site_Kit\\Modules\\AdSense',
'analytics-4' => 'Google\\Site_Kit\\Modules\\Analytics_4',
@@ -112,7 +112,7 @@ class ModulesTest extends TestCase {
'pagespeed-insights' => 'Google\\Site_Kit\\Modules\\PageSpeed_Insights',
);
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
$always_on_modules + $default_active_modules,
array_map( 'get_class', $modules->get_active_modules() )
);
@@ -122,7 +122,7 @@ class ModulesTest extends TestCase {
// Active modules will fallback to legacy option if set.
update_option( 'googlesitekit-active-modules', array( 'analytics' ) );
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
$always_on_modules + array(
'analytics' => 'Google\\Site_Kit\\Modules\\Analytics',
'analytics-4' => 'Google\\Site_Kit\\Modules\\Analytics_4',
@@ -578,7 +578,7 @@ class ModulesTest extends TestCase {
$shareable_active_modules = array_map( 'get_class', $modules->get_shareable_modules() );
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
array(
'search-console' => 'Google\\Site_Kit\\Modules\\Search_Console',
'pagespeed-insights' => 'Google\\Site_Kit\\Modules\\PageSpeed_Insights',
@@ -595,7 +595,7 @@ class ModulesTest extends TestCase {
// Check shared ownership for modules activated by default.
$modules = new Modules( $context );
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
array(
'pagespeed-insights' => 'Google\\Site_Kit\\Modules\\PageSpeed_Insights',
),
@@ -624,7 +624,7 @@ class ModulesTest extends TestCase {
// Verify shared ownership for active and connected modules.
$modules = new Modules( $context );
- $this->assertSameSetsWithIndex(
+ $this->assertEqualSetsWithIndex(
array(
'idea-hub' => 'Google\\Site_Kit\\Modules\\Idea_Hub',
'pagespeed-insights' => 'Google\\Site_Kit\\Modules\\PageSpeed_Insights',
@@ -1306,7 +1306,7 @@ class ModulesTest extends TestCase {
'analytics' => 2,
'pagespeed-insights' => 0,
);
- $this->assertSameSetsWithIndex( $expected_module_owners, $modules->get_shareable_modules_owners() );
+ $this->assertEqualSetsWithIndex( $expected_module_owners, $modules->get_shareable_modules_owners() );
}
public function test_shared_ownership_module_default_settings() {
@@ -1326,10 +1326,10 @@ class ModulesTest extends TestCase {
);
$settings = apply_filters( 'option_' . Module_Sharing_Settings::OPTION, array() );
- $this->assertSameSetsWithIndex( $expected, $settings );
+ $this->assertEqualSetsWithIndex( $expected, $settings );
$settings = apply_filters( 'default_option_' . Module_Sharing_Settings::OPTION, array(), '', '' );
- $this->assertSameSetsWithIndex( $expected, $settings );
+ $this->assertEqualSetsWithIndex( $expected, $settings );
}
}
| 14 |
diff --git a/package-lock.json b/package-lock.json "optional": true
},
"nats": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/nats/-/nats-2.8.0.tgz",
- "integrity": "sha512-FabrmbDYGH8x8iajdFqhr3RptxJ4qlK1uKuqaHf8EUNY3Zr8DtRw2naiJsIzex27GnSs0UqQG/upPU9Yh66zlA==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/nats/-/nats-2.7.1.tgz",
+ "integrity": "sha512-aH0OXxasfLCTG+LQCFRaWoL1kqejCQg7B+t4z++JgLPgfdpQMET1Rqo95I06DEQyIJGTTgYpxkI/zC0ul8V3pw==",
"dev": true,
"requires": {
- "nkeys.js": "1.0.3",
- "web-streams-polyfill": "^3.2.1"
+ "nkeys.js": "^1.0.0-9"
}
},
"natural-compare": {
"defaults": "^1.0.3"
}
},
- "web-streams-polyfill": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
- "dev": true
- },
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
| 13 |
diff --git a/src/checkHeaders.js b/src/checkHeaders.js @@ -44,9 +44,16 @@ async function checkAppId(ctx, next) {
return cors({
credentials: true,
- // cors can skip processing only when origin is function @@
- // if we don't pass function here, cors() will stop nothing.
- origin: () => origin,
+ origin: ctx => {
+ const allowedOrigins = origin.split(',');
+ if (allowedOrigins.includes(ctx.get('Origin'))) return ctx.get('Origin');
+
+ // CORS check fails.
+ // Since returning null is not recommended, we just return one valid origin here.
+ // Ref: https://w3c.github.io/webappsec-cors-for-developers/#avoid-returning-access-control-allow-origin-null
+ //
+ return allowedOrigins[0];
+ },
})(ctx, next);
}
| 11 |
diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Base.php b/src/Appwrite/Utopia/Database/Validator/Queries/Base.php namespace Appwrite\Utopia\Database\Validator\Queries;
-use Appwrite\Utopia\Database\Validator\IndexedQueries;
+use Appwrite\Utopia\Database\Validator\Queries;
use Appwrite\Utopia\Database\Validator\Query\Limit;
use Appwrite\Utopia\Database\Validator\Query\Offset;
use Appwrite\Utopia\Database\Validator\Query\Cursor;
@@ -12,7 +12,7 @@ use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
-class Base extends IndexedQueries
+class Base extends Queries
{
/**
* Expression constructor
@@ -59,15 +59,6 @@ class Base extends IndexedQueries
'array' => false,
]);
- $indexes = [];
- foreach ($allowedAttributes as $attribute) {
- $indexes[] = new Document([
- 'status' => 'available',
- 'type' => Database::INDEX_KEY,
- 'attributes' => [$attribute]
- ]);
- }
-
$validators = [
new Limit(),
new Offset(),
@@ -76,6 +67,6 @@ class Base extends IndexedQueries
new Order($attributes),
];
- parent::__construct($attributes, $indexes, ...$validators);
+ parent::__construct(...$validators);
}
}
| 11 |
diff --git a/userscript.user.js b/userscript.user.js @@ -721,16 +721,68 @@ var $$IMU_EXPORT$$;
console_log("do_request", deepcopy(data));
}
- var orig_data = deepcopy(data);
-
- if (!data.onerror)
- data.onerror = data.onload;
-
// For cross-origin cookies
if (!("withCredentials" in data)) {
data.withCredentials = true;
}
+ if (!("headers" in data)) {
+ data.headers = {};
+ }
+
+ if (data.imu_mode) {
+ var headers_to_set = {};
+
+ if (data.imu_mode === "document") {
+ headers_to_set.accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
+ headers_to_set["Sec-Fetch-Dest"] = "document";
+ headers_to_set["Sec-Fetch-Mode"] = "navigate";
+ headers_to_set["Sec-Fetch-Site"] = "none";
+ headers_to_set["Sec-Fetch-User"] = "?1";
+ } else if (data.imu_mode === "xhr") {
+ headers_to_set.accept = "*/*";
+ headers_to_set["Sec-Fetch-Dest"] = "empty";
+ headers_to_set["Sec-Fetch-Mode"] = "cors";
+ headers_to_set["Sec-Fetch-Site"] = "same-origin";
+
+ headers_to_set.origin = data.url.replace(/^([a-z]+:\/\/[^/]+)(?:\/+.*)?$/, "$1");
+ }
+
+ delete data.imu_mode;
+
+ for (var header in headers_to_set) {
+ if (headerobj_get(data.headers, header) === undefined) {
+ headerobj_set(data.headers, header, headers_to_set[header]);
+ }
+ }
+ }
+
+ if (data.imu_multipart) {
+ //var boundary = "-----------------------------" + get_random_text(20);
+ var boundary = "----WebKitFormBoundary" + get_random_text(16);
+
+ // TODO: fix? only tested for one key
+ var postdata = "";
+ for (var key in data.imu_multipart) {
+ var value = data.imu_multipart[key];
+
+ postdata += "--" + boundary + "\r\nContent-Disposition: form-data; name=\"" + key + "\"\r\n\r\n";
+ postdata += value + "\r\n";
+ }
+
+ postdata += "--" + boundary + "--\r\n";
+
+ headerobj_set(data.headers, "Content-Type", "multipart/form-data; boundary=" + boundary);
+ data.data = postdata;
+
+ delete data.imu_multipart;
+ }
+
+ var orig_data = deepcopy(data);
+
+ if (!data.onerror)
+ data.onerror = data.onload;
+
var raw_request_do = do_request_raw;
if (is_userscript && settings.allow_browser_request) {
if (userscript_manager === "Falkon GreaseMonkey" ||
@@ -6187,6 +6239,24 @@ var $$IMU_EXPORT$$;
return cookies_array.join("; ");
};
+ var headerobj_get = function(headerobj, header) {
+ for (var key in headerobj) {
+ if (key.toLowerCase() === header.toLowerCase()) {
+ return headerobj[key];
+ }
+ }
+ };
+
+ var headerobj_set = function(headerobj, header, value) {
+ for (var key in headerobj) {
+ if (key.toLowerCase() === header.toLowerCase()) {
+ return headerobj[key] = value;
+ }
+ }
+
+ return headerobj[header] = value;
+ };
+
var get_resp_finalurl = function(resp) {
var parsed = parse_headers(resp.responseHeaders);
if (!parsed)
@@ -8577,26 +8647,42 @@ var $$IMU_EXPORT$$;
// todo: fix invalid cookie
var query_snaptik_1 = function(url) {
+ url = url.replace(/[?#].*/, "");
var cache_key = site + ":" + url;
api_cache.fetch(cache_key, cb, function(done) {
do_request({
- url: "https://snaptik.app/pre_download.php?aweme_id=" + urlparts.web_vid,
+ url: "https://snaptik.app/", //pre_download.php?aweme_id=" + urlparts.web_vid,
+ imu_mode: "document",
method: "GET",
onload: function(resp) {
if (resp.status !== 200) {
console_error(cache_key, resp);
- return done(null, false)
+ return done(null, false);
}
do_request({
- method: "GET",
- url: "https://" + site + "/action-v9.php?aweme_id=" + urlparts.web_vid + "&act=download",
+ method: "POST",
+ url: "https://snaptik.app/check_user.php",
+ imu_mode: "xhr",
headers: {
- Referer: "https://snaptik.app/pre_download.php?aweme_id=" + urlparts.web_vid,
- "Sec-Fetch-Dest": "empty",
- "Sec-Fetch-Mode": "cors",
- "Sec-Fetch-Site": "same-origin",
- "Accept": "*/*"
+ Referer: "https://" + site + "/"
+ },
+ imu_multipart: {},
+ onload: function(resp) {
+ if (resp.status !== 200) {
+ console_error(cache_key, resp);
+ return done(null, false);
+ }
+
+ do_request({
+ method: "POST",
+ url: "https://" + site + "/action-v9.php",
+ imu_mode: "xhr",
+ imu_multipart: {
+ url: url
+ },
+ headers: {
+ Referer: "https://snaptik.app/", //pre_download.php?aweme_id=" + urlparts.web_vid,
},
onload: function(resp) {
if (resp.status !== 200) {
@@ -8615,6 +8701,8 @@ var $$IMU_EXPORT$$;
});
}
});
+ }
+ });
});
}
@@ -9100,6 +9188,10 @@ var $$IMU_EXPORT$$;
return !!(/^pinterest\./.test(domain_nosub));
};
+ var get_domain_from_url = function(url) {
+ return url.replace(/^[a-z]+:\/\/([^/]+)(?:\/+.*)?$/, "$1");
+ };
+
var get_domain_nosub = function(domain) {
var domain_nosub = domain.replace(/^.*\.([^.]*\.[^.]*)$/, "$1");
if (domain_nosub.match(/^co\.[a-z]{2}$/) ||
| 7 |
diff --git a/contracts/test/vault.js b/contracts/test/vault.js @@ -22,14 +22,26 @@ describe("Vault", function () {
this.timeout(0);
}
- it("Should support an asset");
+ it("Should support an asset", async () => {
+ const { vault, ousd, governor } = await loadFixture(defaultFixture);
+ await expect(
+ vault.connect(governor).supportAsset(ousd.address, "OUSD")
+ ).to.emit(vault, "AssetSupported");
+ });
- it("Should error when adding an asset that is already supported", async function () {
- const { vault, usdt } = await loadFixture(defaultFixture);
- await expect(vault.supportAsset(usdt.address)).to.be.reverted;
+ it("Should revert when adding an asset that is already supported", async function () {
+ const { vault, usdt, governor } = await loadFixture(defaultFixture);
+ await expect(
+ vault.connect(governor).supportAsset(usdt.address, "USDT")
+ ).to.be.revertedWith("Asset already supported");
});
- it("Should deprecate an asset");
+ it("Should revert when attempting to support an asset and not governor", async function () {
+ const { vault, usdt } = await loadFixture(defaultFixture);
+ await expect(vault.supportAsset(usdt.address, "USDT")).to.be.revertedWith(
+ "Caller is not the Governor"
+ );
+ });
it("Should correctly ratio deposited currencies of differing decimals", async function () {
const { ousd, vault, usdc, dai, matt } = await loadFixture(defaultFixture);
@@ -265,7 +277,7 @@ describe("Vault", function () {
await expect(matt).has.a.balanceOf("300.00", ousd);
});
- it("Should increase users balance on rebase after increased value", async () => {
+ it("Should increase users balance on rebase after increased Vault value", async () => {
const { vault, matt, ousd, josh } = await loadFixture(mockVaultFixture);
// Total OUSD supply is 200, mock an increase
await vault.setTotalValue(utils.parseUnits("220", 18));
@@ -273,6 +285,15 @@ describe("Vault", function () {
await expect(matt).has.an.approxBalanceOf("110.00", ousd);
await expect(josh).has.an.approxBalanceOf("110.00", ousd);
});
+
+ it("Should decrease users balance on rebase after decreased Vault value", async () => {
+ const { vault, matt, ousd, josh } = await loadFixture(mockVaultFixture);
+ // Total OUSD supply is 200, mock a decrease
+ await vault.setTotalValue(utils.parseUnits("180", 18));
+ await vault.rebase();
+ await expect(matt).has.an.approxBalanceOf("90.00", ousd);
+ await expect(josh).has.an.approxBalanceOf("90.00", ousd);
+ });
});
describe("Deposit pausing", async () => {
| 7 |
diff --git a/angular/projects/spark-angular/src/lib/directives/inputs/sprk-label/sprk-label.directive.ts b/angular/projects/spark-angular/src/lib/directives/inputs/sprk-label/sprk-label.directive.ts -import { Directive, ElementRef, OnInit, Input } from '@angular/core';
+import { Directive, ElementRef, OnInit, Input, Renderer2 } from '@angular/core';
@Directive({
selector: '[sprkLabel]',
@@ -7,7 +7,7 @@ export class SprkLabelDirective implements OnInit {
/**
* @ignore
*/
- constructor(public ref: ElementRef) {}
+ constructor(public ref: ElementRef, private renderer: Renderer2) {}
/**
* If `true`, this will add
* styles to the label to make it work
@@ -31,26 +31,16 @@ export class SprkLabelDirective implements OnInit {
@Input()
isHidden: boolean;
- /**
- * @ignore
- */
- getClasses(): string[] {
- const classArray: string[] = ['sprk-b-Label'];
+ ngOnInit(): void {
+ this.renderer.addClass(this.ref.nativeElement, 'sprk-b-Label');
if (this.hasIcon) {
- classArray.push('sprk-b-Label--with-icon');
+ this.renderer.addClass(this.ref.nativeElement, 'sprk-b-Label--with-icon');
}
if (this.isDisabled) {
- classArray.push('sprk-b-Label--disabled');
+ this.renderer.addClass(this.ref.nativeElement, 'sprk-b-Label--disabled');
}
if (this.isHidden) {
- classArray.push('sprk-u-ScreenReaderText');
+ this.renderer.addClass(this.ref.nativeElement, 'sprk-u-ScreenReaderText');
}
- return classArray;
- }
-
- ngOnInit(): void {
- this.getClasses().forEach((item) => {
- this.ref.nativeElement.classList.add(item);
- });
}
}
| 3 |
diff --git a/articles/best-practices/testing.md b/articles/best-practices/testing.md ---
-title: Testing Best Practices
+title: Testing Best Practices for Rules
description: Learn about best practices for testing.
topics:
- best-practices
@@ -16,7 +16,8 @@ useCase:
- database-action-scripts
- rules
---
-# Testing
+
+# Testing Best Practices for Rules
The Auth0 Dashboard provides the facility to [`TRY`](/rules/guides/debug) a rule for the purpose of testing and debugging. This facility allows a mock [`user`](/best-practices/rules#user-object) and [`context`](/best-practices/rules#context-object) object to be defined, which is then passed to the rule as part of its execution. The resulting output from the rule (including any console logging) is displayed upon completion. While this provides an immediate at-a-glance way to unit test a rule, it is very much a manual approach, and one which is unable to leverage the use of automated testing tools such as [Mocha](https://mochajs.org/) or [rewire](https://www.npmjs.com/package/rewire).
| 10 |
diff --git a/assets/js/googlesitekit/widgets/util/get-widget-component-props.js b/assets/js/googlesitekit/widgets/util/get-widget-component-props.js @@ -27,7 +27,6 @@ import memize from 'memize';
import Widget from '../components/Widget';
import WidgetReportZero from '../components/WidgetReportZero';
import WidgetReportError from '../components/WidgetReportError';
-import WidgetActivateModuleCTA from '../components/WidgetActivateModuleCTA';
import WidgetCompleteModuleActivationCTA from '../components/WidgetCompleteModuleActivationCTA';
import WidgetNull from '../components/WidgetNull';
@@ -46,9 +45,6 @@ export const getWidgetComponentProps = memize( ( widgetSlug ) => {
Widget: withWidgetSlug( widgetSlug )( Widget ),
WidgetReportZero: withWidgetSlug( widgetSlug )( WidgetReportZero ),
WidgetReportError: withWidgetSlug( widgetSlug )( WidgetReportError ),
- WidgetActivateModuleCTA: withWidgetSlug( widgetSlug )(
- WidgetActivateModuleCTA
- ),
WidgetCompleteModuleActivationCTA: withWidgetSlug( widgetSlug )(
WidgetCompleteModuleActivationCTA
),
| 2 |
diff --git a/src/css/docs/components/docs-markdown.css b/src/css/docs/components/docs-markdown.css @@ -357,6 +357,15 @@ p.DocsMarkdown--small-header {
padding: 0 2px;
}
+code .DocsMarkdown--prop-meta {
+ font-family: var(--sans-serif-font-family);
+ font-size: .8125em;
+ margin-left: .4375em;
+ -webkit-user-select: none;
+ user-select: none;
+ pointer-events: none;
+}
+
[theme="dark"] .DocsMarkdown blockquote,
[theme="dark"] .DocsMarkdown dl,
[theme="dark"] .DocsMarkdown ol,
| 7 |
diff --git a/components/search/filter-sidebar.js b/components/search/filter-sidebar.js @@ -162,7 +162,7 @@ class FilterSidebar extends React.Component {
onDateChangeFilter (filterName) {
return ((date) => {
- if (moment(new Date(date)).isValid()) {
+ if (moment(new Date(date)).isValid() || date === '') {
const newDate = moment.isMoment(date) ? date.format('YYYY-MM-DD') : date
this.setState({
[filterName]: newDate,
| 11 |
diff --git a/new-client/src/components/App.js b/new-client/src/components/App.js @@ -11,8 +11,8 @@ import CookieNotice from "./CookieNotice";
import Introduction from "./Introduction";
import Alert from "./Alert";
import PluginWindows from "./PluginWindows";
-// Temporarily commended out the new plugin as I focus on rewriting the search model
-// import Search from "./search/Search";
+
+import Search from "./search/Search";
import Zoom from "../controls/Zoom";
import Rotate from "../controls/Rotate";
@@ -362,30 +362,12 @@ class App extends React.PureComponent {
this.setState({ drawerMouseOverLock: false });
};
- renderSearchPlugin() {
- const searchPlugin = this.appModel.plugins.search;
- if (searchPlugin) {
- return (
- <searchPlugin.component
- map={searchPlugin.map}
- app={searchPlugin.app}
- options={searchPlugin.options}
- onMenuClick={this.toggleDrawer(!this.state.drawerVisible)}
- menuButtonDisabled={this.state.drawerPermanent}
- />
- );
- } else {
- return null;
- }
- }
-
- // Temporarily commended out the new plugin as I focus on rewriting the search model
+ // Method below renders the **old** Search plugin. See below for the current implementation.
// renderSearchPlugin() {
- // // FIXME: Move somewhere else from plugins - Search is part of Core
// const searchPlugin = this.appModel.plugins.search;
// if (searchPlugin) {
// return (
- // <Search
+ // <searchPlugin.component
// map={searchPlugin.map}
// app={searchPlugin.app}
// options={searchPlugin.options}
@@ -398,6 +380,23 @@ class App extends React.PureComponent {
// }
// }
+ renderSearchPlugin() {
+ // FIXME: We should get config from somewhere else now when Search is part of Core
+ if (this.appModel.plugins.search) {
+ return (
+ <Search
+ map={this.appModel.getMap()}
+ app={this}
+ options={this.appModel.plugins.search.options} // FIXME: We should get config from somewhere else now when Search is part of Core
+ onMenuClick={this.toggleDrawer(!this.state.drawerVisible)}
+ menuButtonDisabled={this.state.drawerPermanent}
+ />
+ );
+ } else {
+ return null;
+ }
+ }
+
/**
* In the case of a disabled Search plugin, we must
* ensure that the button that toggles Drawer is still visible.
| 14 |
diff --git a/generators/app/index.js b/generators/app/index.js @@ -307,6 +307,12 @@ module.exports = class extends BaseGenerator {
this.clientPackageManager = 'yarn';
}
}
+ // Set embeddableLaunchScript to true if not defined, for backward compatibility
+ // See https://github.com/jhipster/generator-jhipster/issues/10255
+ this.embeddableLaunchScript = this.config.get('embeddableLaunchScript');
+ if (!this.embeddableLaunchScript) {
+ this.embeddableLaunchScript = true;
+ }
}
};
}
| 12 |
diff --git a/activities/Constellation.activity/js/activity.js b/activities/Constellation.activity/js/activity.js @@ -6,6 +6,16 @@ define(["sugar-web/activity/activity","sugar-web/env", "worldpalette", "viewpale
// Initialize the activity.
activity.setup();
+
+ //Set background color to user color
+ var canvas = document.getElementById("canvas");
+ var canvasColor;
+ activity.getXOColor(function(error, retcolors){
+ canvasColor = retcolors;
+ });
+
+ canvas.style.backgroundColor = canvasColor["fill"];
+
var datastoreObject = activity.getDatastoreObject();
var worldButton = document.getElementById("world-button");
@@ -18,7 +28,6 @@ define(["sugar-web/activity/activity","sugar-web/env", "worldpalette", "viewpale
var viewPalette = new viewpalette.ActivityPalette(
viewButton, datastoreObject);
-
$(document).ready(function() {
var planetarium = $.virtualsky({
@@ -32,7 +41,7 @@ define(["sugar-web/activity/activity","sugar-web/env", "worldpalette", "viewpale
showplanets: true, //Show/Hide planets
showplanetlabels: true, //Show/Hide planet names
live: false, //Disabe/Enable real time clock
- clock: new Date(), //Set clock
+ clock: new Date() //Set clock
});
| 12 |
diff --git a/src/components/Callout.js b/src/components/Callout.js @@ -41,8 +41,7 @@ const Content = styled.div`
height: 100%;
`
-const Callout = ({ image, alt, title, description, children, className }) => {
- return (
+const Callout = ({ image, alt, title, description, children, className }) => (
<StyledCard className={className}>
<Image fixed={image} alt={alt} />
<Content>
@@ -54,6 +53,5 @@ const Callout = ({ image, alt, title, description, children, className }) => {
</Content>
</StyledCard>
)
-}
export default Callout
| 7 |
diff --git a/create-snowpack-app/cli/README.md b/create-snowpack-app/cli/README.md @@ -25,7 +25,7 @@ npx create-snowpack-app new-dir --template @snowpack/app-template-NAME [--use-ya
- [snowpack-template-preset-env](https://github.com/argyleink/snowpack-template-preset-env) (PostCSS + Babel)
- [11st-Starter-Kit](https://github.com/stefanfrede/11st-starter-kit) (11ty +
Snowpack + tailwindcss)
-- [app-template-reason-react](https://github.com/jihchi/app-template-reason-react) (ReScript & reason-react on top of [@snowpack/app-template-react](/templates/app-template-react))
+- [app-template-rescript-react](https://github.com/jihchi/app-template-rescript-react) (ReScript & rescript-react on top of [@snowpack/app-template-react](https://github.com/snowpackjs/snowpack/tree/main/create-snowpack-app/app-template-react))
- [svelte-tailwind](https://github.com/agneym/svelte-tailwind-snowpack) (Adds PostCSS and TailwindCSS using [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess))
- [snowpack-react-tailwind](https://github.com/mrkldshv/snowpack-react-tailwind) (React + Snowpack + Tailwindcss)
- [hyperapp-snowpack](https://github.com/bmartel/hyperapp-snowpack) (Hyperapp + Snowpack + TailwindCSS)
| 10 |
diff --git a/shared/js/ui/models/whitelist.es6.js b/shared/js/ui/models/whitelist.es6.js @@ -37,8 +37,9 @@ Whitelist.prototype = window.$.extend({},
// But first, strip the 'www.' part, otherwise getSubDomain will include it
// and whitelisting won't work for that site
url = url ? url.replace('www.', '') : ''
+ const localDomain = url.toLowerCase() === 'localhost' ? 'localhost' : null
const subDomain = tldjs.getSubdomain(url)
- const domain = tldjs.getDomain(url)
+ const domain = tldjs.getDomain(url) || localDomain
if (domain) {
const domainToWhitelist = subDomain ? subDomain + '.' + domain : domain
console.log(`whitelist: add ${domainToWhitelist}`)
| 11 |
diff --git a/packages/inertia-vue3/index.d.ts b/packages/inertia-vue3/index.d.ts -export { default as useForm } from "./useForm";
-export { default as useRemember } from "./useRemember";
-export { default as createInertiaApp } from "./createInertiaApp";
-export { default as Head, default as InertiaHead } from "./head";
-export { default as Link, default as InertiaLink, default as link } from "./link";
-export { default as App, default as InertiaApp, default as app, plugin, usePage } from "./app";
+import * as Inertia from '@inertiajs/inertia'
+import { Ref, ComputedRef, App as VueApp, DefineComponent, Plugin } from 'vue'
+
+export interface InertiaAppProps {
+ initialPage: Inertia.Page
+ initialComponent?: object
+ resolveComponent?: (name: string) => DefineComponent | Promise<DefineComponent>
+ onHeadUpdate?: (elements: string[]) => void
+}
+
+type InertiaApp = DefineComponent<InertiaAppProps>
+
+export declare const App: InertiaApp
+
+export declare const plugin: Plugin
+
+export interface CreateInertiaAppProps {
+ id?: string
+ resolve: (name: string) =>
+ DefineComponent |
+ Promise<DefineComponent> |
+ { default: DefineComponent }
+ setup: (props: {
+ el: Element
+ app: InertiaApp
+ props: InertiaAppProps
+ plugin: Plugin
+ }) => void | VueApp
+ title?: (title: string) => string
+ page?: Inertia.Page
+ render?: (app: VueApp) => Promise<string>
+}
+
+export declare function createInertiaApp(props: CreateInertiaAppProps): Promise<{ head: string[], body: string } | void>
+
+export interface InertiaLinkProps {
+ as?: string
+ data?: object
+ href: string
+ method?: string
+ headers?: object
+ onClick?: (event: MouseEvent | KeyboardEvent) => void
+ preserveScroll?: boolean | ((props: Inertia.PageProps) => boolean)
+ preserveState?: boolean | ((props: Inertia.PageProps) => boolean) | null
+ replace?: boolean
+ only?: string[]
+ onCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void
+ onBefore?: () => void
+ onStart?: () => void
+ onProgress?: (progress: Inertia.Progress) => void
+ onFinish?: () => void
+ onCancel?: () => void
+ onSuccess?: () => void
+}
+
+export type InertiaLink = DefineComponent<InertiaLinkProps>
+
+export declare const Link: InertiaLink
+
+export interface InertiaFormProps<TForm> {
+ isDirty: boolean
+ errors: Record<keyof TForm, string>
+ hasErrors: boolean
+ processing: boolean
+ progress: Inertia.Progress | null
+ wasSuccessful: boolean
+ recentlySuccessful: boolean
+ data(): TForm
+ transform(callback: (data: TForm) => object): this
+ defaults(): this
+ defaults(field: keyof TForm, value: string): this
+ defaults(fields: Record<keyof TForm, string>): this
+ reset(...fields: (keyof TForm)[]): this
+ clearErrors(...fields: (keyof TForm)[]): this
+ setError(field: keyof TForm, value: string): this
+ setError(errors: Record<keyof TForm, string>): this
+ submit(method: string, url: string, options?: Partial<Inertia.VisitOptions>): void
+ get(url: string, options?: Partial<Inertia.VisitOptions>): void
+ post(url: string, options?: Partial<Inertia.VisitOptions>): void
+ put(url: string, options?: Partial<Inertia.VisitOptions>): void
+ patch(url: string, options?: Partial<Inertia.VisitOptions>): void
+ delete(url: string, options?: Partial<Inertia.VisitOptions>): void
+ cancel(): void
+}
+
+export type InertiaForm<TForm> = TForm & InertiaFormProps<TForm>
+
+export declare function useForm<TForm>(data: TForm): InertiaForm<TForm>
+
+export declare function useForm<TForm>(rememberKey: string, data: TForm): InertiaForm<TForm>
+
+export declare function useRemember(data: object, key?: string): Ref<object>
+
+export declare function usePage<PageProps>(): {
+ props: ComputedRef<PageProps & Inertia.PageProps>
+ url: ComputedRef<string>
+ component: ComputedRef<string>
+ version: ComputedRef<string | null>
+}
+
+export declare function defineLayout(component: object): void;
+
+export type InertiaHead = DefineComponent<{
+ title?: string
+}>
+
+export declare const Head: InertiaHead
+
+declare module '@vue/runtime-core' {
+ export interface ComponentCustomProperties {
+ $inertia: typeof Inertia.Inertia
+ $page: Inertia.Page
+ $headManager: ReturnType<typeof Inertia.createHeadManager>
+ }
+
+ export interface ComponentCustomOptions {
+ remember?:
+ string |
+ string[] |
+ {
+ data: string | string[]
+ key?: string | (() => string)
+ }
+ }
+}
| 13 |
diff --git a/stories/widgets.stories.js b/stories/widgets.stories.js @@ -43,9 +43,9 @@ const { HALF, QUARTER, FULL } = WIDGET_WIDTHS;
function BoxesWidgets( { children } ) {
return (
<Grid className="googlesitekit-widget-area googlesitekit-widget-area--boxes">
- <div className="googlesitekit-widget-area-widgets">
- <Row>{ children }</Row>
- </div>
+ <Row className="googlesitekit-widget-area-widgets">
+ { children }
+ </Row>
</Grid>
);
}
@@ -53,15 +53,13 @@ function BoxesWidgets( { children } ) {
function CompositeWidgets( { children } ) {
return (
<Grid className="googlesitekit-widget-area googlesitekit-widget-area--composite">
- <div className="googlesitekit-widget-area-widgets">
- <Row>
+ <Row className="googlesitekit-widget-area-widgets">
<Cell size={ 12 }>
<Grid>
<Row>{ children }</Row>
</Grid>
</Cell>
</Row>
- </div>
</Grid>
);
}
| 2 |
diff --git a/src/DOM.js b/src/DOM.js @@ -1976,12 +1976,12 @@ class HTMLIFrameElement extends HTMLSrcableElement {
cb(err);
})
});
- } else if (name === 'position' || name === 'rotation' || name === 'scale') {
+ } else if (name === 'position' || name === 'orientation' || name === 'scale') {
const v = _parseVector(value);
if (name === 'position' && v.length === 3) {
this.xrOffset.position.set(v);
- } else if (name === 'rotation' && v.length === 4) {
- this.xrOffset.rotation.set(v);
+ } else if (name === 'orientation' && v.length === 4) {
+ this.xrOffset.orientation.set(v);
} else if (name === 'scale' && v.length === 3) {
this.xrOffset.scale.set(v);
}
| 10 |
diff --git a/src/test/system_tests/test_ceph_s3.js b/src/test/system_tests/test_ceph_s3.js @@ -214,13 +214,9 @@ module.exports = {
};
function deploy_ceph() {
- var command = `chmod a+x ${CEPH_TEST.test_dir}${CEPH_TEST.ceph_deploy}`;
- return promise_utils.exec(command, false, true)
- .then(function(res) {
console.log('Starting Deployment Of Ceph Tests...');
- command = `cd ${CEPH_TEST.test_dir};./${CEPH_TEST.ceph_deploy} > /tmp/ceph_deploy.log`;
- return promise_utils.exec(command, false, true);
- })
+ let command = `cd ${CEPH_TEST.test_dir};./${CEPH_TEST.ceph_deploy} > /tmp/ceph_deploy.log`;
+ return promise_utils.exec(command, false, true)
.then(function(res) {
return console.log(res);
})
@@ -255,10 +251,10 @@ function s3_ceph_test() {
});
})
.then(() => {
- if (!had_errors) {
- console.log('Finished Running Ceph S3 Tests');
- } else {
+ if (had_errors) {
throw new Error('Failed Running Ceph S3 Tests (' + fail_count + ' failed )');
+ } else {
+ console.log('Finished Running Ceph S3 Tests');
}
});
}
@@ -286,10 +282,10 @@ function system_ceph_test() {
});
})
.then(() => {
- if (!had_errors) {
- console.log('Finished Running System Ceph S3 Tests');
- } else {
+ if (had_errors) {
throw new Error('Failed Running System Ceph S3 Tests (' + fail_count + ' failed )');
+ } else {
+ console.log('Finished Running System Ceph S3 Tests');
}
});
}
| 2 |
diff --git a/src/plots/geo/geo.js b/src/plots/geo/geo.js @@ -506,7 +506,11 @@ proto.updateFx = function(fullLayout, geoLayout) {
}
bgRect.on('mousemove', function() {
- var lonlat = _this.projection.invert(d3.mouse(this));
+ var d3EventPosition = [
+ d3.event.offsetX,
+ d3.event.offsetY,
+ ];
+ var lonlat = _this.projection.invert(d3EventPosition);
if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) {
return dragElement.unhover(gd, d3.event);
| 14 |
diff --git a/articles/link-accounts/auth-api.md b/articles/link-accounts/auth-api.md @@ -4,7 +4,9 @@ description: How to link accounts using the Authentication API (Deprecated)
# Link Accounts using Authentication API (Deprecated)
-**NOTE:** This method of linking accounts using the linking endpoint of the [Authentication API](/api/authentication/reference#link), either through **Lock** or by manually calling the API, is **deprecated** and should no longer be used.
+::: panel-danger Deprecation Notice
+This method of linking accounts using the linking endpoint of the [Authentication API](/api/authentication#link), either through **Lock** or by manually calling the API, is **deprecated** and should no longer be used. The [POST /api/v2/users/{id}/identities](/api/management/v2#!/Users/post_identities) should be used instead. For more information refer to the [Migration Notice](/migrations#account-linking-removal).
+:::
## Link through Auth0 Login Widget
| 14 |
diff --git a/package.json b/package.json "docs-dev": "nuxt dev -c docs/nuxt.config.js",
"docs-gen": "nuxt generate -c docs/nuxt.config.js",
"docs-publish": "gh-pages -t -d docs-dist -b master -r [email protected]:bootstrap-vue/bootstrap-vue.github.io.git",
- "test": "yarn lint && jest",
+ "test": "yarn lint && NODE_ENV=test jest",
"lint": "eslint src",
"release": "npm run build && npm run test && standard-version",
"postinstall": "opencollective postinstall || exit 0"
| 4 |
diff --git a/bin/sync-version-numbers b/bin/sync-version-numbers @@ -31,5 +31,5 @@ fi
version_files="./examples/ README.md bin/upload-to-cdn.sh website/src/examples/ website/src/docs/ website/themes/uppy/layout/"
main_package_version=$(node -p "require('./packages/uppy/package.json').version")
-replace-x -r 'uppy/v\d+\.\d+\.\d+/dist' "uppy/v$main_package_version/dist" $version_files --exclude=node_modules
+replace-x -r 'uppy/v\d+\.\d+\.\d+/' "uppy/v$main_package_version/" $version_files --exclude=node_modules
git add $version_files # add changes to the Release commit
| 3 |
diff --git a/js/core/bis_fileserverclient.js b/js/core/bis_fileserverclient.js @@ -92,7 +92,7 @@ class BisFileServerClient extends BisBaseServerClient {
connectToServer(address = 'ws://localhost:'+wsUtilInitialPort) {
if (this.socket) {
console.log('closing connection connect to server');
- //this.closeConnection();
+ this.closeConnection();
}
if (address.indexOf('ws://')!==0)
| 1 |
diff --git a/src/service_rebalancer.erl b/src/service_rebalancer.erl @@ -95,15 +95,14 @@ rebalance(Rebalancer, Service, Type,
AllNodes, KeepNodes, EjectNodes, DeltaNodes, ProgressCallback) ->
erlang:register(worker_name(Service), self()),
- ?log_debug("Rebalancing service ~p.~nKeepNodes: ~p~nEjectNodes: ~p~nDeltaNodes: ~p",
- [Service, KeepNodes, EjectNodes, DeltaNodes]),
+ Id = couch_uuids:random(),
+ ?rebalance_info("Rebalancing service ~p with id ~p."
+ "~nKeepNodes: ~p~nEjectNodes: ~p~nDeltaNodes: ~p",
+ [Service, Id, KeepNodes, EjectNodes, DeltaNodes]),
{ok, NodeInfos} = service_agent:get_node_infos(Service, AllNodes, Rebalancer),
?log_debug("Got node infos:~n~p", [NodeInfos]),
- Id = couch_uuids:random(),
- ?log_debug("Rebalance id is ~p", [Id]),
-
{KeepNodesArg, EjectNodesArg} = build_rebalance_args(KeepNodes, EjectNodes,
DeltaNodes, NodeInfos),
| 5 |
diff --git a/src/components/form/form.js b/src/components/form/form.js @@ -447,7 +447,7 @@ class Form extends React.Component {
checkIsFormDirty = () => {
let confirmationMessage = '';
- if (this.isDirty) {
+ if (this.state.isDirty) {
// Confirmation message is usually overridden by browsers with a similar message
confirmationMessage = 'Do you want to reload this site?'
+ 'Changes that you made may not be saved.';
| 5 |
diff --git a/lib/https/index.js b/lib/https/index.js @@ -449,6 +449,20 @@ function resolveWebsocket(socket, wss) {
}
clearTimeout(timeout);
proxyUrl ? util.setClientId(headers, socket.enable, socket.disable, clientIp) : util.removeClientId(headers);
+ if (socket.disable.clientIp || socket.disable.clientIP) {
+ delete headers[config.CLIENT_IP_HEAD];
+ } else {
+ var forwardedFor = util.getMatcherValue(_rules.forwardedFor);
+ if (net.isIP(forwardedFor)) {
+ headers[config.CLIENT_IP_HEAD] = forwardedFor;
+ } else if (net.isIP(socket._customXFF)) {
+ headers[config.CLIENT_IP_HEAD] = socket._customXFF;
+ } else if ((!isInternalProxy && !config.keepXFF && !plugin) || util.isLocalAddress(clientIp)) {
+ delete headers[config.CLIENT_IP_HEAD];
+ } else {
+ headers[config.CLIENT_IP_HEAD] = clientIp;
+ }
+ }
reqSocket.write(socket.getBuffer(headers, options.path));
delete headers[config.HTTPS_FIELD];
var resDelay = util.getMatcherValue(_rules.resDelay);
@@ -477,10 +491,9 @@ function resolveWebsocket(socket, wss) {
headers.origin = (options.protocol == 'wss:' ? 'https://' : 'http://') + options.host;
}
socket._origin = origin;
- var customXFF;
if (reqHeaders) {
reqHeaders = util.lowerCaseify(reqHeaders, socket.rawHeaderNames);
- customXFF = reqHeaders[config.CLIENT_IP_HEAD];
+ socket._customXFF = reqHeaders[config.CLIENT_IP_HEAD];
delete reqHeaders[config.CLIENT_IP_HEAD];
extend(headers, reqHeaders);
headers.host = headers.host || host;
@@ -491,20 +504,6 @@ function resolveWebsocket(socket, wss) {
if (_rules.referer) {
headers.referer = util.getMatcherValue(_rules.referer);
}
- if (socket.disable.clientIp || socket.disable.clientIP) {
- delete headers[config.CLIENT_IP_HEAD];
- } else {
- var forwardedFor = util.getMatcherValue(_rules.forwardedFor);
- if (net.isIP(forwardedFor)) {
- headers[config.CLIENT_IP_HEAD] = forwardedFor;
- } else if (net.isIP(customXFF)) {
- headers[config.CLIENT_IP_HEAD] = customXFF;
- } else if ((!isInternalProxy && !config.keepXFF && !plugin) || util.isLocalAddress(clientIp)) {
- delete headers[config.CLIENT_IP_HEAD];
- } else {
- headers[config.CLIENT_IP_HEAD] = clientIp;
- }
- }
var delReqHeaders = util.parseDeleteProperties(socket).reqHeaders;
Object.keys(delReqHeaders).forEach(function(name) {
| 1 |
diff --git a/aura-impl/src/main/resources/aura/AuraEventService.js b/aura-impl/src/main/resources/aura/AuraEventService.js @@ -1059,7 +1059,7 @@ AuraEventService.prototype.addEventHandler=function(event,handler,phase,includeF
throw new Error("$A.addEventHandler: Unable to find current component target. Are you running in Aura scope?");
}
if(!globalId){
- globalId="aura:root";
+ globalId="1:0"; //JBUCH: HACK: HARDCODED FIRST ID
}
event=DefDescriptor.normalize(event);
// JBUCH: TODO: VALIDATE THIS EVENT EXISTS BEFORE ADDING IT
@@ -1117,7 +1117,16 @@ AuraEventService.prototype.addHandler = function(config) {
//$A.deprecated("$A.eventService.addHandler(config) is no longer supported.","Please use $A.addEventHandler(event,handler,phase,includeFacets) instead.","2016/12/31","2017/07/13");
var includeFacets=config["includeFacets"];
includeFacets=includeFacets !== undefined && includeFacets !== null && includeFacets !== false && includeFacets !== 0 && includeFacets !== "false" && includeFacets !== "" && includeFacets !== "f";
+ var context=$A.getContext();
+ var component=$A.getComponent(config["globalId"]);
+ if(context&&component){
+ context.setCurrentAccess(component);
+ }
this.addEventHandler(config["event"],config["handler"],config["phase"],includeFacets);
+ if(context&&component){
+ context.releaseCurrentAccess();
+ }
+
};
/**
@@ -1145,10 +1154,10 @@ AuraEventService.prototype.removeEventHandler=function(event,handler,phase) {
throw new Error("$A.removeEventHandler: Unable to find current component target. Are you running in Aura scope?");
}
if(!globalId){
- globalId="aura:root";
+ globalId="1:0"; //JBUCH: HACK: HARDCODED FIRST ID
}
var cmpHandlers=phaseHandlers[globalId];
- while(cmpHandlers){
+ if(cmpHandlers){
for(var i=0;i<cmpHandlers.length;i++){
if(cmpHandlers[i]===handler||cmpHandlers[i].reference===handler){
delete cmpHandlers[i].reference;
@@ -1156,12 +1165,6 @@ AuraEventService.prototype.removeEventHandler=function(event,handler,phase) {
break;
}
}
- if(globalId===$A.getRoot().globalId){
- cmpHandlers=phaseHandlers["aura:root"];
- globalId=null;
- }else{
- cmpHandlers=null;
- }
}
}
}
| 11 |
diff --git a/generators/generator-base.js b/generators/generator-base.js @@ -2360,13 +2360,13 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
if (options.websocket) {
this.jhipsterConfig.websocket = options.websocket;
}
- if (options.jhiPrefix) {
+ if (options.jhiPrefix !== undefined) {
this.jhipsterConfig.jhiPrefix = options.jhiPrefix;
}
- if (options.entitySuffix) {
+ if (options.entitySuffix !== undefined) {
this.jhipsterConfig.entitySuffix = options.entitySuffix;
}
- if (options.dtoSuffix) {
+ if (options.dtoSuffix !== undefined) {
this.jhipsterConfig.dtoSuffix = options.dtoSuffix;
}
if (options.clientFramework) {
| 11 |
diff --git a/articles/api-auth/index.html b/articles/api-auth/index.html @@ -123,6 +123,9 @@ title: API Authorization
<li>
<i class="icon icon-budicon-695"></i><a href="/api-auth/tutorials/password-grant">Executing the flow</a>
</li>
+ <li>
+ <i class="icon icon-budicon-695"></i><a href="/api-auth/tutorials/multifactor-resource-owner-password">How to use MFA with Resource Owner Password Grant</a>
+ </li>
</ul>
</li>
<li>
| 0 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -366,7 +366,7 @@ var RED = (function() {
var parts = topic.split("/");
var node = RED.nodes.node(parts[1]);
if (node) {
- if (msg.hasOwnProperty("text") && /^[a-zA-Z]/.test(msg.text)) {
+ if (msg.hasOwnProperty("text") && msg.text !== null && /^[a-zA-Z]/.test(msg.text)) {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
node.status = msg;
| 9 |
diff --git a/package.json b/package.json "prismarine-block": "^1.2.0",
"prismarine-chunk": "^1.15.0",
"prismarine-entity": "^0.2.0",
- "prismarine-item": "^1.1.0",
+ "prismarine-item": "^1.2.0",
"prismarine-recipe": "^1.0.1",
"prismarine-windows": "^1.1.1",
"protodef": "^1.6.7",
| 3 |
diff --git a/app/reducers/launchOnStartUp.js b/app/reducers/launchOnStartUp.js import { TOGGLE_LAUNCH_ON_START_UP, } from '../actions/actionTypes';
-const launchOnStartUp = (state = true, action) => {
+const launchOnStartUp = (state = false, action) => {
switch (action.type) {
case TOGGLE_LAUNCH_ON_START_UP:
return action.launchOnStartUp;
| 12 |
diff --git a/docs/release.md b/docs/release.md @@ -9,7 +9,7 @@ There are a few miscellaneous tasks to do before making a new release:
* Ensure the default network is correct in `app/config.toml`:
```toml
-default_network = "gaia-2"
+default_network = "gaia-5001"
```
* Ensure the network params you wish to use are in a folder at `app/networks/<networkname>`. It requires the `genesis.json`, `config.toml`, and `gaiaversion.txt` files. You can get them from the testnets repo (https://github.com/tendermint/testnets).
| 3 |
diff --git a/Makefile b/Makefile @@ -16,7 +16,7 @@ help:
build:
@set -e
# Compile the scss file and generate the output css file
- ${NODE_BIN}/node-sass --include-path ./node_modules/ scss/siimple.scss dist/siimple.css
+ ${NODE_BIN}/sass scss/siimple.scss dist/siimple.css
# Add the header to the compiled css file
@node ./scripts/header.js > ./dist/header.txt
@cat ./dist/header.txt ./dist/siimple.css > ./dist/siimple.temp.css
@@ -44,5 +44,5 @@ docs:
mkdir -p ./docs/_site/assets
cp ./dist/siimple.min.css ./docs/_site/assets/
cp ./media/logo-colored.png ./docs/_site/assets/logo.png
- ${NODE_BIN}/node-sass ./docs/siimple-docs.scss ./docs/_site/assets/siimple-docs.css
+ ${NODE_BIN}/sass ./docs/siimple-docs.scss ./docs/_site/assets/siimple-docs.css
| 14 |
diff --git a/src/processMessages.js b/src/processMessages.js @@ -37,7 +37,7 @@ export default async function processMessages(
// Search for articles
const { data: { SearchArticles } } = await gql`query($text: String!) {
- SearchArticles(text: $text, orderBy: [{_score: DESC}]) {
+ SearchArticles(text: $text, orderBy: [{_score: DESC}], first: 4) {
edges {
node {
text
| 1 |
diff --git a/assets/js/googlesitekit/data/create-existing-tag-store.test.js b/assets/js/googlesitekit/data/create-existing-tag-store.test.js @@ -99,7 +99,7 @@ describe( 'createExistingTagStore store', () => {
} );
it( 'receives and sets value', () => {
- const existingTag = 'UA-12345678-1';
+ const existingTag = 'test-existing-tag';
registry.dispatch( STORE_NAME ).receiveGetExistingTag( existingTag );
expect( store.getState().existingTag ).toBe( existingTag );
} );
@@ -148,7 +148,7 @@ describe( 'createExistingTagStore store', () => {
describe( 'hasExistingTag', () => {
it( 'returns true if an existing tag exists', async () => {
- registry.dispatch( STORE_NAME ).receiveGetExistingTag( 'UA-12345678-1' );
+ registry.dispatch( STORE_NAME ).receiveGetExistingTag( 'test-existing-tag' );
const hasExistingTag = registry.select( STORE_NAME ).hasExistingTag();
| 14 |
diff --git a/components/Feed/StickySection.js b/components/Feed/StickySection.js @@ -46,7 +46,7 @@ class StickySection extends Component {
super(props)
this.state = {
sticky: false,
- isMobile: true,
+ isMedium: false,
isSmall: false,
width: 0,
height: 0
@@ -69,11 +69,11 @@ class StickySection extends Component {
}
this.measure = () => {
- const isMobile = window.innerWidth < mediaQueries.lBreakPoint
+ const isMedium = window.innerWidth < mediaQueries.lBreakPoint
const isSmall = window.innerWidth < mediaQueries.mBreakPoint
if (this.sectionRef) {
const { width, height } = this.sectionRef.getBoundingClientRect()
- this.setState({ width, height, isMobile, isSmall })
+ this.setState({ width, height, isMedium, isSmall })
}
}
}
@@ -91,7 +91,7 @@ class StickySection extends Component {
render () {
const { children, label } = this.props
- const { sticky, width, isMobile } = this.state
+ const { sticky, width, isMedium } = this.state
return (
<section ref={this.setSectionRef}>
<div {...style.header}>
@@ -100,7 +100,7 @@ class StickySection extends Component {
{...(sticky && style.sticky)}
style={{
position: sticky ? 'fixed' : 'relative',
- width: isMobile ? width : SIDEBAR_WIDTH
+ width: isMedium ? width : SIDEBAR_WIDTH
}}>
{
label
| 10 |
diff --git a/package.json b/package.json "unified": "^6.1.4"
},
"scripts": {
- "start-dev": "webpack-dev-server --config frontend_webpack.config.babel.js --watch --hot --content-base dist --history-api-fallback",
- "test": "gulp jasmine"
+ "start": "cp public/* dist/ && cp -R static dist/ && webpack-dev-server --config frontend_webpack.config.babel.js --watch --hot --content-base dist --history-api-fallback",
+ "build": "webpack --config ./frontend_webpack.config.babel.js -p && cp public/* dist/ && cp -R static dist/",
+ "test": "gulp spec-app"
}
}
| 7 |
diff --git a/src/govuk/components/all.test.js b/src/govuk/components/all.test.js @@ -38,25 +38,25 @@ it('_all.scss renders to CSS without errors', () => {
})
})
-it.each(allComponents)('%s.scss renders to CSS without errors', (component) => {
+describe.each(allComponents)('%s', (component) => {
+ it(`${component}.scss renders to CSS without errors`, () => {
return renderSass({
file: `${configPaths.src}/components/${component}/_${component}.scss`
})
})
-it.each(allComponents)('generate screenshots for Percy visual regression, with JavaScript disabled', async (component) => {
+ it('generate screenshots for Percy visual regression, with JavaScript disabled', async () => {
await page.setJavaScriptEnabled(false)
await page.goto(baseUrl + '/components/' + component + '/preview', { waitUntil: 'load' })
await percySnapshot(page, 'no-js: ' + component)
})
-it.each(allComponents)('generate screenshots for Percy visual regression, with JavaScript enabled', async (component) => {
+ it('generate screenshots for Percy visual regression, with JavaScript enabled', async () => {
await page.setJavaScriptEnabled(true)
await page.goto(baseUrl + '/components/' + component + '/preview', { waitUntil: 'load' })
await percySnapshot(page, 'js: ' + component)
})
-describe.each(allComponents)('%s', (component) => {
describe('examples output valid HTML', () => {
const examples = getComponentData(component).examples.map(function (example) {
return [example.name, example.data]
| 5 |
diff --git a/pages/app/ExploreDetail.js b/pages/app/ExploreDetail.js @@ -131,6 +131,7 @@ class ExploreDetail extends Page {
});
}
}
+
getDataset() {
this.setState({
loading: true
@@ -153,35 +154,17 @@ class ExploreDetail extends Page {
}
getSimilarDatasets() {
- this.setState({
- similarDatasetsLoaded: false
- });
- this.datasetService.getSimilarDatasets()
- .then((response) => {
- let counter = 0;
- const similarDatasets = response.map(val => val.dataset).filter(
- () => {
- counter++;
- return counter < 7;
- });
+ this.setState({ similarDatasetsLoaded: false });
- if (similarDatasets.length > 0) {
- DatasetService.getDatasets(similarDatasets, 'widget,metadata,layer,vocabulary')
- .then((data) => {
- this.setState({
- similarDatasetsLoaded: true,
- similarDatasets: data
- });
- })
- .catch(err => toastr.error('Error', err));
- } else {
- this.setState({
- similarDatasetsLoaded: true,
- similarDatasets: []
- });
- }
+ this.datasetService.getSimilarDatasets()
+ .then(res => res.map(val => val.dataset).slice(0, 7))
+ .then((ids) => {
+ if (ids.length === 0) return [];
+ return DatasetService.getDatasets(ids, 'widget,metadata,layer,vocabulary');
})
- .catch(err => toastr.error('Error', err));
+ .then(similarDatasets => this.setState({ similarDatasets }))
+ .catch(() => toastr.error('Error', 'Unable to load the similar datasets'))
+ .then(() => this.setState({ similarDatasetsLoaded: true }));
}
loadDefaultWidgetIntoRedux(defaultEditableWidget) {
| 7 |
diff --git a/src/views/Account.vue b/src/views/Account.vue Send
</button>
</router-link>
- <router-link
- class="account-container_actions_button"
- active-class=""
- tag="button"
- :disabled="swapDisabled"
- :to="`/accounts/${accountId}/${asset}/swap`"
- >
+ <router-link :to="`/accounts/${accountId}/${asset}/swap`">
+ <button class="account-container_actions_button">
<div class="account-container_actions_button_wrapper" :id="`${asset}_swap_button`">
<SwapIcon
class="account-container_actions_button_icon account-container_actions_button_swap"
/>
</div>
Swap
+ </button>
</router-link>
<router-link v-bind:to="`/accounts/${accountId}/${asset}/receive`">
<button class="account-container_actions_button">
<script>
import { mapState, mapGetters, mapActions } from 'vuex'
import cryptoassets from '@/utils/cryptoassets'
-import { chains, ChainId } from '@liquality/cryptoassets'
+import { chains } from '@liquality/cryptoassets'
import NavBar from '@/components/NavBar.vue'
import RefreshIcon from '@/assets/icons/refresh.svg'
import SendIcon from '@/assets/icons/arrow_send.svg'
@@ -120,11 +116,8 @@ import EyeIcon from '@/assets/icons/eye.svg'
import BN from 'bignumber.js'
import { formatFontSize } from '@/utils/fontSize'
import CopyAddress from '@/components/CopyAddress'
-
import amplitude from 'amplitude-js'
-
amplitude.getInstance().init('bf12c665d1e64601347a600f1eac729e')
-
export default {
components: {
NavBar,
@@ -156,9 +149,6 @@ export default {
'fiatRates',
'marketData'
]),
- swapDisabled() {
- return this.account?.type.includes('ledger')
- },
account() {
return this.accountItem(this.accountId)
},
@@ -178,7 +168,6 @@ export default {
if (this.account) {
return getAddressExplorerLink(this.address, this.asset, this.activeNetwork)
}
-
return '#'
}
},
@@ -198,7 +187,6 @@ export default {
},
async refresh() {
if (this.updatingBalances) return
-
this.updatingBalances = true
await this.updateAccountBalance({
network: this.activeNetwork,
@@ -212,11 +200,7 @@ export default {
}
},
async created() {
- if (
- this.account &&
- this.account?.type.includes('ledger') &&
- this.account?.chain !== ChainId.Bitcoin
- ) {
+ if (this.account && this.account.type.includes('ledger')) {
this.address = chains[cryptoassets[this.asset]?.chain]?.formatAddress(
this.account.addresses[0],
this.activeNetwork
@@ -233,9 +217,7 @@ export default {
}
await this.refresh()
this.activityData = [...this.assetHistory]
-
const { chain } = cryptoassets[this.asset]
-
this.trackAnalytics({
event: 'Active Asset',
properties: {
@@ -252,7 +234,6 @@ export default {
}
}
</script>
-
<style lang="scss">
.account-container {
.account-content-top {
@@ -266,25 +247,21 @@ export default {
text-align: center;
position: relative;
}
-
&_balance {
&_fiat {
min-height: 15px;
margin-bottom: 6px;
}
-
&_value {
line-height: 36px;
margin-right: 8px;
font-size: 30px;
}
-
&_code {
font-size: $h3-font-size;
line-height: 22px;
}
}
-
&_refresh-icon {
position: absolute;
top: 16px;
@@ -292,18 +269,15 @@ export default {
width: 24px;
height: 24px;
cursor: pointer;
-
path {
fill: $color-text-secondary;
}
}
-
&_actions {
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
-
&_button {
display: flex;
justify-content: center;
@@ -316,12 +290,10 @@ export default {
background: none;
font-weight: 600;
font-size: 13px;
-
&.disabled {
opacity: 0.5;
cursor: auto;
}
-
&_wrapper {
display: flex;
justify-content: center;
@@ -332,25 +304,21 @@ export default {
border-radius: 50%;
margin-bottom: 4px;
}
-
&_icon {
width: 16px;
height: 16px;
}
-
&_swap {
height: 30px;
}
}
}
-
&_address {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
position: relative;
-
button {
font-size: $h4-font-size;
font-weight: normal;
@@ -359,7 +327,6 @@ export default {
background: none;
outline: none;
}
-
.eye-btn {
position: absolute;
right: 60px;
@@ -368,23 +335,19 @@ export default {
background-color: transparent;
display: flex;
align-items: center;
-
svg {
width: 20px;
}
-
&:hover {
opacity: 0.8;
}
}
}
-
&_transactions {
flex: 1;
flex-basis: 0;
overflow-y: scroll;
-ms-overflow-style: none;
-
&::-webkit-scrollbar {
display: none;
}
| 3 |
diff --git a/articles/clients/client-types.md b/articles/clients/client-types.md @@ -16,6 +16,33 @@ The OAuth 2.0 specification [defines two types of clients](https://tools.ietf.or
When creating a client through the [Dashboard](${manage_url}/#/clients), Auth0 will ask you what type of application you want the client to represent and use that information to determine the client type.
+### Checking Your Client Type
+
+You can use the Management API's Get a Client endpoint to check your existing Client's type. If the client is first party, the `is_first_party` equals `true`, else `false`.
+
+```har
+{
+ "method": "GET",
+ "url": "https://${account.namespace}.auth0.com//api/v2/clients/CLIENT_ID",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [],
+ "headers": [{
+ "name": "Authorization",
+ "value": "Bearer MGMT_API_ACCESS_TOKEN"
+ }],
+ "queryString": [
+ {
+ "name": "fields",
+ "value": "is_first_party"
+ },
+ {
+ "name": "include_fields",
+ "value": true
+ }
+ ]
+}
+```
+
### Confidential Clients
Confidential clients are able to hold credentials (such as a client ID and secret) in a secure way without exposing them to unauthorized parties. This means that you will need a trusted backend server to store the secret(s).
| 0 |
diff --git a/definitions/npm/jquery_v3.x.x/flow_v0.28.x-/jquery_v3.x.x.js b/definitions/npm/jquery_v3.x.x/flow_v0.28.x-/jquery_v3.x.x.js @@ -107,7 +107,7 @@ declare interface JQueryAjaxSettings {
/**
* A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest: any) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
*/
- error?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: string) => any;
+ error?: (jqXHR: JQueryXHR, textStatus?: string, errorThrown?: string) => any;
/**
* Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
*/
| 1 |
diff --git a/test/jasmine/tests/pie_test.js b/test/jasmine/tests/pie_test.js @@ -494,11 +494,11 @@ describe('Pie traces', function() {
.then(function() {
var expWidths = ['3', '0', '0'];
- d3.selectAll(SLICES_SELECTOR).each(function(d) {
- expect(this.style.strokeWidth).toBe(expWidths[d.pointNumber]);
+ d3.selectAll(SLICES_SELECTOR).each(function(d, i) {
+ expect(this.style.strokeWidth).toBe(expWidths[d.pointNumber], 'sector #' + i);
});
- d3.selectAll(LEGEND_ENTRIES_SELECTOR).each(function(d) {
- expect(this.style.strokeWidth).toBe(expWidths[d[0].i]);
+ d3.selectAll(LEGEND_ENTRIES_SELECTOR).each(function(d, i) {
+ expect(this.style.strokeWidth).toBe(expWidths[d[0].i], 'item #' + i);
});
})
.catch(failTest)
| 0 |
diff --git a/api/lib/services/agent/agent.converse-call-webhook.service.js b/api/lib/services/agent/agent.converse-call-webhook.service.js @@ -26,10 +26,15 @@ module.exports = async function ({ url, templatePayload, payloadType, method, te
try {
const compiledUrl = handlebars.compile(url)(templateContext);
- let compiledPayload;
+ let compiledPayload, compiledUsername, compiledPassword;
let data = '';
let contentType = '';
+ if (username) {
+ compiledUsername = handlebars.compile(username)(templateContext)
+ compiledPassword = handlebars.compile(password)(templateContext)
+ }
+
if (payloadType !== 'None' && payloadType !== '') {
compiledPayload = handlebars.compile(templatePayload)(templateContext);
}
@@ -56,8 +61,8 @@ module.exports = async function ({ url, templatePayload, payloadType, method, te
headers: getHeaders(headers, contentType),
responseType: payloadType === 'XML' ? 'text' : 'json',
auth: username ? {
- username,
- password
+ username: compiledUsername,
+ password: compiledPassword
} : undefined
});
endTime = new Moment();
@@ -69,6 +74,7 @@ module.exports = async function ({ url, templatePayload, payloadType, method, te
};
}
catch (error) {
+ console.log(error);
endTime = new Moment();
const elapsed_time_ms = Moment.duration(endTime.diff(startTime), 'ms').asMilliseconds();
if (error.response && error.response.data){
| 11 |
diff --git a/yarn.lock b/yarn.lock @@ -5072,9 +5072,9 @@ mongodb@^2.2.31:
readable-stream "2.2.7"
mongodb@^3.0.1:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.0.tgz#babd7172ec717e2ed3f85e079b3f1aa29dce4724"
- integrity sha512-/XWWub1mHZVoqEsUppE0GV7u9kanLvHxho6EvBxQbShXTKYF9trhZC2NzbulRGeG7xMJHD8IOWRcdKx5LPjAjQ==
+ version "3.5.9"
+ resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.9.tgz#799b72be8110b7e71a882bb7ce0d84d05429f772"
+ integrity sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==
dependencies:
bl "^2.2.0"
bson "^1.1.4"
| 13 |
diff --git a/sirepo/server.py b/sirepo/server.py @@ -246,7 +246,6 @@ def api_findByName(simulation_type, application_mode, simulation_name):
)
if len(rows) == 0:
for s in simulation_db.examples(sim_type):
- pkdp(s.models.simulation.name)
if s['models']['simulation']['name'] != simulation_name:
continue
simulation_db.save_new_example(s)
@@ -308,10 +307,10 @@ def api_importArchive():
import sirepo.importer
data = sirepo.importer.do_form(flask.request.form)
- return http_reply.gen_local_route_redirect(
+ return http_reply.gen_redirect_for_local_route(
data.simulationType,
route=None,
- params={':simulationId': data.models.simulation.simulationId},
+ params={'simulationId': data.models.simulation.simulationId},
)
| 1 |
diff --git a/apps/terminalclock/app.js b/apps/terminalclock/app.js @@ -92,19 +92,19 @@ function draw(){
clearWatchIfNeeded(now); // mostly to not have issues when changing days
drawTime(now, curPos);
curPos++;
- if(settings.showDate == "Yes"){
+ if(settings.showDate){
drawDate(now, curPos);
curPos++;
}
- if(settings.showHRM == "Yes"){
+ if(settings.showHRM){
drawHRM(curPos);
curPos++;
}
- if(settings.showActivity == "Yes"){
+ if(settings.showActivity){
drawActivity(curPos);
curPos++;
}
- if(settings.showStepCount == "Yes"){
+ if(settings.showStepCount){
drawStepCount(curPos);
curPos++;
}
@@ -124,10 +124,10 @@ g.clear();
var settings = Object.assign({
// default values
HRMinConfidence: 40,
- showDate: "Yes",
- showHRM: "Yes",
- showActivity: "Yes",
- showStepCount: "Yes",
+ showDate: true,
+ showHRM: true,
+ showActivity: true,
+ showStepCount: true,
}, require('Storage').readJSON("terminalclock.json", true) || {});
// draw immediately at first
draw();
| 1 |
diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js @@ -446,6 +446,7 @@ export const AttachmentsContainer = styled.div`
`;
export const ThreadMeta = styled.div`
+ align-self: stretch;
display: flex;
margin: 10px 16px 16px;
justify-content: space-between;
| 1 |
diff --git a/src/govuk/components/character-count/character-count.js b/src/govuk/components/character-count/character-count.js @@ -167,7 +167,7 @@ CharacterCount.prototype.updateVisibleCountMessage = function () {
}
// Update message
- $visibleCountMessage.innerHTML = this.formatUpdateMessage()
+ $visibleCountMessage.innerHTML = this.formattedUpdateMessage()
}
// Update screen reader-specific counter
@@ -183,11 +183,11 @@ CharacterCount.prototype.updateScreenReaderCountMessage = function () {
}
// Update message
- $screenReaderCountMessage.innerHTML = this.formatUpdateMessage()
+ $screenReaderCountMessage.innerHTML = this.formattedUpdateMessage()
}
// Format update message
-CharacterCount.prototype.formatUpdateMessage = function () {
+CharacterCount.prototype.formattedUpdateMessage = function () {
var $textarea = this.$textarea
var options = this.options
var remainingNumber = this.maxLength - this.count($textarea.value)
| 10 |
diff --git a/tools/local-network-setup/.dh_origintrail_noderc b/tools/local-network-setup/.dh_origintrail_noderc "blockchainTitle": "Polygon",
"networkId": "polygon::testnet",
"rpcEndpoints": [
- "wss://polygon-mumbai.g.alchemy.com/v2/q8PTkz1zFteWTuMLD3gQrPwPZjutgIKy"
+ "https://rpc-mumbai.maticvigil.com/",
+ "https://matic-mumbai.chainstacklabs.com",
+ "https://rpc-mumbai.matic.today",
+ "https://matic-testnet-archive-rpc.bwarelabs.com"
],
"publicKey": "...",
"privateKey": "..."
| 3 |
diff --git a/package.json b/package.json "devDependencies": {
"@11ty/eleventy": "^0.9.0",
"@11ty/eleventy-plugin-inclusive-language": "^1.0.0",
- "@11ty/eleventy-plugin-rss": "^1.0.6",
+ "@11ty/eleventy-plugin-rss": "^1.0.7",
"@11ty/eleventy-plugin-syntaxhighlight": "2.0.3",
"avatar-local-cache": "^2.0.3",
"chalk": "^2.4.2",
| 4 |
diff --git a/src/providers/storage/url.js b/src/providers/storage/url.js @@ -36,10 +36,12 @@ const url = function(formio) {
respData = {};
}
+ const url = respData.hasOwnProperty('url') ? respData.url : `${xhr.responseURL}/${fileName}`;
+
resolve({
storage: 'url',
name: fileName,
- url: `${xhr.responseURL}/${fileName}`,
+ url,
size: file.size,
type: file.type,
data: respData
| 11 |
diff --git a/token-metadata/0x265Ba42daF2D20F3F358a7361D9f69Cb4E28F0E6/metadata.json b/token-metadata/0x265Ba42daF2D20F3F358a7361D9f69Cb4E28F0E6/metadata.json "symbol": "UBOMB",
"address": "0x265Ba42daF2D20F3F358a7361D9f69Cb4E28F0E6",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/sgfTests.js b/test/sgfTests.js @@ -128,12 +128,6 @@ describe('sgf', () => {
})
)
})
- it('should auto-detect GB2312 encoding if given enough data', () => {
- assert.equal(
- sgf.parse('(;GM[1]FF[4]SZ[19]PB[\xBD\xA3\xB9\xFD\xCE\xDE\xC9\xF9])')[0].nodes[0].PB[0], // GB2312
- sgf.parse('(;GM[1]FF[4]SZ[19]CA[UTF-8]PB[\xE5\x89\x91\xE8\xBF\x87\xE6\x97\xA0\xE5\xA3\xB0])')[0].nodes[0].PB[0] // UTF-8
- )
- })
})
describe('encoding', () => {
| 2 |
diff --git a/client/index.html b/client/index.html </ons-list-item>
<ons-list-item>
<div class="left">
- Sensor
+ Sensor cleaning
</div>
<div class="center" id="settings-consumables-status-sensor" style="margin-left:5%">
??? hours left
| 14 |
diff --git a/src/components/CartPopover/CartPopover.js b/src/components/CartPopover/CartPopover.js @@ -19,29 +19,41 @@ import Link from "components/Link";
const styles = (theme) => ({
container: {
- display: "flex",
alignItems: "center",
- width: "100%",
+ boxShadow: `-5px 10px 20px ${theme.palette.reaction.black50}`,
+ display: "flex",
marginLeft: "auto",
marginRight: "auto",
- backgroundColor: "#ff0000"
+ maxWidth: "400px",
+ paddingTop: "12px",
+ position: "fixed",
+ right: 0,
+ top: 0,
+ width: "100%",
+ backgroundColor: theme.palette.reaction.white
},
- addedToCartItemQuantity: {
- color: theme.palette.primary.dark,
- display: "inline",
- fontWeight: 600,
- marginRight: "7px"
+ containerItem: {
+ alignItems: "center",
+ display: "flex"
+ },
+ addedToCartImg: {
+ height: "40px",
+ marginRight: "10px",
+ width: "40px"
},
addedToCartItemName: {
- color: theme.palette.primary.dark,
- display: "inline",
- fontWeight: 600,
- marginRight: "7px"
+ maxWidth: "200px",
+ whiteSpace: "nowrap",
+ overflow: "hidden",
+ textOverflow: "ellipsis",
+ fontWeight: theme.typography.fontWeightMedium,
+ display: "inline-block",
+ lineHeight: "0.8em"
},
addedToCartText: {
color: theme.palette.primary.dark,
display: "inline",
- fontWeight: 100
+ fontSize: theme.typography.fontSize * 0.875
}
});
@@ -145,22 +157,16 @@ class CartPopover extends Component {
render() {
// When cartItem is available as a prop, we will pass it in. For now, we are using a static object.
// const { cartItem, classes: { addToCartButton, container, breadcrumbLink } } = this.props;
- const { classes: { addedToCartItemName, addedToCartItemQuantity, addedToCartText, container }, theme } = this.props;
+ const { classes: { addedToCartImg, addedToCartItemName, addedToCartText, container, containerItem }, theme } = this.props;
return (
<div className={container}>
<Grid container className={container} spacing={theme.spacing.unit * 3}>
- <Grid item xs={12}>
- <img src={cartItem.imageUrl} alt={cartItem.title} />
- <Typography className={addedToCartItemQuantity} component="span">
- {cartItem.quantity}
- </Typography>
- <Typography className={addedToCartItemName} component="span">
- "{cartItem.title}"
- </Typography>
+ <Grid className={containerItem} item xs={12}>
+ <img alt={cartItem.title} className={addedToCartImg} src={cartItem.imageUrl} />
<Typography className={addedToCartText} component="span">
- added to cart
+ {cartItem.quantity} "<span className={addedToCartItemName}>{cartItem.title}</span>" added to cart
</Typography>
</Grid>
<Grid item xs={12}>
| 3 |
diff --git a/src/kiri/init.js b/src/kiri/init.js dproc = current.devproc[devicename],
dev = current.device = CONF.device_from_code(code,mode),
proc = current.process,
- newdev = dproc === undefined;
+ newdev = dproc === undefined, // first time device is selected
+ predev = current.filter[mode], // previous device selection
+ chgdev = predev !== devicename; // device is changing
// first time device use, add any print profiles and set to default if present
- // if (newdev) {
- // console.log('new device', code);
if (code.profiles) {
for (let profile of code.profiles) {
let profname = profile.processName;
}
}
}
- // }
dev.new = false;
dev.deviceName = devicename;
UI.deviceRound.checked = dev.bedRound;
UI.deviceOrigin.checked = dev.outputOriginCenter || dev.originCenter;
- // change home default in belt mode
- API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0);
-
// add extruder selection buttons
if (dev.extruders) {
let ext = API.lists.extruders = [];
}
API.conf.save();
+
+ API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0);
+ // when changing devices, update focus on widgets
+ if (chgdev) {
+ setTimeout(API.space.set_focus, 0);
+ }
+
UC.refresh();
if (dev.imageURL) {
| 3 |
diff --git a/logs/events.go b/logs/events.go @@ -58,7 +58,7 @@ var cmds = []commandsystem.CommandHandler{
}
}
- l, err := CreateChannelLog(cmd.Channel.ID(), cmd.Message.Author.ID, cmd.Message.Author.Username, num)
+ l, err := CreateChannelLog(cmd.Channel.ID(), cmd.Message.Author.Username, cmd.Message.Author.ID, num)
if err != nil {
return "An error occured", err
}
| 1 |
diff --git a/api-spec.md b/api-spec.md @@ -85,7 +85,7 @@ The core OGC API - Features endpoints are shown below, with details provided in
| ----------------------------------------------- | -------------- | ----------- |
| `/` | JSON | Landing page, links to API capabilities |
| `/conformance` | JSON | Info about standards to which the API conforms |
-| `/collections` | \[Collection] | List of Collections contained in the catalog |
+| `/collections` | JSON | Object with a list of Collections contained in the catalog and links |
| `/collections/{collectionId}` | Collection | Returns single Collection JSON |
| `/collections/{collectionId}/items` | ItemCollection | GeoJSON FeatureCollection-conformant entity of Items in collection |
| `/collections/{collectionId}/items/{featureId}` | Item | Returns single Item (GeoJSON Feature) |
@@ -101,7 +101,7 @@ Note that a STAC API does not need to implement OAFeat, in which case it would o
See the [OpenAPI specification document](openapi/STAC.yaml).
| Endpoint | Returns | Description |
-| -------- | ------------------------------------------------- ------------ | ----------- |
+| -------- | -------------------------------------------------------------- | ----------- |
| `/` | [Catalog](./stac-spec/catalog-spec/catalog-spec.md) | Extends `/` from OAFeat to return a full STAC catalog. |
| `/search` | [ItemCollection](./stac-spec/item-spec/itemcollection-spec.md) | Retrieves a group of Items matching the provided search predicates, probably containing search metadata from the `search` extension |
| 1 |
diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js @@ -1280,21 +1280,6 @@ function roundDTick(roughDTick, base, roundingSet) {
// log showing powers plus some intermediates:
// D1 shows all digits, D2 shows 2 and 5
axes.autoTicks = function(ax, roughDTick, isMinor) {
- var majorDtick = ax._majorDtick;
- var hasMinorNtick = isMinor && ax.nticks;
-
- var mayRound = function(roughDTick, base, roundingSet) {
- return hasMinorNtick ?
- roughDTick :
- roundDTick(roughDTick, base, roundingSet);
- };
-
- var mayCeil = function(roughDTick) {
- return hasMinorNtick ?
- roughDTick :
- Math.ceil(roughDTick);
- };
-
var base;
function getBase(v) {
@@ -1304,27 +1289,19 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
if(ax.type === 'date') {
ax.tick0 = Lib.dateTick0(ax.calendar, 0);
- var _roundDays = ax._hasDayOfWeekBreaks ? [1, 2, 7, 14] : roundDays;
-
// the criteria below are all based on the rough spacing we calculate
// being > half of the final unit - so precalculate twice the rough val
var roughX2 = 2 * roughDTick;
- var months;
if(roughX2 > ONEAVGYEAR) {
roughDTick /= ONEAVGYEAR;
base = getBase(10);
- months = 12 * mayRound(roughDTick, base, roundBase10);
- months = Math.round(months);
- ax.dtick = 'M' + months;
+ ax.dtick = 'M' + (12 * roundDTick(roughDTick, base, roundBase10));
} else if(roughX2 > ONEAVGMONTH) {
roughDTick /= ONEAVGMONTH;
- months = mayRound(roughDTick, 1, roundBase24);
- months = Math.round(months);
- if(months < 1) months = 1;
- ax.dtick = 'M' + months;
+ ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
} else if(roughX2 > ONEDAY) {
- ax.dtick = mayRound(roughDTick, ONEDAY, _roundDays);
+ ax.dtick = roundDTick(roughDTick, ONEDAY, ax._hasDayOfWeekBreaks ? [1, 2, 7, 14] : roundDays);
if(!isMinor) {
// get week ticks on sunday
// this will also move the base tick off 2000-01-01 if dtick is
@@ -1342,49 +1319,15 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
if(isPeriod) ax._dowTick0 = ax.tick0;
}
} else if(roughX2 > ONEHOUR) {
- ax.dtick = mayRound(roughDTick, ONEHOUR, roundBase24);
+ ax.dtick = roundDTick(roughDTick, ONEHOUR, roundBase24);
} else if(roughX2 > ONEMIN) {
- ax.dtick = mayRound(roughDTick, ONEMIN, roundBase60);
+ ax.dtick = roundDTick(roughDTick, ONEMIN, roundBase60);
} else if(roughX2 > ONESEC) {
- ax.dtick = mayRound(roughDTick, ONESEC, roundBase60);
+ ax.dtick = roundDTick(roughDTick, ONESEC, roundBase60);
} else {
// milliseconds
base = getBase(10);
- ax.dtick = mayRound(roughDTick, base, roundBase10);
- }
-
- if(isMinor && !hasMinorNtick) {
- if(
- typeof majorDtick === 'string' &&
- majorDtick.charAt(0) === 'M'
- ) {
- if(majorDtick === 'M24') {
- ax.dtick = 'M12';
- }
-
- if(majorDtick === 'M12') {
- ax.dtick = 'M3';
- }
-
- if(typeof ax.dtick !== 'string') {
- ax.dtick = 'M1';
- }
- }
-
- if(majorDtick > ONEDAY) {
- if(majorDtick === 14 * ONEDAY) ax.dtick = 7 * ONEDAY;
- else {
- var v = mayRound(majorDtick, ONEDAY, _roundDays);
- if(v >= majorDtick) {
- v = mayRound(majorDtick / 7, ONEDAY, _roundDays);
- }
-
- if((majorDtick / ONEDAY) % (v / ONEDAY)) {
- v = ONEDAY;
- }
- ax.dtick = v;
- }
- }
+ ax.dtick = roundDTick(roughDTick, base, roundBase10);
}
} else if(ax.type === 'log') {
ax.tick0 = 0;
@@ -1397,7 +1340,7 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
}
if(roughDTick > 0.7) {
// only show powers of 10
- ax.dtick = mayCeil(roughDTick);
+ ax.dtick = Math.ceil(roughDTick);
} else if(Math.abs(rng[1] - rng[0]) < 1) {
// span is less than one power of 10
var nt = 1.5 * Math.abs((rng[1] - rng[0]) / roughDTick);
@@ -1406,7 +1349,7 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
roughDTick = Math.abs(Math.pow(10, rng[1]) -
Math.pow(10, rng[0])) / nt;
base = getBase(10);
- ax.dtick = 'L' + mayRound(roughDTick, base, roundBase10);
+ ax.dtick = 'L' + roundDTick(roughDTick, base, roundBase10);
} else {
// include intermediates between powers of 10,
// labeled with small digits
@@ -1415,16 +1358,16 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
}
} else if(ax.type === 'category' || ax.type === 'multicategory') {
ax.tick0 = 0;
- ax.dtick = mayCeil(Math.max(roughDTick, 1));
+ ax.dtick = Math.ceil(Math.max(roughDTick, 1));
} else if(isAngular(ax)) {
ax.tick0 = 0;
base = 1;
- ax.dtick = mayRound(roughDTick, base, roundAngles);
+ ax.dtick = roundDTick(roughDTick, base, roundAngles);
} else {
// auto ticks always start at 0
ax.tick0 = 0;
base = getBase(10);
- ax.dtick = mayRound(roughDTick, base, roundBase10);
+ ax.dtick = roundDTick(roughDTick, base, roundBase10);
}
// prevent infinite loops
| 13 |
diff --git a/server/game/costs.js b/server/game/costs.js @@ -545,13 +545,14 @@ const Costs = {
}
};
},
- breakProvince: function(card) {
+ breakProvince: function(province) {
return {
canPay: function() {
- return !card.isBroken;
+ return !province.isBroken;
},
- pay: function() {
- card.breakProvince();
+ pay: function(context) {
+ context.costs.breakProvince = province;
+ this.game.raiseEvent('onBreakProvince', { conflict: this.conflict, province: province }, province.breakProvince());
}
};
}
| 3 |
diff --git a/src/og/webgl/Handler.js b/src/og/webgl/Handler.js @@ -325,7 +325,11 @@ class Handler {
var texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
+ //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ gl.texStorage2D(gl.TEXTURE_2D, 2, gl.SRGB8_ALPHA8, image.width, image.height);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
@@ -344,7 +348,11 @@ class Handler {
let gl = handler.gl;
let texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
+ //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ gl.texStorage2D(gl.TEXTURE_2D, 2, gl.SRGB8_ALPHA8, image.width, image.height);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
@@ -364,7 +372,11 @@ class Handler {
let texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
+ //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ gl.texStorage2D(gl.TEXTURE_2D, 2, gl.SRGB8_ALPHA8, image.width, image.height);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, gl.RGBA, gl.UNSIGNED_BYTE, image);
+
gl.generateMipmap(gl.TEXTURE_2D);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
@@ -384,8 +396,8 @@ class Handler {
let texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
- //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA/*gl.SRGB8_ALPHA8*/, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA/*gl.SRGB8_ALPHA8*/, gl.RGBA, gl.UNSIGNED_BYTE, image);
gl.texStorage2D(gl.TEXTURE_2D, 2, gl.SRGB8_ALPHA8, image.width, image.height);
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, gl.RGBA, gl.UNSIGNED_BYTE, image);
| 0 |
diff --git a/src/components/graph/drawGraph.js b/src/components/graph/drawGraph.js @@ -6,12 +6,12 @@ const margin = {top: 20, right: 10, bottom: 30, left: 40},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
-const MAGIC_CONSTANT_UNTIL_WE_NORMALIZE = 3; /* should be zero to one but it's zero to four for now */
-
const x = d3.scaleLinear()
+ .domain([0, 1]) /* while this is the default for d3, our data is normalized so better to be explicit */
.range([0, width]);
const y = d3.scaleLinear()
+ .domain([0, 1]) /* while this is the default for d3, our data is normalized so better to be explicit */
.range([height, 0]);
/******************************************
@@ -65,15 +65,13 @@ export const drawGraph = (
/* clear canvas */
context.clearRect(0, 0, width, height);
- x.domain([0, MAGIC_CONSTANT_UNTIL_WE_NORMALIZE])
- y.domain([0, MAGIC_CONSTANT_UNTIL_WE_NORMALIZE])
-
let colorScale = null; /* it could be 'by expression' and that's a special case */
if (
color &&
ranges[color].range /* set up a continuous scale */
) {
+ /* this scale should live in redux since it will be consumed by cotinuous as well */
colorScale = d3.scaleLinear()
.domain([0, ranges[color].range.max])
.range([1,0])
| 12 |
diff --git a/articles/connections/apple-siwa/set-up-apple.md b/articles/connections/apple-siwa/set-up-apple.md @@ -65,54 +65,6 @@ A paid [Apple Developer](https://developer.apple.com/programs/) account.
4. Click **Save**, **Continue**, and then click **Register**.
-### Verify domain with Apple
-
-1. On the **Certificates, IDs, & Profiles** page, click your newly created Services ID.
-2. Click the **Configure** button next to the **Sign In with Apple** feature.
-
-3. On the **Redirect URI/Domain Validation** page click **Download**.
-4. Copy or move the `apple-developer-domain-association.txt` file to your application server and make it accessible at `https://customdomain.com/.well-known/apple-developer-domain-association.txt`.
-1. When this is ready, click **Verify** on your Services ID configuration page. If no error message is shown, your domain has been successfully verified.
-
-## Set up Signing Key
-
-1. Go to **Keys** under the **Certificates, Identifiers, & Profiles** section of your Apple developer dashboard.
-2. Click on the **blue plus icon** to add a new key.
-3. Enter a **Key Name** and check the **Sign In with Apple** option.
-4. Click **Configure** to make sure the **Choose a Primary App ID** field is filled with the correct App ID.
-5. Click **Save**, **Continue**, and then **Register**.
-6. On the page to which you're redirected after registering, make a note of the Key ID. Then, download the key, move it to its own directory, and rename the key file that you downloaded to `authkey.p8`.
-7. Use a JWT library with support for the ES256 algorithm to generate the client secret from the key. The example below uses `Node.js`, but libraries for other languages can be used in a similar fashion. To use this script, create a new file called `generate-secret.js` in the same directory as the downloaded key and add the following code:
-
- ```js
- const jwt = require("jsonwebtoken");
- const fs = require("fs");
-
- const privateKey = fs.readFileSync("./authkey.p8");
- const token = jwt.sign({}, privateKey, {
- algorithm: "ES256",
- expiresIn: "60 days",
- audience: "https://appleid.apple.com",
- issuer: "TEAM_ID",
- subject: "com.customdomain.webapp",
- keyid: "KEY_ID"
- });
-
- console.log("The token is:", token);
- ```
-
- Replace the following values:
-
- * `com.customdomain.webapp` with the identifier for your Services ID
- * `TEAM_ID` with your Team ID
- * `KEY_ID` with your Key ID
-
-8. Once your script is ready, run the following on the command line to generate your client secret:
-
- `node generate-secret.js`
-
- This gives you the last of the items you need to provide when setting up the connection in Auth0's dashboard.
-
Next, you will use these credentials on the [Auth0 Dashboard > Connections > Social](${manage_url}/#/connections/social) page in the dashboard to continue to configure your application. Depending on which type of application you want to configure, choose one of the following methods:
* [Add Sign In with Apple to Native iOS Apps](/connections/apple-siwa/add-siwa-to-native-app)
| 2 |
diff --git a/src/reducers/likelyTokens/index.js b/src/reducers/likelyTokens/index.js @@ -27,6 +27,19 @@ const tokensReducer = handleActions({
...payload
}
}),
+ [tokens.getMetadata]: (state, { ready, error, payload, meta }) =>
+ (!ready || error)
+ ? state
+ : ({
+ ...state,
+ tokens: {
+ ...state.tokens,
+ [payload.contract]: {
+ ...state.tokens[payload.contract],
+ ...payload.metadata
+ }
+ }
+ }),
}, initialState)
export default reduceReducers(
| 9 |
diff --git a/src/components/lights/SpotLight.js b/src/components/lights/SpotLight.js @@ -2,6 +2,19 @@ import {SpotLight as SpotLightNative, SpotLightHelper} from 'three';
import {LightComponent} from '../../core/LightComponent';
class SpotLight extends LightComponent {
+ static defaults = {
+ ...LightComponent.defaults,
+
+ light: {
+ color: 0xffffff,
+ intensity: 1,
+ distance: 100,
+ angle: Math.PI / 3,
+ exponent: 0,
+ decay: 1
+ }
+ };
+
static helpers = {
default: [SpotLightHelper]
};
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,18 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.44.3] -- 2019-02-06
+
+### Fixed
+- Fix axis `automargin` push offset which resulted in clipped
+ tick labels in some scenarios [#3510]
+- Fix handling of alpha channel in marker, line and error bar `rgba`
+ coloring in `scatter3d` traces [#3496]
+- Fix subplots with multiple `carpet` traces each with a `scattercarpet`
+ trace on top of them [#3512]
+- Fix MathJax placement in ternary `aaxis` titles [#3513]
+
+
## [1.44.2] -- 2019-02-04
### Fixed
| 3 |
diff --git a/test/unit/specs/components/Personalization/helper/dom/createFragment.spec.js b/test/unit/specs/components/Personalization/helper/dom/createFragment.spec.js @@ -10,7 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/
-// eslint-disable-next-line no-unused-vars
import createFragment from "../../../../../../../src/components/Personalization/helper/dom/createFragment";
describe("Personalization::helper", () => {
| 2 |
diff --git a/test/unit/registration.test.js b/test/unit/registration.test.js @@ -84,8 +84,7 @@ describe('getRegistration', function() {
}
})
- describe('Errors', function() {
- it('uses the command name when it can', function() {
+ it('includes the command name in the error message when a handler is undefined', function() {
let getUser = n => n
class Repo extends Microcosm {
@@ -103,21 +102,3 @@ describe('getRegistration', function() {
)
})
})
-
- describe('lifecycle hooks', function() {
- it('does not call deserialize infinitely', function() {
- class Repo extends Microcosm {
- register() {
- return {}
- }
- }
-
- let repo = new Repo()
- let spy = jest.spyOn(repo, 'deserialize')
-
- repo.deserialize()
-
- expect(spy).toHaveBeenCalledTimes(1)
- })
- })
-})
| 1 |
diff --git a/apps.json b/apps.json },
{
"id": "launch",
- "name": "Launcher (Default)",
+ "name": "Launcher (Bangle.js 1 default)",
"shortName": "Launcher",
"version": "0.07",
- "description": "This is needed by Bangle.js to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
+ "description": "This is needed by Bangle.js 1.0 to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
"icon": "app.png",
"type": "launch",
"tags": "tool,system,launcher",
},
{
"id": "launchb2",
- "name": "Launcher (Bangle.js 2)",
+ "name": "Launcher (Bangle.js 2 default)",
"shortName": "Launcher",
"version": "0.03",
- "description": "This is needed by Bangle.js 2.0 to display a menu allowing you to choose your own applications. It will not work on Bangle.js 1.0.",
+ "description": "This is needed by Bangle.js 2.0 to display a menu allowing you to choose your own applications.",
"icon": "app.png",
"type": "launch",
"tags": "tool,system,launcher",
| 10 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -36,9 +36,9 @@ jobs:
services/communication-router:
<<: *common_environment
working_directory: ~/oih/services/communication-router
- services/flows-operator:
+ services/resource-coordinator:
<<: *common_environment
- working_directory: ~/oih/services/flows-operator
+ working_directory: ~/oih/services/resource-coordinator
services/iam:
<<: *common_environment
working_directory: ~/oih/services/iam
@@ -66,7 +66,7 @@ workflows:
build_development:
jobs:
- services/communication-router
- - services/flows-operator
+ - services/resource-coordinator
#- services/iam
#- services/integration-content-repository
- services/scheduler
| 10 |
diff --git a/lib/assets/javascripts/cartodb/common/public_footer_view.js b/lib/assets/javascripts/cartodb/common/public_footer_view.js @@ -7,8 +7,8 @@ module.exports = cdb.core.View.extend({
this._initModels();
this.template = this.isHosted
- ? cdb.templates.getTemplate('public/views/public_footer')
- : cdb.templates.getTemplate('common/views/footer_static');
+ ? cdb.templates.getTemplate('common/views/footer_static')
+ : cdb.templates.getTemplate('public/views/public_footer');
},
render: function () {
| 1 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -323,6 +323,12 @@ metaversefile.setApi({
},
};
},
+ createAvatar(o, options) {
+ return new Avatar(o, options);
+ },
+ useAvatarAnimations() {
+ return Avatar.getAnimations();
+ },
useFrame(fn) {
const app = currentAppRender;
if (app) {
| 0 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1674,6 +1674,13 @@ const weaponsManager = {
(async () => {
if (selectedLoadoutObject) {
+ for (let i = 0; i < appManager.grabbedObjects.length; i++) {
+ if (appManager.grabbedObjects[i] === selectedLoadoutObject) {
+ appManager.grabbedObjects[i] = null;
+ appManager.grabbedObjectOffsets[0] = 0;
+ }
+ }
+
world.removeObject(selectedLoadoutObject.instanceId);
selectedLoadoutObject = null;
}
@@ -1686,7 +1693,10 @@ const weaponsManager = {
if (isNaN(id)) {
id = contentId;
}
- selectedLoadoutObject = await world.addObject(id, null, new THREE.Vector3(), new THREE.Quaternion());
+ const transforms = rigManager.getRigTransforms();
+ const {position, quaternion} = transforms[0];
+ selectedLoadoutObject = await world.addObject(id, null, position, quaternion);
+ _grab(selectedLoadoutObject);
}
})().catch(console.warn);
},
| 0 |
diff --git a/javascript/lifecycle.js b/javascript/lifecycle.js @@ -127,6 +127,7 @@ document.addEventListener(
export const dispatchLifecycleEvent = (stage, element, reflexId) => {
if (!element) return
if (!element.reflexData) element.reflexData = {}
+ if (!element.reflexController) element.reflexController = {}
const { target } = element.reflexData[reflexId] || {}
element.dispatchEvent(
new CustomEvent(`stimulus-reflex:${stage}`, {
| 12 |
diff --git a/sparta_constants.go b/sparta_constants.go @@ -86,6 +86,8 @@ const (
KinesisFirehosePrincipal = "firehose.amazonaws.com"
// @enum EventBridgePrincipal
EventBridgePrincipal = "events.amazonaws.com"
+ // @enum StepMachinePrincipal
+ StepMachinePrincipal = "states.amazonaws.com"
)
type contextKey int
| 0 |
diff --git a/engine/modules/entities/src/main/resources/view/entity-module/BitmapText.js b/engine/modules/entities/src/main/resources/view/entity-module/BitmapText.js @@ -17,20 +17,20 @@ export class BitmapText extends Entity {
blendMode: PIXI.BLEND_MODES.NORMAL,
tint: 0xFFFFFF
})
+ this.missingFonts = {}
}
initDisplay () {
super.initDisplay()
this.graphics = new PIXI.Container()
- this.missingFonts = {}
}
updateDisplay (state, changed, globalData) {
super.updateDisplay(state, changed, globalData)
if (state.fontFamily !== null) {
- try {
+ if (PIXI.extras.BitmapText.fonts[state.fontFamily]) {
if (this.graphics.children.length === 0) {
- this.displayed = new PIXI.BitmapText(state.text || this.defaultState.text, {
+ this.displayed = new PIXI.BitmapText(state.text, {
font: {size: state.fontSize || 1, name: state.fontFamily}
})
this.graphics.addChild(this.displayed)
@@ -40,12 +40,15 @@ export class BitmapText extends Entity {
this.displayed.anchor.set(state.anchorX, state.anchorY)
this.displayed.blendMode = state.blendMode
this.displayed.tint = state.tint
- } catch (error) {
+ } else {
if (!this.missingFonts[state.fontFamily]) {
this.missingFonts[state.fontFamily] = true
- ErrorLog.push(new MissingBitmapFontError(state.fontFamily, error))
+ ErrorLog.push(new MissingBitmapFontError(state.fontFamily))
}
+ this.graphics.removeChildren()
}
+ } else {
+ this.graphics.removeChildren()
}
}
}
| 1 |
diff --git a/package.json b/package.json "sass": "cpx \"./source/themes/**/*\" ./lib/themes",
"storybook": "start-storybook -p 6543 -c storybook",
"watch": "nodemon npm run js && npm run sass",
- "test": "jest --no-cache",
+ "test": "jest",
"test:clean": "jest --no-cache -u",
"test:watch": "jest --no-cache --watchAll",
"flow-test": "flow; test $? -eq 0 -o $? -eq 2",
"lint": "eslint --format=node_modules/eslint-formatter-pretty source stories *.js"
},
"jest": {
- "verbose": true,
+ "verbose": false,
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
| 12 |
diff --git a/core/api-server/lib/examples/algorithms.json b/core/api-server/lib/examples/algorithms.json {
"name": "green-alg",
"algorithmImage": "hkube/algorithm-example",
- "cpu": 7,
- "mem": 2048
+ "cpu": 2,
+ "mem": 1024
},
{
"name": "yellow-alg",
| 3 |
diff --git a/assets/js/modules/analytics/datastore/settings.js b/assets/js/modules/analytics/datastore/settings.js @@ -98,9 +98,6 @@ export async function submitChanges( { select, dispatch } ) {
// TODO: Remove once legacy dataAPI is no longer used.
invalidateCacheGroup( TYPE_MODULES, 'analytics' );
- // Try to save GA4 settings only if the Analytics-4 module has the same connection status as the Analytics module has.
- // This check is needed to prevent saving GA4 settings unintentionally for cases when the Analytics module has been
- // already connected by the time the GA4 functionality is revealed.
if ( select( STORE_NAME ).canUseGA4Controls() && select( MODULES_ANALYTICS_4 ).haveSettingsChanged() ) {
const { error } = await dispatch( MODULES_ANALYTICS_4 ).submitChanges();
if ( isPermissionScopeError( error ) ) {
@@ -166,9 +163,6 @@ export function validateCanSubmitChanges( select ) {
// Do existing tag check last.
invariant( hasExistingTagPermission() !== false, INVARIANT_INSUFFICIENT_TAG_PERMISSIONS );
- // Validate GA4 settings only if the Analytics-4 module has the same connection status as the Analytics module has.
- // This check is needed to prevent saving GA4 settings unintentionally for cases when the Analytics module has been
- // already connected by the time the GA4 functionality is revealed.
if ( select( STORE_NAME ).canUseGA4Controls() ) {
select( MODULES_ANALYTICS_4 ).__dangerousCanSubmitChanges();
}
| 2 |
diff --git a/includes/Core/Util/Tracking.php b/includes/Core/Util/Tracking.php @@ -85,7 +85,7 @@ final class Tracking {
add_filter(
'googlesitekit_inline_base_data',
function ( $data ) {
- return $this->inline_js_admin_data( $data );
+ return $this->inline_js_base_data( $data );
}
);
@@ -110,14 +110,14 @@ final class Tracking {
}
/**
- * Modifies the admin data to pass to JS.
+ * Modifies the base data to pass to JS.
*
- * @since 1.0.0
+ * @since n.e.x.t
*
* @param array $data Inline JS data.
* @return array Filtered $data.
*/
- private function inline_js_admin_data( $data ) {
+ private function inline_js_base_data( $data ) {
$data['trackingEnabled'] = $this->is_active();
$data['trackingID'] = self::TRACKING_ID;
| 10 |
diff --git a/README.md b/README.md @@ -17,6 +17,14 @@ npm install
npm run build
```
+If you are looking for a .zip version of the plugin to install on your site use this link:
+
+https://sitekit.withgoogle.com/service/download/google-site-kit.zip
+
+The .zip link was obtained from this blog post:
+
+https://sitekit.withgoogle.com/news/site-kit-developer-preview/
+
## Requirements
* WordPress >= 4.7
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.