@digo-org/digo-api 1.0.36 → 1.0.37

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digo-org/digo-api",
3
3
  "private": false,
4
- "version": "1.0.36",
4
+ "version": "1.0.37",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
package/src/digo-asset.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Instance, GlobalParameters, VizAssetDefinition, API_MESSAGES } from '@digo-org/digo-api';
1
+ import { Instance, GlobalParameters, VizAssetDefinition, API_MESSAGES, MASTER_INSTANCE } from '@digo-org/digo-api';
2
2
 
3
3
  import { ReactNode } from 'react';
4
4
 
@@ -36,7 +36,7 @@ export abstract class DigoAsset {
36
36
 
37
37
  switch (message.command) {
38
38
  case API_MESSAGES.updateDefinition:
39
- this.instances = (message.definition as VizAssetDefinition).instances;
39
+ this.instances = (message.definition as VizAssetDefinition).instances.filter(instance => instance.id !== MASTER_INSTANCE.id);
40
40
  this.globalParameters = (message.definition as VizAssetDefinition).globalParameters;
41
41
  break;
42
42
  }
package/src/types-misc.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ArtifactType, ArtifactValue, DataAssetDefinition, MessagePart, ParameterDefinition, ParameterValueArray, VizAssetDefinition, VizAssetFiles } from '@digo-org/digo-api';
1
+ import { ArtifactType, ArtifactValue, DataAssetDefinition, Instance, MessagePart, ParameterDefinition, ParameterValueArray, VizAssetDefinition, VizAssetFiles } from '@digo-org/digo-api';
2
2
 
3
3
  export type Links = Record<string, string>; /* parameter-id -> column-id */
4
4
 
@@ -55,3 +55,8 @@ export interface Artifact extends CommonMetadata {
55
55
  type: ArtifactType;
56
56
  value: ArtifactValue | ProjectDefinition;
57
57
  }
58
+
59
+ export const MASTER_INSTANCE: Instance = {
60
+ id: 'master',
61
+ name: 'Master',
62
+ };