mftsccs-browser 3.1.9-beta → 3.1.95-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.
Files changed (29) hide show
  1. package/dist/main.bundle.js +1 -1
  2. package/dist/main.bundle.js.LICENSE.txt +4 -0
  3. package/dist/main.bundle.js.map +1 -1
  4. package/dist/serviceWorker.bundle.js +1 -1
  5. package/dist/serviceWorker.bundle.js.LICENSE.txt +4 -0
  6. package/dist/serviceWorker.bundle.js.map +1 -1
  7. package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +3 -0
  8. package/dist/types/Api/Prototype/CreatePrototype.d.ts +2 -0
  9. package/dist/types/Constants/ckeditorCSS.d.ts +1 -0
  10. package/dist/types/DataStructures/BaseUrl.d.ts +3 -0
  11. package/dist/types/DataStructures/Concept.d.ts +1 -3
  12. package/dist/types/DataStructures/ConnectionByType/GetConnectionByType.d.ts +4 -0
  13. package/dist/types/DataStructures/Local/LocalSyncData.d.ts +0 -3
  14. package/dist/types/DataStructures/Prototype/Prototype.d.ts +12 -0
  15. package/dist/types/DataStructures/TypeLibrary.d.ts +5 -0
  16. package/dist/types/Services/DeleteConnectionByType.d.ts +7 -7
  17. package/dist/types/Services/GetTheConcept.d.ts +0 -2
  18. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +1 -2
  19. package/dist/types/Services/automated/automated-concept-connection.d.ts +3 -3
  20. package/dist/types/Validator/interface.d.ts +7 -6
  21. package/dist/types/Validator/validator.d.ts +7 -31
  22. package/dist/types/Widgets/BaseObserver.d.ts +1 -1
  23. package/dist/types/Widgets/RenderWidgetService.d.ts +19 -3
  24. package/dist/types/Widgets/WidgetTree.d.ts +2 -1
  25. package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +0 -4
  26. package/dist/types/app.d.ts +2 -1
  27. package/dist/types/prototype/getPrototype.service.d.ts +2 -0
  28. package/dist/types/prototype/prototype.service.d.ts +9 -0
  29. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ import { Connection } from "../../app";
2
+ import { GetConnectionsByTypes } from "../../DataStructures/ConnectionByType/GetConnectionByType";
3
+ export declare function GetConnectionsByApiTypes(connectionTypes: GetConnectionsByTypes): Promise<Connection[]>;
@@ -0,0 +1,2 @@
1
+ import { Prototype } from "../../DataStructures/Prototype/Prototype";
2
+ export declare function CreatePrototypeApi(prototype: Prototype): Promise<any>;
@@ -0,0 +1 @@
1
+ export declare const ckeditorCSS = "\n/* CKEditor content styles */\n.ck-content {\n /* Container styles */\n max-width: 100%;\n margin: 0 auto;\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif;\n line-height: 1.5;\n padding: 0.75rem;\n background: #fff;\n color: #333;\n border: 1px solid #ccced1;\n}\n\n/* Headings */\n.ck-content h1, .ck-content h2, .ck-content h3, \n.ck-content h4, .ck-content h5, .ck-content h6 {\n font-weight: 700;\n line-height: 1.2;\n margin: 1em 0 0.5em;\n}\n\n.ck-content h1 { font-size: 2.5em; }\n.ck-content h2 { font-size: 2em; }\n.ck-content h3 { font-size: 1.75em; }\n.ck-content h4 { font-size: 1.5em; }\n.ck-content h5 { font-size: 1.25em; }\n.ck-content h6 { font-size: 1em; }\n\n/* Paragraphs and spacing */\n.ck-content p {\n margin: 1em 0;\n line-height: 1.6;\n}\n\n/* Links */\n.ck-content a {\n color: #1a73e8;\n text-decoration: none;\n}\n\n.ck-content a:hover {\n text-decoration: underline;\n}\n\n/* Lists */\n.ck-content ul,\n.ck-content ol {\n padding-left: 2em;\n margin: 1em 0;\n}\n\n.ck-content ul {\n list-style: disc;\n}\n\n.ck-content ol {\n list-style: decimal;\n}\n\n.ck-content li {\n margin: 0.5em 0;\n}\n\n/* Blockquotes */\n.ck-content blockquote {\n margin: 1em 0;\n padding-left: 1em;\n border-left: 5px solid #ccc;\n font-style: italic;\n color: #666;\n}\n\n/* Code blocks */\n.ck-content pre {\n background: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n padding: 1em;\n margin: 1em 0;\n overflow-x: auto;\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.ck-content code {\n background: #f5f5f5;\n padding: 0.2em 0.4em;\n border-radius: 3px;\n font-size: 0.9em;\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n/* Tables */\n.ck-content table {\n border-collapse: collapse;\n width: 100%;\n margin: 1em 0;\n}\n\n.ck-content table th,\n.ck-content table td {\n border: 1px solid #ddd;\n padding: 0.75em;\n text-align: left;\n}\n\n.ck-content table th {\n background: #f5f5f5;\n font-weight: bold;\n}\n\n/* Images */\n.ck-content img {\n max-width: 100%;\n height: auto;\n margin: 1em 0;\n}\n\n.ck-content figure {\n margin: 1em 0;\n text-align: center;\n}\n\n.ck-content figure img {\n margin: 0;\n}\n\n.ck-content figcaption {\n color: #666;\n font-size: 0.9em;\n margin-top: 0.5em;\n}\n\n/* Dark mode */\n/*\n@media (prefers-color-scheme: dark) {\n .ck-content {\n background: #1a1a1a;\n color: #e0e0e0;\n }\n\n .ck-content a {\n color: #64b5f6;\n }\n\n .ck-content blockquote {\n border-left-color: #404040;\n color: #b0b0b0;\n }\n\n .ck-content pre,\n .ck-content code {\n background: #2d2d2d;\n border-color: #404040;\n }\n\n .ck-content table th,\n .ck-content table td {\n border-color: #404040;\n }\n\n .ck-content table th {\n background: #2d2d2d;\n }\n\n .ck-content figcaption {\n color: #b0b0b0;\n }\n}\n*/\n";
@@ -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;
@@ -69,4 +71,5 @@ export declare class BaseUrl {
69
71
  static getWidgetData(): string;
70
72
  static getLatestWidgetData(): string;
71
73
  static getConnectionsByTypes(): string;
74
+ static CreatePrototypeUrl(): string;
72
75
  }
