11define ( [
22 "openmct" ,
3- "./src/controllers/notebookController" ,
4- "./src/controllers/newEntryController" ,
5- "./src/controllers/selectSnapshotController" ,
3+ "./src/controllers/NotebookController" ,
4+ "./src/controllers/NewEntryController" ,
5+ "./src/controllers/SelectSnapshotController" ,
6+ "./src/controllers/LayoutNotebookController" ,
67 "./src/directives/MCTSnapshot" ,
7- "./src/directives/entryDnd" ,
8- "./src/actions/viewSnapshot" ,
9- "./src/actions/annotateSnapshot" ,
10- "./src/actions/removeEmbed" ,
11- "./src/actions/createSnapshot" ,
12- "./src/actions/removeSnapshot" ,
13- "./src/actions/newEntryContextual" ,
14- "./src/capabilities/notebookCapability" ,
15- "./src/indicators/notificationIndicator"
8+ "./src/directives/MCTModalNotebook" ,
9+ "./src/directives/EntryDnd" ,
10+ "./src/actions/ViewSnapshot" ,
11+ "./src/actions/AnnotateSnapshot" ,
12+ "./src/actions/RemoveEmbed" ,
13+ "./src/actions/CreateSnapshot" ,
14+ "./src/actions/RemoveSnapshot" ,
15+ "./src/actions/NewEntryContextual" ,
16+ "./src/capabilities/NotebookCapability" ,
17+ "./src/policies/CompositionPolicy" ,
18+ "./src/policies/ViewPolicy" ,
19+
1620] , function (
1721 openmct ,
18- notebookController ,
19- newEntryController ,
20- selectSnapshotController ,
22+ NotebookController ,
23+ NewEntryController ,
24+ SelectSnapshotController ,
25+ LayoutNotebookController ,
2126 MCTSnapshot ,
27+ MCTModalNotebook ,
2228 MCTEntryDnd ,
23- viewSnapshotAction ,
29+ ViewSnapshotAction ,
2430 AnnotateSnapshotAction ,
25- removeEmbedAction ,
26- createSnapshotAction ,
27- removeSnapshotAction ,
31+ RemoveEmbedAction ,
32+ CreateSnapshotAction ,
33+ RemoveSnapshotAction ,
2834 newEntryAction ,
2935 NotebookCapability ,
30- NotificationLaunchIndicator
36+ CompositionPolicy ,
37+ ViewPolicy
3138) {
3239 openmct . legacyRegistry . register ( "example/notebook" , {
3340 "name" : "Notebook Plugin" ,
3441 "description" : "Create and save timestamped notes with embedded object snapshots." ,
3542 "extensions" :
3643 {
37- "types" :[
38- {
39- "key" : "notebook" ,
40- "name" : "Notebook" ,
41- "cssClass" : "icon-notebook" ,
42- "description" : "Create and save timestamped notes with embedded object snapshots." ,
43- "features" : [ "creation" ] ,
44- "model" : {
45- "entries" :[
46- { "createdOn" : 1507512539258 ,
47- "text" : "Quis qui dolupti atempe non preicias qui dolorro" ,
48- "embeds" :[ ]
49- } ,
50- { "createdOn" : 1507570153599 ,
51- "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
52- } ,
53- { "createdOn" : 1507595098278 ,
54- "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
55- }
56- ] ,
57- "composition" :[ ] ,
58- "entryTypes" :[ ]
59- }
60- }
61- ] ,
62- "views" : [
44+ "types" :[
45+ {
46+ "key" : "notebook" ,
47+ "name" : "Notebook" ,
48+ "cssClass" : "icon-notebook" ,
49+ "description" : "Create and save timestamped notes with embedded object snapshots." ,
50+ "features" : [ "creation" ] ,
51+ "model" : {
52+ "entries" :[
53+ { "createdOn" : 1507512539258 ,
54+ "text" : "Quis qui dolupti atempe non preicias qui dolorro" ,
55+ "embeds" :[ ]
56+ } ,
57+ { "createdOn" : 1507570153599 ,
58+ "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
59+ } ,
60+ { "createdOn" : 1507595098278 ,
61+ "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
62+ }
63+ ] ,
64+ "composition" :[ ] ,
65+ "entryTypes" :[ ]
66+ }
67+ }
68+ ] ,
69+ "views" : [
6370 {
6471 "key" : "notebook.view" ,
6572 "type" : "notebook" ,
@@ -75,11 +82,42 @@ define([
7582 "drop"
7683 ]
7784 } ,
78- ] ,
79- "controllers" : [
85+ {
86+ "key" : "layoutNotebook" ,
87+ "name" : "Display Layout" ,
88+ "cssClass" : "icon-layout" ,
89+ "type" : "layout" ,
90+ "templateUrl" : "templates/layoutNotebook.html" ,
91+ "editable" : true ,
92+ "uses" : [ ] ,
93+ "toolbar" : {
94+ "sections" : [
95+ {
96+ "items" : [
97+ {
98+ "method" : "showFrame" ,
99+ "cssClass" : "icon-frame-show" ,
100+ "control" : "button" ,
101+ "title" : "Show frame" ,
102+ "description" : "Show frame"
103+ } ,
104+ {
105+ "method" : "hideFrame" ,
106+ "cssClass" : "icon-frame-hide" ,
107+ "control" : "button" ,
108+ "title" : "Hide frame" ,
109+ "description" : "Hide frame"
110+ }
111+ ]
112+ }
113+ ]
114+ }
115+ }
116+ ] ,
117+ "controllers" : [
80118 {
81- "key" : "notebookController " ,
82- "implementation" : notebookController ,
119+ "key" : "NotebookController " ,
120+ "implementation" : NotebookController ,
83121 "depends" : [ "$scope" ,
84122 "dialogService" ,
85123 "popupService" ,
@@ -93,24 +131,33 @@ define([
93131 ]
94132 } ,
95133 {
96- "key" : "newEntryController " ,
97- "implementation" : newEntryController ,
134+ "key" : "NewEntryController " ,
135+ "implementation" : NewEntryController ,
98136 "depends" : [ "$scope" ,
99137 "$rootScope"
100138 ]
101139 } ,
102140 {
103141 "key" : "selectSnapshotController" ,
104- "implementation" : selectSnapshotController ,
142+ "implementation" : SelectSnapshotController ,
105143 "depends" : [ "$scope" ,
106144 "$rootScope"
107145 ]
146+ } ,
147+ {
148+ "key" : "LayoutNotebookController" ,
149+ "implementation" : LayoutNotebookController ,
150+ "depends" : [ "$scope" ]
108151 }
109- ] ,
152+ ] ,
110153 "representations" : [
111154 {
112155 "key" : "draggedEntry" ,
113156 "templateUrl" : "templates/entry.html"
157+ } ,
158+ {
159+ "key" : "frameLayoutNotebook" ,
160+ "templateUrl" : "templates/frameLayoutNotebook.html"
114161 }
115162 ] ,
116163 "templates" : [
@@ -145,12 +192,19 @@ define([
145192 "typeService" ,
146193 "notificationService"
147194 ]
195+ } ,
196+ {
197+ "key" : "mctModalNotebook" ,
198+ "implementation" : MCTModalNotebook ,
199+ "depends" : [
200+ "$document"
201+ ]
148202 }
149203 ] ,
150204 "actions" : [
151205 {
152206 "key" : "view-snapshot" ,
153- "implementation" : viewSnapshotAction ,
207+ "implementation" : ViewSnapshotAction ,
154208 "name" : "View Snapshot" ,
155209 "description" : "View the large image in a modal" ,
156210 "category" : "embed" ,
@@ -174,7 +228,7 @@ define([
174228
175229 {
176230 "key" : "remove-embed" ,
177- "implementation" : removeEmbedAction ,
231+ "implementation" : RemoveEmbedAction ,
178232 "name" : "Remove..." ,
179233 "cssClass" : "icon-trash labeled" ,
180234 "description" : "Remove this embed" ,
@@ -188,7 +242,7 @@ define([
188242 } ,
189243 {
190244 "key" : "remove-snapshot" ,
191- "implementation" : removeSnapshotAction ,
245+ "implementation" : RemoveSnapshotAction ,
192246 "name" : "Remove Snapshot" ,
193247 "cssClass" : "icon-trash labeled" ,
194248 "description" : "Remove Snapshot of the embed" ,
@@ -199,7 +253,7 @@ define([
199253 } ,
200254 {
201255 "key" : "create-snapshot" ,
202- "implementation" : createSnapshotAction ,
256+ "implementation" : CreateSnapshotAction ,
203257 "name" : "Create Snapshot" ,
204258 "description" : "Create a snapshot for the embed" ,
205259 "category" : "embed-no-snap" ,
@@ -228,10 +282,16 @@ define([
228282 "priority" : "preferred"
229283 }
230284 ] ,
231- "indicators " : [
285+ "licenses " : [
232286 {
233- "implementation" : NotificationLaunchIndicator ,
234- "priority" : "fallback"
287+ "name" : "painterro" ,
288+ "version" : "4.1.0" ,
289+ "author" : "Mike Bostock" ,
290+ "description" : "D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data." ,
291+ "website" : "https://d3js.org/" ,
292+ "copyright" : "Copyright 2010-2016 Mike Bostock" ,
293+ "license" : "BSD-3-Clause" ,
294+ "link" : "https://github.com/d3/d3/blob/master/LICENSE"
235295 }
236296 ] ,
237297 "capabilities" : [
@@ -245,6 +305,17 @@ define([
245305 ]
246306 }
247307 ] ,
308+ "policies" : [
309+ {
310+ "category" : "composition" ,
311+ "implementation" : CompositionPolicy ,
312+ "message" : "Objects of this type cannot contain objects of that type."
313+ } ,
314+ {
315+ "category" : "view" ,
316+ "implementation" : ViewPolicy
317+ }
318+ ] ,
248319 "controls" : [
249320 {
250321 "key" : "embed-control" ,
@@ -255,7 +326,7 @@ define([
255326 "templateUrl" : "templates/controls/snapSelect.html"
256327 }
257328 ] ,
258- "stylesheets" : [
329+ "stylesheets" : [
259330 {
260331 "stylesheetUrl" : "css/notebook.css" ,
261332 "theme" : "espresso"
0 commit comments