@livepreso/api 6.53.1 → 6.55.0

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.
Files changed (119) hide show
  1. package/.rush/temp/chunked-rush-logs/api.build.chunks.jsonl +2 -2
  2. package/.rush/temp/operation/build/all.log +2 -2
  3. package/.rush/temp/operation/build/error.log +1 -1
  4. package/.rush/temp/operation/build/log-chunks.jsonl +2 -2
  5. package/.rush/temp/operation/build/state.json +1 -1
  6. package/.rush/temp/shrinkwrap-deps.json +65 -15
  7. package/CHANGELOG.json +46 -0
  8. package/CHANGELOG.md +27 -1
  9. package/cjs/api.js +1 -1
  10. package/cjs/api.js.map +1 -1
  11. package/cjs/collections/auto-adjuncts.js +0 -22
  12. package/cjs/collections/auto-adjuncts.js.map +1 -1
  13. package/cjs/collections/cms-vals.js +25 -0
  14. package/cjs/collections/cms-vals.js.map +1 -1
  15. package/cjs/collections/cms-vals.spec.js +73 -0
  16. package/cjs/collections/cms-vals.spec.js.map +1 -0
  17. package/cjs/collections/deck-version-screenshots.js +0 -23
  18. package/cjs/collections/deck-version-screenshots.js.map +1 -1
  19. package/cjs/collections/scenarios.js +20 -0
  20. package/cjs/collections/scenarios.js.map +1 -0
  21. package/cjs/collections.js +11 -22
  22. package/cjs/collections.js.map +1 -1
  23. package/cjs/fixtures.js +18 -1
  24. package/cjs/fixtures.js.map +1 -1
  25. package/cjs/middlewares/base.js +1 -2
  26. package/cjs/middlewares/base.js.map +1 -1
  27. package/cjs/models/appointment.js +29 -8
  28. package/cjs/models/appointment.js.map +1 -1
  29. package/cjs/models/auto-adjunct.js +3 -2
  30. package/cjs/models/auto-adjunct.js.map +1 -1
  31. package/cjs/models/base.js +3 -1
  32. package/cjs/models/base.js.map +1 -1
  33. package/cjs/models/cms-val.js +3 -3
  34. package/cjs/models/cms-val.js.map +1 -1
  35. package/cjs/models/customer.js +2 -1
  36. package/cjs/models/customer.js.map +1 -1
  37. package/cjs/models/deck-layout.js +52 -0
  38. package/cjs/models/deck-layout.js.map +1 -0
  39. package/cjs/models/deck-version-screenshot.js +2 -2
  40. package/cjs/models/deck-version-screenshot.js.map +1 -1
  41. package/cjs/models/deck-version.js +43 -20
  42. package/cjs/models/deck-version.js.map +1 -1
  43. package/cjs/models/image.js +0 -2
  44. package/cjs/models/image.js.map +1 -1
  45. package/cjs/models/pack-diff.js +18 -9
  46. package/cjs/models/pack-diff.js.map +1 -1
  47. package/cjs/models/preset.js +8 -6
  48. package/cjs/models/preset.js.map +1 -1
  49. package/cjs/models/scenario.js +41 -0
  50. package/cjs/models/scenario.js.map +1 -0
  51. package/cjs/models/user.js +8 -3
  52. package/cjs/models/user.js.map +1 -1
  53. package/cjs/models.js +22 -0
  54. package/cjs/models.js.map +1 -1
  55. package/cjs/presentation/appointment-presentation.js +5 -3
  56. package/cjs/presentation/appointment-presentation.js.map +1 -1
  57. package/cjs/presentation/base-presentation-model.js +26 -23
  58. package/cjs/presentation/base-presentation-model.js.map +1 -1
  59. package/cjs/presentation/base-presentation-model.spec.js +21 -21
  60. package/cjs/presentation/base-presentation-model.spec.js.map +1 -1
  61. package/cjs/presentation/presentation-deck.js +6 -0
  62. package/cjs/presentation/presentation-deck.js.map +1 -1
  63. package/cjs/presentation/presentation-section.js +28 -3
  64. package/cjs/presentation/presentation-section.js.map +1 -1
  65. package/cjs/presentation/presentation-section.spec.js +16 -3
  66. package/cjs/presentation/presentation-section.spec.js.map +1 -1
  67. package/cjs/presentation/presentation-slide.js +25 -1
  68. package/cjs/presentation/presentation-slide.js.map +1 -1
  69. package/cjs/presentation/presentation-slide.spec.js +8 -1
  70. package/cjs/presentation/presentation-slide.spec.js.map +1 -1
  71. package/cjs/sync.js +17 -9
  72. package/cjs/sync.js.map +1 -1
  73. package/cjs/utils.js +12 -3
  74. package/cjs/utils.js.map +1 -1
  75. package/cjs/utils.spec.js +22 -0
  76. package/cjs/utils.spec.js.map +1 -1
  77. package/package.json +1 -1
  78. package/rush-logs/api.build.error.log +1 -1
  79. package/rush-logs/api.build.log +2 -2
  80. package/src/api.js +1 -1
  81. package/src/collections/auto-adjuncts.js +0 -22
  82. package/src/collections/cms-vals.js +28 -0
  83. package/src/collections/cms-vals.spec.js +66 -0
  84. package/src/collections/deck-version-screenshots.js +0 -22
  85. package/src/collections/scenarios.js +18 -0
  86. package/src/collections.js +1 -2
  87. package/src/fixtures.js +17 -1
  88. package/src/middlewares/base.js +1 -2
  89. package/src/models/appointment.js +32 -6
  90. package/src/models/auto-adjunct.js +3 -2
  91. package/src/models/base.js +3 -2
  92. package/src/models/cms-val.js +3 -3
  93. package/src/models/customer.js +1 -0
  94. package/src/models/deck-layout.js +54 -0
  95. package/src/models/deck-version-screenshot.js +2 -2
  96. package/src/models/deck-version.js +12 -14
  97. package/src/models/image.js +0 -3
  98. package/src/models/pack-diff.js +14 -9
  99. package/src/models/preset.js +8 -6
  100. package/src/models/scenario.js +39 -0
  101. package/src/models/user.js +8 -1
  102. package/src/models.js +2 -0
  103. package/src/presentation/appointment-presentation.js +7 -4
  104. package/src/presentation/base-presentation-model.js +29 -23
  105. package/src/presentation/base-presentation-model.spec.js +22 -22
  106. package/src/presentation/presentation-deck.js +6 -0
  107. package/src/presentation/presentation-section.js +26 -1
  108. package/src/presentation/presentation-section.spec.js +14 -1
  109. package/src/presentation/presentation-slide.js +24 -0
  110. package/src/presentation/presentation-slide.spec.js +7 -0
  111. package/src/sync.js +16 -12
  112. package/src/utils.js +13 -3
  113. package/src/utils.spec.js +27 -0
  114. package/cjs/collections/created-assets.js +0 -26
  115. package/cjs/collections/created-assets.js.map +0 -1
  116. package/cjs/collections/deleted-assets.js +0 -26
  117. package/cjs/collections/deleted-assets.js.map +0 -1
  118. package/src/collections/created-assets.js +0 -26
  119. package/src/collections/deleted-assets.js +0 -26
@@ -185,56 +185,56 @@ describe("#getTags", function () {
185
185
  expect(tags).toEqual(["adjunctslide-tags"]);
186
186
  });
187
187
  });
