iglooform 2.5.62 → 2.5.63

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 (62) hide show
  1. package/.dumi/tmp/core/defineApp.ts +2 -1
  2. package/.dumi/tmp/core/helmet.ts +1 -1
  3. package/.dumi/tmp/core/history.ts +1 -1
  4. package/.dumi/tmp/core/historyIntelli.ts +1 -1
  5. package/.dumi/tmp/core/plugin.ts +6 -1
  6. package/.dumi/tmp/core/pluginConfig.ts +11 -0
  7. package/.dumi/tmp/core/polyfill.ts +197 -197
  8. package/.dumi/tmp/core/route.tsx +33 -33
  9. package/.dumi/tmp/dumi/exports.ts +1 -1
  10. package/.dumi/tmp/dumi/locales/runtime.tsx +2 -2
  11. package/.dumi/tmp/dumi/meta/index.ts +33 -33
  12. package/.dumi/tmp/dumi/meta/runtime.ts +1 -1
  13. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +3 -3
  14. package/.dumi/tmp/dumi/theme/builtins/API.ts +1 -1
  15. package/.dumi/tmp/dumi/theme/builtins/Badge.ts +1 -1
  16. package/.dumi/tmp/dumi/theme/builtins/Container.ts +1 -1
  17. package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +1 -1
  18. package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +1 -1
  19. package/.dumi/tmp/dumi/theme/builtins/Table.ts +1 -1
  20. package/.dumi/tmp/dumi/theme/builtins/Tree.ts +1 -1
  21. package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +1 -1
  22. package/.dumi/tmp/dumi/theme/loading.tsx +1 -1
  23. package/.dumi/tmp/dumi/theme/nprogress.css +3 -3
  24. package/.dumi/tmp/dumi/theme/slots/ColorSwitch.ts +1 -1
  25. package/.dumi/tmp/dumi/theme/slots/Content.ts +1 -1
  26. package/.dumi/tmp/dumi/theme/slots/ContentFooter.ts +1 -1
  27. package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +1 -1
  28. package/.dumi/tmp/dumi/theme/slots/Features.ts +1 -1
  29. package/.dumi/tmp/dumi/theme/slots/Footer.ts +1 -1
  30. package/.dumi/tmp/dumi/theme/slots/Header.ts +1 -1
  31. package/.dumi/tmp/dumi/theme/slots/HeaderExtra.ts +1 -1
  32. package/.dumi/tmp/dumi/theme/slots/Hero.ts +1 -1
  33. package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +1 -1
  34. package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +1 -1
  35. package/.dumi/tmp/dumi/theme/slots/Logo.ts +1 -1
  36. package/.dumi/tmp/dumi/theme/slots/Navbar.ts +1 -1
  37. package/.dumi/tmp/dumi/theme/slots/NavbarExtra.ts +1 -1
  38. package/.dumi/tmp/dumi/theme/slots/NotFound.ts +1 -1
  39. package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +1 -1
  40. package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +1 -1
  41. package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +1 -1
  42. package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +2 -2
  43. package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +1 -1
  44. package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +1 -1
  45. package/.dumi/tmp/dumi/theme/slots/SocialIcon.ts +1 -1
  46. package/.dumi/tmp/dumi/theme/slots/Toc.ts +1 -1
  47. package/.dumi/tmp/exports.ts +5 -4
  48. package/.dumi/tmp/plugin-antd/runtime.tsx +65 -0
  49. package/.dumi/tmp/plugin-antd/runtimeConfig.d.ts +6 -0
  50. package/.dumi/tmp/plugin-antd/types.d.ts +14 -0
  51. package/.dumi/tmp/testBrowser.tsx +4 -2
  52. package/.dumi/tmp/umi.ts +5 -3
  53. package/es/utils/option-utils.js +18 -13
  54. package/lib/utils/option-utils.js +19 -13
  55. package/package.json +1 -1
  56. package/.idea/codeStyles/Project.xml +0 -59
  57. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  58. package/.idea/iglooform.iml +0 -12
  59. package/.idea/modules.xml +0 -8
  60. package/.idea/prettier.xml +0 -6
  61. package/.idea/vcs.xml +0 -6
  62. package/yarn-error.log +0 -16168
