chayns-api 2.2.0-beta.0 → 2.2.0-beta.2

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.scrollByY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeToolbarChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openMedia = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getSiteSettings = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getCustomFunction = exports.getCurrentPage = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.createDialog = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addToolbarChangeListener = exports.addScrollListener = exports.addGeoLocationListener = exports.addAnonymousAccount = void 0;
6
+ exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.scrollByY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeToolbarChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openMedia = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getStyleSettings = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getCustomFunction = exports.getCurrentPage = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.createDialog = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addToolbarChangeListener = exports.addScrollListener = exports.addGeoLocationListener = exports.addAnonymousAccount = void 0;
7
7
  var _moduleWrapper = require("../components/moduleWrapper");
8
8
  const addGeoLocationListener = (...args) => _moduleWrapper.moduleWrapper.current.functions.addGeoLocationListener(...args);
9
9
  exports.addGeoLocationListener = addGeoLocationListener;
@@ -119,8 +119,8 @@ const getPages = () => _moduleWrapper.moduleWrapper.current.values.pages;
119
119
  exports.getPages = getPages;
120
120
  const getEnvironment = () => _moduleWrapper.moduleWrapper.current.values.environment;
121
121
  exports.getEnvironment = getEnvironment;
122
- const getSiteSettings = () => _moduleWrapper.moduleWrapper.current.values.siteSettings;
123
- exports.getSiteSettings = getSiteSettings;
122
+ const getStyleSettings = () => _moduleWrapper.moduleWrapper.current.values.styleSettings;
123
+ exports.getStyleSettings = getStyleSettings;
124
124
  const getCustomFunction = key => _moduleWrapper.moduleWrapper.current.customFunctions[key];
125
125
  exports.getCustomFunction = getCustomFunction;
