superdesk-ui-framework 4.0.63 → 4.0.65

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.
@@ -7,7 +7,7 @@
7
7
  var a = typeof exports === 'object' ? factory(require("react"), require("react-dom"), require("angular")) : factory(root["react"], root["react-dom"], root["angular"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_826__) {
10
+ })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_13__, __WEBPACK_EXTERNAL_MODULE_915__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
70
70
  /******/ __webpack_require__.p = "";
71
71
  /******/
72
72
  /******/ // Load entry module and return exports
73
- /******/ return __webpack_require__(__webpack_require__.s = 823);
73
+ /******/ return __webpack_require__(__webpack_require__.s = 912);
74
74
  /******/ })
75
75
  /************************************************************************/
76
76
  /******/ ({
@@ -82,7 +82,14 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
82
82
 
83
83
  /***/ }),
84
84
 
85
- /***/ 18:
85
+ /***/ 13:
86
+ /***/ (function(module, exports) {
87
+
88
+ module.exports = __WEBPACK_EXTERNAL_MODULE_13__;
89
+
90
+ /***/ }),
91
+
92
+ /***/ 25:
86
93
  /***/ (function(module, exports, __webpack_require__) {
87
94
 
88
95
  /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
@@ -17296,11 +17303,11 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
17296
17303
  }
17297
17304
  }.call(this));
17298
17305
 
17299
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(43), __webpack_require__(59)(module)))
17306
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55), __webpack_require__(72)(module)))
17300
17307
 
17301
17308
  /***/ }),
17302
17309
 
17303
- /***/ 43:
17310
+ /***/ 55:
17304
17311
  /***/ (function(module, exports) {
17305
17312
 
17306
17313
  var g;
@@ -17328,7 +17335,7 @@ module.exports = g;
17328
17335
 
17329
17336
  /***/ }),
17330
17337
 
17331
- /***/ 59:
17338
+ /***/ 72:
17332
17339
  /***/ (function(module, exports) {
17333
17340
 
17334
17341
  module.exports = function(module) {
@@ -17357,7 +17364,7 @@ module.exports = function(module) {
17357
17364
 
17358
17365
  /***/ }),
17359
17366
 
17360
- /***/ 74:
17367
+ /***/ 89:
17361
17368
  /***/ (function(module, exports, __webpack_require__) {
17362
17369
 
17363
17370
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -28246,29 +28253,24 @@ return jQuery;
28246
28253
 
28247
28254
  /***/ }),
28248
28255
 
28249
- /***/ 823:
28256
+ /***/ 912:
28250
28257
  /***/ (function(module, exports, __webpack_require__) {
28251
28258
 
28252
28259
  "use strict";
28253
28260
 
28254
-
28255
- __webpack_require__(18);
28256
-
28257
- __webpack_require__(74);
28258
-
28259
- __webpack_require__(824);
28260
-
28261
- __webpack_require__(826);
28262
-
28263
- __webpack_require__(827);
28264
-
28261
+ Object.defineProperty(exports, "__esModule", { value: true });
28262
+ __webpack_require__(25);
28263
+ __webpack_require__(89);
28264
+ __webpack_require__(913);
28265
+ __webpack_require__(915);
28266
+ __webpack_require__(916);
28265
28267
  __webpack_require__(0);
28268
+ __webpack_require__(13);
28266
28269
 
28267
- __webpack_require__(9);
28268
28270
 
28269
28271
  /***/ }),
28270
28272
 
28271
- /***/ 824:
28273
+ /***/ 913:
28272
28274
  /***/ (function(module, exports, __webpack_require__) {
28273
28275
 
28274
28276
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -28292,7 +28294,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
28292
28294
  if ( true ) {
28293
28295
 
28294
28296
  // AMD. Register as an anonymous module.
28295
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(74), __webpack_require__(825) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
28297
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(89), __webpack_require__(914) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
28296
28298
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
28297
28299
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
28298
28300
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -29030,7 +29032,7 @@ return $.widget;
29030
29032
 
29031
29033
  /***/ }),
29032
29034
 
29033
- /***/ 825:
29035
+ /***/ 914:
29034
29036
  /***/ (function(module, exports, __webpack_require__) {
29035
29037
 
29036
29038
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {
@@ -29039,7 +29041,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
29039
29041
  if ( true ) {
29040
29042
 
29041
29043
  // AMD. Register as an anonymous module.
29042
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(74) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
29044
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(89) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
29043
29045
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
29044
29046
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
29045
29047
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -29060,23 +29062,23 @@ return $.ui.version = "1.13.0";
29060
29062
 
29061
29063
  /***/ }),
29062
29064
 
29063
- /***/ 826:
29065
+ /***/ 915:
29064
29066
  /***/ (function(module, exports) {
29065
29067
 
29066
- module.exports = __WEBPACK_EXTERNAL_MODULE_826__;
29068
+ module.exports = __WEBPACK_EXTERNAL_MODULE_915__;
29067
29069
 
29068
29070
  /***/ }),
29069
29071
 
29070
- /***/ 827:
29072
+ /***/ 916:
29071
29073
  /***/ (function(module, exports, __webpack_require__) {
29072
29074
 
29073
- __webpack_require__(828);
29075
+ __webpack_require__(917);
29074
29076
  module.exports = 'ngAnimate';
29075
29077
 
29076
29078
 
29077
29079
  /***/ }),
29078
29080
 
29079
- /***/ 828:
29081
+ /***/ 917:
29080
29082
  /***/ (function(module, exports) {
29081
29083
 
29082
29084
  /**
@@ -33353,13 +33355,6 @@ angular.module('ngAnimate', [], function initAngularHelpers() {
33353
33355
  })(window, window.angular);
33354
33356
 
33355
33357
 
33356
- /***/ }),
33357
-
33358
- /***/ 9:
33359
- /***/ (function(module, exports) {
33360
-
33361
- module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
33362
-
33363
33358
  /***/ })
33364
33359
 
33365
33360
  /******/ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "4.0.63",
3
+ "version": "4.0.65",
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",
@@ -98,11 +93,11 @@
98
93
  },
99
94
  "dependencies": {
100
95
  "@popperjs/core": "^2.4.0",
101
- "@sourcefabric/common": "0.0.63",
96
+ "@sourcefabric/common": "0.0.66",
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": "2.7.0",
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 addDays_1 = __importDefault(require("date-fns/addDays"));
68
- var format_1 = __importDefault(require("date-fns/format"));
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, addDays_1.default)(new Date(), days));
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, format_1.default)(value, 'yyyy-MM-dd'));
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: /node_modules/,
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
  },