ember-promise-modals 3.0.1 → 4.0.0
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/.release-it.js +1 -1
- package/CHANGELOG.md +77 -44
- package/README.md +18 -0
- package/addon/components/modal.js +88 -43
- package/addon/helpers/open-modal.js +33 -0
- package/addon/modal.js +19 -9
- package/addon/services/modals.js +11 -1
- package/addon/styles/ember-promise-modals.css +8 -8
- package/addon/templates/components/modal.hbs +1 -1
- package/addon-test-support/index.js +33 -18
- package/app/helpers/open-modal.js +1 -0
- package/package.json +28 -26
- package/pnpm-lock.yaml +4140 -3916
|
@@ -1,30 +1,45 @@
|
|
|
1
|
+
import { settled } from '@ember/test-helpers';
|
|
2
|
+
|
|
3
|
+
function setMinimum(propertyName) {
|
|
4
|
+
document.documentElement.style.setProperty(propertyName, '0.001s');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function unsetMinimum(propertyName) {
|
|
8
|
+
document.documentElement.style.removeProperty(propertyName);
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
export function setupPromiseModals(hooks) {
|
|
2
12
|
hooks.beforeEach(function () {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
setMinimum('--epm-animation-backdrop-in-duration');
|
|
14
|
+
setMinimum('--epm-animation-backdrop-out-duration');
|
|
15
|
+
setMinimum('--epm-animation-backdrop-in-delay');
|
|
16
|
+
setMinimum('--epm-animation-backdrop-out-delay');
|
|
17
|
+
setMinimum('--epm-animation-modal-in-duration');
|
|
18
|
+
setMinimum('--epm-animation-modal-out-duration');
|
|
19
|
+
setMinimum('--epm-animation-modal-in-delay');
|
|
20
|
+
setMinimum('--epm-animation-modal-out-delay');
|
|
11
21
|
|
|
12
22
|
this.modals = this.owner.lookup('service:modals');
|
|
13
23
|
});
|
|
14
24
|
|
|
15
|
-
hooks.afterEach(function () {
|
|
25
|
+
hooks.afterEach(async function () {
|
|
16
26
|
// be sure to close all modals after a test
|
|
17
27
|
if (this.modals) {
|
|
18
|
-
this.modals.
|
|
28
|
+
this.modals._destroyModals();
|
|
19
29
|
}
|
|
20
30
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
delete this.modals;
|
|
32
|
+
|
|
33
|
+
unsetMinimum('--epm-animation-backdrop-in-duration');
|
|
34
|
+
unsetMinimum('--epm-animation-backdrop-out-duration');
|
|
35
|
+
unsetMinimum('--epm-animation-backdrop-in-delay');
|
|
36
|
+
unsetMinimum('--epm-animation-backdrop-out-delay');
|
|
37
|
+
unsetMinimum('--epm-animation-modal-in-duration');
|
|
38
|
+
unsetMinimum('--epm-animation-modal-out-duration');
|
|
39
|
+
unsetMinimum('--epm-animation-modal-in-delay');
|
|
40
|
+
unsetMinimum('--epm-animation-modal-out-delay');
|
|
41
|
+
|
|
42
|
+
// wait for any registered test waiters to settle
|
|
43
|
+
await settled();
|
|
29
44
|
});
|
|
30
45
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from 'ember-promise-modals/helpers/open-modal';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-promise-modals",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "The better way to handle modals in your Ember.js apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
7
7
|
],
|
|
8
|
-
"repository": "https://github.com/
|
|
8
|
+
"repository": "https://github.com/mainmatter/ember-promise-modals",
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "Mainmatter GmbH",
|
|
11
11
|
"directories": {
|
|
12
12
|
"doc": "doc",
|
|
13
13
|
"test": "tests"
|
|
@@ -30,24 +30,25 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ember/test-waiters": "^3.0.1",
|
|
33
|
-
"@embroider/util": "^1.
|
|
33
|
+
"@embroider/util": "^1.7.1",
|
|
34
34
|
"broccoli-funnel": "^3.0.8",
|
|
35
35
|
"broccoli-merge-trees": "^4.2.0",
|
|
36
36
|
"broccoli-postcss": "^6.0.1",
|
|
37
|
-
"ember-auto-import": "^2.4.
|
|
37
|
+
"ember-auto-import": "^2.4.2",
|
|
38
38
|
"ember-cli-babel": "^7.26.11",
|
|
39
39
|
"ember-cli-htmlbars": "^6.0.1",
|
|
40
|
-
"focus-trap": "^6.
|
|
41
|
-
"postcss-preset-env": "^7.
|
|
40
|
+
"focus-trap": "^6.9.3",
|
|
41
|
+
"postcss-preset-env": "^7.6.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@babel/eslint-parser": "7.
|
|
44
|
+
"@babel/eslint-parser": "7.19.1",
|
|
45
45
|
"@ember/optional-features": "2.0.0",
|
|
46
|
-
"@ember/test-helpers": "2.
|
|
47
|
-
"@embroider/test-setup": "
|
|
46
|
+
"@ember/test-helpers": "2.9.0",
|
|
47
|
+
"@embroider/test-setup": "2.0.2",
|
|
48
|
+
"@release-it-plugins/lerna-changelog": "5.0.0",
|
|
48
49
|
"broccoli-asset-rev": "3.0.0",
|
|
49
|
-
"ember-cli": "4.
|
|
50
|
-
"ember-cli-dependency-checker": "3.3.
|
|
50
|
+
"ember-cli": "4.9.2",
|
|
51
|
+
"ember-cli-dependency-checker": "3.3.1",
|
|
51
52
|
"ember-cli-inject-live-reload": "2.1.0",
|
|
52
53
|
"ember-cli-sri": "2.1.1",
|
|
53
54
|
"ember-cli-terser": "4.0.2",
|
|
@@ -57,33 +58,33 @@
|
|
|
57
58
|
"ember-maybe-import-regenerator": "1.0.0",
|
|
58
59
|
"ember-qunit": "5.1.5",
|
|
59
60
|
"ember-resolver": "8.0.3",
|
|
60
|
-
"ember-source": "4.3
|
|
61
|
+
"ember-source": "4.9.3",
|
|
61
62
|
"ember-source-channel-url": "3.0.0",
|
|
62
|
-
"ember-template-lint": "
|
|
63
|
+
"ember-template-lint": "5.3.0",
|
|
63
64
|
"ember-try": "2.0.0",
|
|
64
|
-
"eslint": "8.
|
|
65
|
+
"eslint": "8.29.0",
|
|
65
66
|
"eslint-config-prettier": "8.5.0",
|
|
66
|
-
"eslint-plugin-ember": "
|
|
67
|
-
"eslint-plugin-import-helpers": "1.
|
|
67
|
+
"eslint-plugin-ember": "11.2.1",
|
|
68
|
+
"eslint-plugin-import-helpers": "1.3.1",
|
|
68
69
|
"eslint-plugin-node": "11.1.0",
|
|
69
|
-
"eslint-plugin-prettier": "4.
|
|
70
|
-
"eslint-plugin-promise": "6.
|
|
71
|
-
"eslint-plugin-qunit": "7.
|
|
70
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
71
|
+
"eslint-plugin-promise": "6.1.1",
|
|
72
|
+
"eslint-plugin-qunit": "7.3.4",
|
|
72
73
|
"loader.js": "4.7.0",
|
|
73
74
|
"npm-run-all": "4.1.5",
|
|
74
|
-
"prettier": "2.
|
|
75
|
-
"qunit": "2.
|
|
75
|
+
"prettier": "2.8.1",
|
|
76
|
+
"qunit": "2.19.3",
|
|
76
77
|
"qunit-console-grouper": "0.3.0",
|
|
77
78
|
"qunit-dom": "2.0.0",
|
|
78
|
-
"release-it": "
|
|
79
|
-
"
|
|
80
|
-
"webpack": "5.
|
|
79
|
+
"release-it": "15.5.1",
|
|
80
|
+
"sinon": "15.0.0",
|
|
81
|
+
"webpack": "5.75.0"
|
|
81
82
|
},
|
|
82
83
|
"engines": {
|
|
83
84
|
"node": "12.* || >= 14.*"
|
|
84
85
|
},
|
|
85
86
|
"changelog": {
|
|
86
|
-
"repo": "
|
|
87
|
+
"repo": "mainmatter/ember-promise-modals",
|
|
87
88
|
"labels": {
|
|
88
89
|
"breaking": ":boom: Breaking Change",
|
|
89
90
|
"enhancement": ":rocket: Enhancement",
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"peerDependencyRules": {
|
|
103
104
|
"ignoreMissing": [
|
|
104
105
|
"@babel/core",
|
|
106
|
+
"mustache",
|
|
105
107
|
"postcss",
|
|
106
108
|
"webpack"
|
|
107
109
|
]
|