@magda/external-ui-plugin-sdk 2.2.0-alpha.3 → 2.2.0

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 (2) hide show
  1. package/dist/index.d.ts +28 -5
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -117,6 +117,17 @@ export declare interface CommonPropsType {
117
117
  * @memberof CommonPropsType
118
118
  */
119
119
  fetchContent: (noCache?: boolean) => Promise<void>;
120
+
121
+ /**
122
+ * An optional property contains a list of names of plugin components who are mounted to replace a built-in component.
123
+ * Only available for component types that supports more than one plugins to be mounted.
124
+ * e.g. `ExtraVisualisationSection` plugin components.
125
+ * When more than one components are mounted to replace a built-in component, each of the plugin component will receive this property.
126
+ *
127
+ * @type {string[]}
128
+ * @memberof CommonPropsType
129
+ */
130
+ loadedPluginNames?: string[];
120
131
  }
121
132
 
122
133
  declare type CompatiblePreviews = {
@@ -816,7 +827,7 @@ export declare interface ExtraVisualisationSectionComponentPropsType
816
827
  /**
817
828
  * Visualisation Section external plugin component type.
818
829
  * This plugin will be mounted on dataset or distribution page.
819
- * More info & example please refer to repo: [magda-ui-plugin-component-dap-thumbnail-viewer](https://github.com/magda-io/magda-ui-plugin-component-dap-thumbnail-viewer)
830
+ * More info & example please refer to repo: [magda-ui-plugin-component-dap-image-gallery](https://github.com/magda-io/magda-ui-plugin-component-dap-image-gallery)
820
831
  * @category External UI Plugin Component Types
821
832
  */
822
833
  export declare type ExtraVisualisationSectionComponentType = ComponentType<
@@ -977,6 +988,7 @@ declare type ParsedDataset = {
977
988
  };
978
989
  ckanExport?: CkanExportAspectType;
979
990
  access: Access;
991
+ defaultLicense?: string;
980
992
  };
981
993
 
982
994
  declare type ParsedDistribution = {
@@ -1037,12 +1049,23 @@ declare interface Permission {
1037
1049
  }
1038
1050
 
1039
1051
  /**
1040
- * The constant define the prefix that is used to create the global scope variable name, to which the external UI plugin bundle should export to.
1052
+ * The constant define the prefix that is used to create the global scope variable name `MagdaPluginComponentxxxx`, to which the external UI plugin bundle should export to.
1053
+ * Here, `xxxx` is the plugin UI component type name
1041
1054
  * e.g. The Header Component should bundled & export to global scope variable `MagdaPluginComponentHeader`.
1055
+ *
1056
+ * The currently support all type names are:
1057
+ * - Header
1058
+ * - Footer
1059
+ * - DatasetEditButton
1060
+ * - DatasetLikeButton
1061
+ * - ExtraVisualisationSection
1062
+ *
1063
+ * Please refer to `External UI Plugin Component Types Type Aliases` section for functionality of each plugin UI component type.
1064
+ *
1042
1065
  * > Since Magda v2.2.0, users can load more than one "Extra Visualisation Section" type Magda UI Plugin Components.
1043
- * To allow this, the component is required to be packaged as a library and exported to global scope `MagdaPluginComponentExtraVisualisationSections.xxxx`.
1044
- * Here, `MagdaPluginComponentExtraVisualisationSections` should be an object with key `xxxx` set to the plugin component.
1045
- * e.g. the DAP thumbnail viewer plugin choose to export itself to `MagdaPluginComponentExtraVisualisationSections.DAPThumbnailViewer`.
1066
+ * To allow this, the component is required to be packaged as a library and exported to global scope `MagdaPluginComponentExtraVisualisationSection.xxxx`.
1067
+ * Here, `MagdaPluginComponentExtraVisualisationSection` should be an object with key `xxxx` set to the plugin component.
1068
+ * e.g. the [DAP image gallery plugin](https://github.com/magda-io/magda-ui-plugin-component-dap-image-gallery) choose to export itself to `MagdaPluginComponentExtraVisualisationSection.DAPImageGallery`.
1046
1069
  */
1047
1070
  export declare const PREFIX = "MagdaPluginComponent";
1048
1071
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@magda/external-ui-plugin-sdk",
3
3
  "description": "MAGDA external UI plugin SDK",
4
- "version": "2.2.0-alpha.3",
4
+ "version": "2.2.0",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf dist tsconfig.tsbuildinfo",
7
7
  "build": "api-extractor run -l",
@@ -18,7 +18,7 @@
18
18
  "directory": "packages/external-ui-plugin-sdk"
19
19
  },
20
20
  "devDependencies": {
21
- "@magda/web-client": "^2.2.0-alpha.3",
21
+ "@magda/web-client": "^2.2.0",
22
22
  "typescript": "~4.2.4"
23
23
  },
24
24
  "peerDependencies": {