@genesislcap/foundation-forms 14.4.0 → 14.5.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.
Files changed (46) hide show
  1. package/dist/dts/filters/filters.d.ts +98 -0
  2. package/dist/dts/filters/filters.d.ts.map +1 -0
  3. package/dist/dts/filters/filters.styles.d.ts +2 -0
  4. package/dist/dts/filters/filters.styles.d.ts.map +1 -0
  5. package/dist/dts/filters/filters.template.d.ts +3 -0
  6. package/dist/dts/filters/filters.template.d.ts.map +1 -0
  7. package/dist/dts/filters/index.d.ts +2 -0
  8. package/dist/dts/filters/index.d.ts.map +1 -0
  9. package/dist/dts/index.d.ts +1 -0
  10. package/dist/dts/index.d.ts.map +1 -1
  11. package/dist/dts/jsonforms/renderers/ControlWrapperRenderer.d.ts.map +1 -1
  12. package/dist/dts/jsonforms/renderers/FilterDateControlRenderer.d.ts +3 -0
  13. package/dist/dts/jsonforms/renderers/FilterDateControlRenderer.d.ts.map +1 -0
  14. package/dist/dts/jsonforms/renderers/FilterNumberControlRenderer.d.ts +3 -0
  15. package/dist/dts/jsonforms/renderers/FilterNumberControlRenderer.d.ts.map +1 -0
  16. package/dist/dts/utils/filters.d.ts +13 -0
  17. package/dist/dts/utils/filters.d.ts.map +1 -0
  18. package/dist/dts/utils/index.d.ts +1 -0
  19. package/dist/dts/utils/index.d.ts.map +1 -1
  20. package/dist/esm/filters/filters.js +144 -0
  21. package/dist/esm/filters/filters.styles.js +62 -0
  22. package/dist/esm/filters/filters.template.js +40 -0
  23. package/dist/esm/filters/index.js +1 -0
  24. package/dist/esm/index.js +1 -0
  25. package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +1 -0
  26. package/dist/esm/jsonforms/renderers/FilterDateControlRenderer.js +67 -0
  27. package/dist/esm/jsonforms/renderers/FilterNumberControlRenderer.js +60 -0
  28. package/dist/esm/utils/filters.js +84 -0
  29. package/dist/esm/utils/index.js +1 -0
  30. package/dist/foundation-forms.api.json +363 -0
  31. package/dist/foundation-forms.d.ts +109 -0
  32. package/docs/api/foundation-forms.createexpressions.md +13 -0
  33. package/docs/api/foundation-forms.filters.clearfiltersdata.md +18 -0
  34. package/docs/api/foundation-forms.filters.data.md +13 -0
  35. package/docs/api/foundation-forms.filters.disconnectedcallback.md +18 -0
  36. package/docs/api/foundation-forms.filters.jsonschema.md +18 -0
  37. package/docs/api/foundation-forms.filters.md +37 -0
  38. package/docs/api/foundation-forms.filters.renderers.md +13 -0
  39. package/docs/api/foundation-forms.filters.resourcename.md +13 -0
  40. package/docs/api/foundation-forms.filters.uischema.md +50 -0
  41. package/docs/api/foundation-forms.filters.value.md +13 -0
  42. package/docs/api/foundation-forms.filters.valuechanged.md +18 -0
  43. package/docs/api/foundation-forms.filtersrenderers.md +12 -0
  44. package/docs/api/foundation-forms.md +3 -0
  45. package/docs/api-report.md +40 -0
  46. package/package.json +6 -5
