@bitrix24/b24jssdk 0.1.6 → 0.1.7
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/dist/commonjs/index.cjs +57 -5
- package/dist/commonjs/index.cjs.map +1 -1
- package/dist/commonjs/index.d.cts +29 -2
- package/dist/commonjs/index.d.mts +29 -2
- package/dist/commonjs/index.d.ts +29 -2
- package/dist/esm/index.d.mts +29 -2
- package/dist/esm/index.d.ts +29 -2
- package/dist/esm/index.mjs +57 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +57 -5
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1683,7 +1683,9 @@ declare enum MessageCommands {
|
|
|
1683
1683
|
selectUser = "selectUser",
|
|
1684
1684
|
selectAccess = "selectAccess",
|
|
1685
1685
|
selectCRM = "selectCRM",
|
|
1686
|
-
showAppForm = "showAppForm"
|
|
1686
|
+
showAppForm = "showAppForm",
|
|
1687
|
+
getInterface = "getInterface",
|
|
1688
|
+
placementBindEvent = "placementBindEvent"
|
|
1687
1689
|
}
|
|
1688
1690
|
|
|
1689
1691
|
/**
|
|
@@ -2139,7 +2141,7 @@ declare class SliderManager {
|
|
|
2139
2141
|
*/
|
|
2140
2142
|
declare class PlacementManager {
|
|
2141
2143
|
#private;
|
|
2142
|
-
constructor();
|
|
2144
|
+
constructor(messageManager: MessageManager);
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Initializes the data received from the parent window message.
|
|
2145
2147
|
* @param data
|
|
@@ -2149,6 +2151,31 @@ declare class PlacementManager {
|
|
|
2149
2151
|
get isDefault(): boolean;
|
|
2150
2152
|
get options(): any;
|
|
2151
2153
|
get isSliderMode(): boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
2156
|
+
*
|
|
2157
|
+
* @return {Promise<any>}
|
|
2158
|
+
*
|
|
2159
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
2160
|
+
*/
|
|
2161
|
+
getInterface(): Promise<any>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Set Up the Interface Event Handler
|
|
2164
|
+
* @param {string} eventName
|
|
2165
|
+
* @return {Promise<any>}
|
|
2166
|
+
*
|
|
2167
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2168
|
+
*/
|
|
2169
|
+
bindEvent(eventName: string): Promise<any>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Call the Registered Interface Command
|
|
2172
|
+
* @param {string} command
|
|
2173
|
+
* @param {Record<string, any>} parameters
|
|
2174
|
+
* @return {Promise<any>}
|
|
2175
|
+
*
|
|
2176
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
2177
|
+
*/
|
|
2178
|
+
call(command: string, parameters?: Record<string, any>): Promise<any>;
|
|
2152
2179
|
}
|
|
2153
2180
|
|
|
2154
2181
|
/**
|
|
@@ -1683,7 +1683,9 @@ declare enum MessageCommands {
|
|
|
1683
1683
|
selectUser = "selectUser",
|
|
1684
1684
|
selectAccess = "selectAccess",
|
|
1685
1685
|
selectCRM = "selectCRM",
|
|
1686
|
-
showAppForm = "showAppForm"
|
|
1686
|
+
showAppForm = "showAppForm",
|
|
1687
|
+
getInterface = "getInterface",
|
|
1688
|
+
placementBindEvent = "placementBindEvent"
|
|
1687
1689
|
}
|
|
1688
1690
|
|
|
1689
1691
|
/**
|
|
@@ -2139,7 +2141,7 @@ declare class SliderManager {
|
|
|
2139
2141
|
*/
|
|
2140
2142
|
declare class PlacementManager {
|
|
2141
2143
|
#private;
|
|
2142
|
-
constructor();
|
|
2144
|
+
constructor(messageManager: MessageManager);
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Initializes the data received from the parent window message.
|
|
2145
2147
|
* @param data
|
|
@@ -2149,6 +2151,31 @@ declare class PlacementManager {
|
|
|
2149
2151
|
get isDefault(): boolean;
|
|
2150
2152
|
get options(): any;
|
|
2151
2153
|
get isSliderMode(): boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
2156
|
+
*
|
|
2157
|
+
* @return {Promise<any>}
|
|
2158
|
+
*
|
|
2159
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
2160
|
+
*/
|
|
2161
|
+
getInterface(): Promise<any>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Set Up the Interface Event Handler
|
|
2164
|
+
* @param {string} eventName
|
|
2165
|
+
* @return {Promise<any>}
|
|
2166
|
+
*
|
|
2167
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2168
|
+
*/
|
|
2169
|
+
bindEvent(eventName: string): Promise<any>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Call the Registered Interface Command
|
|
2172
|
+
* @param {string} command
|
|
2173
|
+
* @param {Record<string, any>} parameters
|
|
2174
|
+
* @return {Promise<any>}
|
|
2175
|
+
*
|
|
2176
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
2177
|
+
*/
|
|
2178
|
+
call(command: string, parameters?: Record<string, any>): Promise<any>;
|
|
2152
2179
|
}
|
|
2153
2180
|
|
|
2154
2181
|
/**
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1683,7 +1683,9 @@ declare enum MessageCommands {
|
|
|
1683
1683
|
selectUser = "selectUser",
|
|
1684
1684
|
selectAccess = "selectAccess",
|
|
1685
1685
|
selectCRM = "selectCRM",
|
|
1686
|
-
showAppForm = "showAppForm"
|
|
1686
|
+
showAppForm = "showAppForm",
|
|
1687
|
+
getInterface = "getInterface",
|
|
1688
|
+
placementBindEvent = "placementBindEvent"
|
|
1687
1689
|
}
|
|
1688
1690
|
|
|
1689
1691
|
/**
|
|
@@ -2139,7 +2141,7 @@ declare class SliderManager {
|
|
|
2139
2141
|
*/
|
|
2140
2142
|
declare class PlacementManager {
|
|
2141
2143
|
#private;
|
|
2142
|
-
constructor();
|
|
2144
|
+
constructor(messageManager: MessageManager);
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Initializes the data received from the parent window message.
|
|
2145
2147
|
* @param data
|
|
@@ -2149,6 +2151,31 @@ declare class PlacementManager {
|
|
|
2149
2151
|
get isDefault(): boolean;
|
|
2150
2152
|
get options(): any;
|
|
2151
2153
|
get isSliderMode(): boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
2156
|
+
*
|
|
2157
|
+
* @return {Promise<any>}
|
|
2158
|
+
*
|
|
2159
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
2160
|
+
*/
|
|
2161
|
+
getInterface(): Promise<any>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Set Up the Interface Event Handler
|
|
2164
|
+
* @param {string} eventName
|
|
2165
|
+
* @return {Promise<any>}
|
|
2166
|
+
*
|
|
2167
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2168
|
+
*/
|
|
2169
|
+
bindEvent(eventName: string): Promise<any>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Call the Registered Interface Command
|
|
2172
|
+
* @param {string} command
|
|
2173
|
+
* @param {Record<string, any>} parameters
|
|
2174
|
+
* @return {Promise<any>}
|
|
2175
|
+
*
|
|
2176
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
2177
|
+
*/
|
|
2178
|
+
call(command: string, parameters?: Record<string, any>): Promise<any>;
|
|
2152
2179
|
}
|
|
2153
2180
|
|
|
2154
2181
|
/**
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1683,7 +1683,9 @@ declare enum MessageCommands {
|
|
|
1683
1683
|
selectUser = "selectUser",
|
|
1684
1684
|
selectAccess = "selectAccess",
|
|
1685
1685
|
selectCRM = "selectCRM",
|
|
1686
|
-
showAppForm = "showAppForm"
|
|
1686
|
+
showAppForm = "showAppForm",
|
|
1687
|
+
getInterface = "getInterface",
|
|
1688
|
+
placementBindEvent = "placementBindEvent"
|
|
1687
1689
|
}
|
|
1688
1690
|
|
|
1689
1691
|
/**
|
|
@@ -2139,7 +2141,7 @@ declare class SliderManager {
|
|
|
2139
2141
|
*/
|
|
2140
2142
|
declare class PlacementManager {
|
|
2141
2143
|
#private;
|
|
2142
|
-
constructor();
|
|
2144
|
+
constructor(messageManager: MessageManager);
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Initializes the data received from the parent window message.
|
|
2145
2147
|
* @param data
|
|
@@ -2149,6 +2151,31 @@ declare class PlacementManager {
|
|
|
2149
2151
|
get isDefault(): boolean;
|
|
2150
2152
|
get options(): any;
|
|
2151
2153
|
get isSliderMode(): boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
2156
|
+
*
|
|
2157
|
+
* @return {Promise<any>}
|
|
2158
|
+
*
|
|
2159
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
2160
|
+
*/
|
|
2161
|
+
getInterface(): Promise<any>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Set Up the Interface Event Handler
|
|
2164
|
+
* @param {string} eventName
|
|
2165
|
+
* @return {Promise<any>}
|
|
2166
|
+
*
|
|
2167
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2168
|
+
*/
|
|
2169
|
+
bindEvent(eventName: string): Promise<any>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Call the Registered Interface Command
|
|
2172
|
+
* @param {string} command
|
|
2173
|
+
* @param {Record<string, any>} parameters
|
|
2174
|
+
* @return {Promise<any>}
|
|
2175
|
+
*
|
|
2176
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
2177
|
+
*/
|
|
2178
|
+
call(command: string, parameters?: Record<string, any>): Promise<any>;
|
|
2152
2179
|
}
|
|
2153
2180
|
|
|
2154
2181
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1683,7 +1683,9 @@ declare enum MessageCommands {
|
|
|
1683
1683
|
selectUser = "selectUser",
|
|
1684
1684
|
selectAccess = "selectAccess",
|
|
1685
1685
|
selectCRM = "selectCRM",
|
|
1686
|
-
showAppForm = "showAppForm"
|
|
1686
|
+
showAppForm = "showAppForm",
|
|
1687
|
+
getInterface = "getInterface",
|
|
1688
|
+
placementBindEvent = "placementBindEvent"
|
|
1687
1689
|
}
|
|
1688
1690
|
|
|
1689
1691
|
/**
|
|
@@ -2139,7 +2141,7 @@ declare class SliderManager {
|
|
|
2139
2141
|
*/
|
|
2140
2142
|
declare class PlacementManager {
|
|
2141
2143
|
#private;
|
|
2142
|
-
constructor();
|
|
2144
|
+
constructor(messageManager: MessageManager);
|
|
2143
2145
|
/**
|
|
2144
2146
|
* Initializes the data received from the parent window message.
|
|
2145
2147
|
* @param data
|
|
@@ -2149,6 +2151,31 @@ declare class PlacementManager {
|
|
|
2149
2151
|
get isDefault(): boolean;
|
|
2150
2152
|
get options(): any;
|
|
2151
2153
|
get isSliderMode(): boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
2156
|
+
*
|
|
2157
|
+
* @return {Promise<any>}
|
|
2158
|
+
*
|
|
2159
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
2160
|
+
*/
|
|
2161
|
+
getInterface(): Promise<any>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Set Up the Interface Event Handler
|
|
2164
|
+
* @param {string} eventName
|
|
2165
|
+
* @return {Promise<any>}
|
|
2166
|
+
*
|
|
2167
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2168
|
+
*/
|
|
2169
|
+
bindEvent(eventName: string): Promise<any>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Call the Registered Interface Command
|
|
2172
|
+
* @param {string} command
|
|
2173
|
+
* @param {Record<string, any>} parameters
|
|
2174
|
+
* @return {Promise<any>}
|
|
2175
|
+
*
|
|
2176
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
2177
|
+
*/
|
|
2178
|
+
call(command: string, parameters?: Record<string, any>): Promise<any>;
|
|
2152
2179
|
}
|
|
2153
2180
|
|
|
2154
2181
|
/**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @version @bitrix24/b24jssdk v0.1.
|
|
3
|
-
* @copyright (c)
|
|
2
|
+
* @version @bitrix24/b24jssdk v0.1.7
|
|
3
|
+
* @copyright (c) 2025 Bitrix24
|
|
4
4
|
* @licence MIT
|
|
5
5
|
* @links https://github.com/bitrix24/b24jssdk - GitHub
|
|
6
6
|
* @links https://bitrix24.github.io/b24jssdk/ - Documentation
|
|
@@ -1632,7 +1632,7 @@ class Http {
|
|
|
1632
1632
|
result.logTag = this.#logTag;
|
|
1633
1633
|
}
|
|
1634
1634
|
result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
|
|
1635
|
-
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.
|
|
1635
|
+
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.7";
|
|
1636
1636
|
if (!!result.data && !!result.data.start) {
|
|
1637
1637
|
delete result.data.start;
|
|
1638
1638
|
}
|
|
@@ -2786,6 +2786,8 @@ var MessageCommands = /* @__PURE__ */ ((MessageCommands2) => {
|
|
|
2786
2786
|
MessageCommands2["selectAccess"] = "selectAccess";
|
|
2787
2787
|
MessageCommands2["selectCRM"] = "selectCRM";
|
|
2788
2788
|
MessageCommands2["showAppForm"] = "showAppForm";
|
|
2789
|
+
MessageCommands2["getInterface"] = "getInterface";
|
|
2790
|
+
MessageCommands2["placementBindEvent"] = "placementBindEvent";
|
|
2789
2791
|
return MessageCommands2;
|
|
2790
2792
|
})(MessageCommands || {});
|
|
2791
2793
|
|
|
@@ -3591,9 +3593,11 @@ class SliderManager {
|
|
|
3591
3593
|
}
|
|
3592
3594
|
|
|
3593
3595
|
class PlacementManager {
|
|
3596
|
+
#messageManager;
|
|
3594
3597
|
#title = "";
|
|
3595
3598
|
#options = {};
|
|
3596
|
-
constructor() {
|
|
3599
|
+
constructor(messageManager) {
|
|
3600
|
+
this.#messageManager = messageManager;
|
|
3597
3601
|
}
|
|
3598
3602
|
/**
|
|
3599
3603
|
* Initializes the data received from the parent window message.
|
|
@@ -3617,6 +3621,54 @@ class PlacementManager {
|
|
|
3617
3621
|
get isSliderMode() {
|
|
3618
3622
|
return this.options?.IFRAME === "Y";
|
|
3619
3623
|
}
|
|
3624
|
+
/**
|
|
3625
|
+
* Get Information About the JS Interface of the Current Embedding Location
|
|
3626
|
+
*
|
|
3627
|
+
* @return {Promise<any>}
|
|
3628
|
+
*
|
|
3629
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-get-interface.html
|
|
3630
|
+
*/
|
|
3631
|
+
async getInterface() {
|
|
3632
|
+
return this.#messageManager.send(
|
|
3633
|
+
MessageCommands.getInterface,
|
|
3634
|
+
{
|
|
3635
|
+
isSafely: true
|
|
3636
|
+
}
|
|
3637
|
+
);
|
|
3638
|
+
}
|
|
3639
|
+
/**
|
|
3640
|
+
* Set Up the Interface Event Handler
|
|
3641
|
+
* @param {string} eventName
|
|
3642
|
+
* @return {Promise<any>}
|
|
3643
|
+
*
|
|
3644
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
3645
|
+
*/
|
|
3646
|
+
async bindEvent(eventName) {
|
|
3647
|
+
return this.#messageManager.send(
|
|
3648
|
+
MessageCommands.getInterface,
|
|
3649
|
+
{
|
|
3650
|
+
event: eventName,
|
|
3651
|
+
isSafely: true
|
|
3652
|
+
}
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3655
|
+
/**
|
|
3656
|
+
* Call the Registered Interface Command
|
|
3657
|
+
* @param {string} command
|
|
3658
|
+
* @param {Record<string, any>} parameters
|
|
3659
|
+
* @return {Promise<any>}
|
|
3660
|
+
*
|
|
3661
|
+
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
|
|
3662
|
+
*/
|
|
3663
|
+
async call(command, parameters = {}) {
|
|
3664
|
+
return this.#messageManager.send(
|
|
3665
|
+
command,
|
|
3666
|
+
{
|
|
3667
|
+
...parameters,
|
|
3668
|
+
isSafely: true
|
|
3669
|
+
}
|
|
3670
|
+
);
|
|
3671
|
+
}
|
|
3620
3672
|
}
|
|
3621
3673
|
|
|
3622
3674
|
class B24Frame extends AbstractB24 {
|
|
@@ -3644,7 +3696,7 @@ class B24Frame extends AbstractB24 {
|
|
|
3644
3696
|
this.#appFrame,
|
|
3645
3697
|
this.#messageManager
|
|
3646
3698
|
);
|
|
3647
|
-
this.#placementManager = new PlacementManager();
|
|
3699
|
+
this.#placementManager = new PlacementManager(this.#messageManager);
|
|
3648
3700
|
this._isInit = false;
|
|
3649
3701
|
}
|
|
3650
3702
|
setLogger(logger) {
|