@clxmedia/types 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,6 +30,7 @@ export type CLXFormSettingsDisplay = {
|
|
|
30
30
|
hideLocationHeader?: boolean;
|
|
31
31
|
hideFormTitle?: boolean;
|
|
32
32
|
hideProcessBar?: boolean;
|
|
33
|
+
disableSubmitButton?: boolean;
|
|
33
34
|
};
|
|
34
35
|
export type CLXFormSubmitConfig = {
|
|
35
36
|
actions: CLXFormSubmitAction[];
|
|
@@ -51,8 +52,8 @@ export type CLXForm = {
|
|
|
51
52
|
description?: string;
|
|
52
53
|
settings?: CLXFormSettings;
|
|
53
54
|
};
|
|
54
|
-
export type CLXFormResponseType = "STRING" | "NUMBER" | "STRING_ARRAY" | "GRID" | "CONTACT" | "CONTACT_ARRAY" | "BOOLEAN" | "FILE" | "DATE" | "SCHEDULE" | "COMPOUND" | "MULTI_COMPOUND" | "ANY";
|
|
55
|
-
export type CLXFormFieldType = "text" | "textarea" | "credential" | "grid" | "boolean" | "select" | "multiselect" | "file" | "contact" | "date" | "schedule" | "compound";
|
|
55
|
+
export type CLXFormResponseType = "STRING" | "NUMBER" | "STRING_ARRAY" | "GRID" | "CONTACT" | "CONTACT_ARRAY" | "ENTITY" | "ENTITY_ARRAY" | "BOOLEAN" | "FILE" | "DATE" | "SCHEDULE" | "COMPOUND" | "MULTI_COMPOUND" | "ANY";
|
|
56
|
+
export type CLXFormFieldType = "text" | "textarea" | "credential" | "grid" | "boolean" | "select" | "multiselect" | "file" | "contact" | "entity" | "date" | "schedule" | "compound";
|
|
56
57
|
export type CLXFormSelectType = "select" | "radio" | "checkbox" | "freeform";
|
|
57
58
|
export type CLXFormConditionSubjectEntry = {
|
|
58
59
|
value: string;
|
|
@@ -92,6 +93,11 @@ export type CLXContactCard = {
|
|
|
92
93
|
email: string | null;
|
|
93
94
|
phone: string | null;
|
|
94
95
|
};
|
|
96
|
+
export type CLXEntityCard = {
|
|
97
|
+
master_id: number;
|
|
98
|
+
name: string;
|
|
99
|
+
type: 'portfolio' | 'property' | 'person';
|
|
100
|
+
};
|
|
95
101
|
export type CLXGridColumnType = "string" | "number" | "boolean";
|
|
96
102
|
export type CLXGridColumn = {
|
|
97
103
|
title: string;
|
|
@@ -166,11 +172,19 @@ export type CLXFormResponseContactArrayValue = CLXFormResponseValueBase & {
|
|
|
166
172
|
type: "CONTACT_ARRAY";
|
|
167
173
|
value: CLXContactCard[];
|
|
168
174
|
};
|
|
175
|
+
export type CLXFormResponseEntityValue = CLXFormResponseValueBase & {
|
|
176
|
+
type: "ENTITY";
|
|
177
|
+
value: CLXEntityCard;
|
|
178
|
+
};
|
|
179
|
+
export type CLXFormResponseEntityArrayValue = CLXFormResponseValueBase & {
|
|
180
|
+
type: "ENTITY_ARRAY";
|
|
181
|
+
value: CLXEntityCard[];
|
|
182
|
+
};
|
|
169
183
|
export type CLXFormResponseGridValue = CLXFormResponseValueBase & {
|
|
170
184
|
type: "GRID";
|
|
171
185
|
value: CLXGridData;
|
|
172
186
|
};
|
|
173
|
-
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseGridValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseCompoundValue | CLXFormResponseSingleCompoundValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
187
|
+
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseGridValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseEntityValue | CLXFormResponseEntityArrayValue | CLXFormResponseCompoundValue | CLXFormResponseSingleCompoundValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
174
188
|
export type CLXFormResponses = {
|
|
175
189
|
[questionSlug: string]: CLXFormResponseValue;
|
|
176
190
|
};
|
|
@@ -243,6 +257,20 @@ export type CLXMultipleContactFormField = CLXContactFormFieldBase & {
|
|
|
243
257
|
response_type: "CONTACT_ARRAY";
|
|
244
258
|
allow_multiple: true;
|
|
245
259
|
};
|
|
260
|
+
export type CLXEntityFormFieldBase = CLXFormField & {
|
|
261
|
+
type: "entity";
|
|
262
|
+
response_type: "ENTITY" | "ENTITY_ARRAY";
|
|
263
|
+
allow_multiple: boolean;
|
|
264
|
+
types?: ('portfolio' | 'property' | 'person')[];
|
|
265
|
+
};
|
|
266
|
+
export type CLXEntityFormField = CLXEntityFormFieldBase & {
|
|
267
|
+
response_type: "ENTITY";
|
|
268
|
+
allow_multiple: false;
|
|
269
|
+
};
|
|
270
|
+
export type CLXMultipleEntityFormField = CLXEntityFormFieldBase & {
|
|
271
|
+
response_type: "ENTITY_ARRAY";
|
|
272
|
+
allow_multiple: true;
|
|
273
|
+
};
|
|
246
274
|
export type CLXDateFormField = CLXFormField & {
|
|
247
275
|
type: "date";
|
|
248
276
|
response_type: "DATE";
|
|
@@ -317,7 +345,7 @@ export type CLXSingleCompoundFormField = CLXFormField & {
|
|
|
317
345
|
compound_fields: CLXCompoundableFormField[];
|
|
318
346
|
};
|
|
319
347
|
export type CLXFormQuestionResponseOptions = {
|
|
320
|
-
field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXCredentialFormField | CLXGridFormField | CLXContactFormField | CLXMultipleContactFormField | CLXSingleCompoundFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
348
|
+
field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXCredentialFormField | CLXGridFormField | CLXContactFormField | CLXMultipleContactFormField | CLXEntityFormField | CLXMultipleEntityFormField | CLXSingleCompoundFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
321
349
|
has_parent?: boolean;
|
|
322
350
|
locked?: boolean;
|
|
323
351
|
tags?: string[];
|
|
@@ -372,12 +400,30 @@ export type CLXFormRuleStringListToStringListInstance = CLXFormRuleInstanceBase
|
|
|
372
400
|
comparisonType: "isAnswered" | "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone";
|
|
373
401
|
negate?: boolean;
|
|
374
402
|
};
|
|
403
|
+
export type CLXFormRuleEntityInListInstance = CLXFormRuleInstanceBase & {
|
|
404
|
+
subject: CLXFormResponseEntityValue;
|
|
405
|
+
target: CLXFormResponseEntityArrayValue;
|
|
406
|
+
comparisonType: "entityInList" | "isAnswered";
|
|
407
|
+
negate?: boolean;
|
|
408
|
+
};
|
|
375
409
|
export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
|
|
376
410
|
subject: CLXFormResponseStringValue;
|
|
377
411
|
target: CLXFormResponseStringArrayValue;
|
|
378
412
|
comparisonType: "stringInList" | "stringNotInList" | "isAnswered";
|
|
379
413
|
negate?: boolean;
|
|
380
414
|
};
|
|
415
|
+
export type CLXFormRuleEntityComparisonInstance = CLXFormRuleInstanceBase & {
|
|
416
|
+
subject: CLXFormResponseEntityValue;
|
|
417
|
+
target: CLXFormResponseEntityValue;
|
|
418
|
+
comparisonType: "isAnswered" | "entityEquals";
|
|
419
|
+
negate?: boolean;
|
|
420
|
+
};
|
|
421
|
+
export type CLXFormRuleEntityListToEntityListInstance = CLXFormRuleInstanceBase & {
|
|
422
|
+
subject: CLXFormResponseEntityArrayValue;
|
|
423
|
+
target: CLXFormResponseEntityArrayValue;
|
|
424
|
+
comparisonType: "isAnswered" | "entityListContainsAll" | "entityListContainsAny" | "entityListContainsNone";
|
|
425
|
+
negate?: boolean;
|
|
426
|
+
};
|
|
381
427
|
export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
|
|
382
428
|
subject: CLXFormResponseFileValue;
|
|
383
429
|
target: CLXFormResponseBooleanValue;
|
|
@@ -408,7 +454,7 @@ export type CLXFormRuleNumberComparisonInstance = CLXFormRuleInstanceBase & {
|
|
|
408
454
|
comparisonType: "numberEquals" | "numberGreaterThan" | "numberLessThan" | "isAnswered";
|
|
409
455
|
negate?: boolean;
|
|
410
456
|
};
|
|
411
|
-
export type CLXFormRuleInstance = CLXFormRuleStringComparisonInstance | CLXFormRuleStringExistsComparisonInstance | CLXFormRuleStringInListInstance | CLXFormRuleFileExistsInstance | CLXFormRuleDateComparisonInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleStringListComparisonInstance | CLXFormRuleBooleanEqualsInstance | CLXFormRuleNumberComparisonInstance;
|
|
457
|
+
export type CLXFormRuleInstance = CLXFormRuleStringComparisonInstance | CLXFormRuleStringExistsComparisonInstance | CLXFormRuleStringInListInstance | CLXFormRuleEntityInListInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleEntityComparisonInstance | CLXFormRuleFileExistsInstance | CLXFormRuleDateComparisonInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleEntityListToEntityListInstance | CLXFormRuleStringListComparisonInstance | CLXFormRuleBooleanEqualsInstance | CLXFormRuleNumberComparisonInstance;
|
|
412
458
|
/**
|
|
413
459
|
* A form rule set is a collection of rules/conditions to evaluate.
|
|
414
460
|
*
|