From 8be83c2c79cf2581df76d259334daae5d47799c0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 8 Jan 2021 18:51:37 +0100 Subject: [PATCH 01/83] Migrate to async web components, clean-up, remove migrations and EventBusMixin, add changelog, ... --- CHANGELOG.md | 37 +++++++++ README.md | 35 ++------- components/BaseMixin.vue | 31 -------- components/BillingPlans.vue | 38 ++++------ components/Capabilities.vue | 72 ++++++++---------- components/Collection.vue | 75 +++++++++---------- components/DeprecationNotice.vue | 2 +- components/Description.vue | 5 +- components/EventBusMixin.vue | 26 ------- components/ExperimentalNotice.vue | 2 +- components/FileFormats.vue | 27 +++---- components/JsonSchema.vue | 8 +- components/LinkList.vue | 11 +-- components/Process.vue | 57 +++++++------- components/ServiceTypes.vue | 27 +++---- components/SupportedFeatures.vue | 26 +++---- components/UdfRuntime.vue | 11 ++- components/UdfRuntimes.vue | 20 +---- .../{ => internal}/CollectionSummary.vue | 8 +- components/{ => internal}/ProcessExample.vue | 11 ++- .../{ => internal}/ProcessParameter.vue | 10 +-- main.js | 2 - package.json | 2 +- stacutils.js | 3 +- 24 files changed, 233 insertions(+), 313 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 components/BaseMixin.vue delete mode 100644 components/EventBusMixin.vue rename components/{ => internal}/CollectionSummary.vue (89%) rename components/{ => internal}/ProcessExample.vue (87%) rename components/{ => internal}/ProcessParameter.vue (83%) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f66b5b4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [2.0.0-beta.1] - 2020-01-31 + +### Added + +### Changed +- Release components as [Async Web Components](https://cli.vuejs.org/guide/build-targets.html#async-web-component) instead of as Vue Library. [#28](https://github.com/Open-EO/openeo-vue-components/issues/28) +- `Collection`: Prop renamed from `collectionData` to `collection` +- `Process`: Prop renamed from `processData` to `process` + +### Deprecated + +### Removed +- `EventBusMixin`, use Vue's native `$on` and `$off` methods on the `$root` component instead. +- `BaseMixin`, not required any longer. +- `getCount()` methods from `FileFormats`, `LinkList`, `ServiceTypes`, `UdfRuntimes`. Counts will be shown directly in the lists. +- `getPlanCount()` method from `BillingPlans`. + +## [1.0.0] - 2017-06-20 + +First stable release. + +## Legacy + +Please see the [Releases](https://github.com/Open-EO/openeo-vue-components/releases) for changelogs prior to v1.0.0. + + +[Unreleased]: https://github.com/Open-EO/openeo-vue-components/compare/v2.0.0-beta.1...HEAD +[2.0.0-beta.1]: https://github.com/Open-EO/openeo-vue-components/compare/v1.0.0...v2.0.0-beta.1 +[1.0.0]: https://github.com/Open-EO/openeo-vue-components/releases/tag/v1.0.0 diff --git a/README.md b/README.md index 92a266c..0547420 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# openeo-vue-components +# Vue Components for openEO (@openeo/vue-components) A set of [Vue](https://vuejs.org) components for [openEO](http://openeo.org). -This library's version is **1.0.0** and supports **openEO API versions 0.4.x and 1.0.x**. Legacy versions are available as releases. +This library's version is **2.0.0-beta.1** and supports **openEO API versions 1.0.x**. +Legacy versions supporting API version 0.x are available as [releases](https://github.com/Open-EO/openeo-vue-components/releases). ## Components @@ -16,10 +17,6 @@ Visualizes the billing information of the back-end. - `version` (string): openEO version - `billing` (object): Billing information as defined by the openEO API. -**Methods:** - -- `getPlanCount()` - Get the number of billing plans. - ### `Capabilities` @@ -53,7 +50,7 @@ You can either install them using npm or add them to your HTML page: **Properties:** - `version` (string): openEO version (defaults to `null`, which tries to auto-detect the version). -- `collectionData` (object): A single STAC-based collection object as defined by the openEO API. +- `collection` (object): A single STAC-based collection object as defined by the openEO API. - `initiallyCollapsed` (boolean): Allow collapsing/expanding the details and collapse the details by default (defaults to `false`). - `mapOptions` (object): For fine-tuning the behaviour of the map that displays the collection's spatial extent. Entirely optional. Possible keys: - `height` (string): Height of the map container div. Defaults to `"300px"`. @@ -84,12 +81,6 @@ A simple text renderer, which supports CommonMark. - `compact` (boolean): Renders the description more compact if set to `true`. Defaults to `false`. -### `EventBusMixin` - -A Mixin for components to manage EventBus listeners across the lifecycle of your components. - -After importing the Mixin, include it in your component by adding `mixins: [EventBusMixin],`. This components helps to keep track of events over the lifecycle of components. It removes all event listeners after the listening component has been destroyed. This ensures that no old listeners are called and produce errors due to missing data. The Mixin also ensures that listeners are not added twice. - **Methods:** - `listen(eventName, callback)` - Adds a listener for an event with the specified name. Replaces existing listeners with the same name in the component. @@ -109,10 +100,6 @@ Visualizes the supported file formats of the back-end. One of `showInput` or `showOutput` must be set to `true`, otherwise the list will be empty. If both are set to `true`, a single list will be shown. -**Methods:** - -- `getCount()` - Get the number of shown file formats. - ### `LinkList` @@ -127,10 +114,6 @@ A simple list of links. - `ignoreRel`: (array\): List of `rel` types to hide. Defaults to `['self']`. - `showRel`: (boolean): Shows/Hides the `rel` types. Defaults to `false`. -**Methods:** - -- `getCount()` - Get the number of shown links. - ### `ObjectTree` @@ -151,7 +134,7 @@ Note: `ProcessExample` is not meant to be used separately. **Properties:** - `version` (string): openEO version (defaults to `null`, which tries to auto-detect the version). -- `processData` (object): Process specification as defined by the openEO API. +- `process` (object): Process specification as defined by the openEO API. - `provideDownload` (boolean): Provide a link to download the JSON file (defaults to `true`). - `initiallyCollapsed` (boolean): Allow collapsing/expanding the details and collapse the details by default (defaults to `false`). - `processReferenceBuilder` (function): A function that generates a link to a process by its process identifier. @@ -173,10 +156,6 @@ Visualizes the supported secondary web service types of the back-end. - `version` (string): openEO version - `services` (object): Supported service types as defined by the openEO API. -**Methods:** - -- `getCount()` - Get the number of shown service types. - ### `SupportedFeatures` @@ -372,10 +351,6 @@ Visualizes the supported UDF (user-defined function) runtimes of the back-end. - `version` (string): openEO version - `runtimes` (object): Supported UDF runtimes as defined by the openEO API. -**Methods:** - -- `getCount()` - Get the number of shown UDF runtimes. - ### `UdfRuntime` Shows a single supported UDF (user-defined function) runtime of the back-end. diff --git a/components/BaseMixin.vue b/components/BaseMixin.vue deleted file mode 100644 index 7cfdcf2..0000000 --- a/components/BaseMixin.vue +++ /dev/null @@ -1,31 +0,0 @@ - \ No newline at end of file diff --git a/components/BillingPlans.vue b/components/BillingPlans.vue index 58bad08..e887997 100644 --- a/components/BillingPlans.vue +++ b/components/BillingPlans.vue @@ -26,42 +26,32 @@ \ No newline at end of file diff --git a/components/Collection.vue b/components/Collection.vue index e655ad2..2af8ff4 100644 --- a/components/Collection.vue +++ b/components/Collection.vue @@ -130,7 +130,7 @@