@@ -0,0 +1,37 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md)
4
+
5
+ ## Filters class
6
+
7
+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Foundation filters component for automatically generated filters based on json schema obtained from the api, supplied initial data or supplied JSON schema. Allowing customisable filters elements using UI schema and set of custom renderers
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export declare class Filters extends FoundationElement
16
+ ```
17
+ **Extends:** FoundationElement
18
+
19
+ ## Properties
20
+
21
+ | Property | Modifiers | Type | Description |
22
+ | --- | --- | --- | --- |
23
+ | [data](./foundation-forms.filters.data.md) | | any | Initial data for the filters |
24
+ | [jsonSchema](./foundation-forms.filters.jsonschema.md) | | JSONSchema7 | Alternatively to providing [Form.resourceName](./foundation-forms.form.resourcename.md) you can hardcode the JSON schema on the client. |
25
+ | [renderers](./foundation-forms.filters.renderers.md) | | [RendererEntry](./foundation-forms.rendererentry.md)<!-- -->\[\] | Allows to provide set of renderers used by the filters. If not provided it will default to text-field inputs |
26
+ | [resourceName](./foundation-forms.filters.resourcename.md) | | string | Name of the backend resource which will provide metadata used to generate filters |
27
+ | [uischema](./foundation-forms.filters.uischema.md) | | UISchemaElement | UI schema used to define configuration of the layout and elements in the filters Check [UiSchemaElement](./foundation-forms.uischemaelement.md) for possible options |
28
+ | [value](./foundation-forms.filters.value.md) | | string | Created criteria based on the given data that can be used to filter the data |
29
+
30
+ ## Methods
31
+
32
+ | Method | Modifiers | Description |
33
+ | --- | --- | --- |
34
+ | [clearFiltersData()](./foundation-forms.filters.clearfiltersdata.md) | | **_(BETA)_** |
35
+ | [disconnectedCallback()](./foundation-forms.filters.disconnectedcallback.md) | | **_(BETA)_** |
36
+ | [valueChanged()](./foundation-forms.filters.valuechanged.md) | | **_(BETA)_** |
37
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md) &gt; [renderers](./foundation-forms.filters.renderers.md)
4
+
5
+ ## Filters.renderers property
6
+
7
+ Allows to provide set of renderers used by the filters. If not provided it will default to text-field inputs
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ renderers: RendererEntry[];
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md) &gt; [resourceName](./foundation-forms.filters.resourcename.md)
4
+
5
+ ## Filters.resourceName property
6
+
7
+ Name of the backend resource which will provide metadata used to generate filters
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ resourceName: string;
13
+ ```
@@ -0,0 +1,50 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md) &gt; [uischema](./foundation-forms.filters.uischema.md)
4
+
5
+ ## Filters.uischema property
6
+
7
+ UI schema used to define configuration of the layout and elements in the filters Check [UiSchemaElement](./foundation-forms.uischemaelement.md) for possible options
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ uischema: UISchemaElement;
13
+ ```
14
+
15
+ ## Remarks
16
+
17
+ If not provided will be autogenerated based on json schema or initial data
18
+
19
+ ## Example
20
+
21
+ Here's a simple example:
22
+
23
+ ```
24
+ const sampleUISchema = {
25
+ type: 'VerticalLayout',
26
+ elements: [
27
+ {
28
+ type: 'Control',
29
+ scope: '#/properties/QUANTITY',
30
+ label: 'Quantity',
31
+ },
32
+ {
33
+ type: 'Control',
34
+ scope: '#/properties/INSTRUMENT_ID',
35
+ options: {
36
+ allOptionsResourceName: 'INSTRUMENT',
37
+ valueField: 'INSTRUMENT_ID',
38
+ labelField: 'INSTRUMENT_ID',
39
+ },
40
+ label: 'Instrument',
41
+ },
42
+ {
43
+ type: 'Control',
44
+ scope: '#/properties/SIDE',
45
+ label: 'Side',
46
+ },
47
+ ],
48
+ };
49
+ ```
50
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md) &gt; [value](./foundation-forms.filters.value.md)
4
+
5
+ ## Filters.value property
6
+
7
+ Created criteria based on the given data that can be used to filter the data
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ value: string;
13
+ ```
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [Filters](./foundation-forms.filters.md) &gt; [valueChanged](./foundation-forms.filters.valuechanged.md)
4
+
5
+ ## Filters.valueChanged() method
6
+
7
+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ **Signature:**
11
+
12
+ ```typescript
13
+ valueChanged(): void;
14
+ ```
15
+ **Returns:**
16
+
17
+ void
18
+
@@ -0,0 +1,12 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-forms](./foundation-forms.md) &gt; [filtersRenderers](./foundation-forms.filtersrenderers.md)
4
+
5
+ ## filtersRenderers variable
6
+
7
+
8
+ **Signature:**
9
+
10
+ ```typescript
11
+ filtersRenderers: any[]
12
+ ```
@@ -8,12 +8,15 @@
8
8
 
9
9
  | Class | Description |
10
10
  | --- | --- |
11
+ | [Filters](./foundation-forms.filters.md) | **_(BETA)_** Foundation filters component for automatically generated filters based on json schema obtained from the api, supplied initial data or supplied JSON schema. Allowing customisable filters elements using UI schema and set of custom renderers |
11
12
  | [Form](./foundation-forms.form.md) | **_(BETA)_** Foundation form component for automatically generated forms based on json schema obtained from the api, supplied initial data or supplied JSON schema. Allowing customisable form elements using UI schema and set of custom renderers |
