@bpmn-io/form-js-viewer 1.21.2 → 1.23.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.
@@ -23,7 +23,7 @@ export class FeelersTemplating {
23
23
  * @param {Object} options
24
24
  * @param {boolean} [options.debug = false]
25
25
  * @param {boolean} [options.strict = false]
26
- * @param {Function} [options.buildDebugString]
26
+ * @param {(error: Error) => string} [options.buildDebugString]
27
27
  * @param {Function} [options.sanitizer]
28
28
  *
29
29
  * @returns
@@ -33,26 +33,26 @@ export class FeelersTemplating {
33
33
  }, options?: {
34
34
  debug?: boolean;
35
35
  strict?: boolean;
36
- buildDebugString?: Function;
36
+ buildDebugString?: (error: Error) => string;
37
37
  sanitizer?: Function;
38
- }): any;
38
+ }): string;
39
39
  /**
40
40
  * @typedef {Object} ExpressionWithDepth
41
41
  * @property {number} depth - The depth of the expression in the syntax tree.
42
42
  * @property {string} expression - The extracted expression
43
43
  */
44
44
  /**
45
- * Extracts all feel expressions in the template along with their depth in the syntax tree.
46
- * The depth is incremented for child expressions of loops to account for context drilling.
45
+ * Extracts all feel expressions in the template along with their depth in the syntax tree.
46
+ * The depth is incremented for child expressions of loops to account for context drilling.
47
47
 
48
- * @name extractExpressionsWithDepth
49
- * @param {string} template - A feelers template string.
50
- * @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
51
- *
52
- * @example
53
- * const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
54
- * const extractedExpressions = _extractExpressionsWithDepth(template);
55
- */
48
+ * @name _extractExpressionsWithDepth
49
+ * @param {string} template - A feelers template string.
50
+ * @returns {Array<ExpressionWithDepth>} An array of objects, each containing the depth and the extracted expression.
51
+ *
52
+ * @example
53
+ * const template = "Hello {{user}}, you have:{{#loop items}}\n- {{amount}} {{name}}{{/loop}}.";
54
+ * const extractedExpressions = _extractExpressionsWithDepth(template);
55
+ */
56
56
  _extractExpressionsWithDepth(template: string): Array<{
57
57
  /**
58
58
  * - The depth of the expression in the syntax tree.
@@ -2,3 +2,4 @@ export function countDecimals(number: any): any;
2
2
  export function isValidNumber(value: any): boolean;
3
3
  export function willKeyProduceValidNumber(key: any, previousValue: any, caretIndex: any, selectionWidth: any, decimalDigits: any): boolean;
4
4
  export function isNullEquivalentValue(value: any): boolean;
5
+ export function serializeToInputString(value: any): string;
@@ -11,4 +11,21 @@ export function generateIdForType(type: any): string;
11
11
  */
12
12
  export function clone<T>(data: T, replacer?: (this: any, key: string, value: any) => any): T;
13
13
  export function runRecursively(formField: any, fn: any): void;
14
+ /**
15
+ * Returns a copy of `target` with the value at `path` removed, pruning any
16
+ * ancestor that becomes empty. Pure: the input is not mutated and untouched
17
+ * sibling branches keep their original references (path-cloning).
18
+ *
19
+ * Pruning rules:
20
+ * - An object ancestor is removed when it has no own keys left.
21
+ * - An array ancestor is removed when every entry is nullish. Arrays are
22
+ * never compacted; `delete` leaves a sparse hole so sibling indexes stay
23
+ * stable.
24
+ *
25
+ * @template T
26
+ * @param {T} target
27
+ * @param {Array<string|number>} path
28
+ * @returns {T}
29
+ */
30
+ export function pruneAt<T>(target: T, path: Array<string | number>): T;
14
31
  export function wrapObjectKeysWithUnderscores(obj: any): {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-viewer",
3
- "version": "1.21.2",
3
+ "version": "1.23.0",
4
4
  "description": "View forms - powered by bpmn.io",
5
5
  "exports": {
6
6
  ".": {
@@ -27,7 +27,7 @@
27
27
  "bundle": "rollup -c --failAfterWarnings",
28
28
  "bundle:scss": "sass --no-source-map --load-path=\"../../node_modules\" assets/index.scss dist/assets/form-js.css",
29
29
  "bundle:watch": "run-p bundle:watch-js bundle:watch-scss",
30
- "bundle:watch-js": "rollup -c -w --bundleConfigAsCjs",
30
+ "bundle:watch-js": "rollup -c -w",
31
31
  "bundle:watch-scss": "npm run bundle:scss -- --watch",
32
32
  "dev": "npm test -- --auto-watch --no-single-run",
33
33
  "generate-types": "tsc --allowJs --skipLibCheck --declaration --emitDeclarationOnly --outDir dist/types src/index.js && copyfiles --flat src/*.d.ts dist/types",
@@ -50,13 +50,13 @@
50
50
  "big.js": "^7.0.1",
51
51
  "classnames": "^2.5.1",
52
52
  "didi": "^11.0.0",
53
- "dompurify": "^3.3.1",
54
- "feelers": "^1.5.1",
53
+ "dompurify": "^3.4.2",
54
+ "feelers": "^3.1.0",
55
55
  "flatpickr": "^4.6.13",
56
- "ids": "^3.0.1",
57
- "lodash": "^4.17.23",
56
+ "ids": "^3.0.2",
57
+ "lodash": "^4.18.1",
58
58
  "luxon": "^3.7.2",
59
- "marked": "^17.0.1",
59
+ "marked": "^18.0.3",
60
60
  "min-dash": "^5.0.0",
61
61
  "preact": "^10.5.14"
62
62
  },
@@ -66,5 +66,5 @@
66
66
  "files": [
67
67
  "dist"
68
68
  ],
69
- "gitHead": "c0cc5188b11954fe78aa612805d7763a5efe2120"
69
+ "gitHead": "2f1727cc15d9619cb895ccd778e54a0d9ec14fc6"
70
70
  }