@retailcrm/embed-ui 0.9.10 → 0.9.11-alpha.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.
- package/AGENTS.md +1 -21
- package/CHANGELOG.md +38 -0
- package/coverage/clover.xml +3423 -1328
- package/coverage/coverage-final.json +110 -64
- package/coverage/index.html +405 -165
- package/dist/index.cjs +5 -42
- package/dist/index.mjs +4 -41
- package/index.d.ts +20 -15
- package/package.json +7 -5
- package/skills/commit-workflow/SKILL.md +1 -0
- package/types/host/callable.d.ts +2 -9
- package/types/widget.d.ts +1 -4
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const rpc = require("@remote-ui/rpc");
|
|
4
4
|
const pinia = require("pinia");
|
|
5
|
-
const remote$
|
|
6
|
-
const remote = require("@retailcrm/embed-ui-v1-contexts/remote");
|
|
5
|
+
const remote$2 = require("@omnicajs/vue-remote/remote");
|
|
7
6
|
const custom = require("@retailcrm/embed-ui-v1-contexts/remote/custom");
|
|
7
|
+
const remote = require("@retailcrm/embed-ui-v1-contexts/remote");
|
|
8
|
+
const remote$1 = require("@retailcrm/embed-ui-v1-components/remote");
|
|
8
9
|
const card = require("@retailcrm/embed-ui-v1-contexts/remote/customer/card");
|
|
9
10
|
const cardPhone = require("@retailcrm/embed-ui-v1-contexts/remote/customer/card-phone");
|
|
10
11
|
const card$1 = require("@retailcrm/embed-ui-v1-contexts/remote/order/card");
|
|
@@ -69,43 +70,6 @@ const useRouter = () => {
|
|
|
69
70
|
};
|
|
70
71
|
});
|
|
71
72
|
};
|
|
72
|
-
const createRoot = async (channel) => {
|
|
73
|
-
const root = remote$1.createRemoteRoot(channel, {
|
|
74
|
-
components: [
|
|
75
|
-
"UiAvatar",
|
|
76
|
-
"UiAvatarList",
|
|
77
|
-
"UiButton",
|
|
78
|
-
"UiCheckbox",
|
|
79
|
-
"UiCopyButton",
|
|
80
|
-
"UiDate",
|
|
81
|
-
"UiError",
|
|
82
|
-
"UiImage",
|
|
83
|
-
"UiLink",
|
|
84
|
-
"UiLoader",
|
|
85
|
-
"UiMenuItem",
|
|
86
|
-
"UiMenuItemGroup",
|
|
87
|
-
"UiModalSidebar",
|
|
88
|
-
"UiModalWindow",
|
|
89
|
-
"UiModalWindowSurface",
|
|
90
|
-
"UiPopper",
|
|
91
|
-
"UiPopperConnector",
|
|
92
|
-
"UiPopperTarget",
|
|
93
|
-
"UiRadio",
|
|
94
|
-
"UiScrollBox",
|
|
95
|
-
"UiSelectPopper",
|
|
96
|
-
"UiSelectTrigger",
|
|
97
|
-
"UiTag",
|
|
98
|
-
"UiTextbox",
|
|
99
|
-
"UiToolbarButton",
|
|
100
|
-
"UiToolbarLink",
|
|
101
|
-
"UiTooltip",
|
|
102
|
-
"UiTransition",
|
|
103
|
-
"UiYandexMap"
|
|
104
|
-
]
|
|
105
|
-
});
|
|
106
|
-
await root.mount();
|
|
107
|
-
return root;
|
|
108
|
-
};
|
|
109
73
|
const createWidgetEndpoint = (widget, messenger) => {
|
|
110
74
|
const endpoint = rpc.createEndpoint(messenger);
|
|
111
75
|
const pinia$1 = pinia.createPinia();
|
|
@@ -116,9 +80,8 @@ const createWidgetEndpoint = (widget, messenger) => {
|
|
|
116
80
|
endpoint.expose({
|
|
117
81
|
async run(channel, target) {
|
|
118
82
|
rpc.retain(channel);
|
|
119
|
-
const root = await
|
|
120
|
-
|
|
121
|
-
const { createApp } = remote$1.createRemoteRenderer(root);
|
|
83
|
+
const root = await remote$1.mountEndpointRoot(channel);
|
|
84
|
+
const { createApp } = remote$2.createRemoteRenderer(root);
|
|
122
85
|
const destroy = await widget.run(createApp, root, pinia$1, target);
|
|
123
86
|
onRelease = () => {
|
|
124
87
|
destroy();
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createEndpoint, retain, release } from "@remote-ui/rpc";
|
|
2
2
|
import { defineStore, createPinia } from "pinia";
|
|
3
|
-
import { createRemoteRenderer
|
|
4
|
-
import { injectEndpoint } from "@retailcrm/embed-ui-v1-contexts/remote";
|
|
3
|
+
import { createRemoteRenderer } from "@omnicajs/vue-remote/remote";
|
|
5
4
|
import { injectAccessor } from "@retailcrm/embed-ui-v1-contexts/remote/custom";
|
|
5
|
+
import { injectEndpoint } from "@retailcrm/embed-ui-v1-contexts/remote";
|
|
6
|
+
import { mountEndpointRoot } from "@retailcrm/embed-ui-v1-components/remote";
|
|
6
7
|
import { schema, useContext } from "@retailcrm/embed-ui-v1-contexts/remote/customer/card";
|
|
7
8
|
import { schema as schema2, useContext as useContext2 } from "@retailcrm/embed-ui-v1-contexts/remote/customer/card-phone";
|
|
8
9
|
import { schema as schema3, useContext as useContext3 } from "@retailcrm/embed-ui-v1-contexts/remote/order/card";
|
|
@@ -68,43 +69,6 @@ const useRouter = () => {
|
|
|
68
69
|
};
|
|
69
70
|
});
|
|
70
71
|
};
|
|
71
|
-
const createRoot = async (channel) => {
|
|
72
|
-
const root = createRemoteRoot(channel, {
|
|
73
|
-
components: [
|
|
74
|
-
"UiAvatar",
|
|
75
|
-
"UiAvatarList",
|
|
76
|
-
"UiButton",
|
|
77
|
-
"UiCheckbox",
|
|
78
|
-
"UiCopyButton",
|
|
79
|
-
"UiDate",
|
|
80
|
-
"UiError",
|
|
81
|
-
"UiImage",
|
|
82
|
-
"UiLink",
|
|
83
|
-
"UiLoader",
|
|
84
|
-
"UiMenuItem",
|
|
85
|
-
"UiMenuItemGroup",
|
|
86
|
-
"UiModalSidebar",
|
|
87
|
-
"UiModalWindow",
|
|
88
|
-
"UiModalWindowSurface",
|
|
89
|
-
"UiPopper",
|
|
90
|
-
"UiPopperConnector",
|
|
91
|
-
"UiPopperTarget",
|
|
92
|
-
"UiRadio",
|
|
93
|
-
"UiScrollBox",
|
|
94
|
-
"UiSelectPopper",
|
|
95
|
-
"UiSelectTrigger",
|
|
96
|
-
"UiTag",
|
|
97
|
-
"UiTextbox",
|
|
98
|
-
"UiToolbarButton",
|
|
99
|
-
"UiToolbarLink",
|
|
100
|
-
"UiTooltip",
|
|
101
|
-
"UiTransition",
|
|
102
|
-
"UiYandexMap"
|
|
103
|
-
]
|
|
104
|
-
});
|
|
105
|
-
await root.mount();
|
|
106
|
-
return root;
|
|
107
|
-
};
|
|
108
72
|
const createWidgetEndpoint = (widget, messenger) => {
|
|
109
73
|
const endpoint = createEndpoint(messenger);
|
|
110
74
|
const pinia = createPinia();
|
|
@@ -115,8 +79,7 @@ const createWidgetEndpoint = (widget, messenger) => {
|
|
|
115
79
|
endpoint.expose({
|
|
116
80
|
async run(channel, target) {
|
|
117
81
|
retain(channel);
|
|
118
|
-
const root = await
|
|
119
|
-
await root.mount();
|
|
82
|
+
const root = await mountEndpointRoot(channel);
|
|
120
83
|
const { createApp } = createRemoteRenderer(root);
|
|
121
84
|
const destroy = await widget.run(createApp, root, pinia, target);
|
|
122
85
|
onRelease = () => {
|
package/index.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ComputedRef,
|
|
3
|
-
WritableComputedRef,
|
|
4
|
-
} from 'vue'
|
|
1
|
+
import type { ComputedRef, WritableComputedRef } from 'vue'
|
|
5
2
|
|
|
6
|
-
import type {
|
|
7
|
-
Endpoint,
|
|
8
|
-
MessageEndpoint,
|
|
9
|
-
RemoteCallable,
|
|
10
|
-
} from '@remote-ui/rpc'
|
|
3
|
+
import type { Endpoint, MessageEndpoint, RemoteCallable } from '@remote-ui/rpc'
|
|
11
4
|
|
|
12
5
|
import type {
|
|
13
6
|
ContextAccessor,
|
|
@@ -26,12 +19,24 @@ import type {
|
|
|
26
19
|
|
|
27
20
|
import type { Router } from '@omnicajs/symfony-router'
|
|
28
21
|
|
|
29
|
-
import type {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import type {
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
import type {
|
|
23
|
+
Schema as CurrentUserSchema,
|
|
24
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/user/current'
|
|
25
|
+
import type {
|
|
26
|
+
Schema as CustomerCardPhoneSchema,
|
|
27
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/customer/card-phone'
|
|
28
|
+
import type {
|
|
29
|
+
Schema as CustomerCardSchema,
|
|
30
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/customer/card'
|
|
31
|
+
import type {
|
|
32
|
+
Schema as OrderCardSchema,
|
|
33
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/order/card'
|
|
34
|
+
import type {
|
|
35
|
+
Schema as OrderCardSettingsSchema,
|
|
36
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/order/card-settings'
|
|
37
|
+
import type {
|
|
38
|
+
Schema as SettingsSchema,
|
|
39
|
+
} from '@retailcrm/embed-ui-v1-contexts/types/settings'
|
|
35
40
|
|
|
36
41
|
import type { SchemaList } from '@retailcrm/embed-ui-v1-contexts/types'
|
|
37
42
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retailcrm/embed-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.11-alpha.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>",
|
|
@@ -39,17 +39,19 @@
|
|
|
39
39
|
"@floating-ui/core": "^1.6.9",
|
|
40
40
|
"@floating-ui/dom": "^1.6.13",
|
|
41
41
|
"@omnicajs/symfony-router": "^1.0.0",
|
|
42
|
-
"@omnicajs/vue-remote": "^0.2.
|
|
42
|
+
"@omnicajs/vue-remote": "^0.2.14",
|
|
43
43
|
"@remote-ui/rpc": "^1.4.5",
|
|
44
|
-
"@retailcrm/embed-ui-v1-
|
|
45
|
-
"@retailcrm/embed-ui-v1-
|
|
44
|
+
"@retailcrm/embed-ui-v1-components": "^0.9.11-alpha.2",
|
|
45
|
+
"@retailcrm/embed-ui-v1-contexts": "^0.9.11-alpha.2",
|
|
46
|
+
"@retailcrm/embed-ui-v1-types": "^0.9.11-alpha.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@eslint/eslintrc": "^3.3.3",
|
|
49
50
|
"@eslint/js": "^9.39.1",
|
|
50
51
|
"@modulify/git-toolkit": "^0.0.2",
|
|
51
52
|
"@modulify/pkg": "^1.0.1",
|
|
52
|
-
"@
|
|
53
|
+
"@omnicajs/eslint-plugin-dependencies": "^0.0.2",
|
|
54
|
+
"@retailcrm/embed-ui-v1-testing": "^0.9.11-alpha.2",
|
|
53
55
|
"@types/git-semver-tags": "^7.0.0",
|
|
54
56
|
"@types/node": "^22.19.2",
|
|
55
57
|
"@types/semver": "^7.7.1",
|
|
@@ -21,6 +21,7 @@ Use this skill when the user asks to:
|
|
|
21
21
|
- Commit format: Conventional Commits.
|
|
22
22
|
- Commit message language: English.
|
|
23
23
|
- Allowed types: `feat`, `fix`, `build`, `ci`, `perf`, `docs`, `refactor`, `style`, `test`, `chore`.
|
|
24
|
+
- Always keep commit type in lowercase (`feat`, `fix`, `build`, ...), even when the summary starts with uppercase.
|
|
24
25
|
- Scope rule for workspace changes: use workspace folder name (not npm package name).
|
|
25
26
|
- Current workspace scopes:
|
|
26
27
|
- `v1-components`
|
package/types/host/callable.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HostApi } from '@retailcrm/embed-ui-v1-types/host'
|
|
2
2
|
|
|
3
|
-
export type Callable =
|
|
4
|
-
goTo (route: string, params?: Record<string, unknown>): void;
|
|
5
|
-
|
|
6
|
-
httpCall (
|
|
7
|
-
action: string,
|
|
8
|
-
payload?: string | Pojo
|
|
9
|
-
): Promise<{ body: string; status: number }>;
|
|
10
|
-
}
|
|
3
|
+
export type Callable = HostApi
|