ronds-metadata 1.3.23 → 1.3.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  /*
5
5
  * @Author: your name
6
6
  * @Date: 2021-09-18 14:15:04
7
- * @LastEditTime: 2023-11-27 11:26:08
7
+ * @LastEditTime: 2023-11-27 13:58:40
8
8
  */
9
9
  import { getLocale } from '../../../framework/locale';
10
10
  import moment from 'moment';
@@ -59,37 +59,33 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$, name) {
59
59
  if (_depends && stream$) {
60
60
  stream$.subscribe(function (p) {
61
61
  if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {
62
- var _p$payload;
63
- if ((p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : _p$payload.trigger) === 'firstLoad') {
64
- return;
65
- }
66
62
  if (_depends === null || _depends === void 0 ? void 0 : _depends.hidden) {
67
- var _p$payload2;
68
- var _hidden = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.hidden, p === null || p === void 0 ? void 0 : (_p$payload2 = p.payload) === null || _p$payload2 === void 0 ? void 0 : _p$payload2.allVals, stream$, name);
63
+ var _p$payload;
64
+ var _hidden = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.hidden, p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : _p$payload.allVals, stream$, name);
69
65
  var _dr = dependsRef.current;
70
66
  _dr.hidden = _hidden;
71
67
  setDepends(_objectSpread({}, _dr));
72
68
  dependsRef.current = _dr;
73
69
  }
74
70
  if (_depends === null || _depends === void 0 ? void 0 : _depends.show) {
75
- var _p$payload3;
76
- var _show = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.show, p === null || p === void 0 ? void 0 : (_p$payload3 = p.payload) === null || _p$payload3 === void 0 ? void 0 : _p$payload3.allVals, stream$, name);
71
+ var _p$payload2;
72
+ var _show = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.show, p === null || p === void 0 ? void 0 : (_p$payload2 = p.payload) === null || _p$payload2 === void 0 ? void 0 : _p$payload2.allVals, stream$, name);
77
73
  var _dr2 = dependsRef.current;
78
74
  _dr2.show = _show;
79
75
  setDepends(_objectSpread({}, _dr2));
80
76
  dependsRef.current = _dr2;
81
77
  }
82
78
  if (_depends === null || _depends === void 0 ? void 0 : _depends.notRequire) {
83
- var _p$payload4;
84
- var _notRequire = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.notRequire, p === null || p === void 0 ? void 0 : (_p$payload4 = p.payload) === null || _p$payload4 === void 0 ? void 0 : _p$payload4.allVals, stream$, name);
79
+ var _p$payload3;
80
+ var _notRequire = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.notRequire, p === null || p === void 0 ? void 0 : (_p$payload3 = p.payload) === null || _p$payload3 === void 0 ? void 0 : _p$payload3.allVals, stream$, name);
85
81
  var _dr3 = dependsRef.current;
86
82
  _dr3.notRequire = _notRequire;
87
83
  setDepends(_objectSpread({}, _dr3));
88
84
  dependsRef.current = _dr3;
89
85
  }
90
86
  if (_depends === null || _depends === void 0 ? void 0 : _depends.disabled) {
91
- var _p$payload5;
92
- var _disabled = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.disabled, p === null || p === void 0 ? void 0 : (_p$payload5 = p.payload) === null || _p$payload5 === void 0 ? void 0 : _p$payload5.allVals, stream$, name);
87
+ var _p$payload4;
88
+ var _disabled = processDependHiddenOrShow(_depends === null || _depends === void 0 ? void 0 : _depends.disabled, p === null || p === void 0 ? void 0 : (_p$payload4 = p.payload) === null || _p$payload4 === void 0 ? void 0 : _p$payload4.allVals, stream$, name);
93
89
  var _dr4 = dependsRef.current;
94
90
  _dr4.disabled = _disabled;
95
91
  setDepends(_objectSpread({}, _dr4));
@@ -105,11 +105,12 @@ var MetadataForm = function MetadataForm(props) {
105
105
  });
106
106
  if (firstLoadValue.current) {
107
107
  firstLoadValue.current = false;
108
+ var allVals = form.getFieldsValue();
108
109
  stream$.next({
109
110
  type: STREAM_EVENT_TYPE.ON_VALUES_CHANGE,
110
111
  payload: {
111
112
  val: vals,
112
- allVals: vals,
113
+ allVals: allVals,
113
114
  trigger: 'firstLoad'
114
115
  }
115
116
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.23",
4
+ "version": "1.3.24",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",