iglooform 3.3.7 → 3.3.8

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 (82) hide show
  1. package/.dumi/tmp/core/defineApp.ts +1 -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 +2 -2
  6. package/.dumi/tmp/core/polyfill.ts +197 -197
  7. package/.dumi/tmp/core/route.tsx +33 -33
  8. package/.dumi/tmp/dumi/exports.ts +1 -1
  9. package/.dumi/tmp/dumi/locales/runtime.tsx +2 -2
  10. package/.dumi/tmp/dumi/meta/index.ts +33 -33
  11. package/.dumi/tmp/dumi/meta/runtime.ts +1 -1
  12. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +1 -1
  13. package/.dumi/tmp/dumi/theme/builtins/API.ts +1 -1
  14. package/.dumi/tmp/dumi/theme/builtins/Badge.ts +1 -1
  15. package/.dumi/tmp/dumi/theme/builtins/Container.ts +1 -1
  16. package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +1 -1
  17. package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +1 -1
  18. package/.dumi/tmp/dumi/theme/builtins/Table.ts +1 -1
  19. package/.dumi/tmp/dumi/theme/builtins/Tree.ts +1 -1
  20. package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +1 -1
  21. package/.dumi/tmp/dumi/theme/loading.tsx +1 -1
  22. package/.dumi/tmp/dumi/theme/slots/ColorSwitch.ts +1 -1
  23. package/.dumi/tmp/dumi/theme/slots/Content.ts +1 -1
  24. package/.dumi/tmp/dumi/theme/slots/ContentFooter.ts +1 -1
  25. package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +1 -1
  26. package/.dumi/tmp/dumi/theme/slots/Features.ts +1 -1
  27. package/.dumi/tmp/dumi/theme/slots/Footer.ts +1 -1
  28. package/.dumi/tmp/dumi/theme/slots/Header.ts +1 -1
  29. package/.dumi/tmp/dumi/theme/slots/HeaderExtra.ts +1 -1
  30. package/.dumi/tmp/dumi/theme/slots/Hero.ts +1 -1
  31. package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +1 -1
  32. package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +1 -1
  33. package/.dumi/tmp/dumi/theme/slots/Logo.ts +1 -1
  34. package/.dumi/tmp/dumi/theme/slots/Navbar.ts +1 -1
  35. package/.dumi/tmp/dumi/theme/slots/NavbarExtra.ts +1 -1
  36. package/.dumi/tmp/dumi/theme/slots/NotFound.ts +1 -1
  37. package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +1 -1
  38. package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +1 -1
  39. package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +1 -1
  40. package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +2 -2
  41. package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +1 -1
  42. package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +1 -1
  43. package/.dumi/tmp/dumi/theme/slots/SocialIcon.ts +1 -1
  44. package/.dumi/tmp/dumi/theme/slots/Toc.ts +1 -1
  45. package/.dumi/tmp/exports.ts +5 -5
  46. package/.dumi/tmp/testBrowser.tsx +3 -3
  47. package/.dumi/tmp/umi.ts +4 -4
  48. package/.idea/codeStyles/Project.xml +59 -0
  49. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  50. package/.idea/iglooform.iml +7 -4
  51. package/.idea/prettier.xml +6 -0
  52. package/es/button/style/index.less +24 -20
  53. package/es/media/media.js +1 -1
  54. package/lib/button/style/index.less +24 -20
  55. package/lib/media/media.js +1 -1
  56. package/package.json +1 -1
  57. package/yarn-error.log +16168 -0
  58. package/.idea/misc.xml +0 -5
  59. package/es/config-provider.d.ts +0 -9
  60. package/es/form/hsteps/index.d.ts +0 -21
  61. package/es/form/step-items-selection/components/checkbox-group-items/style/index.d.ts +0 -1
  62. package/es/form/step-items-selection/components/item-info/style/index.d.ts +0 -1
  63. package/es/form/step-items-selection/components/section-of-item-condition/hooks/useAdaptAssertConfig.d.ts +0 -4
  64. package/es/form/step-items-selection/components/section-of-item-condition/style/index.d.ts +0 -1
  65. package/es/index.d.ts +0 -49
  66. package/es/locale/locale-provider.d.ts +0 -13
  67. package/es/media/file-icon.d.ts +0 -9
  68. package/es/types.d.ts +0 -189
  69. package/es/utils/form-utils.d.ts +0 -79
  70. package/es/utils/tools.d.ts +0 -5
  71. package/lib/config-provider.d.ts +0 -9
  72. package/lib/form/hsteps/index.d.ts +0 -21
  73. package/lib/form/step-items-selection/components/checkbox-group-items/style/index.d.ts +0 -1
  74. package/lib/form/step-items-selection/components/item-info/style/index.d.ts +0 -1
  75. package/lib/form/step-items-selection/components/section-of-item-condition/hooks/useAdaptAssertConfig.d.ts +0 -4
  76. package/lib/form/step-items-selection/components/section-of-item-condition/style/index.d.ts +0 -1
  77. package/lib/index.d.ts +0 -49
  78. package/lib/locale/locale-provider.d.ts +0 -13
  79. package/lib/media/file-icon.d.ts +0 -9
  80. package/lib/types.d.ts +0 -189
  81. package/lib/utils/form-utils.d.ts +0 -79
  82. package/lib/utils/tools.d.ts +0 -5
