@ws-ui/localization-editor 1.11.12-rc8 → 1.13.0-rc1

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.
@@ -1,10 +1,5 @@
1
- import { FC, ReactNode } from 'react';
1
+ import { FC } from 'react';
2
+ import { IAdapterProviderProps, TUseOptionalAdapter } from '@ws-ui/shared';
2
3
  import { IEditorStateAdapter } from './types';
3
- export interface IEditorStateAdapterProviderProps {
4
- children: ReactNode;
5
- adapter: IEditorStateAdapter;
6
- }
7
- export declare const EditorStateAdapterProvider: FC<IEditorStateAdapterProviderProps>;
8
- export declare function useEditorStateAdapter({ permissive }?: {
9
- permissive?: boolean | undefined;
10
- }): IEditorStateAdapter | null;
4
+ export declare const EditorStateAdapterProvider: FC<IAdapterProviderProps<IEditorStateAdapter>>;
5
+ export declare const useEditorStateAdapter: TUseOptionalAdapter<IEditorStateAdapter>;
@@ -1,24 +1,26 @@
1
- import { IOpenModalPayload, IOpenModalReturnValue, ITab, T4DComponent } from '@ws-ui/shared';
1
+ import { IOpenModalPayload, IOpenModalReturnValue, ITab, T4DComponent, TEditorAdapter } from '@ws-ui/shared';
2
2
  import { TLanguageDetails, TI18nFile } from '../types/i18n';
3
- export interface IEditorStateAdapter {
3
+ type TEditorStateGetters = {
4
4
  getTabs(): ITab[];
5
5
  getI18nCurrent(): string;
6
6
  getWebformTabs(): ITab[];
7
7
  getActiveTabPath(): string;
8
8
  getFlagsByPath(path: string): ITab['flags'] | undefined;
9
9
  getUserComponents?(): Record<string, T4DComponent<any>>;
10
- buildResolver?: Record<string, T4DComponent<any>>;
10
+ getBuildResolver?(): Record<string, T4DComponent<any>>;
11
11
  getSupportedLanguages(isInsideStudio: boolean): Promise<TLanguageDetails[]>;
12
12
  fetchI18nFile(): Promise<TI18nFile>;
13
- actions: {
14
- openModal(config: IOpenModalPayload): Promise<IOpenModalReturnValue>;
15
- setTabs(tabs: ITab[]): void;
16
- setI18nCurrent(current: string): void;
17
- setTabContent(payload: {
18
- path: string;
19
- content: unknown;
20
- contentPath?: string;
21
- date?: string;
22
- }): Promise<unknown>;
23
- };
24
- }
13
+ };
14
+ type TEditorStateActions = {
15
+ openModal(config: IOpenModalPayload): Promise<IOpenModalReturnValue>;
16
+ setTabs(tabs: ITab[]): void;
17
+ setI18nCurrent(current: string): void;
18
+ setTabContent(payload: {
19
+ path: string;
20
+ content: unknown;
21
+ contentPath?: string;
22
+ date?: string;
23
+ }): Promise<unknown>;
24
+ };
25
+ export type IEditorStateAdapter = TEditorAdapter<TEditorStateGetters, TEditorStateActions>;
26
+ export {};
@@ -3,6 +3,7 @@ interface IKeyRow {
3
3
  keyName: string;
4
4
  value: string;
5
5
  isDefault: boolean;
6
+ index: number;
6
7
  }
7
8
  declare const KeyRow: FC<IKeyRow>;
8
9
  export default KeyRow;