@bpmn-io/form-js-viewer 1.13.2 → 1.14.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.
@@ -30,12 +30,12 @@ export class Form {
30
30
  get: {
31
31
  <Name extends never>(name: Name): null[Name];
32
32
  <T>(name: string): T;
33
- <T_1>(name: string, strict: true): T_1;
34
- <T_2>(name: string, strict: boolean): T_2;
33
+ <T>(name: string, strict: true): T;
34
+ <T>(name: string, strict: boolean): T;
35
35
  };
36
36
  invoke: {
37
- <T_3>(func: import("didi").FactoryFunction<T_3>, context?: unknown, locals?: import("didi").LocalsMap): T_3;
38
- <T_4>(func: import("didi").ArrayFunc<T_4>, context?: unknown, locals?: import("didi").LocalsMap): T_4;
37
+ <T>(func: import("didi").FactoryFunction<T>, context?: import("didi").InjectionContext, locals?: import("didi").LocalsMap): T;
38
+ <T>(func: import("didi").ArrayFunc<T>, context?: import("didi").InjectionContext, locals?: import("didi").LocalsMap): T;
39
39
  };
40
40
  clear(): void;
41
41
  /**
@@ -153,14 +153,14 @@ export class Form {
153
153
  */
154
154
  _getInitializedFieldData(data: any, options?: {}): any;
155
155
  }
