ember-attacher 3.1.0 → 3.2.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.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MaterialThemeProjectNewConfig">
|
|
4
|
+
<option name="metadata">
|
|
5
|
+
<MTProjectMetadataState>
|
|
6
|
+
<option name="migrated" value="true" />
|
|
7
|
+
<option name="pristineConfig" value="false" />
|
|
8
|
+
<option name="userId" value="5b08c17b:17c50dc6df3:-8000" />
|
|
9
|
+
<option name="version" value="8.13.2" />
|
|
10
|
+
</MTProjectMetadataState>
|
|
11
|
+
</option>
|
|
12
|
+
</component>
|
|
13
|
+
</project>
|
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
## v3.2.0 (2024-11-08)
|
|
6
7
|
|
|
7
8
|
#### :boom: Breaking Change
|
|
8
9
|
* [#843](https://github.com/tylerturdenpants/ember-attacher/pull/843) Drop ember-in-element-polyfill from dependencies ([@pzubar](https://github.com/pzubar))
|
|
9
10
|
|
|
10
11
|
#### :rocket: Enhancement
|
|
12
|
+
* [#988](https://github.com/tylerturdenpants/ember-attacher/pull/988) Replace deprecated `(action)` helper ([@dmytro-krekota](https://github.com/dmytro-krekota))
|
|
11
13
|
* [#887](https://github.com/tylerturdenpants/ember-attacher/pull/887) [chore]: Bump ember-cli-babel from 7.26.11 to 8.2.0 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
12
14
|
* [#820](https://github.com/tylerturdenpants/ember-attacher/pull/820) Fix the "cancelAnimationFrame is not defined" error in fastboot ([@pzubar](https://github.com/pzubar))
|
|
13
15
|
* [#790](https://github.com/tylerturdenpants/ember-attacher/pull/790) Bump ember-maybe-in-element to supress build-time warning ([@pzubar](https://github.com/pzubar))
|
|
@@ -20,6 +22,8 @@
|
|
|
20
22
|
* [#784](https://github.com/tylerturdenpants/ember-attacher/pull/784) Prevent overflow by default ([@pzubar](https://github.com/pzubar))
|
|
21
23
|
|
|
22
24
|
#### :house: Internal
|
|
25
|
+
* [#991](https://github.com/tylerturdenpants/ember-attacher/pull/991) [chore]: Bump flexi to 3.0.0-alpha.1 ([@pzubar](https://github.com/pzubar))
|
|
26
|
+
* [#990](https://github.com/tylerturdenpants/ember-attacher/pull/990) [chore]: Bump socket.io from 4.6.1 to 4.8.1 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
23
27
|
* [#867](https://github.com/tylerturdenpants/ember-attacher/pull/867) [chore]: Bump ember-truth-helpers from 3.1.1 to 4.0.3 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
24
28
|
* [#928](https://github.com/tylerturdenpants/ember-attacher/pull/928) [chore]: Bump ip from 1.1.8 to 1.1.9 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
25
29
|
* [#827](https://github.com/tylerturdenpants/ember-attacher/pull/827) [chore]: Bump @ember/test-helpers from 2.9.3 to 2.9.4 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
@@ -31,6 +35,15 @@
|
|
|
31
35
|
* [#811](https://github.com/tylerturdenpants/ember-attacher/pull/811) Remove the "beyond ember 3.24" support note ([@pzubar](https://github.com/pzubar))
|
|
32
36
|
* [#783](https://github.com/tylerturdenpants/ember-attacher/pull/783) Upgrade Ember to v4 ([@pzubar](https://github.com/pzubar))
|
|
33
37
|
|
|
38
|
+
#### Committers: 2
|
|
39
|
+
- Dmytro K. ([@dmytro-krekota](https://github.com/dmytro-krekota))
|
|
40
|
+
- Petro Zubar ([@pzubar](https://github.com/pzubar))
|
|
41
|
+
|
|
42
|
+
## v3.1.0 (2024-03-07)
|
|
43
|
+
#### :rocket: Enhancement
|
|
44
|
+
* [#932](https://github.com/tylerturdenpants/ember-attacher/pull/932) Drop `@ember/render-modifiers` ([@pzubar](https://github.com/pzubar))
|
|
45
|
+
* [#887](https://github.com/tylerturdenpants/ember-attacher/pull/887) [chore]: Bump ember-cli-babel from 7.26.11 to 8.2.0 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
46
|
+
|
|
34
47
|
#### Committers: 1
|
|
35
48
|
- Petro Zubar ([@pzubar](https://github.com/pzubar))
|
|
36
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { action } from '@ember/object';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
|
-
import { cancel, debounce, later, next, run
|
|
3
|
+
import { cancel, debounce, later, next, run } from '@ember/runloop';
|
|
4
4
|
import { getOwner } from '@ember/application';
|
|
5
5
|
import { guidFor } from '@ember/object/internals';
|
|
6
6
|
import { htmlSafe, isHTMLSafe } from '@ember/template';
|
|
@@ -10,7 +10,6 @@ import { isEmpty, typeOf } from '@ember/utils';
|
|
|
10
10
|
import { autoUpdate, computePosition, arrow, flip, limitShift, shift } from '@floating-ui/dom';
|
|
11
11
|
import { buildWaiter } from '@ember/test-waiters';
|
|
12
12
|
import { tracked } from '@glimmer/tracking';
|
|
13
|
-
import { modifier } from 'ember-modifier';
|
|
14
13
|
import DEFAULTS from '../defaults';
|
|
15
14
|
|
|
16
15
|
const animationTestWaiter = buildWaiter('attach-popover');
|
|
@@ -294,18 +293,20 @@ export default class AttachPopover extends Component {
|
|
|
294
293
|
this._hide();
|
|
295
294
|
}
|
|
296
295
|
|
|
297
|
-
|
|
296
|
+
@action
|
|
297
|
+
onParentFinderInsert(element) {
|
|
298
298
|
this.parentElement = element.parentElement;
|
|
299
|
-
|
|
300
|
-
}
|
|
299
|
+
this._initializeAttacher();
|
|
300
|
+
}
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
@action
|
|
303
|
+
_ensureArgumentsAreValid() {
|
|
303
304
|
stripInProduction(() => {
|
|
304
|
-
if (arrow && this.isFillAnimation) {
|
|
305
|
+
if (this.arrow && this.isFillAnimation) {
|
|
305
306
|
warn('Animation: \'fill\' is not compatible with arrow: true', { id: 70015 });
|
|
306
307
|
}
|
|
307
308
|
|
|
308
|
-
if (useCapture !== this._lastUseCaptureArgumentValue) {
|
|
309
|
+
if (this.useCapture !== this._lastUseCaptureArgumentValue) {
|
|
309
310
|
warn(
|
|
310
311
|
'The value of the useCapture argument was mutated',
|
|
311
312
|
{ id: 'ember-attacher.use-capture-mutated' }
|
|
@@ -402,11 +403,15 @@ export default class AttachPopover extends Component {
|
|
|
402
403
|
});
|
|
403
404
|
}
|
|
404
405
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
@action
|
|
407
|
+
onTargetOrTriggerChange() {
|
|
408
|
+
this._initializeAttacher();
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@action
|
|
412
|
+
onIsShownChange() {
|
|
413
|
+
const isShown = this.isShown;
|
|
408
414
|
|
|
409
|
-
onIsShownChange = modifier((_, [isShown]) => {
|
|
410
415
|
if (isShown === true && this._isHidden) {
|
|
411
416
|
this._show();
|
|
412
417
|
|
|
@@ -416,18 +421,7 @@ export default class AttachPopover extends Component {
|
|
|
416
421
|
} else if (isShown === false && !this._isHidden) {
|
|
417
422
|
this._hide();
|
|
418
423
|
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
initializeAttacher = modifier((floatingElement) => {
|
|
422
|
-
this._floatingElement = floatingElement;
|
|
423
|
-
|
|
424
|
-
if (this.renderInPlace) {
|
|
425
|
-
this.parentElement = floatingElement.parentElement;
|
|
426
|
-
once(this, '_initializeAttacher');
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
return () => this._cleanup?.();
|
|
430
|
-
});
|
|
424
|
+
}
|
|
431
425
|
|
|
432
426
|
/**
|
|
433
427
|
* ================== SHOW ATTACHMENT LOGIC ==================
|
|
@@ -774,14 +768,31 @@ export default class AttachPopover extends Component {
|
|
|
774
768
|
});
|
|
775
769
|
}
|
|
776
770
|
|
|
777
|
-
|
|
771
|
+
@action
|
|
772
|
+
didInsertFloatingElement(floatingElement) {
|
|
773
|
+
this._floatingElement = floatingElement;
|
|
774
|
+
|
|
775
|
+
if (this.renderInPlace) {
|
|
776
|
+
this.parentElement = floatingElement.parentElement;
|
|
777
|
+
this._initializeAttacher();
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
@action
|
|
782
|
+
didInsertArrow(element) {
|
|
778
783
|
this._arrowElement = element;
|
|
779
|
-
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
@action
|
|
787
|
+
onOptionsChange() {
|
|
788
|
+
this._ensureArgumentsAreValid();
|
|
789
|
+
this._update();
|
|
790
|
+
}
|
|
780
791
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
}
|
|
792
|
+
@action
|
|
793
|
+
willDestroyFloatingElement() {
|
|
794
|
+
this._cleanup?.();
|
|
795
|
+
}
|
|
785
796
|
|
|
786
797
|
_update() {
|
|
787
798
|
this._cleanup?.();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{{~#unless this.renderFloatingElement}}
|
|
2
|
-
<meta hidden {{this.onParentFinderInsert}} {{this.onIsShownChange this.isShown}}/>
|
|
2
|
+
<meta hidden {{did-insert this.onParentFinderInsert}} {{did-update this.onIsShownChange this.isShown}}/>
|
|
3
3
|
{{~/unless~}}
|
|
4
4
|
|
|
5
5
|
{{~#if this.renderFloatingElement~}}
|
|
@@ -8,16 +8,17 @@
|
|
|
8
8
|
class="ember-attacher"
|
|
9
9
|
id={{this.id}}
|
|
10
10
|
role={{this.ariaRole}}
|
|
11
|
-
{{
|
|
12
|
-
{{
|
|
13
|
-
{{
|
|
14
|
-
{{this.
|
|
11
|
+
{{did-insert this.didInsertFloatingElement}}
|
|
12
|
+
{{did-update this.onIsShownChange this.isShown}}
|
|
13
|
+
{{did-update this.onTargetOrTriggerChange this.hideOn this.showOn @explicitTarget}}
|
|
14
|
+
{{did-update this.onOptionsChange this.autoUpdate this.animation this.arrow this.useCapture this.placement this._renderInPlace this._currentTarget this._middleware}}
|
|
15
|
+
{{will-destroy this.willDestroyFloatingElement}}
|
|
15
16
|
...attributes
|
|
16
17
|
>
|
|
17
18
|
<div class={{this._class}} style={{this._style}}>
|
|
18
19
|
{{yield (hash hide=this.hide)}}
|
|
19
20
|
{{#if this.arrow}}
|
|
20
|
-
<div x-arrow {{this.didInsertArrow}}></div>
|
|
21
|
+
<div x-arrow {{did-insert this.didInsertArrow}}></div>
|
|
21
22
|
{{/if}}
|
|
22
23
|
{{#if this.isFillAnimation}}
|
|
23
24
|
<div x-circle style="{{this._circleTransitionDuration}}"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-attacher",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Tooltips and popovers for Ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test:all": "ember try:each"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@floating-ui/dom": "^1.6.
|
|
32
|
+
"@floating-ui/dom": "^1.6.12",
|
|
33
33
|
"babel-plugin-filter-imports": "^4.0.0",
|
|
34
34
|
"broccoli-funnel": "~3.0.8",
|
|
35
35
|
"ember-auto-import": "^2.7.2",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"ember-cli-htmlbars": "^6.3.0",
|
|
38
38
|
"ember-cli-sass": "^11.0.1",
|
|
39
39
|
"ember-maybe-in-element": "^2.1.0",
|
|
40
|
-
"
|
|
41
|
-
"sass": "^1.71.1"
|
|
40
|
+
"sass": "^1.72.0"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"@babel/core": "^7.23.7",
|
|
@@ -46,13 +45,14 @@
|
|
|
46
45
|
"@babel/helper-get-function-arity": "^7.16.7",
|
|
47
46
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
48
47
|
"@ember/optional-features": "^2.0.0",
|
|
48
|
+
"@ember/render-modifiers": "^2.0.5",
|
|
49
49
|
"@ember/string": "^3.1.1",
|
|
50
50
|
"@ember/test-helpers": "~2.9.4",
|
|
51
51
|
"@ember/test-waiters": "^3.1.0",
|
|
52
52
|
"@embroider/test-setup": "^3.0.0",
|
|
53
53
|
"@glimmer/component": "^1.1.2",
|
|
54
54
|
"@glimmer/tracking": "^1.1.2",
|
|
55
|
-
"@html-next/flexi-default-styles": "^
|
|
55
|
+
"@html-next/flexi-default-styles": "^3.0.0-alpha.1",
|
|
56
56
|
"@release-it-plugins/lerna-changelog": "^6.1.0",
|
|
57
57
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
58
58
|
"broccoli-asset-rev": "^3.0.0",
|
|
@@ -67,19 +67,19 @@
|
|
|
67
67
|
"ember-resolver": "~11.0.1",
|
|
68
68
|
"ember-source": "~4.12.3",
|
|
69
69
|
"ember-source-channel-url": "^3.0.0",
|
|
70
|
-
"ember-svg-jar": "
|
|
70
|
+
"ember-svg-jar": "^2.6.0",
|
|
71
71
|
"ember-truth-helpers": "^4.0.3",
|
|
72
72
|
"ember-try": "~3.0.0",
|
|
73
|
-
"eslint": "~8.
|
|
73
|
+
"eslint": "~8.57.0",
|
|
74
74
|
"eslint-plugin-decorator-position": "^5.0.2",
|
|
75
75
|
"eslint-plugin-ember": "~11.11.1",
|
|
76
76
|
"eslint-plugin-n": "^16.6.0",
|
|
77
|
-
"flexi": "^
|
|
77
|
+
"flexi": "^3.0.0-alpha.1",
|
|
78
78
|
"loader.js": "^4.7.0",
|
|
79
|
-
"qunit": "~2.20.
|
|
79
|
+
"qunit": "~2.20.1",
|
|
80
80
|
"qunit-dom": "~3.0.0",
|
|
81
81
|
"release-it": "~15.11.0",
|
|
82
|
-
"webpack": "~5.
|
|
82
|
+
"webpack": "~5.96.1"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "16.* || >= 18"
|