aurelia-syncfusion-ej2-bridge 0.1.0-beta.3 → 0.1.0-beta.31
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/.vscode/extensions.json +10 -0
- package/.vscode/launch.json +31 -0
- package/.vscode/settings.json +5 -0
- package/README.md +32 -29
- package/dist/commonjs/common/constants.js +1 -0
- package/dist/commonjs/common/controlBase.d.ts +3 -1
- package/dist/commonjs/common/controlBase.js +14 -4
- package/dist/commonjs/common/controlContainer.js +1 -0
- package/dist/commonjs/common/syncfusionWrapper.d.ts +3 -0
- package/dist/commonjs/common/syncfusionWrapper.js +12 -2
- package/dist/commonjs/configBuider.d.ts +6 -4
- package/dist/commonjs/configBuider.js +85 -50
- package/dist/commonjs/controlBindings.d.ts +28 -0
- package/dist/commonjs/controlBindings.js +87 -36
- package/dist/commonjs/index.js +2 -1
- package/dist/commonjs/utilities/decorator.js +1 -0
- package/dist/commonjs/widgets/accordion/ej2-accordion.js +5 -1
- package/dist/commonjs/widgets/autoComplete/ej2-autoComplete.js +5 -1
- package/dist/commonjs/widgets/button/ej2-button.d.ts +2 -1
- package/dist/commonjs/widgets/button/ej2-button.js +15 -5
- package/dist/commonjs/widgets/checkbox/ej2-checkbox-list.js +15 -3
- package/dist/commonjs/widgets/checkbox/ej2-checkbox.js +7 -1
- package/dist/commonjs/widgets/comboBox/ej2-comboBox.js +5 -1
- package/dist/commonjs/widgets/dashboardLayout/ej2-dashboardLayout.js +5 -1
- package/dist/commonjs/widgets/datePicker/ej2-DatePicker.js +5 -1
- package/dist/commonjs/widgets/dateRangePicker/ej2-dateRangePicker.js +5 -1
- package/dist/commonjs/widgets/dateTimePicker/ej2-dateTimePicker.js +5 -1
- package/dist/commonjs/widgets/dropDownList/ej2-dropDownList.js +5 -1
- 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.js +27 -23
- package/dist/commonjs/widgets/listView/ej2-listView.js +6 -2
- package/dist/commonjs/widgets/maskedTextBox/ej2-maskedTextBox.js +5 -1
- 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.js +5 -1
- package/dist/commonjs/widgets/pager/ej2-pager.js +5 -1
- package/dist/commonjs/widgets/progressButton/ej2-progress-button.d.ts +2 -1
- package/dist/commonjs/widgets/progressButton/ej2-progress-button.js +15 -5
- package/dist/commonjs/widgets/radio/ej2-radio.js +8 -4
- 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.js +5 -1
- 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 +2 -1
- package/dist/commonjs/widgets/switch/ej2-switch.js +13 -5
- package/dist/commonjs/widgets/textBox/ej2-textBox.js +5 -1
- package/dist/commonjs/widgets/timePicker/ej2-timePicker.js +5 -1
- package/dist/commonjs/widgets/treeView/ej2-treeView.js +5 -1
- package/dist/commonjs/widgets/uploader/ej2-uploader.d.ts +7 -1
- package/dist/commonjs/widgets/uploader/ej2-uploader.js +70 -30
- package/dist/native-modules/common/controlBase.d.ts +3 -1
- package/dist/native-modules/common/controlBase.js +13 -4
- package/dist/native-modules/common/syncfusionWrapper.d.ts +3 -0
- package/dist/native-modules/common/syncfusionWrapper.js +11 -2
- package/dist/native-modules/configBuider.d.ts +6 -4
- package/dist/native-modules/configBuider.js +84 -50
- package/dist/native-modules/controlBindings.d.ts +28 -0
- package/dist/native-modules/controlBindings.js +86 -36
- package/dist/native-modules/widgets/accordion/ej2-accordion.js +4 -1
- package/dist/native-modules/widgets/autoComplete/ej2-autoComplete.js +4 -1
- package/dist/native-modules/widgets/button/ej2-button.d.ts +2 -1
- package/dist/native-modules/widgets/button/ej2-button.js +14 -5
- package/dist/native-modules/widgets/checkbox/ej2-checkbox-list.js +16 -4
- package/dist/native-modules/widgets/checkbox/ej2-checkbox.js +7 -2
- package/dist/native-modules/widgets/comboBox/ej2-comboBox.js +4 -1
- package/dist/native-modules/widgets/dashboardLayout/ej2-dashboardLayout.js +4 -1
- package/dist/native-modules/widgets/datePicker/ej2-DatePicker.js +4 -1
- package/dist/native-modules/widgets/dateRangePicker/ej2-dateRangePicker.js +4 -1
- package/dist/native-modules/widgets/dateTimePicker/ej2-dateTimePicker.js +4 -1
- package/dist/native-modules/widgets/dropDownList/ej2-dropDownList.js +4 -1
- 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.js +26 -23
- package/dist/native-modules/widgets/listView/ej2-listView.js +5 -2
- package/dist/native-modules/widgets/maskedTextBox/ej2-maskedTextBox.js +4 -1
- 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.js +4 -1
- package/dist/native-modules/widgets/pager/ej2-pager.js +4 -1
- package/dist/native-modules/widgets/progressButton/ej2-progress-button.d.ts +2 -1
- package/dist/native-modules/widgets/progressButton/ej2-progress-button.js +14 -5
- package/dist/native-modules/widgets/radio/ej2-radio.js +7 -4
- 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.js +4 -1
- 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 +2 -1
- package/dist/native-modules/widgets/switch/ej2-switch.js +12 -5
- package/dist/native-modules/widgets/textBox/ej2-textBox.js +4 -1
- package/dist/native-modules/widgets/timePicker/ej2-timePicker.js +4 -1
- package/dist/native-modules/widgets/treeView/ej2-treeView.js +4 -1
- package/dist/native-modules/widgets/uploader/ej2-uploader.d.ts +7 -1
- package/dist/native-modules/widgets/uploader/ej2-uploader.js +69 -30
- package/package.json +4 -4
- package/dist/commonjs/widgets/accordion/ej2-accordion.html +0 -3
- package/dist/commonjs/widgets/autoComplete/ej2-autoComplete.html +0 -3
- package/dist/commonjs/widgets/button/ej2-button.html +0 -5
- package/dist/commonjs/widgets/checkbox/ej2-checkbox-list.html +0 -9
- package/dist/commonjs/widgets/checkbox/ej2-checkbox.html +0 -3
- package/dist/commonjs/widgets/comboBox/ej2-comboBox.html +0 -3
- package/dist/commonjs/widgets/dashboardLayout/ej2-dashboardLayout.html +0 -7
- package/dist/commonjs/widgets/datePicker/ej2-DatePicker.html +0 -3
- package/dist/commonjs/widgets/dateRangePicker/ej2-dateRangePicker.html +0 -3
- package/dist/commonjs/widgets/dateTimePicker/ej2-dateTimePicker.html +0 -3
- package/dist/commonjs/widgets/dropDownList/ej2-dropDownList.html +0 -5
- package/dist/commonjs/widgets/grid/ej2-grid.html +0 -3
- package/dist/commonjs/widgets/listView/ej2-listView.html +0 -3
- package/dist/commonjs/widgets/maskedTextBox/ej2-maskedTextBox.html +0 -3
- package/dist/commonjs/widgets/numericTextBox/ej2-numericTextBox.html +0 -3
- package/dist/commonjs/widgets/pager/ej2-pager.html +0 -3
- package/dist/commonjs/widgets/progressButton/ej2-progress-button.html +0 -5
- package/dist/commonjs/widgets/radio/ej2-radio.html +0 -3
- package/dist/commonjs/widgets/slider/ej2-slider.html +0 -3
- package/dist/commonjs/widgets/switch/ej2-switch.html +0 -4
- package/dist/commonjs/widgets/textBox/ej2-textBox.html +0 -3
- package/dist/commonjs/widgets/timePicker/ej2-timePicker.html +0 -3
- package/dist/commonjs/widgets/treeView/ej2-treeView.html +0 -3
- package/dist/commonjs/widgets/uploader/ej2-uploader.html +0 -3
- package/dist/native-modules/widgets/accordion/ej2-accordion.html +0 -3
- package/dist/native-modules/widgets/autoComplete/ej2-autoComplete.html +0 -3
- package/dist/native-modules/widgets/button/ej2-button.html +0 -5
- package/dist/native-modules/widgets/checkbox/ej2-checkbox-list.html +0 -9
- package/dist/native-modules/widgets/checkbox/ej2-checkbox.html +0 -3
- package/dist/native-modules/widgets/comboBox/ej2-comboBox.html +0 -3
- package/dist/native-modules/widgets/dashboardLayout/ej2-dashboardLayout.html +0 -7
- package/dist/native-modules/widgets/datePicker/ej2-DatePicker.html +0 -3
- package/dist/native-modules/widgets/dateRangePicker/ej2-dateRangePicker.html +0 -3
- package/dist/native-modules/widgets/dateTimePicker/ej2-dateTimePicker.html +0 -3
- package/dist/native-modules/widgets/dropDownList/ej2-dropDownList.html +0 -5
- package/dist/native-modules/widgets/grid/ej2-grid.html +0 -3
- package/dist/native-modules/widgets/listView/ej2-listView.html +0 -3
- package/dist/native-modules/widgets/maskedTextBox/ej2-maskedTextBox.html +0 -3
- package/dist/native-modules/widgets/numericTextBox/ej2-numericTextBox.html +0 -3
- package/dist/native-modules/widgets/pager/ej2-pager.html +0 -3
- package/dist/native-modules/widgets/progressButton/ej2-progress-button.html +0 -5
- package/dist/native-modules/widgets/radio/ej2-radio.html +0 -3
- package/dist/native-modules/widgets/slider/ej2-slider.html +0 -3
- package/dist/native-modules/widgets/switch/ej2-switch.html +0 -4
- package/dist/native-modules/widgets/textBox/ej2-textBox.html +0 -3
- package/dist/native-modules/widgets/timePicker/ej2-timePicker.html +0 -3
- package/dist/native-modules/widgets/treeView/ej2-treeView.html +0 -3
- package/dist/native-modules/widgets/uploader/ej2-uploader.html +0 -3
|
@@ -6,15 +6,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2Switch = void 0;
|
|
9
10
|
const constants_1 = require("./../../common/constants");
|
|
10
11
|
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
11
12
|
const ej2_buttons_1 = require("@syncfusion/ej2-buttons");
|
|
12
13
|
const decorator_1 = require("../../utilities/decorator");
|
|
14
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
13
15
|
let Ej2Switch = class Ej2Switch extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
18
|
this.syncfusionWidgetType = ej2_buttons_1.Switch;
|
|
17
19
|
this.id = null;
|
|
20
|
+
this.onChange = null;
|
|
18
21
|
}
|
|
19
22
|
onWrapperCreated() {
|
|
20
23
|
this.id = this.element.getAttribute("id");
|
|
@@ -25,10 +28,10 @@ let Ej2Switch = class Ej2Switch extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
|
25
28
|
}
|
|
26
29
|
onWidgetCreated() {
|
|
27
30
|
let _this = this;
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this
|
|
31
|
+
this.onChange = (args) => {
|
|
32
|
+
_this[`${constants_1.constants.bindablePrefix}checked`] = args.checked;
|
|
33
|
+
};
|
|
34
|
+
this.widget.addEventListener("change", this.onChange);
|
|
32
35
|
}
|
|
33
36
|
recreate() {
|
|
34
37
|
if (this.id) {
|
|
@@ -37,8 +40,13 @@ let Ej2Switch = class Ej2Switch extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
|
37
40
|
this.element.setAttribute("id", this.id);
|
|
38
41
|
super.recreate();
|
|
39
42
|
}
|
|
43
|
+
detached() {
|
|
44
|
+
this.widget.removeEventListener("change", this.onChange);
|
|
45
|
+
}
|
|
40
46
|
};
|
|
41
47
|
Ej2Switch = __decorate([
|
|
42
|
-
decorator_1.generateBindables("switch")
|
|
48
|
+
decorator_1.generateBindables("switch"),
|
|
49
|
+
aurelia_framework_1.inlineView(`<template><slot></slot><input element.ref="widgetElement" type="checkbox" /></template>`),
|
|
50
|
+
aurelia_framework_1.customElement('ej2-switch')
|
|
43
51
|
], Ej2Switch);
|
|
44
52
|
exports.Ej2Switch = Ej2Switch;
|
|
@@ -6,11 +6,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2TextBox = void 0;
|
|
9
10
|
const constants_1 = require("../../common/constants");
|
|
10
11
|
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
11
12
|
const ej2_inputs_1 = require("@syncfusion/ej2-inputs");
|
|
12
13
|
const decorator_1 = require("../../utilities/decorator");
|
|
13
14
|
const ej2_base_1 = require("@syncfusion/ej2-base");
|
|
15
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
14
16
|
ej2_base_1.enableRipple(true);
|
|
15
17
|
let Ej2TextBox = class Ej2TextBox extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
16
18
|
constructor() {
|
|
@@ -28,6 +30,8 @@ let Ej2TextBox = class Ej2TextBox extends syncfusionWrapper_1.SyncfusionWrapper
|
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
Ej2TextBox = __decorate([
|
|
31
|
-
decorator_1.generateBindables("textBox")
|
|
33
|
+
decorator_1.generateBindables("textBox"),
|
|
34
|
+
aurelia_framework_1.inlineView(`<template><input element.ref="widgetElement" /></template>`),
|
|
35
|
+
aurelia_framework_1.customElement('ej2-text-box')
|
|
32
36
|
], Ej2TextBox);
|
|
33
37
|
exports.Ej2TextBox = Ej2TextBox;
|
|
@@ -6,10 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2TimePicker = void 0;
|
|
9
10
|
const constants_1 = require("./../../common/constants");
|
|
10
11
|
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
11
12
|
const ej2_calendars_1 = require("@syncfusion/ej2-calendars");
|
|
12
13
|
const decorator_1 = require("../../utilities/decorator");
|
|
14
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
13
15
|
let Ej2TimePicker = class Ej2TimePicker extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
@@ -26,6 +28,8 @@ let Ej2TimePicker = class Ej2TimePicker extends syncfusionWrapper_1.SyncfusionWr
|
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
30
|
Ej2TimePicker = __decorate([
|
|
29
|
-
decorator_1.generateBindables("timePicker")
|
|
31
|
+
decorator_1.generateBindables("timePicker"),
|
|
32
|
+
aurelia_framework_1.inlineView(`<template><input element.ref="widgetElement" /></template>`),
|
|
33
|
+
aurelia_framework_1.customElement('ej2-time-picker')
|
|
30
34
|
], Ej2TimePicker);
|
|
31
35
|
exports.Ej2TimePicker = Ej2TimePicker;
|
|
@@ -6,9 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2TreeView = void 0;
|
|
9
10
|
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
10
11
|
const ej2_navigations_1 = require("@syncfusion/ej2-navigations");
|
|
11
12
|
const decorator_1 = require("../../utilities/decorator");
|
|
13
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
12
14
|
let Ej2TreeView = class Ej2TreeView extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
13
15
|
constructor() {
|
|
14
16
|
super(...arguments);
|
|
@@ -20,6 +22,8 @@ let Ej2TreeView = class Ej2TreeView extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
24
|
Ej2TreeView = __decorate([
|
|
23
|
-
decorator_1.generateBindables("treeView")
|
|
25
|
+
decorator_1.generateBindables("treeView"),
|
|
26
|
+
aurelia_framework_1.inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
27
|
+
aurelia_framework_1.customElement('ej2-tree-view')
|
|
24
28
|
], Ej2TreeView);
|
|
25
29
|
exports.Ej2TreeView = Ej2TreeView;
|
|
@@ -3,6 +3,7 @@ import { Uploader, UploaderModel, RemovingEventArgs } from "@syncfusion/ej2-inpu
|
|
|
3
3
|
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
4
4
|
export declare class Ej2Uploader extends SyncfusionWrapper<Uploader, UploaderModel> {
|
|
5
5
|
private _filesProperty;
|
|
6
|
+
private originalFiles;
|
|
6
7
|
private _filesCollectionSubscription;
|
|
7
8
|
private _privateIdProperty;
|
|
8
9
|
protected syncfusionWidgetType: typeof Uploader;
|
|
@@ -15,13 +16,18 @@ export declare class Ej2Uploader extends SyncfusionWrapper<Uploader, UploaderMod
|
|
|
15
16
|
dataAdapter: Ej2UploaderDataAdapter;
|
|
16
17
|
autoRemoveServerFiles: boolean;
|
|
17
18
|
context: any;
|
|
19
|
+
files: any[];
|
|
20
|
+
private firstBind;
|
|
18
21
|
private get _files();
|
|
19
22
|
serverDelete: boolean;
|
|
20
23
|
protected onWrapperCreated(): void;
|
|
21
|
-
|
|
24
|
+
onfilesChanged(): void;
|
|
25
|
+
recreating(): void;
|
|
26
|
+
recreated(): void;
|
|
22
27
|
initializeFileCollection(): void;
|
|
23
28
|
initializeFile(widgetFile: any, i: any, extraProperties: any): void;
|
|
24
29
|
protected onWidgetCreated(): void;
|
|
30
|
+
onBind(): void;
|
|
25
31
|
createFilesCollectionSubscription(): Disposable;
|
|
26
32
|
change(): void;
|
|
27
33
|
getFilesThatWereRemoved(): any[];
|
|
@@ -9,16 +9,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Ej2Uploader = void 0;
|
|
12
13
|
const constants_1 = require("../../common/constants");
|
|
13
14
|
const ej2_inputs_1 = require("@syncfusion/ej2-inputs");
|
|
14
15
|
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
15
16
|
const decorator_1 = require("../../utilities/decorator");
|
|
16
17
|
const aurelia_framework_1 = require("aurelia-framework");
|
|
17
|
-
const
|
|
18
|
+
const uuid_1 = require("uuid");
|
|
19
|
+
const aurelia_framework_2 = require("aurelia-framework");
|
|
18
20
|
let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
19
21
|
constructor() {
|
|
20
22
|
super(...arguments);
|
|
21
23
|
this._filesProperty = `${constants_1.constants.bindablePrefix}files`;
|
|
24
|
+
this.originalFiles = null;
|
|
22
25
|
this._filesCollectionSubscription = null;
|
|
23
26
|
this._privateIdProperty = "__id";
|
|
24
27
|
this.syncfusionWidgetType = ej2_inputs_1.Uploader;
|
|
@@ -31,13 +34,14 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
31
34
|
this.dataAdapter = null;
|
|
32
35
|
this.autoRemoveServerFiles = true;
|
|
33
36
|
this.context = null;
|
|
37
|
+
this.files = null;
|
|
38
|
+
this.firstBind = true;
|
|
34
39
|
this.serverDelete = true;
|
|
35
40
|
}
|
|
36
41
|
get _files() {
|
|
37
42
|
return this[this._filesProperty];
|
|
38
43
|
}
|
|
39
44
|
onWrapperCreated() {
|
|
40
|
-
this.debug("wrapper created");
|
|
41
45
|
this.widget.uploading = (args) => { this.onFileUpload(args); };
|
|
42
46
|
this.widget.success = (args) => { this.success(args); };
|
|
43
47
|
this.widget.failure = (args) => { this.failure(args); };
|
|
@@ -53,20 +57,28 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
53
57
|
_this.widget.removingEventCallback(eventArgs, formData, selectedFiles, file);
|
|
54
58
|
});
|
|
55
59
|
};
|
|
60
|
+
this.widget.asyncSettings.removeUrl = null;
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
|
-
|
|
60
|
-
this.
|
|
61
|
-
|
|
64
|
+
onfilesChanged() {
|
|
65
|
+
if (!this.firstBind) {
|
|
66
|
+
this.widget.clearAll();
|
|
67
|
+
this.recreate();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
recreating() {
|
|
62
71
|
this._filesCollectionSubscription.dispose();
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
this[this._filesProperty].splice(0, this[this._filesProperty].length, ...this.originalFiles);
|
|
73
|
+
}
|
|
74
|
+
recreated() {
|
|
75
|
+
this.initializeFileCollection();
|
|
76
|
+
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
68
77
|
}
|
|
69
78
|
initializeFileCollection() {
|
|
79
|
+
if (this.files && Array.isArray(this.files)) {
|
|
80
|
+
this.widget.files.push(...JSON.parse(JSON.stringify(this.files)));
|
|
81
|
+
}
|
|
70
82
|
if (this.widget.files) {
|
|
71
83
|
let extraProperties = [];
|
|
72
84
|
let widgetFiles = this.widget.getFilesData();
|
|
@@ -80,7 +92,7 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
80
92
|
}
|
|
81
93
|
}
|
|
82
94
|
initializeFile(widgetFile, i, extraProperties) {
|
|
83
|
-
let __id =
|
|
95
|
+
let __id = uuid_1.v4();
|
|
84
96
|
widgetFile[this._privateIdProperty] = __id;
|
|
85
97
|
this._files[i][this._privateIdProperty] = __id;
|
|
86
98
|
extraProperties.forEach((prop) => {
|
|
@@ -92,14 +104,34 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
92
104
|
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
93
105
|
this.subscriptions.push(this._filesCollectionSubscription);
|
|
94
106
|
}
|
|
107
|
+
onBind() {
|
|
108
|
+
this.firstBind = false;
|
|
109
|
+
this.subscriptions.push(this.bindingEngine.propertyObserver(this, "files").subscribe(() => { this.onfilesChanged(); }));
|
|
110
|
+
if (this[this._filesProperty] && Array.isArray(this[this._filesProperty])) {
|
|
111
|
+
this.originalFiles = JSON.parse(JSON.stringify(this[this._filesProperty]));
|
|
112
|
+
}
|
|
113
|
+
else if (this.files && Array.isArray(this.files)) {
|
|
114
|
+
this.originalFiles = JSON.parse(JSON.stringify(this.files));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.originalFiles = [];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
95
120
|
createFilesCollectionSubscription() {
|
|
96
|
-
|
|
97
|
-
|
|
121
|
+
if (!this._files) {
|
|
122
|
+
this[this._filesProperty] = [];
|
|
123
|
+
}
|
|
124
|
+
return this.bindingEngine.collectionObserver(this._files).subscribe((changed) => { });
|
|
98
125
|
}
|
|
99
126
|
change() {
|
|
100
127
|
if (this.autoRemoveServerFiles) {
|
|
101
128
|
this.getFilesThatWereRemoved().forEach((file) => {
|
|
102
|
-
this.
|
|
129
|
+
this.removing({
|
|
130
|
+
filesData: [file],
|
|
131
|
+
customFormData: null,
|
|
132
|
+
event: null,
|
|
133
|
+
cancel: false
|
|
134
|
+
});
|
|
103
135
|
});
|
|
104
136
|
}
|
|
105
137
|
}
|
|
@@ -122,11 +154,9 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
122
154
|
});
|
|
123
155
|
}
|
|
124
156
|
removeFile(file) {
|
|
125
|
-
this.debug("removeFile", file);
|
|
126
157
|
this.widget.remove(file);
|
|
127
158
|
}
|
|
128
159
|
async removing(args) {
|
|
129
|
-
this.debug("removing", args);
|
|
130
160
|
let event = new CustomEvent("on-removing", {
|
|
131
161
|
bubbles: true,
|
|
132
162
|
detail: args
|
|
@@ -147,7 +177,6 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
147
177
|
this.onWidgetRemoveFailed(error, args);
|
|
148
178
|
}
|
|
149
179
|
}
|
|
150
|
-
this.onRemoveSuccess(args);
|
|
151
180
|
}
|
|
152
181
|
onWidgetRemoveComplete(response, args) {
|
|
153
182
|
this.widget.removeCompleted(response, args.filesData[0], false);
|
|
@@ -156,15 +185,16 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
156
185
|
this.widget.removeFailed(e, args.filesData[0], false);
|
|
157
186
|
}
|
|
158
187
|
onRemoveSuccess(args) {
|
|
159
|
-
this.debug("onRemoveSuccess", args);
|
|
160
188
|
let _file = args.filesData[0];
|
|
161
189
|
let index = this[this._filesProperty].findIndex((x) => x.__id === _file.__id);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
190
|
+
if (index !== -1) {
|
|
191
|
+
const removedFile = this[this._filesProperty].splice(index, 1)[0];
|
|
192
|
+
let event = new CustomEvent("on-remove-success", {
|
|
193
|
+
bubbles: true,
|
|
194
|
+
detail: { args: args, removedFile: removedFile }
|
|
195
|
+
});
|
|
196
|
+
this.element.dispatchEvent(event);
|
|
197
|
+
}
|
|
168
198
|
}
|
|
169
199
|
success(args) {
|
|
170
200
|
if (args.operation === "upload") {
|
|
@@ -172,7 +202,7 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
172
202
|
let _uploadedFile = args.file;
|
|
173
203
|
let fileName = _uploadedFile.name.substr(0, _uploadedFile.name.length - (_uploadedFile.type.length + 1));
|
|
174
204
|
let additionalProperties = {};
|
|
175
|
-
additionalProperties[this._privateIdProperty] =
|
|
205
|
+
additionalProperties[this._privateIdProperty] = uuid_1.v4();
|
|
176
206
|
if (this.uploadResultModel) {
|
|
177
207
|
for (let prop in this.uploadResultModel) {
|
|
178
208
|
additionalProperties[this.uploadResultModel[prop]] = response[prop];
|
|
@@ -189,15 +219,19 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
189
219
|
this[this._filesProperty] = [];
|
|
190
220
|
}
|
|
191
221
|
this[this._filesProperty].push(file);
|
|
192
|
-
let
|
|
222
|
+
let uploadedEvent = new CustomEvent("on-uploaded", {
|
|
193
223
|
bubbles: true,
|
|
194
|
-
detail: args
|
|
224
|
+
detail: { args: args, uploadedFile: file }
|
|
195
225
|
});
|
|
196
|
-
|
|
197
|
-
this.element.dispatchEvent(event);
|
|
226
|
+
this.element.dispatchEvent(uploadedEvent);
|
|
198
227
|
}
|
|
199
228
|
else if (args.operation === "remove") {
|
|
200
229
|
}
|
|
230
|
+
let successEvent = new CustomEvent("on-success", {
|
|
231
|
+
bubbles: true,
|
|
232
|
+
detail: args
|
|
233
|
+
});
|
|
234
|
+
this.element.dispatchEvent(successEvent);
|
|
201
235
|
}
|
|
202
236
|
failure(args) {
|
|
203
237
|
let event = new CustomEvent("on-failure", {
|
|
@@ -296,11 +330,17 @@ __decorate([
|
|
|
296
330
|
aurelia_framework_1.bindable,
|
|
297
331
|
__metadata("design:type", Object)
|
|
298
332
|
], Ej2Uploader.prototype, "context", void 0);
|
|
333
|
+
__decorate([
|
|
334
|
+
aurelia_framework_1.bindable,
|
|
335
|
+
__metadata("design:type", Array)
|
|
336
|
+
], Ej2Uploader.prototype, "files", void 0);
|
|
299
337
|
__decorate([
|
|
300
338
|
aurelia_framework_1.bindable,
|
|
301
339
|
__metadata("design:type", Boolean)
|
|
302
340
|
], Ej2Uploader.prototype, "serverDelete", void 0);
|
|
303
341
|
Ej2Uploader = __decorate([
|
|
304
|
-
decorator_1.generateBindables("uploader")
|
|
342
|
+
decorator_1.generateBindables("uploader"),
|
|
343
|
+
aurelia_framework_2.inlineView(`<template><input element.ref="widgetElement" type="file" name="UploadFiles" /></template>`),
|
|
344
|
+
aurelia_framework_2.customElement('ej2-uploader')
|
|
305
345
|
], Ej2Uploader);
|
|
306
346
|
exports.Ej2Uploader = Ej2Uploader;
|
|
@@ -8,7 +8,8 @@ export declare class ControlBase<T, U> {
|
|
|
8
8
|
protected taskQueue: TaskQueue;
|
|
9
9
|
protected eventAggregator: EventAggregator;
|
|
10
10
|
protected element: Element;
|
|
11
|
-
eModel
|
|
11
|
+
private eModel;
|
|
12
|
+
protected _eModel: U;
|
|
12
13
|
protected widgetElement: HTMLElement;
|
|
13
14
|
widget: T;
|
|
14
15
|
protected bindingContext: any;
|
|
@@ -18,6 +19,7 @@ export declare class ControlBase<T, U> {
|
|
|
18
19
|
protected subscriptions: Disposable[];
|
|
19
20
|
constructor(bindingEngine: BindingEngine, controlContainer: ControlContainer, taskQueue: TaskQueue, eventAggregator: EventAggregator, element: Element);
|
|
20
21
|
onBind(): void;
|
|
22
|
+
onAttached(): void;
|
|
21
23
|
onCreateControl(): void;
|
|
22
24
|
protected debug(message: string, ...rest: any[]): void;
|
|
23
25
|
protected info(message: string, ...rest: any[]): void;
|
|
@@ -21,19 +21,21 @@ let ControlBase = class ControlBase {
|
|
|
21
21
|
this.eventAggregator = eventAggregator;
|
|
22
22
|
this.element = element;
|
|
23
23
|
this.eModel = null;
|
|
24
|
+
this._eModel = null;
|
|
24
25
|
this.widgetElement = null;
|
|
25
26
|
this.widget = null;
|
|
26
27
|
this.bindingContext = null;
|
|
27
28
|
this.logName = "";
|
|
28
29
|
this.propertyPriority = true;
|
|
29
30
|
this.subscriptions = [];
|
|
30
|
-
this.eModel = {};
|
|
31
31
|
}
|
|
32
32
|
get controlType() {
|
|
33
33
|
throw "syncfusionControlType is not set";
|
|
34
34
|
}
|
|
35
35
|
onBind() {
|
|
36
36
|
}
|
|
37
|
+
onAttached() {
|
|
38
|
+
}
|
|
37
39
|
onCreateControl() {
|
|
38
40
|
throw "onCreateControl is not implemented";
|
|
39
41
|
}
|
|
@@ -52,6 +54,7 @@ let ControlBase = class ControlBase {
|
|
|
52
54
|
bind(context) {
|
|
53
55
|
this.logName = this.controlType.name;
|
|
54
56
|
this.bindingContext = context;
|
|
57
|
+
this._eModel = Object.assign({}, this.eModel);
|
|
55
58
|
this.setInitialBindings();
|
|
56
59
|
this.onCreateControl();
|
|
57
60
|
this.onBind();
|
|
@@ -62,8 +65,8 @@ let ControlBase = class ControlBase {
|
|
|
62
65
|
_control.bindableProperties.forEach((property) => {
|
|
63
66
|
if (!property.startsWith(constants.eventPrefix)) {
|
|
64
67
|
let modelProperty = property.substr(bindablePrefixLength);
|
|
65
|
-
if (this[property] !== undefined && (this.propertyPriority || this.
|
|
66
|
-
this.
|
|
68
|
+
if (this[property] !== undefined && (this.propertyPriority || this._eModel[modelProperty] === undefined)) {
|
|
69
|
+
this._eModel[modelProperty] = this[property];
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
});
|
|
@@ -121,15 +124,21 @@ let ControlBase = class ControlBase {
|
|
|
121
124
|
}
|
|
122
125
|
attached() {
|
|
123
126
|
this.appendWidget();
|
|
127
|
+
this.onAttached();
|
|
124
128
|
}
|
|
125
129
|
appendWidget() {
|
|
126
130
|
this.widget.appendTo(this.widgetElement);
|
|
127
131
|
}
|
|
128
132
|
detached() {
|
|
129
|
-
this.subscriptions.forEach((subscription) => subscription
|
|
133
|
+
this.subscriptions.forEach((subscription) => { if (subscription) {
|
|
134
|
+
subscription.dispose();
|
|
135
|
+
} });
|
|
130
136
|
if (this.widget.destroy) {
|
|
131
137
|
this.widget.destroy();
|
|
132
138
|
}
|
|
139
|
+
this.widget = null;
|
|
140
|
+
this._eModel = null;
|
|
141
|
+
this.widgetElement = null;
|
|
133
142
|
}
|
|
134
143
|
};
|
|
135
144
|
__decorate([
|
|
@@ -5,6 +5,9 @@ export declare abstract class SyncfusionWrapper<T, U> extends ControlBase<T, U>
|
|
|
5
5
|
protected abstract onWidgetCreated(): any;
|
|
6
6
|
onCreateControl(): void;
|
|
7
7
|
recreate(): void;
|
|
8
|
+
onRecreate(): void;
|
|
9
|
+
recreating(): void;
|
|
10
|
+
recreated(): void;
|
|
8
11
|
refresh(): void;
|
|
9
12
|
dataBind(): void;
|
|
10
13
|
protected get controlType(): any;
|
|
@@ -6,17 +6,26 @@ export class SyncfusionWrapper extends ControlBase {
|
|
|
6
6
|
}
|
|
7
7
|
onCreateControl() {
|
|
8
8
|
this.onBeforeWidgetInstantiation();
|
|
9
|
-
this.widget = new this.syncfusionWidgetType(this.
|
|
9
|
+
this.widget = new this.syncfusionWidgetType(this._eModel);
|
|
10
10
|
this.widget.created = () => { this.onWidgetCreated(); };
|
|
11
11
|
this.onWrapperCreated();
|
|
12
12
|
this.createControlEvents(this.getBindables());
|
|
13
13
|
}
|
|
14
14
|
recreate() {
|
|
15
|
-
this.
|
|
15
|
+
this.onRecreate();
|
|
16
16
|
this.widget.destroy();
|
|
17
|
+
this.widget = null;
|
|
18
|
+
this.recreating();
|
|
17
19
|
this.setInitialBindings();
|
|
18
20
|
this.onCreateControl();
|
|
19
21
|
this.appendWidget();
|
|
22
|
+
this.recreated();
|
|
23
|
+
}
|
|
24
|
+
onRecreate() {
|
|
25
|
+
}
|
|
26
|
+
recreating() {
|
|
27
|
+
}
|
|
28
|
+
recreated() {
|
|
20
29
|
}
|
|
21
30
|
refresh() {
|
|
22
31
|
this.widget.refresh();
|
|
@@ -5,10 +5,6 @@ export declare class ConfigBuilder {
|
|
|
5
5
|
useDefaults(): ConfigBuilder;
|
|
6
6
|
useTheme(theme: "material" | "bootstrap" | "bootstrap4" | "fabric" | "highcontrast"): this;
|
|
7
7
|
materialTheme(): this;
|
|
8
|
-
fabricTheme(): this;
|
|
9
|
-
bootstrapTheme(): this;
|
|
10
|
-
bootstrap4Theme(): this;
|
|
11
|
-
highcontrastTheme(): this;
|
|
12
8
|
withoutGlobalResources(): ConfigBuilder;
|
|
13
9
|
ej2Accordion(): ConfigBuilder;
|
|
14
10
|
ej2AutoComplete(): ConfigBuilder;
|
|
@@ -21,14 +17,20 @@ export declare class ConfigBuilder {
|
|
|
21
17
|
ej2DateRangePicker(): ConfigBuilder;
|
|
22
18
|
ej2DateTimePicker(): ConfigBuilder;
|
|
23
19
|
ej2DropDownList(): ConfigBuilder;
|
|
20
|
+
ej2DropDownTree(): ConfigBuilder;
|
|
21
|
+
ej2FileManager(): ConfigBuilder;
|
|
24
22
|
ej2Grid(): ConfigBuilder;
|
|
25
23
|
ej2ListView(): ConfigBuilder;
|
|
26
24
|
ej2MaskedTextBox(): ConfigBuilder;
|
|
25
|
+
ej2MultiSelect(): ConfigBuilder;
|
|
27
26
|
ej2NumericTextBox(): ConfigBuilder;
|
|
28
27
|
ej2Pager(): ConfigBuilder;
|
|
29
28
|
ej2ProgressButton(): ConfigBuilder;
|
|
30
29
|
ej2Radio(): ConfigBuilder;
|
|
30
|
+
ej2Schedule(): ConfigBuilder;
|
|
31
|
+
ej2Sidebar(): ConfigBuilder;
|
|
31
32
|
ej2Slider(): ConfigBuilder;
|
|
33
|
+
ej2Splitter(): ConfigBuilder;
|
|
32
34
|
ej2Switch(): ConfigBuilder;
|
|
33
35
|
ej2TextBox(): ConfigBuilder;
|
|
34
36
|
ej2TimePicker(): ConfigBuilder;
|