ngx-t-forms-types 0.0.2 → 0.0.3

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.
@@ -1,7 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
- import { IGetTreeResponse, IMultipleInputCal } from "../formInput";
2
+ import { IGetTreeResponse, IMultipleInputCal, IScoaAccount } from "../formInput";
3
3
  import { FormColumnInputs } from "../formInput/BasicFormInputInterface";
4
- import { IMSCOAAccount } from "../formInput/IMscoaAccount";
5
4
  import { CdkDragDrop } from "@angular/cdk/drag-drop";
6
5
  export interface FormBuilderFunctions {
7
6
  multipleInputToggleLabel: (item: FormColumnInputs) => void;
@@ -14,7 +13,7 @@ export interface FormBuilderFunctions {
14
13
  addFunction: (item: IMultipleInputCal, multipleInputId: string | undefined) => void;
15
14
  getLatestAccountTree: () => Observable<IGetTreeResponse>;
16
15
  getSCOAAccount: (SCOAAccount: string) => Observable<{
17
- accounts: IMSCOAAccount[];
16
+ accounts: IScoaAccount[];
18
17
  }>;
19
18
  reorderItems: (event: CdkDragDrop<FormColumnInputs[], any, any>, multipleInputId: string) => void;
20
19
  }
@@ -82,5 +82,6 @@ export declare enum AllFormInputPrimaryKeys {
82
82
  ValueUpdatedAt = "valueUpdatedAt",
83
83
  Status = "status",
84
84
  ViewType = "viewType",
85
- FormIsOpen = "formIsOpen"
85
+ FormIsOpen = "formIsOpen",
86
+ LinkedSegmentId = "linkedSegmentId"
86
87
  }
@@ -87,4 +87,5 @@ export var AllFormInputPrimaryKeys;
87
87
  AllFormInputPrimaryKeys["Status"] = "status";
88
88
  AllFormInputPrimaryKeys["ViewType"] = "viewType";
89
89
  AllFormInputPrimaryKeys["FormIsOpen"] = "formIsOpen";
90
+ AllFormInputPrimaryKeys["LinkedSegmentId"] = "linkedSegmentId";
90
91
  })(AllFormInputPrimaryKeys || (AllFormInputPrimaryKeys = {}));
@@ -23,9 +23,7 @@ export var ElementConfig = {
23
23
  max: 12,
24
24
  step: 1,
25
25
  format: (value) => `${(value / 12) * 100} %`,
26
- hint: `The size determines the width of the input column in the form.
27
- A column size of 12 will take up the full width of the form, while a column size of 4 will take up a third of the form.
28
- `,
26
+ hint: `Controls the input width using a 12-column grid system: 12 = full width, 6 = half width, 4 = one-third width, 3 = one-quarter width`,
29
27
  label: 'Input column size',
30
28
  },
