@bpmn-io/form-js-viewer 1.5.0-alpha.0 → 1.6.0
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/assets/form-js-base.css +244 -16
- package/dist/assets/form-js.css +676 -670
- package/dist/index.cjs +2100 -722
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +2083 -717
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +15 -4
- package/dist/types/core/FieldFactory.d.ts +3 -1
- package/dist/types/core/FormFieldRegistry.d.ts +2 -1
- package/dist/types/core/FormLayouter.d.ts +2 -2
- package/dist/types/core/Importer.d.ts +1 -1
- package/dist/types/core/PathRegistry.d.ts +8 -4
- package/dist/types/core/Validator.d.ts +1 -1
- package/dist/types/core/index.d.ts +8 -8
- package/dist/types/features/{expression-language → expressionLanguage}/ConditionChecker.d.ts +9 -5
- package/dist/types/features/{expression-language → expressionLanguage}/FeelExpressionLanguage.d.ts +1 -1
- package/dist/types/features/{expression-language → expressionLanguage}/FeelersTemplating.d.ts +1 -1
- package/dist/types/features/{expression-language → expressionLanguage}/index.d.ts +4 -4
- package/dist/types/features/index.d.ts +4 -2
- package/dist/types/features/markdown/MarkdownRenderer.d.ts +1 -1
- package/dist/types/features/markdown/index.d.ts +2 -2
- package/dist/types/features/repeatRender/RepeatRenderManager.d.ts +21 -0
- package/dist/types/features/repeatRender/index.d.ts +7 -0
- package/dist/types/features/viewerCommands/ViewerCommands.d.ts +2 -2
- package/dist/types/features/viewerCommands/cmd/UpdateFieldValidationHandler.d.ts +1 -1
- package/dist/types/features/viewerCommands/index.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/Renderer.d.ts +1 -1
- package/dist/types/render/components/Label.d.ts +21 -1
- package/dist/types/render/components/Sanitizer.d.ts +8 -0
- package/dist/types/render/components/Util.d.ts +1 -1
- package/dist/types/render/components/form-fields/Button.d.ts +3 -3
- package/dist/types/render/components/form-fields/Checkbox.d.ts +4 -4
- package/dist/types/render/components/form-fields/Checklist.d.ts +5 -5
- package/dist/types/render/components/form-fields/Datetime.d.ts +4 -4
- package/dist/types/render/components/form-fields/Default.d.ts +4 -4
- package/dist/types/render/components/form-fields/DynamicList.d.ts +18 -0
- package/dist/types/render/components/form-fields/Group.d.ts +4 -4
- package/dist/types/render/components/form-fields/IFrame.d.ts +12 -0
- package/dist/types/render/components/form-fields/Image.d.ts +3 -3
- package/dist/types/render/components/form-fields/Number.d.ts +4 -4
- package/dist/types/render/components/form-fields/Radio.d.ts +5 -5
- package/dist/types/render/components/form-fields/Select.d.ts +5 -5
- package/dist/types/render/components/form-fields/Separator.d.ts +3 -3
- package/dist/types/render/components/form-fields/Spacer.d.ts +3 -3
- package/dist/types/render/components/form-fields/Table.d.ts +71 -0
- package/dist/types/render/components/form-fields/Taglist.d.ts +5 -5
- package/dist/types/render/components/form-fields/Text.d.ts +3 -3
- package/dist/types/render/components/form-fields/Textarea.d.ts +4 -4
- package/dist/types/render/components/form-fields/Textfield.d.ts +4 -4
- package/dist/types/render/components/form-fields/parts/ChildrenRenderer.d.ts +1 -0
- package/dist/types/render/components/index.d.ts +5 -2
- package/dist/types/render/components/util/optionsUtil.d.ts +8 -0
- package/dist/types/render/context/FormRenderContext.d.ts +4 -3
- package/dist/types/render/context/LocalExpressionContext.d.ts +7 -0
- package/dist/types/render/context/index.d.ts +1 -0
- package/dist/types/render/hooks/index.d.ts +1 -0
- package/dist/types/render/hooks/useCleanupMultiSelectValues.d.ts +1 -0
- package/dist/types/render/hooks/useCleanupSingleSelectValue.d.ts +1 -0
- package/dist/types/render/hooks/useExpressionEvaluation.d.ts +3 -3
- package/dist/types/render/hooks/useFilteredFormData.d.ts +1 -0
- package/dist/types/render/hooks/useOptionsAsync.d.ts +28 -0
- package/dist/types/render/hooks/useScrollIntoView.d.ts +18 -0
- package/dist/types/render/hooks/useTemplateEvaluation.d.ts +1 -1
- package/dist/types/render/index.d.ts +4 -3
- package/dist/types/util/constants/DatetimeConstants.d.ts +6 -6
- package/dist/types/util/constants/OptionsSourceConstants.d.ts +19 -0
- package/dist/types/util/constants/index.d.ts +1 -1
- package/dist/types/util/getSchemaVariables.d.ts +39 -0
- package/dist/types/util/index.d.ts +3 -52
- package/dist/types/util/simple.d.ts +20 -0
- package/dist/types/util/structure.d.ts +1 -0
- package/package.json +5 -5
- package/dist/types/render/components/form-fields/parts/Grid.d.ts +0 -1
- package/dist/types/render/components/util/valuesUtil.d.ts +0 -8
- package/dist/types/render/hooks/useValuesAsync.d.ts +0 -28
- package/dist/types/util/constants/ValuesSourceConstants.d.ts +0 -19
- /package/dist/types/features/{expression-language → expressionLanguage}/variableExtractionHelpers.d.ts +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {('asc'|'desc')} Direction
|
|
3
|
+
*
|
|
4
|
+
* @typedef Sorting
|
|
5
|
+
* @property {string} key
|
|
6
|
+
* @property {Direction} direction
|
|
7
|
+
*
|
|
8
|
+
* @typedef Column
|
|
9
|
+
* @property {string} label
|
|
10
|
+
* @property {string} key
|
|
11
|
+
*
|
|
12
|
+
* @typedef Props
|
|
13
|
+
* @property {Object} field
|
|
14
|
+
* @property {string} field.id
|
|
15
|
+
* @property {Array<Column>} [field.columns]
|
|
16
|
+
* @property {string} [field.columnsExpression]
|
|
17
|
+
* @property {string} [field.label]
|
|
18
|
+
* @property {number} [field.rowCount]
|
|
19
|
+
* @property {string} [field.dataSource]
|
|
20
|
+
*
|
|
21
|
+
* @param {Props} props
|
|
22
|
+
* @returns {import("preact").JSX.Element}
|
|
23
|
+
*/
|
|
24
|
+
declare function Table(props: Props): import("preact").JSX.Element;
|
|
25
|
+
declare namespace Table {
|
|
26
|
+
namespace config {
|
|
27
|
+
export { type };
|
|
28
|
+
export let keyed: boolean;
|
|
29
|
+
export let label: string;
|
|
30
|
+
export let group: string;
|
|
31
|
+
export function create(options?: {}): {
|
|
32
|
+
id: any;
|
|
33
|
+
columnsExpression: string;
|
|
34
|
+
} | {
|
|
35
|
+
id: any;
|
|
36
|
+
columns: Column[];
|
|
37
|
+
} | {
|
|
38
|
+
rowCount: number;
|
|
39
|
+
columns: {
|
|
40
|
+
label: string;
|
|
41
|
+
key: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
export let initialDemoData: {
|
|
45
|
+
id: number;
|
|
46
|
+
name: string;
|
|
47
|
+
date: string;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export default Table;
|
|
52
|
+
export type Direction = ('asc' | 'desc');
|
|
53
|
+
export type Sorting = {
|
|
54
|
+
key: string;
|
|
55
|
+
direction: Direction;
|
|
56
|
+
};
|
|
57
|
+
export type Column = {
|
|
58
|
+
label: string;
|
|
59
|
+
key: string;
|
|
60
|
+
};
|
|
61
|
+
export type Props = {
|
|
62
|
+
field: {
|
|
63
|
+
id: string;
|
|
64
|
+
columns?: Array<Column>;
|
|
65
|
+
columnsExpression?: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
rowCount?: number;
|
|
68
|
+
dataSource?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
declare const type: "table";
|
|
@@ -2,10 +2,10 @@ declare function Taglist(props: any): import("preact").JSX.Element;
|
|
|
2
2
|
declare namespace Taglist {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export let keyed: boolean;
|
|
6
|
+
export let label: string;
|
|
7
|
+
export let group: string;
|
|
8
|
+
export let emptyValue: any[];
|
|
9
9
|
export { sanitizeMultiSelectValue as sanitizeValue };
|
|
10
10
|
export { createEmptyOptions as create };
|
|
11
11
|
}
|
|
@@ -13,4 +13,4 @@ declare namespace Taglist {
|
|
|
13
13
|
export default Taglist;
|
|
14
14
|
declare const type: "taglist";
|
|
15
15
|
import { sanitizeMultiSelectValue } from '../util/sanitizerUtil';
|
|
16
|
-
import { createEmptyOptions } from '../util/
|
|
16
|
+
import { createEmptyOptions } from '../util/optionsUtil';
|
|
@@ -2,9 +2,9 @@ declare function Text(props: any): import("preact").JSX.Element;
|
|
|
2
2
|
declare namespace Text {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export let keyed: boolean;
|
|
6
|
+
export let label: string;
|
|
7
|
+
export let group: string;
|
|
8
8
|
export function create(options?: {}): {
|
|
9
9
|
text: string;
|
|
10
10
|
};
|
|
@@ -2,10 +2,10 @@ declare function Textarea(props: any): import("preact").JSX.Element;
|
|
|
2
2
|
declare namespace Textarea {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export let keyed: boolean;
|
|
6
|
+
export let label: string;
|
|
7
|
+
export let group: string;
|
|
8
|
+
export let emptyValue: string;
|
|
9
9
|
export function sanitizeValue({ value }: {
|
|
10
10
|
value: any;
|
|
11
11
|
}): string;
|
|
@@ -2,10 +2,10 @@ declare function Textfield(props: any): import("preact").JSX.Element;
|
|
|
2
2
|
declare namespace Textfield {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export let keyed: boolean;
|
|
6
|
+
export let label: string;
|
|
7
|
+
export let group: string;
|
|
8
|
+
export let emptyValue: string;
|
|
9
9
|
export function sanitizeValue({ value }: {
|
|
10
10
|
value: any;
|
|
11
11
|
}): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChildrenRenderer(props: any): import("preact").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const formFields: (typeof Default | typeof Group | typeof
|
|
1
|
+
export const formFields: (typeof Default | typeof Group | typeof IFrame)[];
|
|
2
2
|
export * from "./icons";
|
|
3
3
|
export * from "./Sanitizer";
|
|
4
4
|
import Label from './Label';
|
|
@@ -12,6 +12,8 @@ import Datetime from './form-fields/Datetime';
|
|
|
12
12
|
import FormComponent from './FormComponent';
|
|
13
13
|
import FormField from './FormField';
|
|
14
14
|
import Group from './form-fields/Group';
|
|
15
|
+
import IFrame from './form-fields/IFrame';
|
|
16
|
+
import DynamicList from './form-fields/DynamicList';
|
|
15
17
|
import Image from './form-fields/Image';
|
|
16
18
|
import Numberfield from './form-fields/Number';
|
|
17
19
|
import Radio from './form-fields/Radio';
|
|
@@ -22,4 +24,5 @@ import Taglist from './form-fields/Taglist';
|
|
|
22
24
|
import Text from './form-fields/Text';
|
|
23
25
|
import Textfield from './form-fields/Textfield';
|
|
24
26
|
import Textarea from './form-fields/Textarea';
|
|
25
|
-
|
|
27
|
+
import Table from './form-fields/Table';
|
|
28
|
+
export { Label, Description, Errors, Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, IFrame, DynamicList, Image, Numberfield, Radio, Select, Separator, Spacer, Taglist, Text, Textfield, Textarea, Table };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export default FormRenderContext;
|
|
2
2
|
declare const FormRenderContext: import("preact").Context<{
|
|
3
|
-
EmptyRoot: (props: any) => any;
|
|
4
3
|
Empty: (props: any) => any;
|
|
4
|
+
Hidden: (props: any) => any;
|
|
5
5
|
Children: (props: any) => import("preact").JSX.Element;
|
|
6
6
|
Element: (props: any) => import("preact").JSX.Element;
|
|
7
7
|
Row: (props: any) => import("preact").JSX.Element;
|
|
8
8
|
Column: (props: any) => any;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
hoverInfo: {
|
|
10
|
+
cleanup: () => void;
|
|
11
|
+
};
|
|
11
12
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as useCondition } from "./useCondition";
|
|
2
|
+
export { default as useScrollIntoView } from "./useScrollIntoView";
|
|
2
3
|
export { default as useExpressionEvaluation } from "./useExpressionEvaluation";
|
|
3
4
|
export { default as useFilteredFormData } from "./useFilteredFormData";
|
|
4
5
|
export { default as useKeyDownAction } from "./useKeyDownAction";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(props: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(props: any): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
3
3
|
* If the string is not an expression, it is returned as is.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param {string} value
|
|
4
|
+
* The function is memoized to minimize re-renders.
|
|
7
5
|
*
|
|
6
|
+
* @param {string} value - The string to evaluate.
|
|
7
|
+
* @returns {any} - Evaluated value or the original value if not an expression.
|
|
8
8
|
*/
|
|
9
9
|
export default function useExpressionEvaluation(value: string): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} OptionsGetter
|
|
3
|
+
* @property {Object[]} options - The options data
|
|
4
|
+
* @property {(LOAD_STATES)} loadState - The options data's loading state, to use for conditional rendering
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A hook to load options for single and multiselect components.
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} field - The form field to handle options for
|
|
10
|
+
* @return {OptionsGetter} optionsGetter - A options getter object providing loading state and options
|
|
11
|
+
*/
|
|
12
|
+
export default function _default(field: any): OptionsGetter;
|
|
13
|
+
export type LOAD_STATES = string;
|
|
14
|
+
export namespace LOAD_STATES {
|
|
15
|
+
let LOADING: string;
|
|
16
|
+
let LOADED: string;
|
|
17
|
+
let ERROR: string;
|
|
18
|
+
}
|
|
19
|
+
export type OptionsGetter = {
|
|
20
|
+
/**
|
|
21
|
+
* - The options data
|
|
22
|
+
*/
|
|
23
|
+
options: any[];
|
|
24
|
+
/**
|
|
25
|
+
* - The options data's loading state, to use for conditional rendering
|
|
26
|
+
*/
|
|
27
|
+
loadState: (LOAD_STATES);
|
|
28
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook to scroll an element into view only when it is not visible within the viewport.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} targetRef - A ref pointing to the DOM element to scroll into view.
|
|
5
|
+
* @param {Array} deps - An array of dependencies that trigger the effect.
|
|
6
|
+
* @param {Array} flagRefs - An array of refs that are used as flags to control when to scroll.
|
|
7
|
+
* @param {Object} [scrollOptions={}] - Options defining the behavior of the scrolling.
|
|
8
|
+
* @param {String} [scrollOptions.align='center'] - The alignment of the element within the viewport.
|
|
9
|
+
* @param {String} [scrollOptions.behavior='auto'] - The scrolling behavior.
|
|
10
|
+
* @param {Number} [scrollOptions.offset=0] - An offset that is added to the scroll position.
|
|
11
|
+
* @param {Boolean} [scrollOptions.scrollIfVisible=false] - Whether to scroll even if the element is visible.
|
|
12
|
+
*/
|
|
13
|
+
export default function useScrollIntoView(targetRef: any, deps: any[], scrollOptions?: {
|
|
14
|
+
align?: string;
|
|
15
|
+
behavior?: string;
|
|
16
|
+
offset?: number;
|
|
17
|
+
scrollIfVisible?: boolean;
|
|
18
|
+
}, flagRefs?: any[]): void;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param {Function} [options.buildDebugString]
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
export default function useTemplateEvaluation(value: string, options
|
|
12
|
+
export default function useTemplateEvaluation(value: string, options?: {
|
|
13
13
|
debug?: boolean;
|
|
14
14
|
strict?: boolean;
|
|
15
15
|
buildDebugString?: Function;
|
|
@@ -2,10 +2,11 @@ export { FormFields };
|
|
|
2
2
|
export * from "./components";
|
|
3
3
|
export * from "./context";
|
|
4
4
|
declare namespace _default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
let __init__: string[];
|
|
6
|
+
let formFields: (string | typeof FormFields)[];
|
|
7
|
+
let renderer: (string | typeof Renderer)[];
|
|
8
8
|
}
|
|
9
9
|
export default _default;
|
|
10
10
|
import FormFields from './FormFields';
|
|
11
11
|
import Renderer from './Renderer';
|
|
12
|
+
export { useExpressionEvaluation, useSingleLineTemplateEvaluation, useTemplateEvaluation } from "./hooks";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export const MINUTES_IN_DAY: number;
|
|
2
2
|
export namespace DATETIME_SUBTYPES {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
let DATE: string;
|
|
4
|
+
let TIME: string;
|
|
5
|
+
let DATETIME: string;
|
|
6
6
|
}
|
|
7
7
|
export namespace TIME_SERIALISING_FORMATS {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
let UTC_OFFSET: string;
|
|
9
|
+
let UTC_NORMALIZED: string;
|
|
10
|
+
let NO_TIMEZONE: string;
|
|
11
11
|
}
|
|
12
12
|
export const DATETIME_SUBTYPES_LABELS: {
|
|
13
13
|
[x: string]: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function getOptionsSource(field: any): string;
|
|
2
|
+
export namespace OPTIONS_SOURCES {
|
|
3
|
+
let STATIC: string;
|
|
4
|
+
let INPUT: string;
|
|
5
|
+
let EXPRESSION: string;
|
|
6
|
+
}
|
|
7
|
+
export const OPTIONS_SOURCE_DEFAULT: string;
|
|
8
|
+
export const OPTIONS_SOURCES_LABELS: {
|
|
9
|
+
[x: string]: string;
|
|
10
|
+
};
|
|
11
|
+
export const OPTIONS_SOURCES_PATHS: {
|
|
12
|
+
[x: string]: string[];
|
|
13
|
+
};
|
|
14
|
+
export const OPTIONS_SOURCES_DEFAULTS: {
|
|
15
|
+
[x: string]: string | {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./DatetimeConstants";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./OptionsSourceConstants";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { import('../types').Schema } Schema
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Parse the schema for variables a form might make use of.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* // retrieve variables from schema
|
|
10
|
+
* const variables = getSchemaVariables(schema);
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* // retrieve input variables from schema
|
|
15
|
+
* const inputVariables = getSchemaVariables(schema, { outputs: false });
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* // retrieve output variables from schema
|
|
20
|
+
* const outputVariables = getSchemaVariables(schema, { inputs: false });
|
|
21
|
+
*
|
|
22
|
+
* @param {Schema} schema
|
|
23
|
+
* @param {object} [options]
|
|
24
|
+
* @param {any} [options.expressionLanguage]
|
|
25
|
+
* @param {any} [options.templating]
|
|
26
|
+
* @param {any} [options.formFields]
|
|
27
|
+
* @param {boolean} [options.inputs=true]
|
|
28
|
+
* @param {boolean} [options.outputs=true]
|
|
29
|
+
*
|
|
30
|
+
* @return {string[]}
|
|
31
|
+
*/
|
|
32
|
+
export function getSchemaVariables(schema: Schema, options?: {
|
|
33
|
+
expressionLanguage?: any;
|
|
34
|
+
templating?: any;
|
|
35
|
+
formFields?: any;
|
|
36
|
+
inputs?: boolean;
|
|
37
|
+
outputs?: boolean;
|
|
38
|
+
}): string[];
|
|
39
|
+
export type Schema = import('../types').Schema;
|
|
@@ -1,55 +1,6 @@
|
|
|
1
|
-
export function isRequired(field: any): any;
|
|
2
|
-
export function pathParse(path: any): any;
|
|
3
|
-
export function pathsEqual(a: any, b: any): any;
|
|
4
|
-
export function generateIndexForType(type: any): any;
|
|
5
|
-
export function generateIdForType(type: any): string;
|
|
6
|
-
/**
|
|
7
|
-
* @template T
|
|
8
|
-
* @param {T} data
|
|
9
|
-
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
10
|
-
* @return {T}
|
|
11
|
-
*/
|
|
12
|
-
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
13
|
-
/**
|
|
14
|
-
* @typedef { import('../types').Schema } Schema
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Parse the schema for variables a form might make use of.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
*
|
|
21
|
-
* // retrieve variables from schema
|
|
22
|
-
* const variables = getSchemaVariables(schema);
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
*
|
|
26
|
-
* // retrieve input variables from schema
|
|
27
|
-
* const inputVariables = getSchemaVariables(schema, { outputs: false });
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
*
|
|
31
|
-
* // retrieve output variables from schema
|
|
32
|
-
* const outputVariables = getSchemaVariables(schema, { inputs: false });
|
|
33
|
-
*
|
|
34
|
-
* @param {Schema} schema
|
|
35
|
-
* @param {object} [options]
|
|
36
|
-
* @param {any} [options.expressionLanguage]
|
|
37
|
-
* @param {any} [options.templating]
|
|
38
|
-
* @param {any} [options.formFields]
|
|
39
|
-
* @param {boolean} [options.inputs=true]
|
|
40
|
-
* @param {boolean} [options.outputs=true]
|
|
41
|
-
*
|
|
42
|
-
* @return {string[]}
|
|
43
|
-
*/
|
|
44
|
-
export function getSchemaVariables(schema: Schema, options?: {
|
|
45
|
-
expressionLanguage?: any;
|
|
46
|
-
templating?: any;
|
|
47
|
-
formFields?: any;
|
|
48
|
-
inputs?: boolean;
|
|
49
|
-
outputs?: boolean;
|
|
50
|
-
}): string[];
|
|
51
|
-
export function runRecursively(formField: any, fn: any): void;
|
|
52
1
|
export * from "./constants";
|
|
53
2
|
export * from "./injector";
|
|
54
3
|
export * from "./form";
|
|
55
|
-
export
|
|
4
|
+
export * from "./getSchemaVariables";
|
|
5
|
+
export * from "./simple";
|
|
6
|
+
export * from "./structure";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function isRequired(field: any): any;
|
|
2
|
+
export function pathParse(path: any): any;
|
|
3
|
+
export function pathsEqual(a: any, b: any): any;
|
|
4
|
+
export function generateIndexForType(type: any): any;
|
|
5
|
+
export function generateIdForType(type: any): string;
|
|
6
|
+
/**
|
|
7
|
+
* @template T
|
|
8
|
+
* @param {T} data
|
|
9
|
+
* @param {(this: any, key: string, value: any) => any} [replacer]
|
|
10
|
+
* @return {T}
|
|
11
|
+
*/
|
|
12
|
+
export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
|
|
13
|
+
/**
|
|
14
|
+
* Transform a LocalExpressionContext object into a usable FEEL context.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} context - The LocalExpressionContext object.
|
|
17
|
+
* @returns {Object} The usable FEEL context.
|
|
18
|
+
*/
|
|
19
|
+
export function buildExpressionContext(context: any): any;
|
|
20
|
+
export function runRecursively(formField: any, fn: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getAncestryList(formFieldId: string, formFieldRegistry: import('../core/FormFieldRegistry').default): Array<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@carbon/grid": "^11.11.0",
|
|
48
48
|
"big.js": "^6.2.1",
|
|
49
49
|
"classnames": "^2.3.1",
|
|
50
|
-
"didi": "^
|
|
51
|
-
"feelers": "^1.
|
|
52
|
-
"feelin": "^
|
|
50
|
+
"didi": "^10.0.1",
|
|
51
|
+
"feelers": "^1.2.0",
|
|
52
|
+
"feelin": "^3.0.0",
|
|
53
53
|
"flatpickr": "^4.6.13",
|
|
54
54
|
"ids": "^1.0.0",
|
|
55
55
|
"min-dash": "^4.0.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"files": [
|
|
64
64
|
"dist"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "0f868b4c5679af5366998253e7a602f1375754a7"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Grid(props: any): import("preact").JSX.Element;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} ValuesGetter
|
|
3
|
-
* @property {Object[]} values - The values data
|
|
4
|
-
* @property {(LOAD_STATES)} state - The values data's loading state, to use for conditional rendering
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* A hook to load values for single and multiselect components.
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} field - The form field to handle values for
|
|
10
|
-
* @return {ValuesGetter} valuesGetter - A values getter object providing loading state and values
|
|
11
|
-
*/
|
|
12
|
-
export default function _default(field: any): ValuesGetter;
|
|
13
|
-
export type LOAD_STATES = string;
|
|
14
|
-
export namespace LOAD_STATES {
|
|
15
|
-
const LOADING: string;
|
|
16
|
-
const LOADED: string;
|
|
17
|
-
const ERROR: string;
|
|
18
|
-
}
|
|
19
|
-
export type ValuesGetter = {
|
|
20
|
-
/**
|
|
21
|
-
* - The values data
|
|
22
|
-
*/
|
|
23
|
-
values: any[];
|
|
24
|
-
/**
|
|
25
|
-
* - The values data's loading state, to use for conditional rendering
|
|
26
|
-
*/
|
|
27
|
-
state: (LOAD_STATES);
|
|
28
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function getValuesSource(field: any): string;
|
|
2
|
-
export namespace VALUES_SOURCES {
|
|
3
|
-
const STATIC: string;
|
|
4
|
-
const INPUT: string;
|
|
5
|
-
const EXPRESSION: string;
|
|
6
|
-
}
|
|
7
|
-
export const VALUES_SOURCE_DEFAULT: string;
|
|
8
|
-
export const VALUES_SOURCES_LABELS: {
|
|
9
|
-
[x: string]: string;
|
|
10
|
-
};
|
|
11
|
-
export const VALUES_SOURCES_PATHS: {
|
|
12
|
-
[x: string]: string[];
|
|
13
|
-
};
|
|
14
|
-
export const VALUES_SOURCES_DEFAULTS: {
|
|
15
|
-
[x: string]: string | {
|
|
16
|
-
label: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
File without changes
|