Skip to content

Commit 414ee99

Browse files
committed
Merge branch 'v2' into rps-feature
2 parents 69fdf89 + f8736c7 commit 414ee99

27 files changed

Lines changed: 1571 additions & 141 deletions

model/src/components/component-types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,13 @@ export const ComponentTypes: ComponentDef[] = [
235235
options: {},
236236
schema: {},
237237
},
238+
{
239+
name: "DisplayAddress",
240+
type: "DisplayAddress",
241+
title: "Display address",
242+
subType: "content",
243+
content: "",
244+
options: {},
245+
schema: {},
246+
},
238247
];

model/src/components/types.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export enum ComponentTypeEnum {
2626
List = "List",
2727
ContextComponent = "ContextComponent",
2828
ContentWithState = "ContentWithState",
29+
DisplayAddress = "DisplayAddress",
2930
}
3031

3132
export type ComponentType =
@@ -56,7 +57,8 @@ export type ComponentType =
5657
| "List"
5758
| "WebsiteField"
5859
| "ContextComponent"
59-
| "ContentWithState";
60+
| "ContentWithState"
61+
| "DisplayAddress";
6062

6163
export type ComponentSubType = "field" | "content";
6264

@@ -89,6 +91,10 @@ interface TextFieldBase {
8991
exposeToContext?: boolean;
9092
disableChangingFromSummary?: boolean;
9193
customValidationMessages?: Record<string, string>;
94+
format?: {
95+
trim?: boolean;
96+
case?: "upper" | "lower";
97+
};
9298
};
9399
schema: {
94100
max?: number;
@@ -301,6 +307,10 @@ export interface InsetTextComponent extends ContentFieldBase {
301307
type: "InsetText";
302308
}
303309

310+
export interface DisplayAddressComponent extends ContentFieldBase {
311+
type: "DisplayAddress";
312+
}
313+
304314
// List Fields
305315
export interface ListComponent extends ListFieldBase {
306316
type: "List";
@@ -365,7 +375,8 @@ export type ComponentDef =
365375
| YesNoFieldComponent
366376
| WebsiteFieldComponent
367377
| ContextComponent
368-
| ContentWithStateComponent;
378+
| ContentWithStateComponent
379+
| DisplayAddressComponent;
369380

370381
// Components that render inputs.
371382
export type InputFieldsComponentsDef =
@@ -392,7 +403,8 @@ export type ContentComponentsDef =
392403
| InsetTextComponent
393404
| ListComponent
394405
| FlashCardComponent
395-
| ContentWithStateComponent;
406+
| ContentWithStateComponent
407+
| DisplayAddressComponent;
396408

397409
// Components that render Lists
398410
export type ListComponentsDef =

model/src/data-model/types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ export interface SecureFormSubmissionConfig extends MsalAuthorizerConfig {
209209
useAwsWafUserAgentWorkaround?: boolean;
210210
}
211211

212+
export interface AddressLookupConfig extends MsalAuthorizerConfig {
213+
apimBaseUrl: string;
214+
callingApplication: string;
215+
subscriptionKey?: string;
216+
}
217+
212218
/**
213219
* `FormDefinition` is a typescript representation of `Schema`
214220
*/
@@ -246,6 +252,6 @@ export type FormDefinition = {
246252
serviceName?: string | undefined;
247253
confirmationSessionTimeout: number | undefined;
248254
returnTo?: boolean | undefined;
249-
secureFormSubmissionConfig: SecureFormSubmissionConfig;
250255
error500ContactEmail?: string | undefined;
256+
addressLookupConfig?: AddressLookupConfig;
251257
};

model/src/schema/schema.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,14 @@ const secureFormSubmissionConfig = msalAuthorizeConfigSchema.concat(
337337
})
338338
);
339339

340+
const addressLookupConfigSchema = msalAuthorizeConfigSchema.concat(
341+
joi.object().keys({
342+
apimBaseUrl: joi.string(),
343+
callingApplication: joi.string(),
344+
subscriptionKey: joi.string().optional(),
345+
})
346+
);
347+
340348
export const Schema = joi
341349
.object()
342350
.required()
@@ -383,6 +391,7 @@ export const Schema = joi
383391
returnTo: joi.boolean().optional(),
384392
secureFormSubmissionConfig: secureFormSubmissionConfig.optional(),
385393
error500ContactEmail: joi.string().optional(),
394+
addressLookupConfig: addressLookupConfigSchema.optional(),
386395
});
387396

388397
/**

0 commit comments

Comments
 (0)