@wildix/xbees-connect 1.2.40-alpha.0 → 1.3.0

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/README.md CHANGED
@@ -13,6 +13,26 @@ yarn add @wildix/xbees-connect
13
13
  npm install @wildix/xbees-connect
14
14
  ```
15
15
 
16
+ ## Work Variants
17
+
18
+ The integration can be launched in different modes via the `v` URL parameter:
19
+
20
+ - `ui` - Standard UI mode (default)
21
+ - `no-ui` - Data-only mode, no UI shown
22
+ - `d` - Dialog/setup mode
23
+ - `f` - Fullsize mode, integration takes full viewport dimensions
24
+
25
+ You can check the current mode using:
26
+
27
+ ```ts
28
+ const client = Client.getInstance();
29
+
30
+ client.showsUi(); // Returns true for UI modes (ui, d, f)
31
+ client.isDataOnly(); // Returns true for no-ui mode
32
+ client.isSetupDialog(); // Returns true for dialog mode (d)
33
+ client.isFullsize(); // Returns true for fullsize mode (f)
34
+ ```
35
+
16
36
  ## Usage
17
37
 
18
38
  ```ts
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.38",
3
+ "version": "1.2.43",
4
4
  "description": "This library provides easy communication between x-bees and integrated web applications",
5
5
  "author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
6
6
  "homepage": "",
@@ -213,6 +213,9 @@ class Client {
213
213
  showsUi() {
214
214
  return !this.isDataOnly();
215
215
  }
216
+ isFullsize() {
217
+ return this.variant === 'f';
218
+ }
216
219
  isActivationOnly() {
217
220
  return this.needAuthorize;
218
221
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.38",
3
+ "version": "1.2.43",
4
4
  "description": "This library provides easy communication between x-bees and integrated web applications",
5
5
  "author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
6
6
  "homepage": "",
@@ -207,6 +207,9 @@ export class Client {
207
207
  showsUi() {
208
208
  return !this.isDataOnly();
209
209
  }
210
+ isFullsize() {
211
+ return this.variant === 'f';
212
+ }
210
213
  isActivationOnly() {
211
214
  return this.needAuthorize;
212
215
  }
@@ -61,6 +61,7 @@ export declare class Client implements ConnectClient {
61
61
  isDataOnly(): boolean;
62
62
  isSetupDialog(): boolean;
63
63
  showsUi(): boolean;
64
+ isFullsize(): boolean;
64
65
  isActivationOnly(): boolean;
65
66
  getContext(): Promise<Message<ClientEventType.CONTEXT>>;
66
67
  getCurrentContact(): Promise<Message<ClientEventType.CURRENT_CONTACT>>;
@@ -65,6 +65,9 @@ export interface ConnectClient {
65
65
  * Determines x-bees is using this connect for representation on UI and this integration will be shown on UI
66
66
  * this opposite to {@link isDataOnly} */
67
67
  showsUi: () => boolean;
68
+ /**
69
+ * Determines x-bees is using this connect in fullsize mode */
70
+ isFullsize: () => boolean;
68
71
  /**
69
72
  * Determines x-bees is using this connect for activation/authorization on UI and this call of integration UI should show
70
73
  * dialog which leads to integration be activated
@@ -1,3 +1,3 @@
1
1
  type DeprecatedWorkVariants = 'info-frame' | 'daemon' | 'dialog';
2
- export type WorkVariants = 'ui' | 'no-ui' | 'd' | DeprecatedWorkVariants;
2
+ export type WorkVariants = 'ui' | 'no-ui' | 'd' | 'f' | DeprecatedWorkVariants;
3
3
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.2.40-alpha.0",
3
+ "version": "1.3.0",
4
4
  "description": "This library provides easy communication between x-bees and integrated web applications",
5
5
  "author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
6
6
  "homepage": "",
@@ -45,5 +45,5 @@
45
45
  "engines": {
46
46
  "node": ">=16"
47
47
  },
48
- "gitHead": "d6d76807960678c38ae92e86abcc107b071a721c"
48
+ "gitHead": "5abdb04058b4fa69d67bd6cd20116fe7f205d53d"
49
49
  }