chayns-api 2.0.2 → 2.0.4

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.
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "useCurrentPage", {
21
21
  return _useCurrentPage.useCurrentPage;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "useCustomCallbackFunction", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _useCustomCallbackFunction.useCustomCallbackFunction;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "useCustomData", {
25
31
  enumerable: true,
26
32
  get: function () {
@@ -169,4 +175,5 @@ var _useValues = require("./useValues");
169
175
  var _useFunctions = require("./useFunctions");
170
176
  var _useCurrentPage = require("./useCurrentPage");
171
177
  var _useCustomData = require("./useCustomData");
172
- var _useDialogState = require("./useDialogState");
178
+ var _useDialogState = require("./useDialogState");
179
+ var _useCustomCallbackFunction = require("./useCustomCallbackFunction");
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useCustomCallbackFunction = void 0;
7
+ var _useFunctions = require("./useFunctions");
8
+ /**
9
+ * @category Hooks
10
+ * Returns customCallbackFunction
11
+ */
12
+ const useCustomCallbackFunction = () => {
13
+ const {
14
+ customCallbackFunction
15
+ } = (0, _useFunctions.useFunctions)();
16
+ return customCallbackFunction;
17
+ };
18
+ exports.useCustomCallbackFunction = useCustomCallbackFunction;
@@ -443,7 +443,7 @@ class AppWrapper {
443
443
  id: options.id,
444
444
  showName: options.showName,
445
445
  position: options.position,
446
- params: new URLSearchParams(options.params).toString() || undefined
446
+ params: [new URLSearchParams(options.params).toString()] || undefined
447
447
  }, {
448
448
  awaitResult: false
449
449
  });
@@ -14,4 +14,5 @@ export { useValues } from './useValues';
14
14
  export { useFunctions } from './useFunctions';
15
15
  export { useCurrentPage } from './useCurrentPage';
16
16
  export { useCustomData } from './useCustomData';
17
- export { useDialogState, useDialogData } from './useDialogState';
17
+ export { useDialogState, useDialogData } from './useDialogState';
18
+ export { useCustomCallbackFunction } from './useCustomCallbackFunction';
@@ -0,0 +1,12 @@
1
+ import { useFunctions } from './useFunctions';
2
+
3
+ /**
4
+ * @category Hooks
5
+ * Returns customCallbackFunction
6
+ */
7
+ export const useCustomCallbackFunction = () => {
8
+ const {
9
+ customCallbackFunction
10
+ } = useFunctions();
11
+ return customCallbackFunction;
12
+ };
@@ -407,7 +407,7 @@ export class AppWrapper {
407
407
  id: options.id,
408
408
  showName: options.showName,
409
409
  position: options.position,
410
- params: new URLSearchParams(options.params).toString() || undefined
410
+ params: [new URLSearchParams(options.params).toString()] || undefined
411
411
  }, {
412
412
  awaitResult: false
413
413
  });
@@ -15,3 +15,4 @@ export { useFunctions } from './useFunctions';
15
15
  export { useCurrentPage } from './useCurrentPage';
16
16
  export { useCustomData } from './useCustomData';
17
17
  export { useDialogState, useDialogData } from './useDialogState';
18
+ export { useCustomCallbackFunction } from './useCustomCallbackFunction';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @category Hooks
3
+ * Returns customCallbackFunction
4
+ */
5
+ export declare const useCustomCallbackFunction: () => (type: string, data: unknown) => Promise<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",