@adminforth/upload 1.4.3 → 1.4.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.
- package/build.log +1 -1
- package/dist/index.js +11 -9
- package/index.ts +10 -8
- package/package.json +1 -1
- package/types.ts +5 -0
package/build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -99,7 +99,7 @@ getBucketLifecycleConfiguration on bucket ${this.options.s3Bucket} in region ${t
|
|
|
99
99
|
modifyResourceConfig: { get: () => super.modifyResourceConfig }
|
|
100
100
|
});
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
103
103
|
_super.modifyResourceConfig.call(this, adminforth, resourceConfig);
|
|
104
104
|
// after column to store the path of the uploaded file, add new VirtualColumn,
|
|
105
105
|
// show only in edit and create views
|
|
@@ -162,14 +162,16 @@ getBucketLifecycleConfiguration on bucket ${this.options.s3Bucket} in region ${t
|
|
|
162
162
|
}
|
|
163
163
|
const pathColumn = resourceConfig.columns[pathColumnIndex];
|
|
164
164
|
// add preview column to list
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
if (((_l = this.options.preview) === null || _l === void 0 ? void 0 : _l.usePreviewComponents) !== false) {
|
|
166
|
+
resourceConfig.columns[pathColumnIndex].components.list = {
|
|
167
|
+
file: this.componentPath('preview.vue'),
|
|
168
|
+
meta: pluginFrontendOptions,
|
|
169
|
+
};
|
|
170
|
+
resourceConfig.columns[pathColumnIndex].components.show = {
|
|
171
|
+
file: this.componentPath('preview.vue'),
|
|
172
|
+
meta: pluginFrontendOptions,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
173
175
|
// insert virtual column after path column if it is not already there
|
|
174
176
|
const virtualColumnIndex = resourceConfig.columns.findIndex((column) => column.name === virtualColumn.name);
|
|
175
177
|
if (virtualColumnIndex === -1) {
|
package/index.ts
CHANGED
|
@@ -165,15 +165,17 @@ getBucketLifecycleConfiguration on bucket ${this.options.s3Bucket} in region ${t
|
|
|
165
165
|
const pathColumn = resourceConfig.columns[pathColumnIndex];
|
|
166
166
|
|
|
167
167
|
// add preview column to list
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
if (this.options.preview?.usePreviewComponents !== false) {
|
|
169
|
+
resourceConfig.columns[pathColumnIndex].components.list = {
|
|
170
|
+
file: this.componentPath('preview.vue'),
|
|
171
|
+
meta: pluginFrontendOptions,
|
|
172
|
+
};
|
|
172
173
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
resourceConfig.columns[pathColumnIndex].components.show = {
|
|
175
|
+
file: this.componentPath('preview.vue'),
|
|
176
|
+
meta: pluginFrontendOptions,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
177
179
|
|
|
178
180
|
// insert virtual column after path column if it is not already there
|
|
179
181
|
const virtualColumnIndex = resourceConfig.columns.findIndex((column: any) => column.name === virtualColumn.name);
|
package/package.json
CHANGED
package/types.ts
CHANGED