iglooform 3.7.4 → 3.7.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/core/defineApp.ts +1 -1
- package/.dumi/tmp/core/helmet.ts +1 -1
- package/.dumi/tmp/core/history.ts +1 -1
- package/.dumi/tmp/core/historyIntelli.ts +1 -1
- package/.dumi/tmp/core/plugin.ts +2 -2
- package/.dumi/tmp/core/polyfill.ts +197 -197
- package/.dumi/tmp/core/route.tsx +33 -33
- package/.dumi/tmp/dumi/exports.ts +1 -1
- package/.dumi/tmp/dumi/locales/runtime.tsx +2 -2
- package/.dumi/tmp/dumi/meta/index.ts +33 -33
- package/.dumi/tmp/dumi/meta/runtime.ts +1 -1
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +2 -2
- package/.dumi/tmp/dumi/theme/builtins/API.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/Badge.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/Container.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/Table.ts +1 -1
- package/.dumi/tmp/dumi/theme/builtins/Tree.ts +1 -1
- package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +1 -1
- package/.dumi/tmp/dumi/theme/loading.tsx +1 -1
- package/.dumi/tmp/dumi/theme/slots/ColorSwitch.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Content.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/ContentFooter.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Features.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Footer.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Header.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/HeaderExtra.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Hero.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Logo.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Navbar.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/NavbarExtra.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/NotFound.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +2 -2
- package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/SocialIcon.ts +1 -1
- package/.dumi/tmp/dumi/theme/slots/Toc.ts +1 -1
- package/.dumi/tmp/exports.ts +5 -5
- package/.dumi/tmp/testBrowser.tsx +3 -3
- package/.dumi/tmp/umi.ts +4 -4
- package/es/checkbox/index.d.ts +24 -0
- package/es/form/addable-section/index.js +17 -0
- package/es/utils/option-utils.d.ts +29 -0
- package/lib/checkbox/index.d.ts +24 -0
- package/lib/form/addable-section/index.js +17 -0
- package/lib/utils/option-utils.d.ts +29 -0
- package/package.json +1 -1
- package/.idea/codeStyles/Project.xml +0 -80
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/iglooformv3.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
|
@@ -182,6 +182,23 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
182
182
|
return calcAddableSectionAssertField(namePath, path, index, elements);
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
+
if (child.copyValue) {
|
|
186
|
+
_child.copyValue = _objectSpread(_objectSpread({}, child.copyValue), {}, {
|
|
187
|
+
assert: _objectSpread(_objectSpread({}, child.copyValue.assert), {}, {
|
|
188
|
+
field: calcAddableSectionAssertField(namePath, child.copyValue.assert.field, index, elements)
|
|
189
|
+
}),
|
|
190
|
+
copyFrom: calcAddableSectionAssertField(namePath, child.copyValue.copyFrom, index, elements)
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (Array.isArray(child.selectValue)) {
|
|
194
|
+
_child.selectValue = child.selectValue.map(function (sv) {
|
|
195
|
+
return _objectSpread(_objectSpread({}, sv), {}, {
|
|
196
|
+
assert: _objectSpread(_objectSpread({}, sv.assert), {}, {
|
|
197
|
+
field: calcAddableSectionAssertField(namePath, sv.assert.field, index, elements)
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}
|
|
185
202
|
return /*#__PURE__*/_jsx(Element, {
|
|
186
203
|
parentName: parentName,
|
|
187
204
|
config: _child,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import { FormInstance } from 'antd/es/form';
|
|
4
|
+
import { NamePath } from 'antd/es/form/interface';
|
|
5
|
+
import { SelectProps, SelectValue } from 'antd/es/select';
|
|
6
|
+
export declare const compareOptions: (newOptions: any[], oldOptions?: any[]) => boolean;
|
|
7
|
+
export declare const compareSelected: (newValue: any | any[], oldValue: any | any[]) => boolean;
|
|
8
|
+
type Options = SelectProps<SelectValue>['options'];
|
|
9
|
+
export interface HOCProps extends IglooComponentProps {
|
|
10
|
+
options?: Options;
|
|
11
|
+
onSearch?: any;
|
|
12
|
+
getOptions?: (form: FormInstance) => any[];
|
|
13
|
+
optionGroups?: {
|
|
14
|
+
parentKey: string;
|
|
15
|
+
options: Options;
|
|
16
|
+
}[];
|
|
17
|
+
datasourceFilters?: string[];
|
|
18
|
+
datasourceKey?: string;
|
|
19
|
+
datasourceApi?: string;
|
|
20
|
+
dependField?: NamePath;
|
|
21
|
+
passCompareOptions?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ComponentProps extends IglooComponentProps {
|
|
24
|
+
options?: Options;
|
|
25
|
+
clearWhenOptionsUpdated?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function optionsHOC<T>(Component: FC<T>): FC<PropsWithChildren<HOCProps & T>>;
|
|
28
|
+
export declare function previewSelectedOptions(options: Options, value: any): any;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxProps, CheckboxGroupProps } from 'antd/es/checkbox';
|
|
3
|
+
import { FC, IglooComponentProps } from '../types';
|
|
4
|
+
import { ComponentProps } from '../utils/option-utils';
|
|
5
|
+
import { DefaultOptionType } from 'rc-select/lib/Select';
|
|
6
|
+
import './style';
|
|
7
|
+
interface Props extends IglooComponentProps, CheckboxProps {
|
|
8
|
+
}
|
|
9
|
+
export interface Option extends DefaultOptionType {
|
|
10
|
+
extraInfo?: {
|
|
11
|
+
content: any;
|
|
12
|
+
shownTrigger: 'unchecked' | 'checked' | 'all';
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface IProps extends IglooComponentProps, Omit<CheckboxGroupProps, 'options'>, ComponentProps {
|
|
16
|
+
className?: string;
|
|
17
|
+
radioType?: string;
|
|
18
|
+
options: Option[];
|
|
19
|
+
preview?: boolean;
|
|
20
|
+
mutuallyExclusions?: Record<string, string[]>;
|
|
21
|
+
}
|
|
22
|
+
declare const IglooCheckbox: FC<Props>;
|
|
23
|
+
export default IglooCheckbox;
|
|
24
|
+
export declare const CheckboxGroup: FC<import("react").PropsWithChildren<import("../utils/option-utils").HOCProps & IProps>>;
|
|
@@ -190,6 +190,23 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
190
190
|
return (0, _formUtils.calcAddableSectionAssertField)(namePath, path, index, elements);
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
|
+
if (child.copyValue) {
|
|
194
|
+
_child.copyValue = _objectSpread(_objectSpread({}, child.copyValue), {}, {
|
|
195
|
+
assert: _objectSpread(_objectSpread({}, child.copyValue.assert), {}, {
|
|
196
|
+
field: (0, _formUtils.calcAddableSectionAssertField)(namePath, child.copyValue.assert.field, index, elements)
|
|
197
|
+
}),
|
|
198
|
+
copyFrom: (0, _formUtils.calcAddableSectionAssertField)(namePath, child.copyValue.copyFrom, index, elements)
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (Array.isArray(child.selectValue)) {
|
|
202
|
+
_child.selectValue = child.selectValue.map(function (sv) {
|
|
203
|
+
return _objectSpread(_objectSpread({}, sv), {}, {
|
|
204
|
+
assert: _objectSpread(_objectSpread({}, sv.assert), {}, {
|
|
205
|
+
field: (0, _formUtils.calcAddableSectionAssertField)(namePath, sv.assert.field, index, elements)
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
193
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.default, {
|
|
194
211
|
parentName: parentName,
|
|
195
212
|
config: _child,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import { FormInstance } from 'antd/es/form';
|
|
4
|
+
import { NamePath } from 'antd/es/form/interface';
|
|
5
|
+
import { SelectProps, SelectValue } from 'antd/es/select';
|
|
6
|
+
export declare const compareOptions: (newOptions: any[], oldOptions?: any[]) => boolean;
|
|
7
|
+
export declare const compareSelected: (newValue: any | any[], oldValue: any | any[]) => boolean;
|
|
8
|
+
type Options = SelectProps<SelectValue>['options'];
|
|
9
|
+
export interface HOCProps extends IglooComponentProps {
|
|
10
|
+
options?: Options;
|
|
11
|
+
onSearch?: any;
|
|
12
|
+
getOptions?: (form: FormInstance) => any[];
|
|
13
|
+
optionGroups?: {
|
|
14
|
+
parentKey: string;
|
|
15
|
+
options: Options;
|
|
16
|
+
}[];
|
|
17
|
+
datasourceFilters?: string[];
|
|
18
|
+
datasourceKey?: string;
|
|
19
|
+
datasourceApi?: string;
|
|
20
|
+
dependField?: NamePath;
|
|
21
|
+
passCompareOptions?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ComponentProps extends IglooComponentProps {
|
|
24
|
+
options?: Options;
|
|
25
|
+
clearWhenOptionsUpdated?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function optionsHOC<T>(Component: FC<T>): FC<PropsWithChildren<HOCProps & T>>;
|
|
28
|
+
export declare function previewSelectedOptions(options: Options, value: any): any;
|
|
29
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,80 +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
|
-
<JetCodeStyleSettings>
|
|
16
|
-
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
|
17
|
-
</JetCodeStyleSettings>
|
|
18
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
19
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
20
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
21
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
22
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
23
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
24
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
25
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
26
|
-
</TypeScriptCodeStyleSettings>
|
|
27
|
-
<VueCodeStyleSettings>
|
|
28
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
29
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
30
|
-
</VueCodeStyleSettings>
|
|
31
|
-
<codeStyleSettings language="HTML">
|
|
32
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
33
|
-
<indentOptions>
|
|
34
|
-
<option name="INDENT_SIZE" value="2" />
|
|
35
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
36
|
-
<option name="TAB_SIZE" value="2" />
|
|
37
|
-
</indentOptions>
|
|
38
|
-
</codeStyleSettings>
|
|
39
|
-
<codeStyleSettings language="JAVA">
|
|
40
|
-
<indentOptions>
|
|
41
|
-
<option name="INDENT_SIZE" value="2" />
|
|
42
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
43
|
-
<option name="TAB_SIZE" value="2" />
|
|
44
|
-
</indentOptions>
|
|
45
|
-
</codeStyleSettings>
|
|
46
|
-
<codeStyleSettings language="JavaScript">
|
|
47
|
-
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
|
|
48
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
49
|
-
<indentOptions>
|
|
50
|
-
<option name="INDENT_SIZE" value="2" />
|
|
51
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
52
|
-
<option name="TAB_SIZE" value="2" />
|
|
53
|
-
</indentOptions>
|
|
54
|
-
</codeStyleSettings>
|
|
55
|
-
<codeStyleSettings language="TypeScript">
|
|
56
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
57
|
-
<indentOptions>
|
|
58
|
-
<option name="INDENT_SIZE" value="2" />
|
|
59
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
60
|
-
<option name="TAB_SIZE" value="2" />
|
|
61
|
-
</indentOptions>
|
|
62
|
-
</codeStyleSettings>
|
|
63
|
-
<codeStyleSettings language="Vue">
|
|
64
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
65
|
-
<indentOptions>
|
|
66
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
67
|
-
</indentOptions>
|
|
68
|
-
</codeStyleSettings>
|
|
69
|
-
<codeStyleSettings language="XML">
|
|
70
|
-
<indentOptions>
|
|
71
|
-
<option name="INDENT_SIZE" value="2" />
|
|
72
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
73
|
-
<option name="TAB_SIZE" value="2" />
|
|
74
|
-
</indentOptions>
|
|
75
|
-
</codeStyleSettings>
|
|
76
|
-
<codeStyleSettings language="kotlin">
|
|
77
|
-
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
|
78
|
-
</codeStyleSettings>
|
|
79
|
-
</code_scheme>
|
|
80
|
-
</component>
|
package/.idea/iglooformv3.iml
DELETED
|
@@ -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/iglooformv3.iml" filepath="$PROJECT_DIR$/.idea/iglooformv3.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED