@panneau/field-display 3.0.222 → 3.0.224

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.
Files changed (2) hide show
  1. package/package.json +8 -5
  2. package/lib/index.js +0 -50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/field-display",
3
- "version": "3.0.222",
3
+ "version": "3.0.224",
4
4
  "description": "A field rendering a display",
5
5
  "keywords": [
6
6
  "javascript"
@@ -25,8 +25,11 @@
25
25
  }
26
26
  ],
27
27
  "license": "ISC",
28
- "main": "lib/index.js",
28
+ "type": "module",
29
29
  "module": "es/index.js",
30
+ "exports": {
31
+ ".": "./es/index.js"
32
+ },
30
33
  "files": [
31
34
  "lib",
32
35
  "es",
@@ -46,13 +49,13 @@
46
49
  },
47
50
  "dependencies": {
48
51
  "@babel/runtime": "^7.12.5",
49
- "@panneau/core": "^3.0.222",
50
- "@panneau/themes": "^3.0.222",
52
+ "@panneau/core": "^3.0.224",
53
+ "@panneau/themes": "^3.0.224",
51
54
  "classnames": "^2.5.1",
52
55
  "prop-types": "^15.7.2"
53
56
  },
54
57
  "publishConfig": {
55
58
  "access": "public"
56
59
  },
57
- "gitHead": "1d7f6c2943965c2c26fb6ce1d8f3c85eb88b2146"
60
+ "gitHead": "c95bd465867c4c7d112bf0ed66036574cc05c627"
58
61
  }
package/lib/index.js DELETED
@@ -1,50 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
- var classNames = require('classnames');
8
- var PropTypes = require('prop-types');
9
- var React = require('react');
10
- var contexts = require('@panneau/core/contexts');
11
-
12
- var styles = {};
13
-
14
- var _excluded = ["value", "display", "className"];
15
- var propTypes = {
16
- value: PropTypes.bool,
17
- display: PropTypes.string,
18
- className: PropTypes.string
19
- };
20
- var defaultProps = {
21
- value: null,
22
- display: null,
23
- className: null
24
- };
25
- var DisplayField = function DisplayField(_ref) {
26
- var _ref$value = _ref.value,
27
- value = _ref$value === void 0 ? null : _ref$value,
28
- _ref$display = _ref.display,
29
- display = _ref$display === void 0 ? null : _ref$display,
30
- className = _ref.className,
31
- props = _objectWithoutProperties(_ref, _excluded);
32
- var displays = contexts.useDisplaysComponentsManager();
33
- var Component = displays.getComponent(display) || null;
34
- return value !== null && Component !== null ? /*#__PURE__*/React.createElement(Component, Object.assign({
35
- className: classNames([styles.container, _defineProperty({}, className, className !== null)])
36
- }, props, {
37
- value: value
38
- })) : null;
39
- };
40
- DisplayField.propTypes = propTypes;
41
- DisplayField.defaultProps = defaultProps;
42
- var DisplayField$1 = DisplayField;
43
-
44
- var definition = {
45
- id: 'display',
46
- component: 'Display'
47
- };
48
-
49
- exports.default = DisplayField$1;
50
- exports.definition = definition;