@djangocfg/layouts 1.4.27 → 1.4.29

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 (118) hide show
  1. package/package.json +8 -8
  2. package/src/auth/context/AuthContext.tsx +4 -1
  3. package/src/auth/hooks/index.ts +2 -0
  4. package/src/auth/hooks/useAuthForm.ts +2 -0
  5. package/src/auth/hooks/useAuthGuard.ts +2 -0
  6. package/src/auth/hooks/useAutoAuth.ts +16 -11
  7. package/src/auth/hooks/useLocalStorage.ts +2 -0
  8. package/src/auth/hooks/useProfileCache.ts +2 -0
  9. package/src/auth/hooks/useSessionStorage.ts +2 -0
  10. package/src/auth/middlewares/index.ts +1 -1
  11. package/src/auth/middlewares/proxy.ts +10 -2
  12. package/src/layouts/AppLayout/AppLayout.tsx +9 -7
  13. package/src/layouts/AppLayout/components/ErrorBoundary.tsx +6 -3
  14. package/src/layouts/AppLayout/components/PageProgress.tsx +2 -0
  15. package/src/layouts/AppLayout/components/Seo.tsx +2 -0
  16. package/src/layouts/AppLayout/components/UpdateNotifier/UpdateNotifier.tsx +3 -2
  17. package/src/layouts/AppLayout/hooks/index.ts +2 -0
  18. package/src/layouts/AppLayout/hooks/useNavigation.ts +3 -1
  19. package/src/layouts/AppLayout/layouts/AdminLayout/AdminLayout.tsx +1 -0
  20. package/src/layouts/AppLayout/layouts/AuthLayout/AuthContext.tsx +2 -0
  21. package/src/layouts/AppLayout/layouts/AuthLayout/IdentifierForm.tsx +2 -0
  22. package/src/layouts/AppLayout/layouts/AuthLayout/OTPForm.tsx +4 -0
  23. package/src/layouts/AppLayout/layouts/AuthLayout/index.ts +2 -0
  24. package/src/layouts/AppLayout/layouts/PrivateLayout/PrivateLayout.tsx +1 -0
  25. package/src/layouts/AppLayout/providers/CoreProviders.tsx +1 -0
  26. package/src/layouts/PaymentsLayout/PaymentsLayout.tsx +1 -0
  27. package/src/layouts/PaymentsLayout/components/CreatePaymentDialog.tsx +1 -0
  28. package/src/layouts/PaymentsLayout/events.ts +2 -0
  29. package/src/layouts/ProfileLayout/ProfileLayout.tsx +1 -0
  30. package/src/layouts/ProfileLayout/components/ProfileForm.tsx +1 -0
  31. package/src/layouts/SimpleLayout/SimpleLayout.tsx +72 -0
  32. package/src/layouts/SimpleLayout/index.ts +3 -0
  33. package/src/layouts/SupportLayout/SupportLayout.tsx +1 -0
  34. package/src/layouts/SupportLayout/components/CreateTicketDialog.tsx +1 -0
  35. package/src/layouts/SupportLayout/components/TicketList.tsx +6 -5
  36. package/src/layouts/SupportLayout/events.ts +2 -0
  37. package/src/layouts/index.ts +1 -3
  38. package/src/snippets/AuthDialog/useAuthDialog.ts +2 -0
  39. package/src/snippets/Chat/components/MessageList.tsx +12 -11
  40. package/src/snippets/Chat/index.tsx +1 -0
  41. package/src/snippets/ContactForm/ContactForm.tsx +7 -2
  42. package/src/snippets/ContactForm/ContactPage.tsx +16 -3
  43. package/src/snippets/VideoPlayer/README.md +35 -0
  44. package/src/snippets/VideoPlayer/VideoControls.tsx +13 -9
  45. package/src/snippets/VideoPlayer/VideoPlayer.tsx +159 -25
  46. package/src/snippets/VideoPlayer/index.ts +1 -1
  47. package/src/validation/utils/curl-generator.ts +5 -1
  48. package/src/layouts/UILayout/README.md +0 -267
  49. package/src/layouts/UILayout/SUMMARY.md +0 -298
  50. package/src/layouts/UILayout/TOOLS_INTEGRATION.md +0 -216
  51. package/src/layouts/UILayout/components/AutoComponentDemo.tsx +0 -77
  52. package/src/layouts/UILayout/components/CategoryRenderer.tsx +0 -45
  53. package/src/layouts/UILayout/components/TailwindGuideRenderer.tsx +0 -138
  54. package/src/layouts/UILayout/components/index.ts +0 -15
  55. package/src/layouts/UILayout/components/layout/Header/CopyAIButton.tsx +0 -58
  56. package/src/layouts/UILayout/components/layout/Header/Header.tsx +0 -60
  57. package/src/layouts/UILayout/components/layout/Header/HeaderDesktop.tsx +0 -51
  58. package/src/layouts/UILayout/components/layout/Header/HeaderMobile.tsx +0 -71
  59. package/src/layouts/UILayout/components/layout/Header/TestValidationButton.tsx +0 -268
  60. package/src/layouts/UILayout/components/layout/Header/index.ts +0 -11
  61. package/src/layouts/UILayout/components/layout/MobileOverlay/MobileOverlay.tsx +0 -47
  62. package/src/layouts/UILayout/components/layout/MobileOverlay/index.ts +0 -6
  63. package/src/layouts/UILayout/components/layout/Sidebar/Sidebar.tsx +0 -95
  64. package/src/layouts/UILayout/components/layout/Sidebar/SidebarCategory.tsx +0 -54
  65. package/src/layouts/UILayout/components/layout/Sidebar/SidebarContent.tsx +0 -93
  66. package/src/layouts/UILayout/components/layout/Sidebar/SidebarFooter.tsx +0 -49
  67. package/src/layouts/UILayout/components/layout/Sidebar/index.ts +0 -9
  68. package/src/layouts/UILayout/components/layout/index.ts +0 -8
  69. package/src/layouts/UILayout/components/shared/Badge/CountBadge.tsx +0 -38
  70. package/src/layouts/UILayout/components/shared/Badge/index.ts +0 -5
  71. package/src/layouts/UILayout/components/shared/CodeBlock/CodeBlock.tsx +0 -48
  72. package/src/layouts/UILayout/components/shared/CodeBlock/CopyButton.tsx +0 -49
  73. package/src/layouts/UILayout/components/shared/CodeBlock/index.ts +0 -6
  74. package/src/layouts/UILayout/components/shared/Section/Section.tsx +0 -63
  75. package/src/layouts/UILayout/components/shared/Section/index.ts +0 -5
  76. package/src/layouts/UILayout/components/shared/index.ts +0 -8
  77. package/src/layouts/UILayout/config/ai-export.config.ts +0 -89
  78. package/src/layouts/UILayout/config/categories.config.tsx +0 -122
  79. package/src/layouts/UILayout/config/components/blocks.config.tsx +0 -239
  80. package/src/layouts/UILayout/config/components/data.config.tsx +0 -433
  81. package/src/layouts/UILayout/config/components/feedback.config.tsx +0 -290
  82. package/src/layouts/UILayout/config/components/forms.config.tsx +0 -996
  83. package/src/layouts/UILayout/config/components/hooks.config.tsx +0 -168
  84. package/src/layouts/UILayout/config/components/index.ts +0 -72
  85. package/src/layouts/UILayout/config/components/layout.config.tsx +0 -246
  86. package/src/layouts/UILayout/config/components/navigation.config.tsx +0 -352
  87. package/src/layouts/UILayout/config/components/overlay.config.tsx +0 -569
  88. package/src/layouts/UILayout/config/components/specialized.config.tsx +0 -400
  89. package/src/layouts/UILayout/config/components/tools.config.tsx +0 -234
  90. package/src/layouts/UILayout/config/components/types.ts +0 -14
  91. package/src/layouts/UILayout/config/index.ts +0 -42
  92. package/src/layouts/UILayout/config/tailwind.config.ts +0 -131
  93. package/src/layouts/UILayout/constants.ts +0 -23
  94. package/src/layouts/UILayout/context/ShowcaseContext.tsx +0 -81
  95. package/src/layouts/UILayout/context/index.ts +0 -1
  96. package/src/layouts/UILayout/core/UIGuideApp.client.tsx +0 -18
  97. package/src/layouts/UILayout/core/UIGuideApp.tsx +0 -33
  98. package/src/layouts/UILayout/core/UIGuideLanding.tsx +0 -172
  99. package/src/layouts/UILayout/core/UIGuideView.tsx +0 -61
  100. package/src/layouts/UILayout/core/UILayout.tsx +0 -125
  101. package/src/layouts/UILayout/core/UILayoutSidebar.tsx +0 -11
  102. package/src/layouts/UILayout/core/index.ts +0 -10
  103. package/src/layouts/UILayout/hooks/index.ts +0 -9
  104. package/src/layouts/UILayout/hooks/useAIExport.ts +0 -78
  105. package/src/layouts/UILayout/hooks/useCategoryNavigation.ts +0 -92
  106. package/src/layouts/UILayout/hooks/useComponentSearch.ts +0 -81
  107. package/src/layouts/UILayout/hooks/useSidebarState.ts +0 -36
  108. package/src/layouts/UILayout/index.ts +0 -160
  109. package/src/layouts/UILayout/types/component.ts +0 -45
  110. package/src/layouts/UILayout/types/index.ts +0 -23
  111. package/src/layouts/UILayout/types/layout.ts +0 -57
  112. package/src/layouts/UILayout/types/navigation.ts +0 -33
  113. package/src/layouts/UILayout/utils/ai-export/formatters.ts +0 -71
  114. package/src/layouts/UILayout/utils/ai-export/index.ts +0 -5
  115. package/src/layouts/UILayout/utils/component-helpers/filter.ts +0 -109
  116. package/src/layouts/UILayout/utils/component-helpers/index.ts +0 -6
  117. package/src/layouts/UILayout/utils/component-helpers/search.ts +0 -95
  118. package/src/layouts/UILayout/utils/index.ts +0 -6
