@bpmn-io/form-js-viewer 1.8.1 → 1.8.4

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.
@@ -103,14 +103,12 @@ export class Form {
103
103
  /**
104
104
  * @internal
105
105
  *
106
- * @param { { add?: boolean, field: any, indexes: object, remove?: number, value?: any } } update
106
+ * @param { { field: any, indexes: object, value: any } } update
107
107
  */
108
108
  _update(update: {
109
- add?: boolean;
110
109
  field: any;
111
110
  indexes: object;
112
- remove?: number;
113
- value?: any;
111
+ value: any;
114
112
  }): void;
115
113
  /**
116
114
  * @internal
@@ -121,13 +119,16 @@ export class Form {
121
119
  */
122
120
  _setState(state: any): void;
123
121
  /**
124
- * @internal
125
- */
122
+ * @internal
123
+ */
126
124
  _getModules(): ({
127
125
  __init__: string[];
128
126
  expressionLanguage: (string | typeof import("./features").FeelExpressionLanguage)[];
129
127
  templating: (string | typeof import("./features").FeelersTemplating)[];
130
128
  conditionChecker: (string | typeof import("./features").ConditionChecker)[];
129
+ } | {
130
+ __init__: string[];
131
+ expressionLoopPreventer: (string | typeof import("./features").ExpressionLoopPreventer)[];
131
132
  } | {
132
133
  __init__: string[];
133
134
  markdownRenderer: (string | typeof import("./features").MarkdownRenderer)[];
@@ -146,11 +147,7 @@ export class Form {
146
147
  /**
147
148
  * @internal
148
149
  */
149
- _getSubmitData(): any;
150
- /**
151
- * @internal
152
- */
153
- _applyConditions(toFilter: any, data: any, options?: {}): any;
150
+ _getSubmitData(): {};
154
151
  /**
155
152
  * @internal
156
153
  */
@@ -0,0 +1,15 @@
1
+ export class FormFieldInstanceRegistry {
2
+ constructor(eventBus: any, formFieldRegistry: any, formFields: any);
3
+ _eventBus: any;
4
+ _formFieldRegistry: any;
5
+ _formFields: any;
6
+ _formFieldInstances: {};
7
+ add(instance: any): string;
8
+ remove(instanceId: any): void;
9
+ getAll(): any[];
10
+ getAllKeyed(): any[];
11
+ clear(): void;
12
+ }
13
+ export namespace FormFieldInstanceRegistry {
14
+ let $inject: string[];
15
+ }
@@ -8,6 +8,7 @@ export namespace CoreModule {
8
8
  let importer: (string | typeof Importer)[];
9
9
  let fieldFactory: (string | typeof FieldFactory)[];
10
10
  let formFieldRegistry: (string | typeof FormFieldRegistry)[];
11
+ let formFieldInstanceRegistry: (string | typeof FormFieldInstanceRegistry)[];
11
12
  let pathRegistry: (string | typeof PathRegistry)[];
12
13
  let formLayouter: (string | typeof FormLayouter)[];
13
14
  let validator: (string | typeof Validator)[];
@@ -18,5 +19,6 @@ import { FormFieldRegistry } from './FormFieldRegistry';
18
19
  import { PathRegistry } from './PathRegistry';
19
20
  import { FormLayouter } from './FormLayouter';
20
21
  import { EventBus } from './EventBus';
22
+ import { FormFieldInstanceRegistry } from './FormFieldInstanceRegistry';
21
23
  import { Validator } from './Validator';
22
24
  export { Importer, FieldFactory, FormFieldRegistry, PathRegistry, FormLayouter };
@@ -0,0 +1,18 @@
1
+ export class ExpressionLoopPreventer {
2
+ constructor(eventBus: any);
3
+ _computedExpressions: any[];
4
+ /**
5
+ * Checks if the expression field has already been computed, and registers it if not.
6
+ *
7
+ * @param {any} expressionField
8
+ * @returns {boolean} - whether the expression field has already been computed within the current cycle
9
+ */
10
+ registerExpressionExecution(expressionField: any): boolean;
11
+ /**
12
+ * Resets the list of computed expressions.
13
+ */
14
+ reset(): void;
15
+ }
16
+ export namespace ExpressionLoopPreventer {
17
+ let $inject: string[];
18
+ }
@@ -0,0 +1,6 @@
1
+ export namespace ExpressionFieldModule {
2
+ let __init__: string[];
3
+ let expressionLoopPreventer: (string | typeof ExpressionLoopPreventer)[];
4
+ }
5
+ export { ExpressionLoopPreventer };
6
+ import { ExpressionLoopPreventer } from './ExpressionLoopPreventer';
@@ -37,10 +37,10 @@ export class FeelersTemplating {
37
37
  sanitizer?: Function;
38
38
  }): any;
39
39
  /**
40
- * @typedef {Object} ExpressionWithDepth
41
- * @property {number} depth - The depth of the expression in the syntax tree.
42
- * @property {string} expression - The extracted expression
43
- */
40
+ * @typedef {Object} ExpressionWithDepth
41
+ * @property {number} depth - The depth of the expression in the syntax tree.
42
+ * @property {string} expression - The extracted expression
43
+ */
44
44
  /**
45
45
  * Extracts all feel expressions in the template along with their depth in the syntax tree.
46
46
  * The depth is incremented for child expressions of loops to account for context drilling.
@@ -1,8 +1,10 @@
1
1
  export { ExpressionLanguageModule } from "./expressionLanguage";
2
+ export { ExpressionFieldModule } from "./expressionField";
2
3
  export { MarkdownRendererModule } from "./markdown";
3
4
  export { ViewerCommandsModule } from "./viewerCommands";
4
5
  export { RepeatRenderModule } from "./repeatRender";
5
6
  export * from "./expressionLanguage";
7
+ export * from "./expressionField";
6
8
  export * from "./markdown";
7
9
  export * from "./viewerCommands";
8
10
  export * from "./repeatRender";
@@ -5,6 +5,7 @@ export namespace ExpressionField {
5
5
  export let label: string;
6
6
  export let group: string;
7
7
  export let keyed: boolean;
8
+ export let emptyValue: any;
8
9
  export let escapeGridRender: boolean;
9
10
  export function create(options?: {}): {
10
11
  computeOn: string;
@@ -9,4 +9,10 @@ export function isDateInputInformationMatching(value: any): boolean;
9
9
  export function serializeDateTime(date: any, time: any, timeSerializingFormat: any): string;
10
10
  export function formatTimezoneOffset(minutes: any): string;
11
11
  export function isInvalidDateString(value: any): boolean;
12
+ export function getNullDateTime(): {
13
+ date: Date;
14
+ time: any;
15
+ };
16
+ export function isValidDate(date: any): boolean;
17
+ export function isValidTime(time: any): boolean;
12
18
  export const ENTER_KEYDOWN_EVENT: KeyboardEvent;
@@ -10,7 +10,6 @@ export { useReadonly } from "./useReadonly";
10
10
  export { useService } from "./useService";
11
11
  export { usePrevious } from "./usePrevious";
12
12
  export { useFlushDebounce } from "./useFlushDebounce";
13
- export { useEffectOnChange } from "./useEffectOnChange";
14
13
  export { useDeepCompareMemoize } from "./useDeepCompareMemoize";
15
14
  export { useSingleLineTemplateEvaluation } from "./useSingleLineTemplateEvaluation";
16
15
  export { useTemplateEvaluation } from "./useTemplateEvaluation";
@@ -1,36 +1,34 @@
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
- };
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 { Injector };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-viewer",
3
- "version": "1.8.1",
3
+ "version": "1.8.4",
4
4
  "description": "View forms - powered by bpmn.io",
5
5
  "exports": {
6
6
  ".": {
7
+ "types": "./dist/types/index.d.ts",
7
8
  "import": "./dist/index.es.js",
8
9
  "require": "./dist/index.cjs"
9
10
  },
@@ -64,5 +65,5 @@
64
65
  "files": [
65
66
  "dist"
66
67
  ],
67
- "gitHead": "98d0c362ba37b809703027173c58441c1a2af5c2"
68
+ "gitHead": "c9a4761209756fce5711053526023f42bf3b7b54"
68
69
  }
@@ -1 +0,0 @@
1
- export function useEffectOnChange(value: any, callback: any, dependencies?: any[]): void;