nuxeo-development-framework 6.1.5 → 6.1.7

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.
Files changed (39) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +688 -1009
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/ndf-filters/components/__parts/filter-autocomplete-input/filter-autocomplete.service.js +7 -5
  4. package/esm2015/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.js +9 -9
  5. package/esm2015/lib/components/ndf-filters/models/base-field-config.js +1 -1
  6. package/esm2015/lib/components/ndf-filters/pipes/check-condition.pipe.js +9 -4
  7. package/esm2015/lib/components/ndf-filters/pipes/evaluate-label.pipe.js +3 -3
  8. package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +2 -1
  9. package/esm2015/lib/components/pdf-tron/pdftron/silent-pdftron.service.js +2 -1
  10. package/esm2015/lib/components/reports/ndf-reports/models/details.js +1 -1
  11. package/esm2015/lib/components/reports/ndf-reports/models/graph-definition.js +1 -1
  12. package/esm2015/lib/components/reports/ndf-reports/pipes/check-condition.pipe.js +3 -3
  13. package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +28 -15
  14. package/esm2015/lib/components/reports/ndf-reports/services/reports-hooks.service.js +3 -3
  15. package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +1 -1
  16. package/esm2015/lib/components/tables/dynamic-table/services/table-hooks.service.js +4 -4
  17. package/esm2015/lib/components/tables/ndf-table/models/table-config.js +1 -1
  18. package/esm2015/lib/shared/index.js +5 -6
  19. package/esm2015/lib/shared-services/global-pdftron.service.js +2 -1
  20. package/esm2015/public-api.js +12 -13
  21. package/fesm2015/nuxeo-development-framework.js +644 -938
  22. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  23. package/lib/components/ndf-filters/components/__parts/filter-autocomplete-input/filter-autocomplete.service.d.ts +1 -2
  24. package/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.d.ts +3 -3
  25. package/lib/components/ndf-filters/models/base-field-config.d.ts +1 -1
  26. package/lib/components/ndf-filters/pipes/check-condition.pipe.d.ts +1 -2
  27. package/lib/components/reports/ndf-reports/models/details.d.ts +1 -1
  28. package/lib/components/reports/ndf-reports/models/graph-definition.d.ts +2 -2
  29. package/lib/components/reports/ndf-reports/services/report-config-mapper.service.d.ts +2 -2
  30. package/lib/components/tables/ndf-table/models/table-config.d.ts +1 -1
  31. package/lib/shared/index.d.ts +7 -5
  32. package/package.json +1 -1
  33. package/public-api.d.ts +11 -12
  34. package/esm2015/lib/shared/evaluator/evaluator.js +0 -318
  35. package/esm2015/lib/shared/evaluator/index.js +0 -3
  36. package/esm2015/lib/shared/evaluator/types.js +0 -2
  37. package/lib/shared/evaluator/evaluator.d.ts +0 -79
  38. package/lib/shared/evaluator/index.d.ts +0 -2
  39. package/lib/shared/evaluator/types.d.ts +0 -18
