@retailcrm/embed-ui 0.5.2-alpha.3 → 0.5.2

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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "nodejs.typescript.node.options": "",
3
+ "toolchains": []
4
+ }
package/CHANGELOG.md CHANGED
@@ -1,65 +1,17 @@
1
1
  # Changelog
2
2
 
3
3
 
4
- ## [0.5.2-alpha.3](https://github.com/retailcrm/embed-ui/compare/v0.5.2-alpha.2...v0.5.2-alpha.3) (2024-12-23)
4
+ ## [0.5.2](https://github.com/retailcrm/embed-ui/compare/v0.5.1...v0.5.2) (2024-12-24)
5
5
 
6
6
  ### Bug Fixes
7
7
 
8
- * **v1-contexts:** Missing company.KPP field of order/card context from v0.5.1 ([11c3cc4](https://github.com/retailcrm/embed-ui/commit/11c3cc41e66312b695e3fa500f07b352dde7812d))
9
- ## [0.5.2-alpha.2](https://github.com/retailcrm/embed-ui/compare/v0.5.2-alpha.1...v0.5.2-alpha.2) (2024-12-23)
10
-
11
- ### Bug Fixes
12
-
13
- * **v1-components:** Missing UiRadio host export ([8811cf6](https://github.com/retailcrm/embed-ui/commit/8811cf6ca5a74f50aedcd354163e25da172a9c2b))
14
- ## [0.5.2-alpha.1](https://github.com/retailcrm/embed-ui/compare/v0.5.1-1.0...v0.5.2-alpha.1) (2024-12-23)
15
-
16
- ### Features
17
-
18
- * **v1-components:** Added UiRadio component ([a29ab06](https://github.com/retailcrm/embed-ui/commit/a29ab061f995cb118d4f534ebdf2034e8235cccb))
8
+ * Fixed description of target 'order/card:comment.manager.before' ([dbe61c7](https://github.com/retailcrm/embed-ui/commit/dbe61c7425d86a4cf85e56ba3fdc7684d4e75241))
19
9
  ## [0.5.1](https://github.com/retailcrm/embed-ui/compare/v0.5.0...v0.5.1) (2024-12-23)
20
10
 
21
- Special release for features included. Please take a note here that alpha versions' changes were not included.
22
-
23
11
  ### Features
24
12
 
25
13
  * New target definition 'order/card:comment.manager.before' for widgets in 'Client comments' block ([556ce64](https://github.com/retailcrm/embed-ui/commit/556ce64ab7b4405297a537a3b4c14a70a1dbe793))
26
14
  * **v1-contexts:** Added company.KPP field to order/card context ([c188ccb](https://github.com/retailcrm/embed-ui/commit/c188ccb1544904242fe2e00fa5054f8bbb7068bd))
27
-
28
- ## [0.5.1-alpha.6](https://github.com/retailcrm/embed-ui/compare/v0.5.1-alpha.5...v0.5.1-alpha.6) (2024-12-20)
29
-
30
- ### Features
31
-
32
- * **v1-components:** Added UiCheckbox component ([87cbaa8](https://github.com/retailcrm/embed-ui/commit/87cbaa8b0381056a342bb1c70e5b2b45121641cb))
33
- ## [0.5.1-alpha.5](https://github.com/retailcrm/embed-ui/compare/v0.5.1-alpha.4...v0.5.1-alpha.5) (2024-12-19)
34
-
35
- ### Features
36
-
37
- * **v1-contexts:** Adjusted validator to changed custom fields' kinds ([3f730be](https://github.com/retailcrm/embed-ui/commit/3f730bedae5fd2489f7ffcf7bd3cd43e92d0f9f6))
38
- * **v1-contexts:** Removed before & last filters from custom dictionary query ([9e53e28](https://github.com/retailcrm/embed-ui/commit/9e53e28de6da07dfe3e02c92ec9a717e412b6f1f))
39
- * **v1-types:** Renamed custom field kinds, additional custom fields ([0100148](https://github.com/retailcrm/embed-ui/commit/0100148b435b0e188dffd1fa8b4c7563e6f9af20))
40
- ## [0.5.1-alpha.4](https://github.com/retailcrm/embed-ui/compare/v0.5.1-alpha.3...v0.5.1-alpha.4) (2024-12-17)
41
-
42
- ### Bug Fixes
43
-
44
- * Missing useCustomField declaration in index.d.ts ([4babd03](https://github.com/retailcrm/embed-ui/commit/4babd0373e2047288e12dd712cc636a530e25a41))
45
- ## [0.5.1-alpha.3](https://github.com/retailcrm/embed-ui/compare/v0.5.1-alpha.2...v0.5.1-alpha.3) (2024-12-16)
46
-
47
- ### Features
48
-
49
- * **v1-types:** All fields except 'choice' were made nullable ([0311cb5](https://github.com/retailcrm/embed-ui/commit/0311cb506c97463279381cae17ea3bf0e18797b7))
50
- ## [0.5.1-alpha.2](https://github.com/retailcrm/embed-ui/compare/v0.5.1-alpha.1...v0.5.1-alpha.2) (2024-12-16)
51
-
52
- ### Bug Fixes
53
-
54
- * **v1-contexts:** Missing utilities, renaming according to types changes ([5cdd029](https://github.com/retailcrm/embed-ui/commit/5cdd02923015ff12cf10f15699c517a7896099df))
55
- * **v1-types:** Replacing experimental types ([3ebc4d2](https://github.com/retailcrm/embed-ui/commit/3ebc4d2809b80954ed4e53fcab3cf37624dffc97))
56
- ## [0.5.1-alpha.1](https://github.com/retailcrm/embed-ui/compare/v0.5.0...v0.5.1-alpha.1) (2024-12-13)
57
-
58
- ### Features
59
-
60
- * Added useCustomField composable ([8290af2](https://github.com/retailcrm/embed-ui/commit/8290af2468308de132c24f17bb1be983b5c96d2e))
61
- * **v1-contexts:** Logic of custom contexts ([b4e3dff](https://github.com/retailcrm/embed-ui/commit/b4e3dff92a9c258237d14e5ad8e25be1f87b9f1b))
62
- * **v1-types:** Added types for custom contexts ([a86c795](https://github.com/retailcrm/embed-ui/commit/a86c795e2bd77c4086705c760277ecc03cfd8072))
63
15
  ## [0.5.0](https://github.com/retailcrm/embed-ui/compare/v0.4.9...v0.5.0) (2024-12-11)
64
16
 
65
17
  ### ⚠ BREAKING CHANGES
package/dist/index.cjs CHANGED
@@ -4,7 +4,6 @@ const rpc = require("@remote-ui/rpc");
4
4
  const pinia = require("pinia");
5
5
  const remote$1 = require("@omnicajs/vue-remote/remote");
6
6
  const remote = require("@retailcrm/embed-ui-v1-contexts/remote");
7
- const custom = require("@retailcrm/embed-ui-v1-contexts/remote/custom");
8
7
  const card = require("@retailcrm/embed-ui-v1-contexts/remote/customer/card");
9
8
  const cardPhone = require("@retailcrm/embed-ui-v1-contexts/remote/customer/card-phone");
10
9
  const card$1 = require("@retailcrm/embed-ui-v1-contexts/remote/order/card");
@@ -22,12 +21,6 @@ const useField = (store, field, onReject = null) => {
22
21
  set: (value) => set(field, value, onReject ?? _onReject)
23
22
  });
24
23
  };
25
- const useCustomField = (store, code) => {
26
- return vue.computed({
27
- get: () => code in store.values ? store.values[code] : void 0,
28
- set: (value) => store.set(code, value)
29
- });
30
- };
31
24
  const useInternal = pinia.defineStore("@retailcrm/embed-ui/_internal", {});
32
25
  const useHost = () => {
33
26
  const store = useInternal();
@@ -63,7 +56,6 @@ const createWidgetEndpoint = (widget, messenger) => {
63
56
  const endpoint = rpc.createEndpoint(messenger);
64
57
  const pinia$1 = pinia.createPinia();
65
58
  pinia$1.use(remote.injectEndpoint(endpoint));
66
- pinia$1.use(custom.injectAccessor(endpoint));
67
59
  let onRelease = () => {
68
60
  };
69
61
  endpoint.expose({
@@ -127,6 +119,5 @@ Object.defineProperty(exports, "useSettingsContext", {
127
119
  get: () => settings.useContext
128
120
  });
129
121
  exports.createWidgetEndpoint = createWidgetEndpoint;
130
- exports.useCustomField = useCustomField;
131
122
  exports.useField = useField;
132
123
  exports.useHost = useHost;
package/dist/index.mjs CHANGED
@@ -2,7 +2,6 @@ import { createEndpoint, retain, release } from "@remote-ui/rpc";
2
2
  import { defineStore, createPinia } from "pinia";
3
3
  import { createRemoteRenderer, createRemoteRoot } from "@omnicajs/vue-remote/remote";
4
4
  import { injectEndpoint } from "@retailcrm/embed-ui-v1-contexts/remote";
5
- import { injectAccessor } from "@retailcrm/embed-ui-v1-contexts/remote/custom";
6
5
  import { schema, useContext } from "@retailcrm/embed-ui-v1-contexts/remote/customer/card";
7
6
  import { schema as schema2, useContext as useContext2 } from "@retailcrm/embed-ui-v1-contexts/remote/customer/card-phone";
8
7
  import { schema as schema3, useContext as useContext3 } from "@retailcrm/embed-ui-v1-contexts/remote/order/card";
@@ -20,12 +19,6 @@ const useField = (store, field, onReject = null) => {
20
19
  set: (value) => set(field, value, onReject ?? _onReject)
21
20
  });
22
21
  };
23
- const useCustomField = (store, code) => {
24
- return computed({
25
- get: () => code in store.values ? store.values[code] : void 0,
26
- set: (value) => store.set(code, value)
27
- });
28
- };
29
22
  const useInternal = defineStore("@retailcrm/embed-ui/_internal", {});
30
23
  const useHost = () => {
31
24
  const store = useInternal();
@@ -61,7 +54,6 @@ const createWidgetEndpoint = (widget, messenger) => {
61
54
  const endpoint = createEndpoint(messenger);
62
55
  const pinia = createPinia();
63
56
  pinia.use(injectEndpoint(endpoint));
64
- pinia.use(injectAccessor(endpoint));
65
57
  let onRelease = () => {
66
58
  };
67
59
  endpoint.expose({
@@ -92,7 +84,6 @@ export {
92
84
  schema3 as orderCardSchema,
93
85
  schema5 as settingsSchema,
94
86
  useContext4 as useCurrentUserContext,
95
- useCustomField,
96
87
  useContext as useCustomerCardContext,
97
88
  useContext2 as useCustomerCardPhoneContext,
98
89
  useField,
package/dist/meta.json CHANGED
@@ -746,9 +746,9 @@
746
746
  {
747
747
  "id": "order/card:comment.manager.before",
748
748
  "description": {
749
- "en-GB": "Widget for the block \"Customer Comments\"",
750
- "es-ES": "Widget para el bloque \"Comentarios del Cliente\"",
751
- "ru-RU": "Виджет для блока \"Комментарии клиента\""
749
+ "en-GB": "Widget for the block \"Manager comment\"",
750
+ "es-ES": "Widget para el bloque \"Comentario del asesor\"",
751
+ "ru-RU": "Виджет для блока \"Комментарии оператора\""
752
752
  },
753
753
  "location": {
754
754
  "en-GB": "Section start, right above the input field",
package/index.d.ts CHANGED
@@ -49,11 +49,6 @@ export declare const useField: <S extends ContextSchema, F extends keyof S>(
49
49
  ? ComputedRef<TypeOf<S[F]>>
50
50
  : WritableComputedRef<TypeOf<S[F]>>
51
51
 
52
- export declare const useCustomField: <T extends string>(
53
- store: CustomContextStore<T>,
54
- code: string
55
- ) => WritableComputedRef<CustomFieldType>
56
-
57
52
  export declare const useHost = () => RemoteCallable<Callable>
58
53
 
59
54
  declare module 'pinia' {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui",
3
3
  "type": "module",
4
- "version": "0.5.2-alpha.3",
4
+ "version": "0.5.2",
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.5.2-alpha.3",
37
- "@retailcrm/embed-ui-v1-types": "^0.5.2-alpha.3"
36
+ "@retailcrm/embed-ui-v1-contexts": "^0.5.2",
37
+ "@retailcrm/embed-ui-v1-types": "^0.5.2"
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.5.2-alpha.3",
46
+ "@retailcrm/embed-ui-v1-testing": "^0.5.2",
47
47
  "@types/git-semver-tags": "^7.0.0",
48
48
  "@types/node": "^22.7.9",
49
49
  "@types/semver": "^7.5.8",