@brftech/filex-core 0.40.0 → 0.41.0

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 (124) hide show
  1. package/README.md +32 -25
  2. package/dist/ArchiveViewer-BNqukFg8.js +124 -0
  3. package/dist/ArchiveViewer-BNqukFg8.js.map +1 -0
  4. package/dist/CsvViewer-ii_-MgmG.js +141 -0
  5. package/dist/CsvViewer-ii_-MgmG.js.map +1 -0
  6. package/dist/{DrawioViewer-BNALOB04.js → DrawioViewer-B2tuu4rX.js} +48 -42
  7. package/dist/DrawioViewer-B2tuu4rX.js.map +1 -0
  8. package/dist/EpubViewer-p4B8iiWb.js +163 -0
  9. package/dist/EpubViewer-p4B8iiWb.js.map +1 -0
  10. package/dist/IpynbViewer-D_qYRJhu.js +184 -0
  11. package/dist/IpynbViewer-D_qYRJhu.js.map +1 -0
  12. package/dist/MermaidViewer-3ZkfNM8v.js +137 -0
  13. package/dist/MermaidViewer-3ZkfNM8v.js.map +1 -0
  14. package/dist/PsdViewer-CuV-OPSd.js +122 -0
  15. package/dist/PsdViewer-CuV-OPSd.js.map +1 -0
  16. package/dist/TiffViewer-BLeoF4Be.js +142 -0
  17. package/dist/TiffViewer-BLeoF4Be.js.map +1 -0
  18. package/dist/Viewer3D-DHhhU76E.js +75 -0
  19. package/dist/Viewer3D-DHhhU76E.js.map +1 -0
  20. package/dist/filex-core.js +218 -20361
  21. package/dist/filex-core.js.map +1 -1
  22. package/dist/filex-core.umd.cjs +61 -62
  23. package/dist/filex-core.umd.cjs.map +1 -1
  24. package/dist/index-BraG7Cz4.js +26664 -0
  25. package/dist/index-BraG7Cz4.js.map +1 -0
  26. package/dist/index.d.ts +4243 -858
  27. package/dist/style.css +1 -1
  28. package/package.json +1 -1
  29. package/src/FileExplorer.vue +2154 -506
  30. package/src/components/AdvancedSearch.vue +870 -0
  31. package/src/components/Breadcrumb.vue +191 -19
  32. package/src/components/CommandPalette.vue +66 -22
  33. package/src/components/ConnectionsPanel.vue +6 -2
  34. package/src/components/ContextMenu.vue +39 -2
  35. package/src/components/EncryptedFolderModal.vue +31 -25
  36. package/src/components/FilePane.vue +939 -0
  37. package/src/components/FilterBar.vue +568 -72
  38. package/src/components/GalleryView.vue +162 -30
  39. package/src/components/GridView.vue +322 -58
  40. package/src/components/HomeView.vue +331 -0
  41. package/src/components/InspectorPanel.vue +296 -53
  42. package/src/components/ListView.vue +1158 -167
  43. package/src/components/NFSExportsPanel.vue +7 -4
  44. package/src/components/OnboardingTour.vue +156 -33
  45. package/src/components/QuickLook.vue +26 -1
  46. package/src/components/RecentlyOpened.vue +17 -2
  47. package/src/components/S3KeysPanel.vue +7 -4
  48. package/src/components/SSHKeysPanel.vue +7 -4
  49. package/src/components/ShortcutSettings.vue +6 -2
  50. package/src/components/ShortcutsHelp.vue +4 -1
  51. package/src/components/SideNav.vue +206 -140
  52. package/src/components/StorageFields.vue +19 -1
  53. package/src/components/TabBar.vue +87 -1
  54. package/src/components/TagPicker.vue +77 -6
  55. package/src/components/ThemeGallery.vue +13 -198
  56. package/src/components/ThemePalette.vue +244 -0
  57. package/src/components/TimeZoneDialog.vue +127 -0
  58. package/src/components/TimeZonePicker.vue +696 -0
  59. package/src/components/TokensPanel.vue +16 -4
  60. package/src/components/Toolbar.vue +953 -465
  61. package/src/components/ViewSwitcher.vue +9 -4
  62. package/src/composables/useConnections.ts +35 -4
  63. package/src/composables/useExplorerTimeZone.ts +85 -0
  64. package/src/composables/useFileApi.ts +53 -4
  65. package/src/composables/useLocale.ts +365 -25
  66. package/src/index.ts +177 -3
  67. package/src/lib/actionIcons.ts +330 -0
  68. package/src/lib/advSearch.ts +162 -0
  69. package/src/lib/dateGroups.ts +197 -0
  70. package/src/lib/destinationTree.ts +235 -0
  71. package/src/lib/downloadSelection.ts +154 -0
  72. package/src/lib/fileFilters.ts +319 -12
  73. package/src/lib/fileIcons.ts +299 -5
  74. package/src/lib/filePreview.ts +605 -0
  75. package/src/lib/listing.ts +72 -0
  76. package/src/lib/shareTtl.ts +11 -1
  77. package/src/lib/sortOrder.ts +459 -0
  78. package/src/lib/themes.ts +151 -116
  79. package/src/lib/timezone.ts +456 -0
  80. package/src/lib/uiProfile.ts +82 -0
  81. package/src/lib/viewPrefs.ts +1036 -0
  82. package/src/locales/en.ts +414 -26
  83. package/src/locales/tr.ts +407 -26
  84. package/src/modals/ConvertModal.vue +23 -3
  85. package/src/modals/DestinationPickerModal.vue +341 -0
  86. package/src/modals/Modal.vue +18 -4
  87. package/src/modals/NewDocumentModal.vue +525 -0
  88. package/src/modals/NewFolderModal.vue +15 -9
  89. package/src/modals/PermissionsModal.vue +543 -473
  90. package/src/modals/PreviewModal.vue +516 -156
  91. package/src/styles/base.css +5409 -8
  92. package/src/styles/variables.css +139 -65
  93. package/src/types/Connections.ts +9 -0
  94. package/src/types/ExplorerConfig.ts +144 -39
  95. package/src/types/FileNode.ts +28 -0
  96. package/src/viewers/ArchiveViewer.vue +46 -8
  97. package/src/viewers/CsvViewer.vue +19 -2
  98. package/src/viewers/DrawioViewer.vue +12 -1
  99. package/src/viewers/EpubViewer.vue +50 -6
  100. package/src/viewers/IpynbViewer.vue +19 -2
  101. package/src/viewers/MermaidViewer.vue +20 -3
  102. package/src/viewers/PdfViewer.vue +24 -4
  103. package/src/viewers/PsdViewer.vue +28 -4
  104. package/src/viewers/TiffViewer.vue +19 -2
  105. package/src/viewers/Viewer3D.vue +36 -2
  106. package/dist/ArchiveViewer-Cdfv9LFC.js +0 -99
  107. package/dist/ArchiveViewer-Cdfv9LFC.js.map +0 -1
  108. package/dist/CsvViewer-CqWeV8VO.js +0 -131
  109. package/dist/CsvViewer-CqWeV8VO.js.map +0 -1
  110. package/dist/DrawioViewer-BNALOB04.js.map +0 -1
  111. package/dist/EpubViewer-BPmlImG7.js +0 -145
  112. package/dist/EpubViewer-BPmlImG7.js.map +0 -1
  113. package/dist/IpynbViewer-CDlQmuCV.js +0 -175
  114. package/dist/IpynbViewer-CDlQmuCV.js.map +0 -1
  115. package/dist/MermaidViewer-sfZWdR-d.js +0 -127
  116. package/dist/MermaidViewer-sfZWdR-d.js.map +0 -1
  117. package/dist/PsdViewer-DwuySZsb.js +0 -112
  118. package/dist/PsdViewer-DwuySZsb.js.map +0 -1
  119. package/dist/TiffViewer-BDQ3d3CQ.js +0 -132
  120. package/dist/TiffViewer-BDQ3d3CQ.js.map +0 -1
  121. package/dist/Viewer3D-CJJJgkuv.js +0 -60
  122. package/dist/Viewer3D-CJJJgkuv.js.map +0 -1
  123. package/src/components/SecondaryPane.vue +0 -447
  124. package/src/modals/ShareModal.vue +0 -139
