@exmg/exm-dialogs 1.2.7 → 1.2.9
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/.rollup.cache/root/repo/packages/exm-dialogs/dist/exm-dialog-confirm-base.d.ts +1 -1
- package/.rollup.cache/root/repo/packages/exm-dialogs/dist/exm-dialog-form-base.d.ts +3 -3
- package/.rollup.cache/root/repo/packages/exm-dialogs/dist/exm-dialog.stories.js +122 -0
- package/dist/exm-dialog-confirm-base.d.ts +1 -1
- package/dist/exm-dialog-confirm-base.js +1 -1
- package/dist/exm-dialog-confirm.js +1 -1
- package/dist/exm-dialog-form-base.d.ts +3 -3
- package/dist/exm-dialog-form-base.js +1 -1
- package/dist/exm-dialog-form.js +1 -1
- package/dist/exm-dialog.js +1 -1
- package/dist/node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js +31 -0
- package/package.json +4 -4
|
@@ -61,5 +61,5 @@ export declare class ExmDialogConfirmBase extends ExmgElement {
|
|
|
61
61
|
doAction?(): Promise<void> | void;
|
|
62
62
|
private handleSubmit;
|
|
63
63
|
private handleClose;
|
|
64
|
-
protected render(): import("lit
|
|
64
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
65
65
|
}
|
|
@@ -64,8 +64,8 @@ export declare class ExmDialogFormBase extends ExmDialogFormBase_base {
|
|
|
64
64
|
/**
|
|
65
65
|
* Method should be overriden to render form content
|
|
66
66
|
*/
|
|
67
|
-
protected renderFormContent(): import("lit
|
|
68
|
-
protected renderError(): import("lit
|
|
69
|
-
protected render(): import("lit
|
|
67
|
+
protected renderFormContent(): import("lit").TemplateResult<1>;
|
|
68
|
+
protected renderError(): import("lit").TemplateResult<1>;
|
|
69
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
70
70
|
}
|
|
71
71
|
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import './exm-dialog-confirm.js';
|
|
6
|
+
import './exm-dialog-form.js';
|
|
7
|
+
import '@material/web/button/filled-button.js';
|
|
8
|
+
import '@material/web/textfield/filled-text-field.js';
|
|
9
|
+
let DemoDialog = class DemoDialog extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.opened = false;
|
|
13
|
+
}
|
|
14
|
+
clickHandler(_e) {
|
|
15
|
+
const showsIssueContent = this.querySelector(':scope > [slot="dialog"]');
|
|
16
|
+
showsIssueContent === null || showsIssueContent === void 0 ? void 0 : showsIssueContent.show();
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return html `
|
|
20
|
+
<md-filled-button @click=${this.clickHandler}>open</md-filled-button>
|
|
21
|
+
<slot name="dialog"></slot>
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
DemoDialog.styles = [css ``];
|
|
26
|
+
__decorate([
|
|
27
|
+
property({ type: Boolean })
|
|
28
|
+
], DemoDialog.prototype, "opened", void 0);
|
|
29
|
+
DemoDialog = __decorate([
|
|
30
|
+
customElement('demo-dialog')
|
|
31
|
+
], DemoDialog);
|
|
32
|
+
export { DemoDialog };
|
|
33
|
+
const dialogConfirm = (args) => html `
|
|
34
|
+
<demo-dialog>
|
|
35
|
+
<exm-dialog-confirm
|
|
36
|
+
slot="dialog"
|
|
37
|
+
.type="${args.type}"
|
|
38
|
+
message="${ifDefined(args.message)}"
|
|
39
|
+
title="${ifDefined(args.title)}"
|
|
40
|
+
submitBtn="${ifDefined(args.submitBtn)}"
|
|
41
|
+
cancelBtn="${ifDefined(args.cancelBtn)}"
|
|
42
|
+
?hideCancelButton="${args.hideCancelButton}"
|
|
43
|
+
icon="${ifDefined(args.icon)}"
|
|
44
|
+
?submitting="${args.submitting}"
|
|
45
|
+
@action-close=${args.actionClose}
|
|
46
|
+
@action-confirmed=${args.actionConfirmed}
|
|
47
|
+
@action-error=${args.actionError}
|
|
48
|
+
@action-success=${args.actionSuccess}
|
|
49
|
+
></exm-dialog-confirm>
|
|
50
|
+
</demo-dialog>
|
|
51
|
+
`;
|
|
52
|
+
const args = {
|
|
53
|
+
type: { control: 'text' },
|
|
54
|
+
message: { control: 'text' },
|
|
55
|
+
title: { control: 'text' },
|
|
56
|
+
submitBtn: { control: 'text' },
|
|
57
|
+
cancelBtn: { control: 'text' },
|
|
58
|
+
icon: { control: 'text' },
|
|
59
|
+
submitting: { control: 'boolean' },
|
|
60
|
+
actionClose: { name: 'fire @action-close' },
|
|
61
|
+
actionConfirmed: { name: 'fire @action-confirm' },
|
|
62
|
+
actionError: { name: 'fire @action-error' },
|
|
63
|
+
};
|
|
64
|
+
const meta = {
|
|
65
|
+
title: 'Packages/Dialog',
|
|
66
|
+
tags: ['autodocs'],
|
|
67
|
+
render: dialogConfirm,
|
|
68
|
+
argTypes: {
|
|
69
|
+
...args,
|
|
70
|
+
hideCancelButton: { control: 'boolean' },
|
|
71
|
+
actionSuccess: { name: 'fire @action-success' },
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export default meta;
|
|
75
|
+
const commonDialogFunctions = {
|
|
76
|
+
actionClose: () => console.log('action-close'),
|
|
77
|
+
actionConfirmed: () => console.log('action-confirm'),
|
|
78
|
+
actionError: () => console.log('action-error'),
|
|
79
|
+
};
|
|
80
|
+
export const DialogConfirm = {
|
|
81
|
+
args: {
|
|
82
|
+
...commonDialogFunctions,
|
|
83
|
+
actionSuccess: () => console.log('action-success'),
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const dialogForm = (args) => html `
|
|
87
|
+
<demo-dialog>
|
|
88
|
+
<exm-dialog-form
|
|
89
|
+
slot="dialog"
|
|
90
|
+
.type="${args.type}"
|
|
91
|
+
title="${ifDefined(args.title)}"
|
|
92
|
+
submitBtn="${ifDefined(args.submitBtn)}"
|
|
93
|
+
cancelBtn="${ifDefined(args.cancelBtn)}"
|
|
94
|
+
icon="${ifDefined(args.icon)}"
|
|
95
|
+
?submitting="${args.submitting}"
|
|
96
|
+
message="${ifDefined(args.message)}"
|
|
97
|
+
@action-submit=${(e) => {
|
|
98
|
+
console.log('form data:', e.detail);
|
|
99
|
+
}}
|
|
100
|
+
@action-close=${() => console.log('action-close')}
|
|
101
|
+
>
|
|
102
|
+
<form>
|
|
103
|
+
<md-filled-text-field name="name" dialogFocus label="Name" required></md-filled-text-field>
|
|
104
|
+
</form>
|
|
105
|
+
</exm-dialog-form>
|
|
106
|
+
</demo-dialog>
|
|
107
|
+
`;
|
|
108
|
+
export const DialogForm = {
|
|
109
|
+
render: dialogForm,
|
|
110
|
+
argTypes: {
|
|
111
|
+
...args,
|
|
112
|
+
actionSubmit: { name: 'fire @action-submit' },
|
|
113
|
+
},
|
|
114
|
+
args: {
|
|
115
|
+
message: 'Form name input',
|
|
116
|
+
...commonDialogFunctions,
|
|
117
|
+
actionSubmit: (e) => {
|
|
118
|
+
console.log('form data:', e.detail);
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=exm-dialog.stories.js.map
|
|
@@ -61,5 +61,5 @@ export declare class ExmDialogConfirmBase extends ExmgElement {
|
|
|
61
61
|
doAction?(): Promise<void> | void;
|
|
62
62
|
private handleSubmit;
|
|
63
63
|
private handleClose;
|
|
64
|
-
protected render(): import("lit
|
|
64
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
65
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { nothing, html } from 'lit';
|
|
3
3
|
import './exm-dialog.js';
|
|
4
4
|
import '@material/web/button/text-button.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { customElement } from 'lit/decorators.js';
|
|
3
3
|
import { ExmDialogConfirmBase } from './exm-dialog-confirm-base.js';
|
|
4
4
|
import { style } from './styles/exm-dialog-confirm-css.js';
|
|
@@ -64,8 +64,8 @@ export declare class ExmDialogFormBase extends ExmDialogFormBase_base {
|
|
|
64
64
|
/**
|
|
65
65
|
* Method should be overriden to render form content
|
|
66
66
|
*/
|
|
67
|
-
protected renderFormContent(): import("lit
|
|
68
|
-
protected renderError(): import("lit
|
|
69
|
-
protected render(): import("lit
|
|
67
|
+
protected renderFormContent(): import("lit").TemplateResult<1>;
|
|
68
|
+
protected renderError(): import("lit").TemplateResult<1>;
|
|
69
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
70
70
|
}
|
|
71
71
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
3
|
import './exm-dialog.js';
|
|
4
4
|
import '@exmg/exm-button/exm-filled-button.js';
|
package/dist/exm-dialog-form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { customElement } from 'lit/decorators.js';
|
|
3
3
|
import { style } from './styles/exm-dialog-form-css.js';
|
|
4
4
|
import { formStyles } from '@exmg/exm-form';
|
package/dist/exm-dialog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { css } from 'lit';
|
|
3
3
|
import { customElement } from 'lit/decorators.js';
|
|
4
4
|
import { Dialog } from '@material/web/dialog/internal/dialog.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __decorate(decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
26
|
+
var e = new Error(message);
|
|
27
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { __decorate };
|
|
31
|
+
//# sourceMappingURL=tslib.es6.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-dialogs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"homepage": "https://bitbucket.org/exmachina/exm-web-components",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@exmg/exm-button": "^1.2.
|
|
28
|
-
"@exmg/exm-form": "^1.2.
|
|
27
|
+
"@exmg/exm-button": "^1.2.9",
|
|
28
|
+
"@exmg/exm-form": "^1.2.9"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@exmg/lit-base": "^3.0.3",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "c27c4ffabda0c6a509df58537017af65719d1e57"
|
|
40
40
|
}
|