@exmg/exm-form-drawer 1.0.3 → 1.0.5
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.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@exmg/exm-button": "^1.0.
|
|
34
|
-
"@exmg/exm-form": "^1.0.
|
|
33
|
+
"@exmg/exm-button": "^1.0.2",
|
|
34
|
+
"@exmg/exm-form": "^1.0.3",
|
|
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": "
|
|
50
|
+
"gitHead": "274f2fb879258487017192fcfe33c8cd23244dbb"
|
|
51
51
|
}
|
|
@@ -113,6 +113,7 @@ export class ExmFormDrawerBase extends ExmgElement {
|
|
|
113
113
|
}
|
|
114
114
|
async handleSubmit() {
|
|
115
115
|
const form = this.getForm();
|
|
116
|
+
this.errorMessage = null;
|
|
116
117
|
// Return when there are invalid fields
|
|
117
118
|
if (!this.formValid) {
|
|
118
119
|
return;
|
|
@@ -131,7 +132,7 @@ export class ExmFormDrawerBase extends ExmgElement {
|
|
|
131
132
|
}
|
|
132
133
|
finally {
|
|
133
134
|
this.submitting = false;
|
|
134
|
-
if (!this.keepOpenedOnSubmitSuccess) {
|
|
135
|
+
if (this.errorMessage === null && !this.keepOpenedOnSubmitSuccess) {
|
|
135
136
|
this.opened = false;
|
|
136
137
|
}
|
|
137
138
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const style = css `:host{display:flex}:host .header{display:flex;flex-direction:row;align-items:center;margin:0;padding:20px;border-bottom:1px solid var(--exm-form-drawer-header-separator-color, var(--mdc-theme-on-surface, rgba(2, 24, 43, 0.1)))}:host .header .title{font-size:1.4rem}:host .form-elements{padding:0 0px}.header-buttons{display:flex;flex-direction:row;flex:1;justify-content:flex-end}.header-buttons>*{margin-left:20px}:host(:not([disable-sticky-header])) .header{position:sticky;top:0;background-color:var(--exm-drawer-bg-color, var(--md-sys-color-surface-variant, white));z-index:2}form{margin:0 !important;padding:.5rem 1rem;box-sizing:border-box}`;
|
|
2
|
+
export const style = css `:host{display:flex}:host .header{display:flex;flex-direction:row;align-items:center;margin:0;padding:20px;border-bottom:1px solid var(--exm-form-drawer-header-separator-color, var(--mdc-theme-on-surface, rgba(2, 24, 43, 0.1)))}:host .header .title{font-size:1.4rem}:host .form-elements{padding:0 0px}.header-buttons{display:flex;flex-direction:row;flex:1;justify-content:flex-end}.header-buttons>*{margin-left:20px}:host(:not([disable-sticky-header])) .header{position:sticky;top:0;background-color:var(--exm-drawer-bg-color, var(--md-sys-color-surface-variant, white));z-index:2}form{margin:0 !important;padding:.5rem 1rem;box-sizing:border-box}.error{background-color:var(--md-sys-color-error-container);color:var(--md-sys-color-on-error-container);padding:.5rem}.error>*{margin:1rem}`;
|
|
3
3
|
export default style;
|
|
4
4
|
//# sourceMappingURL=exm-form-drawer-styles-css.js.map
|