ember-promise-modals 5.0.1 → 5.1.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/README.md +1 -1
- package/dist/components/epm-modal-container.js +3 -2
- package/dist/components/epm-modal.js +3 -3
- package/dist/components/epm-modal.js.map +1 -1
- package/dist/helpers/open-modal.js +9 -6
- package/dist/helpers/open-modal.js.map +1 -1
- package/dist/modal.js +13 -10
- package/dist/modal.js.map +1 -1
- package/dist/services/modals.js +26 -26
- package/dist/services/modals.js.map +1 -1
- package/dist/test-support/index.js +0 -1
- package/dist/test-support/index.js.map +1 -1
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ To use EPM in your project, add the target for the modals to your `application.h
|
|
|
30
30
|
Then you can inject the `modals` [service](https://guides.emberjs.com/release/services/#toc_accessing-services) wherever you need and call its `open` method with a component class to render it as a modal.
|
|
31
31
|
|
|
32
32
|
```js
|
|
33
|
-
import {
|
|
33
|
+
import { service } from '@ember/service';
|
|
34
34
|
import ConfirmationModal from 'my-app/components/confirmation-modal';
|
|
35
35
|
|
|
36
36
|
export default class extends Component {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./epm-modal-container.css"
|
|
2
|
-
import
|
|
2
|
+
import * as emberService from '@ember/service';
|
|
3
3
|
import Component from '@glimmer/component';
|
|
4
4
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
5
|
import { g, i } from 'decorator-transforms/runtime';
|
|
@@ -9,9 +9,10 @@ import { setComponentTemplate } from '@ember/component';
|
|
|
9
9
|
|
|
10
10
|
var TEMPLATE = precompileTemplate("{{#each this.modals._stack as |modal index|}}\n <div\n class=\"epm-backdrop {{if modal.isClosing \"epm-out\"}}\"\n tabindex=\"-1\"\n role=\"presentation\"\n aria-hidden=\"true\"\n data-test-epm-backdrop=\"{{index}}\"\n />\n <div class=\"epm-modal-container\">\n <EpmModal @modal={{modal}} data-test-epm-modal=\"{{index}}\" />\n </div>\n{{/each}}");
|
|
11
11
|
|
|
12
|
+
const service = emberService.service ?? emberService.inject;
|
|
12
13
|
class EpmModalContainer extends Component {
|
|
13
14
|
static {
|
|
14
|
-
g(this.prototype, "modals", [
|
|
15
|
+
g(this.prototype, "modals", [service]);
|
|
15
16
|
}
|
|
16
17
|
#modals = (i(this, "modals"), void 0);
|
|
17
18
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
1
|
import { action } from '@ember/object';
|
|
3
|
-
import
|
|
2
|
+
import * as emberService from '@ember/service';
|
|
4
3
|
import Component from '@glimmer/component';
|
|
5
4
|
import { tracked } from '@glimmer/tracking';
|
|
6
5
|
import { modifier } from 'ember-modifier';
|
|
@@ -11,9 +10,10 @@ import { setComponentTemplate } from '@ember/component';
|
|
|
11
10
|
|
|
12
11
|
var TEMPLATE = precompileTemplate("<div {{this.setup}} class=\"epm-modal {{this.optionsClassName}} {{this.animatingClass}}\">\n {{#let (component (ensure-safe-component @modal._componentClass)) as |ModalComponent|}}\n <ModalComponent @data={{@modal._data}} @close={{this.close}} />\n {{/let}}\n</div>");
|
|
13
12
|
|
|
13
|
+
const service = emberService.service ?? emberService.inject;
|
|
14
14
|
class EpmModal extends Component {
|
|
15
15
|
static {
|
|
16
|
-
g(this.prototype, "modals", [
|
|
16
|
+
g(this.prototype, "modals", [service]);
|
|
17
17
|
}
|
|
18
18
|
#modals = (i(this, "modals"), void 0);
|
|
19
19
|
element = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epm-modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"epm-modal.js","sources":["../../src/components/epm-modal.js"],"sourcesContent":["import { action } from '@ember/object';\nimport * as emberService from '@ember/service';\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { modifier } from 'ember-modifier';\nimport { createFocusTrap } from 'focus-trap';\n\nconst service = emberService.service ?? emberService.inject;\n\nexport default class EpmModal extends Component {\n @service modals;\n\n element = null;\n outAnimationClass = 'epm-out';\n _animationEnd = null;\n\n @tracked animatingClass = '';\n\n get optionsClassName() {\n return this.args.modal._options.className;\n }\n\n get focusTrapOptions() {\n let { focusTrapOptions: globalFocusTrapOptions } = this.modals;\n let { focusTrapOptions: localFocusTrapOptions } = this.args.modal._options;\n\n if (localFocusTrapOptions !== undefined) {\n return localFocusTrapOptions;\n }\n\n return globalFocusTrapOptions;\n }\n\n setup = modifier(element => {\n this.element = element;\n this._addFocusTrap();\n this._addAnimationListeners();\n\n // animating in starts when the element is added to the DOM. Inform the service about it.\n this.modals._onModalAnimationStart();\n\n return () => {\n this.destroyModal();\n };\n });\n\n constructor() {\n super(...arguments);\n\n this.args.modal._componentInstance = this;\n }\n\n _addFocusTrap() {\n if (!this.focusTrapOptions) {\n return;\n }\n\n let options = {\n ...this.focusTrapOptions,\n fallbackFocus: this.element,\n onDeactivate: (...args) => {\n this.focusTrapOptions.onDeactivate?.(...args);\n\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this.closeModal();\n },\n };\n\n this.focusTrap = createFocusTrap(this.element, options);\n this.focusTrap.activate();\n }\n\n _removeFocusTrap(onDeactivate = this.focusTrapOptions?.onDeactivate) {\n if (!this.focusTrap) {\n return;\n }\n\n this.focusTrap.deactivate({ onDeactivate });\n }\n\n _addAnimationListeners() {\n this._animationEnd = ({ target, animationName }) => {\n // ignore animations bubbling up\n if (target !== this.element) {\n return;\n }\n\n // An animation has ended, inform the modals service\n this.modals._onModalAnimationEnd();\n\n let isOutAnimation = animationName.substring(animationName.length - 4) === '-out';\n if (isOutAnimation) {\n this.args.modal._remove();\n }\n };\n\n if (this.element) {\n this.element.addEventListener('animationend', this._animationEnd);\n }\n }\n\n _removeAnimationListeners() {\n if (!this._animationEnd) {\n return;\n }\n\n if (this.element) {\n this.element.removeEventListener('animationend', this._animationEnd);\n }\n\n this._animationEnd = null;\n }\n\n destroyModal() {\n // Remove the focus trap without triggering the optional onDeactivate() hook\n this._removeFocusTrap(null);\n\n // Remove the animation listeners\n this._removeAnimationListeners();\n\n // make sure that we remove the modal, also resolving the test waiter\n this.args.modal._remove();\n }\n\n closeModal(result) {\n if (this.animatingClass !== '') {\n return;\n }\n\n this.modals._onModalAnimationStart();\n\n // This triggers the out animation, which in turn will remove the modal after it completes\n this.animatingClass = this.outAnimationClass;\n\n this.args.modal._resolve(result);\n }\n\n @action\n close(result) {\n this.closeModal(result);\n\n // Remove the focus trap, triggering the onDeactivate() hook\n this._removeFocusTrap();\n }\n}\n"],"names":["service","emberService","inject","EpmModal","Component","g","prototype","i","void 0","element","outAnimationClass","_animationEnd","tracked","optionsClassName","args","modal","_options","className","focusTrapOptions","globalFocusTrapOptions","modals","localFocusTrapOptions","undefined","setup","modifier","_addFocusTrap","_addAnimationListeners","_onModalAnimationStart","destroyModal","constructor","arguments","_componentInstance","options","fallbackFocus","onDeactivate","isDestroyed","isDestroying","closeModal","focusTrap","createFocusTrap","activate","_removeFocusTrap","deactivate","target","animationName","_onModalAnimationEnd","isOutAnimation","substring","length","_remove","addEventListener","_removeAnimationListeners","removeEventListener","result","animatingClass","_resolve","close","n","action","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;;AAQA,MAAMA,OAAO,GAAGC,YAAY,CAACD,OAAO,IAAIC,YAAY,CAACC,MAAM;AAE5C,MAAMC,QAAQ,SAASC,SAAS,CAAC;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CAC7CN,OAAO,CAAA,CAAA;AAAA;AAAA,EAAA,OAAA,IAAAO,CAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAAC,MAAA;AAERC,EAAAA,OAAO,GAAG,IAAI;AACdC,EAAAA,iBAAiB,GAAG,SAAS;AAC7BC,EAAAA,aAAa,GAAG,IAAI;AAAC,EAAA;IAAAN,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CAEpBM,OAA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/helper';
|
|
3
|
-
import
|
|
2
|
+
import * as emberService from '@ember/service';
|
|
4
3
|
import { g, i } from 'decorator-transforms/runtime';
|
|
5
4
|
|
|
5
|
+
const service = emberService.service ?? emberService.inject;
|
|
6
6
|
class OpenModalHelper extends Helper {
|
|
7
7
|
static {
|
|
8
|
-
g(this.prototype, "modals", [
|
|
8
|
+
g(this.prototype, "modals", [service]);
|
|
9
9
|
}
|
|
10
10
|
#modals = (i(this, "modals"), void 0);
|
|
11
11
|
modal = null;
|
|
12
|
+
once = false;
|
|
12
13
|
compute([modalComponent, data, options], {
|
|
13
14
|
close
|
|
14
15
|
}) {
|
|
16
|
+
if (this.modal || this.once) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this.once = true;
|
|
15
20
|
this.showModal(modalComponent, data, options, close);
|
|
16
21
|
}
|
|
17
22
|
async showModal(modalComponent, data, options, close) {
|
|
18
23
|
this.modal = this.modals.open(modalComponent, data, options);
|
|
19
24
|
let success = await this.modal;
|
|
20
25
|
this.modal = null;
|
|
21
|
-
|
|
22
|
-
close(success);
|
|
23
|
-
}
|
|
26
|
+
close?.(success);
|
|
24
27
|
}
|
|
25
28
|
hideModal() {
|
|
26
29
|
this.modal?.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"open-modal.js","sources":["../../src/helpers/open-modal.js"],"sourcesContent":["import Helper from '@ember/component/helper';\nimport * as emberService from '@ember/service';\nconst service = emberService.service ?? emberService.inject;\n\nexport default class OpenModalHelper extends Helper {\n @service modals;\n\n modal = null;\n once = false;\n\n compute([modalComponent, data, options], { close }) {\n if (this.modal || this.once) {\n return;\n }\n\n this.once = true;\n\n this.showModal(modalComponent, data, options, close);\n }\n\n async showModal(modalComponent, data, options, close) {\n this.modal = this.modals.open(modalComponent, data, options);\n\n let success = await this.modal;\n\n this.modal = null;\n\n close?.(success);\n }\n\n hideModal() {\n this.modal?.close();\n }\n\n willDestroy() {\n this.hideModal();\n super.willDestroy(...arguments);\n }\n}\n"],"names":["service","emberService","inject","OpenModalHelper","Helper","g","prototype","i","void 0","modal","once","compute","modalComponent","data","options","close","showModal","modals","open","success","hideModal","willDestroy","arguments"],"mappings":";;;;AAEA,MAAMA,OAAO,GAAGC,YAAY,CAACD,OAAO,IAAIC,YAAY,CAACC,MAAM;AAE5C,MAAMC,eAAe,SAASC,MAAM,CAAC;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,QAAA,EAAA,CACjDN,OAAO,CAAA,CAAA;AAAA;AAAA,EAAA,OAAA,IAAAO,CAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAAC,MAAA;AAERC,EAAAA,KAAK,GAAG,IAAI;AACZC,EAAAA,IAAI,GAAG,KAAK;EAEZC,OAAOA,CAAC,CAACC,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC,EAAE;AAAEC,IAAAA;AAAM,GAAC,EAAE;AAClD,IAAA,IAAI,IAAI,CAACN,KAAK,IAAI,IAAI,CAACC,IAAI,EAAE;AAC3B,MAAA;AACF,IAAA;IAEA,IAAI,CAACA,IAAI,GAAG,IAAI;IAEhB,IAAI,CAACM,SAAS,CAACJ,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,CAAC;AACtD,EAAA;EAEA,MAAMC,SAASA,CAACJ,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAE;AACpD,IAAA,IAAI,CAACN,KAAK,GAAG,IAAI,CAACQ,MAAM,CAACC,IAAI,CAACN,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC;AAE5D,IAAA,IAAIK,OAAO,GAAG,MAAM,IAAI,CAACV,KAAK;IAE9B,IAAI,CAACA,KAAK,GAAG,IAAI;IAEjBM,KAAK,GAAGI,OAAO,CAAC;AAClB,EAAA;AAEAC,EAAAA,SAASA,GAAG;AACV,IAAA,IAAI,CAACX,KAAK,EAAEM,KAAK,EAAE;AACrB,EAAA;AAEAM,EAAAA,WAAWA,GAAG;IACZ,IAAI,CAACD,SAAS,EAAE;AAChB,IAAA,KAAK,CAACC,WAAW,CAAC,GAAGC,SAAS,CAAC;AACjC,EAAA;AACF;;;;"}
|
package/dist/modal.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { computed, set } from '@ember/object';
|
|
3
1
|
import { waitForPromise } from '@ember/test-waiters';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
3
|
import { defer } from 'rsvp';
|
|
5
|
-
import {
|
|
4
|
+
import { g, i } from 'decorator-transforms/runtime';
|
|
6
5
|
|
|
7
|
-
// eslint-disable-next-line ember/no-computed-properties-in-native-classes
|
|
8
6
|
class Modal {
|
|
7
|
+
static {
|
|
8
|
+
g(this.prototype, "_deferredOutAnimation", [tracked], function () {
|
|
9
|
+
return undefined;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
#_deferredOutAnimation = (i(this, "_deferredOutAnimation"), void 0);
|
|
9
13
|
constructor(service, componentClass, data, options = {}) {
|
|
10
14
|
this._service = service;
|
|
11
15
|
this._componentClass = componentClass;
|
|
@@ -17,7 +21,6 @@ class Modal {
|
|
|
17
21
|
};
|
|
18
22
|
this._result = undefined;
|
|
19
23
|
this._deferred = defer();
|
|
20
|
-
this._deferredOutAnimation = undefined;
|
|
21
24
|
this._componentInstance = undefined;
|
|
22
25
|
}
|
|
23
26
|
get result() {
|
|
@@ -26,9 +29,6 @@ class Modal {
|
|
|
26
29
|
get isClosing() {
|
|
27
30
|
return Boolean(this._deferredOutAnimation);
|
|
28
31
|
}
|
|
29
|
-
static {
|
|
30
|
-
n(this.prototype, "isClosing", [computed('_deferredOutAnimation')]);
|
|
31
|
-
}
|
|
32
32
|
close(result) {
|
|
33
33
|
if (this._componentInstance) {
|
|
34
34
|
this._componentInstance.closeModal(result);
|
|
@@ -47,7 +47,7 @@ class Modal {
|
|
|
47
47
|
if (this._deferredOutAnimation) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
this._deferredOutAnimation = defer();
|
|
51
51
|
if (this._options.onAnimationModalOutEnd) {
|
|
52
52
|
this._deferredOutAnimation.promise.then(() => this._options.onAnimationModalOutEnd()).catch(() => {});
|
|
53
53
|
}
|
|
@@ -56,7 +56,10 @@ class Modal {
|
|
|
56
56
|
waitForPromise(this._deferredOutAnimation.promise);
|
|
57
57
|
}
|
|
58
58
|
_remove() {
|
|
59
|
-
this._service._stack.
|
|
59
|
+
const index = this._service._stack.indexOf(this);
|
|
60
|
+
if (index !== -1) {
|
|
61
|
+
this._service._stack.splice(index, 1);
|
|
62
|
+
}
|
|
60
63
|
if (this._service._stack.length === 0) {
|
|
61
64
|
this._service._onLastModalRemoved();
|
|
62
65
|
}
|
package/dist/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../src/modal.js"],"sourcesContent":["import { waitForPromise } from '@ember/test-waiters';\n\nimport { tracked } from '@glimmer/tracking';\nimport { defer } from 'rsvp';\n\n/**\n * @typedef {Object} ModalOptions\n * @property {Function} [onAnimationModalOutEnd]\n * @property {String} [className] - CSS class name passed to the modal element\n */\n\n/**\n * @class Modal\n * @param {Service} service\n * @param {String} componentClass\n * @param {any} data\n * @param {ModalOptions} options\n * @method close - closes the modal\n * @method then - resolves when the modal is closed\n */\nexport default class Modal {\n @tracked _deferredOutAnimation = undefined;\n\n constructor(service, componentClass, data, options = {}) {\n this._service = service;\n this._componentClass = componentClass;\n this._data = data;\n this._options = {\n className: '',\n onAnimationModalOutEnd: undefined,\n ...options,\n };\n this._result = undefined;\n this._deferred = defer();\n this._componentInstance = undefined;\n }\n\n get result() {\n return this._result;\n }\n\n get isClosing() {\n return Boolean(this._deferredOutAnimation);\n }\n\n close(result) {\n if (this._componentInstance) {\n this._componentInstance.closeModal(result);\n }\n }\n\n then(onFulfilled, onRejected) {\n return this._deferred.promise.then(onFulfilled, onRejected);\n }\n\n _destroy() {\n if (!this._componentInstance) {\n return;\n }\n\n this._componentInstance.destroyModal();\n }\n\n _resolve(result) {\n if (this._deferredOutAnimation) {\n return;\n }\n\n this._deferredOutAnimation = defer();\n if (this._options.onAnimationModalOutEnd) {\n this._deferredOutAnimation.promise.then(() => this._options.onAnimationModalOutEnd()).catch(() => {});\n }\n\n this._result = result;\n this._deferred.resolve(result);\n\n waitForPromise(this._deferredOutAnimation.promise);\n }\n\n _remove() {\n const index = this._service._stack.indexOf(this);\n if (index !== -1) {\n this._service._stack.splice(index, 1);\n }\n\n if (this._service._stack.length === 0) {\n this._service._onLastModalRemoved();\n }\n\n this._componentInstance = undefined;\n\n if (this._deferredOutAnimation) {\n this._deferredOutAnimation.resolve();\n }\n }\n}\n"],"names":["Modal","g","prototype","tracked","undefined","i","void 0","constructor","service","componentClass","data","options","_service","_componentClass","_data","_options","className","onAnimationModalOutEnd","_result","_deferred","defer","_componentInstance","result","isClosing","Boolean","_deferredOutAnimation","close","closeModal","then","onFulfilled","onRejected","promise","_destroy","destroyModal","_resolve","catch","resolve","waitForPromise","_remove","index","_stack","indexOf","splice","length","_onLastModalRemoved"],"mappings":";;;;;AAoBe,MAAMA,KAAK,CAAC;AAAA,EAAA;IAAAC,CAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,uBAAA,EAAA,CACxBC,OAAO,CAAA,EAAA,YAAA;AAAA,MAAA,OAAyBC,SAAS;AAAA,IAAA,CAAA,CAAA;AAAA;AAAA,EAAA,sBAAA,IAAAC,CAAA,CAAA,IAAA,EAAA,uBAAA,CAAA,EAAAC,MAAA;EAE1CC,WAAWA,CAACC,OAAO,EAAEC,cAAc,EAAEC,IAAI,EAAEC,OAAO,GAAG,EAAE,EAAE;IACvD,IAAI,CAACC,QAAQ,GAAGJ,OAAO;IACvB,IA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,IAAI,CAACb,QAAQ,CAACE,sBAAsB,EAAE,CAAC,CAACkB,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACvG,IAAA;IAEA,IAAI,CAACjB,OAAO,GAAGI,MAAM;AACrB,IAAA,IAAI,CAACH,SAAS,CAACiB,OAAO,CAACd,MAAM,CAAC;AAE9Be,IAAAA,cAAc,CAAC,IAAI,CAACZ,qBAAqB,CAACM,OAAO,CAAC;AACpD,EAAA;AAEAO,EAAAA,OAAOA,GAAG;IACR,MAAMC,KAAK,GAAG,IAAI,CAAC3B,QAAQ,CAAC4B,MAAM,CAACC,OAAO,CAAC,IAAI,CAAC;AAChD,IAAA,IAAIF,KAAK,KAAK,EAAE,EAAE;MAChB,IAAI,CAAC3B,QAAQ,CAAC4B,MAAM,CAACE,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;AACvC,IAAA;IAEA,IAAI,IAAI,CAAC3B,QAAQ,CAAC4B,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;AACrC,MAAA,IAAI,CAAC/B,QAAQ,CAACgC,mBAAmB,EAAE;AACrC,IAAA;IAEA,IAAI,CAACvB,kBAAkB,GAAGjB,SAAS;IAEnC,IAAI,IAAI,CAACqB,qBAAqB,EAAE;AAC9B,MAAA,IAAI,CAACA,qBAAqB,CAACW,OAAO,EAAE;AACtC,IAAA;AACF,EAAA;AACF;;;;"}
|
package/dist/services/modals.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { computed } from '@ember/object';
|
|
4
|
-
import { alias } from '@ember/object/computed';
|
|
5
|
-
import Service from '@ember/service';
|
|
1
|
+
import emberService__default from '@ember/service';
|
|
2
|
+
import { TrackedArray } from 'tracked-built-ins';
|
|
6
3
|
import Modal from '../modal.js';
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
class ModalsService extends emberService__default {
|
|
6
|
+
_stack = new TrackedArray([]);
|
|
7
|
+
focusTrapOptions = undefined;
|
|
8
|
+
get count() {
|
|
10
9
|
return this._stack.filter(modal => !modal.isClosing).length;
|
|
11
|
-
}
|
|
12
|
-
top
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
}
|
|
11
|
+
get top() {
|
|
12
|
+
return this._stack.at(-1);
|
|
13
|
+
}
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
17
16
|
if (this.focusTrapOptions !== null) {
|
|
18
17
|
this.focusTrapOptions = {
|
|
19
18
|
...(this.focusTrapOptions ?? {}),
|
|
20
19
|
clickOutsideDeactivates: this.focusTrapOptions?.clickOutsideDeactivates ?? true
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
}
|
|
22
|
+
}
|
|
24
23
|
willDestroy() {
|
|
25
24
|
this._onLastModalRemoved();
|
|
26
25
|
this._onModalAnimationEnd();
|
|
27
26
|
this._destroyModals();
|
|
28
|
-
|
|
29
|
-
}
|
|
27
|
+
super.willDestroy(...arguments);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
30
|
/**
|
|
31
31
|
* @param {*} componentClass component class
|
|
32
32
|
* @param {*} data passed to the component template
|
|
@@ -35,30 +35,30 @@ var modals = Service.extend({
|
|
|
35
35
|
*/
|
|
36
36
|
open(componentClass, data, options) {
|
|
37
37
|
let modal = new Modal(this, componentClass, data, options);
|
|
38
|
-
this._stack.
|
|
38
|
+
this._stack.push(modal);
|
|
39
39
|
if (this._stack.length === 1) {
|
|
40
40
|
this._onFirstModalAdded();
|
|
41
41
|
}
|
|
42
42
|
return modal;
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
_destroyModals() {
|
|
45
|
-
this._stack
|
|
45
|
+
for (let modal of this._stack) {
|
|
46
46
|
modal._destroy();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
49
|
_onFirstModalAdded() {
|
|
50
50
|
document.body.classList.add('epm-scrolling-disabled');
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
52
|
_onLastModalRemoved() {
|
|
53
53
|
document.body.classList.remove('epm-scrolling-disabled');
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
55
|
_onModalAnimationStart() {
|
|
56
56
|
document.body.classList.add('epm-animating');
|
|
57
|
-
}
|
|
57
|
+
}
|
|
58
58
|
_onModalAnimationEnd() {
|
|
59
59
|
document.body.classList.remove('epm-animating');
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { ModalsService as default };
|
|
64
64
|
//# sourceMappingURL=modals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"modals.js","sources":["../../src/services/modals.js"],"sourcesContent":["import Service from '@ember/service';\n\nimport { TrackedArray } from 'tracked-built-ins';\n\nimport Modal from '../modal';\n\nexport default class ModalsService extends Service {\n _stack = new TrackedArray([]);\n\n focusTrapOptions = undefined;\n\n get count() {\n return this._stack.filter(modal => !modal.isClosing).length;\n }\n\n get top() {\n return this._stack.at(-1);\n }\n\n constructor() {\n super(...arguments);\n\n if (this.focusTrapOptions !== null) {\n this.focusTrapOptions = {\n ...(this.focusTrapOptions ?? {}),\n clickOutsideDeactivates: this.focusTrapOptions?.clickOutsideDeactivates ?? true,\n };\n }\n }\n\n willDestroy() {\n this._onLastModalRemoved();\n this._onModalAnimationEnd();\n this._destroyModals();\n\n super.willDestroy(...arguments);\n }\n\n /**\n * @param {*} componentClass component class\n * @param {*} data passed to the component template\n * @param {ModalOptions} options applied to the modal\n * @returns {Modal}\n */\n open(componentClass, data, options) {\n let modal = new Modal(this, componentClass, data, options);\n\n this._stack.push(modal);\n\n if (this._stack.length === 1) {\n this._onFirstModalAdded();\n }\n\n return modal;\n }\n\n _destroyModals() {\n for (let modal of this._stack) {\n modal._destroy();\n }\n }\n\n _onFirstModalAdded() {\n document.body.classList.add('epm-scrolling-disabled');\n }\n\n _onLastModalRemoved() {\n document.body.classList.remove('epm-scrolling-disabled');\n }\n\n _onModalAnimationStart() {\n document.body.classList.add('epm-animating');\n }\n\n _onModalAnimationEnd() {\n document.body.classList.remove('epm-animating');\n }\n}\n"],"names":["ModalsService","Service","_stack","TrackedArray","focusTrapOptions","undefined","count","filter","modal","isClosing","length","top","at","constructor","arguments","clickOutsideDeactivates","willDestroy","_onLastModalRemoved","_onModalAnimationEnd","_destroyModals","open","componentClass","data","options","Modal","push","_onFirstModalAdded","_destroy","document","body","classList","add","remove","_onModalAnimationStart"],"mappings":";;;;AAMe,MAAMA,aAAa,SAASC,qBAAO,CAAC;AACjDC,EAAAA,MAAM,GAAG,IAAIC,YAAY,CAAC,EAAE,CAAC;AAE7BC,EAAAA,gBAAgB,GAAGC,SAAS;EAE5B,IAAIC,KAAKA,GAAG;AACV,IAAA,OAAO,IAAI,CAACJ,MAAM,CAACK,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACC,SAAS,CAAC,CAACC,MAAM;AAC7D,EAAA;EAEA,IAAIC,GAAGA,GAAG;IACR,OAAO,IAAI,CAACT,MAAM,CAACU,EAAE,CAAC,EAAE,CAAC;AAC3B,EAAA;AAEAC,EAAAA,WAAWA,GAAG;IACZ,KAAK,CAAC,GAAGC,SAAS,CAAC;AAEnB,IAAA,IAAI,IAAI,CAACV,gBAAgB,KAAK,IAAI,EAAE;MAClC,IAAI,CAACA,gBAAgB,GAAG;AACtB,QAAA,IAAI,IAAI,CAACA,gBAAgB,IAAI,EAAE,CAAC;AAChCW,QAAAA,uBAAuB,EAAE,IAAI,CAACX,gBAAgB,EAAEW,uBAAuB,IAAI;OAC5E;AACH,IAAA;AACF,EAAA;AAEAC,EAAAA,WAAWA,GAAG;IACZ,IAAI,CAACC,mBAAmB,EAAE;IAC1B,IAAI,CAACC,oBAAoB,EAAE;IAC3B,IAAI,CAACC,cAAc,EAAE;AAErB,IAAA,KAAK,CAACH,WAAW,CAAC,GAAGF,SAAS,CAAC;AACjC,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACEM,EAAAA,IAAIA,CAACC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAE;AAClC,IAAA,IAAIf,KAAK,GAAG,IAAIgB,KAAK,CAAC,IAAI,EAAEH,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC;AAE1D,IAAA,IAAI,CAACrB,MAAM,CAACuB,IAAI,CAACjB,KAAK,CAAC;AAEvB,IAAA,IAAI,IAAI,CAACN,MAAM,CAACQ,MAAM,KAAK,CAAC,EAAE;MAC5B,IAAI,CAACgB,kBAAkB,EAAE;AAC3B,IAAA;AAEA,IAAA,OAAOlB,KAAK;AACd,EAAA;AAEAW,EAAAA,cAAcA,GAAG;AACf,IAAA,KAAK,IAAIX,KAAK,IAAI,IAAI,CAACN,MAAM,EAAE;MAC7BM,KAAK,CAACmB,QAAQ,EAAE;AAClB,IAAA;AACF,EAAA;AAEAD,EAAAA,kBAAkBA,GAAG;IACnBE,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,GAAG,CAAC,wBAAwB,CAAC;AACvD,EAAA;AAEAd,EAAAA,mBAAmBA,GAAG;IACpBW,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,wBAAwB,CAAC;AAC1D,EAAA;AAEAC,EAAAA,sBAAsBA,GAAG;IACvBL,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,GAAG,CAAC,eAAe,CAAC;AAC9C,EAAA;AAEAb,EAAAA,oBAAoBA,GAAG;IACrBU,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,eAAe,CAAC;AACjD,EAAA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
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;AACpE;AAEA,SAASK,YAAYA,CAACL,YAAY,EAAE;EAClCC,QAAQ,CAACC,eAAe,CAACC,KAAK,CAACG,cAAc,CAACN,YAAY,CAAC;AAC7D;AAEO,SAASO,kBAAkBA,CAACC,KAAK,EAAE;EACxCA,KAAK,CAACC,UAAU,CAAC,YAAY;IAC3BV,UAAU,CAAC,sCAAsC,CAAC;IAClDA,UAAU,CAAC,uCAAuC,CAAC;IACnDA,UAAU,CAAC,mCAAmC,CAAC;IAC/CA,UAAU,CAAC,oCAAoC,CAAC;IAChDA,UAAU,CAAC,mCAAmC,CAAC;IAC/CA,UAAU,CAAC,oCAAoC,CAAC;IAChDA,UAAU,CAAC,gCAAgC,CAAC;IAC5CA,UAAU,CAAC,iCAAiC,CAAC;IAE7C,IAAI,CAACW,MAAM,GAAG,IAAI,CAACC,KAAK,CAACC,MAAM,CAAC,gBAAgB,CAAC;AACnD,EAAA,CAAC,CAAC;EAEFJ,KAAK,CAACK,SAAS,CAAC,kBAAkB;AAChC;IACA,IAAI,IAAI,CAACH,MAAM,EAAE;AACf,MAAA,IAAI,CAACA,MAAM,CAACI,cAAc,EAAE;AAC9B,IAAA;IAEA,OAAO,IAAI,CAACJ,MAAM;IAElBL,YAAY,CAAC,sCAAsC,CAAC;IACpDA,YAAY,CAAC,uCAAuC,CAAC;IACrDA,YAAY,CAAC,mCAAmC,CAAC;IACjDA,YAAY,CAAC,oCAAoC,CAAC;IAClDA,YAAY,CAAC,mCAAmC,CAAC;IACjDA,YAAY,CAAC,oCAAoC,CAAC;IAClDA,YAAY,CAAC,gCAAgC,CAAC;IAC9CA,YAAY,CAAC,iCAAiC,CAAC;;AAE/C;IACA,MAAMU,OAAO,EAAE;AACjB,EAAA,CAAC,CAAC;AACJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-promise-modals",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "The better way to handle modals in your Ember.js apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -39,30 +39,31 @@
|
|
|
39
39
|
"@embroider/util": "^1.13.3",
|
|
40
40
|
"@glimmer/tracking": "^1.1.2",
|
|
41
41
|
"decorator-transforms": "^2.0.0",
|
|
42
|
-
"ember-modifier": "4.2.2",
|
|
43
|
-
"focus-trap": "^7.0.0"
|
|
42
|
+
"ember-modifier": "^4.2.2",
|
|
43
|
+
"focus-trap": "^7.0.0",
|
|
44
|
+
"tracked-built-ins": "^4.0.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@babel/core": "7.28.
|
|
47
|
-
"@babel/eslint-parser": "7.28.
|
|
47
|
+
"@babel/core": "7.28.5",
|
|
48
|
+
"@babel/eslint-parser": "7.28.5",
|
|
48
49
|
"@babel/plugin-proposal-decorators": "7.28.0",
|
|
49
50
|
"@babel/plugin-transform-class-properties": "7.27.1",
|
|
50
51
|
"@ember/test-helpers": "5.2.2",
|
|
51
|
-
"@embroider/addon-dev": "8.1.
|
|
52
|
+
"@embroider/addon-dev": "8.1.2",
|
|
52
53
|
"@glimmer/component": "1.1.2",
|
|
53
54
|
"@rollup/plugin-babel": "6.0.4",
|
|
54
|
-
"ember-template-lint": "7.9.
|
|
55
|
+
"ember-template-lint": "7.9.3",
|
|
55
56
|
"eslint": "8.57.1",
|
|
56
|
-
"eslint-config-prettier": "9.1.
|
|
57
|
+
"eslint-config-prettier": "9.1.2",
|
|
57
58
|
"eslint-plugin-ember": "12.6.0",
|
|
58
59
|
"eslint-plugin-import-helpers": "2.0.1",
|
|
59
|
-
"eslint-plugin-n": "17.21.
|
|
60
|
-
"eslint-plugin-prettier": "5.5.
|
|
60
|
+
"eslint-plugin-n": "17.21.3",
|
|
61
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
61
62
|
"eslint-plugin-promise": "6.6.0",
|
|
62
|
-
"eslint-plugin-qunit": "
|
|
63
|
+
"eslint-plugin-qunit": "8.2.5",
|
|
63
64
|
"npm-run-all": "4.1.5",
|
|
64
65
|
"prettier": "3.6.2",
|
|
65
|
-
"rollup": "4.45.
|
|
66
|
+
"rollup": "4.45.3",
|
|
66
67
|
"rollup-plugin-copy": "3.5.0",
|
|
67
68
|
"webpack": "5.100.2"
|
|
68
69
|
},
|