@truedat/core 5.17.3 → 5.18.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "5.17.3",
3
+ "version": "5.18.1",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -117,5 +117,5 @@
117
117
  "react-dom": ">= 16.8.6 < 17",
118
118
  "semantic-ui-react": ">= 2.0.3 < 2.2"
119
119
  },
120
- "gitHead": "ec07aeeabffbb6e46d2d22ade283de203dd94c88"
120
+ "gitHead": "95d5a42f5bd259ad53fa66d4fe8cce48be73ee03"
121
121
  }
package/src/routes.js CHANGED
@@ -231,7 +231,6 @@ export const TEMPLATE = "/templates/:templateId";
231
231
  export const TEMPLATES = "/templates";
232
232
  export const TEMPLATES_NEW = "/templates/new";
233
233
  export const TEMPLATE_EDIT = "/templates/:id/edit";
234
- export const TEMPLATE_SCOPE = "/templates\\?scope=:scope";
235
234
  export const UNAUTHORIZED = "/unauthorized";
236
235
  export const USER = "/users/:id";
237
236
  export const USERS = "/users";
@@ -435,7 +434,6 @@ const routes = {
435
434
  TEMPLATES,
436
435
  TEMPLATES_NEW,
437
436
  TEMPLATE_EDIT,
438
- TEMPLATE_SCOPE,
439
437
  UNAUTHORIZED,
440
438
  USER,
441
439
  USERS,
@@ -0,0 +1,19 @@
1
+ import _ from "lodash/fp";
2
+ import React from "react";
3
+ import PropTypes from "prop-types";
4
+ import { FormattedMessage } from "react-intl";
5
+ import Moment from "react-moment";
6
+
7
+ export const TranslateDecorator = ({ id }) =>
8
+ id ? <FormattedMessage id={id} defaultMessage={id} /> : null;
9
+
10
+ TranslateDecorator.propTypes = {
11
+ id: PropTypes.string,
12
+ };
13
+
14
+ export const DateDecorator = ({ date }) =>
15
+ date ? <Moment date={date} format="YYYY-MM-DD HH:mm" /> : null;
16
+
17
+ DateDecorator.propTypes = {
18
+ date: PropTypes.string,
19
+ };