@octostar/platform-types 0.2.1 → 0.2.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.
- package/dist/docs/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/enums/SortOrder.html +3 -3
- package/dist/docs/enums/WorkspacePermissionValue.html +3 -3
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs/interfaces/ActionContext.html +4 -4
- package/dist/docs/interfaces/Colorful.html +3 -3
- package/dist/docs/interfaces/Concept.html +12 -12
- package/dist/docs/interfaces/Desktop.html +82 -80
- package/dist/docs/interfaces/DesktopActionContext.html +7 -7
- package/dist/docs/interfaces/DesktopSettings.html +5 -5
- package/dist/docs/interfaces/GetAttachmentOptions.html +5 -5
- package/dist/docs/interfaces/IDataTransfer.html +11 -11
- package/dist/docs/interfaces/Inheritance.html +5 -5
- package/dist/docs/interfaces/Ontology.html +20 -20
- package/dist/docs/interfaces/Property.html +5 -5
- package/dist/docs/interfaces/QueryObjectFilterClause.html +3 -3
- package/dist/docs/interfaces/RecordProvider.html +6 -6
- package/dist/docs/interfaces/RefObject.html +3 -3
- package/dist/docs/interfaces/Relationship.html +20 -20
- package/dist/docs/interfaces/SearchProps.html +4 -4
- package/dist/docs/interfaces/SearchXperienceModalProps.html +9 -9
- package/dist/docs/interfaces/SearchXperienceProps.html +7 -7
- package/dist/docs/interfaces/SemanticBindingProps.html +9 -0
- package/dist/docs/interfaces/StylerContext.html +11 -11
- package/dist/docs/interfaces/TagAttributes.html +7 -7
- package/dist/docs/interfaces/WorkspaceChangeEmitter.html +5 -5
- package/dist/docs/interfaces/WorkspaceItemConfig.html +6 -6
- package/dist/docs/interfaces/WorkspaceRecordIdentifier.html +5 -5
- package/dist/docs/modules.html +9 -2
- package/dist/docs/types/ActionHandler.html +2 -2
- package/dist/docs/types/AddCommentParams.html +2 -2
- package/dist/docs/types/AddListener.html +2 -2
- package/dist/docs/types/ApiErrorResult.html +2 -2
- package/dist/docs/types/ApiResult.html +2 -2
- package/dist/docs/types/ApiSuccessResult.html +2 -2
- package/dist/docs/types/App.html +2 -2
- package/dist/docs/types/AppRegistry.html +2 -2
- package/dist/docs/types/AppServiceCallOptions.html +2 -2
- package/dist/docs/types/AppServiceCallProps.html +2 -2
- package/dist/docs/types/AsyncFilter.html +2 -2
- package/dist/docs/types/AttachmentResponseType.html +2 -2
- package/dist/docs/types/AttachmentType.html +2 -2
- package/dist/docs/types/Behaviour.html +2 -2
- package/dist/docs/types/BinaryOperator.html +2 -2
- package/dist/docs/types/Callback.html +2 -2
- package/dist/docs/types/CommentWorkspaceItem.html +2 -2
- package/dist/docs/types/Comparator.html +2 -2
- package/dist/docs/types/ConceptFilter.html +3 -3
- package/dist/docs/types/ConceptMap.html +2 -2
- package/dist/docs/types/ConceptName.html +1 -0
- package/dist/docs/types/ConceptWithParents.html +2 -2
- package/dist/docs/types/ConnectedEntity.html +2 -2
- package/dist/docs/types/ContextMenuGroup.html +2 -2
- package/dist/docs/types/ContextMenuLabels.html +2 -2
- package/dist/docs/types/ContextMenuOptions.html +2 -2
- package/dist/docs/types/ContextMenuParams.html +2 -2
- package/dist/docs/types/ContextMenuRequest.html +2 -2
- package/dist/docs/types/CopyOptions.html +2 -2
- package/dist/docs/types/CreateEntityFormProps.html +2 -2
- package/dist/docs/types/CreateRelationsDialogProps.html +2 -2
- package/dist/docs/types/CustomEventListener.html +2 -2
- package/dist/docs/types/CustomTemplate.html +2 -2
- package/dist/docs/types/CustomTemplateIframeProps.html +2 -2
- package/dist/docs/types/DataContextType.html +12 -0
- package/dist/docs/types/DesktopAction.html +2 -2
- package/dist/docs/types/DesktopActionFilter.html +2 -2
- package/dist/docs/types/DesktopActionMenuItem.html +2 -2
- package/dist/docs/types/DesktopActionMenuItemGroup.html +2 -2
- package/dist/docs/types/DesktopActionOptions.html +3 -2
- package/dist/docs/types/DesktopOpenParams.html +2 -2
- package/dist/docs/types/DesktopStylerContext.html +2 -2
- package/dist/docs/types/DraftWorkspaceItem.html +2 -2
- package/dist/docs/types/DragEndParams.html +2 -2
- package/dist/docs/types/DragStartParams.html +2 -2
- package/dist/docs/types/EConnection.html +2 -2
- package/dist/docs/types/EdgeSpec.html +2 -2
- package/dist/docs/types/EmitEventTransformDefinition.html +2 -2
- package/dist/docs/types/Entity.html +2 -2
- package/dist/docs/types/EntityEdge.html +2 -2
- package/dist/docs/types/EntityOTM.html +2 -2
- package/dist/docs/types/EntityPasteContext.html +2 -2
- package/dist/docs/types/EventContextType.html +2 -2
- package/dist/docs/types/EventEmitterType.html +2 -2
- package/dist/docs/types/EventName.html +2 -2
- package/dist/docs/types/EventProducer.html +2 -2
- package/dist/docs/types/EventPublisher.html +2 -2
- package/dist/docs/types/EventSubscriber.html +2 -2
- package/dist/docs/types/EventUnsubscriber.html +2 -2
- package/dist/docs/types/ExportOptions.html +2 -2
- package/dist/docs/types/ExtractEntitiesOptions.html +2 -2
- package/dist/docs/types/FileCode.html +2 -2
- package/dist/docs/types/FileTreeOptions.html +2 -2
- package/dist/docs/types/FilterDefinition.html +2 -2
- package/dist/docs/types/FilterDefinitions.html +2 -2
- package/dist/docs/types/FilterName.html +2 -2
- package/dist/docs/types/FilterReference.html +2 -2
- package/dist/docs/types/FocusListItem.html +2 -2
- package/dist/docs/types/FolderPasteOptions.html +2 -2
- package/dist/docs/types/GraphDataSpec.html +1 -0
- package/dist/docs/types/GraphSpec.html +2 -2
- package/dist/docs/types/HttpTransformDefinition.html +2 -2
- package/dist/docs/types/Icon.html +2 -2
- package/dist/docs/types/IconProps.html +2 -2
- package/dist/docs/types/IframeTransformDefinition.html +2 -2
- package/dist/docs/types/ImageInfo.html +2 -2
- package/dist/docs/types/ImportZipOptions.html +2 -2
- package/dist/docs/types/InlineCode.html +2 -2
- package/dist/docs/types/JavascriptFileStylerDefinition.html +2 -2
- package/dist/docs/types/JavascriptFileTransformDefinition.html +2 -2
- package/dist/docs/types/JavascriptFilterDefinition.html +2 -2
- package/dist/docs/types/JavascriptInlineStylerDefinition.html +2 -2
- package/dist/docs/types/JavascriptInlineTransformDefinition.html +2 -2
- package/dist/docs/types/JavascriptType.html +2 -2
- package/dist/docs/types/JobManifest.html +2 -2
- package/dist/docs/types/KnownCounts.html +2 -2
- package/dist/docs/types/ModalTemplateProps.html +2 -2
- package/dist/docs/types/NamedEntityGroup.html +2 -2
- package/dist/docs/types/NunjucksFileTransformDefinition.html +2 -2
- package/dist/docs/types/NunjucksInlineTransformDefinition.html +2 -2
- package/dist/docs/types/NunjucksType.html +2 -2
- package/dist/docs/types/OS_CONFIRM_MODAL_RESPONSE.html +2 -2
- package/dist/docs/types/OntologyTags.html +2 -2
- package/dist/docs/types/OsAuditFields.html +2 -2
- package/dist/docs/types/OsConfirmProps.html +2 -2
- package/dist/docs/types/OsNotification.html +2 -2
- package/dist/docs/types/OsProgress.html +2 -2
- package/dist/docs/types/OsTag.html +2 -2
- package/dist/docs/types/OsWorkspaceEntity.html +2 -2
- package/dist/docs/types/OsWorkspacePickerProps.html +2 -2
- package/dist/docs/types/PasteContextOptions.html +2 -2
- package/dist/docs/types/Permission.html +4 -3
- package/dist/docs/types/Point.html +2 -2
- package/dist/docs/types/ProvidedFilterDefinition.html +2 -2
- package/dist/docs/types/ProvidedTransformDefinition.html +2 -2
- package/dist/docs/types/PythonFileStylerDefinition.html +2 -2
- package/dist/docs/types/PythonFileTransformDefinition.html +2 -2
- package/dist/docs/types/PythonFilterDefinition.html +2 -2
- package/dist/docs/types/PythonInlineStylerDefinition.html +2 -2
- package/dist/docs/types/PythonInlineTransformDefinition.html +2 -2
- package/dist/docs/types/PythonType.html +2 -2
- package/dist/docs/types/Query.html +2 -2
- package/dist/docs/types/QueryBatchResult.html +2 -2
- package/dist/docs/types/QueryErrorResult.html +2 -2
- package/dist/docs/types/QueryExecutor.html +2 -2
- package/dist/docs/types/QueryResponse.html +2 -2
- package/dist/docs/types/QueryResult.html +2 -2
- package/dist/docs/types/QuerySuccessResult.html +2 -2
- package/dist/docs/types/ReactCssProperties.html +2 -2
- package/dist/docs/types/ReactNode.html +2 -2
- package/dist/docs/types/ReactRef.html +2 -2
- package/dist/docs/types/ReasonedBoolean.html +2 -2
- package/dist/docs/types/RefCallback.html +2 -2
- package/dist/docs/types/RelationshipCountResult.html +2 -2
- package/dist/docs/types/SaveAsModalProps.html +2 -2
- package/dist/docs/types/SaveFileOptions.html +2 -2
- package/dist/docs/types/SaveOptions.html +2 -2
- package/dist/docs/types/SavedTemplate.html +2 -2
- package/dist/docs/types/SemanticBinding.html +5 -0
- package/dist/docs/types/SemanticBindingType.html +2 -2
- package/dist/docs/types/SemanticBindings.html +2 -2
- package/dist/docs/types/SemanticallyBoundApp.html +3 -0
- package/dist/docs/types/SemanticallyBoundFilterDefinition.html +2 -2
- package/dist/docs/types/SendQueryOptions.html +2 -2
- package/dist/docs/types/ServiceDefinition.html +2 -2
- package/dist/docs/types/ServiceDefinitions.html +2 -2
- package/dist/docs/types/ServiceRole.html +2 -2
- package/dist/docs/types/ShowOntology.html +2 -2
- package/dist/docs/types/ShowTabProps.html +2 -2
- package/dist/docs/types/Styler.html +2 -2
- package/dist/docs/types/StylerConfig.html +2 -2
- package/dist/docs/types/StylerDefinition.html +2 -2
- package/dist/docs/types/StylerDefinitions.html +2 -2
- package/dist/docs/types/StylerOption.html +2 -2
- package/dist/docs/types/StylerProducer.html +2 -2
- package/dist/docs/types/Tag.html +2 -2
- package/dist/docs/types/TagInfo.html +2 -2
- package/dist/docs/types/TagWithRelationship.html +2 -2
- package/dist/docs/types/TaskCleanupReason.html +2 -2
- package/dist/docs/types/TemplateMetadata.html +4 -3
- package/dist/docs/types/TemplateType.html +2 -2
- package/dist/docs/types/TemplateVariant.html +2 -2
- package/dist/docs/types/TransformAction.html +2 -2
- package/dist/docs/types/TransformActionContext.html +2 -2
- package/dist/docs/types/TransformDefinition.html +2 -2
- package/dist/docs/types/TransformDefinitions.html +2 -2
- package/dist/docs/types/Unsubscribe.html +2 -2
- package/dist/docs/types/UserProfile.html +2 -2
- package/dist/docs/types/Watcher.html +2 -2
- package/dist/docs/types/Whoami.html +3 -2
- package/dist/docs/types/WithProgressBarOptions.html +2 -2
- package/dist/docs/types/Workspace.html +3 -3
- package/dist/docs/types/WorkspaceFlags.html +2 -0
- package/dist/docs/types/WorkspaceIdentifier.html +2 -2
- package/dist/docs/types/WorkspaceItem.html +2 -2
- package/dist/docs/types/WorkspaceItemBase.html +2 -2
- package/dist/docs/types/WorkspaceItemIdentifier.html +2 -2
- package/dist/docs/types/WorkspaceItemModel.html +7 -4
- package/dist/docs/types/WorkspaceItemTitleProps.html +2 -2
- package/dist/docs/types/WorkspaceItems.html +2 -2
- package/dist/docs/types/WorkspacePermission.html +2 -2
- package/dist/docs/types/WorkspaceRecord.html +2 -2
- package/dist/docs/types/WorkspaceRecordInfo.html +2 -2
- package/dist/docs/types/WorkspaceRecordWithRelationships.html +2 -2
- package/dist/docs/types/WorkspaceRecords.html +2 -2
- package/dist/docs/types/WorkspaceRelationship.html +2 -2
- package/dist/docs/types/WorkspaceSettings.html +2 -2
- package/dist/docs/types/trigger.html +2 -2
- package/dist/docs/types/uuid.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_CANCEL.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_NO.html +2 -2
- package/dist/docs/variables/OS_CONFIRM_MODAL_YES.html +2 -2
- package/dist/platform-types.d.ts +127 -8
- package/lib/action.d.ts +130 -0
- package/lib/action.d.ts.map +1 -0
- package/lib/action.js +2 -0
- package/lib/action.js.map +1 -0
- package/lib/api.d.ts +30 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +2 -0
- package/lib/api.js.map +1 -0
- package/lib/app.d.ts +65 -0
- package/lib/app.d.ts.map +1 -0
- package/lib/app.js +2 -0
- package/lib/app.js.map +1 -0
- package/lib/behaviour.d.ts +45 -0
- package/lib/behaviour.d.ts.map +1 -0
- package/lib/behaviour.js +14 -0
- package/lib/behaviour.js.map +1 -0
- package/lib/callback.d.ts +22 -0
- package/lib/callback.d.ts.map +1 -0
- package/lib/callback.js +2 -0
- package/lib/callback.js.map +1 -0
- package/lib/desktop.d.ts +1112 -0
- package/lib/desktop.d.ts.map +1 -0
- package/lib/desktop.js +16 -0
- package/lib/desktop.js.map +1 -0
- package/lib/event.d.ts +90 -0
- package/lib/event.d.ts.map +1 -0
- package/lib/event.js +2 -0
- package/lib/event.js.map +1 -0
- package/lib/filters.d.ts +49 -0
- package/lib/filters.d.ts.map +1 -0
- package/lib/filters.js +2 -0
- package/lib/filters.js.map +1 -0
- package/lib/graph.d.ts +107 -0
- package/lib/graph.d.ts.map +1 -0
- package/lib/graph.js +2 -0
- package/lib/graph.js.map +1 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/jobManifestTypes.d.ts +272 -0
- package/lib/jobManifestTypes.d.ts.map +1 -0
- package/lib/jobManifestTypes.js +2 -0
- package/lib/jobManifestTypes.js.map +1 -0
- package/lib/model.d.ts +660 -0
- package/lib/model.d.ts.map +1 -0
- package/lib/model.js +11 -0
- package/lib/model.js.map +1 -0
- package/lib/ontology.d.ts +176 -0
- package/lib/ontology.d.ts.map +1 -0
- package/lib/ontology.js +2 -0
- package/lib/ontology.js.map +1 -0
- package/lib/query.d.ts +70 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +2 -0
- package/lib/query.js.map +1 -0
- package/lib/react-types.d.ts +31 -0
- package/lib/react-types.d.ts.map +1 -0
- package/lib/react-types.js +2 -0
- package/lib/react-types.js.map +1 -0
- package/lib/search.d.ts +49 -0
- package/lib/search.d.ts.map +1 -0
- package/lib/search.js +2 -0
- package/lib/search.js.map +1 -0
- package/lib/semantic.d.ts +40 -0
- package/lib/semantic.d.ts.map +1 -0
- package/lib/semantic.js +2 -0
- package/lib/semantic.js.map +1 -0
- package/lib/styling.d.ts +87 -0
- package/lib/styling.d.ts.map +1 -0
- package/lib/styling.js +2 -0
- package/lib/styling.js.map +1 -0
- package/lib/templates.d.ts +110 -0
- package/lib/templates.d.ts.map +1 -0
- package/lib/templates.js +2 -0
- package/lib/templates.js.map +1 -0
- package/lib/user.d.ts +15 -0
- package/lib/user.d.ts.map +1 -0
- package/lib/user.js +2 -0
- package/lib/user.js.map +1 -0
- package/lib/workspace.d.ts +193 -0
- package/lib/workspace.d.ts.map +1 -0
- package/lib/workspace.js +12 -0
- package/lib/workspace.js.map +1 -0
- package/package.json +13 -12
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Callback, Unsubscribe } from './callback';
|
|
2
|
+
import { Concept, Entity, Inheritance, Relationship, WorkspaceItem, WorkspaceRelationship } from './model';
|
|
3
|
+
import { QueryResponse, SendQueryOptions } from './query';
|
|
4
|
+
/**
|
|
5
|
+
* @beta
|
|
6
|
+
* Type representing the result of a relationship count operation.
|
|
7
|
+
*/
|
|
8
|
+
export type RelationshipCountResult = {
|
|
9
|
+
/** The count of the relationships. */
|
|
10
|
+
count: number;
|
|
11
|
+
/** Whether the count is expired. */
|
|
12
|
+
expired?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @beta
|
|
16
|
+
* Interface representing ontology operations.
|
|
17
|
+
*/
|
|
18
|
+
export interface Ontology {
|
|
19
|
+
/**
|
|
20
|
+
* Cancels queries in the given context.
|
|
21
|
+
* @param context - The context in which to cancel queries.
|
|
22
|
+
* @returns A promise that resolves when the operation is complete.
|
|
23
|
+
*/
|
|
24
|
+
cancelQueries: (context: string) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the available ontologies.
|
|
27
|
+
* @returns A promise that resolves to an array of available ontology names.
|
|
28
|
+
*/
|
|
29
|
+
getAvailableOntologies: () => Promise<string[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Gets workspace relationship records for a given entity and relationship.
|
|
32
|
+
* @param entity - The entity for which to get relationship records.
|
|
33
|
+
* @param rel - The relationship or relationship name.
|
|
34
|
+
* @returns A promise that resolves to an array of workspace relationships.
|
|
35
|
+
*/
|
|
36
|
+
getWorkspaceRelationshipRecords(entity: Entity, rel: string | Relationship): Promise<WorkspaceRelationship[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Clears the relationship cache for a given entity and relationship.
|
|
39
|
+
* @param entity - The entity for which to clear the cache.
|
|
40
|
+
* @param relationship - The relationship or relationship name.
|
|
41
|
+
* @param inverse - Whether to clear the inverse relationship cache.
|
|
42
|
+
* @returns A promise that resolves when the operation is complete.
|
|
43
|
+
*/
|
|
44
|
+
clearRelationshipCache: (entity: Entity, relationship: Relationship | string, inverse?: boolean) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Gets connected entities for a given entity and relationship.
|
|
47
|
+
* @param entity - The entity for which to get connected entities.
|
|
48
|
+
* @param relationship - The relationship or relationship name.
|
|
49
|
+
* @param forceRefresh - Whether to force a refresh of the data.
|
|
50
|
+
* @returns A promise that resolves to an array of connected entities.
|
|
51
|
+
*/
|
|
52
|
+
getConnectedEntities: <T extends Entity>(entity: Entity, relationship: Relationship | string, forceRefresh?: boolean) => Promise<T[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Gets a concept by its name.
|
|
55
|
+
* @param conceptName - The name of the concept.
|
|
56
|
+
* @returns A promise that resolves to the concept or undefined if not found.
|
|
57
|
+
*/
|
|
58
|
+
getConceptByName: (conceptName: string) => Promise<Concept | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Gets all concepts.
|
|
61
|
+
* @returns A promise that resolves to a map of concept names to concepts.
|
|
62
|
+
*/
|
|
63
|
+
getConcepts: () => Promise<Map<string, Concept>>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets an entity.
|
|
66
|
+
* @param e - The entity to get.
|
|
67
|
+
* @param refresh - Whether to refresh the data.
|
|
68
|
+
* @param skipSideEffects - Whether to skip side effects.
|
|
69
|
+
* @returns A promise that resolves to the entity.
|
|
70
|
+
*/
|
|
71
|
+
getEntity: <T extends Entity>(e: Entity, refresh?: boolean, skipSideEffects?: boolean) => Promise<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Gets the name of the ontology.
|
|
74
|
+
* @returns A promise that resolves to the name of the ontology.
|
|
75
|
+
*/
|
|
76
|
+
getOntologyName: () => Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Gets the relationship count for a given entity and relationship.
|
|
79
|
+
* @param entity - The entity for which to get the relationship count.
|
|
80
|
+
* @param rel - The relationship or relationship name.
|
|
81
|
+
* @param forceRefresh - Whether to force a refresh of the data.
|
|
82
|
+
* @returns A promise that resolves to the relationship count result.
|
|
83
|
+
*/
|
|
84
|
+
getRelationshipCount: (entity: Entity, rel: Relationship | string, forceRefresh?: boolean) => Promise<RelationshipCountResult>;
|
|
85
|
+
/**
|
|
86
|
+
* Gets the concept for a given entity.
|
|
87
|
+
* @param entity - The entity for which to get the concept.
|
|
88
|
+
* @returns A promise that resolves to the concept or undefined if not found.
|
|
89
|
+
*/
|
|
90
|
+
getConceptForEntity: (entity: Entity) => Promise<Concept | undefined>;
|
|
91
|
+
/**
|
|
92
|
+
* Gets the relationships for a given entity.
|
|
93
|
+
* @param entity - The entity for which to get relationships.
|
|
94
|
+
* @returns A promise that resolves to an array of relationships.
|
|
95
|
+
*/
|
|
96
|
+
getRelationshipsForEntity: (entity: Entity) => Promise<Relationship[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Sends a query.
|
|
99
|
+
* @param query - The query string.
|
|
100
|
+
* @param options - Optional options for sending the query.
|
|
101
|
+
* @returns A promise that resolves to the query response.
|
|
102
|
+
*/
|
|
103
|
+
sendQuery: (query: string, options?: SendQueryOptions) => Promise<QueryResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Sends a query with a typed response.
|
|
106
|
+
* @param query - The query string.
|
|
107
|
+
* @param options - Optional options for sending the query.
|
|
108
|
+
* @param force_refresh - Whether to force a refresh of the data.
|
|
109
|
+
* @returns A promise that resolves to an array of results.
|
|
110
|
+
*/
|
|
111
|
+
sendQueryT: <T>(query: string, options?: SendQueryOptions, force_refresh?: boolean) => Promise<T[]>;
|
|
112
|
+
/**
|
|
113
|
+
* Gets the system inheritance.
|
|
114
|
+
* @returns A promise that resolves to an array of inheritances.
|
|
115
|
+
*/
|
|
116
|
+
getSysInheritance(): Promise<Inheritance[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Subscribes to changes for a given entity.
|
|
119
|
+
* @param entity - The entity to subscribe to.
|
|
120
|
+
* @param callback - The callback to invoke on changes.
|
|
121
|
+
* @returns A promise that resolves to an unsubscribe function.
|
|
122
|
+
*/
|
|
123
|
+
subscribe: <T>(entity: Entity, callback: Callback<T>) => Promise<Unsubscribe>;
|
|
124
|
+
/**
|
|
125
|
+
* Generates a consistent UUID.
|
|
126
|
+
* @param name - The name for which to generate the UUID.
|
|
127
|
+
* @param namespace - Optional namespace for the UUID.
|
|
128
|
+
* @returns A promise that resolves to the UUID.
|
|
129
|
+
*/
|
|
130
|
+
consistentUUID: (name: string, namespace?: string) => Promise<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Updates the cache with the given entities.
|
|
133
|
+
* @param entities - The entities to update in the cache.
|
|
134
|
+
* @returns A promise that resolves to the updated entities.
|
|
135
|
+
*/
|
|
136
|
+
updateCache: (entities: (Entity & WorkspaceItem)[]) => Promise<(Entity & WorkspaceItem)[]>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @beta
|
|
140
|
+
* Type representing the details of an ontology to be shown.
|
|
141
|
+
*/
|
|
142
|
+
export type ShowOntology = {
|
|
143
|
+
/** The concept of the ontology. */
|
|
144
|
+
concept: string;
|
|
145
|
+
/** The properties of the ontology. */
|
|
146
|
+
properties: string | undefined;
|
|
147
|
+
/** The primary keys of the ontology. */
|
|
148
|
+
primary_keys: string | undefined;
|
|
149
|
+
/** The label keys of the ontology. */
|
|
150
|
+
label_keys: string | undefined;
|
|
151
|
+
/** The inheritance of the ontology. */
|
|
152
|
+
inheritance: string | undefined;
|
|
153
|
+
/** The inheritance level of the ontology. */
|
|
154
|
+
inheritance_level: number;
|
|
155
|
+
/** The query associated with the ontology. */
|
|
156
|
+
query: string | undefined;
|
|
157
|
+
/** The description of the ontology. */
|
|
158
|
+
description: string | undefined;
|
|
159
|
+
/** The JSON representation of the query. */
|
|
160
|
+
query_json: string | undefined;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* @beta
|
|
164
|
+
* Type representing tags associated with an ontology.
|
|
165
|
+
*/
|
|
166
|
+
export type OntologyTags = {
|
|
167
|
+
/** The target type of the tag. */
|
|
168
|
+
target_type: string;
|
|
169
|
+
/** The target name of the tag. */
|
|
170
|
+
target_name: string;
|
|
171
|
+
/** The name of the tag. */
|
|
172
|
+
tag_name: string;
|
|
173
|
+
/** The value of the tag. */
|
|
174
|
+
tag_value: string;
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=ontology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../src/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,YAAY,EACZ,aAAa,EACb,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;;OAGG;IACH,sBAAsB,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W,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,6CAA6C;IAC7C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,uCAAuC;IACvC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,4CAA4C;IAC5C,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/lib/ontology.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ontology.js","sourceRoot":"","sources":["../src/ontology.ts"],"names":[],"mappings":""}
|
package/lib/query.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ApiResult } from './api';
|
|
2
|
+
/**
|
|
3
|
+
* @beta
|
|
4
|
+
* Type representing a successful query result.
|
|
5
|
+
* @template T - The type of the data returned.
|
|
6
|
+
*/
|
|
7
|
+
export type QuerySuccessResult<T> = {
|
|
8
|
+
/** The status of the query result, always 'success' for this type. */
|
|
9
|
+
status: 'success';
|
|
10
|
+
/** The data returned by the query. */
|
|
11
|
+
data: T[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @beta
|
|
15
|
+
* Type representing an error query result.
|
|
16
|
+
*/
|
|
17
|
+
export type QueryErrorResult = {
|
|
18
|
+
/** The status of the query result, always 'error' for this type. */
|
|
19
|
+
status: 'error';
|
|
20
|
+
/** The error message or data. */
|
|
21
|
+
data: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @beta
|
|
25
|
+
* Type representing a batch query result, which includes a query ID.
|
|
26
|
+
* @template T - The type of the data returned in case of success.
|
|
27
|
+
*/
|
|
28
|
+
export type QueryBatchResult<T> = (QuerySuccessResult<T> | QueryErrorResult) & {
|
|
29
|
+
/** The ID of the query. */
|
|
30
|
+
query_id: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @beta
|
|
34
|
+
* Type representing a query response, which is an array of any type.
|
|
35
|
+
*/
|
|
36
|
+
export type QueryResponse = any[];
|
|
37
|
+
/**
|
|
38
|
+
* @beta
|
|
39
|
+
* Options for sending a query.
|
|
40
|
+
*/
|
|
41
|
+
export type SendQueryOptions = {
|
|
42
|
+
/** The context in which to send the query. */
|
|
43
|
+
context?: string;
|
|
44
|
+
/** Whether to send the query with low priority. */
|
|
45
|
+
lowPriority?: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @beta
|
|
49
|
+
* Type representing a query, which can be a string or a function returning a promise.
|
|
50
|
+
*/
|
|
51
|
+
export type Query = string | (() => Promise<string | string[] | undefined>);
|
|
52
|
+
/**
|
|
53
|
+
* @beta
|
|
54
|
+
* Interface representing a query executor.
|
|
55
|
+
*/
|
|
56
|
+
export type QueryExecutor = {
|
|
57
|
+
/**
|
|
58
|
+
* Sends a query.
|
|
59
|
+
* @param query - The query to send.
|
|
60
|
+
* @param options - Optional options for sending the query.
|
|
61
|
+
* @returns A promise that resolves to the query response.
|
|
62
|
+
*/
|
|
63
|
+
sendQuery: (query: Query, options?: SendQueryOptions) => Promise<QueryResponse>;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @beta
|
|
67
|
+
* Type representing a query result, which is an API result containing an array of any type.
|
|
68
|
+
*/
|
|
69
|
+
export type QueryResult = ApiResult<any[]>;
|
|
70
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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ourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Properties } from 'csstype';
|
|
2
|
+
/**
|
|
3
|
+
* @beta
|
|
4
|
+
* Type representing a React component.
|
|
5
|
+
*/
|
|
6
|
+
export interface RefObject<T> {
|
|
7
|
+
readonly current: T | null;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @beta
|
|
11
|
+
* Type representing a React ref callback.
|
|
12
|
+
*/
|
|
13
|
+
export type RefCallback<T> = {
|
|
14
|
+
bivarianceHack(instance: T | null): void;
|
|
15
|
+
}['bivarianceHack'];
|
|
16
|
+
/**
|
|
17
|
+
* @beta
|
|
18
|
+
* Type representing a React ref.
|
|
19
|
+
*/
|
|
20
|
+
export type ReactRef<T> = RefCallback<T> | RefObject<T> | null;
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* Type representing a React CSS properties object.
|
|
24
|
+
*/
|
|
25
|
+
export type ReactCssProperties = Properties<string | number>;
|
|
26
|
+
/**
|
|
27
|
+
* Represents a React node.
|
|
28
|
+
* @beta
|
|
29
|
+
*/
|
|
30
|
+
export type ReactNode = any;
|
|
31
|
+
//# sourceMappingURL=react-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-types.d.ts","sourceRoot":"","sources":["../src/react-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1C,CAAC,gBAAgB,CAAC,CAAC;AAEpB;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-types.js","sourceRoot":"","sources":["../src/react-types.ts"],"names":[],"mappings":""}
|
package/lib/search.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Entity } from './model';
|
|
2
|
+
/**
|
|
3
|
+
* @beta
|
|
4
|
+
* Interface representing the properties for the SearchXperience component.
|
|
5
|
+
*/
|
|
6
|
+
export interface SearchXperienceProps {
|
|
7
|
+
/** The title of the search experience. */
|
|
8
|
+
title?: string | undefined;
|
|
9
|
+
/** The default concepts for the search experience. */
|
|
10
|
+
defaultConcept?: string[] | undefined;
|
|
11
|
+
/** Whether to disable the concept selector. */
|
|
12
|
+
disableConceptSelector?: boolean | undefined;
|
|
13
|
+
/** The task ID associated with the search experience. */
|
|
14
|
+
taskID?: string;
|
|
15
|
+
/** The default search fields for the search experience. */
|
|
16
|
+
defaultSearchFields?: {
|
|
17
|
+
entity_label?: string;
|
|
18
|
+
os_textsearchfield?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* Interface representing the properties for the SearchXperienceModal component, extending SearchXperienceProps.
|
|
24
|
+
*/
|
|
25
|
+
export interface SearchXperienceModalProps extends SearchXperienceProps {
|
|
26
|
+
/** Whether the modal is open. */
|
|
27
|
+
open?: boolean | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Callback function to be called when the modal is closed.
|
|
30
|
+
* @param entities - The entities selected in the search experience.
|
|
31
|
+
* @returns A void or undefined.
|
|
32
|
+
*/
|
|
33
|
+
onClose: (entities: Entity[]) => void | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @beta
|
|
37
|
+
* Interface representing the properties for the Search component.
|
|
38
|
+
*/
|
|
39
|
+
export interface SearchProps {
|
|
40
|
+
/**
|
|
41
|
+
* the query string to search for.
|
|
42
|
+
*/
|
|
43
|
+
q?: string;
|
|
44
|
+
/**
|
|
45
|
+
* the label for the submit button.
|
|
46
|
+
*/
|
|
47
|
+
submitButtonLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACtC,+CAA+C;IAC/C,sBAAsB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7C,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9E;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE,iCAAiC;IACjC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,SAAS,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
|
package/lib/search.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ConceptName } from './model';
|
|
2
|
+
/**
|
|
3
|
+
* @beta
|
|
4
|
+
* Type representing the properties for a template binding.
|
|
5
|
+
*/
|
|
6
|
+
export interface SemanticBindingProps {
|
|
7
|
+
/** The concept to which the binding applies */
|
|
8
|
+
concept: string;
|
|
9
|
+
/** The priority for the template, lower value means higher priority */
|
|
10
|
+
priority?: number;
|
|
11
|
+
/** Whether the result should be shown in large mode by default */
|
|
12
|
+
maximized?: boolean;
|
|
13
|
+
/** Other properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @beta
|
|
18
|
+
* Type representing a semantic binding type.
|
|
19
|
+
*/
|
|
20
|
+
export type SemanticBindingType = 'record_viewer' | string;
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* Type representing a template binding.
|
|
24
|
+
*/
|
|
25
|
+
export type SemanticBinding = {
|
|
26
|
+
/** The concept to which the binding applies */
|
|
27
|
+
concept: ConceptName;
|
|
28
|
+
/** the role for which the binding applies */
|
|
29
|
+
role?: SemanticBindingType;
|
|
30
|
+
/** The actual binding properties */
|
|
31
|
+
props?: SemanticBindingProps;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @beta
|
|
35
|
+
* Type representing multiple semantic bindings.
|
|
36
|
+
*/
|
|
37
|
+
export type SemanticBindings = {
|
|
38
|
+
[k in SemanticBindingType]: (ConceptName | SemanticBinding)[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=semantic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../src/semantic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,MAAM,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,+CAA+C;IAC/C,OAAO,EAAE,WAAW,CAAC;IACrB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,oCAAoC;IACpC,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;KAC5B,CAAC,IAAI,mBAAmB,GAAG,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE;CAC9D,CAAC"}
|
package/lib/semantic.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.js","sourceRoot":"","sources":["../src/semantic.ts"],"names":[],"mappings":""}
|
package/lib/styling.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Desktop } from './desktop';
|
|
2
|
+
import { EventEmitterType } from './event';
|
|
3
|
+
import { EdgeSpec, GraphSpec } from './graph';
|
|
4
|
+
import { Entity } from './model';
|
|
5
|
+
import { Ontology } from './ontology';
|
|
6
|
+
type TODO = any;
|
|
7
|
+
/**
|
|
8
|
+
* @beta
|
|
9
|
+
* Type representing a styler with methods for getting G6 node and edge styles.
|
|
10
|
+
*/
|
|
11
|
+
export type Styler = {
|
|
12
|
+
/**
|
|
13
|
+
* Gets the style for a G6 node.
|
|
14
|
+
* @param e - The entity for which to get the node style.
|
|
15
|
+
* @param curr - The current style.
|
|
16
|
+
* @returns A promise that resolves to the new style.
|
|
17
|
+
*/
|
|
18
|
+
getG6NodeStyle?: (e: Entity, curr: TODO) => Promise<TODO>;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the style for a G6 edge.
|
|
21
|
+
* @param e - The edge specification for which to get the edge style.
|
|
22
|
+
* @param curr - The current style.
|
|
23
|
+
* @returns A promise that resolves to the new style.
|
|
24
|
+
*/
|
|
25
|
+
getG6EdgeStyle?: (e: EdgeSpec, curr: TODO) => Promise<TODO>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @beta
|
|
29
|
+
* Interface representing the context for a styler.
|
|
30
|
+
*/
|
|
31
|
+
export interface StylerContext {
|
|
32
|
+
/** The graph specification. */
|
|
33
|
+
graph: GraphSpec;
|
|
34
|
+
/** The selected graph specification. */
|
|
35
|
+
selected: GraphSpec;
|
|
36
|
+
/** The ontology API instance. */
|
|
37
|
+
OntologyAPI: Ontology;
|
|
38
|
+
/** The desktop API instance. */
|
|
39
|
+
DesktopAPI: Desktop;
|
|
40
|
+
/** The event emitter instance. */
|
|
41
|
+
ee: EventEmitterType;
|
|
42
|
+
/** The event topic prefix. */
|
|
43
|
+
eventTopicPrefix: string;
|
|
44
|
+
/**
|
|
45
|
+
* @beta
|
|
46
|
+
* Callback function to be called when the task is complete.
|
|
47
|
+
* @param x - The styler instance.
|
|
48
|
+
*/
|
|
49
|
+
onTaskComplete?: (x: Styler) => void;
|
|
50
|
+
/** Callback function to be called when the task is canceled. */
|
|
51
|
+
onTaskCanceled?: () => void;
|
|
52
|
+
/** The task ID associated with the styler. */
|
|
53
|
+
taskID?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @beta
|
|
57
|
+
* Type representing a function that produces a styler.
|
|
58
|
+
* @param context - The context for the styler.
|
|
59
|
+
* @returns A promise that resolves to the styler.
|
|
60
|
+
*/
|
|
61
|
+
export type StylerProducer = (context: StylerContext) => Promise<Styler>;
|
|
62
|
+
/**
|
|
63
|
+
* @beta
|
|
64
|
+
* Type representing an option for a styler.
|
|
65
|
+
*/
|
|
66
|
+
export type StylerOption = {
|
|
67
|
+
/** The name of the styler option. */
|
|
68
|
+
name: string;
|
|
69
|
+
/** The description of the styler option. */
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @beta
|
|
74
|
+
* Type representing the configuration for a styler.
|
|
75
|
+
*/
|
|
76
|
+
export type StylerConfig = StylerOption & {
|
|
77
|
+
/** The name of the styler configuration. */
|
|
78
|
+
name: string;
|
|
79
|
+
/** The description of the styler configuration. */
|
|
80
|
+
description: string;
|
|
81
|
+
/** The initialization function for the styler. */
|
|
82
|
+
init: StylerProducer;
|
|
83
|
+
/** The optional destroy function for the styler. */
|
|
84
|
+
destroy?: () => Promise<void>;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=styling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styling.d.ts","sourceRoot":"","sources":["../src/styling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,KAAK,IAAI,GAAG,GAAG,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;;OAKG;IACH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ourceRoot":"","sources":["../src/styling.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
2
|
+
import { ReactCssProperties } from './react-types';
|
|
3
|
+
import { SemanticBinding } from './semantic';
|
|
4
|
+
/**
|
|
5
|
+
* @beta
|
|
6
|
+
* Type representing the possible template types.
|
|
7
|
+
*/
|
|
8
|
+
export type TemplateType = 'nunjucks' | 'javascript';
|
|
9
|
+
/**
|
|
10
|
+
* @beta
|
|
11
|
+
* Type representing the possible template variants.
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateVariant = 'antd';
|
|
14
|
+
/**
|
|
15
|
+
* @beta
|
|
16
|
+
* Type representing the metadata for a template.
|
|
17
|
+
*/
|
|
18
|
+
export type TemplateMetadata = {
|
|
19
|
+
/** The name of the template. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** The description of the template. */
|
|
22
|
+
description: string;
|
|
23
|
+
/** The concepts associated with the template. */
|
|
24
|
+
concepts: string[];
|
|
25
|
+
/** The type of the template. */
|
|
26
|
+
type: TemplateType;
|
|
27
|
+
/** The layout of the template. */
|
|
28
|
+
layout: string;
|
|
29
|
+
/** The variant of the template. */
|
|
30
|
+
variant: TemplateVariant;
|
|
31
|
+
/** Optional blurhash for the template. */
|
|
32
|
+
blurhash?: string;
|
|
33
|
+
/** The parameter names required by the template. */
|
|
34
|
+
parameterNames: string[];
|
|
35
|
+
/** Optional CSS properties for the template. */
|
|
36
|
+
style?: ReactCssProperties;
|
|
37
|
+
/** Whether the template renders multiple records. */
|
|
38
|
+
rendersMultipleRecords?: boolean;
|
|
39
|
+
/** Whether the template is an app. */
|
|
40
|
+
isApp?: boolean;
|
|
41
|
+
/** details for semantic bindings. These can be app-specific */
|
|
42
|
+
bindings?: SemanticBinding[];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @beta
|
|
46
|
+
* Type representing a custom template, extending TemplateMetadata.
|
|
47
|
+
*/
|
|
48
|
+
export type CustomTemplate = TemplateMetadata & {
|
|
49
|
+
/** The template content. */
|
|
50
|
+
template: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @beta
|
|
54
|
+
* Type representing a saved template, extending CustomTemplate.
|
|
55
|
+
*/
|
|
56
|
+
export type SavedTemplate = CustomTemplate & {
|
|
57
|
+
/** The unique identifier for the entity. */
|
|
58
|
+
os_entity_uid: string;
|
|
59
|
+
/** The workspace to which the template belongs. */
|
|
60
|
+
os_workspace: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @beta
|
|
64
|
+
* Type representing the properties for a custom template iframe.
|
|
65
|
+
*/
|
|
66
|
+
export type CustomTemplateIframeProps = {
|
|
67
|
+
/** The template to be rendered in the iframe. */
|
|
68
|
+
template: CustomTemplate | SavedTemplate | string;
|
|
69
|
+
/** The context for the template. */
|
|
70
|
+
context: any;
|
|
71
|
+
/** Whether to enable debug mode. */
|
|
72
|
+
debug?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Callback function to be called on error.
|
|
75
|
+
* @param err - The error object.
|
|
76
|
+
*/
|
|
77
|
+
onError?: (err: {
|
|
78
|
+
message: string;
|
|
79
|
+
}) => void;
|
|
80
|
+
/** The width of the iframe. */
|
|
81
|
+
width?: number | string;
|
|
82
|
+
/** The height of the iframe. */
|
|
83
|
+
height?: number | string;
|
|
84
|
+
/** Optional CSS properties for the iframe. */
|
|
85
|
+
style?: ReactCssProperties;
|
|
86
|
+
/** Whether the iframe should take the full width. */
|
|
87
|
+
fullWidth?: boolean;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @beta
|
|
91
|
+
* Type representing the properties for a modal template, extending CustomTemplateIframeProps.
|
|
92
|
+
*/
|
|
93
|
+
export type ModalTemplateProps = CustomTemplateIframeProps & {
|
|
94
|
+
/** Optional properties for the modal. */
|
|
95
|
+
modalProps?: ModalProps;
|
|
96
|
+
/** Whether the modal is open. */
|
|
97
|
+
isModalOpen: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Function to set the open state of the modal.
|
|
100
|
+
* @param open - The new open state of the modal.
|
|
101
|
+
*/
|
|
102
|
+
setIsModalOpen: (open: boolean) => void;
|
|
103
|
+
/** Callback function to be called on completion. */
|
|
104
|
+
onComplete?: () => void;
|
|
105
|
+
/** Callback function to be called on cancel. */
|
|
106
|
+
onCancel?: () => void;
|
|
107
|
+
/** The task ID associated with the modal. */
|
|
108
|
+
taskID?: string;
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,gCAAgC;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,OAAO,EAAE,eAAe,CAAC;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,gDAAgD;IAChD,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,qDAAqD;IACrD,sBAAsB,CAAC,EAAE,O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AAC,EAAE,MAAM,IAAI,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/lib/templates.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":""}
|