alchemy-media 0.9.0-alpha.4 → 0.9.0-alpha.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.9.0-alpha.5 (2025-07-10)
2
+
3
+ * Add `size` to the media file chooser
4
+ * Allow using filters in the table
5
+ * Limit the height of the media file chooser
6
+
1
7
  ## 0.9.0-alpha.4 (2024-10-10)
2
8
 
3
9
  * Make `MediaRaw#addFile(url)` support data uris too
@@ -133,4 +133,16 @@ al-field[field-type="file"] {
133
133
  margin: auto;
134
134
  }
135
135
  }
136
+ }
137
+
138
+ .alchemy-file-selection-dialog {
139
+ .alchemy-file-selection-wrapper {
140
+ max-height: 85vh;
141
+
142
+ al-table {
143
+ max-height: 76vh;
144
+ margin-bottom: 1rem;
145
+ overflow: auto;
146
+ }
147
+ }
136
148
  }
@@ -460,13 +460,12 @@ MediaFiles.setAction(async function recordsource(conduit) {
460
460
  continue;
461
461
  }
462
462
 
463
- val = RegExp.interpretWildcard('*' + val + '*', 'i');
464
- crit.where(key).equals(val);
463
+ crit.where(key).matchesFilter(val);
465
464
  }
466
465
  }
467
466
 
468
467
  let records = await model.find('all', crit);
469
-
468
+
470
469
  conduit.end({
471
470
  records : records
472
471
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alchemy-media",
3
3
  "description": "The media plugin for Alchemy",
4
- "version": "0.9.0-alpha.4",
4
+ "version": "0.9.0-alpha.5",
5
5
  "repository": {
6
6
  "type" : "git",
7
7
  "url" : "https://github.com/11ways/alchemy-media.git"
@@ -15,6 +15,14 @@ fieldset.addField('_id', {
15
15
 
16
16
  fieldset.addField('filename');
17
17
  fieldset.addField('type');
18
+ fieldset.addField('MediaRaw.size');
19
+
20
+ if (!filters) {
21
+ filters = {
22
+ 'MediaRaw.size': '>500000'
23
+ };
24
+ }
25
+
18
26
  %>
19
27
 
20
28
  <div class="alchemy-file-selection-wrapper">