@@ -0,0 +1,6 @@
1
+ // This file is generated by Umi automatically
2
+ // DO NOT CHANGE IT MANUALLY!
3
+ import type { RuntimeAntdConfig } from './types.d';
4
+ export type IRuntimeConfig = {
5
+ antd?: RuntimeAntdConfig
6
+ };
@@ -0,0 +1,14 @@
1
+ // This file is generated by Umi automatically
2
+ // DO NOT CHANGE IT MANUALLY!
3
+ import type { ConfigProviderProps } from 'antd/es/config-provider';
4
+
5
+ type Prettify<T> = {
6
+ [K in keyof T]: T[K];
7
+ } & {};
8
+
9
+ type AntdConfig = Prettify<{}
10
+ & ConfigProviderProps
11
+
12
+ >;
13
+
14
+ export type RuntimeAntdConfig = (memo: AntdConfig) => AntdConfig;
@@ -3,14 +3,16 @@
3
3
  // DO NOT CHANGE IT MANUALLY!
4
4
  import React, { useEffect, useState } from 'react';
5
5
  import { ApplyPluginsType } from 'umi';
6
- import { renderClient, RenderClientOpts } from '/Users/lei/iglooform/node_modules/@umijs/renderer-react';
6
+ import { renderClient, RenderClientOpts } from '/Users/leiemi/iglooform/node_modules/@umijs/renderer-react';
7
7
  import { createHistory } from './core/history';
8
8
  import { createPluginManager } from './core/plugin';
9
9
  import { getRoutes } from './core/route';
10
10
  import type { Location } from 'history';
11
11
 
12
+ import '/Users/leiemi/iglooform/.dumi/global.less';
12
13
  import { getPluginManager as getDumiPluginManager } from './core/plugin';
13
- import { setPluginManager as setDumiPluginManager } from '/Users/lei/iglooform/node_modules/dumi/dist/client/theme-api/utils.js';
14
+ import { setPluginManager as setDumiPluginManager } from '/Users/leiemi/iglooform/node_modules/dumi/dist/client/theme-api/utils.js';
15
+ import 'antd/dist/reset.css';
14
16
  const publicPath = '/';
15
17
  const runtimePublicPath = false;
16
18
 
package/.dumi/tmp/umi.ts CHANGED
@@ -2,15 +2,17 @@
2
2
  // This file is generated by Umi automatically
3
3
  // DO NOT CHANGE IT MANUALLY!
4
4
  import './core/polyfill';
5
+ import '/Users/leiemi/iglooform/.dumi/global.less';
5
6
  import { getPluginManager as getDumiPluginManager } from './core/plugin';
6
- import { setPluginManager as setDumiPluginManager } from '/Users/lei/iglooform/node_modules/dumi/dist/client/theme-api/utils.js';
7
- import { renderClient } from '/Users/lei/iglooform/node_modules/@umijs/renderer-react';
7
+ import { setPluginManager as setDumiPluginManager } from '/Users/leiemi/iglooform/node_modules/dumi/dist/client/theme-api/utils.js';
8
+ import 'antd/dist/reset.css';
9
+ import { renderClient } from '/Users/leiemi/iglooform/node_modules/@umijs/renderer-react';
8
10
  import { getRoutes } from './core/route';
9
11
  import { createPluginManager } from './core/plugin';
10
12
  import { createHistory } from './core/history';
11
13
  import Loading from '@@/dumi/theme/loading';
12
14
  import { ApplyPluginsType } from 'umi';
13
-
15
+ import '/Users/leiemi/iglooform/.dumi/overrides.less';
14
16
 
15
17
  const publicPath = "/";
16
18
  const runtimePublicPath = false;
@@ -39,6 +39,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
39
39
  import { jsx as _jsx } from "react/jsx-runtime";
40
40
  import { useEffect, useState, useContext, useRef } from 'react';
41
41
  import FormContext from '../form-context';
42
+ import LocaleContext from '../locale/locale-context';
42
43
  import invariant from 'invariant';
