@panneau/modal-form 3.0.223 → 3.0.225

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 +11 -8
  2. package/lib/index.js +0 -94
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-form",
3
- "version": "3.0.223",
3
+ "version": "3.0.225",
4
4
  "description": "Resource form modal",
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,11 +49,11 @@
46
49
  },
47
50
  "dependencies": {
48
51
  "@babel/runtime": "^7.12.5",
49
- "@panneau/core": "^3.0.223",
50
- "@panneau/form": "^3.0.223",
51
- "@panneau/intl": "^3.0.223",
52
- "@panneau/modal-dialog": "^3.0.223",
53
- "@panneau/themes": "^3.0.223",
52
+ "@panneau/core": "^3.0.224",
53
+ "@panneau/form": "^3.0.224",
54
+ "@panneau/intl": "^3.0.225",
55
+ "@panneau/modal-dialog": "^3.0.224",
56
+ "@panneau/themes": "^3.0.224",
54
57
  "classnames": "^2.5.1",
55
58
  "lodash": "^4.17.21",
56
59
  "prop-types": "^15.7.2",
@@ -59,5 +62,5 @@
59
62
  "publishConfig": {
60
63
  "access": "public"
61
64
  },
62
- "gitHead": "14196bd955b0e44cbc214e00f3189b3216f3fa53"
65
+ "gitHead": "5603d68b2a7c406ea856abccc332318814d53fc3"
63
66
  }
package/lib/index.js DELETED
@@ -1,94 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
6
- var PropTypes = require('prop-types');
7
- var React = require('react');
8
- var reactIntl = require('react-intl');
9
- var Form = require('@panneau/form');
10
- var Dialog = require('@panneau/modal-dialog');
11
-
12
- var _excluded = ["id", "title", "name", "fields", "action", "type", "item", "onComplete", "onClose", "submitButtonLabel", "className", "children"];
13
- var propTypes = {
14
- id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
15
- title: PropTypes.node,
16
- name: PropTypes.string,
17
- fields: PropTypes.arrayOf(PropTypes.shape({})),
18
- action: PropTypes.string,
19
- type: PropTypes.string,
20
- item: PropTypes.shape({
21
- id: PropTypes.string
22
- }),
23
- onComplete: PropTypes.func,
24
- onClose: PropTypes.func,
25
- submitButtonLabel: PropTypes.node,
26
- className: PropTypes.string,
27
- children: PropTypes.node
28
- };
29
- var defaultProps = {
30
- title: null,
31
- name: null,
32
- fields: null,
33
- action: null,
34
- type: 'normal',
35
- item: null,
36
- onComplete: null,
37
- onClose: null,
38
- submitButtonLabel: null,
39
- className: null,
40
- children: null
41
- };
42
- function ModalForm(_ref) {
43
- var id = _ref.id,
44
- title = _ref.title,
45
- name = _ref.name,
46
- fields = _ref.fields,
47
- action = _ref.action,
48
- type = _ref.type,
49
- item = _ref.item,
50
- onComplete = _ref.onComplete,
51
- onClose = _ref.onClose,
52
- submitButtonLabel = _ref.submitButtonLabel,
53
- className = _ref.className,
54
- children = _ref.children,
55
- props = _objectWithoutProperties(_ref, _excluded);
56
- return /*#__PURE__*/React.createElement(Dialog, {
57
- id: id,
58
- title: title || (name !== null ? /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
59
- id: "smqUAV",
60
- defaultMessage: [{
61
- "type": 0,
62
- "value": "Edit "
63
- }, {
64
- "type": 1,
65
- "value": "name"
66
- }],
67
- values: {
68
- name: name
69
- }
70
- }) : /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
71
- id: "T/NPHK",
72
- defaultMessage: [{
73
- "type": 0,
74
- "value": "Edit"
75
- }]
76
- })),
77
- size: "lg",
78
- onClose: onClose,
79
- className: className
80
- }, children, /*#__PURE__*/React.createElement(Form, Object.assign({}, props, {
81
- fields: fields,
82
- action: action,
83
- type: type,
84
- item: item,
85
- buttonSize: "md",
86
- onComplete: onComplete,
87
- onCancel: onClose,
88
- submitButtonLabel: submitButtonLabel
89
- })));
90
- }
91
- ModalForm.propTypes = propTypes;
92
- ModalForm.defaultProps = defaultProps;
93
-
94
- exports.default = ModalForm;