@scaleflex/asset-picker 0.2.3 → 0.2.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.
@@ -27,7 +27,8 @@
27
27
  "Bash(find /Users/dmitry_stremous/scaleflex/asset-picker/src -name \"*.ts\" -type f -exec grep -l \"ap-filter-metadata\\\\|metadata.*popover\\\\|MetadataFilter\" {})",
28
28
  "Bash(npm view:*)",
29
29
  "Bash(node:*)",
30
- "Bash(npm pack:*)"
30
+ "Bash(npm pack:*)",
31
+ "Bash(find /Users/dmitry_stremous/scaleflex/asset-picker -name *.test.ts -o -name *.spec.ts)"
31
32
  ]
32
33
  }
33
34
  }
@@ -208,8 +208,10 @@ picker.config = {
208
208
  // Navigation
209
209
  rootFolderPath: '/marketing/', // start in a specific folder
210
210
  tabs: ['assets', 'folders'], // default: both. Use ['assets'] to hide folders tab
211
+ defaultTab: 'assets', // which tab opens first. Defaults to first in `tabs`
211
212
  rememberLastFolder: true, // persist last folder in localStorage
212
213
  rememberLastView: true, // persist grid/list preference
214
+ rememberLastTab: true, // persist last active tab (assets/folders)
213
215
 
214
216
  // Sorting
215
217
  defaultSortBy: 'created_at', // 'name' | 'created_at' | 'modified_at' | 'size' | 'type' | etc.
package/README.md CHANGED
@@ -238,12 +238,14 @@ Use when your application already has a SASS key — e.g. inside the Scaleflex H
238
238
  | `defaultSortBy` | `SortBy` | `'created_at'` | Initial sort field (see table below) |
239
239
  | `defaultSortDirection` | `'asc' \| 'desc'` | `'desc'` | Initial sort direction |
240
240
  | `tabs` | `TabKey[]` | `['assets', 'folders']` | Tabs to show. If only one, the dropdown is hidden |
241
+ | `defaultTab` | `TabKey` | first in `tabs` | Which tab to activate when the picker opens |
241
242
  | `enabledFilters` | `FilterKey[]` | all | Restrict which filters appear in the toolbar |
242
243
  | `rootFolderPath` | `string` | `'/'` | Start browsing from a specific folder path (e.g. `'/marketing/banners/'`) |
243
244
  | `showMetadata` | `boolean` | `true` | Show metadata sections in the preview panel |
244
245
  | `brandColor` | `string` | from API | Brand accent colour as hex (e.g. `'#3b82f6'`). Overrides the API-fetched value |
245
246
  | `rememberLastFolder` | `boolean` | `false` | Persist the last browsed folder and restore on next open |
246
247
  | `rememberLastView` | `boolean` | `false` | Persist the last used view mode (grid/list) and restore on next open |
248
+ | `rememberLastTab` | `boolean` | `false` | Persist the last active tab (assets/folders) and restore on next open |
247
249
  | `defaultFilters` | `FiltersInput` | `undefined` | Filters pre-applied on open. User can modify/remove |
248
250
  | `forcedFilters` | `FiltersInput` | `undefined` | Filters always active. Shown as locked chips the user cannot remove |
249
251
  | `onSelect` | `(assets: Asset[]) => void` | `undefined` | Callback when assets are selected |