@spoosh/angular 0.11.1 → 0.12.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 (2) hide show
  1. package/dist/index.js +10 -8
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -10,7 +10,8 @@ import {
10
10
  createOperationController,
11
11
  createSelectorProxy,
12
12
  resolvePath,
13
- resolveTags
13
+ resolveTags,
14
+ matchTags
14
15
  } from "@spoosh/core";
15
16
  function createInjectRead(options) {
16
17
  const { api, stateManager, eventEmitter, pluginExecutor } = options;
@@ -230,9 +231,9 @@ function createInjectRead(options) {
230
231
  );
231
232
  const unsubInvalidate = eventEmitter.on(
232
233
  "invalidate",
233
- (invalidatedTags) => {
234
- const hasMatch = invalidatedTags.some(
235
- (tag) => currentResolvedTags.includes(tag)
234
+ (invalidatePatterns) => {
235
+ const hasMatch = currentResolvedTags.some(
236
+ (tag) => matchTags(tag, invalidatePatterns)
236
237
  );
237
238
  if (hasMatch && currentController) {
238
239
  untracked(() => {
@@ -482,7 +483,8 @@ import {
482
483
  createInfiniteReadController,
483
484
  createSelectorProxy as createSelectorProxy3,
484
485
  resolvePath as resolvePath3,
485
- resolveTags as resolveTags3
486
+ resolveTags as resolveTags3,
487
+ matchTags as matchTags2
486
488
  } from "@spoosh/core";
487
489
  function createInjectPages(options) {
488
490
  const { api, stateManager, eventEmitter, pluginExecutor } = options;
@@ -629,10 +631,10 @@ function createInjectPages(options) {
629
631
  currentResolvedTags = resolvedTags;
630
632
  unsubInvalidate = eventEmitter.on(
631
633
  "invalidate",
632
- (invalidatedTags) => {
634
+ (invalidatePatterns) => {
633
635
  if (!getEnabled() || !currentController) return;
634
- const hasMatch = invalidatedTags.some(
635
- (tag) => currentResolvedTags.includes(tag)
636
+ const hasMatch = currentResolvedTags.some(
637
+ (tag) => matchTags2(tag, invalidatePatterns)
636
638
  );
637
639
  if (hasMatch) {
638
640
  loadingSignal.set(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/angular",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "license": "MIT",
5
5
  "description": "Angular signals integration for Spoosh API toolkit",
6
6
  "keywords": [
@@ -34,12 +34,12 @@
34
34
  }
35
35
  },
36
36
  "peerDependencies": {
37
- "@spoosh/core": ">=0.17.1",
37
+ "@spoosh/core": ">=0.18.0",
38
38
  "@angular/core": ">=16.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@angular/core": "^21.1.0",
42
- "@spoosh/core": "0.17.1",
42
+ "@spoosh/core": "0.18.0",
43
43
  "@spoosh/test-utils": "0.3.0"
44
44
  },
45
45
  "scripts": {