Additional information

-
+
@@ -154,20 +154,18 @@ \ No newline at end of file diff --git a/components/ExperimentalNotice.vue b/components/ExperimentalNotice.vue index e0d3242..2360cbd 100644 --- a/components/ExperimentalNotice.vue +++ b/components/ExperimentalNotice.vue @@ -1,7 +1,7 @@ diff --git a/components/FileFormats.vue b/components/FileFormats.vue index 190d477..1759da6 100644 --- a/components/FileFormats.vue +++ b/components/FileFormats.vue @@ -2,7 +2,7 @@
  • {{ f.id | abbrev }} - +
    • Import
    • Export
    • @@ -15,17 +15,16 @@ \ No newline at end of file diff --git a/components/Process.vue b/components/Process.vue index 3d1a856..d9c84ff 100644 --- a/components/Process.vue +++ b/components/Process.vue @@ -46,15 +46,15 @@

      Parameters

      - -

      This process has no parameters.

      + +

      This process has no parameters.

      Return Value

      - -
      - + +
      +
      @@ -73,7 +73,7 @@

      Examples

      - +
      @@ -89,21 +89,18 @@ - - -``` - **Properties:** - `version` (string): openEO version (defaults to `null`, which tries to auto-detect the version). diff --git a/components/BillingPlans.vue b/components/BillingPlans.vue index e887997..724451a 100644 --- a/components/BillingPlans.vue +++ b/components/BillingPlans.vue @@ -27,9 +27,9 @@ + + \ No newline at end of file diff --git a/components/Collection.vue b/components/Collection.vue index 2af8ff4..71e15e3 100644 --- a/components/Collection.vue +++ b/components/Collection.vue @@ -59,7 +59,7 @@