ember-promise-modals 5.0.0 → 5.0.1

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 CHANGED
@@ -11,8 +11,7 @@ The better way to handle modals in your Ember.js apps.
11
11
  ## Compatibility
12
12
 
13
13
  - Ember.js v3.28 or above
14
- - Ember CLI v3.28 or above
15
- - Node.js v16 or above
14
+ - Embroider or ember-auto-import v2
16
15
 
17
16
  ## Installation
18
17
 
@@ -1,14 +1,21 @@
1
- import Component, { setComponentTemplate } from '@ember/component';
1
+ import "./epm-modal-container.css"
2
2
  import { inject } from '@ember/service';
3
- import './epm-modal-container.css';
3
+ import Component from '@glimmer/component';
4
4
  import { precompileTemplate } from '@ember/template-compilation';
5
+ import { g, i } from 'decorator-transforms/runtime';
6
+ import { setComponentTemplate } from '@ember/component';
7
+
8
+ ;
5
9
 
6
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}}");
7
11
 
8
- var epmModalContainer = setComponentTemplate(TEMPLATE, Component.extend({
9
- tagName: '',
10
- modals: inject()
11
- }));
12
+ class EpmModalContainer extends Component {
13
+ static {
14
+ g(this.prototype, "modals", [inject]);
15
+ }
16
+ #modals = (i(this, "modals"), void 0);
17
+ }
18
+ setComponentTemplate(TEMPLATE, EpmModalContainer);
12
19
 
13
- export { epmModalContainer as default };
20
+ export { EpmModalContainer as default };
14
21
  //# sourceMappingURL=epm-modal-container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"epm-modal-container.js","sources":["../../src/components/epm-modal-container.hbs","../../src/components/epm-modal-container.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default 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}}\")","import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\n\nimport './epm-modal-container.css';\n\nexport default Component.extend({\n tagName: '',\n\n modals: service(),\n});\n"],"names":["setComponentTemplate","TEMPLATE","Component","extend","tagName","modals","service"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,iXAAiX;;ACInZ,wBAAAA,oBAAA,CAAAC,QAAA,EAAeC,SAAS,CAACC,MAAM,CAAC;AAC9BC,EAAAA,OAAO,EAAE,EAAE;EAEXC,MAAM,EAAEC,MAAO,EAAC;AAClB,CAAC,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"epm-modal-container.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,59 +1,67 @@
1
- import Component, { setComponentTemplate } from '@ember/component';
2
- import { set } from '@ember/object';
3
- import { readOnly } from '@ember/object/computed';
4
- import { guidFor } from '@ember/object/internals';
1
+
2
+ import { action } from '@ember/object';
5
3
  import { inject } from '@ember/service';
4
+ import Component from '@glimmer/component';
5
+ import { tracked } from '@glimmer/tracking';
6
+ import { modifier } from 'ember-modifier';
6
7
  import { createFocusTrap } from 'focus-trap';
7
8
  import { precompileTemplate } from '@ember/template-compilation';
9
+ import { g, i, n } from 'decorator-transforms/runtime';
10
+ import { setComponentTemplate } from '@ember/component';
8
11
 
9
- var TEMPLATE = precompileTemplate("{{!-- template-lint-disable no-action --}}\n<div id={{this.modalElementId}} class=\"epm-modal {{this.optionsClassName}} {{this.animatingClass}}\">\n {{#let (component (ensure-safe-component @modal._componentClass) data=@modal._data close=(action \"close\")) as |ModalComponent|}}\n <ModalComponent />\n {{/let}}\n</div>");
12
+ 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>");
10
13
 
