@integrativedesigndevelopment/dashboard-core 0.0.3 → 0.0.5

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.
Files changed (125) hide show
  1. package/dist/index.esm.js +1 -13
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/index.js +1 -13
  4. package/dist/index.js.map +1 -1
  5. package/package.json +3 -3
  6. package/dist/actions/pluginActions.d.ts +0 -48
  7. package/dist/actions/pluginActions.d.ts.map +0 -1
  8. package/dist/actions/types.d.ts +0 -17
  9. package/dist/actions/types.d.ts.map +0 -1
  10. package/dist/components/ActivityProvider/index.d.ts +0 -10
  11. package/dist/components/ActivityProvider/index.d.ts.map +0 -1
  12. package/dist/components/CancelActionButton/index.d.ts +0 -14
  13. package/dist/components/CancelActionButton/index.d.ts.map +0 -1
  14. package/dist/components/Card/index.d.ts +0 -18
  15. package/dist/components/Card/index.d.ts.map +0 -1
  16. package/dist/components/ConfirmActionButton/index.d.ts +0 -14
  17. package/dist/components/ConfirmActionButton/index.d.ts.map +0 -1
  18. package/dist/components/ErrorBoundary/index.d.ts +0 -18
  19. package/dist/components/ErrorBoundary/index.d.ts.map +0 -1
  20. package/dist/components/IDDLink/index.d.ts +0 -12
  21. package/dist/components/IDDLink/index.d.ts.map +0 -1
  22. package/dist/components/IDDLinkInputItem/index.d.ts +0 -18
  23. package/dist/components/IDDLinkInputItem/index.d.ts.map +0 -1
  24. package/dist/components/Layout/SimpleLayout.d.ts +0 -8
  25. package/dist/components/Layout/SimpleLayout.d.ts.map +0 -1
  26. package/dist/components/Layout/index.d.ts +0 -8
  27. package/dist/components/Layout/index.d.ts.map +0 -1
  28. package/dist/components/Loader/index.d.ts +0 -16
  29. package/dist/components/Loader/index.d.ts.map +0 -1
  30. package/dist/components/LoginBackground/index.d.ts +0 -29
  31. package/dist/components/LoginBackground/index.d.ts.map +0 -1
  32. package/dist/components/LoginBackground/index.improved.d.ts +0 -16
  33. package/dist/components/LoginBackground/index.improved.d.ts.map +0 -1
  34. package/dist/components/LoginBackground/types.d.ts +0 -27
  35. package/dist/components/LoginBackground/types.d.ts.map +0 -1
  36. package/dist/components/LoginBackground/utils.d.ts +0 -30
  37. package/dist/components/LoginBackground/utils.d.ts.map +0 -1
  38. package/dist/components/Modal/index.d.ts +0 -18
  39. package/dist/components/Modal/index.d.ts.map +0 -1
  40. package/dist/components/Password/index.d.ts +0 -15
  41. package/dist/components/Password/index.d.ts.map +0 -1
  42. package/dist/components/PasswordStrengthIndicator/index.d.ts +0 -47
  43. package/dist/components/PasswordStrengthIndicator/index.d.ts.map +0 -1
  44. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts +0 -47
  45. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts.map +0 -1
  46. package/dist/components/SimpleButton/index.d.ts +0 -16
  47. package/dist/components/SimpleButton/index.d.ts.map +0 -1
  48. package/dist/components/TextInput/index.d.ts +0 -16
  49. package/dist/components/TextInput/index.d.ts.map +0 -1
  50. package/dist/components/forms/FormField/index.d.ts +0 -19
  51. package/dist/components/forms/FormField/index.d.ts.map +0 -1
  52. package/dist/components/forms/FormField/index.improved.d.ts +0 -27
  53. package/dist/components/forms/FormField/index.improved.d.ts.map +0 -1
  54. package/dist/components/forms/SubmitButton/index.d.ts +0 -11
  55. package/dist/components/forms/SubmitButton/index.d.ts.map +0 -1
  56. package/dist/components/forms/SubmitButton/index.improved.d.ts +0 -17
  57. package/dist/components/forms/SubmitButton/index.improved.d.ts.map +0 -1
  58. package/dist/components/forms/TermsCheckbox/index.d.ts +0 -13
  59. package/dist/components/forms/TermsCheckbox/index.d.ts.map +0 -1
  60. package/dist/components/forms/TermsCheckbox/index.improved.d.ts +0 -23
  61. package/dist/components/forms/TermsCheckbox/index.improved.d.ts.map +0 -1
  62. package/dist/components/helpers.d.ts +0 -5
  63. package/dist/components/helpers.d.ts.map +0 -1
  64. package/dist/components/index.d.ts +0 -25
  65. package/dist/components/index.d.ts.map +0 -1
  66. package/dist/components/utils/componentTemplate.d.ts +0 -40
  67. package/dist/components/utils/componentTemplate.d.ts.map +0 -1
  68. package/dist/components/utils/componentWrapper.d.ts +0 -87
  69. package/dist/components/utils/componentWrapper.d.ts.map +0 -1
  70. package/dist/config/index.d.ts +0 -23
  71. package/dist/config/index.d.ts.map +0 -1
  72. package/dist/hooks/index.d.ts +0 -3
  73. package/dist/hooks/index.d.ts.map +0 -1
  74. package/dist/hooks/useAsyncOperation.d.ts +0 -12
  75. package/dist/hooks/useAsyncOperation.d.ts.map +0 -1
  76. package/dist/hooks/useUpdateUser.d.ts +0 -32
  77. package/dist/hooks/useUpdateUser.d.ts.map +0 -1
  78. package/dist/hooks/useUserManagement.d.ts +0 -51
  79. package/dist/hooks/useUserManagement.d.ts.map +0 -1
  80. package/dist/index.d.ts +0 -27
  81. package/dist/index.d.ts.map +0 -1
  82. package/dist/metrics/clsMetrics.d.ts +0 -3
  83. package/dist/metrics/clsMetrics.d.ts.map +0 -1
  84. package/dist/metrics/fcpMetrics.d.ts +0 -3
  85. package/dist/metrics/fcpMetrics.d.ts.map +0 -1
  86. package/dist/metrics/fidMetrics.d.ts +0 -3
  87. package/dist/metrics/fidMetrics.d.ts.map +0 -1
  88. package/dist/metrics/index.d.ts +0 -3
  89. package/dist/metrics/index.d.ts.map +0 -1
  90. package/dist/metrics/lcpMetrics.d.ts +0 -3
  91. package/dist/metrics/lcpMetrics.d.ts.map +0 -1
  92. package/dist/metrics/ttfbMetrics.d.ts +0 -3
  93. package/dist/metrics/ttfbMetrics.d.ts.map +0 -1
  94. package/dist/plugin-system/DashboardProvider.d.ts +0 -14
  95. package/dist/plugin-system/DashboardProvider.d.ts.map +0 -1
  96. package/dist/plugin-system/PluginManager.d.ts +0 -9
  97. package/dist/plugin-system/PluginManager.d.ts.map +0 -1
  98. package/dist/plugin-system/core/Dashboard/Icon.d.ts +0 -6
  99. package/dist/plugin-system/core/Dashboard/Icon.d.ts.map +0 -1
  100. package/dist/plugin-system/core/Dashboard/index.d.ts +0 -4
  101. package/dist/plugin-system/core/Dashboard/index.d.ts.map +0 -1
  102. package/dist/plugin-system/core/Dashboard/tab0.d.ts +0 -8
  103. package/dist/plugin-system/core/Dashboard/tab0.d.ts.map +0 -1
  104. package/dist/plugin-system/core/Dashboard/views/DashboardView/index.d.ts +0 -3
  105. package/dist/plugin-system/core/Dashboard/views/DashboardView/index.d.ts.map +0 -1
  106. package/dist/plugin-system/index.d.ts +0 -6
  107. package/dist/plugin-system/index.d.ts.map +0 -1
  108. package/dist/plugin-system/plugin_manifest.d.ts +0 -2
  109. package/dist/plugin-system/plugin_manifest.d.ts.map +0 -1
  110. package/dist/plugin-system/types.d.ts +0 -76
  111. package/dist/plugin-system/types.d.ts.map +0 -1
  112. package/dist/services/errorServices.d.ts +0 -37
  113. package/dist/services/errorServices.d.ts.map +0 -1
  114. package/dist/types/index.d.ts +0 -76
  115. package/dist/types/index.d.ts.map +0 -1
  116. package/dist/utils/array-safety.d.ts +0 -32
  117. package/dist/utils/array-safety.d.ts.map +0 -1
  118. package/dist/utils/assetValidation.d.ts +0 -54
  119. package/dist/utils/assetValidation.d.ts.map +0 -1
  120. package/dist/utils/fromReq.d.ts +0 -3
  121. package/dist/utils/fromReq.d.ts.map +0 -1
  122. package/dist/utils/helpers.d.ts +0 -27
  123. package/dist/utils/helpers.d.ts.map +0 -1
  124. package/dist/utils/validation.d.ts +0 -93
  125. package/dist/utils/validation.d.ts.map +0 -1