126
126
  const user = exports.user = new Proxy({}, {
@@ -141,10 +141,10 @@ Object.defineProperty(exports, "useSite", {
141
141
  return _useSite.useSite;
142
142
  }
143
143
  });
144
- Object.defineProperty(exports, "useSiteSettings", {
144
+ Object.defineProperty(exports, "useStyleSettings", {
145
145
  enumerable: true,
146
146
  get: function () {
147
- return _useSiteSettings.useSiteSettings;
147
+ return _useStyleSettings.useStyleSettings;
148
148
  }
149
149
  });
150
150
  Object.defineProperty(exports, "useUser", {
@@ -190,4 +190,4 @@ var _useCustomData = require("./useCustomData");
190
190
  var _useDialogState = require("./useDialogState");
191
191
  var _useCustomCallbackFunction = require("./useCustomCallbackFunction");
192
192
  var _useCustomFunction = require("./useCustomFunction");
193
- var _useSiteSettings = require("./useSiteSettings");
193
+ var _useStyleSettings = require("./useStyleSettings");
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useStyleSettings = void 0;
7
+ var _context = require("./context");
8
+ const useStyleSettings = () => (0, _context.useValuesSelector)(state => state.styleSettings);
9
+ exports.useStyleSettings = useStyleSettings;
@@ -31,7 +31,7 @@ const ChaynsHost = ({
31
31
  environment,
32
32
  preventStagingReplacement,
33
33
  dialog,
34
- siteSettings
34
+ styleSettings
35
35
  }) => {
36
36
  const [isVisible, setIsVisible] = (0, _react.useState)(type !== 'client-module' && (type !== 'server-module' || !!(system !== null && system !== void 0 && system.serverUrl)));
37
37
  (0, _react.useEffect)(() => {
@@ -69,7 +69,7 @@ const ChaynsHost = ({
69
69
  customData: customData,
70
70
  preventStagingReplacement: preventStagingReplacement,
71
71
  dialog: dialog,
72
- siteSettings: siteSettings
72
+ styleSettings: styleSettings
73
73
  });
74
74
  case 'client-module':
75
75
  case 'server-module':
@@ -90,7 +90,7 @@ const ChaynsHost = ({
90
90
  environment: environment,
91
91
  preventStagingReplacement: preventStagingReplacement,
92
92
  dialog: dialog,
93
- siteSettings: siteSettings
93
+ styleSettings: styleSettings
94
94
  });
95
95
  default:
96
96
  return null;
@@ -32,7 +32,7 @@ const HostIframe = ({
32
32
  customData,
33
33
  preventStagingReplacement,
34
34
  dialog,
35
- siteSettings
35
+ styleSettings
36
36
  }) => {
37
37
  const eventTarget = (0, _react.useRef)();
38
38
  const ref = (0, _react.useRef)();
@@ -59,7 +59,7 @@ const HostIframe = ({
59
59
  environment,
60
60
  customData,
61
61
  dialog,
62
- siteSettings
62
+ styleSettings
63
63
  };
64
64
  currentDataRef.current = initialData;
65
65
  (0, _react.useEffect)(() => {
@@ -114,7 +114,7 @@ const HostIframe = ({
114
114
  (0, _useUpdateData.default)(eventTarget.current, 'environment', environment);
115
115
  (0, _useUpdateData.default)(eventTarget.current, 'customData', customData);
116
116
  (0, _useUpdateData.default)(eventTarget.current, 'dialog', dialog);
117
- (0, _useUpdateData.default)(eventTarget.current, 'siteSettings', siteSettings);
117
+ (0, _useUpdateData.default)(eventTarget.current, 'styleSettings', styleSettings);
118
118
  return _react.default.createElement("iframe", _extends({
119
119
  ref: r => {
120
120
  ref.current = r;
@@ -37,7 +37,7 @@ const ModuleHost = ({
37
37
  dialog,
38
38
  environment,
39
39
  preventStagingReplacement,
40
- siteSettings
40
+ styleSettings
41
41
  }) => {
42
42
  const initialData = {
43
43
  site,
@@ -49,7 +49,7 @@ const ModuleHost = ({
49
49
  parameters,
50
50
  customData,
51
51
  environment,
52
- siteSettings
52
+ styleSettings
53
53
  };
54
54
  if (user) {
55
55
  initialData.user = user;
@@ -23,7 +23,7 @@ class AppWrapper {
23
23
  accessToken = '';
24
24
  listeners = [];
25
25
  customFunctions = {};
26
- async loadSiteSettings(siteId) {
26
+ async loadStyleSettings(siteId) {
27
27
  try {
28
28
  var _AbortSignal$timeout, _AbortSignal;
29
29
  const res = await fetch(`https://style.tobit.cloud/css/${siteId}/components`, {
@@ -32,9 +32,9 @@ class AppWrapper {
32
32
  if (res.status === 200) {
33
33
  return await res.json();
34
34
  }
35
- console.error(`[chayns-api] failed to load site settings with status code: ${res.status}`);
35
+ console.error(`[chayns-api] failed to load style settings with status code: ${res.status}`);
36
36
  } catch (ex) {
37
- console.error('[chayns-api] failed to load site settings', ex);
37
+ console.error('[chayns-api] failed to load style settings', ex);
38
38
  }
39
39
  return undefined;
40
40
  }
@@ -601,7 +601,7 @@ class AppWrapper {
601
601
  dialogs = [];
602
602
  async init() {
603
603
  this.values = this.mapOldApiToNew(await this.appCall(18));
604
- this.values.siteSettings = await this.loadSiteSettings(this.values.site.id);
604
+ this.values.styleSettings = await this.loadStyleSettings(this.values.site.id);
605
605
  document.documentElement.classList.add('chayns-api--app');
606
606
  this.appCall(66, {
607
607
  enabled: true
@@ -39,7 +39,7 @@ class StaticChaynsApi {
39
39
  getParameters = () => this._wrapper.values.parameters;
40
40
  getPages = () => this._wrapper.values.pages;
41
41
  getEnvironment = () => this._wrapper.values.environment;
42
- getSiteSettings = () => this._wrapper.values.siteSettings;
42
+ getStyleSettings = () => this._wrapper.values.styleSettings;
43
43
  getCustomFunction = key => this._wrapper.customFunctions[key];
44
44
  }
45
45
  var _default = exports.default = StaticChaynsApi;
@@ -150,7 +150,7 @@ export const getLanguage = () => moduleWrapper.current.values.language;
150
150
  export const getParameters = () => moduleWrapper.current.values.parameters;
151
151
  export const getPages = () => moduleWrapper.current.values.pages;
152
152
  export const getEnvironment = () => moduleWrapper.current.values.environment;
153
- export const getSiteSettings = () => moduleWrapper.current.values.siteSettings;
153
+ export const getStyleSettings = () => moduleWrapper.current.values.styleSettings;
154
154
  export const getCustomFunction = key => moduleWrapper.current.customFunctions[key];
155
155
  export const user = new Proxy({}, {
156
156
  get: (target, prop) => {
@@ -17,4 +17,4 @@ export { useCustomData } from './useCustomData';
17
17
  export { useDialogState, useDialogData } from './useDialogState';
18
18
  export { useCustomCallbackFunction } from './useCustomCallbackFunction';
19
19
  export { useCustomFunction } from './useCustomFunction';
20
- export { useSiteSettings } from './useSiteSettings';
20
+ export { useStyleSettings } from './useStyleSettings';
@@ -0,0 +1,2 @@
1
+ import { useValuesSelector } from './context';
2
+ export const useStyleSettings = () => useValuesSelector(state => state.styleSettings);
@@ -23,7 +23,7 @@ const ChaynsHost = _ref => {
23
23
  environment,
24
24
  preventStagingReplacement,
25
25
  dialog,
26
- siteSettings
26
+ styleSettings
27
27
  } = _ref;
28
28
  const [isVisible, setIsVisible] = useState(type !== 'client-module' && (type !== 'server-module' || !!(system !== null && system !== void 0 && system.serverUrl)));
29
29
  useEffect(() => {
@@ -61,7 +61,7 @@ const ChaynsHost = _ref => {
61
61
  customData: customData,
62
62
  preventStagingReplacement: preventStagingReplacement,
63
63
  dialog: dialog,
64
- siteSettings: siteSettings
64
+ styleSettings: styleSettings
65
65
  });
66
66
  case 'client-module':
67
67
  case 'server-module':
@@ -82,7 +82,7 @@ const ChaynsHost = _ref => {
82
82
  environment: environment,
83
83
  preventStagingReplacement: preventStagingReplacement,
84
84
  dialog: dialog,
85
- siteSettings: siteSettings
85
+ styleSettings: styleSettings
86
86
  });
87
87
  default:
88
88
  return null;
@@ -24,7 +24,7 @@ const HostIframe = _ref => {
24
24
  customData,
25
25
  preventStagingReplacement,
26
26
  dialog,
27
- siteSettings
27
+ styleSettings
28
28
  } = _ref;
29
29
  const eventTarget = useRef();
30
30
  const ref = useRef();
@@ -51,7 +51,7 @@ const HostIframe = _ref => {
51
51
  environment,
52
52
  customData,
53
53
  dialog,
54
- siteSettings
54
+ styleSettings
55
55
  };
56
56
  currentDataRef.current = initialData;
57
57
  useEffect(() => {
@@ -106,7 +106,7 @@ const HostIframe = _ref => {
106
106
  useUpdateData(eventTarget.current, 'environment', environment);
107
107
  useUpdateData(eventTarget.current, 'customData', customData);
108
108
  useUpdateData(eventTarget.current, 'dialog', dialog);
109
- useUpdateData(eventTarget.current, 'siteSettings', siteSettings);
109
+ useUpdateData(eventTarget.current, 'styleSettings', styleSettings);
110
110
  return React.createElement("iframe", _extends({
111
111
  ref: r => {
112
112
  ref.current = r;
@@ -30,7 +30,7 @@ const ModuleHost = _ref2 => {
30
30
  dialog,
31
31
  environment,
32
32
  preventStagingReplacement,
33
- siteSettings
33
+ styleSettings
34
34
  } = _ref2;
35
35
  const initialData = {
36
36
  site,
@@ -42,7 +42,7 @@ const ModuleHost = _ref2 => {
42
42
  parameters,
43
43
  customData,
44
44
  environment,
45
- siteSettings
45
+ styleSettings
46
46
  };
47
47
  if (user) {
48
48
  initialData.user = user;
@@ -13,7 +13,7 @@ import { DeviceLanguage } from '../constants/languages';
13
13
  import { isAppCallSupported } from '../util/is';
14
14
  let appWrapperDialogId = 0;
15
15
  export class AppWrapper {
16
- async loadSiteSettings(siteId) {
16
+ async loadStyleSettings(siteId) {
17
17
  try {
18
18
  var _AbortSignal$timeout, _AbortSignal;
19
19
  const res = await fetch(`https://style.tobit.cloud/css/${siteId}/components`, {
@@ -22,9 +22,9 @@ export class AppWrapper {
22
22
  if (res.status === 200) {
23
23
  return await res.json();
24
24
  }
25
- console.error(`[chayns-api] failed to load site settings with status code: ${res.status}`);
25
+ console.error(`[chayns-api] failed to load style settings with status code: ${res.status}`);
26
26
  } catch (ex) {
27
- console.error('[chayns-api] failed to load site settings', ex);
27
+ console.error('[chayns-api] failed to load style settings', ex);
28
28
  }
29
29
  return undefined;
30
30
  }
@@ -611,7 +611,7 @@ export class AppWrapper {
611
611
  }
612
612
  async init() {
613
613
  this.values = this.mapOldApiToNew(await this.appCall(18));
614
- this.values.siteSettings = await this.loadSiteSettings(this.values.site.id);
614
+ this.values.styleSettings = await this.loadStyleSettings(this.values.site.id);
615
615
  document.documentElement.classList.add('chayns-api--app');
616
616
  this.appCall(66, {
617
617
  enabled: true
@@ -18,7 +18,7 @@ class StaticChaynsApi {
18
18
  _defineProperty(this, "getParameters", () => this._wrapper.values.parameters);
19
19
  _defineProperty(this, "getPages", () => this._wrapper.values.pages);
20
20
  _defineProperty(this, "getEnvironment", () => this._wrapper.values.environment);
21
- _defineProperty(this, "getSiteSettings", () => this._wrapper.values.siteSettings);
21
+ _defineProperty(this, "getStyleSettings", () => this._wrapper.values.styleSettings);
22
22
  _defineProperty(this, "getCustomFunction", key => this._wrapper.customFunctions[key]);
23
23
  let wrapper;
24
24
  const deviceInfo = getDeviceInfo(navigator.userAgent, '');
@@ -236,7 +236,7 @@ export declare const getEnvironment: () => {
236
236
  buildEnvironment: import("../types/IChaynsReact").Environment;
237
237
  runtimeEnvironment: import("../types/IChaynsReact").RuntimeEnviroment | string;
238
238
  };
239
- export declare const getSiteSettings: () => import("../types/IChaynsReact").ChaynsSiteSettings | undefined;
239
+ export declare const getStyleSettings: () => import("../types/IChaynsReact").ChaynsStyleSettings | undefined;
240
240
  /**
241
241
  * Returns the customFunction. Prefer usage via useCustomFunction when possible
242
242
  * @param key functionName
@@ -17,4 +17,4 @@ export { useCustomData } from './useCustomData';
17
17
  export { useDialogState, useDialogData } from './useDialogState';
18
18
  export { useCustomCallbackFunction } from './useCustomCallbackFunction';
19
19
  export { useCustomFunction } from './useCustomFunction';
20
- export { useSiteSettings } from './useSiteSettings';
20
+ export { useStyleSettings } from './useStyleSettings';
@@ -0,0 +1,2 @@
1
+ import { ChaynsStyleSettings } from '../types/IChaynsReact';
2
+ export declare const useStyleSettings: () => ChaynsStyleSettings | undefined;
@@ -25,7 +25,7 @@ type ChaynsHostType = {
25
25
  environment: ChaynsReactValues["environment"];
26
26
  preventStagingReplacement?: boolean;
27
27
  dialog: ChaynsReactValues["dialog"];
28
- siteSettings?: ChaynsReactValues["siteSettings"];
28
+ styleSettings?: ChaynsReactValues["styleSettings"];
29
29
  };
30
30
  declare const ChaynsHost: FC<ChaynsHostType>;
31
31
  export default ChaynsHost;
@@ -22,7 +22,7 @@ type HostIframeProps = {
22
22
  customData: ChaynsReactValues["customData"];
23
23
  preventStagingReplacement?: boolean;
24
24
  dialog: ChaynsReactValues["dialog"];
25
- siteSettings: ChaynsReactValues["siteSettings"];
25
+ styleSettings: ChaynsReactValues["styleSettings"];
26
26
  };
27
27
  declare const HostIframe: FC<HostIframeProps>;
28
28
  export default HostIframe;
@@ -24,7 +24,7 @@ type ModulePropTypes = {
24
24
  preventStagingReplacement?: boolean;
25
25
  dialog: ChaynsReactValues["dialog"];
26
26
  children?: ReactNode;
27
- siteSettings: ChaynsReactValues["siteSettings"];
27
+ styleSettings: ChaynsReactValues["styleSettings"];
28
28
  };
29
29
  declare const ModuleHost: FC<ModulePropTypes>;
30
30
  export default ModuleHost;
@@ -192,7 +192,7 @@ export declare enum IconStyle {
192
192
  DUOTONE = 3,
193
193
  SHARP = 4
194
194
  }
195
- export interface DesignSettings {
195
+ export interface ChaynsDesignSettings {
196
196
  siteId?: string;
197
197
  color: string;
198
198
  secondaryColor?: string;
@@ -204,12 +204,12 @@ export interface DesignSettings {
204
204
  backgroundColor?: string;
205
205
  headerBarColor?: string;
206
206
  accordionIcon?: number;
207
- accordionLines?: boolean;
207
+ accordionLines: boolean;
208
208
  cardBorderRadius?: number;
209
209
  cardBackgroundOpacity?: number;
210
210
  cardShadow?: number;
211
211
  }
212
- export interface ParagraphFormat {
212
+ export interface ChaynsParagraphFormat {
213
213
  selector: string;
214
214
  fontSizePx?: number;
215
215
  lineHeight?: number;
@@ -220,9 +220,9 @@ export interface ParagraphFormat {
220
220
  buttonDesignType?: number;
221
221
  backgroundColor?: string;
222
222
  }
223
- export type ChaynsSiteSettings = {
224
- designSettings: DesignSettings;
225
- paragraphFormats: ParagraphFormat[];
223
+ export type ChaynsStyleSettings = {
224
+ designSettings: ChaynsDesignSettings;
225
+ paragraphFormats: ChaynsParagraphFormat[];
226
226
  };
227
227
  export declare enum ScreenSize {
228
228
  /** screen width smaller than or equal 556px */
@@ -301,7 +301,7 @@ export interface ChaynsReactValues {
301
301
  dialogInput: any;
302
302
  isClosingRequested: boolean;
303
303
  };
304
- siteSettings?: ChaynsSiteSettings;
304
+ styleSettings?: ChaynsStyleSettings;
305
305
  }
306
306
  export interface DialogResultFile {
307
307
  blockDownload?: boolean;
@@ -433,6 +433,10 @@ export interface RefreshData {
433
433
  suffix?: boolean;
434
434
  tapps?: boolean;
435
435
  user?: boolean;
436
+ chaynsProData?: boolean;
437
+ ignoreUacCache?: boolean;
438
+ styleSettings?: boolean;
439
+ chaynsInfo?: boolean;
436
440
  }
437
441
  export type IntercomMessage = {
438
442
  text: string;
@@ -1,10 +1,10 @@
1
- import { ChaynsReactFunctions, ChaynsReactValues, ChaynsSiteSettings, CleanupCallback, DataChangeCallback, IChaynsReact } from '../types/IChaynsReact';
1
+ import { ChaynsReactFunctions, ChaynsReactValues, ChaynsStyleSettings, CleanupCallback, DataChangeCallback, IChaynsReact } from '../types/IChaynsReact';
2
2
  export declare class AppWrapper implements IChaynsReact {
3
3
  values: ChaynsReactValues;
4
4
  accessToken: string;
5
5
  listeners: (() => void)[];
6
6
  customFunctions: {};
7
- loadSiteSettings(siteId: string): Promise<ChaynsSiteSettings | undefined>;
7
+ loadStyleSettings(siteId: string): Promise<ChaynsStyleSettings | undefined>;
8
8
  mapOldApiToNew(retVal: any): ChaynsReactValues;
9
9
  constructor();
10
10
  notImplemented(call: string): void;
@@ -4,15 +4,29 @@ declare class StaticChaynsApi {
4
4
  addDataListener: (cb: DataChangeCallback) => () => void;
5
5
  private _wrapper;
6
6
  constructor(values: any, functions: any);
7
- getUser: () => any;
8
- getSite: () => any;
9
- getCurrentPage: () => any;
10
- getDevice: () => any;
11
- getLanguage: () => any;
12
- getParameters: () => any;
13
- getPages: () => any;
14
- getEnvironment: () => any;
15
- getSiteSettings: () => any;
16
- getCustomFunction: (key: string) => any;
7
+ getUser: () => import("../types/IChaynsReact").ChaynsApiUser | undefined;
8
+ getSite: () => import("../types/IChaynsReact").ChaynsApiSite;
9
+ getCurrentPage: () => {
10
+ id: number;
11
+ siteId: string;
12
+ };
13
+ getDevice: () => import("../types/IChaynsReact").ChaynsApiDevice;
14
+ getLanguage: () => {
15
+ site: import("../types/IChaynsReact").Language;
16
+ translation: import("../types/IChaynsReact").Language | null;
17
+ device: import("../types/IChaynsReact").Language;
18
+ active: import("../types/IChaynsReact").Language;
19
+ };
20
+ getParameters: () => {
21
+ [key: string]: string | string[];
22
+ [key: symbol]: string | string[];
23
+ };
24
+ getPages: () => import("../types/IChaynsReact").Page[];
25
+ getEnvironment: () => {
26
+ buildEnvironment: import("../types/IChaynsReact").Environment;
27
+ runtimeEnvironment: import("../types/IChaynsReact").RuntimeEnviroment | string;
28
+ };
29
+ getStyleSettings: () => import("../types/IChaynsReact").ChaynsStyleSettings | undefined;
30
+ getCustomFunction: (key: string) => <A extends Array<any>, O>(...args: A) => Promise<O>;
17
31
  }
18
32
  export default StaticChaynsApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.2.0-beta.0",
3
+ "version": "2.2.0-beta.2",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useSiteSettings = void 0;
7
- var _context = require("./context");
8
- const useSiteSettings = () => (0, _context.useValuesSelector)(state => state.siteSettings);
9
- exports.useSiteSettings = useSiteSettings;
@@ -1,2 +0,0 @@
1
- import { useValuesSelector } from './context';
2
- export const useSiteSettings = () => useValuesSelector(state => state.siteSettings);
@@ -1,2 +0,0 @@
1
- import { ChaynsSiteSettings } from '../types/IChaynsReact';
2
- export declare const useSiteSettings: () => ChaynsSiteSettings | undefined;