@ethlete/core 5.0.0-next.54 → 5.0.0-next.56

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ethlete/core
2
2
 
3
+ ## 5.0.0-next.56
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3075](https://github.com/ethlete-io/ethdk/pull/3075) [`1d38e7e`](https://github.com/ethlete-io/ethdk/commit/1d38e7e0a025769f065d8ca7d506cb75ad89139a) Thanks [@github-actions](https://github.com/apps/github-actions)! - `et update` moves the `@ethlete/*` packages to a newer version, runs the codemods those versions
8
+ declare in their own `migrations.json`, and reports what needs a decision or an agent.
9
+
10
+ - [#3075](https://github.com/ethlete-io/ethdk/pull/3075) [`f19d4ae`](https://github.com/ethlete-io/ethdk/commit/f19d4ae835dc5171f328c660d44870aaf3bc8f77) Thanks [@github-actions](https://github.com/apps/github-actions)! - Let overlay content handle `Escape` first, so the command palette clears its query
11
+ before closing. A `strategies` array without a breakpoint-less entry now falls back
12
+ to its smallest one instead of throwing.
13
+
14
+ ## 5.0.0-next.55
15
+
16
+ ### Patch Changes
17
+
18
+ - [`c067767`](https://github.com/ethlete-io/ethdk/commit/c06776704a32d7d78ba057389ac9efb157f0e4fc) Thanks [@TomTomB](https://github.com/TomTomB)! - An overlay opened without an `injector` or a `viewContainerRef` now reaches its own `providers` from
19
+ the content component, instead of resolving them against the opener's environment injector.
20
+
3
21
  ## 5.0.0-next.54
4
22
 
5
23
  ### Major Changes
@@ -8033,7 +8033,11 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8033
8033
  const overlayEnvironmentInjector = createEnvironmentInjector(config.providers ?? [], parentEnvironmentInjector);
8034
8034
  const elementInjector = Injector.create({
8035
8035
  parent: parentInjector,
8036
- providers: [],
8036
+ // Element DI chains to the opener, so without this the opener's environment injector answers
8037
+ // `EnvironmentInjector` from inside the overlay - and a component created through a
8038
+ // ViewContainerRef down there (the container's own content component) never sees
8039
+ // `config.providers`.
8040
+ providers: [{ provide: EnvironmentInjector, useValue: overlayEnvironmentInjector }],
8037
8041
  });
8038
8042
  const componentRef = createComponent(config.component, {
8039
8043
  environmentInjector: overlayEnvironmentInjector,
@@ -8137,7 +8141,9 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8137
8141
  const closeOnEscape = config.closeOnEscape ?? true;
8138
8142
  if (closeOnEscape) {
8139
8143
  const onKeyDown = (event) => {
8140
- if (event.key !== 'Escape' || !isTopMost(overlayRef)) {
8144
+ if (event.key !== 'Escape' ||
8145
+ event.defaultPrevented ||
8146
+ !isTopMost(overlayRef)) {
8141
8147
  return;
8142
8148
  }
8143
8149
  if (!interactiveCloseReady) {
@@ -8147,8 +8153,9 @@ const OVERLAY_RUNTIME_DEF = /* @__PURE__ */ defineRootProvider(() => {
8147
8153
  event.preventDefault();
8148
8154
  overlayRef.close(undefined, 'escape');
8149
8155
  };
8150
- targetDocument.addEventListener('keydown', onKeyDown, true);
8151
- cleanupFns.push(() => targetDocument.removeEventListener('keydown', onKeyDown, true));
8156
+ // bubble phase so content inside the overlay can preventDefault or stopPropagation an Escape first
8157
+ targetDocument.addEventListener('keydown', onKeyDown);
8158
+ cleanupFns.push(() => targetDocument.removeEventListener('keydown', onKeyDown));
8152
8159
  }
8153
8160
  const closeOnOutsidePointer = config.closeOnOutsidePointer ?? config.modal === false;
8154
8161
  if (closeOnOutsidePointer) {
@@ -10156,7 +10163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
10156
10163
 
10157
10164
  // Generated from package.json by tools/scripts/generate-version.js - do not edit.
10158
10165
  /** The version of `@ethlete/core` this build was cut from. */
10159
- const CORE_VERSION = '5.0.0-next.54';
10166
+ const CORE_VERSION = '5.0.0-next.56';
10160
10167
 
10161
10168
  /**
10162
10169
  * Generated bundle index. Do not edit.