@formio/js 5.0.0-bb.dev.6 → 5.0.0-dev.5543.201e658
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/dist/fonts/bootstrap-icons.woff +0 -0
- package/dist/fonts/bootstrap-icons.woff2 +0 -0
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +4089 -4088
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +5 -5
- package/dist/formio.full.css +101 -4
- package/dist/formio.full.js +5080 -5079
- package/dist/formio.full.min.css +3 -3
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +5 -5
- package/dist/formio.js +1091 -1090
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -2
- package/dist/formio.utils.js +7 -7
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +3 -3
- package/lib/cjs/Form.js +16 -3
- package/lib/cjs/Webform.d.ts +1 -0
- package/lib/cjs/Webform.js +28 -8
- package/lib/cjs/WebformBuilder.js +4 -2
- package/lib/cjs/components/address/fixtures/comp3.js +1 -1
- package/lib/cjs/components/button/Button.js +7 -1
- package/lib/cjs/components/datagrid/fixtures/comp6.js +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +4 -3
- package/lib/cjs/components/recaptcha/ReCaptcha.js +44 -44
- package/lib/cjs/formio.form.d.ts +1 -2
- package/lib/cjs/formio.form.js +1 -17
- package/lib/cjs/providers/storage/s3.d.ts +4 -1
- package/lib/cjs/providers/storage/s3.js +1 -29
- package/lib/cjs/translations/en.d.ts +2 -0
- package/lib/cjs/translations/en.js +2 -0
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +1 -1
- package/lib/cjs/utils/utils.js +2 -1
- package/lib/cjs/validator/Validator.d.ts +1 -1
- package/lib/cjs/validator/rules/Select.d.ts +1 -1
- package/lib/mjs/Form.js +16 -3
- package/lib/mjs/Webform.d.ts +1 -0
- package/lib/mjs/Webform.js +28 -8
- package/lib/mjs/WebformBuilder.js +4 -2
- package/lib/mjs/components/address/fixtures/comp3.js +1 -1
- package/lib/mjs/components/button/Button.js +7 -1
- package/lib/mjs/components/datagrid/fixtures/comp6.js +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +4 -3
- package/lib/mjs/components/recaptcha/ReCaptcha.js +30 -41
- package/lib/mjs/formio.form.d.ts +1 -2
- package/lib/mjs/formio.form.js +1 -16
- package/lib/mjs/providers/storage/s3.d.ts +4 -1
- package/lib/mjs/providers/storage/s3.js +1 -6
- package/lib/mjs/translations/en.d.ts +2 -0
- package/lib/mjs/translations/en.js +2 -0
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
- package/lib/mjs/utils/utils.js +2 -1
- package/lib/mjs/validator/Validator.d.ts +1 -1
- package/lib/mjs/validator/rules/Select.d.ts +1 -1
- package/package.json +5 -4
- package/types/builders.d.ts +7 -0
- package/types/components/_classes/component/component.d.ts +174 -0
- package/types/components/_classes/componentmodal/componentmodal.d.ts +31 -0
- package/types/components/_classes/field/field.d.ts +5 -0
- package/types/components/_classes/input/input.d.ts +30 -0
- package/types/components/_classes/multivalue/multivalue.d.ts +16 -0
- package/types/components/_classes/nested/nestedComponent.d.ts +61 -0
- package/types/components/_classes/widgetcomponent/widgetComponent.d.ts +6 -0
- package/types/components/components.d.ts +69 -0
- package/types/components/schema.d.ts +240 -0
- package/types/displays.d.ts +7 -0
- package/types/element.d.ts +45 -0
- package/types/eventEmitter.d.ts +3 -0
- package/types/form.d.ts +18 -0
- package/types/formbuilder.d.ts +6 -0
- package/types/formio.d.ts +121 -0
- package/types/index.d.ts +18 -0
- package/types/licenses.d.ts +7 -0
- package/types/providers.d.ts +8 -0
- package/types/rulesEngine/conjunctions.d.ts +7 -0
- package/types/rulesEngine/operators.d.ts +7 -0
- package/types/rulesEngine/quckRules.d.ts +7 -0
- package/types/rulesEngine/rules.d.ts +7 -0
- package/types/rulesEngine/transformers.d.ts +7 -0
- package/types/rulesEngine/valueSources.d.ts +7 -0
- package/types/templates.d.ts +8 -0
- package/types/utils.d.ts +157 -0
- package/types/widgets.d.ts +4 -0
package/types/utils.d.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as moment from 'moment';
|
|
2
|
+
|
|
3
|
+
export type AnyForJSON = { [key: string]: any } | any;
|
|
4
|
+
|
|
5
|
+
export namespace Utils {
|
|
6
|
+
const ConditionOperators: any;
|
|
7
|
+
const componentValueTypes: { [key: string]: string };
|
|
8
|
+
const Evaluator: any;
|
|
9
|
+
const _: any;
|
|
10
|
+
function getComponentSavedTypes(schema: object): Array<any> | null;
|
|
11
|
+
function evaluate(
|
|
12
|
+
func: any,
|
|
13
|
+
args: { component: any; form: any; instance: any; row: any; data: any } | any,
|
|
14
|
+
ret: any,
|
|
15
|
+
tokenize?: any,
|
|
16
|
+
): any;
|
|
17
|
+
function getRandomComponentId(): string;
|
|
18
|
+
function getPropertyValue(style: CSSStyleDeclaration, prop: string): number;
|
|
19
|
+
function getElementRect(element: any): { x: number; y: number; width: number; height: number };
|
|
20
|
+
function boolValue(value: boolean | string): boolean;
|
|
21
|
+
function isMongoId(text: any): any;
|
|
22
|
+
function checkCalculated(component: { calculateValue?: any; key: any } | any, submission: any, rowData: any): void;
|
|
23
|
+
function checkSimpleConditional(
|
|
24
|
+
component: any /* unused */,
|
|
25
|
+
condition: { eq: any; show: any; when: any } & any,
|
|
26
|
+
row: any,
|
|
27
|
+
data: any,
|
|
28
|
+
instance: any
|
|
29
|
+
): boolean;
|
|
30
|
+
function checkCustomConditional(
|
|
31
|
+
component: any /* unused */,
|
|
32
|
+
custom: string | any,
|
|
33
|
+
row: any,
|
|
34
|
+
data: any,
|
|
35
|
+
form: any,
|
|
36
|
+
variable: any,
|
|
37
|
+
onError: any,
|
|
38
|
+
instance: { evaluate?: any } | any,
|
|
39
|
+
): any;
|
|
40
|
+
function checkJsonConditional(
|
|
41
|
+
component: { key: string | any } | any,
|
|
42
|
+
json: AnyForJSON,
|
|
43
|
+
row: any,
|
|
44
|
+
data: any,
|
|
45
|
+
form: any,
|
|
46
|
+
onError: any,
|
|
47
|
+
): any;
|
|
48
|
+
function checkCondition(
|
|
49
|
+
component: { customConditional: any; conditional: { when: any; json: AnyForJSON } } | any,
|
|
50
|
+
row: any,
|
|
51
|
+
data: any,
|
|
52
|
+
form: any,
|
|
53
|
+
instance: any,
|
|
54
|
+
): boolean;
|
|
55
|
+
function checkTrigger(
|
|
56
|
+
component: any,
|
|
57
|
+
trigger: { type: string; simple: any; json: AnyForJSON; javascript: any } | any,
|
|
58
|
+
row: any,
|
|
59
|
+
data: any,
|
|
60
|
+
form: any,
|
|
61
|
+
instance: any,
|
|
62
|
+
): boolean | any;
|
|
63
|
+
function setActionProperty(
|
|
64
|
+
component: any,
|
|
65
|
+
action: { property: { type: string | any; value: any } | any; state: boolean | any; text: any },
|
|
66
|
+
row: any,
|
|
67
|
+
data: any,
|
|
68
|
+
result: any,
|
|
69
|
+
instance?: { interpolate: (textValue: any, evalData: any) => any | any },
|
|
70
|
+
): any;
|
|
71
|
+
function interpolateTemplate(template: string): any;
|
|
72
|
+
function addTemplateHash(template: string): number;
|
|
73
|
+
function interpolate(rawTemplate: number | string, data: any): any;
|
|
74
|
+
function uniqueName(name: string, template: string, evalContext: Object): string;
|
|
75
|
+
function guid(): string;
|
|
76
|
+
function getDateSetting(date: any): null | Date;
|
|
77
|
+
function isValidDate(date: any): boolean;
|
|
78
|
+
function currentTimezone(): string;
|
|
79
|
+
function offsetDate(date: Date, timezone: string): { date: Date; abbr: string };
|
|
80
|
+
function zonesLoaded(): boolean;
|
|
81
|
+
function shouldLoadZones(timezone: string): boolean;
|
|
82
|
+
function loadZones(timezone?: string): Promise<undefined>;
|
|
83
|
+
function momentDate(value: moment.MomentInput, format: string, timezone: string): moment.Moment;
|
|
84
|
+
function formatDate(value: moment.MomentInput, format: string, timezone: string): string;
|
|
85
|
+
function formatOffset(
|
|
86
|
+
formatFn: (date: any, format: any) => string,
|
|
87
|
+
date: Date | any,
|
|
88
|
+
format: string | any,
|
|
89
|
+
timezone: string,
|
|
90
|
+
): string;
|
|
91
|
+
function getLocaleDateFormatInfo(locale: string | string[]): { dayFirst: boolean };
|
|
92
|
+
function convertFormatToFlatpickr(format: string): string;
|
|
93
|
+
function convertFormatToMoment(format: string): string;
|
|
94
|
+
function convertFormatToMask(format: string): string;
|
|
95
|
+
function getInputMask(mask: string | RegExp[]): RegExp[];
|
|
96
|
+
function matchInputMask(value: string | RegExp, inputMask?: string | RegExp): boolean;
|
|
97
|
+
function getNumberSeparators(lang: string): { delimiter: string; decimalSeparator: string };
|
|
98
|
+
function getNumberDecimalLimit(component: any): number;
|
|
99
|
+
function getCurrencyAffixes(input: {
|
|
100
|
+
currency: string;
|
|
101
|
+
decimalLimit: number;
|
|
102
|
+
decimalSeparator: string;
|
|
103
|
+
lang: string | string[];
|
|
104
|
+
}): { prefix: string; suffix: string };
|
|
105
|
+
function fieldData(data: Object, component: { key: string | any[]; multiple: boolean | any } | any): any;
|
|
106
|
+
function delay(fn: Function, delay: number, args: any[]): any;
|
|
107
|
+
function iterateKey(key: string): string;
|
|
108
|
+
function uniqueKey(map: Object, base: string): string;
|
|
109
|
+
function bootstrapVersion(options: { bootstrap?: any } | any): number;
|
|
110
|
+
function unfold(e: any): any;
|
|
111
|
+
const firstNonNil: any;
|
|
112
|
+
function withSwitch(a: any, b: any): [Function, Function];
|
|
113
|
+
function observeOverload(callback: Function, options?: { limit?: number; delay?: number }): any;
|
|
114
|
+
function getContextComponents(context: any, excludeNested?: any, excludedTypes?: any): any;
|
|
115
|
+
function sanitize(string: string, options: any): any;
|
|
116
|
+
|
|
117
|
+
// Form Utils
|
|
118
|
+
function isLayoutComponent(component: { columns: any; rows: any; components: any } | any): boolean;
|
|
119
|
+
function eachComponent(components: any[], fn: Function, includeAll?: boolean, path?: string, parent?: Object): any;
|
|
120
|
+
function matchComponent(component: any, query: any): boolean;
|
|
121
|
+
function getComponent(components: any[], key: string | Object | any, includeAll: boolean): any;
|
|
122
|
+
function searchComponents(components: any[], query: any): any;
|
|
123
|
+
function findComponent(components: any[], key: any, path: any, fn: Function): boolean;
|
|
124
|
+
function removeComponent(components: any[], path: any): void;
|
|
125
|
+
function fastCloneDeep(json: any): any;
|
|
126
|
+
function generateFormChange(
|
|
127
|
+
type: string | any,
|
|
128
|
+
data: { schema: any; parent: { key: any } | any; originalComponent: any },
|
|
129
|
+
): {
|
|
130
|
+
op: string;
|
|
131
|
+
key: any;
|
|
132
|
+
container?: any;
|
|
133
|
+
index?: number;
|
|
134
|
+
component?: any;
|
|
135
|
+
patches?: any;
|
|
136
|
+
};
|
|
137
|
+
function applyFormChanges(form: any, changes: any[]): { form: any; failed: any[] };
|
|
138
|
+
function flattenComponents(components: any[], includeAll: boolean): any;
|
|
139
|
+
function hasCondition(component: any): boolean;
|
|
140
|
+
function parseFloatExt(value: any): number;
|
|
141
|
+
function formatAsCurrency(value: any): string;
|
|
142
|
+
function escapeRegExCharacters(value: string): string;
|
|
143
|
+
function getValue(submission: any, key: string): any;
|
|
144
|
+
function getStrings(
|
|
145
|
+
form: { components: any[] } | any,
|
|
146
|
+
): { key: any; type?: any; property: string; string: string | any };
|
|
147
|
+
|
|
148
|
+
// Builder Utils
|
|
149
|
+
namespace BuilderUtils {
|
|
150
|
+
function uniquify(container: any[], component: any): boolean;
|
|
151
|
+
const additionalShortcuts: { button: ['Enter', 'Esc'] };
|
|
152
|
+
function getAlphaShortcuts(): string[];
|
|
153
|
+
function getAdditionalShortcuts(type: string): string[];
|
|
154
|
+
function getBindedShortcuts(components: any[], input: any): any[];
|
|
155
|
+
function getAvailableShortcuts(form: { components: any[] } | any, component: { type: any } | any): string[];
|
|
156
|
+
}
|
|
157
|
+
}
|