@@ -1,79 +0,0 @@
1
- import { EvaluatorOptions, TemplateSettings } from './types';
2
- /**
3
- * A utility class for evaluating expressions, interpolating strings, and working with templates.
4
- * This class provides static methods for dynamic evaluation of code, string interpolation,
5
- * and template processing with caching capabilities.
6
- */
7
- export declare class Evaluator {
8
- /**
9
- * Cache for storing compiled template functions to improve performance.
10
- * Keys are string hashes of the template, values are the compiled functions.
11
- */
12
- static cache: Record<string, Function>;
13
- /**
14
- * Settings for template processing, defining regex patterns for different template operations.
15
- * - interpolate: Pattern for variable interpolation ({{ variable }})
16
- * - evaluate: Pattern for code evaluation ({% code %})
17
- * - escape: Pattern for HTML escaping ({{{ variable }}})
18
- */
19
- static templateSettings: TemplateSettings;
20
- /**
21
- * Creates a function from a string or returns the function if already provided.
22
- * Uses a secure context to prevent access to the window object by default.
23
- * @param {string|Function} func - The function or string to convert to a function.
24
- * @param {...any} params - The parameters to pass to the function.
25
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the evaluation.
26
- * @returns {Function} - The resulting function.
27
- */
28
- static evaluator(func: string | Function, ...params: any[]): Function;
29
- /**
30
- * Replaces template expressions in a string with values from data.
31
- * Supports function calls within templates and fallback values using || syntax.
32
- * By default, ensures evaluation happens in a secure context to prevent access to window object.
33
- * @param {string} rawTemplate - The template string containing expressions to interpolate.
34
- * @param {Record<string, any>} data - The data object containing values to use for interpolation.
35
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the interpolation process.
36
- * @returns {string} - The interpolated string with all expressions replaced with actual values.
37
- */
38
- static interpolateString(rawTemplate: string, data: Record<string, any>, options?: EvaluatorOptions): string;
39
- /**
40
- * Performs an evaluation using the evaluation context of this component.
41
- * By default, ensures evaluation happens in a secure context to prevent access to window object.
42
- * @param {string|Function|object} func - The function or string to evaluate.
43
- * @param {object} args - The arguments to pass to the evaluation.
44
- * @param {string} ret - The name of the variable within the evaluation context to return.
45
- * @param {boolean} interpolate - Determines if it should replace all {{ }} token references with actual data.
46
- * @param {object} context - - The evaluation context.
47
- * @param {EvaluatorOptions } options - The options to pass to the evaluation.
48
- * @returns {*} - The result of the evaluation.
49
- */
50
- static evaluate(func: any, args?: Record<string, any>, ret?: string, interpolate?: boolean, context?: Record<string, any>, options?: EvaluatorOptions): any;
51
- /**
52
- * Executes a function with provided arguments and context.
53
- * By default, ensures execution happens in a secure context to prevent access to window object.
54
- * @param {Function} func - The function to execute.
55
- * @param {any[]|Record<string, any>} args - The arguments to pass to the function, either as an array or object.
56
- * @param {Record<string, any>} [context={}] - The context (this) to use when executing the function.
57
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the execution.
58
- * @returns {any} - The result of the function execution.
59
- */
60
- static execute(func: Function, args: any[] | Record<string, any>, context?: Record<string, any>, options?: EvaluatorOptions): any;
61
- /**
62
- * Creates a template function from a string with caching for performance.
63
- * By default, ensures the template function executes in a secure context.
64
- * @param {string} template - The template string to compile into a function.
65
- * @param {string} [hash] - Optional hash to use as cache key. If not provided, a hash will be generated from the template.
66
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the template.
67
- * @returns {Function|undefined} - The compiled template function, or undefined if compilation fails.
68
- */
69
- static template(template: string, hash?: string, options?: EvaluatorOptions): Function | undefined;
70
- /**
71
- * Interpolates a template with data, handling both function templates and string templates.
72
- * By default, ensures interpolation happens in a secure context to prevent access to window object.
73
- * @param {string|Function} rawTemplate - The template to interpolate, either as a string or a function.
74
- * @param {Record<string, any>} data - The data object to use for interpolation.
75
- * @param {EvaluatorOptions} options - Options for the interpolation process.
76
- * @returns {string|any} - The result of the interpolation, typically a string but could be any type depending on the template.
77
- */
78
- static interpolate(rawTemplate: string | Function, data: Record<string, any>, options?: EvaluatorOptions): string | any;
79
- }
@@ -1,2 +0,0 @@
1
- export * from './evaluator';
2
- export * from './types';
@@ -1,18 +0,0 @@
1
- export declare type EvaluatorOptions = {
2
- data?: Record<string, any>;
3
- /**
4
- * Controls the security level of evaluation.
5
- * - 'secure' (default): Prevents access to window object and other global objects
6
- * - 'unsafe': Allows access to all global objects (use with caution)
7
- */
8
- securityMode?: 'secure' | 'unsafe';
9
- };
10
- export declare type TemplateSettings = {
11
- interpolate: RegExp;
12
- evaluate: RegExp;
13
- escape: RegExp;
14
- };
15
- export declare type InterpolateString = string;
16
- export declare type EvaluatedString<VAR extends string = 'show'> = `${string}${VAR}${Whitespace}=${Whitespace}${string}`;
17
- declare type Whitespace = '' | ' ' | `${any}`;
18
- export {};