@retailcrm/embed-ui 0.4.6 → 0.4.7

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,6 +1,7 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## [0.4.7](https://github.com/retailcrm/embed-ui/compare/v0.4.6...v0.4.7) (2024-12-08)
4
5
  ## [0.4.6](https://github.com/retailcrm/embed-ui/compare/v0.4.5...v0.4.6) (2024-12-08)
5
6
 
6
7
  ### Bug Fixes
package/index.d.ts CHANGED
@@ -10,7 +10,6 @@ import type {
10
10
  } from '@remote-ui/rpc'
11
11
 
12
12
  import type {
13
- Context,
14
13
  ContextAccessor,
15
14
  ContextSchema,
16
15
  IsReadonly,
@@ -18,6 +17,11 @@ import type {
18
17
  TypeOf,
19
18
  } from '@retailcrm/embed-ui-v1-types/context'
20
19
 
20
+ import type {
21
+ ContextStore,
22
+ ContextStoreDefinition,
23
+ } from '@retailcrm/embed-ui-v1-contexts/remote'
24
+
21
25
  import type { Schema as CustomerCardSchema } from '@retailcrm/embed-ui-v1-contexts/types/customer/card'
22
26
  import type { Schema as CustomerCardPhoneSchema } from '@retailcrm/embed-ui-v1-contexts/types/customer/card-phone'
23
27
  import type { Schema as OrderCardSchema } from '@retailcrm/embed-ui-v1-contexts/types/order/card'
@@ -26,9 +30,6 @@ import type { Schema as SettingsSchema } from '@retailcrm/embed-ui-v1-contexts/t
26
30
 
27
31
  import type { SchemaList } from '@retailcrm/embed-ui-v1-contexts/types'
28
32
 
29
- import type { Store } from 'pinia'
30
- import type { StoreDefinition } from 'pinia'
31
-
32
33
  import type { Callable } from './types/host/callable'
33
34
  import type { WidgetRunner } from './types/widget'
34
35
 
@@ -37,22 +38,8 @@ export declare const createWidgetEndpoint: (
37
38
  messenger: MessageEndpoint
38
39
  ) => Endpoint<ContextAccessor<SchemaList> & Callable>
39
40
 
40
- export type ContextStore<S extends ContextSchema> = Store<string, Context<S>, {
41
- schema(): S;
42
- }, {
43
- initialize(): Promise<void>;
44
- set<F extends keyof S>(field: F, value: TypeOf<S[F]>): void;
45
- }>
46
-
47
- export type ContextStoreDefinition<
48
- Id extends string,
49
- S extends ContextSchema
50
- > = StoreDefinition<Id, Context<S>, {
51
- schema(): S;
52
- }, {
53
- initialize(): Promise<void>;
54
- set<F extends keyof S>(field: F, value: TypeOf<S[F]>): void;
55
- }>
41
+ export type { ContextStore }
42
+ export type { ContextStoreDefinition }
56
43
 
57
44
  export declare const useField: <S extends ContextSchema, F extends keyof S>(
58
45
  store: ContextStore<S>,
@@ -80,4 +67,4 @@ export declare const useCustomerCardContext: ContextStoreDefinition<'customer/ca
80
67
  export declare const useCustomerCardPhoneContext: ContextStoreDefinition<'customer/card:phone', CustomerCardPhoneSchema>
81
68
  export declare const useOrderCardContext: ContextStoreDefinition<'order/card', OrderCardSchema>
82
69
  export declare const useCurrentUserContext: ContextStoreDefinition<'user/current', CurrentUserSchema>
83
- export declare const useSettingsContext: ContextStoreDefinition<'settings', SettingsSchema>
70
+ export declare const useSettingsContext: ContextStoreDefinition<'settings', SettingsSchema>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui",
3
3
  "type": "module",
4
- "version": "0.4.6",
4
+ "version": "0.4.7",
5
5
  "description": "API and components for creating RetailCRM UI extensions",
6
6
  "repository": "git@github.com:retailcrm/embed-ui.git",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@omnicajs/vue-remote": "^0.2.3",
35
35
  "@remote-ui/rpc": "^1.4.5",
36
- "@retailcrm/embed-ui-v1-contexts": "^0.4.6",
37
- "@retailcrm/embed-ui-v1-types": "^0.4.6"
36
+ "@retailcrm/embed-ui-v1-contexts": "^0.4.7",
37
+ "@retailcrm/embed-ui-v1-types": "^0.4.7"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "pinia": "^2.2",
@@ -43,7 +43,7 @@
43
43
  "devDependencies": {
44
44
  "@eslint/eslintrc": "^3.0.2",
45
45
  "@eslint/js": "^9.13.0",
46
- "@retailcrm/embed-ui-v1-testing": "^0.4.6",
46
+ "@retailcrm/embed-ui-v1-testing": "^0.4.7",
47
47
  "@types/git-semver-tags": "^7.0.0",
48
48
  "@types/node": "^22.7.9",
49
49
  "@types/semver": "^7.5.8",