@vaadin/polymer-legacy-adapter 23.2.15 → 23.2.16

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './style-modules.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/polymer-legacy-adapter",
3
- "version": "23.2.15",
3
+ "version": "23.2.16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,16 +32,16 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@polymer/polymer": "^3.0.0",
35
- "@vaadin/vaadin-themable-mixin": "~23.2.15",
35
+ "@vaadin/vaadin-themable-mixin": "~23.2.16",
36
36
  "lit": "^2.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@esm-bundle/chai": "^4.3.4",
40
- "@vaadin/checkbox": "~23.2.15",
41
- "@vaadin/grid": "~23.2.15",
42
- "@vaadin/grid-pro": "~23.2.15",
43
- "@vaadin/testing-helpers": "^0.3.2",
40
+ "@vaadin/checkbox": "~23.2.16",
41
+ "@vaadin/grid": "~23.2.16",
42
+ "@vaadin/grid-pro": "~23.2.16",
43
+ "@vaadin/testing-helpers": "^0.4.0",
44
44
  "sinon": "^13.0.2"
45
45
  },
46
- "gitHead": "4e15a8705bf33c928a9cb6e9d79d47a00b30814c"
46
+ "gitHead": "57010013e59a3ecdc70ceef4377dbc3b1ac03fb3"
47
47
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { DomModule } from '@polymer/polymer/lib/elements/dom-module.js';
@@ -97,7 +97,9 @@ function getAllThemes() {
97
97
  /** @type {DomModuleWithCachedStyles} */
98
98
  const module = modules[moduleId];
99
99
  const themeFor = module.getAttribute('theme-for');
100
- module.__allStyles = module.__allStyles || getModuleStyles(module).concat(module.__partialStyles || []);
100
+ if (!module.__allStyles) {
101
+ module.__allStyles = getModuleStyles(module).concat(module.__partialStyles || []);
102
+ }
101
103
 
102
104
  return {
103
105
  themeFor,
@@ -107,7 +109,10 @@ function getAllThemes() {
107
109
  });
108
110
  }
109
111
 
110
- window.Vaadin = window.Vaadin || {};
112
+ if (!window.Vaadin) {
113
+ window.Vaadin = {};
114
+ }
115
+
111
116
  window.Vaadin.styleModules = {
112
117
  getAllThemes,
113
118
  registerStyles,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { Templatizer } from './template-renderer-templatizer.js';
@@ -13,6 +13,19 @@ export class GridTemplatizer extends Templatizer {
13
13
  return 'vaadin-template-renderer-grid-templatizer';
14
14
  }
15
15
 
16
+ /**
17
+ * Returns a reference to the grid which the templatizer is connected to.
18
+ *
19
+ * @private
20
+ */
21
+ get __grid() {
22
+ if (this.__component.__gridElement) {
23
+ return this.__component;
24
+ }
25
+
26
+ return this.__component._grid;
27
+ }
28
+
16
29
  /**
17
30
  * Updates the grid items once an item's nested property is changed.
18
31
  *
@@ -36,7 +49,7 @@ export class GridTemplatizer extends Templatizer {
36
49
 
37
50
  const index = this.__grid.items.indexOf(instance.item);
38
51
 
39
- path = path.replace(/^item\./, '');
52
+ path = path.replace(/^item\./u, '');
40
53
  path = `items.${index}.${path}`;
41
54
 
42
55
  this.__grid.notifyPath(path, value);
@@ -98,19 +111,6 @@ export class GridTemplatizer extends Templatizer {
98
111
  this.__grid.closeItemDetails(instance.item);
99
112
  }
100
113
  }
101
-
102
- /**
103
- * Returns a reference to the grid which the templatizer is connected to.
104
- *
105
- * @private
106
- */
107
- get __grid() {
108
- if (this.__component.__gridElement) {
109
- return this.__component;
110
- }
111
-
112
- return this.__component._grid;
113
- }
114
114
  }
115
115
 
116
116
  customElements.define(GridTemplatizer.is, GridTemplatizer);
@@ -1,12 +1,16 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { PolymerElement } from '@polymer/polymer';
7
7
  import { templatize } from '@polymer/polymer/lib/utils/templatize.js';
8
8
 
9
9
  export class Templatizer extends PolymerElement {
10
+ static get is() {
11
+ return 'vaadin-template-renderer-templatizer';
12
+ }
13
+
10
14
  static create(component, template) {
11
15
  const templatizer = new this();
12
16
  templatizer.__template = template;
@@ -14,10 +18,6 @@ export class Templatizer extends PolymerElement {
14
18
  return templatizer;
15
19
  }
16
20
 
17
- static get is() {
18
- return 'vaadin-template-renderer-templatizer';
19
- }
20
-
21
21
  constructor() {
22
22
  super();
23
23
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
@@ -123,7 +123,10 @@ function observeTemplates(component) {
123
123
  /**
124
124
  * Public API
125
125
  */
126
- window.Vaadin = window.Vaadin || {};
126
+ if (!window.Vaadin) {
127
+ window.Vaadin = {};
128
+ }
129
+
127
130
  window.Vaadin.templateRendererCallback = (component) => {
128
131
  processTemplates(component);
129
132
  observeTemplates(component);
package/style-modules.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './src/style-modules.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  export * from './src/template-renderer.js';