Browse Source

Merge branch 'master' of github.com:Squidex/squidex

pull/1233/head
Sebastian Stehle 1 year ago
parent
commit
53532f0c4a
  1. 8
      .github/workflows/dev.yml
  2. 2
      .github/workflows/make-screenshots.yml
  3. 8
      .github/workflows/release.yml
  4. 9
      README.md
  5. 6
      backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs
  6. 1
      backend/i18n/frontend_en.json
  7. 1
      backend/i18n/frontend_fr.json
  8. 1
      backend/i18n/frontend_it.json
  9. 1
      backend/i18n/frontend_nl.json
  10. 1
      backend/i18n/frontend_pt.json
  11. 1
      backend/i18n/frontend_zh.json
  12. 1
      backend/i18n/source/backend_en.json
  13. 1
      backend/i18n/source/frontend_en.json
  14. 18
      backend/src/Squidex.Domain.Apps.Core.Model/FieldDescriptions.Designer.cs
  15. 6
      backend/src/Squidex.Domain.Apps.Core.Model/FieldDescriptions.resx
  16. 2
      backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldProperties.cs
  17. 7
      backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptingCompleter.cs
  18. 6
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs
  19. 3
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/RootContext.cs
  20. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs
  21. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs
  22. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs
  23. 22
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs
  24. 17
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs
  25. 10
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs
  26. 55
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs
  27. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs
  28. 43
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NotChangedValidator.cs
  29. 60
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs
  30. 31
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs
  31. 42
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs
  32. 6
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs
  33. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs
  34. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs
  35. 42
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs
  36. 96
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs
  37. 2
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs
  38. 4
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs
  39. 14
      backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs
  40. 4
      backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs
  41. 3
      backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs
  42. 35
      backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs
  43. 2
      backend/src/Squidex.Infrastructure/Tasks/Scheduler.cs
  44. 3
      backend/src/Squidex.Shared/Texts.fr.resx
  45. 3
      backend/src/Squidex.Shared/Texts.it.resx
  46. 3
      backend/src/Squidex.Shared/Texts.nl.resx
  47. 3
      backend/src/Squidex.Shared/Texts.pt.resx
  48. 3
      backend/src/Squidex.Shared/Texts.resx
  49. 3
      backend/src/Squidex.Shared/Texts.zh.resx
  50. 5
      backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs
  51. 372
      backend/src/Squidex/wwwroot/editor/squidex-editor.js
  52. 40
      backend/tests/Squidex.Domain.Apps.Core.Tests/Model/Schemas/Schema.json
  53. 40
      backend/tests/Squidex.Domain.Apps.Core.Tests/Model/Schemas/Schema_Old.json
  54. 2
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/Scripting/ScriptingCompleterTests.cs
  55. 2
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ArrayFieldTests.cs
  56. 44
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ContentValidationTests.cs
  57. 48
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ValidationTestExtensions.cs
  58. 2
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/Validators/AllowedValuesValidatorTests.cs
  59. 144
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/Validators/NotChangedValidatorTests.cs
  60. 39
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Add_should_create_events_and_add_field.verified.txt
  61. 255
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Add_should_create_events_and_add_field_to_array.verified.txt
  62. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ConfigureUIFields_should_create_events_for_list_fields_and_update_schema.verified.txt
  63. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ConfigureUIFields_should_create_events_for_reference_fields_and_update_schema.verified.txt
  64. 1080
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Create_should_create_events_and_schema_with_initial_fields.verified.txt
  65. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DeleteField_should_create_events_and_delete_nested_field.verified.txt
  66. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DisableField_should_create_events_and_update_field_disabled_flag.verified.txt
  67. 252
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DisableField_should_create_events_and_update_nested_field_disabled_flag.verified.txt
  68. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.EnableField_should_create_events_and_update_field_disabled_flag.verified.txt
  69. 252
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.EnableField_should_create_events_and_update_nested_field_disabled_flag.verified.txt
  70. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.HideField_should_create_events_and_update_field_hidden_flag.verified.txt
  71. 252
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.HideField_should_create_events_and_update_nested_field_hidden_flag.verified.txt
  72. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.LockField_should_create_events_and_update_field_locked_flag.verified.txt
  73. 252
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.LockField_should_create_events_and_update_nested_field_locked_flag.verified.txt
  74. 72
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Reorder_should_create_events_and_reorder_fields.verified.txt
  75. 468
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Reorder_should_create_events_and_reorder_nestedy_fields.verified.txt
  76. 36
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ShowField_should_create_events_and_update_field_hidden_flag.verified.txt
  77. 252
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ShowField_should_create_events_and_update_nested_field_hidden_flag.verified.txt
  78. 39
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.UpdateField_should_create_events_and_update_field_properties.verified.txt
  79. 255
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.UpdateField_should_create_events_and_update_nested_field_properties.verified.txt
  80. 4
      backend/tests/Squidex.Infrastructure.Tests/Tasks/SchedulerTests.cs
  81. 2
      frontend/src/app/features/content/pages/content/content-page.component.ts
  82. 2
      frontend/src/app/features/content/shared/forms/content-field.component.html
  83. 6
      frontend/src/app/features/content/shared/forms/field-editor.component.ts
  84. 11
      frontend/src/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.html
  85. 4
      frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.html
  86. 2
      frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.scss
  87. 32
      frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts
  88. 51
      frontend/src/app/features/schemas/pages/schemas/schema-form.component.scss
  89. 66
      frontend/src/app/framework/angular/forms/editors/code-editor.component.ts
  90. 12
      frontend/src/app/framework/utils/types.ts
  91. 24
      frontend/src/app/shared/components/forms/geolocation-editor.component.html
  92. 12
      frontend/src/app/shared/components/forms/geolocation-editor.component.scss
  93. 2
      frontend/src/app/shared/components/forms/geolocation-editor.component.ts
  94. 8
      frontend/src/app/shared/components/forms/rich-editor.component.scss
  95. 6
      frontend/src/app/shared/model/generated.ts
  96. 85
      frontend/src/app/shared/state/contents.form-rules.ts
  97. 65
      frontend/src/app/shared/state/contents.forms-helpers.ts
  98. 18
      frontend/src/app/shared/state/contents.forms.spec.ts
  99. 149
      frontend/src/app/shared/state/contents.forms.ts
  100. 15
      frontend/src/app/shared/state/schemas.forms.ts

8
.github/workflows/dev.yml

@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Build
uses: docker/build-push-action@v6.18.0
@ -52,7 +52,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Setup dotnet
uses: actions/setup-dotnet@v4.3.1
@ -153,7 +153,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Setup dotnet
uses: actions/setup-dotnet@v4.3.1
@ -220,7 +220,7 @@ jobs:
uses: docker/setup-qemu-action@v3.6.0
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Remove unnecessary files
run: |

2
.github/workflows/make-screenshots.yml

@ -15,7 +15,7 @@ jobs:
uses: docker/setup-qemu-action@v3.6.0
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Setup Node
uses: actions/setup-node@v4.4.0

8
.github/workflows/release.yml

@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Build
uses: docker/build-push-action@v6.18.0
@ -47,7 +47,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Setup dotnet
uses: actions/setup-dotnet@v4.3.1
@ -148,7 +148,7 @@ jobs:
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Setup dotnet
uses: actions/setup-dotnet@v4.3.1
@ -215,7 +215,7 @@ jobs:
uses: docker/setup-qemu-action@v3.6.0
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
- name: Prepare - Remove unnecessary files
run: |

9
README.md

