@livepreso/api 6.51.0 → 6.53.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 (88) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +3 -2
  2. package/CHANGELOG.json +34 -0
  3. package/CHANGELOG.md +23 -1
  4. package/cjs/models/adjunct-section.js +2 -0
  5. package/cjs/models/adjunct-section.js.map +1 -1
  6. package/cjs/models/adjunct-slide.js +2 -0
  7. package/cjs/models/adjunct-slide.js.map +1 -1
  8. package/cjs/models/adjunct-sub-slide.js +2 -0
  9. package/cjs/models/adjunct-sub-slide.js.map +1 -1
  10. package/cjs/models/auto-adjunct.js +2 -0
  11. package/cjs/models/auto-adjunct.js.map +1 -1
  12. package/cjs/models/deck-version.js +2 -0
  13. package/cjs/models/deck-version.js.map +1 -1
  14. package/cjs/models/template.js +2 -0
  15. package/cjs/models/template.js.map +1 -1
  16. package/cjs/presentation/presentation-deck.js +36 -16
  17. package/cjs/presentation/presentation-deck.js.map +1 -1
  18. package/cjs/presentation/presentation-section.js +31 -14
  19. package/cjs/presentation/presentation-section.js.map +1 -1
  20. package/cjs/presentation/presentation-section.spec.js +5 -3
  21. package/cjs/presentation/presentation-section.spec.js.map +1 -1
  22. package/cjs/presentation/presentation-slide.js +32 -9
  23. package/cjs/presentation/presentation-slide.js.map +1 -1
  24. package/cjs/presentation/presentation-slide.spec.js +1 -0
  25. package/cjs/presentation/presentation-slide.spec.js.map +1 -1
  26. package/cjs/presentation/presentation-subslide.js +8 -3
  27. package/cjs/presentation/presentation-subslide.js.map +1 -1
  28. package/cjs/presentation/presentation-subslide.spec.js +2 -0
  29. package/cjs/presentation/presentation-subslide.spec.js.map +1 -1
  30. package/cjs/presentation/presentation.js +2 -2
  31. package/cjs/presentation/presentation.js.map +1 -1
  32. package/package.json +3 -3
  33. package/src/models/adjunct-section.js +2 -0
  34. package/src/models/adjunct-slide.js +2 -0
  35. package/src/models/adjunct-sub-slide.js +2 -0
  36. package/src/models/auto-adjunct.js +2 -0
  37. package/src/models/deck-version.js +2 -0
  38. package/src/models/template.js +2 -0
  39. package/src/presentation/presentation-deck.js +41 -17
  40. package/src/presentation/presentation-section.js +22 -3
  41. package/src/presentation/presentation-section.spec.js +4 -6
  42. package/src/presentation/presentation-slide.js +23 -2
  43. package/src/presentation/presentation-slide.spec.js +1 -0
  44. package/src/presentation/presentation-subslide.js +5 -0
  45. package/src/presentation/presentation-subslide.spec.js +2 -0
  46. package/src/presentation/presentation.js +2 -2
  47. package/.rush/temp/1aebf46f78ad5c45f82f8147751890adb37bef9d.log +0 -10
  48. package/.rush/temp/256021b5963b4c0221d3dec247b697b9691a9b2c.log +0 -10
  49. package/.rush/temp/2a322f00f12cf9d1e64afe81275cc78d01c49050.log +0 -10
  50. package/.rush/temp/30061f1865447dcbb3f20a305061205f3dbe6091.log +0 -10
  51. package/.rush/temp/3cdc82c352e8ed90607952873f3aa4c200490874.log +0 -10
  52. package/.rush/temp/45522aea0dee8cb2be1a53248ba45bd235743b43.log +0 -10
  53. package/.rush/temp/5489ab737e406518983c16c57fc3e1edc07c0341.log +0 -10
  54. package/.rush/temp/58fcbb7f15a76326d40e0839ab179755da82a891.log +0 -10
  55. package/.rush/temp/5bc0bba70b733baa4dd976667ba0a1386e516186.log +0 -10
  56. package/.rush/temp/64f1bb696f8d7d7e72907b80df316b127f72e23e.log +0 -10
  57. package/.rush/temp/6f640f951414ea68adb65c17e4ed7527cde54faf.log +0 -10
  58. package/.rush/temp/7c7b958682d4ab5697530be47d0aac62efe1adf1.log +0 -10
  59. package/.rush/temp/82bfb987463fbcfebf04022e6ed00015c73879c8.log +0 -10
  60. package/.rush/temp/844034aa6e542115075e8f3dc5ffc640973e0064.log +0 -10
  61. package/.rush/temp/8b42957a7c15da1f29cb57bee125f13affa70dca.log +0 -10
  62. package/.rush/temp/924652444ab5a6063f328a2217123a2227058896.log +0 -10
  63. package/.rush/temp/9f2030f96d62f3e38052e35201819a216566f14f.log +0 -10
  64. package/.rush/temp/a769db9d81a23000c0e9b1bf4f1a9a9e721d0d7c.log +0 -10
  65. package/.rush/temp/a87d3a8b4ece87ec66f27c86226a9f205617681f.log +0 -10
  66. package/.rush/temp/bb7a5bdcc4af4ad1507f81f33774b31f5b4e4fb7.log +0 -10
  67. package/.rush/temp/build-cache-tar.log +0 -7
  68. package/.rush/temp/c20e29ccaaa9231b38a28bb24451b4ce7562cdc0.log +0 -10
  69. package/.rush/temp/chunked-rush-logs/api.build.chunks.jsonl +0 -6
  70. package/.rush/temp/chunked-rush-logs/api.test.chunks.jsonl +0 -1
  71. package/.rush/temp/e21303db8f59b4625fd184c9114377d781fd24f8.log +0 -10
  72. package/.rush/temp/e6d303862765b6a5f41dd483d0f9ae083a1fae10.log +0 -10
  73. package/.rush/temp/eaf69fbc059d2f1258d7569136180d4a1d3c7072.log +0 -10
  74. package/.rush/temp/f85d279e2674966daaec83e1c3986a96f86ef304.log +0 -10
  75. package/.rush/temp/fc0a332c5b34c6b90006850cf2d93a48fb4b9a6e.log +0 -10
  76. package/.rush/temp/operation/build/all.log +0 -6
  77. package/.rush/temp/operation/build/log-chunks.jsonl +0 -6
  78. package/.rush/temp/operation/build/state.json +0 -3
  79. package/.rush/temp/operation/test/all.log +0 -19
  80. package/.rush/temp/operation/test/state.json +0 -3
  81. package/.rush/temp/package-deps_build.json +0 -185
  82. package/api.build.log +0 -9
  83. package/api.test.cache.log +0 -1
  84. package/api.test.log +0 -19
  85. package/rush-logs/api.build.cache.log +0 -1
  86. package/rush-logs/api.build.log +0 -6
  87. package/rush-logs/api.test.cache.log +0 -1
  88. package/rush-logs/api.test.log +0 -1
@@ -393,7 +393,8 @@
393
393
  "/data-view-byte-offset@1.0.0": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
394
394
  "/debug@2.6.9": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
395
395
  "/debug@3.2.7": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
396
- "/debug@4.3.7(supports-color@5.5.0)": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
396
+ "/debug@4.3.7(supports-color@8.1.1)": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
397
+ "/debug@4.4.0(supports-color@5.5.0)": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
397
398
  "/decode-uri-component@0.2.2": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
398
399
  "/dedent-js@1.0.1": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==",
399
400
  "/dedent@1.5.3": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==",
@@ -950,7 +951,7 @@
950
951
  "/selfsigned@2.4.1": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==",
951
952
  "/semver@5.7.2": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
952
953
  "/semver@6.3.1": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
953
- "/semver@7.6.3": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
954
+ "/semver@7.7.2": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
954
955
  "/send@0.19.0": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
955
956
  "/serialize-javascript@6.0.2": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
956
957
  "/serve-index@1.9.1": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
package/CHANGELOG.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
2
  "name": "@livepreso/api",
