mftsccs-browser 2.1.84-beta → 2.1.85-beta

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,5 +1,6 @@
1
1
  export declare class BaseUrl {
2
2
  static BASE_URL: string;
3
+ static NODE_CACHE_URL: string;
3
4
  static AI_URL: string;
4
5
  static MQTT_URL: string;
5
6
  static NODE_URL: string;
@@ -26,6 +27,7 @@ export declare class BaseUrl {
26
27
  static GetAllConceptsByTypeUrl(): string;
27
28
  static GetAllConnectionsOfConceptUrl(): string;
28
29
  static GetAllAiData(): string;
30
+ static getMyCacheServer(): string;
29
31
  static PostPrefetchConceptConnections(): string;
30
32
  static GetSuggestedConcepts(): string;
31
33
  static GetSuggestedConnections(): string;
@@ -2,17 +2,18 @@ export interface FormErrors {
2
2
  [key: string]: {} | undefined;
3
3
  }
4
4
  export interface FormFieldData {
5
+ name: string | null;
5
6
  value: string | null;
6
- fieldType: string | null;
7
- dataType: string | null;
8
- pattern: string | null;
9
- conceptType: string | null;
7
+ type?: string | null;
8
+ dataType?: string | null;
9
+ pattern?: string | null;
10
+ conceptType?: string | null;
10
11
  maxLength?: number | null;
11
12
  minLength?: number | null;
12
13
  minValue?: number | null;
13
14
  maxValue?: number | null;
14
15
  accept?: string | null;
15
16
  file?: File | null;
16
- required: boolean;
17
- isUnique: boolean;
17
+ required?: boolean;
18
+ isUnique?: boolean;
18
19
  }
@@ -8,22 +8,11 @@ export declare class Validator {
8
8
  */
9
9
  checkUniqueness(type: string, value: string): Promise<boolean>;
10
10
  /**
11
- * Validates a single form field based on its data type, constraints, and uniqueness.
12
- * @param fieldName - The name of the field being validated (e.g., "email", "phone").
13
- * @param dataType - The expected data type for the field (e.g., "text", "number").
14
- * @param value - The value of the field to validate.
15
- * @param conceptType - The concept type used for uniqueness check.
16
- * @param maxLength - The maximum allowed length for the field value.
17
- * @param minLength - The minimum allowed length for the field value.
18
- * @param minValue - The minimum allowed value for the field (for numeric fields).
19
- * @param maxValue - The maximum allowed value for the field (for numeric fields).
20
- * @param accept - The 'accept' attribute value for file inputs.
21
- * @param file - The file input (if any), used for file type validation.
22
- * @param required - Whether the field is required.
23
- * @param isUnique - Whether the field value should be unique.
24
- * @returns An object of error messages if validation fails
11
+ * Validates a single form field based on its constraints and uniqueness.
12
+ * @param options - An object containing field properties including name, value, type, and validation constraints.
13
+ * @returns An object containing validation errors if validation fails.
25
14
  */
26
- validateField(fieldName: string, fieldType: string | null, dataType: string | null, value: string | null, pattern: string | null, conceptType: string | null, maxLength: number | null, minLength: number | null, minValue: number | null, maxValue: number | null, accept: string | null, file: File | null, required: boolean, isUnique?: boolean): Promise<{
15
+ validateField(options: FormFieldData): Promise<{
27
16
  [fieldName: string]: string;
28
17
  }>;
29
18
  /**
@@ -40,22 +29,9 @@ export declare class Validator {
40
29
  [key: string]: FormFieldData;
41
30
  }): Promise<FormErrors>;
42
31
  /**
43
- *
44
- * @param fieldName
45
- * @param fieldType
46
- * @param dataType
47
- * @param value
48
- * @param pattern
49
- * @param conceptType
50
- * @param maxLength
51
- * @param minLength
52
- * @param minValue
53
- * @param maxValue
54
- * @param accept
55
- * @param file
56
- * @param required
57
- * @param isUnique
32
+ * Take field element attributes
33
+ * @param options Object conist of attributes
58
34
  * @returns Object with status and details
59
35
  */
60
- validate(fieldName: string, fieldType: string | null, dataType: string | null, value: string | null, pattern: string | null, conceptType: string | null, maxLength: number | null, minLength: number | null, minValue: number | null, maxValue: number | null, accept: string | null, file: File | null, required: boolean, isUnique?: boolean): any;
36
+ validate(options: FormFieldData): any;
61
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-browser",
3
- "version": "2.1.84-beta",
3
+ "version": "2.1.85-beta",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/main.bundle.js",