iglooform 3.1.4 → 3.1.5

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.
@@ -30,7 +30,7 @@ export default function DumiContextWrapper() {
30
30
 
31
31
  return (
32
32
  <SiteContext.Provider value={{
33
- pkg: {"name":"iglooform","version":"3.1.3","license":"MIT"},
33
+ pkg: {"name":"iglooform","version":"3.1.4","license":"MIT"},
34
34
  historyType: "browser",
35
35
  entryExports,
36
36
  demos,
@@ -150,9 +150,15 @@ export function optionsHOC(Component) {
150
150
  return _context.abrupt("return", _options2);
151
151
  case 9:
152
152
  if (!(selectDatasourceApi && datasourceKey)) {
153
- _context.next = 28;
153
+ _context.next = 30;
154
154
  break;
155
155
  }
156
+ if (!(dependField && dependFieldValue === undefined)) {
157
+ _context.next = 12;
158
+ break;
159
+ }
160
+ return _context.abrupt("return", []);
161
+ case 12:
156
162
  query = Array.isArray(dependFieldValue) ? dependFieldValue.map(function (v) {
157
163
  return "parent=".concat(v);
158
164
  }).join('&') : dependFieldValue ? "parent=".concat(dependFieldValue) : '';
@@ -166,28 +172,28 @@ export function optionsHOC(Component) {
166
172
  }).join('&');
167
173
  }
168
174
  api = "".concat(selectDatasourceApi, "/").concat(datasourceKey);
169
- _context.prev = 14;
170
- _context.next = 17;
175
+ _context.prev = 16;
176
+ _context.next = 19;
171
177
  return fetch(query ? "".concat(api, "?").concat(query) : api);
172
- case 17:
178
+ case 19:
173
179
  rst = _context.sent;
174
- _context.next = 20;
180
+ _context.next = 22;
175
181
  return rst.json();
176
- case 20:
182
+ case 22:
177
183
  _yield$rst$json = _context.sent;
178
184
  data = _yield$rst$json.data;
179
185
  return _context.abrupt("return", data || []);
180
- case 25:
181
- _context.prev = 25;
182
- _context.t0 = _context["catch"](14);
186
+ case 27:
187
+ _context.prev = 27;
188
+ _context.t0 = _context["catch"](16);
183
189
  return _context.abrupt("return", []);
184
- case 28:
190
+ case 30:
185
191
  return _context.abrupt("return", []);
186
- case 29:
192
+ case 31:
187
193
  case "end":
188
194
  return _context.stop();
189
195
  }
190
- }, _callee, null, [[14, 25]]);
196
+ }, _callee, null, [[16, 27]]);
191
197
  }));
192
198
  return function calcOptions() {
193
199
  return _ref.apply(this, arguments);
@@ -161,9 +161,15 @@ function optionsHOC(Component) {
161
161
  return _context.abrupt("return", _options2);
162
162
  case 9:
163
163
  if (!(selectDatasourceApi && datasourceKey)) {
164
- _context.next = 28;
164
+ _context.next = 30;
165
165
  break;
166
166
  }
167
+ if (!(dependField && dependFieldValue === undefined)) {
168
+ _context.next = 12;
169
+ break;
170
+ }
171
+ return _context.abrupt("return", []);
172
+ case 12:
167
173
  query = Array.isArray(dependFieldValue) ? dependFieldValue.map(function (v) {
168
174
  return "parent=".concat(v);
169
175
  }).join('&') : dependFieldValue ? "parent=".concat(dependFieldValue) : '';
@@ -177,28 +183,28 @@ function optionsHOC(Component) {
177
183
  }).join('&');
178
184
  }
179
185
  api = "".concat(selectDatasourceApi, "/").concat(datasourceKey);
180
- _context.prev = 14;
181
- _context.next = 17;
186
+ _context.prev = 16;
187
+ _context.next = 19;
182
188
  return fetch(query ? "".concat(api, "?").concat(query) : api);
183
- case 17:
189
+ case 19:
184
190
  rst = _context.sent;
185
- _context.next = 20;
191
+ _context.next = 22;
186
192
  return rst.json();
187
- case 20:
193
+ case 22:
188
194
  _yield$rst$json = _context.sent;
189
195
  data = _yield$rst$json.data;
190
196
  return _context.abrupt("return", data || []);
191
- case 25:
192
- _context.prev = 25;
193
- _context.t0 = _context["catch"](14);
197
+ case 27:
198
+ _context.prev = 27;
199
+ _context.t0 = _context["catch"](16);
194
200
  return _context.abrupt("return", []);
195
- case 28:
201
+ case 30:
196
202
  return _context.abrupt("return", []);
197
- case 29:
203
+ case 31:
198
204
  case "end":
199
205
  return _context.stop();
200
206
  }
201
- }, _callee, null, [[14, 25]]);
207
+ }, _callee, null, [[16, 27]]);
202
208
  }));
203
209
  return function calcOptions() {
204
210
  return _ref.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",
@@ -1,12 +0,0 @@
1
- import { FC } from 'react';
2
- import { FormItemConfig, FormItemName } from '../../types';
3
- import './style';
4
- interface ElementProps {
5
- config: FormItemConfig;
6
- parentName?: FormItemName;
7
- preview?: boolean;
8
- disabled?: boolean;
9
- setShowStepButton?: (showButton: boolean) => void;
10
- }
11
- declare const Element: FC<ElementProps>;
12
- export default Element;
@@ -1,17 +0,0 @@
1
- import { Select } from 'antd';
2
- import { SelectProps, SelectValue } from 'antd/es/select';
3
- import { FC, IglooComponentProps } from '../types';
4
- import './style';
5
- import { ComponentProps } from '../utils/option-utils';
6
- type Props = SelectProps<SelectValue> & IglooComponentProps & {
7
- multiple?: boolean;
8
- preview?: boolean;
9
- } & ComponentProps;
10
- type OptionType = typeof Select.Option;
11
- type OptGroupType = typeof Select.OptGroup;
12
- interface IglooSelectType extends FC<Props> {
13
- Option: OptionType;
14
- OptGroup: OptGroupType;
15
- }
16
- declare const AttachedSelect: IglooSelectType;
17
- export default AttachedSelect;
@@ -1,12 +0,0 @@
1
- import { FC } from 'react';
2
- import { FormItemConfig, FormItemName } from '../../types';
3
- import './style';
4
- interface ElementProps {
5
- config: FormItemConfig;
6
- parentName?: FormItemName;
7
- preview?: boolean;
8
- disabled?: boolean;
9
- setShowStepButton?: (showButton: boolean) => void;
10
- }
11
- declare const Element: FC<ElementProps>;
12
- export default Element;
@@ -1,17 +0,0 @@
1
- import { Select } from 'antd';
2
- import { SelectProps, SelectValue } from 'antd/es/select';
3
- import { FC, IglooComponentProps } from '../types';
4
- import './style';
5
- import { ComponentProps } from '../utils/option-utils';
6
- type Props = SelectProps<SelectValue> & IglooComponentProps & {
7
- multiple?: boolean;
8
- preview?: boolean;
9
- } & ComponentProps;
10
- type OptionType = typeof Select.Option;
11
- type OptGroupType = typeof Select.OptGroup;
12
- interface IglooSelectType extends FC<Props> {
13
- Option: OptionType;
14
- OptGroup: OptGroupType;
15
- }
16
- declare const AttachedSelect: IglooSelectType;
17
- export default AttachedSelect;