@ws-ui/shared 1.6.0 → 1.6.1

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.
@@ -2,6 +2,7 @@ import { FileFolderTypeWithContent, FolderRootType, IAddFolderRequest, IAddFolde
2
2
  import { IMonacoThemeResponse } from '../types/code-editor';
3
3
  import { IComponentTemplate } from '../types/webform-editor';
4
4
  import { IGetSharedResourceRequest } from './shared';
5
+ import { ISharedAppEventsResponse } from '../types';
5
6
  /**
6
7
  * Check updates
7
8
  * @param request The request
@@ -108,6 +109,7 @@ export interface ISetFileContentResponse {
108
109
  size: number;
109
110
  }
110
111
  export declare function getSharedDatasources(params?: Pick<IGetSharedResourceRequest, 'createIfNotExists'>): Promise<ISharedDatasourcesResponse>;
112
+ export declare function getSharedAppEvents(params?: Pick<IGetSharedResourceRequest, 'createIfNotExists'>): Promise<ISharedAppEventsResponse>;
111
113
  export declare function getSharedCSS(params?: Pick<IGetSharedResourceRequest, 'createIfNotExists'>): Promise<ISharedCSSResponse>;
112
114
  export declare function getSavedConditions(params?: Pick<IGetSharedResourceRequest, 'createIfNotExists'>): Promise<ISavedConditionsResponse>;
113
115
  export declare function getUserPrivileges(): Promise<IUserPrivilegesResponse>;
@@ -115,6 +117,7 @@ export declare function getMonacoTheme(): Promise<IMonacoThemeResponse>;
115
117
  export declare const setSharedSources: (datasources: {
116
118
  [key: string]: datasources.ICreateDataSource[];
117
119
  }) => Promise<ISharedDatasourcesResponse>;
120
+ export declare const setSharedAppEvents: (events: webforms.WEvent[]) => Promise<webforms.WEvent[]>;
118
121
  export declare const setFileContent: (payload: Pick<ISetFileContentRequest, "content" | "name"> & Partial<Pick<ISetFileContentRequest, "asText" | "path">>) => Promise<{
119
122
  type: FileFolderTypeWithContent;
120
123
  size: number;
@@ -11,3 +11,4 @@ export declare class HTTPError extends Error {
11
11
  log(): void;
12
12
  }
13
13
  export declare function http<T>(url: string, request: RequestInit): Promise<T>;
14
+ export declare function callServerSideParser(result: string | datasources.ServerSideResponse): string | datasources.ServerSideResponse;
@@ -551,6 +551,7 @@ export interface ISetFileContentRequest {
551
551
  export type ISharedDatasourcesResponse = {
552
552
  [key: string]: datasources.ICreateDataSource[];
553
553
  };
554
+ export type ISharedAppEventsResponse = webforms.WEvent[];
554
555
  export type ISharedCSSResponse = {
555
556
  classes: IWebFormStyleClass[];
556
557
  };
@@ -111,4 +111,28 @@ export interface ISingleTask {
111
111
  payload: ITaskPayload;
112
112
  }
113
113
  export declare const tasksManagerSubject: Subject<ISingleTask>;
114
+ export declare enum WebformEventsActions {
115
+ EVENT_STARTED = "event-started",
116
+ EVENT_ENDED = "event-ended",
117
+ EVENT_EMITED = "event-emited",
118
+ REQUEST_SENT = "request-sent"
119
+ }
120
+ export type TEventEmitted = {
121
+ action: WebformEventsActions.EVENT_EMITED;
122
+ payload: {
123
+ eventName: string;
124
+ };
125
+ };
126
+ export declare const webformEventsSubject: Subject<TEventEmitted | {
127
+ action: WebformEventsActions.EVENT_STARTED | WebformEventsActions.EVENT_ENDED;
128
+ payload: {
129
+ path: string;
130
+ eventName: string;
131
+ nodeName: string;
132
+ nodeID: string;
133
+ };
134
+ } | {
135
+ action: WebformEventsActions.REQUEST_SENT;
136
+ payload?: undefined;
137
+ }>;
114
138
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ws-ui/shared",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",