@genesislcap/foundation-forms 14.26.6 → 14.26.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.
package/README.md CHANGED
@@ -76,7 +76,7 @@ const sampleUISchema = {
76
76
 
77
77
  #### 4. Configure form using JSON schema (optional)
78
78
 
79
- Alternatively to providing `resourceName` you can hardcode the `JSON schema` on the client.
79
+ Instead of providing `resourceName`, you can hard-code the `JSON schema` on the client.
80
80
 
81
81
  ```ts
82
82
  const sampleJsonSchema = {
@@ -156,7 +156,7 @@ const sampleUiSchema = {
156
156
  ```
157
157
 
158
158
  :::info
159
- Use this when you want to avoid fetching metadata from the server but be aware that it could get out of sync if metadata changes on the server.
159
+ Use this when you want to avoid fetching metadata from the server, but be aware that it could get out of sync if metadata changes on the server.
160
160
  :::
161
161
 
162
162
  #### 5. Pre-fill forms with data (optional)
@@ -210,8 +210,8 @@ Filters
210
210
  <foundation-filters resourceName="ALL_TRADES"></foundation-filters>
211
211
  ```
212
212
 
213
- This should generate working form based on the `JSON schema` for that endpoint.
214
- DevTools console will output autogenerated `UI schema` that you can use to configure the filters
213
+ This should generate a working form based on the `JSON schema` for that endpoint.
214
+ The DevTools console will output an autogenerated `UI schema` that you can use to configure the filters
215
215
 
216
216
  #### 3. Configure form using UI schema
217
217
 
@@ -239,7 +239,7 @@ const sampleUISchema = {
239
239
 
240
240
  #### 4. Configure form using JSON schema (optional)
241
241
 
242
- Alternatively to providing `resourceName` you can hardcode the `JSON schema` on the client.
242
+ Instead of providing `resourceName`, you can hard-code the `JSON schema` on the client.
243
243
 
244
244
  ```ts
245
245
  const sampleJsonSchema = {
@@ -281,7 +281,7 @@ const sampleUiSchema = {
281
281
  ```
282
282
 
283
283
  :::info
284
- Use this when you want to avoid fetching metadata from the server but be aware that it could get out of sync if metadata changes on the server.
284
+ Use this when you want to avoid fetching metadata from the server, but be aware that it could get out of sync if metadata changes on the server.
285
285
  :::
286
286
 
287
287
  #### 5. An example of synchronizing values with datasource criteria
@@ -302,13 +302,13 @@ Use this when you want to avoid fetching metadata from the server but be aware t
302
302
  ```
303
303
 
304
304
 
305
- ## Advanced customization
305
+ ## Advanced customisation
306
306
 
307
307
  ### Default layout renderers and examples
308
308
 
309
- #### 1. Vertical Layout
309
+ #### 1. VerticalLayout
310
310
 
311
- This is the default layout that is defined if no `uiSchema` is specified. Arranges our control elements vertically.
311
+ This is the default layout that is defined if no `uiSchema` is specified. This arranges our control elements vertically.
312
312
 
313
313
  ```ts
314
314
  const VerticalUISchema = {
@@ -319,9 +319,9 @@ const VerticalUISchema = {
319
319
  };
320
320
  ```
321
321
 
322
- #### 2. Vertical Layout - Two columns
322
+ #### 2. VerticalLayout - two columns
323
323
 
324
- Arranges our control elements in 2 columns vertically
324
+ This arranges our control elements in 2 columns vertically.
325
325
 
326
326
  ```ts
327
327
  const VerticalColumnsUISchema = {
@@ -332,9 +332,9 @@ const VerticalColumnsUISchema = {
332
332
  };
333
333
  ```
334
334
 
335
- #### 3. Horizontal Layout
335
+ #### 3. HorizontalLayout
336
336
 
337
- Arranges our control elements horizontally
337
+ This arranges our control elements horizontally.
338
338
 
339
339
  ```ts
340
340
  const horizontalUISchema = {
@@ -349,7 +349,7 @@ const horizontalUISchema = {
349
349
 
350
350
  Array Layout allows you to create a dynamic form with the ability to add, for example, multiple users.
351
351
 
352
- It is more complicated when it comes to customization because it needs proper `jsonSchema` and `uiSchema`.
352
+ It is more complicated when it comes to customisation because it needs proper `jsonSchema` and `uiSchema`.
353
353
 
354
354
  ```ts
355
355
  const arrayUISchema = {
@@ -412,9 +412,9 @@ const arrayJsonSchema = {
412
412
  };
413
413
  ```
414
414
 
415
- #### 5. Categorization Layout
415
+ #### 5. Categorization layout
416
416
 
417
- Categorization layout allows you to create more complex forms that can be divided into appropriate categories, for example: personal information and address - which will be in separate tabs.
417
+ Categorization layout allows you to create more complex forms that can be divided into appropriate categories (for example, personal information and address), which will be in separate tabs.
418
418
 
419
419
  ```ts
420
420
  const categoryUISchema = {
@@ -468,9 +468,9 @@ const categoryUISchema = {
468
468
  };
469
469
  ```
470
470
 
471
- #### 6. Group Layout
471
+ #### 6. Group layout
472
472
 
473
- Group layout similarly to categorization layout divides forms, but this time into groups. They are visible on the same tab, but they are separated from each other by their own labels.
473
+ Group layout similarly to Categorization layout divides forms, but this time into groups. They are visible on the same tab, but they are separated from each other by their own labels.
474
474
 
475
475
  ```ts
476
476
  const groupUISchema = {
@@ -527,11 +527,11 @@ const groupUISchema = {
527
527
 
528
528
  ### Default control renderers and examples
529
529
 
530
- Most renderers are defined directly in the `jsonSchema` that comes from the server, but there are also those that we can add via `uiSchema`.
530
+ Most renderers are defined directly in the `jsonSchema` that comes from the server, but there are also those that you can add via `uiSchema`.
531
531
 
532
- #### 1. String Renderer
532
+ #### 1. String renderer
533
533
 
534
- The default renderer that will create a `text-field`.
534
+ This is the default renderer, which creates a `text-field`.
535
535
 
536
536
  ```ts
537
537
  const stringJsonSchema = {
@@ -555,9 +555,9 @@ const stringJsonSchema = {
555
555
  };
556
556
  ```
557
557
 
558
- #### 2. Number Renderer
558
+ #### 2. Number renderer
559
559
 
560
- The number renderer that will create a `number-field`.
560
+ The number renderer creates a `number-field`.
561
561
 
562
562
  ```ts
563
563
  const numberJsonSchema = {
@@ -571,9 +571,9 @@ const numberJsonSchema = {
571
571
  };
572
572
  ```
573
573
 
574
- #### 3. Boolean Renderer
574
+ #### 3. Boolean renderer
575
575
 
576
- The boolean renderer that will create a `checkbox-field`.
576
+ The boolean renderer creates a `checkbox-field`.
577
577
 
578
578
  ```ts
579
579
  const booleanJsonSchema = {
@@ -588,7 +588,7 @@ const booleanJsonSchema = {
588
588
 
589
589
  #### 4. Connected Multiselect Renderer
590
590
 
591
- The boolean renderer that will create a `multiselect` component with options from datasource.
591
+ The multiselect renderer creates a `multiselect` component with options from datasource.
592
592
 
593
593
  ```ts
594
594
  const connectedMultiselectUISchema = {
@@ -618,9 +618,9 @@ const connectedMultiselectUISchema = {
618
618
  };
619
619
  ```
620
620
 
621
- #### 5. Connected Select Renderer
621
+ #### 5. Connected Select renderer
622
622
 
623
- The boolean renderer that will create a `select` component with options.
623
+ This is a select renderer that creates a `select` component with options.
624
624
 
625
625
  ```ts
626
626
  const connectedSelectUISchema = {
@@ -650,9 +650,9 @@ const connectedSelectUISchema = {
650
650
  };
651
651
  ```
652
652
 
653
- #### 6. Date Renderer
653
+ #### 6. Date renderer
654
654
 
655
- The date renderer that will create a `date-field`.
655
+ The date renderer creates a `date-field`.
656
656
 
657
657
  ```ts
658
658
  const dateJsonSchema = {
@@ -668,9 +668,9 @@ const dateJsonSchema = {
668
668
 
669
669
  ### Specific renderers for filters and examples
670
670
 
671
- #### 1. Filter Date Renderer
671
+ #### 1. Filter date renderer
672
672
 
673
- The filter date renderer that will create a two `date-fields` with minimum and maximum value.
673
+ The filter date renderer creates two `date-fields` with minimum and maximum value.
674
674
 
675
675
  ```ts
676
676
  const dateJsonSchema = {
@@ -684,9 +684,9 @@ const dateJsonSchema = {
684
684
  };
685
685
  ```
686
686
 
687
- #### 2. Filter Number Renderer
687
+ #### 2. Filter number renderer
688
688
 
689
- The filter number renderer that will create a two `number-fields` with minimum and maximum value.
689
+ The filter number renderer creates two `number-fields` with minimum and maximum value.
690
690
 
691
691
  ```ts
692
692
  const numberJsonSchema = {
@@ -702,7 +702,7 @@ const numberJsonSchema = {
702
702
 
703
703
  ## License
704
704
 
705
- Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
705
+ Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
706
706
 
707
707
  ### Licensed components
708
- Genesis low-code platform
708
+ Genesis low-code platform
@@ -1 +1 @@
1
- {"version":3,"file":"StringControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringControlRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gCAAgC,YAAY,MAAM,0EAqB9D,CAAC;AACF,eAAO,MAAM,6BAA6B,uEAEzC,CAAC"}
1
+ {"version":3,"file":"StringControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/StringControlRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gCAAgC,YAAY,MAAM,0EAwB9D,CAAC;AACF,eAAO,MAAM,6BAA6B,uEAEzC,CAAC"}
@@ -10,7 +10,10 @@ export const getStringControlRendererTemplate = (prefix = 'zero') => html `
10
10
  <${prefix}-text-field
11
11
  type=${(x) => { var _a, _b; return (((_b = (_a = x.control.uischema) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.isPassword) ? 'password' : 'text'); }}
12
12
  :value=${(x) => x.control.data || ''}
13
- @change=${(x, c) => x.control.handleChange(x.control.path, c.event.target.value)}
13
+ @change=${(x, c) => {
14
+ const inputValue = c.event.target.value;
15
+ x.control.handleChange(x.control.path, inputValue === '' ? null : inputValue);
16
+ }}
14
17
  placeholder=${(x) => x.control.label}
15
18
  id=${(x) => x.control.path}
16
19
  data-test-id=${(x) => x.control.path}
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.26.6",
4
+ "version": "14.26.7",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -43,8 +43,8 @@
43
43
  "test:unit:watch": "watchlist src test -- npm run test:unit"
44
44
  },
45
45
  "devDependencies": {
46
- "@genesislcap/foundation-testing": "^14.26.6",
47
- "@genesislcap/genx": "^14.26.6",
46
+ "@genesislcap/foundation-testing": "^14.26.7",
47
+ "@genesislcap/genx": "^14.26.7",
48
48
  "@playwright/test": "^1.18.1",
49
49
  "@types/json-schema": "^7.0.11",
50
50
  "@types/ua-parser-js": "^0.7.36",
@@ -59,9 +59,9 @@
59
59
  "watchlist": "^0.3.1"
60
60
  },
61
61
  "dependencies": {
62
- "@genesislcap/foundation-comms": "^14.26.6",
63
- "@genesislcap/foundation-criteria": "^14.26.6",
64
- "@genesislcap/foundation-utils": "^14.26.6",
62
+ "@genesislcap/foundation-comms": "^14.26.7",
63
+ "@genesislcap/foundation-criteria": "^14.26.7",
64
+ "@genesislcap/foundation-utils": "^14.26.7",
65
65
  "@jsonforms/core": "^3.0.0",
66
66
  "@microsoft/fast-components": "^2.21.3",
67
67
  "@microsoft/fast-element": "^1.7.0",
@@ -82,5 +82,5 @@
82
82
  "access": "public"
83
83
  },
84
84
  "customElements": "dist/custom-elements.json",
85
- "gitHead": "aa1ad515ad191eb2190d06231e10de0191f845b1"
85
+ "gitHead": "52910dfe41ec45c2b29b970137a848315897e6f4"
86
86
  }