@ -22,7 +22,7 @@ Current Version ![GitHub release](https://img.shields.io/github/release/squidex/
* [Visual Studio Code](https://code.visualstudio.com/) or [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
* [Node.js](https://nodejs.org/en/) (development only)
* [MongoDB](https://www.mongodb.com/)
* [MongoDB](https://www.mongodb.com/), PostgreSQL, MySQL or SQLServer
* [.NET 8 SDK](https://dotnet.microsoft.com/download#/current) (Already part of Visual Studio 2022 v17.8)
## Deployment Options
@ -39,16 +39,11 @@ Current Version ![GitHub release](https://img.shields.io/github/release/squidex/
| Render | [Docs](https://docs.squidex.io/01-getting-started/installation/platforms/install-on-render) | [![Deploy to Render](https://img.shields.io/badge/-Deploy%20to%20Render-44E4B4?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADyklEQVR4Xu1aT0gUURh/k5qV2y5pEbpqHiqqy4IIQUGghbNOK53WkwQFdekqRHXNDkHXIKhuXdZTZu6MRkbkJRFJKAKNUnQPEir+IXdr98XbdXbfzrznjLvvObM7s5dld7553/f93u/78/4IwOEfweH+AxcAlwEOR8ANAYcTwE2CfEIAAqEzpjSmQPLobhj2zi9N4fLiotxKet87vvZloKcnqT6jyW2sx2fGz1xb38kGJgCEv0b2h/yBvuu+0/0kZRAAAtX0/wqCkGcPhBAJ6T7SbNQXPSWtqQ9ocsFFpUNpDI5xBeBnYn2+pcrTtJuZpsnSANBCRQNAK8cVgM7F4W6lvmuQZRYxy4De2ajvlSkGvO1QGkPsGXB/aeJF/7G2myxmHR/DGIBMREizsnUhcO/3xMtHdW03WDuPxjMGIKPVshwgLshXZb84lO88OcUVApDtAYAwBUn5XHV2Kbn1tzc2FhptlkYKAcCKd0yXwbnExnxzVQ012z9emb5ztzbw1AonitFpCgBU5yPnwnGaouCCcl5pCn4uxhCr3jUFwLPVbw9v+84+0BkJAXiyMn2rry7w3CoHkN7u2JtDJP0HPv2J4x0jScYUALROaym5lTheebDaSueRbu6dIE2BOBe9PNIivS9vACAQIIApIn00vbtVQOgnKFOambTCV2KDzaP13XOlBUDGWiYAoKVmtEGcJCULbeNiHwYwBkBuECdLiwEMQwAxwO4AFMM8wzLoAuAyYDsECIs+uyRBx4dACkJIimVmZTAvCWJMsAsDuLbCpZAE9xYACADiG6KcAxmQ4b8aBQ4EIJNvHQ+AWnbswgDuZdDuiyHuAOTKYH435BgGuIuhklsO89wP2I4C9LXPjltiWJTyaYWxjGOXHMC3E/wlt8onSm1HiGcIZNsgG7XCKZjeu9aeWzoqBEhn1EwACMNIxcaypyZNqmUAQG0uCUTrcvd0imlGin23a2bYSxrDc7Jrc0AQspepCj4aK9ZAO79vuClqZ+NZ2OYCYISi2R0hdEQ9WB/aNHOAQqvb1Csyaobb/t7TO0Kirg/I5VvcYBUAUjY2e/fHSC49NgRA+kG5KIkrhwAEYwwuSuIM0DpHAqAQBtA2WEzfFE33AXrNTMpgFgCDcwGuIaDxbW9DwOTJkAsAzyRoJQMufn992OOpbsvZ8A8AUJn+id/EDkciFWsXvJdwW5EUktbe2BYX5HZSrtDLDbWrunB5r1/8iHd4tPHiNdVTH460r+5U6dw+wKgPKPfnLgPKfYaN/HMZYIRQuT93GVDuM2zk338nAalfI74e1QAAAABJRU5ErkJggg==&logoColor=ffffff)](https://render.com/deploy?repo=https://github.com/Squidex/squidex) |
| Vultr | [Docs](https://docs.squidex.io/01-getting-started/installation/platforms/install-on-vultr) | [![Deploy to Vultr](https://img.shields.io/badge/-Deploy%20to%20Vultr-007BFC?style=for-the-badge&logo=vultr&logoColor=ffffff)](https://www.vultr.com/marketplace/apps/squidex) |
## Contributors
### Core Team and Founders
* [Qaisar Ahmad](http://www.qaisarahmad.com/) Interaction Designer, Pakistan
* [Sebastian Stehle](https://github.com/SebastianStehle) Software Engineer, Germany (currently Sweden)
* [Sebastian Stehle](https://github.com/SebastianStehle) Software Engineer, Germany
### Contributors

6
backend/extensions/Squidex.Extensions/Validation/CompositeUniqueValidator.cs

@ -22,11 +22,11 @@ internal sealed class CompositeUniqueValidator(string contentTag, IContentReposi
{
if (value is ContentData data)
{
context.Root.AddTask(async ct => await ValidateAsync(data, context));
context.Root.AddTask(ct => ValidateAsync(data, context));
}
}
private async Task ValidateAsync(ContentData data, ValidationContext context)
private async ValueTask ValidateAsync(ContentData data, ValidationContext context)
{
var validateableFields = context.Root.Schema.Fields.Where(IsValidateableField);
@ -48,7 +48,7 @@ internal sealed class CompositeUniqueValidator(string contentTag, IContentReposi
var found = await contentRepository.QueryIdsAsync(context.Root.App, context.Root.Schema, filter, SearchScope.All);
if (found.Any(x => x.Id != context.Root.ContentId))
{
context.AddError(Enumerable.Empty<string>(), "A content with the same values already exist.");
context.AddError("A content with the same values already exist.", Enumerable.Empty<string>());
}
}
}

1
backend/i18n/frontend_en.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Allowed Values",
"schemas.field.createEnum": "Generate GraphQL Enum.",
"schemas.field.createEnumHint": "Generate a GraphQL enumeration for this field. The input format is not compatible with a string anymore and can be a breaking change for your client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Default Value",
"schemas.field.defaultValues": "Default Values",
"schemas.field.defaultValuesHint": "Set the default value per language and override the default value property, if defined. Only use it if really needed.",

1
backend/i18n/frontend_fr.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Valeurs autorisées",
"schemas.field.createEnum": "Générer l'énumération GraphQL.",
"schemas.field.createEnumHint": "Générez une énumération GraphQL pour ce champ. Le format d'entrée n'est plus compatible avec une chaîne et peut constituer un changement radical pour votre client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Valeur par défaut",
"schemas.field.defaultValues": "Les valeurs par défaut",
"schemas.field.defaultValuesHint": "Définissez la valeur par défaut par langue et remplacez la propriété de valeur par défaut, si elle est définie. Ne l'utilisez qu'en cas de besoin.",

1
backend/i18n/frontend_it.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Valori consentiti",
"schemas.field.createEnum": "Generate GraphQL Enum.",
"schemas.field.createEnumHint": "Generate a GraphQL enumeration for this field. The input format is not compatible with a string anymore and can be a breaking change for your client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Valore predefinito",
"schemas.field.defaultValues": "Valori predefiniti",
"schemas.field.defaultValuesHint": "Imposta il valore predefinito per la lingua e sovrascrivere il valore predefinito, se definito. Usalo solo se davvero necessario.",

1
backend/i18n/frontend_nl.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Toegestane waarden",
"schemas.field.createEnum": "Generate GraphQL Enum.",
"schemas.field.createEnumHint": "Generate a GraphQL enumeration for this field. The input format is not compatible with a string anymore and can be a breaking change for your client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Standaardwaarde",
"schemas.field.defaultValues": "Standaardwaardes",
"schemas.field.defaultValuesHint": "Stel de standaardwaarde per taal in en overschrijf de standaardwaarde-eigenschap, indien gedefinieerd. Gebruik het alleen als het echt nodig is.",

1
backend/i18n/frontend_pt.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Valores Permitidos",
"schemas.field.createEnum": "Gerar GraphQL Enum.",
"schemas.field.createEnumHint": "Gere uma enumeração GraphQL para este campo. O formato de entrada já não é compatível com uma corda e pode ser uma mudança de rutura para o seu cliente.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Valor Predefinido",
"schemas.field.defaultValues": "Valores predefinidos",
"schemas.field.defaultValuesHint": "Desaponha o valor predefinido por idioma e substitua a propriedade de valor predefinido, se definida. Só a use se realmente for necessário.",

1
backend/i18n/frontend_zh.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "允许的值",
"schemas.field.createEnum": "Generate GraphQL Enum.",
"schemas.field.createEnumHint": "Generate a GraphQL enumeration for this field. The input format is not compatible with a string anymore and can be a breaking change for your client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Default Value",
"schemas.field.defaultValues": "默认值",
"schemas.field.defaultValuesHint": "设置每种语言的默认值并覆盖默认值属性(如果已定义)。仅在真正需要时才使用它。",

1
backend/i18n/source/backend_en.json

@ -153,6 +153,7 @@
"contents.validation.between": "Must be between {min} and {max}.",
"contents.validation.characterCount": "Must have exactly {count} character(s).",
"contents.validation.charactersBetween": "Must have between {min} and {max} character(s).",
"contents.validation.createOnly": "Field cannot be changed after creation.",
"contents.validation.duplicates": "Must not contain duplicate values.",
"contents.validation.error": "Validation failed with internal error.",
"contents.validation.exactValue": "Must be exactly {value}.",

1
backend/i18n/source/frontend_en.json

@ -852,6 +852,7 @@
"schemas.field.allowedValues": "Allowed Values",
"schemas.field.createEnum": "Generate GraphQL Enum.",
"schemas.field.createEnumHint": "Generate a GraphQL enumeration for this field. The input format is not compatible with a string anymore and can be a breaking change for your client.",
"schemas.field.createOnly": "Immutable (cannot be changed)",
"schemas.field.defaultValue": "Default Value",
"schemas.field.defaultValues": "Default Values",
"schemas.field.defaultValuesHint": "Set the default value per language and override the default value property, if defined. Only use it if really needed.",

18
backend/src/Squidex.Domain.Apps.Core.Model/FieldDescriptions.Designer.cs

@ -762,6 +762,24 @@ namespace Squidex.Domain.Apps.Core {
}
}
/// <summary>
/// Looks up a localized string similar to The type of action that is performed..
/// </summary>
public static string FieldRuleAction {
get {
return ResourceManager.GetString("FieldRuleAction", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The context object..
/// </summary>
public static string FieldRuleContext {
get {
return ResourceManager.GetString("FieldRuleContext", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The graphql request..
/// </summary>

6
backend/src/Squidex.Domain.Apps.Core.Model/FieldDescriptions.resx

@ -426,6 +426,9 @@
<data name="RichTextFieldValue" xml:space="preserve">
<value>The raw value.</value>
</data>
<data name="FieldRuleContext" xml:space="preserve">
<value>The context object.</value>
</data>
<data name="SchemaId" xml:space="preserve">
<value>The ID of the schema.</value>
</data>
@ -477,4 +480,7 @@
<data name="UsersClaimsValue" xml:space="preserve">
<value>The list of additional properties that have the name 'name'.</value>
</data>
<data name="FieldRuleAction" xml:space="preserve">
<value>The type of action that is performed.</value>
</data>
</root>

2
backend/src/Squidex.Domain.Apps.Core.Model/Schemas/FieldProperties.cs

@ -17,6 +17,8 @@ public abstract record FieldProperties : NamedElementPropertiesBase
public bool IsHalfWidth { get; init; }
public bool IsCreateOnly { get; init; }
public string? Placeholder { get; init; }
public string? EditorUrl { get; init; }

7
backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptingCompleter.cs

@ -231,6 +231,13 @@ public sealed partial class ScriptingCompleter(IEnumerable<IScriptDescriptor> de
FieldDescriptions.UserAppRole);
});
AddObject("ctx", FieldDescriptions.FieldRuleContext, () =>
{
Add(JsonType.String, "action",
FieldDescriptions.UserAppRole, ["Create", "Update"]);
});
AddObject("data", FieldDescriptions.ContentData, () =>
{
AddData();

6
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/DefaultValidatorsFactory.cs

@ -5,6 +5,7 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Domain.Apps.Core.ValidateContent.Validators;
@ -18,6 +19,11 @@ public sealed class DefaultValidatorsFactory : IValidatorsFactory
{
yield return NoValueValidator.Instance;
}
if (field is IRootField rootField && field.RawProperties.IsCreateOnly && context.Root.PreviousData is ContentData previous)
{
yield return new NotChangedValidator(rootField, previous);
}
}
public IEnumerable<IValidator> CreateValueValidators(ValidationContext context, IField field, ValidatorFactory factory)

3
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/RootContext.cs

@ -7,6 +7,7 @@
using System.Collections.Concurrent;
using Squidex.Domain.Apps.Core.Apps;
using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure;
using Squidex.Infrastructure.Json;
@ -30,6 +31,8 @@ public sealed class RootContext(App app, Schema schema, DomainId contentId, Reso
public ResolvedComponents Components { get; } = components;
public ContentData? PreviousData { get; init; }
public IEnumerable<ValidationError> Errors
{
get => errors;

4
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/ValidationContext.cs

@ -21,9 +21,9 @@ public sealed record ValidationContext(RootContext Root)
public ValidationAction Action { get; init; }
public void AddError(IEnumerable<string> path, string message)
public void AddError(string message, IEnumerable<string>? path = null)
{
Root.AddError(path, message);
Root.AddError(path ?? Path, message);
}
public ValidationContext Optimized(bool optimized = true)

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AggregateValidator.cs

@ -29,7 +29,7 @@ public sealed class AggregateValidator(IEnumerable<IValidator>? validators) : IV
}
catch
{
context.AddError(context.Path, T.Get("contents.validation.error"));
context.AddError(T.Get("contents.validation.error"));
}
}
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AllowedValuesValidator.cs

@ -30,7 +30,7 @@ public sealed class AllowedValuesValidator<TValue> : IValidator
{
if (value is TValue typedValue && !allowedValues.Contains(typedValue))
{
context.AddError(context.Path, T.Get("contents.validation.notAllowed"));
context.AddError(T.Get("contents.validation.notAllowed"), context.Path);
}
}
}

22
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/AssetsValidator.cs

@ -50,7 +50,7 @@ public sealed class AssetsValidator : IValidator
context.Root.AddTask(ct => ValidateCoreAsync(value, context, ct));
}
private async Task ValidateCoreAsync(object? value, ValidationContext context,
private async ValueTask ValidateCoreAsync(object? value, ValidationContext context,
CancellationToken ct)
{
var foundIds = new List<DomainId>();
@ -69,7 +69,7 @@ public sealed class AssetsValidator : IValidator
{
if (context.Action == ValidationAction.Upsert)
{
context.AddError(assetPath, T.Get("contents.validation.assetNotFound", new { id = assetId }));
context.AddError(T.Get("contents.validation.assetNotFound", new { id = assetId }), assetPath);
}
continue;
@ -118,19 +118,19 @@ public sealed class AssetsValidator : IValidator
{
var min = properties.MinSize.Value.ToReadableSize();
context.AddError(path, T.Get("contents.validation.minimumSize", new { size = asset.FileSize.ToReadableSize(), min }));
context.AddError(T.Get("contents.validation.minimumSize", new { size = asset.FileSize.ToReadableSize(), min }), path);
}
if (properties.MaxSize != null && asset.FileSize > properties.MaxSize)
{
var max = properties.MaxSize.Value.ToReadableSize();
context.AddError(path, T.Get("contents.validation.maximumSize", new { size = asset.FileSize.ToReadableSize(), max }));
context.AddError(T.Get("contents.validation.maximumSize", new { size = asset.FileSize.ToReadableSize(), max }), path);
}
if (properties.AllowedExtensions is { Count: > 0 } && !properties.AllowedExtensions.Any(x => asset.FileName.EndsWith("." + x, StringComparison.OrdinalIgnoreCase)))
{
context.AddError(path, T.Get("contents.validation.extension"));
context.AddError(T.Get("contents.validation.extension"), path);
}
}
@ -140,7 +140,7 @@ public sealed class AssetsValidator : IValidator
if (properties.ExpectedType != null && properties.ExpectedType != type)
{
context.AddError(path, T.Get("contents.validation.assetType", new { type = properties.ExpectedType }));
context.AddError(T.Get("contents.validation.assetType", new { type = properties.ExpectedType }), path);
}
}
@ -150,22 +150,22 @@ public sealed class AssetsValidator : IValidator
if (properties.MinWidth != null && w < properties.MinWidth)
{
context.AddError(path, T.Get("contents.validation.minimumWidth", new { width = w, min = properties.MinWidth }));
context.AddError(T.Get("contents.validation.minimumWidth", new { width = w, min = properties.MinWidth }), path);
}
if (properties.MaxWidth != null && w > properties.MaxWidth)
{
context.AddError(path, T.Get("contents.validation.maximumWidth", new { width = w, max = properties.MaxWidth }));
context.AddError(T.Get("contents.validation.maximumWidth", new { width = w, max = properties.MaxWidth }), path);
}
if (properties.MinHeight != null && h < properties.MinHeight)
{
context.AddError(path, T.Get("contents.validation.minimumHeight", new { height = h, min = properties.MinHeight }));
context.AddError(T.Get("contents.validation.minimumHeight", new { height = h, min = properties.MinHeight }), path);
}
if (properties.MaxHeight != null && h > properties.MaxHeight)
{
context.AddError(path, T.Get("contents.validation.maximumHeight", new { height = h, max = properties.MaxHeight }));
context.AddError(T.Get("contents.validation.maximumHeight", new { height = h, max = properties.MaxHeight }), path);
}
if (properties.AspectHeight != null && properties.AspectWidth != null)
@ -174,7 +174,7 @@ public sealed class AssetsValidator : IValidator
if (Math.Abs(expectedRatio - actualRatio) > double.Epsilon)
{
context.AddError(path, T.Get("contents.validation.aspectRatio", new { width = properties.AspectWidth, height = properties.AspectHeight }));
context.AddError(T.Get("contents.validation.aspectRatio", new { width = properties.AspectWidth, height = properties.AspectHeight }), path);
}
}
}

17
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionItemValidator.cs

@ -23,17 +23,18 @@ public sealed class CollectionItemValidator : IValidator
public void Validate(object? value, ValidationContext context)
{
if (value is ICollection { Count: > 0 } items)
if (value is not ICollection { Count: > 0 } items)
{
var itemIndex = 1;
return;
}
foreach (var item in items)
{
var itemContext = context.Nested($"[{itemIndex}]");
var itemIndex = 1;
foreach (var item in items)
{
var itemContext = context.Nested($"[{itemIndex}]");
itemValidator.Validate(item, itemContext);
itemIndex++;
}
itemValidator.Validate(item, itemContext);
itemIndex++;
}
}
}

10
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/CollectionValidator.cs

@ -35,7 +35,7 @@ public sealed class CollectionValidator : IValidator
{
if (isRequired && !context.IsOptional)
{
context.AddError(context.Path, T.Get("contents.validation.required"));
context.AddError(T.Get("contents.validation.required"));
}
return;
@ -45,23 +45,23 @@ public sealed class CollectionValidator : IValidator
{
if (minItems == maxItems && minItems != items.Count)
{
context.AddError(context.Path, T.Get("contents.validation.itemCount", new { count = minItems }));
context.AddError(T.Get("contents.validation.itemCount", new { count = minItems }));
}
else if (items.Count < minItems || items.Count > maxItems)
{
context.AddError(context.Path, T.Get("contents.validation.itemCountBetween", new { min = minItems, max = maxItems }));
context.AddError(T.Get("contents.validation.itemCountBetween", new { min = minItems, max = maxItems }));
}
}
else
{
if (minItems != null && items.Count < minItems)
{
context.AddError(context.Path, T.Get("contents.validation.minItems", new { min = minItems }));
context.AddError(T.Get("contents.validation.minItems", new { min = minItems }));
}
if (maxItems != null && items.Count > maxItems)
{
context.AddError(context.Path, T.Get("contents.validation.maxItems", new { max = maxItems }));
context.AddError(T.Get("contents.validation.maxItems", new { max = maxItems }));
}
}
}

55
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/FieldValidator.cs

@ -29,41 +29,44 @@ public sealed class FieldValidator : IValidator
public void Validate(object? value, ValidationContext context)
{
var typedValue = value;
var typedValue = ResolveValue(value, context);
try
validator.Validate(typedValue, context);
}
private object? ResolveValue(object? value, ValidationContext context)
{
if (value is not JsonValue jsonValue)
{
if (value is JsonValue jsonValue)
{
if (jsonValue == default || Updates.IsUnset(jsonValue))
{
typedValue = null;
}
else
{
typedValue = jsonValue.Value;
return value;
}
if (jsonValue == default || Updates.IsUnset(jsonValue))
{
return null;
}
var (typed, error) = JsonValueConverter.ConvertValue(field, jsonValue,
context.Root.Serializer,
context.Root.Components);
var result = jsonValue.Value;
try
{
var (typed, error) = JsonValueConverter.ConvertValue(field, jsonValue,
context.Root.Serializer,
context.Root.Components);
if (error != null)
{
context.AddError(context.Path, error.Error);
}
else
{
typedValue = typed;
}
}
if (error != null)
{
context.AddError(error.Error);
}
else
{
result = typed;
}
}
catch
{
context.AddError(context.Path, T.Get("contents.validation.invalid"));
return;
context.AddError(T.Get("contents.validation.invalid"));
}
validator.Validate(typedValue, context);
return result;
}
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NoValueValidator.cs

@ -21,7 +21,7 @@ public sealed class NoValueValidator : IValidator
{
if (!value.IsUndefined())
{
context.AddError(context.Path, T.Get("contents.validation.mustBeEmpty"));
context.AddError(T.Get("contents.validation.mustBeEmpty"));
}
}
}

43
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/NotChangedValidator.cs

@ -0,0 +1,43 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Domain.Apps.Core.Apps;
using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Translations;
namespace Squidex.Domain.Apps.Core.ValidateContent.Validators;
public sealed class NotChangedValidator(IRootField field, ContentData previousData) : IValidator
{
public void Validate(object? value, ValidationContext context)
{
var previousFieldData =
previousData.GetValueOrDefault(field.Name);
var newFieldData =
value as ContentFieldData;
var partitions = context.Root.App.PartitionResolver()(field.Partitioning);
foreach (var partition in partitions.AllKeys)
{
var previousLanguageValue =
previousFieldData?.GetValueOrDefault(partition);
var newLanguageValue =
newFieldData?.GetValueOrDefault(partition);
if (!Equals(previousLanguageValue, newLanguageValue))
{
var path = context.Path.Enqueue(partition);
context.AddError(T.Get("contents.validation.createOnly"), path);
}
}
}
}

60
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ObjectValidator.cs

@ -23,45 +23,47 @@ public sealed class ObjectValidator<TValue>(IDictionary<string, (bool IsOptional
value = DefaultValue;
}
if (value is IReadOnlyDictionary<string, TValue> values)
if (value is not IReadOnlyDictionary<string, TValue> values)
{
foreach (var fieldData in values)
{
var name = fieldData.Key;
return;
}
if (!fields.ContainsKey(name))
{
context.AddError(context.Path.Enqueue(name), T.Get("contents.validation.unknownField", new { fieldType }));
}
}
foreach (var fieldData in values)
{
var name = fieldData.Key;
foreach (var (name, field) in fields)
if (!fields.ContainsKey(name))
{
var fieldValue = Undefined.Value;
context.AddError(T.Get("contents.validation.unknownField", new { fieldType }), context.Path.Enqueue(name));
}
}
if (!values.TryGetValue(name, out var nestedValue))
{
// If the original value was unset, we have to validate the children for required values.
if (isPartial && !originalValue.IsUnset())
{
continue;
}
}
else
{
fieldValue = nestedValue!;
}
foreach (var (name, field) in fields)
{
var fieldValue = Undefined.Value;
// Use a special null values for unsets so we can treat them as null for required validators.
if (Updates.IsUnset(fieldValue))
if (!values.TryGetValue(name, out var nestedValue))
{
// If the original value was unset, we have to validate the children for required values.
if (isPartial && !originalValue.IsUnset())
{
fieldValue = Undefined.Unset;
continue;
}
}
else
{
fieldValue = nestedValue!;
}
var fieldContext = context.Nested(name, field.IsOptional);
field.Validator.Validate(fieldValue, fieldContext);
// Use a special null values for unsets so we can treat them as null for required validators.
if (Updates.IsUnset(fieldValue))
{
fieldValue = Undefined.Unset;
}
var fieldContext = context.Nested(name, field.IsOptional);
field.Validator.Validate(fieldValue, fieldContext);
}
}
}

31
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/PatternValidator.cs

@ -35,29 +35,28 @@ public class PatternValidator : IValidator
public void Validate(object? value, ValidationContext context)
{
if (value is string stringValue)
if (value is not string stringValue || string.IsNullOrEmpty(stringValue))
{
if (!string.IsNullOrEmpty(stringValue))
return;
}
try
{
if (!regex.IsMatch(stringValue))
{
try
if (string.IsNullOrWhiteSpace(errorMessage))
{
if (!regex.IsMatch(stringValue))
{
if (string.IsNullOrWhiteSpace(errorMessage))
{
context.AddError(context.Path, T.Get("contents.validation.pattern"));
}
else
{
context.AddError(context.Path, errorMessage);
}
}
context.AddError(T.Get("contents.validation.pattern"));
}
catch
else
{
context.AddError(context.Path, T.Get("contents.validation.regexTooSlow"));
context.AddError(errorMessage);
}
}
}
catch
{
context.AddError(T.Get("contents.validation.regexTooSlow"));
}
}
}

42
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RangeValidator.cs

@ -28,30 +28,32 @@ public sealed class RangeValidator<TValue> : IValidator where TValue : struct, I
public void Validate(object? value, ValidationContext context)
{
if (value is TValue typedValue)
if (value is not TValue typedValue)
{
if (min != null && max != null)
return;
}
if (min != null && max != null)
{
if (Equals(min, max) && Equals(min.Value, max.Value))
{
context.AddError(T.Get("contents.validation.exactValue", new { value = max.Value }));
}
else if (typedValue.CompareTo(min.Value) < 0 || typedValue.CompareTo(max.Value) > 0)
{
if (Equals(min, max) && Equals(min.Value, max.Value))
{
context.AddError(context.Path, T.Get("contents.validation.exactValue", new { value = max.Value }));
}
else if (typedValue.CompareTo(min.Value) < 0 || typedValue.CompareTo(max.Value) > 0)
{
context.AddError(context.Path, T.Get("contents.validation.between", new { min, max }));
}
context.AddError(T.Get("contents.validation.between", new { min, max }));
}
else
}
else
{
if (min != null && typedValue.CompareTo(min.Value) < 0)
{
context.AddError(T.Get("contents.validation.min", new { min }));
}
if (max != null && typedValue.CompareTo(max.Value) > 0)
{
if (min != null && typedValue.CompareTo(min.Value) < 0)
{
context.AddError(context.Path, T.Get("contents.validation.min", new { min }));
}
if (max != null && typedValue.CompareTo(max.Value) > 0)
{
context.AddError(context.Path, T.Get("contents.validation.max", new { max }));
}
context.AddError(T.Get("contents.validation.max", new { max }));
}
}
}

6
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs

@ -49,7 +49,7 @@ public sealed class ReferencesValidator : IValidator
context.Root.AddTask(ct => ValidateCoreAsync(value, context, ct));
}
private async Task ValidateCoreAsync(object? value, ValidationContext context,
private async ValueTask ValidateCoreAsync(object? value, ValidationContext context,
CancellationToken ct)
{
var foundIds = new List<DomainId>();
@ -69,7 +69,7 @@ public sealed class ReferencesValidator : IValidator
{
if (context.Action == ValidationAction.Upsert)
{
context.AddError(path, T.Get("contents.validation.referenceNotFound", new { id }));
context.AddError(T.Get("contents.validation.referenceNotFound", new { id }), path);
}
continue;
@ -81,7 +81,7 @@ public sealed class ReferencesValidator : IValidator
{
if (context.Action == ValidationAction.Upsert)
{
context.AddError(path, T.Get("contents.validation.referenceToInvalidSchema", new { id }));
context.AddError(T.Get("contents.validation.referenceToInvalidSchema", new { id }), path);
}
isValid = false;

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredStringValidator.cs

@ -20,7 +20,7 @@ public class RequiredStringValidator(bool validateEmptyStrings = false) : IValid
if (value.IsNullOrUndefined() || IsEmptyString(value))
{
context.AddError(context.Path, T.Get("contents.validation.required"));
context.AddError(T.Get("contents.validation.required"));
}
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/RequiredValidator.cs

@ -15,7 +15,7 @@ public class RequiredValidator : IValidator
{
if (value.IsNullOrUndefined() && !context.IsOptional)
{
context.AddError(context.Path, T.Get("contents.validation.required"));
context.AddError(T.Get("contents.validation.required"), context.Path);
}
}
}

42
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringLengthValidator.cs

@ -28,30 +28,32 @@ public class StringLengthValidator : IValidator
public void Validate(object? value, ValidationContext context)
{
if (value is string stringValue && !string.IsNullOrEmpty(stringValue))
if (value is not string stringValue || string.IsNullOrEmpty(stringValue))
{
if (minLength != null && maxLength != null)
return;
}
if (minLength != null && maxLength != null)
{
if (minLength == maxLength && minLength != stringValue.Length)
{
context.AddError(T.Get("contents.validation.characterCount", new { count = minLength }), context.Path);
}
else if (stringValue.Length < minLength || stringValue.Length > maxLength)
{
if (minLength == maxLength && minLength != stringValue.Length)
{
context.AddError(context.Path, T.Get("contents.validation.characterCount", new { count = minLength }));
}
else if (stringValue.Length < minLength || stringValue.Length > maxLength)
{
context.AddError(context.Path, T.Get("contents.validation.charactersBetween", new { min = minLength, max = maxLength }));
}
context.AddError(T.Get("contents.validation.charactersBetween", new { min = minLength, max = maxLength }), context.Path);
}
else
}
else
{
if (minLength != null && stringValue.Length < minLength)
{
context.AddError(T.Get("contents.validation.minLength", new { min = minLength }), context.Path);
}
if (maxLength != null && stringValue.Length > maxLength)
{
if (minLength != null && stringValue.Length < minLength)
{
context.AddError(context.Path, T.Get("contents.validation.minLength", new { min = minLength }));
}
if (maxLength != null && stringValue.Length > maxLength)
{
context.AddError(context.Path, T.Get("contents.validation.maxLength", new { max = maxLength }));
}
context.AddError(T.Get("contents.validation.maxLength", new { max = maxLength }), context.Path);
}
}
}

96
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/StringTextValidator.cs

@ -44,68 +44,70 @@ public sealed class StringTextValidator : IValidator
public void Validate(object? value, ValidationContext context)
{
if (value is string stringValue && !string.IsNullOrEmpty(stringValue))
if (value is not string stringValue || string.IsNullOrEmpty(stringValue))
{
if (transform != null)
{
stringValue = transform(stringValue);
}
return;
}
if (minWords != null || maxWords != null)
{
var words = stringValue.WordCount();
if (transform != null)
{
stringValue = transform(stringValue);
}
if (minWords != null && maxWords != null)
if (minWords != null || maxWords != null)
{
var words = stringValue.WordCount();
if (minWords != null && maxWords != null)
{
if (minWords == maxWords && minWords != words)
{
context.AddError(T.Get("contents.validation.wordCount", new { count = minWords }));
}
else if (words < minWords || words > maxWords)
{
if (minWords == maxWords && minWords != words)
{
context.AddError(context.Path, T.Get("contents.validation.wordCount", new { count = minWords }));
}
else if (words < minWords || words > maxWords)
{
context.AddError(context.Path, T.Get("contents.validation.wordsBetween", new { min = minWords, max = maxWords }));
}
context.AddError(T.Get("contents.validation.wordsBetween", new { min = minWords, max = maxWords }));
}
else
}
else
{
if (words < minWords)
{
if (words < minWords)
{
context.AddError(context.Path, T.Get("contents.validation.minWords", new { min = minWords }));
}
context.AddError(T.Get("contents.validation.minWords", new { min = minWords }));
}
if (words > maxWords)
{
context.AddError(context.Path, T.Get("contents.validation.maxWords", new { max = maxWords }));
}
if (words > maxWords)
{
context.AddError(T.Get("contents.validation.maxWords", new { max = maxWords }));
}
}
}
if (minCharacters != null || maxCharacters != null)
{
var characters = stringValue.CharacterCount();
if (minCharacters != null || maxCharacters != null)
{
var characters = stringValue.CharacterCount();
if (minCharacters != null && maxCharacters != null)
if (minCharacters != null && maxCharacters != null)
{
if (minCharacters == maxCharacters && minCharacters != characters)
{
if (minCharacters == maxCharacters && minCharacters != characters)
{
context.AddError(context.Path, T.Get("contents.validation.normalCharacterCount", new { count = minCharacters }));
}
else if (characters < minCharacters || characters > maxCharacters)
{
context.AddError(context.Path, T.Get("contents.validation.normalCharactersBetween", new { min = minCharacters, max = maxCharacters }));
}
context.AddError(T.Get("contents.validation.normalCharacterCount", new { count = minCharacters }));
}
else
else if (characters < minCharacters || characters > maxCharacters)
{
if (characters < minCharacters)
{
context.AddError(context.Path, T.Get("contents.validation.minNormalCharacters", new { min = minCharacters }));
}
context.AddError(T.Get("contents.validation.normalCharactersBetween", new { min = minCharacters, max = maxCharacters }));
}
}
else
{
if (characters < minCharacters)
{
context.AddError(T.Get("contents.validation.minNormalCharacters", new { min = minCharacters }), context.Path);
}
if (characters > maxCharacters)
{
context.AddError(context.Path, T.Get("contents.validation.maxCharacters", new { max = maxCharacters }));
}
if (characters > maxCharacters)
{
context.AddError(T.Get("contents.validation.maxCharacters", new { max = maxCharacters }), context.Path);
}
}
}

2
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueObjectValuesValidator.cs

@ -37,7 +37,7 @@ public sealed class UniqueObjectValuesValidator(IEnumerable<string> fields) : IV
{
if (item.TryGetValue(field, out var fieldValue) && !duplicates.Add(fieldValue))
{
context.AddError(context.Path, T.Get("contents.validation.uniqueObjectValues", new { field }));
context.AddError(T.Get("contents.validation.uniqueObjectValues", new { field }));
break;
}
}

4
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValidator.cs

@ -42,14 +42,14 @@ public sealed class UniqueValidator(CheckUniqueness checkUniqueness) : IValidato
}
}
private async Task ValidateCoreAsync(ValidationContext context, FilterNode<ClrValue> filter,
private async ValueTask ValidateCoreAsync(ValidationContext context, FilterNode<ClrValue> filter,
CancellationToken ct)
{
var found = await checkUniqueness(filter, ct);
if (found.Any(x => x.Id != context.Root.ContentId))
{
context.AddError(context.Path, T.Get("contents.validation.unique"));
context.AddError(T.Get("contents.validation.unique"));
}
}

14
backend/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/UniqueValuesValidator.cs

@ -13,14 +13,16 @@ public sealed class UniqueValuesValidator<TValue> : IValidator
{
public void Validate(object? value, ValidationContext context)
{
if (value is IEnumerable<TValue> items && items.Any())
if (value is not IEnumerable<TValue> items || !items.Any())
{
var itemsArray = items.ToArray();
return;
}
var itemsArray = items.ToArray();
if (itemsArray.Length != itemsArray.Distinct().Count())
{
context.AddError(context.Path, T.Get("contents.validation.duplicates"));
}
if (itemsArray.Length != itemsArray.Distinct().Count())
{
context.AddError(T.Get("contents.validation.duplicates"));
}
}
}

4
backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentDomainObject.cs

@ -249,7 +249,7 @@ public partial class ContentDomainObject(
if (!c.DoNotValidate)
{
await operation.ValidateInputAsync(c.Data, c.OptimizeValidation, Snapshot.IsPublished, ct);
await operation.ValidateInputAsync(c.Data, c.OptimizeValidation, Snapshot.IsPublished, null, ct);
}
var status = await operation.GetInitialStatusAsync();
@ -322,7 +322,7 @@ public partial class ContentDomainObject(
if (!c.DoNotValidate)
{
await operation.ValidateInputAsync(newData, c.OptimizeValidation, Snapshot.IsPublished, ct);
await operation.ValidateInputAsync(newData, c.OptimizeValidation, Snapshot.IsPublished, Snapshot.EditingData, ct);
}
if (!c.DoNotValidateWorkflow)

3
backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/ContentOperation.cs

@ -13,7 +13,8 @@ using Squidex.Infrastructure;
namespace Squidex.Domain.Apps.Entities.Contents.DomainObject;
public sealed class ContentOperation(IServiceProvider serviceProvider, Func<WriteContent> snapshot) : OperationContextBase<ContentCommand, WriteContent>(serviceProvider, snapshot)
public sealed class ContentOperation(IServiceProvider serviceProvider, Func<WriteContent> snapshot)
: OperationContextBase<ContentCommand, WriteContent>(serviceProvider, snapshot)
{
public Schema Schema { get; init; }

35
backend/src/Squidex.Domain.Apps.Entities/Contents/DomainObject/Guards/ValidationExtensions.cs

@ -48,10 +48,13 @@ public static class ValidationExtensions
}
public static async Task ValidateInputAsync(this ContentOperation operation,
ContentData data, bool optimize, bool published,
ContentData data,
bool optimize,
bool published,
ContentData? previousData,
CancellationToken ct)
{
var validator = GetValidator(operation, optimize, published);
var validator = GetValidator(operation, optimize, published, previousData);
await validator.ValidateInputAsync(data, ct);
@ -59,10 +62,12 @@ public static class ValidationExtensions
}
public static async Task ValidateInputPartialAsync(this ContentOperation operation,
ContentData data, bool optimize, bool published,
ContentData data,
bool optimize,
bool published,
CancellationToken ct)
{
var validator = GetValidator(operation, optimize, published);
var validator = GetValidator(operation, optimize, published, null);
await validator.ValidateInputPartialAsync(data, ct);
@ -70,10 +75,12 @@ public static class ValidationExtensions
}
public static async Task ValidateContentAsync(this ContentOperation operation,
ContentData data, bool optimize, bool published,
ContentData data,
bool optimize,
bool published,
CancellationToken ct)
{
var validator = GetValidator(operation, optimize, published);
var validator = GetValidator(operation, optimize, published, null);
await validator.ValidateContentAsync(data, ct);
@ -81,10 +88,12 @@ public static class ValidationExtensions
}
public static async Task ValidateContentAndInputAsync(this ContentOperation operation,
ContentData data, bool optimize, bool published,
ContentData data,
bool optimize,
bool published,
CancellationToken ct)
{
var validator = GetValidator(operation, optimize, published);
var validator = GetValidator(operation, optimize, published, null);
await validator.ValidateInputAndContentAsync(data, ct);
@ -128,7 +137,10 @@ public static class ValidationExtensions
}
}
private static ContentValidator GetValidator(this ContentOperation operation, bool optimize, bool published)
private static ContentValidator GetValidator(this ContentOperation operation,
bool optimize,
bool published,
ContentData? previousData)
{
var rootContext =
new RootContext(
@ -136,7 +148,10 @@ public static class ValidationExtensions
operation.Schema,
operation.CommandId,
operation.Components,
operation.Resolve<IJsonSerializer>());
operation.Resolve<IJsonSerializer>())
{
PreviousData = previousData
};
var validationContext = new ValidationContext(rootContext).Optimized(optimize).AsPublishing(published);

2
backend/src/Squidex.Infrastructure/Tasks/Scheduler.cs

@ -8,7 +8,7 @@
namespace Squidex.Infrastructure.Tasks;
#pragma warning disable MA0048 // File name must match type name
public delegate Task SchedulerTask(CancellationToken ct);
public delegate ValueTask SchedulerTask(CancellationToken ct);
#pragma warning restore MA0048 // File name must match type name
public sealed class Scheduler

3
backend/src/Squidex.Shared/Texts.fr.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>Doit contenir entre {min} et {max} caractère(s).</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>Ne doit pas contenir de valeurs en double.</value>
</data>

3
backend/src/Squidex.Shared/Texts.it.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>Deve essere tra {min} e {max} carattere(i).</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>Non può avere valori duplicati.</value>
</data>

3
backend/src/Squidex.Shared/Texts.nl.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>Moet tussen {min} en {max} teken (s) bevatten.</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>Mag geen dubbele waarden bevatten.</value>
</data>

3
backend/src/Squidex.Shared/Texts.pt.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>Deve ter entre {min} e {max} caractere(es).</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>Não pode ter duplicados.</value>
</data>

3
backend/src/Squidex.Shared/Texts.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>Must have between {min} and {max} character(s).</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>Must not contain duplicate values.</value>
</data>

3
backend/src/Squidex.Shared/Texts.zh.resx

@ -544,6 +544,9 @@
<data name="contents.validation.charactersBetween" xml:space="preserve">
<value>必须在 {min} 到 {max} 个字符之间。</value>
</data>
<data name="contents.validation.createOnly" xml:space="preserve">
<value>Field cannot be changed after creation.</value>
</data>
<data name="contents.validation.duplicates" xml:space="preserve">
<value>不得包含重复值。</value>
</data>

5
backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs

@ -48,6 +48,11 @@ public abstract class FieldPropertiesDto
/// </summary>
public bool IsHalfWidth { get; set; }
/// <summary>
/// Indicates if the field can only be created and not modified.
/// </summary>
public bool IsCreateOnly { get; set; }
/// <summary>
/// Optional url to the editor.
/// </summary>

372
backend/src/Squidex/wwwroot/editor/squidex-editor.js

File diff suppressed because one or more lines are too long

40
backend/tests/Squidex.Domain.Apps.Core.Tests/Model/Schemas/Schema.json

@ -28,7 +28,8 @@
"editor": "Input",
"isRequired": true,
"isRequiredOnPublish": true,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -52,7 +53,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -72,7 +74,8 @@
"editor": "Checkbox",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -90,7 +93,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -109,7 +113,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -126,7 +131,8 @@
"editor": "DateTime",
"isRequired": true,
"isRequiredOnPublish": true,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -141,7 +147,8 @@
"editor": "Map",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": true
"isHalfWidth": true,
"isCreateOnly": false
}
},
{
@ -155,7 +162,8 @@
"$type": "JsonField",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -173,6 +181,7 @@
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false,
"isCreateOnly": false,
"tags": [
"1",
"2",
@ -199,7 +208,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -228,7 +238,8 @@
"normalization": "None",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -243,7 +254,8 @@
"calculatedDefaultValue": "EmptyArray",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
},
"children": [
{
@ -262,7 +274,8 @@
"editor": "Input",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
}
]
@ -279,7 +292,8 @@
"editor": "Separator",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": true
}
}
],

40
backend/tests/Squidex.Domain.Apps.Core.Tests/Model/Schemas/Schema_Old.json

@ -63,7 +63,8 @@
"editor": "Input",
"isRequired": true,
"isRequiredOnPublish": true,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -87,7 +88,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -107,7 +109,8 @@
"editor": "Checkbox",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -125,7 +128,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -144,7 +148,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -161,7 +166,8 @@
"editor": "DateTime",
"isRequired": true,
"isRequiredOnPublish": true,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -176,7 +182,8 @@
"editor": "Map",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": true
"isHalfWidth": true,
"isCreateOnly": false
}
},
{
@ -190,7 +197,8 @@
"$type": "JsonField",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -208,6 +216,7 @@
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false,
"isCreateOnly": false,
"tags": [
"1",
"2",
@ -234,7 +243,8 @@
],
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -263,7 +273,8 @@
"normalization": "None",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
},
{
@ -278,7 +289,8 @@
"calculatedDefaultValue": "EmptyArray",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
},
"children": [
{
@ -297,7 +309,8 @@
"editor": "Input",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": false
}
}
]
@ -314,7 +327,8 @@
"editor": "Separator",
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false
"isHalfWidth": false,
"isCreateOnly": true
}
}
],

2
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/Scripting/ScriptingCompleterTests.cs

@ -179,6 +179,8 @@ public class ScriptingCompleterTests
AssertCompletion(actual,
new[]
{
"ctx",
"ctx.action",
"data",
"data['my-field']",
"data['my-field'].iv",

2
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ArrayFieldTests.cs

@ -79,7 +79,6 @@ public class ArrayFieldTests : IClassFixture<TranslationsFixture>
public async Task Should_add_error_if_items_are_required_and_empty()
{
var sut = Field(new ArrayFieldProperties { IsRequired = true });
await sut.ValidateAsync(CreateValue(), errors);
errors.Should().BeEquivalentTo(
@ -90,7 +89,6 @@ public class ArrayFieldTests : IClassFixture<TranslationsFixture>
public async Task Should_add_error_if_value_is_not_valid()
{
var sut = Field(new ArrayFieldProperties());
await sut.ValidateAsync(JsonValue.Create("invalid"), errors);
errors.Should().BeEquivalentTo(

44
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ContentValidationTests.cs

@ -521,4 +521,48 @@ public class ContentValidationTests : IClassFixture<TranslationsFixture>
new ValidationError("Field is required.", "myField.iv"),
]);
}
[Fact]
public async Task Should_not_allow_changed_fields()
{
schema = schema.AddString(1, "myField1", Partitioning.Invariant,
new StringFieldProperties { IsCreateOnly = true });
schema = schema.AddString(2, "myField2", Partitioning.Invariant,
new StringFieldProperties { IsCreateOnly = true });
schema = schema.AddString(3, "myField3", Partitioning.Invariant,
new StringFieldProperties());
var data =
new ContentData()
.AddField("myField1",
new ContentFieldData()
.AddInvariant("Value1_0"))
.AddField("myField2",
new ContentFieldData()
.AddInvariant("Value2_0"))
.AddField("myField3",
new ContentFieldData()
.AddInvariant("Value3_0"));
var previousData =
new ContentData()
.AddField("myField1",
new ContentFieldData()
.AddInvariant("Value1_1"))
.AddField("myField2",
new ContentFieldData()
.AddInvariant("Value2_0"))
.AddField("myField3",
new ContentFieldData()
.AddInvariant("Value3_0"));
await data.ValidateAsync(languages.ToResolver(), errors, schema, previousData: previousData);
errors.Should().BeEquivalentTo(
[
new ValidationError("Field cannot be changed after creation.", "myField1.iv"),
]);
}
}

48
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/ValidationTestExtensions.cs

@ -25,15 +25,18 @@ public static class ValidationTestExtensions
private static readonly NamedId<DomainId> AppId = NamedId.Of(DomainId.NewGuid(), "my-app");
private static readonly NamedId<DomainId> SchemaId = NamedId.Of(DomainId.NewGuid(), "my-schema");
public static async ValueTask ValidateAsync(this IValidator validator, object? value, IList<string> errors,
public static async ValueTask ValidateAsync(this IValidator validator,
object? value,
IList<string> errors,
Schema? schema = null,
ValidationMode mode = ValidationMode.Default,
ValidationUpdater? updater = null,
ValidationAction action = ValidationAction.Upsert,
ResolvedComponents? components = null,
DomainId? contentId = null)
DomainId? contentId = null,
ContentData? previousData = null)
{
var context = CreateContext(schema, mode, updater, action, components, contentId);
var context = CreateContext(schema, mode, updater, action, components, contentId, previousData);
validator.Validate(value, context);
@ -42,16 +45,19 @@ public static class ValidationTestExtensions
AddErrors(context.Root, errors);
}
public static async ValueTask ValidateAsync(this IField field, object? value, IList<string> errors,
public static async ValueTask ValidateAsync(this IField field,
object? value,
IList<string> errors,
Schema? schema = null,
ValidationMode mode = ValidationMode.Default,
ValidationUpdater? updater = null,
IValidatorsFactory? factory = null,
ValidationAction action = ValidationAction.Upsert,
ResolvedComponents? components = null,
DomainId? contentId = null)
DomainId? contentId = null,
ContentData? previousData = null)
{
var context = CreateContext(schema, mode, updater, action, components, contentId);
var context = CreateContext(schema, mode, updater, action, components, contentId, previousData);
new ValidatorBuilder(factory, context).ValueValidator(field)
.Validate(value, context);
@ -61,16 +67,19 @@ public static class ValidationTestExtensions
AddErrors(context.Root, errors);
}
public static async Task ValidatePartialAsync(this ContentData data, PartitionResolver partitionResolver, IList<ValidationError> errors,
public static async Task ValidatePartialAsync(this ContentData data,
PartitionResolver partitionResolver,
IList<ValidationError> errors,
Schema? schema = null,
ValidationMode mode = ValidationMode.Default,
ValidationUpdater? updater = null,
IValidatorsFactory? factory = null,
ValidationAction action = ValidationAction.Upsert,
ResolvedComponents? components = null,
DomainId? contentId = null)
DomainId? contentId = null,
ContentData? previousData = null)
{
var context = CreateContext(schema, mode, updater, action, components, contentId);
var context = CreateContext(schema, mode, updater, action, components, contentId, previousData);
await new ValidatorBuilder(factory, context).ContentValidator(partitionResolver)
.ValidateInputPartialAsync(data);
@ -78,16 +87,19 @@ public static class ValidationTestExtensions
errors.AddRange(context.Root.Errors);
}
public static async Task ValidateAsync(this ContentData data, PartitionResolver partitionResolver, IList<ValidationError> errors,
public static async Task ValidateAsync(this ContentData data,
PartitionResolver partitionResolver,
IList<ValidationError> errors,
Schema? schema = null,
ValidationMode mode = ValidationMode.Default,
ValidationUpdater? updater = null,
IValidatorsFactory? factory = null,
ValidationAction action = ValidationAction.Upsert,
ResolvedComponents? components = null,
DomainId? contentId = null)
DomainId? contentId = null,
ContentData? previousData = null)
{
var context = CreateContext(schema, mode, updater, action, components, contentId);
var context = CreateContext(schema, mode, updater, action, components, contentId, previousData);
await new ValidatorBuilder(factory, context).ContentValidator(partitionResolver)
.ValidateInputAsync(data);
@ -116,9 +128,10 @@ public static class ValidationTestExtensions
Schema? schema,
ValidationMode mode,
ValidationUpdater? updater,
ValidationAction action = ValidationAction.Upsert,
ResolvedComponents? components = null,
DomainId? contentId = null)
ValidationAction action,
ResolvedComponents? components,
DomainId? contentId,
ContentData? previousData)
{
schema ??= new Schema();
@ -127,7 +140,10 @@ public static class ValidationTestExtensions
schema with { Id = SchemaId.Id, Name = SchemaId.Name },
contentId ?? DomainId.NewGuid(),
components ?? ResolvedComponents.Empty,
TestUtils.DefaultSerializer);
TestUtils.DefaultSerializer)
{
PreviousData = previousData
};
var context =
new ValidationContext(rootContext)

2
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/Validators/AllowedValuesValidatorTests.cs

@ -44,4 +44,4 @@ public class AllowedValuesValidatorTests : IClassFixture<TranslationsFixture>
errors.Should().BeEquivalentTo(
["Not an allowed value."]);
}
}
}

144
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/ValidateContent/Validators/NotChangedValidatorTests.cs

@ -0,0 +1,144 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Domain.Apps.Core.TestHelpers;
using Squidex.Domain.Apps.Core.ValidateContent.Validators;
namespace Squidex.Domain.Apps.Core.Operations.ValidateContent.Validators;
public class NotChangedValidatorTests : IClassFixture<TranslationsFixture>
{
private readonly IRootField field =
Fields.String(1, "myField", Partitioning.Invariant,
new StringFieldProperties { IsCreateOnly = true });
private readonly List<string> errors = [];
[Fact]
public async Task Should_not_add_error_if_value_is_wrong_type()
{
var sut = new NotChangedValidator(field, []);
await sut.ValidateAsync(true, errors);
Assert.Empty(errors);
}
[Fact]
public async Task Should_not_add_error_if_values_are_the_same()
{
var previousData =
new ContentData()
.AddField("myField",
new ContentFieldData()
.AddInvariant("Value1"));
var newData =
new ContentFieldData()
.AddInvariant("Value1");
var sut = new NotChangedValidator(field, previousData);
await sut.ValidateAsync(newData, errors);
Assert.Empty(errors);
}
[Fact]
public async Task Should_add_error_if_values_differ()
{
var previousData =
new ContentData()
.AddField("myField",
new ContentFieldData()
.AddInvariant("Value1"));
var newData =
new ContentFieldData()
.AddInvariant("Value2");
var sut = new NotChangedValidator(field, previousData);
await sut.ValidateAsync(newData, errors);
errors.Should().BeEquivalentTo(
["iv: Field cannot be changed after creation."]);
}
[Fact]
public async Task Should_add_error_if_values_differ_as_new_data_does_not_have_field()
{
var previousData =
new ContentData()
.AddField("myField",
new ContentFieldData()
.AddInvariant("Value1"));
var newData =
new ContentFieldData();
var sut = new NotChangedValidator(field, previousData);
await sut.ValidateAsync(newData, errors);
errors.Should().BeEquivalentTo(
["iv: Field cannot be changed after creation."]);
}
[Fact]
public async Task Should_add_error_if_values_differ_as_new_data_is_null()
{
var previousData =
new ContentData()
.AddField("myField",
new ContentFieldData()
.AddInvariant("Value1"));
var sut = new NotChangedValidator(field, previousData);
await sut.ValidateAsync(null, errors);
errors.Should().BeEquivalentTo(
["iv: Field cannot be changed after creation."]);
}
[Fact]
public async Task Should_add_error_if_values_differ_as_previous_data_does_not_have_field()
{
var newData =
new ContentFieldData()
.AddInvariant("Value2");
var sut = new NotChangedValidator(field, []);
await sut.ValidateAsync(newData, errors);
errors.Should().BeEquivalentTo(
["iv: Field cannot be changed after creation."]);
}
[Fact]
public async Task Should_add_error_if_values_differ_as_previous_data_does_not_have_value()
{
var previousData =
new ContentData()
.AddField("myField", []);
var newData =
new ContentFieldData()
.AddInvariant("Value2");
var sut = new NotChangedValidator(field, []);
await sut.ValidateAsync(newData, errors);
errors.Should().BeEquivalentTo(
["iv: Field cannot be changed after creation."]);
}
}

39
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Add_should_create_events_and_add_field.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -243,7 +255,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
FieldId: 1,age,
SchemaId: Guid_2,my-schema,

255
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Add_should_create_events_and_add_field_to_array.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1299,7 +1383,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
FieldId: 2,age,
ParentFieldId: 1,array,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ConfigureUIFields_should_create_events_for_list_fields_and_update_schema.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -127,7 +133,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -138,7 +145,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -161,7 +169,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -172,7 +181,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -195,7 +205,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -206,7 +217,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ConfigureUIFields_should_create_events_for_reference_fields_and_update_schema.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -127,7 +133,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -138,7 +145,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -161,7 +169,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -172,7 +181,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -195,7 +205,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -206,7 +217,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

1080
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Create_should_create_events_and_schema_with_initial_fields.verified.txt

File diff suppressed because it is too large

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DeleteField_should_create_events_and_delete_nested_field.verified.txt

@ -11,12 +11,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -34,12 +36,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -57,12 +61,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -86,12 +92,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -109,12 +117,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -132,12 +142,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DisableField_should_create_events_and_update_field_disabled_flag.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

252
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.DisableField_should_create_events_and_update_nested_field_disabled_flag.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.EnableField_should_create_events_and_update_field_disabled_flag.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

252
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.EnableField_should_create_events_and_update_nested_field_disabled_flag.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.HideField_should_create_events_and_update_field_hidden_flag.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

252
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.HideField_should_create_events_and_update_nested_field_hidden_flag.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.LockField_should_create_events_and_update_field_locked_flag.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

252
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.LockField_should_create_events_and_update_nested_field_locked_flag.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

72
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Reorder_should_create_events_and_reorder_fields.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,
@ -48,7 +50,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -59,7 +62,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -82,7 +86,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -93,7 +98,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -114,7 +120,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -125,7 +132,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,
@ -148,7 +156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -159,7 +168,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -180,7 +190,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -191,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,
@ -220,7 +232,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -231,7 +244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,
@ -252,7 +266,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -263,7 +278,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -286,7 +302,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -297,7 +314,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -318,7 +336,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -329,7 +348,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,
@ -352,7 +372,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -363,7 +384,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: field1,
@ -384,7 +406,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +418,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: field2,

468
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.Reorder_should_create_events_and_reorder_nestedy_fields.verified.txt

File diff suppressed because it is too large

36
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ShowField_should_create_events_and_update_field_hidden_flag.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -27,7 +28,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -50,7 +52,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -61,7 +64,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -84,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -95,7 +100,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -124,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -135,7 +142,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -158,7 +166,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -169,7 +178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -192,7 +202,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -203,7 +214,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,

252
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.ShowField_should_create_events_and_update_nested_field_hidden_flag.verified.txt

@ -18,7 +18,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -29,7 +30,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -49,7 +51,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -60,7 +63,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -80,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -91,7 +96,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -112,7 +118,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -123,7 +130,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -143,7 +151,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -154,7 +163,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,7 +184,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -185,7 +196,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -198,12 +210,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -228,7 +242,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -239,7 +254,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -259,7 +275,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -270,7 +287,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -290,7 +308,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -301,7 +320,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -322,7 +342,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -333,7 +354,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -353,7 +375,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -364,7 +387,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -384,7 +408,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -395,7 +420,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -408,12 +434,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -438,7 +466,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -449,7 +478,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -469,7 +499,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -480,7 +511,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -500,7 +532,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -511,7 +544,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -532,7 +566,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -543,7 +578,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -563,7 +599,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -574,7 +611,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -594,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -605,7 +644,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -618,12 +658,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -654,7 +696,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -665,7 +708,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -685,7 +729,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -696,7 +741,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +762,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -727,7 +774,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -748,7 +796,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -759,7 +808,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -779,7 +829,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -790,7 +841,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -810,7 +862,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -821,7 +874,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -834,12 +888,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -864,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -875,7 +932,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -895,7 +953,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -906,7 +965,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -926,7 +986,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -937,7 +998,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -958,7 +1020,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -969,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -989,7 +1053,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1000,7 +1065,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1020,7 +1086,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1031,7 +1098,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1044,12 +1112,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1074,7 +1144,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1085,7 +1156,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1105,7 +1177,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1116,7 +1189,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1136,7 +1210,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1147,7 +1222,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1168,7 +1244,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1179,7 +1256,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1199,7 +1277,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1210,7 +1289,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1230,7 +1310,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
MinLength: 10,
@ -1241,7 +1322,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1254,12 +1336,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,

39
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.UpdateField_should_create_events_and_update_field_properties.verified.txt

@ -14,7 +14,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -23,7 +24,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -44,7 +46,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -53,7 +56,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -74,7 +78,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -83,7 +88,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -110,7 +116,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -119,7 +126,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -140,7 +148,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -149,7 +158,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -170,7 +180,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -179,7 +190,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: age,
@ -216,7 +228,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
FieldId: 1,age,
SchemaId: Guid_2,my-schema,

255
backend/tests/Squidex.Domain.Apps.Entities.Tests/Verify/SchemaDomainObjectTests.UpdateField_should_create_events_and_update_nested_field_properties.verified.txt

@ -16,7 +16,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -25,7 +26,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -43,7 +45,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -52,7 +55,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -70,7 +74,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -79,7 +84,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -98,7 +104,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -107,7 +114,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -125,7 +133,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -134,7 +143,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -152,7 +162,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -161,7 +172,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -174,12 +186,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -202,7 +216,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -211,7 +226,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -229,7 +245,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -238,7 +255,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -256,7 +274,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -265,7 +284,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -284,7 +304,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -293,7 +314,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -311,7 +333,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -320,7 +343,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -338,7 +362,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -347,7 +372,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -360,12 +386,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -388,7 +416,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -397,7 +426,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -415,7 +445,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -424,7 +455,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -442,7 +474,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -451,7 +484,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -470,7 +504,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -479,7 +514,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -497,7 +533,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -506,7 +543,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -524,7 +562,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -533,7 +572,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -546,12 +586,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -580,7 +622,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -589,7 +632,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -607,7 +651,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -616,7 +661,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -634,7 +680,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -643,7 +690,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -662,7 +710,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -671,7 +720,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -689,7 +739,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -698,7 +749,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -716,7 +768,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -725,7 +778,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -738,12 +792,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -766,7 +822,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -775,7 +832,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -793,7 +851,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -802,7 +861,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -820,7 +880,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -829,7 +890,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -848,7 +910,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -857,7 +920,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -875,7 +939,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -884,7 +949,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -902,7 +968,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -911,7 +978,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -924,12 +992,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -952,7 +1022,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -961,7 +1032,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -979,7 +1051,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -988,7 +1061,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1006,7 +1080,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -1015,7 +1090,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1034,7 +1110,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -1043,7 +1120,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1061,7 +1139,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -1070,7 +1149,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1088,7 +1168,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsUnique: false,
@ -1097,7 +1178,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 2,
Name: age,
@ -1110,12 +1192,14 @@
Properties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
RawProperties: {
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
Id: 1,
Name: array,
@ -1152,7 +1236,8 @@
CreateEnum: false,
IsRequired: false,
IsRequiredOnPublish: false,
IsHalfWidth: false
IsHalfWidth: false,
IsCreateOnly: false
},
FieldId: 2,age,
ParentFieldId: 1,array,

4
backend/tests/Squidex.Infrastructure.Tests/Tasks/SchedulerTests.cs

@ -104,7 +104,6 @@ public class SchedulerTests
target.Schedule(async _ =>
{
await Task.Delay(1);
actuals.Add(value);
});
}
@ -114,8 +113,7 @@ public class SchedulerTests
target.Schedule(_ =>
{
actuals.Add(value);
return Task.CompletedTask;
return default;
});
}
}

