chayns-api 1.1.18 → 1.1.19

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");
178
+ var _useCustomCallbackFunction = require("./useCustomCallbackFunction");
172
179
  var _useDialogState = require("./useDialogState");
@@ -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;
@@ -49,10 +49,15 @@ let DialogButtonType = exports.DialogButtonType = /*#__PURE__*/function (DialogB
49
49
  return DialogButtonType;
50
50
  }({});
51
51
  let ScreenSize = exports.ScreenSize = /*#__PURE__*/function (ScreenSize) {
52
+ /** screen width smaller than or equal 556px */
52
53
  ScreenSize[ScreenSize["XS"] = 0] = "XS";
54
+ /** screen width between 557px and 769px */
53
55
  ScreenSize[ScreenSize["SM"] = 1] = "SM";
56
+ /** screen width between 770px and 993px */
54
57
  ScreenSize[ScreenSize["MD"] = 2] = "MD";
58
+ /** screen width between 994px and 1200px */
55
59
  ScreenSize[ScreenSize["LG"] = 3] = "LG";
60
+ /** screen width larger than 1200px */
56
61
  ScreenSize[ScreenSize["XL"] = 4] = "XL";
57
62
  return ScreenSize;
58
63
  }({});
@@ -224,6 +229,7 @@ let RuntimeEnviroment = exports.RuntimeEnviroment = /*#__PURE__*/function (Runti
224
229
  RuntimeEnviroment[RuntimeEnviroment["Unknown"] = 0] = "Unknown";
225
230
  RuntimeEnviroment[RuntimeEnviroment["ChaynsDe"] = 1] = "ChaynsDe";
226
231
  RuntimeEnviroment[RuntimeEnviroment["ChaynsWeb"] = 2] = "ChaynsWeb";
232
+ // ?
227
233
  RuntimeEnviroment[RuntimeEnviroment["ChaynsRuntime"] = 3] = "ChaynsRuntime";
228
234
  RuntimeEnviroment[RuntimeEnviroment["IntercomPlugin"] = 4] = "IntercomPlugin";
229
235
  RuntimeEnviroment[RuntimeEnviroment["PagemakerPlugin"] = 5] = "PagemakerPlugin";
@@ -25,7 +25,7 @@ class AppWrapper {
25
25
  values = null;
26
26
  accessToken = '';
27
27
  mapOldApiToNew(retVal) {
28
- var _window, _colorMode, _window2, _AppInfo$TappSelected;
28
+ var _window, _window2, _AppInfo$TappSelected;
29
29
  const {
30
30
  AppInfo,
31
31
  AppUser,
@@ -95,7 +95,7 @@ class AppWrapper {
95
95
  docked: false
96
96
  },
97
97
  title: AppInfo.Title,
98
- colorMode: (_colorMode = colorMode) !== null && _colorMode !== void 0 ? _colorMode : AppInfo.colorMode,
98
+ colorMode: colorMode !== null && colorMode !== void 0 ? colorMode : AppInfo.colorMode,
99
99
  color,
100
100
  domain: AppInfo.domain,
101
101
  font: {
@@ -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 { useCustomCallbackFunction } from './useCustomCallbackFunction';
17
18
  export { useDialogState, useDialogData } from './useDialogState';
@@ -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
+ };
@@ -43,10 +43,15 @@ export let DialogButtonType = /*#__PURE__*/function (DialogButtonType) {
43
43
  return DialogButtonType;
44
44
  }({});
45
45
  export let ScreenSize = /*#__PURE__*/function (ScreenSize) {
46
+ /** screen width smaller than or equal 556px */
46
47
  ScreenSize[ScreenSize["XS"] = 0] = "XS";
48
+ /** screen width between 557px and 769px */
47
49
  ScreenSize[ScreenSize["SM"] = 1] = "SM";
50
+ /** screen width between 770px and 993px */
48
51
  ScreenSize[ScreenSize["MD"] = 2] = "MD";
52
+ /** screen width between 994px and 1200px */
49
53
  ScreenSize[ScreenSize["LG"] = 3] = "LG";
54
+ /** screen width larger than 1200px */
50
55
  ScreenSize[ScreenSize["XL"] = 4] = "XL";
51
56
  return ScreenSize;
52
57
  }({});
@@ -221,6 +226,7 @@ export let RuntimeEnviroment = /*#__PURE__*/function (RuntimeEnviroment) {
221
226
  RuntimeEnviroment[RuntimeEnviroment["Unknown"] = 0] = "Unknown";
222
227
  RuntimeEnviroment[RuntimeEnviroment["ChaynsDe"] = 1] = "ChaynsDe";
223
228
  RuntimeEnviroment[RuntimeEnviroment["ChaynsWeb"] = 2] = "ChaynsWeb";
229
+ // ?
224
230
  RuntimeEnviroment[RuntimeEnviroment["ChaynsRuntime"] = 3] = "ChaynsRuntime";
225
231
  RuntimeEnviroment[RuntimeEnviroment["IntercomPlugin"] = 4] = "IntercomPlugin";
226
232
  RuntimeEnviroment[RuntimeEnviroment["PagemakerPlugin"] = 5] = "PagemakerPlugin";
@@ -17,7 +17,7 @@ import { isAppCallSupported } from '../util/is';
17
17
  let appWrapperDialogId = 0;
18
18
  export class AppWrapper {
19
19
  mapOldApiToNew(retVal) {
20
- var _window, _colorMode, _window2, _AppInfo$TappSelected;
20
+ var _window, _window2, _AppInfo$TappSelected;
21
21
  const {
22
22
  AppInfo,
23
23
  AppUser,
@@ -87,7 +87,7 @@ export class AppWrapper {
87
87
  docked: false
88
88
  },
89
89
  title: AppInfo.Title,
90
- colorMode: (_colorMode = colorMode) !== null && _colorMode !== void 0 ? _colorMode : AppInfo.colorMode,
90
+ colorMode: colorMode !== null && colorMode !== void 0 ? colorMode : AppInfo.colorMode,
91
91
  color,
92
92
  domain: AppInfo.domain,
93
93
  font: {
@@ -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 { useCustomCallbackFunction } from './useCustomCallbackFunction';
17
18
  export { useDialogState, useDialogData } from './useDialogState';
@@ -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": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",