@vaadin/map 23.2.0-dev.8a7678b70 → 23.3.0-alpha1

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/README.md CHANGED
@@ -4,7 +4,7 @@ A component for displaying web maps.
4
4
 
5
5
  > ℹ️  A commercial Vaadin [subscription](https://vaadin.com/pricing) is required to use Map in your project.
6
6
 
7
- [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/map)
7
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/map)
8
8
 
9
9
  [![npm version](https://badgen.net/npm/v/@vaadin/map)](https://www.npmjs.com/package/@vaadin/map)
10
10
  [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
@@ -13,7 +13,7 @@ A component for displaying web maps.
13
13
  <vaadin-map></vaadin-map>
14
14
  ```
15
15
 
16
- <!--[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/map/screenshot.png" width="530" alt="Screenshot of vaadin-map">](https://vaadin.com/docs/latest/ds/components/map)-->
16
+ [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/map/screenshot.png" width="636" alt="Screenshot of vaadin-map">](https://vaadin.com/docs/latest/components/map)
17
17
 
18
18
  ## Installation
19
19
 
@@ -29,17 +29,9 @@ Once installed, import the component in your application:
29
29
  import '@vaadin/map';
30
30
  ```
31
31
 
32
- Map is currently an experimental feature and must be explicitly enabled through a feature flag.
33
- To do so, import the enabler module before the map component module itself:
34
-
35
- ```js
36
- import '@vaadin/map/enable';
37
- import '@vaadin/map';
38
- ```
39
-
40
32
  ## Contributing
41
33
 
42
- Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
34
+ Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
43
35
 
44
36
  ## License
45
37
 
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@vaadin/map",
3
- "version": "23.2.0-dev.8a7678b70",
3
+ "version": "23.3.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "description": "vaadin-map",
8
- "license": "https://raw.githubusercontent.com/vaadin/web-components/master/packages/map/LICENSE",
9
- "cvdlName": "vaadin-map",
8
+ "license": "SEE LICENSE IN LICENSE",
10
9
  "repository": {
11
10
  "type": "git",
12
11
  "url": "https://github.com/vaadin/web-components.git",
@@ -21,11 +20,12 @@
21
20
  "module": "vaadin-map.js",
22
21
  "type": "module",
23
22
  "files": [
24
- "enable.js",
25
23
  "src",
26
24
  "theme",
27
25
  "vaadin-*.d.ts",
28
- "vaadin-*.js"
26
+ "vaadin-*.js",
27
+ "web-types.json",
28
+ "web-types.lit.json"
29
29
  ],
30
30
  "keywords": [
31
31
  "Vaadin",
@@ -36,9 +36,10 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "23.2.0-dev.8a7678b70",
40
- "@vaadin/vaadin-license-checker": "^2.1.0",
41
- "@vaadin/vaadin-themable-mixin": "23.2.0-dev.8a7678b70",
39
+ "@vaadin/component-base": "23.3.0-alpha1",
40
+ "@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
41
+ "@vaadin/vaadin-material-styles": "23.3.0-alpha1",
42
+ "@vaadin/vaadin-themable-mixin": "23.3.0-alpha1",
42
43
  "ol": "6.13.0"
43
44
  },
44
45
  "devDependencies": {
@@ -46,5 +47,10 @@
46
47
  "@vaadin/testing-helpers": "^0.3.2",
47
48
  "sinon": "^13.0.2"
48
49
  },
49
- "gitHead": "85b403f96d8282f262322b56c0ff4289f843d02a"
50
+ "cvdlName": "vaadin-map",
51
+ "web-types": [
52
+ "web-types.json",
53
+ "web-types.lit.json"
54
+ ],
55
+ "gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
50
56
  }
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2022 - 2022 Vaadin Ltd.
4
4
  * This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
5
5
  */
6
- import OpenLayersMap from 'ol/Map.js';
6
+ import type OpenLayersMap from 'ol/Map.js';
7
7
  import { ElementMixin, FocusMixin, ResizeMixin } from '@vaadin/component-base';
8
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
9
9
 
@@ -23,7 +23,6 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
23
23
  * Then use the exposed OpenLayers API to configure it:
24
24
  * ```html
25
25
  * <script type="module">
26
- * import "@vaadin/map/enable";
27
26
  * import "@vaadin/map";
28
27
  * import TileLayer from "ol/layer/Tile";
29
28
  * import OSM from "ol/source/OSM";
package/src/vaadin-map.js CHANGED
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2022 - 2022 Vaadin Ltd.
4
4
  * This program is available under Commercial Vaadin Developer License 4.0, available at https://vaadin.com/license/cvdl-4.0.
5
5
  */
6
- import '@vaadin/vaadin-license-checker/vaadin-license-checker.js';
7
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
7
  import { defaults as defaultControls } from 'ol/control';
9
8
  import { defaults as defaultInteractions } from 'ol/interaction';
@@ -13,10 +12,6 @@ import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
13
12
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
14
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
15
14
 
16
- function isEnabled() {
17
- return window.Vaadin && window.Vaadin.featureFlags && !!window.Vaadin.featureFlags.mapComponent;
18
- }
19
-
20
15
  /**
21
16
  * `vaadin-map` is a web component for displaying web maps.
22
17
  *
@@ -33,7 +28,6 @@ function isEnabled() {
33
28
  * Then use the exposed OpenLayers API to configure it:
34
29
  * ```html
35
30
  * <script type="module">
36
- * import "@vaadin/map/enable";
37
31
  * import "@vaadin/map";
38
32
  * import TileLayer from "ol/layer/Tile";
39
33
  * import OSM from "ol/source/OSM";
@@ -380,17 +374,6 @@ class Map extends ResizeMixin(FocusMixin(ElementMixin(ThemableMixin(PolymerEleme
380
374
  return 'vaadin-map';
381
375
  }
382
376
 
383
- /** @protected */
384
- static _finalizeClass() {
385
- super._finalizeClass();
386
-
387
- const devModeCallback = window.Vaadin.developmentModeCallback;
388
- const licenseChecker = devModeCallback && devModeCallback['vaadin-license-checker'];
389
- if (typeof licenseChecker === 'function') {
390
- licenseChecker(Map);
391
- }
392
- }
393
-
394
377
  /**
395
378
  * The internal OpenLayers map instance used to configure the map.
396
379
  * See the OpenLayers [API](https://openlayers.org/en/latest/apidoc/) and
@@ -472,12 +455,6 @@ class Map extends ResizeMixin(FocusMixin(ElementMixin(ThemableMixin(PolymerEleme
472
455
  }
473
456
  }
474
457
 
475
- if (isEnabled()) {
476
- customElements.define(Map.is, Map);
477
- } else {
478
- console.warn(
479
- 'WARNING: The map component is currently an experimental feature and needs to be explicitly enabled. To enable the component, `import "@vaadin/map/enable.js"` *before* importing the map module itself.',
480
- );
481
- }
458
+ customElements.define(Map.is, Map);
482
459
 
483
460
  export { Map };
package/web-types.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/map",
4
+ "version": "23.3.0-alpha1",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "vaadin-map",
11
+ "description": "`vaadin-map` is a web component for displaying web maps.\n\nThe component is a light-weight wrapper around the OpenLayers mapping library.\n\n### Basic Usage\n\nAdd a `<vaadin-map>` element to your HTML:\n\n```html\n<vaadin-map></vaadin-map>\n```\n\nThen use the exposed OpenLayers API to configure it:\n```html\n<script type=\"module\">\n import \"@vaadin/map\";\n import TileLayer from \"ol/layer/Tile\";\n import OSM from \"ol/source/OSM\";\n import View from \"ol/View\";\n\n const map = document.querySelector(\"vaadin-map\");\n customElements.whenDefined(\"vaadin-map\").then(() => {\n map.configuration.addLayer(new TileLayer({\n source: new OSM()\n }));\n map.configuration.setView(new View({\n center: [0, 0],\n zoom: 3\n }));\n });\n</script>\n```",
12
+ "attributes": [
13
+ {
14
+ "name": "theme",
15
+ "description": "The theme variants to apply to the component.",
16
+ "value": {
17
+ "type": [
18
+ "string",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ }
24
+ ],
25
+ "js": {
26
+ "properties": [],
27
+ "events": []
28
+ }
29
+ }
30
+ ]
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/map",
4
+ "version": "23.3.0-alpha1",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
18
+ "name": "vaadin-map",
19
+ "description": "`vaadin-map` is a web component for displaying web maps.\n\nThe component is a light-weight wrapper around the OpenLayers mapping library.\n\n### Basic Usage\n\nAdd a `<vaadin-map>` element to your HTML:\n\n```html\n<vaadin-map></vaadin-map>\n```\n\nThen use the exposed OpenLayers API to configure it:\n```html\n<script type=\"module\">\n import \"@vaadin/map\";\n import TileLayer from \"ol/layer/Tile\";\n import OSM from \"ol/source/OSM\";\n import View from \"ol/View\";\n\n const map = document.querySelector(\"vaadin-map\");\n customElements.whenDefined(\"vaadin-map\").then(() => {\n map.configuration.addLayer(new TileLayer({\n source: new OSM()\n }));\n map.configuration.setView(new View({\n center: [0, 0],\n zoom: 3\n }));\n });\n</script>\n```",
20
+ "extension": true,
21
+ "attributes": []
22
+ }
23
+ ]
24
+ }
25
+ }
26
+ }
package/enable.js DELETED
@@ -1,3 +0,0 @@
1
- window.Vaadin = window.Vaadin || {};
2
- window.Vaadin.featureFlags = window.Vaadin.featureFlags || {};
3
- window.Vaadin.featureFlags.mapComponent = true;