2
frontend/src/app/features/content/pages/content/content-page.component.ts

@ -109,6 +109,7 @@ export class ContentPageComponent implements CanComponentDeactivate, OnInit {
const role = appsState.snapshot.selectedApp?.roleName;
this.mutableContext = {
action: 'Create',
apiUrl: apiUrl.buildUrl('api'),
appId: contentsState.appId,
appName: contentsState.appName,
@ -224,6 +225,7 @@ export class ContentPageComponent implements CanComponentDeactivate, OnInit {
}
private updateContext() {
this.mutableContext['action'] = this.content ? 'Create' : 'Update';
this.mutableContext['initialContent'] = this.content;
this.mutableContext['language'] = this.language;
this.mutableContext['languages'] = this.languages;

2
frontend/src/app/features/content/shared/forms/content-field.component.html

@ -1,6 +1,6 @@
<div class="row g-0" [class.compare]="formModelCompare">
<div [class.col-12]="!formModelCompare" [class.col-6]="formModelCompare">
<sqx-focus-marker [controlId]="formModel.fieldPath">
<sqx-focus-marker [controlId]="formModel.path">
@if (!(formModel.hiddenChanges | async)) {
<div class="table-items-row table-items-row-summary" [class.field-invalid]="isInvalid | async">
<div class="languages-container">

6
frontend/src/app/features/content/shared/forms/field-editor.component.ts

@ -135,7 +135,7 @@ export class FieldEditorComponent {
}
if (changes.formModel || changes.comments) {
this.annotations = this.comments?.getAnnotations(this.formModel.fieldPath);
this.annotations = this.comments?.getAnnotations(this.formModel.path);
}
}
@ -161,7 +161,7 @@ export class FieldEditorComponent {
}
public annotationCreate(annotation: AnnotationSelection) {
this.messageBus.emit(new AnnotationCreate(this.formModel.fieldPath, annotation));
this.messageBus.emit(new AnnotationCreate(this.formModel.path, annotation));
}
public annotationsSelect(annotation: ReadonlyArray<string>) {
@ -169,7 +169,7 @@ export class FieldEditorComponent {
}
public annotationsUpdate(annotations: ReadonlyArray<Annotation>) {
this.comments?.updateAnnotations(this.formModel.fieldPath, annotations);
this.comments?.updateAnnotations(this.formModel.path, annotations);
}
public unset() {

11
frontend/src/app/features/schemas/pages/schema/fields/forms/field-form-validation.component.html

@ -20,6 +20,17 @@
</div>
</div>
</div>
<div class="form-group row mb-3">
<div class="col-9 offset-3">
<div class="form-check">
<input class="form-check-input" id="{{ field.fieldId }}_fieldCreateOnly" formControlName="isCreateOnly" type="checkbox" />
<label class="form-check-label" for="{{ field.fieldId }}_fieldCreateOnly">
{{ "schemas.field.createOnly" | sqxTranslate }}
</label>
</div>
</div>
</div>
</div>
@switch (field.rawProperties.fieldType) {

4
frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.html

@ -22,8 +22,8 @@
<div class="col-3">
<sqx-control-errors for="field" />
<select class="form-select" formControlName="field">
@for (field of fieldNames; track field) {
<option [ngValue]="field">{{ field }}</option>
@for (option of fieldOptions; track option.value) {
<option [ngValue]="option.value">{{ option.label }}</option>
}
</select>
</div>

2
frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.scss

@ -15,7 +15,5 @@
}
.label {
font-size: $font-small;
font-weight: normal;
line-height: 2.4rem;
}

32
frontend/src/app/features/schemas/pages/schema/rules/schema-field-rules-form.component.ts

@ -10,7 +10,7 @@ import { Component, Input, OnInit } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { EMPTY, Observable, shareReplay } from 'rxjs';
import { TranslatePipe } from '@app/framework';
import { CodeEditorComponent, ConfigureFieldRulesForm, ConfirmClickDirective, ControlErrorsComponent, FIELD_RULE_ACTIONS, SchemaDto, SchemasService, SchemasState, ScriptCompletions } from '@app/shared';
import { CodeEditorComponent, ConfigureFieldRulesForm, ConfirmClickDirective, ControlErrorsComponent, FIELD_RULE_ACTIONS, FieldPropertiesDto, SchemaDto, SchemasService, SchemasState, ScriptCompletions } from '@app/shared';
@Component({
selector: 'sqx-schema-field-rules-form',
@ -32,7 +32,7 @@ export class SchemaFieldRulesFormComponent implements OnInit {
public editForm = new ConfigureFieldRulesForm();
public fieldNames!: ReadonlyArray<string>;
public fieldOptions: ReadonlyArray<{ label: string; value: string }> = [];
public fieldActions = FIELD_RULE_ACTIONS;
public fieldCompletions: Observable<ScriptCompletions> = EMPTY;
@ -49,21 +49,39 @@ export class SchemaFieldRulesFormComponent implements OnInit {
}
public ngOnChanges() {
const fieldNames: string[] = [];
const fieldNames = new Set<string>();
const fieldTags = new Set<string>();
const addField = (name: string, properties: FieldPropertiesDto) => {
fieldNames.add(name);
if (properties.tags) {
for (const tag of properties.tags) {
fieldTags.add(tag);
}
}
};
for (const field of this.schema.fields) {
if (field.properties.isContentField) {
fieldNames.push(field.name);
addField(field.name, field.properties);
for (const nestedField of field.nested || []) {
if (nestedField.properties.isContentField) {
fieldNames.push(`${field.name}.${nestedField.name}`);
addField(`${field.name}.${nestedField.name}`, nestedField.properties);
}
}
}
}
this.fieldNames = fieldNames.sort();
this.fieldOptions = [
...[...fieldNames]
.sorted()
.map(value => ({ label: `field: ${value}`, value })),
...[...fieldTags]
.sorted()
.map(value => ({ label: `tag: ${value}`, value: `tag:${value}` })),
];
this.isEditable = this.schema.canUpdateUrls;
@ -72,7 +90,7 @@ export class SchemaFieldRulesFormComponent implements OnInit {
}
public add() {
this.editForm.add(this.fieldNames);
this.editForm.add(this.fieldOptions[0].value);
}
public saveSchema() {

51
frontend/src/app/features/schemas/pages/schemas/schema-form.component.scss

@ -14,55 +14,4 @@ $icon-size: 4.5rem;
.name-group {
margin-bottom: 1.5rem;
}
.type {
margin-bottom: .5rem;
&-title {
font-weight: bold;
}
&-text {
font-size: $font-small;
}
&-icon {
background: transparent;
border: 1px solid $color-border;
border-radius: $border-radius;
color: $color-theme-brand;
cursor: pointer;
font-size: 1.75rem;
font-weight: normal;
height: $icon-size;
line-height: $icon-size;
margin-right: .5rem;
text-align: center;
text-decoration: none;
width: $icon-size;
.radio-input {
display: none;
}
&.active {
@include box-shadow-outer(0, 0, 10px, .5);
background: $color-theme-brand;
border-color: $color-theme-brand;
color: $color-white;
&:hover {
color: $color-white;
}
}
&:hover {
border-color: $color-border-dark;
}
}
.radio-input {
display: none;
}
}

66
frontend/src/app/framework/angular/forms/editors/code-editor.component.ts

@ -15,6 +15,8 @@ export const SQX_CODE_EDITOR_CONTROL_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CodeEditorComponent), multi: true,
};
type Editor = AceAjax.Editor & { completers?: AceAjax.Completer[]; completer?: { showDocTooltip: (item: any) => void } };
@Component({
selector: 'sqx-code-editor',
styleUrls: ['./code-editor.component.scss'],
@ -26,7 +28,7 @@ export const SQX_CODE_EDITOR_CONTROL_VALUE_ACCESSOR: any = {
})
export class CodeEditorComponent extends StatefulControlComponent<{}, any> implements AfterViewInit, FocusComponent {
private aceModes?: ModeList;
private aceEditor?: AceAjax.Editor;
private aceEditor?: Editor;
private aceTools = false;
private valueChanged = new Subject();
private value = '';
@ -165,37 +167,43 @@ export class CodeEditorComponent extends StatefulControlComponent<{}, any> imple
this.onDisabled(this.snapshot.isDisabled);
if (this.aceTools) {
const previous = (this.aceEditor as any)['completers'] as AceAjax.Completer[];
(this.aceEditor as any)['completers'] = [
previous?.[0], {
getCompletions: (editor: any, session: any, pos: any, prefix: any, callback: any) => {
callback(null, this.completions);
},
getDocTooltip: (item: AceAjax.Completion) => {
const source = item as unknown as ScriptCompletion;
if (source.path && source.description) {
item.docHTML = `<b>${item.value}</b><hr></hr>${source.description}`;
if (source.allowedValues) {
item.docHTML += '<div class="mt-2 mb-2">Allowed Values:<ul>';
for (const value of source.allowedValues) {
item.docHTML += `<li><code>${value}</code></li>`;
}
item.docHTML += '</ul></div>';
const originalCompleter = this.aceEditor.completer!;
const originalShowDocTooltip = originalCompleter.showDocTooltip;
originalCompleter.showDocTooltip = item => {
requestAnimationFrame(() => {
originalShowDocTooltip.apply(originalCompleter, [item]);
});
};
const completer: AceAjax.Completer = {
getCompletions: (editor: any, session: any, pos: any, prefix: any, callback: any) => {
callback(null, this.completions);
},
getDocTooltip: (item: AceAjax.Completion) => {
const source = item as unknown as ScriptCompletion;
if (source.path && source.description) {
item.docHTML = `<b>${item.value}</b><hr></hr>${source.description}`;
if (source.allowedValues) {
item.docHTML += '<div class="mt-3 mb-0">Allowed Values:<ul class="mt-2 mb-2">';
for (const value of source.allowedValues) {
item.docHTML += `<li><code>${value}</code></li>`;
}
if (source.deprecationReason) {
item.docHTML += `<div class="mt-2 mb-2"><strong>Deprecated</strong>: ${source.deprecationReason}</div>`;
}
item.docHTML += '</ul></div>';
}
},
identifierRegexps: [/[a-zA-Z_0-9\$\-\.\u00A2-\u2000\u2070-\uFFFF]/],
} as AceAjax.Completer,
];
if (source.deprecationReason) {
item.docHTML += `<div class="mt-2 mb-2"><strong>Deprecated</strong>: ${source.deprecationReason}</div>`;
}
}
},
};
const previous = this.aceEditor.completers || [];
this.aceEditor.completers = [...previous, completer];
}
this.aceEditor.on('blur', () => {
this.changeValue();

12
frontend/src/app/framework/utils/types.ts

@ -101,18 +101,6 @@ export module Types {
return Types.isUndefined(value) === true || Types.isNull(value) === true;
}
export function fastMerge<T>(lhs: ReadonlyArray<T>, rhs: ReadonlyArray<T>) {
if (rhs.length === 0) {
return lhs;
}
if (lhs.length === 0) {
return rhs;
}
return [...lhs, ...rhs];
}
export function clone<T>(lhs: T): T {
if (Types.isArray(lhs)) {
const result = [];

24
frontend/src/app/shared/components/forms/geolocation-editor.component.html

@ -12,26 +12,22 @@
<div class="row g-0 mt-2">
<form class="col form-inline" (change)="updateValueByInput()" [formGroup]="geolocationForm" (ngSubmit)="updateValueByInput()">
<div class="row g-2 align-items-center">
@if (!snapshot.isCompact) {
<div class="col-auto mb pe-2">
<label for="latitude">{{ "common.latitudeShort" | sqxTranslate }}:</label>
</div>
}
<div class="col">
<div class="col coordinate">
<sqx-control-errors for="latitude" style="z-index: 10000" />
<input class="form-control" id="latitude" formControlName="latitude" step="any" type="number" />
</div>
@if (!snapshot.isCompact) {
<div class="col col-auto ps-2">
<label for="longitude">{{ "common.longitudeShort" | sqxTranslate }}:</label>
</div>
}
@if (!snapshot.isCompact) {
<label for="latitude">{{ "common.latitudeShort" | sqxTranslate }}</label>
}
</div>
<div class="col">
<div class="col coordinate">
<sqx-control-errors for="longitude" style="z-index: 10000" />
<input class="form-control" id="longitude" formControlName="longitude" step="any" type="number" />
@if (!snapshot.isCompact) {
<label for="longitude">{{ "common.longitudeShort" | sqxTranslate }}</label>
}
</div>
@if (!snapshot.isCompact) {

12
frontend/src/app/shared/components/forms/geolocation-editor.component.scss

@ -23,4 +23,16 @@
.form-control {
max-width: 100%;
}
}
.coordinate {
position: relative;
label {
@include absolute(.5rem, null, null, 1rem);
}
.form-control {
padding-left: 3rem;
}
}

2
frontend/src/app/shared/components/forms/geolocation-editor.component.ts

@ -183,7 +183,7 @@ export class GeolocationEditorComponent extends StatefulControlComponent<State,
await Promise.all([
this.resourceLoader.loadLocalStyle('dependencies/leaflet/Control.Geocoder.css'),
this.resourceLoader.loadLocalScript('dependencies/leaflet/Control.Geocoder.min.js'),
this.resourceLoader.loadLocalScript('dependencies/leaflet/Control.Geocoder.js'),
]);
this.map = L.map(this.editor.nativeElement).fitWorld();

8
frontend/src/app/shared/components/forms/rich-editor.component.scss

@ -1,2 +1,8 @@
@import 'mixins';
@import 'vars';
@import 'vars';
:host ::ng-deep {
fieldset {
min-width: auto;
}
}

6
frontend/src/app/shared/model/generated.ts

@ -3026,6 +3026,8 @@ export abstract class FieldPropertiesDto implements IFieldPropertiesDto {
readonly isRequiredOnPublish?: boolean;
/** Indicates if the field should be rendered with half width only. */
readonly isHalfWidth?: boolean;
/** Indicates if the field can only be created and not modified. */
readonly isCreateOnly?: boolean;
/** Optional url to the editor. */
readonly editorUrl?: string | undefined;
/** Tags for automation processes. */
@ -3064,6 +3066,7 @@ export abstract class FieldPropertiesDto implements IFieldPropertiesDto {
(<any>this).isRequired = _data["isRequired"];
(<any>this).isRequiredOnPublish = _data["isRequiredOnPublish"];
(<any>this).isHalfWidth = _data["isHalfWidth"];
(<any>this).isCreateOnly = _data["isCreateOnly"];
(<any>this).editorUrl = _data["editorUrl"];
if (Array.isArray(_data["tags"])) {
(<any>this).tags = [] as any;
@ -3129,6 +3132,7 @@ export abstract class FieldPropertiesDto implements IFieldPropertiesDto {
data["isRequired"] = this.isRequired;
data["isRequiredOnPublish"] = this.isRequiredOnPublish;
data["isHalfWidth"] = this.isHalfWidth;
data["isCreateOnly"] = this.isCreateOnly;
data["editorUrl"] = this.editorUrl;
if (Array.isArray(this.tags)) {
data["tags"] = [];
@ -3174,6 +3178,8 @@ export interface IFieldPropertiesDto {
readonly isRequiredOnPublish?: boolean;
/** Indicates if the field should be rendered with half width only. */
readonly isHalfWidth?: boolean;
/** Indicates if the field can only be created and not modified. */
readonly isCreateOnly?: boolean;
/** Optional url to the editor. */
readonly editorUrl?: string | undefined;
/** Tags for automation processes. */

85
frontend/src/app/shared/state/contents.form-rules.ts

@ -9,10 +9,10 @@
/* eslint-disable no-useless-return */
import { Types } from '@app/framework';
import { FieldRuleDto, SchemaDto } from './../model';
import { FieldDto, FieldRuleDto, NestedFieldDto, SchemaDto } from './../model';
export type RuleContext = { data: any; user?: any };
export type RuleForm = { fieldPath: string };
export type RuleForm = { path: string; field: FieldDto | NestedFieldDto };
export interface CompiledRules {
get rules(): ReadonlyArray<CompiledRule>;
@ -24,12 +24,13 @@ export interface RulesProvider {
getRules(form: RuleForm): CompiledRules;
}
const EMPTY_RULES_ARRAY: CompiledRule[] = [];
const EMPTY_RULES_STATIC = { rules: EMPTY_RULES_ARRAY };
const TAG_PREFIX = 'tag:';
export class CompiledRule {
private readonly function: Function;
public get field() {
return this.rule.field;
}
private readonly evaluator: (path: string, field: FieldDto | NestedFieldDto) => boolean;
public get action() {
return this.rule.action;
@ -39,13 +40,35 @@ export class CompiledRule {
private readonly rule: FieldRuleDto,
private readonly useItemData: boolean,
) {
try {
this.function = new Function(`return function(user, ctx, data, itemData) { return ${rule.condition} }`)();
} catch {
this.function = () => false;
if (rule.field.startsWith(TAG_PREFIX)) {
const tag = rule.field.substring(TAG_PREFIX.length).trim();
this.evaluator = (_, field) => {
const tags = field.properties?.tags;
return Types.isArray(tags) && tags.indexOf(tag) >= 0;
};
} else {
this.evaluator = (path, _) => {
return this.rule.field === path;
};
}
if (!rule.condition) {
this.function = () => true;
} else {
try {
this.function = new Function(`return function(user, ctx, data, itemData) { return ${rule.condition} }`)();
} catch {
this.function = () => false;
}
}
}
public isApplied(path: string, field: FieldDto | NestedFieldDto) {
return this.evaluator(path, field);
}
public eval(context: RuleContext, itemData: any) {
try {
const data = this.useItemData ? itemData || context.data : context.data;
@ -56,10 +79,8 @@ export class CompiledRule {
}
}
}
const EMPTY_RULES: CompiledRule[] = [];
const EMPTY_RULES_STATIC = { rules: EMPTY_RULES };
class ComponentRules implements ComponentRules {
class ComponentRules implements CompiledRules {
private previouSchema?: SchemaDto;
private compiledRules: ReadonlyArray<CompiledRule> = [];
@ -68,9 +89,9 @@ class ComponentRules implements ComponentRules {
if (schema !== this.previouSchema) {
if (schema) {
this.compiledRules = Types.fastMerge(this.parentRules.getRules(this.form).rules, this.getRelativeRules(this.form, schema));
this.compiledRules = fastMerge(this.parentRules.getRules(this.form).rules, this.getRelativeRules(this.form, schema));
} else {
this.compiledRules = EMPTY_RULES;
this.compiledRules = EMPTY_RULES_ARRAY;
}
}
@ -89,13 +110,13 @@ class ComponentRules implements ComponentRules {
const rules = this.parentRules.compileRules(schema);
if (rules.length === 0) {
return EMPTY_RULES;
return EMPTY_RULES_ARRAY;
}
const pathField = form.fieldPath.substring(this.parentPath.length + 1);
const pathSimple = getSimplePath(pathField);
const pathNormal = form.path.substring(this.parentPath.length + 1);
const pathSimple = getSimplePath(pathNormal);
return rules.filter(x => x.field === pathField || x.field === pathSimple);
return rules.filter(x => x.isApplied(pathNormal, form.field) || x.isApplied(pathSimple, form.field));
}
}
@ -118,15 +139,15 @@ export class ComponentRulesProvider implements RulesProvider {
export class RootRulesProvider implements RulesProvider {
private readonly rulesCache: { [id: string]: ReadonlyArray<CompiledRule> } = {};
private readonly rules: ReadonlyArray<CompiledRule>;
private readonly rulesRoot: ReadonlyArray<CompiledRule>;
constructor(schema: SchemaDto) {
this.rules = this.compileRules(schema);
this.rulesRoot = this.compileRules(schema);
}
public compileRules(schema: SchemaDto) {
if (!schema) {
return EMPTY_RULES;
return EMPTY_RULES_ARRAY;
}
let result = this.rulesCache[schema.id];
@ -141,16 +162,16 @@ export class RootRulesProvider implements RulesProvider {
}
public getRules(form: RuleForm) {
const allRules = this.rules;
const allRules = this.rulesRoot;
if (allRules.length === 0) {
return EMPTY_RULES_STATIC;
}
const pathField = form.fieldPath;
const pathSimple = getSimplePath(pathField);
const pathNormal = form.path;
const pathSimple = getSimplePath(pathNormal);
const rules = allRules.filter(x => x.field === pathField || x.field === pathSimple);
const rules = allRules.filter(x => x.isApplied(pathNormal, form.field) || x.isApplied(pathSimple, form.field));
return { rules };
}
@ -164,4 +185,16 @@ function getSimplePath(path: string) {
}
return parts.join('.');
}
function fastMerge<T>(lhs: ReadonlyArray<T>, rhs: ReadonlyArray<T>) {
if (rhs.length === 0) {
return lhs;
}
if (lhs.length === 0) {
return rhs;
}
return [...lhs, ...rhs];
}

65
frontend/src/app/shared/state/contents.forms-helpers.ts

@ -16,7 +16,7 @@ import { CompiledRules, RuleContext, RulesProvider } from './contents.form-rules
export type TranslationStatuses = { [language: string]: number };
export type AnyFieldDto = FieldDto | NestedFieldDto;
export type AnyFieldDto = NestedFieldDto;
export function contentsTranslationStatus(datas: any[], schema: SchemaDto, languages: ReadonlyArray<Language>) {
const result: TranslationStatuses = {};
@ -100,7 +100,7 @@ export abstract class Hidden {
export type FieldGroup<T = FieldDto> = { separator?: T; fields: T[]; id: string };
export function groupFields<T extends FieldDto | NestedFieldDto>(fields: ReadonlyArray<T>, keepEmpty = false): FieldGroup<T>[] {
export function groupFields<T extends AnyFieldDto>(fields: ReadonlyArray<T>, keepEmpty = false): FieldGroup<T>[] {
const result: FieldGroup<T>[] = [];
let currentSeparator: T | undefined;
@ -170,23 +170,38 @@ export class PartitionConfig {
}
}
export type AbstractContentFormState = {
export type AbstractContentFormState = Readonly<{
isDisabled?: boolean;
isHidden?: boolean;
isRequired?: boolean;
};
}>;
export interface FormGlobals {
export type FormGlobals = Readonly<{
partitions: PartitionConfig;
remoteValidator?: ValidatorFn;
schema: SchemaDto;
schemas: { [id: string ]: SchemaDto };
remoteValidator?: ValidatorFn;
}
export abstract class AbstractContentForm<T extends FieldDto | NestedFieldDto, TForm extends AbstractControl> extends Hidden {
}>;
export type ControlArgs<T = AnyFieldDto> = Readonly<{
field: T;
globals: FormGlobals;
isOptional: boolean;
partition: string;
path: string;
rules: RulesProvider;
}>;
export abstract class AbstractContentForm<T extends AnyFieldDto, TForm extends AbstractControl> extends Hidden {
private readonly collapsed$ = new BehaviorSubject<boolean | null>(null);
private readonly ruleSet: CompiledRules;
public readonly field: T;
public readonly globals: FormGlobals;
public readonly isOptional: boolean;
public readonly partition: string;
public readonly path: string;
public get collapsed() {
return this.collapsed$.value;
}
@ -196,20 +211,28 @@ export abstract class AbstractContentForm<T extends FieldDto | NestedFieldDto, T
}
protected constructor(
public readonly globals: FormGlobals,
public readonly field: T,
public readonly fieldPath: string,
public readonly args: ControlArgs<T>,
public readonly form: TForm,
public readonly isOptional: boolean,
public readonly rules: RulesProvider,
) {
super();
this.field = args.field;
this.globals = args.globals;
this.isOptional = args.isOptional;
this.partition = args.partition;
this.path = args.path;
this.ruleSet = args.rules.getRules(args);
}
public relativePath(relative: string) {
return `${this.path}.${relative}`;
}
this.ruleSet = rules.getRules(this);
public setValue(value: any) {
this.form.reset(value);
}
public path(relative: string) {
return `${this.fieldPath}.${relative}`;
public unset() {
this.form.setValue(undefined);
}
public collapse() {
@ -252,14 +275,6 @@ export abstract class AbstractContentForm<T extends FieldDto | NestedFieldDto, T
this.updateCustomState(context, itemData, state);
}
public setValue(value: any) {
this.form.reset(value);
}
public unset() {
this.form.setValue(undefined);
}
protected updateCustomState(_context: RuleContext, _itemData: any, _state: AbstractContentFormState): void {
return;
}

18
frontend/src/app/shared/state/contents.forms.spec.ts

@ -828,11 +828,27 @@ describe('ContentForm', () => {
},
});
// Should hide fields.
expect(array.get(0)!.get('field1')!.hidden).toBeTruthy();
expect(array.get(1)!.get('field1')!.hidden).toBeFalsy();
});
it('should hide field based on tags', () => {
const contentForm = createForm([
createField({ id: 1, properties: createProperties('Number', { tags: ['tag1'] }), partitioning: 'invariant' }),
createField({ id: 2, properties: createProperties('Number'), partitioning: 'invariant' }),
], [
new FieldRuleDto({ field: 'tag:tag1', action: 'Hide' }),
]);
const field1 = contentForm.get('field1');
const field1_iv = contentForm.get('field1')!.get('iv');
const field2 = contentForm.get('field2');
expect(field1!.hidden).toBeTruthy();
expect(field2!.hidden).toBeFalsy();
expect(field1_iv!.hidden).toBeTruthy();
});
it('should add component with default values', () => {
const componentId = MathHelper.guid();
const component = createSchema({

149
frontend/src/app/shared/state/contents.forms.ts

@ -10,9 +10,9 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { distinctUntilChanged, map } from 'rxjs/operators';
import { debounceTimeSafe, ExtendedFormGroup, Form, FormArrayTemplate, TemplatedFormArray, Types, value$ } from '@app/framework';
import { FormGroupTemplate, TemplatedFormGroup } from '@app/framework/angular/forms/templated-form-group';
import { AppLanguageDto, ComponentFieldPropertiesDto, FieldDto, fieldInvariant, LanguageDto, NestedFieldDto, SchemaDto, TableField } from '../model';
import { ComponentRulesProvider, RootRulesProvider, RulesProvider } from './contents.form-rules';
import { AbstractContentForm, AbstractContentFormState, AnyFieldDto, contentTranslationStatus, FieldSection, fieldTranslationStatus, FormGlobals, groupFields, PartitionConfig } from './contents.forms-helpers';
import { AppLanguageDto, ComponentFieldPropertiesDto, FieldDto, fieldInvariant, LanguageDto, SchemaDto, TableField } from '../model';
import { ComponentRulesProvider, RootRulesProvider } from './contents.form-rules';
import { AbstractContentForm, AbstractContentFormState, AnyFieldDto, contentTranslationStatus, ControlArgs, FieldSection, fieldTranslationStatus, FormGlobals, groupFields, PartitionConfig } from './contents.forms-helpers';
import { FieldDefaultValue, FieldsValidators } from './contents.forms.visitors';
type SaveQueryFormType = { name: string; user: boolean };
@ -104,6 +104,7 @@ export class EditContentForm extends Form<ExtendedFormGroup, any> {
remoteValidator: this.remoteValidator,
};
const form = this.form;
const rules = new RootRulesProvider(schema);
this.sections = groupFields(schema.fields).map(({ separator, fields }) => {
@ -111,16 +112,17 @@ export class EditContentForm extends Form<ExtendedFormGroup, any> {
for (const field of fields) {
const childForm =
new FieldForm(
globals,
new FieldForm({
field,
field.name,
rules);
this.form.setControl(field.name, childForm.form);
globals,
isOptional: false,
partition: '',
path: field.name,
rules,
});
form.setControl(field.name, childForm.form);
forms.push(childForm);
this.fields[field.name] = childForm;
}
@ -212,25 +214,24 @@ export class FieldForm extends AbstractContentForm<FieldDto, UntypedFormGroup> {
public readonly translationStatus =
value$(this.form).pipe(map(x => fieldTranslationStatus(x)));
constructor(globals: FormGlobals, field: FieldDto, fieldPath: string, rules: RulesProvider) {
super(globals, field, fieldPath, FieldForm.buildForm(), false, rules);
constructor(args: ControlArgs<FieldDto>) {
super(args, FieldForm.buildForm());
for (const { key, isOptional } of globals.partitions.getAll(field)) {
for (const { key: partition, isOptional } of args.globals.partitions.getAll(args.field)) {
const childForm =
buildForm(
this.globals,
field,
this.path(key),
buildForm({
...args,
isOptional,
rules,
key);
partition,
path: this.relativePath(partition),
});
this.partitions[key] = childForm;
this.partitions[partition] = childForm;
this.form.setControl(key, childForm.form);
this.form.setControl(partition, childForm.form);
}
this.isRequired = !!field.properties.isRequired;
this.isRequired = !!args.field.properties.isRequired;
}
public get(language: string | LanguageDto | AppLanguageDto) {
@ -277,15 +278,13 @@ export class FieldForm extends AbstractContentForm<FieldDto, UntypedFormGroup> {
}
}
export class FieldValueForm extends AbstractContentForm<FieldDto | NestedFieldDto, UntypedFormControl> {
export class FieldValueForm extends AbstractContentForm<AnyFieldDto, UntypedFormControl> {
private isRequired = false;
constructor(globals: FormGlobals, field: FieldDto | NestedFieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider, partition: string) {
super(globals, field, fieldPath,
FieldValueForm.buildControl(field, isOptional, partition, globals),
isOptional, rules);
constructor(args: ControlArgs) {
super(args, FieldValueForm.buildControl(args, args.partition));
this.isRequired = !!field.properties.isRequired && !isOptional;
this.isRequired = !!args.field.properties.isRequired && !args.isOptional;
}
protected updateCustomState(_context: any, _itemData: any, state: AbstractContentFormState) {
@ -295,7 +294,6 @@ export class FieldValueForm extends AbstractContentForm<FieldDto | NestedFieldDt
this.isRequired = isRequired;
let validators = FieldsValidators.create(this.field, true);
if (isRequired) {
validators.push(Validators.required);
} else {
@ -307,20 +305,20 @@ export class FieldValueForm extends AbstractContentForm<FieldDto | NestedFieldDt
}
}
private static buildControl(field: FieldDto | NestedFieldDto, isOptional: boolean, partition: string, globals: FormGlobals) {
const value = FieldDefaultValue.get(field, partition);
private static buildControl(args: ControlArgs, partition: string) {
const value = FieldDefaultValue.get(args.field, partition);
const validators = FieldsValidators.create(field, isOptional);
const validators = FieldsValidators.create(args.field, args.isOptional);
if (globals.remoteValidator) {
validators.push(globals.remoteValidator);
if (args.globals.remoteValidator) {
validators.push(args.globals.remoteValidator);
}
return new UntypedFormControl(value, { validators });
}
}
export class FieldArrayForm extends AbstractContentForm<FieldDto | NestedFieldDto, TemplatedFormArray> {
export class FieldArrayForm extends AbstractContentForm<AnyFieldDto, TemplatedFormArray> {
private readonly item$ = new BehaviorSubject<ReadonlyArray<ObjectFormBase>>([]);
public get itemChanges(): Observable<ReadonlyArray<ObjectFormBase>> {
@ -335,15 +333,15 @@ export class FieldArrayForm extends AbstractContentForm<FieldDto | NestedFieldDt
this.item$.next(value);
}
constructor(globals: FormGlobals, field: FieldDto | NestedFieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider,
public readonly partition: string,
constructor(args: ControlArgs,
public readonly isComponents: boolean,
) {
super(globals, field, fieldPath,
new TemplatedFormArray(new ArrayTemplate(() => this), FieldsValidators.create(field, isOptional)),
isOptional, rules);
super(args,
new TemplatedFormArray(
new ArrayTemplate(() => this),
FieldsValidators.create(args.field, args.isOptional)));
this.form.setValue(FieldDefaultValue.get(field, this.partition), { emitEvent: false });
this.form.setValue(FieldDefaultValue.get(args.field, args.partition), { emitEvent: false });
(this.form.template as any)['form'] = this;
}
@ -410,40 +408,25 @@ class ArrayTemplate implements FormArrayTemplate {
this.createItem(model);
model.internalItems = [...this.model.items, child];
return child.form;
}
public removeControl(index: number) {
const model = this.model;
model.internalItems = model.items.filter((_, i) => i !== index);
}
public clearControls() {
const model = this.model;
model.internalItems = [];
}
private createItem(model: FieldArrayForm) {
return new ArrayItemForm(
model.globals,
model.field as FieldDto,
model.fieldPath,
model.isOptional,
model.rules,
model.partition);
return new ArrayItemForm(model.args);
}
private createComponent(model: FieldArrayForm) {
return new ComponentForm(
model.globals,
model.field as FieldDto,
model.fieldPath,
model.isOptional,
model.rules,
model.partition);
return new ComponentForm(model.args);
}
}
@ -479,12 +462,8 @@ export class ObjectFormBase extends AbstractContentForm<AnyFieldDto, TemplatedFo
this.fields$.next(value);
}
constructor(globals: FormGlobals, field: AnyFieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider, template: ObjectTemplate,
public readonly partition: string,
) {
super(globals, field, fieldPath,
ObjectFormBase.buildControl(template),
isOptional, rules);
constructor(args: ControlArgs, template: ObjectTemplate) {
super(args, ObjectFormBase.buildControl(template));
}
public get(field: string | { name: string }): FieldItemForm | undefined {
@ -507,7 +486,7 @@ export class ObjectFormBase extends AbstractContentForm<AnyFieldDto, TemplatedFo
}
abstract class ObjectTemplate<T extends ObjectFormBase = ObjectFormBase> implements FormGroupTemplate {
private currentSchema: ReadonlyArray<FieldDto | NestedFieldDto> | undefined;
private currentSchema: ReadonlyArray<AnyFieldDto> | undefined;
protected get model() {
return this.modelProvider();
@ -552,18 +531,14 @@ abstract class ObjectTemplate<T extends ObjectFormBase = ObjectFormBase> impleme
const forms: FieldItemForm[] = [];
for (const field of fields) {
const childForm = buildForm(
model.globals,
const childForm = buildForm({
...model.args,
field,
model.path(field.name),
model.isOptional,
model.rules,
model.partition);
path: model.relativePath(field.name),
});
form.setControl(field.name, childForm.form);
forms.push(childForm);
fieldByName[field.name] = childForm;
}
@ -585,10 +560,8 @@ abstract class ObjectTemplate<T extends ObjectFormBase = ObjectFormBase> impleme
}
export class ArrayItemForm extends ObjectFormBase {
constructor(globals: FormGlobals, field: FieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider, partition: string) {
super(globals, field, fieldPath, isOptional, rules,
new ArrayItemTemplate(() => this), partition);
constructor(args: ControlArgs) {
super(args, new ArrayItemTemplate(() => this));
this.form.build({});
}
}
@ -622,11 +595,11 @@ export class ComponentForm extends ObjectFormBase {
return this.field.properties as ComponentFieldPropertiesDto;
}
constructor(globals: FormGlobals, field: AnyFieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider, partition: string) {
super(globals, field, fieldPath, isOptional,
new ComponentRulesProvider(fieldPath, rules, () => this.schema),
new ComponentTemplate(() => this),
partition);
constructor(args: ControlArgs) {
super({
...args,
rules: new ComponentRulesProvider(args.path, args.rules, () => this.schema),
}, new ComponentTemplate(() => this));
this.form.reset(undefined);
}
@ -656,15 +629,15 @@ class ComponentTemplate extends ObjectTemplate<ComponentForm> {
}
}
function buildForm(globals: FormGlobals, field: FieldDto | NestedFieldDto, fieldPath: string, isOptional: boolean, rules: RulesProvider, partition: string) {
switch (field.properties.fieldType) {
function buildForm(args: ControlArgs) {
switch (args.field.properties.fieldType) {
case 'Array':
return new FieldArrayForm(globals, field, fieldPath, isOptional, rules, partition, false);
return new FieldArrayForm(args, false);
case 'Component':
return new ComponentForm(globals, field, fieldPath, isOptional, rules, partition);
return new ComponentForm(args);
case 'Components':
return new FieldArrayForm(globals, field, fieldPath, isOptional, rules, partition, true);
return new FieldArrayForm(args, true);
default:
return new FieldValueForm(globals, field, fieldPath, isOptional, rules, partition);
return new FieldValueForm(args);
}
}

15
frontend/src/app/shared/state/schemas.forms.ts

@ -94,8 +94,8 @@ export class ConfigureFieldRulesForm extends Form<TemplatedFormArray, ConfigureF
super(new TemplatedFormArray(FieldRuleTemplate.INSTANCE));
}
public add(fieldNames: ReadonlyArray<string>) {
this.form.add(fieldNames);
public add(name?: string) {
this.form.add(name);
}
public remove(index: number) {
@ -114,17 +114,15 @@ export class ConfigureFieldRulesForm extends Form<TemplatedFormArray, ConfigureF
class FieldRuleTemplate {
public static readonly INSTANCE = new FieldRuleTemplate();
public createControl(_: any, fieldNames?: ReadonlyArray<string>) {
public createControl(_: any, fieldName?: string) {
return new ExtendedFormGroup({
action: new UntypedFormControl('Disable',
Validators.required,
),
field: new UntypedFormControl(fieldNames?.[0],
Validators.required,
),
condition: new UntypedFormControl('',
field: new UntypedFormControl(fieldName,
Validators.required,
),
condition: new UntypedFormControl(''),
});
}
}
@ -229,6 +227,9 @@ export class EditFieldForm extends Form<ExtendedFormGroup, {}, FieldPropertiesDt
isRequiredOnPublish: new UntypedFormControl(false,
Validators.nullValidator,
),
isCreateOnly: new UntypedFormControl(false,
Validators.nullValidator,
),
isHalfWidth: new UntypedFormControl(false,
Validators.nullValidator,
),

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save