@spscommerce/ds-web-components 5.2.1 → 5.2.2-ie
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/dist/components/file-upload/file-upload.d.ts +119 -0
- package/dist/components/file-upload/file-upload.examples.d.ts +2 -0
- package/dist/components/file-upload/file-upload.examples.js +77 -0
- package/dist/components/file-upload/file-upload.examples.js.map +1 -0
- package/dist/components/file-upload/file-upload.js +415 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/file-upload/mime-type.enum.d.ts +75 -0
- package/dist/components/file-upload/mime-type.enum.js +77 -0
- package/dist/components/file-upload/mime-type.enum.js.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +12 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/insight-card/insight-card.d.ts +40 -0
- package/dist/components/insight-card/insight-card.examples.d.ts +51 -0
- package/dist/components/insight-card/insight-card.examples.js +58 -0
- package/dist/components/insight-card/insight-card.examples.js.map +1 -0
- package/dist/components/insight-card/insight-card.js +147 -0
- package/dist/components/insight-card/insight-card.js.map +1 -0
- package/dist/components/insight-card/insights.d.ts +18 -0
- package/dist/components/insight-card/insights.js +90 -0
- package/dist/components/insight-card/insights.js.map +1 -0
- package/dist/components/nav-tabs/nav-tab-set.d.ts +7 -0
- package/dist/components/nav-tabs/nav-tab-set.js +53 -0
- package/dist/components/nav-tabs/nav-tab-set.js.map +1 -0
- package/dist/components/nav-tabs/nav-tab.d.ts +24 -0
- package/dist/components/nav-tabs/nav-tab.js +94 -0
- package/dist/components/nav-tabs/nav-tab.js.map +1 -0
- package/dist/components/nav-tabs/nav-tabs.examples.d.ts +11 -0
- package/dist/components/nav-tabs/nav-tabs.examples.js +18 -0
- package/dist/components/nav-tabs/nav-tabs.examples.js.map +1 -0
- package/dist/components/photo/photo.d.ts +42 -0
- package/dist/components/photo/photo.examples.d.ts +2 -0
- package/dist/components/photo/photo.examples.js +58 -0
- package/dist/components/photo/photo.examples.js.map +1 -0
- package/dist/components/photo/photo.js +172 -0
- package/dist/components/photo/photo.js.map +1 -0
- package/dist/decorators/component.d.ts +33 -0
- package/dist/decorators/component.js +313 -0
- package/dist/decorators/component.js.map +1 -0
- package/dist/decorators/content.d.ts +7 -0
- package/dist/decorators/content.js +13 -0
- package/dist/decorators/content.js.map +1 -0
- package/dist/decorators/event-dispatcher.d.ts +9 -0
- package/dist/decorators/event-dispatcher.js +22 -0
- package/dist/decorators/event-dispatcher.js.map +1 -0
- package/dist/decorators/event-listener.d.ts +5 -0
- package/dist/decorators/event-listener.js +14 -0
- package/dist/decorators/event-listener.js.map +1 -0
- package/dist/decorators/index.d.ts +7 -0
- package/dist/decorators/index.js +8 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/prop.d.ts +6 -0
- package/dist/decorators/prop.js +47 -0
- package/dist/decorators/prop.js.map +1 -0
- package/dist/decorators/query-selector.d.ts +19 -0
- package/dist/decorators/query-selector.js +32 -0
- package/dist/decorators/query-selector.js.map +1 -0
- package/dist/decorators/watch.d.ts +2 -0
- package/dist/decorators/watch.js +27 -0
- package/dist/decorators/watch.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.cjs.js +3190 -642
- package/dist/lib/index.es.js +2914 -2368
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.js +33 -0
- package/dist/manifest.js.map +1 -0
- package/dist/package.json +4 -3
- package/dist/utils/comment.d.ts +2 -0
- package/dist/utils/comment.js +15 -0
- package/dist/utils/comment.js.map +1 -0
- package/dist/utils/i18n.d.ts +3 -0
- package/dist/utils/i18n.js +9 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/metadata.d.ts +22 -0
- package/dist/utils/metadata.js +23 -0
- package/dist/utils/metadata.js.map +1 -0
- package/dist/utils/pragma.d.ts +6 -0
- package/dist/utils/pragma.js +143 -0
- package/dist/utils/pragma.js.map +1 -0
- package/dist/utils/register.d.ts +13 -0
- package/dist/utils/register.js +73 -0
- package/dist/utils/register.js.map +1 -0
- package/lib/index.cjs.js +3190 -642
- package/lib/index.es.js +2914 -2368
- package/package.json +9 -9
- package/rollup.config.js +22 -0
- package/spscommerce-ds-web-components-4.36.3-ie.tgz +0 -0
- package/spscommerce-ds-web-components-5.0.2-ie.tgz +0 -0
- package/vite.config.js +1 -1
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
24
|
+
};
|
|
25
|
+
var __values = (this && this.__values) || function(o) {
|
|
26
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
27
|
+
if (m) return m.call(o);
|
|
28
|
+
if (o && typeof o.length === "number") return {
|
|
29
|
+
next: function () {
|
|
30
|
+
if (o && i >= o.length) o = void 0;
|
|
31
|
+
return { value: o && o[i++], done: !o };
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
35
|
+
};
|
|
36
|
+
/** @jsx h */
|
|
37
|
+
/* eslint-disable new-cap */
|
|
38
|
+
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
39
|
+
import { parseFileSize } from "@spscommerce/utils";
|
|
40
|
+
import { ClassBindings, Component, EventDispatcher,
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
42
|
+
EventListener, Prop, QuerySelector, } from "../../decorators/index";
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
|
+
import { h } from "../../utils/pragma";
|
|
45
|
+
import { MIMEType } from "./mime-type.enum";
|
|
46
|
+
var CPT_NAME = "sps-file-upload";
|
|
47
|
+
var SpsFileUploadComponent = /** @class */ (function (_super) {
|
|
48
|
+
__extends(SpsFileUploadComponent, _super);
|
|
49
|
+
function SpsFileUploadComponent() {
|
|
50
|
+
var _this = _super.call(this) || this;
|
|
51
|
+
/** Controls whether the component is visible. */
|
|
52
|
+
_this.shown = true;
|
|
53
|
+
/**
|
|
54
|
+
* The list of selected files. If the `multiple` prop has not been provided,
|
|
55
|
+
* it is still an array; it will simply be an array of one when the user selects
|
|
56
|
+
* a file.
|
|
57
|
+
*/
|
|
58
|
+
_this.files = [];
|
|
59
|
+
_this.acceptMIMETypes = new Set();
|
|
60
|
+
_this.active = false;
|
|
61
|
+
_this.error = false;
|
|
62
|
+
_this.namesOfUnsupportedFiles = [];
|
|
63
|
+
_this.handleBrowseLinkClick = _this.handleBrowseLinkClick.bind(_this);
|
|
64
|
+
_this.handleDownloadButtonClick = _this.handleDownloadButtonClick.bind(_this);
|
|
65
|
+
_this.handleFileInputChange = _this.handleFileInputChange.bind(_this);
|
|
66
|
+
_this.dismiss = _this.dismiss.bind(_this);
|
|
67
|
+
return _this;
|
|
68
|
+
}
|
|
69
|
+
Object.defineProperty(SpsFileUploadComponent.prototype, ClassBindings, {
|
|
70
|
+
get: function () {
|
|
71
|
+
return [
|
|
72
|
+
CPT_NAME,
|
|
73
|
+
this.active && CPT_NAME + "--active",
|
|
74
|
+
this.error && CPT_NAME + "--error",
|
|
75
|
+
!this.shown && CPT_NAME + "--hidden",
|
|
76
|
+
this.mini && CPT_NAME + "--mini",
|
|
77
|
+
this.constrainContentWidth && CPT_NAME + "--constrained-content-width",
|
|
78
|
+
];
|
|
79
|
+
},
|
|
80
|
+
enumerable: false,
|
|
81
|
+
configurable: true
|
|
82
|
+
});
|
|
83
|
+
SpsFileUploadComponent.prototype.connectedCallback = function () {
|
|
84
|
+
this.description = this.description || (this.multiple ? "Files" : "File");
|
|
85
|
+
if (this.acceptExtensions) {
|
|
86
|
+
this.processAcceptExtensions(this.acceptExtensions);
|
|
87
|
+
}
|
|
88
|
+
if (this.maxSize) {
|
|
89
|
+
this.parseAndValidateMaxSize(this.maxSize);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
SpsFileUploadComponent.prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
93
|
+
if (attrName === "acceptExtensions") {
|
|
94
|
+
this.processAcceptExtensions(newValue);
|
|
95
|
+
}
|
|
96
|
+
if (attrName === "maxSize") {
|
|
97
|
+
this.parseAndValidateMaxSize(newValue);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* If the `dismissable` prop has been set, this will programmatically
|
|
102
|
+
* dismiss the component and fire the "dismissal" event.
|
|
103
|
+
*/
|
|
104
|
+
SpsFileUploadComponent.prototype.dismiss = function () {
|
|
105
|
+
if (this.dismissable) {
|
|
106
|
+
this.shown = false;
|
|
107
|
+
this.update();
|
|
108
|
+
this.dismissal.dispatch();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/** If the `dismissable` prop has been set, this will programmatically show the component. */
|
|
112
|
+
SpsFileUploadComponent.prototype.show = function () {
|
|
113
|
+
if (this.dismissable) {
|
|
114
|
+
this.shown = true;
|
|
115
|
+
this.update();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
SpsFileUploadComponent.prototype.render = function (_a) {
|
|
119
|
+
var _this = this;
|
|
120
|
+
var t = _a.t;
|
|
121
|
+
var icon = this.error ? SpsIcon.EXCLAMATION_CIRCLE : SpsIcon.UPLOAD_CLOUD;
|
|
122
|
+
var instructions = (this.multiple
|
|
123
|
+
? t("design-system:fileUpload.instructions_plural")
|
|
124
|
+
: t("design-system:fileUpload.instructions")).split("|");
|
|
125
|
+
return (h("div", { "data-fragment": true },
|
|
126
|
+
h("div", { className: CPT_NAME + "__content" }, this.processing
|
|
127
|
+
? (h("div", { "data-fragment": true },
|
|
128
|
+
h("i", { className: "sps-spinner sps-spinner--medium", "aria-hidden": "true" }),
|
|
129
|
+
h("div", { className: CPT_NAME + "__instructions" }, t("design-system:fileUpload.processing"))))
|
|
130
|
+
: (h("div", { "data-fragment": true },
|
|
131
|
+
h("i", { className: "sps-icon sps-icon-" + icon + " " + CPT_NAME + "__icon-primary", "aria-hidden": "true" }),
|
|
132
|
+
h("div", { className: CPT_NAME + "__title" }, this.error
|
|
133
|
+
? (h("div", { "data-fragment": true }, t(this.namesOfUnsupportedFiles.length > 1
|
|
134
|
+
? "design-system:fileUpload.cancelled_plural"
|
|
135
|
+
: "design-system:fileUpload.cancelled")))
|
|
136
|
+
: h("div", { "data-fragment": true }, t("design-system:fileUpload.title", { description: this.description }))),
|
|
137
|
+
this.error
|
|
138
|
+
? (h("div", { className: CPT_NAME + "__errored-files" }, new Set(this.namesOfUnsupportedFiles.map(function (name, i) {
|
|
139
|
+
var breakpoint = Math.floor(name.length / 2);
|
|
140
|
+
return (h("div", { className: CPT_NAME + "__errored-filename", key: name },
|
|
141
|
+
h("span", { className: CPT_NAME + "__errored-filename-segment" }, name.substr(0, breakpoint)),
|
|
142
|
+
h("div", { className: CPT_NAME + "__errored-filename-segment" },
|
|
143
|
+
h("span", null, name.substr(breakpoint))),
|
|
144
|
+
i < _this.namesOfUnsupportedFiles.length - 1 ? "," : ""));
|
|
145
|
+
}))))
|
|
146
|
+
: h("span", null),
|
|
147
|
+
h("div", { className: CPT_NAME + "__instructions" },
|
|
148
|
+
h("div", { "data-fragment": true },
|
|
149
|
+
h("span", null, instructions[0]),
|
|
150
|
+
h("a", { href: "", onClick: this.handleBrowseLinkClick }, instructions[1]),
|
|
151
|
+
h("span", null, instructions[2]))),
|
|
152
|
+
h("div", { className: CPT_NAME + "__requirements" },
|
|
153
|
+
this.acceptExtensions
|
|
154
|
+
? (h("span", null,
|
|
155
|
+
"(",
|
|
156
|
+
" ",
|
|
157
|
+
t("design-system:fileUpload.acceptedTypes", { fileTypes: this.acceptExtensionsDescription }),
|
|
158
|
+
" ",
|
|
159
|
+
")"))
|
|
160
|
+
: "",
|
|
161
|
+
this.maxSize
|
|
162
|
+
? (h("span", null,
|
|
163
|
+
"(",
|
|
164
|
+
" ",
|
|
165
|
+
t("design-system:fileUpload.maximumSize", { size: this.maxSize }),
|
|
166
|
+
" ",
|
|
167
|
+
")"))
|
|
168
|
+
: "",
|
|
169
|
+
this.customRequirement
|
|
170
|
+
? (h("span", null,
|
|
171
|
+
" ",
|
|
172
|
+
this.customRequirement,
|
|
173
|
+
" "))
|
|
174
|
+
: ""),
|
|
175
|
+
this.downloadLabel
|
|
176
|
+
&& (h("div", { className: "sps-button sps-button--link " + CPT_NAME + "__download-button", onClick: this.handleDownloadButtonClick },
|
|
177
|
+
h("button", { type: "button" },
|
|
178
|
+
h("i", { className: "sps-icon sps-icon-download-cloud", "aria-hidden": "true" }),
|
|
179
|
+
" ",
|
|
180
|
+
this.downloadLabel)))))),
|
|
181
|
+
this.dismissable && !this.processing
|
|
182
|
+
&& (h("div", { className: "sps-button sps-button--icon " + CPT_NAME + "__close-button", onClick: this.dismiss },
|
|
183
|
+
h("button", { type: "button", title: t("design-system:fileUpload.close") },
|
|
184
|
+
h("i", { className: "sps-icon sps-icon-x", "aria-hidden": "true" })))),
|
|
185
|
+
h("form", null,
|
|
186
|
+
h("input", { type: "file", accept: this.accept || "*/*", multiple: this.multiple || null, onChange: this.handleFileInputChange }))));
|
|
187
|
+
};
|
|
188
|
+
SpsFileUploadComponent.prototype.parseAndValidateMaxSize = function (maxSize) {
|
|
189
|
+
try {
|
|
190
|
+
this.maxSizeBytes = parseFileSize(maxSize);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
throw new Error("Could not parse \"" + maxSize + "\" as a file size.");
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
SpsFileUploadComponent.prototype.processAcceptExtensions = function (acceptExtensions) {
|
|
197
|
+
var e_1, _a, e_2, _b;
|
|
198
|
+
var splitExtensions = Array.isArray(acceptExtensions)
|
|
199
|
+
? acceptExtensions
|
|
200
|
+
: acceptExtensions.trim().split(/\s?,\s?/);
|
|
201
|
+
var trimmedExtensions = splitExtensions.map(function (ext) { return ext.replace(/^\./, ""); });
|
|
202
|
+
var extList = trimmedExtensions.map(function (ext) { return ("." + ext).toLowerCase(); });
|
|
203
|
+
this.acceptExtensionsDescription = extList
|
|
204
|
+
.map(function (ext, i) { return (i > 0 && i === extList.length - 1 ? "or " + ext : ext); })
|
|
205
|
+
.join(extList.length > 2 ? ", " : " ");
|
|
206
|
+
this.acceptMIMETypes.clear();
|
|
207
|
+
try {
|
|
208
|
+
for (var trimmedExtensions_1 = __values(trimmedExtensions), trimmedExtensions_1_1 = trimmedExtensions_1.next(); !trimmedExtensions_1_1.done; trimmedExtensions_1_1 = trimmedExtensions_1.next()) {
|
|
209
|
+
var ext = trimmedExtensions_1_1.value;
|
|
210
|
+
try {
|
|
211
|
+
for (var _c = (e_2 = void 0, __values(MIMEType[ext.toUpperCase()].split(","))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
212
|
+
var type = _d.value;
|
|
213
|
+
this.acceptMIMETypes.add(type);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
217
|
+
finally {
|
|
218
|
+
try {
|
|
219
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
220
|
+
}
|
|
221
|
+
finally { if (e_2) throw e_2.error; }
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
226
|
+
finally {
|
|
227
|
+
try {
|
|
228
|
+
if (trimmedExtensions_1_1 && !trimmedExtensions_1_1.done && (_a = trimmedExtensions_1.return)) _a.call(trimmedExtensions_1);
|
|
229
|
+
}
|
|
230
|
+
finally { if (e_1) throw e_1.error; }
|
|
231
|
+
}
|
|
232
|
+
this.accept = extList.concat(Array.from(this.acceptMIMETypes)).join(",");
|
|
233
|
+
};
|
|
234
|
+
SpsFileUploadComponent.prototype.selectFiles = function (files) {
|
|
235
|
+
var e_3, _a;
|
|
236
|
+
this.namesOfUnsupportedFiles = [];
|
|
237
|
+
var fileArray = Array.from(files);
|
|
238
|
+
try {
|
|
239
|
+
for (var fileArray_1 = __values(fileArray), fileArray_1_1 = fileArray_1.next(); !fileArray_1_1.done; fileArray_1_1 = fileArray_1.next()) {
|
|
240
|
+
var file = fileArray_1_1.value;
|
|
241
|
+
if (this.acceptExtensions && !this.acceptMIMETypes.has(file.type)) {
|
|
242
|
+
this.namesOfUnsupportedFiles.push(file.name);
|
|
243
|
+
}
|
|
244
|
+
if (this.maxSize && file.size > this.maxSizeBytes) {
|
|
245
|
+
this.namesOfUnsupportedFiles.push(file.name);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
250
|
+
finally {
|
|
251
|
+
try {
|
|
252
|
+
if (fileArray_1_1 && !fileArray_1_1.done && (_a = fileArray_1.return)) _a.call(fileArray_1);
|
|
253
|
+
}
|
|
254
|
+
finally { if (e_3) throw e_3.error; }
|
|
255
|
+
}
|
|
256
|
+
if (this.namesOfUnsupportedFiles.length) {
|
|
257
|
+
this.error = true;
|
|
258
|
+
this.fileInput.value = null;
|
|
259
|
+
this.update();
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.files = fileArray;
|
|
263
|
+
this.selection.dispatch(fileArray);
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
/* eslint-disable class-methods-use-this, @typescript-eslint/member-ordering */
|
|
267
|
+
SpsFileUploadComponent.prototype.handleDragOver = function (event) {
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
event.stopPropagation();
|
|
270
|
+
};
|
|
271
|
+
/* eslint-enable class-methods-use-this */
|
|
272
|
+
SpsFileUploadComponent.prototype.handleDragEnter = function (event) {
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
this.active = true;
|
|
275
|
+
this.error = false;
|
|
276
|
+
this.update();
|
|
277
|
+
};
|
|
278
|
+
SpsFileUploadComponent.prototype.handleDragLeave = function (event) {
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
this.active = false;
|
|
281
|
+
this.update();
|
|
282
|
+
};
|
|
283
|
+
SpsFileUploadComponent.prototype.handleDrop = function (event) {
|
|
284
|
+
event.preventDefault();
|
|
285
|
+
event.stopPropagation();
|
|
286
|
+
this.active = false;
|
|
287
|
+
if (event.dataTransfer.items) {
|
|
288
|
+
this.selectFiles(Array.from(event.dataTransfer.items).map(function (item) { return item.getAsFile(); }));
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
this.selectFiles(event.dataTransfer.files);
|
|
292
|
+
}
|
|
293
|
+
this.update();
|
|
294
|
+
};
|
|
295
|
+
/* eslint-enable @typescript-eslint/member-ordering */
|
|
296
|
+
SpsFileUploadComponent.prototype.handleBrowseLinkClick = function (event) {
|
|
297
|
+
event.preventDefault();
|
|
298
|
+
this.error = false;
|
|
299
|
+
this.update();
|
|
300
|
+
this.fileInput.click();
|
|
301
|
+
};
|
|
302
|
+
SpsFileUploadComponent.prototype.handleDownloadButtonClick = function () {
|
|
303
|
+
this.download.dispatch();
|
|
304
|
+
};
|
|
305
|
+
SpsFileUploadComponent.prototype.handleFileInputChange = function (event) {
|
|
306
|
+
event.stopPropagation();
|
|
307
|
+
this.selectFiles(event.target.files);
|
|
308
|
+
};
|
|
309
|
+
SpsFileUploadComponent.displayName = CPT_NAME;
|
|
310
|
+
SpsFileUploadComponent.props = {
|
|
311
|
+
description: "string",
|
|
312
|
+
multiple: "boolean",
|
|
313
|
+
dismissable: "boolean",
|
|
314
|
+
processing: "boolean",
|
|
315
|
+
mini: "boolean",
|
|
316
|
+
downloadLabel: "string",
|
|
317
|
+
acceptExtensions: "Array<string> | string",
|
|
318
|
+
maxSize: "string",
|
|
319
|
+
customRequirement: "string",
|
|
320
|
+
selection: { event: true, type: "CustomEvent<Array<File>>" },
|
|
321
|
+
dismissal: { event: true, type: "CustomEvent<void>" },
|
|
322
|
+
download: { event: true, type: "CustomEvent<void>" },
|
|
323
|
+
};
|
|
324
|
+
__decorate([
|
|
325
|
+
Prop(),
|
|
326
|
+
__metadata("design:type", Object)
|
|
327
|
+
], SpsFileUploadComponent.prototype, "description", void 0);
|
|
328
|
+
__decorate([
|
|
329
|
+
Prop(Boolean),
|
|
330
|
+
__metadata("design:type", Boolean)
|
|
331
|
+
], SpsFileUploadComponent.prototype, "multiple", void 0);
|
|
332
|
+
__decorate([
|
|
333
|
+
Prop(Boolean),
|
|
334
|
+
__metadata("design:type", Object)
|
|
335
|
+
], SpsFileUploadComponent.prototype, "shown", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
Prop(Boolean),
|
|
338
|
+
__metadata("design:type", Boolean)
|
|
339
|
+
], SpsFileUploadComponent.prototype, "dismissable", void 0);
|
|
340
|
+
__decorate([
|
|
341
|
+
Prop(Boolean),
|
|
342
|
+
__metadata("design:type", Boolean)
|
|
343
|
+
], SpsFileUploadComponent.prototype, "processing", void 0);
|
|
344
|
+
__decorate([
|
|
345
|
+
Prop(Boolean),
|
|
346
|
+
__metadata("design:type", Boolean)
|
|
347
|
+
], SpsFileUploadComponent.prototype, "mini", void 0);
|
|
348
|
+
__decorate([
|
|
349
|
+
Prop(Boolean),
|
|
350
|
+
__metadata("design:type", Boolean)
|
|
351
|
+
], SpsFileUploadComponent.prototype, "constrainContentWidth", void 0);
|
|
352
|
+
__decorate([
|
|
353
|
+
Prop(),
|
|
354
|
+
__metadata("design:type", String)
|
|
355
|
+
], SpsFileUploadComponent.prototype, "downloadLabel", void 0);
|
|
356
|
+
__decorate([
|
|
357
|
+
Prop(),
|
|
358
|
+
__metadata("design:type", Object)
|
|
359
|
+
], SpsFileUploadComponent.prototype, "acceptExtensions", void 0);
|
|
360
|
+
__decorate([
|
|
361
|
+
Prop(),
|
|
362
|
+
__metadata("design:type", String)
|
|
363
|
+
], SpsFileUploadComponent.prototype, "maxSize", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
Prop(),
|
|
366
|
+
__metadata("design:type", String)
|
|
367
|
+
], SpsFileUploadComponent.prototype, "customRequirement", void 0);
|
|
368
|
+
__decorate([
|
|
369
|
+
EventDispatcher(),
|
|
370
|
+
__metadata("design:type", Object)
|
|
371
|
+
], SpsFileUploadComponent.prototype, "selection", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
EventDispatcher(),
|
|
374
|
+
__metadata("design:type", Object)
|
|
375
|
+
], SpsFileUploadComponent.prototype, "dismissal", void 0);
|
|
376
|
+
__decorate([
|
|
377
|
+
EventDispatcher(),
|
|
378
|
+
__metadata("design:type", Object)
|
|
379
|
+
], SpsFileUploadComponent.prototype, "download", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
QuerySelector("input[type='file']"),
|
|
382
|
+
__metadata("design:type", HTMLInputElement)
|
|
383
|
+
], SpsFileUploadComponent.prototype, "fileInput", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
EventListener("dragover"),
|
|
386
|
+
__metadata("design:type", Function),
|
|
387
|
+
__metadata("design:paramtypes", [Event]),
|
|
388
|
+
__metadata("design:returntype", void 0)
|
|
389
|
+
], SpsFileUploadComponent.prototype, "handleDragOver", null);
|
|
390
|
+
__decorate([
|
|
391
|
+
EventListener("dragenter"),
|
|
392
|
+
__metadata("design:type", Function),
|
|
393
|
+
__metadata("design:paramtypes", [Event]),
|
|
394
|
+
__metadata("design:returntype", void 0)
|
|
395
|
+
], SpsFileUploadComponent.prototype, "handleDragEnter", null);
|
|
396
|
+
__decorate([
|
|
397
|
+
EventListener("dragleave"),
|
|
398
|
+
__metadata("design:type", Function),
|
|
399
|
+
__metadata("design:paramtypes", [Event]),
|
|
400
|
+
__metadata("design:returntype", void 0)
|
|
401
|
+
], SpsFileUploadComponent.prototype, "handleDragLeave", null);
|
|
402
|
+
__decorate([
|
|
403
|
+
EventListener("drop"),
|
|
404
|
+
__metadata("design:type", Function),
|
|
405
|
+
__metadata("design:paramtypes", [Object]),
|
|
406
|
+
__metadata("design:returntype", void 0)
|
|
407
|
+
], SpsFileUploadComponent.prototype, "handleDrop", null);
|
|
408
|
+
SpsFileUploadComponent = __decorate([
|
|
409
|
+
Component({ tag: CPT_NAME }),
|
|
410
|
+
__metadata("design:paramtypes", [])
|
|
411
|
+
], SpsFileUploadComponent);
|
|
412
|
+
return SpsFileUploadComponent;
|
|
413
|
+
}(HTMLElement));
|
|
414
|
+
export { SpsFileUploadComponent };
|
|
415
|
+
//# sourceMappingURL=file-upload.js.map
|
|
@@ -0,0 +1 @@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BAAoB,CAAC;kCAAY,gBAAgB;6DAAC;IAkRjE;QADC,aAAa,CAAC,UAAU,CAAC;;yCACI,KAAK;;gEAGlC;IAID;QADC,aAAa,CAAC,WAAW,CAAC;;yCACI,KAAK;;iEAKnC;IAGD;QADC,aAAa,CAAC,WAAW,CAAC;;yCACI,KAAK;;iEAInC;IAGD;QADC,aAAa,CAAC,MAAM,CAAC;;;;4DAerB;IA5YU,sBAAsB;QADlC,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;;OAChB,sBAAsB,CA8ZlC;IAAD,6BAAC;CAAA,AA9ZD,CAA4C,WAAW,GA8ZtD;SA9ZY,sBAAsB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare enum MIMEType {
|
|
2
|
+
"7Z" = "application/x-7z-compressed",
|
|
3
|
+
AAC = "audio/aac",
|
|
4
|
+
ABW = "application/x-abiword",
|
|
5
|
+
ARC = "application/octet-stream",
|
|
6
|
+
AVI = "video/x-msvideo",
|
|
7
|
+
AZW = "application/vnd.amazon.ebook",
|
|
8
|
+
BIN = "application/octet-stream",
|
|
9
|
+
BMP = "image/bmp",
|
|
10
|
+
BZ = "application/x-bzip",
|
|
11
|
+
BZ2 = "application/x-bzip2",
|
|
12
|
+
CSH = "application/x-csh",
|
|
13
|
+
CSS = "text/css",
|
|
14
|
+
CSV = "text/csv,application/vnd.ms-excel",
|
|
15
|
+
DOC = "application/msword",
|
|
16
|
+
DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
17
|
+
EOT = "application/vnd.ms-fontobject",
|
|
18
|
+
EPUB = "application/epub+zip",
|
|
19
|
+
ES = "application/ecmascript",
|
|
20
|
+
FLV = "video/x-flv",
|
|
21
|
+
GIF = "image/gif",
|
|
22
|
+
GZ = "application/x-gzip",
|
|
23
|
+
HTM = "text/html",
|
|
24
|
+
HTML = "text/html",
|
|
25
|
+
ICO = "image/x-icon",
|
|
26
|
+
ICS = "text/calendar",
|
|
27
|
+
JAR = "application/java-archive",
|
|
28
|
+
JPEG = "image/jpeg",
|
|
29
|
+
JPG = "image/jpeg",
|
|
30
|
+
JS = "application/javascript",
|
|
31
|
+
JSON = "application/json",
|
|
32
|
+
M3U = "audio/x-mpequrl",
|
|
33
|
+
MID = "audio/midi",
|
|
34
|
+
MIDI = "audio/midi",
|
|
35
|
+
MOV = "video/quicktime",
|
|
36
|
+
MP3 = "audio/mpeg3",
|
|
37
|
+
MP4 = "video/mp4",
|
|
38
|
+
MPEG = "video/mpeg",
|
|
39
|
+
MPKG = "application/vnd.apple.installer+xml",
|
|
40
|
+
ODP = "application/vnd.oasis.opendocument.presentation",
|
|
41
|
+
ODS = "application/vnd.oasis.opendocument.spreadsheet",
|
|
42
|
+
ODT = "application/vnd.oasis.opendocument.text",
|
|
43
|
+
OGA = "audio/ogg",
|
|
44
|
+
OGV = "video/ogg",
|
|
45
|
+
OGX = "application/ogg",
|
|
46
|
+
OTF = "font/otf",
|
|
47
|
+
PNG = "image/png",
|
|
48
|
+
PDF = "application/pdf",
|
|
49
|
+
PPT = "application/vnd.ms-powerpoint",
|
|
50
|
+
PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
51
|
+
RAR = "application/x-rar-compressed",
|
|
52
|
+
RTF = "application/rtf",
|
|
53
|
+
SH = "application/x-sh",
|
|
54
|
+
SVG = "image/svg+xml",
|
|
55
|
+
SWF = "application/x-shockwave-flash",
|
|
56
|
+
TAR = "application/x-tar",
|
|
57
|
+
TIF = "image/tiff",
|
|
58
|
+
TIFF = "image/tiff",
|
|
59
|
+
TS = "application/typescript",
|
|
60
|
+
TTF = "font/ttf",
|
|
61
|
+
TXT = "text/plain",
|
|
62
|
+
VSD = "application/vnd.visio",
|
|
63
|
+
WAV = "audio/wav",
|
|
64
|
+
WEBA = "audio/webm",
|
|
65
|
+
WEBM = "video/webm",
|
|
66
|
+
WEBP = "image/webp",
|
|
67
|
+
WOFF = "font/woff",
|
|
68
|
+
WOFF2 = "font/woff2",
|
|
69
|
+
XHTML = "application/xhtml+xml",
|
|
70
|
+
XLS = "application/vnd.ms-excel",
|
|
71
|
+
XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
72
|
+
XML = "application/xml",
|
|
73
|
+
XUL = "application/vnd.mozilla.xul+xml",
|
|
74
|
+
ZIP = "application/zip"
|
|
75
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export var MIMEType;
|
|
2
|
+
(function (MIMEType) {
|
|
3
|
+
MIMEType["7Z"] = "application/x-7z-compressed";
|
|
4
|
+
MIMEType["AAC"] = "audio/aac";
|
|
5
|
+
MIMEType["ABW"] = "application/x-abiword";
|
|
6
|
+
MIMEType["ARC"] = "application/octet-stream";
|
|
7
|
+
MIMEType["AVI"] = "video/x-msvideo";
|
|
8
|
+
MIMEType["AZW"] = "application/vnd.amazon.ebook";
|
|
9
|
+
MIMEType["BIN"] = "application/octet-stream";
|
|
10
|
+
MIMEType["BMP"] = "image/bmp";
|
|
11
|
+
MIMEType["BZ"] = "application/x-bzip";
|
|
12
|
+
MIMEType["BZ2"] = "application/x-bzip2";
|
|
13
|
+
MIMEType["CSH"] = "application/x-csh";
|
|
14
|
+
MIMEType["CSS"] = "text/css";
|
|
15
|
+
MIMEType["CSV"] = "text/csv,application/vnd.ms-excel";
|
|
16
|
+
MIMEType["DOC"] = "application/msword";
|
|
17
|
+
MIMEType["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
18
|
+
MIMEType["EOT"] = "application/vnd.ms-fontobject";
|
|
19
|
+
MIMEType["EPUB"] = "application/epub+zip";
|
|
20
|
+
MIMEType["ES"] = "application/ecmascript";
|
|
21
|
+
MIMEType["FLV"] = "video/x-flv";
|
|
22
|
+
MIMEType["GIF"] = "image/gif";
|
|
23
|
+
MIMEType["GZ"] = "application/x-gzip";
|
|
24
|
+
MIMEType["HTM"] = "text/html";
|
|
25
|
+
MIMEType["HTML"] = "text/html";
|
|
26
|
+
MIMEType["ICO"] = "image/x-icon";
|
|
27
|
+
MIMEType["ICS"] = "text/calendar";
|
|
28
|
+
MIMEType["JAR"] = "application/java-archive";
|
|
29
|
+
MIMEType["JPEG"] = "image/jpeg";
|
|
30
|
+
MIMEType["JPG"] = "image/jpeg";
|
|
31
|
+
MIMEType["JS"] = "application/javascript";
|
|
32
|
+
MIMEType["JSON"] = "application/json";
|
|
33
|
+
MIMEType["M3U"] = "audio/x-mpequrl";
|
|
34
|
+
MIMEType["MID"] = "audio/midi";
|
|
35
|
+
MIMEType["MIDI"] = "audio/midi";
|
|
36
|
+
MIMEType["MOV"] = "video/quicktime";
|
|
37
|
+
MIMEType["MP3"] = "audio/mpeg3";
|
|
38
|
+
MIMEType["MP4"] = "video/mp4";
|
|
39
|
+
MIMEType["MPEG"] = "video/mpeg";
|
|
40
|
+
MIMEType["MPKG"] = "application/vnd.apple.installer+xml";
|
|
41
|
+
MIMEType["ODP"] = "application/vnd.oasis.opendocument.presentation";
|
|
42
|
+
MIMEType["ODS"] = "application/vnd.oasis.opendocument.spreadsheet";
|
|
43
|
+
MIMEType["ODT"] = "application/vnd.oasis.opendocument.text";
|
|
44
|
+
MIMEType["OGA"] = "audio/ogg";
|
|
45
|
+
MIMEType["OGV"] = "video/ogg";
|
|
46
|
+
MIMEType["OGX"] = "application/ogg";
|
|
47
|
+
MIMEType["OTF"] = "font/otf";
|
|
48
|
+
MIMEType["PNG"] = "image/png";
|
|
49
|
+
MIMEType["PDF"] = "application/pdf";
|
|
50
|
+
MIMEType["PPT"] = "application/vnd.ms-powerpoint";
|
|
51
|
+
MIMEType["PPTX"] = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
52
|
+
MIMEType["RAR"] = "application/x-rar-compressed";
|
|
53
|
+
MIMEType["RTF"] = "application/rtf";
|
|
54
|
+
MIMEType["SH"] = "application/x-sh";
|
|
55
|
+
MIMEType["SVG"] = "image/svg+xml";
|
|
56
|
+
MIMEType["SWF"] = "application/x-shockwave-flash";
|
|
57
|
+
MIMEType["TAR"] = "application/x-tar";
|
|
58
|
+
MIMEType["TIF"] = "image/tiff";
|
|
59
|
+
MIMEType["TIFF"] = "image/tiff";
|
|
60
|
+
MIMEType["TS"] = "application/typescript";
|
|
61
|
+
MIMEType["TTF"] = "font/ttf";
|
|
62
|
+
MIMEType["TXT"] = "text/plain";
|
|
63
|
+
MIMEType["VSD"] = "application/vnd.visio";
|
|
64
|
+
MIMEType["WAV"] = "audio/wav";
|
|
65
|
+
MIMEType["WEBA"] = "audio/webm";
|
|
66
|
+
MIMEType["WEBM"] = "video/webm";
|
|
67
|
+
MIMEType["WEBP"] = "image/webp";
|
|
68
|
+
MIMEType["WOFF"] = "font/woff";
|
|
69
|
+
MIMEType["WOFF2"] = "font/woff2";
|
|
70
|
+
MIMEType["XHTML"] = "application/xhtml+xml";
|
|
71
|
+
MIMEType["XLS"] = "application/vnd.ms-excel";
|
|
72
|
+
MIMEType["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
73
|
+
MIMEType["XML"] = "application/xml";
|
|
74
|
+
MIMEType["XUL"] = "application/vnd.mozilla.xul+xml";
|
|
75
|
+
MIMEType["ZIP"] = "application/zip";
|
|
76
|
+
})(MIMEType || (MIMEType = {}));
|
|
77
|
+
//# sourceMappingURL=mime-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime-type.enum.js","sourceRoot":"","sources":["../../../src/components/file-upload/mime-type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QA0EX;AA1ED,WAAY,QAAQ;IAClB,8CAAoC,CAAA;IACpC,6BAAiB,CAAA;IACjB,yCAA6B,CAAA;IAC7B,4CAAgC,CAAA;IAChC,mCAAuB,CAAA;IACvB,gDAAoC,CAAA;IACpC,4CAAgC,CAAA;IAChC,6BAAiB,CAAA;IACjB,qCAAyB,CAAA;IACzB,uCAA2B,CAAA;IAC3B,qCAAyB,CAAA;IACzB,4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IACvB,mDAAuC,CAAA;IACvC,mCAAuB,CAAA;AACzB,CAAC,EA1EW,QAAQ,KAAR,QAAQ,QA0EnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./file-upload/file-upload";
|
|
2
|
+
export * from "./file-upload/file-upload.examples";
|
|
3
|
+
export * from "./file-upload/mime-type.enum";
|
|
4
|
+
export * from "./insight-card/insight-card";
|
|
5
|
+
export * from "./insight-card/insights";
|
|
6
|
+
export * from "./insight-card/insight-card.examples";
|
|
7
|
+
export * from "./nav-tabs/nav-tab";
|
|
8
|
+
export * from "./nav-tabs/nav-tab-set";
|
|
9
|
+
export * from "./nav-tabs/nav-tabs.examples";
|
|
10
|
+
export * from "./photo/photo";
|
|
11
|
+
export * from "./photo/photo.examples";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./file-upload/file-upload";
|
|
2
|
+
export * from "./file-upload/file-upload.examples";
|
|
3
|
+
export * from "./file-upload/mime-type.enum";
|
|
4
|
+
export * from "./insight-card/insight-card";
|
|
5
|
+
export * from "./insight-card/insights";
|
|
6
|
+
export * from "./insight-card/insight-card.examples";
|
|
7
|
+
export * from "./nav-tabs/nav-tab";
|
|
8
|
+
export * from "./nav-tabs/nav-tab-set";
|
|
9
|
+
export * from "./nav-tabs/nav-tabs.examples";
|
|
10
|
+
export * from "./photo/photo";
|
|
11
|
+
export * from "./photo/photo.examples";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC"}
|