Comparing version 0.5.0 to 0.5.1
16
app.js
@@ -14,2 +14,3 @@ "use strict"; | ||
const types_1 = require("./types"); | ||
const packageDefinition = require('./package.json'); | ||
require("./site.less"); | ||
@@ -25,4 +26,4 @@ const buildTimestamp = __WEBPACK_TIMESTAMP__; | ||
*/ | ||
if (!document.hidden) { | ||
var date = new Date(); | ||
if (!document.hidden) { // same as document.visibilityState === 'visible' ? | ||
const date = new Date(); | ||
store.dispatch({ type: types_1.OperationType.SET_NOW, date }); | ||
@@ -50,4 +51,11 @@ } | ||
React.createElement("footer", null, | ||
React.createElement("div", { className: "now-timestamp" }, now.toISOString()), | ||
React.createElement("div", { className: "build-timestamp" }, buildTimestamp)))); | ||
React.createElement("div", { className: "important" }, | ||
"Now: ", | ||
now.toISOString()), | ||
React.createElement("div", null, | ||
"Built: ", | ||
buildTimestamp), | ||
React.createElement("div", null, | ||
"Version: ", | ||
packageDefinition.version)))); | ||
} | ||
@@ -54,0 +62,0 @@ } |
@@ -11,2 +11,3 @@ "use strict"; | ||
const React = require("react"); | ||
const PropTypes = require("prop-types"); | ||
const tarry_1 = require("tarry"); | ||
@@ -17,7 +18,7 @@ const react_redux_1 = require("react-redux"); | ||
/** | ||
@returns {number} A mixture of day-granularity timestamp (meaning, it will repeat from | ||
A mixture of day-granularity timestamp (meaning, it will repeat from | ||
one day to the next) and randomness, but still considerably smaller than the | ||
maximum safe integer. It will be positive. | ||
P.S. const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; | ||
P.S. const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991 | ||
*/ | ||
@@ -47,7 +48,7 @@ function randInt() { | ||
} while (cursor.isBefore(end)); | ||
// range.push(end.clone()); | ||
// range.push(end.clone()) | ||
return range; | ||
} | ||
function fetchActions({ start, end }) { | ||
let url = `${types_1.metry_host}/actions?start=${start.toISOString()}&end=${end.toISOString()}`; | ||
const url = `${types_1.metry_host}/actions?start=${start.toISOString()}&end=${end.toISOString()}`; | ||
return fetch(url).then(res => res.json()) | ||
@@ -71,8 +72,6 @@ .then((actions_json) => actions_json.map(types_1.raiseAction)); | ||
// if it was a temporary action, delete the temporary one | ||
let deletes = (action.action_id < 0) ? [{ action_id: action.action_id, deleted: new Date() }] : []; | ||
const deletes = (action.action_id < 0) ? [{ action_id: action.action_id, deleted: new Date() }] : []; | ||
return [...deletes, syncedAction]; | ||
}); | ||
}) | ||
// TypeScript can't handle the formulation without the explicit function, i.e., .then(flatten) | ||
).then(actionss => tarry_1.flatten(actionss)); | ||
})).then(tarry_1.flatten); | ||
} | ||
@@ -124,5 +123,5 @@ /** | ||
ActionSpan.propTypes = { | ||
action_id: React.PropTypes.number.isRequired, | ||
local: React.PropTypes.bool, | ||
dispatch: React.PropTypes.func.isRequired, | ||
action_id: PropTypes.number.isRequired, | ||
local: PropTypes.bool, | ||
dispatch: PropTypes.func.isRequired, | ||
}; | ||
@@ -151,7 +150,7 @@ __decorate([ | ||
ActiontypeCell.propTypes = { | ||
actiontype_id: React.PropTypes.number.isRequired, | ||
actions: React.PropTypes.array.isRequired, | ||
className: React.PropTypes.string, | ||
dispatch: React.PropTypes.func.isRequired, | ||
instant: React.PropTypes.object.isRequired, | ||
actiontype_id: PropTypes.number.isRequired, | ||
actions: PropTypes.array.isRequired, | ||
className: PropTypes.string, | ||
dispatch: PropTypes.func.isRequired, | ||
instant: PropTypes.object.isRequired, | ||
}; | ||
@@ -185,9 +184,9 @@ __decorate([ | ||
ActiontypeRow.propTypes = { | ||
actiontype: React.PropTypes.object.isRequired, | ||
actions: React.PropTypes.array.isRequired, | ||
highlighted_moment: React.PropTypes.object.isRequired, | ||
columns: React.PropTypes.arrayOf(React.PropTypes.shape({ | ||
start: React.PropTypes.object.isRequired, | ||
middle: React.PropTypes.object.isRequired, | ||
end: React.PropTypes.object.isRequired, | ||
actiontype: PropTypes.object.isRequired, | ||
actions: PropTypes.array.isRequired, | ||
highlighted_moment: PropTypes.object.isRequired, | ||
columns: PropTypes.arrayOf(PropTypes.shape({ | ||
start: PropTypes.object.isRequired, | ||
middle: PropTypes.object.isRequired, | ||
end: PropTypes.object.isRequired, | ||
})).isRequired, | ||
@@ -197,3 +196,3 @@ }; | ||
componentDidMount() { | ||
let { start, end } = this.props; | ||
const { start, end } = this.props; | ||
Promise.all([fetchActions({ start, end }), fetchActiontypes()]) | ||
@@ -210,3 +209,3 @@ .then(([actions, actiontypes]) => { | ||
// get input name | ||
const input = this.refs['actiontypeName']; | ||
const input = this.refs.actiontypeName; | ||
const name = input.value; | ||
@@ -235,3 +234,3 @@ const actiontypes = [{ name }]; | ||
// const actions = this.props.actions.filter(action => | ||
// start.isBefore(action.started) && end.isAfter(action.ended)); | ||
// start.isBefore(action.started) && end.isAfter(action.ended)) | ||
// and group them by actiontype_id | ||
@@ -275,4 +274,4 @@ const highlighted_moment = moment(now); | ||
MetricsTable.propTypes = { | ||
start: React.PropTypes.object.isRequired, | ||
end: React.PropTypes.object.isRequired, | ||
start: PropTypes.object.isRequired, | ||
end: PropTypes.object.isRequired, | ||
}; | ||
@@ -279,0 +278,0 @@ __decorate([ |
@@ -1,1 +0,1 @@ | ||
declare const __WEBPACK_TIMESTAMP__: string; | ||
declare const __WEBPACK_TIMESTAMP__: string |
{ | ||
"name": "biometry", | ||
"description": "Biometry user interface", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"keywords": [ | ||
@@ -16,31 +16,27 @@ "biometrics" | ||
"dependencies": { | ||
"history": "2.1.1", | ||
"moment": "2.17.1", | ||
"react": "15.4.1", | ||
"react-dom": "15.4.1", | ||
"react-redux": "4.4.5", | ||
"redux": "3.5.2", | ||
"moment": "^2.22.1", | ||
"prop-types": "^15.6.1", | ||
"react": "^16.3.2", | ||
"react-dom": "^16.3.2", | ||
"react-redux": "^5.0.7", | ||
"redux": "^4.0.0", | ||
"tarry": "0.3.4" | ||
}, | ||
"devDependencies": { | ||
"@types/history": "2.0.49", | ||
"@types/node": "latest", | ||
"@types/react": "15.6.7", | ||
"@types/react-dom": "15.5.6", | ||
"@types/react-redux": "5.0.14", | ||
"@types/redux": "3.6.31", | ||
"babel-core": "6.21.0", | ||
"babel-loader": "6.2.10", | ||
"babel-plugin-react-transform": "2.0.2", | ||
"@types/node": "^9.6.7", | ||
"@types/prop-types": "^15.5.2", | ||
"@types/react": "^16.3.13", | ||
"@types/react-dom": "^16.0.5", | ||
"@types/react-redux": "^5.0.19", | ||
"ajv": "^6.4.0", | ||
"babel-core": "^6.26.3", | ||
"babel-loader": "^7.1.4", | ||
"babel-preset-env": "^1.6.1", | ||
"css-loader": "0.26.1", | ||
"express": "4.14.0", | ||
"less": "2.7.1", | ||
"less-loader": "2.2.3", | ||
"react-transform-hmr": "1.0.4", | ||
"style-loader": "0.19.0", | ||
"typescript": "^2.6.1", | ||
"webpack": "1.14.0", | ||
"webpack-dev-middleware": "1.9.0", | ||
"webpack-hot-middleware": "2.14.0" | ||
"css-loader": "^0.28.9", | ||
"less": "^3.0.2", | ||
"less-loader": "^4.0.5", | ||
"style-loader": "^0.21.0", | ||
"typescript": "^2.8.3", | ||
"webpack": "^4.6.0", | ||
"webpack-cli": "^2.0.15" | ||
}, | ||
@@ -50,5 +46,5 @@ "scripts": { | ||
"prepack": "NODE_ENV=production webpack --config webpack.config.js", | ||
"start": "PORT=8248 node webpack-dev-server.js & tsc --watch & wait", | ||
"start": "tsc --watch & webpack --config webpack.config.js --watch", | ||
"clean": "tsc --listEmittedFiles | sed 's/^TSFILE: //' | xargs rm -v build/bundle.js" | ||
} | ||
} |
@@ -13,3 +13,3 @@ "use strict"; | ||
// remove any existing actions that have the same action_id | ||
var filtered_actions = actions.filter(action => action.action_id !== new_action.action_id); | ||
const filtered_actions = actions.filter(action => action.action_id !== new_action.action_id); | ||
// deleted might be null if it comes from the database, or undefined if from the app | ||
@@ -49,5 +49,5 @@ if (!new_action.deleted) { | ||
const defaultConfiguration = { | ||
daysPast: parseInt(localStorage['daysPast'] || '14', 10), | ||
sortAlphabetically: localStorage['sortAlphabetically'] === 'true', | ||
excludeEmpty: localStorage['excludeEmpty'] === 'true', | ||
daysPast: parseInt(localStorage.daysPast || '14', 10), | ||
sortAlphabetically: localStorage.sortAlphabetically === 'true', | ||
excludeEmpty: localStorage.excludeEmpty === 'true', | ||
}; | ||
@@ -54,0 +54,0 @@ function configuration(configuration = defaultConfiguration, operation) { |
@@ -12,10 +12,9 @@ "use strict"; | ||
configurable: true, | ||
writable: true | ||
writable: true, | ||
}); | ||
return value; | ||
} | ||
}, | ||
}; | ||
} | ||
exports.bind = bind; | ||
; | ||
exports.OperationType = { | ||
@@ -22,0 +21,0 @@ ADD_ACTIONS: 'ADD_ACTIONS', |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
16
9
247557
13
1335
+ Addedprop-types@^15.6.1
+ Added@babel/runtime@7.26.0(transitive)
+ Addedhoist-non-react-statics@3.3.2(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@16.14.0(transitive)
+ Addedreact-dom@16.14.0(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreact-lifecycles-compat@3.0.4(transitive)
+ Addedreact-redux@5.1.2(transitive)
+ Addedredux@4.2.1(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedscheduler@0.19.1(transitive)
- Removedhistory@2.1.1
- Removedasap@2.0.6(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcore-js@1.2.7(transitive)
- Removeddeep-equal@1.1.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedencoding@0.1.13(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.6(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhistory@2.1.1(transitive)
- Removedhoist-non-react-statics@1.2.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-arguments@1.2.0(transitive)
- Removedis-date-object@1.1.0(transitive)
- Removedis-regex@1.2.1(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash-es@4.17.21(transitive)
- Removedmath-intrinsics@1.0.0(transitive)
- Removedmoment@2.17.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedpromise@7.3.1(transitive)
- Removedquery-string@3.0.3(transitive)
- Removedreact@15.4.1(transitive)
- Removedreact-dom@15.4.1(transitive)
- Removedreact-redux@4.4.5(transitive)
- Removedredux@3.5.2(transitive)
- Removedregexp.prototype.flags@1.5.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedstrict-uri-encode@1.1.0(transitive)
- Removedsymbol-observable@0.2.4(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwarning@2.1.0(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updatedmoment@^2.22.1
Updatedreact@^16.3.2
Updatedreact-dom@^16.3.2
Updatedreact-redux@^5.0.7
Updatedredux@^4.0.0