@memberjunction/ng-file-storage 6.2.0-edge.0 → 6.2.0-edge.2

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 (36) hide show
  1. package/dist/lib/admin/storage-admin-dialog.component.d.ts +1 -1
  2. package/dist/lib/admin/storage-admin-dialog.component.js +2 -2
  3. package/dist/lib/admin/storage-admin-dialog.component.js.map +1 -1
  4. package/dist/lib/category-tree/category-tree.d.ts +83 -9
  5. package/dist/lib/category-tree/category-tree.d.ts.map +1 -1
  6. package/dist/lib/category-tree/category-tree.js +192 -50
  7. package/dist/lib/category-tree/category-tree.js.map +1 -1
  8. package/dist/lib/file-browser/file-browser.component.d.ts +30 -4
  9. package/dist/lib/file-browser/file-browser.component.d.ts.map +1 -1
  10. package/dist/lib/file-browser/file-browser.component.js +68 -16
  11. package/dist/lib/file-browser/file-browser.component.js.map +1 -1
  12. package/dist/lib/file-browser/file-grid.component.d.ts +404 -58
  13. package/dist/lib/file-browser/file-grid.component.d.ts.map +1 -1
  14. package/dist/lib/file-browser/file-grid.component.js +1040 -396
  15. package/dist/lib/file-browser/file-grid.component.js.map +1 -1
  16. package/dist/lib/file-browser/folder-tree.component.d.ts +65 -9
  17. package/dist/lib/file-browser/folder-tree.component.d.ts.map +1 -1
  18. package/dist/lib/file-browser/folder-tree.component.js +166 -58
  19. package/dist/lib/file-browser/folder-tree.component.js.map +1 -1
  20. package/dist/lib/file-browser/storage-providers-list.component.d.ts +55 -7
  21. package/dist/lib/file-browser/storage-providers-list.component.d.ts.map +1 -1
  22. package/dist/lib/file-browser/storage-providers-list.component.js +124 -34
  23. package/dist/lib/file-browser/storage-providers-list.component.js.map +1 -1
  24. package/dist/lib/file-upload/file-upload.d.ts +22 -2
  25. package/dist/lib/file-upload/file-upload.d.ts.map +1 -1
  26. package/dist/lib/file-upload/file-upload.js +40 -10
  27. package/dist/lib/file-upload/file-upload.js.map +1 -1
  28. package/dist/lib/files-grid/files-grid.d.ts +28 -4
  29. package/dist/lib/files-grid/files-grid.d.ts.map +1 -1
  30. package/dist/lib/files-grid/files-grid.js +71 -23
  31. package/dist/lib/files-grid/files-grid.js.map +1 -1
  32. package/dist/lib/record-attachments/record-attachments.component.d.ts +15 -7
  33. package/dist/lib/record-attachments/record-attachments.component.d.ts.map +1 -1
  34. package/dist/lib/record-attachments/record-attachments.component.js +34 -18
  35. package/dist/lib/record-attachments/record-attachments.component.js.map +1 -1
  36. package/package.json +13 -13
