@aemforms/af-core 0.22.98 → 0.22.99

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.
@@ -1227,6 +1227,9 @@ class BaseNode {
1227
1227
  get name() {
1228
1228
  return this._jsonModel.name;
1229
1229
  }
1230
+ get screenReaderText() {
1231
+ return this._jsonModel.screenReaderText;
1232
+ }
1230
1233
  get description() {
1231
1234
  return this._jsonModel.description;
1232
1235
  }
@@ -1948,7 +1951,7 @@ class Container extends Scriptable {
1948
1951
  _canHaveRepeatingChildren(mode = 'create') {
1949
1952
  const items = this._jsonModel.items;
1950
1953
  return this._jsonModel.type == 'array' && this.getDataNode() != null &&
1951
- (items.length === 1 || (items[0].repeatable == true && mode === 'restore'));
1954
+ (items.length === 1 || (items.length > 0 && items[0].repeatable == true && mode === 'restore'));
1952
1955
  }
1953
1956
  _initialize(mode) {
1954
1957
  super._initialize(mode);
@@ -3861,9 +3864,6 @@ class Field extends Scriptable {
3861
3864
  this._setProperty('errorMessage', e);
3862
3865
  this._setProperty('validationMessage', e);
3863
3866
  }
3864
- get screenReaderText() {
3865
- return this._jsonModel.screenReaderText;
3866
- }
3867
3867
  _getConstraintObject() {
3868
3868
  return Constraints;
3869
3869
  }
@@ -40,6 +40,7 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
40
40
  get fieldType(): string;
41
41
  get ':type'(): string;
42
42
  get name(): string | undefined;
43
+ get screenReaderText(): string | undefined;
43
44
  get description(): string | undefined;
44
45
  set description(d: string | undefined);
45
46
  get dataRef(): string | null | undefined;
@@ -65,7 +65,6 @@ declare class Field extends Scriptable<FieldJson> implements FieldModel {
65
65
  getErrorMessage(constraint: keyof (ConstraintsMessages)): string;
66
66
  get errorMessage(): string | undefined;
67
67
  set errorMessage(e: string | undefined);
68
- get screenReaderText(): string | undefined;
69
68
  _getConstraintObject(): {
70
69
  enum: (constraint: any, inputVal: any) => {
71
70
  valid: boolean;
package/lib/BaseNode.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
40
40
  get fieldType(): string;
41
41
  get ':type'(): string;
42
42
  get name(): string | undefined;
43
+ get screenReaderText(): string | undefined;
43
44
  get description(): string | undefined;
44
45
  set description(d: string | undefined);
45
46
  get dataRef(): string | null | undefined;
package/lib/BaseNode.js CHANGED
@@ -203,6 +203,9 @@ class BaseNode {
203
203
  get name() {
204
204
  return this._jsonModel.name;
205
205
  }
206
+ get screenReaderText() {
207
+ return this._jsonModel.screenReaderText;
208
+ }
206
209
  get description() {
207
210
  return this._jsonModel.description;
208
211
  }
package/lib/Container.js CHANGED
@@ -199,7 +199,7 @@ class Container extends Scriptable_1.default {
199
199
  _canHaveRepeatingChildren(mode = 'create') {
200
200
  const items = this._jsonModel.items;
201
201
  return this._jsonModel.type == 'array' && this.getDataNode() != null &&
202
- (items.length === 1 || (items[0].repeatable == true && mode === 'restore'));
202
+ (items.length === 1 || (items.length > 0 && items[0].repeatable == true && mode === 'restore'));
203
203
  }
204
204
  _initialize(mode) {
205
205
  super._initialize(mode);
package/lib/Field.d.ts CHANGED
@@ -65,7 +65,6 @@ declare class Field extends Scriptable<FieldJson> implements FieldModel {
65
65
  getErrorMessage(constraint: keyof (ConstraintsMessages)): string;
66
66
  get errorMessage(): string | undefined;
67
67
  set errorMessage(e: string | undefined);
68
- get screenReaderText(): string | undefined;
69
68
  _getConstraintObject(): {
70
69
  enum: (constraint: any, inputVal: any) => {
71
70
  valid: boolean;
package/lib/Field.js CHANGED
@@ -463,9 +463,6 @@ class Field extends Scriptable_1.default {
463
463
  this._setProperty('errorMessage', e);
464
464
  this._setProperty('validationMessage', e);
465
465
  }
466
- get screenReaderText() {
467
- return this._jsonModel.screenReaderText;
468
- }
469
466
  _getConstraintObject() {
470
467
  return ValidationUtils_1.Constraints;
471
468
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aemforms/af-core",
3
- "version": "0.22.98",
3
+ "version": "0.22.99",
4
4
  "description": "Core Module for Forms Runtime",
5
5
  "author": "Adobe Systems",
6
6
  "license": "Adobe Proprietary",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@adobe/json-formula": "0.1.50",
40
- "@aemforms/af-formatters": "^0.22.98"
40
+ "@aemforms/af-formatters": "^0.22.99"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/preset-env": "^7.20.2",