superdesk-ui-framework 4.0.94 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {addDays} from 'date-fns';
|
|
2
|
+
import {addDays, startOfToday} from 'date-fns';
|
|
3
3
|
import {format} from 'date-fns';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import {Calendar, LocaleSettings, CalendarProps} from '@superdesk/primereact/calendar';
|
|
@@ -250,7 +250,7 @@ export class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
|
|
250
250
|
key={i}
|
|
251
251
|
className="btn btn--small"
|
|
252
252
|
onClick={() => {
|
|
253
|
-
this.props.onChange(addDays(
|
|
253
|
+
this.props.onChange(addDays(startOfToday(), days));
|
|
254
254
|
if (
|
|
255
255
|
this.instance != null &&
|
|
256
256
|
typeof this.instance.hideOverlay === 'function'
|
package/dist/examples.bundle.js
CHANGED
|
@@ -60574,7 +60574,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
60574
60574
|
return _this.props.headerButtonBar == null ? null : (React.createElement("div", { className: "datepicker-header-toolbar" }, _this.props.headerButtonBar.map(function (_a, i) {
|
|
60575
60575
|
var label = _a.label, days = _a.days;
|
|
60576
60576
|
return (React.createElement("button", { key: i, className: "btn btn--small", onClick: function () {
|
|
60577
|
-
_this.props.onChange((0, date_fns_1.addDays)(
|
|
60577
|
+
_this.props.onChange((0, date_fns_1.addDays)((0, date_fns_1.startOfToday)(), days));
|
|
60578
60578
|
if (_this.instance != null &&
|
|
60579
60579
|
typeof _this.instance.hideOverlay === 'function') {
|
|
60580
60580
|
_this.instance.hideOverlay();
|
|
@@ -195609,7 +195609,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
|
|
|
195609
195609
|
/* 1051 */
|
|
195610
195610
|
/***/ (function(module, exports) {
|
|
195611
195611
|
|
|
195612
|
-
module.exports = {"name":"superdesk-ui-framework","version":"
|
|
195612
|
+
module.exports = {"name":"superdesk-ui-framework","version":"5.0.1","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prettier":"3.5.3","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"^5.8.3","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@sourcefabric/common":"0.0.66","@superdesk/primereact":"5.0.2-15","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
|
|
195613
195613
|
|
|
195614
195614
|
/***/ }),
|
|
195615
195615
|
/* 1052 */
|
|
@@ -60304,7 +60304,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
60304
60304
|
return _this.props.headerButtonBar == null ? null : (React.createElement("div", { className: "datepicker-header-toolbar" }, _this.props.headerButtonBar.map(function (_a, i) {
|
|
60305
60305
|
var label = _a.label, days = _a.days;
|
|
60306
60306
|
return (React.createElement("button", { key: i, className: "btn btn--small", onClick: function () {
|
|
60307
|
-
_this.props.onChange((0, date_fns_1.addDays)(
|
|
60307
|
+
_this.props.onChange((0, date_fns_1.addDays)((0, date_fns_1.startOfToday)(), days));
|
|
60308
60308
|
if (_this.instance != null &&
|
|
60309
60309
|
typeof _this.instance.hideOverlay === 'function') {
|
|
60310
60310
|
_this.instance.hideOverlay();
|
package/package.json
CHANGED
|
@@ -219,7 +219,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
219
219
|
return _this.props.headerButtonBar == null ? null : (React.createElement("div", { className: "datepicker-header-toolbar" }, _this.props.headerButtonBar.map(function (_a, i) {
|
|
220
220
|
var label = _a.label, days = _a.days;
|
|
221
221
|
return (React.createElement("button", { key: i, className: "btn btn--small", onClick: function () {
|
|
222
|
-
_this.props.onChange((0, date_fns_1.addDays)(
|
|
222
|
+
_this.props.onChange((0, date_fns_1.addDays)((0, date_fns_1.startOfToday)(), days));
|
|
223
223
|
if (_this.instance != null &&
|
|
224
224
|
typeof _this.instance.hideOverlay === 'function') {
|
|
225
225
|
_this.instance.hideOverlay();
|