@@ -1,109 +0,0 @@
1
- /**
2
- * Component Filter Utilities
3
- */
4
-
5
- import type { ComponentConfig } from '../../types';
6
-
7
- /**
8
- * Filter options
9
- */
10
- export interface FilterOptions {
11
- /** Category to filter by */
12
- category?: string;
13
- /** Tags to filter by (OR logic) */
14
- tags?: string[];
15
- /** Search query */
16
- query?: string;
17
- /** Search fields */
18
- searchFields?: Array<keyof ComponentConfig>;
19
- }
20
-
21
- /**
22
- * Apply multiple filters to components
23
- */
24
- export function applyFilters(
25
- components: ComponentConfig[],
26
- options: FilterOptions
27
- ): ComponentConfig[] {
28
- let filtered = components;
29
-
30
- // Filter by category
31
- if (options.category) {
32
- filtered = filtered.filter((comp) => comp.category === options.category);
33
- }
34
-
35
- // Filter by tags
36
- if (options.tags && options.tags.length > 0) {
37
- filtered = filtered.filter((comp) => {
38
- if (!comp.tags) return false;
39
- return options.tags!.some((tag) => comp.tags?.includes(tag));
40
- });
41
- }
42
-
43
- // Filter by search query
44
- if (options.query && options.query.trim()) {
45
- const lowerQuery = options.query.toLowerCase();
46
- const searchFields = options.searchFields || [
47
- 'name',
48
- 'description',
49
- 'category',
50
- ];
51
-
52
- filtered = filtered.filter((comp) => {
53
- return searchFields.some((field) => {
54
- const value = comp[field];
55
- if (typeof value === 'string') {
56
- return value.toLowerCase().includes(lowerQuery);
57
- }
58
- if (Array.isArray(value)) {
59
- return value.some((item) =>
60
- String(item).toLowerCase().includes(lowerQuery)
61
- );
62
- }
63
- return false;
64
- });
65
- });
66
- }
67
-
68
- return filtered;
69
- }
70
-
71
- /**
72
- * Sort components by field
73
- */
74
- export function sortComponents(
75
- components: ComponentConfig[],
76
- field: keyof ComponentConfig,
77
- order: 'asc' | 'desc' = 'asc'
78
- ): ComponentConfig[] {
79
- return [...components].sort((a, b) => {
80
- const aVal = String(a[field]);
81
- const bVal = String(b[field]);
82
-
83
- if (order === 'asc') {
84
- return aVal.localeCompare(bVal);
85
- } else {
86
- return bVal.localeCompare(aVal);
87
- }
88
- });
89
- }
90
-
91
- /**
92
- * Group components by field
93
- */
94
- export function groupComponentsBy<K extends keyof ComponentConfig>(
95
- components: ComponentConfig[],
96
- field: K
97
- ): Record<string, ComponentConfig[]> {
98
- return components.reduce(
99
- (acc, comp) => {
100
- const key = String(comp[field]);
101
- if (!acc[key]) {
102
- acc[key] = [];
103
- }
104
- acc[key].push(comp);
105
- return acc;
106
- },
107
- {} as Record<string, ComponentConfig[]>
108
- );
109
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Component Helper Utilities
3
- */
4
-
5
- export * from './search';
6
- export * from './filter';
@@ -1,95 +0,0 @@
1
- /**
2
- * Component Search Utilities
3
- */
4
-
5
- import type { ComponentConfig } from '../../types';
6
-
7
- /**
8
- * Search components by query
9
- */
10
- export function searchComponents(
11
- components: ComponentConfig[],
12
- query: string,
13
- fields: Array<keyof ComponentConfig> = ['name', 'description', 'category']
14
- ): ComponentConfig[] {
15
- if (!query.trim()) {
16
- return components;
17
- }
18
-
19
- const lowerQuery = query.toLowerCase();
20
-
21
- return components.filter((component) => {
22
- return fields.some((field) => {
23
- const value = component[field];
24
- if (typeof value === 'string') {
25
- return value.toLowerCase().includes(lowerQuery);
26
- }
27
- if (Array.isArray(value)) {
28
- return value.some((item) =>
29
- String(item).toLowerCase().includes(lowerQuery)
30
- );
31
- }
32
- return false;
33
- });
34
- });
35
- }
36
-
37
- /**
38
- * Filter components by category
39
- */
40
- export function filterByCategory(
41
- components: ComponentConfig[],
42
- category: string
43
- ): ComponentConfig[] {
44
- return components.filter((comp) => comp.category === category);
45
- }
46
-
47
- /**
48
- * Filter components by tags
49
- */
50
- export function filterByTags(
51
- components: ComponentConfig[],
52
- tags: string[]
53
- ): ComponentConfig[] {
54
- if (tags.length === 0) {
55
- return components;
56
- }
57
-
58
- return components.filter((comp) => {
59
- if (!comp.tags) return false;
60
- return tags.some((tag) => comp.tags?.includes(tag));
61
- });
62
- }
63
-
64
- /**
65
- * Get unique categories from components
66
- */
67
- export function getUniqueCategories(
68
- components: ComponentConfig[]
69
- ): string[] {
70
- const categories = new Set(components.map((c) => c.category));
71
- return Array.from(categories).sort();
72
- }
73
-
74
- /**
75
- * Get unique tags from components
76
- */
77
- export function getUniqueTags(components: ComponentConfig[]): string[] {
78
- const tags = new Set<string>();
79
- components.forEach((comp) => {
80
- comp.tags?.forEach((tag) => tags.add(tag));
81
- });
82
- return Array.from(tags).sort();
83
- }
84
-
85
- /**
86
- * Find component by name
87
- */
88
- export function findComponentByName(
89
- components: ComponentConfig[],
90
- name: string
91
- ): ComponentConfig | undefined {
92
- return components.find(
93
- (comp) => comp.name.toLowerCase() === name.toLowerCase()
94
- );
95
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * UILayout Utilities
3
- */
4
-
5
- export * from './ai-export';
6
- export * from './component-helpers';