From 5c8e0b12e14b8253955a997c66e3905c7e4d4f73 Mon Sep 17 00:00:00 2001 From: Steve <74217363+st3mc5@users.noreply.github.com> Date: Tue, 2 Feb 2021 17:29:15 +1100 Subject: [PATCH] Add ConditionSettings definition to ViewModel --- packages/sitecore-jss-forms/src/ViewModel.ts | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/sitecore-jss-forms/src/ViewModel.ts b/packages/sitecore-jss-forms/src/ViewModel.ts index 0b01c963aa..2d1927e892 100644 --- a/packages/sitecore-jss-forms/src/ViewModel.ts +++ b/packages/sitecore-jss-forms/src/ViewModel.ts @@ -6,12 +6,36 @@ export interface ValidationDataModel { name: string; } +export interface ConditionsModel { + fieldId: string; + operatorId: string; + value: string; +} + +export interface ActionsModel { + fieldId: string; + actionTypeId: string; + value: string; +} + +export interface FieldConditionsModel { + matchTypeId: string; + conditions: ConditionsModel[]; + actions: ActionsModel[]; +} + +export interface ConditionSettingsModel { + fieldKey: string; + fieldConditions: FieldConditionsModel[]; +} + export interface ViewModel { itemId: string; name: string; templateId: string; fieldTypeItemId: string; validationDataModels: ValidationDataModel[]; + conditionSettings: ConditionSettingsModel; } export interface TextViewModel extends ViewModel {