code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/client/components/composer/NewRequest/GRPCAutoInputForm.jsx b/src/client/components/composer/NewRequest/GRPCAutoInputForm.jsx @@ -22,12 +22,6 @@ const GRPCAutoInputForm = (props) => {
initialQuery
} = props.newRequestStreams;
- //component state for toggling show/hide
- const [show, toggleShow] = useState(true);
- //component state for service and request dropdown
- const [serviceOption, setServiceOption] = useState("Select Service");
- const [requestOption, setRequestOption] = useState("Select Request");
-
// event handler for changes made to the Select Services dropdown list
const setService = (e) => {
| 1 |
diff --git a/src/plots/plots.js b/src/plots/plots.js @@ -2202,7 +2202,7 @@ plots.transition = function(gd, data, layout, traces, frameOpts, transitionOpts)
// There's nothing to do if this module is not defined:
if(!module) continue;
- // Don't register the trace as transitioned if it doens't know what to do.
+ // Don't register the trace as transitioned if it doesn't know what to do.
// If it *is* registered, it will receive a callback that it's responsible
// for calling in order to register the transition as having completed.
if(module.animatable) {
| 1 |
diff --git a/assets/js/components/adminbar/AdminBarWidgets.stories.js b/assets/js/components/adminbar/AdminBarWidgets.stories.js @@ -47,7 +47,7 @@ Ready.args = {
};
export const AnalyticsInactive = Template.bind( {} );
-AnalyticsInactive.storyName = 'Inactive: Analytics';
+AnalyticsInactive.storyName = 'Inactive: Analytics Setup CTA';
AnalyticsInactive.args = {
setupRegistry: ( registry ) => {
// Set up the search console module store but provide no data.
@@ -62,18 +62,9 @@ AnalyticsInactive.args = {
},
};
-export const AnalyticsInactiveNew = Template.bind( {} );
-AnalyticsInactiveNew.storyName = 'Inactive: Analytics New CTA';
-AnalyticsInactiveNew.args = {
- setupRegistry: ( registry ) => {
- provideModules( registry );
- setupSearchConsoleMockReports( registry );
- },
-};
-
export const AnalyticsInactiveNewCompleteActivation = Template.bind( {} );
AnalyticsInactiveNewCompleteActivation.storyName =
- 'Inactive: Analytics New Complete Activation CTA';
+ 'Inactive: Analytics Complete Activation CTA';
AnalyticsInactiveNewCompleteActivation.args = {
setupRegistry: ( registry ) => {
// Set up the analytics module store but provide no data.
| 2 |
diff --git a/src/pages/strategy/tabs/akashi/akashi.js b/src/pages/strategy/tabs/akashi/akashi.js if(e.altKey) {
KC3StrategyTabs.gotoTab(null, $(this).data("value"));
} else {
- KC3StrategyTabs.gotoTab(null,
- [$(this).data("value"), KC3StrategyTabs.pageParams[2]].filter(v => !!v));
+ const extraParams = KC3StrategyTabs.pageParams.slice(2);
+ KC3StrategyTabs.gotoTab(null, extraParams.every(v => !v) ? $(this).data("value") :
+ [$(this).data("value"), ...extraParams]);
}
});
$(toggleClasses, equipList).toggle(!self.hideNotImprovable);
});
- $("#equipped_checkbox").on("change", function(){
- self.showEquippedLocked = this.checked;
+ if(KC3StrategyTabs.pageParams[3] !== undefined){
+ this.showEquippedLocked = !!parseInt(KC3StrategyTabs.pageParams[3]);
+ }
+ const refreshOnToggleEquippedLocked = () => {
$(".loading").show();
- $(this).prop("disabled", true);
+ $("#equipped_checkbox").prop("disabled", true);
$(".equipment.disabled,.equipment.equipped,.equipment.insufficient",
$(".equipment_list")).show();
// To recheck consumable items if locked
setTimeout(function(){
- KC3StrategyTabs.reloadTab(undefined, false);
+ KC3StrategyTabs.gotoTab(null, [KC3StrategyTabs.pageParams[1], KC3StrategyTabs.pageParams[2],
+ self.showEquippedLocked & 1]);
}, 0);
+ };
+ $("#equipped_checkbox").on("change", function(){
+ self.showEquippedLocked = this.checked;
+ refreshOnToggleEquippedLocked();
}).prop("checked", this.showEquippedLocked);
// Link to weekday specified by hash parameter
| 11 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,70 @@ 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.49.0] -- 2019-07-24
+
+### Added
+- Add `indicator` traces [#3978, #4007, #4014, #4037, #4029]
+- Add `choroplethmapbox` traces [#3988]
+- Add `densitymapbox` traces [#3993]
+- Add new mapbox `style` values: `open-street-map`, `carto-positron`, `carto-darkmatter`,
+ `stamen-terrain`, `stamen-toner`, `stamen-watercolor` and `white-bg`
+ that do not require a Mapbox access token [#3987, #4068]
+- Add support for `sourcetype` value `raster` and `image` and `type` `raster`
+ for mapbox layout layers [#4006]
+- Add `below` attribute to `scattermapbox` traces [#4058]
+- Add support for `below: 'traces'` in mapbox layout layers [#4058]
+- Add `sourceattribution` attribute to mapbox layout layers [#4069]
+- Add `labelangle` and `labelside` attributes to `parcoords` traces [#3966]
+- Add `doubleClickDelay` config option [#3991]
+- Add `showEditInChartStudio` config option [#4061]
+
+### Changed
+- Bump `mapbox-gl` to `v1.1.1` [#3987, #4035]
+- Include source attribution on mapbox subplots and image exports [#4069]
+- Improve mapbox error messages and attribute descriptions [#4035]
+- Do not try to resize hidden graph divs under `responsive:true` [#3972]
+- Improve robustness of `sankey` traces with circular links [#3932]
+- Use `URL.createObjectURL` during `Plotly.toImage` and
+ `Plotly.downloadImage` improving performance [#4008]
+- Make `parcoords` pick layer 100% invisible [#3946]
+- (dev-only) drop "pull-font-svg" pre-process step [#4062]
+
+### Fixed
+- Fix rendering of geo traces with `locationmode` and no base layers
+ (bug introduced in 1.48.0) [#3994]
+- Fix lakes and rivers geometry on scoped geo subplots
+ (bug introduced in 1.48.0) [#4048]
+- Fix `heatmap` rendering for traces with extra categorical coordinates
+ (bug introduced in 1.48.0) [#4038]
+- Do not show zero-height bar rendering when their `marker.line.width` is zero
+ (bug introduced in 1.48.3) [#4056]
+- Do not show prefix and suffix on log axis minor ticks showing digits [#4064]
+- Fix inconsistent `parcoords` behavior when data is outside range [#3794]
+- Fix `parcoods` default tick formatting [#3966, #4011, #4013]
+- Fix pseudo-html and MathJax rendering for `parcoords` traces [#3966]
+- Fix `marker.line.color` default for `choropleth` traces [#3988]
+- Fix `scatter3d` and `scattergl` handling of `rgb` colors
+ with extra alpha values [#3904, #4009]
+- Fix zoomed-in box/violin hover labels edge cases [#3965]
+- Fix `hoverinfo` & `hovertemplate` initial, delta and final flags
+ for `waterfall` traces [#3963]
+- Fix `hovertemplate` default number formatting for
+ `choropleth`, `scattergeo`, `scatterpolar(gl)`, `barpolar`
+ and `scatterternary` traces [#3968]
+- Remove `sliders` / `updatemenus` command observer mutation [#4023]
+- Fix plot-schema `anim` listing for traces that do not (yet) animate [#4024]
+- Fix `rangeslider` style during selections [#4022]
+- Fix per-value `categoryorder` for `box` and `violin` traces [#3983]
+- Fix handling of non-numeric `marker.line.width` array items [#4056, #4063]
+- Fix `downloadImage` for images of more than 2MB in size in Chrome [#4008]
+- Fix `plotly_clickannotation` triggering when `editable:true` [#3979]
+- Remove unused `font-atlas-sdf` dependency [#3952]
+- Fix `tickformat` attribute description links to d3 formatting language [#4044]
+- Fix typo in `error_(x|y).type` description [#4030]
+- Fix typo in `colorscale` description [#4060]
+
+
## [1.48.3] -- 2019-06-13
### Fixed
| 3 |
diff --git a/packages/gpt/ad.native.js b/packages/gpt/ad.native.js @@ -12,11 +12,11 @@ class Ad extends Component {
Linking.canOpenURL(url)
.then(supported => {
if (!supported) {
- return console.error("Cant open url", url);
+ return console.error("Cant open url", url); // eslint-disable-line no-console
}
return Linking.openURL(url);
})
- .catch(err => console.error("An error occurred", err));
+ .catch(err => console.error("An error occurred", err)); // eslint-disable-line no-console
}
constructor(props) {
| 8 |
diff --git a/src/scripting/logichook/LogicHookUtils.js b/src/scripting/logichook/LogicHookUtils.js const util = require('util')
const vm = require('vm')
const path = require('path')
+const fs = require('fs')
const isClass = require('is-class')
const debug = require('debug')('botium-core-asserterUtils')
@@ -140,6 +141,20 @@ module.exports = class LogicHookUtils {
}
}
+ const _checkUnsafe = () => {
+ if (!this.caps[Capabilities.SECURITY_ALLOW_UNSAFE]) {
+ throw new BotiumError(
+ 'Security Error. Using unsafe component is not allowed',
+ {
+ type: 'security',
+ subtype: 'allow unsafe',
+ source: path.basename(__filename),
+ cause: { src: !!src, ref, args, hookType }
+ }
+ )
+ }
+ }
+
if (!src) {
const packageName = `botium-${hookType}-${ref}`
try {
@@ -161,19 +176,8 @@ module.exports = class LogicHookUtils {
}
}
- if (!this.caps[Capabilities.SECURITY_ALLOW_UNSAFE]) {
- throw new BotiumError(
- 'Security Error. Using unsafe component is not allowed',
- {
- type: 'security',
- subtype: 'allow unsafe',
- source: path.basename(__filename),
- cause: { src: !!src, ref, args, hookType }
- }
- )
- }
-
if (isClass(src)) {
+ _checkUnsafe()
try {
const CheckClass = src
debug(`Loading ${ref} ${hookType}. Using src as class.`)
@@ -183,6 +187,7 @@ module.exports = class LogicHookUtils {
}
}
if (_.isFunction(src)) {
+ _checkUnsafe()
try {
debug(`Loading ${ref} ${hookType}. Using src as function.`)
return src(this.buildScriptContext, this.caps, args)
@@ -191,6 +196,7 @@ module.exports = class LogicHookUtils {
}
}
if (_.isObject(src) && !_.isString(src)) {
+ _checkUnsafe()
try {
const hookObject = Object.keys(src).reduce((result, key) => {
result[key] = (args) => {
@@ -243,6 +249,8 @@ module.exports = class LogicHookUtils {
}
const tryLoadFile = path.resolve(process.cwd(), src)
+ if (fs.existsSync(tryLoadFile)) {
+ _checkUnsafe()
try {
let CheckClass = require(tryLoadFile)
if (CheckClass.default) {
@@ -263,6 +271,7 @@ module.exports = class LogicHookUtils {
} catch (err) {
loadErr.push(`Failed to fetch ${ref} ${hookType} from ${tryLoadFile} - ${util.inspect(err)} `)
}
+ }
loadErr.forEach(debug)
throw new Error(`Failed to fetch ${ref} ${hookType}, no idea how to load ...`)
}
| 11 |
diff --git a/src/server/routes/page.js b/src/server/routes/page.js @@ -446,8 +446,8 @@ module.exports = function(crowi, app) {
const layoutName = configManager.getConfig('crowi', 'customize:layout');
let view = `layout-${layoutName}/page`;
- // TODO find page by link
- const page = await ShareLink.find({ _id: link }).populate('Page');
+ const shareLink = await ShareLink.find({ _id: link }).populate('Page');
+ const page = shareLink.relatedPage;
if (page == null) {
// page is not found
| 10 |
diff --git a/src/client/js/components/RevisionComparer/RevisionComparer.jsx b/src/client/js/components/RevisionComparer/RevisionComparer.jsx @@ -45,8 +45,10 @@ const RevisionComparer = (props) => {
const { path } = revisionComparerContainer.pageContainer.state;
const { sourceRevision, targetRevision } = revisionComparerContainer.state;
- const urlParams = (sourceRevision && targetRevision ? `?compare=${sourceRevision._id}...${targetRevision._id}` : '');
- return encodeSpaces(decodeURI(`${origin}${path}${urlParams}`));
+ const urlParams = (sourceRevision && targetRevision ? `${path}?compare=${sourceRevision._id}...${targetRevision._id}` : '');
+ const url = new URL(urlParams, origin);
+
+ return encodeSpaces(decodeURI(url));
};
const { sourceRevision, targetRevision } = revisionComparerContainer.state;
| 4 |
diff --git a/shared/js/background.js b/shared/js/background.js @@ -45,8 +45,6 @@ chrome.runtime.onMessage.addListener((req, sender, res) => {
});
function Background() {
- $this = this;
-
// clearing last search on browser startup
settings.updateSetting('last_search', '')
| 2 |
diff --git a/storybook-utilities/components/AdditionalInputInfo.js b/storybook-utilities/components/AdditionalInputInfo.js @@ -122,7 +122,7 @@ AdditionalInputInfo.defaultProps = {
listElement: 'ul',
};
-AdditionalInputInfo.PropTypes = {
+AdditionalInputInfo.propTypes = {
/**
* A space-separated string of classes to
* add to the header.
| 3 |
diff --git a/src/client/js/components/CustomNavigation.jsx b/src/client/js/components/CustomNavigation.jsx @@ -9,7 +9,7 @@ const CustomNavigation = (props) => {
const [activeTab, setActiveTab] = useState(Object.keys(props.navTabMapping)[0]);
const [sliderWidth, setSliderWidth] = useState(0);
const [sliderMarginLeft, setSliderMarginLeft] = useState(0);
- const navContainer = useRef();
+ const navBar = useRef();
const navTabs = {};
Object.keys(props.navTabMapping).forEach((key) => {
@@ -34,8 +34,6 @@ const CustomNavigation = (props) => {
useEffect(() => {
- const navBar = navContainer;
-
if (activeTab === '') {
return;
}
@@ -61,7 +59,7 @@ const CustomNavigation = (props) => {
return (
<React.Fragment>
- <div ref={navContainer}>
+ <div ref={navBar}>
<Nav className="nav-title grw-custom-navbar" id="grw-custom-navbar">
{Object.entries(props.navTabMapping).map(([key, value]) => {
return (
@@ -79,6 +77,7 @@ const CustomNavigation = (props) => {
);
})}
</Nav>
+ </div>
<hr className="my-0 grw-nav-slide-hr border-none" style={{ width: `${sliderWidth}%`, marginLeft: `${sliderMarginLeft}%` }} />
<TabContent activeTab={activeTab} className="p-4">
{Object.entries(props.navTabMapping).map(([key, value]) => {
@@ -89,7 +88,6 @@ const CustomNavigation = (props) => {
);
})}
</TabContent>
- </div>
</React.Fragment>
);
};
| 10 |
diff --git a/app.server.js b/app.server.js @@ -13,7 +13,7 @@ const HOST = "0.0.0.0";
const GOOGLE_CREDENTIAL =
process.env.GOOGLE_CREDENTIAL ||
"990846956506-bfhbjsu4nl5mvlkngr3tsmfcek24e8t8.apps.googleusercontent.com";
-const ENFORCE_SSL = process.env.ENFORCE_SSL || 'true';
+const ENFORCE_SSL = process.env.ENFORCE_SSL || 'false';
const app = express();
| 1 |
diff --git a/packages/core/parcel-bundler/src/cli.js b/packages/core/parcel-bundler/src/cli.js @@ -224,7 +224,7 @@ async function bundle(main, command) {
const server = await bundler.serve(port, command.https, command.host);
if (server && command.open) {
await require('./utils/openInBrowser')(
- `${command.https ? 'https' : 'http'}://localhost:${
+ `${command.https ? 'https' : 'http'}://${command.host || 'localhost'}:${
server.address().port
}`,
command.open
| 4 |
diff --git a/spec/models/carto/user_migration_spec.rb b/spec/models/carto/user_migration_spec.rb @@ -364,7 +364,7 @@ describe 'UserMigration' do
@map, @table, @table_visualization, @visualization = create_full_visualization(carto_user)
carto_user.tables.exists?(name: @table.name).should be
- debugger
+
user.in_database.execute("DROP TABLE #{@table.name}")
# The table is still registered after the deletion
carto_user.reload
| 2 |
diff --git a/translations/en-us.yaml b/translations/en-us.yaml @@ -2681,9 +2681,8 @@ dangerZone:
'db-cattle-maxtotal': 'Database pool: maximum total connections (change requires restart)'
'db-prep-stmt-cache-size': 'Database pool: Prepared statement cache size (per connection; change requires restart)'
'default-cluster-template': 'Template to use when creating a new cluster. This includes the default catalog items which are deployed to the System environment and the configurations of each item.'
- 'engine-install-url': 'Docker engine URL'
- 'engine-newest-version': 'The newest supported version of Docker at the time of this release. A Docker version that does not satisfy supported docker range but is newer than this will be marked as untested'
'engine-install-url': 'Default Docker engine installation URL (for most node drivers)'
+ 'engine-newest-version': 'The newest supported version of Docker at the time of this release. A Docker version that does not satisfy supported docker range but is newer than this will be marked as untested'
'engine-supported-range': 'Semver range for suported Docker engine versions. Versions which do not satisfy this range will be marked unsupported in the UI'
'events-purge-after-seconds': 'Auto-purge Event entries after this long (seconds)'
'graphite-host': 'Graphite: Server hostname or IP (change requires restart)'
| 2 |
diff --git a/cli/bin/quasar b/cli/bin/quasar @@ -54,7 +54,6 @@ else {
else {
const commands = [
'info',
- 'serve',
'help'
]
@@ -62,7 +61,6 @@ else {
if (cmd.length === 1) {
const mapToCmd = {
i: 'info',
- s: 'serve',
h: 'help'
}
cmd = mapToCmd[cmd]
| 1 |
diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js @@ -255,6 +255,15 @@ module.exports = {
],
include: paths.appSrc
},
+ {
+ test: /postMock.html$/,
+ use: {
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]',
+ },
+ },
+ },
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
| 0 |
diff --git a/articles/client-auth/index.yml b/articles/client-auth/index.yml versioning:
baseUrl: client-auth
- current: OIDC
+ current: oidc
versions:
- - non-OIDC
- - OIDC
+ - non-oidc
+ - oidc
defaultArticles:
- OIDC: index
+ oidc: index
| 2 |
diff --git a/definitions/npm/moment_v2.x.x/flow_v0.63.x-/moment_v2.x.x.js b/definitions/npm/moment_v2.x.x/flow_v0.63.x-/moment_v2.x.x.js @@ -144,9 +144,9 @@ declare class moment$Moment {
days(day: number|string): this;
day(): number;
days(): number;
- weekday(number: number): this;
+ weekday(day: number|string): this;
weekday(): number;
- isoWeekday(number: number): this;
+ isoWeekday(day: number|string): this;
isoWeekday(): number;
dayOfYear(number: number): this;
dayOfYear(): number;
| 11 |
diff --git a/src/components/TableToolbar.js b/src/components/TableToolbar.js @@ -188,7 +188,6 @@ class TableToolbar extends React.Component {
{options.viewColumns && (
<Popover
refExit={this.setActiveIcon.bind(null)}
- container={tableRef}
trigger={
<IconButton
aria-label={viewColumns}
@@ -207,7 +206,6 @@ class TableToolbar extends React.Component {
{options.filter && (
<Popover
refExit={this.setActiveIcon.bind(null)}
- container={tableRef}
trigger={
<IconButton
aria-label={filterTable}
| 2 |
diff --git a/src/app/Http/Controllers/Operations/FetchOperation.php b/src/app/Http/Controllers/Operations/FetchOperation.php @@ -100,8 +100,11 @@ trait FetchOperation
$tempQuery = $query->{$operation}($searchColumn, $search_string);
}
}
-
- return $tempQuery;
+ // If developer provide an empty searchable_attributes array it means he don't want us to search
+ // in any specific column, or try to guess the column from model identifiableAttribute.
+ // In that scenario we will not have any $tempQuery here, so we just return the query, is up to the developer
+ // to do his own search.
+ return $tempQuery ?? $query;
});
} else {
foreach ((array) $config['searchable_attributes'] as $k => $searchColumn) {
| 11 |
diff --git a/index.html b/index.html }
function initializePublicBrowser() {
-
setUILanguage();
var edition = QueryString.edition;
var isLatestRedirect = true;
// set language one more time after finishing components initialization
setUILanguage();
+
// RELEASES DROPDOWN HANDLER for daily build/community content
if (options.dailyBuildBrowser || options.communityBrowser) {
if ((options.dailyBuildBrowser && options.dailyBuildReleases) ||
}
function switchLanguage(language, flagPng, fade) {
- if (selectedLanguage !== language) {
selectedLanguage = language;
if (typeof(Storage) !== "undefined") {
localStorage.setItem("ui_language", language);
delay: 1000
});
}
- }
</script>
<script>
function openEclBuilder() {
| 1 |
diff --git a/src/pages/_document.js b/src/pages/_document.js @@ -67,7 +67,7 @@ class HTMLDocument extends Document {
<Head>
<Helmet
htmlAttributes={{ lang: "en", dir: "ltr" }}
- title="My page"
+ title="My Store"
meta={[
{ charSet: "utf-8" },
// Use minimum-scale=1 to enable GPU rasterization
| 1 |
diff --git a/sox.features.js b/sox.features.js function addCSS() {
$('.js-vote-up-btn, .js-vote-down-btn, .js-favorite-btn').addClass('sox-better-css');
- $('head').append('<link rel="stylesheet" href="https://rawgit.com/shu8/SE-Answers_scripts/master/coolMaterialDesignCss.css" type="text/css" />');
+ $('head').append('<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/shu8/SE-Answers_scripts@master/coolMaterialDesignCss.css" type="text/css" />');
$('#hmenus').css('-webkit-transform', 'translateZ(0)');
}
addCSS();
| 14 |
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb @@ -169,6 +169,10 @@ module ApplicationHelper
end
end
+ def image_tag(source, options={})
+ super "/#{frontend_version}/images/#{source}", options
+ end
+
def editor_image_path(source)
image_path(source, true)
end
| 1 |
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md # Code of Conduct
-One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](http://contributor-covenant.org/version/1/4/code-of-conduct.md) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at [email protected].
+One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](https://www.contributor-covenant.org/)'s [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at [email protected].
This applies to the main Cesium repo, forum, twitter, and all channels, including all repos in the [CesiumGS](https://github.com/CesiumGS) GitHub organization.
| 1 |
diff --git a/lib/assets/test/spec/cartodb/dashboard/dialogs/create/listing/navigation_view.spec.js b/lib/assets/test/spec/cartodb/dashboard/dialogs/create/listing/navigation_view.spec.js @@ -143,12 +143,14 @@ describe('common/dialogs/create/listing/navigation_view', function() {
expect(stateChanged).toBeTruthy();
});
- describe('when createMode datasetTabDisabled is true', function () {
+ describe('when createMode _onDatasetsClick is true', function () {
describe('.render', function () {
it('should render properly', function () {
expect(_.size(this.view._subviews)).toBe(0);
- this.createModel.set('datasetsTabDisabled', true);
+ spyOn(this.view, '_datasetsTabDisabled').and.returnValue(true);
+
this.view.render();
+
expect(_.size(this.view._subviews)).toBe(1);
});
});
@@ -157,6 +159,10 @@ describe('common/dialogs/create/listing/navigation_view', function() {
it('should return immediatly', function () {
spyOn(this.createModel, 'set')
spyOn(this.visFetchModel, 'set')
+ spyOn(this.view, '_datasetsTabDisabled').and.returnValue(true);
+
+ this.view.render();
+ this.view._onDatasetsClick();
expect(this.createModel.set).not.toHaveBeenCalled();
expect(this.visFetchModel.set).not.toHaveBeenCalled();
@@ -168,6 +174,10 @@ describe('common/dialogs/create/listing/navigation_view', function() {
it('should call set in routerModel and createModel', function () {
spyOn(this.createModel, 'set')
spyOn(this.visFetchModel, 'set')
+ spyOn(this.view, '_datasetsTabDisabled').and.returnValue(false);
+
+ this.view.render();
+ this.view._onDatasetsClick();
expect(this.createModel.set).toHaveBeenCalled();
expect(this.visFetchModel.set).toHaveBeenCalled();
@@ -176,9 +186,9 @@ describe('common/dialogs/create/listing/navigation_view', function() {
describe('._datasetsTabDisabled', function () {
it('should return the value of createModel datasetTabDisabled', function () {
- expect(this.view._datasetTabDisabled()).toBeFalsy();
+ expect(this.view._datasetsTabDisabled()).toBeFalsy();
this.createModel.set('datasetsTabDisabled', true);
- expect(this.view._datasetTabDisabled()).toBe(true);
+ expect(this.view._datasetsTabDisabled()).toBe(true);
});
});
| 7 |
diff --git a/src/unpoly/framework.js b/src/unpoly/framework.js @@ -189,7 +189,7 @@ up.framework = (function() {
Internet Explorer 11 or lower are [now longer supported](https://github.com/unpoly/unpoly/discussions/340).
- The last Unpoly version to support Internet Explorer 11 is 2.6.x.
+ If you need to support Internet Explorer 11, use Unpoly 2.
@function up.framework.isSupported
@stable
| 7 |
diff --git a/components/CopyButton.js b/components/CopyButton.js @@ -4,7 +4,7 @@ import ClipboardJS from 'clipboard';
export default class CopyButton extends React.PureComponent {
constructor(props) {
super(props);
- this.btnRef = React.createRef();
+ this.copyBtnRef = React.createRef();
this.clipboardRef = React.createRef();
}
@@ -13,7 +13,7 @@ export default class CopyButton extends React.PureComponent {
};
componentDidMount() {
- this.clipboardRef.current = new ClipboardJS(this.btnRef.current, {
+ this.clipboardRef.current = new ClipboardJS(this.copyBtnRef.current, {
text: () => this.props.content,
});
}
@@ -21,7 +21,7 @@ export default class CopyButton extends React.PureComponent {
render() {
return (
<button
- ref={this.btnRef}
+ ref={this.copyBtnRef}
key="copy"
onClick={() => {}}
className="btn-copy"
| 10 |
diff --git a/src/components/Abstract/Abstract.styles.js b/src/components/Abstract/Abstract.styles.js // @flow
import React from "react";
-import styled from "styled-components";
+import styled, { css } from "styled-components";
import type { ComponentType } from "react";
export const AbstractContainer: ComponentType<*> = (() => {
- const Node = styled.p`
+ return styled
+ .summary
+ .attrs(({ className="" }) => ({
+ className: `${ className } govuk-body-s`
+ }))`
color: #626a6e;
+ line-height: 1.7rem;
+
+ ${
+ props => {
+ console.log(props);
+ return props.fullWidth
+ ? css`width: 50% !important;`
+ : css`width: 85% !important;`
+ }
+ }
& .modal-opener-text {
color: #000;
@@ -18,14 +32,6 @@ export const AbstractContainer: ComponentType<*> = (() => {
}
`;
- return ({ fullWidth, ...props }) => <div className={ "govuk-grid-row" }>
- <div className={ fullWidth ? "govuk-grid-column-one-half" : "govuk-grid-column-two-thirds" }>
- <div className={ "govuk-body-s" }>
- <Node { ...props }/>
- </div>
- </div>
- </div>
-
})();
| 7 |
diff --git a/lod.js b/lod.js @@ -2,6 +2,46 @@ import * as THREE from 'three';
const localVector2D = new THREE.Vector2();
+/*
+note: the nunber of lods at each level can be computed with this function:
+
+ getNumLodsAtLevel = n => n === 0 ? 1 : (2*n+1)**2-(getNumLodsAtLevel(n-1));
+
+the total number of chunks with 3 lods is:
+ > getNumLodsAtLevel(0) + getNumLodsAtLevel(1) + getNumLodsAtLevel(2) + getNumLodsAtLevel(3)
+ < 58
+
+---
+
+the view range for a chunk size and given number of lods is:
+
+ // 0, 1, 2 are our lods
+ getViewRangeInternal = n => (n === 0 ? 1 : (3*getViewRangeInternal(n-1)));
+ getViewRange = (n, chunkSize) => getViewRangeInternal(n) * chunkSize / 2;
+
+for a chunkSize of 30, we have the view distance of each lod:
+
+ getViewRange(1, 30) = 45 // LOD 0
+ getViewRange(2, 30) = 135 // LOD 1
+ getViewRange(3, 30) = 405 // LOD 2
+---
+
+for a million tris budget, the tris per chunk is:
+ 1,000,000 tri / 58 chunks rendered = 17241.379310344827586206896551724 tri
+
+for a chunk size of 30 meters, the density of tris per uniform meters cubic is:
+ > 17241.379310344827586206896551724 tri / (30**3 meters)
+ < 0.6385696040868454 tri/m^3
+
+per meters squared, it's 19.157088122605362 tri/m^2
+
+---
+
+using these results
+
+- the tri budget can be scaled linearly with the results
+- the chunk size can be changed to increase the view distance while decreasing the density, while keeping the tri budget the same
+*/
export class LodChunk extends THREE.Vector3 {
constructor(x, y, z, lod) {
| 0 |
diff --git a/src/yy/v22/YyManipV22.hx b/src/yy/v22/YyManipV22.hx @@ -374,7 +374,7 @@ class YyManipV22 {
var fp1 = fd1 + fn1 + ".";
for (tab in ChromeTabs.impl.tabEls){
var tp = tab.gmlFile.path;
- if (!NativeString.startsWith(tp, fd0)) continue;
+ if (tp == null || !NativeString.startsWith(tp, fd0)) continue;
if (NativeString.startsWith(tp, fp0)) {
tp = fp1 + tp.substring(fp0.length);
} else {
| 1 |
diff --git a/views/boxs/chart.ejs b/views/boxs/chart.ejs <button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bars"></i>
</button>
- <ul class="dropdown-menu" role="menu">
+ <ul class="dropdown-menu" role="menu" style="height: 300px; overflow: auto">
<li ng-repeat="deviceType in vm.deviceTypes">
<a href="" ng-click="vm.currentDeviceType = deviceType">{{deviceType.name}}</a>
</li>
| 1 |
diff --git a/resources/js/custom.js b/resources/js/custom.js @@ -82,7 +82,6 @@ try {
function openLyrics() {
document.body.classList.add("web-chrome-drawer-open");
document.body.classList.remove("web-chrome-drawer-opening");
- document.querySelector('.web-chrome-drawer').style.backgroundColor = "var(--systemToolbarTitlebarMaterialSover-inactive)";
document.querySelector('.web-chrome-drawer').removeEventListener('animationend', openLyrics, true);
document.querySelector('#lyricsButton').style.fill = 'var(--playerPlatterButtonIconFill)';
document.querySelector('#lyricsButton').style.boxShadow = '0 1px 1px rgb(0 0 0 / 10%)';
@@ -92,7 +91,6 @@ try {
function closeLyrics() {
document.body.classList.remove("web-chrome-drawer-open");
document.body.classList.remove("web-chrome-drawer-closing");
- document.querySelector('.web-chrome-drawer').style.backgroundColor = "";
document.querySelector('.web-chrome-drawer').removeEventListener('animationend', closeLyrics, true);
document.querySelector('#lyricsButton').style.fill = 'var(--systemSecondary)';
document.querySelector('#lyricsButton').style.boxShadow = 'none';
| 2 |
diff --git a/src/renderer/components/path-selector.js b/src/renderer/components/path-selector.js @@ -32,7 +32,7 @@ class PathSelector extends React.Component {
handleClick () {
const opts = Object.assign({
- defaultPath: this.props.value && path.dirname(this.props.value),
+ defaultPath: path.dirname(this.props.value || ''),
properties: ['openFile', 'openDirectory']
}, this.props.dialog)
| 9 |
diff --git a/run-tests.js b/run-tests.js @@ -124,7 +124,7 @@ const testMarket = async (market) => {
if (failed || hasWarnings) {
if (failed) { log.bright ('\nFAILED'.bgBrightRed.white, market.red, '(' + language + '):\n') }
- else { log.bright.yellow (market, '(' + language + '):\n') }
+ else { log.bright ('\nWARN'.bgYellow.yellow, market.yellow, '(' + language + '):\n') }
log.indent (1) (output)
}
@@ -140,12 +140,12 @@ const testMarket = async (market) => {
log.bright.magenta.noPretty ('Testing'.white, { markets, symbol, keys })
const tested = await Promise.all (markets.map (testMarket))
- , hasWarnings = tested.filter (t => t.hasWarnings)
+ , warnings = tested.filter (t => !t.failed && t.hasWarnings)
, failed = tested.filter (t => t.failed)
log.newline ()
- hasWarnings.forEach (t => t.explain ())
+ warnings.forEach (t => t.explain ())
failed .forEach (t => t.explain ())
if (failed.length) {
| 1 |
diff --git a/shared/js/background/utils.es6.js b/shared/js/background/utils.es6.js @@ -5,7 +5,7 @@ function extractHostFromURL (url, shouldKeepWWW) {
if (!url) return
let urlObj = tldjs.parse(url)
- let hostname = urlObj.hostname
+ let hostname = urlObj.hostname || ''
if (!shouldKeepWWW) {
hostname = hostname.replace(/^www\./, '')
| 12 |
diff --git a/src/enforcers/Response.js b/src/enforcers/Response.js @@ -30,7 +30,6 @@ module.exports = {
prototype: {},
validator: function ({ major }) {
- const MediaType = require('./MediaType');
return {
type: 'object',
properties: {
@@ -41,11 +40,7 @@ module.exports = {
content: {
allowed: major === 3,
type: 'object',
- additionalProperties: EnforcerRef('MediaType', {
- errors: function({ key, warn }) {
- if (!MediaType.rx.mediaType.test(key)) warn.message('Media type appears invalid');
- }
- })
+ additionalProperties: EnforcerRef('MediaType')
},
examples: {
allowed: major === 2,
| 5 |
diff --git a/packages/gatsby/lib/schema/infer-graphql-type.js b/packages/gatsby/lib/schema/infer-graphql-type.js @@ -11,6 +11,7 @@ const _ = require("lodash")
const moment = require("moment")
const mime = require("mime")
const isRelative = require("is-relative")
+const isRelativeUrl = require("is-relative-url")
const { store, getNodes } = require("../redux")
const { addPageDependency } = require("../redux/actions/add-page-dependency")
const { extractFieldExamples } = require("./data-tree-utils")
@@ -192,8 +193,10 @@ const inferObjectStructureFromNodes = (exports.inferObjectStructureFromNodes = (
_.isString(v) &&
mime.lookup(v) !== `application/octet-stream` &&
mime.lookup(v) !== `application/x-msdownload` && // domains ending with .com
- isRelative(v)
+ isRelative(v) &&
+ isRelativeUrl(v)
) {
+ console.log(k, v, isRelative(v))
const fileNodes = types.filter(type => type.name === `File`)
if (fileNodes && fileNodes.length > 0) {
inferredFields[k] = fileNodes[0].field
| 8 |
diff --git a/generators/client/templates/angular/package.json.ejs b/generators/client/templates/angular/package.json.ejs "bootstrap": "4.2.1",
"core-js": "2.6.3",
"moment": "2.24.0",
- "ng-jhipster": "0.9.0",
+ "ng-jhipster": "0.9.1",
"ngx-cookie": "2.0.1",
"ngx-infinite-scroll": "7.0.1",
"ngx-webstorage": "2.0.1",
| 3 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/canvas/ContextMenu.js b/public/javascripts/SVLabel/src/SVLabel/canvas/ContextMenu.js @@ -231,10 +231,16 @@ function ContextMenu (uiContextMenu) {
self.labelTags.forEach(function (tag) {
if (tag.tag === tagValue) {
if (!labelTags.includes(tag.tag_id)) {
- // Clear existing tags.
- labelTags.length = 0;
- // Update the colors of the buttons.
- _updateLabelColors(labelTags);
+ // Strings of alternate route present and no alternate route
+ var alternateRoutePresentStr = 'alternate route present';
+ var noAlternateRouteStr = 'no alternate route';
+ // Automatically deselect one of the tags above if the other one is selected
+ if (tagValue == alternateRoutePresentStr) {
+ removeLabelAndUpdateUI(noAlternateRouteStr, labelTags);
+ } else if (tagValue == noAlternateRouteStr) {
+ removeLabelAndUpdateUI(alternateRoutePresentStr, labelTags);
+ }
+
labelTags.push(tag.tag_id);
svl.tracker.push('ContextMenu_TagAdded',
{ tagId: tag.tag_id, tagName: tag.tag });
@@ -252,6 +258,15 @@ function ContextMenu (uiContextMenu) {
});
}
+ function removeLabelAndUpdateUI(labelName, labelTags) {
+ $tags.each((index, tag) => {if (tag.innerText == labelName) {tag.style.backgroundColor = "white"; } });
+ self.labelTags.forEach(tag => {
+ if (tag.tag == labelName && labelTags.includes(tag.tag_id)) {
+ labelTags.splice(labelTags.indexOf(tag.tag_id), 1);
+ }
+ });
+ }
+
/**
*
* @param e
@@ -487,21 +502,6 @@ function ContextMenu (uiContextMenu) {
}
}
- /**
- * Update the colors of all buttons according to labelTags.
- * @param {*} labelTags List of tags that the current lable has.
- */
- function _updateLabelColors(labelTags) {
- $tags.each(function(index, tag) {
- tag = $(tag);
- if (labelTags.includes(tag.attr('id'))) {
- tag.css('backgroundColor', 'rgb(200, 200, 200)');
- } else {
- tag.css('backgroundColor', "white");
- }
- });
- }
-
self.getContextMenuUI = getContextMenuUI;
self.checkRadioButton = checkRadioButton;
self.getTargetLabel = getTargetLabel;
| 1 |
diff --git a/scripts/build-js.js b/scripts/build-js.js @@ -64,7 +64,25 @@ function es(components, cb) {
sourcemapFile: `./${env === 'development' ? 'build' : 'package'}/js/swiper.esm.browser.bundle.js.map`,
banner,
file: `./${env === 'development' ? 'build' : 'package'}/js/swiper.esm.browser.bundle.js`,
- })).then(() => {
+ })).then((bundle) => {
+ if (env === 'development') {
+ if (cb) cb();
+ return;
+ }
+ const result = bundle.output[0];
+ const minified = Terser.minify(result.code, {
+ sourceMap: {
+ content: env === 'development' ? result.map : undefined,
+ filename: env === 'development' ? undefined : 'swiper.esm.browser.bundle.min.js',
+ url: 'swiper.esm.browser.bundle.min.js.map',
+ },
+ output: {
+ preamble: banner,
+ },
+ });
+
+ fs.writeFileSync('./package/js/swiper.esm.browser.bundle.min.js', minified.code);
+ fs.writeFileSync('./package/js/swiper.esm.browser.bundle.min.js.map', minified.map);
if (cb) cb();
}).catch((err) => {
if (cb) cb();
| 0 |
diff --git a/src/components/pagination/Pagination.vue b/src/components/pagination/Pagination.vue <template>
<nav aria-label="Page navigation">
<ul class="pagination" :class="pageSize">
- <li :class="{'disabled':sliceStart==1||currentPage==1}" v-if="boundaryLinks" @click="sliceStart=sliceStart-1">
+ <li :class="{'disabled':sliceStart==1||currentPage==1}" v-if="boundaryLinks" @click="sliceStart-=1">
<span>
<span aria-hidden="true">«</span>
</span>
</li>
- <li :class="{'disabled':currentPage==1}" v-if="directionLinks" @click="currentPage=currentPage-1">
+ <li :class="{'disabled':currentPage==1}" v-if="directionLinks" @click="currentPage-=1">
<span>
<span aria-hidden="true">‹</span>
</span>
</li>
<li v-if="sliceStart>0"><span>...</span></li>
- <li v-for="item in sliceArray" :key="item" @click="currentPage=item+1" class="pagination-page" :class="{'active': currentPage==item+1}">
+ <li v-for="item in sliceArray" :key="item" @click="onPageChange(item+1)" class="pagination-page" :class="{'active': currentPage==item+1}">
<a href="javascript:;">{{item+1}}</a>
</li>
- <li v-if="sliceStart!=parseInt(totalPage/maxSize)" @click="sliceStart=sliceStart+1"><span>...</span></li>
- <li :class="{'disabled':currentPage==totalPage-1}" v-if="directionLinks" @click="currentPage=currentPage+1">
+ <li v-if="sliceStart!=parseInt(totalPage/maxSize)" @click="sliceStart+=1"><span>...</span></li>
+ <li :class="{'disabled':currentPage==totalPage-1}" v-if="directionLinks" @click="currentPage+=1">
<span>
<span aria-hidden="true">›</span>
</span>
</li>
- <li :class="{'disabled':sliceStart==parseInt(totalPage/maxSize)||currentPage==totalPage-1}" v-if="boundaryLinks" @click="sliceStart=sliceStart+1">
+ <li :class="{'disabled':sliceStart==parseInt(totalPage/maxSize)||currentPage==totalPage-1}" v-if="boundaryLinks" @click="sliceStart += 1">
<span>
<span aria-hidden="true">»</span>
</span>
},
data () {
return {
+ value: {},
currentPage: 1,
sliceStart: 0
}
},
+ watch: {
+ value (value) {
+ try {
+ console.log(value)
+ this.currentPage = value
+ } catch (e) {
+ // Silent
+ }
+ }
+ },
computed: {
pageSize () {
return `pagination-${this.size}`
return newArray
},
sliceStart () {
- return (this.currentpage % this.maxSize) * this.maxSize
+ return (this.currentPage % this.maxSize) * this.maxSize
},
sliceArray () {
let afterSlice = this.pageArray.slice()
},
methods: {
onPageChange (page) {
- this.currentpage = page
+ this.currentPage = page
console.log(page)
-// this.$emit('input', this.currentpage)
+ this.$emit('input', this.currentPage)
}
}
}
| 1 |
diff --git a/source/views/menu/MenuView.js b/source/views/menu/MenuView.js @@ -109,6 +109,7 @@ const MenuView = Class({
isMenuView: true,
showFilter: false,
+ filterPlaceholder: null,
closeOnActivate: true,
controller: function () {
@@ -157,6 +158,7 @@ const MenuView = Class({
return [
(this.filterView = this.get('showFilter')
? new MenuFilterView({
+ placeholder: this.get('filterPlaceholder'),
controller,
})
: null),
| 0 |
diff --git a/src/plots/cartesian/constraints.js b/src/plots/cartesian/constraints.js @@ -168,7 +168,6 @@ exports.handleDefaults = function(layoutIn, layoutOut, opts) {
if(val !== null) {
for(axId in group) {
axOut = layoutOut[id2name(axId)];
- // TODO: do we also need to (deep) copy rangebreaks?
axOut[attr] = attr === 'range' ? val.slice() : val;
if(attr === 'rangebreaks') {
| 2 |
diff --git a/js/kiri-init.js b/js/kiri-init.js @@ -1482,7 +1482,7 @@ var gs_kiri_init = exports;
slaSupportDensity: UC.newInput(LANG.sa_sldn_s, {title:LANG.sa_sldn_l, convert:UC.toFloat, bound:UC.bound(0.01,0.9), modes:SLA}),
slaSupportSize: UC.newInput(LANG.sa_slsz_s, {title:LANG.sa_slsz_l, convert:UC.toFloat, bound:UC.bound(0.1,1), modes:SLA}),
slaSupportPoints: UC.newInput(LANG.sa_slpt_s, {title:LANG.sa_slpt_l, convert:UC.toInt, bound:UC.bound(3,10), modes:SLA, expert:true}),
- slaSupportGap: UC.newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:UC.toInt, bound:UC.bound(3,15), modes:SLA, expert:true}),
+ slaSupportGap: UC.newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:UC.toInt, bound:UC.bound(3,30), modes:SLA, expert:true}),
slaSupportEnable: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.sl_slen_l, modes:SLA}),
slaOutput: UC.newGroup(LANG.sa_outp_m, null, {modes:SLA, group:"sla-first"}),
| 11 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/field/material-textarea/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/field/material-textarea/template.vue ref="textarea"
class="form-control materialize-textarea"
v-model="value"
- v-bind:style="{minHeight: `${schema.rows}em`, maxHeight: schema.maxHeight}"
+ v-bind:style="{minHeight: `${schema.rows}em`, maxHeight: `${schema.rows}em`"
:id="getFieldID(schema)"
:disabled="disabled"
:maxlength="schema.max"
| 12 |
diff --git a/src/scss/hpe/_hpe.defaults.scss b/src/scss/hpe/_hpe.defaults.scss @@ -4,8 +4,8 @@ $brand-font-family: 'Metric', Arial, sans-serif;
$brand-large-number-font-family: 'Metric', Arial, sans-serif;
$brand-color: #01a982;
$brand-color-lighter: desaturate(lighten($brand-color, 55%), 40%);
-$brand-neutral-colors: (#425563, #5F7A76, #80746E, #767676);
-$brand-accent-colors: (#2AD2C9, #614767, #ff8d6d);
+$brand-neutral-colors: (#425563, #5F7A76, #80746E, #767676) !default;
+$brand-accent-colors: (#2AD2C9, #614767, #ff8d6d) !default;
$brand-status-colors: (
critical: #F04953,
error: #F04953,
| 11 |
diff --git a/packages/node_modules/@node-red/nodes/locales/de/network/22-websocket.html b/packages/node_modules/@node-red/nodes/locales/de/network/22-websocket.html <p>Dieser Konfigurations-Node erstellt einen WebSocket Server-Endpunkt unter Verwendung des angegebenen Pfades.</p>
</script>
-<!-- WebSocket Client configuration node -->
-<script type="text/x-red" data-template-name="websocket-client">
- <div class="form-row">
- <label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
- <input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">
- </div>
- <div class="form-row node-config-row-tls hide">
- <label for="node-config-input-tls" data-i18n="httpin.tls-config"></label>
- <input type="text" id="node-config-input-tls">
- </div>
-
- <div class="form-row">
- <label for="node-config-input-wholemsg" data-i18n="websocket.sendrec"></label>
- <select type="text" id="node-config-input-wholemsg" style="width: 70%;">
- <option value="false" data-i18n="websocket.payload"></option>
- <option value="true" data-i18n="websocket.message"></option>
- </select>
- </div>
- <div class="form-tips">
- <p><span data-i18n="[html]websocket.tip.url1"></span></p>
- <span data-i18n="[html]websocket.tip.url2"></span>
- </div>
-</script>
-
<script type="text/x-red" data-help-name="websocket-client">
<p>Dieser Konfigurations-Node verbindet einen WebSocket-Client mit der angegebenen URL.</p>
</script>
| 2 |
diff --git a/tools/deployer/AirSwap/src/DelegateMapping.ts b/tools/deployer/AirSwap/src/DelegateMapping.ts @@ -3,6 +3,31 @@ import { ProvideOrder, SetRule, UnsetRule } from "../generated/templates/Delegat
import { User, Token, DelegateContract, Rule } from "../generated/schema"
export function handleSetRule(event: SetRule): void {
+ // handle user if it doesn't exist
+ var owner = User.load(event.params.owner.toHex())
+ if (!owner) {
+ owner = new User(event.params.owner.toHex())
+ owner.authorizedSigners = new Array<string>()
+ owner.authorizedSenders = new Array<string>()
+ owner.executedOrders = new Array<string>()
+ owner.cancelledNonces = new Array<BigInt>()
+ owner.save()
+ }
+
+ var signerToken = Token.load(event.params.signerToken.toHex())
+ if (!signerToken) {
+ signerToken = new Token(event.params.signerToken.toHex())
+ signerToken.isBlacklisted = false
+ signerToken.save()
+ }
+
+ var senderToken = Token.load(event.params.senderToken.toHex())
+ if (!senderToken) {
+ senderToken = new Token(event.params.senderToken.toHex())
+ senderToken.isBlacklisted = false
+ senderToken.save()
+ }
+
var ruleIdentifier =
event.address.toHex() +
event.params.senderToken.toHex() +
@@ -12,10 +37,10 @@ export function handleSetRule(event: SetRule): void {
// create base portion of rule if it doesn't not exist
if (!rule) {
rule = new Rule(ruleIdentifier)
- rule.delegate = DelegateContract.load(event.address.toHexString()).id
- rule.owner = User.load(event.params.owner.toHex()).id
- rule.signerToken = Token.load(event.params.signerToken.toHex()).id
- rule.senderToken = Token.load(event.params.senderToken.toHex()).id
+ rule.delegate = DelegateContract.load(event.address.toHex()).id
+ rule.owner = owner.id
+ rule.signerToken = signerToken.id
+ rule.senderToken = senderToken.id
}
rule.maxSenderAmount = event.params.maxSenderAmount
rule.priceCoef = event.params.priceCoef
@@ -33,17 +58,17 @@ export function handleUnsetRule(event: UnsetRule): void {
}
export function handleProvideOrder(event: ProvideOrder): void {
- var ruleIdentifier =
- event.address.toHex() +
- event.params.senderToken.toHex() +
- event.params.signerToken.toHex()
+ // var ruleIdentifier =
+ // event.address.toHex() +
+ // event.params.senderToken.toHex() +
+ // event.params.signerToken.toHex()
- var rule = Rule.load(ruleIdentifier)
- rule.maxSenderAmount = BigInt.fromI32(rule.maxSenderAmount.toI32() - event.params.senderAmount.toI32())
- // if rule is to have been fully consumed, remove it
- if (rule.maxSenderAmount == BigInt.fromI32(0)) {
- store.remove("Rule", ruleIdentifier)
- } else {
- rule.save()
- }
+ // var rule = Rule.load(ruleIdentifier)
+ // rule.maxSenderAmount = BigInt.fromI32(rule.maxSenderAmount.toI32() - event.params.senderAmount.toI32())
+ // // if rule is to have been fully consumed, remove it
+ // if (rule.maxSenderAmount == BigInt.fromI32(0)) {
+ // store.remove("Rule", ruleIdentifier)
+ // } else {
+ // rule.save()
+ // }
}
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,15 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.46.1] -- 2019-04-02
+
+### Fixed
+- Fix `bar` traces that set `textfont` but don't have `text`
+ (bug introduced in 1.46.0) [#3715]
+- Fix hover text formatting in `waterfall` traces [#3711]
+- Fix `surface` and `mesh3d` color scales with more than 256 items [#3702]
+
+
## [1.46.0] -- 2019-04-01
### Added
| 3 |
diff --git a/app/models/observation.rb b/app/models/observation.rb @@ -579,7 +579,7 @@ class Observation < ApplicationRecord
# Find observations by user
scope :by, lambda {|user|
- if user&.id || user.to_i > 0
+ if user.is_a?( User ) || user.to_i > 0
where("observations.user_id = ?", user)
else
joins(:user).where("users.login = ?", user)
| 1 |
diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js @@ -20,26 +20,26 @@ function drag(path, options) {
Lib.clearThrottle();
if(options.type === 'touch') {
- touchEvent('touchstart', path[0][0], path[0][1]);
+ touchEvent('touchstart', path[0][0], path[0][1], options);
path.slice(1, len).forEach(function(pt) {
Lib.clearThrottle();
- touchEvent('touchmove', pt[0], pt[1]);
+ touchEvent('touchmove', pt[0], pt[1], options);
});
- touchEvent('touchend', path[len - 1][0], path[len - 1][1]);
+ touchEvent('touchend', path[len - 1][0], path[len - 1][1], options);
return;
}
- mouseEvent('mousemove', path[0][0], path[0][1]);
- mouseEvent('mousedown', path[0][0], path[0][1]);
+ mouseEvent('mousemove', path[0][0], path[0][1], options);
+ mouseEvent('mousedown', path[0][0], path[0][1], options);
path.slice(1, len).forEach(function(pt) {
Lib.clearThrottle();
- mouseEvent('mousemove', pt[0], pt[1]);
+ mouseEvent('mousemove', pt[0], pt[1], options);
});
- mouseEvent('mouseup', path[len - 1][0], path[len - 1][1]);
+ mouseEvent('mouseup', path[len - 1][0], path[len - 1][1], options);
}
function assertSelectionNodes(cornerCnt, outlineCnt) {
@@ -157,6 +157,43 @@ describe('Test select box and lasso in general:', function() {
drag(selectPath);
+ selectedPromise.then(function() {
+ expect(selectedCnt).toBe(1, 'with the correct selected count');
+ assertEventData(selectedData.points, [{
+ curveNumber: 0,
+ pointNumber: 0,
+ x: 0.002,
+ y: 16.25,
+ id: 'id-0.002',
+ customdata: 'customdata-16.25'
+ }, {
+ curveNumber: 0,
+ pointNumber: 1,
+ x: 0.004,
+ y: 12.5,
+ id: 'id-0.004',
+ customdata: 'customdata-12.5'
+ }], 'with the correct selected points (2)');
+ assertRange(selectedData.range, {
+ x: [0.002000, 0.0046236],
+ y: [0.10209191961595454, 24.512223978291406]
+ }, 'with the correct selected range');
+
+ return doubleClick(250, 200);
+ })
+ .then(deselectPromise)
+ .then(function() {
+ expect(doubleClickData).toBe(null, 'with the correct deselect data');
+ })
+ .catch(fail)
+ .then(done);
+ });
+
+ it('should handle add/sub selection', function(done) {
+ resetEvents(gd);
+
+ drag(selectPath);
+
selectedPromise.then(function() {
expect(selectingCnt).toBe(1, 'with the correct selecting count');
assertEventData(selectingData.points, [{
@@ -178,8 +215,14 @@ describe('Test select box and lasso in general:', function() {
x: [0.002000, 0.0046236],
y: [0.10209191961595454, 24.512223978291406]
}, 'with the correct selecting range');
- expect(selectedCnt).toBe(1, 'with the correct selected count');
- assertEventData(selectedData.points, [{
+ })
+ .then(function() {
+ // add selection
+ drag([[193, 193], [213, 193]], {shiftKey: true});
+ })
+ .then(function() {
+ expect(selectingCnt).toBe(2, 'with the correct selecting count');
+ assertEventData(selectingData.points, [{
curveNumber: 0,
pointNumber: 0,
x: 0.002,
@@ -193,15 +236,37 @@ describe('Test select box and lasso in general:', function() {
y: 12.5,
id: 'id-0.004',
customdata: 'customdata-12.5'
- }], 'with the correct selected points (2)');
- assertRange(selectedData.range, {
- x: [0.002000, 0.0046236],
- y: [0.10209191961595454, 24.512223978291406]
- }, 'with the correct selected range');
+ }, {
+ curveNumber: 0,
+ pointNumber: 4,
+ x: 0.013,
+ y: 6.875,
+ id: 'id-0.013',
+ customdata: 'customdata-6.875'
+ }], 'with the correct selecting points (1)');
+ })
+ .then(function() {
+ // sub selection
+ drag([[219, 143], [219, 183]], {altKey: true});
+ }).then(function() {
+ assertEventData(selectingData.points, [{
+ curveNumber: 0,
+ pointNumber: 0,
+ x: 0.002,
+ y: 16.25,
+ id: 'id-0.002',
+ customdata: 'customdata-16.25'
+ }, {
+ curveNumber: 0,
+ pointNumber: 1,
+ x: 0.004,
+ y: 12.5,
+ id: 'id-0.004',
+ customdata: 'customdata-12.5'
+ }], 'with the correct selecting points (1)');
return doubleClick(250, 200);
})
- .then(deselectPromise)
.then(function() {
expect(doubleClickData).toBe(null, 'with the correct deselect data');
})
| 0 |
diff --git a/deepfence_console/deepaudit/main.go b/deepfence_console/deepaudit/main.go @@ -637,7 +637,7 @@ func logErrorAndExit(errMsg string) {
os.Exit(1)
}
-func getContainerVulnerabilities(imageName string, imageTarPath string, imageId string) {
+func saveContainerImage(imageName string, imageTarPath string, imageId string) *manifestItem {
global_image_id = imageId
path, err := save(imageName, global_image_id, imageTarPath)
if err != nil {
@@ -652,17 +652,17 @@ func getContainerVulnerabilities(imageName string, imageTarPath string, imageId
if err != nil {
msg := fmt.Sprintf("Could not read image manifest: %s", err.Error())
logErrorAndExit(msg)
- return
+ return manifestItem
}
layerIDs := manifestItem.LayerIds
layerPaths := manifestItem.Layers
if len(layerPaths) == 0 {
logErrorAndExit("Image layer path is empty")
- return
+ return manifestItem
}
if len(layerIDs) == 0 {
logErrorAndExit("Image layer id is empty")
- return
+ return manifestItem
}
if imageId == "" {
// reading image id from manifest file json path and tripping off extension
@@ -698,16 +698,26 @@ func getContainerVulnerabilities(imageName string, imageTarPath string, imageId
msg := fmt.Sprintf("Unable to upload file %s to host %s. Reason %s",
fileName, managementConsoleUrl, err.Error())
sendScanLogsToLogstash(msg, "ERROR")
- return
+ return manifestItem
+ }
}
}
+ return manifestItem
}
+
+func getContainerVulnerabilities(imageName string, imageTarPath string, imageId string, manifestItem *manifestItem) {
+ path := tmp_path
+ // Retrieve history.
+ layerIDs := manifestItem.LayerIds
+ layerPaths := manifestItem.Layers
+ var fileName string
+ loopCntr := len(layerPaths)
if runtime.GOOS == "windows" {
fileName = path + "\\" + layerPaths[0]
} else {
fileName = path + "/" + layerPaths[0]
}
- err = analyzeLayer(fileName, layerIDs[0], "")
+ err := analyzeLayer(fileName, layerIDs[0], "")
if err != nil {
msg := fmt.Sprintf("Could not analyze layer %s, moving on: %v", layerIDs[0], err)
sendScanLogsToLogstash(msg, "WARN")
@@ -1265,18 +1275,51 @@ func main() {
}
}()
+ var manifestItem *manifestItem
+ if imageName != "host" {
+ manifestItem = saveContainerImage(imageName, imageTarPath, imageId)
+ }
+
+ // language scan
+ if len(scanTypes) != 0 {
+ if updateDepCheckData {
+ depCheckErrMsg := checkDependencyData()
+ if depCheckErrMsg != "" {
+ logErrorAndExit(depCheckErrMsg)
+ }
+ fmt.Printf("Dependency data downloaded. Proceeding\n")
+ }
+
+ vulnerabilityDataPresent := true
+ fileFd, err := os.Open(depcheckDataDir)
+ if err != nil {
+ vulnerabilityDataPresent = false
+ } else {
+ _, err := fileFd.Readdir(1)
+ if err == io.EOF {
+ vulnerabilityDataPresent = false
+ }
+ }
+ if !vulnerabilityDataPresent {
+ sendScanLogsToLogstash("Language vulnerability database not yet updated. Results may be incomplete", "WARN")
+ } else {
+ // Scans for different languages
+ for _, scanLang := range scanTypes {
+ errVal = getLanguageVulnerabilities(scanLang, fileSet)
+ if errVal != "" {
+ sendScanLogsToLogstash(errVal, "WARN")
+ }
+ }
+ }
+ }
+
// base scan
if imageName == "host" {
isHostScan = true
hostMountPath = strings.Replace(imageTarPath, "layer.tar", "", -1)
getHostVulnerabilities(hostName, imageTarPath)
} else {
- getContainerVulnerabilities(imageName, imageTarPath, imageId)
- }
-
- if len(scanTypes) == 0 {
- completeScan()
- return
+ getContainerVulnerabilities(imageName, imageTarPath, imageId, manifestItem)
}
fileSystemsDir := "/data/fileSystems/"
@@ -1310,44 +1353,5 @@ func main() {
deleteFiles(fileSystemsDir, "*.tar")
}
- // language scan
- if updateDepCheckData {
- //fmt.Printf("Now trying to lock access to dependency data \n")
- //if runtime.GOOS == "windows" {
- // lockFileName = windowsSysTempDir + "/depcheck-download.lock"
- //}
- //lock := fslock.New(lockFileName)
- //if lock.Lock() != nil {
- // return
- //}
- depCheckErrMsg := checkDependencyData()
- //lock.Unlock()
- if depCheckErrMsg != "" {
- logErrorAndExit(depCheckErrMsg)
- }
- fmt.Printf("Dependency data downloaded. Proceeding\n")
- }
-
- vulnerabilityDataPresent := true
- fileFd, err := os.Open(depcheckDataDir)
- if err != nil {
- vulnerabilityDataPresent = false
- } else {
- _, err := fileFd.Readdir(1)
- if err == io.EOF {
- vulnerabilityDataPresent = false
- }
- }
- if !vulnerabilityDataPresent {
- sendScanLogsToLogstash("Language vulnerability database not yet updated. Results may be incomplete", "WARN")
- } else {
- // Scans for different languages
- for _, scanLang := range scanTypes {
- errVal = getLanguageVulnerabilities(scanLang, fileSet)
- if errVal != "" {
- sendScanLogsToLogstash(errVal, "WARN")
- }
- }
- }
completeScan()
}
| 5 |
diff --git a/__tests__/types.ts b/__tests__/types.ts -import produce, {produce as produce2, applyPatches, Patch} from "../src/immer"
+import produce, {
+ produce as produce2,
+ applyPatches,
+ Draft,
+ Patch
+} from "../src/immer"
interface State {
readonly num: number
@@ -97,3 +102,113 @@ it("can apply patches", () => {
expect(applyPatches({}, patches)).toEqual({x: 4})
})
+
+/**
+ * Draft<T>
+ */
+
+// For checking if a type is assignable to its draft type (and vice versa)
+const toDraft = <T>(value: T): Draft<T> => value as any
+const fromDraft = <T>(draft: Draft<T>): T => draft as any
+
+// Finite tuple
+{
+ let val: [1, 2]
+ val = fromDraft(toDraft(val))
+}
+
+// Mutable array
+{
+ let val: string[]
+ val = fromDraft(toDraft(val))
+}
+
+// Readonly array
+{
+ let val: ReadonlyArray<string>
+ val = fromDraft(toDraft(val))
+}
+
+// Tuple nested in two readonly arrays
+{
+ let val: ReadonlyArray<ReadonlyArray<[1, 2]>>
+ val = fromDraft(toDraft(val))
+}
+
+// Mutable object
+{
+ let val: {a: 1}
+ val = fromDraft(toDraft(val))
+}
+
+// Readonly object
+{
+ let val: Readonly<{a: 1}>
+ val = fromDraft(toDraft(val))
+}
+
+// Loose function
+{
+ let val: Function
+ val = fromDraft(toDraft(val))
+}
+
+// Strict function
+{
+ let val: () => void
+ val = fromDraft(toDraft(val))
+}
+
+// Date instance
+{
+ let val: Date
+ val = fromDraft(toDraft(val))
+}
+
+// RegExp instance
+{
+ let val: RegExp
+ val = fromDraft(toDraft(val))
+}
+
+// Boxed primitive
+{
+ let val: Boolean
+ val = fromDraft(toDraft(val))
+}
+
+// String literal
+{
+ let val: string
+ val = fromDraft(toDraft(val))
+}
+
+// Any
+{
+ let val: any
+ val = fromDraft(toDraft(val))
+}
+
+// Never
+{
+ let val: never
+ val = fromDraft(toDraft(val))
+}
+
+// Numeral
+{
+ let val: 1
+ val = fromDraft(toDraft(val))
+}
+
+// Union of numerals
+{
+ let val: 1 | 2 | 3
+ val = fromDraft(toDraft(val))
+}
+
+// Union of tuple, array, object
+{
+ let val: [0] | ReadonlyArray<string> | Readonly<{a: 1}>
+ val = fromDraft(toDraft(val))
+}
| 0 |
diff --git a/token-metadata/0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF/metadata.json b/token-metadata/0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF/metadata.json "symbol": "RARI",
"address": "0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app-object.js b/app-object.js @@ -80,6 +80,35 @@ const localFrameOpts = {
data: localData,
};
+const iframeContainer = document.getElementById('iframe-container');
+const iframeContainer2 = document.getElementById('iframe-container2');
+if (iframeContainer && iframeContainer2) {
+ iframeContainer.getFov = () => camera.projectionMatrix.elements[ 5 ] * (window.innerHeight / 2);
+ iframeContainer.updateSize = function updateSize() {
+ const fov = iframeContainer.getFov();
+ iframeContainer.style.cssText = `
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: ${window.innerWidth}px;
+ height: ${window.innerHeight}px;
+ perspective: ${fov}px;
+ `;
+ iframeContainer2.style.cssText = `
+ /* display: flex;
+ justify-content: center;
+ align-items: center; */
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ /* transform-style: preserve-3d; */
+ `;
+ };
+ iframeContainer.updateSize();
+}
+
class AppManager {
constructor() {
this.apps = [];
@@ -141,4 +170,4 @@ class App extends EventTarget {
}
}
-export {renderer, scene, orthographicScene, avatarScene, camera, orthographicCamera, avatarCamera, dolly, /*orbitControls,*/ renderer2, scene2, scene3, appManager};
\ No newline at end of file
+export {renderer, scene, orthographicScene, avatarScene, camera, orthographicCamera, avatarCamera, dolly, /*orbitControls,*/ renderer2, scene2, scene3, iframeContainer, iframeContainer2, appManager};
\ No newline at end of file
| 0 |
diff --git a/src/utils/utils.js b/src/utils/utils.js @@ -842,3 +842,53 @@ export function getCurrencyAffixes({
suffix: parts[2] || ''
};
}
+
+/**
+ * Fetch the field data provided a component.
+ *
+ * @param data
+ * @param component
+ * @return {*}
+ */
+export function fieldData(data, component) {
+ if (!data) {
+ return '';
+ }
+ if (!component || !component.key) {
+ return data;
+ }
+ if (component.key.includes('.')) {
+ let value = data;
+ const parts = component.key.split('.');
+ let key = '';
+ for (let i = 0; i < parts.length; i++) {
+ key = parts[i];
+
+ // Handle nested resources
+ if (value.hasOwnProperty('_id')) {
+ value = value.data;
+ }
+
+ // Return if the key is not found on the value.
+ if (!value.hasOwnProperty(key)) {
+ return;
+ }
+
+ // Convert old single field data in submissions to multiple
+ if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {
+ value[key] = [value[key]];
+ }
+
+ // Set the value of this key.
+ value = value[key];
+ }
+ return value;
+ }
+ else {
+ // Convert old single field data in submissions to multiple
+ if (component.multiple && !Array.isArray(data[component.key])) {
+ data[component.key] = [data[component.key]];
+ }
+ return data[component.key];
+ }
+}
| 5 |
diff --git a/src/traces/scattergl/index.js b/src/traces/scattergl/index.js @@ -301,7 +301,8 @@ function sceneUpdate(gd, subplot) {
clearViewport(scene.select2d, vp);
}
- var anyComponent = scene.scatter2d || scene.line2d || (scene.glText || [])[0];
+ var anyComponent = scene.scatter2d || scene.line2d ||
+ (scene.glText || [])[0] || scene.fill2d || scene.error2d;
if(anyComponent) clearViewport(anyComponent, vp);
};
| 0 |
diff --git a/index.d.ts b/index.d.ts @@ -170,8 +170,7 @@ export class AxiosError<T = unknown, D = any> extends Error {
export class CanceledError<T> extends AxiosError<T> {
}
-export interface AxiosPromise<T = any> extends Promise<AxiosResponse<T>> {
-}
+export type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
export interface CancelStatic {
new (message?: string): Cancel;
| 3 |
diff --git a/__tests__/afterChange.test.js b/__tests__/afterChange.test.js @@ -10,6 +10,7 @@ class SliderWithBeforeChange extends React.Component {
};
this.afterChange = this.afterChange.bind(this);
}
+
afterChange(currentSlide) {
console.log(currentSlide, "afterChange");
this.setState({
@@ -33,16 +34,34 @@ describe("After change Slider", function() {
const wrapper = mount(<SliderWithBeforeChange />);
expect(wrapper.state()).toEqual({ currentSlide: null });
wrapper.find(".slick-next").simulate("click");
-
- //TBD . fix this test
-
- // expect(wrapper.find('.slick-slide.slick-active').first().text()).toEqual('slide2');
- // expect(wrapper.state()).toEqual({currentSlide: 1})
- // wrapper.find('.slick-next').simulate('click')
- // expect(wrapper.find('.slick-slide.slick-active').first().text()).toEqual('slide3');
- // expect(wrapper.state()).toEqual({currentSlide: 2})
- // wrapper.find('.slick-prev').simulate('click')
- // expect(wrapper.find('.slick-slide.slick-active').first().text()).toEqual('slide2');
- // expect(wrapper.state()).toEqual({currentSlide: 1})
+ setTimeout(() => {
+ expect(
+ wrapper
+ .find(".slick-slide.slick-active")
+ .first()
+ .text()
+ ).toEqual("slide2");
+ expect(wrapper.state()).toEqual({ currentSlide: 1 });
+ }, 1);
+ wrapper.find(".slick-next").simulate("click");
+ setTimeout(() => {
+ expect(
+ wrapper
+ .find(".slick-slide.slick-active")
+ .first()
+ .text()
+ ).toEqual("slide3");
+ expect(wrapper.state()).toEqual({ currentSlide: 2 });
+ }, 1);
+ wrapper.find(".slick-prev").simulate("click");
+ setTimeout(() => {
+ expect(
+ wrapper
+ .find(".slick-slide.slick-active")
+ .first()
+ .text()
+ ).toEqual("slide2");
+ expect(wrapper.state()).toEqual({ currentSlide: 1 });
+ }, 1);
});
});
| 1 |
diff --git a/src/components/core/breakpoints/getBreakpoint.js b/src/components/core/breakpoints/getBreakpoint.js @@ -6,7 +6,7 @@ export default function (breakpoints) {
let breakpoint = false;
const points = Object.keys(breakpoints).map((point) => {
- if (typeof point === 'string' && point.startsWith('@')) {
+ if (typeof point === 'string' && point.indexOf('@') === 0) {
const minRatio = parseFloat(point.substr(1));
const value = window.innerHeight * minRatio;
return { value, point };
| 14 |
diff --git a/shared/js/background/chrome-events.es6.js b/shared/js/background/chrome-events.es6.js @@ -181,24 +181,24 @@ const abpLists = require('./abp-lists.es6')
const httpsStorage = require('./storage/https.es6')
// recheck tracker and https lists every 12 hrs
-chrome.alarms.create('updateLists', {periodInMinutes: 12 * 60})
-// send upgrade totals every 30 minutes
-chrome.alarms.create('sendUpgradeTotals', {periodInMinutes: 30})
+chrome.alarms.create('updateHTTPSLists', {periodInMinutes: 12 * 60})
+// tracker lists / whitelists are 30 minutes
+chrome.alarms.create('updateLists', {periodInMinutes: 30})
// update uninstall URL every 10 minutes
chrome.alarms.create('updateUninstallURL', {periodInMinutes: 10})
chrome.alarms.onAlarm.addListener(alarmEvent => {
if (alarmEvent.name === 'updateLists') {
settings.ready().then(() => {
- abpLists.updateLists()
httpsStorage.getLists(constants.httpsLists)
.then(lists => https.setLists(lists))
.catch(e => console.log(e))
})
} else if (alarmEvent.name === 'updateUninstallURL') {
chrome.runtime.setUninstallURL(ATB.getSurveyURL())
- } else if (alarmEvent.name === 'sendUpgradeTotals') {
+ } else if (alarmEvent.name === 'updateLists') {
settings.ready().then(() => {
+ abpLists.updateLists()
https.sendHttpsUpgradeTotals()
})
}
| 5 |
diff --git a/README.md b/README.md @@ -12,11 +12,21 @@ Check the stack and try it online [https://ng-fullstack.surge.sh](https://ng-ful
If you already have Node/Go setup, all you have to do is run:
+```shell
$ npm install -g generator-ng-fullstack
+```
-then to create a new app:
+Or, if you want to run the latest (in development) version:
+```shell
+$ npm install -g generator-ng-fullstack@next
+```
+
+Then, to create a new app, simpy run:
+
+```shell
$ yo ng-fullstack
+```
A few questions will be shown, make sure you answer them and, there you go! Now you have the [boilerplate app working](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Getting-Started#result).
| 0 |
diff --git a/articles/tutorials/browser-based-vs-native-experience-on-mobile.md b/articles/tutorials/browser-based-vs-native-experience-on-mobile.md ---
- description: This doc covers the differences between a browser-based vs. native experience when implementing Auth0 on a mobile device.
+description: This doc covers the differences between a browser-based vs. native experience when implementing Auth0 on a mobile device
+toc: true
---
# Browser-Based vs. Native Login Flows on Mobile Devices
@@ -35,7 +36,7 @@ While SmartLock is not yet universal, using browser-based login flows allows you
With a native login flow, there's no way to avoid an unauthorized party from decompiling or intercepting traffic to/from your app to obtain the Client ID and authentication URL. Using these pieces of information, the unauthorized party can then create a rogue app, upload it to an app store, and use it to phish users for the username/passwords and access tokens.
-Using a browser-based flow protects you from this, since the callback URL is linked to the app through [universal app links](https://developer.apple.com/ios/universal-links/) (iOS) or App Links (Android). Note, however, that this is *not* a universally supported feature.
+Using a browser-based flow protects you from this, since the callback URL is linked to the app through [universal app links](https://developer.apple.com/ios/universal-links/) (iOS) or [App Links](/clients/enable-android-app-links) (Android). Note, however, that this is **not** a universally supported feature.
### Implementation Time
@@ -53,11 +54,15 @@ When using a native login flow, the login UI and logic is embedded onto the app
However, it's worth noting that the number of times a user logs in with the mobile devices most commonly used today is low. Once the user logs in, your app should only log them out if you revoke their access or if the user opts to log out.
+### Compliance with Best Practices
+
+As explained in the [RFC 8252 OAuth 2.0 for Native Apps](https://tools.ietf.org/html/rfc8252), OAuth 2.0 authorization requests from native apps should only be made through external user-agents, primarily the user's browser. The specification details the security and usability reasons why this is the case.
+
## Conclusion
There are upsides and downsides to using either a browser-based or native login flow on mobile devices, but regardless of which option you choose, Auth0 supports either.
-### Keep Reading
+## Keep Reading
For instructions on implementing a native experience for your users, please see the final sections of these three articles.
| 0 |
diff --git a/src/utils/innerSliderUtils.js b/src/utils/innerSliderUtils.js @@ -273,15 +273,9 @@ export const changeSlide = (spec, options) => {
} else if (options.message === "dots") {
// Click on dots
targetSlide = options.index * options.slidesToScroll;
- if (targetSlide === options.currentSlide) {
- return null;
- }
} else if (options.message === "children") {
// Click on the slides
targetSlide = options.index;
- if (targetSlide === options.currentSlide) {
- return null;
- }
if (infinite) {
let direction = siblingDirection({ ...spec, targetSlide });
if (targetSlide > options.currentSlide && direction === "left") {
@@ -292,9 +286,6 @@ export const changeSlide = (spec, options) => {
}
} else if (options.message === "index") {
targetSlide = Number(options.index);
- if (targetSlide === options.currentSlide) {
- return null;
- }
}
return targetSlide;
};
| 1 |
diff --git a/src/containers/target-pane.jsx b/src/containers/target-pane.jsx @@ -74,8 +74,10 @@ class TargetPane extends React.Component {
const emptyItem = spriteLibraryContent.find(item => item.name === 'Empty');
if (emptyItem) {
this.props.vm.addSprite2(JSON.stringify(emptyItem.json)).then(() => {
+ setTimeout(() => { // Wait for targets update to propagate before tab switching
this.props.onActivateTab(COSTUMES_TAB_INDEX);
});
+ });
}
}
handleBlockDragEnd (blocks) {
| 11 |
diff --git a/OpenRobertaServer/staticResources/js/app/simulation/robertaLogic/program.eval.js b/OpenRobertaServer/staticResources/js/app/simulation/robertaLogic/program.eval.js @@ -406,7 +406,7 @@ define(['robertaLogic.actors', 'robertaLogic.memory', 'robertaLogic.program', 'r
};
var isObject = function(obj) {
- return typeof obj === 'object'
+ return typeof obj === 'object' && !(obj instanceof Array)
};
var evalToneAction = function(obj, simulationData, stmt) {
@@ -613,31 +613,40 @@ define(['robertaLogic.actors', 'robertaLogic.memory', 'robertaLogic.program', 'r
if (i == 0) {
evalVarDeclaration(obj, stmt.expr.left);
}
- var list = evalExpr(obj, stmt.expr.right);
+ obj.currentStatement = stmt.expr
+ var list = evalExpr(obj, stmt.expr.right, "right");
+ obj.currentStatement = stmt;
+ if (!isObject(list)) {
if (i < list.length) {
obj.memory.assign(stmt.expr.left.name, list[i]);
obj.program.prepend([stmt])
obj.program.prepend(stmt.stmtList);
}
+ }
break;
case CONSTANTS.FOR:
+ obj.currentStatement = stmt.expr
+ var from = evalExpr(obj, stmt.expr[1], 1);
+ var to = evalExpr(obj, stmt.expr[2], 2);
+ var step = evalExpr(obj, stmt.expr[3], 3);
+ obj.currentStatement = stmt;
+ if (!isObject(from) && !isObject(to) && !isObject(to)) {
if (obj.memory.get(stmt.expr[0].name) == undefined) {
- obj.memory.decl(stmt.expr[0].name, evalExpr(obj, stmt.expr[1]))
+ obj.memory.decl(stmt.expr[0].name, from)
} else {
- var step = evalExpr(obj, stmt.expr[3]);
var oldValue = obj.memory.get(stmt.expr[0].name);
obj.memory.assign(stmt.expr[0].name, oldValue + step);
}
var left = obj.memory.get(stmt.expr[0].name);
- var right = evalExpr(obj, stmt.expr[2]);
- if (left <= right) {
+ if (left <= to) {
obj.program.prepend([stmt]);
obj.program.prepend(stmt.stmtList);
}
+ }
break;
default:
- var value = evalExpr(obj, stmt.expr);
- if (value) {
+ var value = evalExpr(obj, stmt.expr, "expr");
+ if (!isObject(value) && value) {
obj.program.prepend([stmt]);
obj.program.prepend(stmt.stmtList);
}
| 9 |
diff --git a/userscript.user.js b/userscript.user.js @@ -30249,9 +30249,9 @@ var $$IMU_EXPORT$$;
}
}
- if (domain_nosub === "imgbox.com" && /^[0-9]+[-.]t\./.test(domain) && options.do_request && options.cb) {
+ if (domain_nosub === "imgbox.com" && /^(?:[0-9]+[-.])?t\./.test(domain) && options.do_request && options.cb) {
api_query("imgbox_redirect:" + src, {
- url: src
+ url: src.replace(/^[0-9]+[-.]/, "")
}, options.cb, function(done, resp, cache_key) {
done(resp.finalUrl, 6*60*60);
});
@@ -30261,6 +30261,17 @@ var $$IMU_EXPORT$$;
};
}
+ if (domain_nowww === "imgbox.com") {
+ newsrc = website_query({
+ // no async
+ website_regex: /^[a-z]+:\/\/[^/]+\/+([0-9a-zA-Z]+)(?:[?#].*)?$/,
+ run: function(cb, match) {
+ return cb("https://t.imgbox.com/" + match[1] + ".jpg");
+ }
+ });
+ if (newsrc) return newsrc;
+ }
+
if ((domain_nosub === "steamstatic.com" && domain.match(/cdn\.[^.]*\.steamstatic\.com/)) ||
// https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/2c/2c43030ea4900ebfcd3c42a4e665e9d926b488ef_medium.jpg
// https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/2c/2c43030ea4900ebfcd3c42a4e665e9d926b488ef_full.jpg
| 7 |
diff --git a/src/lambda/handler-runner/HandlerRunner.js b/src/lambda/handler-runner/HandlerRunner.js @@ -39,6 +39,14 @@ export default class HandlerRunner {
debugLog(`Loading handler... (${handlerPath})`)
if (useDocker) {
+ // https://github.com/lambci/docker-lambda/issues/329
+ if (runtime === 'nodejs14.x') {
+ logWarning(
+ '"nodejs14.x" runtime is not supported with docker. See https://github.com/lambci/docker-lambda/issues/329',
+ )
+ throw new Error('Unsupported runtime')
+ }
+
const dockerOptions = {
readOnly: this.#options.dockerReadOnly,
layersDir: this.#options.layersDir,
| 0 |
diff --git a/src/lib.js b/src/lib.js @@ -393,7 +393,7 @@ const potionColors = {
};
// Process items returned by API
-async function _getItems(base64, customTextures = false, packs, cacheOnly = false) {
+async function processItems(base64, customTextures = false, packs, cacheOnly = false) {
// API stores data as base64 encoded gzipped Minecraft NBT data
let buf = Buffer.from(base64, "base64");
@@ -1118,36 +1118,40 @@ export const getItems = async (
// Process inventories returned by API
let armor =
- "inv_armor" in profile ? await _getItems(profile.inv_armor.data, customTextures, packs, options.cacheOnly) : [];
+ "inv_armor" in profile ? await processItems(profile.inv_armor.data, customTextures, packs, options.cacheOnly) : [];
let inventory =
"inv_contents" in profile
- ? await _getItems(profile.inv_contents.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.inv_contents.data, customTextures, packs, options.cacheOnly)
: [];
let wardrobe_inventory =
"wardrobe_contents" in profile
- ? await _getItems(profile.wardrobe_contents.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.wardrobe_contents.data, customTextures, packs, options.cacheOnly)
: [];
let enderchest =
"ender_chest_contents" in profile
- ? await _getItems(profile.ender_chest_contents.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.ender_chest_contents.data, customTextures, packs, options.cacheOnly)
: [];
let talisman_bag =
"talisman_bag" in profile
- ? await _getItems(profile.talisman_bag.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.talisman_bag.data, customTextures, packs, options.cacheOnly)
: [];
let fishing_bag =
- "fishing_bag" in profile ? await _getItems(profile.fishing_bag.data, customTextures, packs, options.cacheOnly) : [];
+ "fishing_bag" in profile
+ ? await processItems(profile.fishing_bag.data, customTextures, packs, options.cacheOnly)
+ : [];
let quiver =
- "quiver" in profile ? await _getItems(profile.quiver.data, customTextures, packs, options.cacheOnly) : [];
+ "quiver" in profile ? await processItems(profile.quiver.data, customTextures, packs, options.cacheOnly) : [];
let potion_bag =
- "potion_bag" in profile ? await _getItems(profile.potion_bag.data, customTextures, packs, options.cacheOnly) : [];
+ "potion_bag" in profile
+ ? await processItems(profile.potion_bag.data, customTextures, packs, options.cacheOnly)
+ : [];
let candy_bag =
"candy_inventory_contents" in profile
- ? await _getItems(profile.candy_inventory_contents.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.candy_inventory_contents.data, customTextures, packs, options.cacheOnly)
: [];
let personal_vault =
"personal_vault_contents" in profile
- ? await _getItems(profile.personal_vault_contents.data, customTextures, packs, options.cacheOnly)
+ ? await processItems(profile.personal_vault_contents.data, customTextures, packs, options.cacheOnly)
: [];
let storage = [];
@@ -1157,8 +1161,13 @@ export const getItems = async (
storage.push({});
if (profile.backpack_contents[slot] && profile.backpack_icons[slot]) {
- const icon = await _getItems(profile.backpack_icons[slot].data, customTextures, packs, options.cacheOnly);
- const items = await _getItems(profile.backpack_contents[slot].data, customTextures, packs, options.cacheOnly);
+ const icon = await processItems(profile.backpack_icons[slot].data, customTextures, packs, options.cacheOnly);
+ const items = await processItems(
+ profile.backpack_contents[slot].data,
+ customTextures,
+ packs,
+ options.cacheOnly
+ );
for (const [index, item] of items.entries()) {
item.isInactive = true;
| 10 |
diff --git a/lib/Chunk.js b/lib/Chunk.js @@ -162,11 +162,11 @@ class Chunk {
});
}
- moveModule(module, other) {
+ moveModule(module, otherChunk) {
module.removeChunk(this);
- module.addChunk(other);
- other.addModule(module);
- module.rewriteChunkInReasons(this, [other]);
+ module.addChunk(otherChunk);
+ otherChunk.addModule(module);
+ module.rewriteChunkInReasons(this, [otherChunk]);
}
integrate(other, reason) {
| 4 |
diff --git a/Source/Core/GroundPolylineGeometry.js b/Source/Core/GroundPolylineGeometry.js @@ -366,16 +366,28 @@ define([
// Split positions across the IDL and the Prime Meridian as well.
// Split across prime meridian because very large geometries crossing the Prime Meridian but not the IDL
// may get split by the plane of IDL + Prime Meridian.
+ var p0;
+ var p1;
+ var intersection;
var splitPositions = [positions[0]];
for (i = 0; i < positionsLength - 1; i++) {
- var p0 = positions[i];
- var p1 = positions[i + 1];
- var intersection = IntersectionTests.lineSegmentPlane(p0, p1, XZ_PLANE, intersectionScratch);
+ p0 = positions[i];
+ p1 = positions[i + 1];
+ intersection = IntersectionTests.lineSegmentPlane(p0, p1, XZ_PLANE, intersectionScratch);
if (defined(intersection)) {
splitPositions.push(Cartesian3.clone(intersection));
}
splitPositions.push(p1);
}
+ // Check if loop also crosses IDL/Prime Meridian
+ if (loop) {
+ p0 = positions[positionsLength - 1];
+ p1 = positions[0];
+ intersection = IntersectionTests.lineSegmentPlane(p0, p1, XZ_PLANE, intersectionScratch);
+ if (defined(intersection)) {
+ splitPositions.push(Cartesian3.clone(intersection));
+ }
+ }
var cartographicsLength = splitPositions.length;
// Squash all cartesians to cartographic coordinates
@@ -510,16 +522,27 @@ define([
var positionCartographicScratch = new Cartographic();
var normalEndpointScratch = new Cartesian3();
- function projectNormal(projection, position, normal, projectedPosition, result) {
+ function projectNormal(projection, position, positionLongitude, normal, projectedPosition, result) {
var normalEndpoint = Cartesian3.add(position, normal, normalEndpointScratch);
+ var flipNormal = false;
var ellipsoid = projection.ellipsoid;
var normalEndpointCartographic = ellipsoid.cartesianToCartographic(normalEndpoint, positionCartographicScratch);
+ // If normal crosses the IDL, go the other way and flip the result
+ if (Math.abs(positionLongitude - normalEndpointCartographic.longitude) > CesiumMath.PI_OVER_TWO) {
+ flipNormal = true;
+ normalEndpoint = Cartesian3.subtract(position, normal, normalEndpointScratch);
+ normalEndpointCartographic = ellipsoid.cartesianToCartographic(normalEndpoint, positionCartographicScratch);
+ }
+
normalEndpointCartographic.height = 0.0;
var normalEndpointProjected = projection.project(normalEndpointCartographic, result);
result = Cartesian3.subtract(normalEndpointProjected, projectedPosition, result);
result.z = 0.0;
result = Cartesian3.normalize(result, result);
+ if (flipNormal) {
+ Cartesian3.multiplyByScalar(result, -1.0, result);
+ }
return result;
}
@@ -695,7 +718,7 @@ define([
endCartographic.latitude = cartographicsArray[0];
endCartographic.longitude = cartographicsArray[1];
var end2D = projection.project(endCartographic, segmentEnd2DScratch);
- var endGeometryNormal2D = projectNormal(projection, endBottom, endGeometryNormal, end2D, segmentEndNormal2DScratch);
+ var endGeometryNormal2D = projectNormal(projection, endBottom, endCartographic.longitude, endGeometryNormal, end2D, segmentEndNormal2DScratch);
var lengthSoFar3D = 0.0;
var lengthSoFar2D = 0.0;
@@ -725,7 +748,7 @@ define([
endCartographic.latitude = cartographicsArray[cartographicsIndex];
endCartographic.longitude = cartographicsArray[cartographicsIndex + 1];
end2D = projection.project(endCartographic, segmentEnd2DScratch);
- endGeometryNormal2D = projectNormal(projection, endBottom, endGeometryNormal, end2D, segmentEndNormal2DScratch);
+ endGeometryNormal2D = projectNormal(projection, endBottom, endCartographic.longitude, endGeometryNormal, end2D, segmentEndNormal2DScratch);
/****************************************
* Geometry descriptors of a "line on terrain,"
@@ -787,7 +810,7 @@ define([
var wIndex = vec4Index + 3;
// Encode sidedness of vertex in texture coordinate normalization X
- var sidedness = j < 3 ? 1.0 : -1.0;
+ var sidedness = j < 4 ? 1.0 : -1.0;
// 3D
Cartesian3.pack(encodedStart.high, startHi_and_forwardOffsetX, vec4Index);
| 9 |
diff --git a/execute_awsbinary.go b/execute_awsbinary.go @@ -90,6 +90,9 @@ func tappedHandler(handlerSymbol interface{},
// TODO - add Context.Timeout handler to ensure orderly exit
return func(ctx context.Context, msg json.RawMessage) (interface{}, error) {
+
+ // TODO - add panic handler.
+
ctx = applyInterceptors(ctx, msg, interceptors.Begin)
ctx = context.WithValue(ctx, ContextKeyLogger, logger)
ctx = applyInterceptors(ctx, msg, interceptors.BeforeSetup)
| 0 |
diff --git a/src/lib/analytics/AnalyticsClass.js b/src/lib/analytics/AnalyticsClass.js @@ -16,10 +16,9 @@ import {
toLower,
values,
} from 'lodash'
-import { Platform } from 'react-native'
import { cloneErrorObject, ExceptionCategory } from '../logger/exceptions'
-import { osVersion } from '../utils/platform'
+import { isWeb, osVersion } from '../utils/platform'
import { ANALYTICS_EVENT, ERROR_LOG } from './constants'
export class AnalyticsClass {
@@ -70,28 +69,25 @@ export class AnalyticsClass {
}
if (isSentryEnabled) {
- const release = `${version}-${Platform.OS}`
-
- logger.info('initializing Sentry:', {
+ const sentryOptions = {
dsn: sentryDSN,
environment: env,
- release,
- version,
- network,
+ }
+
+ const sentryScope = {
+ appVersion: version,
+ networkUsed: network,
phase,
- })
+ }
- sentry.init({
- dsn: sentryDSN,
- environment: env,
- release,
- })
+ if (isWeb) {
+ sentryOptions.release = `${version}+web`
+ }
- sentry.configureScope(scope => {
- scope.setTag('appVersion', version)
- scope.setTag('networkUsed', network)
- scope.setTag('phase', phase)
- })
+ logger.info('initializing Sentry:', { sentryOptions, sentryScope })
+
+ sentry.init(sentryOptions)
+ sentry.configureScope(scope => forIn(sentryScope, (value, property) => scope.setTag(property, value)))
}
logger.debug('available analytics:', {
| 0 |
diff --git a/docs/providers/aws/guide/iam.md b/docs/providers/aws/guide/iam.md @@ -169,7 +169,14 @@ resources:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- Resource: arn:aws:logs:${region}:${accountId}:log-group:/aws/lambda/*:*:*
+ Resource:
+ - 'Fn::Join':
+ - ':'
+ -
+ - 'arn:aws:logs'
+ - Ref: 'AWS::Region'
+ - Ref: 'AWS::AccountId'
+ - 'log-group:/aws/lambda/*:*:*'
- Effect: Allow
Action:
- ec2:CreateNetworkInterface
@@ -200,7 +207,14 @@ resources:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- Resource: arn:aws:logs:${region}:${accountId}:log-group:/aws/lambda/*:*:*
+ Resource:
+ - 'Fn::Join':
+ - ':'
+ -
+ - 'arn:aws:logs'
+ - Ref: 'AWS::Region'
+ - Ref: 'AWS::AccountId'
+ - 'log-group:/aws/lambda/*:*:*'
- Effect: "Allow"
Action:
- "s3:PutObject"
@@ -252,7 +266,14 @@ resources:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- Resource: arn:aws:logs:${region}:${accountId}:log-group:/aws/lambda/*:*:*
+ Resource:
+ - 'Fn::Join':
+ - ':'
+ -
+ - 'arn:aws:logs'
+ - Ref: 'AWS::Region'
+ - Ref: 'AWS::AccountId'
+ - 'log-group:/aws/lambda/*:*:*'
- Effect: "Allow"
Action:
- "s3:PutObject"
@@ -284,7 +305,14 @@ resources:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- Resource: arn:aws:logs:${region}:${accountId}:log-group:/aws/lambda/*:*:*
+ Resource:
+ - 'Fn::Join':
+ - ':'
+ -
+ - 'arn:aws:logs'
+ - Ref: 'AWS::Region'
+ - Ref: 'AWS::AccountId'
+ - 'log-group:/aws/lambda/*:*:*'
- Effect: Allow
Action:
- ec2:CreateNetworkInterface
| 1 |
diff --git a/plugins/plugin-webpack/plugin.js b/plugins/plugin-webpack/plugin.js @@ -240,6 +240,7 @@ module.exports = function plugin(config, args) {
},
{
test: /\.css$/,
+ exclude: /\.module\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
@@ -249,6 +250,20 @@ module.exports = function plugin(config, args) {
},
],
},
+ {
+ test: /\.module\.css$/,
+ use: [
+ {
+ loader: MiniCssExtractPlugin.loader,
+ },
+ {
+ loader: "css-loader",
+ options: {
+ modules: true
+ }
+ },
+ ],
+ },
{
test: /.*/,
exclude: [/\.js?$/, /\.json?$/, /\.css$/],
| 0 |
diff --git a/client/src/templates/layouts/NavigationLayout.js b/client/src/templates/layouts/NavigationLayout.js @@ -285,13 +285,13 @@ const NavigationLayout = (props) => {
}
};
- const submitFeedbackForm = async () => {
+ const submitFeedbackForm = async (user) => {
feedbackFormDispatch({ type: FEEDBACK_FORM_SUBMIT });
try {
await axios.post("/api/feedback", {
rating,
age,
- userId: 5,
+ userId: user.id,
covidImpact,
generalFeedback,
mostValuableFeature,
| 14 |
diff --git a/test/TemplateRenderHandlebarsTest.js b/test/TemplateRenderHandlebarsTest.js @@ -152,6 +152,23 @@ test("Handlebars Render Paired Shortcode", async t => {
t.is(await fn({ name: "Howdy" }), "<p>This is a TESTINGHOWDY.</p>");
});
+test("Handlebars Render Paired Shortcode (HTML)", async t => {
+ let tr = new TemplateRender("hbs");
+ tr.engine.addPairedShortcodes({
+ shortcodename3html: function(content, name, options) {
+ return `<span>${(content + name).toUpperCase()}</span>`;
+ }
+ });
+
+ let fn = await tr.getCompiledTemplate(
+ "<p>This is a {{#shortcodename3html name}}<span>Testing</span>{{/shortcodename3html}}.</p>"
+ );
+ t.is(
+ await fn({ name: "Howdy" }),
+ "<p>This is a <span><SPAN>TESTING</SPAN>HOWDY</span>.</p>"
+ );
+});
+
test("Handlebars Render Paired Shortcode (Spaces)", async t => {
let tr = new TemplateRender("hbs");
tr.engine.addPairedShortcodes({
| 0 |
diff --git a/layouts/partials/helpers/text-color.html b/layouts/partials/helpers/text-color.html {{- $bg := .self.Scratch.Get "bg" }}
-{{ printf "-- logging -- overwrite %s -- bg %s -- light %s -- dark %s -- end of logging --" .overwrite $bg .light .dark }}
{{- $text_muted := cond (.muted | default false) "text-muted " "" -}}
{{- $text_dark := cond (isset . "dark") (cond (eq .dark "") "" (printf "text-%s" .dark)) "text-dark" -}}
{{- $text_light := cond (isset . "light") (cond (eq .light "") "" (printf "text-%s" .light)) "text-light" -}}
| 2 |
diff --git a/token-metadata/0x6251E725CD45Fb1AF99354035a414A2C0890B929/metadata.json b/token-metadata/0x6251E725CD45Fb1AF99354035a414A2C0890B929/metadata.json "symbol": "MXT",
"address": "0x6251E725CD45Fb1AF99354035a414A2C0890B929",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/assets/javascripts/new-dashboard/i18n/locales/en.json b/lib/assets/javascripts/new-dashboard/i18n/locales/en.json }
},
"DBConnection": {
- "description_fl": "To connect to CARTO's database from third-party tools, you first need to add the IP address you are connecting from and then generate a certificate to secure your connection.",
+ "description_fl": "To connect to CARTO's database from third-party tools, you first need to add the IP address you are connecting from and then optionally generate a certificate to add extra security to your connection.",
"description_sl": "You can read more about this in our <a href='https://carto.com/help/working-with-data/direct-sql-connection/' target='_blank' rel='noopener noreferrer'>help center</a>.",
"ipsSection": {
"title": "1. Your IPs",
| 7 |
diff --git a/src/geo/geocoder/tomtom-geocoder.js b/src/geo/geocoder/tomtom-geocoder.js var ENDPOINT = 'https://api.tomtom.com/search/2/search/{{address}}.json?key={{apiKey}}';
var TYPES = {
- 'POI': 'venue',
- 'Street': 'neighbourhood',
'Geography': 'region',
- 'Point Address': 'address',
+ 'Geography:Country': 'country',
+ 'Geography:CountrySubdivision': 'region',
+ 'Geography:CountrySecondarySubdivision': 'region',
+ 'Geography:CountryTertiarySubdivision': 'region',
+ 'Geography:Municipality': 'localadmin',
+ 'Geography:MunicipalitySubdivision': 'locality',
+ 'Geography:Neighbourhood': 'neighbourhood',
+ 'Geography:PostalCodeArea': 'postal-area',
+ 'Street': 'neighbourhood',
'Address Range': 'neighbourhood',
- 'Cross Street': 'address'
+ 'Point Address': 'address',
+ 'Cross Street': 'address',
+ 'POI': 'venue'
};
function TomTomGeocoder () { }
@@ -55,9 +63,14 @@ function _getCenter (result) {
* Transform the feature type into a well known enum.
*/
function _getType (result) {
- if (TYPES[result.type]) {
- return TYPES[result.type];
+ let type = result.type;
+ if (TYPES[type]) {
+ if (type === 'Geography' && result.entityType) {
+ type = type + ':' + result.entityType;
+ }
+ return TYPES[type];
}
+
return 'default';
}
| 7 |
diff --git a/src/Model.js b/src/Model.js @@ -38,7 +38,7 @@ const ReadWriteMigrations = {
}
const TransactOps = { delete: 'Delete', put: 'Put', update: 'Update' }
const BatchOps = { delete: 'DeleteRequest', put: 'PutRequest', update: 'PutRequest' }
-const SanityPages = 100
+const SanityPages = 1000
/*
DynamoDB model entity class
@@ -216,8 +216,11 @@ export default class Model {
}
if (limit) {
limit -= items.length
+ if (limit <= 0) {
+ break
+ }
}
- } while (result.LastEvaulatedKey && pages++ < SanityPages && limit > 0)
+ } while (result.LastEvaluatedKey && (limit == null || pages++ < SanityPages))
if (params.parse) {
items = this.parseResponse(op, expression, items)
@@ -242,6 +245,10 @@ export default class Model {
let properties = expression.properties
items.next = async () => {
params = Object.assign({}, params, {start: result.LastEvaluatedKey})
+ if (!params.high) {
+ if (op == 'find') op = 'queryItems'
+ else if (op == 'scan') op = 'scanItems'
+ }
return await this[op](properties, params)
}
}
| 1 |
diff --git a/layouts/partials/fragments/stripe.html b/layouts/partials/fragments/stripe.html </div>
{{- end }}
</div>
- <div class="row should-fade justify-content-between pr-3">
+ <div class="row should-fade justify-content-between pr-3
+ {{- if and (eq (len ($.Params.prices | default slice)) 1) (not (isset .Params "user_input")) -}}
+ {{- print " hidden" -}}
+ {{- end -}}">
<div class="col-12 col-sm-auto d-flex flex-column justify-content-center mb-2 pr-0">
<div class="row mx-0 align-items-center">
<div class="col-12 col-sm-auto px-0 mr-2 mb-2">
| 2 |
diff --git a/karma.conf.js b/karma.conf.js @@ -72,6 +72,13 @@ const baseConfig = {
mochaReporter: {
showDiff: true
},
+ customHeaders: [
+ {
+ match: '.*.html',
+ name: 'Content-Security-Policy',
+ value: "script-src https: 'self' 'unsafe-inline'"
+ }
+ ],
customLaunchers: {
ChromeDebug: {
base: 'Chrome',
| 12 |
diff --git a/README.md b/README.md @@ -11,9 +11,6 @@ We are not affiliated with ProtonMail team. All copyrights belong to their respe
#### Background behaviour
When closing the window, the app will continue running in the background. On OSX, app will be available in the dock and on WIN & Linux (depends on distro) in the tray. Right-click the dock/tray icon and choose Quit to completely quit the app. On OS X, click the dock icon to show the window. On Linux, right-click the tray icon and choose Toggle to toggle the window. On Windows, click the tray icon to toggle the window.
-#### Dark mode
-You can toggle dark mode in the application menu or with <kbd>Cmd</kbd> <kbd>D</kbd> / <kbd>Ctrl</kbd> <kbd>D</kbd>.
-
#### Native Notifications
Native notifications are working for all OS, you will get a notification when you receive a new email and window is not focused (i.e. app minimized).
| 2 |
diff --git a/src/MUIDataTable.js b/src/MUIDataTable.js @@ -890,9 +890,9 @@ class MUIDataTable extends React.Component {
for (let i = 0; i < sortedData.length; i++) {
const row = sortedData[i];
- tableData.push({ index: row.position, data: row.rowData });
+ tableData.push(data[row.position]);
if (row.rowSelected) {
- selectedRows.push({ index: i, dataIndex: sortedData[row.position].index });
+ selectedRows.push({ index: i, dataIndex: data[row.position].index });
}
}
| 13 |
diff --git a/token-metadata/0xF0FAC7104aAC544e4a7CE1A55ADF2B5a25c65bD1/metadata.json b/token-metadata/0xF0FAC7104aAC544e4a7CE1A55ADF2B5a25c65bD1/metadata.json "symbol": "PAMP",
"address": "0xF0FAC7104aAC544e4a7CE1A55ADF2B5a25c65bD1",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/shared/scss/_tracker-network-icons.scss b/shared/scss/_tracker-network-icons.scss /* Tracker Network Icons */
$icons: ("adobe", "adtech", "amazon", "aol", "appnexus", "chartbeat", "comscore", "facebook", "fox", "generic", "google", "mixpanel", "moat", "nielsen", "outbrain", "quantcast", "taboola", "twitter", "yahoo", "yandex");
-$grey-icons: ("adobe", "adtech", "amazon", "aol", "appnexus", "casale", "chartbeat", "comscore", "criteo", "facebook", "fox", "google", "mixpanel", "moat", "newrelic", "nielsen", "openx", "outbrain", "quantcast", "salesforce", "taboola", "twitter", "yahoo", "yandex");
+$subview-icons: ("adobe", "adtech", "amazon", "aol", "appnexus", "casale", "chartbeat", "comscore", "criteo", "facebook", "fox", "google", "mixpanel", "moat", "newrelic", "nielsen", "openx", "outbrain", "quantcast", "salesforce", "taboola", "twitter", "yahoo", "yandex");
@mixin tracker_network_icons () {
@@ -18,7 +18,7 @@ $grey-icons: ("adobe", "adtech", "amazon", "aol", "appnexus", "casale", "chartbe
@mixin tracker_network_icons_subview () {
- @each $name in $grey-icons {
+ @each $name in $subview-icons {
&.#{$name} {
// trackers subview
.is-browser--chrome & {
| 10 |
diff --git a/src/editor.js b/src/editor.js @@ -403,18 +403,20 @@ JSONEditor.AbstractEditor = Class.extend({
},
updateHeaderText: function() {
if(this.header) {
+ var header_text = this.getHeaderText();
// If the header has children, only update the text node's value
if(this.header.children.length) {
for(var i=0; i<this.header.childNodes.length; i++) {
if(this.header.childNodes[i].nodeType===3) {
- this.header.childNodes[i].nodeValue = this.getHeaderText();
+ this.header.childNodes[i].nodeValue = this.cleanText(header_text);
break;
}
}
}
// Otherwise, just update the entire node
else {
- this.header.textContent = this.getHeaderText();
+ if (window.DOMPurify) this.header.innerHTML = window.DOMPurify.sanitize(header_text);
+ else this.header.textContent = this.cleanText(header_text);
}
}
},
@@ -423,6 +425,12 @@ JSONEditor.AbstractEditor = Class.extend({
else if(title_only) return this.schema.title;
else return this.getTitle();
},
+ cleanText: function(txt) {
+ // Clean out HTML tags from txt
+ var tmp = document.createElement('div');
+ tmp.innerHTML = txt;
+ return (tmp.textContent || tmp.innerText);
+ },
onWatchedFieldChange: function() {
var vars;
if(this.header_template) {
| 11 |
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml @@ -9,6 +9,9 @@ on:
branches:
- '**'
+env:
+ CI: true
+
jobs:
lint:
name: Lint on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
@@ -67,11 +70,11 @@ jobs:
# Workaround until https://github.com/stylelint/stylelint/issues/4337 is fixed
- name: Test (Windows)
if: matrix.os == 'windows-latest'
- run: cd .. && cd D:\a\stylelint\stylelint && npm run jest -- --ci
+ run: cd .. && cd D:\a\stylelint\stylelint && npm run jest
- name: Test (Unix)
if: matrix.os != 'windows-latest'
- run: npm run jest -- --ci
+ run: npm run jest
coverage:
name: Coverage on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
@@ -98,7 +101,7 @@ jobs:
run: npm ci
- name: Test with coverage
- run: npm run jest -- --coverage --ci
+ run: npm run jest -- --coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
| 12 |
diff --git a/docs/release.md b/docs/release.md ### Manual release
-1. **Choose one**: `npm run release-patch` or `npm run release-minor`. This script pulls from upstream, bumps the version, commits changes, and publishes tags to your `upstream` repository (that is this repo).
+1. **Choose one**: `npm run release:patch` or `npm run release:minor`. This script pulls from upstream, bumps the version, commits changes, and publishes tags to your `upstream` repository (that is this repo).
1. Copy and paste your release notes into the [Github Draft Release UI](https://github.com/salesforce-ux/design-system-react/releases) and publish.
## Update documentation site
1. Create environment variable, `ORIGIN` and set to `[[email protected]:[your username]/design-system-react.git]`
1. Create environment variable, `GIT_SSH_KEY` and set to a user's private key (base64 encoded) that has access to your repository. `openssl base64 < [PRIVATE_KEY_FILENAME] | tr -d '\n' | pbcopy`
-_If you are timid about releasing or need your pull request in review "pre-released," you can publish to origin (your fork) with `npm run publish-to-git` and then test and review the tag on your fork. This is just the publish step though, any other tasks you will need to do manually to test publishing._
+_If you are timid about releasing or need your pull request in review "pre-released," you can publish to origin (your fork) with `npm run publish:git` and then test and review the tag on your fork. This is just the publish step though, any other tasks you will need to do manually to test publishing._
| 3 |
diff --git a/src/dots.js b/src/dots.js @@ -27,7 +27,9 @@ export class Dots extends React.Component {
var dotCount = getDotCount({
slideCount: this.props.slideCount,
- slidesToScroll: this.props.slidesToScroll
+ slidesToScroll: this.props.slidesToScroll,
+ slidesToShow: this.props.slidesToShow,
+ infinite: this.props.infinite
});
// Apply join & split to Array to pre-fill it for IE8
| 0 |
diff --git a/packages/app/src/server/service/page.ts b/packages/app/src/server/service/page.ts @@ -1107,7 +1107,6 @@ class PageService {
try {
await Page.bulkWrite(deletePageOperations);
- await PageRedirect.bulkWrite(insertPageRedirectOperations);
}
catch (err) {
if (err.code !== 11000) {
@@ -1117,6 +1116,15 @@ class PageService {
finally {
this.pageEvent.emit('syncDescendantsDelete', pages, user);
}
+
+ try {
+ await PageRedirect.bulkWrite(insertPageRedirectOperations);
+ }
+ catch (err) {
+ if (err.code !== 11000) {
+ throw Error(`Failed to create PageRedirect documents: ${err}`);
+ }
+ }
}
/**
| 7 |
diff --git a/test/integration/offline.js b/test/integration/offline.js @@ -135,6 +135,7 @@ describe('Offline', () => {
offline.inject({
method: 'GET',
url: '/fn3',
+ headers: { 'x-api-key': validToken },
}, res => {
expect(res.statusCode).to.eq(200);
done();
| 0 |
diff --git a/assets/js/components/user-input/UserInputQuestionnaire.js b/assets/js/components/user-input/UserInputQuestionnaire.js @@ -48,11 +48,14 @@ export default function UserInputQuestionnaire() {
setActiveSlug( questions[ activeSlugIndex + 1 ] );
}, [ activeSlugIndex ] );
- const back = useCallback( ( steps = 1 ) => {
+ const goTo = useCallback( ( steps = 1 ) => {
+ global.console.log( steps );
setActiveSlug( questions[ activeSlugIndex - steps ] );
global.scrollTo( 0, 0 );
}, [ activeSlugIndex ] );
+ const back = goTo.bind( null, 1 );
+
return (
<Fragment>
<ProgressBar
@@ -161,7 +164,7 @@ export default function UserInputQuestionnaire() {
) }
{ activeSlug === 'preview' && (
- <UserInputPreview back={ back } />
+ <UserInputPreview goTo={ goTo } />
) }
</Fragment>
);
| 1 |
diff --git a/articles/extensions/index.md b/articles/extensions/index.md @@ -32,6 +32,9 @@ Auth0 provides the following pre-defined extensions, and they are available for
- [Auth0 Management API Webhooks](/extensions/management-api-webhooks)
- [Auth0 Authentication API Webhooks](/extensions/authentication-api-webhooks)
+### Test various endpoints of the Auth0 Authentication API
+- [Authentication API Debugger Extension](/extensions/authentication-api-debugger)
+
### Monitor your AD/LDAP connectors
- [Auth0 AD/LDAP Connector Health Monitor](/extensions/adldap-connector)
| 0 |
diff --git a/js/webcomponents/bisweb_regressiontestelement.js b/js/webcomponents/bisweb_regressiontestelement.js @@ -291,7 +291,7 @@ var run_tests=async function(testlist,firsttest=0,lasttest=-1,testname='All',use
window.BISELECTRON.remote.getCurrentWindow().openDevTools();
}
- console.clear();
+// console.clear();
if (firsttest<0)
firsttest=0;
@@ -306,6 +306,7 @@ var run_tests=async function(testlist,firsttest=0,lasttest=-1,testname='All',use
main.append(`Executing tests ${firsttest}:${lasttest} (Max index=${testlist.length-1}).`);
if (testname!=="All")
main.append(`Only runnng tests with name=${testname}<HR>`);
+
} else {
main.append('<H3>Listing Tests</H3><HR>');
}
@@ -385,12 +386,28 @@ var run_tests=async function(testlist,firsttest=0,lasttest=-1,testname='All',use
if (testname!=="None") {
main.append('<BR><BR><H3>All Tests Finished</H3>');
main.append(`.... total test execution time=${(0.001*(t11 - t00)).toFixed(2)}s`);
+
+ let t=0;
+ if (usethread)
+ t=1;
+
+ let url=window.document.URL;
+ let index=url.indexOf('.html');
+ if (index>=0)
+ url=url.substr(0,index+5);
+
+ let link=`${url}?first=${firsttest}&last=${lasttest}&testname=${testname}&webworker=${t}&run=1`;
+ main.append(`<BR><p>To run this specific test directly click:<BR> <a href="${link}" target="_blank">${link}</a></p>`);
+
window.scrollTo(0,document.body.scrollHeight-100);
if (!usethread) {
+ try {
biswrap.get_module()._print_memory();
+ } catch(e) {
+ // sometimes we have pure js modules, no wasm
+ }
}
-
} else {
main.append(`<BR> <BR> <BR>`);
window.scrollTo(0,0);
@@ -426,17 +443,39 @@ let initialize=function(data) {
select.append($(`<option value="${names[i]}">${names[i]}</option>`));
}
+ // http://localhost:8080/web/biswebtest.html?last=77&testname=cropImage&webworker=0
+
let firsttest=parseInt(webutil.getQueryParameter('first')) || 0;
if (firsttest<0)
firsttest=0;
+ else if (firsttest>testlist.length-1)
+ firsttest=testlist.length-1;
+ console.log('Firsttest=',firsttest);
let lasttest=parseInt(webutil.getQueryParameter('last') || 0);
if (lasttest === undefined || lasttest<=0 || lasttest>=testlist.length)
lasttest=testlist.length-1;
+ let testname=webutil.getQueryParameter('testname') || 'None';
+ if (testname !== 'None' && testname !=='All') {
+ if (names.indexOf(testname)<0)
+ testname='None';
+ }
+
+ let usethread=parseInt(webutil.getQueryParameter('webworker') || 0);
+ let dorun=parseInt(webutil.getQueryParameter('run') || 0);
+
+ if (usethread)
+ usethread=true;
+ else
+ usethread=false;
+
+
+
$('#first').val(firsttest);
$('#last').val(lasttest);
- $('#testselect').val('None');
+ $('#testselect').val(testname);
+ $('#usethread').prop("checked", usethread);
var fixRange=function(targetname) {
@@ -467,14 +506,23 @@ let initialize=function(data) {
let testname=$('#testselect').val() || 'All';
let usethread= $('#usethread').is(":checked") || false;
+
+
if (last===undefined)
last=testlist.length-1;
+
+
+
run_tests(testlist,first,last,testname,usethread);
});
$('#compute').click(fn);
+ if (dorun) {
+ run_tests(testlist,firsttest,lasttest,testname,usethread);
+ }
+
};
var startFunction = (() => {
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.