@wavemaker/app-ng-runtime 12.0.0-next.45191 → 12.0.0-next.45196
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.
- app-ng-runtime/build-task/bundles/index.umd.js +7 -7
- app-ng-runtime/build-task/esm2022/containers/accordion/accordion-pane/accordion-pane.build.mjs +2 -2
- app-ng-runtime/build-task/esm2022/containers/accordion/accordion.build.mjs +3 -3
- app-ng-runtime/build-task/esm2022/containers/wizard/wizard.build.mjs +2 -2
- app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +3 -3
- app-ng-runtime/build-task/esm2022/input/chips/chips.build.mjs +2 -2
- app-ng-runtime/build-task/esm2022/input/file-upload/file-upload.build.mjs +2 -2
- app-ng-runtime/build-task/fesm2022/index.mjs +7 -7
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +0 -5
- app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +1 -6
- app-ng-runtime/components/base/fesm2022/index.mjs +0 -5
- app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/audio/audio.component.d.ts +2 -0
- app-ng-runtime/components/basic/default/bundles/index.umd.js +18 -7
- app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +13 -5
- app-ng-runtime/components/basic/default/esm2022/video/video.component.mjs +7 -4
- app-ng-runtime/components/basic/default/fesm2022/index.mjs +18 -7
- app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/video/video.component.d.ts +1 -0
- app-ng-runtime/components/basic/progress/bundles/index.umd.js +7 -3
- app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +8 -4
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs +7 -3
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/progress-bar/progress-bar.component.d.ts +1 -0
- app-ng-runtime/components/basic/search/bundles/index.umd.js +7 -2
- app-ng-runtime/components/basic/search/esm2022/search.component.mjs +8 -3
- app-ng-runtime/components/basic/search/fesm2022/index.mjs +7 -2
- app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/search/search.component.d.ts +3 -2
- app-ng-runtime/components/chart/bundles/index.umd.js +2 -1
- app-ng-runtime/components/chart/esm2022/chart.utils.mjs +3 -2
- app-ng-runtime/components/chart/fesm2022/index.mjs +2 -1
- app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +1 -0
- app-ng-runtime/components/containers/accordion/bundles/index.umd.js +15 -9
- app-ng-runtime/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +13 -10
- app-ng-runtime/components/containers/accordion/esm2022/accordion.directive.mjs +4 -1
- app-ng-runtime/components/containers/accordion/fesm2022/index.mjs +15 -9
- app-ng-runtime/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/containers/wizard/bundles/index.umd.js +6 -6
- app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +7 -7
- app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +6 -6
- app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/data/list/bundles/index.umd.js +20 -12
- app-ng-runtime/components/data/list/esm2022/list-item.directive.mjs +10 -1
- app-ng-runtime/components/data/list/esm2022/list.component.mjs +13 -13
- app-ng-runtime/components/data/list/fesm2022/index.mjs +21 -13
- app-ng-runtime/components/data/list/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/chips/bundles/index.umd.js +24 -7
- app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +25 -8
- app-ng-runtime/components/input/chips/fesm2022/index.mjs +24 -7
- app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +21 -5
- app-ng-runtime/components/input/default/esm2022/base-form.component.mjs +3 -3
- app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +20 -4
- app-ng-runtime/components/input/default/fesm2022/index.mjs +21 -5
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +3 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +22 -14
- app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +13 -6
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +4 -4
- app-ng-runtime/components/input/epoch/esm2022/date/date.props.mjs +2 -1
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +4 -4
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +19 -11
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/file-upload/bundles/index.umd.js +80 -64
- app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +80 -65
- app-ng-runtime/components/input/file-upload/esm2022/file-upload.props.mjs +3 -2
- app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +81 -65
- app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +7 -2
- app-ng-runtime/components/input/rating/bundles/index.umd.js +2 -2
- app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +3 -3
- app-ng-runtime/components/input/rating/fesm2022/index.mjs +2 -2
- app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/navigation/breadcrumb/bundles/index.umd.js +6 -6
- app-ng-runtime/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +7 -7
- app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs +6 -6
- app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/page/left-panel/bundles/index.umd.js +10 -3
- app-ng-runtime/components/page/left-panel/esm2022/left-panel.directive.mjs +11 -4
- app-ng-runtime/components/page/left-panel/fesm2022/index.mjs +10 -3
- app-ng-runtime/components/page/left-panel/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/page/left-panel/left-panel.directive.d.ts +2 -2
- app-ng-runtime/components/page/right-panel/bundles/index.umd.js +2 -2
- app-ng-runtime/components/page/right-panel/esm2022/right-panel.directive.mjs +3 -3
- app-ng-runtime/components/page/right-panel/fesm2022/index.mjs +2 -2
- app-ng-runtime/components/page/right-panel/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/page/right-panel/right-panel.directive.d.ts +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +9 -5
- app-ng-runtime/variables/bundles/index.umd.js +34 -16
- app-ng-runtime/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +35 -17
- app-ng-runtime/variables/fesm2022/index.mjs +34 -16
- app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/variables/manager/variable/web-socket-variable.manager.d.ts +0 -4
@@ -24,7 +24,8 @@ export const registerProps = () => {
|
|
24
24
|
['filelistheight', PROP_NUMBER],
|
25
25
|
['width', { value: 'auto', ...PROP_STRING }],
|
26
26
|
['showprogressbar', PROP_BOOLEAN],
|
27
|
-
['showprogressbarpercentage', PROP_BOOLEAN]
|
27
|
+
['showprogressbarpercentage', PROP_BOOLEAN],
|
28
|
+
['deleteiconhint', { value: 'Delete', ...PROP_STRING }]
|
28
29
|
]));
|
29
30
|
registerFormWidget(FormWidgetType.UPLOAD, new Map([
|
30
31
|
['disabled', PROP_BOOLEAN],
|
@@ -35,4 +36,4 @@ export const registerProps = () => {
|
|
35
36
|
['required', PROP_BOOLEAN]
|
36
37
|
]));
|
37
38
|
};
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml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maWxlc2l6ZScsIFBST1BfTlVNQkVSXSxcbiAgICAgICAgICAgICAgICBbJ2ljb25jbGFzcycsIHt2YWx1ZTogJ3dtLXNsLWwgc2wtY2xvdWQtdXBsb2FkJywgLi4uUFJPUF9TVFJJTkd9XSxcbiAgICAgICAgICAgICAgICBbJ2NsZWFyaWNvbmNsYXNzJywge3ZhbHVlOiAnJywgLi4uUFJPUF9TVFJJTkd9XSxcbiAgICAgICAgICAgICAgICBbJ2NsZWFyaWNvbmhpbnQnLCB7dmFsdWU6ICdDbGVhcicsIC4uLlBST1BfU1RSSU5HfV0sXG4gICAgICAgICAgICAgICAgWydjbGFzcycsIFBST1BfU1RSSU5HXSxcbiAgICAgICAgICAgICAgICBbJ3VwbG9hZHBhdGgnLCB7Li4uUFJPUF9TVFJJTkd9XSxcbiAgICAgICAgICAgICAgICBbJ2RhdGFzb3VyY2UnLCBQUk9QX1NUUklOR10sXG4gICAgICAgICAgICAgICAgWydzZWxlY3RlZEZpbGVzJywgUFJPUF9TVFJJTkddLFxuICAgICAgICAgICAgICAgIFsnZGVzdGluYXRpb24nLCBQUk9QX1NUUklOR10sXG4gICAgICAgICAgICAgICAgWydmaWxlbGlzdGhlaWdodCcsIFBST1BfTlVNQkVSXSxcbiAgICAgICAgICAgICAgICBbJ3dpZHRoJywge3ZhbHVlOiAnYXV0bycsIC4uLlBST1BfU1RSSU5HfV0sXG4gICAgICAgICAgICAgICAgWydzaG93cHJvZ3Jlc3NiYXInLCBQUk9QX0JPT0xFQU5dLFxuICAgICAgICAgICAgICAgIFsnc2hvd3Byb2dyZXNzYmFycGVyY2VudGFnZScsIFBST1BfQk9PTEVBTl0sXG4gICAgICAgICAgICAgICAgWydkZWxldGVpY29uaGludCcsIHt2YWx1ZTogJ0RlbGV0ZScsIC4uLlBST1BfU1RSSU5HfV1cbiAgICAgICAgICAgIF1cbiAgICAgICAgKVxuICAgICk7XG4gICAgcmVnaXN0ZXJGb3JtV2lkZ2V0KFxuICAgICAgICBGb3JtV2lkZ2V0VHlwZS5VUExPQUQsXG4gICAgICAgIG5ldyBNYXAoW1xuICAgICAgICAgICAgWydkaXNhYmxlZCcsIFBST1BfQk9PTEVBTl0sXG4gICAgICAgICAgICBbJ2V4dGVuc2lvbnMnLCBQUk9QX1NUUklOR10sXG4gICAgICAgICAgICBbJ2ZpbGV0eXBlJywgUFJPUF9TVFJJTkddLFxuICAgICAgICAgICAgWydtdWx0aXBsZScsIFBST1BfQk9PTEVBTl0sXG4gICAgICAgICAgICBbJ3JlYWRvbmx5JywgUFJPUF9CT09MRUFOXSxcbiAgICAgICAgICAgIFsncmVxdWlyZWQnLCBQUk9QX0JPT0xFQU5dXG4gICAgICAgIF0pXG4gICAgKTtcbn07XG4iXX0=
|
@@ -6,7 +6,7 @@ import * as i3 from '@wm/components/base';
|
|
6
6
|
import { PROP_STRING, PROP_NUMBER, PROP_BOOLEAN, register, registerFormWidget, StylableComponent, styler, provideAsWidgetRef, WmComponentsModule } from '@wm/components/base';
|
7
7
|
import { Subject } from 'rxjs';
|
8
8
|
import * as i1 from '@wm/core';
|
9
|
-
import { FormWidgetType, isImageFile, isAudioFile, isVideoFile, DataSource, getWmProjectProperties } from '@wm/core';
|
9
|
+
import { FormWidgetType, isImageFile, isAudioFile, isVideoFile, DataSource, getWmProjectProperties, IDGenerator } from '@wm/core';
|
10
10
|
import { toLower, includes, forEach, isEmpty } from 'lodash-es';
|
11
11
|
|
12
12
|
const registerProps = () => {
|
@@ -33,7 +33,8 @@ const registerProps = () => {
|
|
33
33
|
['filelistheight', PROP_NUMBER],
|
34
34
|
['width', { value: 'auto', ...PROP_STRING }],
|
35
35
|
['showprogressbar', PROP_BOOLEAN],
|
36
|
-
['showprogressbarpercentage', PROP_BOOLEAN]
|
36
|
+
['showprogressbarpercentage', PROP_BOOLEAN],
|
37
|
+
['deleteiconhint', { value: 'Delete', ...PROP_STRING }]
|
37
38
|
]));
|
38
39
|
registerFormWidget(FormWidgetType.UPLOAD, new Map([
|
39
40
|
['disabled', PROP_BOOLEAN],
|
@@ -168,14 +169,14 @@ function FileUploadComponent_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
168
169
|
i0.ɵɵadvance();
|
169
170
|
i0.ɵɵproperty("innerHTML", ctx_r1.caption, i0.ɵɵsanitizeHtml);
|
170
171
|
} }
|
171
|
-
function
|
172
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_span_8_Template(rf, ctx) { if (rf & 1) {
|
172
173
|
i0.ɵɵelement(0, "span");
|
173
174
|
i0.ɵɵpipe(1, "stateClass");
|
174
175
|
} if (rf & 2) {
|
175
176
|
const ft_r7 = i0.ɵɵnextContext(2).$implicit;
|
176
177
|
i0.ɵɵclassMapInterpolate1("status-icon ", i0.ɵɵpipeBind1(1, 3, ft_r7.status), "");
|
177
178
|
} }
|
178
|
-
function
|
179
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_span_10_Template(rf, ctx) { if (rf & 1) {
|
179
180
|
i0.ɵɵelementStart(0, "span", 47);
|
180
181
|
i0.ɵɵtext(1);
|
181
182
|
i0.ɵɵpipe(2, "filesize");
|
@@ -185,7 +186,7 @@ function FileUploadComponent_ul_4_div_1_li_1_span_10_Template(rf, ctx) { if (rf
|
|
185
186
|
i0.ɵɵadvance();
|
186
187
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ft_r7.size, 0));
|
187
188
|
} }
|
188
|
-
function
|
189
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_span_11_Template(rf, ctx) { if (rf & 1) {
|
189
190
|
i0.ɵɵelement(0, "span", 34);
|
190
191
|
i0.ɵɵpipe(1, "stateClass");
|
191
192
|
} if (rf & 2) {
|
@@ -194,12 +195,12 @@ function FileUploadComponent_ul_4_div_1_li_1_span_11_Template(rf, ctx) { if (rf
|
|
194
195
|
i0.ɵɵclassMapInterpolate1("status-icon ", i0.ɵɵpipeBind1(1, 4, ft_r7.status), "");
|
195
196
|
i0.ɵɵpropertyInterpolate("title", ft_r7.errMsg || ctx_r1.appLocale.MESSAGE_FILE_UPLOAD_FAILED);
|
196
197
|
} }
|
197
|
-
function
|
198
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_span_12_Template(rf, ctx) { if (rf & 1) {
|
198
199
|
i0.ɵɵelementStart(0, "span", 48);
|
199
200
|
i0.ɵɵtext(1, "Upload Failed");
|
200
201
|
i0.ɵɵelementEnd();
|
201
202
|
} }
|
202
|
-
function
|
203
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_div_13_Template(rf, ctx) { if (rf & 1) {
|
203
204
|
i0.ɵɵelementStart(0, "div", 49);
|
204
205
|
i0.ɵɵelement(1, "div", 50);
|
205
206
|
i0.ɵɵelementEnd();
|
@@ -208,7 +209,7 @@ function FileUploadComponent_ul_4_div_1_li_1_div_13_Template(rf, ctx) { if (rf &
|
|
208
209
|
i0.ɵɵadvance();
|
209
210
|
i0.ɵɵproperty("ngClass", ft_r7.status === "error" ? "progress-bar-danger" : "progress-bar-info")("ngStyle", i0.ɵɵpureFunction1(2, _c3, ft_r7.progress + "%"));
|
210
211
|
} }
|
211
|
-
function
|
212
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_div_14_Template(rf, ctx) { if (rf & 1) {
|
212
213
|
i0.ɵɵelementStart(0, "div", 51);
|
213
214
|
i0.ɵɵtext(1);
|
214
215
|
i0.ɵɵelementEnd();
|
@@ -217,17 +218,17 @@ function FileUploadComponent_ul_4_div_1_li_1_div_14_Template(rf, ctx) { if (rf &
|
|
217
218
|
i0.ɵɵadvance();
|
218
219
|
i0.ɵɵtextInterpolate1("", ft_r7.progress + "%", " ");
|
219
220
|
} }
|
220
|
-
function
|
221
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_div_15_Template(rf, ctx) { if (rf & 1) {
|
221
222
|
const _r8 = i0.ɵɵgetCurrentView();
|
222
223
|
i0.ɵɵelementStart(0, "div", 45)(1, "a", 52);
|
223
|
-
i0.ɵɵlistener("click", function
|
224
|
+
i0.ɵɵlistener("click", function FileUploadComponent_ul_4_ng_container_1_li_1_div_15_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r8); const ft_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.abortFileUpload(ft_r7)); });
|
224
225
|
i0.ɵɵelement(2, "i", 53);
|
225
226
|
i0.ɵɵelementEnd()();
|
226
227
|
} }
|
227
|
-
function
|
228
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_a_17_Template(rf, ctx) { if (rf & 1) {
|
228
229
|
const _r9 = i0.ɵɵgetCurrentView();
|
229
230
|
i0.ɵɵelementStart(0, "a", 54);
|
230
|
-
i0.ɵɵlistener("click", function
|
231
|
+
i0.ɵɵlistener("click", function FileUploadComponent_ul_4_ng_container_1_li_1_a_17_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r9); const ft_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.clear(ft_r7)); });
|
231
232
|
i0.ɵɵelement(1, "i");
|
232
233
|
i0.ɵɵelementEnd();
|
233
234
|
} if (rf & 2) {
|
@@ -236,31 +237,35 @@ function FileUploadComponent_ul_4_div_1_li_1_a_17_Template(rf, ctx) { if (rf & 1
|
|
236
237
|
i0.ɵɵadvance();
|
237
238
|
i0.ɵɵclassMap(ctx_r1.cleariconclass);
|
238
239
|
} }
|
239
|
-
function
|
240
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_div_18_Template(rf, ctx) { if (rf & 1) {
|
240
241
|
const _r10 = i0.ɵɵgetCurrentView();
|
241
|
-
i0.ɵɵelementStart(0, "div", 45)(1, "a",
|
242
|
-
i0.ɵɵlistener("click", function
|
243
|
-
i0.ɵɵelement(2, "i",
|
242
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "a", 54);
|
243
|
+
i0.ɵɵlistener("click", function FileUploadComponent_ul_4_ng_container_1_li_1_div_18_Template_a_click_1_listener($event) { i0.ɵɵrestoreView(_r10); const ft_r7 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onFileDelete($event, ft_r7)); });
|
244
|
+
i0.ɵɵelement(2, "i", 55);
|
244
245
|
i0.ɵɵelementEnd()();
|
246
|
+
} if (rf & 2) {
|
247
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
248
|
+
i0.ɵɵadvance();
|
249
|
+
i0.ɵɵpropertyInterpolate("title", ctx_r1.deleteiconhint);
|
245
250
|
} }
|
246
|
-
function
|
251
|
+
function FileUploadComponent_ul_4_ng_container_1_li_1_Template(rf, ctx) { if (rf & 1) {
|
247
252
|
i0.ɵɵelementStart(0, "li", 32)(1, "div", 33);
|
248
253
|
i0.ɵɵelement(2, "div", 34);
|
249
254
|
i0.ɵɵpipe(3, "fileIconClass");
|
250
255
|
i0.ɵɵelementStart(4, "div", 35)(5, "p", 36)(6, "span", 37);
|
251
256
|
i0.ɵɵtext(7);
|
252
257
|
i0.ɵɵelementEnd();
|
253
|
-
i0.ɵɵtemplate(8,
|
258
|
+
i0.ɵɵtemplate(8, FileUploadComponent_ul_4_ng_container_1_li_1_span_8_Template, 2, 5, "span", 38);
|
254
259
|
i0.ɵɵelement(9, "br");
|
255
|
-
i0.ɵɵtemplate(10,
|
260
|
+
i0.ɵɵtemplate(10, FileUploadComponent_ul_4_ng_container_1_li_1_span_10_Template, 3, 4, "span", 39)(11, FileUploadComponent_ul_4_ng_container_1_li_1_span_11_Template, 2, 6, "span", 40)(12, FileUploadComponent_ul_4_ng_container_1_li_1_span_12_Template, 2, 0, "span", 41);
|
256
261
|
i0.ɵɵelementEnd();
|
257
|
-
i0.ɵɵtemplate(13,
|
262
|
+
i0.ɵɵtemplate(13, FileUploadComponent_ul_4_ng_container_1_li_1_div_13_Template, 2, 4, "div", 42)(14, FileUploadComponent_ul_4_ng_container_1_li_1_div_14_Template, 2, 1, "div", 43);
|
258
263
|
i0.ɵɵelementEnd();
|
259
|
-
i0.ɵɵtemplate(15,
|
264
|
+
i0.ɵɵtemplate(15, FileUploadComponent_ul_4_ng_container_1_li_1_div_15_Template, 3, 0, "div", 44);
|
260
265
|
i0.ɵɵelementStart(16, "div", 45);
|
261
|
-
i0.ɵɵtemplate(17,
|
266
|
+
i0.ɵɵtemplate(17, FileUploadComponent_ul_4_ng_container_1_li_1_a_17_Template, 2, 4, "a", 46);
|
262
267
|
i0.ɵɵelementEnd();
|
263
|
-
i0.ɵɵtemplate(18,
|
268
|
+
i0.ɵɵtemplate(18, FileUploadComponent_ul_4_ng_container_1_li_1_div_18_Template, 3, 1, "div", 44);
|
264
269
|
i0.ɵɵelementEnd()();
|
265
270
|
} if (rf & 2) {
|
266
271
|
const ft_r7 = i0.ɵɵnextContext().$implicit;
|
@@ -271,7 +276,7 @@ function FileUploadComponent_ul_4_div_1_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
271
276
|
i0.ɵɵadvance(5);
|
272
277
|
i0.ɵɵtextInterpolate(ft_r7.storageName || ft_r7.name);
|
273
278
|
i0.ɵɵadvance();
|
274
|
-
i0.ɵɵproperty("ngIf", ft_r7.status === "success");
|
279
|
+
i0.ɵɵproperty("ngIf", ft_r7.status === "success" && (!ctx_r1.datasource || ctx_r1.datasource && (ft_r7._response == null ? null : ft_r7._response.success)));
|
275
280
|
i0.ɵɵadvance(2);
|
276
281
|
i0.ɵɵproperty("ngIf", ft_r7.fileLength !== 0);
|
277
282
|
i0.ɵɵadvance();
|
@@ -287,12 +292,12 @@ function FileUploadComponent_ul_4_div_1_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
287
292
|
i0.ɵɵadvance(2);
|
288
293
|
i0.ɵɵproperty("ngIf", ctx_r1.cleariconclass !== "" && ft_r7.status !== "onProgress");
|
289
294
|
i0.ɵɵadvance();
|
290
|
-
i0.ɵɵproperty("ngIf", ft_r7.status === "success");
|
295
|
+
i0.ɵɵproperty("ngIf", ft_r7.status === "success" && (!ctx_r1.datasource || ctx_r1.datasource && (ft_r7._response == null ? null : ft_r7._response.success)));
|
291
296
|
} }
|
292
|
-
function
|
293
|
-
i0.ɵɵ
|
294
|
-
i0.ɵɵtemplate(1,
|
295
|
-
i0.ɵɵ
|
297
|
+
function FileUploadComponent_ul_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
298
|
+
i0.ɵɵelementContainerStart(0);
|
299
|
+
i0.ɵɵtemplate(1, FileUploadComponent_ul_4_ng_container_1_li_1_Template, 19, 16, "li", 31);
|
300
|
+
i0.ɵɵelementContainerEnd();
|
296
301
|
} if (rf & 2) {
|
297
302
|
const ft_r7 = ctx.$implicit;
|
298
303
|
i0.ɵɵadvance();
|
@@ -300,7 +305,7 @@ function FileUploadComponent_ul_4_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
300
305
|
} }
|
301
306
|
function FileUploadComponent_ul_4_Template(rf, ctx) { if (rf & 1) {
|
302
307
|
i0.ɵɵelementStart(0, "ul", 29);
|
303
|
-
i0.ɵɵtemplate(1,
|
308
|
+
i0.ɵɵtemplate(1, FileUploadComponent_ul_4_ng_container_1_Template, 2, 1, "ng-container", 30);
|
304
309
|
i0.ɵɵelementEnd();
|
305
310
|
} if (rf & 2) {
|
306
311
|
const ctx_r1 = i0.ɵɵnextContext();
|
@@ -309,7 +314,7 @@ function FileUploadComponent_ul_4_Template(rf, ctx) { if (rf & 1) {
|
|
309
314
|
i0.ɵɵproperty("ngForOf", ctx_r1.uploadedFiles);
|
310
315
|
} }
|
311
316
|
function FileUploadComponent_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
|
312
|
-
i0.ɵɵelementStart(0, "li",
|
317
|
+
i0.ɵɵelementStart(0, "li", 58)(1, "div", 33);
|
313
318
|
i0.ɵɵelement(2, "div", 59);
|
314
319
|
i0.ɵɵelementStart(3, "div", 35)(4, "p", 60)(5, "label", 37);
|
315
320
|
i0.ɵɵtext(6);
|
@@ -325,8 +330,8 @@ function FileUploadComponent_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
325
330
|
i0.ɵɵtextInterpolate(ft_r11.name);
|
326
331
|
} }
|
327
332
|
function FileUploadComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
|
328
|
-
i0.ɵɵelementStart(0, "ul",
|
329
|
-
i0.ɵɵtemplate(1, FileUploadComponent_ul_5_li_1_Template, 10, 1, "li",
|
333
|
+
i0.ɵɵelementStart(0, "ul", 56);
|
334
|
+
i0.ɵɵtemplate(1, FileUploadComponent_ul_5_li_1_Template, 10, 1, "li", 57);
|
330
335
|
i0.ɵɵelementEnd();
|
331
336
|
} if (rf & 2) {
|
332
337
|
const ctx_r1 = i0.ɵɵnextContext();
|
@@ -443,6 +448,9 @@ class FileUploadComponent extends StylableComponent {
|
|
443
448
|
* @param $files
|
444
449
|
*/
|
445
450
|
onSelectEventCall($event, $files) {
|
451
|
+
$files.forEach(file => {
|
452
|
+
file.uniqueId = this.idGenerator.nextUid();
|
453
|
+
});
|
446
454
|
this.selectedFiles = $files;
|
447
455
|
this.uploadedFiles = this.multiple ? [...this.uploadedFiles, ...$files] : $files;
|
448
456
|
setTimeout(() => {
|
@@ -498,34 +506,36 @@ class FileUploadComponent extends StylableComponent {
|
|
498
506
|
}
|
499
507
|
// Make call if there are valid files else no call is made
|
500
508
|
if ($files.length) {
|
501
|
-
this.progressObservable = new Subject();
|
502
509
|
// EVENT: ON_BEFORE_SELECT
|
503
510
|
beforeSelectVal = this.invokeEventCallback('beforeselect', {
|
504
511
|
$event: $.extend($event.$files || {}, $files),
|
505
512
|
files: $files
|
506
513
|
});
|
507
514
|
if (this.datasource) {
|
508
|
-
this.
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
if (file.
|
514
|
-
file.
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
file.
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
515
|
+
if (!this.uploadProgressSubscription) {
|
516
|
+
this.progressObservable = new Subject();
|
517
|
+
this.datasource._progressObservable = this.progressObservable;
|
518
|
+
this.uploadProgressSubscription = this.datasource._progressObservable.asObservable().subscribe((progressObj) => {
|
519
|
+
forEach(this.uploadedFiles, (file) => {
|
520
|
+
if (file.name === progressObj.fileName && file.uniqueId === progressObj.uniqueId) {
|
521
|
+
file.progress = progressObj.progress;
|
522
|
+
if (file.progress === 100) {
|
523
|
+
file.status = 'success';
|
524
|
+
}
|
525
|
+
else {
|
526
|
+
file.status = progressObj.status;
|
527
|
+
if (progressObj.errMsg) {
|
528
|
+
file.errMsg = progressObj.errMsg;
|
529
|
+
this.invokeEventCallback('error', {
|
530
|
+
$event,
|
531
|
+
files: file
|
532
|
+
});
|
533
|
+
}
|
524
534
|
}
|
525
535
|
}
|
526
|
-
}
|
536
|
+
});
|
527
537
|
});
|
528
|
-
}
|
538
|
+
}
|
529
539
|
}
|
530
540
|
else {
|
531
541
|
this.selectedFiles = $files;
|
@@ -550,17 +560,16 @@ class FileUploadComponent extends StylableComponent {
|
|
550
560
|
onOk: () => {
|
551
561
|
if (this.deletedatasource) {
|
552
562
|
this.deletedatasource.setInput('file', file._response.fileName || file.name);
|
553
|
-
this.
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
});
|
563
|
+
if (!this.deleteProgressSubscription) {
|
564
|
+
this.deleteFileObservable = new Subject();
|
565
|
+
this.deletedatasource._deleteFileObservable = this.deleteFileObservable;
|
566
|
+
this.deletedatasource._deleteFileObservable.asObservable().subscribe((response) => {
|
567
|
+
if (response.status === "success") {
|
568
|
+
this.selectedFiles = this.selectedFiles.filter((fileObj) => file !== fileObj) || [];
|
569
|
+
this.uploadedFiles = this.uploadedFiles.filter((fileObj) => file !== fileObj) || [];
|
570
|
+
}
|
571
|
+
});
|
572
|
+
}
|
564
573
|
}
|
565
574
|
this.invokeEventCallback('delete', { $event: file });
|
566
575
|
this.dialogService.closeAppConfirmDialog();
|
@@ -683,6 +692,7 @@ class FileUploadComponent extends StylableComponent {
|
|
683
692
|
this.defaultAllowedExtensions = this.allowedFileUploadExtensions.split(',').map(item => item.trim()).map(item => item.endsWith('/*') ? item : `.${item}`);
|
684
693
|
this.chooseFilter = this.defaultAllowedExtensions.includes('*/*') ? '' : this.defaultAllowedExtensions;
|
685
694
|
this.fileUploadMessage = 'Drop your files here or click here to browse';
|
695
|
+
this.idGenerator = new IDGenerator('file-');
|
686
696
|
this.uploadUrl = 'services';
|
687
697
|
// styler(this.nativeElement, this);
|
688
698
|
}
|
@@ -702,11 +712,17 @@ class FileUploadComponent extends StylableComponent {
|
|
702
712
|
document.removeEventListener('drop', this.dropCb);
|
703
713
|
document.removeEventListener('mouseleave', this.dropCb);
|
704
714
|
super.ngOnDestroy();
|
715
|
+
const subscriptions = [this.uploadProgressSubscription, this.deleteProgressSubscription];
|
716
|
+
subscriptions.forEach(subscription => {
|
717
|
+
if (subscription) {
|
718
|
+
subscription.unsubscribe();
|
719
|
+
}
|
720
|
+
});
|
705
721
|
}
|
706
722
|
static { this.ɵfac = function FileUploadComponent_Factory(t) { return new (t || FileUploadComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.App), i0.ɵɵinjectAttribute('select.event'), i0.ɵɵdirectiveInject(i1.AbstractDialogService), i0.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
707
723
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileUploadComponent, selectors: [["", "wmFileUpload", ""]], features: [i0.ɵɵProvidersFeature([
|
708
724
|
provideAsWidgetRef(FileUploadComponent)
|
709
|
-
]), i0.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 6, vars: 5, consts: [["init-widget", "", 1, "app-fileupload"], ["class", "app-multi-file-upload", 4, "ngIf"], ["class", "app-single-file-upload", 4, "ngIf"], ["focus-target", "", "class", "app-button btn btn-default", 3, "disabled", "click", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", "title", 4, "ngIf"], [1, "app-multi-file-upload"], ["id", "dropzone", 1, "drop-box", 3, "click", "dragover", "drop", "ngClass"], [1, "message"], [1, "upload-label", 3, "innerHtml"], [1, "form-horizontal", 3, "name"], ["class", "file-input", "type", "file", "name", "files", "multiple", "", 3, "disabled", "accept", "click", "change", 4, "ngIf"], ["href", "javascript:void(0);", 1, "app-anchor", "upload-label"], ["class", "upload-extensions", 3, "innerHtml", 4, "ngIf"], ["class", "upload-extensions", 4, "ngIf"], ["type", "file", "name", "files", "multiple", "", 1, "file-input", 3, "click", "change", "disabled", "accept"], [1, "upload-extensions", 3, "innerHtml"], [1, "upload-extensions"], [1, "app-single-file-upload"], [1, "app-button-wrapper"], ["class", "file-input", "multiple", "", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["class", "file-input", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["id", "dropzone", "focus-target", "", 1, "app-button", "btn", "btn-default", 3, "ngClass"], ["aria-hidden", "true"], [1, "caption", 3, "innerHTML"], [1, "app-files-upload-status", "single"], ["multiple", "", "name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["focus-target", "", 1, "app-button", "btn", "btn-default", 3, "click", "disabled"], [1, "list-group", "file-upload", 3, "ngStyle"], [4, "ngFor", "ngForOf"], ["class", "list-group-item file-upload-status", 4, "ngIf"], [1, "list-group-item", "file-upload-status"], [1, "media", "upload-file-list"], [3, "title"], [1, "media-body", "media-middle", "file-details"], [1, "uploaddetails", "col-md-3"], [1, "upload-title"], [3, "class", 4, "ngIf"], ["class", "filesize", 4, "ngIf"], [3, "class", "title", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "progress col-md-7 upload-progress", 4, "ngIf"], ["class", "col-md-1 upload-progress-percentage", 4, "ngIf"], ["class", "media-right media-middle", 4, "ngIf"], [1, "media-right", "media-middle"], ["class", "btn btn-transparent btn-default status-icon", "type", "button", 3, "title", "click", 4, "ngIf"], [1, "filesize"], [1, "error-message"], [1, "progress", "col-md-7", "upload-progress"], [1, "progress-bar", "progress-bar-striped", 3, "ngClass", "ngStyle"], [1, "col-md-1", "upload-progress-percentage"], ["type", "button", 1, "btn", "btn-transparent", "file-upload-stop", 3, "click"], [1, "wi", "wi-close"], ["
|
725
|
+
]), i0.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 6, vars: 5, consts: [["init-widget", "", 1, "app-fileupload"], ["class", "app-multi-file-upload", 4, "ngIf"], ["class", "app-single-file-upload", 4, "ngIf"], ["focus-target", "", "class", "app-button btn btn-default", 3, "disabled", "click", 4, "ngIf"], ["class", "list-group file-upload", "tabindex", "0", 3, "ngStyle", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", "title", 4, "ngIf"], [1, "app-multi-file-upload"], ["id", "dropzone", 1, "drop-box", 3, "click", "dragover", "drop", "ngClass"], [1, "message"], [1, "upload-label", 3, "innerHtml"], [1, "form-horizontal", 3, "name"], ["class", "file-input", "type", "file", "name", "files", "multiple", "", 3, "disabled", "accept", "click", "change", 4, "ngIf"], ["href", "javascript:void(0);", 1, "app-anchor", "upload-label"], ["class", "upload-extensions", 3, "innerHtml", 4, "ngIf"], ["class", "upload-extensions", 4, "ngIf"], ["type", "file", "name", "files", "multiple", "", 1, "file-input", 3, "click", "change", "disabled", "accept"], [1, "upload-extensions", 3, "innerHtml"], [1, "upload-extensions"], [1, "app-single-file-upload"], [1, "app-button-wrapper"], ["class", "file-input", "multiple", "", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["class", "file-input", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["id", "dropzone", "focus-target", "", 1, "app-button", "btn", "btn-default", 3, "ngClass"], ["aria-hidden", "true"], [1, "caption", 3, "innerHTML"], [1, "app-files-upload-status", "single"], ["multiple", "", "name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["focus-target", "", 1, "app-button", "btn", "btn-default", 3, "click", "disabled"], ["tabindex", "0", 1, "list-group", "file-upload", 3, "ngStyle"], [4, "ngFor", "ngForOf"], ["class", "list-group-item file-upload-status", "tabindex", "0", 4, "ngIf"], ["tabindex", "0", 1, "list-group-item", "file-upload-status"], [1, "media", "upload-file-list"], [3, "title"], [1, "media-body", "media-middle", "file-details"], [1, "uploaddetails", "col-md-3"], [1, "upload-title"], [3, "class", 4, "ngIf"], ["class", "filesize", 4, "ngIf"], [3, "class", "title", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "progress col-md-7 upload-progress", 4, "ngIf"], ["class", "col-md-1 upload-progress-percentage", 4, "ngIf"], ["class", "media-right media-middle", 4, "ngIf"], [1, "media-right", "media-middle"], ["href", "javascript:void(0)", "class", "btn btn-transparent btn-default status-icon", "type", "button", 3, "title", "click", 4, "ngIf"], [1, "filesize"], [1, "error-message"], [1, "progress", "col-md-7", "upload-progress"], [1, "progress-bar", "progress-bar-striped", 3, "ngClass", "ngStyle"], [1, "col-md-1", "upload-progress-percentage"], ["href", "javascript:void(0)", "type", "button", 1, "btn", "btn-transparent", "file-upload-stop", 3, "click"], [1, "wi", "wi-close"], ["href", "javascript:void(0)", "type", "button", 1, "btn", "btn-transparent", "btn-default", "status-icon", 3, "click", "title"], [1, "wi", "wi-delete"], [1, "list-group", "file-upload", 3, "ngStyle", "title"], ["class", "list-group-item file-upload-status", 4, "ngFor", "ngForOf"], [1, "list-group-item", "file-upload-status"], [1, "media-left", "media-middle", "file-icon", "fa", "fa-folder-o"], [1, "uploaddetails"], [1, "status-icon", "wi", "wi-cancel", "text-danger"]], template: function FileUploadComponent_Template(rf, ctx) { if (rf & 1) {
|
710
726
|
i0.ɵɵelementStart(0, "div", 0);
|
711
727
|
i0.ɵɵtemplate(1, FileUploadComponent_div_1_Template, 12, 13, "div", 1)(2, FileUploadComponent_div_2_Template, 9, 10, "div", 2)(3, FileUploadComponent_button_3_Template, 3, 5, "button", 3)(4, FileUploadComponent_ul_4_Template, 2, 5, "ul", 4)(5, FileUploadComponent_ul_5_Template, 2, 6, "ul", 5);
|
712
728
|
i0.ɵɵelementEnd();
|
@@ -727,7 +743,7 @@ class FileUploadComponent extends StylableComponent {
|
|
727
743
|
type: Component,
|
728
744
|
args: [{ selector: '[wmFileUpload]', providers: [
|
729
745
|
provideAsWidgetRef(FileUploadComponent)
|
730
|
-
], template: "<div class=\"app-fileupload\" init-widget>\n <!-- drag and drop files UI in web -->\n <div class=\"app-multi-file-upload\" *ngIf=\"!_isMobileType && multiple\">\n <div id=\"dropzone\" class=\"drop-box\" (click)=\"triggerFileSelect()\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\" (dragover)=\"dragOverHandler($event);\" (drop)=\"onFileDrop($event);\">\n <i class=\"{{iconclass}}\"></i>\n <div class=\"message\">\n <label [innerHtml]=\"caption\" class=\"upload-label\"></label>\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <input class=\"file-input\" [attr.aria-label]=\"hint || 'File selection field'\" type=\"file\" name=\"files\" *ngIf=\"multiple\" [disabled]=\"disabled\" [accept]=\"chooseFilter\" (click)=\"onFileElemClick($event)\" (change)=\"onFileSelect($event, $event.target.files)\" multiple >\n <a class=\"app-anchor upload-label\" href=\"javascript:void(0);\">{{ fileUploadMessage }}</a>\n </form>\n <label *ngIf=\"chooseFilter\" [innerHtml]=\"chooseFilter + ' only '\" class=\"upload-extensions\"></label>\n <span *ngIf=\"chooseFilter && maxfilesize\" class=\"upload-extensions\"> . </span>\n <label *ngIf=\"maxfilesize\" [innerHtml]=\"maxfilesize + 'MB max'\" class=\"upload-extensions\"></label>\n </div>\n </div>\n </div>\n <!-- single file upload in web and single , multiple file upload UI in mobile runmode -->\n <div class=\"app-single-file-upload\" *ngIf=\"!_isCordova && (!multiple || _isMobileType)\">\n <div class=\"app-button-wrapper\">\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <!-- support for file upload in Mobileapp in its runmode (Web) -->\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n multiple name=\"files\" type=\"file\">\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"!multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n name=\"files\" type=\"file\">\n <button id=\"dropzone\" focus-target class=\"app-button btn btn-default\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\">\n <i class=\"{{iconclass}}\" aria-hidden=\"true\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n </form>\n </div>\n <div class=\"app-files-upload-status single\"></div>\n </div>\n <!-- support for file upload in Mobile Application (device) -->\n <button *ngIf=\"_isCordova\" focus-target class=\"app-button btn btn-default\" (click)=\"openFileSelector()\" [disabled]=\"disabled\">\n <i class=\"{{iconclass}}\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n <!-- list of selectedfiles UI -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\"
|
746
|
+
], template: "<div class=\"app-fileupload\" init-widget>\n <!-- drag and drop files UI in web -->\n <div class=\"app-multi-file-upload\" *ngIf=\"!_isMobileType && multiple\">\n <div id=\"dropzone\" class=\"drop-box\" (click)=\"triggerFileSelect()\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\" (dragover)=\"dragOverHandler($event);\" (drop)=\"onFileDrop($event);\">\n <i class=\"{{iconclass}}\"></i>\n <div class=\"message\">\n <label [innerHtml]=\"caption\" class=\"upload-label\"></label>\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <input class=\"file-input\" [attr.aria-label]=\"hint || 'File selection field'\" type=\"file\" name=\"files\" *ngIf=\"multiple\" [disabled]=\"disabled\" [accept]=\"chooseFilter\" (click)=\"onFileElemClick($event)\" (change)=\"onFileSelect($event, $event.target.files)\" multiple >\n <a class=\"app-anchor upload-label\" href=\"javascript:void(0);\">{{ fileUploadMessage }}</a>\n </form>\n <label *ngIf=\"chooseFilter\" [innerHtml]=\"chooseFilter + ' only '\" class=\"upload-extensions\"></label>\n <span *ngIf=\"chooseFilter && maxfilesize\" class=\"upload-extensions\"> . </span>\n <label *ngIf=\"maxfilesize\" [innerHtml]=\"maxfilesize + 'MB max'\" class=\"upload-extensions\"></label>\n </div>\n </div>\n </div>\n <!-- single file upload in web and single , multiple file upload UI in mobile runmode -->\n <div class=\"app-single-file-upload\" *ngIf=\"!_isCordova && (!multiple || _isMobileType)\">\n <div class=\"app-button-wrapper\">\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <!-- support for file upload in Mobileapp in its runmode (Web) -->\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n multiple name=\"files\" type=\"file\">\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"!multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n name=\"files\" type=\"file\">\n <button id=\"dropzone\" focus-target class=\"app-button btn btn-default\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\">\n <i class=\"{{iconclass}}\" aria-hidden=\"true\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n </form>\n </div>\n <div class=\"app-files-upload-status single\"></div>\n </div>\n <!-- support for file upload in Mobile Application (device) -->\n <button *ngIf=\"_isCordova\" focus-target class=\"app-button btn btn-default\" (click)=\"openFileSelector()\" [disabled]=\"disabled\">\n <i class=\"{{iconclass}}\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n <!-- list of selectedfiles UI -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\"\n *ngIf=\"uploadedFiles.length > 0\" tabindex=\"0\">\n <ng-container *ngFor=\"let ft of uploadedFiles\">\n <li class=\"list-group-item file-upload-status\" *ngIf=\"ft.status !== 'abort'\" tabindex=\"0\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon {{getFileExtension(ft.name) | fileIconClass}}\" title=\"{{getFileExtension(ft.name)}}\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails col-md-3\">\n <span class=\"upload-title\">{{ ft.storageName || ft.name }}</span>\n <span *ngIf=\"ft.status === 'success' && (!datasource || (datasource && ft._response?.success))\"\n class=\"status-icon {{ft.status | stateClass }}\"></span>\n <br/>\n <span class=\"filesize\" *ngIf=\"ft.fileLength !== 0\">{{ft.size | filesize:0}}</span>\n <span *ngIf=\"ft.status === 'error'\"\n class=\"status-icon {{ft.status | stateClass }}\"\n title=\"{{ft.errMsg || this.appLocale.MESSAGE_FILE_UPLOAD_FAILED}}\"></span>\n <span *ngIf=\"ft.status === 'error'\" class=\"error-message\">Upload Failed</span>\n </p>\n <div *ngIf=\"ft.status === 'onProgress' || showprogressbar\"\n class=\"progress col-md-7 upload-progress\">\n <div [ngClass]=\"ft.status === 'error' ? 'progress-bar-danger' : 'progress-bar-info'\"\n [ngStyle]=\"{width: (ft.progress +'%')}\"\n class=\"progress-bar progress-bar-striped\"></div>\n </div>\n <div *ngIf=\"(ft.status === 'onProgress' || showprogressbar && showprogressbarpercentage) && ft.progress \"\n class=\"col-md-1 upload-progress-percentage\">{{ ft.progress + '%' }}\n </div>\n </div>\n <div class=\"media-right media-middle\" *ngIf=\"ft.status === 'onProgress' || ft.status === 'queued'\">\n <a href=\"javascript:void(0)\" class=\"btn btn-transparent file-upload-stop\" type=\"button\"\n (click)=\"abortFileUpload(ft)\">\n <i class=\"wi wi-close\"></i>\n </a>\n </div>\n <div class=\"media-right media-middle\">\n <a href=\"javascript:void(0)\" (click)=\"clear(ft)\"\n *ngIf=\"cleariconclass !== '' && ft.status !== 'onProgress'\"\n class=\"btn btn-transparent btn-default status-icon\" title=\"{{cleariconhint}}\" type=\"button\">\n <i class=\"{{cleariconclass}}\"></i>\n </a>\n </div>\n <div class=\"media-right media-middle\" *ngIf=\"ft.status === 'success' && (!datasource || (datasource && ft._response?.success))\">\n <a href=\"javascript:void(0)\" (click)=\"onFileDelete($event, ft)\"\n class=\"btn btn-transparent btn-default status-icon\" title=\"{{deleteiconhint}}\" type=\"button\">\n <i class=\"wi wi-delete\"></i>\n </a>\n </div>\n </div>\n </li>\n </ng-container>\n </ul>\n <!-- list of selectedfolders UI to show the error in title -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\" title=\"{{this.appLocale.MESSAGE_FOLDER_UPLOADS_NOT_ALLOWED}}\" *ngIf=\"selectedFolders.length > 0\" >\n <li *ngFor=\"let ft of selectedFolders\" class=\"list-group-item file-upload-status\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon fa fa-folder-o\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails\">\n <label class=\"upload-title\">{{ft.name}}</label><br/>\n </p>\n </div>\n <div class=\"media-right media-middle\" >\n <span class=\"status-icon wi wi-cancel text-danger\"></span>\n </div>\n </div>\n </li>\n </ul>\n</div>\n" }]
|
731
747
|
}], () => [{ type: i0.Injector }, { type: i1.App }, { type: undefined, decorators: [{
|
732
748
|
type: Attribute,
|
733
749
|
args: ['select.event']
|