ngx-t-forms-types 0.0.4 → 0.0.6

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.
@@ -2,6 +2,6 @@ import { APIDataFetchingConfigurationInterface } from "../formInput";
2
2
  export interface FormSubmissionHandleInterface {
3
3
  innerComponentShowSubmitButton?: boolean;
4
4
  canSubmitAPI?: Array<APIDataFetchingConfigurationInterface>;
5
- submissionAPI: Array<APIDataFetchingConfigurationInterface>;
5
+ submissionAPI: Array<Array<APIDataFetchingConfigurationInterface>>;
6
6
  submissionMessage?: string;
7
7
  }
@@ -25,6 +25,7 @@ export declare enum ElementEditorTypes {
25
25
  ConfigMscoaSegments = "configMscoaSegments",
26
26
  ConfigMscoaAdditionalInputs = "configMscoaAdditionalInputs",
27
27
  MongoPipelineBuilder = "mongoPipelineBuilder",
28
+ ChipOptionsCreator = "chipOptionsCreator",
28
29
  default = "default"
29
30
  }
30
31
  export interface ElementEditorConfigInterface {
@@ -19,6 +19,7 @@ export var ElementEditorTypes;
19
19
  ElementEditorTypes["ConfigMscoaSegments"] = "configMscoaSegments";
20
20
  ElementEditorTypes["ConfigMscoaAdditionalInputs"] = "configMscoaAdditionalInputs";
21
21
  ElementEditorTypes["MongoPipelineBuilder"] = "mongoPipelineBuilder";
22
+ ElementEditorTypes["ChipOptionsCreator"] = "chipOptionsCreator";
22
23
  ElementEditorTypes["default"] = "default";
23
24
  })(ElementEditorTypes || (ElementEditorTypes = {}));
24
25
  // interface TStringExpressionValidationTest{
@@ -173,6 +173,15 @@ export var ElementConfig = {
173
173
  hint: "Configure SCOA segments to be used in the input",
174
174
  id: "ba1a5b79-b071-44a6-b39a-bf1c2fafcda5"
175
175
  },
176
+ {
177
+ name: AllFormInputPrimaryKeys.MscoaConfig,
178
+ deepBind: ['mscoaConfig', 'extensionAccountsForSegments'],
179
+ editType: ElementEditorTypes.ChipOptionsCreator,
180
+ label: 'Additional account selection options',
181
+ fetchOptions: ['mscoaConfig'],
182
+ hint: "Config scoa segments counter account options for segments",
183
+ id: "634b3c1a-f250-4b1a-8771-999b34882515"
184
+ },
176
185
  {
177
186
  name: AllFormInputPrimaryKeys.MscoaConfig,
178
187
  deepBind: ['mscoaConfig', 'inputs'],
@@ -1,5 +1,14 @@
1
1
  import { IBasicFormInput } from "./BasicFormInputInterface";
2
2
  import { ScoaInnerInput } from "./MscoaInput";
3
+ export interface IVersion {
4
+ versionNumber: number;
5
+ description: string;
6
+ updatedAt?: Date;
7
+ }
8
+ export interface IPreviousVersion {
9
+ versionNumber: number;
10
+ description: string;
11
+ }
3
12
  export interface IScoaAccount {
4
13
  _id: {
5
14
  $oid: string;
@@ -30,6 +39,8 @@ export interface IScoaAccount {
30
39
  SCOALevel: string;
31
40
  ShortDescription: string;
32
41
  VATStatus: string;
42
+ version: IVersion;
43
+ previousVersion: IPreviousVersion[];
33
44
  createdAt: {
34
45
  $date: string;
35
46
  };
@@ -67,11 +78,13 @@ export interface IIncludedSegmentConfig {
67
78
  label: string;
68
79
  readOnly: boolean;
69
80
  singleSelect: boolean;
81
+ additionalAccounts: string[];
70
82
  segmentExtension: boolean;
71
83
  id: string;
72
84
  }
73
85
  export interface IScoaInputConfig {
74
86
  inputs: ScoaInnerInput[];
87
+ extensionAccountsForSegments?: string[];
75
88
  segments: IIncludedSegmentConfig[] | undefined;
76
89
  showAllSegments: boolean;
77
90
  }
@@ -1,6 +1,7 @@
1
1
  import Joi from 'joi';
2
2
  import { FormColumnInputs } from '../interfaces/Form';
3
3
  import { ValidationError, ValidationOptions } from '../interfaces/formInput/schema';
4
+ export declare const baseFormColumnInputsSchema: Joi.ObjectSchema<any>;
4
5
  declare const formColumnInputsSchema: Joi.ObjectSchema<any>;
5
6
  declare function validateFormColumnInputs(data: FormColumnInputs): {
6
7
  key: string;
@@ -15,7 +15,7 @@ import { MatDataOptionsSchema } from './MatOptionsSchema';
15
15
  import { CalculationFunctions } from '../interfaces/formInput/calculationVariableInterface';
16
16
  import { RichTextEditorType } from '../interfaces/formInput/RichTextEditorInput';
17
17
  import { InputViewTypes } from '../interfaces/formInput/BasicFormInputInterface';
18
- const baseFormColumnInputsSchema = Joi.object({
18
+ export const baseFormColumnInputsSchema = Joi.object({
19
19
  [AllFormInputPrimaryKeys.Id]: Joi.string().optional(),
20
20
  [AllFormInputPrimaryKeys.SectionId]: Joi.string().optional(),
21
21
  [AllFormInputPrimaryKeys.Element]: Joi.string().valid(...Object.values(ElementTypes)).required(),
@@ -1,6 +1,5 @@
1
1
  import Joi from 'joi';
2
2
  export declare const IncludedSegmentConfigSchema: Joi.ObjectSchema<any>;
3
- export declare const ScoaInnerInputSchema: Joi.ObjectSchema<any>;
4
3
  export declare const MscoaInputConfigSchema: Joi.ObjectSchema<any>;
5
4
  export declare function validateMscoaInputConfig(value: any): {
6
5
  error: Joi.ValidationError | undefined;
@@ -4,19 +4,15 @@ export const IncludedSegmentConfigSchema = Joi.object({
4
4
  customSegment: Joi.string().optional(),
5
5
  label: Joi.string().required(),
6
6
  readOnly: Joi.boolean().required(),
7
+ additionalAccounts: Joi.array().items(Joi.string()).optional(),
7
8
  singleSelect: Joi.boolean().required(),
8
9
  segmentExtension: Joi.boolean().required(),
9
10
  id: Joi.string().required()
10
11
  });
11
- export const ScoaInnerInputSchema = Joi.object({
12
- segment: Joi.string().required(),
13
- id: Joi.string().required(),
14
- label: Joi.string().required(),
15
- formControlName: Joi.string().required(),
16
- });
17
12
  export const MscoaInputConfigSchema = Joi.object({
18
- inputs: Joi.array().items(ScoaInnerInputSchema).required(),
13
+ inputs: Joi.array().items(Joi.object().pattern(/./, Joi.any())).required(),
19
14
  segments: Joi.array().items(IncludedSegmentConfigSchema).min(1).required(),
15
+ extensionAccountsForSegments: Joi.array().items(Joi.string()).optional(),
20
16
  showAllSegments: Joi.boolean().required()
21
17
  });
22
18
  export function validateMscoaInputConfig(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-t-forms-types",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
5
  "keywords": [
6
6
  "typings",