aurelia-syncfusion-ej2-bridge 0.1.0-beta.25 → 0.1.0-beta.26
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 +162 -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 +48 -0
- package/dist/commonjs/configBuider.d.ts +39 -0
- package/dist/commonjs/configBuider.js +214 -0
- package/dist/commonjs/controlBindings.d.ts +140 -0
- package/dist/commonjs/controlBindings.js +152 -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 +64 -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/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/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 +8 -0
- package/dist/commonjs/widgets/slider/ej2-slider.js +37 -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/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 +346 -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 +159 -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 +44 -0
- package/dist/native-modules/configBuider.d.ts +39 -0
- package/dist/native-modules/configBuider.js +210 -0
- package/dist/native-modules/controlBindings.d.ts +140 -0
- package/dist/native-modules/controlBindings.js +149 -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 +0 -0
- package/dist/native-modules/interfaces/IEj2Uploader.d.ts +17 -0
- package/dist/native-modules/interfaces/IEj2Uploader.js +0 -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/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/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 +8 -0
- package/dist/native-modules/widgets/slider/ej2-slider.js +34 -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/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 +343 -0
- package/package.json +1 -1
|
@@ -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,162 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExcludedProperties = exports.ControlBase = void 0;
|
|
13
|
+
const aurelia_task_queue_1 = require("aurelia-task-queue");
|
|
14
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
15
|
+
const controlContainer_1 = require("./controlContainer");
|
|
16
|
+
const constants_1 = require("./constants");
|
|
17
|
+
const aurelia_event_aggregator_1 = require("aurelia-event-aggregator");
|
|
18
|
+
let logger = aurelia_framework_1.LogManager.getLogger("SyncfusionBridge");
|
|
19
|
+
let ControlBase = class ControlBase {
|
|
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
|
+
get controlType() {
|
|
36
|
+
throw "syncfusionControlType is not set";
|
|
37
|
+
}
|
|
38
|
+
onBind() {
|
|
39
|
+
}
|
|
40
|
+
onAttached() {
|
|
41
|
+
}
|
|
42
|
+
onCreateControl() {
|
|
43
|
+
throw "onCreateControl is not implemented";
|
|
44
|
+
}
|
|
45
|
+
debug(message, ...rest) {
|
|
46
|
+
logger.debug(`[${this.logName}] - ${message}`, rest);
|
|
47
|
+
}
|
|
48
|
+
info(message, ...rest) {
|
|
49
|
+
logger.info(`[${this.logName}] - ${message}`, rest);
|
|
50
|
+
}
|
|
51
|
+
error(message, ...rest) {
|
|
52
|
+
logger.error(`[${this.logName}] - ${message}`, rest);
|
|
53
|
+
}
|
|
54
|
+
warn(message, ...rest) {
|
|
55
|
+
logger.warn(`[${this.logName}] - ${message}`, rest);
|
|
56
|
+
}
|
|
57
|
+
bind(context) {
|
|
58
|
+
this.logName = this.controlType.name;
|
|
59
|
+
this.bindingContext = context;
|
|
60
|
+
this._eModel = Object.assign({}, this.eModel);
|
|
61
|
+
this.setInitialBindings();
|
|
62
|
+
this.onCreateControl();
|
|
63
|
+
this.onBind();
|
|
64
|
+
}
|
|
65
|
+
setInitialBindings() {
|
|
66
|
+
let _control = this.getBindables();
|
|
67
|
+
let bindablePrefixLength = constants_1.constants.bindablePrefix.length;
|
|
68
|
+
_control.bindableProperties.forEach((property) => {
|
|
69
|
+
if (!property.startsWith(constants_1.constants.eventPrefix)) {
|
|
70
|
+
let modelProperty = property.substr(bindablePrefixLength);
|
|
71
|
+
if (this[property] !== undefined && (this.propertyPriority || this._eModel[modelProperty] === undefined)) {
|
|
72
|
+
this._eModel[modelProperty] = this[property];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
this.createControlPropertySubscriptions(_control);
|
|
77
|
+
}
|
|
78
|
+
getBindables() {
|
|
79
|
+
let _control = this.controlContainer.get(this.controlType);
|
|
80
|
+
if (!_control) {
|
|
81
|
+
_control = {};
|
|
82
|
+
_control.type = this.controlType;
|
|
83
|
+
_control.bindableProperties = [];
|
|
84
|
+
_control.bindableEvents = [];
|
|
85
|
+
for (let property in this["__observers__"]) {
|
|
86
|
+
if (exports.ExcludedProperties.indexOf(property) === -1) {
|
|
87
|
+
if (property.startsWith(constants_1.constants.eventPrefix)) {
|
|
88
|
+
_control.bindableEvents.push(property);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
_control.bindableProperties.push(property);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return _control;
|
|
97
|
+
}
|
|
98
|
+
createControlEvents(control) {
|
|
99
|
+
control.bindableEvents.forEach((event) => {
|
|
100
|
+
let eventName = event.substr(constants_1.constants.eventPrefix.length);
|
|
101
|
+
this.widget.addEventListener(eventName, (args) => {
|
|
102
|
+
this.element.dispatchEvent(new CustomEvent(event, {
|
|
103
|
+
bubbles: true,
|
|
104
|
+
detail: args
|
|
105
|
+
}));
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
createControlPropertySubscriptions(control) {
|
|
110
|
+
if (control) {
|
|
111
|
+
let bindablePrefixLength = constants_1.constants.bindablePrefix.length;
|
|
112
|
+
control.bindableProperties.forEach((binding) => {
|
|
113
|
+
let modelBinding = binding.substr(bindablePrefixLength);
|
|
114
|
+
this.subscriptions.push(this.bindingEngine.propertyObserver(this, binding).subscribe((newValue) => {
|
|
115
|
+
if (this.widget.properties.hasOwnProperty(modelBinding)) {
|
|
116
|
+
let customFunc = `${modelBinding}Changed`;
|
|
117
|
+
if (typeof this[customFunc] === "function") {
|
|
118
|
+
this[customFunc].call(this, newValue);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.widget[modelBinding] = newValue;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
attached() {
|
|
129
|
+
this.appendWidget();
|
|
130
|
+
this.onAttached();
|
|
131
|
+
}
|
|
132
|
+
appendWidget() {
|
|
133
|
+
this.widget.appendTo(this.widgetElement);
|
|
134
|
+
}
|
|
135
|
+
detached() {
|
|
136
|
+
this.subscriptions.forEach((subscription) => { if (subscription) {
|
|
137
|
+
subscription.dispose();
|
|
138
|
+
} });
|
|
139
|
+
if (this.widget.destroy) {
|
|
140
|
+
this.debug("destroy method", null);
|
|
141
|
+
this.widget.destroy();
|
|
142
|
+
}
|
|
143
|
+
this.widget = null;
|
|
144
|
+
this._eModel = null;
|
|
145
|
+
this.widgetElement = null;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
__decorate([
|
|
149
|
+
aurelia_framework_1.bindable,
|
|
150
|
+
__metadata("design:type", Object)
|
|
151
|
+
], ControlBase.prototype, "eModel", void 0);
|
|
152
|
+
ControlBase = __decorate([
|
|
153
|
+
aurelia_framework_1.autoinject,
|
|
154
|
+
__metadata("design:paramtypes", [aurelia_framework_1.BindingEngine, controlContainer_1.ControlContainer,
|
|
155
|
+
aurelia_task_queue_1.TaskQueue, aurelia_event_aggregator_1.EventAggregator, Element])
|
|
156
|
+
], ControlBase);
|
|
157
|
+
exports.ControlBase = ControlBase;
|
|
158
|
+
exports.ExcludedProperties = [
|
|
159
|
+
"__propertiesDefined__",
|
|
160
|
+
"eModel",
|
|
161
|
+
"onClick"
|
|
162
|
+
];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ControlContainer = void 0;
|
|
4
|
+
class ControlContainer {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.controls = [];
|
|
7
|
+
}
|
|
8
|
+
add(control) {
|
|
9
|
+
let existing = this.controls.find((x) => x.type === control.type);
|
|
10
|
+
if (!existing) {
|
|
11
|
+
this.controls.push(control);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
get(type) {
|
|
15
|
+
let _control = this.controls.find((x) => x.type === type);
|
|
16
|
+
return _control;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ControlContainer = ControlContainer;
|
|
@@ -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,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncfusionWrapper = void 0;
|
|
4
|
+
const controlBase_1 = require("./controlBase");
|
|
5
|
+
class SyncfusionWrapper extends controlBase_1.ControlBase {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.syncfusionWidgetType = null;
|
|
9
|
+
}
|
|
10
|
+
onCreateControl() {
|
|
11
|
+
this.onBeforeWidgetInstantiation();
|
|
12
|
+
this.widget = new this.syncfusionWidgetType(this._eModel);
|
|
13
|
+
this.widget.created = () => { this.onWidgetCreated(); };
|
|
14
|
+
this.onWrapperCreated();
|
|
15
|
+
this.createControlEvents(this.getBindables());
|
|
16
|
+
}
|
|
17
|
+
recreate() {
|
|
18
|
+
this.onRecreate();
|
|
19
|
+
this.widget.destroy();
|
|
20
|
+
this.widget = null;
|
|
21
|
+
this.recreating();
|
|
22
|
+
this.setInitialBindings();
|
|
23
|
+
this.onCreateControl();
|
|
24
|
+
this.appendWidget();
|
|
25
|
+
this.recreated();
|
|
26
|
+
}
|
|
27
|
+
onRecreate() {
|
|
28
|
+
}
|
|
29
|
+
recreating() {
|
|
30
|
+
}
|
|
31
|
+
recreated() {
|
|
32
|
+
}
|
|
33
|
+
refresh() {
|
|
34
|
+
this.widget.refresh();
|
|
35
|
+
}
|
|
36
|
+
dataBind() {
|
|
37
|
+
this.widget.dataBind();
|
|
38
|
+
}
|
|
39
|
+
get controlType() {
|
|
40
|
+
if (this.syncfusionWidgetType) {
|
|
41
|
+
return this.syncfusionWidgetType;
|
|
42
|
+
}
|
|
43
|
+
throw "syncfusionControlType is not set";
|
|
44
|
+
}
|
|
45
|
+
onBeforeWidgetInstantiation() {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.SyncfusionWrapper = SyncfusionWrapper;
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
ej2ComboBox(): ConfigBuilder;
|
|
15
|
+
ej2DashboardLayout(): ConfigBuilder;
|
|
16
|
+
ej2DatePicker(): ConfigBuilder;
|
|
17
|
+
ej2DateRangePicker(): ConfigBuilder;
|
|
18
|
+
ej2DateTimePicker(): ConfigBuilder;
|
|
19
|
+
ej2DropDownList(): ConfigBuilder;
|
|
20
|
+
ej2DropDownTree(): ConfigBuilder;
|
|
21
|
+
ej2FileManager(): ConfigBuilder;
|
|
22
|
+
ej2Grid(): ConfigBuilder;
|
|
23
|
+
ej2ListView(): ConfigBuilder;
|
|
24
|
+
ej2MaskedTextBox(): ConfigBuilder;
|
|
25
|
+
ej2MultiSelect(): ConfigBuilder;
|
|
26
|
+
ej2NumericTextBox(): ConfigBuilder;
|
|
27
|
+
ej2Pager(): ConfigBuilder;
|
|
28
|
+
ej2ProgressButton(): ConfigBuilder;
|
|
29
|
+
ej2Radio(): ConfigBuilder;
|
|
30
|
+
ej2Schedule(): ConfigBuilder;
|
|
31
|
+
ej2Sidebar(): ConfigBuilder;
|
|
32
|
+
ej2Slider(): ConfigBuilder;
|
|
33
|
+
ej2Splitter(): ConfigBuilder;
|
|
34
|
+
ej2Switch(): ConfigBuilder;
|
|
35
|
+
ej2TextBox(): ConfigBuilder;
|
|
36
|
+
ej2TimePicker(): ConfigBuilder;
|
|
37
|
+
ej2TreeView(): ConfigBuilder;
|
|
38
|
+
ej2Uploader(): ConfigBuilder;
|
|
39
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigBuilder = void 0;
|
|
4
|
+
const ej2_multiSelect_1 = require("./widgets/multiSelect/ej2-multiSelect");
|
|
5
|
+
const ej2_schedule_1 = require("./widgets/schedule/ej2-schedule");
|
|
6
|
+
const ej2_fileManager_1 = require("./widgets/fileManager/ej2-fileManager");
|
|
7
|
+
const ej2_sidebar_1 = require("./widgets/sidebar/ej2-sidebar");
|
|
8
|
+
const ej2_DatePicker_1 = require("./widgets/datePicker/ej2-DatePicker");
|
|
9
|
+
const aurelia_pal_1 = require("aurelia-pal");
|
|
10
|
+
const ej2_textBox_1 = require("./widgets/textBox/ej2-textBox");
|
|
11
|
+
const ej2_dateRangePicker_1 = require("./widgets/dateRangePicker/ej2-dateRangePicker");
|
|
12
|
+
const ej2_dateTimePicker_1 = require("./widgets/dateTimePicker/ej2-dateTimePicker");
|
|
13
|
+
const ej2_dashboardLayout_1 = require("./widgets/dashboardLayout/ej2-dashboardLayout");
|
|
14
|
+
const ej2_comboBox_1 = require("./widgets/comboBox/ej2-comboBox");
|
|
15
|
+
const ej2_checkbox_list_1 = require("./widgets/checkbox/ej2-checkbox-list");
|
|
16
|
+
const ej2_checkbox_1 = require("./widgets/checkbox/ej2-checkbox");
|
|
17
|
+
const ej2_button_1 = require("./widgets/button/ej2-button");
|
|
18
|
+
const ej2_autoComplete_1 = require("./widgets/autoComplete/ej2-autoComplete");
|
|
19
|
+
const ej2_accordion_1 = require("./widgets/accordion/ej2-accordion");
|
|
20
|
+
const ej2_dropDownList_1 = require("./widgets/dropDownList/ej2-dropDownList");
|
|
21
|
+
const ej2_grid_1 = require("./widgets/grid/ej2-grid");
|
|
22
|
+
const ej2_listView_1 = require("./widgets/listView/ej2-listView");
|
|
23
|
+
const ej2_maskedTextBox_1 = require("./widgets/maskedTextBox/ej2-maskedTextBox");
|
|
24
|
+
const ej2_numericTextBox_1 = require("./widgets/numericTextBox/ej2-numericTextBox");
|
|
25
|
+
const ej2_pager_1 = require("./widgets/pager/ej2-pager");
|
|
26
|
+
const ej2_progress_button_1 = require("./widgets/progressButton/ej2-progress-button");
|
|
27
|
+
const ej2_radio_1 = require("./widgets/radio/ej2-radio");
|
|
28
|
+
const ej2_slider_1 = require("./widgets/slider/ej2-slider");
|
|
29
|
+
const ej2_switch_1 = require("./widgets/switch/ej2-switch");
|
|
30
|
+
const ej2_timePicker_1 = require("./widgets/timePicker/ej2-timePicker");
|
|
31
|
+
const ej2_treeView_1 = require("./widgets/treeView/ej2-treeView");
|
|
32
|
+
const ej2_uploader_1 = require("./widgets/uploader/ej2-uploader");
|
|
33
|
+
const ej2_splitter_1 = require("./widgets/splitter/ej2-splitter");
|
|
34
|
+
const ej2_dropDownTree_1 = require("./widgets/dropDownTree/ej2-dropDownTree");
|
|
35
|
+
class ConfigBuilder {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.resources = [];
|
|
38
|
+
this.useGlobalResources = true;
|
|
39
|
+
}
|
|
40
|
+
useAll() {
|
|
41
|
+
this
|
|
42
|
+
.ej2Accordion()
|
|
43
|
+
.ej2AutoComplete()
|
|
44
|
+
.ej2Button()
|
|
45
|
+
.ej2Checkbox()
|
|
46
|
+
.ej2CheckboxList()
|
|
47
|
+
.ej2ComboBox()
|
|
48
|
+
.ej2DatePicker()
|
|
49
|
+
.ej2DateRangePicker()
|
|
50
|
+
.ej2DateTimePicker()
|
|
51
|
+
.ej2DashboardLayout()
|
|
52
|
+
.ej2DropDownList()
|
|
53
|
+
.ej2DropDownTree()
|
|
54
|
+
.ej2FileManager()
|
|
55
|
+
.ej2Grid()
|
|
56
|
+
.ej2ListView()
|
|
57
|
+
.ej2MaskedTextBox()
|
|
58
|
+
.ej2MultiSelect()
|
|
59
|
+
.ej2NumericTextBox()
|
|
60
|
+
.ej2Pager()
|
|
61
|
+
.ej2ProgressButton()
|
|
62
|
+
.ej2Radio()
|
|
63
|
+
.ej2Schedule()
|
|
64
|
+
.ej2Sidebar()
|
|
65
|
+
.ej2Slider()
|
|
66
|
+
.ej2Splitter()
|
|
67
|
+
.ej2Switch()
|
|
68
|
+
.ej2TextBox()
|
|
69
|
+
.ej2TimePicker()
|
|
70
|
+
.ej2TreeView()
|
|
71
|
+
.ej2Uploader();
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
useDefaults() {
|
|
75
|
+
return this.useAll().useTheme("material");
|
|
76
|
+
}
|
|
77
|
+
useTheme(theme) {
|
|
78
|
+
switch (theme) {
|
|
79
|
+
case "material":
|
|
80
|
+
return this.materialTheme();
|
|
81
|
+
default:
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
materialTheme() {
|
|
86
|
+
this.resources.push(aurelia_pal_1.PLATFORM.moduleName("@syncfusion/ej2/material.css"));
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
withoutGlobalResources() {
|
|
90
|
+
this.useGlobalResources = false;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
ej2Accordion() {
|
|
94
|
+
this.resources.push(ej2_accordion_1.Ej2Accordion);
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
ej2AutoComplete() {
|
|
98
|
+
this.resources.push(ej2_autoComplete_1.Ej2AutoComplete);
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
ej2Button() {
|
|
102
|
+
this.resources.push(ej2_button_1.Ej2Button);
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
ej2Checkbox() {
|
|
106
|
+
this.resources.push(ej2_checkbox_1.Ej2Checkbox);
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
ej2CheckboxList() {
|
|
110
|
+
this.resources.push(ej2_checkbox_list_1.Ej2CheckboxList);
|
|
111
|
+
return this;
|
|
112
|
+
}
|
|
113
|
+
ej2ComboBox() {
|
|
114
|
+
this.resources.push(ej2_comboBox_1.Ej2ComboBox);
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
ej2DashboardLayout() {
|
|
118
|
+
this.resources.push(ej2_dashboardLayout_1.Ej2DashboardLayout);
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
ej2DatePicker() {
|
|
122
|
+
this.resources.push(ej2_DatePicker_1.Ej2DatePicker);
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
ej2DateRangePicker() {
|
|
126
|
+
this.resources.push(ej2_dateRangePicker_1.Ej2DateRangePicker);
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
ej2DateTimePicker() {
|
|
130
|
+
this.resources.push(ej2_dateTimePicker_1.Ej2DateTimePicker);
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
ej2DropDownList() {
|
|
134
|
+
this.resources.push(ej2_dropDownList_1.Ej2DropDownList);
|
|
135
|
+
return this;
|
|
136
|
+
}
|
|
137
|
+
ej2DropDownTree() {
|
|
138
|
+
this.resources.push(ej2_dropDownTree_1.Ej2DropDownTree);
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
ej2FileManager() {
|
|
142
|
+
this.resources.push(ej2_fileManager_1.Ej2FileManager);
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
ej2Grid() {
|
|
146
|
+
this.resources.push(ej2_grid_1.Ej2Grid);
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
ej2ListView() {
|
|
150
|
+
this.resources.push(ej2_listView_1.Ej2ListView);
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
ej2MaskedTextBox() {
|
|
154
|
+
this.resources.push(ej2_maskedTextBox_1.Ej2MaskedTextBox);
|
|
155
|
+
return this;
|
|
156
|
+
}
|
|
157
|
+
ej2MultiSelect() {
|
|
158
|
+
this.resources.push(ej2_multiSelect_1.Ej2MultiSelect);
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
ej2NumericTextBox() {
|
|
162
|
+
this.resources.push(ej2_numericTextBox_1.Ej2NumericTextBox);
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
ej2Pager() {
|
|
166
|
+
this.resources.push(ej2_pager_1.Ej2Pager);
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
ej2ProgressButton() {
|
|
170
|
+
this.resources.push(ej2_progress_button_1.Ej2ProgressButton);
|
|
171
|
+
return this;
|
|
172
|
+
}
|
|
173
|
+
ej2Radio() {
|
|
174
|
+
this.resources.push(ej2_radio_1.Ej2Radio);
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
ej2Schedule() {
|
|
178
|
+
this.resources.push(ej2_schedule_1.Ej2Schedule);
|
|
179
|
+
return this;
|
|
180
|
+
}
|
|
181
|
+
ej2Sidebar() {
|
|
182
|
+
this.resources.push(ej2_sidebar_1.Ej2Sidebar);
|
|
183
|
+
return this;
|
|
184
|
+
}
|
|
185
|
+
ej2Slider() {
|
|
186
|
+
this.resources.push(ej2_slider_1.Ej2Slider);
|
|
187
|
+
return this;
|
|
188
|
+
}
|
|
189
|
+
ej2Splitter() {
|
|
190
|
+
this.resources.push(ej2_splitter_1.Ej2Splitter);
|
|
191
|
+
return this;
|
|
192
|
+
}
|
|
193
|
+
ej2Switch() {
|
|
194
|
+
this.resources.push(ej2_switch_1.Ej2Switch);
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
ej2TextBox() {
|
|
198
|
+
this.resources.push(ej2_textBox_1.Ej2TextBox);
|
|
199
|
+
return this;
|
|
200
|
+
}
|
|
201
|
+
ej2TimePicker() {
|
|
202
|
+
this.resources.push(ej2_timePicker_1.Ej2TimePicker);
|
|
203
|
+
return this;
|
|
204
|
+
}
|
|
205
|
+
ej2TreeView() {
|
|
206
|
+
this.resources.push(ej2_treeView_1.Ej2TreeView);
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
ej2Uploader() {
|
|
210
|
+
this.resources.push(ej2_uploader_1.Ej2Uploader);
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.ConfigBuilder = ConfigBuilder;
|