@ws-ui/shared 0.1.23 → 0.1.25

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.
@@ -27,7 +27,7 @@ declare namespace datasources {
27
27
  interface IEnhancedCatalog extends ICatalog {
28
28
  dataClasses: IDataClasses;
29
29
  dataClassByCollectionName: IDataClasses;
30
- singletons: ISingletons
30
+ singletons: ISingletons;
31
31
  }
32
32
  interface ICollection<T extends IEntity = IEntity> {
33
33
  __COUNT: number;
@@ -134,18 +134,18 @@ declare namespace datasources {
134
134
  __STAMP?: number;
135
135
  }
136
136
 
137
- type TSingletonMethod = Partial<catalog.IMethod>
137
+ type TSingletonMethod = Partial<catalog.IMethod>;
138
138
 
139
139
  interface ISingletonClass {
140
140
  name: string;
141
- methods: ISingletonMethod[]
141
+ methods: ISingletonMethod[];
142
142
  }
143
143
  interface ICatalog {
144
144
  __UNIQID: string;
145
145
  __BASEID: string;
146
146
  methods: catalog.IMethod[];
147
147
  dataClasses: IDetailedDataClass[];
148
- singletons?: ISingletonClass[]
148
+ singletons?: ISingletonClass[];
149
149
  }
150
150
 
151
151
  interface IDataClass {
@@ -169,7 +169,7 @@ declare namespace datasources {
169
169
 
170
170
  type IDataClasses = { [key: string]: IDetailedDataClass };
171
171
 
172
- type ISingletons = { [key: string]: ISingletonClass }
172
+ type ISingletons = { [key: string]: ISingletonClass };
173
173
 
174
174
  class AttributeFilter {
175
175
  addAttribute(attname: string, subfilter?: any): void;
@@ -57,6 +57,6 @@ declare namespace datasources {
57
57
  };
58
58
  };
59
59
  HTMLEncode(source: string, display: boolean, tabs: number): string;
60
- logout():Promise;
60
+ logout(): Promise;
61
61
  }
62
62
  }
@@ -43,7 +43,7 @@ declare namespace datasources {
43
43
  },
44
44
  associatedData: { namespace: string },
45
45
  ownerSource: DataSource | null,
46
- singleton?: string | null
46
+ singleton?: string | null,
47
47
  ): Method4D;
48
48
  static buildAction(component: { action: string }): string;
49
49
  static buildEvents(component: { eventType: string }): {
@@ -168,7 +168,7 @@ declare namespace webforms {
168
168
  feedback: boolean;
169
169
  datasource: string;
170
170
  variadicType: string;
171
- methodType?: 'dataclass' | 'singleton'
171
+ methodType?: 'dataclass' | 'singleton';
172
172
  }>;
173
173
 
174
174
  type WebformStateActionType = 'add' | 'delete' | 'clear';
@@ -1,19 +1,9 @@
1
- declare const initialConfig: {
2
- features: {
3
- debugger: {
4
- enabled: boolean;
5
- };
6
- modelEditor: {
7
- enabled: boolean;
8
- };
9
- roles: {
10
- enabled: boolean;
11
- };
12
- };
13
- };
14
- export type FeatureName = keyof typeof initialConfig.features;
15
- export declare function useFeatureFlags(): {
1
+ export type FeatureName = 'debugger' | 'modelEditor' | 'roles';
2
+ export declare function useFeatureFlags(initialConfig: {
3
+ features: Record<FeatureName, {
4
+ enabled: boolean;
5
+ }>;
6
+ }): {
16
7
  setFeature: (name: FeatureName, enabled: boolean) => void;
17
8
  isFeatureEnabled: (...features: FeatureName[]) => boolean;
18
9
  };
19
- export {};