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
|
@@ -8,6 +8,7 @@ import { RadioButton } from '@syncfusion/ej2-buttons';
|
|
|
8
8
|
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
9
9
|
import { constants } from '../../common/constants';
|
|
10
10
|
import { generateBindables } from '../../utilities/decorator';
|
|
11
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
11
12
|
let Ej2Radio = class Ej2Radio extends SyncfusionWrapper {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -20,17 +21,17 @@ let Ej2Radio = class Ej2Radio extends SyncfusionWrapper {
|
|
|
20
21
|
onWrapperCreated() {
|
|
21
22
|
}
|
|
22
23
|
onBind() {
|
|
23
|
-
if (!this.
|
|
24
|
+
if (!this._eModel.name) {
|
|
24
25
|
throw "Radio e-name is required";
|
|
25
26
|
}
|
|
26
27
|
this.widget.change = () => {
|
|
27
28
|
this[`${constants.bindablePrefix}checked`] = this.widget.checked;
|
|
28
|
-
this.eventAggregator.publish(`ej2-radio-${this.
|
|
29
|
+
this.eventAggregator.publish(`ej2-radio-${this._eModel.name}-changed`, this[`${constants.bindablePrefix}label`]);
|
|
29
30
|
};
|
|
30
31
|
this.checkedSubscription = this.bindingEngine.propertyObserver(this, this[`${constants.bindablePrefix}checked`]).subscribe((newValue) => {
|
|
31
32
|
this.widget.checked = newValue;
|
|
32
33
|
});
|
|
33
|
-
this.selectionChangedSubscription = this.eventAggregator.subscribe(`ej2-radio-${this.
|
|
34
|
+
this.selectionChangedSubscription = this.eventAggregator.subscribe(`ej2-radio-${this._eModel.name}-changed`, (selectedLabel) => {
|
|
34
35
|
if (this[`${constants.bindablePrefix}label`] !== selectedLabel) {
|
|
35
36
|
this[`${constants.bindablePrefix}checked`] = false;
|
|
36
37
|
}
|
|
@@ -43,6 +44,8 @@ let Ej2Radio = class Ej2Radio extends SyncfusionWrapper {
|
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
Ej2Radio = __decorate([
|
|
46
|
-
generateBindables("radio")
|
|
47
|
+
generateBindables("radio"),
|
|
48
|
+
inlineView(`<template><input element.ref="widgetElement" type="radio" /></template>`),
|
|
49
|
+
customElement('ej2-radio')
|
|
47
50
|
], Ej2Radio);
|
|
48
51
|
export { Ej2Radio };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schedule, ScheduleModel } from '@syncfusion/ej2-schedule';
|
|
2
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
3
|
+
export declare class Ej2Schedule extends SyncfusionWrapper<Schedule, ScheduleModel> {
|
|
4
|
+
protected syncfusionWidgetType: any;
|
|
5
|
+
protected onWrapperCreated(): void;
|
|
6
|
+
protected onWidgetCreated(): void;
|
|
7
|
+
onBeforeWidgetInstantiation(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
8
|
+
import { Schedule, TimelineViews, TimelineMonth, Resize, DragAndDrop, Day, Week, WorkWeek, Month, Agenda, TimelineYear, ExcelExport, ICalendarExport, ICalendarImport, Print } from '@syncfusion/ej2-schedule';
|
|
9
|
+
import { generateBindables } from '../../utilities/decorator';
|
|
10
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
11
|
+
let Ej2Schedule = class Ej2Schedule extends SyncfusionWrapper {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.syncfusionWidgetType = Schedule;
|
|
15
|
+
}
|
|
16
|
+
onWrapperCreated() {
|
|
17
|
+
}
|
|
18
|
+
onWidgetCreated() {
|
|
19
|
+
}
|
|
20
|
+
onBeforeWidgetInstantiation() {
|
|
21
|
+
Schedule.Inject(Day, Week, WorkWeek, Month, Agenda, TimelineViews, TimelineMonth, TimelineYear, DragAndDrop, Resize, ExcelExport, ICalendarExport, ICalendarImport, Print);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
Ej2Schedule = __decorate([
|
|
25
|
+
generateBindables("radio"),
|
|
26
|
+
inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
27
|
+
customElement('ej2-schedule')
|
|
28
|
+
], Ej2Schedule);
|
|
29
|
+
export { Ej2Schedule };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
2
|
+
import { Sidebar, SidebarModel } from "@syncfusion/ej2-navigations";
|
|
3
|
+
export declare class Ej2Sidebar extends SyncfusionWrapper<Sidebar, SidebarModel> {
|
|
4
|
+
protected syncfusionWidgetType: typeof Sidebar;
|
|
5
|
+
protected onWrapperCreated(): void;
|
|
6
|
+
protected onWidgetCreated(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
8
|
+
import { Sidebar } from "@syncfusion/ej2-navigations";
|
|
9
|
+
import { generateBindables } from "../../utilities/decorator";
|
|
10
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
11
|
+
let Ej2Sidebar = class Ej2Sidebar extends SyncfusionWrapper {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.syncfusionWidgetType = Sidebar;
|
|
15
|
+
}
|
|
16
|
+
onWrapperCreated() {
|
|
17
|
+
}
|
|
18
|
+
onWidgetCreated() {
|
|
19
|
+
let _this = this;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
Ej2Sidebar = __decorate([
|
|
23
|
+
generateBindables("sidebar"),
|
|
24
|
+
inlineView(`<template element.ref="widgetElement"><slot></slot></template>`),
|
|
25
|
+
customElement('ej2-sidebar')
|
|
26
|
+
], Ej2Sidebar);
|
|
27
|
+
export { Ej2Sidebar };
|
|
@@ -8,6 +8,7 @@ import { constants } from './../../common/constants';
|
|
|
8
8
|
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
9
9
|
import { Slider } from "@syncfusion/ej2-inputs";
|
|
10
10
|
import { generateBindables } from "../../utilities/decorator";
|
|
11
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
11
12
|
let Ej2Slider = class Ej2Slider extends SyncfusionWrapper {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -26,6 +27,8 @@ let Ej2Slider = class Ej2Slider extends SyncfusionWrapper {
|
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
Ej2Slider = __decorate([
|
|
29
|
-
generateBindables("slider")
|
|
30
|
+
generateBindables("slider"),
|
|
31
|
+
inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
32
|
+
customElement('ej2-slider')
|
|
30
33
|
], Ej2Slider);
|
|
31
34
|
export { Ej2Slider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
2
|
+
import { Splitter, SplitterModel } from '@syncfusion/ej2-layouts';
|
|
3
|
+
export declare class Ej2Splitter extends SyncfusionWrapper<Splitter, SplitterModel> {
|
|
4
|
+
protected onWrapperCreated(): void;
|
|
5
|
+
protected onWidgetCreated(): void;
|
|
6
|
+
protected syncfusionWidgetType: typeof Splitter;
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
8
|
+
import { generateBindables } from "../../utilities/decorator";
|
|
9
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
10
|
+
import { Splitter } from '@syncfusion/ej2-layouts';
|
|
11
|
+
let Ej2Splitter = class Ej2Splitter extends SyncfusionWrapper {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.syncfusionWidgetType = Splitter;
|
|
15
|
+
}
|
|
16
|
+
onWrapperCreated() {
|
|
17
|
+
}
|
|
18
|
+
onWidgetCreated() {
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
Ej2Splitter = __decorate([
|
|
22
|
+
generateBindables("splitter"),
|
|
23
|
+
inlineView(`<template><div element.ref="widgetElement"><slot></slot></div></template>`),
|
|
24
|
+
customElement('ej2-splitter')
|
|
25
|
+
], Ej2Splitter);
|
|
26
|
+
export { Ej2Splitter };
|
|
@@ -3,8 +3,9 @@ import { Switch, SwitchModel } from '@syncfusion/ej2-buttons';
|
|
|
3
3
|
export declare class Ej2Switch extends SyncfusionWrapper<Switch, SwitchModel> {
|
|
4
4
|
protected syncfusionWidgetType: typeof Switch;
|
|
5
5
|
private id;
|
|
6
|
+
private onChange;
|
|
6
7
|
protected onWrapperCreated(): void;
|
|
7
8
|
protected onWidgetCreated(): void;
|
|
8
|
-
onChange(args: any): void;
|
|
9
9
|
recreate(): void;
|
|
10
|
+
detached(): void;
|
|
10
11
|
}
|
|
@@ -8,11 +8,13 @@ import { constants } from './../../common/constants';
|
|
|
8
8
|
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
9
9
|
import { Switch } from '@syncfusion/ej2-buttons';
|
|
10
10
|
import { generateBindables } from '../../utilities/decorator';
|
|
11
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
11
12
|
let Ej2Switch = class Ej2Switch extends SyncfusionWrapper {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.syncfusionWidgetType = Switch;
|
|
15
16
|
this.id = null;
|
|
17
|
+
this.onChange = null;
|
|
16
18
|
}
|
|
17
19
|
onWrapperCreated() {
|
|
18
20
|
this.id = this.element.getAttribute("id");
|
|
@@ -23,10 +25,10 @@ let Ej2Switch = class Ej2Switch extends SyncfusionWrapper {
|
|
|
23
25
|
}
|
|
24
26
|
onWidgetCreated() {
|
|
25
27
|
let _this = this;
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this
|
|
28
|
+
this.onChange = (args) => {
|
|
29
|
+
_this[`${constants.bindablePrefix}checked`] = args.checked;
|
|
30
|
+
};
|
|
31
|
+
this.widget.addEventListener("change", this.onChange);
|
|
30
32
|
}
|
|
31
33
|
recreate() {
|
|
32
34
|
if (this.id) {
|
|
@@ -35,8 +37,13 @@ let Ej2Switch = class Ej2Switch extends SyncfusionWrapper {
|
|
|
35
37
|
this.element.setAttribute("id", this.id);
|
|
36
38
|
super.recreate();
|
|
37
39
|
}
|
|
40
|
+
detached() {
|
|
41
|
+
this.widget.removeEventListener("change", this.onChange);
|
|
42
|
+
}
|
|
38
43
|
};
|
|
39
44
|
Ej2Switch = __decorate([
|
|
40
|
-
generateBindables("switch")
|
|
45
|
+
generateBindables("switch"),
|
|
46
|
+
inlineView(`<template><slot></slot><input element.ref="widgetElement" type="checkbox" /></template>`),
|
|
47
|
+
customElement('ej2-switch')
|
|
41
48
|
], Ej2Switch);
|
|
42
49
|
export { Ej2Switch };
|
|
@@ -9,6 +9,7 @@ import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
|
9
9
|
import { TextBox } from "@syncfusion/ej2-inputs";
|
|
10
10
|
import { generateBindables } from "../../utilities/decorator";
|
|
11
11
|
import { enableRipple } from '@syncfusion/ej2-base';
|
|
12
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
12
13
|
enableRipple(true);
|
|
13
14
|
let Ej2TextBox = class Ej2TextBox extends SyncfusionWrapper {
|
|
14
15
|
constructor() {
|
|
@@ -26,6 +27,8 @@ let Ej2TextBox = class Ej2TextBox extends SyncfusionWrapper {
|
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
Ej2TextBox = __decorate([
|
|
29
|
-
generateBindables("textBox")
|
|
30
|
+
generateBindables("textBox"),
|
|
31
|
+
inlineView(`<template><input element.ref="widgetElement" /></template>`),
|
|
32
|
+
customElement('ej2-text-box')
|
|
30
33
|
], Ej2TextBox);
|
|
31
34
|
export { Ej2TextBox };
|
|
@@ -8,6 +8,7 @@ import { constants } from './../../common/constants';
|
|
|
8
8
|
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
9
9
|
import { TimePicker } from "@syncfusion/ej2-calendars";
|
|
10
10
|
import { generateBindables } from '../../utilities/decorator';
|
|
11
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
11
12
|
let Ej2TimePicker = class Ej2TimePicker extends SyncfusionWrapper {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -24,6 +25,8 @@ let Ej2TimePicker = class Ej2TimePicker extends SyncfusionWrapper {
|
|
|
24
25
|
}
|
|
25
26
|
};
|
|
26
27
|
Ej2TimePicker = __decorate([
|
|
27
|
-
generateBindables("timePicker")
|
|
28
|
+
generateBindables("timePicker"),
|
|
29
|
+
inlineView(`<template><input element.ref="widgetElement" /></template>`),
|
|
30
|
+
customElement('ej2-time-picker')
|
|
28
31
|
], Ej2TimePicker);
|
|
29
32
|
export { Ej2TimePicker };
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
8
8
|
import { TreeView } from '@syncfusion/ej2-navigations';
|
|
9
9
|
import { generateBindables } from '../../utilities/decorator';
|
|
10
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
10
11
|
let Ej2TreeView = class Ej2TreeView extends SyncfusionWrapper {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -18,6 +19,8 @@ let Ej2TreeView = class Ej2TreeView extends SyncfusionWrapper {
|
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
Ej2TreeView = __decorate([
|
|
21
|
-
generateBindables("treeView")
|
|
22
|
+
generateBindables("treeView"),
|
|
23
|
+
inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
24
|
+
customElement('ej2-tree-view')
|
|
22
25
|
], Ej2TreeView);
|
|
23
26
|
export { 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[];
|
|
@@ -12,11 +12,13 @@ import { Uploader } from "@syncfusion/ej2-inputs";
|
|
|
12
12
|
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
13
13
|
import { generateBindables } from "../../utilities/decorator";
|
|
14
14
|
import { bindable } from 'aurelia-framework';
|
|
15
|
-
import
|
|
15
|
+
import { v4 as uuid } from "uuid";
|
|
16
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
16
17
|
let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
19
20
|
this._filesProperty = `${constants.bindablePrefix}files`;
|
|
21
|
+
this.originalFiles = null;
|
|
20
22
|
this._filesCollectionSubscription = null;
|
|
21
23
|
this._privateIdProperty = "__id";
|
|
22
24
|
this.syncfusionWidgetType = Uploader;
|
|
@@ -29,13 +31,14 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
29
31
|
this.dataAdapter = null;
|
|
30
32
|
this.autoRemoveServerFiles = true;
|
|
31
33
|
this.context = null;
|
|
34
|
+
this.files = null;
|
|
35
|
+
this.firstBind = true;
|
|
32
36
|
this.serverDelete = true;
|
|
33
37
|
}
|
|
34
38
|
get _files() {
|
|
35
39
|
return this[this._filesProperty];
|
|
36
40
|
}
|
|
37
41
|
onWrapperCreated() {
|
|
38
|
-
this.debug("wrapper created");
|
|
39
42
|
this.widget.uploading = (args) => { this.onFileUpload(args); };
|
|
40
43
|
this.widget.success = (args) => { this.success(args); };
|
|
41
44
|
this.widget.failure = (args) => { this.failure(args); };
|
|
@@ -51,20 +54,28 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
51
54
|
_this.widget.removingEventCallback(eventArgs, formData, selectedFiles, file);
|
|
52
55
|
});
|
|
53
56
|
};
|
|
57
|
+
this.widget.asyncSettings.removeUrl = null;
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
|
|
61
|
+
onfilesChanged() {
|
|
62
|
+
if (!this.firstBind) {
|
|
63
|
+
this.widget.clearAll();
|
|
64
|
+
this.recreate();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
recreating() {
|
|
60
68
|
this._filesCollectionSubscription.dispose();
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
this[this._filesProperty].splice(0, this[this._filesProperty].length, ...this.originalFiles);
|
|
70
|
+
}
|
|
71
|
+
recreated() {
|
|
72
|
+
this.initializeFileCollection();
|
|
73
|
+
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
66
74
|
}
|
|
67
75
|
initializeFileCollection() {
|
|
76
|
+
if (this.files && Array.isArray(this.files)) {
|
|
77
|
+
this.widget.files.push(...JSON.parse(JSON.stringify(this.files)));
|
|
78
|
+
}
|
|
68
79
|
if (this.widget.files) {
|
|
69
80
|
let extraProperties = [];
|
|
70
81
|
let widgetFiles = this.widget.getFilesData();
|
|
@@ -78,7 +89,7 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
initializeFile(widgetFile, i, extraProperties) {
|
|
81
|
-
let __id =
|
|
92
|
+
let __id = uuid();
|
|
82
93
|
widgetFile[this._privateIdProperty] = __id;
|
|
83
94
|
this._files[i][this._privateIdProperty] = __id;
|
|
84
95
|
extraProperties.forEach((prop) => {
|
|
@@ -90,14 +101,34 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
90
101
|
this._filesCollectionSubscription = this.createFilesCollectionSubscription();
|
|
91
102
|
this.subscriptions.push(this._filesCollectionSubscription);
|
|
92
103
|
}
|
|
104
|
+
onBind() {
|
|
105
|
+
this.firstBind = false;
|
|
106
|
+
this.subscriptions.push(this.bindingEngine.propertyObserver(this, "files").subscribe(() => { this.onfilesChanged(); }));
|
|
107
|
+
if (this[this._filesProperty] && Array.isArray(this[this._filesProperty])) {
|
|
108
|
+
this.originalFiles = JSON.parse(JSON.stringify(this[this._filesProperty]));
|
|
109
|
+
}
|
|
110
|
+
else if (this.files && Array.isArray(this.files)) {
|
|
111
|
+
this.originalFiles = JSON.parse(JSON.stringify(this.files));
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
this.originalFiles = [];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
93
117
|
createFilesCollectionSubscription() {
|
|
94
|
-
|
|
95
|
-
|
|
118
|
+
if (!this._files) {
|
|
119
|
+
this[this._filesProperty] = [];
|
|
120
|
+
}
|
|
121
|
+
return this.bindingEngine.collectionObserver(this._files).subscribe((changed) => { });
|
|
96
122
|
}
|
|
97
123
|
change() {
|
|
98
124
|
if (this.autoRemoveServerFiles) {
|
|
99
125
|
this.getFilesThatWereRemoved().forEach((file) => {
|
|
100
|
-
this.
|
|
126
|
+
this.removing({
|
|
127
|
+
filesData: [file],
|
|
128
|
+
customFormData: null,
|
|
129
|
+
event: null,
|
|
130
|
+
cancel: false
|
|
131
|
+
});
|
|
101
132
|
});
|
|
102
133
|
}
|
|
103
134
|
}
|
|
@@ -120,11 +151,9 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
120
151
|
});
|
|
121
152
|
}
|
|
122
153
|
removeFile(file) {
|
|
123
|
-
this.debug("removeFile", file);
|
|
124
154
|
this.widget.remove(file);
|
|
125
155
|
}
|
|
126
156
|
async removing(args) {
|
|
127
|
-
this.debug("removing", args);
|
|
128
157
|
let event = new CustomEvent("on-removing", {
|
|
129
158
|
bubbles: true,
|
|
130
159
|
detail: args
|
|
@@ -145,7 +174,6 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
145
174
|
this.onWidgetRemoveFailed(error, args);
|
|
146
175
|
}
|
|
147
176
|
}
|
|
148
|
-
this.onRemoveSuccess(args);
|
|
149
177
|
}
|
|
150
178
|
onWidgetRemoveComplete(response, args) {
|
|
151
179
|
this.widget.removeCompleted(response, args.filesData[0], false);
|
|
@@ -154,15 +182,16 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
154
182
|
this.widget.removeFailed(e, args.filesData[0], false);
|
|
155
183
|
}
|
|
156
184
|
onRemoveSuccess(args) {
|
|
157
|
-
this.debug("onRemoveSuccess", args);
|
|
158
185
|
let _file = args.filesData[0];
|
|
159
186
|
let index = this[this._filesProperty].findIndex((x) => x.__id === _file.__id);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
187
|
+
if (index !== -1) {
|
|
188
|
+
const removedFile = this[this._filesProperty].splice(index, 1)[0];
|
|
189
|
+
let event = new CustomEvent("on-remove-success", {
|
|
190
|
+
bubbles: true,
|
|
191
|
+
detail: { args: args, removedFile: removedFile }
|
|
192
|
+
});
|
|
193
|
+
this.element.dispatchEvent(event);
|
|
194
|
+
}
|
|
166
195
|
}
|
|
167
196
|
success(args) {
|
|
168
197
|
if (args.operation === "upload") {
|
|
@@ -170,7 +199,7 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
170
199
|
let _uploadedFile = args.file;
|
|
171
200
|
let fileName = _uploadedFile.name.substr(0, _uploadedFile.name.length - (_uploadedFile.type.length + 1));
|
|
172
201
|
let additionalProperties = {};
|
|
173
|
-
additionalProperties[this._privateIdProperty] =
|
|
202
|
+
additionalProperties[this._privateIdProperty] = uuid();
|
|
174
203
|
if (this.uploadResultModel) {
|
|
175
204
|
for (let prop in this.uploadResultModel) {
|
|
176
205
|
additionalProperties[this.uploadResultModel[prop]] = response[prop];
|
|
@@ -187,15 +216,19 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
187
216
|
this[this._filesProperty] = [];
|
|
188
217
|
}
|
|
189
218
|
this[this._filesProperty].push(file);
|
|
190
|
-
let
|
|
219
|
+
let uploadedEvent = new CustomEvent("on-uploaded", {
|
|
191
220
|
bubbles: true,
|
|
192
|
-
detail: args
|
|
221
|
+
detail: { args: args, uploadedFile: file }
|
|
193
222
|
});
|
|
194
|
-
|
|
195
|
-
this.element.dispatchEvent(event);
|
|
223
|
+
this.element.dispatchEvent(uploadedEvent);
|
|
196
224
|
}
|
|
197
225
|
else if (args.operation === "remove") {
|
|
198
226
|
}
|
|
227
|
+
let successEvent = new CustomEvent("on-success", {
|
|
228
|
+
bubbles: true,
|
|
229
|
+
detail: args
|
|
230
|
+
});
|
|
231
|
+
this.element.dispatchEvent(successEvent);
|
|
199
232
|
}
|
|
200
233
|
failure(args) {
|
|
201
234
|
let event = new CustomEvent("on-failure", {
|
|
@@ -294,11 +327,17 @@ __decorate([
|
|
|
294
327
|
bindable,
|
|
295
328
|
__metadata("design:type", Object)
|
|
296
329
|
], Ej2Uploader.prototype, "context", void 0);
|
|
330
|
+
__decorate([
|
|
331
|
+
bindable,
|
|
332
|
+
__metadata("design:type", Array)
|
|
333
|
+
], Ej2Uploader.prototype, "files", void 0);
|
|
297
334
|
__decorate([
|
|
298
335
|
bindable,
|
|
299
336
|
__metadata("design:type", Boolean)
|
|
300
337
|
], Ej2Uploader.prototype, "serverDelete", void 0);
|
|
301
338
|
Ej2Uploader = __decorate([
|
|
302
|
-
generateBindables("uploader")
|
|
339
|
+
generateBindables("uploader"),
|
|
340
|
+
inlineView(`<template><input element.ref="widgetElement" type="file" name="UploadFiles" /></template>`),
|
|
341
|
+
customElement('ej2-uploader')
|
|
303
342
|
], Ej2Uploader);
|
|
304
343
|
export { Ej2Uploader };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aurelia-syncfusion-ej2-bridge",
|
|
3
3
|
"description": "An Aurelia plugin wrapper for syncfusion EJ2 controls",
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.31",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aurelia",
|
|
7
7
|
"syncfusion"
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@syncfusion/ej2": "^
|
|
15
|
+
"@syncfusion/ej2": "^20.4.51"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "au run",
|
|
19
19
|
"build": "au build-plugin"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@syncfusion/ej2": "^
|
|
22
|
+
"@syncfusion/ej2": "^20.4.51",
|
|
23
23
|
"@types/jest": "^24.0.9",
|
|
24
24
|
"@types/node": "^10.11.6",
|
|
25
25
|
"aurelia-animator-css": "^1.0.4",
|
|
@@ -100,4 +100,4 @@
|
|
|
100
100
|
"html"
|
|
101
101
|
]
|
|
102
102
|
}
|
|
103
|
-
}
|
|
103
|
+
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div repeat.for="option of dataSource" css="${orientation === 'horizontal'? 'display: inline;': ''}">
|
|
3
|
-
<ej2-checkbox view-model.ref="viewModels[$index]" e-label.bind="optionModel? option[optionModel.label]: option"
|
|
4
|
-
e-name.bind="optionModel? option[optionModel.name]: option"
|
|
5
|
-
click.delegate="checkboxClick(option, viewModels[$index])"
|
|
6
|
-
e-checked.bind="selectedItems.length >0 && matcher? isMatch(option) : selectedItems.indexOf(option) !== -1">
|
|
7
|
-
</ej2-checkbox>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|