@panneau/form-inline 4.0.39 → 4.0.40-alpha.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.
Files changed (2) hide show
  1. package/dist/index.js +88 -29
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,38 +1,97 @@
1
- import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
1
+ import { c } from 'react/compiler-runtime';
3
2
  import { useFieldComponent } from '@panneau/core/contexts';
4
3
  import Form from '@panneau/element-form';
5
4
  import { jsx } from 'react/jsx-runtime';
6
5
 
7
- var _excluded = ["fields", "status", "value", "onChange", "className", "onSubmit"];
8
- function InlineForm(_ref) {
9
- var fields = _ref.fields,
10
- _ref$status = _ref.status,
11
- status = _ref$status === void 0 ? null : _ref$status,
12
- _ref$value = _ref.value,
13
- value = _ref$value === void 0 ? null : _ref$value,
14
- onChange = _ref.onChange,
15
- _ref$className = _ref.className,
16
- className = _ref$className === void 0 ? null : _ref$className,
17
- _ref$onSubmit = _ref.onSubmit,
18
- onSubmit = _ref$onSubmit === void 0 ? null : _ref$onSubmit,
19
- props = _objectWithoutProperties(_ref, _excluded);
20
- var FieldsComponent = useFieldComponent('fields');
21
- return /*#__PURE__*/jsx(Form, _objectSpread(_objectSpread({
22
- onSubmit: onSubmit,
23
- className: className,
24
- status: status
25
- }, props), {}, {
26
- children: /*#__PURE__*/jsx(FieldsComponent, {
27
- fields: fields.map(function (f) {
28
- return _objectSpread(_objectSpread({}, f), {}, {
29
- inline: true
30
- });
31
- }),
6
+ function InlineForm(t0) {
7
+ const $ = c(21);
8
+ let fields;
9
+ let onChange;
10
+ let props;
11
+ let t1;
12
+ let t2;
13
+ let t3;
14
+ let t4;
15
+ if ($[0] !== t0) {
16
+ ({
17
+ fields,
18
+ status: t1,
19
+ value: t2,
20
+ onChange,
21
+ className: t3,
22
+ onSubmit: t4,
23
+ ...props
24
+ } = t0);
25
+ $[0] = t0;
26
+ $[1] = fields;
27
+ $[2] = onChange;
28
+ $[3] = props;
29
+ $[4] = t1;
30
+ $[5] = t2;
31
+ $[6] = t3;
32
+ $[7] = t4;
33
+ } else {
34
+ fields = $[1];
35
+ onChange = $[2];
36
+ props = $[3];
37
+ t1 = $[4];
38
+ t2 = $[5];
39
+ t3 = $[6];
40
+ t4 = $[7];
41
+ }
42
+ const status = t1 === undefined ? null : t1;
43
+ const value = t2 === undefined ? null : t2;
44
+ const className = t3 === undefined ? null : t3;
45
+ const onSubmit = t4 === undefined ? null : t4;
46
+ const FieldsComponent = useFieldComponent("fields");
47
+ let t5;
48
+ if ($[8] !== fields) {
49
+ t5 = fields.map(_temp);
50
+ $[8] = fields;
51
+ $[9] = t5;
52
+ } else {
53
+ t5 = $[9];
54
+ }
55
+ let t6;
56
+ if ($[10] !== FieldsComponent || $[11] !== onChange || $[12] !== t5 || $[13] !== value) {
57
+ t6 = /*#__PURE__*/jsx(FieldsComponent, {
58
+ fields: t5,
32
59
  value: value,
33
60
  onChange: onChange
34
- })
35
- }));
61
+ });
62
+ $[10] = FieldsComponent;
63
+ $[11] = onChange;
64
+ $[12] = t5;
65
+ $[13] = value;
66
+ $[14] = t6;
67
+ } else {
68
+ t6 = $[14];
69
+ }
70
+ let t7;
71
+ if ($[15] !== className || $[16] !== onSubmit || $[17] !== props || $[18] !== status || $[19] !== t6) {
72
+ t7 = /*#__PURE__*/jsx(Form, {
73
+ onSubmit: onSubmit,
74
+ className: className,
75
+ status: status,
76
+ ...props,
77
+ children: t6
78
+ });
79
+ $[15] = className;
80
+ $[16] = onSubmit;
81
+ $[17] = props;
82
+ $[18] = status;
83
+ $[19] = t6;
84
+ $[20] = t7;
85
+ } else {
86
+ t7 = $[20];
87
+ }
88
+ return t7;
89
+ }
90
+ function _temp(f) {
91
+ return {
92
+ ...f,
93
+ inline: true
94
+ };
36
95
  }
37
96
 
38
97
  export { InlineForm as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-inline",
3
- "version": "4.0.39",
3
+ "version": "4.0.40-alpha.1",
4
4
  "description": "Inline form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -60,10 +60,10 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@panneau/core": "^4.0.38",
64
- "@panneau/element-button": "^4.0.39",
65
- "@panneau/element-form": "^4.0.39",
66
- "@panneau/field-fields": "^4.0.39",
63
+ "@panneau/core": "^4.0.40-alpha.1",
64
+ "@panneau/element-button": "^4.0.40-alpha.1",
65
+ "@panneau/element-form": "^4.0.40-alpha.1",
66
+ "@panneau/field-fields": "^4.0.40-alpha.1",
67
67
  "classnames": "^2.5.1",
68
68
  "lodash": "^4.17.21",
69
69
  "react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "621c5233f083c1ba95cd46cd427c38361723d5d6"
74
+ "gitHead": "66520f92373b3aa371222b354d60ed3cf3d20c96"
75
75
  }