package/lib/types.d.ts DELETED
@@ -1,189 +0,0 @@
1
- /// <reference path="../typings.d.ts" />
2
- import { BlinkIdSingleSideRecognizerResult } from '@microblink/blinkid-in-browser-sdk';
3
- import { FormItemProps, FormInstance } from 'antd/es/form';
4
- import { ReactNode } from 'react';
5
- import { NamePath } from 'rc-field-form/lib/interface';
6
- import { CheckboxOptionType } from 'antd/es/checkbox';
7
- import { SelectProps } from 'antd/es/select';
8
- export { Rule } from 'rc-field-form/lib/interface';
9
- export interface OCRHooks {
10
- microBlink?: {
11
- initResult: {
12
- error?: string;
13
- failed: boolean;
14
- };
15
- recognize: ((file: File) => Promise<BlinkIdSingleSideRecognizerResult | null>) | null;
16
- loading?: boolean;
17
- };
18
- }
19
- export interface OCRConfig {
20
- microBlink?: {
21
- licenseKey: string;
22
- };
23
- }
24
- export type FormItemName = NamePath;
25
- export interface FormBasicConfig {
26
- config: FormItemConfig;
27
- className?: string;
28
- style?: Object;
29
- locales?: {
30
- cancelText?: string;
31
- submitText?: string;
32
- previewText?: string;
33
- nextText?: string;
34
- continueText?: string;
35
- validateMessages?: Object;
36
- };
37
- initialValues?: any;
38
- form?: FormInstance;
39
- onCancel?(): void;
40
- onSubmit?(values: Object, allValues?: Object): any;
41
- requiredMark?: boolean;
42
- showSubmitButton?: boolean;
43
- getScrollContainer?: () => HTMLElement | null;
44
- onFirstModified?: () => any;
45
- uploadApi?: string;
46
- selectDatasourceApi?: string;
47
- validationRule?: string;
48
- getRuleValidationApi?: string;
49
- stepDirection?: 'vertical' | 'horizontal';
50
- customizeComponents?: {
51
- [name: string]: FC;
52
- };
53
- ocr?: OCRConfig;
54
- validationCodeExtraParams?: Record<string, any>;
55
- onValuesChange?: (changedValues: any, values: any) => void;
56
- }
57
- export type FormItemAssert = {
58
- field: NamePath;
59
- value?: any;
60
- operation?: 'eq' | 'ne' | 'in' | 'ni' | 'lt' | 'le' | 'gt' | 'ge' | 'co' | 'nc' | 'filled' | 'unfilled' | 'co-some' | 'co-every' | 'some-in' | 'every-in';
61
- };
62
- export type FormItemCopyValue = {
63
- assert: FormItemAssert;
64
- copyFrom: NamePath;
65
- disabled?: boolean;
66
- };
67
- export type FormItemSelectValue = {
68
- assert: FormItemAssert;
69
- value: any;
70
- disabled?: boolean;
71
- };
72
- export interface FormItemExtraConfig extends FormItemProps {
73
- labelTooltip?: string;
74
- elements?: FormItemConfig[];
75
- required?: boolean;
76
- requiredAsserts?: FormItemAssert[];
77
- extraLabel?: any;
78
- xl?: number;
79
- md?: number;
80
- xs?: number;
81
- span?: number;
82
- areaCode?: number | string | (number | string)[];
83
- phoneNumber?: number | string;
84
- mergeRules?: boolean;
85
- dependencies?: NamePath[];
86
- antdDependencies?: NamePath[];
87
- asserts?: FormItemAssert[];
88
- shouldRender?: (form?: FormInstance) => boolean;
89
- ignore?: boolean;
90
- copyValue?: FormItemCopyValue;
91
- selectValue?: FormItemSelectValue[];
92
- disabled?: boolean | FormItemAssert | FormItemAssert[];
93
- halfRow?: boolean;
94
- fullRow?: boolean;
95
- limit?: number;
96
- hideWhenPreview?: boolean;
97
- hideWhenEdit?: boolean;
98
- requiredMessage?: string | ReactNode;
99
- showOptional?: boolean;
100
- previewFormater?(value: any, form?: FormInstance): any;
101
- handleNext?(values: any): any;
102
- render?(preview: boolean, form?: FormInstance, value?: any, onChange?: (params: any) => any, setShowStepButton?: IglooComponentProps['setShowStepButton']): any;
103
- locales?: {
104
- [key: string]: string;
105
- };
106
- options?: (CheckboxOptionType & {
107
- extraInfo?: {
108
- content: any;
109
- shownTrigger: 'unchecked' | 'checked' | 'all';
110
- };
111
- })[] | SelectProps['options'];
112
- sendOtp?: (value: any) => any;
113
- dependField?: FormItemName;
114
- countDownSeconds?: number;
115
- getButtonDisabledState?: (form: FormInstance) => boolean;
116
- getPreviousDisabledState?: (form: FormInstance) => boolean;
117
- handleUpload?(file: File): PromiseLike<string>;
118
- withoutForm?: boolean;
119
- disableEditButton?: boolean;
120
- hidePreviewDivider?: boolean;
121
- valueFormater?: (value: any) => any;
122
- currentStep?: number;
123
- subscribedFields?: FormItemName[];
124
- description?: string | React.ReactNode;
125
- dateLimitationType?: 'relative' | 'absolute';
126
- absoluteRangeStart?: number;
127
- absoluteRangeEnd?: number;
128
- relativeRangeStart?: {
129
- type: 'day' | 'month' | 'year';
130
- quantity: number;
131
- pattern?: string;
132
- dependField?: NamePath;
133
- };
134
- relativeRangeEnd?: {
135
- type: 'day' | 'month' | 'year';
136
- quantity: number;
137
- pattern?: string;
138
- dependField?: NamePath;
139
- };
140
- validationCode?: {
141
- code: string;
142
- errorMessage: string;
143
- warningOnly?: boolean;
144
- }[];
145
- length?: number;
146
- minLength?: number;
147
- maxLength?: number;
148
- idType?: 'KTP' | 'NIK';
149
- validationRule?: string;
150
- shouldRenderCode?: string;
151
- disabledCode?: string;
152
- automaticCalcCode?: string;
153
- enableAutomaticCalc?: boolean;
154
- [key: string]: any;
155
- }
156
- export interface FormItemConfig extends FormItemExtraConfig {
157
- type?: string;
158
- name?: NamePath;
159
- label?: string | React.ReactNode;
160
- previewLabel?: string | React.ReactNode;
161
- labelProps?: any;
162
- contentProps?: any;
163
- ocr?: {
164
- vender: string;
165
- outputMap: {
166
- field: string[];
167
- source: string[];
168
- }[];
169
- };
170
- }
171
- export type FormItemPropsHandler = (config: FormItemConfig) => FormItemConfig;
172
- export interface FC<P = {}> extends React.FunctionComponent<P> {
173
- formItemPropsHandler?: FormItemPropsHandler;
174
- isPreviewSupport?: boolean;
175
- }
176
- export interface Form extends React.ForwardRefExoticComponent<FormBasicConfig & React.RefAttributes<any>> {
177
- useForm: () => FormInstance;
178
- }
179
- export interface IglooComponentProps {
180
- validateField?: (nameList?: NamePath[]) => Promise<any>;
181
- containerRef?: React.RefObject<any>;
182
- setFieldError?(errorMsg?: string): void;
183
- setFieldValue?(value?: any): void;
184
- setShowStepButton?: (showButton: boolean) => void;
185
- getFormInstance?: () => FormInstance;
186
- locales?: {
187
- [key: string]: string;
188
- };
189
- }
@@ -1,79 +0,0 @@
1
- import React from 'react';
2
- import { FormInstance } from 'antd/es/form';
3
- import { FormItemConfig, FormItemExtraConfig, FormItemName, FormItemCopyValue, FormItemSelectValue, FormItemAssert, Rule } from '../types';
4
- import { NamePath } from 'antd/es/form/interface';
5
- export declare const calcNamePath: (parentName: FormItemName | undefined, name: FormItemName | undefined) => any[];
6
- export declare const testAssert: (form: FormInstance, assert: FormItemAssert) => boolean;
7
- export declare const calcFormItemProps: (config: FormItemConfig, extraProps: FormItemExtraConfig, form?: FormInstance, parentName?: FormItemName, validationCodeExtraParams?: Record<string, any>) => {
8
- colProps: {
9
- span: number;
10
- xs: number;
11
- sm: number;
12
- md: number;
13
- halfRow: boolean | undefined;
14
- };
15
- formItemProps: {
16
- name: any[];
17
- className: string | undefined;
18
- initialValue: any;
19
- copiedValue: {
20
- copied: boolean;
21
- value?: undefined;
22
- disabled?: undefined;
23
- } | {
24
- copied: boolean;
25
- value: any;
26
- disabled: boolean | undefined;
27
- };
28
- selectedValue: {
29
- selected: boolean;
30
- value?: undefined;
31
- disabled?: undefined;
32
- } | {
33
- selected: boolean;
34
- value: any;
35
- disabled: boolean | undefined;
36
- };
37
- normalize: ((value: any, prevValue: any, allValues: import("rc-field-form/lib/interface").Store) => any) | undefined;
38
- rules: Rule[];
39
- validateTrigger: any[];
40
- label: import("react/jsx-runtime").JSX.Element | null;
41
- getValueFromEvent: ((...args: import("rc-field-form/lib/interface").EventArgs) => any) | undefined;
42
- getValueProps: ((value: any) => Record<string, unknown>) | undefined;
43
- extra: false | "" | 0 | import("react/jsx-runtime").JSX.Element | null | undefined;
44
- help: React.ReactNode;
45
- valuePropName: string | undefined;
46
- messageVariables: {
47
- label: string;
48
- };
49
- dependencies: any[] | undefined;
50
- };
51
- elementProps: {
52
- [key: string]: any;
53
- };
54
- display: any;
55
- previewFormater: ((value: any, form?: FormInstance<any> | undefined) => any) | undefined;
56
- };
57
- export declare const calcDisabled: (disabled?: boolean | FormItemAssert | FormItemAssert[], form?: FormInstance, disabledCode?: string, name?: FormItemName, parentName?: FormItemName) => any;
58
- export declare const calcCopyValue: (copyValue?: FormItemCopyValue, form?: FormInstance) => {
59
- copied: boolean;
60
- value?: undefined;
61
- disabled?: undefined;
62
- } | {
63
- copied: boolean;
64
- value: any;
65
- disabled: boolean | undefined;
66
- };
67
- export declare const calcSelectValue: (selectValue?: FormItemSelectValue[], form?: FormInstance) => {
68
- selected: boolean;
69
- value?: undefined;
70
- disabled?: undefined;
71
- } | {
72
- selected: boolean;
73
- value: any;
74
- disabled: boolean | undefined;
75
- };
76
- export declare const calcShouldRender: (name: NamePath, parentName: NamePath, dependencies?: NamePath[], asserts?: FormItemAssert[], shouldRender?: ((form?: FormInstance) => boolean) | undefined, shouldRenderCode?: string, form?: FormInstance) => any;
77
- export declare const automaticCalculate: (name: NamePath, parentName: NamePath, automaticCalcCode?: string, form?: FormInstance) => void;
78
- export declare const getRuleValidation: (url: string, rule: string | string[], values?: any, lang?: string) => Promise<any>;
79
- export declare const calcAddableSectionAssertField: (name: any[], field: FormItemAssert['field'], index: number, elements: FormItemConfig[] | React.ReactElement[]) => any;
@@ -1,5 +0,0 @@
1
- export declare const parseFileSize: (size: number) => string;
2
- export declare function classifyType(mimeType: string): string;
3
- export declare const downloadByUrl: (filename: string, url: string) => void;
4
- export declare const getFileNameByUrl: (fileUrl: string) => string;
5
- export declare const getResourceContentType: (resourceUrl: string) => Promise<string | undefined>;