aurelia-syncfusion-ej2-bridge 1.0.2 → 1.0.5
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 +34 -32
- package/dist/commonjs/configBuider.d.ts +2 -0
- package/dist/commonjs/configBuider.js +12 -0
- package/dist/commonjs/controlBindings.d.ts +9 -0
- package/dist/commonjs/controlBindings.js +9 -0
- package/dist/commonjs/widgets/checkbox/ej2-checkbox-list.js +8 -8
- package/dist/commonjs/widgets/richTextEditor/ej2-richTextEditor.d.ts +8 -0
- package/dist/commonjs/widgets/richTextEditor/ej2-richTextEditor.js +32 -0
- package/dist/commonjs/widgets/slider/ej2-slider.js +2 -1
- package/dist/commonjs/widgets/timeline/ej2-timeline.d.ts +7 -0
- package/dist/commonjs/widgets/timeline/ej2-timeline.js +29 -0
- package/dist/commonjs/widgets/uploader/ej2-uploader.js +30 -19
- package/dist/native-modules/configBuider.d.ts +2 -0
- package/dist/native-modules/configBuider.js +12 -0
- package/dist/native-modules/controlBindings.d.ts +9 -0
- package/dist/native-modules/controlBindings.js +9 -0
- package/dist/native-modules/widgets/checkbox/ej2-checkbox-list.js +8 -8
- package/dist/native-modules/widgets/richTextEditor/ej2-richTextEditor.d.ts +8 -0
- package/dist/native-modules/widgets/richTextEditor/ej2-richTextEditor.js +29 -0
- package/dist/native-modules/widgets/slider/ej2-slider.js +2 -1
- package/dist/native-modules/widgets/timeline/ej2-timeline.d.ts +7 -0
- package/dist/native-modules/widgets/timeline/ej2-timeline.js +26 -0
- package/dist/native-modules/widgets/uploader/ej2-uploader.js +30 -19
- package/package.json +5 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Chrome Debugger",
|
|
6
|
+
"type": "chrome",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"url": "http://localhost:9000",
|
|
9
|
+
"webRoot": "${workspaceRoot}/src",
|
|
10
|
+
"userDataDir": "${workspaceRoot}/.chrome",
|
|
11
|
+
"sourceMapPathOverrides": {
|
|
12
|
+
"../src/*": "${webRoot}/*"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "chrome",
|
|
17
|
+
"request": "attach",
|
|
18
|
+
"name": "Attach Karma Chrome",
|
|
19
|
+
"address": "localhost",
|
|
20
|
+
"port": 9333,
|
|
21
|
+
"sourceMaps": true,
|
|
22
|
+
"pathMapping": {
|
|
23
|
+
"/": "${workspaceRoot}",
|
|
24
|
+
"/base/": "${workspaceRoot}/"
|
|
25
|
+
},
|
|
26
|
+
"sourceMapPathOverrides": {
|
|
27
|
+
"../src/*": "${webRoot}/*"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
package/README.md
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
# `aurelia-syncfusion-ej-2-bridge`
|
|
2
|
-
|
|
3
|
-
This is
|
|
4
|
-
|
|
5
|
-
# Supported controls
|
|
6
|
-
* Accoridon
|
|
7
|
-
* Auto Complete
|
|
8
|
-
* Button
|
|
9
|
-
* Checkbox
|
|
10
|
-
* Combobox
|
|
11
|
-
* Dashboard Layout
|
|
12
|
-
* Date Picker
|
|
13
|
-
* Date Time Picker
|
|
14
|
-
* Dropdown List
|
|
15
|
-
* Dropdown Tree
|
|
16
|
-
* File Manager
|
|
17
|
-
* Grid
|
|
18
|
-
* List View
|
|
19
|
-
* Masked Textbox
|
|
20
|
-
* Numeric Textbox
|
|
21
|
-
* Pager
|
|
22
|
-
* Progress Button
|
|
23
|
-
* Radio
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
1
|
+
# `aurelia-syncfusion-ej-2-bridge`
|
|
2
|
+
|
|
3
|
+
This wrapper is not fully supported, use at your own risk
|
|
4
|
+
|
|
5
|
+
# Supported controls
|
|
6
|
+
* Accoridon
|
|
7
|
+
* Auto Complete
|
|
8
|
+
* Button
|
|
9
|
+
* Checkbox
|
|
10
|
+
* Combobox
|
|
11
|
+
* Dashboard Layout
|
|
12
|
+
* Date Picker
|
|
13
|
+
* Date Time Picker
|
|
14
|
+
* Dropdown List
|
|
15
|
+
* Dropdown Tree
|
|
16
|
+
* File Manager
|
|
17
|
+
* Grid
|
|
18
|
+
* List View
|
|
19
|
+
* Masked Textbox
|
|
20
|
+
* Numeric Textbox
|
|
21
|
+
* Pager
|
|
22
|
+
* Progress Button
|
|
23
|
+
* Radio
|
|
24
|
+
* Rich Text Editor
|
|
25
|
+
* Schedule
|
|
26
|
+
* Sidebar
|
|
27
|
+
* Slider
|
|
28
|
+
* Splitter
|
|
29
|
+
* Switch
|
|
30
|
+
* Textbox
|
|
31
|
+
* Timeline
|
|
32
|
+
* Time Picker
|
|
33
|
+
* Tree View
|
|
34
|
+
* Uploader
|
|
@@ -34,6 +34,8 @@ export declare class ConfigBuilder {
|
|
|
34
34
|
ej2Switch(): ConfigBuilder;
|
|
35
35
|
ej2TextBox(): ConfigBuilder;
|
|
36
36
|
ej2TimePicker(): ConfigBuilder;
|
|
37
|
+
ej2Timeline(): ConfigBuilder;
|
|
37
38
|
ej2TreeView(): ConfigBuilder;
|
|
38
39
|
ej2Uploader(): ConfigBuilder;
|
|
40
|
+
ej2RichTextEditor(): ConfigBuilder;
|
|
39
41
|
}
|
|
@@ -31,6 +31,8 @@ const ej2_treeView_1 = require("./widgets/treeView/ej2-treeView");
|
|
|
31
31
|
const ej2_uploader_1 = require("./widgets/uploader/ej2-uploader");
|
|
32
32
|
const ej2_splitter_1 = require("./widgets/splitter/ej2-splitter");
|
|
33
33
|
const ej2_dropDownTree_1 = require("./widgets/dropDownTree/ej2-dropDownTree");
|
|
34
|
+
const ej2_richTextEditor_1 = require("./widgets/richTextEditor/ej2-richTextEditor");
|
|
35
|
+
const ej2_timeline_1 = require("./widgets/timeline/ej2-timeline");
|
|
34
36
|
class ConfigBuilder {
|
|
35
37
|
constructor() {
|
|
36
38
|
this.resources = [];
|
|
@@ -59,12 +61,14 @@ class ConfigBuilder {
|
|
|
59
61
|
.ej2Pager()
|
|
60
62
|
.ej2ProgressButton()
|
|
61
63
|
.ej2Radio()
|
|
64
|
+
.ej2RichTextEditor()
|
|
62
65
|
.ej2Schedule()
|
|
63
66
|
.ej2Sidebar()
|
|
64
67
|
.ej2Slider()
|
|
65
68
|
.ej2Splitter()
|
|
66
69
|
.ej2Switch()
|
|
67
70
|
.ej2TextBox()
|
|
71
|
+
.ej2Timeline()
|
|
68
72
|
.ej2TimePicker()
|
|
69
73
|
.ej2TreeView()
|
|
70
74
|
.ej2Uploader();
|
|
@@ -200,6 +204,10 @@ class ConfigBuilder {
|
|
|
200
204
|
this.resources.push(ej2_timePicker_1.Ej2TimePicker);
|
|
201
205
|
return this;
|
|
202
206
|
}
|
|
207
|
+
ej2Timeline() {
|
|
208
|
+
this.resources.push(ej2_timeline_1.Ej2Timeline);
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
203
211
|
ej2TreeView() {
|
|
204
212
|
this.resources.push(ej2_treeView_1.Ej2TreeView);
|
|
205
213
|
return this;
|
|
@@ -208,5 +216,9 @@ class ConfigBuilder {
|
|
|
208
216
|
this.resources.push(ej2_uploader_1.Ej2Uploader);
|
|
209
217
|
return this;
|
|
210
218
|
}
|
|
219
|
+
ej2RichTextEditor() {
|
|
220
|
+
this.resources.push(ej2_richTextEditor_1.Ej2RichTextEditor);
|
|
221
|
+
return this;
|
|
222
|
+
}
|
|
211
223
|
}
|
|
212
224
|
exports.ConfigBuilder = ConfigBuilder;
|
|
@@ -97,6 +97,11 @@ export declare const ControlBindings: {
|
|
|
97
97
|
oneWay: string[];
|
|
98
98
|
events: string[];
|
|
99
99
|
};
|
|
100
|
+
richTextEditor: {
|
|
101
|
+
oneWay: string[];
|
|
102
|
+
twoWay: string[];
|
|
103
|
+
events: string[];
|
|
104
|
+
};
|
|
100
105
|
schedule: {
|
|
101
106
|
oneWay: string[];
|
|
102
107
|
events: string[];
|
|
@@ -129,6 +134,10 @@ export declare const ControlBindings: {
|
|
|
129
134
|
twoWay: string[];
|
|
130
135
|
events: string[];
|
|
131
136
|
};
|
|
137
|
+
timeline: {
|
|
138
|
+
oneWay: string[];
|
|
139
|
+
events: string[];
|
|
140
|
+
};
|
|
132
141
|
treeView: {
|
|
133
142
|
oneWay: string[];
|
|
134
143
|
twoWay: string[];
|
|
@@ -116,6 +116,11 @@ exports.ControlBindings = {
|
|
|
116
116
|
oneWay: ["checked", "cssClass", "disabled", "enableHtmlSanitizer", "htmlAttributes", "label", "labelPosition", "name", "value"],
|
|
117
117
|
events: ["change", "created"]
|
|
118
118
|
},
|
|
119
|
+
richTextEditor: {
|
|
120
|
+
oneWay: ["autoSaveOnIdle", "backgroundColor", "bulletFormatList", "cssClass", "editorMode", "emojiPickerSettings", "enableAutoUrl", "enableHtmlEncode", "enableHtmlSanitizer", "enableResize", "enableTabKey", "enableXhtml", "enabled", "enterKey", "exportPdf", "exportWord", "fileManagerSettings", "floatingToolbarOffset", "fontColor", "fontFamily", "fontSize", "format", "formatPainterSettings", "formatter", "height", "htmlAttributes", "iframeSettings", "importWord", "inlineMode", "insertAudioSettings", "insertImageSettings", "insertVideoSettings", "keyConfig", "maxLength", "numberFormatList", "pasteCleanupSettings", "placeholder", "quickToolbarSettings", "readonly", "saveInterval", "shiftEnterKey", "showCharCount", "showTooltip", "slashMenuSettings", "tableSettings", "toolbarSettings", "undoRedoSteps", "undoRedoTimer", "value", "valueTemplate", "width"],
|
|
121
|
+
twoWay: ["value"],
|
|
122
|
+
events: ["actionBegin", "actionComplete", "afterImageDelete", "afterMediaDelete", "afterPasteCleanup", "beforeDialogClose", "beforeDialogOpen", "beforeFileUpload", "beforeImageDrop", "beforeImageUpload", "beforePasteCleanup", "beforeQuickToolbarOpen", "beforeSanitizeHtml", "blur", "change", "created", "destroyed", "dialogClose", "dialogOpen", "fileRemoving", "fileSelected", "fileUploadFailed", "fileUploadSuccess", "fileUploading", "focus", "imageRemoving", "imageSelected", "imageUploadFailed", "imageUploadSuccess", "imageUploading", "quickToolbarClose", "quickToolbarOpen", "resizeStart", "resizeStop", "resizing", "slashMenuItemSelect", "toolbarClick", "toolbarStatusUpdate", "updatedToolbarStatus"]
|
|
123
|
+
},
|
|
119
124
|
schedule: {
|
|
120
125
|
oneWay: ["agendaDaysCount", "allowDragAndDrop", "allowInline", "allowKeyboardInteraction", "allowMultiCellSelection", "allowMultiDrag", "allowMultiRowSelection", "allowResizing",
|
|
121
126
|
"allowSwiping", "calendarMode", "cellHeaderTemplate", "cellTemplate", "cssClass", "currentView", "dateFormat", "dateHeaderTemplate",
|
|
@@ -156,6 +161,10 @@ exports.ControlBindings = {
|
|
|
156
161
|
twoWay: ["value", "min", "max"],
|
|
157
162
|
events: ["blur", "change", "cleared", "close", "created", "destroyed", "focus", "itemRender", "open"]
|
|
158
163
|
},
|
|
164
|
+
timeline: {
|
|
165
|
+
oneWay: ["align", "cssClass", "items", "orientation", "reverse", "template"],
|
|
166
|
+
events: ["beforeItemRender", "created"]
|
|
167
|
+
},
|
|
159
168
|
treeView: {
|
|
160
169
|
oneWay: ["allowDragAndDrop", "allowEditing", "allowMultiSelection",
|
|
161
170
|
"allowTextWrap", "animation", "autoCheck", "cssClass",
|
|
@@ -65,13 +65,13 @@ __decorate([
|
|
|
65
65
|
], Ej2CheckboxList.prototype, "matcher", void 0);
|
|
66
66
|
exports.Ej2CheckboxList = Ej2CheckboxList = __decorate([
|
|
67
67
|
(0, aurelia_framework_1.customElement)("ej2-checkbox-list"),
|
|
68
|
-
(0, aurelia_framework_1.inlineView)(`<template>
|
|
69
|
-
<div repeat.for="option of dataSource" css="\${orientation === 'horizontal' ? 'display: inline;' : ''}">
|
|
70
|
-
<ej2-checkbox view-model.ref="viewModels[$index]" e-label.bind="optionModel? option[optionModel.label]: option"
|
|
71
|
-
e-name.bind="optionModel? option[optionModel.name]: option"
|
|
72
|
-
click.delegate="checkboxClick(option, viewModels[$index])"
|
|
73
|
-
e-checked.bind="selectedItems.length >0 && matcher? isMatch(option) : selectedItems.indexOf(option) !== -1">
|
|
74
|
-
</ej2-checkbox>
|
|
75
|
-
</div>
|
|
68
|
+
(0, aurelia_framework_1.inlineView)(`<template>
|
|
69
|
+
<div repeat.for="option of dataSource" css="\${orientation === 'horizontal' ? 'display: inline;' : ''}">
|
|
70
|
+
<ej2-checkbox view-model.ref="viewModels[$index]" e-label.bind="optionModel? option[optionModel.label]: option"
|
|
71
|
+
e-name.bind="optionModel? option[optionModel.name]: option"
|
|
72
|
+
click.delegate="checkboxClick(option, viewModels[$index])"
|
|
73
|
+
e-checked.bind="selectedItems.length >0 && matcher? isMatch(option) : selectedItems.indexOf(option) !== -1">
|
|
74
|
+
</ej2-checkbox>
|
|
75
|
+
</div>
|
|
76
76
|
</template>`)
|
|
77
77
|
], Ej2CheckboxList);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
2
|
+
import { RichTextEditor, RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';
|
|
3
|
+
export declare class Ej2RichTextEditor extends SyncfusionWrapper<RichTextEditor, RichTextEditorModel> {
|
|
4
|
+
protected syncfusionWidgetType: any;
|
|
5
|
+
protected onWrapperCreated(): void;
|
|
6
|
+
protected onWidgetCreated(): void;
|
|
7
|
+
onBeforeWidgetInstantiation(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2RichTextEditor = void 0;
|
|
10
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
11
|
+
const decorator_1 = require("../../utilities/decorator");
|
|
12
|
+
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
13
|
+
const ej2_richtexteditor_1 = require("@syncfusion/ej2-richtexteditor");
|
|
14
|
+
let Ej2RichTextEditor = class Ej2RichTextEditor extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.syncfusionWidgetType = ej2_richtexteditor_1.RichTextEditor;
|
|
18
|
+
}
|
|
19
|
+
onWrapperCreated() {
|
|
20
|
+
}
|
|
21
|
+
onWidgetCreated() {
|
|
22
|
+
}
|
|
23
|
+
onBeforeWidgetInstantiation() {
|
|
24
|
+
ej2_richtexteditor_1.RichTextEditor.Inject(ej2_richtexteditor_1.Toolbar, ej2_richtexteditor_1.Link, ej2_richtexteditor_1.Image, ej2_richtexteditor_1.Count, ej2_richtexteditor_1.HtmlEditor, ej2_richtexteditor_1.QuickToolbar, ej2_richtexteditor_1.Table, ej2_richtexteditor_1.FileManager, ej2_richtexteditor_1.EmojiPicker, ej2_richtexteditor_1.Audio, ej2_richtexteditor_1.Video, ej2_richtexteditor_1.FormatPainter, ej2_richtexteditor_1.PasteCleanup, ej2_richtexteditor_1.SlashMenu, ej2_richtexteditor_1.ImportExport);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.Ej2RichTextEditor = Ej2RichTextEditor;
|
|
28
|
+
exports.Ej2RichTextEditor = Ej2RichTextEditor = __decorate([
|
|
29
|
+
(0, decorator_1.generateBindables)("richTextEditor"),
|
|
30
|
+
(0, aurelia_framework_1.inlineView)(`<template><div element.ref="widgetElement"></div></template>`),
|
|
31
|
+
(0, aurelia_framework_1.customElement)('ej2-rich-text-editor')
|
|
32
|
+
], Ej2RichTextEditor);
|
|
@@ -22,7 +22,8 @@ let Ej2Slider = class Ej2Slider extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
|
22
22
|
this.containerResizeObserver = null;
|
|
23
23
|
this.resize = lodash_1.default.debounce(() => {
|
|
24
24
|
this.taskQueue.queueTask(() => {
|
|
25
|
-
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.widget) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
26
27
|
});
|
|
27
28
|
}, 100);
|
|
28
29
|
this.syncfusionWidgetType = ej2_inputs_1.Slider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
2
|
+
import { Timeline, TimelineModel } from '@syncfusion/ej2/layouts';
|
|
3
|
+
export declare class Ej2Timeline extends SyncfusionWrapper<Timeline, TimelineModel> {
|
|
4
|
+
protected syncfusionWidgetType: typeof Timeline;
|
|
5
|
+
protected onWrapperCreated(): void;
|
|
6
|
+
protected onWidgetCreated(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Ej2Timeline = void 0;
|
|
10
|
+
const syncfusionWrapper_1 = require("../../common/syncfusionWrapper");
|
|
11
|
+
const aurelia_framework_1 = require("aurelia-framework");
|
|
12
|
+
const decorator_1 = require("utilities/decorator");
|
|
13
|
+
const layouts_1 = require("@syncfusion/ej2/layouts");
|
|
14
|
+
let Ej2Timeline = class Ej2Timeline extends syncfusionWrapper_1.SyncfusionWrapper {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.syncfusionWidgetType = layouts_1.Timeline;
|
|
18
|
+
}
|
|
19
|
+
onWrapperCreated() {
|
|
20
|
+
}
|
|
21
|
+
onWidgetCreated() {
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.Ej2Timeline = Ej2Timeline;
|
|
25
|
+
exports.Ej2Timeline = Ej2Timeline = __decorate([
|
|
26
|
+
(0, decorator_1.generateBindables)("timeline"),
|
|
27
|
+
(0, aurelia_framework_1.inlineView)(`<template><div element.ref="widgetElement"></div></template>`),
|
|
28
|
+
(0, aurelia_framework_1.customElement)('ej2-timeline')
|
|
29
|
+
], Ej2Timeline);
|
|
@@ -8,6 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
11
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
21
|
exports.Ej2Uploader = void 0;
|
|
13
22
|
const constants_1 = require("../../common/constants");
|
|
@@ -156,27 +165,29 @@ let Ej2Uploader = class Ej2Uploader extends syncfusionWrapper_1.SyncfusionWrappe
|
|
|
156
165
|
removeFile(file) {
|
|
157
166
|
this.widget.remove(file);
|
|
158
167
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (this.dataAdapter && this.dataAdapter.remove) {
|
|
169
|
-
try {
|
|
170
|
-
if (this.serverDelete) {
|
|
171
|
-
await this.dataAdapter.remove.call(this.context || this.bindingContext, args.filesData[0]);
|
|
172
|
-
}
|
|
173
|
-
this.onRemoveSuccess(args);
|
|
174
|
-
this.onWidgetRemoveComplete(null, args);
|
|
168
|
+
removing(args) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
let event = new CustomEvent("on-removing", {
|
|
171
|
+
bubbles: true,
|
|
172
|
+
detail: args
|
|
173
|
+
});
|
|
174
|
+
this.element.dispatchEvent(event);
|
|
175
|
+
if (args.cancel) {
|
|
176
|
+
return;
|
|
175
177
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
if (this.dataAdapter && this.dataAdapter.remove) {
|
|
179
|
+
try {
|
|
180
|
+
if (this.serverDelete) {
|
|
181
|
+
yield this.dataAdapter.remove.call(this.context || this.bindingContext, args.filesData[0]);
|
|
182
|
+
}
|
|
183
|
+
this.onRemoveSuccess(args);
|
|
184
|
+
this.onWidgetRemoveComplete(null, args);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
this.onWidgetRemoveFailed(error, args);
|
|
188
|
+
}
|
|
178
189
|
}
|
|
179
|
-
}
|
|
190
|
+
});
|
|
180
191
|
}
|
|
181
192
|
onWidgetRemoveComplete(response, args) {
|
|
182
193
|
this.widget.removeCompleted(response, args.filesData[0], false);
|
|
@@ -34,6 +34,8 @@ export declare class ConfigBuilder {
|
|
|
34
34
|
ej2Switch(): ConfigBuilder;
|
|
35
35
|
ej2TextBox(): ConfigBuilder;
|
|
36
36
|
ej2TimePicker(): ConfigBuilder;
|
|
37
|
+
ej2Timeline(): ConfigBuilder;
|
|
37
38
|
ej2TreeView(): ConfigBuilder;
|
|
38
39
|
ej2Uploader(): ConfigBuilder;
|
|
40
|
+
ej2RichTextEditor(): ConfigBuilder;
|
|
39
41
|
}
|
|
@@ -28,6 +28,8 @@ import { Ej2TreeView } from './widgets/treeView/ej2-treeView';
|
|
|
28
28
|
import { Ej2Uploader } from './widgets/uploader/ej2-uploader';
|
|
29
29
|
import { Ej2Splitter } from './widgets/splitter/ej2-splitter';
|
|
30
30
|
import { Ej2DropDownTree } from './widgets/dropDownTree/ej2-dropDownTree';
|
|
31
|
+
import { Ej2RichTextEditor } from "./widgets/richTextEditor/ej2-richTextEditor";
|
|
32
|
+
import { Ej2Timeline } from "./widgets/timeline/ej2-timeline";
|
|
31
33
|
export class ConfigBuilder {
|
|
32
34
|
constructor() {
|
|
33
35
|
this.resources = [];
|
|
@@ -56,12 +58,14 @@ export class ConfigBuilder {
|
|
|
56
58
|
.ej2Pager()
|
|
57
59
|
.ej2ProgressButton()
|
|
58
60
|
.ej2Radio()
|
|
61
|
+
.ej2RichTextEditor()
|
|
59
62
|
.ej2Schedule()
|
|
60
63
|
.ej2Sidebar()
|
|
61
64
|
.ej2Slider()
|
|
62
65
|
.ej2Splitter()
|
|
63
66
|
.ej2Switch()
|
|
64
67
|
.ej2TextBox()
|
|
68
|
+
.ej2Timeline()
|
|
65
69
|
.ej2TimePicker()
|
|
66
70
|
.ej2TreeView()
|
|
67
71
|
.ej2Uploader();
|
|
@@ -197,6 +201,10 @@ export class ConfigBuilder {
|
|
|
197
201
|
this.resources.push(Ej2TimePicker);
|
|
198
202
|
return this;
|
|
199
203
|
}
|
|
204
|
+
ej2Timeline() {
|
|
205
|
+
this.resources.push(Ej2Timeline);
|
|
206
|
+
return this;
|
|
207
|
+
}
|
|
200
208
|
ej2TreeView() {
|
|
201
209
|
this.resources.push(Ej2TreeView);
|
|
202
210
|
return this;
|
|
@@ -205,4 +213,8 @@ export class ConfigBuilder {
|
|
|
205
213
|
this.resources.push(Ej2Uploader);
|
|
206
214
|
return this;
|
|
207
215
|
}
|
|
216
|
+
ej2RichTextEditor() {
|
|
217
|
+
this.resources.push(Ej2RichTextEditor);
|
|
218
|
+
return this;
|
|
219
|
+
}
|
|
208
220
|
}
|
|
@@ -97,6 +97,11 @@ export declare const ControlBindings: {
|
|
|
97
97
|
oneWay: string[];
|
|
98
98
|
events: string[];
|
|
99
99
|
};
|
|
100
|
+
richTextEditor: {
|
|
101
|
+
oneWay: string[];
|
|
102
|
+
twoWay: string[];
|
|
103
|
+
events: string[];
|
|
104
|
+
};
|
|
100
105
|
schedule: {
|
|
101
106
|
oneWay: string[];
|
|
102
107
|
events: string[];
|
|
@@ -129,6 +134,10 @@ export declare const ControlBindings: {
|
|
|
129
134
|
twoWay: string[];
|
|
130
135
|
events: string[];
|
|
131
136
|
};
|
|
137
|
+
timeline: {
|
|
138
|
+
oneWay: string[];
|
|
139
|
+
events: string[];
|
|
140
|
+
};
|
|
132
141
|
treeView: {
|
|
133
142
|
oneWay: string[];
|
|
134
143
|
twoWay: string[];
|
|
@@ -113,6 +113,11 @@ export const ControlBindings = {
|
|
|
113
113
|
oneWay: ["checked", "cssClass", "disabled", "enableHtmlSanitizer", "htmlAttributes", "label", "labelPosition", "name", "value"],
|
|
114
114
|
events: ["change", "created"]
|
|
115
115
|
},
|
|
116
|
+
richTextEditor: {
|
|
117
|
+
oneWay: ["autoSaveOnIdle", "backgroundColor", "bulletFormatList", "cssClass", "editorMode", "emojiPickerSettings", "enableAutoUrl", "enableHtmlEncode", "enableHtmlSanitizer", "enableResize", "enableTabKey", "enableXhtml", "enabled", "enterKey", "exportPdf", "exportWord", "fileManagerSettings", "floatingToolbarOffset", "fontColor", "fontFamily", "fontSize", "format", "formatPainterSettings", "formatter", "height", "htmlAttributes", "iframeSettings", "importWord", "inlineMode", "insertAudioSettings", "insertImageSettings", "insertVideoSettings", "keyConfig", "maxLength", "numberFormatList", "pasteCleanupSettings", "placeholder", "quickToolbarSettings", "readonly", "saveInterval", "shiftEnterKey", "showCharCount", "showTooltip", "slashMenuSettings", "tableSettings", "toolbarSettings", "undoRedoSteps", "undoRedoTimer", "value", "valueTemplate", "width"],
|
|
118
|
+
twoWay: ["value"],
|
|
119
|
+
events: ["actionBegin", "actionComplete", "afterImageDelete", "afterMediaDelete", "afterPasteCleanup", "beforeDialogClose", "beforeDialogOpen", "beforeFileUpload", "beforeImageDrop", "beforeImageUpload", "beforePasteCleanup", "beforeQuickToolbarOpen", "beforeSanitizeHtml", "blur", "change", "created", "destroyed", "dialogClose", "dialogOpen", "fileRemoving", "fileSelected", "fileUploadFailed", "fileUploadSuccess", "fileUploading", "focus", "imageRemoving", "imageSelected", "imageUploadFailed", "imageUploadSuccess", "imageUploading", "quickToolbarClose", "quickToolbarOpen", "resizeStart", "resizeStop", "resizing", "slashMenuItemSelect", "toolbarClick", "toolbarStatusUpdate", "updatedToolbarStatus"]
|
|
120
|
+
},
|
|
116
121
|
schedule: {
|
|
117
122
|
oneWay: ["agendaDaysCount", "allowDragAndDrop", "allowInline", "allowKeyboardInteraction", "allowMultiCellSelection", "allowMultiDrag", "allowMultiRowSelection", "allowResizing",
|
|
118
123
|
"allowSwiping", "calendarMode", "cellHeaderTemplate", "cellTemplate", "cssClass", "currentView", "dateFormat", "dateHeaderTemplate",
|
|
@@ -153,6 +158,10 @@ export const ControlBindings = {
|
|
|
153
158
|
twoWay: ["value", "min", "max"],
|
|
154
159
|
events: ["blur", "change", "cleared", "close", "created", "destroyed", "focus", "itemRender", "open"]
|
|
155
160
|
},
|
|
161
|
+
timeline: {
|
|
162
|
+
oneWay: ["align", "cssClass", "items", "orientation", "reverse", "template"],
|
|
163
|
+
events: ["beforeItemRender", "created"]
|
|
164
|
+
},
|
|
156
165
|
treeView: {
|
|
157
166
|
oneWay: ["allowDragAndDrop", "allowEditing", "allowMultiSelection",
|
|
158
167
|
"allowTextWrap", "animation", "autoCheck", "cssClass",
|
|
@@ -61,14 +61,14 @@ __decorate([
|
|
|
61
61
|
], Ej2CheckboxList.prototype, "matcher", void 0);
|
|
62
62
|
Ej2CheckboxList = __decorate([
|
|
63
63
|
customElement("ej2-checkbox-list"),
|
|
64
|
-
inlineView(`<template>
|
|
65
|
-
<div repeat.for="option of dataSource" css="\${orientation === 'horizontal' ? 'display: inline;' : ''}">
|
|
66
|
-
<ej2-checkbox view-model.ref="viewModels[$index]" e-label.bind="optionModel? option[optionModel.label]: option"
|
|
67
|
-
e-name.bind="optionModel? option[optionModel.name]: option"
|
|
68
|
-
click.delegate="checkboxClick(option, viewModels[$index])"
|
|
69
|
-
e-checked.bind="selectedItems.length >0 && matcher? isMatch(option) : selectedItems.indexOf(option) !== -1">
|
|
70
|
-
</ej2-checkbox>
|
|
71
|
-
</div>
|
|
64
|
+
inlineView(`<template>
|
|
65
|
+
<div repeat.for="option of dataSource" css="\${orientation === 'horizontal' ? 'display: inline;' : ''}">
|
|
66
|
+
<ej2-checkbox view-model.ref="viewModels[$index]" e-label.bind="optionModel? option[optionModel.label]: option"
|
|
67
|
+
e-name.bind="optionModel? option[optionModel.name]: option"
|
|
68
|
+
click.delegate="checkboxClick(option, viewModels[$index])"
|
|
69
|
+
e-checked.bind="selectedItems.length >0 && matcher? isMatch(option) : selectedItems.indexOf(option) !== -1">
|
|
70
|
+
</ej2-checkbox>
|
|
71
|
+
</div>
|
|
72
72
|
</template>`)
|
|
73
73
|
], Ej2CheckboxList);
|
|
74
74
|
export { Ej2CheckboxList };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
2
|
+
import { RichTextEditor, RichTextEditorModel } from '@syncfusion/ej2-richtexteditor';
|
|
3
|
+
export declare class Ej2RichTextEditor extends SyncfusionWrapper<RichTextEditor, RichTextEditorModel> {
|
|
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 { generateBindables } from '../../utilities/decorator';
|
|
9
|
+
import { SyncfusionWrapper } from '../../common/syncfusionWrapper';
|
|
10
|
+
import { RichTextEditor, Count, FileManager, EmojiPicker, FormatPainter, Toolbar, SlashMenu, ImportExport, Link, Image, HtmlEditor, QuickToolbar, Table, Video, Audio, PasteCleanup } from '@syncfusion/ej2-richtexteditor';
|
|
11
|
+
let Ej2RichTextEditor = class Ej2RichTextEditor extends SyncfusionWrapper {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.syncfusionWidgetType = RichTextEditor;
|
|
15
|
+
}
|
|
16
|
+
onWrapperCreated() {
|
|
17
|
+
}
|
|
18
|
+
onWidgetCreated() {
|
|
19
|
+
}
|
|
20
|
+
onBeforeWidgetInstantiation() {
|
|
21
|
+
RichTextEditor.Inject(Toolbar, Link, Image, Count, HtmlEditor, QuickToolbar, Table, FileManager, EmojiPicker, Audio, Video, FormatPainter, PasteCleanup, SlashMenu, ImportExport);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
Ej2RichTextEditor = __decorate([
|
|
25
|
+
generateBindables("richTextEditor"),
|
|
26
|
+
inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
27
|
+
customElement('ej2-rich-text-editor')
|
|
28
|
+
], Ej2RichTextEditor);
|
|
29
|
+
export { Ej2RichTextEditor };
|
|
@@ -16,7 +16,8 @@ let Ej2Slider = class Ej2Slider extends SyncfusionWrapper {
|
|
|
16
16
|
this.containerResizeObserver = null;
|
|
17
17
|
this.resize = _.debounce(() => {
|
|
18
18
|
this.taskQueue.queueTask(() => {
|
|
19
|
-
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = this.widget) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
20
21
|
});
|
|
21
22
|
}, 100);
|
|
22
23
|
this.syncfusionWidgetType = Slider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
2
|
+
import { Timeline, TimelineModel } from '@syncfusion/ej2/layouts';
|
|
3
|
+
export declare class Ej2Timeline extends SyncfusionWrapper<Timeline, TimelineModel> {
|
|
4
|
+
protected syncfusionWidgetType: typeof Timeline;
|
|
5
|
+
protected onWrapperCreated(): void;
|
|
6
|
+
protected onWidgetCreated(): void;
|
|
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 { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
8
|
+
import { inlineView, customElement } from 'aurelia-framework';
|
|
9
|
+
import { generateBindables } from 'utilities/decorator';
|
|
10
|
+
import { Timeline } from '@syncfusion/ej2/layouts';
|
|
11
|
+
let Ej2Timeline = class Ej2Timeline extends SyncfusionWrapper {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.syncfusionWidgetType = Timeline;
|
|
15
|
+
}
|
|
16
|
+
onWrapperCreated() {
|
|
17
|
+
}
|
|
18
|
+
onWidgetCreated() {
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
Ej2Timeline = __decorate([
|
|
22
|
+
generateBindables("timeline"),
|
|
23
|
+
inlineView(`<template><div element.ref="widgetElement"></div></template>`),
|
|
24
|
+
customElement('ej2-timeline')
|
|
25
|
+
], Ej2Timeline);
|
|
26
|
+
export { Ej2Timeline };
|
|
@@ -7,6 +7,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
14
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17
|
+
});
|
|
18
|
+
};
|
|
10
19
|
import { constants } from '../../common/constants';
|
|
11
20
|
import { Uploader } from "@syncfusion/ej2-inputs";
|
|
12
21
|
import { SyncfusionWrapper } from "../../common/syncfusionWrapper";
|
|
@@ -153,27 +162,29 @@ let Ej2Uploader = class Ej2Uploader extends SyncfusionWrapper {
|
|
|
153
162
|
removeFile(file) {
|
|
154
163
|
this.widget.remove(file);
|
|
155
164
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (this.dataAdapter && this.dataAdapter.remove) {
|
|
166
|
-
try {
|
|
167
|
-
if (this.serverDelete) {
|
|
168
|
-
await this.dataAdapter.remove.call(this.context || this.bindingContext, args.filesData[0]);
|
|
169
|
-
}
|
|
170
|
-
this.onRemoveSuccess(args);
|
|
171
|
-
this.onWidgetRemoveComplete(null, args);
|
|
165
|
+
removing(args) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
let event = new CustomEvent("on-removing", {
|
|
168
|
+
bubbles: true,
|
|
169
|
+
detail: args
|
|
170
|
+
});
|
|
171
|
+
this.element.dispatchEvent(event);
|
|
172
|
+
if (args.cancel) {
|
|
173
|
+
return;
|
|
172
174
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
if (this.dataAdapter && this.dataAdapter.remove) {
|
|
176
|
+
try {
|
|
177
|
+
if (this.serverDelete) {
|
|
178
|
+
yield this.dataAdapter.remove.call(this.context || this.bindingContext, args.filesData[0]);
|
|
179
|
+
}
|
|
180
|
+
this.onRemoveSuccess(args);
|
|
181
|
+
this.onWidgetRemoveComplete(null, args);
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
this.onWidgetRemoveFailed(error, args);
|
|
185
|
+
}
|
|
175
186
|
}
|
|
176
|
-
}
|
|
187
|
+
});
|
|
177
188
|
}
|
|
178
189
|
onWidgetRemoveComplete(response, args) {
|
|
179
190
|
this.widget.removeCompleted(response, args.filesData[0], false);
|
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": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aurelia",
|
|
7
7
|
"syncfusion"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build": "au build-plugin"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@syncfusion/ej2": "^
|
|
24
|
+
"@syncfusion/ej2": "^27.1.50",
|
|
25
25
|
"@types/jest": "^24.0.9",
|
|
26
26
|
"@types/node": "^20.12.7",
|
|
27
27
|
"aurelia-animator-css": "^1.0.4",
|
|
@@ -101,5 +101,6 @@
|
|
|
101
101
|
"text",
|
|
102
102
|
"html"
|
|
103
103
|
]
|
|
104
|
-
}
|
|
105
|
-
|
|
104
|
+
},
|
|
105
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
106
|
+
}
|