@@ -22,44 +22,88 @@ export class FileBrowserComponent {
22
22
  /**
23
23
  * Reference to the folder tree component for programmatic navigation
24
24
  */
25
- folderTree;
25
+ FolderTree;
26
+ /** @deprecated Use {@link FolderTree}. */
27
+ get folderTree() {
28
+ return this.FolderTree;
29
+ }
30
+ /** @deprecated Use {@link FolderTree}. */
31
+ set folderTree(value) {
32
+ this.FolderTree = value;
33
+ }
26
34
  /**
27
35
  * Controls manual collapse of the sidebar (toggle button on mobile).
28
36
  * CSS media queries handle the responsive layout automatically.
29
37
  */
30
- isSidebarCollapsed = false;
38
+ IsSidebarCollapsed = false;
39
+ /** @deprecated Use {@link IsSidebarCollapsed}. */
40
+ get isSidebarCollapsed() {
41
+ return this.IsSidebarCollapsed;
42
+ }
43
+ /** @deprecated Use {@link IsSidebarCollapsed}. */
44
+ set isSidebarCollapsed(value) {
45
+ this.IsSidebarCollapsed = value;
46
+ }
31
47
  /**
32
48
  * Currently selected storage account with its provider details.
33
49
  */
34
- selectedAccount = null;
50
+ SelectedAccount = null;
51
+ /** @deprecated Use {@link SelectedAccount}. */
52
+ get selectedAccount() {
53
+ return this.SelectedAccount;
54
+ }
55
+ /** @deprecated Use {@link SelectedAccount}. */
56
+ set selectedAccount(value) {
57
+ this.SelectedAccount = value;
58
+ }
35
59
  /**
36
60
  * Currently selected folder path in the tree.
37
61
  */
38
- selectedFolderPath = '/';
62
+ SelectedFolderPath = '/';
63
+ /** @deprecated Use {@link SelectedFolderPath}. */
64
+ get selectedFolderPath() {
65
+ return this.SelectedFolderPath;
66
+ }
67
+ /** @deprecated Use {@link SelectedFolderPath}. */
68
+ set selectedFolderPath(value) {
69
+ this.SelectedFolderPath = value;
70
+ }
39
71
  constructor() { }
40
72
  /**
41
73
  * Toggles the visibility of the accounts sidebar.
42
74
  * Used for manual toggle on mobile devices.
43
75
  */
76
+ ToggleSidebar() {
77
+ this.IsSidebarCollapsed = !this.IsSidebarCollapsed;
78
+ }
79
+ /** @deprecated Use {@link ToggleSidebar}. */
44
80
  toggleSidebar() {
45
- this.isSidebarCollapsed = !this.isSidebarCollapsed;
81
+ return this.ToggleSidebar();
46
82
  }
47
83
  /**
48
84
  * Handles storage account selection from the sidebar.
49
85
  *
50
86
  * @param accountWithProvider - The selected storage account with provider details, or null if no accounts available
51
87
  */
88
+ OnAccountSelected(accountWithProvider) {
89
+ this.SelectedAccount = accountWithProvider;
90
+ this.SelectedFolderPath = '/'; // Reset to root when switching accounts
91
+ }
92
+ /** @deprecated Use {@link OnAccountSelected}. */
52
93
  onAccountSelected(accountWithProvider) {
53
- this.selectedAccount = accountWithProvider;
54
- this.selectedFolderPath = '/'; // Reset to root when switching accounts
94
+ return this.OnAccountSelected(accountWithProvider);
55
95
  }
56
96
  /**
57
97
  * Handles folder selection from the tree navigation.
58
98
  *
59
99
  * @param folderPath - The full path of the selected folder
60
100
  */
101
+ OnFolderSelected(folderPath) {
102
+ this.SelectedFolderPath = folderPath;
103
+ }
104
+ /** @deprecated Use {@link OnFolderSelected}. */
61
105
  onFolderSelected(folderPath) {
62
- this.selectedFolderPath = folderPath;
106
+ return this.OnFolderSelected(folderPath);
63
107
  }
64
108
  /**
65
109
  * Handles folder navigation from the file grid (double-click on folder).
@@ -67,28 +111,36 @@ export class FileBrowserComponent {
67
111
  *
68
112
  * @param folderPath - The full path of the folder to navigate to
69
113
  */
70
- onFolderNavigate(folderPath) {
71
- if (this.folderTree) {
72
- this.folderTree.navigateToPath(folderPath);
114
+ OnFolderNavigate(folderPath) {
115
+ if (this.FolderTree) {
116
+ this.FolderTree.navigateToPath(folderPath);
73
117
  }
74
118
  }
119
+ /** @deprecated Use {@link OnFolderNavigate}. */
120
+ onFolderNavigate(folderPath) {
121
+ return this.OnFolderNavigate(folderPath);
122
+ }
75
123
  /**
76
124
  * Handles folder structure changes (e.g., new folder created, folder deleted).
77
125
  * Refreshes the folder tree to show the new structure.
78
126
  */
79
- onFolderStructureChanged() {
80
- if (this.folderTree) {
127
+ OnFolderStructureChanged() {
128
+ if (this.FolderTree) {
81
129
  // Trigger a refresh of the folder tree without changing navigation
82
130
  // This will reload the folders at the current location
83
- this.folderTree.refresh();
131
+ this.FolderTree.refresh();
84
132
  }
85
133
  }
134
+ /** @deprecated Use {@link OnFolderStructureChanged}. */
135
+ onFolderStructureChanged() {
136
+ return this.OnFolderStructureChanged();
137
+ }
86
138
  static ɵfac = function FileBrowserComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FileBrowserComponent)(); };
87
139
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileBrowserComponent, selectors: [["mj-file-browser"]], viewQuery: function FileBrowserComponent_Query(rf, ctx) { if (rf & 1) {
88
140
  i0.ɵɵviewQuery(FolderTreeComponent, 5);
89
141
  } if (rf & 2) {
90
142
  let _t;
91
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.folderTree = _t.first);
143
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.FolderTree = _t.first);
92
144
  } }, standalone: false, decls: 22, vars: 5, consts: [[1, "file-browser"], [1, "mobile-header"], [1, "sidebar-toggle", 3, "click"], [1, "fa-solid", "fa-bars"], [1, "browser-title"], [1, "browser-container"], [1, "sidebar"], [1, "sidebar-section"], [1, "section-header"], [1, "section-content"], [3, "accountSelected"], [3, "folderSelected", "account"], [1, "main-panel"], [3, "folderNavigate", "folderStructureChanged", "account", "folderPath"]], template: function FileBrowserComponent_Template(rf, ctx) { if (rf & 1) {
93
145
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "button", 2);
94
146
  i0.ɵɵlistener("click", function FileBrowserComponent_Template_button_click_2_listener() { return ctx.toggleSidebar(); });
@@ -124,7 +176,7 @@ export class FileBrowserComponent {
124
176
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileBrowserComponent, [{
125
177
  type: Component,
126
178
  args: [{ standalone: false, selector: 'mj-file-browser', template: "<div class=\"file-browser\">\n <!-- Mobile header with sidebar toggle -->\n <div class=\"mobile-header\">\n <button (click)=\"toggleSidebar()\" class=\"sidebar-toggle\">\n <i class=\"fa-solid fa-bars\"></i>\n </button>\n <h2 class=\"browser-title\">File Browser</h2>\n </div>\n\n <!-- Main two-panel layout -->\n <div class=\"browser-container\">\n <!-- Left Sidebar: Accounts + Categories -->\n <div class=\"sidebar\" [class.collapsed]=\"isSidebarCollapsed\">\n <!-- Accounts Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>ACCOUNTS</h3>\n </div>\n <div class=\"section-content\">\n <mj-storage-providers-list\n (accountSelected)=\"onAccountSelected($event)\"\n ></mj-storage-providers-list>\n </div>\n </div>\n\n <!-- Categories Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>FOLDERS</h3>\n </div>\n <div class=\"section-content\">\n <mj-folder-tree\n [account]=\"selectedAccount\"\n (folderSelected)=\"onFolderSelected($event)\"\n ></mj-folder-tree>\n </div>\n </div>\n </div>\n\n <!-- Right Panel: File Grid -->\n <div class=\"main-panel\">\n <mj-file-grid\n [account]=\"selectedAccount\"\n [folderPath]=\"selectedFolderPath\"\n (folderNavigate)=\"onFolderNavigate($event)\"\n (folderStructureChanged)=\"onFolderStructureChanged()\"\n ></mj-file-grid>\n </div>\n </div>\n</div>\n", styles: ["/* ==========================================================================\n File Browser Shell Component\n Modern macOS Finder / Cloud Storage multi-panel layout\n ========================================================================== */\n\n:host {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.file-browser {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n background-color: var(--mj-bg-surface);\n border: none;\n border-radius: 0;\n overflow: hidden;\n box-shadow: none;\n}\n\n/* Mobile Header */\n.mobile-header {\n display: none;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n background-color: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mobile-header .browser-title {\n margin: 0;\n font-size: 0.95rem;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.sidebar-toggle {\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n color: var(--mj-text-secondary);\n padding: 6px 10px;\n cursor: pointer;\n border-radius: var(--mj-radius-sm, 6px);\n font-size: 0.85rem;\n transition: all 0.15s ease;\n}\n\n.sidebar-toggle:hover {\n background-color: color-mix(in srgb, var(--mj-text-primary) 6%, var(--mj-bg-surface));\n color: var(--mj-text-primary);\n}\n\n/* Main Container - Two Panel Layout */\n.browser-container {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n/* Left Sidebar: Accounts & Folders */\n.sidebar {\n display: flex;\n flex-direction: column;\n background-color: var(--mj-bg-surface-sunken, color-mix(in srgb, var(--mj-text-primary) 2%, var(--mj-bg-surface)));\n border-right: 1px solid var(--mj-border-default);\n width: 250px;\n min-width: 250px;\n max-width: 250px;\n overflow: hidden;\n transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease, opacity 0.2s ease;\n z-index: 10;\n}\n\n.sidebar.collapsed {\n width: 0;\n min-width: 0;\n border-right: none;\n opacity: 0;\n pointer-events: none;\n}\n\n/* Sidebar Sections */\n.sidebar-section {\n display: flex;\n flex-direction: column;\n min-height: 180px;\n max-height: 48%;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.sidebar-section:last-child {\n flex: 1;\n max-height: none;\n border-bottom: none;\n}\n\n.section-header {\n padding: 8px 14px;\n background-color: transparent;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.section-header h3 {\n margin: 0;\n font-size: 0.7rem;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n\n.section-content {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Right Main Panel: File Grid & Command Bar */\n.main-panel {\n flex: 1;\n background-color: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-width: 0;\n}\n\n/* Custom Scrollbar Styling */\n.section-content::-webkit-scrollbar {\n width: 5px;\n}\n\n.section-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.section-content::-webkit-scrollbar-thumb {\n background: var(--mj-border-default);\n border-radius: 4px;\n}\n\n.section-content::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-muted);\n}\n\n/* ==========================================================================\n Responsive Design\n ========================================================================== */\n\n/* Tablet (768px - 1024px) */\n@media screen and (max-width: 1024px) {\n .sidebar {\n width: 220px;\n min-width: 220px;\n max-width: 220px;\n }\n}\n\n/* Mobile (below 768px) */\n@media screen and (max-width: 768px) {\n .mobile-header {\n display: flex;\n }\n\n .browser-container {\n flex-direction: column;\n }\n\n .sidebar {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 270px;\n min-width: 270px;\n max-width: 270px;\n z-index: 1000;\n box-shadow: var(--mj-shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.2));\n background-color: var(--mj-bg-surface);\n }\n\n .sidebar.collapsed {\n transform: translateX(-100%);\n }\n\n .main-panel {\n flex: 1;\n }\n}\n"] }]
127
- }], () => [], { folderTree: [{
179
+ }], () => [], { FolderTree: [{
128
180
  type: ViewChild,
129
181
  args: [FolderTreeComponent]
130
182
  }] }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"file-browser.component.js","sourceRoot":"","sources":["../../../src/lib/file-browser/file-browser.component.ts","../../../src/lib/file-browser/file-browser.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,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ACvC;YASE,AADF,AADF,AAFF,AAFF,8BAA+B,aAE+B,aAE7B,aACC,UACtB;YAAA,yBAAQ;YACd,AADc,iBAAK,EACb;YAEJ,AADF,+BAA6B,qCAG1B;YADC,+IAAmB,6BAAyB,IAAC;YAGnD,AADE,AADG,iBAA4B,EACzB,EACF;YAKF,AADF,AADF,+BAA6B,cACC,UACtB;YAAA,wBAAO;YACb,AADa,iBAAK,EACZ;YAEJ,AADF,+BAA6B,0BAI1B;YADC,kIAAkB,4BAAwB,IAAC;YAInD,AADE,AADE,AADG,iBAAiB,EACd,EACF,EACF;YAIJ,AADF,gCAAwB,wBAMrB;YADC,AADA,gIAAkB,4BAAwB,IAAC,6HACjB,8BAA0B,IAAC;YAI7D,AADE,AADE,AADG,iBAAe,EACZ,EACF,EACF;;YArCmB,eAAsC;YAAtC,mDAAsC;YAoBnD,gBAA2B;YAA3B,6CAA2B;YAU/B,eAA2B;YAC3B,AADA,6CAA2B,sCACM;;;iFDnB5B,oBAAoB;cANhC,SAAS;6BACI,KAAK,YACP,iBAAiB;;kBAQ1B,SAAS;mBAAC,mBAAmB;;kFAJnB,oBAAoB","sourcesContent":["import { Component, ViewChild } from '@angular/core';\nimport { FolderTreeComponent } from './folder-tree.component';\nimport { StorageAccountWithProvider } from '@memberjunction/core-entities';\n\n/**\n * Mac Finder-style file browser component with three-panel layout.\n *\n * Layout:\n * - Left sidebar: Storage account selection\n * - Middle panel: Folder tree navigation\n * - Right panel: File grid with current folder contents\n *\n * In the enterprise model, users select from organizational storage accounts\n * rather than connecting their own OAuth credentials.\n *\n * Features responsive design with collapsible sidebar for mobile devices.\n * Responsive layout is handled via CSS media queries.\n */\n@Component({\n standalone: false,\n selector: 'mj-file-browser',\n templateUrl: './file-browser.component.html',\n styleUrls: ['./file-browser.component.css'],\n})\nexport class FileBrowserComponent {\n /**\n * Reference to the folder tree component for programmatic navigation\n */\n @ViewChild(FolderTreeComponent) folderTree!: FolderTreeComponent;\n\n /**\n * Controls manual collapse of the sidebar (toggle button on mobile).\n * CSS media queries handle the responsive layout automatically.\n */\n public isSidebarCollapsed: boolean = false;\n\n /**\n * Currently selected storage account with its provider details.\n */\n public selectedAccount: StorageAccountWithProvider | null = null;\n\n /**\n * Currently selected folder path in the tree.\n */\n public selectedFolderPath: string = '/';\n\n constructor() {}\n\n /**\n * Toggles the visibility of the accounts sidebar.\n * Used for manual toggle on mobile devices.\n */\n public toggleSidebar(): void {\n this.isSidebarCollapsed = !this.isSidebarCollapsed;\n }\n\n /**\n * Handles storage account selection from the sidebar.\n *\n * @param accountWithProvider - The selected storage account with provider details, or null if no accounts available\n */\n public onAccountSelected(accountWithProvider: StorageAccountWithProvider | null): void {\n this.selectedAccount = accountWithProvider;\n this.selectedFolderPath = '/'; // Reset to root when switching accounts\n }\n\n /**\n * Handles folder selection from the tree navigation.\n *\n * @param folderPath - The full path of the selected folder\n */\n public onFolderSelected(folderPath: string): void {\n this.selectedFolderPath = folderPath;\n }\n\n /**\n * Handles folder navigation from the file grid (double-click on folder).\n * Updates the folder tree to navigate to the selected folder.\n *\n * @param folderPath - The full path of the folder to navigate to\n */\n public onFolderNavigate(folderPath: string): void {\n if (this.folderTree) {\n this.folderTree.navigateToPath(folderPath);\n }\n }\n\n /**\n * Handles folder structure changes (e.g., new folder created, folder deleted).\n * Refreshes the folder tree to show the new structure.\n */\n public onFolderStructureChanged(): void {\n if (this.folderTree) {\n // Trigger a refresh of the folder tree without changing navigation\n // This will reload the folders at the current location\n this.folderTree.refresh();\n }\n }\n}\n","<div class=\"file-browser\">\n <!-- Mobile header with sidebar toggle -->\n <div class=\"mobile-header\">\n <button (click)=\"toggleSidebar()\" class=\"sidebar-toggle\">\n <i class=\"fa-solid fa-bars\"></i>\n </button>\n <h2 class=\"browser-title\">File Browser</h2>\n </div>\n\n <!-- Main two-panel layout -->\n <div class=\"browser-container\">\n <!-- Left Sidebar: Accounts + Categories -->\n <div class=\"sidebar\" [class.collapsed]=\"isSidebarCollapsed\">\n <!-- Accounts Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>ACCOUNTS</h3>\n </div>\n <div class=\"section-content\">\n <mj-storage-providers-list\n (accountSelected)=\"onAccountSelected($event)\"\n ></mj-storage-providers-list>\n </div>\n </div>\n\n <!-- Categories Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>FOLDERS</h3>\n </div>\n <div class=\"section-content\">\n <mj-folder-tree\n [account]=\"selectedAccount\"\n (folderSelected)=\"onFolderSelected($event)\"\n ></mj-folder-tree>\n </div>\n </div>\n </div>\n\n <!-- Right Panel: File Grid -->\n <div class=\"main-panel\">\n <mj-file-grid\n [account]=\"selectedAccount\"\n [folderPath]=\"selectedFolderPath\"\n (folderNavigate)=\"onFolderNavigate($event)\"\n (folderStructureChanged)=\"onFolderStructureChanged()\"\n ></mj-file-grid>\n </div>\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"file-browser.component.js","sourceRoot":"","sources":["../../../src/lib/file-browser/file-browser.component.ts","../../../src/lib/file-browser/file-browser.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;;;;;AAG9D;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IAC6B,UAAU,CAAuB;IAEjE,0CAA0C;IAC1C,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,0CAA0C;IAC1C,IAAI,UAAU,CAAC,KAA0B;QACvC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,kBAAkB,GAAY,KAAK,CAAC;IAE3C,kDAAkD;IAClD,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IACD,kDAAkD;IAClD,IAAW,kBAAkB,CAAC,KAAc;QA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D,gBAA2B;YAA3B,6CAA2B;YAU/B,eAA2B;YAC3B,AADA,6CAA2B,sCACM;;;iFDnB5B,oBAAoB;cANhC,SAAS;6BACI,KAAK,YACP,iBAAiB;;kBAQ1B,SAAS;mBAAC,mBAAmB;;kFAJnB,oBAAoB","sourcesContent":["import { Component, ViewChild } from '@angular/core';\nimport { FolderTreeComponent } from './folder-tree.component';\nimport { StorageAccountWithProvider } from '@memberjunction/core-entities';\n\n/**\n * Mac Finder-style file browser component with three-panel layout.\n *\n * Layout:\n * - Left sidebar: Storage account selection\n * - Middle panel: Folder tree navigation\n * - Right panel: File grid with current folder contents\n *\n * In the enterprise model, users select from organizational storage accounts\n * rather than connecting their own OAuth credentials.\n *\n * Features responsive design with collapsible sidebar for mobile devices.\n * Responsive layout is handled via CSS media queries.\n */\n@Component({\n standalone: false,\n selector: 'mj-file-browser',\n templateUrl: './file-browser.component.html',\n styleUrls: ['./file-browser.component.css'],\n})\nexport class FileBrowserComponent {\n /**\n * Reference to the folder tree component for programmatic navigation\n */\n @ViewChild(FolderTreeComponent) FolderTree!: FolderTreeComponent;\n\n /** @deprecated Use {@link FolderTree}. */\n get folderTree(): FolderTreeComponent {\n return this.FolderTree;\n }\n /** @deprecated Use {@link FolderTree}. */\n set folderTree(value: FolderTreeComponent) {\n this.FolderTree = value;\n }\n\n /**\n * Controls manual collapse of the sidebar (toggle button on mobile).\n * CSS media queries handle the responsive layout automatically.\n */\n public IsSidebarCollapsed: boolean = false;\n\n /** @deprecated Use {@link IsSidebarCollapsed}. */\n public get isSidebarCollapsed(): boolean {\n return this.IsSidebarCollapsed;\n }\n /** @deprecated Use {@link IsSidebarCollapsed}. */\n public set isSidebarCollapsed(value: boolean) {\n this.IsSidebarCollapsed = value;\n }\n\n /**\n * Currently selected storage account with its provider details.\n */\n public SelectedAccount: StorageAccountWithProvider | null = null;\n\n /** @deprecated Use {@link SelectedAccount}. */\n public get selectedAccount(): StorageAccountWithProvider | null {\n return this.SelectedAccount;\n }\n /** @deprecated Use {@link SelectedAccount}. */\n public set selectedAccount(value: StorageAccountWithProvider | null) {\n this.SelectedAccount = value;\n }\n\n /**\n * Currently selected folder path in the tree.\n */\n public SelectedFolderPath: string = '/';\n\n /** @deprecated Use {@link SelectedFolderPath}. */\n public get selectedFolderPath(): string {\n return this.SelectedFolderPath;\n }\n /** @deprecated Use {@link SelectedFolderPath}. */\n public set selectedFolderPath(value: string) {\n this.SelectedFolderPath = value;\n }\n\n constructor() {}\n\n /**\n * Toggles the visibility of the accounts sidebar.\n * Used for manual toggle on mobile devices.\n */\n public ToggleSidebar(): void {\n this.IsSidebarCollapsed = !this.IsSidebarCollapsed;\n }\n\n /** @deprecated Use {@link ToggleSidebar}. */\n public toggleSidebar(): void {\n return this.ToggleSidebar();\n }\n\n /**\n * Handles storage account selection from the sidebar.\n *\n * @param accountWithProvider - The selected storage account with provider details, or null if no accounts available\n */\n public OnAccountSelected(accountWithProvider: StorageAccountWithProvider | null): void {\n this.SelectedAccount = accountWithProvider;\n this.SelectedFolderPath = '/'; // Reset to root when switching accounts\n }\n\n /** @deprecated Use {@link OnAccountSelected}. */\n public onAccountSelected(accountWithProvider: StorageAccountWithProvider | null): void {\n return this.OnAccountSelected(accountWithProvider);\n }\n\n /**\n * Handles folder selection from the tree navigation.\n *\n * @param folderPath - The full path of the selected folder\n */\n public OnFolderSelected(folderPath: string): void {\n this.SelectedFolderPath = folderPath;\n }\n\n /** @deprecated Use {@link OnFolderSelected}. */\n public onFolderSelected(folderPath: string): void {\n return this.OnFolderSelected(folderPath);\n }\n\n /**\n * Handles folder navigation from the file grid (double-click on folder).\n * Updates the folder tree to navigate to the selected folder.\n *\n * @param folderPath - The full path of the folder to navigate to\n */\n public OnFolderNavigate(folderPath: string): void {\n if (this.FolderTree) {\n this.FolderTree.navigateToPath(folderPath);\n }\n }\n\n /** @deprecated Use {@link OnFolderNavigate}. */\n public onFolderNavigate(folderPath: string): void {\n return this.OnFolderNavigate(folderPath);\n }\n\n /**\n * Handles folder structure changes (e.g., new folder created, folder deleted).\n * Refreshes the folder tree to show the new structure.\n */\n public OnFolderStructureChanged(): void {\n if (this.FolderTree) {\n // Trigger a refresh of the folder tree without changing navigation\n // This will reload the folders at the current location\n this.FolderTree.refresh();\n }\n }\n\n /** @deprecated Use {@link OnFolderStructureChanged}. */\n public onFolderStructureChanged(): void {\n return this.OnFolderStructureChanged();\n }\n}\n","<div class=\"file-browser\">\n <!-- Mobile header with sidebar toggle -->\n <div class=\"mobile-header\">\n <button (click)=\"toggleSidebar()\" class=\"sidebar-toggle\">\n <i class=\"fa-solid fa-bars\"></i>\n </button>\n <h2 class=\"browser-title\">File Browser</h2>\n </div>\n\n <!-- Main two-panel layout -->\n <div class=\"browser-container\">\n <!-- Left Sidebar: Accounts + Categories -->\n <div class=\"sidebar\" [class.collapsed]=\"isSidebarCollapsed\">\n <!-- Accounts Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>ACCOUNTS</h3>\n </div>\n <div class=\"section-content\">\n <mj-storage-providers-list\n (accountSelected)=\"onAccountSelected($event)\"\n ></mj-storage-providers-list>\n </div>\n </div>\n\n <!-- Categories Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\">\n <h3>FOLDERS</h3>\n </div>\n <div class=\"section-content\">\n <mj-folder-tree\n [account]=\"selectedAccount\"\n (folderSelected)=\"onFolderSelected($event)\"\n ></mj-folder-tree>\n </div>\n </div>\n </div>\n\n <!-- Right Panel: File Grid -->\n <div class=\"main-panel\">\n <mj-file-grid\n [account]=\"selectedAccount\"\n [folderPath]=\"selectedFolderPath\"\n (folderNavigate)=\"onFolderNavigate($event)\"\n (folderStructureChanged)=\"onFolderStructureChanged()\"\n ></mj-file-grid>\n </div>\n </div>\n</div>\n"]}