aurelia-syncfusion-ej2-bridge 1.0.8 → 1.0.9
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/commonjs/common/constants.d.ts +4 -0
- package/dist/commonjs/common/constants.js +7 -0
- package/dist/commonjs/common/controlBase.d.ts +37 -0
- package/dist/commonjs/common/controlBase.js +161 -0
- package/dist/commonjs/common/controlContainer.d.ts +10 -0
- package/dist/commonjs/common/controlContainer.js +19 -0
- package/dist/commonjs/common/syncfusionWrapper.d.ts +15 -0
- package/dist/commonjs/common/syncfusionWrapper.js +44 -0
- package/dist/commonjs/configBuider.d.ts +42 -0
- package/dist/commonjs/configBuider.js +230 -0
- package/dist/commonjs/controlBindings.d.ts +155 -0
- package/dist/commonjs/controlBindings.js +189 -0
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/interfaces/IEJ2WidgetBridge.d.ts +6 -0
- package/dist/commonjs/interfaces/IEJ2WidgetBridge.js +2 -0
- package/dist/commonjs/interfaces/IEj2Uploader.d.ts +17 -0
- package/dist/commonjs/interfaces/IEj2Uploader.js +2 -0
- package/dist/commonjs/utilities/decorator.d.ts +2 -0
- package/dist/commonjs/utilities/decorator.js +63 -0
- package/dist/commonjs/widgets/accordion/ej2-accordion.d.ts +7 -0
- package/dist/commonjs/widgets/accordion/ej2-accordion.js +31 -0
- package/dist/commonjs/widgets/autoComplete/ej2-autoComplete.d.ts +7 -0
- package/dist/commonjs/widgets/autoComplete/ej2-autoComplete.js +29 -0
- package/dist/commonjs/widgets/button/ej2-button.d.ts +14 -0
- package/dist/commonjs/widgets/button/ej2-button.js +55 -0
- package/dist/commonjs/widgets/checkbox/ej2-checkbox-list.d.ts +17 -0
- package/dist/commonjs/widgets/checkbox/ej2-checkbox-list.js +77 -0
- package/dist/commonjs/widgets/checkbox/ej2-checkbox.d.ts +12 -0
- package/dist/commonjs/widgets/checkbox/ej2-checkbox.js +58 -0
- package/dist/commonjs/widgets/colorPicker/ej2-colorPicker.d.ts +8 -0
- package/dist/commonjs/widgets/colorPicker/ej2-colorPicker.js +35 -0
- package/dist/commonjs/widgets/comboBox/ej2-comboBox.d.ts +8 -0
- package/dist/commonjs/widgets/comboBox/ej2-comboBox.js +35 -0
- package/dist/commonjs/widgets/dashboardLayout/ej2-dashboardLayout.d.ts +7 -0
- package/dist/commonjs/widgets/dashboardLayout/ej2-dashboardLayout.js +29 -0
- package/dist/commonjs/widgets/datePicker/ej2-DatePicker.d.ts +8 -0
- package/dist/commonjs/widgets/datePicker/ej2-DatePicker.js +35 -0
- package/dist/commonjs/widgets/dateRangePicker/ej2-dateRangePicker.d.ts +8 -0
- package/dist/commonjs/widgets/dateRangePicker/ej2-dateRangePicker.js +37 -0
- package/dist/commonjs/widgets/dateTimePicker/ej2-dateTimePicker.d.ts +8 -0
- package/dist/commonjs/widgets/dateTimePicker/ej2-dateTimePicker.js +35 -0
- package/dist/commonjs/widgets/dropDownList/ej2-dropDownList.d.ts +9 -0
- package/dist/commonjs/widgets/dropDownList/ej2-dropDownList.js +39 -0
- package/dist/commonjs/widgets/dropDownTree/ej2-dropDownTree.d.ts +8 -0
- package/dist/commonjs/widgets/dropDownTree/ej2-dropDownTree.js +35 -0
- package/dist/commonjs/widgets/fileManager/ej2-fileManager.d.ts +9 -0
- package/dist/commonjs/widgets/fileManager/ej2-fileManager.js +34 -0
- package/dist/commonjs/widgets/grid/ej2-grid.d.ts +8 -0
- package/dist/commonjs/widgets/grid/ej2-grid.js +97 -0
- package/dist/commonjs/widgets/listView/ej2-listView.d.ts +8 -0
- package/dist/commonjs/widgets/listView/ej2-listView.js +34 -0
- package/dist/commonjs/widgets/maskedTextBox/ej2-maskedTextBox.d.ts +8 -0
- package/dist/commonjs/widgets/maskedTextBox/ej2-maskedTextBox.js +37 -0
- package/dist/commonjs/widgets/multiSelect/ej2-multiSelect.d.ts +10 -0
- package/dist/commonjs/widgets/multiSelect/ej2-multiSelect.js +44 -0
- package/dist/commonjs/widgets/numericTextBox/ej2-numericTextBox.d.ts +8 -0
- package/dist/commonjs/widgets/numericTextBox/ej2-numericTextBox.js +35 -0
- package/dist/commonjs/widgets/pager/ej2-pager.d.ts +7 -0
- package/dist/commonjs/widgets/pager/ej2-pager.js +29 -0
- package/dist/commonjs/widgets/progressButton/ej2-progress-button.d.ts +17 -0
- package/dist/commonjs/widgets/progressButton/ej2-progress-button.js +64 -0
- package/dist/commonjs/widgets/radio/ej2-radio.d.ts +13 -0
- package/dist/commonjs/widgets/radio/ej2-radio.js +54 -0
- package/dist/commonjs/widgets/richTextEditor/ej2-richTextEditor.d.ts +8 -0
- package/dist/commonjs/widgets/richTextEditor/ej2-richTextEditor.js +32 -0
- package/dist/commonjs/widgets/schedule/ej2-schedule.d.ts +8 -0
- package/dist/commonjs/widgets/schedule/ej2-schedule.js +32 -0
- package/dist/commonjs/widgets/sidebar/ej2-sidebar.d.ts +7 -0
- package/dist/commonjs/widgets/sidebar/ej2-sidebar.js +30 -0
- package/dist/commonjs/widgets/slider/ej2-slider.d.ts +10 -0
- package/dist/commonjs/widgets/slider/ej2-slider.js +52 -0
- package/dist/commonjs/widgets/splitter/ej2-splitter.d.ts +7 -0
- package/dist/commonjs/widgets/splitter/ej2-splitter.js +29 -0
- package/dist/commonjs/widgets/switch/ej2-switch.d.ts +11 -0
- package/dist/commonjs/widgets/switch/ej2-switch.js +52 -0
- package/dist/commonjs/widgets/textBox/ej2-textBox.d.ts +8 -0
- package/dist/commonjs/widgets/textBox/ej2-textBox.js +37 -0
- package/dist/commonjs/widgets/timePicker/ej2-timePicker.d.ts +8 -0
- package/dist/commonjs/widgets/timePicker/ej2-timePicker.js +35 -0
- package/dist/commonjs/widgets/timeline/ej2-timeline.d.ts +7 -0
- package/dist/commonjs/widgets/timeline/ej2-timeline.js +29 -0
- package/dist/commonjs/widgets/treeView/ej2-treeView.d.ts +7 -0
- package/dist/commonjs/widgets/treeView/ej2-treeView.js +29 -0
- package/dist/commonjs/widgets/uploader/ej2-uploader.d.ts +50 -0
- package/dist/commonjs/widgets/uploader/ej2-uploader.js +357 -0
- package/dist/native-modules/common/constants.d.ts +4 -0
- package/dist/native-modules/common/constants.js +4 -0
- package/dist/native-modules/common/controlBase.d.ts +37 -0
- package/dist/native-modules/common/controlBase.js +158 -0
- package/dist/native-modules/common/controlContainer.d.ts +10 -0
- package/dist/native-modules/common/controlContainer.js +15 -0
- package/dist/native-modules/common/syncfusionWrapper.d.ts +15 -0
- package/dist/native-modules/common/syncfusionWrapper.js +40 -0
- package/dist/native-modules/configBuider.d.ts +42 -0
- package/dist/native-modules/configBuider.js +226 -0
- package/dist/native-modules/controlBindings.d.ts +155 -0
- package/dist/native-modules/controlBindings.js +186 -0
- package/dist/native-modules/index.d.ts +6 -0
- package/dist/native-modules/index.js +12 -0
- package/dist/native-modules/interfaces/IEJ2WidgetBridge.d.ts +6 -0
- package/dist/native-modules/interfaces/IEJ2WidgetBridge.js +1 -0
- package/dist/native-modules/interfaces/IEj2Uploader.d.ts +17 -0
- package/dist/native-modules/interfaces/IEj2Uploader.js +1 -0
- package/dist/native-modules/utilities/decorator.d.ts +2 -0
- package/dist/native-modules/utilities/decorator.js +59 -0
- package/dist/native-modules/widgets/accordion/ej2-accordion.d.ts +7 -0
- package/dist/native-modules/widgets/accordion/ej2-accordion.js +28 -0
- package/dist/native-modules/widgets/autoComplete/ej2-autoComplete.d.ts +7 -0
- package/dist/native-modules/widgets/autoComplete/ej2-autoComplete.js +26 -0
- package/dist/native-modules/widgets/button/ej2-button.d.ts +14 -0
- package/dist/native-modules/widgets/button/ej2-button.js +52 -0
- package/dist/native-modules/widgets/checkbox/ej2-checkbox-list.d.ts +17 -0
- package/dist/native-modules/widgets/checkbox/ej2-checkbox-list.js +74 -0
- package/dist/native-modules/widgets/checkbox/ej2-checkbox.d.ts +12 -0
- package/dist/native-modules/widgets/checkbox/ej2-checkbox.js +55 -0
- package/dist/native-modules/widgets/colorPicker/ej2-colorPicker.d.ts +8 -0
- package/dist/native-modules/widgets/colorPicker/ej2-colorPicker.js +32 -0
- package/dist/native-modules/widgets/comboBox/ej2-comboBox.d.ts +8 -0
- package/dist/native-modules/widgets/comboBox/ej2-comboBox.js +32 -0
- package/dist/native-modules/widgets/dashboardLayout/ej2-dashboardLayout.d.ts +7 -0
- package/dist/native-modules/widgets/dashboardLayout/ej2-dashboardLayout.js +26 -0
- package/dist/native-modules/widgets/datePicker/ej2-DatePicker.d.ts +8 -0
- package/dist/native-modules/widgets/datePicker/ej2-DatePicker.js +32 -0
- package/dist/native-modules/widgets/dateRangePicker/ej2-dateRangePicker.d.ts +8 -0
- package/dist/native-modules/widgets/dateRangePicker/ej2-dateRangePicker.js +34 -0
- package/dist/native-modules/widgets/dateTimePicker/ej2-dateTimePicker.d.ts +8 -0
- package/dist/native-modules/widgets/dateTimePicker/ej2-dateTimePicker.js +32 -0
- package/dist/native-modules/widgets/dropDownList/ej2-dropDownList.d.ts +9 -0
- package/dist/native-modules/widgets/dropDownList/ej2-dropDownList.js +36 -0
- package/dist/native-modules/widgets/dropDownTree/ej2-dropDownTree.d.ts +8 -0
- package/dist/native-modules/widgets/dropDownTree/ej2-dropDownTree.js +32 -0
- package/dist/native-modules/widgets/fileManager/ej2-fileManager.d.ts +9 -0
- package/dist/native-modules/widgets/fileManager/ej2-fileManager.js +31 -0
- package/dist/native-modules/widgets/grid/ej2-grid.d.ts +8 -0
- package/dist/native-modules/widgets/grid/ej2-grid.js +94 -0
- package/dist/native-modules/widgets/listView/ej2-listView.d.ts +8 -0
- package/dist/native-modules/widgets/listView/ej2-listView.js +31 -0
- package/dist/native-modules/widgets/maskedTextBox/ej2-maskedTextBox.d.ts +8 -0
- package/dist/native-modules/widgets/maskedTextBox/ej2-maskedTextBox.js +34 -0
- package/dist/native-modules/widgets/multiSelect/ej2-multiSelect.d.ts +10 -0
- package/dist/native-modules/widgets/multiSelect/ej2-multiSelect.js +41 -0
- package/dist/native-modules/widgets/numericTextBox/ej2-numericTextBox.d.ts +8 -0
- package/dist/native-modules/widgets/numericTextBox/ej2-numericTextBox.js +32 -0
- package/dist/native-modules/widgets/pager/ej2-pager.d.ts +7 -0
- package/dist/native-modules/widgets/pager/ej2-pager.js +26 -0
- package/dist/native-modules/widgets/progressButton/ej2-progress-button.d.ts +17 -0
- package/dist/native-modules/widgets/progressButton/ej2-progress-button.js +61 -0
- package/dist/native-modules/widgets/radio/ej2-radio.d.ts +13 -0
- package/dist/native-modules/widgets/radio/ej2-radio.js +51 -0
- package/dist/native-modules/widgets/richTextEditor/ej2-richTextEditor.d.ts +8 -0
- package/dist/native-modules/widgets/richTextEditor/ej2-richTextEditor.js +29 -0
- package/dist/native-modules/widgets/schedule/ej2-schedule.d.ts +8 -0
- package/dist/native-modules/widgets/schedule/ej2-schedule.js +29 -0
- package/dist/native-modules/widgets/sidebar/ej2-sidebar.d.ts +7 -0
- package/dist/native-modules/widgets/sidebar/ej2-sidebar.js +27 -0
- package/dist/native-modules/widgets/slider/ej2-slider.d.ts +10 -0
- package/dist/native-modules/widgets/slider/ej2-slider.js +46 -0
- package/dist/native-modules/widgets/splitter/ej2-splitter.d.ts +7 -0
- package/dist/native-modules/widgets/splitter/ej2-splitter.js +26 -0
- package/dist/native-modules/widgets/switch/ej2-switch.d.ts +11 -0
- package/dist/native-modules/widgets/switch/ej2-switch.js +49 -0
- package/dist/native-modules/widgets/textBox/ej2-textBox.d.ts +8 -0
- package/dist/native-modules/widgets/textBox/ej2-textBox.js +34 -0
- package/dist/native-modules/widgets/timePicker/ej2-timePicker.d.ts +8 -0
- package/dist/native-modules/widgets/timePicker/ej2-timePicker.js +32 -0
- package/dist/native-modules/widgets/timeline/ej2-timeline.d.ts +7 -0
- package/dist/native-modules/widgets/timeline/ej2-timeline.js +26 -0
- package/dist/native-modules/widgets/treeView/ej2-treeView.d.ts +7 -0
- package/dist/native-modules/widgets/treeView/ej2-treeView.js +26 -0
- package/dist/native-modules/widgets/uploader/ej2-uploader.d.ts +50 -0
- package/dist/native-modules/widgets/uploader/ej2-uploader.js +354 -0
- package/package.json +1 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Ej2Uploader = void 0;
|
|
22
|
+
const constants_1 = require("../../common/constants");
|
|
23
|
+
const ej2_inputs_1 = require("@syncfusion/ej2-inputs");
|
|
24
|
+
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
25
|
+
const decorator_1 = require("../../utilities/decorator");
|
|
26
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
27
|
+
const uuid_1 = require("uuid");
|
|
28
|
+
const aurelia_framework_2 = require("aurelia-framework");
|
|
29
|
+
let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this._filesProperty = `${constants_1.constants.bindablePrefix}files`;
|
|
33
|
+
this.originalFiles = null;
|
|
34
|
+
this._filesCollectionSubscription = null;
|
|
35
|
+
this._privateIdProperty = "__id";
|
|
36
|
+
this.syncfusionWidgetType = ej2_inputs_1.Uploader;
|
|
37
|
+
this.mapAdditionalFilePropertiesToFiles = true;
|
|
38
|
+
this.sendAdditionalFilePropertiesAsFormData = true;
|
|
39
|
+
this.metadata = null;
|
|
40
|
+
this.formDataProperty = "metadata";
|
|
41
|
+
this.metadataGenerator = null;
|
|
42
|
+
this.uploadResultModel = null;
|
|
43
|
+
this.dataAdapter = null;
|
|
44
|
+
this.autoRemoveServerFiles = true;
|
|
45
|
+
this.context = null;
|
|
46
|
+
this.files = null;
|
|
47
|
+
this.firstBind = true;
|
|
48
|
+
this.serverDelete = true;
|
|
49
|
+
}
|
|
50
|
+
get _files() {
|
|
51
|
+
return this[this._filesProperty];
|
|
52
|
+
}
|
|
53
|
+
onWrapperCreated() {
|
|
54
|
+
this.widget.uploading = (args) => { this.onFileUpload(args); };
|
|
55
|
+
this.widget.success = (args) => { this.success(args); };
|
|
56
|
+
this.widget.failure = (args) => { this.failure(args); };
|
|
57
|
+
this.widget.removing = (args) => { this.removing(args); };
|
|
58
|
+
this.widget.change = (args) => { this.change(); };
|
|
59
|
+
if (this.dataAdapter) {
|
|
60
|
+
if (this.dataAdapter.remove) {
|
|
61
|
+
let _this = this;
|
|
62
|
+
this.widget.removeUploadedFile = function async(file, eventArgs, removeDirectly, custom) {
|
|
63
|
+
let formData = new FormData();
|
|
64
|
+
let selectedFiles = file;
|
|
65
|
+
_this.widget.trigger("removing", eventArgs, function (eventArgs) {
|
|
66
|
+
_this.widget.removingEventCallback(eventArgs, formData, selectedFiles, file);
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
this.widget.asyncSettings.removeUrl = null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
onfilesChanged() {
|
|
74
|
+
if (!this.firstBind) {
|
|
75
|
+
this.widget.clearAll();
|
|
76
|
+
this.recreate();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
recreating() {
|
|
80
|
+
this._filesCollectionSubscription.dispose();
|
|
81
|
+
this[this._filesProperty].splice(0, this[this._filesProperty].length, ...this.originalFiles);
|
|
82
|
+
}
|
|
83
|
+
recreated() {
|
|
84
|
+
this.initializeFileCollection();
|
|
85
|
+
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
86
|
+
}
|
|
87
|
+
initializeFileCollection() {
|
|
88
|
+
if (this.files && Array.isArray(this.files)) {
|
|
89
|
+
this.widget.files.push(...JSON.parse(JSON.stringify(this.files)));
|
|
90
|
+
}
|
|
91
|
+
if (this.widget.files) {
|
|
92
|
+
let extraProperties = [];
|
|
93
|
+
let widgetFiles = this.widget.getFilesData();
|
|
94
|
+
if (this.mapAdditionalFilePropertiesToFiles) {
|
|
95
|
+
extraProperties = this.getAdditionalFileProperties();
|
|
96
|
+
}
|
|
97
|
+
for (let i = 0; i < widgetFiles.length; i++) {
|
|
98
|
+
const file = widgetFiles[i];
|
|
99
|
+
this.initializeFile(file, i, extraProperties);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
initializeFile(widgetFile, i, extraProperties) {
|
|
104
|
+
let __id = (0, uuid_1.v4)();
|
|
105
|
+
widgetFile[this._privateIdProperty] = __id;
|
|
106
|
+
this._files[i][this._privateIdProperty] = __id;
|
|
107
|
+
extraProperties.forEach((prop) => {
|
|
108
|
+
widgetFile[prop] = this._files[i][prop];
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
onWidgetCreated() {
|
|
112
|
+
this.initializeFileCollection();
|
|
113
|
+
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
114
|
+
this.subscriptions.push(this._filesCollectionSubscription);
|
|
115
|
+
}
|
|
116
|
+
onBind() {
|
|
117
|
+
this.firstBind = false;
|
|
118
|
+
this.subscriptions.push(this.bindingEngine.propertyObserver(this, "files").subscribe(() => { this.onfilesChanged(); }));
|
|
119
|
+
if (this[this._filesProperty] && Array.isArray(this[this._filesProperty])) {
|
|
120
|
+
this.originalFiles = JSON.parse(JSON.stringify(this[this._filesProperty]));
|
|
121
|
+
}
|
|
122
|
+
else if (this.files && Array.isArray(this.files)) {
|
|
123
|
+
this.originalFiles = JSON.parse(JSON.stringify(this.files));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.originalFiles = [];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
createFilesCollectionSubscription() {
|
|
130
|
+
if (!this._files) {
|
|
131
|
+
this[this._filesProperty] = [];
|
|
132
|
+
}
|
|
133
|
+
return this.bindingEngine.collectionObserver(this._files).subscribe((changed) => { });
|
|
134
|
+
}
|
|
135
|
+
change() {
|
|
136
|
+
if (this.autoRemoveServerFiles) {
|
|
137
|
+
this.getFilesThatWereRemoved().forEach((file) => {
|
|
138
|
+
this.removing({
|
|
139
|
+
filesData: [file],
|
|
140
|
+
customFormData: null,
|
|
141
|
+
event: null,
|
|
142
|
+
cancel: false
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
getFilesThatWereRemoved() {
|
|
148
|
+
let filesToRemove = [];
|
|
149
|
+
let widgetFiles = this.widget.getFilesData();
|
|
150
|
+
if (this[this._filesProperty].length !== widgetFiles.length) {
|
|
151
|
+
for (let i = 0; i < this[this._filesProperty].length; i++) {
|
|
152
|
+
const file = this[this._filesProperty][i];
|
|
153
|
+
if (!widgetFiles.find((x) => x[this._privateIdProperty] === file[this._privateIdProperty])) {
|
|
154
|
+
filesToRemove.push(file);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return filesToRemove;
|
|
159
|
+
}
|
|
160
|
+
removeAll() {
|
|
161
|
+
this.widget.getFilesData().forEach((file) => {
|
|
162
|
+
this.removeFile(file);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
removeFile(file) {
|
|
166
|
+
this.widget.remove(file);
|
|
167
|
+
}
|
|
168
|
+
removing(args) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
let event = new CustomEvent("on-removing", {
|
|
171
|
+
bubbles: true,
|
|
172
|
+
detail: args
|
|
173
|
+
});
|
|
174
|
+
this.element.dispatchEvent(event);
|
|
175
|
+
if (args.cancel) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (this.dataAdapter && this.dataAdapter.remove) {
|
|
179
|
+
try {
|
|
180
|
+
if (this.serverDelete) {
|
|
181
|
+
yield this.dataAdapter.remove.call(this.context || this.bindingContext, args.filesData[0]);
|
|
182
|
+
}
|
|
183
|
+
this.onRemoveSuccess(args);
|
|
184
|
+
this.onWidgetRemoveComplete(null, args);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
this.onWidgetRemoveFailed(error, args);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
onWidgetRemoveComplete(response, args) {
|
|
193
|
+
this.widget.removeCompleted(response, args.filesData[0], false);
|
|
194
|
+
}
|
|
195
|
+
onWidgetRemoveFailed(e, args) {
|
|
196
|
+
this.widget.removeFailed(e, args.filesData[0], false);
|
|
197
|
+
}
|
|
198
|
+
onRemoveSuccess(args) {
|
|
199
|
+
let _file = args.filesData[0];
|
|
200
|
+
let index = this[this._filesProperty].findIndex((x) => x.__id === _file.__id);
|
|
201
|
+
if (index !== -1) {
|
|
202
|
+
const removedFile = this[this._filesProperty].splice(index, 1)[0];
|
|
203
|
+
let event = new CustomEvent("on-remove-success", {
|
|
204
|
+
bubbles: true,
|
|
205
|
+
detail: { args: args, removedFile: removedFile }
|
|
206
|
+
});
|
|
207
|
+
this.element.dispatchEvent(event);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
success(args) {
|
|
211
|
+
if (args.operation === "upload") {
|
|
212
|
+
let response = JSON.parse(args.e.target.response);
|
|
213
|
+
let _uploadedFile = args.file;
|
|
214
|
+
let fileName = _uploadedFile.name.substr(0, _uploadedFile.name.length - (_uploadedFile.type.length + 1));
|
|
215
|
+
let additionalProperties = {};
|
|
216
|
+
additionalProperties[this._privateIdProperty] = (0, uuid_1.v4)();
|
|
217
|
+
if (this.uploadResultModel) {
|
|
218
|
+
for (let prop in this.uploadResultModel) {
|
|
219
|
+
additionalProperties[this.uploadResultModel[prop]] = response[prop];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
let file = {
|
|
223
|
+
name: fileName,
|
|
224
|
+
size: _uploadedFile.size,
|
|
225
|
+
type: `.${_uploadedFile.type}`
|
|
226
|
+
};
|
|
227
|
+
Object.assign(_uploadedFile, additionalProperties);
|
|
228
|
+
Object.assign(file, additionalProperties);
|
|
229
|
+
if (this[this._filesProperty] === null) {
|
|
230
|
+
this[this._filesProperty] = [];
|
|
231
|
+
}
|
|
232
|
+
this[this._filesProperty].push(file);
|
|
233
|
+
let uploadedEvent = new CustomEvent("on-uploaded", {
|
|
234
|
+
bubbles: true,
|
|
235
|
+
detail: { args: args, uploadedFile: file }
|
|
236
|
+
});
|
|
237
|
+
this.element.dispatchEvent(uploadedEvent);
|
|
238
|
+
}
|
|
239
|
+
else if (args.operation === "remove") {
|
|
240
|
+
}
|
|
241
|
+
let successEvent = new CustomEvent("on-success", {
|
|
242
|
+
bubbles: true,
|
|
243
|
+
detail: args
|
|
244
|
+
});
|
|
245
|
+
this.element.dispatchEvent(successEvent);
|
|
246
|
+
}
|
|
247
|
+
failure(args) {
|
|
248
|
+
let event = new CustomEvent("on-failure", {
|
|
249
|
+
bubbles: true,
|
|
250
|
+
detail: args
|
|
251
|
+
});
|
|
252
|
+
this.element.dispatchEvent(event);
|
|
253
|
+
}
|
|
254
|
+
getAdditionalFileProperties() {
|
|
255
|
+
let extraProperties = [];
|
|
256
|
+
if (this[this._filesProperty] && this[this._filesProperty].length > 0) {
|
|
257
|
+
for (let prop in this[this._filesProperty][0]) {
|
|
258
|
+
if (prop !== "name" && prop !== "size" && prop !== "type") {
|
|
259
|
+
extraProperties.push(prop);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return extraProperties;
|
|
264
|
+
}
|
|
265
|
+
onFileUpload(args) {
|
|
266
|
+
let _metadata = this.createMetadata(args.fileData);
|
|
267
|
+
if (_metadata) {
|
|
268
|
+
if (this.formDataProperty) {
|
|
269
|
+
let formData = {};
|
|
270
|
+
formData[this.formDataProperty] = JSON.stringify(_metadata);
|
|
271
|
+
args.customFormData = [formData];
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
let formData = [];
|
|
275
|
+
for (let prop in _metadata) {
|
|
276
|
+
let kvp = {};
|
|
277
|
+
kvp[prop] = _metadata[prop];
|
|
278
|
+
formData.push(kvp);
|
|
279
|
+
}
|
|
280
|
+
args.customFormData = formData;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
let event = new CustomEvent("on-uploading", {
|
|
284
|
+
bubbles: true,
|
|
285
|
+
detail: args
|
|
286
|
+
});
|
|
287
|
+
this.element.dispatchEvent(event);
|
|
288
|
+
}
|
|
289
|
+
createMetadata(file) {
|
|
290
|
+
let _metadata = null;
|
|
291
|
+
if (this.sendAdditionalFilePropertiesAsFormData) {
|
|
292
|
+
if (_metadata === null) {
|
|
293
|
+
_metadata = {};
|
|
294
|
+
}
|
|
295
|
+
let props = this.getAdditionalFileProperties();
|
|
296
|
+
props.forEach((prop) => {
|
|
297
|
+
_metadata[prop] = file[prop];
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
if (this.metadata !== null) {
|
|
301
|
+
if (_metadata === null) {
|
|
302
|
+
_metadata = {};
|
|
303
|
+
}
|
|
304
|
+
Object.assign(_metadata, this.metadata);
|
|
305
|
+
}
|
|
306
|
+
if (this.metadataGenerator) {
|
|
307
|
+
if (_metadata === null) {
|
|
308
|
+
_metadata = {};
|
|
309
|
+
}
|
|
310
|
+
let _generatedMetadata = this.metadataGenerator.call(this.context || this.bindingContext, file);
|
|
311
|
+
Object.assign(_metadata, _generatedMetadata);
|
|
312
|
+
}
|
|
313
|
+
return _metadata;
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
exports.Ej2Uploader = Ej2Uploader;
|
|
317
|
+
__decorate([
|
|
318
|
+
aurelia_framework_1.bindable,
|
|
319
|
+
__metadata("design:type", Object)
|
|
320
|
+
], Ej2Uploader.prototype, "metadata", void 0);
|
|
321
|
+
__decorate([
|
|
322
|
+
aurelia_framework_1.bindable,
|
|
323
|
+
__metadata("design:type", Object)
|
|
324
|
+
], Ej2Uploader.prototype, "formDataProperty", void 0);
|
|
325
|
+
__decorate([
|
|
326
|
+
aurelia_framework_1.bindable,
|
|
327
|
+
__metadata("design:type", Function)
|
|
328
|
+
], Ej2Uploader.prototype, "metadataGenerator", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
aurelia_framework_1.bindable,
|
|
331
|
+
__metadata("design:type", Object)
|
|
332
|
+
], Ej2Uploader.prototype, "uploadResultModel", void 0);
|
|
333
|
+
__decorate([
|
|
334
|
+
aurelia_framework_1.bindable,
|
|
335
|
+
__metadata("design:type", Object)
|
|
336
|
+
], Ej2Uploader.prototype, "dataAdapter", void 0);
|
|
337
|
+
__decorate([
|
|
338
|
+
aurelia_framework_1.bindable,
|
|
339
|
+
__metadata("design:type", Object)
|
|
340
|
+
], Ej2Uploader.prototype, "autoRemoveServerFiles", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
aurelia_framework_1.bindable,
|
|
343
|
+
__metadata("design:type", Object)
|
|
344
|
+
], Ej2Uploader.prototype, "context", void 0);
|
|
345
|
+
__decorate([
|
|
346
|
+
aurelia_framework_1.bindable,
|
|
347
|
+
__metadata("design:type", Array)
|
|
348
|
+
], Ej2Uploader.prototype, "files", void 0);
|
|
349
|
+
__decorate([
|
|
350
|
+
aurelia_framework_1.bindable,
|
|
351
|
+
__metadata("design:type", Boolean)
|
|
352
|
+
], Ej2Uploader.prototype, "serverDelete", void 0);
|
|
353
|
+
exports.Ej2Uploader = Ej2Uploader = __decorate([
|
|
354
|
+
(0, decorator_1.generateBindables)("uploader"),
|
|
355
|
+
(0, aurelia_framework_2.inlineView)(`<template><input element.ref="widgetElement" type="file" name="UploadFiles" /></template>`),
|
|
356
|
+
(0, aurelia_framework_2.customElement)('ej2-uploader')
|
|
357
|
+
], Ej2Uploader);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TaskQueue } from 'aurelia-task-queue';
|
|
2
|
+
import { BindingEngine, Disposable } from "aurelia-framework";
|
|
3
|
+
import { ControlContainer, Control } from "./controlContainer";
|
|
4
|
+
import { EventAggregator } from 'aurelia-event-aggregator';
|
|
5
|
+
export declare class ControlBase<T, U> {
|
|
6
|
+
protected bindingEngine: BindingEngine;
|
|
7
|
+
private controlContainer;
|
|
8
|
+
protected taskQueue: TaskQueue;
|
|
9
|
+
protected eventAggregator: EventAggregator;
|
|
10
|
+
protected element: Element;
|
|
11
|
+
private eModel;
|
|
12
|
+
protected _eModel: U;
|
|
13
|
+
protected widgetElement: HTMLElement;
|
|
14
|
+
widget: T;
|
|
15
|
+
protected bindingContext: any;
|
|
16
|
+
protected logName: string;
|
|
17
|
+
private propertyPriority;
|
|
18
|
+
protected get controlType(): Function;
|
|
19
|
+
protected subscriptions: Disposable[];
|
|
20
|
+
constructor(bindingEngine: BindingEngine, controlContainer: ControlContainer, taskQueue: TaskQueue, eventAggregator: EventAggregator, element: Element);
|
|
21
|
+
onBind(): void;
|
|
22
|
+
onAttached(): void;
|
|
23
|
+
onCreateControl(): void;
|
|
24
|
+
protected debug(message: string, ...rest: any[]): void;
|
|
25
|
+
protected info(message: string, ...rest: any[]): void;
|
|
26
|
+
protected error(message: string, ...rest: any[]): void;
|
|
27
|
+
protected warn(message: string, ...rest: any[]): void;
|
|
28
|
+
bind(context: any): void;
|
|
29
|
+
protected setInitialBindings(): void;
|
|
30
|
+
getBindables(): Control;
|
|
31
|
+
createControlEvents(control: Control): void;
|
|
32
|
+
createControlPropertySubscriptions(control: Control): void;
|
|
33
|
+
attached(): void;
|
|
34
|
+
protected appendWidget(): void;
|
|
35
|
+
detached(): void;
|
|
36
|
+
}
|
|
37
|
+
export declare const ExcludedProperties: string[];
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { TaskQueue } from 'aurelia-task-queue';
|
|
11
|
+
import { autoinject, BindingEngine, bindable, LogManager } from "aurelia-framework";
|
|
12
|
+
import { ControlContainer } from "./controlContainer";
|
|
13
|
+
import { constants } from "./constants";
|
|
14
|
+
import { EventAggregator } from 'aurelia-event-aggregator';
|
|
15
|
+
let logger = LogManager.getLogger("SyncfusionBridge");
|
|
16
|
+
let ControlBase = class ControlBase {
|
|
17
|
+
get controlType() {
|
|
18
|
+
throw "syncfusionControlType is not set";
|
|
19
|
+
}
|
|
20
|
+
constructor(bindingEngine, controlContainer, taskQueue, eventAggregator, element) {
|
|
21
|
+
this.bindingEngine = bindingEngine;
|
|
22
|
+
this.controlContainer = controlContainer;
|
|
23
|
+
this.taskQueue = taskQueue;
|
|
24
|
+
this.eventAggregator = eventAggregator;
|
|
25
|
+
this.element = element;
|
|
26
|
+
this.eModel = null;
|
|
27
|
+
this._eModel = null;
|
|
28
|
+
this.widgetElement = null;
|
|
29
|
+
this.widget = null;
|
|
30
|
+
this.bindingContext = null;
|
|
31
|
+
this.logName = "";
|
|
32
|
+
this.propertyPriority = true;
|
|
33
|
+
this.subscriptions = [];
|
|
34
|
+
}
|
|
35
|
+
onBind() {
|
|
36
|
+
}
|
|
37
|
+
onAttached() {
|
|
38
|
+
}
|
|
39
|
+
onCreateControl() {
|
|
40
|
+
throw "onCreateControl is not implemented";
|
|
41
|
+
}
|
|
42
|
+
debug(message, ...rest) {
|
|
43
|
+
logger.debug(`[${this.logName}] - ${message}`, rest);
|
|
44
|
+
}
|
|
45
|
+
info(message, ...rest) {
|
|
46
|
+
logger.info(`[${this.logName}] - ${message}`, rest);
|
|
47
|
+
}
|
|
48
|
+
error(message, ...rest) {
|
|
49
|
+
logger.error(`[${this.logName}] - ${message}`, rest);
|
|
50
|
+
}
|
|
51
|
+
warn(message, ...rest) {
|
|
52
|
+
logger.warn(`[${this.logName}] - ${message}`, rest);
|
|
53
|
+
}
|
|
54
|
+
bind(context) {
|
|
55
|
+
this.logName = this.controlType.name;
|
|
56
|
+
this.bindingContext = context;
|
|
57
|
+
this._eModel = Object.assign({}, this.eModel);
|
|
58
|
+
this.setInitialBindings();
|
|
59
|
+
this.onCreateControl();
|
|
60
|
+
this.onBind();
|
|
61
|
+
}
|
|
62
|
+
setInitialBindings() {
|
|
63
|
+
let _control = this.getBindables();
|
|
64
|
+
let bindablePrefixLength = constants.bindablePrefix.length;
|
|
65
|
+
_control.bindableProperties.forEach((property) => {
|
|
66
|
+
if (!property.startsWith(constants.eventPrefix)) {
|
|
67
|
+
let modelProperty = property.substr(bindablePrefixLength);
|
|
68
|
+
if (this[property] !== undefined && (this.propertyPriority || this._eModel[modelProperty] === undefined)) {
|
|
69
|
+
this._eModel[modelProperty] = this[property];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
this.createControlPropertySubscriptions(_control);
|
|
74
|
+
}
|
|
75
|
+
getBindables() {
|
|
76
|
+
let _control = this.controlContainer.get(this.controlType);
|
|
77
|
+
if (!_control) {
|
|
78
|
+
_control = {};
|
|
79
|
+
_control.type = this.controlType;
|
|
80
|
+
_control.bindableProperties = [];
|
|
81
|
+
_control.bindableEvents = [];
|
|
82
|
+
for (let property in this["__observers__"]) {
|
|
83
|
+
if (ExcludedProperties.indexOf(property) === -1) {
|
|
84
|
+
if (property.startsWith(constants.eventPrefix)) {
|
|
85
|
+
_control.bindableEvents.push(property);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
_control.bindableProperties.push(property);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return _control;
|
|
94
|
+
}
|
|
95
|
+
createControlEvents(control) {
|
|
96
|
+
control.bindableEvents.forEach((event) => {
|
|
97
|
+
let eventName = event.substr(constants.eventPrefix.length);
|
|
98
|
+
this.widget.addEventListener(eventName, (args) => {
|
|
99
|
+
this.element.dispatchEvent(new CustomEvent(event, {
|
|
100
|
+
bubbles: true,
|
|
101
|
+
detail: args
|
|
102
|
+
}));
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
createControlPropertySubscriptions(control) {
|
|
107
|
+
if (control) {
|
|
108
|
+
let bindablePrefixLength = constants.bindablePrefix.length;
|
|
109
|
+
control.bindableProperties.forEach((binding) => {
|
|
110
|
+
let modelBinding = binding.substr(bindablePrefixLength);
|
|
111
|
+
this.subscriptions.push(this.bindingEngine.propertyObserver(this, binding).subscribe((newValue) => {
|
|
112
|
+
if (this.widget.properties.hasOwnProperty(modelBinding)) {
|
|
113
|
+
let customFunc = `${modelBinding}Changed`;
|
|
114
|
+
if (typeof this[customFunc] === "function") {
|
|
115
|
+
this[customFunc].call(this, newValue);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.widget[modelBinding] = newValue;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
attached() {
|
|
126
|
+
this.appendWidget();
|
|
127
|
+
this.onAttached();
|
|
128
|
+
}
|
|
129
|
+
appendWidget() {
|
|
130
|
+
this.widget.appendTo(this.widgetElement);
|
|
131
|
+
}
|
|
132
|
+
detached() {
|
|
133
|
+
this.subscriptions.forEach((subscription) => { if (subscription) {
|
|
134
|
+
subscription.dispose();
|
|
135
|
+
} });
|
|
136
|
+
if (this.widget.destroy) {
|
|
137
|
+
this.widget.destroy();
|
|
138
|
+
}
|
|
139
|
+
this.widget = null;
|
|
140
|
+
this._eModel = null;
|
|
141
|
+
this.widgetElement = null;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
__decorate([
|
|
145
|
+
bindable,
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], ControlBase.prototype, "eModel", void 0);
|
|
148
|
+
ControlBase = __decorate([
|
|
149
|
+
autoinject,
|
|
150
|
+
__metadata("design:paramtypes", [BindingEngine, ControlContainer,
|
|
151
|
+
TaskQueue, EventAggregator, Element])
|
|
152
|
+
], ControlBase);
|
|
153
|
+
export { ControlBase };
|
|
154
|
+
export const ExcludedProperties = [
|
|
155
|
+
"__propertiesDefined__",
|
|
156
|
+
"eModel",
|
|
157
|
+
"onClick"
|
|
158
|
+
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class ControlContainer {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.controls = [];
|
|
4
|
+
}
|
|
5
|
+
add(control) {
|
|
6
|
+
let existing = this.controls.find((x) => x.type === control.type);
|
|
7
|
+
if (!existing) {
|
|
8
|
+
this.controls.push(control);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
get(type) {
|
|
12
|
+
let _control = this.controls.find((x) => x.type === type);
|
|
13
|
+
return _control;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlBase } from "./controlBase";
|
|
2
|
+
export declare abstract class SyncfusionWrapper<T, U> extends ControlBase<T, U> {
|
|
3
|
+
protected abstract syncfusionWidgetType: any;
|
|
4
|
+
protected abstract onWrapperCreated(): any;
|
|
5
|
+
protected abstract onWidgetCreated(): any;
|
|
6
|
+
onCreateControl(): void;
|
|
7
|
+
recreate(): void;
|
|
8
|
+
onRecreate(): void;
|
|
9
|
+
recreating(): void;
|
|
10
|
+
recreated(): void;
|
|
11
|
+
refresh(): void;
|
|
12
|
+
dataBind(): void;
|
|
13
|
+
protected get controlType(): any;
|
|
14
|
+
protected onBeforeWidgetInstantiation(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ControlBase } from "./controlBase";
|
|
2
|
+
export class SyncfusionWrapper extends ControlBase {
|
|
3
|
+
onCreateControl() {
|
|
4
|
+
this.onBeforeWidgetInstantiation();
|
|
5
|
+
this.widget = new this.syncfusionWidgetType(this._eModel);
|
|
6
|
+
this.widget.created = () => { this.onWidgetCreated(); };
|
|
7
|
+
this.onWrapperCreated();
|
|
8
|
+
this.createControlEvents(this.getBindables());
|
|
9
|
+
}
|
|
10
|
+
recreate() {
|
|
11
|
+
this.onRecreate();
|
|
12
|
+
this.widget.destroy();
|
|
13
|
+
this.widget = null;
|
|
14
|
+
this.recreating();
|
|
15
|
+
this.setInitialBindings();
|
|
16
|
+
this.onCreateControl();
|
|
17
|
+
this.appendWidget();
|
|
18
|
+
this.recreated();
|
|
19
|
+
}
|
|
20
|
+
onRecreate() {
|
|
21
|
+
}
|
|
22
|
+
recreating() {
|
|
23
|
+
}
|
|
24
|
+
recreated() {
|
|
25
|
+
}
|
|
26
|
+
refresh() {
|
|
27
|
+
this.widget.refresh();
|
|
28
|
+
}
|
|
29
|
+
dataBind() {
|
|
30
|
+
this.widget.dataBind();
|
|
31
|
+
}
|
|
32
|
+
get controlType() {
|
|
33
|
+
if (this.syncfusionWidgetType) {
|
|
34
|
+
return this.syncfusionWidgetType;
|
|
35
|
+
}
|
|
36
|
+
throw "syncfusionControlType is not set";
|
|
37
|
+
}
|
|
38
|
+
onBeforeWidgetInstantiation() {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare class ConfigBuilder {
|
|
2
|
+
resources: any[];
|
|
3
|
+
useGlobalResources: boolean;
|
|
4
|
+
useAll(): ConfigBuilder;
|
|
5
|
+
useDefaults(): ConfigBuilder;
|
|
6
|
+
useTheme(theme: "material" | "bootstrap" | "bootstrap4" | "fabric" | "highcontrast"): this;
|
|
7
|
+
materialTheme(): this;
|
|
8
|
+
withoutGlobalResources(): ConfigBuilder;
|
|
9
|
+
ej2Accordion(): ConfigBuilder;
|
|
10
|
+
ej2AutoComplete(): ConfigBuilder;
|
|
11
|
+
ej2Button(): ConfigBuilder;
|
|
12
|
+
ej2Checkbox(): ConfigBuilder;
|
|
13
|
+
ej2CheckboxList(): ConfigBuilder;
|
|
14
|
+
ej2ColorPicker(): ConfigBuilder;
|
|
15
|
+
ej2ComboBox(): ConfigBuilder;
|
|
16
|
+
ej2DashboardLayout(): ConfigBuilder;
|
|
17
|
+
ej2DatePicker(): ConfigBuilder;
|
|
18
|
+
ej2DateRangePicker(): ConfigBuilder;
|
|
19
|
+
ej2DateTimePicker(): ConfigBuilder;
|
|
20
|
+
ej2DropDownList(): ConfigBuilder;
|
|
21
|
+
ej2DropDownTree(): ConfigBuilder;
|
|
22
|
+
ej2FileManager(): ConfigBuilder;
|
|
23
|
+
ej2Grid(): ConfigBuilder;
|
|
24
|
+
ej2ListView(): ConfigBuilder;
|
|
25
|
+
ej2MaskedTextBox(): ConfigBuilder;
|
|
26
|
+
ej2MultiSelect(): ConfigBuilder;
|
|
27
|
+
ej2NumericTextBox(): ConfigBuilder;
|
|
28
|
+
ej2Pager(): ConfigBuilder;
|
|
29
|
+
ej2ProgressButton(): ConfigBuilder;
|
|
30
|
+
ej2Radio(): ConfigBuilder;
|
|
31
|
+
ej2Schedule(): ConfigBuilder;
|
|
32
|
+
ej2Sidebar(): ConfigBuilder;
|
|
33
|
+
ej2Slider(): ConfigBuilder;
|
|
34
|
+
ej2Splitter(): ConfigBuilder;
|
|
35
|
+
ej2Switch(): ConfigBuilder;
|
|
36
|
+
ej2TextBox(): ConfigBuilder;
|
|
37
|
+
ej2TimePicker(): ConfigBuilder;
|
|
38
|
+
ej2Timeline(): ConfigBuilder;
|
|
39
|
+
ej2TreeView(): ConfigBuilder;
|
|
40
|
+
ej2Uploader(): ConfigBuilder;
|
|
41
|
+
ej2RichTextEditor(): ConfigBuilder;
|
|
42
|
+
}
|