@pushwoosh/smart-components-kit 0.4.3 → 0.4.5

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.
@@ -1,9 +1,9 @@
1
- import { type TagData } from '@pushwoosh/grpc-bridge/bridge/tags/types';
1
+ import { type Tag } from '@pushwoosh/rpc-v2-http-api-data/tags';
2
2
  export type DynamicContent = {
3
3
  tagName: string;
4
4
  modifier: string;
5
5
  defaultValue: string;
6
6
  };
7
- export type FullTagData = TagData & {
7
+ export type FullTagData = Tag & {
8
8
  modifiers: string[];
9
9
  };
@@ -1,5 +1,5 @@
1
1
  import { type SPAContextType } from '../context';
2
- import type { FullTagData } from './DynamicContentPicker.types';
2
+ import { type FullTagData } from './DynamicContentPicker.types';
3
3
  export declare function fetchDynamicContentTags(context: SPAContextType): Promise<FullTagData[]>;
4
4
  export declare function useDynamicContentTags(): {
5
5
  loading: boolean;
@@ -1,13 +1,13 @@
1
1
  import { useAsync } from '@pushwoosh/kit-helpers';
2
2
  import { collectPaginatedData } from '../asyncHelpers';
3
3
  import { useSPAContext } from '../context';
4
- const ignoreTagTypes = ['boolean', 'list'];
5
- const numberTypes = ['integer', 'decimal'];
4
+ const ignoreTagTypes = ['BOOLEAN', 'LIST'];
5
+ const numberTypes = ['INTEGER', 'PRICE'];
6
6
  export async function fetchDynamicContentTags(context) {
7
7
  const [originalTags, modifiers] = await Promise.all([collectPaginatedData(1000, async (perPage, page) => {
8
- const res = await context.grpcBridge.tags.list({
9
- orderBy: 'name',
10
- orderDirection: 'asc',
8
+ const res = await context.rpcGateway.tags.List({
9
+ orderBy: 'NAME',
10
+ orderDirection: 'ASC',
11
11
  page,
12
12
  perPage
13
13
  });
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "pre-commit": "check",
16
16
  "dependencies": {
17
- "@pushwoosh/dumb-components": "^0.0.8",
17
+ "@pushwoosh/dumb-components": "^0.0.18",
18
18
  "@pushwoosh/kit-button": "^2.2.5",
19
19
  "@pushwoosh/kit-constants": "^1.6.5",
20
20
  "@pushwoosh/kit-helpers": "^4.6.1",
@@ -49,5 +49,5 @@
49
49
  "engines": {
50
50
  "node": ">= 18"
51
51
  },
52
- "version": "0.4.3"
52
+ "version": "0.4.5"
53
53
  }