3
3
  "entries": [
4
+ {
5
+ "version": "6.53.0",
6
+ "tag": "@livepreso/api_v6.53.0",
7
+ "date": "Tue, 08 Jul 2025 01:48:30 GMT",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "comment": "Add cmsvals on all content/presentation models"
12
+ }
13
+ ],
14
+ "patch": [
15
+ {
16
+ "comment": "Build autoadjunct slides correctly"
17
+ }
18
+ ]
19
+ }
20
+ },
21
+ {
22
+ "version": "6.52.0",
23
+ "tag": "@livepreso/api_v6.52.0",
24
+ "date": "Wed, 25 Jun 2025 23:57:00 GMT",
25
+ "comments": {
26
+ "minor": [
27
+ {
28
+ "comment": "Add namespaced_key to models"
29
+ }
30
+ ],
31
+ "patch": [
32
+ {
33
+ "comment": "Rename keylist to layout"
34
+ }
35
+ ]
36
+ }
37
+ },
4
38
  {
5
39
  "version": "6.51.0",
6
40
  "tag": "@livepreso/api_v6.51.0",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,28 @@
1
1
  # Change Log - @livepreso/api
2
2
 
3
- This log was last generated on Thu, 12 Jun 2025 03:07:46 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 08 Jul 2025 01:48:30 GMT and should not be manually modified.
4
+
5
+ ## 6.53.0
6
+ Tue, 08 Jul 2025 01:48:30 GMT
7
+
8
+ ### Minor changes
9
+
10
+ - Add cmsvals on all content/presentation models
11
+
12
+ ### Patches
13
+
14
+ - Build autoadjunct slides correctly
15
+
16
+ ## 6.52.0
17
+ Wed, 25 Jun 2025 23:57:00 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - Add namespaced_key to models
22
+
23
+ ### Patches
24
+
25
+ - Rename keylist to layout
4
26
 
5
27
  ## 6.51.0
6
28
  Thu, 12 Jun 2025 03:07:46 GMT
@@ -24,6 +24,7 @@ var AdjunctSectionModel = exports.AdjunctSectionModel = _base.BaseModel.extend(/
24
24
  * @property {string} image_512
25
25
  * @property {string} image_1024
26
26
  * @property {string} image_original
27
+ * @property {string} namespaced_key
27
28
  * @property {string} html_content
28
29
  * @property {date} created_date
29
30
  * @property {date} selection_date
@@ -40,6 +41,7 @@ var AdjunctSectionModel = exports.AdjunctSectionModel = _base.BaseModel.extend(/
40
41
  image_512: "string",
41
42
  image_1024: "string",
42
43
  image_original: "string",
44
+ namespaced_key: "string",
43
45
  html_content: "string",
44
46
  created_date: "date",
45
47
  selection_date: "date",
@@ -1 +1 @@
1
- {"version":3,"file":"adjunct-section.js","names":["require","_base","_stateRegister","AdjunctSectionModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","html_content","created_date","selection_date","modified_date","title","sequence","deleted","enabled","type","default","created_by_autoadjunct","impostor","tags","children","appointment","adjunct","template","deckversion","creator_autoadjunct","toServer","data","_retrieveURL","url","Boolean","id","register"],"sources":["../../src/models/adjunct-section.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./deck-version.js\";\nimport \"./auto-adjunct.js\";\nimport \"./template.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSectionModel\n * @extends models.BaseModel\n */\nexport const AdjunctSectionModel = BaseModel.extend(\n\t/** @lends models.AdjunctSectionModel# */ {\n\t\tmodelName: \"adjunctsections\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} html_content\n\t\t * @property {date} created_date\n\t\t * @property {date} selection_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} title\n\t\t * @property {number} sequence\n\t\t * @property {boolean} enabled\n\t\t * @property {boolean} deleted\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\thtml_content: \"string\",\n\t\t\tcreated_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tmodified_date: \"date\",\n\t\t\ttitle: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tenabled: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\timpostor: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.TemplateModel} template\n\t\t * @property {models.DeckVersionModel} deckversion\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tdeckversion: \"DeckVersionModel\",\n\t\t\tcreator_autoadjunct: \"AutoAdjunctModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\ttemplate: this._retrieveURL(this.template),\n\t\t\t\tdeckversion: this._retrieveURL(this.deckversion),\n\t\t\t\tenabled: this.enabled,\n\t\t\t\ttags: this.tags,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct section\n\t\t\t\tdata.adjunct = this.adjunct.url();\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\tdata.title = this.title;\n\n\t\t\t\tif (this.image_original) {\n\t\t\t\t\tdata.image_original = this.image_original;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t},\n);\n\nregister(\"AdjunctSectionModel\", AdjunctSectionModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,eAAS,CAACC,MAAM,CAClD,yCAA0C;EACzCC,SAAS,EAAE,iBAAiB;EAE5B;AACF;AACA;AACA;AACA;AACA;AAC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AAI,CAACd,OAAO,GAAGiB,OAAO,CAAC,IAAI,CAACjB,OAAO,CAAC;IACrC,CAAC,MAAM;MACNc,IAAI,CAAChB,KAAK,GAAG,IAAI,CAACA,KAAK;MAEvB,IAAI,IAAI,CAACL,cAAc,EAAE;QACxBqB,IAAI,CAACrB,cAAc,GAAG,IAAI,CAACA,cAAc;MAC1C;IACD;IAEA,IAAI,IAAI,CAACyB,EAAE,EAAE;MACZJ,IAAI,CAACI,EAAE,GAAG,IAAI,CAACA,EAAE;MACjBJ,IAAI,CAACE,GAAG,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC;IACtB;IAEA,IAAI,IAAI,CAACpB,cAAc,EAAE;MACxBkB,IAAI,CAAClB,cAAc,GAAG,IAAI,CAACA,cAAc;IAC1C;IAEA,OAAOkB,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,qBAAqB,EAAEpC,mBAAmB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"adjunct-section.js","names":["require","_base","_stateRegister","AdjunctSectionModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","namespaced_key","html_content","created_date","selection_date","modified_date","title","sequence","deleted","enabled","type","default","created_by_autoadjunct","impostor","tags","children","appointment","adjunct","template","deckversion","creator_autoadjunct","toServer","data","_retrieveURL","url","Boolean","id","register"],"sources":["../../src/models/adjunct-section.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./deck-version.js\";\nimport \"./auto-adjunct.js\";\nimport \"./template.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSectionModel\n * @extends models.BaseModel\n */\nexport const AdjunctSectionModel = BaseModel.extend(\n\t/** @lends models.AdjunctSectionModel# */ {\n\t\tmodelName: \"adjunctsections\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} html_content\n\t\t * @property {date} created_date\n\t\t * @property {date} selection_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} title\n\t\t * @property {number} sequence\n\t\t * @property {boolean} enabled\n\t\t * @property {boolean} deleted\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\thtml_content: \"string\",\n\t\t\tcreated_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tmodified_date: \"date\",\n\t\t\ttitle: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tenabled: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\timpostor: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.TemplateModel} template\n\t\t * @property {models.DeckVersionModel} deckversion\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tdeckversion: \"DeckVersionModel\",\n\t\t\tcreator_autoadjunct: \"AutoAdjunctModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\ttemplate: this._retrieveURL(this.template),\n\t\t\t\tdeckversion: this._retrieveURL(this.deckversion),\n\t\t\t\tenabled: this.enabled,\n\t\t\t\ttags: this.tags,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct section\n\t\t\t\tdata.adjunct = this.adjunct.url();\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\tdata.title = this.title;\n\n\t\t\t\tif (this.image_original) {\n\t\t\t\t\tdata.image_original = this.image_original;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t},\n);\n\nregister(\"AdjunctSectionModel\", AdjunctSectionModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,eAAS,CAACC,MAAM,CAClD,yCAA0C;EACzCC,SAAS,EAAE,iBAAiB;EAE5B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAE;IACNC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,cAAc,EAAE,QAAQ;IACxBC,YAAY,EAAE,QAAQ;IACtBC,YAAY,EAAE,MAAM;IACpBC,cAAc,EAAE,MAAM;IACtBC,aAAa,EAAE,MAAM;IACrBC,KAAK,EAAE,QAAQ;IACfC,QAAQ,EAAE,QAAQ;IAClBC,OAAO,EAAE,SAAS;IAClBC,OAAO,EAAE;MACRC,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDC,sBAAs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AAI,CAACA,cAAc;IAC1C;IAEA,OAAOkB,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,qBAAqB,EAAErC,mBAAmB,CAAC","ignoreList":[]}
@@ -24,6 +24,7 @@ var AdjunctSlideModel = exports.AdjunctSlideModel = _base.BaseModel.extend(/** @
24
24
  * @property {string} image_512
25
25
  * @property {string} image_1024
26
26
  * @property {string} image_original
27
+ * @property {string} namespaced_key
27
28
  * @property {string} html_content
28
29
  * @property {date} created_date
29
30
  * @property {date} selection_date
@@ -40,6 +41,7 @@ var AdjunctSlideModel = exports.AdjunctSlideModel = _base.BaseModel.extend(/** @
40
41
  image_512: "string",
41
42
  image_1024: "string",
42
43
  image_original: "string",
44
+ namespaced_key: "string",
43
45
  html_content: "string",
44
46
  created_date: "date",
45
47
  selection_date: "date",
@@ -1 +1 @@
1
- {"version":3,"file":"adjunct-slide.js","names":["require","_base","_stateRegister","AdjunctSlideModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","html_content","created_date","selection_date","deleted","modified_date","title","sequence","enabled","type","default","created_by_autoadjunct","tags","children","appointment","adjunct","template","section","creator_autoadjunct","toServer","data","_retrieveURL","url","Boolean","id","register"],"sources":["../../src/models/adjunct-slide.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./section.js\";\nimport \"./auto-adjunct.js\";\nimport \"./template.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSlideModel\n * @extends models.BaseModel\n */\nexport const AdjunctSlideModel = BaseModel.extend(\n\t/** @lends models.AdjunctSlideModel# */ {\n\t\tmodelName: \"adjunctslides\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} html_content\n\t\t * @property {date} created_date\n\t\t * @property {date} selection_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} title\n\t\t * @property {boolean} deleted\n\t\t * @property {number} sequence\n\t\t * @property {boolean} enabled\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\thtml_content: \"string\",\n\t\t\tcreated_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tmodified_date: \"date\",\n\t\t\ttitle: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\tenabled: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.TemplateModel} template\n\t\t * @property {models.SectionModel} section\n\t\t * @property {models.AdjunctModel} creator_autoadjunct\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tsection: \"SectionModel\",\n\t\t\tcreator_autoadjunct: \"AutoAdjunctModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\ttemplate: this._retrieveURL(this.template),\n\t\t\t\tsection: this._retrieveURL(this.section),\n\t\t\t\tenabled: this.enabled,\n\t\t\t\ttags: this.tags,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct slide\n\t\t\t\tdata.adjunct = this.adjunct.url();\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\tdata.title = this.title;\n\n\t\t\t\tif (this.image_original) {\n\t\t\t\t\tdata.image_original = this.image_original;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t},\n);\n\nregister(\"AdjunctSlideModel\", AdjunctSlideModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,eAAS,CAACC,MAAM,CAChD,uCAAwC;EACvCC,SAAS,EAAE,eAAe;EAE1B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAE;IACNC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,YAAY,EAAE,QAAQ;IACtBC,YAAY,EAAE,MAAM;IACpBC,cAAc,EAAE,MAAM;IACtBC,OAAO,EAAE,SAAS;IAClBC,aAAa,EAAE,MAAM;IACrBC,KAAK,EAAE,QAAQ;IACfC,QAAQ,EAAE,QAAQ;IAClBC,OAAO,EAAE;MACRC,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDC,sBAAsB,EAAE,SAAS;IACjCC,IAAI,EAAE;EACP,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE;IACTC,WAAW,EAAE,kBAAkB;IAC/BC,OAAO,EAAE,cAAc;IACvBC,QAAQ,EAAE,eAAe;IACzBC,OAAO,EAAE,cAAc;IACvBC,mBAAmB,EAAE;EACtB,CAAC;EAEDC,QAAQ,WAARA,QAAQA,CAAA,EAAG;IACV,IAAMC,IAAI,GAAG;MACZb,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBO,WAAW,EAAE,IAAI,CAACO,YAAY,CAAC,IAAI,CAACP,WAAW,CAAC;MAChDE,QAAQ,EAAE,IAAI,CAACK,YAAY,CAAC,IAAI,CAACL,QAAQ,CAAC;MAC1CC,OAAO,EAAE,IAAI,CAACI,YAAY,CAAC,IAAI,CAACJ,OAAO,CAAC;MACxCT,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBI,IAAI,EAAE,IAAI,CAACA;IACZ,CAAC;IAED,IAAI,IAAI,CAACG,OAAO,EAAE;MACjB;MACAK,IAAI,CAACL,OAAO,GAAG,IAAI,CAACA,OAAO,CAACO,GAAG,CAAC,CAAC;MACjCF,IAAI,CAAChB,OAAO,GAAGmB,OAAO,CAAC,IAAI,CAACnB,OAAO,CAAC;IACrC,CAAC,MAAM;MACNgB,IAAI,CAACd,KAAK,GAAG,IAAI,CAACA,KAAK;MAEvB,IAAI,IAAI,CAACN,cAAc,EAAE;QACxBoB,IAAI,CAACpB,cAAc,GAAG,IAAI,CAACA,cAAc;MAC1C;IACD;IAEA,IAAI,IAAI,CAACG,cAAc,EAAE;MACxBiB,IAAI,CAACjB,cAAc,GAAG,IAAI,CAACA,cAAc;IAC1C;IAEA,IAAI,IAAI,CAACqB,EAAE,EAAE;MACZJ,IAAI,CAACI,EAAE,GAAG,IAAI,CAACA,EAAE;MACjBJ,IAAI,CAACE,GAAG,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC;IACtB;IAEA,OAAOF,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,mBAAmB,EAAEnC,iBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"adjunct-slide.js","names":["require","_base","_stateRegister","AdjunctSlideModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","namespaced_key","html_content","created_date","selection_date","deleted","modified_date","title","sequence","enabled","type","default","created_by_autoadjunct","tags","children","appointment","adjunct","template","section","creator_autoadjunct","toServer","data","_retrieveURL","url","Boolean","id","register"],"sources":["../../src/models/adjunct-slide.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./section.js\";\nimport \"./auto-adjunct.js\";\nimport \"./template.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSlideModel\n * @extends models.BaseModel\n */\nexport const AdjunctSlideModel = BaseModel.extend(\n\t/** @lends models.AdjunctSlideModel# */ {\n\t\tmodelName: \"adjunctslides\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} html_content\n\t\t * @property {date} created_date\n\t\t * @property {date} selection_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} title\n\t\t * @property {boolean} deleted\n\t\t * @property {number} sequence\n\t\t * @property {boolean} enabled\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\thtml_content: \"string\",\n\t\t\tcreated_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tmodified_date: \"date\",\n\t\t\ttitle: \"string\",\n\t\t\tsequence: \"number\",\n\t\t\tenabled: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\ttags: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.TemplateModel} template\n\t\t * @property {models.SectionModel} section\n\t\t * @property {models.AdjunctModel} creator_autoadjunct\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tsection: \"SectionModel\",\n\t\t\tcreator_autoadjunct: \"AutoAdjunctModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\ttemplate: this._retrieveURL(this.template),\n\t\t\t\tsection: this._retrieveURL(this.section),\n\t\t\t\tenabled: this.enabled,\n\t\t\t\ttags: this.tags,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct slide\n\t\t\t\tdata.adjunct = this.adjunct.url();\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\tdata.title = this.title;\n\n\t\t\t\tif (this.image_original) {\n\t\t\t\t\tdata.image_original = this.image_original;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t},\n);\n\nregister(\"AdjunctSlideModel\", AdjunctSlideModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,eAAS,CAACC,MAAM,CAChD,u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AI,CAACL,OAAO,GAAG,IAAI,CAACA,OAAO,CAACO,GAAG,CAAC,CAAC;MACjCF,IAAI,CAAChB,OAAO,GAAGmB,OAAO,CAAC,IAAI,CAACnB,OAAO,CAAC;IACrC,CAAC,MAAM;MACNgB,IAAI,CAACd,KAAK,GAAG,IAAI,CAACA,KAAK;MAEvB,IAAI,IAAI,CAACP,cAAc,EAAE;QACxBqB,IAAI,CAACrB,cAAc,GAAG,IAAI,CAACA,cAAc;MAC1C;IACD;IAEA,IAAI,IAAI,CAACI,cAAc,EAAE;MACxBiB,IAAI,CAACjB,cAAc,GAAG,IAAI,CAACA,cAAc;IAC1C;IAEA,IAAI,IAAI,CAACqB,EAAE,EAAE;MACZJ,IAAI,CAACI,EAAE,GAAG,IAAI,CAACA,EAAE;MACjBJ,IAAI,CAACE,GAAG,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC;IACtB;IAEA,OAAOF,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,mBAAmB,EAAEpC,iBAAiB,CAAC","ignoreList":[]}
@@ -20,6 +20,7 @@ var AdjunctSubSlideModel = exports.AdjunctSubSlideModel = _base.BaseModel.extend
20
20
  * @property {boolean} created_by_autoadjunct
21
21
  * @property {boolean} custom
22
22
  * @property {boolean} deleted
23
+ * @property {string} namespaced_key
23
24
  * @property {string} html_content
24
25
  * @property {boolean} visible
25
26
  */
@@ -29,6 +30,7 @@ var AdjunctSubSlideModel = exports.AdjunctSubSlideModel = _base.BaseModel.extend
29
30
  custom: "boolean",
30
31
  deleted: "boolean",
31
32
  enabled: "boolean",
33
+ namespaced_key: "string",
32
34
  html_content: "string",
33
35
  modified_date: "date",
34
36
  selection_date: "date",
@@ -1 +1 @@
1
- {"version":3,"file":"adjunct-sub-slide.js","names":["require","_base","_stateRegister","AdjunctSubSlideModel","exports","BaseModel","extend","modelName","props","created_by_autoadjunct","created_date","custom","deleted","enabled","html_content","modified_date","selection_date","sequence","title","visible","children","appointment","adjunct","slide","toServer","data","_retrieveURL","Boolean","id","url","register"],"sources":["../../src/models/adjunct-sub-slide.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./slide.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSubSlideModel\n * @extends models.BaseModel\n */\nexport const AdjunctSubSlideModel = BaseModel.extend(\n\t/** @lends models.AdjunctSubSlideModel# */ {\n\t\tmodelName: \"adjunctsubslides\",\n\n\t\t/**\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t * @property {boolean} custom\n\t\t * @property {boolean} deleted\n\t\t * @property {string} html_content\n\t\t * @property {boolean} visible\n\t\t */\n\t\tprops: {\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\tcreated_date: \"date\",\n\t\t\tcustom: \"boolean\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tenabled: \"boolean\",\n\t\t\thtml_content: \"string\",\n\t\t\tmodified_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tsequence: \"number\",\n\t\t\ttitle: \"string\",\n\t\t\tvisible: \"boolean\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.SlideModel} slide\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\tslide: \"SlideModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\tslide: this._retrieveURL(this.slide),\n\t\t\t\tenabled: this.enabled,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct subslide\n\t\t\t\tdata.adjunct = this._retrieveURL(this.adjunct);\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\t// We're creating a new adjunct subslide\n\t\t\t\tdata.title = this.title;\n\t\t\t\tdata.html_content = this.html_content;\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t},\n);\n\nregister(\"AdjunctSubSlideModel\", AdjunctSubSlideModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAGE,eAAS,CAACC,MAAM,CACnD,0CAA2C;EAC1CC,SAAS,EAAE,kBAAkB;EAE7B;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAE;IACNC,sBAAsB,EAAE,SAAS;IACjCC,YAAY,EAAE,MAAM;IACpBC,MAAM,EAAE,SAAS;IACjBC,OAAO,EAAE,SAAS;IAClBC,OAAO,EAAE,SAAS;IAClBC,YAAY,EAAE,QAAQ;IACtBC,aAAa,EAAE,MAAM;IACrBC,cAAc,EAAE,MAAM;IACtBC,QAAQ,EAAE,QAAQ;IAClBC,KAAK,EAAE,QAAQ;IACfC,OAAO,EAAE;EACV,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,QAAQ,EAAE;IACTC,WAAW,EAAE,kBAAkB;IAC/BC,OAAO,EAAE,cAAc;IACvBC,KAAK,EAAE;EACR,CAAC;EAEDC,QAAQ,WAARA,QAAQA,CAAA,EAAG;IACV,IAAMC,IAAI,GAAG;MACZR,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBI,WAAW,EAAE,IAAI,CAACK,YAAY,CAAC,IAAI,CAACL,WAAW,CAAC;MAChDE,KAAK,EAAE,IAAI,CAACG,YAAY,CAAC,IAAI,CAACH,KAAK,CAAC;MACpCV,OAAO,EAAE,IAAI,CAACA;IACf,CAAC;IAED,IAAI,IAAI,CAACS,OAAO,EAAE;MACjB;MACAG,IAAI,CAACH,OAAO,GAAG,IAAI,CAACI,YAAY,CAAC,IAAI,CAACJ,OAAO,CAAC;MAC9CG,IAAI,CAACb,OAAO,GAAGe,OAAO,CAAC,IAAI,CAACf,OAAO,CAAC;IACrC,CAAC,MAAM;MACN;MACAa,IAAI,CAACP,KAAK,GAAG,IAAI,CAACA,KAAK;MACvBO,IAAI,CAACX,YAAY,GAAG,IAAI,CAACA,YAAY;IACtC;IAEA,IAAI,IAAI,CAACE,cAAc,EAAE;MACxBS,IAAI,CAACT,cAAc,GAAG,IAAI,CAACA,cAAc;IAC1C;IAEA,IAAI,IAAI,CAACY,EAAE,EAAE;MACZH,IAAI,CAACG,EAAE,GAAG,IAAI,CAACA,EAAE;MACjBH,IAAI,CAACI,GAAG,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC;IACtB;IAEA,OAAOJ,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,sBAAsB,EAAE3B,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"adjunct-sub-slide.js","names":["require","_base","_stateRegister","AdjunctSubSlideModel","exports","BaseModel","extend","modelName","props","created_by_autoadjunct","created_date","custom","deleted","enabled","namespaced_key","html_content","modified_date","selection_date","sequence","title","visible","children","appointment","adjunct","slide","toServer","data","_retrieveURL","Boolean","id","url","register"],"sources":["../../src/models/adjunct-sub-slide.js"],"sourcesContent":["import \"./appointment.js\";\nimport \"./adjunct.js\";\nimport \"./slide.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AdjunctSubSlideModel\n * @extends models.BaseModel\n */\nexport const AdjunctSubSlideModel = BaseModel.extend(\n\t/** @lends models.AdjunctSubSlideModel# */ {\n\t\tmodelName: \"adjunctsubslides\",\n\n\t\t/**\n\t\t * @property {boolean} created_by_autoadjunct\n\t\t * @property {boolean} custom\n\t\t * @property {boolean} deleted\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} html_content\n\t\t * @property {boolean} visible\n\t\t */\n\t\tprops: {\n\t\t\tcreated_by_autoadjunct: \"boolean\",\n\t\t\tcreated_date: \"date\",\n\t\t\tcustom: \"boolean\",\n\t\t\tdeleted: \"boolean\",\n\t\t\tenabled: \"boolean\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\thtml_content: \"string\",\n\t\t\tmodified_date: \"date\",\n\t\t\tselection_date: \"date\",\n\t\t\tsequence: \"number\",\n\t\t\ttitle: \"string\",\n\t\t\tvisible: \"boolean\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AppointmentModel} appointment\n\t\t * @property {models.AdjunctModel} adjunct\n\t\t * @property {models.SlideModel} slide\n\t\t */\n\t\tchildren: {\n\t\t\tappointment: \"AppointmentModel\",\n\t\t\tadjunct: \"AdjunctModel\",\n\t\t\tslide: \"SlideModel\",\n\t\t},\n\n\t\ttoServer() {\n\t\t\tconst data = {\n\t\t\t\tsequence: this.sequence,\n\t\t\t\tappointment: this._retrieveURL(this.appointment),\n\t\t\t\tslide: this._retrieveURL(this.slide),\n\t\t\t\tenabled: this.enabled,\n\t\t\t};\n\n\t\t\tif (this.adjunct) {\n\t\t\t\t// We're updating an existing adjunct subslide\n\t\t\t\tdata.adjunct = this._retrieveURL(this.adjunct);\n\t\t\t\tdata.deleted = Boolean(this.deleted);\n\t\t\t} else {\n\t\t\t\t// We're creating a new adjunct subslide\n\t\t\t\tdata.title = this.title;\n\t\t\t\tdata.html_content = this.html_content;\n\t\t\t}\n\n\t\t\tif (this.selection_date) {\n\t\t\t\tdata.selection_date = this.selection_date;\n\t\t\t}\n\n\t\t\tif (this.id) {\n\t\t\t\tdata.id = this.id;\n\t\t\t\tdata.url = this.url();\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\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AO,GAAGgB,OAAO,CAAC,IAAI,CAAChB,OAAO,CAAC;IACrC,CAAC,MAAM;MACN;MACAc,IAAI,CAACP,KAAK,GAAG,IAAI,CAACA,KAAK;MACvBO,IAAI,CAACX,YAAY,GAAG,IAAI,CAACA,YAAY;IACtC;IAEA,IAAI,IAAI,CAACE,cAAc,EAAE;MACxBS,IAAI,CAACT,cAAc,GAAG,IAAI,CAACA,cAAc;IAC1C;IAEA,IAAI,IAAI,CAACY,EAAE,EAAE;MACZH,IAAI,CAACG,EAAE,GAAG,IAAI,CAACA,EAAE;MACjBH,IAAI,CAACI,GAAG,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC;IACtB;IAEA,OAAOJ,IAAI;EACZ;AACD,CACD,CAAC;AAED,IAAAK,uBAAQ,EAAC,sBAAsB,EAAE5B,oBAAoB,CAAC","ignoreList":[]}
@@ -22,6 +22,7 @@ var AutoAdjunctModel = exports.AutoAdjunctModel = _base.BaseModel.extend(/** @le
22
22
  * @property {string} image_512
23
23
  * @property {string} image_1024
24
24
  * @property {string} image_original
25
+ * @property {string} namespaced_key
25
26
  * @property {string} name
26
27
  * @property {string} parent_key
27
28
  * @property {string} after_key
@@ -35,6 +36,7 @@ var AutoAdjunctModel = exports.AutoAdjunctModel = _base.BaseModel.extend(/** @le
35
36
  image_512: "string",
36
37
  image_1024: "string",
37
38
  image_original: "string",
39
+ namespaced_key: "string",
38
40
  name: "stringSanitized",
39
41
  parent_key: "string",
40
42
  after_key: "string",
@@ -1 +1 @@
1
- {"version":3,"file":"auto-adjunct.js","names":["require","_base","_stateRegister","AutoAdjunctModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","name","parent_key","after_key","key","enabled","sequence","tags","cmsvalkey_set","_tenancy","children","deck","template","team","register"],"sources":["../../src/models/auto-adjunct.js"],"sourcesContent":["import \"./template.js\";\nimport \"./team.js\";\nimport \"./deck.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AutoAdjunctModel\n * @extends models.BaseModel\n */\nexport const AutoAdjunctModel = BaseModel.extend(\n\t/** @lends models.AutoAdjunctModel# */ {\n\t\tmodelName: \"autoadjuncts\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} name\n\t\t * @property {string} parent_key\n\t\t * @property {string} after_key\n\t\t * @property {boolean} enabled\n\t\t * @property {number} sequence\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\tname: \"stringSanitized\",\n\t\t\tparent_key: \"string\",\n\t\t\tafter_key: \"string\",\n\t\t\tkey: \"string\",\n\t\t\tenabled: \"boolean\",\n\t\t\tsequence: \"number\",\n\t\t\ttags: \"array\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\t_tenancy: \"object\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.DeckModel} deck\n\t\t * @property {models.TemplateModel} template\n\t\t */\n\t\tchildren: {\n\t\t\tdeck: \"DeckModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tteam: \"TeamModel\",\n\t\t},\n\t},\n);\n\nregister(\"AutoAdjunctModel\", AutoAdjunctModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,eAAS,CAACC,MAAM,CAC/C,sCAAuC;EACtCC,SAAS,EAAE,cAAc;EAEzB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAE;IACNC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,IAAI,EAAE,iBAAiB;IACvBC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAE,QAAQ;IACnBC,GAAG,EAAE,QAAQ;IACbC,OAAO,EAAE,SAAS;IAClBC,QAAQ,EAAE,QAAQ;IAClBC,IAAI,EAAE,OAAO;IACbC,aAAa,EAAE,OAAO;IACtBC,QAAQ,EAAE;EACX,CAAC;EAED;AACF;AACA;AACA;EACEC,QAAQ,EAAE;IACTC,IAAI,EAAE,WAAW;IACjBC,QAAQ,EAAE,eAAe;IACzBC,IAAI,EAAE;EACP;AACD,CACD,CAAC;AAED,IAAAC,uBAAQ,EAAC,kBAAkB,EAAExB,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"auto-adjunct.js","names":["require","_base","_stateRegister","AutoAdjunctModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_1024","image_original","namespaced_key","name","parent_key","after_key","key","enabled","sequence","tags","cmsvalkey_set","_tenancy","children","deck","template","team","register"],"sources":["../../src/models/auto-adjunct.js"],"sourcesContent":["import \"./template.js\";\nimport \"./team.js\";\nimport \"./deck.js\";\n\nimport { BaseModel } from \"./base.js\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.AutoAdjunctModel\n * @extends models.BaseModel\n */\nexport const AutoAdjunctModel = BaseModel.extend(\n\t/** @lends models.AutoAdjunctModel# */ {\n\t\tmodelName: \"autoadjuncts\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_1024\n\t\t * @property {string} image_original\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} name\n\t\t * @property {string} parent_key\n\t\t * @property {string} after_key\n\t\t * @property {boolean} enabled\n\t\t * @property {number} sequence\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_1024: \"string\",\n\t\t\timage_original: \"string\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\tname: \"stringSanitized\",\n\t\t\tparent_key: \"string\",\n\t\t\tafter_key: \"string\",\n\t\t\tkey: \"string\",\n\t\t\tenabled: \"boolean\",\n\t\t\tsequence: \"number\",\n\t\t\ttags: \"array\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\t_tenancy: \"object\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.DeckModel} deck\n\t\t * @property {models.TemplateModel} template\n\t\t */\n\t\tchildren: {\n\t\t\tdeck: \"DeckModel\",\n\t\t\ttemplate: \"TemplateModel\",\n\t\t\tteam: \"TeamModel\",\n\t\t},\n\t},\n);\n\nregister(\"AutoAdjunctModel\", AutoAdjunctModel);\n"],"mappings":";;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,eAAS,CAACC,MAAM,CAC/C,sCAAuC;EACtCC,SAAS,EAAE,cAAc;EAEzB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAE;IACNC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,cAAc,EAAE,QAAQ;IACxBC,IAAI,EAAE,iBAAiB;IACvBC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAE,QAAQ;IACnBC,GAAG,EAAE,QAAQ;IACbC,OAAO,EAAE,SAAS;IAClBC,QAAQ,EAAE,QAAQ;IAClBC,IAAI,EAAE,OAAO;IACbC,aAAa,EAAE,OAAO;IACtBC,QAAQ,EAAE;EACX,CAAC;EAED;AACF;AACA;AACA;EACEC,QAAQ,EAAE;IACTC,IAAI,EAAE,WAAW;IACjBC,QAAQ,EAAE,eAAe;IACzBC,IAAI,EAAE;EACP;AACD,CACD,CAAC;AAED,IAAAC,uBAAQ,EAAC,kBAAkB,EAAEzB,gBAAgB,CAAC","ignoreList":[]}
@@ -33,6 +33,7 @@ var DeckVersionModel = exports.DeckVersionModel = _base.BaseModel.extend(/** @le
33
33
  * @property {string} image_128_archive
34
34
  * @property {string} image_256_archive
35
35
  * @property {string} image_512_archive
36
+ * @property {string} namespaced_key
36
37
  * @property {string} creation_status
37
38
  * @property {string} update_description
38
39
  * @property {version} version
@@ -53,6 +54,7 @@ var DeckVersionModel = exports.DeckVersionModel = _base.BaseModel.extend(/** @le
53
54
  image_128_archive: "string",
54
55
  image_256_archive: "string",
55
56
  image_512_archive: "string",
57
+ namespaced_key: "string",
56
58
  creation_status: "string",
57
59
  creation_percent: "number",
58
60
  update_description: "string",
@@ -1 +1 @@
1
- {"version":3,"file":"deck-version.js","names":["require","_auth","_base","_deckVersionScreenshots","_bluebird","_interopRequireDefault","_collections","_lodash","_stateRegister","_superagent","DeckVersionModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_128_archive","image_256_archive","image_512_archive","creation_status","creation_percent","update_description","version","approved","approval","pack_root_url","upgrade_description","friendly_release_notes","has_editable_share_support","has_signing_support","point_in_time_share_policy","tags","cmsvalkey_set","children","deck","index_asset","pack","manifest_json","collections","section_set","note_set","derived","screenshots","deps","fn","DeckVersionScreenshotCollection","deckversion","template_set","templates","TemplateCollection","data","id","scope","getHooksPath","_this","_ref","arguments","length","undefined","_ref$rootAssetPath","rootAssetPath","isNew","Error","Promise","resolve","concat","hooks","then","Object","keys","getSafeAttrs","fetch","rootAssetUrl","getRootAssetUrl","getHooks","_ref2","_ref2$rootAssetPath","hooksPath","SystemJS","import","default","getFixtures","fixtures","fixturePaths","imports","_","map","fixture","key","path","superagent","get","response","text","JSON","parse","body","catch","SuperagentPromiseError","e","all","_this2","prototype","apply","tap","indexAsset","_retrieveURL","split","slice","join","replace","fetchLayout","presetId","teamIds","queryParams","preset_id","team_id","reject","url","set","Auth","headers","query","res","ok","toServer","register"],"sources":["../../src/models/deck-version.js"],"sourcesContent":["import \"../collections/sections.js\";\nimport \"../collections/deck-notes.js\";\nimport \"./pack.js\";\nimport \"./deck.js\";\nimport \"./asset.js\";\nimport \"./manifest-json.js\";\n\nimport { Auth } from \"../auth.js\";\nimport { BaseModel } from \"./base.js\";\nimport { DeckVersionScreenshotCollection } from \"../collections/deck-version-screenshots.js\";\nimport Promise from \"bluebird\";\nimport { TemplateCollection } from \"../collections.js\";\nimport _ from \"lodash\";\nimport { register } from \"../state-register.js\";\nimport superagent from \"superagent\";\n\n/**\n * @constructor\n * @alias models.DeckVersionModel\n * @extends models.BaseModel\n */\nexport const DeckVersionModel = BaseModel.extend(\n\t/** @lends models.DeckVersionModel# */ {\n\t\tmodelName: \"deckversions\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_128_archive\n\t\t * @property {string} image_256_archive\n\t\t * @property {string} image_512_archive\n\t\t * @property {string} creation_status\n\t\t * @property {string} update_description\n\t\t * @property {version} version\n\t\t * @property {boolean} approved\n\t\t * @property {string} approval\n\t\t * @property {string} pack_root_url\n\t\t * @property {string} upgrade_description\n\t\t * @property {string} friendly_release_notes\n\t\t * @property {boolean} has_editable_share_support\n\t\t * @property {string} point_in_time_share_policy\n\t\t * @property {string[]} tags\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_128_archive: \"string\",\n\t\t\timage_256_archive: \"string\",\n\t\t\timage_512_archive: \"string\",\n\t\t\tcreation_status: \"string\",\n\t\t\tcreation_percent: \"number\",\n\t\t\tupdate_description: \"string\",\n\t\t\tversion: \"number\",\n\t\t\tapproved: \"boolean\",\n\t\t\tapproval: \"string\",\n\t\t\tpack_root_url: \"string\",\n\t\t\tupgrade_description: \"string\",\n\t\t\tfriendly_release_notes: \"string\",\n\t\t\thas_editable_share_support: \"boolean\",\n\t\t\thas_signing_support: \"boolean\",\n\t\t\tpoint_in_time_share_policy: \"string\",\n\t\t\ttags: \"array\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.DeckModel} deck\n\t\t * @property {models.AssetModel} index_asset\n\t\t * @property {models.PackModel} pack\n\t\t * @property {models.ManifestJSONModel} manifest_json\n\t\t */\n\t\tchildren: {\n\t\t\tdeck: \"DeckModel\",\n\t\t\tindex_asset: \"AssetModel\",\n\t\t\tpack: \"PackModel\",\n\t\t\tmanifest_json: \"ManifestJSONModel\",\n\t\t},\n\n\t\t/**\n\t\t * @property {collections.SectionCollection} section_set\n\t\t * @property {models.DeckNoteCollection} note_set\n\t\t */\n\t\tcollections: {\n\t\t\tsection_set: \"SectionCollection\",\n\t\t\tnote_set: \"DeckNoteCollection\",\n\t\t},\n\n\t\t/**\n\t\t * @property {collections.DeckVersionScreenshotCollection} screenshots\n\t\t */\n\t\tderived: {\n\t\t\tscreenshots: {\n\t\t\t\tdeps: [\"id\"],\n\t\t\t\tfn: function () {\n\t\t\t\t\tconst screenshots = new DeckVersionScreenshotCollection(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeckversion: this,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn screenshots;\n\t\t\t\t},\n\t\t\t},\n\n\t\t\ttemplate_set: {\n\t\t\t\tdeps: [\"id\"],\n\t\t\t\tfn: function () {\n\t\t\t\t\tconst templates = new TemplateCollection(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tdeckversion: this.id,\n\t\t\t\t\t\t\t\tscope: \"global\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn templates;\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\tgetHooksPath({ rootAssetPath = null } = {}) {\n\t\t\tif (this.isNew()) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Can only get hooks from a fetched deckversion or at least have an ID\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (rootAssetPath) {\n\t\t\t\treturn Promise.resolve(`${rootAssetPath}${this.manifest_json.hooks}`);\n\t\t\t}\n\n\t\t\treturn Promise.resolve()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tObject.keys(this.getSafeAttrs()).length === 1 ||\n\t\t\t\t\t\t!this.index_asset\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn this.fetch();\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (this.manifest_json.isNew()) {\n\t\t\t\t\t\treturn this.manifest_json.fetch();\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tconst rootAssetUrl = this.getRootAssetUrl();\n\t\t\t\t\tif (!this.manifest_json.hooks) {\n\t\t\t\t\t\tthrow new Error(\"Manifest does not contain a hooks entry\");\n\t\t\t\t\t}\n\t\t\t\t\treturn `${rootAssetUrl}${this.manifest_json.hooks}`;\n\t\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * @todo This should eventually return a hooks interface\n\t\t * @returns {object}\n\t\t */\n\t\tgetHooks({ rootAssetPath = null } = {}) {\n\t\t\treturn this.getHooksPath({ rootAssetPath })\n\t\t\t\t.then((hooksPath) => {\n\t\t\t\t\treturn SystemJS.import(hooksPath);\n\t\t\t\t})\n\t\t\t\t.then((hooks) => {\n\t\t\t\t\tif (hooks.default) {\n\t\t\t\t\t\treturn hooks.default;\n\t\t\t\t\t}\n\t\t\t\t\treturn hooks;\n\t\t\t\t});\n\t\t},\n\n\t\tgetFixtures(fixtures = {}, rootAssetUrl = this.getRootAssetUrl()) {\n\t\t\tconst fixturePaths = this.manifest_json.fixtures || {};\n\n\t\t\tconst imports = _.map(fixturePaths, (fixture, key) => {\n\t\t\t\tconst path = `${rootAssetUrl}${fixture}`;\n\n\t\t\t\treturn superagent\n\t\t\t\t\t.get(path)\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tif (response.text) {\n\t\t\t\t\t\t\tfixtures[key] = JSON.parse(response.text);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfixtures[key] = response.body || {};\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.catch(superagent.SuperagentPromiseError, (e) => {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn Promise.all(imports);\n\t\t},\n\n\t\tfetch() {\n\t\t\tconst fetch = BaseModel.prototype.fetch.apply(this, arguments);\n\n\t\t\treturn Promise.resolve(fetch).tap(() => {\n\t\t\t\t// `template_set` used to come on the deckversion response, but we have since\n\t\t\t\t// decided to request it separately (this helps with caching). To keep the app\n\t\t\t\t// working with minimal changes, we're making the extra request here.\n\t\t\t\treturn this.template_set.fetch();\n\t\t\t});\n\t\t},\n\n\t\tgetRootAssetUrl() {\n\t\t\tconst indexAsset = this._retrieveURL(this.index_asset);\n\t\t\treturn (\n\t\t\t\t`${indexAsset.split(\"/\").slice(0, -1).join(\"/\")}/`\n\t\t\t\t\t// HACK: We've got instances (see: myob) that are returning ports in their urls.\n\t\t\t\t\t// SystemJS gets confused and starts caching multiple versions (one with and without\n\t\t\t\t\t// this port), causing havoc. If we see it, strip it.\n\t\t\t\t\t.replace(\":443\", \"\")\n\t\t\t);\n\t\t},\n\n\t\tfetchLayout: function (presetId, teamIds) {\n\t\t\tlet queryParams = { version: this.version };\n\t\t\tif (presetId) {\n\t\t\t\tqueryParams.preset_id = presetId;\n\t\t\t}\n\t\t\tif (teamIds) {\n\t\t\t\tqueryParams.team_id = teamIds;\n\t\t\t}\n\n\t\t\tif (!this.id) {\n\t\t\t\treturn Promise.reject(new Error(\"DeckVersion has no ID.\"));\n\t\t\t}\n\n\t\t\tconst path = `${this.deck.url()}layout/`;\n\n\t\t\treturn superagent\n\t\t\t\t.get(path)\n\t\t\t\t.set(Auth.headers)\n\t\t\t\t.query(queryParams)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tif (!res.ok) {\n\t\t\t\t\t\treturn Promise.reject(res);\n\t\t\t\t\t}\n\t\t\t\t\treturn res.body;\n\t\t\t\t});\n\t\t},\n\n\t\ttoServer() {\n\t\t\treturn {\n\t\t\t\tapproval: this.approval,\n\t\t\t\tupgrade_description: this.upgrade_description,\n\t\t\t};\n\t\t},\n\t},\n);\n\nregister(\"DeckVersionModel\", DeckVersionModel);\n"],"mappings":";;;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMU,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,eAAS,CAACC,MAAM,CAC/C,sCAAuC;EACtCC,SAAS,EAAE,cAAc;EAEzB;AACF;AACA;AACA;AACA;AACA;AACA;AAC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]}
1
+ {"version":3,"file":"deck-version.js","names":["require","_auth","_base","_deckVersionScreenshots","_bluebird","_interopRequireDefault","_collections","_lodash","_stateRegister","_superagent","DeckVersionModel","exports","BaseModel","extend","modelName","props","image_128","image_256","image_512","image_128_archive","image_256_archive","image_512_archive","namespaced_key","creation_status","creation_percent","update_description","version","approved","approval","pack_root_url","upgrade_description","friendly_release_notes","has_editable_share_support","has_signing_support","point_in_time_share_policy","tags","cmsvalkey_set","children","deck","index_asset","pack","manifest_json","collections","section_set","note_set","derived","screenshots","deps","fn","DeckVersionScreenshotCollection","deckversion","template_set","templates","TemplateCollection","data","id","scope","getHooksPath","_this","_ref","arguments","length","undefined","_ref$rootAssetPath","rootAssetPath","isNew","Error","Promise","resolve","concat","hooks","then","Object","keys","getSafeAttrs","fetch","rootAssetUrl","getRootAssetUrl","getHooks","_ref2","_ref2$rootAssetPath","hooksPath","SystemJS","import","default","getFixtures","fixtures","fixturePaths","imports","_","map","fixture","key","path","superagent","get","response","text","JSON","parse","body","catch","SuperagentPromiseError","e","all","_this2","prototype","apply","tap","indexAsset","_retrieveURL","split","slice","join","replace","fetchLayout","presetId","teamIds","queryParams","preset_id","team_id","reject","url","set","Auth","headers","query","res","ok","toServer","register"],"sources":["../../src/models/deck-version.js"],"sourcesContent":["import \"../collections/sections.js\";\nimport \"../collections/deck-notes.js\";\nimport \"./pack.js\";\nimport \"./deck.js\";\nimport \"./asset.js\";\nimport \"./manifest-json.js\";\n\nimport { Auth } from \"../auth.js\";\nimport { BaseModel } from \"./base.js\";\nimport { DeckVersionScreenshotCollection } from \"../collections/deck-version-screenshots.js\";\nimport Promise from \"bluebird\";\nimport { TemplateCollection } from \"../collections.js\";\nimport _ from \"lodash\";\nimport { register } from \"../state-register.js\";\nimport superagent from \"superagent\";\n\n/**\n * @constructor\n * @alias models.DeckVersionModel\n * @extends models.BaseModel\n */\nexport const DeckVersionModel = BaseModel.extend(\n\t/** @lends models.DeckVersionModel# */ {\n\t\tmodelName: \"deckversions\",\n\n\t\t/**\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string} image_128_archive\n\t\t * @property {string} image_256_archive\n\t\t * @property {string} image_512_archive\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} creation_status\n\t\t * @property {string} update_description\n\t\t * @property {version} version\n\t\t * @property {boolean} approved\n\t\t * @property {string} approval\n\t\t * @property {string} pack_root_url\n\t\t * @property {string} upgrade_description\n\t\t * @property {string} friendly_release_notes\n\t\t * @property {boolean} has_editable_share_support\n\t\t * @property {string} point_in_time_share_policy\n\t\t * @property {string[]} tags\n\t\t * @property {string[]} cmsvalkey_set\n\t\t */\n\t\tprops: {\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\timage_128_archive: \"string\",\n\t\t\timage_256_archive: \"string\",\n\t\t\timage_512_archive: \"string\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\tcreation_status: \"string\",\n\t\t\tcreation_percent: \"number\",\n\t\t\tupdate_description: \"string\",\n\t\t\tversion: \"number\",\n\t\t\tapproved: \"boolean\",\n\t\t\tapproval: \"string\",\n\t\t\tpack_root_url: \"string\",\n\t\t\tupgrade_description: \"string\",\n\t\t\tfriendly_release_notes: \"string\",\n\t\t\thas_editable_share_support: \"boolean\",\n\t\t\thas_signing_support: \"boolean\",\n\t\t\tpoint_in_time_share_policy: \"string\",\n\t\t\ttags: \"array\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t},\n\n\t\t/**\n\t\t * @property {models.DeckModel} deck\n\t\t * @property {models.AssetModel} index_asset\n\t\t * @property {models.PackModel} pack\n\t\t * @property {models.ManifestJSONModel} manifest_json\n\t\t */\n\t\tchildren: {\n\t\t\tdeck: \"DeckModel\",\n\t\t\tindex_asset: \"AssetModel\",\n\t\t\tpack: \"PackModel\",\n\t\t\tmanifest_json: \"ManifestJSONModel\",\n\t\t},\n\n\t\t/**\n\t\t * @property {collections.SectionCollection} section_set\n\t\t * @property {models.DeckNoteCollection} note_set\n\t\t */\n\t\tcollections: {\n\t\t\tsection_set: \"SectionCollection\",\n\t\t\tnote_set: \"DeckNoteCollection\",\n\t\t},\n\n\t\t/**\n\t\t * @property {collections.DeckVersionScreenshotCollection} screenshots\n\t\t */\n\t\tderived: {\n\t\t\tscreenshots: {\n\t\t\t\tdeps: [\"id\"],\n\t\t\t\tfn: function () {\n\t\t\t\t\tconst screenshots = new DeckVersionScreenshotCollection(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeckversion: this,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn screenshots;\n\t\t\t\t},\n\t\t\t},\n\n\t\t\ttemplate_set: {\n\t\t\t\tdeps: [\"id\"],\n\t\t\t\tfn: function () {\n\t\t\t\t\tconst templates = new TemplateCollection(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tdeckversion: this.id,\n\t\t\t\t\t\t\t\tscope: \"global\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\treturn templates;\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\tgetHooksPath({ rootAssetPath = null } = {}) {\n\t\t\tif (this.isNew()) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Can only get hooks from a fetched deckversion or at least have an ID\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (rootAssetPath) {\n\t\t\t\treturn Promise.resolve(`${rootAssetPath}${this.manifest_json.hooks}`);\n\t\t\t}\n\n\t\t\treturn Promise.resolve()\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tObject.keys(this.getSafeAttrs()).length === 1 ||\n\t\t\t\t\t\t!this.index_asset\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn this.fetch();\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (this.manifest_json.isNew()) {\n\t\t\t\t\t\treturn this.manifest_json.fetch();\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tconst rootAssetUrl = this.getRootAssetUrl();\n\t\t\t\t\tif (!this.manifest_json.hooks) {\n\t\t\t\t\t\tthrow new Error(\"Manifest does not contain a hooks entry\");\n\t\t\t\t\t}\n\t\t\t\t\treturn `${rootAssetUrl}${this.manifest_json.hooks}`;\n\t\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * @todo This should eventually return a hooks interface\n\t\t * @returns {object}\n\t\t */\n\t\tgetHooks({ rootAssetPath = null } = {}) {\n\t\t\treturn this.getHooksPath({ rootAssetPath })\n\t\t\t\t.then((hooksPath) => {\n\t\t\t\t\treturn SystemJS.import(hooksPath);\n\t\t\t\t})\n\t\t\t\t.then((hooks) => {\n\t\t\t\t\tif (hooks.default) {\n\t\t\t\t\t\treturn hooks.default;\n\t\t\t\t\t}\n\t\t\t\t\treturn hooks;\n\t\t\t\t});\n\t\t},\n\n\t\tgetFixtures(fixtures = {}, rootAssetUrl = this.getRootAssetUrl()) {\n\t\t\tconst fixturePaths = this.manifest_json.fixtures || {};\n\n\t\t\tconst imports = _.map(fixturePaths, (fixture, key) => {\n\t\t\t\tconst path = `${rootAssetUrl}${fixture}`;\n\n\t\t\t\treturn superagent\n\t\t\t\t\t.get(path)\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tif (response.text) {\n\t\t\t\t\t\t\tfixtures[key] = JSON.parse(response.text);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfixtures[key] = response.body || {};\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.catch(superagent.SuperagentPromiseError, (e) => {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn Promise.all(imports);\n\t\t},\n\n\t\tfetch() {\n\t\t\tconst fetch = BaseModel.prototype.fetch.apply(this, arguments);\n\n\t\t\treturn Promise.resolve(fetch).tap(() => {\n\t\t\t\t// `template_set` used to come on the deckversion response, but we have since\n\t\t\t\t// decided to request it separately (this helps with caching). To keep the app\n\t\t\t\t// working with minimal changes, we're making the extra request here.\n\t\t\t\treturn this.template_set.fetch();\n\t\t\t});\n\t\t},\n\n\t\tgetRootAssetUrl() {\n\t\t\tconst indexAsset = this._retrieveURL(this.index_asset);\n\t\t\treturn (\n\t\t\t\t`${indexAsset.split(\"/\").slice(0, -1).join(\"/\")}/`\n\t\t\t\t\t// HACK: We've got instances (see: myob) that are returning ports in their urls.\n\t\t\t\t\t// SystemJS gets confused and starts caching multiple versions (one with and without\n\t\t\t\t\t// this port), causing havoc. If we see it, strip it.\n\t\t\t\t\t.replace(\":443\", \"\")\n\t\t\t);\n\t\t},\n\n\t\tfetchLayout: function (presetId, teamIds) {\n\t\t\tlet queryParams = { version: this.version };\n\t\t\tif (presetId) {\n\t\t\t\tqueryParams.preset_id = presetId;\n\t\t\t}\n\t\t\tif (teamIds) {\n\t\t\t\tqueryParams.team_id = teamIds;\n\t\t\t}\n\n\t\t\tif (!this.id) {\n\t\t\t\treturn Promise.reject(new Error(\"DeckVersion has no ID.\"));\n\t\t\t}\n\n\t\t\tconst path = `${this.deck.url()}layout/`;\n\n\t\t\treturn superagent\n\t\t\t\t.get(path)\n\t\t\t\t.set(Auth.headers)\n\t\t\t\t.query(queryParams)\n\t\t\t\t.then((res) => {\n\t\t\t\t\tif (!res.ok) {\n\t\t\t\t\t\treturn Promise.reject(res);\n\t\t\t\t\t}\n\t\t\t\t\treturn res.body;\n\t\t\t\t});\n\t\t},\n\n\t\ttoServer() {\n\t\t\treturn {\n\t\t\t\tapproval: this.approval,\n\t\t\t\tupgrade_description: this.upgrade_description,\n\t\t\t};\n\t\t},\n\t},\n);\n\nregister(\"DeckVersionModel\", DeckVersionModel);\n"],"mappings":";;;;;;;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F,GAAG,CAAC,CAAC,YAAS;IAExC,OAAO5B,mBAAU,CACfC,GAAG,CAACF,IAAI,CAAC,CACT8B,GAAG,CAACC,UAAI,CAACC,OAAO,CAAC,CACjBC,KAAK,CAACR,WAAW,CAAC,CAClB/C,IAAI,CAAC,UAACwD,GAAG,EAAK;MACd,IAAI,CAACA,GAAG,CAACC,EAAE,EAAE;QACZ,OAAO7D,iBAAO,CAACsD,MAAM,CAACM,GAAG,CAAC;MAC3B;MACA,OAAOA,GAAG,CAAC3B,IAAI;IAChB,CAAC,CAAC;EACJ,CAAC;EAED6B,QAAQ,WAARA,QAAQA,CAAA,EAAG;IACV,OAAO;MACNrG,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBE,mBAAmB,EAAE,IAAI,CAACA;IAC3B,CAAC;EACF;AACD,CACD,CAAC;AAED,IAAAoG,uBAAQ,EAAC,kBAAkB,EAAExH,gBAAgB,CAAC","ignoreList":[]}
@@ -23,6 +23,7 @@ var TemplateModel = exports.TemplateModel = _base.BaseModel.extend(/** @lends mo
23
23
  /**
24
24
  * @property {date} created_date
25
25
  * @property {date} modified_date
26
+ * @property {string} namespaced_key
26
27
  * @property {string} title
27
28
  * @property {string} key
28
29
  * @property {scope} scope
@@ -38,6 +39,7 @@ var TemplateModel = exports.TemplateModel = _base.BaseModel.extend(/** @lends mo
38
39
  props: {
39
40
  created_date: "date",
40
41
  modified_date: "date",
42
+ namespaced_key: "string",
41
43
  title: "string",
42
44
  key: "string",
43
45
  scope: {
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","names":["require","_auth","_base","_superagentBluebirdPromise","_interopRequireDefault","_stateRegister","TemplateModel","exports","BaseModel","extend","modelName","props","created_date","modified_date","title","key","scope","type","default","values","sequence","context","image_original","image_128","image_256","image_512","cmsvalkey_set","available_in_presos","children","index_asset","deckversion","original_template","saveWithImage","_this","_asyncToGenerator2","_regenerator","mark","_callee","formData","image","_i","_arr","field","_i2","_arr2","_field","cmsvalkeys","wrap","_callee$","_context","prev","next","FormData","SuperAgentRequest","get","responseType","sent","append","body","length","url","post","send","set","Auth","headers","then","response","Object","keys","forEach","save","patch","abrupt","stop","register"],"sources":["../../src/models/template.js"],"sourcesContent":["import \"./deck-version.js\";\nimport \"./asset.js\";\n\nimport { Auth } from \"../auth.js\";\nimport { BaseModel } from \"./base.js\";\nimport SuperAgentRequest from \"superagent-bluebird-promise\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.TemplateModel\n * @extends models.BaseModel\n */\nexport const TemplateModel = BaseModel.extend(\n\t/** @lends models.TemplateModel# */ {\n\t\tmodelName: \"templates\",\n\n\t\t/**\n\t\t * @property {date} created_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} title\n\t\t * @property {string} key\n\t\t * @property {scope} scope\n\t\t * @property {number} sequence\n\t\t * @property {object} context\n\t\t * @property {string} image_original\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string[]} cmsvalkey_set\n\t\t * @property {boolean} available_in_presos\n\t\t */\n\t\tprops: {\n\t\t\tcreated_date: \"date\",\n\t\t\tmodified_date: \"date\",\n\t\t\ttitle: \"string\",\n\t\t\tkey: \"string\",\n\t\t\tscope: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdefault: \"global\",\n\t\t\t\tvalues: [\"global\", \"team\", \"user\"],\n\t\t\t},\n\t\t\tsequence: \"number\",\n\t\t\tcontext: {\n\t\t\t\ttype: \"object\",\n\t\t\t\tdefault: () => {},\n\t\t\t},\n\t\t\timage_original: \"string\",\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tavailable_in_presos: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AssetModel} index_asset\n\t\t * @property {models.DeckVersionModel} deckversion\n\t\t * @property {models.Template} original_template\n\t\t */\n\t\tchildren: {\n\t\t\tindex_asset: \"AssetModel\",\n\t\t\tdeckversion: \"DeckVersionModel\",\n\t\t\toriginal_template: \"TemplateModel\",\n\t\t},\n\n\t\tasync saveWithImage() {\n\t\t\tconst formData = new FormData();\n\n\t\t\tif (this.image_original) {\n\t\t\t\tconst image = await SuperAgentRequest.get(\n\t\t\t\t\tthis.image_original,\n\t\t\t\t).responseType(\"blob\");\n\n\t\t\t\tformData.append(\"image_original\", image.body, \"image.png\");\n\t\t\t}\n\n\t\t\tfor (const field of [\"title\", \"key\", \"scope\", \"sequence\"]) {\n\t\t\t\tif (this[field]) {\n\t\t\t\t\tformData.append(field, this[field]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const field of [\"original_template\", \"deckversion\"]) {\n\t\t\t\tif (this[field]) {\n\t\t\t\t\tformData.append(field, this[field].url());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set these here, because after the save these will be set to whatever the return value\n\t\t\t// is in the next request.\n\t\t\tconst cmsvalkeys = this.cmsvalkey_set;\n\t\t\tconst context = this.context;\n\n\t\t\tawait SuperAgentRequest.post(this.url())\n\t\t\t\t.send(formData)\n\t\t\t\t.set(Auth.headers)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tObject.keys(response.body).forEach((key) => {\n\t\t\t\t\t\tthis.set(key, response.body[key]);\n\t\t\t\t\t});\n\t\t\t\t\treturn response;\n\t\t\t\t});\n\n\t\t\t// HACK: Can't send an array (or can't figure out how to do it!) to django,\n\t\t\t// so we send it in a seperate patch.\n\t\t\treturn await this.save(\n\t\t\t\t{\n\t\t\t\t\tcmsvalkey_set: cmsvalkeys,\n\t\t\t\t\tcontext,\n\t\t\t\t},\n\t\t\t\t{ patch: true },\n\t\t\t);\n\t\t},\n\t},\n);\n\nregister(\"TemplateModel\", TemplateModel);\n"],"mappings":";;;;;;;;;AAAAA,OAAA;AACAA,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAA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ACkB,GAAG,CAAC,CAAC,CAAC;cAC1C;YACD;;YAEA;YACA;YACMd,UAAU,GAAGb,KAAI,CAACP,aAAa;YAC/BL,OAAO,GAAGY,KAAI,CAACZ,OAAO;YAAA4B,QAAA,CAAAE,IAAA;YAAA,OAEtBE,kCAAiB,CAACQ,IAAI,CAAC5B,KAAI,CAAC2B,GAAG,CAAC,CAAC,CAAC,CACtCE,IAAI,CAACxB,QAAQ,CAAC,CACdyB,GAAG,CAACC,UAAI,CAACC,OAAO,CAAC,CACjBC,IAAI,CAAC,UAACC,QAAQ,EAAK;cACnBC,MAAM,CAACC,IAAI,CAACF,QAAQ,CAACT,IAAI,CAAC,CAACY,OAAO,CAAC,UAACvD,GAAG,EAAK;gBAC3CkB,KAAI,CAAC8B,GAAG,CAAChD,GAAG,EAAEoD,QAAQ,CAACT,IAAI,CAAC3C,GAAG,CAAC,CAAC;cAClC,CAAC,CAAC;cACF,OAAOoD,QAAQ;YAChB,CAAC,CAAC;UAAA;YAAAlB,QAAA,CAAAE,IAAA;YAAA,OAIUlB,KAAI,CAACsC,IAAI,CACrB;cACC7C,aAAa,EAAEoB,UAAU;cACzBzB,OAAO,EAAPA;YACD,CAAC,EACD;cAAEmD,KAAK,EAAE;YAAK,CACf,CAAC;UAAA;YAAA,OAAAvB,QAAA,CAAAwB,MAAA,WAAAxB,QAAA,CAAAO,IAAA;UAAA;UAAA;YAAA,OAAAP,QAAA,CAAAyB,IAAA;QAAA;MAAA,GAAArC,OAAA;IAAA;EACF;AACD,CACD,CAAC;AAED,IAAAsC,uBAAQ,EAAC,eAAe,EAAErE,aAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"template.js","names":["require","_auth","_base","_superagentBluebirdPromise","_interopRequireDefault","_stateRegister","TemplateModel","exports","BaseModel","extend","modelName","props","created_date","modified_date","namespaced_key","title","key","scope","type","default","values","sequence","context","image_original","image_128","image_256","image_512","cmsvalkey_set","available_in_presos","children","index_asset","deckversion","original_template","saveWithImage","_this","_asyncToGenerator2","_regenerator","mark","_callee","formData","image","_i","_arr","field","_i2","_arr2","_field","cmsvalkeys","wrap","_callee$","_context","prev","next","FormData","SuperAgentRequest","get","responseType","sent","append","body","length","url","post","send","set","Auth","headers","then","response","Object","keys","forEach","save","patch","abrupt","stop","register"],"sources":["../../src/models/template.js"],"sourcesContent":["import \"./deck-version.js\";\nimport \"./asset.js\";\n\nimport { Auth } from \"../auth.js\";\nimport { BaseModel } from \"./base.js\";\nimport SuperAgentRequest from \"superagent-bluebird-promise\";\nimport { register } from \"../state-register.js\";\n\n/**\n * @constructor\n * @alias models.TemplateModel\n * @extends models.BaseModel\n */\nexport const TemplateModel = BaseModel.extend(\n\t/** @lends models.TemplateModel# */ {\n\t\tmodelName: \"templates\",\n\n\t\t/**\n\t\t * @property {date} created_date\n\t\t * @property {date} modified_date\n\t\t * @property {string} namespaced_key\n\t\t * @property {string} title\n\t\t * @property {string} key\n\t\t * @property {scope} scope\n\t\t * @property {number} sequence\n\t\t * @property {object} context\n\t\t * @property {string} image_original\n\t\t * @property {string} image_128\n\t\t * @property {string} image_256\n\t\t * @property {string} image_512\n\t\t * @property {string[]} cmsvalkey_set\n\t\t * @property {boolean} available_in_presos\n\t\t */\n\t\tprops: {\n\t\t\tcreated_date: \"date\",\n\t\t\tmodified_date: \"date\",\n\t\t\tnamespaced_key: \"string\",\n\t\t\ttitle: \"string\",\n\t\t\tkey: \"string\",\n\t\t\tscope: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdefault: \"global\",\n\t\t\t\tvalues: [\"global\", \"team\", \"user\"],\n\t\t\t},\n\t\t\tsequence: \"number\",\n\t\t\tcontext: {\n\t\t\t\ttype: \"object\",\n\t\t\t\tdefault: () => {},\n\t\t\t},\n\t\t\timage_original: \"string\",\n\t\t\timage_128: \"string\",\n\t\t\timage_256: \"string\",\n\t\t\timage_512: \"string\",\n\t\t\tcmsvalkey_set: \"array\",\n\t\t\tavailable_in_presos: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: true,\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * @property {models.AssetModel} index_asset\n\t\t * @property {models.DeckVersionModel} deckversion\n\t\t * @property {models.Template} original_template\n\t\t */\n\t\tchildren: {\n\t\t\tindex_asset: \"AssetModel\",\n\t\t\tdeckversion: \"DeckVersionModel\",\n\t\t\toriginal_template: \"TemplateModel\",\n\t\t},\n\n\t\tasync saveWithImage() {\n\t\t\tconst formData = new FormData();\n\n\t\t\tif (this.image_original) {\n\t\t\t\tconst image = await SuperAgentRequest.get(\n\t\t\t\t\tthis.image_original,\n\t\t\t\t).responseType(\"blob\");\n\n\t\t\t\tformData.append(\"image_original\", image.body, \"image.png\");\n\t\t\t}\n\n\t\t\tfor (const field of [\"title\", \"key\", \"scope\", \"sequence\"]) {\n\t\t\t\tif (this[field]) {\n\t\t\t\t\tformData.append(field, this[field]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const field of [\"original_template\", \"deckversion\"]) {\n\t\t\t\tif (this[field]) {\n\t\t\t\t\tformData.append(field, this[field].url());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set these here, because after the save these will be set to whatever the return value\n\t\t\t// is in the next request.\n\t\t\tconst cmsvalkeys = this.cmsvalkey_set;\n\t\t\tconst context = this.context;\n\n\t\t\tawait SuperAgentRequest.post(this.url())\n\t\t\t\t.send(formData)\n\t\t\t\t.set(Auth.headers)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tObject.keys(response.body).forEach((key) => {\n\t\t\t\t\t\tthis.set(key, response.body[key]);\n\t\t\t\t\t});\n\t\t\t\t\treturn response;\n\t\t\t\t});\n\n\t\t\t// HACK: Can't send an array (or can't figure out how to do it!) to django,\n\t\t\t// so we send it in a seperate patch.\n\t\t\treturn await this.save(\n\t\t\t\t{\n\t\t\t\t\tcmsvalkey_set: cmsvalkeys,\n\t\t\t\t\tcontext,\n\t\t\t\t},\n\t\t\t\t{ patch: true },\n\t\t\t);\n\t\t},\n\t},\n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
44
  * @property {boolean} editable
45
45
  * @property {array} tags
46
46
  * @property {number} version
47
+ * @property {string} namespacedKey
47
48
  * @property {string[]} cmsvalkey_set
48
49
  */
49
50
  props: {
@@ -64,6 +65,7 @@ var PresentationDeck = exports.PresentationDeck = _basePresentationModel.BasePre
64
65
  editable: "boolean",
65
66
  tags: "array",
66
67
  version: "number",
68
+ namespacedKey: "string",
67
69
  cmsvalkey_set: "array"
68
70
  },
69
71
  /**
@@ -109,6 +111,7 @@ var PresentationDeck = exports.PresentationDeck = _basePresentationModel.BasePre
109
111
  * @returns {presentation.PresentationDeck}
110
112
  */
111
113
  PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
114
+ var _deckVersionModel$nam;
112
115
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
113
116
  _lodash.default.defaults(options, {
114
117
  index: 0,
@@ -150,7 +153,11 @@ PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
150
153
  tags: tags,
151
154
  version: deckVersionModel.version,
152
155
  usesImpostorSections: (0, _utils.isImpostorDeck)(deckVersionModel),
153
- cmsvalkey_set: deckVersionModel.cmsvalkey_set || []
156
+ cmsvalkey_set: deckVersionModel.cmsvalkey_set || [],
157
+ // Prefer getting the value from the server, but if, for example, it's an old
158
+ // cached version that doesn't have a namespaced key, we can make a very good
159
+ // guess at a default!
160
+ namespacedKey: (_deckVersionModel$nam = deckVersionModel.namespaced_key) !== null && _deckVersionModel$nam !== void 0 ? _deckVersionModel$nam : ""
154
161
  });
155
162
  if (!deck.key) {
156
163
  _log.default.warn("Deck key not available to presentation", deckVersionModel.deck.toJSON());
@@ -231,7 +238,7 @@ PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
231
238
  realSection.slide_set.forEach(function (slideModel) {
232
239
  var isSection = (0, _utils.isImpostor)(slideModel);
233
240
  if (isSection) {
234
- var section = _presentationSection.PresentationSection.createFromImpostorSection(slideModel, _models.DeckVersionModel, options);
241
+ var section = _presentationSection.PresentationSection.createFromImpostorSection(slideModel, options);
235
242
  deck.sections.add(section);
236
243
  } else {
237
244
  var slide = _presentationSlide.PresentationSlide.createFromSlide(slideModel, options);
@@ -311,13 +318,10 @@ PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
311
318
  if (!auto.template) {
312
319
  throw new Error("Attempted to use an autoadjunct that has no template.");
313
320
  }
314
- var section = _presentationSection.PresentationSection.createFromTemplate(auto.template, deck.sections.length + index, options.getUniqueAdjunctID());
315
-
316
- // We've just borrowed the "from template" method above. We want to add
317
- // back some of the specific keys about the auto.
318
- section.autoAdjunctID = auto.id;
319
- section.key = auto.key;
320
- section.title = auto.name;
321
+ var section = _presentationSection.PresentationSection.createFromAutoAdjunct(auto, {
322
+ index: deck.sections.length + index,
323
+ deckversionID: deck.id
324
+ });
321
325
  return section;
322
326
  });
323
327
  deck.sections.add(autoSections);
@@ -325,7 +329,8 @@ PresentationDeck.createFromDeckVersion = function (deckVersionModel) {
325
329
  (0, _utils.setSequentialSequences)(deck);
326
330
  return deck;
327
331
  };
328
- PresentationDeck.createFromManifestJSON = function (manifestJSON) {
332
+ PresentationDeck.createFromManifestJSON = function (manifestJSON, project) {
333
+ var _project$welcome$edit, _project$welcome;
329
334
  var deck = new PresentationDeck({
330
335
  id: parseInt(_lodash.default.uniqueId(), 10),
331
336
  index: 0,
@@ -339,7 +344,7 @@ PresentationDeck.createFromManifestJSON = function (manifestJSON) {
339
344
  title: "Local",
340
345
  version: 1,
341
346
  tags: manifestJSON.tags[""] || [],
342
- cmsvalkey_set: []
347
+ cmsvalkey_set: (_project$welcome$edit = project === null || project === void 0 ? void 0 : (_project$welcome = project.welcome) === null || _project$welcome === void 0 ? void 0 : _project$welcome.editables) !== null && _project$welcome$edit !== void 0 ? _project$welcome$edit : []
343
348
  });
344
349
  var usesImpostorSections = _lodash.default.some(manifestJSON.tags, function (tags) {
345
350
  return tags.indexOf("section-header") !== -1;
@@ -372,30 +377,45 @@ PresentationDeck.createFromManifestJSON = function (manifestJSON) {
372
377
  item.slides = slides;
373
378
  });
374
379
  deck.sections.add(sections.map(function (section, index) {
375
- return _presentationSection.PresentationSection.createFromManifestImpostor(section, index);
380
+ return _presentationSection.PresentationSection.createFromManifestImpostor(section, project, index);
376
381
  }));
377
- deck.realSection = _presentationSection.PresentationSection.createFromManifestImpostor(items[0]);
382
+ deck.realSection = _presentationSection.PresentationSection.createFromManifestImpostor(items[0], project);
378
383
  } else {
379
384
  var sectionKeys = Object.keys(manifestJSON.titles).filter(function (title) {
380
385
  return title.split("/").length === 1;
381
386
  });
382
387
  deck.sections.add(sectionKeys.map(function (key, index) {
383
- return _presentationSection.PresentationSection.createFromManifestJSON(manifestJSON, key, index);
388
+ return _presentationSection.PresentationSection.createFromManifestJSON(manifestJSON, project, key, index);
384
389
  }));
385
390
  }
386
391
  if (manifestJSON.templates) {
387
392
  var templates = Object.keys(manifestJSON.templates).map(function (key) {
393
+ var _project$templates$fi, _project$templates, _project$templates$fi2, _project$templates$fi3;
394
+ var cmsvals = (_project$templates$fi = project === null || project === void 0 ? void 0 : (_project$templates = project.templates) === null || _project$templates === void 0 ? void 0 : (_project$templates$fi2 = _project$templates.find) === null || _project$templates$fi2 === void 0 ? void 0 : (_project$templates$fi3 = _project$templates$fi2.call(_project$templates, function (t) {
395
+ return t.key === key;
396
+ })) === null || _project$templates$fi3 === void 0 ? void 0 : _project$templates$fi3.editables) !== null && _project$templates$fi !== void 0 ? _project$templates$fi : [];
388
397
  return _objectSpread(_objectSpread({}, manifestJSON.templates[key]), {}, {
389
398
  key: key,
390
399
  sequence: manifestJSON.templates[key].ordering,
391
400
  index_asset: {
392
401
  url: _url.default.resolve(manifestJSON.getTemplateAssetPath(key), "index.html")
393
- }
402
+ },
403
+ cmsvalkey_set: cmsvals
394
404
  });
395
405
  });
396
406
  var minID = _lodash.default.max(_lodash.default.map(deck.sections.toJSON(), "id"));
397
407
  deck.sections.add(templates.map(function (template, index) {
398
- return _presentationSection.PresentationSection.createFromTemplate(template, index, minID);
408
+ var _project$templates2, _project$templates2$f;
409
+ var section = _presentationSection.PresentationSection.createFromTemplate(template, index, minID);
410
+ var projTemplate = project === null || project === void 0 ? void 0 : (_project$templates2 = project.templates) === null || _project$templates2 === void 0 ? void 0 : (_project$templates2$f = _project$templates2.find) === null || _project$templates2$f === void 0 ? void 0 : _project$templates2$f.call(_project$templates2, function (s) {
411
+ return s.key === section.key.replace("template-", "");
412
+ });
413
+ if (projTemplate !== null && projTemplate !== void 0 && projTemplate.editables) {
414
+ section.cmsvalkey_set = projTemplate.editables.map(function (key) {
415
+ return "".concat(key, "-autoadjunct-").concat(section.autoAdjunctID);
416
+ });
417
+ }
418
+ return section;
399
419
  }));
400
420
  }
401
421
  return deck;