@bpmn-io/form-js-viewer 1.6.4 → 1.7.0-alpha.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 +20 -10
- package/dist/assets/form-js.css +20 -9
- package/dist/index.cjs +3091 -2811
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +3079 -2809
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +1 -1
- package/dist/types/core/EventBus.d.ts +1 -1
- package/dist/types/core/FieldFactory.d.ts +2 -3
- package/dist/types/core/FormFieldRegistry.d.ts +2 -3
- package/dist/types/core/FormLayouter.d.ts +2 -3
- package/dist/types/core/Importer.d.ts +11 -12
- package/dist/types/core/PathRegistry.d.ts +2 -3
- package/dist/types/core/Validator.d.ts +2 -3
- package/dist/types/core/index.d.ts +9 -10
- package/dist/types/features/expressionLanguage/ConditionChecker.d.ts +2 -3
- package/dist/types/features/expressionLanguage/FeelExpressionLanguage.d.ts +2 -3
- package/dist/types/features/expressionLanguage/FeelersTemplating.d.ts +4 -3
- package/dist/types/features/expressionLanguage/index.d.ts +4 -5
- package/dist/types/features/index.d.ts +4 -4
- package/dist/types/features/markdown/MarkdownRenderer.d.ts +2 -3
- package/dist/types/features/markdown/index.d.ts +2 -3
- package/dist/types/features/repeatRender/RepeatRenderManager.d.ts +2 -3
- package/dist/types/features/repeatRender/index.d.ts +2 -3
- package/dist/types/features/viewerCommands/ViewerCommands.d.ts +3 -4
- package/dist/types/features/viewerCommands/cmd/UpdateFieldValidationHandler.d.ts +2 -3
- package/dist/types/features/viewerCommands/index.d.ts +2 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/render/FormFields.d.ts +1 -1
- package/dist/types/render/Renderer.d.ts +6 -7
- package/dist/types/render/components/Description.d.ts +1 -1
- package/dist/types/render/components/Errors.d.ts +1 -1
- package/dist/types/render/components/FormComponent.d.ts +1 -1
- package/dist/types/render/components/FormField.d.ts +1 -1
- package/dist/types/render/components/Label.d.ts +1 -1
- package/dist/types/render/components/PoweredBy.d.ts +1 -1
- package/dist/types/render/components/Sanitizer.d.ts +0 -18
- package/dist/types/render/components/form-fields/Button.d.ts +3 -3
- package/dist/types/render/components/form-fields/Checkbox.d.ts +3 -3
- package/dist/types/render/components/form-fields/Checklist.d.ts +3 -3
- package/dist/types/render/components/form-fields/Datetime.d.ts +3 -3
- package/dist/types/render/components/form-fields/Default.d.ts +2 -3
- package/dist/types/render/components/form-fields/DynamicList.d.ts +2 -3
- package/dist/types/render/components/form-fields/Group.d.ts +2 -3
- package/dist/types/render/components/form-fields/Html.d.ts +14 -0
- package/dist/types/render/components/form-fields/IFrame.d.ts +8 -4
- package/dist/types/render/components/form-fields/Image.d.ts +3 -3
- package/dist/types/render/components/form-fields/Number.d.ts +3 -3
- package/dist/types/render/components/form-fields/Radio.d.ts +3 -3
- package/dist/types/render/components/form-fields/Select.d.ts +3 -3
- 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 +22 -19
- package/dist/types/render/components/form-fields/Taglist.d.ts +3 -3
- package/dist/types/render/components/form-fields/Text.d.ts +3 -3
- package/dist/types/render/components/form-fields/Textarea.d.ts +3 -3
- package/dist/types/render/components/form-fields/Textfield.d.ts +3 -3
- package/dist/types/render/components/form-fields/parts/ChildrenRenderer.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/Datepicker.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/DropdownList.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/InputAdorner.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/SearchableSelect.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/SimpleSelect.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/SkipLink.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/TemplatedInputAdorner.d.ts +1 -1
- package/dist/types/render/components/form-fields/parts/Timepicker.d.ts +1 -1
- package/dist/types/render/components/index.d.ts +28 -26
- package/dist/types/render/components/util/domUtil.d.ts +9 -0
- package/dist/types/render/components/util/sanitizerUtil.d.ts +24 -0
- package/dist/types/render/context/FormContext.d.ts +2 -2
- package/dist/types/render/context/FormRenderContext.d.ts +1 -2
- package/dist/types/render/context/LocalExpressionContext.d.ts +1 -2
- package/dist/types/render/context/index.d.ts +3 -3
- package/dist/types/render/hooks/index.d.ts +18 -11
- package/dist/types/render/hooks/useCleanupMultiSelectValue.d.ts +1 -0
- package/dist/types/render/hooks/useCleanupSingleSelectValue.d.ts +1 -1
- package/dist/types/render/hooks/useCondition.d.ts +1 -1
- package/dist/types/render/hooks/useDangerousHTMLWrapper.d.ts +16 -0
- package/dist/types/render/hooks/useDeepCompareState.d.ts +1 -1
- package/dist/types/render/hooks/useExpressionEvaluation.d.ts +1 -1
- package/dist/types/render/hooks/useFilteredFormData.d.ts +1 -1
- package/dist/types/render/hooks/useFlushDebounce.d.ts +1 -2
- package/dist/types/render/hooks/useKeyDownAction.d.ts +1 -1
- package/dist/types/render/hooks/useOptionsAsync.d.ts +1 -1
- package/dist/types/render/hooks/usePrevious.d.ts +1 -1
- package/dist/types/render/hooks/useReadonly.d.ts +1 -1
- package/dist/types/render/hooks/useScrollIntoView.d.ts +1 -1
- package/dist/types/render/hooks/useSecurityAttributesMap.d.ts +7 -0
- package/dist/types/render/hooks/useService.d.ts +1 -1
- package/dist/types/render/hooks/useSingleLineTemplateEvaluation.d.ts +1 -1
- package/dist/types/render/hooks/useTemplateEvaluation.d.ts +3 -1
- package/dist/types/render/index.d.ts +3 -4
- package/dist/types/util/constants/IFrameConstants.d.ts +8 -0
- package/dist/types/util/constants/index.d.ts +1 -0
- package/dist/types/util/structure.d.ts +1 -1
- package/package.json +5 -5
- package/dist/types/render/hooks/useCleanupMultiSelectValues.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Radio(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Radio {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -10,7 +10,7 @@ declare namespace Radio {
|
|
|
10
10
|
export { createEmptyOptions as create };
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default Radio;
|
|
14
13
|
declare const type: "radio";
|
|
15
14
|
import { sanitizeSingleSelectValue } from '../util/sanitizerUtil';
|
|
16
15
|
import { createEmptyOptions } from '../util/optionsUtil';
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Select(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Select {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -10,7 +10,7 @@ declare namespace Select {
|
|
|
10
10
|
export { createEmptyOptions as create };
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default Select;
|
|
14
13
|
declare const type: "select";
|
|
15
14
|
import { sanitizeSingleSelectValue } from '../util/sanitizerUtil';
|
|
16
15
|
import { createEmptyOptions } from '../util/optionsUtil';
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Separator(): import("preact").JSX.Element;
|
|
2
|
+
export namespace Separator {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -8,5 +8,5 @@ declare namespace Separator {
|
|
|
8
8
|
export function create(options?: {}): {};
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export default Separator;
|
|
12
11
|
declare const type: "separator";
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Spacer(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Spacer {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -10,5 +10,5 @@ declare namespace Spacer {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default Spacer;
|
|
14
13
|
declare const type: "spacer";
|
|
14
|
+
export {};
|
|
@@ -9,20 +9,22 @@
|
|
|
9
9
|
* @property {string} label
|
|
10
10
|
* @property {string} key
|
|
11
11
|
*
|
|
12
|
+
* @typedef Field
|
|
13
|
+
* @property {string} id
|
|
14
|
+
* @property {Array<Column>} [columns]
|
|
15
|
+
* @property {string} [columnsExpression]
|
|
16
|
+
* @property {string} [label]
|
|
17
|
+
* @property {number} [rowCount]
|
|
18
|
+
* @property {string} [dataSource]
|
|
19
|
+
*
|
|
12
20
|
* @typedef Props
|
|
13
|
-
* @property {
|
|
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]
|
|
21
|
+
* @property {Field} field
|
|
20
22
|
*
|
|
21
23
|
* @param {Props} props
|
|
22
24
|
* @returns {import("preact").JSX.Element}
|
|
23
25
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
export function Table(props: Props): import("preact").JSX.Element;
|
|
27
|
+
export namespace Table {
|
|
26
28
|
namespace config {
|
|
27
29
|
export { type };
|
|
28
30
|
export let keyed: boolean;
|
|
@@ -41,14 +43,13 @@ declare namespace Table {
|
|
|
41
43
|
key: string;
|
|
42
44
|
}[];
|
|
43
45
|
};
|
|
44
|
-
export
|
|
46
|
+
export function generateInitialDemoData(field: Field): {
|
|
45
47
|
id: number;
|
|
46
48
|
name: string;
|
|
47
49
|
date: string;
|
|
48
50
|
}[];
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
|
-
export default Table;
|
|
52
53
|
export type Direction = ('asc' | 'desc');
|
|
53
54
|
export type Sorting = {
|
|
54
55
|
key: string;
|
|
@@ -58,14 +59,16 @@ export type Column = {
|
|
|
58
59
|
label: string;
|
|
59
60
|
key: string;
|
|
60
61
|
};
|
|
62
|
+
export type Field = {
|
|
63
|
+
id: string;
|
|
64
|
+
columns?: Array<Column>;
|
|
65
|
+
columnsExpression?: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
rowCount?: number;
|
|
68
|
+
dataSource?: string;
|
|
69
|
+
};
|
|
61
70
|
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
|
-
};
|
|
71
|
+
field: Field;
|
|
70
72
|
};
|
|
71
73
|
declare const type: "table";
|
|
74
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Taglist(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Taglist {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -10,7 +10,7 @@ declare namespace Taglist {
|
|
|
10
10
|
export { createEmptyOptions as create };
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default Taglist;
|
|
14
13
|
declare const type: "taglist";
|
|
15
14
|
import { sanitizeMultiSelectValue } from '../util/sanitizerUtil';
|
|
16
15
|
import { createEmptyOptions } from '../util/optionsUtil';
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Text(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Text {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -10,5 +10,5 @@ declare namespace Text {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export default Text;
|
|
14
13
|
declare const type: "text";
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Textarea(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Textarea {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -12,5 +12,5 @@ declare namespace Textarea {
|
|
|
12
12
|
export function create(options?: {}): {};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
export default Textarea;
|
|
16
15
|
declare const type: "textarea";
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function Textfield(props: any): import("preact").JSX.Element;
|
|
2
|
+
export namespace Textfield {
|
|
3
3
|
namespace config {
|
|
4
4
|
export { type };
|
|
5
5
|
export let keyed: boolean;
|
|
@@ -12,5 +12,5 @@ declare namespace Textfield {
|
|
|
12
12
|
export function create(options?: {}): {};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
export default Textfield;
|
|
16
15
|
declare const type: "textfield";
|
|
16
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function ChildrenRenderer(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function Datepicker(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function DropdownList(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function InputAdorner(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function SearchableSelect(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function SimpleSelect(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function SkipLink(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function TemplatedInputAdorner(props: any): import("preact").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function Timepicker(props: any): import("preact").JSX.Element;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
export const formFields: (typeof Default | typeof Group | typeof
|
|
1
|
+
export const formFields: (typeof Default | typeof Group | typeof Image)[];
|
|
2
2
|
export * from "./icons";
|
|
3
3
|
export * from "./Sanitizer";
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
|
|
4
|
+
export * from "./util/sanitizerUtil";
|
|
5
|
+
import { Label } from './Label';
|
|
6
|
+
import { Description } from './Description';
|
|
7
|
+
import { Errors } from './Errors';
|
|
8
|
+
import { Button } from './form-fields/Button';
|
|
9
|
+
import { Checkbox } from './form-fields/Checkbox';
|
|
10
|
+
import { Checklist } from './form-fields/Checklist';
|
|
11
|
+
import { Default } from './form-fields/Default';
|
|
12
|
+
import { Datetime } from './form-fields/Datetime';
|
|
13
|
+
import { FormComponent } from './FormComponent';
|
|
14
|
+
import { FormField } from './FormField';
|
|
15
|
+
import { Group } from './form-fields/Group';
|
|
16
|
+
import { IFrame } from './form-fields/IFrame';
|
|
17
|
+
import { DynamicList } from './form-fields/DynamicList';
|
|
18
|
+
import { Image } from './form-fields/Image';
|
|
19
|
+
import { Numberfield } from './form-fields/Number';
|
|
20
|
+
import { Radio } from './form-fields/Radio';
|
|
21
|
+
import { Select } from './form-fields/Select';
|
|
22
|
+
import { Separator } from './form-fields/Separator';
|
|
23
|
+
import { Spacer } from './form-fields/Spacer';
|
|
24
|
+
import { Taglist } from './form-fields/Taglist';
|
|
25
|
+
import { Text } from './form-fields/Text';
|
|
26
|
+
import { Html } from './form-fields/Html';
|
|
27
|
+
import { Textfield } from './form-fields/Textfield';
|
|
28
|
+
import { Textarea } from './form-fields/Textarea';
|
|
29
|
+
import { Table } from './form-fields/Table';
|
|
30
|
+
export { Label, Description, Errors, Button, Checkbox, Checklist, Default, Datetime, FormComponent, FormField, Group, IFrame, DynamicList, Image, Numberfield, Radio, Select, Separator, Spacer, Taglist, Text, Html, Textfield, Textarea, Table };
|
|
@@ -2,3 +2,27 @@ export function sanitizeDateTimePickerValue(options: any): string;
|
|
|
2
2
|
export function hasEqualValue(value: any, array: any): boolean;
|
|
3
3
|
export function sanitizeSingleSelectValue(options: any): any;
|
|
4
4
|
export function sanitizeMultiSelectValue(options: any): any;
|
|
5
|
+
/**
|
|
6
|
+
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
7
|
+
* that start with http(s).
|
|
8
|
+
*
|
|
9
|
+
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} src
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
export function sanitizeImageSource(src: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Sanitizes an iframe source to ensure we only allow for links
|
|
17
|
+
* that start with http(s).
|
|
18
|
+
*
|
|
19
|
+
* @param {string} src
|
|
20
|
+
* @returns {string}
|
|
21
|
+
*/
|
|
22
|
+
export function sanitizeIFrameSource(src: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Escapes HTML and returns pure text.
|
|
25
|
+
* @param {string} html
|
|
26
|
+
* @returns {string}
|
|
27
|
+
*/
|
|
28
|
+
export function escapeHTML(html: string): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare const FormContext: import("preact").Context<{
|
|
1
|
+
export const FormContext: import("preact").Context<{
|
|
3
2
|
getService: typeof getService;
|
|
4
3
|
formId: any;
|
|
5
4
|
}>;
|
|
@@ -10,3 +9,4 @@ declare const FormContext: import("preact").Context<{
|
|
|
10
9
|
* @returns {any}
|
|
11
10
|
*/
|
|
12
11
|
declare function getService(type: string, strict?: boolean): any;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare const FormRenderContext: import("preact").Context<{
|
|
1
|
+
export const FormRenderContext: import("preact").Context<{
|
|
3
2
|
Empty: (props: any) => any;
|
|
4
3
|
Hidden: (props: any) => any;
|
|
5
4
|
Children: (props: any) => import("preact").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { FormRenderContext } from "./FormRenderContext";
|
|
2
|
+
export { LocalExpressionContext } from "./LocalExpressionContext";
|
|
3
|
+
export { FormContext } from "./FormContext";
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
1
|
+
export { useCondition } from "./useCondition";
|
|
2
|
+
export { useDangerousHTMLWrapper } from "./useDangerousHTMLWrapper";
|
|
3
|
+
export { useSecurityAttributesMap } from "./useSecurityAttributesMap";
|
|
4
|
+
export { useGetLabelCorrelation } from "./useGetLabelCorrelation";
|
|
5
|
+
export { useScrollIntoView } from "./useScrollIntoView";
|
|
6
|
+
export { useExpressionEvaluation } from "./useExpressionEvaluation";
|
|
7
|
+
export { useFilteredFormData } from "./useFilteredFormData";
|
|
8
|
+
export { useKeyDownAction } from "./useKeyDownAction";
|
|
9
|
+
export { useReadonly } from "./useReadonly";
|
|
10
|
+
export { useService } from "./useService";
|
|
11
|
+
export { usePrevious } from "./usePrevious";
|
|
12
|
+
export { useFlushDebounce } from "./useFlushDebounce";
|
|
13
|
+
export { useDeepCompareState } from "./useDeepCompareState";
|
|
14
|
+
export { useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
|
|
15
|
+
export { useTemplateEvaluation } from "./useTemplateEvaluation";
|
|
16
|
+
export { useCleanupSingleSelectValue } from "./useCleanupSingleSelectValue";
|
|
17
|
+
export { useCleanupMultiSelectValue } from "./useCleanupMultiSelectValue";
|
|
18
|
+
export { useOptionsAsync, LOAD_STATES } from "./useOptionsAsync";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useCleanupMultiSelectValue(props: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function useCleanupSingleSelectValue(props: any): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrap HTML content in a configuration object for dangerouslySetInnerHTML
|
|
3
|
+
* @param {Object} props
|
|
4
|
+
* @param {string} props.html
|
|
5
|
+
* @param {Function} [props.transform]
|
|
6
|
+
* @param {boolean} [props.sanitize = true]
|
|
7
|
+
* @param {boolean} [props.sanitizeStyleTags = true]
|
|
8
|
+
*/
|
|
9
|
+
export function useDangerousHTMLWrapper(props: {
|
|
10
|
+
html: string;
|
|
11
|
+
transform?: Function;
|
|
12
|
+
sanitize?: boolean;
|
|
13
|
+
sanitizeStyleTags?: boolean;
|
|
14
|
+
}): {
|
|
15
|
+
__html: any;
|
|
16
|
+
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param {any} defaultValue - The initial default value for the state.
|
|
6
6
|
* @returns {any} - Returns the current state.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export function useDeepCompareState(value: any, defaultValue: any): any;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare function useFlushDebounce(func: any, additionalDeps?: any[]): ((...args: any[]) => void)[];
|
|
1
|
+
export function useFlushDebounce(func: any): ((...args: any[]) => void)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function useKeyDownAction(targetKey: any, action: any, listenerElement?: Window & typeof globalThis): void;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param {Object} field - The form field to handle options for
|
|
10
10
|
* @return {OptionsGetter} optionsGetter - A options getter object providing loading state and options
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export function useOptionsAsync(field: any): OptionsGetter;
|
|
13
13
|
export type LOAD_STATES = string;
|
|
14
14
|
export namespace LOAD_STATES {
|
|
15
15
|
let LOADING: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function usePrevious(value: any, defaultValue?: any): any;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @returns {boolean}
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export function useReadonly(formField: any, properties?: FormProperties): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* Retrieve readonly value of a form field, given it can be an
|
|
15
15
|
* expression optionally or configured globally.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @param {Number} [scrollOptions.offset=0] - An offset that is added to the scroll position.
|
|
11
11
|
* @param {Boolean} [scrollOptions.scrollIfVisible=false] - Whether to scroll even if the element is visible.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export function useScrollIntoView(targetRef: any, deps: any[], scrollOptions?: {
|
|
14
14
|
align?: string;
|
|
15
15
|
behavior?: string;
|
|
16
16
|
offset?: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook to build up security attributes from form configuration.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} security - The security configuration.
|
|
5
|
+
* @returns {Array} - Returns a tuple with sandbox and allow attributes.
|
|
6
|
+
*/
|
|
7
|
+
export function useSecurityAttributesMap(security: any): any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function useService(type: any, strict: any): any;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @param {Function} [options.buildDebugString]
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export function useSingleLineTemplateEvaluation(value: string, options?: {
|
|
14
14
|
debug?: boolean;
|
|
15
15
|
strict?: boolean;
|
|
16
16
|
buildDebugString?: Function;
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
* @param {Object} options
|
|
7
7
|
* @param {boolean} [options.debug = false]
|
|
8
8
|
* @param {boolean} [options.strict = false]
|
|
9
|
+
* @param {Function} [options.sanitizer]
|
|
9
10
|
* @param {Function} [options.buildDebugString]
|
|
10
11
|
*
|
|
11
12
|
*/
|
|
12
|
-
export
|
|
13
|
+
export function useTemplateEvaluation(value: string, options?: {
|
|
13
14
|
debug?: boolean;
|
|
14
15
|
strict?: boolean;
|
|
16
|
+
sanitizer?: Function;
|
|
15
17
|
buildDebugString?: Function;
|
|
16
18
|
}): any;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { FormFields };
|
|
2
2
|
export * from "./components";
|
|
3
3
|
export * from "./context";
|
|
4
|
-
|
|
4
|
+
export namespace RenderModule {
|
|
5
5
|
let __init__: string[];
|
|
6
6
|
let formFields: (string | typeof FormFields)[];
|
|
7
7
|
let renderer: (string | typeof Renderer)[];
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import Renderer from './Renderer';
|
|
9
|
+
import { FormFields } from './FormFields';
|
|
10
|
+
import { Renderer } from './Renderer';
|
|
12
11
|
export { useExpressionEvaluation, useSingleLineTemplateEvaluation, useTemplateEvaluation } from "./hooks";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getAncestryList(formFieldId: string, formFieldRegistry: import('../core/FormFieldRegistry').
|
|
1
|
+
export function getAncestryList(formFieldId: string, formFieldRegistry: import('../core/FormFieldRegistry').FormFieldRegistry): 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.7.0-alpha.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"big.js": "^6.2.1",
|
|
49
49
|
"classnames": "^2.3.1",
|
|
50
50
|
"didi": "^10.0.1",
|
|
51
|
-
"
|
|
51
|
+
"dompurify": "^3.0.8",
|
|
52
|
+
"feelers": "^1.3.0",
|
|
52
53
|
"feelin": "^3.0.0",
|
|
53
54
|
"flatpickr": "^4.6.13",
|
|
54
55
|
"ids": "^1.0.0",
|
|
55
56
|
"lodash": "^4.5.0",
|
|
56
|
-
"min-dash": "^4.
|
|
57
|
+
"min-dash": "^4.2.1",
|
|
57
58
|
"preact": "^10.5.14",
|
|
58
|
-
"preact-markup": "^2.1.1",
|
|
59
59
|
"showdown": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"sideEffects": [
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"files": [
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bd5c0a61044cb4378925784a826bf5b711a5c82b"
|
|
68
68
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function _default(props: any): void;
|