@retailcrm/embed-ui 0.2.3 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.5](https://github.com/retailcrm/embed-ui/compare/v0.2.4...v0.2.5) (2024-11-04)
6
+
7
+
8
+ ### Fixes
9
+
10
+ * dts plugin removed from build configuration ([d5c6991](https://github.com/retailcrm/embed-ui/commit/d5c6991dfbfc2e228b67bbf42410943d0fba7d20))
11
+
12
+ ### [0.2.4](https://github.com/retailcrm/embed-ui/compare/v0.2.3...v0.2.4) (2024-11-04)
13
+
14
+
15
+ ### Fixes
16
+
17
+ * Types declaration of the main entrypoint ([4c50e51](https://github.com/retailcrm/embed-ui/commit/4c50e51c3b71b30c05871f101617440b32cb2a4c))
18
+
5
19
  ### [0.2.3](https://github.com/retailcrm/embed-ui/compare/v0.2.2...v0.2.3) (2024-11-04)
6
20
 
7
21
 
package/index.d.ts ADDED
@@ -0,0 +1,70 @@
1
+ import { ComputedRef } from 'vue'
2
+ import { Context } from './types/context/schema'
3
+ import { ContextAccessor } from './types/context/schema'
4
+ import { ContextSchema } from './types/context/schema'
5
+ import { Endpoint } from '@remote-ui/rpc'
6
+ import { IsReadonly } from './types/context/schema'
7
+ import { MessageEndpoint } from '@remote-ui/rpc'
8
+ import { Schema } from './types/context/customer/card'
9
+ import { Schema as Schema_2 } from './types/context/customer/card-phone'
10
+ import { Schema as Schema_3 } from './types/context/order/card'
11
+ import { Schema as Schema_4 } from './types/context/settings'
12
+ import { SchemaList } from '../types/context'
13
+ import { Store } from 'pinia'
14
+ import { StoreDefinition } from 'pinia'
15
+ import { TypeOf } from './types/context/schema'
16
+ import { WidgetRunner } from './types/widget'
17
+ import { WritableComputedRef } from 'vue'
18
+
19
+ declare type Computed<S extends ContextSchema, F extends keyof S> = IsReadonly<S[F]> extends true ? ComputedRef<TypeOf<S[F]>> : WritableComputedRef<TypeOf<S[F]>>;
20
+
21
+ export declare const createWidgetEndpoint: (widget: WidgetRunner, messenger: MessageEndpoint) => Endpoint<ContextAccessor<SchemaList>>
22
+
23
+ export declare const customerCardPhoneSchema: Schema_2
24
+
25
+ export declare const customerCardSchema: Schema
26
+
27
+ export declare const orderCardSchema: Schema_3
28
+
29
+ export declare const settingsSchema: Schema_4
30
+
31
+ export declare const useCustomerCardContext: StoreDefinition<'customer/card', Context<Schema>, {
32
+ schema: () => Schema;
33
+ }, {
34
+ initialize(): Promise<void>;
35
+ set<F extends keyof Schema>(field: F, value: TypeOf<Schema[F]>): void;
36
+ }>
37
+
38
+ export declare const useCustomerCardPhoneContext: StoreDefinition<'customer/card:phone', Context<Schema_2>, {
39
+ schema: () => Schema_2;
40
+ }, {
41
+ initialize(): Promise<void>;
42
+ set<F extends keyof Schema_2>(field: F, value: TypeOf<Schema_2[F]>): void;
43
+ }>
44
+
45
+ export declare const useField: <S extends ContextSchema, F extends keyof S>(store: Store<string, Context<S>, {
46
+ schema(): S;
47
+ }, {
48
+ initialize(): Promise<void>;
49
+ set<F_1 extends keyof S>(field: F_1, value: TypeOf<S[F_1]>): void;
50
+ }>, field: F) => Computed<S, F>
51
+
52
+ export declare const useOrderCardContext: StoreDefinition<'order/card', Context<Schema_3>, {
53
+ schema: () => Schema_3;
54
+ }, {
55
+ initialize(): Promise<void>;
56
+ set<F extends keyof Schema_3>(field: F, value: TypeOf<Schema_3[F]>): void;
57
+ }>
58
+
59
+ export declare const useSettingsContext: StoreDefinition<'settings', Context<Schema_4>, {
60
+ schema: () => Schema_4;
61
+ }, {
62
+ initialize(): Promise<void>;
63
+ set<F extends keyof Schema_4>(field: F, value: TypeOf<Schema_4[F]>): void;
64
+ }>
65
+
66
+ declare module 'pinia' {
67
+ interface PiniaCustomProperties {
68
+ endpoint: Endpoint<ContextAccessor>;
69
+ }
70
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui",
3
3
  "type": "module",
4
- "version": "0.2.3",
4
+ "version": "0.2.5",
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>",
@@ -13,13 +13,13 @@
13
13
  ".": {
14
14
  "import": "./dist/index.mjs",
15
15
  "require": "./dist/index.cjs",
16
- "types": "./dist/index.d.ts",
16
+ "types": "./index.d.ts",
17
17
  "default": "./dist/index.mjs"
18
18
  },
19
19
  "./dist/*": "./dist/*",
20
20
  "./types/*": "./types/*"
21
21
  },
22
- "types": "dist/index.d.ts",
22
+ "types": "index.d.ts",
23
23
  "scripts": {
24
24
  "build": "vite build",
25
25
  "eslint": "eslint .",
@@ -57,7 +57,7 @@
57
57
  "typescript": "^5.4.5",
58
58
  "typescript-eslint": "^8.11.0",
59
59
  "vite": "^5.4.8",
60
- "vite-plugin-dts": "^3.9.1",
60
+ "vite-plugin-dts": "^4.3.0",
61
61
  "vitest": "^2.1.2",
62
62
  "vue": "^3.5.12"
63
63
  },
package/dist/index.d.ts DELETED
@@ -1,76 +0,0 @@
1
- import { ComputedRef } from 'vue';
2
- import { Context } from '../../../types/context/schema';
3
- import { Context as Context_2 } from '../../types/context/schema';
4
- import { ContextAccessor } from '../types/context/schema';
5
- import { ContextSchema } from '../../types/context/schema';
6
- import { Endpoint } from '@remote-ui/rpc';
7
- import { IsReadonly } from '../../types/context/schema';
8
- import { MessageEndpoint } from '@remote-ui/rpc';
9
- import { Schema } from '../../../types/context/customer/card';
10
- import { Schema as Schema_2 } from '../../../types/context/customer/card-phone';
11
- import { Schema as Schema_3 } from '../../../types/context/order/card';
12
- import { Schema as Schema_4 } from '../../types/context/settings';
13
- import { SchemaList } from '../types/context';
14
- import { Store } from 'pinia';
15
- import { StoreDefinition } from 'pinia';
16
- import { TypeOf } from '../../../types/context/schema';
17
- import { TypeOf as TypeOf_2 } from '../../types/context/schema';
18
- import { WidgetRunner } from '../types/widget';
19
- import { WritableComputedRef } from 'vue';
20
-
21
- declare type Computed<S extends ContextSchema, F extends keyof S> = IsReadonly<S[F]> extends true ? ComputedRef<TypeOf_2<S[F]>> : WritableComputedRef<TypeOf_2<S[F]>>;
22
-
23
- export declare const createWidgetEndpoint: (widget: WidgetRunner, messenger: MessageEndpoint) => Endpoint<ContextAccessor<SchemaList>>;
24
-
25
- export declare const customerCardPhoneSchema: Schema_2;
26
-
27
- export declare const customerCardSchema: Schema;
28
-
29
- export declare const orderCardSchema: Schema_3;
30
-
31
- export declare const settingsSchema: Schema_4;
32
-
33
- export declare const useCustomerCardContext: StoreDefinition<"customer/card", Context<Schema>, {
34
- schema: () => Schema;
35
- }, {
36
- initialize(): Promise<void>;
37
- set<F extends keyof Schema>(field: F, value: TypeOf<Schema[F]>): void;
38
- }>;
39
-
40
- export declare const useCustomerCardPhoneContext: StoreDefinition<"customer/card:phone", Context<Schema_2>, {
41
- schema: () => Schema_2;
42
- }, {
43
- initialize(): Promise<void>;
44
- set<F extends keyof Schema_2>(field: F, value: TypeOf<Schema_2[F]>): void;
45
- }>;
46
-
47
- export declare const useField: <S extends ContextSchema, F extends keyof S>(store: Store<string, Context_2<S>, {
48
- schema(): S;
49
- }, {
50
- initialize(): Promise<void>;
51
- set<F_1 extends keyof S>(field: F_1, value: TypeOf_2<S[F_1]>): void;
52
- }>, field: F) => Computed<S, F>;
53
-
54
- export declare const useOrderCardContext: StoreDefinition<"order/card", Context<Schema_3>, {
55
- schema: () => Schema_3;
56
- }, {
57
- initialize(): Promise<void>;
58
- set<F extends keyof Schema_3>(field: F, value: TypeOf<Schema_3[F]>): void;
59
- }>;
60
-
61
- export declare const useSettingsContext: StoreDefinition<"settings", Context_2<Schema_4>, {
62
- schema: () => Schema_4;
63
- }, {
64
- initialize(): Promise<void>;
65
- set<F extends keyof Schema_4>(field: F, value: TypeOf_2<Schema_4[F]>): void;
66
- }>;
67
-
68
- export { }
69
-
70
-
71
- declare module 'pinia' {
72
- interface PiniaCustomProperties {
73
- endpoint: Endpoint<ContextAccessor>;
74
- }
75
- }
76
-