156
- export type Injector = import('./types').Injector;
157
- export type Data = import('./types').Data;
158
- export type Errors = import('./types').Errors;
159
- export type Schema = import('./types').Schema;
160
- export type FormProperties = import('./types').FormProperties;
161
- export type FormProperty = import('./types').FormProperty;
162
- export type FormEvent = import('./types').FormEvent;
163
- export type FormOptions = import('./types').FormOptions;
156
+ export type Injector = import("./types").Injector;
157
+ export type Data = import("./types").Data;
158
+ export type Errors = import("./types").Errors;
159
+ export type Schema = import("./types").Schema;
160
+ export type FormProperties = import("./types").FormProperties;
161
+ export type FormProperty = import("./types").FormProperty;
162
+ export type FormEvent = import("./types").FormEvent;
163
+ export type FormOptions = import("./types").FormOptions;
164
164
  export type State = {
165
165
  data: Data;
166
166
  initialData: Data;
@@ -6,7 +6,7 @@ export class Importer {
6
6
  * @param { import('./FieldFactory').FieldFactory } fieldFactory
7
7
  * @param { import('./FormLayouter').FormLayouter } formLayouter
8
8
  */
9
- constructor(formFieldRegistry: import('./FormFieldRegistry').FormFieldRegistry, pathRegistry: import('./PathRegistry').PathRegistry, fieldFactory: import('./FieldFactory').FieldFactory, formLayouter: import('./FormLayouter').FormLayouter);
9
+ constructor(formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry, pathRegistry: import("./PathRegistry").PathRegistry, fieldFactory: import("./FieldFactory").FieldFactory, formLayouter: import("./FormLayouter").FormLayouter);
10
10
  _formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry;
11
11
  _pathRegistry: import("./PathRegistry").PathRegistry;
12
12
  _fieldFactory: import("./FieldFactory").FieldFactory;
@@ -34,7 +34,7 @@ export class ConditionChecker {
34
34
  *
35
35
  * @returns {boolean|null}
36
36
  */
37
- check(condition: string, data?: import('../../types').Data): boolean | null;
37
+ check(condition: string, data?: import("../../types").Data): boolean | null;
38
38
  /**
39
39
  * Check if hide condition is met.
40
40
  *
@@ -29,7 +29,7 @@ export class FeelExpressionLanguage {
29
29
  *
30
30
  * @returns {any}
31
31
  */
32
- evaluate(expression: string, data?: import('../../types').Data): any;
32
+ evaluate(expression: string, data?: import("../../types").Data): any;
33
33
  }
34
34
  export namespace FeelExpressionLanguage {
35
35
  let $inject: string[];
@@ -53,7 +53,7 @@ export class FeelersTemplating {
53
53
  * const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
54
54
  * const extractedExpressions = _extractExpressionsWithDepth(template);
55
55
  */
56
- _extractExpressionsWithDepth(template: string): {
56
+ _extractExpressionsWithDepth(template: string): Array<{
57
57
  /**
58
58
  * - The depth of the expression in the syntax tree.
59
59
  */
@@ -62,7 +62,7 @@ export class FeelersTemplating {
62
62
  * - The extracted expression
63
63
  */
64
64
  expression: string;
65
- }[];
65
+ }>;
66
66
  }
67
67
  export namespace FeelersTemplating {
68
68
  let $inject: any[];
@@ -2,13 +2,13 @@ export class RepeatRenderManager {
2
2
  constructor(form: any, formFields: any, formFieldRegistry: any, pathRegistry: any, eventBus: any);
3
3
  _form: any;
4
4
  /** @type {import('../../render/FormFields').FormFields} */
5
- _formFields: import('../../render/FormFields').FormFields;
5
+ _formFields: import("../../render/FormFields").FormFields;
6
6
  /** @type {import('../../core/FormFieldRegistry').FormFieldRegistry} */
7
- _formFieldRegistry: import('../../core/FormFieldRegistry').FormFieldRegistry;
7
+ _formFieldRegistry: import("../../core/FormFieldRegistry").FormFieldRegistry;
8
8
  /** @type {import('../../core/PathRegistry').PathRegistry} */
9
- _pathRegistry: import('../../core/PathRegistry').PathRegistry;
9
+ _pathRegistry: import("../../core/PathRegistry").PathRegistry;
10
10
  /** @type {import('../../core/EventBus').EventBus} */
11
- _eventBus: import('../../core/EventBus').EventBus;
11
+ _eventBus: import("../../core/EventBus").EventBus;
12
12
  Repeater(props: any): import("preact").JSX.Element;
13
13
  RepeatFooter(props: any): import("preact").JSX.Element;
14
14
  /**
@@ -12,7 +12,7 @@ export function createForm(options: CreateFormOptions): Promise<Form>;
12
12
  export * from "./render";
13
13
  export * from "./util";
14
14
  export * from "./features";
15
- export type CreateFormOptions = import('./types').CreateFormOptions;
15
+ export type CreateFormOptions = import("./types").CreateFormOptions;
16
16
  import { Form } from './Form';
17
17
  export const schemaVersion: 18;
18
18
  export { Form };
@@ -4,7 +4,7 @@ export class FileRegistry {
4
4
  * @param {import('../core/FormFieldRegistry').FormFieldRegistry} formFieldRegistry
5
5
  * @param {import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry} formFieldInstanceRegistry
6
6
  */
7
- constructor(eventBus: import('../core/EventBus').EventBus, formFieldRegistry: import('../core/FormFieldRegistry').FormFieldRegistry, formFieldInstanceRegistry: import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry);
7
+ constructor(eventBus: import("../core/EventBus").EventBus, formFieldRegistry: import("../core/FormFieldRegistry").FormFieldRegistry, formFieldInstanceRegistry: import("../core/FormFieldInstanceRegistry").FormFieldInstanceRegistry);
8
8
  /**
9
9
  * @param {string} id
10
10
  * @param {File[]} files
@@ -36,11 +36,11 @@ export class FileRegistry {
36
36
  /** @type {Map<string, File[]>} */
37
37
  [fileRegistry]: Map<string, File[]>;
38
38
  /** @type {import('../core/EventBus').EventBus} */
39
- [eventBusSymbol]: import('../core/EventBus').EventBus;
39
+ [eventBusSymbol]: import("../core/EventBus").EventBus;
40
40
  /** @type {import('../core/FormFieldRegistry').FormFieldRegistry} */
41
- [formFieldRegistrySymbol]: import('../core/FormFieldRegistry').FormFieldRegistry;
41
+ [formFieldRegistrySymbol]: import("../core/FormFieldRegistry").FormFieldRegistry;
42
42
  /** @type {import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry} */
43
- [formFieldInstanceRegistrySymbol]: import('../core/FormFieldInstanceRegistry').FormFieldInstanceRegistry;
43
+ [formFieldInstanceRegistrySymbol]: import("../core/FormFieldInstanceRegistry").FormFieldInstanceRegistry;
44
44
  }
45
45
  export namespace FileRegistry {
46
46
  let $inject: string[];
@@ -15,8 +15,8 @@ export namespace Renderer {
15
15
  let $inject: string[];
16
16
  }
17
17
  export type Config = {
18
- container;
18
+ container: any;
19
19
  };
20
- export type Injector = import('didi').Injector;
21
- export type EventBus = import('../core/EventBus').EventBus;
22
- export type Form = import('../Form').Form;
20
+ export type Injector = import("didi").Injector;
21
+ export type EventBus = import("../core/EventBus").EventBus;
22
+ export type Form = import("../Form").Form;
@@ -11,6 +11,8 @@
11
11
  * @property {string} [field.label]
12
12
  * @property {string} [field.accept]
13
13
  * @property {string|boolean} [field.multiple]
14
+ * @property {Object} [field.validate]
15
+ * @property {boolean} [field.validate.required]
14
16
  * @property {string} [value]
15
17
  *
16
18
  * @param {Props} props
@@ -41,6 +43,9 @@ export type Props = {
41
43
  label?: string;
42
44
  accept?: string;
43
45
  multiple?: string | boolean;
46
+ validate?: {
47
+ required?: boolean;
48
+ };
44
49
  };
45
50
  value?: string;
46
51
  };
@@ -51,7 +51,7 @@ export namespace Table {
51
51
  }[];
52
52
  }
53
53
  }
54
- export type Direction = ('asc' | 'desc');
54
+ export type Direction = ("asc" | "desc");
55
55
  export type Sorting = {
56
56
  key: string;
57
57
  direction: Direction;
@@ -14,4 +14,4 @@ export function useReadonly(formField: any, properties?: FormProperties): boolea
14
14
  * Retrieve readonly value of a form field, given it can be an
15
15
  * expression optionally or configured globally.
16
16
  */
17
- export type FormProperties = import('../../types').FormProperties;
17
+ export type FormProperties = import("../../types").FormProperties;
@@ -4,4 +4,4 @@
4
4
  * @param {boolean} [strict=true]
5
5
  * @returns {T | null}
6
6
  */
7
- export function useService<T>(type: string, strict?: boolean): T;
7
+ export function useService<T>(type: string, strict?: boolean): T | null;
@@ -36,4 +36,4 @@ export function getSchemaVariables(schema: Schema, options?: {
36
36
  inputs?: boolean;
37
37
  outputs?: boolean;
38
38
  }): string[];
39
- export type Schema = import('../types').Schema;
39
+ export type Schema = import("../types").Schema;
@@ -1 +1 @@
1
- export function getAncestryList(formFieldId: string, formFieldRegistry: import('../core/FormFieldRegistry').FormFieldRegistry): Array<string>;
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.13.2",
3
+ "version": "1.14.0",
4
4
  "description": "View forms - powered by bpmn.io",
5
5
  "exports": {
6
6
  ".": {
@@ -45,18 +45,18 @@
45
45
  "url": "https://github.com/bpmn-io"
46
46
  },
47
47
  "dependencies": {
48
- "@carbon/grid": "^11.29.0",
48
+ "@carbon/grid": "^11.30.0",
49
49
  "big.js": "^6.2.2",
50
50
  "classnames": "^2.5.1",
51
51
  "didi": "^10.2.2",
52
- "dompurify": "^3.2.0",
52
+ "dompurify": "^3.2.3",
53
53
  "feelers": "^1.4.0",
54
- "feelin": "^3.2.0",
54
+ "feelin": "^4.3.0",
55
55
  "flatpickr": "^4.6.13",
56
56
  "ids": "^1.0.5",
57
57
  "lodash": "^4.17.21",
58
58
  "luxon": "^3.5.0",
59
- "marked": "^15.0.1",
59
+ "marked": "^15.0.6",
60
60
  "min-dash": "^4.2.2",
61
61
  "preact": "^10.5.14"
62
62
  },
@@ -66,5 +66,5 @@
66
66
  "files": [
67
67
  "dist"
68
68
  ],
69
- "gitHead": "325bb666c75b05cd1a51c19a0d1fc437d2b71e2c"
69
+ "gitHead": "4af04fd5caafd491ba61099e6500fd20b9ee1891"
70
70
  }