@bpmn-io/form-js-viewer 1.0.0-alpha.0 → 1.0.0-alpha.3

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.
@@ -117,28 +117,6 @@ export default class Form {
117
117
  _getModules(): ({
118
118
  __init__: string[];
119
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
120
  templating: (string | typeof import("./features/expression-language").FeelersTemplating)[];
143
121
  conditionChecker: (string | typeof import("./features/expression-language").ConditionChecker)[];
144
122
  } | {
@@ -0,0 +1,7 @@
1
+ declare class ValidateOnBlur {
2
+ constructor(eventBus: any, validator: any, form: any);
3
+ }
4
+ declare namespace ValidateOnBlur {
5
+ const $inject: string[];
6
+ }
7
+ export default ValidateOnBlur;
@@ -0,0 +1,6 @@
1
+ declare namespace _default {
2
+ const __init__: string[];
3
+ const validateOnBlurBehavior: (string | typeof ValidateOnBlurBehavior)[];
4
+ }
5
+ export default _default;
6
+ import ValidateOnBlurBehavior from './ValidateOnBlurBehavior';
@@ -0,0 +1,14 @@
1
+ declare class ViewerCommands {
2
+ constructor(commandStack: any, eventBus: any);
3
+ _commandStack: any;
4
+ registerHandlers(): void;
5
+ getHandlers(): {
6
+ 'formField.validation.update': typeof UpdateFieldValidationHandler;
7
+ };
8
+ updateFieldValidation(field: any, value: any): void;
9
+ }
10
+ declare namespace ViewerCommands {
11
+ const $inject: string[];
12
+ }
13
+ export default ViewerCommands;
14
+ import UpdateFieldValidationHandler from './cmd/UpdateFieldValidationHandler';
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare class UpdateFieldValidationHandler {
2
+ constructor(form: any, validator: any);
3
+ _form: any;
4
+ _validator: any;
5
+ execute(context: any): void;
6
+ revert(context: any): void;
7
+ }
8
+ declare namespace UpdateFieldValidationHandler {
9
+ const $inject: string[];
10
+ }
11
+ export default UpdateFieldValidationHandler;
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ const __depends__: any[];
3
+ const __init__: string[];
4
+ const viewerCommands: (string | typeof ViewerCommands)[];
5
+ }
6
+ export default _default;
7
+ export * from "./behaviors";
8
+ export { ViewerCommands };
9
+ import ViewerCommands from './ViewerCommands';
@@ -4,4 +4,5 @@ export { default as useFilteredFormData } from "./useFilteredFormData";
4
4
  export { default as useKeyDownAction } from "./useKeyDownAction";
5
5
  export { default as useReadonly } from "./useReadonly";
6
6
  export { default as useService } from "./useService";
7
+ export { default as useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
7
8
  export { default as useTemplateEvaluation } from "./useTemplateEvaluation";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Template a string reactively based on form data. If the string is not a template, it is returned as is.
3
+ * If the string contains multiple lines, only the first line is returned.
4
+ * Memoised to minimize re-renders
5
+ *
6
+ * @param {string} value
7
+ * @param {Object} [options]
8
+ * @param {boolean} [options.debug = false]
9
+ * @param {boolean} [options.strict = false]
10
+ * @param {Function} [options.buildDebugString]
11
+ *
12
+ */
13
+ export default function useSingleLineTemplateEvaluation(value: string, options?: {
14
+ debug?: boolean;
15
+ strict?: boolean;
16
+ buildDebugString?: Function;
17
+ }): any;
@@ -1,36 +1,36 @@
1
- import { Injector } from 'didi';
2
-
3
- export type Module = any;
4
- export type Schema = any;
5
-
6
- export interface Data {
7
- [x: string]: any;
8
- }
9
-
10
- export interface Errors {
11
- [x: string]: string[];
12
- }
13
-
14
- export type FormProperty = ('readOnly' | 'disabled' | string);
15
- export type FormEvent = ('submit' | 'changed' | string);
16
-
17
- export interface FormProperties {
18
- [x: string]: any;
19
- }
20
-
21
- export interface FormOptions {
22
- additionalModules?: Module[];
23
- container?: Element | null | string;
24
- injector?: Injector;
25
- modules?: Module[];
26
- properties?: FormProperties;
27
- }
28
-
29
- export interface CreateFormOptions extends FormOptions {
30
- data?: Data;
31
- schema: Schema;
32
- }
33
-
34
- export {
35
- Injector
1
+ import { Injector } from 'didi';
2
+
3
+ export type Module = any;
4
+ export type Schema = any;
5
+
6
+ export interface Data {
7
+ [x: string]: any;
8
+ }
9
+
10
+ export interface Errors {
11
+ [x: string]: string[];
12
+ }
13
+
14
+ export type FormProperty = ('readOnly' | 'disabled' | string);
15
+ export type FormEvent = ('submit' | 'changed' | string);
16
+
17
+ export interface FormProperties {
18
+ [x: string]: any;
19
+ }
20
+
21
+ export interface FormOptions {
22
+ additionalModules?: Module[];
23
+ container?: Element | null | string;
24
+ injector?: Injector;
25
+ modules?: Module[];
26
+ properties?: FormProperties;
27
+ }
28
+
29
+ export interface CreateFormOptions extends FormOptions {
30
+ data?: Data;
31
+ schema: Schema;
32
+ }
33
+
34
+ export {
35
+ Injector
36
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-viewer",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "View forms - powered by bpmn.io",
5
5
  "exports": {
6
6
  ".": {
@@ -61,5 +61,5 @@
61
61
  "files": [
62
62
  "dist"
63
63
  ],
64
- "gitHead": "992b8f130b82f8e739af7b3794e42a3ec054523d"
64
+ "gitHead": "7bd34c9bd219c930432ac15f8baaed49e2d5ec2a"
65
65
  }