ember-promise-modals 4.1.0 → 5.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.
Files changed (36) hide show
  1. package/README.md +10 -33
  2. package/addon-main.cjs +4 -0
  3. package/dist/_app_/components/epm-modal-container.js +1 -0
  4. package/dist/_app_/components/epm-modal.js +1 -0
  5. package/dist/_app_/helpers/open-modal.js +1 -0
  6. package/dist/_app_/services/modals.js +1 -0
  7. package/{addon/styles/ember-promise-modals.css → dist/components/epm-modal-container.css} +17 -15
  8. package/dist/components/epm-modal-container.js +14 -0
  9. package/dist/components/epm-modal-container.js.map +1 -0
  10. package/{addon/components/modal.js → dist/components/epm-modal.js} +26 -48
  11. package/dist/components/epm-modal.js.map +1 -0
  12. package/{addon → dist}/helpers/open-modal.js +13 -12
  13. package/dist/helpers/open-modal.js.map +1 -0
  14. package/{addon → dist}/modal.js +10 -34
  15. package/dist/modal.js.map +1 -0
  16. package/{addon → dist}/services/modals.js +7 -34
  17. package/dist/services/modals.js.map +1 -0
  18. package/{addon-test-support → dist/test-support}/index.js +4 -7
  19. package/dist/test-support/index.js.map +1 -0
  20. package/package.json +49 -78
  21. package/.prettierignore +0 -27
  22. package/.release-it.js +0 -20
  23. package/CHANGELOG.md +0 -224
  24. package/DEPRECATIONS.md +0 -91
  25. package/MIGRATION.md +0 -80
  26. package/addon/components/modal-container.js +0 -11
  27. package/addon/templates/components/modal-container.hbs +0 -12
  28. package/addon/templates/components/modal.hbs +0 -6
  29. package/app/components/epm-modal-container.js +0 -1
  30. package/app/components/epm-modal.js +0 -1
  31. package/app/helpers/open-modal.js +0 -1
  32. package/app/services/modals.js +0 -1
  33. package/config/environment.js +0 -5
  34. package/index.js +0 -45
  35. package/pnpm-lock.yaml +0 -13232
  36. package/renovate.json +0 -29
@@ -3,12 +3,10 @@ import { settled } from '@ember/test-helpers';
3
3
  function setMinimum(propertyName) {
4
4
  document.documentElement.style.setProperty(propertyName, '0.001s');
5
5
  }
6
-
7
6
  function unsetMinimum(propertyName) {
8
7
  document.documentElement.style.removeProperty(propertyName);
9
8
  }
