sprof 0.0.165 → 0.0.167

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.
@@ -6,6 +6,7 @@ declare class Auth<UserT> {
6
6
  constructor();
7
7
  get Form(): {
8
8
  Block: (fn: () => Promise<void>) => Promise<void>;
9
+ readonly IsBlock: boolean;
9
10
  GetValues: () => {
10
11
  [k: string]: string;
11
12
  };
@@ -54,7 +55,7 @@ declare class Auth<UserT> {
54
55
  disabled: boolean;
55
56
  })[];
56
57
  fields: ({
57
- id: string;
58
+ id: import('.').AuthFieldsIds;
58
59
  label: string;
59
60
  name: string;
60
61
  placeholder: string;
@@ -74,7 +75,7 @@ declare class Auth<UserT> {
74
75
  } | undefined;
75
76
  name: string;
76
77
  placeholder: string;
77
- id: string;
78
+ id: import('.').AuthFieldsIds;
78
79
  method?: import('.').AuthMethods | undefined;
79
80
  value: string;
80
81
  Validate: () => string[];
@@ -122,7 +123,7 @@ declare class Auth<UserT> {
122
123
  disabled: boolean;
123
124
  })[];
124
125
  fields: ({
125
- id: string;
126
+ id: import('.').AuthFieldsIds;
126
127
  label: string;
127
128
  name: string;
128
129
  placeholder: string;
@@ -142,14 +143,14 @@ declare class Auth<UserT> {
142
143
  } | undefined;
143
144
  name: string;
144
145
  placeholder: string;
145
- id: string;
146
+ id: import('.').AuthFieldsIds;
146
147
  method?: import('.').AuthMethods | undefined;
147
148
  value: string;
148
149
  Validate: () => string[];
149
150
  Reset: () => void;
150
151
  } | {
151
152
  label: string;
152
- id: string;
153
+ id: import('.').AuthFieldsIds;
153
154
  method?: import('.').AuthMethods | undefined;
154
155
  name: string;
155
156
  value: string;
@@ -183,7 +184,7 @@ declare class Auth<UserT> {
183
184
  disabled: boolean;
184
185
  }[];
185
186
  fields: {
186
- id: string;
187
+ id: import('.').AuthFieldsIds;
187
188
  label: string;
188
189
  name: string;
189
190
  placeholder: string;
@@ -223,7 +224,7 @@ declare class Auth<UserT> {
223
224
  } | undefined;
224
225
  name: string;
225
226
  placeholder: string;
226
- id: string;
227
+ id: import('.').AuthFieldsIds;
227
228
  method?: import('.').AuthMethods | undefined;
228
229
  value: string;
229
230
  Validate: () => string[];
@@ -243,6 +244,7 @@ declare class Auth<UserT> {
243
244
  GetAction: () => string;
244
245
  ResetFields: () => void;
245
246
  Reset: () => void;
247
+ GetField: (id: import('.').AuthFieldsIds) => import('./fields/AuthField').default | undefined;
246
248
  };
247
249
  get Status(): {
248
250
  DeprecateLogout: () => void;
@@ -2,11 +2,14 @@ import { default as AuthButton } from './buttons/AuthButton';
2
2
  import { default as AuthField } from './fields/AuthField';
3
3
  import { default as AuthChunks } from './types/AuthChunks';
4
4
  import { default as AuthMethods } from './types/AuthMethods';
5
+ import { default as AuthFieldsIds } from './types/AuthFieldsIds';
5
6
  export default class AuthForm {
7
+ private block;
6
8
  private settings;
7
9
  private chunk;
8
10
  private selectedMethod;
9
11
  Block(fn: () => Promise<void>): Promise<void>;
12
+ get IsBlock(): boolean;
10
13
  GetValues(): {
11
14
  [k: string]: string;
12
15
  };
@@ -66,4 +69,5 @@ export default class AuthForm {
66
69
  GetAction(): string;
67
70
  ResetFields(): void;
68
71
  Reset(): void;
72
+ GetField(id: AuthFieldsIds): AuthField | undefined;
69
73
  }
@@ -1,8 +1,9 @@
1
1
  import { default as AuthField } from './AuthField';
2
2
  import { default as AuthMethods } from '../types/AuthMethods';
3
3
  import { default as IValidator } from '../../interfaces/IValidator';
4
+ import { default as AuthFieldsIds } from '../types/AuthFieldsIds';
4
5
  export default class EmailField extends AuthField {
5
- id: string;
6
+ id: AuthFieldsIds;
6
7
  label: string;
7
8
  name: string;
8
9
  placeholder: string;
@@ -1,9 +1,10 @@
1
1
  import { default as AuthField } from './AuthField';
2
2
  import { default as IValidator } from '../../interfaces/IValidator';
3
+ import { default as AuthFieldsIds } from '../types/AuthFieldsIds';
3
4
  export default class PasswordField extends AuthField {
4
5
  label: string;
5
6
  validator?: IValidator;
6
7
  name: string;
7
8
  placeholder: string;
8
- id: string;
9
+ id: AuthFieldsIds;
9
10
  }
@@ -1,5 +1,6 @@
1
1
  import { default as AuthField } from './AuthField';
2
+ import { default as AuthFieldsIds } from '../types/AuthFieldsIds';
2
3
  export default class PasswordRepeatField extends AuthField {
3
4
  label: string;
4
- id: string;
5
+ id: AuthFieldsIds;
5
6
  }
@@ -9,6 +9,7 @@ import { default as PasswordField } from './fields/PasswordField';
9
9
  import { default as PasswordRepeatField } from './fields/PasswordRepeatField';
10
10
  import { default as AuthFormSettings } from './settings/AuthFormSettings';
11
11
  import { default as AuthChunks } from './types/AuthChunks';
12
+ import { default as AuthFieldsIds } from './types/AuthFieldsIds';
12
13
  import { default as AuthFormSettingsType } from './types/AuthFormSettingsType';
13
14
  import { default as AuthMethods } from './types/AuthMethods';
14
- export { Auth, AuthButtonLogin, AuthButtonRefresh, AuthButtonRegister, AuthButtonRestore, AuthChunks, AuthFormSettings, AuthFormSettingsType, AuthMethods, EmailField, LoginField, PasswordField, PasswordRepeatField, };
15
+ export { Auth, AuthButtonLogin, AuthButtonRefresh, AuthButtonRegister, AuthButtonRestore, AuthChunks, AuthFieldsIds, AuthFormSettings, AuthFormSettingsType, AuthMethods, EmailField, LoginField, PasswordField, PasswordRepeatField, };
@@ -0,0 +1,6 @@
1
+ declare enum AuthFieldsIds {
2
+ Email = "field-auth-email",
3
+ Password = "field-auth-password",
4
+ PasswordRepeat = "field-auth-password-repeat"
5
+ }
6
+ export default AuthFieldsIds;
@@ -8,6 +8,7 @@ export default abstract class PF {
8
8
  static Auth: {
9
9
  readonly Form: {
10
10
  Block: (fn: () => Promise<void>) => Promise<void>;
11
+ readonly IsBlock: boolean;
11
12
  GetValues: () => {
12
13
  [k: string]: string;
13
14
  };
@@ -56,7 +57,7 @@ export default abstract class PF {
56
57
  disabled: boolean;
57
58
  })[];
58
59
  fields: ({
59
- id: string;
60
+ id: import('./auth').AuthFieldsIds;
60
61
  label: string;
61
62
  name: string;
62
63
  placeholder: string;
@@ -76,7 +77,7 @@ export default abstract class PF {
76
77
  } | undefined;
77
78
  name: string;
78
79
  placeholder: string;
79
- id: string;
80
+ id: import('./auth').AuthFieldsIds;
80
81
  method?: import('./auth').AuthMethods | undefined;
81
82
  value: string;
82
83
  Validate: () => string[];
@@ -124,7 +125,7 @@ export default abstract class PF {
124
125
  disabled: boolean;
125
126
  })[];
126
127
  fields: ({
127
- id: string;
128
+ id: import('./auth').AuthFieldsIds;
128
129
  label: string;
129
130
  name: string;
130
131
  placeholder: string;
@@ -144,14 +145,14 @@ export default abstract class PF {
144
145
  } | undefined;
145
146
  name: string;
146
147
  placeholder: string;
147
- id: string;
148
+ id: import('./auth').AuthFieldsIds;
148
149
  method?: import('./auth').AuthMethods | undefined;
149
150
  value: string;
150
151
  Validate: () => string[];
151
152
  Reset: () => void;
152
153
  } | {
153
154
  label: string;
154
- id: string;
155
+ id: import('./auth').AuthFieldsIds;
155
156
  method?: import('./auth').AuthMethods | undefined;
156
157
  name: string;
157
158
  value: string;
@@ -185,7 +186,7 @@ export default abstract class PF {
185
186
  disabled: boolean;
186
187
  }[];
187
188
  fields: {
188
- id: string;
189
+ id: import('./auth').AuthFieldsIds;
189
190
  label: string;
190
191
  name: string;
191
192
  placeholder: string;
@@ -225,7 +226,7 @@ export default abstract class PF {
225
226
  } | undefined;
226
227
  name: string;
227
228
  placeholder: string;
228
- id: string;
229
+ id: import('./auth').AuthFieldsIds;
229
230
  method?: import('./auth').AuthMethods | undefined;
230
231
  value: string;
231
232
  Validate: () => string[];
@@ -245,6 +246,7 @@ export default abstract class PF {
245
246
  GetAction: () => string;
246
247
  ResetFields: () => void;
247
248
  Reset: () => void;
249
+ GetField: (id: import('./auth').AuthFieldsIds) => import('./auth/fields/AuthField').default | undefined;
248
250
  };
249
251
  readonly Status: {
250
252
  DeprecateLogout: () => void;