[Import/Export] Adds Import and Export functionality

Added context actions for importing and exporting JSON representations of domain objects. Added FileInputService for triggering file picker and retrieving uploaded data. Also added a File Input form control for integration with MCTForms.
This commit is contained in:
Preston Crowe
2017-07-11 14:45:26 -07:00
parent 586901aee7
commit 3674808a13
14 changed files with 1323 additions and 2 deletions

View File

@@ -24,6 +24,8 @@ define([
"./src/MCTForm",
"./src/MCTToolbar",
"./src/MCTControl",
"./src/MCTFileInput",
"./src/FileInputService",
"./src/controllers/AutocompleteController",
"./src/controllers/DateTimeController",
"./src/controllers/CompositeController",
@@ -42,11 +44,14 @@ define([
"text!./res/templates/controls/menu-button.html",
"text!./res/templates/controls/dialog.html",
"text!./res/templates/controls/radio.html",
"text!./res/templates/controls/file-input.html",
'legacyRegistry'
], function (
MCTForm,
MCTToolbar,
MCTControl,
MCTFileInput,
FileInputService,
AutocompleteController,
DateTimeController,
CompositeController,
@@ -65,6 +70,7 @@ define([
menuButtonTemplate,
dialogTemplate,
radioTemplate,
fileInputTemplate,
legacyRegistry
) {
@@ -88,6 +94,13 @@ define([
"templateLinker",
"controls[]"
]
},
{
"key": "mctFileInput",
"implementation": MCTFileInput,
"depends": [
"fileInputService"
]
}
],
"controls": [
@@ -142,6 +155,10 @@ define([
{
"key": "dialog-button",
"template": dialogTemplate
},
{
"key": "file-input",
"template": fileInputTemplate
}
],
"controllers": [
@@ -176,6 +193,14 @@ define([
"dialogService"
]
}
],
"components": [
{
"provides": "fileInputService",
"type": "provider",
"implementation": FileInputService
}
]
}
});