chayns-api 1.0.26 → 1.0.27-0

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.
@@ -30,7 +30,7 @@ const AppDialogWrapper = ({
30
30
  type: "client-module",
31
31
  system: {
32
32
  module: './AppWrapper',
33
- url: 'https://tapp-staging.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
33
+ url: 'https://tapp.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
34
34
  scope: 'dialog_v2'
35
35
  }
36
36
  }, data, {
@@ -3,7 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.Environment = exports.DialogType = exports.DialogButtonType = exports.DeviceOs = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
6
+ exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.Environment = exports.DialogType = exports.DialogButtonType = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
7
+ let DateType;
8
+ exports.DateType = DateType;
9
+ (function (DateType) {
10
+ DateType[DateType["DATE"] = 0] = "DATE";
11
+ DateType[DateType["TIME"] = 1] = "TIME";
12
+ DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
13
+ })(DateType || (exports.DateType = DateType = {}));
7
14
  let DialogButtonType;
8
15
  exports.DialogButtonType = DialogButtonType;
9
16
  (function (DialogButtonType) {
@@ -22,7 +22,7 @@ const AppDialogWrapper = _ref => {
22
22
  type: "client-module",
23
23
  system: {
24
24
  module: './AppWrapper',
25
- url: 'https://tapp-staging.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
25
+ url: 'https://tapp.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
26
26
  scope: 'dialog_v2'
27
27
  }
28
28
  }, data, {
@@ -1,3 +1,9 @@
1
+ export let DateType;
2
+ (function (DateType) {
3
+ DateType[DateType["DATE"] = 0] = "DATE";
4
+ DateType[DateType["TIME"] = 1] = "TIME";
5
+ DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
6
+ })(DateType || (DateType = {}));
1
7
  export let DialogButtonType;
2
8
  (function (DialogButtonType) {
3
9
  DialogButtonType[DialogButtonType["OK"] = 1] = "OK";
@@ -5,13 +5,30 @@ export type DialogButton = {
5
5
  type: DialogButtonType;
6
6
  text: string;
7
7
  };
8
- export type BaseDialog = {
8
+ export declare enum DateType {
9
+ DATE = 0,
10
+ TIME = 1,
11
+ DATE_TIME = 2
12
+ }
13
+ export interface DialogDate {
14
+ type: DialogType.DATE;
15
+ minDate: Date;
16
+ maxDate: Date;
17
+ minDuration?: number;
18
+ minuteInterval?: number;
19
+ preselect?: Date;
20
+ dateType?: DateType;
21
+ multiselect?: boolean;
22
+ monthSelect?: boolean;
23
+ yearSelect?: boolean;
24
+ }
25
+ export interface BaseDialog {
9
26
  text?: string;
10
27
  buttons?: DialogButton[];
11
28
  dialogId: number;
12
- };
13
- export type Dialog = BaseDialog & (DialogInput | DialogModule | DialogIFrame | DialogSelect);
14
- export type DialogModule = {
29
+ }
30
+ export type Dialog = BaseDialog & (DialogInput | DialogModule | DialogIFrame | DialogSelect | DialogDate);
31
+ export interface DialogModule {
15
32
  type: DialogType.MODULE;
16
33
  system: {
17
34
  url: string;
@@ -19,19 +36,17 @@ export type DialogModule = {
19
36
  scope: string;
20
37
  };
21
38
  dialogInput: object;
22
- isClosingRequested: boolean;
23
- };
24
- export type DialogIFrame = {
39
+ }
40
+ export interface DialogIFrame {
25
41
  type: DialogType.IFRAME;
26
42
  url: string;
27
43
  dialogInput: object;
28
- isClosingRequested: boolean;
29
- };
30
- export type DialogInput = {
44
+ }
45
+ export interface DialogInput {
31
46
  type: DialogType.INPUT;
32
47
  placeholder: string;
33
- };
34
- export type DialogSelect = {
48
+ }
49
+ export interface DialogSelect {
35
50
  type: DialogType.SELECT;
36
51
  list: {
37
52
  id: number;
@@ -39,7 +54,7 @@ export type DialogSelect = {
39
54
  disabled?: boolean;
40
55
  isSelected?: boolean;
41
56
  }[];
42
- };
57
+ }
43
58
  export declare enum DialogButtonType {
44
59
  OK = 1,
45
60
  CANCEL = -1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.0.26",
3
+ "version": "1.0.27-0",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",