@exmg/exm-form-drawer 1.0.1 → 1.0.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-form-drawer",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -31,7 +31,7 @@
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
33
  "@exmg/exm-button": "^1.0.1",
34
- "@exmg/exm-form": "^1.0.1",
34
+ "@exmg/exm-form": "^1.0.2",
35
35
  "@material/typography": "^14.0.0",
36
36
  "@polymer/neon-animation": "^3.0.1",
37
37
  "@polymer/paper-dialog": "^3.0.1",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "8e971cbad07fa6fab5a95aefd915937b752d2204"
50
+ "gitHead": "e911739a6688f56501a13ef72d2dacac5973cf80"
51
51
  }
@@ -81,5 +81,6 @@ export declare class ExmFormDrawerBase extends ExmgElement {
81
81
  */
82
82
  protected renderFormContent(): import("lit-html").TemplateResult<1>;
83
83
  protected renderError(): import("lit-html").TemplateResult<1>;
84
+ protected handleDrawerOpenedChanged(e: CustomEvent): void;
84
85
  protected render(): import("lit-html").TemplateResult<1>;
85
86
  }
@@ -156,11 +156,18 @@ export class ExmFormDrawerBase extends ExmgElement {
156
156
  renderError() {
157
157
  return html `<div class="error"><div>${this.errorMessage}</div></div>`;
158
158
  }
159
+ handleDrawerOpenedChanged(e) {
160
+ this.opened = e.detail.value;
161
+ if (this.opened) {
162
+ this._checkFormValidity();
163
+ }
164
+ }
159
165
  render() {
160
166
  return html `
161
167
  <exm-drawer
162
168
  ?opened="${this.opened}"
163
169
  ?no-cancel-on-outside-click="${this.noCancelOnOutsideClick}"
170
+ @exm-drawer-opened-changed=${this.handleDrawerOpenedChanged}
164
171
  scroll-action=${ifDefined(this.scrollAction)}
165
172
  style="max-width: ${this.style.maxWidth || '547px'}"
166
173
  >
@@ -2,13 +2,13 @@ import { __decorate } from "tslib";
2
2
  import { customElement } from 'lit/decorators.js';
3
3
  import { style } from './styles/exm-form-drawer-styles-css.js';
4
4
  import { ExmFormDrawerBase } from './exm-form-drawer-base.js';
5
- import { exmgFormStyles } from '@exmg/exm-form';
5
+ import { formStyles } from '@exmg/exm-form';
6
6
  let ExmFormDrawer = class ExmFormDrawer extends ExmFormDrawerBase {
7
7
  getForm() {
8
8
  return this.querySelector('form');
9
9
  }
10
10
  };
11
- ExmFormDrawer.styles = [style, exmgFormStyles];
11
+ ExmFormDrawer.styles = [style, formStyles];
12
12
  ExmFormDrawer = __decorate([
13
13
  customElement('exm-form-drawer')
14
14
  ], ExmFormDrawer);