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.
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +1 -1
- package/es/utils/option-utils.js +18 -12
- package/lib/utils/option-utils.js +18 -12
- package/package.json +1 -1
- package/es/form/element/index.d.ts +0 -12
- package/es/select/attached-select.d.ts +0 -17
- package/lib/form/element/index.d.ts +0 -12
- package/lib/select/attached-select.d.ts +0 -17
|
@@ -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.
|
|
33
|
+
pkg: {"name":"iglooform","version":"3.1.4","license":"MIT"},
|
|
34
34
|
historyType: "browser",
|
|
35
35
|
entryExports,
|
|
36
36
|
demos,
|
package/es/utils/option-utils.js
CHANGED
|
@@ -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 =
|
|
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 =
|
|
170
|
-
_context.next =
|
|
175
|
+
_context.prev = 16;
|
|
176
|
+
_context.next = 19;
|
|
171
177
|
return fetch(query ? "".concat(api, "?").concat(query) : api);
|
|
172
|
-
case
|
|
178
|
+
case 19:
|
|
173
179
|
rst = _context.sent;
|
|
174
|
-
_context.next =
|
|
180
|
+
_context.next = 22;
|
|
175
181
|
return rst.json();
|
|
176
|
-
case
|
|
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
|
|
181
|
-
_context.prev =
|
|
182
|
-
_context.t0 = _context["catch"](
|
|
186
|
+
case 27:
|
|
187
|
+
_context.prev = 27;
|
|
188
|
+
_context.t0 = _context["catch"](16);
|
|
183
189
|
return _context.abrupt("return", []);
|
|
184
|
-
case
|
|
190
|
+
case 30:
|
|
185
191
|
return _context.abrupt("return", []);
|
|
186
|
-
case
|
|
192
|
+
case 31:
|
|
187
193
|
case "end":
|
|
188
194
|
return _context.stop();
|
|
189
195
|
}
|
|
190
|
-
}, _callee, null, [[
|
|
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 =
|
|
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 =
|
|
181
|
-
_context.next =
|
|
186
|
+
_context.prev = 16;
|
|
187
|
+
_context.next = 19;
|
|
182
188
|
return fetch(query ? "".concat(api, "?").concat(query) : api);
|
|
183
|
-
case
|
|
189
|
+
case 19:
|
|
184
190
|
rst = _context.sent;
|
|
185
|
-
_context.next =
|
|
191
|
+
_context.next = 22;
|
|
186
192
|
return rst.json();
|
|
187
|
-
case
|
|
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
|
|
192
|
-
_context.prev =
|
|
193
|
-
_context.t0 = _context["catch"](
|
|
197
|
+
case 27:
|
|
198
|
+
_context.prev = 27;
|
|
199
|
+
_context.t0 = _context["catch"](16);
|
|
194
200
|
return _context.abrupt("return", []);
|
|
195
|
-
case
|
|
201
|
+
case 30:
|
|
196
202
|
return _context.abrupt("return", []);
|
|
197
|
-
case
|
|
203
|
+
case 31:
|
|
198
204
|
case "end":
|
|
199
205
|
return _context.stop();
|
|
200
206
|
}
|
|
201
|
-
}, _callee, null, [[
|
|
207
|
+
}, _callee, null, [[16, 27]]);
|
|
202
208
|
}));
|
|
203
209
|
return function calcOptions() {
|
|
204
210
|
return _ref.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -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;
|