11
- var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
12
- tagName: '',
13
- outAnimationClass: 'epm-out',
14
- animatingClass: '',
15
- modals: inject(),
16
- optionsClassName: readOnly('modal._options.className'),
17
- modalElementId: null,
18
- focusTrapOptions: null,
19
- _animationEnd: null,
20
- init() {
21
- this._super(...arguments);
22
- set(this, 'modalElementId', guidFor(this));
23
- this.modal._componentInstance = this;
14
+ class EpmModal extends Component {
15
+ static {
16
+ g(this.prototype, "modals", [inject]);
17
+ }
18
+ #modals = (i(this, "modals"), void 0);
19
+ element = null;
20
+ outAnimationClass = 'epm-out';
21
+ _animationEnd = null;
22
+ static {
23
+ g(this.prototype, "animatingClass", [tracked], function () {
24
+ return '';
25
+ });
26
+ }
27
+ #animatingClass = (i(this, "animatingClass"), void 0);
28
+ get optionsClassName() {
29
+ return this.args.modal._options.className;
30
+ }
31
+ get focusTrapOptions() {
24
32
  let {
25
33
  focusTrapOptions: globalFocusTrapOptions
26
34
  } = this.modals;
27
35
  let {
28
36
  focusTrapOptions: localFocusTrapOptions
29
- } = this.modal._options;
30
- if (localFocusTrapOptions !== null) {
31
- this.focusTrapOptions = localFocusTrapOptions || globalFocusTrapOptions;
37
+ } = this.args.modal._options;
38
+ if (localFocusTrapOptions !== undefined) {
39
+ return localFocusTrapOptions;
32
40
  }
33
- },
34
- didInsertElement() {
35
- this._super(...arguments);
41
+ return globalFocusTrapOptions;
42
+ }
43
+ setup = modifier(element => {
44
+ this.element = element;
36
45
  this._addFocusTrap();
37
46
  this._addAnimationListeners();
38
47
 
39
48
  // animating in starts when the element is added to the DOM. Inform the service about it.
40
49
  this.modals._onModalAnimationStart();
41
- },
42
- willDestroyElement() {
43
- this.destroyModal();
44
- this._super(...arguments);
45
- },
46
- _getElement() {
47
- return document.getElementById(this.modalElementId);
48
- },
50
+ return () => {
51
+ this.destroyModal();
52
+ };
53
+ });
54
+ constructor() {
55
+ super(...arguments);
56
+ this.args.modal._componentInstance = this;
57
+ }
49
58
  _addFocusTrap() {
50
- let element = this._getElement();
51
59
  if (!this.focusTrapOptions) {
52
60
  return;
53
61
  }
54
62
  let options = {
55
63
  ...this.focusTrapOptions,
56
- fallbackFocus: element,
64
+ fallbackFocus: this.element,
57
65
  onDeactivate: (...args) => {
58
66
  this.focusTrapOptions.onDeactivate?.(...args);
59
67
  if (this.isDestroyed || this.isDestroying) {
@@ -62,9 +70,9 @@ var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
62
70
  this.closeModal();
63
71
  }
64
72
  };
65
- this.focusTrap = createFocusTrap(element, options);
73
+ this.focusTrap = createFocusTrap(this.element, options);
66
74
  this.focusTrap.activate();
67
- },
75
+ }
68
76
  _removeFocusTrap(onDeactivate = this.focusTrapOptions?.onDeactivate) {
69
77
  if (!this.focusTrap) {
70
78
  return;
@@ -72,14 +80,14 @@ var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
72
80
  this.focusTrap.deactivate({
73
81
  onDeactivate
74
82
  });
75
- },
83
+ }
76
84
  _addAnimationListeners() {
77
85
  this._animationEnd = ({
78
86
  target,
79
87
  animationName
80
88
  }) => {
81
89
  // ignore animations bubbling up
82
- if (target !== this._getElement()) {
90
+ if (target !== this.element) {
83
91
  return;
84
92
  }
85
93
 
@@ -87,24 +95,22 @@ var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
87
95
  this.modals._onModalAnimationEnd();
88
96
  let isOutAnimation = animationName.substring(animationName.length - 4) === '-out';
89
97
  if (isOutAnimation) {
90
- this.modal._remove();
98
+ this.args.modal._remove();
91
99
  }
92
100
  };
93
- let element = this._getElement();
94
- if (element) {
95
- element.addEventListener('animationend', this._animationEnd);
101
+ if (this.element) {
102
+ this.element.addEventListener('animationend', this._animationEnd);
96
103
  }
97
- },
104
+ }
98
105
  _removeAnimationListeners() {
99
106
  if (!this._animationEnd) {
100
107
  return;
101
108
  }
102
- let element = this._getElement();
103
- if (element) {
104
- element.removeEventListener('animationend', this._animationEnd);
109
+ if (this.element) {
110
+ this.element.removeEventListener('animationend', this._animationEnd);
105
111
  }
106
112
  this._animationEnd = null;
107
- },
113
+ }
108
114
  destroyModal() {
109
115
  // Remove the focus trap without triggering the optional onDeactivate() hook
110
116
  this._removeFocusTrap(null);
@@ -113,8 +119,8 @@ var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
113
119
  this._removeAnimationListeners();
114
120
 
115
121
  // make sure that we remove the modal, also resolving the test waiter
116
- this.modal._remove();
117
- },
122
+ this.args.modal._remove();
123
+ }
118
124
  closeModal(result) {
119
125
  if (this.animatingClass !== '') {
120
126
  return;
@@ -122,18 +128,20 @@ var epmModal = setComponentTemplate(TEMPLATE, Component.extend({
122
128
  this.modals._onModalAnimationStart();
123
129
 
124
130
  // This triggers the out animation, which in turn will remove the modal after it completes
125
- set(this, 'animatingClass', this.outAnimationClass);
126
- this.modal._resolve(result);
127
- },
128
- actions: {
129
- close(result) {
130
- this.closeModal(result);
131
+ this.animatingClass = this.outAnimationClass;
132
+ this.args.modal._resolve(result);
133
+ }
134
+ close(result) {
135
+ this.closeModal(result);
131
136
 
132
- // Remove the focus trap, triggering the onDeactivate() hook
133
- this._removeFocusTrap();
134
- }
137
+ // Remove the focus trap, triggering the onDeactivate() hook
138
+ this._removeFocusTrap();
139
+ }
140
+ static {
141
+ n(this.prototype, "close", [action]);
135
142
  }
136
- }));
143
+ }
144
+ setComponentTemplate(TEMPLATE, EpmModal);
137
145
 
138
- export { epmModal as default };
146
+ export { EpmModal as default };
139
147
  //# sourceMappingURL=epm-modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"epm-modal.js","sources":["../../src/components/epm-modal.hbs","../../src/components/epm-modal.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!-- template-lint-disable no-action --}}\\n<div id={{this.modalElementId}} class=\\\"epm-modal {{this.optionsClassName}} {{this.animatingClass}}\\\">\\n {{#let (component (ensure-safe-component @modal._componentClass) data=@modal._data close=(action \\\"close\\\")) as |ModalComponent|}}\\n <ModalComponent />\\n {{/let}}\\n</div>\")","import Component from '@ember/component';\nimport { set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\nimport { guidFor } from '@ember/object/internals';\nimport { inject as service } from '@ember/service';\n\nimport { createFocusTrap } from 'focus-trap';\n\nexport default Component.extend({\n tagName: '',\n outAnimationClass: 'epm-out',\n animatingClass: '',\n\n modals: service(),\n\n optionsClassName: readOnly('modal._options.className'),\n\n modalElementId: null,\n focusTrapOptions: null,\n _animationEnd: null,\n\n init() {\n this._super(...arguments);\n\n set(this, 'modalElementId', guidFor(this));\n\n this.modal._componentInstance = this;\n\n let { focusTrapOptions: globalFocusTrapOptions } = this.modals;\n let { focusTrapOptions: localFocusTrapOptions } = this.modal._options;\n\n if (localFocusTrapOptions !== null) {\n this.focusTrapOptions = localFocusTrapOptions || globalFocusTrapOptions;\n }\n },\n\n didInsertElement() {\n this._super(...arguments);\n\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\n willDestroyElement() {\n this.destroyModal();\n\n this._super(...arguments);\n },\n\n _getElement() {\n return document.getElementById(this.modalElementId);\n },\n\n _addFocusTrap() {\n let element = this._getElement();\n\n if (!this.focusTrapOptions) {\n return;\n }\n\n let options = {\n ...this.focusTrapOptions,\n fallbackFocus: 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(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._getElement()) {\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.modal._remove();\n }\n };\n\n let element = this._getElement();\n if (element) {\n element.addEventListener('animationend', this._animationEnd);\n }\n },\n\n _removeAnimationListeners() {\n if (!this._animationEnd) {\n return;\n }\n\n let element = this._getElement();\n if (element) {\n 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.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 set(this, 'animatingClass', this.outAnimationClass);\n\n this.modal._resolve(result);\n },\n\n actions: {\n close(result) {\n this.closeModal(result);\n\n // Remove the focus trap, triggering the onDeactivate() hook\n this._removeFocusTrap();\n },\n },\n});\n"],"names":["setComponentTemplate","TEMPLATE","Component","extend","tagName","outAnimationClass","animatingClass","modals","service","optionsClassName","readOnly","modalElementId","focusTrapOptions","_animationEnd","init","_super","arguments","set","guidFor","modal","_componentInstance","globalFocusTrapOptions","localFocusTrapOptions","_options","didInsertElement","_addFocusTrap","_addAnimationListeners","_onModalAnimationStart","willDestroyElement","destroyModal","_getElement","document","getElementById","element","options","fallbackFocus","onDeactivate","args","isDestroyed","isDestroying","closeModal","focusTrap","createFocusTrap","activate","_removeFocusTrap","deactivate","target","animationName","_onModalAnimationEnd","isOutAnimation","substring","length","_remove","addEventListener","_removeAnimationListeners","removeEventListener","result","_resolve","actions","close"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,sUAAsU;;ACOxW,eAAAA,oBAAA,CAAAC,QAAA,EAAeC,SAAS,CAACC,MAAM,CAAC;AAC9BC,EAAAA,OAAO,EAAE,EAAE;AACXC,EAAAA,iBAAiB,EAAE,SAAS;AAC5BC,EAAAA,cAAc,EAAE,EAAE;EAElBC,MAAM,EAAEC,MAAO,EAAE;AAEjBC,EAAAA,gBAAgB,EAAEC,QAAQ,CAAC,0BAA0B,CAAC;AAEtDC,EAAAA,cAAc,EAAE,IAAI;AACpBC,EAAAA,gBAAgB,EAAE,IAAI;AACtBC,EAAAA,aAAa,EAAE,IAAI;AAEnBC,EAAAA,IAAIA,GAAG;AACL,IAAA,IAAI,CAACC,MAAM,CAAC,GAAGC,SAAS,CAAC,CAAA;IAEzBC,GAAG,CAAC,IAAI,EAAE,gBAAgB,EAAEC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;AAE1C,IAAA,IAAI,CAACC,KAAK,CAACC,kBAAkB,GAAG,IAAI,CAAA;IAEpC,IAAI;AAAER,MAAAA,gBAAgB,EAAES,sBAAAA;KAAwB,GAAG,IAAI,CAACd,MAAM,CAAA;IAC9D,IAAI;AAAEK,MAAAA,gBAAgB,EAAEU,qBAAAA;AAAsB,KAAC,GAAG,IAAI,CAACH,KAAK,CAACI,QAAQ,CAAA;IAErE,IAAID,qBAAqB,KAAK,IAAI,EAAE;AAClC,MAAA,IAAI,CAACV,gBAAgB,GAAGU,qBAAqB,IAAID,sBAAsB,CAAA;AACzE,KAAA;GACD;AAEDG,EAAAA,gBAAgBA,GAAG;AACjB,IAAA,IAAI,CAACT,MAAM,CAAC,GAAGC,SAAS,CAAC,CAAA;IAEzB,IAAI,CAACS,aAAa,EAAE,CAAA;IACpB,IAAI,CAACC,sBAAsB,EAAE,CAAA;;AAE7B;AACA,IAAA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AAO,EAAE,CAAA;GACrB;EAEDZ,UAAUA,CAACgB,MAAM,EAAE;AACjB,IAAA,IAAI,IAAI,CAAClD,cAAc,KAAK,EAAE,EAAE;AAC9B,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAI,CAACC,MAAM,CAACoB,sBAAsB,EAAE,CAAA;;AAEpC;IACAV,GAAG,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAACZ,iBAAiB,CAAC,CAAA;AAEnD,IAAA,IAAI,CAACc,KAAK,CAACsC,QAAQ,CAACD,MAAM,CAAC,CAAA;GAC5B;AAEDE,EAAAA,OAAO,EAAE;IACPC,KAAKA,CAACH,MAAM,EAAE;AACZ,MAAA,IAAI,CAAChB,UAAU,CAACgB,MAAM,CAAC,CAAA;;AAEvB;MACA,IAAI,CAACZ,gBAAgB,EAAE,CAAA;AACzB,KAAA;AACF,GAAA;AACF,CAAC,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"epm-modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import Helper from '@ember/component/helper';
2
3
  import { inject } from '@ember/service';
3
4
  import { g, i } from 'decorator-transforms/runtime';
@@ -1 +1 @@
1
- {"version":3,"file":"open-modal.js","sources":["../../src/helpers/open-modal.js"],"sourcesContent":["import Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\n\nexport default class OpenModalHelper extends Helper {\n @service modals;\n\n modal = null;\n\n compute([modalComponent, data, options], { close }) {\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 if (close) {\n close(success);\n }\n }\n\n hideModal() {\n this.modal?.close();\n }\n\n willDestroy() {\n this.hideModal();\n super.willDestroy(...arguments);\n }\n}\n"],"names":["OpenModalHelper","Helper","g","this","prototype","service","i","void 0","modal","compute","modalComponent","data","options","close","showModal","modals","open","success","hideModal","willDestroy","arguments"],"mappings":";;;;AAGe,MAAMA,eAAe,SAASC,MAAM,CAAC;AAAA,EAAA;AAAAC,IAAAA,CAAA,CAAAC,IAAA,CAAAC,SAAA,aACjDC,MAAO,CAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAAA,IAAAC,CAAA,CAAAH,IAAA,aAAAI,KAAA,CAAA,EAAA;AAERC,EAAAA,KAAK,GAAG,IAAI,CAAA;EAEZC,OAAOA,CAAC,CAACC,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC,EAAE;AAAEC,IAAAA,KAAAA;AAAM,GAAC,EAAE;IAClD,IAAI,CAACC,SAAS,CAACJ,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,CAAC,CAAA;AACtD,GAAA;EAEA,MAAMC,SAASA,CAACJ,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAE;AACpD,IAAA,IAAI,CAACL,KAAK,GAAG,IAAI,CAACO,MAAM,CAACC,IAAI,CAACN,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC,CAAA;AAE5D,IAAA,IAAIK,OAAO,GAAG,MAAM,IAAI,CAACT,KAAK,CAAA;IAE9B,IAAI,CAACA,KAAK,GAAG,IAAI,CAAA;AAEjB,IAAA,IAAIK,KAAK,EAAE;MACTA,KAAK,CAACI,OAAO,CAAC,CAAA;AAChB,KAAA;AACF,GAAA;AAEAC,EAAAA,SAASA,GAAG;AACV,IAAA,IAAI,CAACV,KAAK,EAAEK,KAAK,EAAE,CAAA;AACrB,GAAA;AAEAM,EAAAA,WAAWA,GAAG;IACZ,IAAI,CAACD,SAAS,EAAE,CAAA;AAChB,IAAA,KAAK,CAACC,WAAW,CAAC,GAAGC,SAAS,CAAC,CAAA;AACjC,GAAA;AACF;;;;"}
1
+ {"version":3,"file":"open-modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/modal.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  import { computed, set } from '@ember/object';
2
3
  import { waitForPromise } from '@ember/test-waiters';
3
4
  import { defer } from 'rsvp';
package/dist/modal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../src/modal.js"],"sourcesContent":["// eslint-disable-next-line ember/no-computed-properties-in-native-classes\nimport { computed, set } from '@ember/object';\nimport { waitForPromise } from '@ember/test-waiters';\n\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 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._deferredOutAnimation = undefined;\n this._componentInstance = undefined;\n }\n\n get result() {\n return this._result;\n }\n\n @computed('_deferredOutAnimation')\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 set(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 this._service._stack.removeObject(this);\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","constructor","service","componentClass","data","options","_service","_componentClass","_data","_options","className","onAnimationModalOutEnd","undefined","_result","_deferred","defer","_deferredOutAnimation","_componentInstance","result","isClosing","Boolean","n","this","prototype","computed","close","closeModal","then","onFulfilled","onRejected","promise","_destroy","destroyModal","_resolve","set","catch","resolve","waitForPromise","_remove","_stack","removeObject","length","_onLastModalRemoved"],"mappings":";;;;;AAAA;AAqBe,MAAMA,KAAK,CAAC;EACzBC,WAAWA,CAACC,OAAO,EAAEC,cAAc,EAAEC,IAAI,EAAEC,OAAO,GAAG,EAAE,EAAE;IACvD,IAAI,CAACC,QAAQ,GAAGJ,OAAO,CAAA;IACvB,IAAI,CAACK,eAAe,GAAGJ,cAAc,CAAA;IACrC,IAAI,CAACK,KAAK,GAAGJ,IAAI,CAAA;IACjB,IAAI,CAACK,QAAQ,GAAG;AACdC,MAAAA,SAAS,EAAE,EAAE;AACbC,MAAAA,sBAAsB,EAAEC,SAAS;MACjC,GAAGP,OAAAA;KACJ,CAAA;IACD,IAAI,CAACQ,OAAO,GAAGD,SAAS,CAAA;AACxB,IAAA,IAAI,CAACE,SAAS,GAAGC,KAAK,EAAE,CAAA;IACxB,IAAI,CAACC,qBAAqB,GAAGJ,SAAS,CAAA;IACtC,IAAI,CAACK,kBAAkB,GAAGL,SAAS,CAAA;AACrC,GAAA;EAEA,IAAIM,MAAMA,GAAG;IACX,OAAO,IAAI,CAACL,OAAO,CAAA;AACrB,GAAA;EAEA,IACIM,SAASA,GAAG;AACd,IAAA,OAAOC,OAAO,CAAC,IAAI,CAACJ,qBAAqB,CAAC,CAAA;AAC5C,GAAA;AAAC,EAAA;IAAAK,CAAA,CAAAC,IAAA,CAAAC,SAAA,gBAHAC,QAAQ,CAAC,uBAAuB,CAAC,CAAA,CAAA,CAAA;AAAA,GAAA;EAKlCC,KAAKA,CAACP,MAAM,EAAE;IACZ,IAAI,IAAI,CAACD,kBAAkB,EAAE;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,QAAQ,CAACoC,mBAAmB,EAAE,CAAA;AACrC,KAAA;IAEA,IAAI,CAACzB,kBAAkB,GAAGL,SAAS,CAAA;IAEnC,IAAI,IAAI,CAACI,qBAAqB,EAAE;AAC9B,MAAA,IAAI,CAACA,qBAAqB,CAACoB,OAAO,EAAE,CAAA;AACtC,KAAA;AACF,GAAA;AACF;;;;"}
1
+ {"version":3,"file":"modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { A } from '@ember/array';
2
3
  import { computed } from '@ember/object';
3
4
  import { alias } from '@ember/object/computed';
@@ -1 +1 @@
1
- {"version":3,"file":"modals.js","sources":["../../src/services/modals.js"],"sourcesContent":["import { A } from '@ember/array';\nimport { computed } from '@ember/object';\nimport { alias } from '@ember/object/computed';\nimport Service from '@ember/service';\n\nimport Modal from '../modal';\n\nexport default Service.extend({\n count: computed('_stack.@each.isClosing', function () {\n return this._stack.filter(modal => !modal.isClosing).length;\n }),\n top: alias('_stack.lastObject'),\n\n focusTrapOptions: undefined,\n\n init() {\n this._super(...arguments);\n this._stack = A([]);\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 this._super(...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.pushObject(modal);\n\n if (this._stack.length === 1) {\n this._onFirstModalAdded();\n }\n\n return modal;\n },\n\n _destroyModals() {\n this._stack.forEach(modal => {\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":["Service","extend","count","computed","_stack","filter","modal","isClosing","length","top","alias","focusTrapOptions","undefined","init","_super","arguments","A","clickOutsideDeactivates","willDestroy","_onLastModalRemoved","_onModalAnimationEnd","_destroyModals","open","componentClass","data","options","Modal","pushObject","_onFirstModalAdded","forEach","_destroy","document","body","classList","add","remove","_onModalAnimationStart"],"mappings":";;;;;;AAOA,aAAeA,OAAO,CAACC,MAAM,CAAC;AAC5BC,EAAAA,KAAK,EAAEC,QAAQ,CAAC,wBAAwB,EAAE,YAAY;AACpD,IAAA,OAAO,IAAI,CAACC,MAAM,CAACC,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACC,SAAS,CAAC,CAACC,MAAM,CAAA;AAC7D,GAAC,CAAC;AACFC,EAAAA,GAAG,EAAEC,KAAK,CAAC,mBAAmB,CAAC;AAE/BC,EAAAA,gBAAgB,EAAEC,SAAS;AAE3BC,EAAAA,IAAIA,GAAG;AACL,IAAA,IAAI,CAACC,MAAM,CAAC,GAAGC,SAAS,CAAC,CAAA;AACzB,IAAA,IAAI,CAACX,MAAM,GAAGY,CAAC,CAAC,EAAE,CAAC,CAAA;AAEnB,IAAA,IAAI,IAAI,CAACL,gBAAgB,KAAK,IAAI,EAAE;MAClC,IAAI,CAACA,gBAAgB,GAAG;AACtB,QAAA,IAAI,IAAI,CAACA,gBAAgB,IAAI,EAAE;AAC/BM,QAAAA,uBAAuB,EAAE,IAAI,CAACN,gBAAgB,EAAEM,uBAAuB,IAAI,IAAA;OAC5E,CAAA;AACH,KAAA;GACD;AAEDC,EAAAA,WAAWA,GAAG;IACZ,IAAI,CAACC,mBAAmB,EAAE,CAAA;IAC1B,IAAI,CAACC,oBAAoB,EAAE,CAAA;IAC3B,IAAI,CAACC,cAAc,EAAE,CAAA;AAErB,IAAA,IAAI,CAACP,MAAM,CAAC,GAAGC,SAAS,CAAC,CAAA;GAC1B;AAED;AACF;AACA;AACA;AACA;AACA;AACEO,EAAAA,IAAIA,CAACC,cAAc,EAAEC,IAAI,EAAEC,OAAO,EAAE;AAClC,IAAA,IAAInB,KAAK,GAAG,IAAIoB,KAAK,CAAC,IAAI,EAAEH,cAAc,EAAEC,IAAI,EAAEC,OAAO,CAAC,CAAA;AAE1D,IAAA,IAAI,CAACrB,MAAM,CAACuB,UAAU,CAACrB,KAAK,CAAC,CAAA;AAE7B,IAAA,IAAI,IAAI,CAACF,MAAM,CAACI,MAAM,KAAK,CAAC,EAAE;MAC5B,IAAI,CAACoB,kBAAkB,EAAE,CAAA;AAC3B,KAAA;AAEA,IAAA,OAAOtB,KAAK,CAAA;GACb;AAEDe,EAAAA,cAAcA,GAAG;AACf,IAAA,IAAI,CAACjB,MAAM,CAACyB,OAAO,CAACvB,KAAK,IAAI;MAC3BA,KAAK,CAACwB,QAAQ,EAAE,CAAA;AAClB,KAAC,CAAC,CAAA;GACH;AAEDF,EAAAA,kBAAkBA,GAAG;IACnBG,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,GAAG,CAAC,wBAAwB,CAAC,CAAA;GACtD;AAEDf,EAAAA,mBAAmBA,GAAG;IACpBY,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,wBAAwB,CAAC,CAAA;GACzD;AAEDC,EAAAA,sBAAsBA,GAAG;IACvBL,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,GAAG,CAAC,eAAe,CAAC,CAAA;GAC7C;AAEDd,EAAAA,oBAAoBA,GAAG;IACrBW,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAC,eAAe,CAAC,CAAA;AACjD,GAAA;AACF,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"modals.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+
1
2
  import { settled } from '@ember/test-helpers';
2
3
 
3
4
  function setMinimum(propertyName) {
@@ -1 +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,KA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1
1
  {
2
2
  "name": "ember-promise-modals",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "The better way to handle modals in your Ember.js apps.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -36,37 +36,41 @@
36
36
  "dependencies": {
37
37
  "@ember/test-waiters": "^3.0.2",
38
38
  "@embroider/addon-shim": "^1.8.7",
39
- "@embroider/util": "^1.7.1",
40
- "decorator-transforms": "^1.0.1",
41
- "focus-trap": "^6.9.3"
39
+ "@embroider/util": "^1.13.3",
40
+ "@glimmer/tracking": "^1.1.2",
41
+ "decorator-transforms": "^2.0.0",
42
+ "ember-modifier": "4.2.2",
43
+ "focus-trap": "^7.0.0"
42
44
  },
43
45
  "devDependencies": {
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",
46
+ "@babel/core": "7.28.0",
47
+ "@babel/eslint-parser": "7.28.0",
48
+ "@babel/plugin-proposal-decorators": "7.28.0",
49
+ "@babel/plugin-transform-class-properties": "7.27.1",
50
+ "@ember/test-helpers": "5.2.2",
51
+ "@embroider/addon-dev": "8.1.0",
52
+ "@glimmer/component": "1.1.2",
49
53
  "@rollup/plugin-babel": "6.0.4",
50
- "ember-template-lint": "5.13.0",
51
- "eslint": "8.57.0",
52
- "eslint-config-prettier": "8.10.0",
53
- "eslint-plugin-ember": "11.12.0",
54
- "eslint-plugin-import-helpers": "1.3.1",
55
- "eslint-plugin-n": "16.6.2",
56
- "eslint-plugin-prettier": "4.2.1",
57
- "eslint-plugin-promise": "6.1.1",
54
+ "ember-template-lint": "7.9.1",
55
+ "eslint": "8.57.1",
56
+ "eslint-config-prettier": "9.1.0",
57
+ "eslint-plugin-ember": "12.6.0",
58
+ "eslint-plugin-import-helpers": "2.0.1",
59
+ "eslint-plugin-n": "17.21.0",
60
+ "eslint-plugin-prettier": "5.5.1",
61
+ "eslint-plugin-promise": "6.6.0",
58
62
  "eslint-plugin-qunit": "7.3.4",
59
63
  "npm-run-all": "4.1.5",
60
- "prettier": "2.8.8",
61
- "rollup": "4.14.0",
64
+ "prettier": "3.6.2",
65
+ "rollup": "4.45.1",
62
66
  "rollup-plugin-copy": "3.5.0",
63
- "webpack": "5.89.0"
67
+ "webpack": "5.100.2"
64
68
  },
65
69
  "peerDependencies": {
66
- "@ember/test-helpers": "^3.0.0"
70
+ "@ember/test-helpers": "^3.0.0 || ^5.0.0"
67
71
  },
68
72
  "engines": {
69
- "node": ">= 16.*"
73
+ "node": ">= 18.*"
70
74
  },
71
75
  "ember": {
72
76
  "edition": "octane"