43
44
  export var compareOptions = function compareOptions(newOptions, oldOptions) {
44
45
  if (!Array.isArray(oldOptions)) {
@@ -113,6 +114,9 @@ export function optionsHOC(Component) {
113
114
  var _useContext = useContext(FormContext),
114
115
  selectDatasourceApi = _useContext.selectDatasourceApi;
115
116
 
117
+ var _useContext2 = useContext(LocaleContext),
118
+ currentLang = _useContext2.currentLang;
119
+
116
120
  var getFormInstance = rest.getFormInstance;
117
121
  var form = typeof getFormInstance === 'function' && getFormInstance();
118
122
  var dependFieldValue = form && dependField && form.getFieldValue(dependField);
@@ -192,7 +196,7 @@ export function optionsHOC(Component) {
192
196
 
193
197
  case 9:
194
198
  if (!(selectDatasourceApi && datasourceKey)) {
195
- _context.next = 28;
199
+ _context.next = 29;
196
200
  break;
197
201
  }
198
202
 
@@ -212,34 +216,35 @@ export function optionsHOC(Component) {
212
216
  }
213
217
 
214
218
  api = "".concat(selectDatasourceApi, "/").concat(datasourceKey);
215
- _context.prev = 14;
216
- _context.next = 17;
219
+ query = query ? "".concat(query, "&lang=").concat(currentLang) : "lang=".concat(currentLang);
220
+ _context.prev = 15;
221
+ _context.next = 18;
217
222
  return fetch(query ? "".concat(api, "?").concat(query) : api);
218
223
 
219
- case 17:
224
+ case 18:
220
225
  rst = _context.sent;
221
- _context.next = 20;
226
+ _context.next = 21;
222
227
  return rst.json();
223
228
 
224
- case 20:
229
+ case 21:
225
230
  _yield$rst$json = _context.sent;
226
231
  data = _yield$rst$json.data;
227
232
  return _context.abrupt("return", data || []);
228
233
 
229
- case 25:
230
- _context.prev = 25;
231
- _context.t0 = _context["catch"](14);
234
+ case 26:
235
+ _context.prev = 26;
236
+ _context.t0 = _context["catch"](15);
232
237
  return _context.abrupt("return", []);
233
238
 
234
- case 28:
239
+ case 29:
235
240
  return _context.abrupt("return", []);
236
241
 
237
- case 29:
242
+ case 30:
238
243
  case "end":
239
244
  return _context.stop();
240
245
  }
241
246
  }
242
- }, _callee, null, [[14, 25]]);
247
+ }, _callee, null, [[15, 26]]);
243
248
  }));
244
249
 
245
250
  return function calcOptions() {
@@ -255,7 +260,7 @@ export function optionsHOC(Component) {
255
260
 
256
261
  setUpdating(false);
257
262
  });