@@ -1,6 +0,0 @@
1
- import type { IDDPlugin } from './types';
2
- export declare const get_all_plugins: (_icon_color?: string) => IDDPlugin[];
3
- export type { DashboardProviderProps } from './DashboardProvider';
4
- export { default as DashboardProvider, useDashboard, } from './DashboardProvider';
5
- export { default as PluginManager } from './PluginManager';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin-system/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,SAAS,CAAC;AAU1D,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,KAAG,SAAS,EAG/D,CAAC;AAEF,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,YAAY,GACb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const project_plugins: never[];
2
- //# sourceMappingURL=plugin_manifest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin_manifest.d.ts","sourceRoot":"","sources":["../../src/plugin-system/plugin_manifest.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,SAAK,CAAC"}
@@ -1,76 +0,0 @@
1
- import type { IDDIconProps } from '@integrativedesigndevelopment/idd-icons';
2
- import type React from 'react';
3
- import type { FC, ReactElement, ReactNode } from 'react';
4
- /**
5
- * @name IDDPlugin
6
- * @description type extended by all plugins
7
- * @param id - name by which programs reference plugin
8
- * @param name - plugin name as seen on frontend
9
- * @param order - desired order in side-bar from top to bottom
10
- * @param actions - array of PluginActions used within plugin
11
- * @param tabs - ordered array of tabs within plugin, minimum length of one
12
- * @param dashboardWidget - widget presented to default dashboard plugin
13
- * @param data - data of Plugin
14
- * @param options - plugin specific options that appear in the settings menu
15
- */
16
- export interface WidgetizerProps extends React.Component<any, any> {
17
- widgets?: ReactElement[];
18
- }
19
- export interface IDDPlugin {
20
- id: string;
21
- name: string;
22
- order: number;
23
- tabs: IDDPluginTab[];
24
- icon?: FC<IDDIconProps>;
25
- dashboardWidget?: FC;
26
- actions?: any;
27
- types?: Object;
28
- state?: any;
29
- settings?: IDDPluginSetting[];
30
- }
31
- export interface IDDPluginSetting {
32
- key: string;
33
- label: string;
34
- type: 'dropdown' | 'toggle';
35
- options?: string[];
36
- }
37
- /**
38
- * @name IDDPluginTab
39
- * @description Tab optionally contained within
40
- * @param id - programmer refereced id of tab
41
- * @param name - tab name seen on frontend
42
- * @param content - react content displayed on tab
43
- */
44
- export interface IDDPluginTab {
45
- id: string;
46
- name: string;
47
- content: any;
48
- icon?: ReactNode;
49
- }
50
- export interface IDDCurrentPlugin {
51
- id: string;
52
- tab: number;
53
- }
54
- /**
55
- * @name IDDPluginNotification
56
- * @description notification that is on Navbar of dashboard
57
- * @param title - short title of notification
58
- * @param msg - verbose message of notification
59
- * @param origin - id of plugin from which notification originated
60
- * @param date - date of notification creation
61
- */
62
- export interface IDDPluginNotification {
63
- title: ReactNode;
64
- msg: string;
65
- date: string;
66
- origin?: string;
67
- }
68
- export interface WidgetizerProps extends React.Component<any, any> {
69
- widgets?: ReactElement[];
70
- }
71
- /**
72
- * @name IDDPluginExport
73
- * @description Type for plugin exports - can be a single plugin or array of plugins
74
- */
75
- export type IDDPluginExport = IDDPlugin | IDDPlugin[];
76
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin-system/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAChE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IACxB,eAAe,CAAC,EAAE,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAChE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC"}
@@ -1,37 +0,0 @@
1
- import type React from 'react';
2
- import { type ReactNode } from 'react';
3
- export type ErrorType = 'error' | 'success' | 'warning' | 'info';
4
- export interface ErrorMessage {
5
- id: string;
6
- type: ErrorType;
7
- message: string;
8
- timestamp: number;
9
- autoHide?: boolean;
10
- duration?: number;
11
- }
12
- interface ErrorContextValue {
13
- errors: ErrorMessage[];
14
- addError: (message: string, type?: ErrorType, autoHide?: boolean, duration?: number) => string;
15
- removeError: (id: string) => void;
16
- clearErrors: () => void;
17
- showError: (message: string, autoHide?: boolean) => string;
18
- showSuccess: (message: string, autoHide?: boolean) => string;
19
- showWarning: (message: string, autoHide?: boolean) => string;
20
- showInfo: (message: string, autoHide?: boolean) => string;
21
- }
22
- interface ErrorProviderProps {
23
- children: ReactNode;
24
- }
25
- export declare const ErrorProvider: React.FC<ErrorProviderProps>;
26
- export declare const useError: () => ErrorContextValue;
27
- export declare const useErrorBoundary: () => {
28
- handleError: (error: Error, errorInfo?: any) => void;
29
- };
30
- interface ErrorToastProps {
31
- error: ErrorMessage;
32
- onClose: (id: string) => void;
33
- }
34
- export declare const ErrorToast: React.FC<ErrorToastProps>;
35
- export declare const ErrorToastContainer: React.FC;
36
- export {};
37
- //# sourceMappingURL=errorServices.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorServices.d.ts","sourceRoot":"","sources":["../../src/services/errorServices.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,QAAQ,EAAE,CACR,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,SAAS,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,MAAM,KACd,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IAC3D,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7D,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7D,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CAC3D;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAKD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8GtD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,iBAM3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;yBAIjB,KAAK,cAAc,GAAG;CAQjC,CAAC;AAEF,UAAU,eAAe;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+DhD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAiBvC,CAAC"}
@@ -1,76 +0,0 @@
1
- export interface DashboardConfig {
2
- theme: ThemeConfig;
3
- auth: AuthConfig;
4
- plugins: PluginConfig[];
5
- navigation: NavigationConfig;
6
- branding: BrandingConfig;
7
- }
8
- export interface ThemeConfig {
9
- primaryColor: string;
10
- darkMode: boolean;
11
- customCSS?: string;
12
- }
13
- export interface AuthConfig {
14
- provider: 'jwt' | 'oauth' | 'custom';
15
- endpoints: {
16
- login: string;
17
- logout: string;
18
- refresh: string;
19
- };
20
- }
21
- export interface PluginConfig {
22
- id: string;
23
- enabled: boolean;
24
- settings?: Record<string, any>;
25
- }
26
- export interface NavigationConfig {
27
- sideNavCollapsed: boolean;
28
- showNotifications: boolean;
29
- customLinks?: NavLink[];
30
- }
31
- export interface NavLink {
32
- id: string;
33
- label: string;
34
- href: string;
35
- icon?: React.ComponentType;
36
- external?: boolean;
37
- }
38
- export interface BrandingConfig {
39
- logo: string;
40
- appName: string;
41
- favicon?: string;
42
- }
43
- export interface BaseComponentProps {
44
- className?: string;
45
- children?: React.ReactNode;
46
- }
47
- export interface IDDError {
48
- message: string;
49
- code?: string;
50
- details?: any;
51
- }
52
- export interface User {
53
- id: string;
54
- email: string;
55
- name: string;
56
- role: string;
57
- avatar?: string;
58
- }
59
- export interface Activity {
60
- id: string;
61
- type: string;
62
- message: string;
63
- timestamp: Date;
64
- userId?: string;
65
- }
66
- export interface AssetValidationResult {
67
- exists: boolean;
68
- error?: string;
69
- fallbackUsed: boolean;
70
- }
71
- export interface AssetConfig {
72
- path: string;
73
- fallback?: string;
74
- timeout?: number;
75
- }
76
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ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AAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Utility functions for safe array operations during SSR and client-side rendering
3
- */
4
- /**
5
- * Safely ensures a value is an array, returning empty array if null/undefined
6
- */
7
- export declare function ensureArray<T>(value: T[] | null | undefined): T[];
8
- /**
9
- * Safely filter an array with null/undefined checks
10
- */
11
- export declare function safeFilter<T>(array: T[] | null | undefined, predicate: (value: T, index: number, array: T[]) => boolean): T[];
12
- /**
13
- * Safely map an array with null/undefined checks
14
- */
15
- export declare function safeMap<T, U>(array: T[] | null | undefined, mapper: (value: T, index: number, array: T[]) => U): U[];
16
- /**
17
- * Safely find in an array with null/undefined checks
18
- */
19
- export declare function safeFind<T>(array: T[] | null | undefined, predicate: (value: T, index: number, array: T[]) => boolean): T | undefined;
20
- /**
21
- * Safely check if array has some element matching predicate
22
- */
23
- export declare function safeSome<T>(array: T[] | null | undefined, predicate: (value: T, index: number, array: T[]) => boolean): boolean;
24
- /**
25
- * Safely get array length
26
- */
27
- export declare function safeLength<T>(array: T[] | null | undefined): number;
28
- /**
29
- * Type guard to check if value is a non-empty array
30
- */
31
- export declare function isNonEmptyArray<T>(value: any): value is T[];
32
- //# sourceMappingURL=array-safety.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array-safety.d.ts","sourceRoot":"","sources":["../../src/utils/array-safety.ts"],"names":[],"mappings":"A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C,CAAC,EAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC,EAAE,CAE3D"}
@@ -1,54 +0,0 @@
1
- /**
2
- * Asset Validation Utilities
3
- *
4
- * Provides utilities for validating and handling asset loading with graceful fallbacks.
5
- */
6
- import { type CSSProperties } from 'react';
7
- import type { AssetValidationResult, AssetConfig } from '../types';
8
- /**
9
- * Validates if an asset exists and can be loaded
10
- */
11
- export declare const validateAsset: (assetPath: string, timeout?: number) => Promise<AssetValidationResult>;
12
- /**
13
- * Validates multiple assets concurrently
14
- */
15
- export declare const validateAssets: (assetPaths: string[], timeout?: number) => Promise<Record<string, AssetValidationResult>>;
16
- /**
17
- * Gets the appropriate background style based on asset validation
18
- */
19
- export declare const getBackgroundStyle: (config: AssetConfig, validationResult?: AssetValidationResult) => CSSProperties;
20
- /**
21
- * React hook for asset validation in components
22
- */
23
- export declare const useAssetValidation: (assetPath: string, timeout?: number) => {
24
- result: AssetValidationResult;
25
- isLoading: boolean;
26
- };
27
- /**
28
- * Default asset paths that components commonly reference
29
- */
30
- export declare const DEFAULT_ASSET_PATHS: {
31
- readonly SIGNUP_THEME: "/signup-theme.png";
32
- readonly LOGO_ENVIROME: "/logo-envirome.png";
33
- readonly BVOC: "/bvoc.png";
34
- readonly LOGO: "/logo.png";
35
- };
36
- /**
37
- * Default fallback colors for different components
38
- */
39
- export declare const DEFAULT_FALLBACK_COLORS: {
40
- readonly PRIMARY: "#ad0000";
41
- readonly SECONDARY: "#0066cc";
42
- readonly NEUTRAL: "#666666";
43
- readonly SUCCESS: "#00A89D";
44
- readonly WARNING: "#DD3150";
45
- };
46
- /**
47
- * Validates commonly required assets
48
- */
49
- export declare const validateCommonAssets: () => Promise<Record<string, AssetValidationResult>>;
50
- /**
51
- * Console warning for missing assets (development only)
52
- */
53
- export declare const warnMissingAssets: (validationResults: Record<string, AssetValidationResult>) => void;
54
- //# sourceMappingURL=assetValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assetValidation.d.ts","sourceRoot":"","sources":["../../src/utils/assetValidation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,UAAS,MAAa,KACrB,OAAO,CAAC,qBAAqB,CAgC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,EAAE,EACpB,UAAU,MAAM,KACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAY/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,WAAW,EACnB,mBAAmB,qBAAqB,KACvC,aAkBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM;;;CA4BrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAE1F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,mBAAmB,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,SAczF,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const getLangFromReq: (req?: object | any) => string;
2
- export { getLangFromReq };
3
- //# sourceMappingURL=fromReq.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fromReq.d.ts","sourceRoot":"","sources":["../../src/utils/fromReq.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,cAAc,GAAI,MAAK,MAAM,GAAG,GAAQ,KAAG,MAMhD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,27 +0,0 @@
1
- import { type FC } from 'react';
2
- export interface ContentItemProps {
3
- type: string;
4
- style: string;
5
- text: string;
6
- items: any;
7
- orderedListStyle?: string;
8
- unorderedListStyle?: string;
9
- paragraphStyle?: string;
10
- }
11
- export declare const ContentItem: FC<ContentItemProps>;
12
- export declare const truncate: (str: string, maxLength: number) => string;
13
- export interface WindowDimensionsProps {
14
- width: number;
15
- height: number;
16
- }
17
- export declare const useWindowDimensions: () => WindowDimensionsProps;
18
- export declare function getArraysDiff<T>(a: T[], b: T[]): T[];
19
- export declare function flatten(arr: any[]): any[];
20
- export declare const getLocationString: (loc: any) => string;
21
- /**
22
- * Maps EVALUATOR role to MODERATOR role to avoid adding extra role values
23
- * @param role - The user role
24
- * @returns The mapped role (EVALUATOR becomes MODERATOR, others unchanged)
25
- */
26
- export declare const mapUserRole: (role: string) => string;
27
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAA0C,MAAM,OAAO,CAAC;AAuDxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAyE5C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,WAMtD,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,mBAAmB,QAAO,qBAmBtC,CAAC;AAEF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAQpD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAQzC;AAED,eAAO,MAAM,iBAAiB,GAAI,KAAK,GAAG,KAAG,MAwB5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,MAE1C,CAAC"}
@@ -1,93 +0,0 @@
1
- /**
2
- * Generic validation utilities for dashboard components
3
- */
4
- /**
5
- * Sanitize user input to prevent XSS attacks
6
- * @param input - Raw user input
7
- * @returns Sanitized string
8
- */
9
- export declare const sanitizeInput: (input: string) => string;
10
- /**
11
- * Validate email format
12
- * @param email - Email to validate
13
- * @returns true if valid email format
14
- */
15
- export declare const isValidEmail: (email: string) => boolean;
16
- /**
17
- * Validate URL format
18
- * @param url - URL to validate
19
- * @returns true if valid URL format
20
- */
21
- export declare const isValidUrl: (url: string) => boolean;
22
- /**
23
- * Check if a string is empty or only contains whitespace
24
- * @param value - String to check
25
- * @returns true if empty or whitespace only
26
- */
27
- export declare const isEmpty: (value: string | null | undefined) => boolean;
28
- /**
29
- * Validate string length within bounds
30
- * @param value - String to validate
31
- * @param min - Minimum length
32
- * @param max - Maximum length
33
- * @returns true if within bounds
34
- */
35
- export declare const isLengthValid: (value: string, min: number, max: number) => boolean;
36
- /**
37
- * Check if string contains only alphanumeric characters
38
- * @param value - String to check
39
- * @returns true if only alphanumeric
40
- */
41
- export declare const isAlphanumeric: (value: string) => boolean;
42
- /**
43
- * Check if string contains only letters
44
- * @param value - String to check
45
- * @returns true if only letters
46
- */
47
- export declare const isAlpha: (value: string) => boolean;
48
- /**
49
- * Check if string contains only numbers
50
- * @param value - String to check
51
- * @returns true if only numbers
52
- */
53
- export declare const isNumeric: (value: string) => boolean;
54
- /**
55
- * Validate phone number format (basic)
56
- * @param phone - Phone number to validate
57
- * @returns true if valid phone format
58
- */
59
- export declare const isValidPhone: (phone: string) => boolean;
60
- /**
61
- * Trim and normalize whitespace in a string
62
- * @param value - String to normalize
63
- * @returns Normalized string
64
- */
65
- export declare const normalizeWhitespace: (value: string) => string;
66
- /**
67
- * Check if value matches a pattern
68
- * @param value - Value to check
69
- * @param pattern - RegExp pattern
70
- * @returns true if matches pattern
71
- */
72
- export declare const matchesPattern: (value: string, pattern: RegExp) => boolean;
73
- /**
74
- * Validate date string format
75
- * @param dateString - Date string to validate
76
- * @returns true if valid date
77
- */
78
- export declare const isValidDate: (dateString: string) => boolean;
79
- /**
80
- * Generic field validation result
81
- */
82
- export interface ValidationResult {
83
- isValid: boolean;
84
- errors: string[];
85
- }
86
- /**
87
- * Create a validation result
88
- * @param isValid - Whether validation passed
89
- * @param errors - Array of error messages
90
- * @returns ValidationResult object
91
- */
92
- export declare const createValidationResult: (isValid: boolean, errors?: string[]) => ValidationResult;
93
- //# sourceMappingURL=validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAY7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAG5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,OAOxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAE1D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,KAAK,MAAM,EACX,KAAK,M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