@bitrix24/b24jssdk 0.2.0 → 0.2.1
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 +41 -6
- package/dist/commonjs/index.cjs.map +1 -1
- package/dist/commonjs/index.d.cts +10 -3
- package/dist/commonjs/index.d.mts +10 -3
- package/dist/commonjs/index.d.ts +10 -3
- package/dist/esm/index.d.mts +10 -3
- package/dist/esm/index.d.ts +10 -3
- package/dist/esm/index.mjs +39 -7
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +41 -6
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +14 -14
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -294,6 +294,10 @@ declare class TypeManager {
|
|
|
294
294
|
}
|
|
295
295
|
declare const Type: TypeManager;
|
|
296
296
|
|
|
297
|
+
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
298
|
+
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
299
|
+
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
299
303
|
* It includes functions for encoding and decoding HTML entities, generating random strings,
|
|
@@ -1785,11 +1789,13 @@ declare class AppFrame {
|
|
|
1785
1789
|
* Parent Window Request Parameters
|
|
1786
1790
|
* @prop isSafely auto completion mode Promise.resolve()
|
|
1787
1791
|
* @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
|
|
1792
|
+
* @prop callBack for placement event
|
|
1788
1793
|
*/
|
|
1789
1794
|
interface SendParams {
|
|
1790
1795
|
[index: string]: any;
|
|
1791
1796
|
isSafely?: boolean;
|
|
1792
1797
|
safelyTime?: number;
|
|
1798
|
+
callBack?: (...args: any[]) => void;
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
1795
1801
|
* Parent Window Communication Manager at B24
|
|
@@ -1797,7 +1803,7 @@ interface SendParams {
|
|
|
1797
1803
|
declare class MessageManager {
|
|
1798
1804
|
#private;
|
|
1799
1805
|
protected _logger: null | LoggerBrowser;
|
|
1800
|
-
private runCallbackHandler;
|
|
1806
|
+
private readonly runCallbackHandler;
|
|
1801
1807
|
constructor(appFrame: AppFrame);
|
|
1802
1808
|
setLogger(logger: LoggerBrowser): void;
|
|
1803
1809
|
getLogger(): LoggerBrowser;
|
|
@@ -2223,11 +2229,12 @@ declare class PlacementManager {
|
|
|
2223
2229
|
/**
|
|
2224
2230
|
* Set Up the Interface Event Handler
|
|
2225
2231
|
* @param {string} eventName
|
|
2232
|
+
* @param {(...args: any[]) => void} callBack
|
|
2226
2233
|
* @return {Promise<any>}
|
|
2227
2234
|
*
|
|
2228
2235
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2229
2236
|
*/
|
|
2230
|
-
bindEvent(eventName: string): Promise<any>;
|
|
2237
|
+
bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
|
|
2231
2238
|
/**
|
|
2232
2239
|
* Call the Registered Interface Command
|
|
2233
2240
|
* @param {string} command
|
|
@@ -2929,4 +2936,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
2929
2936
|
|
|
2930
2937
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
2931
2938
|
|
|
2932
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, useB24Helper, useFormatter };
|
|
2939
|
+
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
|
@@ -294,6 +294,10 @@ declare class TypeManager {
|
|
|
294
294
|
}
|
|
295
295
|
declare const Type: TypeManager;
|
|
296
296
|
|
|
297
|
+
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
298
|
+
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
299
|
+
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
299
303
|
* It includes functions for encoding and decoding HTML entities, generating random strings,
|
|
@@ -1785,11 +1789,13 @@ declare class AppFrame {
|
|
|
1785
1789
|
* Parent Window Request Parameters
|
|
1786
1790
|
* @prop isSafely auto completion mode Promise.resolve()
|
|
1787
1791
|
* @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
|
|
1792
|
+
* @prop callBack for placement event
|
|
1788
1793
|
*/
|
|
1789
1794
|
interface SendParams {
|
|
1790
1795
|
[index: string]: any;
|
|
1791
1796
|
isSafely?: boolean;
|
|
1792
1797
|
safelyTime?: number;
|
|
1798
|
+
callBack?: (...args: any[]) => void;
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
1795
1801
|
* Parent Window Communication Manager at B24
|
|
@@ -1797,7 +1803,7 @@ interface SendParams {
|
|
|
1797
1803
|
declare class MessageManager {
|
|
1798
1804
|
#private;
|
|
1799
1805
|
protected _logger: null | LoggerBrowser;
|
|
1800
|
-
private runCallbackHandler;
|
|
1806
|
+
private readonly runCallbackHandler;
|
|
1801
1807
|
constructor(appFrame: AppFrame);
|
|
1802
1808
|
setLogger(logger: LoggerBrowser): void;
|
|
1803
1809
|
getLogger(): LoggerBrowser;
|
|
@@ -2223,11 +2229,12 @@ declare class PlacementManager {
|
|
|
2223
2229
|
/**
|
|
2224
2230
|
* Set Up the Interface Event Handler
|
|
2225
2231
|
* @param {string} eventName
|
|
2232
|
+
* @param {(...args: any[]) => void} callBack
|
|
2226
2233
|
* @return {Promise<any>}
|
|
2227
2234
|
*
|
|
2228
2235
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2229
2236
|
*/
|
|
2230
|
-
bindEvent(eventName: string): Promise<any>;
|
|
2237
|
+
bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
|
|
2231
2238
|
/**
|
|
2232
2239
|
* Call the Registered Interface Command
|
|
2233
2240
|
* @param {string} command
|
|
@@ -2929,4 +2936,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
2929
2936
|
|
|
2930
2937
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
2931
2938
|
|
|
2932
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, useB24Helper, useFormatter };
|
|
2939
|
+
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -294,6 +294,10 @@ declare class TypeManager {
|
|
|
294
294
|
}
|
|
295
295
|
declare const Type: TypeManager;
|
|
296
296
|
|
|
297
|
+
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
298
|
+
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
299
|
+
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
299
303
|
* It includes functions for encoding and decoding HTML entities, generating random strings,
|
|
@@ -1785,11 +1789,13 @@ declare class AppFrame {
|
|
|
1785
1789
|
* Parent Window Request Parameters
|
|
1786
1790
|
* @prop isSafely auto completion mode Promise.resolve()
|
|
1787
1791
|
* @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
|
|
1792
|
+
* @prop callBack for placement event
|
|
1788
1793
|
*/
|
|
1789
1794
|
interface SendParams {
|
|
1790
1795
|
[index: string]: any;
|
|
1791
1796
|
isSafely?: boolean;
|
|
1792
1797
|
safelyTime?: number;
|
|
1798
|
+
callBack?: (...args: any[]) => void;
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
1795
1801
|
* Parent Window Communication Manager at B24
|
|
@@ -1797,7 +1803,7 @@ interface SendParams {
|
|
|
1797
1803
|
declare class MessageManager {
|
|
1798
1804
|
#private;
|
|
1799
1805
|
protected _logger: null | LoggerBrowser;
|
|
1800
|
-
private runCallbackHandler;
|
|
1806
|
+
private readonly runCallbackHandler;
|
|
1801
1807
|
constructor(appFrame: AppFrame);
|
|
1802
1808
|
setLogger(logger: LoggerBrowser): void;
|
|
1803
1809
|
getLogger(): LoggerBrowser;
|
|
@@ -2223,11 +2229,12 @@ declare class PlacementManager {
|
|
|
2223
2229
|
/**
|
|
2224
2230
|
* Set Up the Interface Event Handler
|
|
2225
2231
|
* @param {string} eventName
|
|
2232
|
+
* @param {(...args: any[]) => void} callBack
|
|
2226
2233
|
* @return {Promise<any>}
|
|
2227
2234
|
*
|
|
2228
2235
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2229
2236
|
*/
|
|
2230
|
-
bindEvent(eventName: string): Promise<any>;
|
|
2237
|
+
bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
|
|
2231
2238
|
/**
|
|
2232
2239
|
* Call the Registered Interface Command
|
|
2233
2240
|
* @param {string} command
|
|
@@ -2929,4 +2936,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
2929
2936
|
|
|
2930
2937
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
2931
2938
|
|
|
2932
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, useB24Helper, useFormatter };
|
|
2939
|
+
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -294,6 +294,10 @@ declare class TypeManager {
|
|
|
294
294
|
}
|
|
295
295
|
declare const Type: TypeManager;
|
|
296
296
|
|
|
297
|
+
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
298
|
+
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
299
|
+
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
299
303
|
* It includes functions for encoding and decoding HTML entities, generating random strings,
|
|
@@ -1785,11 +1789,13 @@ declare class AppFrame {
|
|
|
1785
1789
|
* Parent Window Request Parameters
|
|
1786
1790
|
* @prop isSafely auto completion mode Promise.resolve()
|
|
1787
1791
|
* @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
|
|
1792
|
+
* @prop callBack for placement event
|
|
1788
1793
|
*/
|
|
1789
1794
|
interface SendParams {
|
|
1790
1795
|
[index: string]: any;
|
|
1791
1796
|
isSafely?: boolean;
|
|
1792
1797
|
safelyTime?: number;
|
|
1798
|
+
callBack?: (...args: any[]) => void;
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
1795
1801
|
* Parent Window Communication Manager at B24
|
|
@@ -1797,7 +1803,7 @@ interface SendParams {
|
|
|
1797
1803
|
declare class MessageManager {
|
|
1798
1804
|
#private;
|
|
1799
1805
|
protected _logger: null | LoggerBrowser;
|
|
1800
|
-
private runCallbackHandler;
|
|
1806
|
+
private readonly runCallbackHandler;
|
|
1801
1807
|
constructor(appFrame: AppFrame);
|
|
1802
1808
|
setLogger(logger: LoggerBrowser): void;
|
|
1803
1809
|
getLogger(): LoggerBrowser;
|
|
@@ -2223,11 +2229,12 @@ declare class PlacementManager {
|
|
|
2223
2229
|
/**
|
|
2224
2230
|
* Set Up the Interface Event Handler
|
|
2225
2231
|
* @param {string} eventName
|
|
2232
|
+
* @param {(...args: any[]) => void} callBack
|
|
2226
2233
|
* @return {Promise<any>}
|
|
2227
2234
|
*
|
|
2228
2235
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2229
2236
|
*/
|
|
2230
|
-
bindEvent(eventName: string): Promise<any>;
|
|
2237
|
+
bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
|
|
2231
2238
|
/**
|
|
2232
2239
|
* Call the Registered Interface Command
|
|
2233
2240
|
* @param {string} command
|
|
@@ -2929,4 +2936,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
2929
2936
|
|
|
2930
2937
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
2931
2938
|
|
|
2932
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, useB24Helper, useFormatter };
|
|
2939
|
+
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -294,6 +294,10 @@ declare class TypeManager {
|
|
|
294
294
|
}
|
|
295
295
|
declare const Type: TypeManager;
|
|
296
296
|
|
|
297
|
+
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
298
|
+
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
299
|
+
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
300
|
+
|
|
297
301
|
/**
|
|
298
302
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
299
303
|
* It includes functions for encoding and decoding HTML entities, generating random strings,
|
|
@@ -1785,11 +1789,13 @@ declare class AppFrame {
|
|
|
1785
1789
|
* Parent Window Request Parameters
|
|
1786
1790
|
* @prop isSafely auto completion mode Promise.resolve()
|
|
1787
1791
|
* @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
|
|
1792
|
+
* @prop callBack for placement event
|
|
1788
1793
|
*/
|
|
1789
1794
|
interface SendParams {
|
|
1790
1795
|
[index: string]: any;
|
|
1791
1796
|
isSafely?: boolean;
|
|
1792
1797
|
safelyTime?: number;
|
|
1798
|
+
callBack?: (...args: any[]) => void;
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
1795
1801
|
* Parent Window Communication Manager at B24
|
|
@@ -1797,7 +1803,7 @@ interface SendParams {
|
|
|
1797
1803
|
declare class MessageManager {
|
|
1798
1804
|
#private;
|
|
1799
1805
|
protected _logger: null | LoggerBrowser;
|
|
1800
|
-
private runCallbackHandler;
|
|
1806
|
+
private readonly runCallbackHandler;
|
|
1801
1807
|
constructor(appFrame: AppFrame);
|
|
1802
1808
|
setLogger(logger: LoggerBrowser): void;
|
|
1803
1809
|
getLogger(): LoggerBrowser;
|
|
@@ -2223,11 +2229,12 @@ declare class PlacementManager {
|
|
|
2223
2229
|
/**
|
|
2224
2230
|
* Set Up the Interface Event Handler
|
|
2225
2231
|
* @param {string} eventName
|
|
2232
|
+
* @param {(...args: any[]) => void} callBack
|
|
2226
2233
|
* @return {Promise<any>}
|
|
2227
2234
|
*
|
|
2228
2235
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
2229
2236
|
*/
|
|
2230
|
-
bindEvent(eventName: string): Promise<any>;
|
|
2237
|
+
bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
|
|
2231
2238
|
/**
|
|
2232
2239
|
* Call the Registered Interface Command
|
|
2233
2240
|
* @param {string} command
|
|
@@ -2929,4 +2936,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
2929
2936
|
|
|
2930
2937
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
2931
2938
|
|
|
2932
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, useB24Helper, useFormatter };
|
|
2939
|
+
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, type Fields, type GenderString, type GetPayload, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadTime, PlacementManager, type PlacementViewMode, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @version @bitrix24/b24jssdk v0.2.
|
|
2
|
+
* @version @bitrix24/b24jssdk v0.2.1
|
|
3
3
|
* @copyright (c) 2025 Bitrix24
|
|
4
4
|
* @licence MIT
|
|
5
5
|
* @links https://github.com/bitrix24/b24jssdk - GitHub
|
|
@@ -489,6 +489,24 @@ class TypeManager {
|
|
|
489
489
|
}
|
|
490
490
|
const Type = new TypeManager();
|
|
491
491
|
|
|
492
|
+
function pick(data, keys) {
|
|
493
|
+
const result = {};
|
|
494
|
+
for (const key of keys) {
|
|
495
|
+
result[key] = data[key];
|
|
496
|
+
}
|
|
497
|
+
return result;
|
|
498
|
+
}
|
|
499
|
+
function omit(data, keys) {
|
|
500
|
+
const result = { ...data };
|
|
501
|
+
for (const key of keys) {
|
|
502
|
+
delete result[key];
|
|
503
|
+
}
|
|
504
|
+
return result;
|
|
505
|
+
}
|
|
506
|
+
function isArrayOfArray(item) {
|
|
507
|
+
return Array.isArray(item[0]);
|
|
508
|
+
}
|
|
509
|
+
|
|
492
510
|
const _state = {};
|
|
493
511
|
let getRandomValues;
|
|
494
512
|
const randoms8 = new Uint8Array(16);
|
|
@@ -1867,7 +1885,7 @@ class Http {
|
|
|
1867
1885
|
result.logTag = this.#logTag;
|
|
1868
1886
|
}
|
|
1869
1887
|
result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
|
|
1870
|
-
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.
|
|
1888
|
+
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.1";
|
|
1871
1889
|
if (!!result.data && !!result.data.start) {
|
|
1872
1890
|
delete result.data.start;
|
|
1873
1891
|
}
|
|
@@ -3029,11 +3047,13 @@ var MessageCommands = /* @__PURE__ */ ((MessageCommands2) => {
|
|
|
3029
3047
|
class MessageManager {
|
|
3030
3048
|
#appFrame;
|
|
3031
3049
|
#callbackPromises;
|
|
3050
|
+
#callbackSingletone;
|
|
3032
3051
|
_logger = null;
|
|
3033
3052
|
runCallbackHandler;
|
|
3034
3053
|
constructor(appFrame) {
|
|
3035
3054
|
this.#appFrame = appFrame;
|
|
3036
3055
|
this.#callbackPromises = /* @__PURE__ */ new Map();
|
|
3056
|
+
this.#callbackSingletone = /* @__PURE__ */ new Map();
|
|
3037
3057
|
this.runCallbackHandler = this._runCallback.bind(this);
|
|
3038
3058
|
}
|
|
3039
3059
|
setLogger(logger) {
|
|
@@ -3083,17 +3103,22 @@ class MessageManager {
|
|
|
3083
3103
|
timeoutId: null
|
|
3084
3104
|
};
|
|
3085
3105
|
const keyPromise = this.#setCallbackPromise(promiseHandler);
|
|
3106
|
+
const paramsSend = omit(params || {}, ["callBack", "isSafely", "safelyTime"]);
|
|
3107
|
+
const { callBack } = params || {};
|
|
3108
|
+
if (callBack) {
|
|
3109
|
+
this.#callbackSingletone.set(keyPromise, callBack);
|
|
3110
|
+
}
|
|
3086
3111
|
if (command.toString().includes(":")) {
|
|
3087
3112
|
cmd = {
|
|
3088
3113
|
method: command.toString(),
|
|
3089
|
-
params:
|
|
3114
|
+
params: paramsSend ?? "",
|
|
3090
3115
|
callback: keyPromise,
|
|
3091
3116
|
appSid: this.#appFrame.getAppSid()
|
|
3092
3117
|
};
|
|
3093
3118
|
} else {
|
|
3094
3119
|
cmd = command.toString();
|
|
3095
3120
|
const listParams = [
|
|
3096
|
-
params ? JSON.stringify(
|
|
3121
|
+
params ? JSON.stringify(paramsSend) : null,
|
|
3097
3122
|
keyPromise,
|
|
3098
3123
|
this.#appFrame.getAppSid()
|
|
3099
3124
|
];
|
|
@@ -3148,6 +3173,11 @@ class MessageManager {
|
|
|
3148
3173
|
}
|
|
3149
3174
|
this.#callbackPromises.delete(cmd.id);
|
|
3150
3175
|
promise.resolve(cmd.args);
|
|
3176
|
+
} else if (this.#callbackSingletone.has(cmd.id)) {
|
|
3177
|
+
const callBack = this.#callbackSingletone.get(cmd.id);
|
|
3178
|
+
if (callBack) {
|
|
3179
|
+
callBack.apply(globalThis, [cmd.args]);
|
|
3180
|
+
}
|
|
3151
3181
|
}
|
|
3152
3182
|
}
|
|
3153
3183
|
}
|
|
@@ -3874,15 +3904,17 @@ class PlacementManager {
|
|
|
3874
3904
|
/**
|
|
3875
3905
|
* Set Up the Interface Event Handler
|
|
3876
3906
|
* @param {string} eventName
|
|
3907
|
+
* @param {(...args: any[]) => void} callBack
|
|
3877
3908
|
* @return {Promise<any>}
|
|
3878
3909
|
*
|
|
3879
3910
|
* @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-bind-event.html
|
|
3880
3911
|
*/
|
|
3881
|
-
async bindEvent(eventName) {
|
|
3912
|
+
async bindEvent(eventName, callBack) {
|
|
3882
3913
|
return this.#messageManager.send(
|
|
3883
|
-
MessageCommands.
|
|
3914
|
+
MessageCommands.placementBindEvent,
|
|
3884
3915
|
{
|
|
3885
3916
|
event: eventName,
|
|
3917
|
+
callBack,
|
|
3886
3918
|
isSafely: true
|
|
3887
3919
|
}
|
|
3888
3920
|
);
|
|
@@ -13517,5 +13549,5 @@ async function initializeB24Frame() {
|
|
|
13517
13549
|
});
|
|
13518
13550
|
}
|
|
13519
13551
|
|
|
13520
|
-
export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, B24Frame, B24Hook, B24LangList, PullClient as B24PullClientManager, Browser, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text, Type, TypeOption, TypeSpecificUrl, initializeB24Frame, useB24Helper, useFormatter };
|
|
13552
|
+
export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, B24Frame, B24Hook, B24LangList, PullClient as B24PullClientManager, Browser, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text, Type, TypeOption, TypeSpecificUrl, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
|
13521
13553
|
//# sourceMappingURL=index.mjs.map
|