10
-
11
- export function setupPromiseModals(hooks) {
9
+ function setupPromiseModals(hooks) {
12
10
  hooks.beforeEach(function () {
13
11
  setMinimum('--epm-animation-backdrop-in-duration');
14
12
  setMinimum('--epm-animation-backdrop-out-duration');
@@ -18,18 +16,14 @@ export function setupPromiseModals(hooks) {
18
16
  setMinimum('--epm-animation-modal-out-duration');
19
17
  setMinimum('--epm-animation-modal-in-delay');
20
18
  setMinimum('--epm-animation-modal-out-delay');
21
-
22
19
  this.modals = this.owner.lookup('service:modals');
23
20
  });
24
-
25
21
  hooks.afterEach(async function () {
26
22
  // be sure to close all modals after a test
27
23
  if (this.modals) {
28
24
  this.modals._destroyModals();
29
25
  }
30
-
31
26
  delete this.modals;
32
-
33
27
  unsetMinimum('--epm-animation-backdrop-in-duration');
34
28
  unsetMinimum('--epm-animation-backdrop-out-duration');
35
29
  unsetMinimum('--epm-animation-backdrop-in-delay');
@@ -43,3 +37,6 @@ export function setupPromiseModals(hooks) {
43
37
  await settled();
44
38
  });
45
39
  }
40
+
41
+ export { setupPromiseModals };
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/test-support/index.js"],"sourcesContent":["import { settled } from '@ember/test-helpers';\n\nfunction setMinimum(propertyName) {\n document.documentElement.style.setProperty(propertyName, '0.001s');\n}\n\nfunction unsetMinimum(propertyName) {\n document.documentElement.style.removeProperty(propertyName);\n}\n\nexport function setupPromiseModals(hooks) {\n hooks.beforeEach(function () {\n setMinimum('--epm-animation-backdrop-in-duration');\n setMinimum('--epm-animation-backdrop-out-duration');\n setMinimum('--epm-animation-backdrop-in-delay');\n setMinimum('--epm-animation-backdrop-out-delay');\n setMinimum('--epm-animation-modal-in-duration');\n setMinimum('--epm-animation-modal-out-duration');\n setMinimum('--epm-animation-modal-in-delay');\n setMinimum('--epm-animation-modal-out-delay');\n\n this.modals = this.owner.lookup('service:modals');\n });\n\n hooks.afterEach(async function () {\n // be sure to close all modals after a test\n if (this.modals) {\n this.modals._destroyModals();\n }\n\n delete this.modals;\n\n unsetMinimum('--epm-animation-backdrop-in-duration');\n unsetMinimum('--epm-animation-backdrop-out-duration');\n unsetMinimum('--epm-animation-backdrop-in-delay');\n unsetMinimum('--epm-animation-backdrop-out-delay');\n unsetMinimum('--epm-animation-modal-in-duration');\n unsetMinimum('--epm-animation-modal-out-duration');\n unsetMinimum('--epm-animation-modal-in-delay');\n unsetMinimum('--epm-animation-modal-out-delay');\n\n // wait for any registered test waiters to settle\n await settled();\n });\n}\n"],"names":["setMinimum","propertyName","document","documentElement","style","setProperty","unsetMinimum","removeProperty","setupPromiseModals","hooks","beforeEach","modals","owner","lookup","afterEach","_destroyModals","settled"],"mappings":";;AAEA,SAASA,UAAUA,CAACC,YAAY,EAAE;EAChCC,QAAQ,CAACC,eAAe,CAACC,KAAK,CAACC,WAAW,CAACJ,YAAY,EAAE,QAAQ,CAAC,CAAA;AACpE,CAAA;AAEA,SAASK,YAAYA,CAACL,YAAY,EAAE;EAClCC,QAAQ,CAACC,eAAe,CAACC,KAAK,CAACG,cAAc,CAACN,YAAY,CAAC,CAAA;AAC7D,CAAA;AAEO,SAASO,kBAAkBA,CAACC,KAAK,EAAE;EACxCA,KAAK,CAACC,UAAU,CAAC,YAAY;IAC3BV,UAAU,CAAC,sCAAsC,CAAC,CAAA;IAClDA,UAAU,CAAC,uCAAuC,CAAC,CAAA;IACnDA,UAAU,CAAC,mCAAmC,CAAC,CAAA;IAC/CA,UAAU,CAAC,oCAAoC,CAAC,CAAA;IAChDA,UAAU,CAAC,mCAAmC,CAAC,CAAA;IAC/CA,UAAU,CAAC,oCAAoC,CAAC,CAAA;IAChDA,UAAU,CAAC,gCAAgC,CAAC,CAAA;IAC5CA,UAAU,CAAC,iCAAiC,CAAC,CAAA;IAE7C,IAAI,CAACW,MAAM,GAAG,IAAI,CAACC,KAAK,CAACC,MAAM,CAAC,gBAAgB,CAAC,CAAA;AACnD,GAAC,CAAC,CAAA;EAEFJ,KAAK,CAACK,SAAS,CAAC,kBAAkB;AAChC;IACA,IAAI,IAAI,CAACH,MAAM,EAAE;AACf,MAAA,IAAI,CAACA,MAAM,CAACI,cAAc,EAAE,CAAA;AAC9B,KAAA;IAEA,OAAO,IAAI,CAACJ,MAAM,CAAA;IAElBL,YAAY,CAAC,sCAAsC,CAAC,CAAA;IACpDA,YAAY,CAAC,uCAAuC,CAAC,CAAA;IACrDA,YAAY,CAAC,mCAAmC,CAAC,CAAA;IACjDA,YAAY,CAAC,oCAAoC,CAAC,CAAA;IAClDA,YAAY,CAAC,mCAAmC,CAAC,CAAA;IACjDA,YAAY,CAAC,oCAAoC,CAAC,CAAA;IAClDA,YAAY,CAAC,gCAAgC,CAAC,CAAA;IAC9CA,YAAY,CAAC,iCAAiC,CAAC,CAAA;;AAE/C;IACA,MAAMU,OAAO,EAAE,CAAA;AACjB,GAAC,CAAC,CAAA;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-promise-modals",
3
- "version": "4.1.0",
3
+ "version": "5.0.0",
4
4
  "description": "The better way to handle modals in your Ember.js apps.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -12,102 +12,73 @@
12
12
  "doc": "doc",
13
13
  "test": "tests"
14
14
  },
15
- "scripts": {
16
- "build": "ember build --env=production",
17
- "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
18
- "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:*:fix\"",
19
- "lint:hbs": "ember-template-lint .",
20
- "lint:hbs:fix": "ember-template-lint . --fix",
21
- "lint:js": "eslint . --cache",
22
- "lint:js:fix": "eslint . --fix",
23
- "lint:md": "prettier --check '**/*.md'",
24
- "lint:md:fix": "prettier --write '**/*.md'",
25
- "release": "release-it",
26
- "start": "ember serve",
27
- "test": "ember test",
28
- "test:all": "npm-run-all lint test:*",
29
- "test:ember-compatibility": "ember try:each"
15
+ "exports": {
16
+ ".": "./dist/index.js",
17
+ "./*": "./dist/*",
18
+ "./test-support": "./dist/test-support/index.js",
19
+ "./addon-main.cjs": "./addon-main.cjs"
20
+ },
21
+ "files": [
22
+ "addon-main.cjs",
23
+ "dist"
24
+ ],
25
+ "ember-addon": {
26
+ "main": "addon-main.cjs",
27
+ "type": "addon",
28
+ "version": 2,
29
+ "app-js": {
30
+ "./components/epm-modal-container.js": "./dist/_app_/components/epm-modal-container.js",
31
+ "./components/epm-modal.js": "./dist/_app_/components/epm-modal.js",
32
+ "./helpers/open-modal.js": "./dist/_app_/helpers/open-modal.js",
33
+ "./services/modals.js": "./dist/_app_/services/modals.js"
34
+ }
30
35
  },
31
36
  "dependencies": {
32
37
  "@ember/test-waiters": "^3.0.2",
38
+ "@embroider/addon-shim": "^1.8.7",
33
39
  "@embroider/util": "^1.7.1",
34
- "broccoli-funnel": "^3.0.8",
35
- "broccoli-merge-trees": "^4.2.0",
36
- "broccoli-postcss": "^6.0.1",
37
- "ember-auto-import": "^2.4.2",
38
- "ember-cli-babel": "^7.26.11",
39
- "ember-cli-htmlbars": "^6.0.1",
40
- "focus-trap": "^6.9.3",
41
- "postcss-preset-env": "^7.6.0"
40
+ "decorator-transforms": "^1.0.1",
41
+ "focus-trap": "^6.9.3"
42
42
  },
43
43
  "devDependencies": {
44
- "@babel/eslint-parser": "7.23.10",
45
- "@ember/optional-features": "2.0.0",
46
- "@ember/string": "3.1.1",
47
- "@ember/test-helpers": "2.9.4",
48
- "@embroider/macros": "1.13.4",
49
- "@embroider/test-setup": "3.0.3",
50
- "@release-it-plugins/lerna-changelog": "5.0.0",
51
- "broccoli-asset-rev": "3.0.0",
52
- "ember-cli": "4.12.2",
53
- "ember-cli-dependency-checker": "3.3.2",
54
- "ember-cli-inject-live-reload": "2.1.0",
55
- "ember-cli-sri": "2.1.1",
56
- "ember-cli-terser": "4.0.2",
57
- "ember-disable-prototype-extensions": "1.1.3",
58
- "ember-load-initializers": "2.1.2",
59
- "ember-maybe-import-regenerator": "1.0.0",
60
- "ember-qunit": "8.0.2",
61
- "ember-resolver": "8.1.0",
62
- "ember-source": "4.12.4",
63
- "ember-source-channel-url": "3.0.0",
44
+ "@babel/core": "7.24.4",
45
+ "@babel/eslint-parser": "7.24.1",
46
+ "@babel/plugin-proposal-decorators": "7.24.1",
47
+ "@babel/plugin-transform-class-properties": "7.24.1",
48
+ "@embroider/addon-dev": "4.2.1",
49
+ "@rollup/plugin-babel": "6.0.4",
64
50
  "ember-template-lint": "5.13.0",
65
- "ember-try": "2.0.0",
66
- "eslint": "8.56.0",
51
+ "eslint": "8.57.0",
67
52
  "eslint-config-prettier": "8.10.0",
68
53
  "eslint-plugin-ember": "11.12.0",
69
54
  "eslint-plugin-import-helpers": "1.3.1",
70
- "eslint-plugin-node": "11.1.0",
55
+ "eslint-plugin-n": "16.6.2",
71
56
  "eslint-plugin-prettier": "4.2.1",
72
57
  "eslint-plugin-promise": "6.1.1",
73
58
  "eslint-plugin-qunit": "7.3.4",
74
- "loader.js": "4.7.0",
75
59
  "npm-run-all": "4.1.5",
76
60
  "prettier": "2.8.8",
77
- "qunit": "2.20.0",
78
- "qunit-console-grouper": "0.3.0",
79
- "qunit-dom": "2.0.0",
80
- "release-it": "15.11.0",
81
- "sinon": "15.2.0",
82
- "webpack": "5.90.0"
61
+ "rollup": "4.14.0",
62
+ "rollup-plugin-copy": "3.5.0",
63
+ "webpack": "5.89.0"
83
64
  },
84
- "engines": {
85
- "node": "12.* || 14.* || >= 16.*"
65
+ "peerDependencies": {
66
+ "@ember/test-helpers": "^3.0.0"
86
67
  },
87
- "changelog": {
88
- "repo": "mainmatter/ember-promise-modals",
89
- "labels": {
90
- "breaking": ":boom: Breaking Change",
91
- "enhancement": ":rocket: Enhancement",
92
- "bug": ":bug: Bug Fix",
93
- "documentation": ":memo: Documentation",
94
- "internal": ":house: Internal"
95
- }
68
+ "engines": {
69
+ "node": ">= 16.*"
96
70
  },
97
71
  "ember": {
98
72
  "edition": "octane"
99
73
  },
100
- "ember-addon": {
101
- "configPath": "tests/dummy/config"
102
- },
103
- "pnpm": {
104
- "peerDependencyRules": {
105
- "ignoreMissing": [
106
- "@babel/core",
107
- "mustache",
108
- "postcss",
109
- "webpack"
110
- ]
111
- }
74
+ "scripts": {
75
+ "build": "rollup --config",
76
+ "start": "rollup --config --watch",
77
+ "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
78
+ "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:*:fix\"",
79
+ "lint:hbs": "ember-template-lint .",
80
+ "lint:hbs:fix": "ember-template-lint . --fix",
81
+ "lint:js": "eslint . --cache",
82
+ "lint:js:fix": "eslint . --fix"
112
83
  }
113
- }
84
+ }
package/.prettierignore DELETED
@@ -1,27 +0,0 @@
1
- # unconventional js
2
- /blueprints/*/files/
3
- /vendor/
4
-
5
- # compiled output
6
- /dist/
7
- /tmp/
8
-
9
- # dependencies
10
- /bower_components/
11
- /node_modules/
12
-
13
- # misc
14
- /coverage/
15
- !.*
16
- .eslintcache
17
- .lint-todo/
18
-
19
- # ember-try
20
- /.node_modules.ember-try/
21
- /bower.json.ember-try
22
- /npm-shrinkwrap.json.ember-try
23
- /package.json.ember-try
24
- /package-lock.json.ember-try
25
- /yarn.lock.ember-try
26
-
27
- CHANGELOG.md
package/.release-it.js DELETED
@@ -1,20 +0,0 @@
1
- /* eslint-disable no-template-curly-in-string */
2
- module.exports = {
3
- plugins: {
4
- '@release-it-plugins/lerna-changelog': {
5
- infile: 'CHANGELOG.md',
6
- },
7
- },
8
- git: {
9
- commitMessage: 'v${version}',
10
- tagName: 'v${version}',
11
- },
12
- github: {
13
- release: true,
14
- releaseName: 'v${version}',
15
- tokenRef: 'GITHUB_AUTH',
16
- },
17
- npm: {
18
- publish: false,
19
- },
20
- };
package/CHANGELOG.md DELETED
@@ -1,224 +0,0 @@
1
- # Changelog
2
-
3
-
4
-
5
-
6
-
7
- ## v4.1.0 (2024-02-01)
8
-
9
- #### :rocket: Enhancement
10
- * [#894](https://github.com/mainmatter/ember-promise-modals/pull/894) Deprecate opening a modal from string ([@BlueCutOfficial](https://github.com/BlueCutOfficial))
11
-
12
- #### :memo: Documentation
13
- * [#908](https://github.com/mainmatter/ember-promise-modals/pull/908) docs(DEPRECATIONS)/ Adjust the line about deprecated node ([@BlueCutOfficial](https://github.com/BlueCutOfficial))
14
- * [#897](https://github.com/mainmatter/ember-promise-modals/pull/897) Communicate about all the major changes planned for the v2 addon ([@BlueCutOfficial](https://github.com/BlueCutOfficial))
15
-
16
- #### :house: Internal
17
- * [#907](https://github.com/mainmatter/ember-promise-modals/pull/907) Internal fix/ re-add node 14 to the list of supported engines ([@BlueCutOfficial](https://github.com/BlueCutOfficial))
18
- * [#858](https://github.com/mainmatter/ember-promise-modals/pull/858) Fix CI tests for beta/canary channels ([@zeppelin](https://github.com/zeppelin))
19
-
20
- #### Committers: 3
21
- - Gabor Babicz ([@zeppelin](https://github.com/zeppelin))
22
- - Marco Otte-Witte ([@marcoow](https://github.com/marcoow))
23
- - Marine Dunstetter ([@BlueCutOfficial](https://github.com/BlueCutOfficial))
24
-
25
- ## v4.0.0 (2023-06-01)
26
-
27
- #### :boom: Breaking Change
28
- * [#856](https://github.com/mainmatter/ember-promise-modals/pull/856) setupPromiseModals should wait for test waiters to settle ([@marcin-wicha](https://github.com/marcin-wicha))
29
-
30
- #### :rocket: Enhancement
31
- * [#550](https://github.com/mainmatter/ember-promise-modals/pull/550) Modal template helper ([@pichfl](https://github.com/pichfl))
32
-
33
- #### :bug: Bug Fix
34
- * [#826](https://github.com/mainmatter/ember-promise-modals/pull/826) Ensure animations are triggered when `prefer-reduced-animation` is used ([@pichfl](https://github.com/pichfl))
35
- * [#682](https://github.com/mainmatter/ember-promise-modals/pull/682) Improve test helper ([@pichfl](https://github.com/pichfl))
36
-
37
- #### :house: Internal
38
- * [#819](https://github.com/mainmatter/ember-promise-modals/pull/819) Update ember-try configuration ([@pichfl](https://github.com/pichfl))
39
- * [#688](https://github.com/mainmatter/ember-promise-modals/pull/688) Prefer "happy path" code style for `_resolve()` ([@pichfl](https://github.com/pichfl))
40
- * [#687](https://github.com/mainmatter/ember-promise-modals/pull/687) Extract destruction of the modals effects into a method and apply them ([@pichfl](https://github.com/pichfl))
41
- * [#686](https://github.com/mainmatter/ember-promise-modals/pull/686) Closing the modal should inform the modals service ([@pichfl](https://github.com/pichfl))
42
- * [#766](https://github.com/mainmatter/ember-promise-modals/pull/766) Replace deprecated release-it-lerna-changelog ([@pichfl](https://github.com/pichfl))
43
- * [#685](https://github.com/mainmatter/ember-promise-modals/pull/685) Move attaching/detaching `animationend` event handler into methods and generalize related names ([@pichfl](https://github.com/pichfl))
44
- * [#763](https://github.com/mainmatter/ember-promise-modals/pull/763) Allow automatic installation of peer dependencies ([@pichfl](https://github.com/pichfl))
45
- * [#684](https://github.com/mainmatter/ember-promise-modals/pull/684) Move focusTrap setup/teardown to methods ([@pichfl](https://github.com/pichfl))
46
- * [#683](https://github.com/mainmatter/ember-promise-modals/pull/683) Replace retained element reference with a method ([@pichfl](https://github.com/pichfl))
47
- * [#598](https://github.com/mainmatter/ember-promise-modals/pull/598) Refactor handling of `focusTrap.onDeactivate` method ([@pichfl](https://github.com/pichfl))
48
- * [#681](https://github.com/mainmatter/ember-promise-modals/pull/681) remove dependabot configuration ([@nickschot](https://github.com/nickschot))
49
-
50
- #### Committers: 5
51
- - Florian Pichler ([@pichfl](https://github.com/pichfl))
52
- - Gabor Babicz ([@zeppelin](https://github.com/zeppelin))
53
- - Marcin Wicha ([@marcin-wicha](https://github.com/marcin-wicha))
54
- - Nick Schot ([@nickschot](https://github.com/nickschot))
55
- - Sebastian Helbig ([@sebastianhelbig](https://github.com/sebastianhelbig))
56
-
57
- ## v3.0.1 (2022-04-12)
58
-
59
- #### :bug: Bug Fix
60
- * [#596](https://github.com/mainmatter/ember-promise-modals/pull/596) Ensure calls to @close run before the focus-out deactivation ([@pichfl](https://github.com/pichfl))
61
-
62
- #### :house: Internal
63
- * [#597](https://github.com/mainmatter/ember-promise-modals/pull/597) Remove deprecated `clickOutsideDeactivates` option ([@pichfl](https://github.com/pichfl))
64
-
65
- #### Committers: 1
66
- - Florian Pichler ([@pichfl](https://github.com/pichfl))
67
-
68
- ## v3.0.0 (2022-04-11)
69
-
70
- #### :boom: Breaking Change
71
- * [#588](https://github.com/mainmatter/ember-promise-modals/pull/588) Use ember-auto-import@2 ([@pichfl](https://github.com/pichfl))
72
- * [#438](https://github.com/mainmatter/ember-promise-modals/pull/438) bump @ember/test-waiters to 3.0.0 ([@nickschot](https://github.com/nickschot))
73
- * [#437](https://github.com/mainmatter/ember-promise-modals/pull/437) Drop Node 10 support ([@nickschot](https://github.com/nickschot))
74
-
75
- #### :rocket: Enhancement
76
- * [#549](https://github.com/mainmatter/ember-promise-modals/pull/549) Enhance focus trap configuration ([@zeppelin](https://github.com/zeppelin))
77
- * [#533](https://github.com/mainmatter/ember-promise-modals/pull/533) Legacy: Downgrade native class to Ember.Object ([@pichfl](https://github.com/pichfl))
78
- * [#436](https://github.com/mainmatter/ember-promise-modals/pull/436) Embroider optimized compatibility ([@nickschot](https://github.com/nickschot))
79
- * [#517](https://github.com/mainmatter/ember-promise-modals/pull/517) Add option to disable focus trap ([@zeppelin](https://github.com/zeppelin))
80
-
81
- #### :memo: Documentation
82
- * [#502](https://github.com/mainmatter/ember-promise-modals/pull/502) Provide additional documentation for the Modal class and ModalOptions ([@pichfl](https://github.com/pichfl))
83
-
84
- #### :house: Internal
85
- * [#594](https://github.com/mainmatter/ember-promise-modals/pull/594) Configure release-it ([@pichfl](https://github.com/pichfl))
86
- * [#570](https://github.com/mainmatter/ember-promise-modals/pull/570) Setup Renovatebot ([@nickschot](https://github.com/nickschot))
87
- * [#477](https://github.com/mainmatter/ember-promise-modals/pull/477) Replace Yarn with pnpm ([@pichfl](https://github.com/pichfl))
88
- * [#530](https://github.com/mainmatter/ember-promise-modals/pull/530) Internal: Extend and apply prettier configuration ([@pichfl](https://github.com/pichfl))
89
- * [#500](https://github.com/mainmatter/ember-promise-modals/pull/500) Specify octane edition in package.json & add missing optional features ([@nickschot](https://github.com/nickschot))
90
- * [#499](https://github.com/mainmatter/ember-promise-modals/pull/499) Update ember-release scenario to use auto-import v2 ([@nickschot](https://github.com/nickschot))
91
-
92
- #### Committers: 3
93
- - Florian Pichler ([@pichfl](https://github.com/pichfl))
94
- - Gabor Babicz ([@zeppelin](https://github.com/zeppelin))
95
- - Nick Schot ([@nickschot](https://github.com/nickschot))
96
-
97
- ## v2.0.0 (2021-09-01)
98
-
99
- #### :boom: Breaking Change
100
- * [#427](https://github.com/mainmatter/ember-promise-modals/pull/427) Generate one backdrop per modal ([@aoumiri](https://github.com/aoumiri))
101
-
102
- #### :rocket: Enhancement
103
- * [#427](https://github.com/mainmatter/ember-promise-modals/pull/427) Generate one backdrop per modal ([@aoumiri](https://github.com/aoumiri))
104
-
105
- #### :memo: Documentation
106
- * [#432](https://github.com/mainmatter/ember-promise-modals/pull/432) Fix responsiveness of dummy app ([@nickschot](https://github.com/nickschot))
107
- * [#414](https://github.com/mainmatter/ember-promise-modals/pull/414) Improve README and dummy application ([@pichfl](https://github.com/pichfl))
108
-
109
- #### :house: Internal
110
- * [#431](https://github.com/mainmatter/ember-promise-modals/pull/431) Use env=production when building the dummy application ([@pichfl](https://github.com/pichfl))
111
- * [#430](https://github.com/mainmatter/ember-promise-modals/pull/430) Update production build path for GitHub pages ([@pichfl](https://github.com/pichfl))
112
- * [#415](https://github.com/mainmatter/ember-promise-modals/pull/415) Deploy dummy application to Github pages ([@pichfl](https://github.com/pichfl))
113
-
114
- #### Committers: 4
115
- - Anass OUMIRI ([@aoumiri](https://github.com/aoumiri))
116
- - Florian Pichler ([@pichfl](https://github.com/pichfl))
117
- - Nick Schot ([@nickschot](https://github.com/nickschot))
118
- - [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
119
-
120
-
121
- ## v1.1.1 (2021-07-27)
122
-
123
- #### :bug: Bug Fix
124
- * [#422](https://github.com/mainmatter/ember-promise-modals/pull/422) fix promsie-modals from breaking when used in another addon instead of an app ([@nickschot](https://github.com/nickschot))
125
-
126
- #### Committers: 1
127
- - Nick Schot ([@nickschot](https://github.com/nickschot))
128
-
129
-
130
- ## v1.1.0 (2021-07-27)
131
-
132
- #### :rocket: Enhancement
133
- * [#421](https://github.com/mainmatter/ember-promise-modals/pull/421) add optional onAnimationModalOutEnd hook ([@nickschot](https://github.com/nickschot))
134
-
135
- #### :bug: Bug Fix
136
- * [#420](https://github.com/mainmatter/ember-promise-modals/pull/420) explicitly specify animation delay and duration as separate to make sure they're properly used by the browser ([@nickschot](https://github.com/nickschot))
137
-
138
- #### Committers: 1
139
- - Nick Schot ([@nickschot](https://github.com/nickschot))
140
-
141
-
142
- ## v1.0.2 (2021-07-26)
143
-
144
- #### :bug: Bug Fix
145
- * [#419](https://github.com/mainmatter/ember-promise-modals/pull/419) fix setting a delay on the backdrop or modal makes animation break ([@nickschot](https://github.com/nickschot))
146
-
147
- #### :house: Internal
148
- * [#417](https://github.com/mainmatter/ember-promise-modals/pull/417) Delete unused modal service file from dummy app ([@nickschot](https://github.com/nickschot))
149
-
150
- #### Committers: 1
151
- - Nick Schot ([@nickschot](https://github.com/nickschot))
152
-
153
-
154
- ## v1.0.1 (2021-07-16)
155
-
156
- #### :bug: Bug Fix
157
- * [#412](https://github.com/mainmatter/ember-promise-modals/pull/412) fix backdrop not animating immediately after the last modal is closed ([@nickschot](https://github.com/nickschot))
158
-
159
- #### :house: Internal
160
- * [#413](https://github.com/mainmatter/ember-promise-modals/pull/413) use babel-eslint as eslint parser ([@nickschot](https://github.com/nickschot))
161
-
162
- #### Committers: 2
163
- - Nick Schot ([@nickschot](https://github.com/nickschot))
164
- - [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
165
-
166
-
167
- ## v1.0.0 (2021-07-13)
168
-
169
- #### :boom: Breaking Change
170
- * [#148](https://github.com/mainmatter/ember-promise-modals/pull/148) Replace ember-animated with CSS animations ([@pichfl](https://github.com/pichfl))
171
-
172
- #### :rocket: Enhancement
173
- * [#148](https://github.com/mainmatter/ember-promise-modals/pull/148) Replace ember-animated with CSS animations ([@pichfl](https://github.com/pichfl))
174
-
175
- #### :house: Internal
176
- * [#407](https://github.com/mainmatter/ember-promise-modals/pull/407) upgrade to ember-qunit v5 ([@nickschot](https://github.com/nickschot))
177
- * [#309](https://github.com/mainmatter/ember-promise-modals/pull/309) Update addon layout according to latest ember addon blueprint ([@pichfl](https://github.com/pichfl))
178
-
179
- #### Committers: 3
180
- - Florian Pichler ([@pichfl](https://github.com/pichfl))
181
- - Nick Schot ([@nickschot](https://github.com/nickschot))
182
- - [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
183
-
184
-
185
- ## v0.2.1 (2020-06-30)
186
-
187
- #### :rocket: Enhancement
188
- * [#178](https://github.com/mainmatter/ember-promise-modals/pull/178) Expose `clickOutsideDeactivates` on the `modals` service ([@Turbo87](https://github.com/Turbo87))
189
-
190
- #### :bug: Bug Fix
191
- * [#181](https://github.com/mainmatter/ember-promise-modals/pull/181) service/modals: Reset `.epm-scrolling-disabled` class in the destructor ([@Turbo87](https://github.com/Turbo87))
192
- * [#180](https://github.com/mainmatter/ember-promise-modals/pull/180) components/modal: Fix broken destructor ([@Turbo87](https://github.com/Turbo87))
193
-
194
- #### :house: Internal
195
- * [#179](https://github.com/mainmatter/ember-promise-modals/pull/179) Add `qunit-console-grouper` dev dependency ([@Turbo87](https://github.com/Turbo87))
196
-
197
- #### Committers: 1
198
- - Tobias Bieniek ([@Turbo87](https://github.com/Turbo87))
199
-
200
-
201
- ## v0.2.0 (2020-04-22)
202
-
203
- #### :boom: Breaking Change
204
- * [#142](https://github.com/mainmatter/ember-promise-modals/pull/142) Convert `ember-animated` to a peer dependency ([@Turbo87](https://github.com/Turbo87))
205
- * [#139](https://github.com/mainmatter/ember-promise-modals/pull/139) Drop Support for Node.js 8 ([@Turbo87](https://github.com/Turbo87))
206
-
207
- #### :rocket: Enhancement
208
- * [#137](https://github.com/mainmatter/ember-promise-modals/pull/137) Add Support for `ember-animated` v0.9 and v0.10 ([@dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
209
-
210
- #### :memo: Documentation
211
- * [#80](https://github.com/mainmatter/ember-promise-modals/pull/80) Update README ([@ansmonjol](https://github.com/ansmonjol))
212
-
213
- #### :house: Internal
214
- * [#143](https://github.com/mainmatter/ember-promise-modals/pull/143) CI: Add scenarios for Ember v3.12 and v3.16 ([@Turbo87](https://github.com/Turbo87))
215
- * [#141](https://github.com/mainmatter/ember-promise-modals/pull/141) Use GitHub Actions for CI ([@Turbo87](https://github.com/Turbo87))
216
-
217
- #### Committers: 2
218
- - Alexandre Monjol ([@ansmonjol](https://github.com/ansmonjol))
219
- - Tobias Bieniek ([@Turbo87](https://github.com/Turbo87))
220
-
221
-
222
- ## v0.1.0 (2019-09-03)
223
-
224
- Initial Release! 🎉
package/DEPRECATIONS.md DELETED
@@ -1,91 +0,0 @@
1
- # Deprecations
2
-
3
- ember-promise-modals 5.0.0 will be a [v2 addon](https://github.com/embroider-build/embroider/blob/main/README.md#for-addon-authors) compatible with Embroider ecosystem. This document describes what functionalities will no longer exist in the coming major release.
4
-
5
- ## ember-promise-modals.modals-from-string
6
-
7
- _Added in 4.1.0, functionality to be removed in 5.0.0_
8
-
9
- The new Embroider build system prefers static imports when dynamically invoking components. To resolve this deprecation, you need to replace the path to the modal component with an imported component class:
10
-
11
- ```js
12
- // before
13
- export class ApplicationController extends Controller {
14
- @service modals;
15
-
16
- @action
17
- async show() {
18
- await this.modals.open('my-modal');
19
- }
20
- }
21
-
22
- // after
23
- import MyModal from 'my-app/components/my-modal';
24
-
25
- export class ApplicationController extends Controller {
26
- @service modals;
27
-
28
- @action
29
- async show() {
30
- await this.modals.open(MyModal);
31
- }
32
- }
33
- ```
34
-
35
- > Caution: old-style components that have their template in `app/templates/components` instead of co-located next to their Javascript in `app/components` can't work correctly when discovered via their component class, because there's no way to locate the template. They should either port to being co-located (which is a simple mechanical transformation and highly recommended) or should import their own template and set it as layout as was traditional in addons before co-location was available.
36
-
37
- -- [Replacing Component Helper.md](https://github.com/embroider-build/embroider/blob/main/docs/replacing-component-helper.md#when-youre-invoking-a-component-youve-been-given)
38
-
39
- ## PostCSS process
40
-
41
- Currently, the addon's CSS is run through PostCSS by default, which will create static
42
- fallbacks for all custom properties using their defaults. It also provides the option `excludeCSS` so you can import the uncompiled addon styles in your project's `app/styles/app.css` and run your own PostCSS using `postcss-import`:
43
-
44
- ```js
45
- // before
46
- let app = new EmberApp(defaults, {
47
- 'ember-promise-modals': {
48
- excludeCSS: true,
49
- },
50
- });
51
-
52
- return maybeEmbroider(app);
53
- ```
54
-
55
- This functionality no longer stands in Embroider world because [v2 addons are static](https://github.com/embroider-build/embroider/blob/HEAD/docs/spec.md). When installed in your app, they don't do anything at build-time.
56
-
57
- As most browsers have been supporting CSS variables for several years, the v2 addon will no longer process the CSS and the components will import the non-processed styles. However, if you still need the static fallbacks `postcss-preset-env` used to generate, you can re-implement the functionality on the app side with a [Webpack config](https://webpack.js.org/loaders/postcss-loader/). For instance:
58
-
59
- ```js
60
- let app = new EmberApp(defaults, {});
61
-
62
- return maybeEmbroider(app, {
63
- packagerOptions: {
64
- webpackConfig: {
65
- module: {
66
- rules: [
67
- {
68
- test: /\.css$/i,
69
- use: [
70
- {
71
- loader: 'postcss-loader',
72
- options: {
73
- postcssOptions: {
74
- plugins: [['postcss-preset-env', { stage: 3 }]],
75
- },
76
- },
77
- },
78
- ],
79
- },
80
- ],
81
- },
82
- },
83
- },
84
- });
85
- ```
86
-
87
- ## Ember < 3.28 & node < 16 support
88
-
89
- The v2 addon will no longer support Ember versions lower than 3.28.
90
-
91
- Additionally, it will have dependencies such as `ember-cli-babel@8.2.0` that require node 16, so node 12 and node 14 will be removed from the supported engines.
package/MIGRATION.md DELETED
@@ -1,80 +0,0 @@
1
- # Migration
2
-
3
- ## From 0.x.x to 1.x.x
4
-
5
- Version 1.0.0 replaced the ember-animated powered animations with CSS based animations. In addition to that the default animation was also changed. This guide will show you how to get the animations of the old version.
6
-
7
- ### From top/bottom animations
8
-
9
- The first step is to add some CSS which replicates the old animations to your app.
10
-
11
- ```css
12
- /* app/styles/app.css */
13
-
14
- /* === Variation 1: Custom animation which animates the modal in from the bottom and back */
15
- @keyframes from-bottom-in {
16
- 0% {
17
- opacity: 0;
18
- transform: translate(0, calc(50vh + 50%));
19
- }
20
- 100% {
21
- opacity: 1;
22
- transform: translate(0, 0);
23
- }
24
- }
25
-
26
- @keyframes from-bottom-out {
27
- 0% {
28
- opacity: 1;
29
- transform: translate(0, 0);
30
- }
31
- 100% {
32
- opacity: 0;
33
- transform: translate(0, calc(50vh + 50%));
34
- }
35
- }
36
-
37
- /* === Variation 2: Custom animation which animates the modal in from the top and back */
38
- @keyframes from-top-in {
39
- 0% {
40
- opacity: 0;
41
- transform: translate(0, calc(-50vh - 50%));
42
- }
43
- 100% {
44
- opacity: 1;
45
- transform: translate(0, 0);
46
- }
47
- }
48
-
49
- @keyframes from-top-out {
50
- 0% {
51
- opacity: 1;
52
- transform: translate(0, 0);
53
- }
54
- 100% {
55
- opacity: 0;
56
- transform: translate(0, calc(-50vh - 50%));
57
- }
58
- }
59
- ```
60
-
61
- Furthermore, some CSS variables will need to be overridden so that the new animation will be used (whichever of the two you prefer).
62
-
63
- ```css
64
- /* app/styles/app.css */
65
- :root {
66
- --epm-animation-backdrop-in-duration: 0.6s;
67
- --epm-animation-backdrop-out-duration: 0.6s;
68
- --epm-animation-modal-in-duration: 0.25s;
69
- --epm-animation-modal-out-duration: 0.25s;
70
- --epm-animation-modal-in: from-top-in var(--epm-animation-in-duration) ease-out;
71
- --epm-animation-modal-out: from-top-out var(--epm-animation-out-duration) ease-in;
72
- }
73
- ```
74
-
75
- ### Using both animations
76
-
77
- If you need to switch between both animations it's easiest to replicate the setup shown in the dummy app. See [the application.js controller](./tests/dummy/app/controllers/application.js)
78
- for how the modals are openend in your JavaScript actions and look at
79
- [app.css](./tests/dummy/app/styles/app.css) for the style definition of these
80
- custom animations.