dff-util 1.1.3 → 1.1.4

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/README.md CHANGED
@@ -245,6 +245,131 @@ ResponseType = {
245
245
 
246
246
  ```
247
247
 
248
+ ## ConstMessages
249
+
250
+ ```
251
+ export const ConstMessages = {
252
+ // Validation messages
253
+ REQUIRED: 'Required',
254
+ MIN_LENGTH_REQUIRED: 'Minimum length required',
255
+ MAX_LENGTH_EXCEED: 'Maximum length exceeded',
256
+ INVALID_DATA: 'Invalid data',
257
+ FIELD_MUST_BE_NUMERIC: 'This field must be numeric',
258
+ FIELD_MUST_BE_ALPHABETIC: 'This field must contain only letters',
259
+ FIELD_MUST_BE_ALPHANUMERIC: 'This field must contain only letters and numbers',
260
+ INVALID_EMAIL: 'Invalid email format',
261
+ INVALID_PHONE: 'Invalid phone number',
262
+ PASSWORD_TOO_WEAK: 'Password is too weak',
263
+ PASSWORDS_DO_NOT_MATCH: 'Passwords do not match',
264
+ INVALID_DATE_FORMAT: 'Invalid date format',
265
+ DATE_OUT_OF_RANGE: 'Date is out of acceptable range',
266
+ VALUE_TOO_LOW: 'Value is too low',
267
+ VALUE_TOO_HIGH: 'Value is too high',
268
+ EXCEEDS_MAX_CHARACTERS: 'Exceeds maximum character limit',
269
+ INVALID_URL: 'Invalid URL format',
270
+ INVALID_ZIP_CODE: 'Invalid zip/postal code',
271
+ ONLY_POSITIVE_NUMBERS: 'Only positive numbers are allowed',
272
+ INVALID_CREDIT_CARD: 'Invalid credit card number',
273
+ INVALID_FILE_TYPE: 'Unsupported file type',
274
+ FILE_TOO_LARGE: 'File size exceeds the maximum limit',
275
+
276
+ // Success messages
277
+ SUCCESS: 'Operation completed successfully',
278
+ SAVED_SUCCESSFULLY: 'Data saved successfully',
279
+ UPDATED_SUCCESSFULLY: 'Data updated successfully',
280
+ DELETED_SUCCESSFULLY: 'Data deleted successfully',
281
+ SUBMITTED_SUCCESSFULLY: 'Form submitted successfully',
282
+ EMAIL_SENT: 'Email sent successfully',
283
+ PASSWORD_CHANGED: 'Password changed successfully',
284
+ LOGGED_IN: 'Logged in successfully',
285
+ LOGGED_OUT: 'Logged out successfully',
286
+ UPLOAD_SUCCESSFUL: 'File uploaded successfully',
287
+ PAYMENT_SUCCESSFUL: 'Payment processed successfully',
288
+ DATA_FETCHED: 'Data fetched successfully',
289
+ DATA_LOADED: 'Data loaded successfully',
290
+ ACTION_COMPLETED: 'Action completed successfully',
291
+
292
+ // Error messages
293
+ WENT_WRONG: 'Something went wrong, please try again',
294
+ NOT_FOUND: 'Requested resource not found',
295
+ UNAUTHORIZED: 'You are not authorized to perform this action',
296
+ FORBIDDEN: 'Access to this resource is forbidden',
297
+ SERVER_ERROR: 'Internal server error, please contact support',
298
+ CONNECTION_ERROR: 'Unable to connect, please check your internet connection',
299
+ TIMEOUT_ERROR: 'The request timed out, please try again later',
300
+ VALIDATION_FAILED: 'Validation failed, please check the input',
301
+ DUPLICATE_ENTRY: 'Duplicate entry, please provide unique data',
302
+ SESSION_EXPIRED: 'Your session has expired, please log in again',
303
+ INVALID_SESSION: 'Invalid session, please authenticate',
304
+ RATE_LIMIT_EXCEEDED: 'Too many requests, please try again later',
305
+ RESOURCE_LOCKED: 'This resource is currently locked',
306
+ DATA_CORRUPTED: 'Data is corrupted',
307
+ SERVICE_UNAVAILABLE: 'Service is currently unavailable',
308
+ PAYMENT_FAILED: 'Payment failed, please check your details',
309
+ OPERATION_FAILED: 'Operation failed, please try again',
310
+ ACCESS_DENIED: 'Access denied',
311
+ INVALID_CREDENTIALS: 'Invalid credentials, please try again',
312
+ INVALID_TOKEN: 'Invalid token, please try again',
313
+ USER_NOT_FOUND: 'User not found, please try again',
314
+ PASSWORD_RESET_FAILED: 'Password reset failed, please try again',
315
+
316
+ // Informational Messages
317
+ NO_DATA_FOUND: 'No data found',
318
+ NO_RECORD_FOUND: 'No record found',
319
+ NO_RECORDS_FOUND: 'No records found',
320
+ NO_RECORDS_MATCHED: 'No records matched your search criteria',
321
+ NO_RECORDS_MATCHED_FILTER: 'No records matched your filter criteria',
322
+ LOADING: 'Loading, please wait...',
323
+ FETCHING_DATA: 'Fetching data, please wait...',
324
+ PROCESSING: 'Processing your request...',
325
+ PLEASE_WAIT: 'Please wait...',
326
+ NO_RESULTS_FOUND: 'No results found',
327
+ NO_DATA_AVAILABLE: 'No data available',
328
+ SEARCHING: 'Searching...',
329
+ REDIRECTING: 'Redirecting, please wait...',
330
+ CONNECTING: 'Connecting, please wait...',
331
+ LOGGING_OUT: 'Logging out, please wait...',
332
+ LOGGING_IN: 'Logging in, please wait...',
333
+ PREPARING_DOWNLOAD: 'Preparing your download...',
334
+ CHECKING_UPDATES: 'Checking for updates...',
335
+
336
+ // Confirmation Messages
337
+ CONFIRM_DELETE: 'Are you sure you want to delete this?',
338
+ CONFIRM_SAVE: 'Do you want to save changes?',
339
+ CONFIRM_SUBMIT: 'Do you want to submit this form?',
340
+ CONFIRM_LOGOUT: 'Are you sure you want to log out?',
341
+ CONFIRM_ACTION: 'Are you sure you want to proceed?',
342
+ CONFIRM_CLOSE: 'Are you sure you want to close this window?',
343
+ CONFIRM_CANCEL: 'Do you want to cancel this action?',
344
+ CONFIRM_RESTART: 'Do you want to restart the process?',
345
+
346
+ // Warning Messages
347
+ UNSAVED_CHANGES: 'You have unsaved changes. Do you want to discard them?',
348
+ LOW_BATTERY: 'Battery level is low, please connect your charger',
349
+ HIGH_USAGE: 'High system usage detected',
350
+ INCOMPLETE_FORM: 'The form is incomplete',
351
+ LIMIT_REACHED: 'You have reached the maximum limit',
352
+ OUTDATED_VERSION: 'You are using an outdated version of the application',
353
+
354
+ // General Messages
355
+ WELCOME: 'Welcome to the application',
356
+ GOODBYE: 'Goodbye, have a great day!',
357
+ HELLO: 'Hello, how can we help you today?',
358
+ THANK_YOU: 'Thank you for using our service',
359
+ TRY_AGAIN: 'Please try again',
360
+ UNDER_MAINTENANCE: 'The system is under maintenance, please check back later',
361
+ FEATURE_COMING_SOON: 'This feature is coming soon',
362
+ CONTACT_SUPPORT: 'If the issue persists, please contact support',
363
+ UPDATING: 'Updating, please wait...',
364
+ INSTALLING: 'Installing, please wait...',
365
+ RESTART_REQUIRED: 'A restart is required to apply changes',
366
+ RESTARTING: 'Restarting, please wait...',
367
+ LOADING_DATA: 'Loading data, please wait...',
368
+ SAVING: 'Saving, please wait...',
369
+ };
370
+
371
+ ```
372
+
248
373
  ## file upload test
249
374
 
250
375
  ```
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './main/http';
4
4
  export * from './main/regexr';
5
5
  export * from './main/const-value';
6
6
  export * from './main/const-type';
7
+ export * from './main/const-messages';
package/dist/index.js CHANGED
@@ -20,3 +20,4 @@ __exportStar(require("./main/http"), exports);
20
20
  __exportStar(require("./main/regexr"), exports);
21
21
  __exportStar(require("./main/const-value"), exports);
22
22
  __exportStar(require("./main/const-type"), exports);
23
+ __exportStar(require("./main/const-messages"), exports);
@@ -0,0 +1,106 @@
1
+ export declare const ConstMessages: {
2
+ REQUIRED: string;
3
+ MIN_LENGTH_REQUIRED: string;
4
+ MAX_LENGTH_EXCEED: string;
5
+ INVALID_DATA: string;
6
+ FIELD_MUST_BE_NUMERIC: string;
7
+ FIELD_MUST_BE_ALPHABETIC: string;
8
+ FIELD_MUST_BE_ALPHANUMERIC: string;
9
+ INVALID_EMAIL: string;
10
+ INVALID_PHONE: string;
11
+ PASSWORD_TOO_WEAK: string;
12
+ PASSWORDS_DO_NOT_MATCH: string;
13
+ INVALID_DATE_FORMAT: string;
14
+ DATE_OUT_OF_RANGE: string;
15
+ VALUE_TOO_LOW: string;
16
+ VALUE_TOO_HIGH: string;
17
+ EXCEEDS_MAX_CHARACTERS: string;
18
+ INVALID_URL: string;
19
+ INVALID_ZIP_CODE: string;
20
+ ONLY_POSITIVE_NUMBERS: string;
21
+ INVALID_CREDIT_CARD: string;
22
+ INVALID_FILE_TYPE: string;
23
+ FILE_TOO_LARGE: string;
24
+ SUCCESS: string;
25
+ SAVED_SUCCESSFULLY: string;
26
+ UPDATED_SUCCESSFULLY: string;
27
+ DELETED_SUCCESSFULLY: string;
28
+ SUBMITTED_SUCCESSFULLY: string;
29
+ EMAIL_SENT: string;
30
+ PASSWORD_CHANGED: string;
31
+ LOGGED_IN: string;
32
+ LOGGED_OUT: string;
33
+ UPLOAD_SUCCESSFUL: string;
34
+ PAYMENT_SUCCESSFUL: string;
35
+ DATA_FETCHED: string;
36
+ DATA_LOADED: string;
37
+ ACTION_COMPLETED: string;
38
+ WENT_WRONG: string;
39
+ NOT_FOUND: string;
40
+ UNAUTHORIZED: string;
41
+ FORBIDDEN: string;
42
+ SERVER_ERROR: string;
43
+ CONNECTION_ERROR: string;
44
+ TIMEOUT_ERROR: string;
45
+ VALIDATION_FAILED: string;
46
+ DUPLICATE_ENTRY: string;
47
+ SESSION_EXPIRED: string;
48
+ INVALID_SESSION: string;
49
+ RATE_LIMIT_EXCEEDED: string;
50
+ RESOURCE_LOCKED: string;
51
+ DATA_CORRUPTED: string;
52
+ SERVICE_UNAVAILABLE: string;
53
+ PAYMENT_FAILED: string;
54
+ OPERATION_FAILED: string;
55
+ ACCESS_DENIED: string;
56
+ INVALID_CREDENTIALS: string;
57
+ INVALID_TOKEN: string;
58
+ USER_NOT_FOUND: string;
59
+ PASSWORD_RESET_FAILED: string;
60
+ NO_DATA_FOUND: string;
61
+ NO_RECORD_FOUND: string;
62
+ NO_RECORDS_FOUND: string;
63
+ NO_RECORDS_MATCHED: string;
64
+ NO_RECORDS_MATCHED_FILTER: string;
65
+ LOADING: string;
66
+ FETCHING_DATA: string;
67
+ PROCESSING: string;
68
+ PLEASE_WAIT: string;
69
+ NO_RESULTS_FOUND: string;
70
+ NO_DATA_AVAILABLE: string;
71
+ SEARCHING: string;
72
+ REDIRECTING: string;
73
+ CONNECTING: string;
74
+ LOGGING_OUT: string;
75
+ LOGGING_IN: string;
76
+ PREPARING_DOWNLOAD: string;
77
+ CHECKING_UPDATES: string;
78
+ CONFIRM_DELETE: string;
79
+ CONFIRM_SAVE: string;
80
+ CONFIRM_SUBMIT: string;
81
+ CONFIRM_LOGOUT: string;
82
+ CONFIRM_ACTION: string;
83
+ CONFIRM_CLOSE: string;
84
+ CONFIRM_CANCEL: string;
85
+ CONFIRM_RESTART: string;
86
+ UNSAVED_CHANGES: string;
87
+ LOW_BATTERY: string;
88
+ HIGH_USAGE: string;
89
+ INCOMPLETE_FORM: string;
90
+ LIMIT_REACHED: string;
91
+ OUTDATED_VERSION: string;
92
+ WELCOME: string;
93
+ GOODBYE: string;
94
+ HELLO: string;
95
+ THANK_YOU: string;
96
+ TRY_AGAIN: string;
97
+ UNDER_MAINTENANCE: string;
98
+ FEATURE_COMING_SOON: string;
99
+ CONTACT_SUPPORT: string;
100
+ UPDATING: string;
101
+ INSTALLING: string;
102
+ RESTART_REQUIRED: string;
103
+ RESTARTING: string;
104
+ LOADING_DATA: string;
105
+ SAVING: string;
106
+ };
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConstMessages = void 0;
4
+ exports.ConstMessages = {
5
+ // Validation messages
6
+ REQUIRED: 'Required',
7
+ MIN_LENGTH_REQUIRED: 'Minimum length required',
8
+ MAX_LENGTH_EXCEED: 'Maximum length exceeded',
9
+ INVALID_DATA: 'Invalid data',
10
+ FIELD_MUST_BE_NUMERIC: 'This field must be numeric',
11
+ FIELD_MUST_BE_ALPHABETIC: 'This field must contain only letters',
12
+ FIELD_MUST_BE_ALPHANUMERIC: 'This field must contain only letters and numbers',
13
+ INVALID_EMAIL: 'Invalid email format',
14
+ INVALID_PHONE: 'Invalid phone number',
15
+ PASSWORD_TOO_WEAK: 'Password is too weak',
16
+ PASSWORDS_DO_NOT_MATCH: 'Passwords do not match',
17
+ INVALID_DATE_FORMAT: 'Invalid date format',
18
+ DATE_OUT_OF_RANGE: 'Date is out of acceptable range',
19
+ VALUE_TOO_LOW: 'Value is too low',
20
+ VALUE_TOO_HIGH: 'Value is too high',
21
+ EXCEEDS_MAX_CHARACTERS: 'Exceeds maximum character limit',
22
+ INVALID_URL: 'Invalid URL format',
23
+ INVALID_ZIP_CODE: 'Invalid zip/postal code',
24
+ ONLY_POSITIVE_NUMBERS: 'Only positive numbers are allowed',
25
+ INVALID_CREDIT_CARD: 'Invalid credit card number',
26
+ INVALID_FILE_TYPE: 'Unsupported file type',
27
+ FILE_TOO_LARGE: 'File size exceeds the maximum limit',
28
+ // Success messages
29
+ SUCCESS: 'Operation completed successfully',
30
+ SAVED_SUCCESSFULLY: 'Data saved successfully',
31
+ UPDATED_SUCCESSFULLY: 'Data updated successfully',
32
+ DELETED_SUCCESSFULLY: 'Data deleted successfully',
33
+ SUBMITTED_SUCCESSFULLY: 'Form submitted successfully',
34
+ EMAIL_SENT: 'Email sent successfully',
35
+ PASSWORD_CHANGED: 'Password changed successfully',
36
+ LOGGED_IN: 'Logged in successfully',
37
+ LOGGED_OUT: 'Logged out successfully',
38
+ UPLOAD_SUCCESSFUL: 'File uploaded successfully',
39
+ PAYMENT_SUCCESSFUL: 'Payment processed successfully',
40
+ DATA_FETCHED: 'Data fetched successfully',
41
+ DATA_LOADED: 'Data loaded successfully',
42
+ ACTION_COMPLETED: 'Action completed successfully',
43
+ // Error messages
44
+ WENT_WRONG: 'Something went wrong, please try again',
45
+ NOT_FOUND: 'Requested resource not found',
46
+ UNAUTHORIZED: 'You are not authorized to perform this action',
47
+ FORBIDDEN: 'Access to this resource is forbidden',
48
+ SERVER_ERROR: 'Internal server error, please contact support',
49
+ CONNECTION_ERROR: 'Unable to connect, please check your internet connection',
50
+ TIMEOUT_ERROR: 'The request timed out, please try again later',
51
+ VALIDATION_FAILED: 'Validation failed, please check the input',
52
+ DUPLICATE_ENTRY: 'Duplicate entry, please provide unique data',
53
+ SESSION_EXPIRED: 'Your session has expired, please log in again',
54
+ INVALID_SESSION: 'Invalid session, please authenticate',
55
+ RATE_LIMIT_EXCEEDED: 'Too many requests, please try again later',
56
+ RESOURCE_LOCKED: 'This resource is currently locked',
57
+ DATA_CORRUPTED: 'Data is corrupted',
58
+ SERVICE_UNAVAILABLE: 'Service is currently unavailable',
59
+ PAYMENT_FAILED: 'Payment failed, please check your details',
60
+ OPERATION_FAILED: 'Operation failed, please try again',
61
+ ACCESS_DENIED: 'Access denied',
62
+ INVALID_CREDENTIALS: 'Invalid credentials, please try again',
63
+ INVALID_TOKEN: 'Invalid token, please try again',
64
+ USER_NOT_FOUND: 'User not found, please try again',
65
+ PASSWORD_RESET_FAILED: 'Password reset failed, please try again',
66
+ // Informational Messages
67
+ NO_DATA_FOUND: 'No data found',
68
+ NO_RECORD_FOUND: 'No record found',
69
+ NO_RECORDS_FOUND: 'No records found',
70
+ NO_RECORDS_MATCHED: 'No records matched your search criteria',
71
+ NO_RECORDS_MATCHED_FILTER: 'No records matched your filter criteria',
72
+ LOADING: 'Loading, please wait...',
73
+ FETCHING_DATA: 'Fetching data, please wait...',
74
+ PROCESSING: 'Processing your request...',
75
+ PLEASE_WAIT: 'Please wait...',
76
+ NO_RESULTS_FOUND: 'No results found',
77
+ NO_DATA_AVAILABLE: 'No data available',
78
+ SEARCHING: 'Searching...',
79
+ REDIRECTING: 'Redirecting, please wait...',
80
+ CONNECTING: 'Connecting, please wait...',
81
+ LOGGING_OUT: 'Logging out, please wait...',
82
+ LOGGING_IN: 'Logging in, please wait...',
83
+ PREPARING_DOWNLOAD: 'Preparing your download...',
84
+ CHECKING_UPDATES: 'Checking for updates...',
85
+ // Confirmation Messages
86
+ CONFIRM_DELETE: 'Are you sure you want to delete this?',
87
+ CONFIRM_SAVE: 'Do you want to save changes?',
88
+ CONFIRM_SUBMIT: 'Do you want to submit this form?',
89
+ CONFIRM_LOGOUT: 'Are you sure you want to log out?',
90
+ CONFIRM_ACTION: 'Are you sure you want to proceed?',
91
+ CONFIRM_CLOSE: 'Are you sure you want to close this window?',
92
+ CONFIRM_CANCEL: 'Do you want to cancel this action?',
93
+ CONFIRM_RESTART: 'Do you want to restart the process?',
94
+ // Warning Messages
95
+ UNSAVED_CHANGES: 'You have unsaved changes. Do you want to discard them?',
96
+ LOW_BATTERY: 'Battery level is low, please connect your charger',
97
+ HIGH_USAGE: 'High system usage detected',
98
+ INCOMPLETE_FORM: 'The form is incomplete',
99
+ LIMIT_REACHED: 'You have reached the maximum limit',
100
+ OUTDATED_VERSION: 'You are using an outdated version of the application',
101
+ // General Messages
102
+ WELCOME: 'Welcome to the application',
103
+ GOODBYE: 'Goodbye, have a great day!',
104
+ HELLO: 'Hello, how can we help you today?',
105
+ THANK_YOU: 'Thank you for using our service',
106
+ TRY_AGAIN: 'Please try again',
107
+ UNDER_MAINTENANCE: 'The system is under maintenance, please check back later',
108
+ FEATURE_COMING_SOON: 'This feature is coming soon',
109
+ CONTACT_SUPPORT: 'If the issue persists, please contact support',
110
+ UPDATING: 'Updating, please wait...',
111
+ INSTALLING: 'Installing, please wait...',
112
+ RESTART_REQUIRED: 'A restart is required to apply changes',
113
+ RESTARTING: 'Restarting, please wait...',
114
+ LOADING_DATA: 'Loading data, please wait...',
115
+ SAVING: 'Saving, please wait...',
116
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dff-util",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {