chayns-api 2.0.3 → 2.0.5

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;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WeekDayType = exports.ToastType = exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.MediaType = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.FloatingButtonAnimation = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogIconType = exports.DialogButtonType = exports.DialogAnimation = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
6
+ exports.WeekDayType = exports.ToastType = exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.MediaType = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.FloatingButtonAnimation = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogIconType = exports.DialogFadeAnimation = exports.DialogButtonType = exports.DialogAnimation = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
7
7
  let DateType = exports.DateType = /*#__PURE__*/function (DateType) {
8
8
  DateType[DateType["DATE"] = 0] = "DATE";
9
9
  DateType[DateType["TIME"] = 1] = "TIME";
@@ -324,6 +324,11 @@ let DialogAnimation = exports.DialogAnimation = /*#__PURE__*/function (DialogAni
324
324
  DialogAnimation["CONFETTI"] = "confetti";
325
325
  return DialogAnimation;
326
326
  }({});
327
+ let DialogFadeAnimation = exports.DialogFadeAnimation = /*#__PURE__*/function (DialogFadeAnimation) {
328
+ DialogFadeAnimation["FADE"] = "fade";
329
+ DialogFadeAnimation["SCALE"] = "scale";
330
+ return DialogFadeAnimation;
331
+ }({});
327
332
  let DialogIconType = exports.DialogIconType = /*#__PURE__*/function (DialogIconType) {
328
333
  DialogIconType["SuccessIcon"] = "%%DialogSuccessIcon%%";
329
334
  DialogIconType["WarningIcon"] = "%%DialogWarningIcon%%";
@@ -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
+ };
@@ -321,6 +321,11 @@ export let DialogAnimation = /*#__PURE__*/function (DialogAnimation) {
321
321
  DialogAnimation["CONFETTI"] = "confetti";
322
322
  return DialogAnimation;
323
323
  }({});
324
+ export let DialogFadeAnimation = /*#__PURE__*/function (DialogFadeAnimation) {
325
+ DialogFadeAnimation["FADE"] = "fade";
326
+ DialogFadeAnimation["SCALE"] = "scale";
327
+ return DialogFadeAnimation;
328
+ }({});
324
329
  export let DialogIconType = /*#__PURE__*/function (DialogIconType) {
325
330
  DialogIconType["SuccessIcon"] = "%%DialogSuccessIcon%%";
326
331
  DialogIconType["WarningIcon"] = "%%DialogWarningIcon%%";
@@ -224,9 +224,7 @@ export declare const getLanguage: () => {
224
224
  site: import("../types/IChaynsReact").Language;
225
225
  translation: import("../types/IChaynsReact").Language | null;
226
226
  device: import("../types/IChaynsReact").Language;
227
- active: import("../types/IChaynsReact").Language; /**
228
- * Select other page on chayns site.
229
- */
227
+ active: import("../types/IChaynsReact").Language;
230
228
  };
231
229
  export declare const getParameters: () => {
232
230
  [key: string]: string | string[];
@@ -244,9 +242,7 @@ export declare const language: {
244
242
  site: import("../types/IChaynsReact").Language;
245
243
  translation: import("../types/IChaynsReact").Language | null;
246
244
  device: import("../types/IChaynsReact").Language;
247
- active: import("../types/IChaynsReact").Language; /**
248
- * Select other page on chayns site.
249
- */
245
+ active: import("../types/IChaynsReact").Language;
250
246
  };
251
247
  export declare const parameters: {
252
248
  [key: string]: string | string[];
@@ -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>;
@@ -82,6 +82,9 @@ export interface BaseDialog {
82
82
  type: DialogAnimation;
83
83
  config?: any;
84
84
  };
85
+ fadeAnimation?: {
86
+ type: DialogFadeAnimation;
87
+ };
85
88
  }
86
89
  export type Dialog<T extends any = object> = BaseDialog & (DialogAlert | DialogConfirm | DialogInput | DialogModule<T> | DialogIFrame<T> | DialogSelect | DialogDate | DialogToast | DialogSignature | DialogFileSelect);
87
90
  export interface DialogSignature {
@@ -885,6 +888,10 @@ export type OpenMedia = {
885
888
  export declare enum DialogAnimation {
886
889
  CONFETTI = "confetti"
887
890
  }
891
+ export declare enum DialogFadeAnimation {
892
+ FADE = "fade",
893
+ SCALE = "scale"
894
+ }
888
895
  export declare enum DialogIconType {
889
896
  SuccessIcon = "%%DialogSuccessIcon%%",
890
897
  WarningIcon = "%%DialogWarningIcon%%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",