12
13
 
13
14
  ## Variables
14
15
 
15
16
  | Variable | Description |
16
17
  | --- | --- |
18
+ | [createExpressions](./foundation-forms.createexpressions.md) | Creates a expressions/criteria from given payload |
19
+ | [filtersRenderers](./foundation-forms.filtersrenderers.md) | |
17
20
  | [genesisErrorTranslator](./foundation-forms.genesiserrortranslator.md) | |
18
21
  | [mustMatch](./foundation-forms.mustmatch.md) | Ensures the value of the current field (the one the validator is on) matches the one of the target field. |
19
22
  | [renderers](./foundation-forms.renderers.md) | |
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { ErrorObject } from 'ajv';
8
8
  import { ErrorTranslator } from '@jsonforms/core';
9
+ import { Expression } from '@genesislcap/foundation-criteria';
9
10
  import { FASTElement } from '@microsoft/fast-element';
10
11
  import { FoundationElement } from '@microsoft/fast-foundation';
11
12
  import { JsonFormsState } from '@jsonforms/core';
@@ -17,6 +18,45 @@ import { StatePropsOfControl } from '@jsonforms/core';
17
18
  import { UISchemaElement } from '@jsonforms/core';
18
19
  import { ViewTemplate } from '@microsoft/fast-element';
19
20
 
21
+ // Warning: (ae-forgotten-export) The symbol "Expressions" needs to be exported by the entry point index.d.ts
22
+ //
23
+ // @public
24
+ export const createExpressions: (payload: any) => Expressions;
25
+
26
+ // @beta
27
+ export class Filters extends FoundationElement {
28
+ // (undocumented)
29
+ clearFiltersData(): void;
30
+ // @public
31
+ data: any;
32
+ // (undocumented)
33
+ disconnectedCallback(): void;
34
+ // @public
35
+ jsonSchema: JSONSchema7;
36
+ // @internal (undocumented)
37
+ onChange(event: CustomEvent): void;
38
+ // @public
39
+ renderers: RendererEntry[];
40
+ // @public
41
+ resourceName: string;
42
+ // @internal (undocumented)
43
+ searchFilters(): void;
44
+ // @public
45
+ uischema: UISchemaElement;
46
+ // @public
47
+ value: string;
48
+ // (undocumented)
49
+ valueChanged(): void;
50
+ }
51
+
52
+ // Warning: (ae-internal-missing-underscore) The name "filtersLogger" should be prefixed with an underscore because the declaration is marked as @internal
53
+ //
54
+ // @internal (undocumented)
55
+ export const filtersLogger: Logger;
56
+
57
+ // @public (undocumented)
58
+ export const filtersRenderers: any[];
59
+
20
60
  // @beta
21
61
  export class Form extends FoundationElement {
22
62
  // @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-forms",
3
3
  "description": "Genesis Foundation Forms",
4
- "version": "14.4.0",
4
+ "version": "14.5.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -48,7 +48,7 @@
48
48
  "test:unit:watch": "watchlist src test -- npm run test:unit"
49
49
  },
50
50
  "devDependencies": {
51
- "@genesislcap/foundation-testing": "^14.4.0",
51
+ "@genesislcap/foundation-testing": "^14.5.0",
52
52
  "@microsoft/api-documenter": "^7.19.13",
53
53
  "@microsoft/api-extractor": "^7.31.1",
54
54
  "@module-federation/dashboard-plugin": "2.3.0",
@@ -100,8 +100,9 @@
100
100
  "webpack-merge": "^5.7.3"
101
101
  },
102
102
  "dependencies": {
103
- "@genesislcap/foundation-comms": "^14.4.0",
104
- "@genesislcap/foundation-utils": "^14.4.0",
103
+ "@genesislcap/foundation-comms": "^14.5.0",
104
+ "@genesislcap/foundation-criteria": "^14.5.0",
105
+ "@genesislcap/foundation-utils": "^14.5.0",
105
106
  "@jsonforms/core": "^3.0.0",
106
107
  "@microsoft/fast-components": "^2.21.3",
107
108
  "@microsoft/fast-element": "^1.7.0",
@@ -121,5 +122,5 @@
121
122
  "publishConfig": {
122
123
  "access": "public"
123
124
  },
124
- "gitHead": "faee66c559ee8763ae7bd4cc448b768d86391a41"
125
+ "gitHead": "0b69be3bb6826011ac8571a7bbb414cdb147c29a"
125
126
  }