31
29
  {
@@ -40,9 +38,9 @@ export var ElementConfig = {
40
38
  name: SpecialElementKeys.Default,
41
39
  deepBind: [AllFormInputPrimaryKeys.FormControlName],
42
40
  id: "8db68cde-52ca-4be6-9db9-e0d53217f00a",
43
- hint: 'The form control is an inputs unique identifier in the form group, and should be in CamelCase',
41
+ hint: `A unique identifier for the input in the form value. Use camelCase format (e.g., 'firstName', 'phoneNumber').`,
44
42
  editType: ElementEditorTypes.Input,
45
- label: 'Control name ',
43
+ label: 'Control name',
46
44
  blurHandle: BlurHandleTypes.CleanFormControl,
47
45
  },
48
46
  {
@@ -172,12 +170,12 @@ export var ElementConfig = {
172
170
  {
173
171
  name: AllFormInputPrimaryKeys.MscoaConfig,
174
172
  editType: ElementEditorTypes.Toggle,
175
- label: 'Allow selection of all mscoa segments',
173
+ label: 'Allow selection of all SCOA segments',
176
174
  deepBind: ['mscoaConfig', 'showAllSegments'],
177
175
  clearOnChange: [
178
176
  [AllFormInputPrimaryKeys.MscoaConfig, 'segments'],
179
177
  ],
180
- hint: 'If enabled, the user can select any segment from the MScoa configuration',
178
+ hint: 'When enabled, allows selection from all Standard Chart of Accounts (SCOA) segments. Disable to limit available segments.',
181
179
  id: "0f78efcc-5477-4202-916a-8a7cf459c017"
182
180
  },
183
181
  {
@@ -186,8 +184,18 @@ export var ElementConfig = {
186
184
  editType: ElementEditorTypes.ConfigMscoaSegments,
187
185
  label: 'Configure MScoa segments',
188
186
  fetchOptions: ['mscoaConfig', 'showAllSegments'],
187
+ hint: "Configure SCOA segments to be used in the input",
189
188
  id: "ba1a5b79-b071-44a6-b39a-bf1c2fafcda5"
190
189
  },
190
+ {
191
+ name: AllFormInputPrimaryKeys.MscoaConfig,
192
+ deepBind: ['mscoaConfig', 'inputs'],
193
+ editType: ElementEditorTypes.ConfigMscoaAdditionalInputs,
194
+ label: 'Configure additional inputs',
195
+ hint: 'Configure supplementary inputs that extend SCOA segments with additional dimensions. These inputs will be linked to the selected SCOA segments.',
196
+ fetchOptions: [],
197
+ id: "21cc22c6-efb6-4e7d-b772-56443c82bd11"
198
+ },
191
199
  {
192
200
  name: AllFormInputPrimaryKeys.RichTextEditorLibrary,
193
201
  editType: ElementEditorTypes.ChipSelect,
@@ -220,7 +228,7 @@ export var ElementConfig = {
220
228
  name: AllFormInputPrimaryKeys.DataType,
221
229
  deepBind: [AllFormInputPrimaryKeys.DataType],
222
230
  editType: ElementEditorTypes.ChipSelect,
223
- hint: 'The data type is the type of data that the input will hold.Data types are used to validate the input data',
231
+ hint: 'Specifies the data type this input will store (string, number, date, etc.). This affects validation and input processing.',
224
232
  label: 'Data value type',
225
233
  id: "07e33ac0-ba36-48b9-989f-a33293f93051",
226
234
  options: Object.values(InputDataTypes).map((type) => ({ label: type, value: type })),
@@ -250,7 +258,8 @@ export var ElementConfig = {
250
258
  deepBind: ['type'],
251
259
  },
252
260
  ],
253
- label: 'Is calculated field',
261
+ hint: "When enabled, this numeric field's value will be calculated automatically based on formula rules you define below.",
262
+ label: 'Set as calculated field',
254
263
  clearOnChange: [
255
264
  ['calculatedFieldRules'],
256
265
  ],
@@ -279,7 +288,7 @@ export var ElementConfig = {
279
288
  {
280
289
  name: AllFormInputPrimaryKeys.MatOptions,
281
290
  deepBind: ['matOptions', 'fetch', 'value', 'source'],
282
- hint: `Choose data source for input values - affects how values are populated and which configuration options become available`,
291
+ hint: `Choose where input values come from: 'Form Input' links to another field, 'Postman API' fetches from an external API, 'Data Pipeline' pulls from MongoDB.`,
283
292
  editType: ElementEditorTypes.ChipSelect,
284
293
  label: 'Select value source',
285
294
  clearOnChange: [
@@ -296,14 +305,14 @@ export var ElementConfig = {
296
305
  name: SpecialElementKeys.Default,
297
306
  deepBind: ['matOptions', 'fetch', 'value', 'inputSourceId'],
298
307
  editType: ElementEditorTypes.FormInputSelector,
299
- hint: `Links this field to a source input: when the source input's value changes, this field will automatically update to match.This creates a dynamic connection between fields.`,
308
+ hint: `Links this field to another input field. When the source field changes, this field automatically updates to match, creating a dynamic connection.`,
300
309
  additionalTest: [
301
310
  {
302
311
  expression: `source === ${DataSources.Local}`,
303
312
  deepBind: ['matOptions', 'fetch', 'value', 'source'],
304
313
  },
305
314
  ],
306
- label: 'Select Input To fetch Data from',
315
+ label: 'Select source input field',
307
316
  id: "865658d5-6ba4-4402-952f-731cfaeefb76"
308
317
  },
309
318
  {
@@ -319,23 +328,22 @@ export var ElementConfig = {
319
328
  clearOnChange: [
320
329
  ['matOptions', 'fetch', 'value'],
321
330
  ],
322
- hint: `APIs are loaded from Postman collection. Configure required headers, payload format, and response mapping before use. Ensure API is documented in Postman.`,
323
- label: 'Select API to fetch data from',
331
+ hint: `Select an API endpoint from your Postman collection to fetch values. Configure headers, payload format, and response mapping as needed.`,
332
+ label: 'Select API endpoint',
324
333
  id: "95724e64-9d5b-4260-866c-4ada95670b46"
325
334
  },
326
335
  {
327
336
  name: SpecialElementKeys.Default,
328
337
  deepBind: ['matOptions', 'fetch', 'value'],
329
338
  editType: ElementEditorTypes.MongoPipelineBuilder,
330
- hint: `MongoDb pipelines are used to fetch data from a MongoDb database.
331
- Configure the pipeline to fetch the required data before use.`,
339
+ hint: `Create a MongoDB aggregation pipeline to fetch and transform data from your database for this input.`,
332
340
  additionalTest: [
333
341
  {
334
342
  expression: `source === ${DataSources.MongoDb}`,
335
343
  deepBind: ['matOptions', 'fetch', 'value', 'source'],
336
344
  },
337
345
  ],
338
- label: 'Configure a MongoDb data pipeline',
346
+ label: 'Configure MongoDB pipeline',
339
347
  id: "7b2989ae-2f54-4849-93d0-aff56ac12ef2"
340
348
  },
341
349
  {
@@ -520,8 +528,8 @@ export var ElementConfig = {
520
528
  name: SpecialElementKeys.Default,
521
529
  editType: ElementEditorTypes.Toggle,
522
530
  deepBind: [AllFormInputPrimaryKeys.OnlySetTempErrorOnTouch],
523
- label: 'Set temporary errors only on touch',
524
- hint: 'If enabled, the input will only show errors when the user interacts with the input',
531
+ label: 'Show errors only after interaction',
532
+ hint: 'When enabled, validation errors appear only after user interaction with the field. When disabled, errors show immediately on form load.',
525
533
  id: "264bf529-c0f1-4393-b6fd-1d5eb48fce91"
526
534
  },
527
535
  {
@@ -548,7 +556,8 @@ export var ElementConfig = {
548
556
  {
549
557
  name: SpecialElementKeys.DefaultValuePipe,
550
558
  editType: ElementEditorTypes.ChipSelect,
551
- label: 'Add a value pipe',
559
+ label: 'Format displayed value',
560
+ hint: "Apply formatting to the displayed value (e.g., currency symbols, date formatting, decimal places) without changing the stored value.",
552
561
  deepBind: ['pipe', 'pipeType'],
553
562
  additionalTest: [
554
563
  {
@@ -1,5 +1,5 @@
1
1
  import { MatFormFieldAppearance } from "@angular/material/form-field";
2
- import { IFileUploadInput, IMatrixInput, IMscoaInput, IMultiple, ITableSelectionInput, IToggleInput } from ".";
2
+ import { IFileUploadInput, IMatrixInput, IScoaInput, IMultiple, ITableSelectionInput, IToggleInput } from ".";
3
3
  import { ConditionalInputRule } from "./ConditionalInputRule";
4
4
  import { IDateRangePickerInput } from "./DateRangePickerInput";
5
5
  import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
@@ -7,7 +7,7 @@ import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
7
7
  import { ITextareaProperties } from "./TextAreaInput";
8
8
  import { CalculatedFieldRules } from "./calculatedFieldRules";
9
9
  import { IRichTextEditor } from "./RichTextEditorInput";
10
- export type FormColumnInputs = IBasicFormInput & ITableSelectionInput & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IMscoaInput & IRichTextEditor;
10
+ export type FormColumnInputs = IBasicFormInput & ITableSelectionInput & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor;
11
11
  export declare enum ElementTypes {
12
12
  Input = "input",
13
13
  Location = "location",
@@ -1,5 +1,6 @@
1
- import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface";
2
- export interface IMSCOAAccount {
1
+ import { IBasicFormInput } from "./BasicFormInputInterface";
2
+ import { ScoaInnerInput } from "./MscoaInput";
3
+ export interface IScoaAccount {
3
4
  _id: {
4
5
  $oid: string;
5
6
  };
@@ -36,49 +37,58 @@ export interface IMSCOAAccount {
36
37
  $date: string;
37
38
  };
38
39
  }
39
- export interface MscoaInterface extends IMscoaInputConfig {
40
- accountTree: MscoaAccountTree;
40
+ export interface ScoaInterface extends IScoaInputConfig {
41
+ inputId: string;
42
+ accountTree: ScoaAccountTree;
41
43
  loadingTree: boolean;
42
44
  initiated: boolean;
43
45
  accountTreeKeys: string[] | undefined;
44
- segmentValues: MscoaSegmentValue | undefined;
46
+ segmentValues: ScoaSegmentValue | undefined;
45
47
  getTreeResponse: IGetTreeResponse | null;
46
48
  }
47
- export interface MscoaSegmentValue {
49
+ export interface ScoaSegmentValue {
48
50
  [key: string]: {
49
- debit: IMSCOAAccount | undefined;
50
- credit: IMSCOAAccount | undefined;
51
+ debit: IScoaAccount | undefined;
52
+ credit: IScoaAccount | undefined;
51
53
  };
52
54
  }
53
- export type MscoaAccountTree = {
54
- [key: string]: MscoaAccountTree;
55
+ export type ScoaAccountTree = {
56
+ [key: string]: ScoaAccountTree;
55
57
  };
56
- export interface ITableScoaSelectionRow {
57
- segment: string;
58
- segmentTree: MscoaAccountTree;
59
- segmentValue: IMSCOAAccount | undefined;
58
+ export interface ITableScoaSelectionRow extends IIncludedSegmentConfig {
59
+ segmentTree: ScoaAccountTree;
60
+ segmentValue: IScoaAccount | undefined;
60
61
  debit: string;
61
62
  credit: string;
62
63
  }
63
64
  export interface IIncludedSegmentConfig {
64
65
  segment: string | undefined;
66
+ customSegment?: string | undefined;
65
67
  label: string;
66
68
  readOnly: boolean;
67
69
  singleSelect: boolean;
70
+ segmentExtension: boolean;
71
+ id: string;
68
72
  }
69
- export interface IMscoaInputConfig {
70
- inputs: MscoaInnerInput[];
73
+ export interface IScoaInputConfig {
74
+ inputs: ScoaInnerInput[];
71
75
  segments: IIncludedSegmentConfig[] | undefined;
72
76
  showAllSegments: boolean;
73
77
  }
74
- export interface MscoaInnerInput extends FormColumnInputs {
75
- segment: string;
76
- }
77
78
  export interface IGetTreeResponse {
78
79
  message: string;
79
- accountTree: MscoaAccountTree | {};
80
+ accountTree: ScoaAccountTree | {};
80
81
  accountTreeKeys: string[] | undefined;
81
82
  }
82
- export interface IMscoaInput extends IBasicFormInput {
83
- mscoaConfig: IMscoaInputConfig;
83
+ export interface IScoaInput extends IBasicFormInput {
84
+ mscoaConfig: IScoaInputConfig;
85
+ }
86
+ export interface IAccountSegmentTreeKeys extends IIncludedSegmentConfig {
87
+ segment: string;
88
+ innerInput: ScoaInnerInput;
89
+ label: string;
90
+ formInput: boolean;
91
+ segmentTree: ScoaAccountTree;
92
+ inputs: ScoaInnerInput[];
93
+ segmentValue: Record<string, any>;
84
94
  }
@@ -7,10 +7,10 @@ export interface IMscoaFormInput extends IBasicFormInput {
7
7
  segment: string;
8
8
  label: string;
9
9
  }[];
10
- inputs: MscoaInnerInput[];
10
+ inputs: ScoaInnerInput[];
11
11
  };
12
12
  }
13
- export interface MscoaInnerInput extends FormColumnInputs {
14
- segment: string;
13
+ export interface ScoaInnerInput extends FormColumnInputs {
14
+ linkedSegmentId: string;
15
15
  }
16
16
  export declare var MSCOA_INPUT_DEFAULT_MAT_OPTIONS: MatDataOptionsInterface;
@@ -6,10 +6,11 @@ import { IDateRangePickerInput } from "./DateRangePickerInput";
6
6
  import { AllDocumentFileExtensions, AllImageFileExtensions, FileUploadInputValueInterface, IFileUploadInput, InputFileType, UploadTypes } from "./FileUploadInputInterface";
7
7
  import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
8
8
  import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface";
9
- import { IGetTreeResponse, IIncludedSegmentConfig, IMSCOAAccount, IMscoaInput, IMscoaInputConfig, ITableScoaSelectionRow, MscoaAccountTree, MscoaInterface, MscoaSegmentValue } from "./IMscoaAccount";
9
+ import { IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue } from "./IMscoaAccount";
10
10
  import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
11
11
  import { IMatrixInput } from "./MatrixInputInterface";
12
12
  import { MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
13
+ import { ScoaInnerInput } from "./MscoaInput";
13
14
  import { IMultiple, IMultipleInputCal } from "./MultipleInterface";
14
15
  import { TableColumnConfigInterface, TableConfigurationsInterface } from "./TableConfigurationsInterface";
15
16
  import { ITableSelectionInput } from "./TableSelectionInput";
@@ -19,4 +20,4 @@ import { CalculatedFieldRules } from "./calculatedFieldRules";
19
20
  import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
20
21
  import { ValidationError, ValidationOptions } from "./schema";
21
22
  import { IUserSignature } from "./userSignature";
22
- export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, ITableSelectionInput, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IMscoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IMSCOAAccount, IMscoaInputConfig, ITableScoaSelectionRow, MscoaSegmentValue, IIncludedSegmentConfig, MscoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, MscoaInterface, };
23
+ export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, ITableSelectionInput, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, IIncludedSegmentConfig, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys };
@@ -4,4 +4,4 @@ import { MinInputTypes } from "./MinimumInputRequiredInterface";
4
4
  import { CalculationFunctions } from "./calculationVariableInterface";
5
5
  export {
6
6
  ///ENUMS
7
- ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, };
7
+ ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType };
@@ -1,4 +1,5 @@
1
1
  import { MatFormFieldAppearance } from "@angular/material/form-field";
2
+ import { IIncludedSegmentConfig } from "../../formInput";
2
3
  interface conditionalInputRule {
3
4
  formControlName: string;
4
5
  label: string;
@@ -159,12 +160,7 @@ interface multipleInterface extends BasicFormInputInterface {
159
160
  showTotalsOf: Array<string>;
160
161
  groupBy: Array<string>;
161
162
  }
162
- interface IIncludedSegmentConfig {
163
- segment: string;
164
- label: string;
165
- readOnly: boolean;
166
- }
167
- interface IMscoaInputConfig {
163
+ interface IScoaInputConfig {
168
164
  inputs: IAllInputs[];
169
165
  segments: IIncludedSegmentConfig[];
170
166
  showAllSegments: boolean;
@@ -176,7 +172,7 @@ interface matrixInputInterface extends BasicFormInputInterface {
176
172
  tableConfig: TableConfigurationsInterface;
177
173
  }
178
174
  interface MscoaInput extends BasicFormInputInterface {
179
- mscoaConfig: IMscoaInputConfig;
175
+ mscoaConfig: IScoaInputConfig;
180
176
  }
181
177
  interface TableSelectionInput extends BasicFormInputInterface {
182
178
  selectUpto: number | undefined;
@@ -1,6 +1,11 @@
1
1
  import * as Joi from 'joi';
2
2
  export declare const calculatedFieldRulesSchema: Joi.ObjectSchema<any>;
3
3
  export declare function validateCalculatedFieldRules(value: any): {
4
+ error: {
5
+ message: string;
6
+ };
7
+ value: any;
8
+ } | {
4
9
  error: Joi.ValidationError | undefined;
5
10
  value: any;
6
11
  };
@@ -21,7 +21,8 @@ export const calculatedFieldRulesSchema = Joi.object({
21
21
  formControlWithFormula: Joi.string().optional()
22
22
  });
23
23
  export function validateCalculatedFieldRules(value) {
24
+ if (!value)
25
+ return { error: { message: 'value is required' }, value };
24
26
  const { error, value: validatedValue } = calculatedFieldRulesSchema.validate(value);
25
27
  return { error, value: validatedValue };
26
28
  }
27
- console.error("ffffffffffffff");
@@ -34,6 +34,7 @@ const baseFormColumnInputsSchema = Joi.object({
34
34
  [AllFormInputPrimaryKeys.Max]: Joi.alternatives().try(Joi.number(), Joi.string(), Joi.date()).optional(),
35
35
  [AllFormInputPrimaryKeys.MinLength]: Joi.number().integer().optional(),
36
36
  [AllFormInputPrimaryKeys.MaxLength]: Joi.number().integer().optional(),
37
+ [AllFormInputPrimaryKeys.LinkedSegmentId]: Joi.string().optional(),
37
38
  [AllFormInputPrimaryKeys.MscoaConfig]: MscoaInputConfigSchema.optional(),
38
39
  [AllFormInputPrimaryKeys.Value]: Joi.alternatives().try(Joi.number(), Joi.string().allow(''), Joi.boolean(), Joi.date(), Joi.object(), Joi.array().items(Joi.object())).optional(),
39
40
  [AllFormInputPrimaryKeys.DataType]: Joi.string().valid(...Object.values(InputDataTypes)).required(),
@@ -1,6 +1,6 @@
1
1
  import Joi from 'joi';
2
2
  export declare const IncludedSegmentConfigSchema: Joi.ObjectSchema<any>;
3
- export declare const MscoaInnerInputSchema: Joi.ObjectSchema<any>;
3
+ export declare const ScoaInnerInputSchema: Joi.ObjectSchema<any>;
4
4
  export declare const MscoaInputConfigSchema: Joi.ObjectSchema<any>;
5
5
  export declare function validateMscoaInputConfig(value: any): {
6
6
  error: Joi.ValidationError | undefined;
@@ -1,18 +1,21 @@
1
1
  import Joi from 'joi';
2
2
  export const IncludedSegmentConfigSchema = Joi.object({
3
- segment: Joi.string().required(),
3
+ segment: Joi.string(),
4
+ customSegment: Joi.string().optional(),
4
5
  label: Joi.string().required(),
5
6
  readOnly: Joi.boolean().required(),
6
- singleSelect: Joi.boolean().required()
7
+ singleSelect: Joi.boolean().required(),
8
+ segmentExtension: Joi.boolean().required(),
9
+ id: Joi.string().required()
7
10
  });
8
- export const MscoaInnerInputSchema = Joi.object({
11
+ export const ScoaInnerInputSchema = Joi.object({
9
12
  segment: Joi.string().required(),
10
13
  id: Joi.string().required(),
11
14
  label: Joi.string().required(),
12
15
  formControlName: Joi.string().required(),
13
16
  });
14
17
  export const MscoaInputConfigSchema = Joi.object({
15
- inputs: Joi.array().items(MscoaInnerInputSchema).required(),
18
+ inputs: Joi.array().items(ScoaInnerInputSchema).required(),
16
19
  segments: Joi.array().items(IncludedSegmentConfigSchema).min(1).required(),
17
20
  showAllSegments: Joi.boolean().required()
18
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-t-forms-types",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
5
  "keywords": [
6
6
  "typings",