contentful-ui-extensions-sdk 4.16.0 → 4.17.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.
- package/dist/api.d.ts +3 -3
- package/dist/app.d.ts +3 -3
- package/dist/channel.d.ts +13 -13
- package/dist/cmaAdapter.d.ts +3 -3
- package/dist/dialogs.d.ts +3 -3
- package/dist/editor.d.ts +4 -4
- package/dist/entry.d.ts +3 -3
- package/dist/field-locale.d.ts +26 -26
- package/dist/field.d.ts +22 -22
- package/dist/index.d.ts +7 -7
- package/dist/initialize.d.ts +6 -6
- package/dist/locations.d.ts +3 -3
- package/dist/navigator.d.ts +3 -3
- package/dist/signal.d.ts +15 -15
- package/dist/space.d.ts +3 -3
- package/dist/types/api.types.d.ts +263 -263
- package/dist/types/app.types.d.ts +44 -44
- package/dist/types/cmaClient.types.d.ts +35 -31
- package/dist/types/dialogs.types.d.ts +69 -69
- package/dist/types/entities.d.ts +7 -7
- package/dist/types/entry.types.d.ts +45 -45
- package/dist/types/field-locale.types.d.ts +55 -55
- package/dist/types/field.types.d.ts +70 -70
- package/dist/types/index.d.ts +13 -13
- package/dist/types/navigator.types.d.ts +63 -63
- package/dist/types/space.types.d.ts +272 -272
- package/dist/types/utils.d.ts +74 -74
- package/dist/types/validation-error.d.ts +63 -63
- package/dist/types/window.types.d.ts +17 -17
- package/dist/utils/deferred.d.ts +6 -6
- package/dist/window.d.ts +3 -3
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { KnownSDK, ConnectMessage } from './types';
|
|
2
|
-
import { Channel } from './channel';
|
|
3
|
-
export default function createAPI(channel: Channel, data: ConnectMessage, currentGlobal: typeof globalThis): KnownSDK;
|
|
1
|
+
import { KnownSDK, ConnectMessage } from './types';
|
|
2
|
+
import { Channel } from './channel';
|
|
3
|
+
export default function createAPI(channel: Channel, data: ConnectMessage, currentGlobal: typeof globalThis): KnownSDK;
|
package/dist/app.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import { AppConfigAPI } from './types';
|
|
3
|
-
export default function createApp(channel: Channel): AppConfigAPI;
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import { AppConfigAPI } from './types';
|
|
3
|
+
export default function createApp(channel: Channel): AppConfigAPI;
|
package/dist/channel.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ConnectMessage } from './types';
|
|
2
|
-
export declare function connect(currentGlobal: typeof globalThis, onConnect: (channel: Channel, message: ConnectMessage, messageQueue: unknown[]) => void): void;
|
|
3
|
-
export declare class Channel {
|
|
4
|
-
private _messageHandlers;
|
|
5
|
-
private _responseHandlers;
|
|
6
|
-
private _send;
|
|
7
|
-
constructor(sourceId: string, currentGlobal: typeof globalThis);
|
|
8
|
-
call<T = unknown>(method: string, ...params: any[]): Promise<T>;
|
|
9
|
-
send(method: string, ...params: any[]): void;
|
|
10
|
-
addHandler<T extends unknown[]>(method: string, handler: (...args: T) => void): () => boolean;
|
|
11
|
-
private _handleMessage;
|
|
12
|
-
}
|
|
13
|
-
export declare function sendInitMessage(currentGlobal: typeof globalThis): number;
|
|
1
|
+
import { ConnectMessage } from './types';
|
|
2
|
+
export declare function connect(currentGlobal: typeof globalThis, onConnect: (channel: Channel, message: ConnectMessage, messageQueue: unknown[]) => void): void;
|
|
3
|
+
export declare class Channel {
|
|
4
|
+
private _messageHandlers;
|
|
5
|
+
private _responseHandlers;
|
|
6
|
+
private _send;
|
|
7
|
+
constructor(sourceId: string, currentGlobal: typeof globalThis);
|
|
8
|
+
call<T = unknown>(method: string, ...params: any[]): Promise<T>;
|
|
9
|
+
send(method: string, ...params: any[]): void;
|
|
10
|
+
addHandler<T extends unknown[]>(method: string, handler: (...args: T) => void): () => boolean;
|
|
11
|
+
private _handleMessage;
|
|
12
|
+
}
|
|
13
|
+
export declare function sendInitMessage(currentGlobal: typeof globalThis): number;
|
package/dist/cmaAdapter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import { Adapter } from 'contentful-management/types';
|
|
3
|
-
export declare function createAdapter(channel: Channel): Adapter;
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import { Adapter } from 'contentful-management/types';
|
|
3
|
+
export declare function createAdapter(channel: Channel): Adapter;
|
package/dist/dialogs.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import { DialogsAPI, IdsAPI } from './types';
|
|
3
|
-
export default function createDialogs(channel: Channel, ids: IdsAPI): DialogsAPI;
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import { DialogsAPI, IdsAPI } from './types';
|
|
3
|
+
export default function createDialogs(channel: Channel, ids: IdsAPI): DialogsAPI;
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorInterface, SharedEditorSDK } from './types';
|
|
2
|
-
import { Channel } from './channel';
|
|
3
|
-
import { ConnectMessage } from './types/api.types';
|
|
4
|
-
export default function createEditor(channel: Channel, editorInterface: EditorInterface, editorData: Exclude<ConnectMessage['editor'], undefined>): SharedEditorSDK['editor'];
|
|
1
|
+
import { EditorInterface, SharedEditorSDK } from './types';
|
|
2
|
+
import { Channel } from './channel';
|
|
3
|
+
import { ConnectMessage } from './types/api.types';
|
|
4
|
+
export default function createEditor(channel: Channel, editorInterface: EditorInterface, editorData: Exclude<ConnectMessage['editor'], undefined>): SharedEditorSDK['editor'];
|
package/dist/entry.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import { EntryAPI, EntryFieldAPI, EntryFieldInfo } from './types';
|
|
3
|
-
export default function createEntry(channel: Channel, entryData: any, fieldInfo: EntryFieldInfo[], createEntryField: (info: EntryFieldInfo) => EntryFieldAPI): EntryAPI;
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import { EntryAPI, EntryFieldAPI, EntryFieldInfo } from './types';
|
|
3
|
+
export default function createEntry(channel: Channel, entryData: any, fieldInfo: EntryFieldInfo[], createEntryField: (info: EntryFieldInfo) => EntryFieldAPI): EntryAPI;
|
package/dist/field-locale.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import { FieldAPI, FieldInfo, Items, SerializedJSONValue } from './types';
|
|
3
|
-
import { ValidationError } from './types/validation-error';
|
|
4
|
-
export default class FieldLocale implements FieldAPI {
|
|
5
|
-
id: string;
|
|
6
|
-
locale: string;
|
|
7
|
-
type: string;
|
|
8
|
-
required: boolean;
|
|
9
|
-
validations: any[];
|
|
10
|
-
items?: Items;
|
|
11
|
-
private _value;
|
|
12
|
-
private _valueSignal;
|
|
13
|
-
private _isDisabledSignal;
|
|
14
|
-
private _schemaErrorsChangedSignal;
|
|
15
|
-
private _channel;
|
|
16
|
-
constructor(channel: Channel, info: FieldInfo);
|
|
17
|
-
getValue(): any;
|
|
18
|
-
setValue(value: any): Promise<SerializedJSONValue | undefined>;
|
|
19
|
-
removeValue(): Promise<void>;
|
|
20
|
-
setInvalid(isInvalid: boolean): Promise<unknown>;
|
|
21
|
-
onValueChanged(handler: (value: any) => any): () => boolean;
|
|
22
|
-
getIsDisabled(): boolean;
|
|
23
|
-
onIsDisabledChanged(handler: (isDisabled: boolean) => any): () => boolean;
|
|
24
|
-
getSchemaErrors(): ValidationError[];
|
|
25
|
-
onSchemaErrorsChanged(handler: (errors: ValidationError[]) => void): () => boolean;
|
|
26
|
-
}
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import { FieldAPI, FieldInfo, Items, SerializedJSONValue } from './types';
|
|
3
|
+
import { ValidationError } from './types/validation-error';
|
|
4
|
+
export default class FieldLocale implements FieldAPI {
|
|
5
|
+
id: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
type: string;
|
|
8
|
+
required: boolean;
|
|
9
|
+
validations: any[];
|
|
10
|
+
items?: Items;
|
|
11
|
+
private _value;
|
|
12
|
+
private _valueSignal;
|
|
13
|
+
private _isDisabledSignal;
|
|
14
|
+
private _schemaErrorsChangedSignal;
|
|
15
|
+
private _channel;
|
|
16
|
+
constructor(channel: Channel, info: FieldInfo);
|
|
17
|
+
getValue(): any;
|
|
18
|
+
setValue(value: any): Promise<SerializedJSONValue | undefined>;
|
|
19
|
+
removeValue(): Promise<void>;
|
|
20
|
+
setInvalid(isInvalid: boolean): Promise<unknown>;
|
|
21
|
+
onValueChanged(handler: (value: any) => any): () => boolean;
|
|
22
|
+
getIsDisabled(): boolean;
|
|
23
|
+
onIsDisabledChanged(handler: (isDisabled: boolean) => any): () => boolean;
|
|
24
|
+
getSchemaErrors(): ValidationError[];
|
|
25
|
+
onSchemaErrorsChanged(handler: (errors: ValidationError[]) => void): () => boolean;
|
|
26
|
+
}
|
package/dist/field.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Channel } from './channel';
|
|
2
|
-
import FieldLocale from './field-locale';
|
|
3
|
-
import { EntryFieldAPI, EntryFieldInfo, Items } from './types';
|
|
4
|
-
export default class Field implements EntryFieldAPI {
|
|
5
|
-
private _defaultLocale;
|
|
6
|
-
private _fieldLocales;
|
|
7
|
-
id: string;
|
|
8
|
-
locales: string[];
|
|
9
|
-
type: string;
|
|
10
|
-
required: boolean;
|
|
11
|
-
validations: Object[];
|
|
12
|
-
items?: Items;
|
|
13
|
-
constructor(channel: Channel, info: EntryFieldInfo, defaultLocale: string);
|
|
14
|
-
getValue(locale?: string): any;
|
|
15
|
-
setValue(value: any, locale?: string): Promise<import("./types").SerializedJSONValue | undefined>;
|
|
16
|
-
removeValue(locale?: string): Promise<void>;
|
|
17
|
-
onValueChanged(locale: string | ((value: any) => void), handler?: (value: any) => void): () => boolean;
|
|
18
|
-
onIsDisabledChanged(locale: string | ((isDisabled: boolean) => void), handler?: (isDisabled: boolean) => void): () => boolean;
|
|
19
|
-
private _getFieldLocale;
|
|
20
|
-
getForLocale(locale: string): FieldLocale;
|
|
21
|
-
assertHasLocale(locale: string): void;
|
|
22
|
-
}
|
|
1
|
+
import { Channel } from './channel';
|
|
2
|
+
import FieldLocale from './field-locale';
|
|
3
|
+
import { EntryFieldAPI, EntryFieldInfo, Items } from './types';
|
|
4
|
+
export default class Field implements EntryFieldAPI {
|
|
5
|
+
private _defaultLocale;
|
|
6
|
+
private _fieldLocales;
|
|
7
|
+
id: string;
|
|
8
|
+
locales: string[];
|
|
9
|
+
type: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
validations: Object[];
|
|
12
|
+
items?: Items;
|
|
13
|
+
constructor(channel: Channel, info: EntryFieldInfo, defaultLocale: string);
|
|
14
|
+
getValue(locale?: string): any;
|
|
15
|
+
setValue(value: any, locale?: string): Promise<import("./types").SerializedJSONValue | undefined>;
|
|
16
|
+
removeValue(locale?: string): Promise<void>;
|
|
17
|
+
onValueChanged(locale: string | ((value: any) => void), handler?: (value: any) => void): () => boolean;
|
|
18
|
+
onIsDisabledChanged(locale: string | ((isDisabled: boolean) => void), handler?: (isDisabled: boolean) => void): () => boolean;
|
|
19
|
+
private _getFieldLocale;
|
|
20
|
+
getForLocale(locale: string): FieldLocale;
|
|
21
|
+
assertHasLocale(locale: string): void;
|
|
22
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KnownSDK } from './types';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export { default as locations } from './locations';
|
|
4
|
-
type Init = <T extends KnownSDK = KnownSDK>(initCallback: (sdk: T) => any, options?: {
|
|
5
|
-
supressIframeWarning?: boolean;
|
|
6
|
-
}) => void;
|
|
7
|
-
export declare const init: Init;
|
|
1
|
+
import { KnownSDK } from './types';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export { default as locations } from './locations';
|
|
4
|
+
type Init = <T extends KnownSDK = KnownSDK>(initCallback: (sdk: T) => any, options?: {
|
|
5
|
+
supressIframeWarning?: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
export declare const init: Init;
|
package/dist/initialize.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConnectMessage, KnownSDK } from './types';
|
|
2
|
-
import { Channel } from './channel';
|
|
3
|
-
export declare function createInitializer(currentGlobal: typeof globalThis, apiCreator: (channel: Channel, data: ConnectMessage, currentGlobal: typeof globalThis) => KnownSDK): (initCb: (sdk: KnownSDK, customSdk: any) => any, { makeCustomApi, supressIframeWarning, }?: {
|
|
4
|
-
makeCustomApi?: Function | undefined;
|
|
5
|
-
supressIframeWarning?: boolean | undefined;
|
|
6
|
-
}) => void;
|
|
1
|
+
import { ConnectMessage, KnownSDK } from './types';
|
|
2
|
+
import { Channel } from './channel';
|
|
3
|
+
export declare function createInitializer(currentGlobal: typeof globalThis, apiCreator: (channel: Channel, data: ConnectMessage, currentGlobal: typeof globalThis) => KnownSDK): (initCb: (sdk: KnownSDK, customSdk: any) => any, { makeCustomApi, supressIframeWarning, }?: {
|
|
4
|
+
makeCustomApi?: Function | undefined;
|
|
5
|
+
supressIframeWarning?: boolean | undefined;
|
|
6
|
+
}) => void;
|
package/dist/locations.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Locations } from './types';
|
|
2
|
-
declare const locations: Locations;
|
|
3
|
-
export default locations;
|
|
1
|
+
import { Locations } from './types';
|
|
2
|
+
declare const locations: Locations;
|
|
3
|
+
export default locations;
|
package/dist/navigator.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NavigatorAPI, IdsAPI } from './types';
|
|
2
|
-
import { Channel } from './channel';
|
|
3
|
-
export default function createNavigator(channel: Channel, ids: IdsAPI): NavigatorAPI;
|
|
1
|
+
import { NavigatorAPI, IdsAPI } from './types';
|
|
2
|
+
import { Channel } from './channel';
|
|
3
|
+
export default function createNavigator(channel: Channel, ids: IdsAPI): NavigatorAPI;
|
package/dist/signal.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
type Listener<T extends unknown[]> = (...args: T) => void;
|
|
2
|
-
export declare class Signal<T extends unknown[]> {
|
|
3
|
-
private _id;
|
|
4
|
-
private _listeners;
|
|
5
|
-
dispatch(...args: T): void;
|
|
6
|
-
attach(listener: Listener<T>): () => boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class MemoizedSignal<T extends unknown[]> extends Signal<T> {
|
|
9
|
-
private _memoizedArgs;
|
|
10
|
-
constructor(...memoizedArgs: T);
|
|
11
|
-
dispatch(...args: T): void;
|
|
12
|
-
attach(listener: Listener<T>): () => boolean;
|
|
13
|
-
getMemoizedArgs(): T;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
1
|
+
type Listener<T extends unknown[]> = (...args: T) => void;
|
|
2
|
+
export declare class Signal<T extends unknown[]> {
|
|
3
|
+
private _id;
|
|
4
|
+
private _listeners;
|
|
5
|
+
dispatch(...args: T): void;
|
|
6
|
+
attach(listener: Listener<T>): () => boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class MemoizedSignal<T extends unknown[]> extends Signal<T> {
|
|
9
|
+
private _memoizedArgs;
|
|
10
|
+
constructor(...memoizedArgs: T);
|
|
11
|
+
dispatch(...args: T): void;
|
|
12
|
+
attach(listener: Listener<T>): () => boolean;
|
|
13
|
+
getMemoizedArgs(): T;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/dist/space.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContentType, SpaceAPI } from './types';
|
|
2
|
-
import { Channel } from './channel';
|
|
3
|
-
export default function createSpace(channel: Channel, initialContentTypes: ContentType[]): SpaceAPI;
|
|
1
|
+
import { ContentType, SpaceAPI } from './types';
|
|
2
|
+
import { Channel } from './channel';
|
|
3
|
+
export default function createSpace(channel: Channel, initialContentTypes: ContentType[]): SpaceAPI;
|