@bpmn-io/form-js-viewer 0.12.1 → 0.13.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/README.md +0 -1
- package/dist/assets/form-js-base.css +779 -0
- package/dist/assets/form-js.css +2693 -63
- package/dist/index.cjs +679 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +676 -312
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +34 -0
- package/dist/types/core/FormLayouter.d.ts +64 -0
- package/dist/types/core/index.d.ts +5 -5
- package/dist/types/{core → features/expression-language}/ConditionChecker.d.ts +5 -13
- package/dist/types/features/expression-language/FeelExpressionLanguage.d.ts +39 -0
- package/dist/types/features/expression-language/FeelersTemplating.d.ts +26 -0
- package/dist/types/features/expression-language/index.d.ts +11 -0
- package/dist/types/features/index.d.ts +4 -0
- package/dist/types/features/markdown/MarkdownRenderer.d.ts +15 -0
- package/dist/types/features/markdown/index.d.ts +7 -0
- package/dist/types/import/Importer.d.ts +3 -1
- package/dist/types/import/index.d.ts +1 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/render/components/Sanitizer.d.ts +10 -1
- package/dist/types/render/components/Util.d.ts +1 -12
- package/dist/types/render/components/form-fields/Checklist.d.ts +1 -1
- package/dist/types/render/components/form-fields/Datetime.d.ts +1 -1
- package/dist/types/render/components/form-fields/Radio.d.ts +1 -1
- package/dist/types/render/components/form-fields/Select.d.ts +1 -1
- package/dist/types/render/components/form-fields/Taglist.d.ts +1 -1
- package/dist/types/render/components/index.d.ts +14 -14
- package/dist/types/render/components/util/valuesUtil.d.ts +2 -0
- package/dist/types/render/context/FormRenderContext.d.ts +4 -2
- package/dist/types/render/hooks/index.d.ts +6 -0
- package/dist/types/render/hooks/useCondition.d.ts +2 -3
- package/dist/types/render/hooks/useExpressionEvaluation.d.ts +9 -0
- package/dist/types/render/hooks/useFilteredFormData.d.ts +6 -0
- package/dist/types/render/hooks/useService.d.ts +1 -1
- package/dist/types/render/hooks/useTemplateEvaluation.d.ts +16 -0
- package/dist/types/render/index.d.ts +2 -2
- package/dist/types/util/index.d.ts +2 -2
- package/dist/types/util/injector.d.ts +1 -1
- package/package.json +11 -7
- package/dist/assets/flatpickr/light.css +0 -809
- package/dist/types/render/hooks/useEvaluation.d.ts +0 -6
- package/dist/types/render/hooks/useExpressionValue.d.ts +0 -5
- package/dist/types/util/feel.d.ts +0 -15
package/dist/types/Form.d.ts
CHANGED
|
@@ -111,6 +111,40 @@ export default class Form {
|
|
|
111
111
|
* @internal
|
|
112
112
|
*/
|
|
113
113
|
_setState(state: any): void;
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
_getModules(): ({
|
|
118
|
+
__init__: string[];
|
|
119
|
+
expressionLanguage: (string | typeof import("./features/expression-language").FeelExpressionLanguage)[];
|
|
120
|
+
/**
|
|
121
|
+
* @typedef { import('./types').Injector } Injector
|
|
122
|
+
* @typedef { import('./types').Data } Data
|
|
123
|
+
* @typedef { import('./types').Errors } Errors
|
|
124
|
+
* @typedef { import('./types').Schema } Schema
|
|
125
|
+
* @typedef { import('./types').FormProperties } FormProperties
|
|
126
|
+
* @typedef { import('./types').FormProperty } FormProperty
|
|
127
|
+
* @typedef { import('./types').FormEvent } FormEvent
|
|
128
|
+
* @typedef { import('./types').FormOptions } FormOptions
|
|
129
|
+
*
|
|
130
|
+
* @typedef { {
|
|
131
|
+
* data: Data,
|
|
132
|
+
* initialData: Data,
|
|
133
|
+
* errors: Errors,
|
|
134
|
+
* properties: FormProperties,
|
|
135
|
+
* schema: Schema
|
|
136
|
+
* } } State
|
|
137
|
+
*
|
|
138
|
+
* @typedef { (type:FormEvent, priority:number, handler:Function) => void } OnEventWithPriority
|
|
139
|
+
* @typedef { (type:FormEvent, handler:Function) => void } OnEventWithOutPriority
|
|
140
|
+
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
141
|
+
*/
|
|
142
|
+
templating: (string | typeof import("./features/expression-language").FeelersTemplating)[];
|
|
143
|
+
conditionChecker: (string | typeof import("./features/expression-language").ConditionChecker)[];
|
|
144
|
+
} | {
|
|
145
|
+
__init__: string[];
|
|
146
|
+
markdownRenderer: (string | typeof import("./features/markdown").MarkdownRenderer)[];
|
|
147
|
+
})[];
|
|
114
148
|
/**
|
|
115
149
|
* @internal
|
|
116
150
|
*/
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { { id: String, components: Array<String> } } FormRow
|
|
3
|
+
* @typedef { { formFieldId: String, rows: Array<FormRow> } } FormRows
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Maintains the Form layout in a given structure, for example
|
|
7
|
+
*
|
|
8
|
+
* [
|
|
9
|
+
* {
|
|
10
|
+
* formFieldId: 'FormField_1',
|
|
11
|
+
* rows: [
|
|
12
|
+
* { id: 'Row_1', components: [ 'Text_1', 'Textdield_1', ... ] }
|
|
13
|
+
* ]
|
|
14
|
+
* }
|
|
15
|
+
* ]
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
declare class FormLayouter {
|
|
19
|
+
constructor(eventBus: any);
|
|
20
|
+
/** @type Array<FormRows> */
|
|
21
|
+
_rows: FormRows[];
|
|
22
|
+
_ids: any;
|
|
23
|
+
_eventBus: any;
|
|
24
|
+
/**
|
|
25
|
+
* @param {FormRow} row
|
|
26
|
+
*/
|
|
27
|
+
addRow(formFieldId: any, row: FormRow): void;
|
|
28
|
+
/**
|
|
29
|
+
* @param {String} id
|
|
30
|
+
* @returns {FormRow}
|
|
31
|
+
*/
|
|
32
|
+
getRow(id: string): FormRow;
|
|
33
|
+
/**
|
|
34
|
+
* @param {any} formField
|
|
35
|
+
* @returns {FormRow}
|
|
36
|
+
*/
|
|
37
|
+
getRowForField(formField: any): FormRow;
|
|
38
|
+
/**
|
|
39
|
+
* @param {String} formFieldId
|
|
40
|
+
* @returns { Array<FormRow> }
|
|
41
|
+
*/
|
|
42
|
+
getRows(formFieldId: string): Array<FormRow>;
|
|
43
|
+
/**
|
|
44
|
+
* @returns {string}
|
|
45
|
+
*/
|
|
46
|
+
nextRowId(): string;
|
|
47
|
+
/**
|
|
48
|
+
* @param {any} formField
|
|
49
|
+
*/
|
|
50
|
+
calculateLayout(formField: any): void;
|
|
51
|
+
clear(): void;
|
|
52
|
+
}
|
|
53
|
+
declare namespace FormLayouter {
|
|
54
|
+
const $inject: string[];
|
|
55
|
+
}
|
|
56
|
+
export default FormLayouter;
|
|
57
|
+
export type FormRow = {
|
|
58
|
+
id: string;
|
|
59
|
+
components: Array<string>;
|
|
60
|
+
};
|
|
61
|
+
export type FormRows = {
|
|
62
|
+
formFieldId: string;
|
|
63
|
+
rows: Array<FormRow>;
|
|
64
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { FormFieldRegistry };
|
|
2
1
|
declare namespace _default {
|
|
3
2
|
const __depends__: ({
|
|
4
3
|
importer: (string | typeof import("../import/Importer").default)[];
|
|
@@ -7,12 +6,13 @@ declare namespace _default {
|
|
|
7
6
|
formFields: (string | typeof import("../render").FormFields)[];
|
|
8
7
|
renderer: (string | typeof import("../render/Renderer").default)[];
|
|
9
8
|
})[];
|
|
10
|
-
const conditionChecker: (string | typeof ConditionChecker)[];
|
|
11
9
|
const eventBus: any[];
|
|
12
10
|
const formFieldRegistry: (string | typeof FormFieldRegistry)[];
|
|
11
|
+
const formLayouter: (string | typeof FormLayouter)[];
|
|
13
12
|
const validator: (string | typeof Validator)[];
|
|
14
13
|
}
|
|
15
14
|
export default _default;
|
|
16
|
-
import FormFieldRegistry from
|
|
17
|
-
import
|
|
18
|
-
import Validator from
|
|
15
|
+
import FormFieldRegistry from './FormFieldRegistry';
|
|
16
|
+
import FormLayouter from './FormLayouter';
|
|
17
|
+
import Validator from './Validator';
|
|
18
|
+
export { FormFieldRegistry, FormLayouter };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @typedef {object} Condition
|
|
3
3
|
* @property {string} [hide]
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
declare class ConditionChecker {
|
|
6
6
|
constructor(formFieldRegistry: any, eventBus: any);
|
|
7
7
|
_formFieldRegistry: any;
|
|
8
8
|
_eventBus: any;
|
|
@@ -23,11 +23,11 @@ export class ConditionChecker {
|
|
|
23
23
|
* Check if given condition is met. Returns null for invalid/missing conditions.
|
|
24
24
|
*
|
|
25
25
|
* @param {string} condition
|
|
26
|
-
* @param {import('
|
|
26
|
+
* @param {import('../../types').Data} [data]
|
|
27
27
|
*
|
|
28
28
|
* @returns {boolean|null}
|
|
29
29
|
*/
|
|
30
|
-
check(condition: string, data?: import('
|
|
30
|
+
check(condition: string, data?: import('../../types').Data): boolean | null;
|
|
31
31
|
/**
|
|
32
32
|
* Check if hide condition is met.
|
|
33
33
|
*
|
|
@@ -38,20 +38,12 @@ export class ConditionChecker {
|
|
|
38
38
|
_checkHideCondition(condition: Condition, data: {
|
|
39
39
|
[x: string]: any;
|
|
40
40
|
}): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Evaluate an expression.
|
|
43
|
-
*
|
|
44
|
-
* @param {string} expression
|
|
45
|
-
* @param {import('../types').Data} [data]
|
|
46
|
-
*
|
|
47
|
-
* @returns {any}
|
|
48
|
-
*/
|
|
49
|
-
evaluate(expression: string, data?: import('../types').Data): any;
|
|
50
41
|
_getConditions(): any;
|
|
51
42
|
}
|
|
52
|
-
|
|
43
|
+
declare namespace ConditionChecker {
|
|
53
44
|
const $inject: string[];
|
|
54
45
|
}
|
|
46
|
+
export default ConditionChecker;
|
|
55
47
|
export type Condition = {
|
|
56
48
|
hide?: string;
|
|
57
49
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare class FeelExpressionLanguage {
|
|
2
|
+
constructor(eventBus: any);
|
|
3
|
+
_eventBus: any;
|
|
4
|
+
/**
|
|
5
|
+
* Determines if the given string is a FEEL expression.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} value
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
isExpression(value: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve variable names from a given FEEL expression.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} expression
|
|
16
|
+
* @param {object} [options]
|
|
17
|
+
* @param {string} [options.type]
|
|
18
|
+
*
|
|
19
|
+
* @returns {string[]}
|
|
20
|
+
*/
|
|
21
|
+
getVariableNames(expression: string, options?: {
|
|
22
|
+
type?: string;
|
|
23
|
+
}): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Evaluate an expression.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} expression
|
|
28
|
+
* @param {import('../../types').Data} [data]
|
|
29
|
+
*
|
|
30
|
+
* @returns {any}
|
|
31
|
+
*/
|
|
32
|
+
evaluate(expression: string, data?: import('../../types').Data): any;
|
|
33
|
+
_getExpressionVariableNames(expression: any): any[];
|
|
34
|
+
_getUnaryVariableNames(unaryTest: any): any[];
|
|
35
|
+
}
|
|
36
|
+
declare namespace FeelExpressionLanguage {
|
|
37
|
+
const $inject: string[];
|
|
38
|
+
}
|
|
39
|
+
export default FeelExpressionLanguage;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare class FeelersTemplating {
|
|
2
|
+
isTemplate(value: any): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Evaluate a template.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} template
|
|
7
|
+
* @param {Object<string, any>} context
|
|
8
|
+
* @param {Object} options
|
|
9
|
+
* @param {boolean} [options.debug = false]
|
|
10
|
+
* @param {boolean} [options.strict = false]
|
|
11
|
+
* @param {Function} [options.buildDebugString]
|
|
12
|
+
*
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
evaluate(template: string, context?: {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}, options?: {
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
strict?: boolean;
|
|
20
|
+
buildDebugString?: Function;
|
|
21
|
+
}): any;
|
|
22
|
+
}
|
|
23
|
+
declare namespace FeelersTemplating {
|
|
24
|
+
const $inject: any[];
|
|
25
|
+
}
|
|
26
|
+
export default FeelersTemplating;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
const __init__: string[];
|
|
3
|
+
const expressionLanguage: (string | typeof FeelExpressionLanguage)[];
|
|
4
|
+
const templating: (string | typeof FeelersTemplating)[];
|
|
5
|
+
const conditionChecker: (string | typeof ConditionChecker)[];
|
|
6
|
+
}
|
|
7
|
+
export default _default;
|
|
8
|
+
import FeelExpressionLanguage from './FeelExpressionLanguage';
|
|
9
|
+
import FeelersTemplating from './FeelersTemplating';
|
|
10
|
+
import ConditionChecker from './ConditionChecker';
|
|
11
|
+
export { FeelExpressionLanguage, FeelersTemplating, ConditionChecker };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare class MarkdownRenderer {
|
|
2
|
+
_converter: any;
|
|
3
|
+
/**
|
|
4
|
+
* Render markdown to HTML.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} markdown - The markdown to render
|
|
7
|
+
*
|
|
8
|
+
* @returns {string} HTML
|
|
9
|
+
*/
|
|
10
|
+
render(markdown: string): string;
|
|
11
|
+
}
|
|
12
|
+
declare namespace MarkdownRenderer {
|
|
13
|
+
const $inject: any[];
|
|
14
|
+
}
|
|
15
|
+
export default MarkdownRenderer;
|
|
@@ -3,10 +3,12 @@ declare class Importer {
|
|
|
3
3
|
* @constructor
|
|
4
4
|
* @param { import('../core').FormFieldRegistry } formFieldRegistry
|
|
5
5
|
* @param { import('../render/FormFields').default } formFields
|
|
6
|
+
* @param { import('../core').FormLayouter } formLayouter
|
|
6
7
|
*/
|
|
7
|
-
constructor(formFieldRegistry: import('../core').FormFieldRegistry, formFields: import('../render/FormFields').default);
|
|
8
|
+
constructor(formFieldRegistry: import('../core').FormFieldRegistry, formFields: import('../render/FormFields').default, formLayouter: import('../core').FormLayouter);
|
|
8
9
|
_formFieldRegistry: import("../core").FormFieldRegistry;
|
|
9
10
|
_formFields: import("../render/FormFields").default;
|
|
11
|
+
_formLayouter: import("../core").FormLayouter;
|
|
10
12
|
/**
|
|
11
13
|
* Import schema adding `id`, `_parent` and `_path`
|
|
12
14
|
* information to each field and adding it to the
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* @return {Promise<Form>}
|
|
10
10
|
*/
|
|
11
11
|
export function createForm(options: CreateFormOptions): Promise<Form>;
|
|
12
|
-
export { FormFieldRegistry } from "./core";
|
|
13
12
|
export * from "./render";
|
|
14
13
|
export * from "./util";
|
|
14
|
+
export * from "./features";
|
|
15
15
|
export type CreateFormOptions = import('./types').CreateFormOptions;
|
|
16
|
-
import Form from
|
|
17
|
-
export const schemaVersion:
|
|
16
|
+
import Form from './Form';
|
|
17
|
+
export const schemaVersion: 8;
|
|
18
18
|
export { Form };
|
|
19
|
+
export { FormFieldRegistry, FormLayouter } from "./core";
|
|
@@ -5,4 +5,13 @@
|
|
|
5
5
|
* @return {string}
|
|
6
6
|
*/
|
|
7
7
|
export function sanitizeHTML(html: string): string;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
10
|
+
* that start with http(s).
|
|
11
|
+
*
|
|
12
|
+
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} src
|
|
15
|
+
* @returns {string}
|
|
16
|
+
*/
|
|
17
|
+
export function sanitizeImageSource(src: string): string;
|
|
@@ -2,16 +2,5 @@ export function formFieldClasses(type: any, { errors, disabled }?: {
|
|
|
2
2
|
errors?: any[];
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
}): string;
|
|
5
|
+
export function gridColumnClasses(formField: any): string;
|
|
5
6
|
export function prefixId(id: any, formId: any): string;
|
|
6
|
-
export function markdownToHTML(markdown: any): any;
|
|
7
|
-
export function safeMarkdown(markdown: any): string;
|
|
8
|
-
/**
|
|
9
|
-
* Sanitizes an image source to ensure we only allow for data URI and links
|
|
10
|
-
* that start with http(s).
|
|
11
|
-
*
|
|
12
|
-
* Note: Most browsers anyway do not support script execution in <img> elements.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} src
|
|
15
|
-
* @returns {string}
|
|
16
|
-
*/
|
|
17
|
-
export function safeImageSource(src: string): string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export const formFields: (typeof Default | typeof Image)[];
|
|
2
2
|
export * from "./icons";
|
|
3
|
-
import Button from
|
|
4
|
-
import Checkbox from
|
|
5
|
-
import Checklist from
|
|
6
|
-
import Default from
|
|
7
|
-
import Datetime from
|
|
8
|
-
import FormComponent from
|
|
9
|
-
import Image from
|
|
10
|
-
import Numberfield from
|
|
11
|
-
import Radio from
|
|
12
|
-
import Select from
|
|
13
|
-
import Taglist from
|
|
14
|
-
import Text from
|
|
15
|
-
import Textfield from
|
|
16
|
-
import Textarea from
|
|
3
|
+
import Button from './form-fields/Button';
|
|
4
|
+
import Checkbox from './form-fields/Checkbox';
|
|
5
|
+
import Checklist from './form-fields/Checklist';
|
|
6
|
+
import Default from './form-fields/Default';
|
|
7
|
+
import Datetime from './form-fields/Datetime';
|
|
8
|
+
import FormComponent from './FormComponent';
|
|
9
|
+
import Image from './form-fields/Image';
|
|
10
|
+
import Numberfield from './form-fields/Number';
|
|
11
|
+
import Radio from './form-fields/Radio';
|
|
12
|
+
import Select from './form-fields/Select';
|
|
13
|
+
import Taglist from './form-fields/Taglist';
|
|
14
|
+
import Text from './form-fields/Text';
|
|
15
|
+
import Textfield from './form-fields/Textfield';
|
|
16
|
+
import Textarea from './form-fields/Textarea';
|
|
17
17
|
export { Button, Checkbox, Checklist, Default, Datetime, FormComponent, Image, Numberfield, Radio, Select, Taglist, Text, Textfield, Textarea };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export default FormRenderContext;
|
|
2
2
|
declare const FormRenderContext: import("preact").Context<{
|
|
3
3
|
Empty: (props: any) => any;
|
|
4
|
-
Children: (props: any) =>
|
|
5
|
-
Element: (props: any) =>
|
|
4
|
+
Children: (props: any) => import("preact").JSX.Element;
|
|
5
|
+
Element: (props: any) => import("preact").JSX.Element;
|
|
6
|
+
Row: (props: any) => import("preact").JSX.Element;
|
|
7
|
+
Column: (props: any) => any;
|
|
6
8
|
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as useCondition } from "./useCondition";
|
|
2
|
+
export { default as useExpressionEvaluation } from "./useExpressionEvaluation";
|
|
3
|
+
export { default as useFilteredFormData } from "./useFilteredFormData";
|
|
4
|
+
export { default as useKeyDownAction } from "./useKeyDownAction";
|
|
5
|
+
export { default as useService } from "./useService";
|
|
6
|
+
export { default as useTemplateEvaluation } from "./useTemplateEvaluation";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Evaluate if condition is met reactively based on the conditionChecker and form data.
|
|
3
3
|
*
|
|
4
4
|
* @param {string | undefined} condition
|
|
5
|
-
* @param {import('../../types').Data} data
|
|
6
5
|
*
|
|
7
6
|
* @returns {boolean} true if condition is met or no condition or condition checker exists
|
|
8
7
|
*/
|
|
9
|
-
export function useCondition(condition: string | undefined
|
|
8
|
+
export default function useCondition(condition: string | undefined): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluate a string reactively based on the expressionLanguage and form data.
|
|
3
|
+
* If the string is not an expression, it is returned as is.
|
|
4
|
+
* Memoised to minimize re-renders.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} value
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export default function useExpressionEvaluation(value: string): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function useService(type: any, strict: any): any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template a string reactively based on form data. If the string is not a template, it is returned as is.
|
|
3
|
+
* Memoised to minimize re-renders
|
|
4
|
+
*
|
|
5
|
+
* @param {string} value
|
|
6
|
+
* @param {Object} options
|
|
7
|
+
* @param {boolean} [options.debug = false]
|
|
8
|
+
* @param {boolean} [options.strict = false]
|
|
9
|
+
* @param {Function} [options.buildDebugString]
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export default function useTemplateEvaluation(value: string, options: {
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
strict?: boolean;
|
|
15
|
+
buildDebugString?: Function;
|
|
16
|
+
}): any;
|
|
@@ -19,8 +19,8 @@ export function clone<T>(data: T, replacer?: (this: any, key: string, value: any
|
|
|
19
19
|
*
|
|
20
20
|
* @return {string[]}
|
|
21
21
|
*/
|
|
22
|
-
export function getSchemaVariables(schema: any): string[];
|
|
22
|
+
export function getSchemaVariables(schema: any, expressionLanguage?: FeelExpressionLanguage): string[];
|
|
23
23
|
export * from "./constants";
|
|
24
24
|
export * from "./injector";
|
|
25
25
|
export * from "./form";
|
|
26
|
-
|
|
26
|
+
import FeelExpressionLanguage from '../features/expression-language/FeelExpressionLanguage.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export function createInjector(bootstrapModules: any): Injector;
|
|
2
|
-
import { Injector } from
|
|
2
|
+
import { Injector } from 'didi';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "View forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"require": "./dist/index.cjs"
|
|
9
9
|
},
|
|
10
10
|
"./dist/assets/form-js.css": "./dist/assets/form-js.css",
|
|
11
|
-
"./dist/assets/
|
|
11
|
+
"./dist/assets/form-js-base.css": "./dist/assets/form-js-base.css",
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
"types": "dist/types/index.d.ts",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"all": "run-s test build",
|
|
22
|
-
"build": "run-p bundle generate-types",
|
|
22
|
+
"build": "run-p bundle bundle:scss generate-types",
|
|
23
23
|
"start": "SINGLE_START=basic npm run dev",
|
|
24
24
|
"bundle": "rollup -c --failAfterWarnings --bundleConfigAsCjs",
|
|
25
|
-
"bundle:
|
|
25
|
+
"bundle:scss": "sass --no-source-map --load-path=\"../../node_modules\" assets/index.scss dist/assets/form-js.css",
|
|
26
|
+
"bundle:watch": "run-p bundle:watch-js bundle:watch-scss",
|
|
27
|
+
"bundle:watch-js": "rollup -c -w --bundleConfigAsCjs",
|
|
28
|
+
"bundle:watch-scss": "npm run bundle:scss -- --watch",
|
|
26
29
|
"dev": "npm test -- --auto-watch --no-single-run",
|
|
27
30
|
"generate-types": "tsc --allowJs --skipLibCheck --declaration --emitDeclarationOnly --outDir dist/types src/index.js && copyfiles --flat src/*.d.ts dist/types",
|
|
28
31
|
"test": "karma start",
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
"url": "https://github.com/bpmn-io"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@
|
|
45
|
+
"@carbon/grid": "^11.11.0",
|
|
43
46
|
"big.js": "^6.2.1",
|
|
44
47
|
"classnames": "^2.3.1",
|
|
45
48
|
"didi": "^9.0.0",
|
|
@@ -48,7 +51,8 @@
|
|
|
48
51
|
"ids": "^1.0.0",
|
|
49
52
|
"min-dash": "^4.0.0",
|
|
50
53
|
"preact": "^10.5.14",
|
|
51
|
-
"preact-markup": "^2.1.1"
|
|
54
|
+
"preact-markup": "^2.1.1",
|
|
55
|
+
"showdown": "^2.1.0"
|
|
52
56
|
},
|
|
53
57
|
"sideEffects": [
|
|
54
58
|
"*.css"
|
|
@@ -56,5 +60,5 @@
|
|
|
56
60
|
"files": [
|
|
57
61
|
"dist"
|
|
58
62
|
],
|
|
59
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "580e837b1daddd43fcbc24e9fa4bbaf358825692"
|
|
60
64
|
}
|