@widergy/energy-ui 1.117.0 → 1.117.1

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,10 @@
1
+ ## [1.117.1](https://github.com/widergy/energy-ui/compare/v1.117.0...v1.117.1) (2022-04-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * html preview ([#278](https://github.com/widergy/energy-ui/issues/278)) ([e52c6ae](https://github.com/widergy/energy-ui/commit/e52c6aec4e95bedb58612ee9002f60037135b7bd))
7
+
1
8
  # [1.117.0](https://github.com/widergy/energy-ui/compare/v1.116.0...v1.117.0) (2022-04-12)
2
9
 
3
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.pdfAspectRatioValidation = exports.isVideo = exports.isValidFile = exports.isPDF = exports.isNewFile = exports.isImage = exports.isAudio = exports.hasPreview = exports.getBlobFromUrl = void 0;
6
+ exports.pdfAspectRatioValidation = exports.isVideo = exports.isValidFile = exports.isPDF = exports.isNewFile = exports.isImage = exports.isHTML = exports.isAudio = exports.hasPreview = exports.getBlobFromUrl = void 0;
7
7
 
8
8
  var _files = require("@widergy/web-utils/lib/constants/files");
9
9
 
@@ -161,6 +161,12 @@ var isVideo = function isVideo(file) {
161
161
 
162
162
  exports.isVideo = isVideo;
163
163
 
164
+ var isHTML = function isHTML(file) {
165
+ return _files.inputFiles.html.validType.includes(file === null || file === void 0 ? void 0 : file.type);
166
+ };
167
+
168
+ exports.isHTML = isHTML;
169
+
164
170
  var hasPreview = function hasPreview(file) {
165
171
  return isImage(file) || isAudio(file) || isVideo(file);
166
172
  };
@@ -168,7 +174,7 @@ var hasPreview = function hasPreview(file) {
168
174
  exports.hasPreview = hasPreview;
169
175
 
170
176
  var isValidFile = function isValidFile(file) {
171
- return hasPreview(file) || isPDF(file);
177
+ return hasPreview(file) || isPDF(file) || isHTML(file);
172
178
  };
173
179
 
174
180
  exports.isValidFile = isValidFile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "1.117.0",
3
+ "version": "1.117.1",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",