superdesk-ui-framework 4.0.61 → 4.0.64
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.
- package/app-typescript/components/DatePicker.tsx +2 -2
- package/dist/examples.bundle.js +43886 -25662
- package/dist/superdesk-ui.bundle.js +45723 -28003
- package/dist/vendor.bundle.js +29844 -29849
- package/package.json +2 -7
- package/react/components/DatePicker.js +4 -4
- package/webpack.config.js +13 -11
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "superdesk-ui-framework",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.64",
|
4
4
|
"license": "AGPL-3.0",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -46,11 +46,6 @@
|
|
46
46
|
"angular": "^1.7.9",
|
47
47
|
"angular-animate": "^1.7.9",
|
48
48
|
"angular-route": "^1.7.9",
|
49
|
-
"babel-core": "^6.26.0",
|
50
|
-
"babel-loader": "^7.1.2",
|
51
|
-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
52
|
-
"babel-preset-es2015": "^6.24.1",
|
53
|
-
"babel-preset-react": "^6.24.1",
|
54
49
|
"classnames": "^2.2.5",
|
55
50
|
"clean-webpack-plugin": "^1.0.0",
|
56
51
|
"code-prettify": "^0.1.0",
|
@@ -102,7 +97,7 @@
|
|
102
97
|
"@superdesk/primereact": "^5.0.2-13",
|
103
98
|
"@superdesk/react-resizable-panels": "0.0.39",
|
104
99
|
"chart.js": "^2.9.3",
|
105
|
-
"date-fns": "
|
100
|
+
"date-fns": "^4.1.0",
|
106
101
|
"popper-max-size-modifier": "^0.2.0",
|
107
102
|
"popper.js": "1.14.4",
|
108
103
|
"primeicons": "2.0.0",
|
@@ -64,8 +64,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
65
65
|
exports.DatePickerISO = exports.DatePicker = void 0;
|
66
66
|
var React = __importStar(require("react"));
|
67
|
-
var
|
68
|
-
var
|
67
|
+
var date_fns_1 = require("date-fns");
|
68
|
+
var date_fns_2 = require("date-fns");
|
69
69
|
var moment_1 = __importDefault(require("moment"));
|
70
70
|
var calendar_1 = require("@superdesk/primereact/calendar");
|
71
71
|
var lodash_1 = require("lodash");
|
@@ -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,
|
222
|
+
_this.props.onChange((0, date_fns_1.addDays)(new Date(), days));
|
223
223
|
if (_this.instance != null &&
|
224
224
|
typeof _this.instance.hideOverlay === 'function') {
|
225
225
|
_this.instance.hideOverlay();
|
@@ -253,7 +253,7 @@ var DatePickerISO = /** @class */ (function (_super) {
|
|
253
253
|
_this.props.onChange('');
|
254
254
|
}
|
255
255
|
else {
|
256
|
-
_this.props.onChange((0,
|
256
|
+
_this.props.onChange((0, date_fns_2.format)(value, 'yyyy-MM-dd'));
|
257
257
|
}
|
258
258
|
}, disabled: this.props.disabled, preview: this.props.preview, headerButtonBar: this.props.headerButtonBar, dateFormat: this.props.dateFormat, locale: this.props.locale, inlineLabel: this.props.inlineLabel, required: this.props.required, fullWidth: this.props.fullWidth, labelHidden: this.props.labelHidden, tabindex: this.props.tabindex, label: this.props.label, info: this.props.info, error: this.props.error }));
|
259
259
|
};
|
package/webpack.config.js
CHANGED
@@ -30,18 +30,20 @@ const config = {
|
|
30
30
|
module: {
|
31
31
|
rules: [
|
32
32
|
{
|
33
|
-
test: /\.(js|jsx)$/,
|
34
|
-
loader: 'babel-loader',
|
35
|
-
exclude: /node_modules/,
|
36
|
-
query: {
|
37
|
-
presets: ['es2015', 'react'],
|
38
|
-
plugins: ['transform-object-rest-spread'],
|
39
|
-
},
|
40
|
-
},
|
41
|
-
{
|
42
|
-
test: /\.(ts|tsx)$/,
|
33
|
+
test: /\.(ts|tsx|js|jsx)$/,
|
43
34
|
loader: 'ts-loader',
|
44
|
-
exclude:
|
35
|
+
exclude: (absolutePath) => {
|
36
|
+
// date-fns uses optional chaining and nullish coalescing
|
37
|
+
// that crashes the build unless passed though the loader
|
38
|
+
if (
|
39
|
+
absolutePath.includes('/node_modules/date-fns/') ||
|
40
|
+
absolutePath.includes('/node_modules/@date-fns/tz/')
|
41
|
+
) {
|
42
|
+
return false;
|
43
|
+
}
|
44
|
+
|
45
|
+
return absolutePath.includes('/node_modules/');
|
46
|
+
},
|
45
47
|
options: {
|
46
48
|
transpileOnly: true,
|
47
49
|
},
|