@@ -11,14 +11,12 @@ export declare class Concept {
11
11
  entryTimeStamp: Date;
12
12
  referentId: number;
13
13
  updatedTimeStamp: Date;
14
+ referent: Concept | null | void;
14
15
  type: null | void | Concept;
15
16
  isNew: boolean;
16
17
  isComposition: boolean;
17
18
  isTemp: boolean;
18
19
  isSynced: boolean;
19
- referent: Concept | null | void;
20
- isPointer: boolean;
21
- pointerId: number;
22
20
  applicationId: number;
23
21
  x: number;
24
22
  y: number;
@@ -0,0 +1,4 @@
1
+ export declare class GetConnectionsByTypes {
2
+ ofTheConceptId: number;
3
+ connectionTypes: string[];
4
+ }
@@ -8,8 +8,6 @@ type syncContainer = {
8
8
  };
9
9
  export declare class LocalSyncData {
10
10
  static conceptsSyncArray: Concept[];
11
- static conceptDeleteIds: number[];
12
- static connectionDeleteIds: number[];
13
11
  static connectionSyncArray: Connection[];
14
12
  static ghostIdMap: Map<any, any>;
15
13
  static transactionCollections: syncContainer[];
@@ -19,7 +17,6 @@ export declare class LocalSyncData {
19
17
  static AddConcept(concept: Concept): void;
20
18
  static RemoveConcept(concept: Concept): void;
21
19
  static SyncDataOnline(transactionId?: string, actions?: InnerActions): Promise<any>;
22
- static CreateReferentRelationship(concepts: Concept[]): Promise<void>;
23
20
  static ConvertGhostIdsInConnections(connectionArray: Connection[]): void;
24
21
  static UpdateConceptListToIncludeRelatedConcepts(connectionArray: Connection[], conceptsArray: Concept[]): Promise<void>;
25
22
  static AddConceptIfDoesNotExist(concept: Concept, conceptList?: Concept[]): void;
@@ -0,0 +1,12 @@
1
+ import { Concept } from "../Concept";
2
+ import { Connection } from "../Connection";
3
+ export declare class Prototype {
4
+ prototype: string;
5
+ required: string[];
6
+ optional: string[];
7
+ concepts: Concept[];
8
+ connections: Connection[];
9
+ addedConcepts: Concept[];
10
+ addedConnections: Connection[];
11
+ childPrototypes: Prototype[];
12
+ }
@@ -6,3 +6,8 @@ export type TMainLibrary = {
6
6
  css: TLibrary[];
7
7
  js: TLibrary[];
8
8
  };
9
+ export type TAssistant = {
10
+ id: string;
11
+ input: string;
12
+ type: string;
13
+ };
@@ -5,13 +5,6 @@
5
5
  * @returns
6
6
  */
7
7
  export declare function DeleteConnectionByType(id: number, linker: string): Promise<any>;
8
- /**
9
- *
10
- * @param id
11
- * @param linker
12
- * @returns
13
- */
14
- export declare function DeleteConnectionsByTypeLocal(id: number, linkerStrings: string[]): Promise<any>;
15
8
  /**
16
9
  * This function returns all the connections from the ofTheConceptId and connection type
17
10
  * @param id ofTheConceptId
@@ -19,3 +12,10 @@ export declare function DeleteConnectionsByTypeLocal(id: number, linkerStrings:
19
12
  * @returns Array of connections
20
13
  */
21
14
  export declare function GetAllTheConnectionsByTypeAndOfTheConcept(id: number, linker: string, reverse?: boolean): Promise<any>;
15
+ /**
16
+ *
17
+ * @param id
18
+ * @param linker
19
+ * @returns
20
+ */
21
+ export declare function DeleteConnectionsByTypeLocal(id: number, linkerStrings: string[]): Promise<any>;
@@ -6,5 +6,3 @@ import { Concept } from "../DataStructures/Concept";
6
6
  * @returns Concept if it exists
7
7
  */
8
8
  export default function GetTheConcept(id: number, userId?: number): Promise<Concept>;
9
- export declare function getTheReferent(concept: Concept): Promise<void>;
10
- export declare function GetTheReferredId(id: number): Promise<number>;
@@ -1,4 +1,4 @@
1
- import { Concept, InnerActions } from "../../app";
1
+ import { InnerActions } from "../../app";
2
2
  /**
3
3
  * This function creates a connection for the concept connection system. This connection will only be created in real sense
4
4
  * once the data is synced using LocalSyncData.SyncDataOnline()
@@ -13,4 +13,3 @@ import { Concept, InnerActions } from "../../app";
13
13
  * @returns a connection that is created and stored in the local system.
14
14
  */
15
15
  export declare function CreateTheConnectionLocal(ofTheConceptId: number, toTheConceptId: number, typeId: number, orderId?: number, typeString?: string, userId?: number, actions?: InnerActions): Promise<any>;
16
- export declare function CreateConnection(ofTheConcept: Concept, toTheConcept: Concept, typeConcept: Concept, orderId?: number, userId?: number, actions?: InnerActions): Promise<any>;
@@ -1,7 +1,7 @@
1
- import { Concept } from "../../app";
2
- export declare function CreateData(json: any, ofConcept?: Concept | null, typeConcept?: string): Promise<any>;
1
+ import { Concept, InnerActions } from "../../app";
2
+ export declare function CreateData(json: any, ofConcept?: Concept | null, typeConcept?: string, actions?: InnerActions): Promise<any>;
3
3
  export declare function removePrefix(key: string): string;
4
4
  export declare function addPrefix(key: string): string;
5
5
  export declare function addArrayPrefix(key: string): string;
6
6
  export declare function removeArrayPrefix(key: string): string;
7
- export declare function createTypeString(typeConceptString: string, key: string): string;
7
+ export declare function createTypeString(typeConceptString: string, key: any): 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
  }
@@ -12,7 +12,7 @@ export declare class BaseObserver {
12
12
  /**
13
13
  * This is called by any data change. So that any data change will notify all the callback functions to execute.
14
14
  */
15
- notify(): void;
15
+ notify(passedData?: any): void;
16
16
  /**
17
17
  * This function is used to register the callback into the function in case of any dataChange.
18
18
  * @param callback sets this callback to the subscribers list in the widget. So that in any change we can call this callback
@@ -1,8 +1,8 @@
1
1
  import { BuilderStatefulWidget, WidgetTree } from "../app";
2
2
  export declare function renderPage(pageId: number, attachNode: HTMLElement, props?: any): Promise<void>;
3
- export declare function renderLatestWidget(widgetId: number, attachNode: HTMLElement, props?: any): Promise<void>;
4
- export declare function renderWidget(widgetId: number, attachNode: HTMLElement, props?: any): Promise<void>;
5
- export declare function materializeWidget(widgetId: number, bulkWidget: any, attachNode: HTMLElement, props?: any): Promise<void>;
3
+ export declare function renderLatestWidget(widgetId: number, attachNode: HTMLElement, props?: any): Promise<BuilderStatefulWidget | undefined>;
4
+ export declare function renderWidget(widgetId: number, attachNode: HTMLElement, props?: any): Promise<BuilderStatefulWidget | undefined>;
5
+ export declare function materializeWidget(widgetId: number, bulkWidget: any, attachNode: HTMLElement, props?: any): Promise<BuilderStatefulWidget | undefined>;
6
6
  export declare function getWidgetFromId(widgetId: number, visitedWidgets?: number[], token?: string): Promise<WidgetTree>;
7
7
  /**
8
8
  * This function builds a widget tree. This tree is built fully along with its children
@@ -29,3 +29,19 @@ export declare function convertWidgetTreeToWidget(tree: WidgetTree, parentElemen
29
29
  */
30
30
  export declare function convertWidgetTreeToWidgetWithWrapper(tree: WidgetTree, parentElement: HTMLElement, isMain?: boolean, state?: object, isInDevelopment?: boolean): Promise<BuilderStatefulWidget>;
31
31
  export declare function unwrapContainers(parentElement: HTMLElement, selector: string): Promise<void>;
32
+ /**
33
+ * Opens documentation modal
34
+ * @param widgetId
35
+ */
36
+ export declare function openDocumentationPreviewModal(widgetId: number): Promise<void>;
37
+ export declare function showWidgetDocumentation(widgetDocumentData: string): void;
38
+ /**
39
+ * Opens modal
40
+ * @param modalId
41
+ */
42
+ export declare function openModal(modalId: string): Promise<void>;
43
+ /**
44
+ * Closes modal
45
+ * @param modalId
46
+ */
47
+ export declare function closeModal(modalId: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { TMainLibrary } from "../DataStructures/TypeLibrary";
1
+ import { TAssistant, TMainLibrary } from "../DataStructures/TypeLibrary";
2
2
  import { BuilderStatefulWidget } from "./BuilderStatefulWidget";
3
3
  export declare class WidgetTree {
4
4
  id: number;
@@ -7,6 +7,7 @@ export declare class WidgetTree {
7
7
  css: string;
8
8
  js: string;
9
9
  library: TMainLibrary;
10
+ assistant: TAssistant;
10
11
  timestamp: string;
11
12
  widgetId: number;
12
13
  type: string;
@@ -41,10 +41,6 @@ export declare class DependencyObserver {
41
41
  * This function will bind the actual data to the widget or the function.
42
42
  */
43
43
  bind(): Promise<void>;
44
- /**
45
- * This function tries to fetch the data again from the backend. This can be useful if your data parameters are changed
46
- * This is helpful in re-querying mechanism like pagination.
47
- */
48
44
  update(): Promise<void>;
49
45
  /**
50
46
  *
@@ -122,9 +122,10 @@ export { DeleteUser } from './Services/DeleteConcept';
122
122
  export { AccessTracker } from './AccessTracker/accessTracker';
123
123
  export { CreateConnectionBetweenEntityLocal } from './Services/CreateConnection/CreateConnectionEntity';
124
124
  export { BuildWidgetFromId } from './Widgets/WidgetBuild';
125
- export { CreateConnection } from './Services/Local/CreateTheConnectionLocal';
126
125
  export { renderLatestWidget, renderPage, renderWidget, convertWidgetTreeToWidgetWithWrapper, getWidgetFromId, convertWidgetTreeToWidget, unwrapContainers, getWidgetBulkFromId } from './Widgets/RenderWidgetService';
127
126
  export { CreateData } from './Services/automated/automated-concept-connection';
127
+ export { Prototype } from './DataStructures/Prototype/Prototype';
128
+ export { createPrototypeLocal } from './prototype/prototype.service';
128
129
  type listeners = {
129
130
  listenerId: string | number;
130
131
  callback: any;
@@ -0,0 +1,2 @@
1
+ import { Prototype } from "../DataStructures/Prototype/Prototype";
2
+ export declare function CreatePrototype(prototype: Prototype): Promise<any>;
@@ -0,0 +1,9 @@
1
+ import { Concept, Connection } from "../app";
2
+ import { Prototype } from "../DataStructures/Prototype/Prototype";
3
+ export declare function createPrototypeLocal(prototype: Prototype): Promise<{
4
+ concepts: Concept[];
5
+ connections: Connection[];
6
+ }>;
7
+ export declare function addPrototype(type: string): Promise<any>;
8
+ export declare function CreatePrototypeConcept(prototypeConcept: Concept, typeConcept: Concept, userId: number): Promise<any>;
9
+ export declare function AddPrototypeConnections(types: string[], prototype: Concept, allConcepts: Concept[], required?: boolean): Promise<Connection[]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mftsccs-browser",
3
- "version": "3.1.9-beta",
4
- "environment": "production",
3
+ "version": "3.1.95-beta",
4
+ "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/main.bundle.js",
7
7
  "types": "dist/types/app.d.ts",