@retailcrm/embed-ui 0.4.6 → 0.4.8

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,13 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## [0.4.8](https://github.com/retailcrm/embed-ui/compare/v0.4.7...v0.4.8) (2024-12-09)
5
+
6
+ ### Features
7
+
8
+ * **v1-contexts:** Added fields to order/card context ([1320580](https://github.com/retailcrm/embed-ui/commit/1320580af5b05d7b857211c03a76ea5f685f40e3))
9
+ * **v1-contexts:** Types clarification, processing errors in changes handler method 'on' of ContextAccessor, created by createContextAccessor ([111a08c](https://github.com/retailcrm/embed-ui/commit/111a08cd4bd46076b5902f8bf095db43c72c3344))
10
+ ## [0.4.7](https://github.com/retailcrm/embed-ui/compare/v0.4.6...v0.4.7) (2024-12-08)
4
11
  ## [0.4.6](https://github.com/retailcrm/embed-ui/compare/v0.4.5...v0.4.6) (2024-12-08)
5
12
 
6
13
  ### Bug Fixes
package/dist/meta.json CHANGED
@@ -205,6 +205,56 @@
205
205
  },
206
206
  "readonly": true
207
207
  },
208
+ {
209
+ "name": "contragent.type",
210
+ "type": "\"enterpreneur\" | \"legal-entity\"",
211
+ "description": {
212
+ "en-GB": "Legal entity type",
213
+ "es-ES": "Tipo de entidad legal",
214
+ "ru-RU": "Тип юридического лица"
215
+ },
216
+ "readonly": true
217
+ },
218
+ {
219
+ "name": "contragent.certificateNumber",
220
+ "type": "string | null",
221
+ "description": {
222
+ "en-GB": "Certificate number",
223
+ "es-ES": "Número de certificado",
224
+ "ru-RU": "Номер свидетельства"
225
+ },
226
+ "readonly": false
227
+ },
228
+ {
229
+ "name": "contragent.certificateDate",
230
+ "type": "string | null",
231
+ "description": {
232
+ "en-GB": "Certificate date",
233
+ "es-ES": "Fecha del certificado",
234
+ "ru-RU": "Дата свидетельства"
235
+ },
236
+ "readonly": false
237
+ },
238
+ {
239
+ "name": "contragent.OGRN",
240
+ "type": "string | null",
241
+ "description": {
242
+ "en-GB": "PSRN of the counterparty",
243
+ "es-ES": "PSRN del contraparte",
244
+ "ru-RU": "ОГРН контрагента"
245
+ },
246
+ "readonly": false
247
+ },
248
+ {
249
+ "name": "contragent.OGRNIP",
250
+ "type": "string | null",
251
+ "description": {
252
+ "en-GB": "PSRN of Individual entrepreneur",
253
+ "es-ES": "PSRN del emprendedor individual",
254
+ "ru-RU": "ОГРНИП"
255
+ },
256
+ "readonly": false
257
+ },
208
258
  {
209
259
  "name": "company.name",
210
260
  "type": "string | null",
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.8",
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.8",
37
+ "@retailcrm/embed-ui-v1-types": "^0.4.8"
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.8",
47
47
  "@types/git-semver-tags": "^7.0.0",
48
48
  "@types/node": "^22.7.9",
49
49
  "@types/semver": "^7.5.8",