188
- describe("#filterScreenshotsByTeam", function () {
188
+ describe("#filterScreenshotsByScenario", function () {
189
189
  var screenshots = new _deckVersionScreenshots.DeckVersionScreenshotCollection([{
190
190
  subject: "/api/slides/1/",
191
191
  image_256: "global-screenshot-1.png",
192
- team: null
192
+ scenario: null
193
193
  }, {
194
194
  subject: "/api/slides/2/",
195
195
  image_256: "global-screenshot-2.png",
196
- team: null
196
+ scenario: null
197
197
  }, {
198
198
  subject: "/api/slides/1/",
199
- image_256: "team-1-screenshot.png",
200
- team: "/api/teams/1/"
199
+ image_256: "scenario-1-screenshot.png",
200
+ scenario: "/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/"
201
201
  }, {
202
202
  subject: "/api/sections/2/",
203
- image_256: "team-1-screenshot.png",
204
- team: "/api/teams/1/"
203
+ image_256: "scenario-1-screenshot.png",
204
+ scenario: "/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/"
205
205
  },
206
- // Just for testing that the team filters don't get cross-contaminated
206
+ // Just for testing that the scenario filters don't get cross-contaminated
207
207
  {
208
208
  subject: "/api/sections/2/",
209
- image_256: "team-2-screenshot.png",
210
- team: "/api/teams/2/"
209
+ image_256: "scenario-2-screenshot.png",
210
+ scenario: "/api/scenarios/9d35f335-efe7-4e5b-8365-f2afa229469d/"
211
211
  }]);
212
- it("should just return global screenshots if team is null", function () {
213
- var filtered = _basePresentationModel.BasePresentationModel.filterScreenshotsByTeam(screenshots, null).toJSON();
212
+ it("should just return global screenshots if scenario is null", function () {
213
+ var filtered = _basePresentationModel.BasePresentationModel.filterScreenshotsByScenario(screenshots, null).toJSON();
214
214
  expect(filtered).toEqual([{
215
215
  subject: "/api/slides/1/",
216
216
  image_256: "global-screenshot-1.png",
217
- team: null
217
+ scenario: null
218
218
  }, {
219
219
  subject: "/api/slides/2/",
220
220
  image_256: "global-screenshot-2.png",
221
- team: null
221
+ scenario: null
222
222
  }]);
223
223
  });
224
- it("should return globals with team override", function () {
225
- var filtered = _basePresentationModel.BasePresentationModel.filterScreenshotsByTeam(screenshots, 1).toJSON();
224
+ it("should return globals with scenario override", function () {
225
+ var filtered = _basePresentationModel.BasePresentationModel.filterScreenshotsByScenario(screenshots, "50465ccb-8887-4e1c-bb01-84c91a58c7ea").toJSON();
226
226
  expect(filtered).toEqual([{
227
227
  image_256: "global-screenshot-2.png",
228
228
  subject: "/api/slides/2/",
229
- team: null
229
+ scenario: null
230
230
  }, {
231
- image_256: "team-1-screenshot.png",
231
+ image_256: "scenario-1-screenshot.png",
232
232
  subject: "/api/sections/2/",
233
- team: "/api/teams/1/"
233
+ scenario: "/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/"
234
234
  }, {
235
- image_256: "team-1-screenshot.png",
235
+ image_256: "scenario-1-screenshot.png",
236
236
  subject: "/api/slides/1/",
237
- team: "/api/teams/1/"
237
+ scenario: "/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/"
238
238
  }]);
239
239
  });
240
240
  });
@@ -1 +1 @@
1
- {"version":3,"file":"base-presentation-model.spec.js","names":["_basePresentationModel","require","_deckVersionScreenshots","describe","it","config","BasePresentationModel","getVisibilityAndSequence","sequence","visible","url","expected","selectionID","expect","toEqual","choicelist","selections","id","tags","getTags","_typeof2","default","length","model","namespaced_key","options","deckTags","deck","adjunct","key","screenshots","DeckVersionScreenshotCollection","subject","image_256","team","filtered","filterScreenshotsByTeam","toJSON"],"sources":["../../src/presentation/base-presentation-model.spec.js"],"sourcesContent":["import { BasePresentationModel } from \"./base-presentation-model.js\";\nimport { DeckVersionScreenshotCollection } from \"../collections/deck-version-screenshots.js\";\n\ndescribe(\"#getVisibilityAndSequence\", () => {\n\tit(\"should return model defaults when no options\", () => {\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence({\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\turl: () => \"\",\n\t\t});\n\n\t\tconst expected = {\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return model defaults when no options\", () => {\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence({\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\turl: () => \"\",\n\t\t});\n\n\t\tconst expected = {\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return choicelist config\", () => {\n\t\tconst choicelist = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tchoicelist,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 0,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return selections config\", () => {\n\t\tconst selections = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t\tsequence: 27,\n\t\t\t\tid: 58,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tselections,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 27,\n\t\t\tvisible: true,\n\t\t\tselectionID: 58,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return choicelist config if both are provided\", () => {\n\t\tconst choicelist = [\n\t\t\t{\n\t\t\t\turl: \"gah/meh\",\n\t\t\t\tvisible: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t];\n\n\t\tconst selections = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t\tsequence: 27,\n\t\t\t\tid: 58,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tchoicelist,\n\t\t\t\tselections,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 1,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\t// adjuncts!!\n});\n\ndescribe(\"#getTags\", () => {\n\tit(\"should return empty array when no options or model tags\", () => {\n\t\tconst tags = BasePresentationModel.getTags({});\n\n\t\texpect(typeof tags).toEqual(\"object\");\n\t\texpect(tags.length).toEqual(0);\n\t});\n\n\tit(\"should return tags when no tags passed in options\", () => {\n\t\tconst model = {\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\t\tconst tags = BasePresentationModel.getTags(model);\n\n\t\texpect(tags).toEqual(model.tags);\n\t});\n\n\tit(\"should return tags for slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tnamespaced_key: \"slide-key\",\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"slide-key\": [\"slide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"slide-tags\"]);\n\t});\n\n\tit(\"should return tags for welcome slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tdeck: {},\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"slide-key\": [\"slide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"deck-tags\"]);\n\t});\n\n\tit(\"should return tags for an adjunct section when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tadjunct: true,\n\t\t\tkey: \"adjunctsection-key\",\n\t\t\ttags: [\"old-tag-1\", \"old-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"adjunctsection-key\": [\"adjunctsection-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"adjunctsection-tags\"]);\n\t});\n\n\tit(\"should return tags for an adjunct slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tadjunct: true,\n\t\t\tkey: \"adjunctslide-key\",\n\t\t\ttags: [\"old-tag-1\", \"old-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"section-key/adjunctslide-key\": [\"adjunctslide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"adjunctslide-tags\"]);\n\t});\n});\n\ndescribe(\"#filterScreenshotsByTeam\", () => {\n\tconst screenshots = new DeckVersionScreenshotCollection([\n\t\t{\n\t\t\tsubject: \"/api/slides/1/\",\n\t\t\timage_256: \"global-screenshot-1.png\",\n\t\t\tteam: null,\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/slides/2/\",\n\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\tteam: null,\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/slides/1/\",\n\t\t\timage_256: \"team-1-screenshot.png\",\n\t\t\tteam: \"/api/teams/1/\",\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/sections/2/\",\n\t\t\timage_256: \"team-1-screenshot.png\",\n\t\t\tteam: \"/api/teams/1/\",\n\t\t},\n\t\t// Just for testing that the team filters don't get cross-contaminated\n\t\t{\n\t\t\tsubject: \"/api/sections/2/\",\n\t\t\timage_256: \"team-2-screenshot.png\",\n\t\t\tteam: \"/api/teams/2/\",\n\t\t},\n\t]);\n\n\tit(\"should just return global screenshots if team is null\", () => {\n\t\tconst filtered = BasePresentationModel.filterScreenshotsByTeam(\n\t\t\tscreenshots,\n\t\t\tnull,\n\t\t).toJSON();\n\n\t\texpect(filtered).toEqual([\n\t\t\t{\n\t\t\t\tsubject: \"/api/slides/1/\",\n\t\t\t\timage_256: \"global-screenshot-1.png\",\n\t\t\t\tteam: null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tsubject: \"/api/slides/2/\",\n\t\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\t\tteam: null,\n\t\t\t},\n\t\t]);\n\t});\n\n\tit(\"should return globals with team override\", () => {\n\t\tconst filtered = BasePresentationModel.filterScreenshotsByTeam(\n\t\t\tscreenshots,\n\t\t\t1,\n\t\t).toJSON();\n\n\t\texpect(filtered).toEqual([\n\t\t\t{\n\t\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\t\tsubject: \"/api/slides/2/\",\n\t\t\t\tteam: null,\n\t\t\t},\n\t\t\t{\n\t\t\t\timage_256: \"team-1-screenshot.png\",\n\t\t\t\tsubject: \"/api/sections/2/\",\n\t\t\t\tteam: \"/api/teams/1/\",\n\t\t\t},\n\t\t\t{\n\t\t\t\timage_256: \"team-1-screenshot.png\",\n\t\t\t\tsubject: \"/api/slides/1/\",\n\t\t\t\tteam: \"/api/teams/1/\",\n\t\t\t},\n\t\t]);\n\t});\n});\n"],"mappings":";;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAA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;MACzBC,SAAS,EAAE,yBAAyB;MACpCC,IAAI,EAAE;IACP,CAAC,CACD,CAAC;EACH,CAAC,CAAC;EAEF9B,EAAE,CAAC,0CAA0C,EAAE,YAAM;IACpD,IAAM+B,QAAQ,GAAG7B,4CAAqB,CAAC8B,uBAAuB,CAC7DN,WAAW,EACX,CACD,CAAC,CAACO,MAAM,CAAC,CAAC;IAEVxB,MAAM,CAACsB,QAAQ,CAAC,CAACrB,OAAO,CAAC,CACxB;MACCmB,SAAS,EAAE,yBAAyB;MACpCD,OAAO,EAAE,gBAAgB;MACzBE,IAAI,EAAE;IACP,CAAC,EACD;MACCD,SAAS,EAAE,uBAAuB;MAClCD,OAAO,EAAE,kBAAkB;MAC3BE,IAAI,EAAE;IACP,CAAC,EACD;MACCD,SAAS,EAAE,uBAAuB;MAClCD,OAAO,EAAE,gBAAgB;MACzBE,IAAI,EAAE;IACP,CAAC,CACD,CAAC;EACH,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"base-presentation-model.spec.js","names":["_basePresentationModel","require","_deckVersionScreenshots","describe","it","config","BasePresentationModel","getVisibilityAndSequence","sequence","visible","url","expected","selectionID","expect","toEqual","choicelist","selections","id","tags","getTags","_typeof2","default","length","model","namespaced_key","options","deckTags","deck","adjunct","key","screenshots","DeckVersionScreenshotCollection","subject","image_256","scenario","filtered","filterScreenshotsByScenario","toJSON"],"sources":["../../src/presentation/base-presentation-model.spec.js"],"sourcesContent":["import { BasePresentationModel } from \"./base-presentation-model.js\";\nimport { DeckVersionScreenshotCollection } from \"../collections/deck-version-screenshots.js\";\n\ndescribe(\"#getVisibilityAndSequence\", () => {\n\tit(\"should return model defaults when no options\", () => {\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence({\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\turl: () => \"\",\n\t\t});\n\n\t\tconst expected = {\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return model defaults when no options\", () => {\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence({\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\turl: () => \"\",\n\t\t});\n\n\t\tconst expected = {\n\t\t\tsequence: 99,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return choicelist config\", () => {\n\t\tconst choicelist = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tchoicelist,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 0,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return selections config\", () => {\n\t\tconst selections = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t\tsequence: 27,\n\t\t\t\tid: 58,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tselections,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 27,\n\t\t\tvisible: true,\n\t\t\tselectionID: 58,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\tit(\"should return choicelist config if both are provided\", () => {\n\t\tconst choicelist = [\n\t\t\t{\n\t\t\t\turl: \"gah/meh\",\n\t\t\t\tvisible: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t];\n\n\t\tconst selections = [\n\t\t\t{\n\t\t\t\turl: \"bleh/meh\",\n\t\t\t\tvisible: true,\n\t\t\t\tsequence: 27,\n\t\t\t\tid: 58,\n\t\t\t},\n\t\t];\n\n\t\tconst config = BasePresentationModel.getVisibilityAndSequence(\n\t\t\t{\n\t\t\t\tsequence: 99,\n\t\t\t\tvisible: false,\n\t\t\t\turl: () => \"bleh/meh\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tchoicelist,\n\t\t\t\tselections,\n\t\t\t},\n\t\t);\n\n\t\tconst expected = {\n\t\t\tsequence: 1,\n\t\t\tvisible: true,\n\t\t\tselectionID: null,\n\t\t};\n\n\t\texpect(config).toEqual(expected);\n\t});\n\n\t// adjuncts!!\n});\n\ndescribe(\"#getTags\", () => {\n\tit(\"should return empty array when no options or model tags\", () => {\n\t\tconst tags = BasePresentationModel.getTags({});\n\n\t\texpect(typeof tags).toEqual(\"object\");\n\t\texpect(tags.length).toEqual(0);\n\t});\n\n\tit(\"should return tags when no tags passed in options\", () => {\n\t\tconst model = {\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\t\tconst tags = BasePresentationModel.getTags(model);\n\n\t\texpect(tags).toEqual(model.tags);\n\t});\n\n\tit(\"should return tags for slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tnamespaced_key: \"slide-key\",\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"slide-key\": [\"slide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"slide-tags\"]);\n\t});\n\n\tit(\"should return tags for welcome slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tdeck: {},\n\t\t\ttags: [\"model-tag-1\", \"model-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"slide-key\": [\"slide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"deck-tags\"]);\n\t});\n\n\tit(\"should return tags for an adjunct section when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tadjunct: true,\n\t\t\tkey: \"adjunctsection-key\",\n\t\t\ttags: [\"old-tag-1\", \"old-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"adjunctsection-key\": [\"adjunctsection-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"adjunctsection-tags\"]);\n\t});\n\n\tit(\"should return tags for an adjunct slide when tags passed in options\", () => {\n\t\tconst model = {\n\t\t\tadjunct: true,\n\t\t\tkey: \"adjunctslide-key\",\n\t\t\ttags: [\"old-tag-1\", \"old-tag-2\"],\n\t\t};\n\n\t\tconst options = {\n\t\t\tdeckTags: {\n\t\t\t\t\"\": [\"deck-tags\"],\n\t\t\t\t\"section-key/adjunctslide-key\": [\"adjunctslide-tags\"],\n\t\t\t},\n\t\t};\n\n\t\tconst tags = BasePresentationModel.getTags(model, options);\n\n\t\texpect(tags).toEqual([\"adjunctslide-tags\"]);\n\t});\n});\n\ndescribe(\"#filterScreenshotsByScenario\", () => {\n\tconst screenshots = new DeckVersionScreenshotCollection([\n\t\t{\n\t\t\tsubject: \"/api/slides/1/\",\n\t\t\timage_256: \"global-screenshot-1.png\",\n\t\t\tscenario: null,\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/slides/2/\",\n\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\tscenario: null,\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/slides/1/\",\n\t\t\timage_256: \"scenario-1-screenshot.png\",\n\t\t\tscenario: \"/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/\",\n\t\t},\n\t\t{\n\t\t\tsubject: \"/api/sections/2/\",\n\t\t\timage_256: \"scenario-1-screenshot.png\",\n\t\t\tscenario: \"/api/scenarios/50465ccb-8887-4e1c-bb01-84c91a58c7ea/\",\n\t\t},\n\t\t// Just for testing that the scenario filters don't get cross-contaminated\n\t\t{\n\t\t\tsubject: \"/api/sections/2/\",\n\t\t\timage_256: \"scenario-2-screenshot.png\",\n\t\t\tscenario: \"/api/scenarios/9d35f335-efe7-4e5b-8365-f2afa229469d/\",\n\t\t},\n\t]);\n\n\tit(\"should just return global screenshots if scenario is null\", () => {\n\t\tconst filtered = BasePresentationModel.filterScreenshotsByScenario(\n\t\t\tscreenshots,\n\t\t\tnull,\n\t\t).toJSON();\n\n\t\texpect(filtered).toEqual([\n\t\t\t{\n\t\t\t\tsubject: \"/api/slides/1/\",\n\t\t\t\timage_256: \"global-screenshot-1.png\",\n\t\t\t\tscenario: null,\n\t\t\t},\n\t\t\t{\n\t\t\t\tsubject: \"/api/slides/2/\",\n\t\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\t\tscenario: null,\n\t\t\t},\n\t\t]);\n\t});\n\n\tit(\"should return globals with scenario override\", () => {\n\t\tconst filtered = BasePresentationModel.filterScreenshotsByScenario(\n\t\t\tscreenshots,\n\t\t\t\"50465ccb-8887-4e1c-bb01-84c91a58c7ea\",\n\t\t).toJSON();\n\n\t\texpect(filtered).toEqual([\n\t\t\t{\n\t\t\t\timage_256: \"global-screenshot-2.png\",\n\t\t\t\tsubject: \"/api/slides/2/\",\n\t\t\t\tscenario: null,\n\t\t\t},\n\t\t\t{\n\t\t\t\timage_256: \"scenario-1-screenshot.png\",\n\t\t\t\tsubject: \"/api/sections/2/\",\n\t\t\t\tscenario: \"/api/scenarios/50465ccb-8887-4e1c-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AQ,GAAG7B,4CAAqB,CAAC8B,2BAA2B,CACjEN,WAAW,EACX,IACD,CAAC,CAACO,MAAM,CAAC,CAAC;IAEVxB,MAAM,CAACsB,QAAQ,CAAC,CAACrB,OAAO,CAAC,CACxB;MACCkB,OAAO,EAAE,gBAAgB;MACzBC,SAAS,EAAE,yBAAyB;MACpCC,QAAQ,EAAE;IACX,CAAC,EACD;MACCF,OAAO,EAAE,gBAAgB;MACzBC,SAAS,EAAE,yBAAyB;MACpCC,QAAQ,EAAE;IACX,CAAC,CACD,CAAC;EACH,CAAC,CAAC;EAEF9B,EAAE,CAAC,8CAA8C,EAAE,YAAM;IACxD,IAAM+B,QAAQ,GAAG7B,4CAAqB,CAAC8B,2BAA2B,CACjEN,WAAW,EACX,sCACD,CAAC,CAACO,MAAM,CAAC,CAAC;IAEVxB,MAAM,CAACsB,QAAQ,CAAC,CAACrB,OAAO,CAAC,CACxB;MACCmB,SAAS,EAAE,yBAAyB;MACpCD,OAAO,EAAE,gBAAgB;MACzBE,QAAQ,EAAE;IACX,CAAC,EACD;MACCD,SAAS,EAAE,2BAA2B;MACtCD,OAAO,EAAE,kBAAkB;MAC3BE,QAAQ,EAAE;IACX,CAAC,EACD;MACCD,SAAS,EAAE,2BAA2B;MACtCD,OAAO,EAAE,gBAAgB;MACzBE,QAAQ,EAAE;IACX,CAAC,CACD,CAAC;EACH,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -63,6 +63,9 @@ var PresentationDeck = exports.PresentationDeck = _basePresentationModel.BasePre
63
63
  title: "string",
64
64
  usesImpostorSections: "boolean",
65
65
  editable: "boolean",
66
+ titleEditable: "boolean",
67
+ notesEditable: "boolean",
68
+ tagsEditable: "boolean",
66
69
  tags: "array",
67
70
  version: "number",
68
71
  namespacedKey: "string",
@@ -150,6 +153,9 @@ PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
150
153
  common: deckVersionModel.manifest_json.common,
151
154
  title: deckVersionModel.deck.title,
152
155
  editable: tags.indexOf("editable") > -1,
156
+ titleEditable: false,
157
+ notesEditable: true,
158
+ tagsEditable: true,
153
159
  tags: tags,
154
160
  version: deckVersionModel.version,
155
161
  usesImpostorSections: (0, _utils.isImpostorDeck)(deckVersionModel),
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-deck.js","names":["require","collections","_interopRequireWildcard","_utils","_basePresentationModel","_models","_presentationSection","_presentationSlide","_lodash","_interopRequireDefault","_index","_log","_stateRegister","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationDeck","exports","BasePresentationModel","extend","props","html","css","id","deckID","index","thumbnail","visible","type","key","common","title","usesImpostorSections","editable","tags","version","namespacedKey","cmsvalkey_set","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","isWelcome","sections","url","DeckVersionModel","createFromDeckVersion","deckVersionModel","_deckVersionModel$nam","options","undefined","_","defaults","autoAdjuncts","AutoAdjunctCollection","adjunctSections","AdjunctSectionCollection","adjunctSlides","AdjunctSlideCollection","adjunctSubSlides","AdjunctSubSlideCollection","sectionSelections","SectionSelectionCollection","slideSelections","SlideSelectionCollection","screenshots","DeckVersionScreenshotCollection","rootAssetPath","templates","choicelist","screenshotsToMap","assetRoot","getAssetRoot","index_asset","concat","getTags","deck","getThumbnail","manifest_json","indexOf","isImpostorDeck","namespaced_key","log","warn","toJSON","selections","map","selection","sequence","section","slide","maxID","getMaxID","getUniqueAdjunctID","section_set","sectionModel","createFromSection","addSlides","slide_set","add","adjunctSection","createFromAdjunctSection","first","adjunctSlideLimit","adjunctslide_limit","slides","slideModel","isSection","isImpostor","createFromImpostorSection","PresentationSlide","createFromSlide","adjunctSlideModel","createFromAdjunctSlide","models","reverse","sectionSlides","Math","floor","template","createFromTemplate","autoSections","auto","Error","createFromAutoAdjunct","deckversionID","setSequentialSequences","createFromManifestJSON","manifestJSON","project","_project$welcome$edit","_project$welcome","parseInt","uniqueId","url2","resolve","getAssetPath","welcome","editables","some","items","titles","ordering","splitKey","split","newKey","sortBy","item","startIndex","endIndex","slice","createFromManifestImpostor","sectionKeys","_project$templates$fi","_project$templates","_project$templates$fi2","_project$templates$fi3","cmsvals","find","getTemplateAssetPath","minID","max","_project$templates2","_project$templates2$f","projTemplate","s","replace","autoAdjunctID","register"],"sources":["../../src/presentation/presentation-deck.js"],"sourcesContent":["import \"./presentation-sections.js\";\n\nimport * as collections from \"../collections\";\n\nimport {\n\tgetMaxID,\n\tisImpostor,\n\tisImpostorDeck,\n\tsetSequentialSequences,\n} from \"../utils.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model\";\nimport { DeckVersionModel } from \"../models\";\nimport { PresentationSection } from \"./presentation-section\";\nimport { PresentationSlide } from \"./presentation-slide\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport log from \"../log.js\";\nimport { register } from \"../state-register\";\nimport url2 from \"url\";\n\n/**\n * @constructor\n * @alias presentation.PresentationDeck\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationDeck = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationDeck# */ {\n\t\t/**\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} id\n\t\t * @property {number} deckID\n\t\t * @property {number} index\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} visible\n\t\t * @property {string} key\n\t\t * @property {object} common\n\t\t * @property {string} title\n\t\t * @property {boolean} usesImpostorSections\n\t\t * @property {boolean} editable\n\t\t * @property {array} tags\n\t\t * @property {number} version\n\t\t * @property {string} namespacedKey\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tid: \"number\",\n\t\t\tdeckID: \"number\",\n\t\t\tindex: \"number\",\n\t\t\tthumbnail: \"string\",\n\t\t\tvisible: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t\tkey: \"string\",\n\t\t\tcommon: \"object\",\n\t\t\ttitle: \"string\",\n\t\t\tusesImpostorSections: \"boolean\",\n\t\t\teditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tnamespacedKey: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSection} realSection\n\t\t */\n\t\tchildren: {\n\t\t\trealSection: \"PresentationSection\",\n\t\t},\n\n\t\tderived: {\n\t\t\twelcomeSlide: {\n\t\t\t\tfn: function () {\n\t\t\t\t\treturn new PresentationSection({\n\t\t\t\t\t\t...this.getAttributes({ props: true }),\n\t\t\t\t\t\tisWelcome: true,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSectionCollection} sections\n\t\t */\n\t\tcollections: {\n\t\t\tsections: \"PresentationSectionCollection\",\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tthis._url = new DeckVersionModel({ id: this.id }).url();\n\t\t\t}\n\n\t\t\treturn this._url;\n\t\t},\n\t},\n);\n\n/**\n * @function createFromURL\n * @memberof presentation.PresentationDeck\n * @param {models.DeckVersionModel} deckVersionModel\n * @param {object} [options]\n * @param {number} [options.index = 0]\n * @param {collections.AdjunctSectionCollection}} [adjunctSections]\n * @returns {presentation.PresentationDeck}\n */\nPresentationDeck.createFromDeckVersion = function (\n\tdeckVersionModel,\n\toptions = {},\n) {\n\t_.defaults(options, {\n\t\tindex: 0,\n\t\tautoAdjuncts: new collections.AutoAdjunctCollection(),\n\t\tadjunctSections: new collections.AdjunctSectionCollection(),\n\t\tadjunctSlides: new collections.AdjunctSlideCollection(),\n\t\tadjunctSubSlides: new collections.AdjunctSubSlideCollection(),\n\t\tsectionSelections: new collections.SectionSelectionCollection(),\n\t\tslideSelections: new collections.SlideSelectionCollection(),\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t\trootAssetPath: null,\n\t\ttemplates: null,\n\t\tchoicelist: null,\n\t});\n\n\toptions.screenshots = PresentationDeck.screenshotsToMap(options.screenshots);\n\n\tconst assetRoot = getAssetRoot(deckVersionModel.index_asset.url());\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\thtml = `${options.rootAssetPath}index.html`;\n\t\tcss = `${options.rootAssetPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst tags = PresentationDeck.getTags(deckVersionModel, options);\n\n\tconst deck = new PresentationDeck({\n\t\thtml,\n\t\tcss,\n\t\tid: deckVersionModel.id,\n\t\tindex: options.index,\n\t\tthumbnail: PresentationDeck.getThumbnail(\n\t\t\tdeckVersionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tdeckID: deckVersionModel.deck.id,\n\t\tvisible: true,\n\t\tkey: deckVersionModel.deck.key,\n\t\tcommon: deckVersionModel.manifest_json.common,\n\t\ttitle: deckVersionModel.deck.title,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttags,\n\t\tversion: deckVersionModel.version,\n\t\tusesImpostorSections: isImpostorDeck(deckVersionModel),\n\t\tcmsvalkey_set: deckVersionModel.cmsvalkey_set || [],\n\n\t\t// Prefer getting the value from the server, but if, for example, it's an old\n\t\t// cached version that doesn't have a namespaced key, we can make a very good\n\t\t// guess at a default!\n\t\tnamespacedKey: deckVersionModel.namespaced_key ?? \"\",\n\t});\n\n\tif (!deck.key) {\n\t\tlog.warn(\n\t\t\t\"Deck key not available to presentation\",\n\t\t\tdeckVersionModel.deck.toJSON(),\n\t\t);\n\t}\n\n\t// Convert the selections to an easier format to use later\n\tconst sectionSelections = options.sectionSelections;\n\tconst slideSelections = options.slideSelections;\n\n\toptions.selections = sectionSelections\n\t\t.map((selection) => {\n\t\t\treturn {\n\t\t\t\tsequence: selection.sequence,\n\t\t\t\tvisible: selection.visible,\n\t\t\t\turl: selection.section.url(),\n\t\t\t\tid: selection.id,\n\t\t\t};\n\t\t})\n\t\t.concat(\n\t\t\tslideSelections.map((selection) => {\n\t\t\t\treturn {\n\t\t\t\t\tsequence: selection.sequence,\n\t\t\t\t\tvisible: selection.visible,\n\t\t\t\t\turl: selection.slide.url(),\n\t\t\t\t\tid: selection.id,\n\t\t\t\t};\n\t\t\t}),\n\t\t);\n\n\t// We want all adjuncts to have fake ids that can't possibly overlap with the ids of\n\t// normal sections, slides and subslides, so we make a base ID that is larger than\n\t// all existing IDs then use the getUniqueAdjunctID function to retrieve an incremented ID\n\tlet maxID = getMaxID(deckVersionModel);\n\n\toptions.getUniqueAdjunctID = function () {\n\t\treturn ++maxID;\n\t};\n\n\t// We have four different ways to create a presentation structure here - we are\n\t// using either selections or a choicelist, and the deck is either a normal\n\t// deck or an impostor deck. Setting up a non-impostor deck is easier, so I've\n\t// split this up into two primary methods to cover those two branches, and the models\n\t// internally retrieve the correct sequence & visibility data depending on whether\n\t// we're using selections or a choicelist.\n\n\tif (!deck.usesImpostorSections) {\n\t\t// Non impostor deck using selections or a choicelist. Slides are already\n\t\t// associated with the correct sections, so all we have to do is turn\n\t\t// everything into a presentation model and pass the options through with\n\t\t// the selections or choicelist data.\n\n\t\tdeckVersionModel.section_set.forEach((sectionModel) => {\n\t\t\tconst section = PresentationSection.createFromSection(\n\t\t\t\tsectionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tsection.addSlides(sectionModel.slide_set, options);\n\t\t\tdeck.sections.add(section);\n\n\t\t\tconst adjunctSlides = options.adjunctSlides.filter((slide) => {\n\t\t\t\treturn slide.section && slide.section.id === section.id;\n\t\t\t});\n\n\t\t\tsection.addSlides(adjunctSlides, options);\n\t\t});\n\n\t\toptions.adjunctSections.forEach((adjunctSection) => {\n\t\t\tconst section = PresentationSection.createFromAdjunctSection(\n\t\t\t\tadjunctSection,\n\t\t\t\tDeckVersionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tdeck.sections.add(section);\n\t\t});\n\t} else {\n\t\t// Impostor deck using selections or a choicelist. The deckversion.section_set\n\t\t// only contains one section, which is the \"real\" section but is not used in\n\t\t// the presentation. Some slides have the tag \"section-header\", and these slides\n\t\t// will be turned into sections and may be given sets of slides.\n\n\t\tconst realSection = deckVersionModel.section_set.first();\n\n\t\tdeck.realSection = new PresentationSection({\n\t\t\tid: realSection.id,\n\t\t\tkey: realSection.key,\n\t\t\tadjunctSlideLimit: realSection.adjunctslide_limit,\n\t\t});\n\n\t\tlet slides = [];\n\n\t\t// First we go through all slides and separate the impostor sections from the\n\t\t// normal slides. If a slide is a \"section header\" then we turn it into a presentation\n\t\t// section; if it is just a slide then we add it to the slides array, which will contain\n\t\t// all slides. We can't allocate slides to sections yet because we don't know\n\t\t// which section a slide belongs to.\n\t\trealSection.slide_set.forEach((slideModel) => {\n\t\t\tconst isSection = isImpostor(slideModel);\n\n\t\t\tif (isSection) {\n\t\t\t\tconst section = PresentationSection.createFromImpostorSection(\n\t\t\t\t\tslideModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(section);\n\t\t\t} else {\n\t\t\t\tconst slide = PresentationSlide.createFromSlide(slideModel, options);\n\t\t\t\tslides.push(slide);\n\t\t\t}\n\t\t});\n\n\t\t// We filter the adjunct slides and add all the non-section slides to the slides array too.\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => !isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst slide = PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tnull,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tslides.push(slide);\n\t\t\t});\n\n\t\t// Next we go through the sections backwards and use the sequence to find all slides\n\t\t// which belong to a section. Doing this backwards means that we only need to know\n\t\t// one section's sequence at a time, e.g. if I went forwards and the first section\n\t\t// had the sequence 1, I know that I can start looking for slides with sequence > 1\n\t\t// but I don't know where to stop. If I start with the last section and look for\n\t\t// slides with the sequence > 110 then I know that all slides with a sequence > 110\n\t\t// are valid. I then remove those slides from the slides array and move down to the\n\t\t// next section.\n\t\tdeck.sections.models.reverse().forEach((section) => {\n\t\t\tconst sectionSlides = slides.filter(\n\t\t\t\t(slide) => slide.sequence > section.sequence,\n\t\t\t);\n\n\t\t\tsection.slides.add(sectionSlides);\n\n\t\t\t// Slides have a \"section\" on their model that represents the section\n\t\t\t// that they belong to. Because this is an impostor deck, there's a\n\t\t\t// good chance that the section is now incorrect for normal slides,\n\t\t\t// and a 100% chance that it's incorrect for adjunct slides as we\n\t\t\t// didn't populate the section field when we created the adjunct slides.\n\t\t\t// We update those now with the correct section.\n\t\t\tsection.slides.forEach((slide) => {\n\t\t\t\tslide.section = section.id;\n\t\t\t});\n\n\t\t\tslides = slides.filter((slide) => slide.sequence <= section.sequence);\n\t\t});\n\n\t\t// Average the adjunct slide limit used across the entire deck over each section\n\t\t// in the deck. We do this before we add the adjunct impostor sections, 'cause you\n\t\t// can't add custom slides to those.\n\t\tdeck.sections.forEach((section) => {\n\t\t\tsection.adjunctSlideLimit = section.adjunctSlideLimit\n\t\t\t\t? section.adjunctSlideLimit\n\t\t\t\t: Math.floor(realSection.adjunctSlideLimit / deck.sections.length);\n\t\t});\n\n\t\t// Return the sections to the correct order\n\t\tdeck.sections.models.reverse();\n\n\t\t// Finally, we add the adjunct impostor sections. These are adjunct slides with\n\t\t// the \"section-header\" tag and they work the same way as the slide impostors,\n\t\t// but because adjunct sections can't have slides we're adding them after the\n\t\t// slide-assigning process\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst adjunctSection = PresentationSection.createFromAdjunctSection(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tDeckVersionModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(adjunctSection);\n\t\t\t});\n\t}\n\n\t// Add templates as sections if present. This is only used by the CDK.\n\tif (options.templates && options.templates.length > 0) {\n\t\tdeck.sections.add(\n\t\t\toptions.templates.map((template, index) => {\n\t\t\t\treturn PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tdeck.sections.length + index,\n\t\t\t\t\toptions.getUniqueAdjunctID(),\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\t// This is generally only used by screenshots\n\tif (options.autoAdjuncts) {\n\t\tconst autoSections = options.autoAdjuncts.map((auto, index) => {\n\t\t\t// We already have the template on the deckversion, so we can find it here.\n\t\t\tif (!auto.template) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Attempted to use an autoadjunct that has no template.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst section = PresentationSection.createFromAutoAdjunct(auto, {\n\t\t\t\tindex: deck.sections.length + index,\n\t\t\t\tdeckversionID: deck.id,\n\t\t\t});\n\n\t\t\treturn section;\n\t\t});\n\n\t\tdeck.sections.add(autoSections);\n\t}\n\n\tsetSequentialSequences(deck);\n\n\treturn deck;\n};\n\nPresentationDeck.createFromManifestJSON = function (manifestJSON, project) {\n\tconst deck = new PresentationDeck({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex: 0,\n\t\tvisible: true,\n\t\tkey: manifestJSON.key || \"manifest_deck\",\n\t\thtml: url2.resolve(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: url2.resolve(manifestJSON.getAssetPath(), \"slide.css\"),\n\t\tcommon: manifestJSON.common,\n\t\tthumbnail: null,\n\t\tdeckID: 1,\n\t\ttitle: \"Local\",\n\t\tversion: 1,\n\t\ttags: manifestJSON.tags[\"\"] || [],\n\t\tcmsvalkey_set: project?.welcome?.editables ?? [],\n\t});\n\n\tconst usesImpostorSections = _.some(\n\t\tmanifestJSON.tags,\n\t\t(tags) => tags.indexOf(\"section-header\") !== -1,\n\t);\n\tdeck.usesImpostorSections = usesImpostorSections;\n\n\tif (usesImpostorSections) {\n\t\tdeck.usesImpostorSections = true;\n\n\t\tlet items = Object.keys(manifestJSON.titles).map((key) => {\n\t\t\tconst sequence = manifestJSON.toJSON().ordering[key];\n\t\t\tconst splitKey = key.split(\"/\");\n\t\t\tconst newKey = splitKey[splitKey.length - 1];\n\n\t\t\treturn {\n\t\t\t\tkey: newKey,\n\t\t\t\tsequence,\n\t\t\t\thtml: url2.resolve(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: url2.resolve(manifestJSON.getAssetPath(key), \"slide.css\"),\n\t\t\t\ttitle: manifestJSON.titles[key],\n\t\t\t\ttags: manifestJSON.tags[key] || [],\n\t\t\t\tcmsvalkey_set: [],\n\t\t\t};\n\t\t});\n\n\t\titems = _.sortBy(items, \"sequence\");\n\n\t\tconst sections = items.filter(\n\t\t\t(item) => item.tags.indexOf(\"section-header\") !== -1,\n\t\t);\n\n\t\tsections.forEach((item, index) => {\n\t\t\tconst startIndex = items.indexOf(item) + 1;\n\t\t\tconst endIndex = sections[index + 1]\n\t\t\t\t? items.indexOf(sections[index + 1])\n\t\t\t\t: items.length;\n\n\t\t\tconst slides = items.slice(startIndex, endIndex);\n\n\t\t\titem.slides = slides;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsections.map((section, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestImpostor(\n\t\t\t\t\tsection,\n\t\t\t\t\tproject,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\n\t\tdeck.realSection = PresentationSection.createFromManifestImpostor(\n\t\t\titems[0],\n\t\t\tproject,\n\t\t);\n\t} else {\n\t\tconst sectionKeys = Object.keys(manifestJSON.titles).filter((title) => {\n\t\t\treturn title.split(\"/\").length === 1;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsectionKeys.map((key, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestJSON(\n\t\t\t\t\tmanifestJSON,\n\t\t\t\t\tproject,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (manifestJSON.templates) {\n\t\tconst templates = Object.keys(manifestJSON.templates).map((key) => {\n\t\t\tconst cmsvals =\n\t\t\t\tproject?.templates?.find?.((t) => t.key === key)?.editables ?? [];\n\n\t\t\treturn {\n\t\t\t\t...manifestJSON.templates[key],\n\t\t\t\tkey,\n\t\t\t\tsequence: manifestJSON.templates[key].ordering,\n\t\t\t\tindex_asset: {\n\t\t\t\t\turl: url2.resolve(\n\t\t\t\t\t\tmanifestJSON.getTemplateAssetPath(key),\n\t\t\t\t\t\t\"index.html\",\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tcmsvalkey_set: cmsvals,\n\t\t\t};\n\t\t});\n\n\t\tconst minID = _.max(_.map(deck.sections.toJSON(), \"id\"));\n\n\t\tdeck.sections.add(\n\t\t\ttemplates.map((template, index) => {\n\t\t\t\tconst section = PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tindex,\n\t\t\t\t\tminID,\n\t\t\t\t);\n\t\t\t\tconst projTemplate = project?.templates?.find?.(\n\t\t\t\t\t(s) => s.key === section.key.replace(\"template-\", \"\"),\n\t\t\t\t);\n\t\t\t\tif (projTemplate?.editables) {\n\t\t\t\t\tsection.cmsvalkey_set = projTemplate.editables.map((key) => {\n\t\t\t\t\t\treturn `${key}-autoadjunct-${section.autoAdjunctID}`;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn section;\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn deck;\n};\n\nregister(\"PresentationDeck\", PresentationDeck);\n"],"mappings":";;;;;;;;;AAAAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH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AgBe,OAAO,CAAC8E,aAAa;QACnD,CAAC,CAAC;MACH;MACA,OAAO9E,OAAO;IACf,CAAC,CACF,CAAC;EACF;EAEA,OAAOb,IAAI;AACZ,CAAC;AAED,IAAA4F,uBAAQ,EAAC,kBAAkB,EAAE3J,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"presentation-deck.js","names":["require","collections","_interopRequireWildcard","_utils","_basePresentationModel","_models","_presentationSection","_presentationSlide","_lodash","_interopRequireDefault","_index","_log","_stateRegister","_url","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","PresentationDeck","exports","BasePresentationModel","extend","props","html","css","id","deckID","index","thumbnail","visible","type","key","common","title","usesImpostorSections","editable","titleEditable","notesEditable","tagsEditable","tags","version","namespacedKey","cmsvalkey_set","children","realSection","derived","welcomeSlide","fn","PresentationSection","getAttributes","isWelcome","sections","url","DeckVersionModel","createFromDeckVersion","deckVersionModel","_deckVersionModel$nam","options","undefined","_","defaults","autoAdjuncts","AutoAdjunctCollection","adjunctSections","AdjunctSectionCollection","adjunctSlides","AdjunctSlideCollection","adjunctSubSlides","AdjunctSubSlideCollection","sectionSelections","SectionSelectionCollection","slideSelections","SlideSelectionCollection","screenshots","DeckVersionScreenshotCollection","rootAssetPath","templates","choicelist","screenshotsToMap","assetRoot","getAssetRoot","index_asset","concat","getTags","deck","getThumbnail","manifest_json","indexOf","isImpostorDeck","namespaced_key","log","warn","toJSON","selections","map","selection","sequence","section","slide","maxID","getMaxID","getUniqueAdjunctID","section_set","sectionModel","createFromSection","addSlides","slide_set","add","adjunctSection","createFromAdjunctSection","first","adjunctSlideLimit","adjunctslide_limit","slides","slideModel","isSection","isImpostor","createFromImpostorSection","PresentationSlide","createFromSlide","adjunctSlideModel","createFromAdjunctSlide","models","reverse","sectionSlides","Math","floor","template","createFromTemplate","autoSections","auto","Error","createFromAutoAdjunct","deckversionID","setSequentialSequences","createFromManifestJSON","manifestJSON","project","_project$welcome$edit","_project$welcome","parseInt","uniqueId","url2","resolve","getAssetPath","welcome","editables","some","items","titles","ordering","splitKey","split","newKey","sortBy","item","startIndex","endIndex","slice","createFromManifestImpostor","sectionKeys","_project$templates$fi","_project$templates","_project$templates$fi2","_project$templates$fi3","cmsvals","find","getTemplateAssetPath","minID","max","_project$templates2","_project$templates2$f","projTemplate","s","replace","autoAdjunctID","register"],"sources":["../../src/presentation/presentation-deck.js"],"sourcesContent":["import \"./presentation-sections.js\";\n\nimport * as collections from \"../collections\";\n\nimport {\n\tgetMaxID,\n\tisImpostor,\n\tisImpostorDeck,\n\tsetSequentialSequences,\n} from \"../utils.js\";\n\nimport { BasePresentationModel } from \"./base-presentation-model\";\nimport { DeckVersionModel } from \"../models\";\nimport { PresentationSection } from \"./presentation-section\";\nimport { PresentationSlide } from \"./presentation-slide\";\nimport _ from \"lodash\";\nimport { getAssetRoot } from \"../index.js\";\nimport log from \"../log.js\";\nimport { register } from \"../state-register\";\nimport url2 from \"url\";\n\n/**\n * @constructor\n * @alias presentation.PresentationDeck\n * @extends presentation.BasePresentationModel\n */\nexport const PresentationDeck = BasePresentationModel.extend(\n\t/** @lends presentation.PresentationDeck# */ {\n\t\t/**\n\t\t * @property {string} html\n\t\t * @property {string} css\n\t\t * @property {number} id\n\t\t * @property {number} deckID\n\t\t * @property {number} index\n\t\t * @property {string} thumbnail\n\t\t * @property {boolean} visible\n\t\t * @property {string} key\n\t\t * @property {object} common\n\t\t * @property {string} title\n\t\t * @property {boolean} usesImpostorSections\n\t\t * @property {boolean} editable\n\t\t * @property {array} tags\n\t\t * @property {number} version\n\t\t * @property {string} namespacedKey\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\thtml: \"string\",\n\t\t\tcss: \"string\",\n\t\t\tid: \"number\",\n\t\t\tdeckID: \"number\",\n\t\t\tindex: \"number\",\n\t\t\tthumbnail: \"string\",\n\t\t\tvisible: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tvisible: true,\n\t\t\t},\n\t\t\tkey: \"string\",\n\t\t\tcommon: \"object\",\n\t\t\ttitle: \"string\",\n\t\t\tusesImpostorSections: \"boolean\",\n\t\t\teditable: \"boolean\",\n\t\t\ttitleEditable: \"boolean\",\n\t\t\tnotesEditable: \"boolean\",\n\t\t\ttagsEditable: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t\tversion: \"number\",\n\t\t\tnamespacedKey: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSection} realSection\n\t\t */\n\t\tchildren: {\n\t\t\trealSection: \"PresentationSection\",\n\t\t},\n\n\t\tderived: {\n\t\t\twelcomeSlide: {\n\t\t\t\tfn: function () {\n\t\t\t\t\treturn new PresentationSection({\n\t\t\t\t\t\t...this.getAttributes({ props: true }),\n\t\t\t\t\t\tisWelcome: true,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {presentation.PresentationSectionCollection} sections\n\t\t */\n\t\tcollections: {\n\t\t\tsections: \"PresentationSectionCollection\",\n\t\t},\n\n\t\turl() {\n\t\t\tif (!this._url) {\n\t\t\t\tthis._url = new DeckVersionModel({ id: this.id }).url();\n\t\t\t}\n\n\t\t\treturn this._url;\n\t\t},\n\t},\n);\n\n/**\n * @function createFromURL\n * @memberof presentation.PresentationDeck\n * @param {models.DeckVersionModel} deckVersionModel\n * @param {object} [options]\n * @param {number} [options.index = 0]\n * @param {collections.AdjunctSectionCollection}} [adjunctSections]\n * @returns {presentation.PresentationDeck}\n */\nPresentationDeck.createFromDeckVersion = function (\n\tdeckVersionModel,\n\toptions = {},\n) {\n\t_.defaults(options, {\n\t\tindex: 0,\n\t\tautoAdjuncts: new collections.AutoAdjunctCollection(),\n\t\tadjunctSections: new collections.AdjunctSectionCollection(),\n\t\tadjunctSlides: new collections.AdjunctSlideCollection(),\n\t\tadjunctSubSlides: new collections.AdjunctSubSlideCollection(),\n\t\tsectionSelections: new collections.SectionSelectionCollection(),\n\t\tslideSelections: new collections.SlideSelectionCollection(),\n\t\tscreenshots: new collections.DeckVersionScreenshotCollection(),\n\t\trootAssetPath: null,\n\t\ttemplates: null,\n\t\tchoicelist: null,\n\t});\n\n\toptions.screenshots = PresentationDeck.screenshotsToMap(options.screenshots);\n\n\tconst assetRoot = getAssetRoot(deckVersionModel.index_asset.url());\n\tlet html;\n\tlet css;\n\n\tif (options.rootAssetPath) {\n\t\thtml = `${options.rootAssetPath}index.html`;\n\t\tcss = `${options.rootAssetPath}slide.css`;\n\t} else {\n\t\thtml = `${assetRoot}index.html`;\n\t\tcss = `${assetRoot}slide.css`;\n\t}\n\n\tconst tags = PresentationDeck.getTags(deckVersionModel, options);\n\n\tconst deck = new PresentationDeck({\n\t\thtml,\n\t\tcss,\n\t\tid: deckVersionModel.id,\n\t\tindex: options.index,\n\t\tthumbnail: PresentationDeck.getThumbnail(\n\t\t\tdeckVersionModel,\n\t\t\toptions.screenshots,\n\t\t),\n\t\tdeckID: deckVersionModel.deck.id,\n\t\tvisible: true,\n\t\tkey: deckVersionModel.deck.key,\n\t\tcommon: deckVersionModel.manifest_json.common,\n\t\ttitle: deckVersionModel.deck.title,\n\t\teditable: tags.indexOf(\"editable\") > -1,\n\t\ttitleEditable: false,\n\t\tnotesEditable: true,\n\t\ttagsEditable: true,\n\t\ttags,\n\t\tversion: deckVersionModel.version,\n\t\tusesImpostorSections: isImpostorDeck(deckVersionModel),\n\t\tcmsvalkey_set: deckVersionModel.cmsvalkey_set || [],\n\n\t\t// Prefer getting the value from the server, but if, for example, it's an old\n\t\t// cached version that doesn't have a namespaced key, we can make a very good\n\t\t// guess at a default!\n\t\tnamespacedKey: deckVersionModel.namespaced_key ?? \"\",\n\t});\n\n\tif (!deck.key) {\n\t\tlog.warn(\n\t\t\t\"Deck key not available to presentation\",\n\t\t\tdeckVersionModel.deck.toJSON(),\n\t\t);\n\t}\n\n\t// Convert the selections to an easier format to use later\n\tconst sectionSelections = options.sectionSelections;\n\tconst slideSelections = options.slideSelections;\n\n\toptions.selections = sectionSelections\n\t\t.map((selection) => {\n\t\t\treturn {\n\t\t\t\tsequence: selection.sequence,\n\t\t\t\tvisible: selection.visible,\n\t\t\t\turl: selection.section.url(),\n\t\t\t\tid: selection.id,\n\t\t\t};\n\t\t})\n\t\t.concat(\n\t\t\tslideSelections.map((selection) => {\n\t\t\t\treturn {\n\t\t\t\t\tsequence: selection.sequence,\n\t\t\t\t\tvisible: selection.visible,\n\t\t\t\t\turl: selection.slide.url(),\n\t\t\t\t\tid: selection.id,\n\t\t\t\t};\n\t\t\t}),\n\t\t);\n\n\t// We want all adjuncts to have fake ids that can't possibly overlap with the ids of\n\t// normal sections, slides and subslides, so we make a base ID that is larger than\n\t// all existing IDs then use the getUniqueAdjunctID function to retrieve an incremented ID\n\tlet maxID = getMaxID(deckVersionModel);\n\n\toptions.getUniqueAdjunctID = function () {\n\t\treturn ++maxID;\n\t};\n\n\t// We have four different ways to create a presentation structure here - we are\n\t// using either selections or a choicelist, and the deck is either a normal\n\t// deck or an impostor deck. Setting up a non-impostor deck is easier, so I've\n\t// split this up into two primary methods to cover those two branches, and the models\n\t// internally retrieve the correct sequence & visibility data depending on whether\n\t// we're using selections or a choicelist.\n\n\tif (!deck.usesImpostorSections) {\n\t\t// Non impostor deck using selections or a choicelist. Slides are already\n\t\t// associated with the correct sections, so all we have to do is turn\n\t\t// everything into a presentation model and pass the options through with\n\t\t// the selections or choicelist data.\n\n\t\tdeckVersionModel.section_set.forEach((sectionModel) => {\n\t\t\tconst section = PresentationSection.createFromSection(\n\t\t\t\tsectionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tsection.addSlides(sectionModel.slide_set, options);\n\t\t\tdeck.sections.add(section);\n\n\t\t\tconst adjunctSlides = options.adjunctSlides.filter((slide) => {\n\t\t\t\treturn slide.section && slide.section.id === section.id;\n\t\t\t});\n\n\t\t\tsection.addSlides(adjunctSlides, options);\n\t\t});\n\n\t\toptions.adjunctSections.forEach((adjunctSection) => {\n\t\t\tconst section = PresentationSection.createFromAdjunctSection(\n\t\t\t\tadjunctSection,\n\t\t\t\tDeckVersionModel,\n\t\t\t\toptions,\n\t\t\t);\n\n\t\t\tdeck.sections.add(section);\n\t\t});\n\t} else {\n\t\t// Impostor deck using selections or a choicelist. The deckversion.section_set\n\t\t// only contains one section, which is the \"real\" section but is not used in\n\t\t// the presentation. Some slides have the tag \"section-header\", and these slides\n\t\t// will be turned into sections and may be given sets of slides.\n\n\t\tconst realSection = deckVersionModel.section_set.first();\n\n\t\tdeck.realSection = new PresentationSection({\n\t\t\tid: realSection.id,\n\t\t\tkey: realSection.key,\n\t\t\tadjunctSlideLimit: realSection.adjunctslide_limit,\n\t\t});\n\n\t\tlet slides = [];\n\n\t\t// First we go through all slides and separate the impostor sections from the\n\t\t// normal slides. If a slide is a \"section header\" then we turn it into a presentation\n\t\t// section; if it is just a slide then we add it to the slides array, which will contain\n\t\t// all slides. We can't allocate slides to sections yet because we don't know\n\t\t// which section a slide belongs to.\n\t\trealSection.slide_set.forEach((slideModel) => {\n\t\t\tconst isSection = isImpostor(slideModel);\n\n\t\t\tif (isSection) {\n\t\t\t\tconst section = PresentationSection.createFromImpostorSection(\n\t\t\t\t\tslideModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(section);\n\t\t\t} else {\n\t\t\t\tconst slide = PresentationSlide.createFromSlide(slideModel, options);\n\t\t\t\tslides.push(slide);\n\t\t\t}\n\t\t});\n\n\t\t// We filter the adjunct slides and add all the non-section slides to the slides array too.\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => !isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst slide = PresentationSlide.createFromAdjunctSlide(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tnull,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tslides.push(slide);\n\t\t\t});\n\n\t\t// Next we go through the sections backwards and use the sequence to find all slides\n\t\t// which belong to a section. Doing this backwards means that we only need to know\n\t\t// one section's sequence at a time, e.g. if I went forwards and the first section\n\t\t// had the sequence 1, I know that I can start looking for slides with sequence > 1\n\t\t// but I don't know where to stop. If I start with the last section and look for\n\t\t// slides with the sequence > 110 then I know that all slides with a sequence > 110\n\t\t// are valid. I then remove those slides from the slides array and move down to the\n\t\t// next section.\n\t\tdeck.sections.models.reverse().forEach((section) => {\n\t\t\tconst sectionSlides = slides.filter(\n\t\t\t\t(slide) => slide.sequence > section.sequence,\n\t\t\t);\n\n\t\t\tsection.slides.add(sectionSlides);\n\n\t\t\t// Slides have a \"section\" on their model that represents the section\n\t\t\t// that they belong to. Because this is an impostor deck, there's a\n\t\t\t// good chance that the section is now incorrect for normal slides,\n\t\t\t// and a 100% chance that it's incorrect for adjunct slides as we\n\t\t\t// didn't populate the section field when we created the adjunct slides.\n\t\t\t// We update those now with the correct section.\n\t\t\tsection.slides.forEach((slide) => {\n\t\t\t\tslide.section = section.id;\n\t\t\t});\n\n\t\t\tslides = slides.filter((slide) => slide.sequence <= section.sequence);\n\t\t});\n\n\t\t// Average the adjunct slide limit used across the entire deck over each section\n\t\t// in the deck. We do this before we add the adjunct impostor sections, 'cause you\n\t\t// can't add custom slides to those.\n\t\tdeck.sections.forEach((section) => {\n\t\t\tsection.adjunctSlideLimit = section.adjunctSlideLimit\n\t\t\t\t? section.adjunctSlideLimit\n\t\t\t\t: Math.floor(realSection.adjunctSlideLimit / deck.sections.length);\n\t\t});\n\n\t\t// Return the sections to the correct order\n\t\tdeck.sections.models.reverse();\n\n\t\t// Finally, we add the adjunct impostor sections. These are adjunct slides with\n\t\t// the \"section-header\" tag and they work the same way as the slide impostors,\n\t\t// but because adjunct sections can't have slides we're adding them after the\n\t\t// slide-assigning process\n\t\toptions.adjunctSlides\n\t\t\t.filter((slide) => isImpostor(slide))\n\t\t\t.forEach((adjunctSlideModel) => {\n\t\t\t\tconst adjunctSection = PresentationSection.createFromAdjunctSection(\n\t\t\t\t\tadjunctSlideModel,\n\t\t\t\t\tDeckVersionModel,\n\t\t\t\t\toptions,\n\t\t\t\t);\n\n\t\t\t\tdeck.sections.add(adjunctSection);\n\t\t\t});\n\t}\n\n\t// Add templates as sections if present. This is only used by the CDK.\n\tif (options.templates && options.templates.length > 0) {\n\t\tdeck.sections.add(\n\t\t\toptions.templates.map((template, index) => {\n\t\t\t\treturn PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tdeck.sections.length + index,\n\t\t\t\t\toptions.getUniqueAdjunctID(),\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\t// This is generally only used by screenshots\n\tif (options.autoAdjuncts) {\n\t\tconst autoSections = options.autoAdjuncts.map((auto, index) => {\n\t\t\t// We already have the template on the deckversion, so we can find it here.\n\t\t\tif (!auto.template) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Attempted to use an autoadjunct that has no template.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst section = PresentationSection.createFromAutoAdjunct(auto, {\n\t\t\t\tindex: deck.sections.length + index,\n\t\t\t\tdeckversionID: deck.id,\n\t\t\t});\n\n\t\t\treturn section;\n\t\t});\n\n\t\tdeck.sections.add(autoSections);\n\t}\n\n\tsetSequentialSequences(deck);\n\n\treturn deck;\n};\n\nPresentationDeck.createFromManifestJSON = function (manifestJSON, project) {\n\tconst deck = new PresentationDeck({\n\t\tid: parseInt(_.uniqueId(), 10),\n\t\tindex: 0,\n\t\tvisible: true,\n\t\tkey: manifestJSON.key || \"manifest_deck\",\n\t\thtml: url2.resolve(manifestJSON.getAssetPath(), \"index.html\"),\n\t\tcss: url2.resolve(manifestJSON.getAssetPath(), \"slide.css\"),\n\t\tcommon: manifestJSON.common,\n\t\tthumbnail: null,\n\t\tdeckID: 1,\n\t\ttitle: \"Local\",\n\t\tversion: 1,\n\t\ttags: manifestJSON.tags[\"\"] || [],\n\t\tcmsvalkey_set: project?.welcome?.editables ?? [],\n\t});\n\n\tconst usesImpostorSections = _.some(\n\t\tmanifestJSON.tags,\n\t\t(tags) => tags.indexOf(\"section-header\") !== -1,\n\t);\n\tdeck.usesImpostorSections = usesImpostorSections;\n\n\tif (usesImpostorSections) {\n\t\tdeck.usesImpostorSections = true;\n\n\t\tlet items = Object.keys(manifestJSON.titles).map((key) => {\n\t\t\tconst sequence = manifestJSON.toJSON().ordering[key];\n\t\t\tconst splitKey = key.split(\"/\");\n\t\t\tconst newKey = splitKey[splitKey.length - 1];\n\n\t\t\treturn {\n\t\t\t\tkey: newKey,\n\t\t\t\tsequence,\n\t\t\t\thtml: url2.resolve(manifestJSON.getAssetPath(key), \"index.html\"),\n\t\t\t\tcss: url2.resolve(manifestJSON.getAssetPath(key), \"slide.css\"),\n\t\t\t\ttitle: manifestJSON.titles[key],\n\t\t\t\ttags: manifestJSON.tags[key] || [],\n\t\t\t\tcmsvalkey_set: [],\n\t\t\t};\n\t\t});\n\n\t\titems = _.sortBy(items, \"sequence\");\n\n\t\tconst sections = items.filter(\n\t\t\t(item) => item.tags.indexOf(\"section-header\") !== -1,\n\t\t);\n\n\t\tsections.forEach((item, index) => {\n\t\t\tconst startIndex = items.indexOf(item) + 1;\n\t\t\tconst endIndex = sections[index + 1]\n\t\t\t\t? items.indexOf(sections[index + 1])\n\t\t\t\t: items.length;\n\n\t\t\tconst slides = items.slice(startIndex, endIndex);\n\n\t\t\titem.slides = slides;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsections.map((section, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestImpostor(\n\t\t\t\t\tsection,\n\t\t\t\t\tproject,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\n\t\tdeck.realSection = PresentationSection.createFromManifestImpostor(\n\t\t\titems[0],\n\t\t\tproject,\n\t\t);\n\t} else {\n\t\tconst sectionKeys = Object.keys(manifestJSON.titles).filter((title) => {\n\t\t\treturn title.split(\"/\").length === 1;\n\t\t});\n\n\t\tdeck.sections.add(\n\t\t\tsectionKeys.map((key, index) => {\n\t\t\t\treturn PresentationSection.createFromManifestJSON(\n\t\t\t\t\tmanifestJSON,\n\t\t\t\t\tproject,\n\t\t\t\t\tkey,\n\t\t\t\t\tindex,\n\t\t\t\t);\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (manifestJSON.templates) {\n\t\tconst templates = Object.keys(manifestJSON.templates).map((key) => {\n\t\t\tconst cmsvals =\n\t\t\t\tproject?.templates?.find?.((t) => t.key === key)?.editables ?? [];\n\n\t\t\treturn {\n\t\t\t\t...manifestJSON.templates[key],\n\t\t\t\tkey,\n\t\t\t\tsequence: manifestJSON.templates[key].ordering,\n\t\t\t\tindex_asset: {\n\t\t\t\t\turl: url2.resolve(\n\t\t\t\t\t\tmanifestJSON.getTemplateAssetPath(key),\n\t\t\t\t\t\t\"index.html\",\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tcmsvalkey_set: cmsvals,\n\t\t\t};\n\t\t});\n\n\t\tconst minID = _.max(_.map(deck.sections.toJSON(), \"id\"));\n\n\t\tdeck.sections.add(\n\t\t\ttemplates.map((template, index) => {\n\t\t\t\tconst section = PresentationSection.createFromTemplate(\n\t\t\t\t\ttemplate,\n\t\t\t\t\tindex,\n\t\t\t\t\tminID,\n\t\t\t\t);\n\t\t\t\tconst projTemplate = project?.templates?.find?.(\n\t\t\t\t\t(s) => s.key === section.key.replace(\"template-\", \"\"),\n\t\t\t\t);\n\t\t\t\tif (projTemplate?.editables) {\n\t\t\t\t\tsection.cmsvalkey_set = projTemplate.editables.map((key) => {\n\t\t\t\t\t\treturn `${key}-autoadjunct-${section.autoAdjunctID}`;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\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,CAAC;QAAA,OAAKA,CAAC,CAAC9I,GAAG,KAAKkE,OAAO,CAAClE,GAAG,CAAC+I,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;MAAA,CACtD,CAAC;MACD,IAAIF,YAAY,aAAZA,YAAY,eAAZA,YAAY,CAAE1B,SAAS,EAAE;QAC5BjD,OAAO,CAACvD,aAAa,GAAGkI,YAAY,CAAC1B,SAAS,CAACpD,GAAG,CAAC,UAAC/D,GAAG,EAAK;UAC3D,UAAAmD,MAAA,CAAUnD,GAAG,mBAAAmD,MAAA,CAAgBe,OAAO,CAAC8E,aAAa;QACnD,CAAC,CAAC;MACH;MACA,OAAO9E,OAAO;IACf,CAAC,CACF,CAAC;EACF;EAEA,OAAOb,IAAI;AACZ,CAAC;AAED,IAAA4F,uBAAQ,EAAC,kBAAkB,EAAE9J,gBAAgB,CAAC","ignoreList":[]}
@@ -50,7 +50,10 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
50
50
  * @property {boolean} visible
51
51
  * @property {number} deckversion
52
52
  * @property {number} selectionID
53
- * @property {boolean} editable
53
+ * @property {bool} editable
54
+ * @property {bool} titleEditable
55
+ * @property {bool} notesEditable
56
+ * @property {bool} tagsEditable
54
57
  * @property {array} tags
55
58
  * @property {boolean} impostor
56
59
  * @property {boolean} isWelcome
@@ -95,6 +98,9 @@ var PresentationSection = exports.PresentationSection = _basePresentationModel.B
95
98
  deckversion: "number",
96
99
  selectionID: "number",
97
100
  editable: "boolean",
101
+ titleEditable: "boolean",
102
+ notesEditable: "boolean",
103
+ tagsEditable: "boolean",
98
104
  tags: "array",
99
105
  impostor: "boolean",
100
106
  isWelcome: {
@@ -207,6 +213,11 @@ PresentationSection.createFromSection = function (sectionModel) {
207
213
  title: sectionModel.title,
208
214
  deckversion: sectionModel.deckversion.id,
209
215
  editable: tags.indexOf("editable") > -1,
216
+ // By default this is true for a deck slide. These can be changed later in PM depending
217
+ // on the logged in user and properties of an AutoAdjunct
218
+ titleEditable: false,
219
+ notesEditable: true,
220
+ tagsEditable: true,
210
221
  tags: tags,
211
222
  index: config.sequence,
212
223
  sequence: config.sequence,
@@ -266,6 +277,9 @@ PresentationSection.createFromAdjunctSection = function (adjunctSectionModel, de
266
277
  title: adjunctSectionModel.title,
267
278
  deckversion: deckVersionModel.id,
268
279
  editable: false,
280
+ titleEditable: false,
281
+ notesEditable: true,
282
+ tagsEditable: true,
269
283
  index: config.sequence,
270
284
  sequence: config.sequence,
271
285
  visible: config.visible,
@@ -336,6 +350,9 @@ PresentationSection.createFromImpostorSection = function (slideModel) {
336
350
  title: slideModel.title,
337
351
  deckversion: slideModel.section.deckversion.id,
338
352
  editable: tags.indexOf("editable") > -1,
353
+ titleEditable: false,
354
+ notesEditable: true,
355
+ tagsEditable: true,
339
356
  tags: tags,
340
357
  index: config.sequence,
341
358
  sequence: config.sequence,
@@ -444,7 +461,11 @@ PresentationSection.createFromAutoAdjunct = function (model) {
444
461
  impostor: options.impostor,
445
462
  tags: tags,
446
463
  cmsvalkey_set: autoAdjunct.cmsvalkey_set,
447
- namespacedKey: autoAdjunct.namespaced_key
464
+ namespacedKey: autoAdjunct.namespaced_key,
465
+ editable: true,
466
+ titleEditable: true,
467
+ notesEditable: true,
468
+ tagsEditable: true
448
469
  });
449
470
  if (autoAdjunct.template) {
450
471
  var _autoAdjunctSection$c;
@@ -493,7 +514,11 @@ PresentationSection.createFromTemplate = function (template, index) {
493
514
  createdByTemplate: true,
494
515
  index: index,
495
516
  cmsvalkey_set: [],
496
- namespacedKey: templateModel.namespaced_key
517
+ namespacedKey: templateModel.namespaced_key,
518
+ editable: false,
519
+ titleEditable: false,
520
+ notesEditable: true,
521
+ tagsEditable: true
497
522
  });
498
523
  return presentationSection;
499
524
  };