258
- }, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey]);
263
+ }, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey, currentLang]);
259
264
  return _options ? _jsx(Component, _objectSpread(_objectSpread({
260
265
  options: _options
261
266
  }, rest), {}, {
@@ -13,6 +13,8 @@ var _react = require("react");
13
13
 
14
14
  var _formContext = _interopRequireDefault(require("../form-context"));
15
15
 
16
+ var _localeContext = _interopRequireDefault(require("../locale/locale-context"));
17
+
16
18
  var _invariant = _interopRequireDefault(require("invariant"));
17
19
 
18
20
  var _excluded = ["options", "optionGroups", "getOptions", "datasourceFilters", "datasourceKey", "dependField", "children", "onSearch"];
@@ -134,6 +136,9 @@ function optionsHOC(Component) {
134
136
  var _useContext = (0, _react.useContext)(_formContext.default),
135
137
  selectDatasourceApi = _useContext.selectDatasourceApi;
136
138
 
139
+ var _useContext2 = (0, _react.useContext)(_localeContext.default),
140
+ currentLang = _useContext2.currentLang;
141
+
137
142
  var getFormInstance = rest.getFormInstance;
138
143
  var form = typeof getFormInstance === 'function' && getFormInstance();
139
144
  var dependFieldValue = form && dependField && form.getFieldValue(dependField);
@@ -213,7 +218,7 @@ function optionsHOC(Component) {
213
218
 
214
219
  case 9:
215
220
  if (!(selectDatasourceApi && datasourceKey)) {
216
- _context.next = 28;
221
+ _context.next = 29;
217
222
  break;
218
223
  }
219
224
 
@@ -233,34 +238,35 @@ function optionsHOC(Component) {
233
238
  }
234
239
 
235
240
  api = "".concat(selectDatasourceApi, "/").concat(datasourceKey);
236
- _context.prev = 14;
237
- _context.next = 17;
241
+ query = query ? "".concat(query, "&lang=").concat(currentLang) : "lang=".concat(currentLang);
242
+ _context.prev = 15;
243
+ _context.next = 18;
238
244
  return fetch(query ? "".concat(api, "?").concat(query) : api);
239
245
 
240
- case 17:
246
+ case 18:
241
247
  rst = _context.sent;
242
- _context.next = 20;
248
+ _context.next = 21;
243
249
  return rst.json();
244
250
 
245
- case 20:
251
+ case 21:
246
252
  _yield$rst$json = _context.sent;
247
253
  data = _yield$rst$json.data;
248
254
  return _context.abrupt("return", data || []);
249
255
 
250
- case 25:
251
- _context.prev = 25;
252
- _context.t0 = _context["catch"](14);
256
+ case 26:
257
+ _context.prev = 26;
258
+ _context.t0 = _context["catch"](15);
253
259
  return _context.abrupt("return", []);
254
260
 
255
- case 28:
261
+ case 29:
256
262
  return _context.abrupt("return", []);
257
263
 
258
- case 29:
264
+ case 30:
259
265
  case "end":
260
266
  return _context.stop();
261
267
  }
262
268
  }
263
- }, _callee, null, [[14, 25]]);
269
+ }, _callee, null, [[15, 26]]);
264
270
  }));
265
271
 
266
272
  return function calcOptions() {
@@ -276,7 +282,7 @@ function optionsHOC(Component) {
276
282
 
277
283
  setUpdating(false);
278
284
  });
279
- }, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey]);
285
+ }, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey, currentLang]);
280
286
  return _options ? (0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
281
287
  options: _options
282
288
  }, rest), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.5.62",
3
+ "version": "2.5.63",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",
@@ -1,59 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
- </HTMLCodeStyleSettings>
6
- <JSCodeStyleSettings version="0">
7
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
- <option name="USE_DOUBLE_QUOTES" value="false" />
10
- <option name="FORCE_QUOTE_STYlE" value="true" />
11
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
12
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
- </JSCodeStyleSettings>
15
- <TypeScriptCodeStyleSettings version="0">
16
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
17
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
18
- <option name="USE_DOUBLE_QUOTES" value="false" />
19
- <option name="FORCE_QUOTE_STYlE" value="true" />
20
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
21
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
22
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
23
- </TypeScriptCodeStyleSettings>
24
- <VueCodeStyleSettings>
25
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
26
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
27
- </VueCodeStyleSettings>
28
- <codeStyleSettings language="HTML">
29
- <option name="SOFT_MARGINS" value="80" />
30
- <indentOptions>
31
- <option name="INDENT_SIZE" value="2" />
32
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
33
- <option name="TAB_SIZE" value="2" />
34
- </indentOptions>
35
- </codeStyleSettings>
36
- <codeStyleSettings language="JavaScript">
37
- <option name="SOFT_MARGINS" value="80" />
38
- <indentOptions>
39
- <option name="INDENT_SIZE" value="2" />
40
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
41
- <option name="TAB_SIZE" value="2" />
42
- </indentOptions>
43
- </codeStyleSettings>
44
- <codeStyleSettings language="TypeScript">
45
- <option name="SOFT_MARGINS" value="80" />
46
- <indentOptions>
47
- <option name="INDENT_SIZE" value="2" />
48
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
49
- <option name="TAB_SIZE" value="2" />
50
- </indentOptions>
51
- </codeStyleSettings>
52
- <codeStyleSettings language="Vue">
53
- <option name="SOFT_MARGINS" value="80" />
54
- <indentOptions>
55
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
56
- </indentOptions>
57
- </codeStyleSettings>
58
- </code_scheme>
59
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/iglooform.iml" filepath="$PROJECT_DIR$/.idea/iglooform.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myConfigurationMode" value="MANUAL" />
5
- </component>
6
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>