@@ -45,6 +45,14 @@ const props = defineProps<{
45
45
  * otherwise would have people mint one per protocol.
46
46
  */
47
47
  protocol?: string;
48
+ /**
49
+ * The host the surrounding guide tells people to connect to. Given by the
50
+ * connection guides, which know the server's own public address; without
51
+ * it the label falls back to where this panel was loaded from. ⚠ The
52
+ * default label used to be built from apiBase / the page while the guide
53
+ * right under it printed the server's address — one screen, two machines.
54
+ */
55
+ host?: string;
48
56
  }>();
49
57
 
50
58
  const emit = defineEmits<{
@@ -52,7 +60,7 @@ const emit = defineEmits<{
52
60
  }>();
53
61
 
54
62
  const locale = computed<LocaleCode>(() => resolveLocale(props.config.locale));
55
- const { t } = useLocale(locale);
63
+ const { t, formatDate } = useLocale(locale);
56
64
 
57
65
  const { tokens, loading, error, canMint, revealed, load, create, remove, dismiss } = useTokens(
58
66
  props.config,
@@ -100,6 +108,7 @@ function defaultLabel(): string {
100
108
 
101
109
  /** A name the user will recognise in the list later. */
102
110
  function hostLabel(): string {
111
+ if (props.host) return props.host;
103
112
  try {
104
113
  return new URL(props.config.apiBase || window.location.origin).host;
105
114
  } catch {
@@ -169,10 +178,13 @@ async function copySecret(): Promise<void> {
169
178
  }
170
179
  }
171
180
 
181
+ /* zaman:z1 — one date formatter for the package. This was a bare
182
+ * `toLocaleDateString()`: the browser's locale and the browser's zone, so a
183
+ * key minted at 23:30 in Istanbul was dated a day early for a viewer reading
184
+ * UTC and came out in the wrong language besides. */
172
185
  function fmtDate(v?: string | null): string {
173
- if (!v) return '';
174
- const d = new Date(v);
175
- return Number.isNaN(d.getTime()) ? '' : d.toLocaleDateString();
186
+ const ms = new Date(v ?? '').getTime();
187
+ return Number.isNaN(ms) ? '' : formatDate(ms);
176
188
  }
177
189
 
178
190
  function usedLabel(row: ApiToken): string {