learningtribes-studio-frontend 1.4.2-alpha.0 → 1.4.2-alpha.2

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 (33) hide show
  1. package/dist/accessibilityPolicy.min.js +2 -2
  2. package/dist/assets.min.css +1 -1
  3. package/dist/assets.min.js +1 -1
  4. package/dist/assets.min.js.map +1 -1
  5. package/dist/common.min.css +2 -2
  6. package/dist/common.min.js +9 -9
  7. package/dist/common.min.js.map +1 -1
  8. package/dist/courseHealthCheck.min.js +1 -1
  9. package/dist/courseOutlineHealthCheck.min.js +1 -1
  10. package/dist/editImageModal.min.css +1 -1
  11. package/dist/editImageModal.min.js +1 -1
  12. package/dist/editImageModal.min.js.map +1 -1
  13. package/dist/i18n/messages/ar.json +0 -3
  14. package/dist/i18n/messages/es_419.json +0 -3
  15. package/dist/i18n/messages/fr.json +0 -3
  16. package/dist/i18n/messages/zh_CN.json +0 -3
  17. package/dist/i18nMessages.min.js +1 -1
  18. package/dist/i18nMessages.min.js.map +1 -1
  19. package/package.json +1 -1
  20. package/src/components/AssetsDropZone/AssetsDropZone.scss +49 -59
  21. package/src/components/AssetsDropZone/AssetsDropZone.test.jsx +1 -1
  22. package/src/components/AssetsDropZone/index.jsx +15 -19
  23. package/src/components/AssetsList/AssetsList.scss +48 -41
  24. package/src/components/AssetsList/index.jsx +9 -4
  25. package/src/components/EditImageModal/EditImageModal.scss +59 -35
  26. package/src/components/EditImageModal/EditImageModal.test.jsx +27 -176
  27. package/src/components/EditImageModal/displayMessages.jsx +6 -16
  28. package/src/components/EditImageModal/index.jsx +40 -88
  29. package/src/data/i18n/default/transifex_input.json +3 -5
  30. package/src/data/i18n/locales/ar.json +0 -3
  31. package/src/data/i18n/locales/es_419.json +0 -3
  32. package/src/data/i18n/locales/fr.json +0 -3
  33. package/src/data/i18n/locales/zh_CN.json +0 -3
@@ -149,8 +149,6 @@
149
149
  "editImageModalImageDescriptionLegend": "Image Description",
150
150
  "editImageModalDimensionsLegend": "Image Dimensions",
151
151
  "editImageModalImageHeight": "Height",
152
- "editImageModalImageIsDecorativeCheckboxDescription": "This image is a background or other image that does not require alternative text.",
153
- "editImageModalImageIsDecorativeCheckboxLabel": "This image is decorative only",
154
152
  "editImageModalImagePreviewText": "Image Preview",
155
153
  "editImageModalInsertImageButton": "Insert Image",
156
154
  "editImageModalLearnMore": "Learn more.",
@@ -159,7 +157,6 @@
159
157
  "editImageModalInsertTitle": "Add an Image",
160
158
  "editImageModalInsertHeader": "Select a previously uploaded image",
161
159
  "editImageModalEditTitle": "Edit Image Settings",
162
- "editImageModalImageOrFields": "or",
163
160
  "editImageModalNextPageButton": "Next",
164
161
  "editImageModalPreviousPageButton": "Back",
165
162
  "editImageModalInvalidFileType": "Files must be images, such as .jpg, .png, and .tiff files. No files were uploaded.",
@@ -149,8 +149,6 @@
149
149
  "editImageModalImageDescriptionLegend": "Descripción de la imagen",
150
150
  "editImageModalDimensionsLegend": "Dimensiones de la imagen",
151
151
  "editImageModalImageHeight": "Altura",
152
- "editImageModalImageIsDecorativeCheckboxDescription": "Esta imagen es un fondo o otra imagen que no necesita un texto alternativo.",
153
- "editImageModalImageIsDecorativeCheckboxLabel": "Esta es solo una imagen decorativa",
154
152
  "editImageModalImagePreviewText": "Previsualización de Imagen",
155
153
  "editImageModalInsertImageButton": "Insertar imagen",
156
154
  "editImageModalLearnMore": "Saber más.",
@@ -159,7 +157,6 @@
159
157
  "editImageModalInsertTitle": "Añadir una imagen",
160
158
  "editImageModalInsertHeader": "Seleccionar una imagen subida anteriormente",
161
159
  "editImageModalEditTitle": "Editar ajustes de la imagen",
162
- "editImageModalImageOrFields": "o",
163
160
  "editImageModalNextPageButton": "Siguiente",
164
161
  "editImageModalPreviousPageButton": "Volver atrás",
165
162
  "editImageModalInvalidFileType": "Los archivos deben ser imágenes, formatos como .jpg, .png, y .tiff. Ningún archivo fue subido.",
@@ -149,8 +149,6 @@
149
149
  "editImageModalImageDescriptionLegend": "Description de l'Image",
150
150
  "editImageModalDimensionsLegend": "Dimensions de l'image",
151
151
  "editImageModalImageHeight": "Hauteur",
152
- "editImageModalImageIsDecorativeCheckboxDescription": "C'est image de fond ou une autre image ne nécessitant pas de texte alternatif.",
153
- "editImageModalImageIsDecorativeCheckboxLabel": "Cette image est purement décorative",
154
152
  "editImageModalImagePreviewText": "Aperçu de l'image",
155
153
  "editImageModalInsertImageButton": "Insérer l'image",
156
154
  "editImageModalLearnMore": "En savoir plus.",
@@ -159,7 +157,6 @@
159
157
  "editImageModalInsertTitle": "Ajouter une image",
160
158
  "editImageModalInsertHeader": "Sélectionner une image chargée précédemment",
161
159
  "editImageModalEditTitle": "Modifier les paramètres d'images",
162
- "editImageModalImageOrFields": "ou",
163
160
  "editImageModalNextPageButton": "Suivant",
164
161
  "editImageModalPreviousPageButton": "Retour",
165
162
  "editImageModalInvalidFileType": "Les fichiers doivent être des images, du type .jpg, png, et .tiff. Aucun fichier n'a été chargé.",
@@ -148,8 +148,6 @@
148
148
  "editImageModalImageDescriptionLegend": "图片描述",
149
149
  "editImageModalDimensionsLegend": "图片长宽比例",
150
150
  "editImageModalImageHeight": "高度",
151
- "editImageModalImageIsDecorativeCheckboxDescription": "此图像是不需要替代文本的背景或其他图像。",
152
- "editImageModalImageIsDecorativeCheckboxLabel": "此图片仅为装饰",
153
151
  "editImageModalImagePreviewText": "图片预览",
154
152
  "editImageModalInsertImageButton": "插入图片",
155
153
  "editImageModalLearnMore": "了解更多。",
@@ -158,7 +156,6 @@
158
156
  "editImageModalInsertTitle": "添加图片",
159
157
  "editImageModalInsertHeader": "选择一张之前上传的图片",
160
158
  "editImageModalEditTitle": "编辑图片设置",
161
- "editImageModalImageOrFields": "或者",
162
159
  "editImageModalNextPageButton": "下一步",
163
160
  "editImageModalPreviousPageButton": "返回",
164
161
  "editImageModalInvalidFileType": "文件必须是图片,例如 .jpg,.png 和 .tiff 文件。没有文件被上传。",
@@ -1,2 +1,2 @@
1
- !function(r){function n(n){for(var t,f,i=n[0],l=n[1],p=n[2],a=0,c=[];a<i.length;a++)f=i[a],o[f]&&c.push(o[f][0]),o[f]=0;for(t in l)Object.prototype.hasOwnProperty.call(l,t)&&(r[t]=l[t]);for(s&&s(n);c.length;)c.shift()();return u.push.apply(u,p||[]),e()}function e(){for(var r,n=0;n<u.length;n++){for(var e=u[n],t=!0,i=1;i<e.length;i++){var l=e[i];0!==o[l]&&(t=!1)}t&&(u.splice(n--,1),r=f(f.s=e[0]))}return r}var t={},o={2:0},u=[];function f(n){if(t[n])return t[n].exports;var e=t[n]={i:n,l:!1,exports:{}};return r[n].call(e.exports,e,e.exports,f),e.l=!0,e.exports}f.m=r,f.c=t,f.d=function(r,n,e){f.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},f.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},f.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return f.d(n,"a",n),n},f.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},f.p="";var i=window.studiofrontendJsonP=window.studiofrontendJsonP||[],l=i.push.bind(i);i.push=n,i=i.slice();for(var p=0;p<i.length;p++)n(i[p]);var s=l;u.push([437,0]),e()}([]);
1
+ !function(r){function n(n){for(var t,f,i=n[0],l=n[1],p=n[2],a=0,c=[];a<i.length;a++)f=i[a],o[f]&&c.push(o[f][0]),o[f]=0;for(t in l)Object.prototype.hasOwnProperty.call(l,t)&&(r[t]=l[t]);for(s&&s(n);c.length;)c.shift()();return u.push.apply(u,p||[]),e()}function e(){for(var r,n=0;n<u.length;n++){for(var e=u[n],t=!0,i=1;i<e.length;i++){var l=e[i];0!==o[l]&&(t=!1)}t&&(u.splice(n--,1),r=f(f.s=e[0]))}return r}var t={},o={2:0},u=[];function f(n){if(t[n])return t[n].exports;var e=t[n]={i:n,l:!1,exports:{}};return r[n].call(e.exports,e,e.exports,f),e.l=!0,e.exports}f.m=r,f.c=t,f.d=function(r,n,e){f.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},f.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},f.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return f.d(n,"a",n),n},f.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},f.p="";var i=window.studiofrontendJsonP=window.studiofrontendJsonP||[],l=i.push.bind(i);i.push=n,i=i.slice();for(var p=0;p<i.length;p++)n(i[p]);var s=l;u.push([436,0]),e()}([]);
2
2
  //# sourceMappingURL=i18nMessages.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","p","jsonpArray","window","oldJsonpFunction","bind","slice"],"mappings":"aACA,SAAAA,EAAAC,GAOA,IANA,IAKAC,EAAAC,EALAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAGAM,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAIA,IADAe,KAAAhB,GACAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,OAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,KAKApB,GACAqB,EAAA,GAGAZ,KAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,IACAK,EAAAL,EACAgC,GAAA,EACAF,YAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAnB,EAGAY,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACA1B,OAAA6B,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAb,GACApB,OAAA6B,eAAAT,EAAA,cAAiDc,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAd,GACA,IAAAM,EAAAN,KAAAe,WACA,WAA2B,OAAAf,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAS,EAAAC,GAAsD,OAAAtC,OAAAC,UAAAC,eAAAC,KAAAkC,EAAAC,IAGtDtB,EAAAuB,EAAA,GAEA,IAAAC,EAAAC,OAAA,oBAAAA,OAAA,wBACAC,EAAAF,EAAAzC,KAAA4C,KAAAH,GACAA,EAAAzC,KAAAX,EACAoD,IAAAI,QACA,QAAAjD,EAAA,EAAgBA,EAAA6C,EAAA3C,OAAuBF,IAAAP,EAAAoD,EAAA7C,IACvC,IAAAU,EAAAqC,EAIAnC,EAAAR,MAAA,QAEAU","file":"i18nMessages.min.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"studiofrontendJsonP\"] = window[\"studiofrontendJsonP\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([437,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","p","jsonpArray","window","oldJsonpFunction","bind","slice"],"mappings":"aACA,SAAAA,EAAAC,GAOA,IANA,IAKAC,EAAAC,EALAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAGAM,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAIA,IADAe,KAAAhB,GACAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,OAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,KAKApB,GACAqB,EAAA,GAGAZ,KAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,IACAK,EAAAL,EACAgC,GAAA,EACAF,YAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAnB,EAGAY,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACA1B,OAAA6B,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAb,GACApB,OAAA6B,eAAAT,EAAA,cAAiDc,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAd,GACA,IAAAM,EAAAN,KAAAe,WACA,WAA2B,OAAAf,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAS,EAAAC,GAAsD,OAAAtC,OAAAC,UAAAC,eAAAC,KAAAkC,EAAAC,IAGtDtB,EAAAuB,EAAA,GAEA,IAAAC,EAAAC,OAAA,oBAAAA,OAAA,wBACAC,EAAAF,EAAAzC,KAAA4C,KAAAH,GACAA,EAAAzC,KAAAX,EACAoD,IAAAI,QACA,QAAAjD,EAAA,EAAgBA,EAAA6C,EAAA3C,OAAuBF,IAAAP,EAAAoD,EAAA7C,IACvC,IAAAU,EAAAqC,EAIAnC,EAAAR,MAAA,QAEAU","file":"i18nMessages.min.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"studiofrontendJsonP\"] = window[\"studiofrontendJsonP\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([436,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learningtribes-studio-frontend",
3
- "version": "1.4.2-alpha.0",
3
+ "version": "1.4.2-alpha.2",
4
4
  "description": "The frontend for the Open edX platform",
5
5
  "repository": "Learningtribes/studio-frontend",
6
6
  "scripts": {
@@ -1,100 +1,90 @@
1
1
  @import 'edx-bootstrap';
2
2
 
3
+ // Matches the shared upload widget used by the Uploads page and PDF editor.
4
+ $upload-border: #ebebf1;
5
+ $upload-brand: #5959eb;
6
+ $upload-prompt-primary: #3535cd;
7
+ $upload-prompt-secondary: #1f1f59;
8
+ $upload-icon: #4c4c8e;
9
+
3
10
  .center-text {
4
11
  text-align: center !important;
5
12
  }
6
13
 
7
14
  .drop-zone-compact {
8
- border: 1px dashed #d0d0d0;
15
+ border: 1px dashed $upload-border;
9
16
  border-radius: 8px;
10
- padding: 24px 20px;
11
- background-color: #fafafa;
12
- transition: all 0.2s ease;
17
+ padding: 20px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ text-align: center;
13
23
  cursor: pointer;
24
+ background-color: #fff;
25
+ transition: all 0.3s ease;
14
26
 
15
27
  &:hover {
16
- border-color: #4a90d9;
28
+ border-color: $upload-brand;
17
29
  background-color: #fff;
18
30
  }
19
-
20
- [data-identifier="asset-drop-zone-icon"] {
21
- color: #4a90d9;
22
- margin-bottom: 12px;
23
-
24
- span {
25
- font-size: 32px;
26
- }
27
- }
28
-
29
- h2 {
30
- display: none;
31
- }
32
-
33
- .label-or {
34
- display: none;
35
- }
36
-
37
- button.btn {
38
- display: none;
39
- }
40
-
41
- p {
42
- font-size: 12px;
43
- margin-bottom: 0;
44
- }
45
31
  }
46
32
 
47
33
  .drop-zone {
48
34
  @extend .drop-zone-compact;
49
-
50
- @media (min-width: map-get($grid-breakpoints, 'md')) {
51
- padding: 30px 20px;
52
- }
53
35
  }
54
36
 
55
37
  .drop-active {
56
38
  outline: none;
57
- border: 2px dashed #4a90d9;
58
- background-color: rgba(74, 144, 217, 0.05);
39
+ border-color: $upload-brand;
40
+ background-color: #fff;
41
+ }
42
+
43
+ .upload-icon {
44
+ font-size: 32px;
45
+ width: 32px;
46
+ height: 32px;
47
+ line-height: 32px;
48
+ color: $upload-icon;
49
+ margin-bottom: 8px;
59
50
  }
60
51
 
61
52
  .upload-prompt {
62
- text-align: center;
63
- margin-bottom: 6px;
53
+ font-size: 16px;
54
+ font-weight: 600;
55
+ margin-bottom: 4px;
64
56
  }
65
57
 
66
- .upload-link {
58
+ .upload-prompt-primary {
67
59
  background: none;
68
60
  border: none;
69
- color: #4a90d9;
70
- font-size: 14px;
71
- font-weight: 500;
61
+ color: $upload-prompt-primary;
62
+ font-size: 16px;
63
+ font-weight: 600;
72
64
  cursor: pointer;
73
65
  padding: 0;
74
- text-decoration: none;
75
66
 
76
- &:hover {
77
- text-decoration: underline;
78
- color: darken(#4a90d9, 10%);
67
+ &:hover,
68
+ &:focus {
69
+ color: $upload-prompt-primary;
70
+ text-decoration: none;
79
71
  }
80
72
 
81
73
  &:focus {
82
- outline: 2px solid rgba(74, 144, 217, 0.5);
74
+ outline: 2px solid rgba(89, 89, 235, 0.5);
83
75
  outline-offset: 2px;
84
76
  }
85
77
  }
86
78
 
87
- .upload-text {
88
- color: #333;
89
- font-size: 14px;
90
- font-weight: 400;
79
+ .upload-prompt-secondary {
80
+ color: $upload-prompt-secondary;
81
+ font-size: 16px;
82
+ font-weight: 600;
91
83
  }
92
84
 
93
- .size-limit {
94
- text-align: center;
95
- color: #4a90d9;
96
- font-size: 12px;
97
- margin-bottom: 0;
85
+ .upload-info {
86
+ font-size: 14px;
87
+ color: $upload-prompt-secondary;
98
88
  }
99
89
 
100
90
  .supported-files-types {
@@ -114,10 +104,10 @@
114
104
  .drop-zone-compact,
115
105
  .drop-zone {
116
106
  padding: 20px 16px;
117
-
107
+
118
108
  [data-identifier="asset-drop-zone-icon"] {
119
109
  margin-bottom: 8px;
120
-
110
+
121
111
  span {
122
112
  font-size: 28px;
123
113
  }
@@ -27,7 +27,7 @@ describe('<AssetsDropZone />', () => {
27
27
 
28
28
  describe('renders', () => {
29
29
  it('contains file browser button', () => {
30
- expect(wrapper.find('button').text()).toEqual('Browse your computer');
30
+ expect(wrapper.find('button').text()).toEqual('Click to upload');
31
31
  });
32
32
  it('hides the icon & upload file size from screen readers', () => {
33
33
  expect(wrapper.find('[aria-hidden=true]').length).toBe(2);
@@ -3,8 +3,6 @@ import classNames from 'classnames';
3
3
  import Dropzone from 'react-dropzone';
4
4
  import PropTypes from 'prop-types';
5
5
 
6
- import { Button } from '@edx/paragon';
7
- import FontAwesomeStyles from 'font-awesome/css/font-awesome.min.css';
8
6
  import WrappedMessage from '../../utils/i18n/formattedMessageWrapper';
9
7
  import messages from './displayMessages';
10
8
  import styles from './AssetsDropZone.scss';
@@ -57,31 +55,29 @@ export default class AssetsDropZone extends React.Component {
57
55
  activeClassName={styles['drop-active']}
58
56
  className={classNames([
59
57
  this.props.compactStyle ? styles['drop-zone-compact'] : styles['drop-zone'],
60
- styles['center-text'],
61
58
  ])}
62
59
  data-identifier="asset-drop-zone"
63
- disableClick
64
60
  maxSize={this.dropZoneMaxFileSizeBytes}
65
61
  onDrop={this.onDrop}
66
62
  ref={this.setDropZoneRef}
67
63
  >
68
- <div className={styles['center-text']} data-identifier="asset-drop-zone-icon">
69
- <span
70
- aria-hidden
71
- className={'far fa-image '+classNames(
72
- styles['center-text'],
73
- FontAwesomeStyles['fa-3x'])}
74
- />
75
- </div>
64
+ <i
65
+ aria-hidden="true"
66
+ className={classNames('far', 'fa-images', styles['upload-icon'])}
67
+ data-identifier="asset-drop-zone-icon"
68
+ />
76
69
  <div className={styles['upload-prompt']}>
77
70
  <WrappedMessage message={messages.assetsDropZoneBrowseLabel} >
78
71
  { displayText => (
79
72
  <button
80
73
  type="button"
81
74
  aria-describedby="asset-drop-zone-max-file-size-label"
82
- className={styles['upload-link']}
75
+ className={styles['upload-prompt-primary']}
83
76
  data-identifier="asset-drop-zone-browse-button"
84
- onClick={this.handleClick}
77
+ onClick={(event) => {
78
+ event.stopPropagation();
79
+ this.handleClick();
80
+ }}
85
81
  ref={this.setUploadButtonRef}
86
82
  >
87
83
  {displayText}
@@ -90,7 +86,7 @@ export default class AssetsDropZone extends React.Component {
90
86
  </WrappedMessage>
91
87
  <WrappedMessage message={messages.assetsDropZoneHeader}>
92
88
  { displayText => (
93
- <span className={styles['upload-text']} data-identifier="asset-drop-zone-header"> {displayText}</span>
89
+ <span className={styles['upload-prompt-secondary']} data-identifier="asset-drop-zone-header"> {displayText}</span>
94
90
  )}
95
91
  </WrappedMessage>
96
92
  </div>
@@ -101,14 +97,14 @@ export default class AssetsDropZone extends React.Component {
101
97
  }}
102
98
  >
103
99
  { displayText => (
104
- <p
105
- aria-hidden
106
- className={styles['size-limit']}
100
+ <div
101
+ aria-hidden="true"
102
+ className={styles['upload-info']}
107
103
  data-identifier="asset-drop-zone-max-file-size-label"
108
104
  id="asset-drop-zone-max-file-size-label"
109
105
  >
110
106
  {displayText}
111
- </p>
107
+ </div>
112
108
  )}
113
109
  </WrappedMessage>
114
110
  {this.props.supportedFileTypes !== undefined &&
@@ -1,34 +1,41 @@
1
1
  @import 'edx-bootstrap';
2
2
  @import 'utils/scss/focus';
3
3
 
4
- // Horizontal scrollable grid
4
+ // Horizontal strip. Card chrome matches the Uploads thumbnails;
5
+ // selection and scrolling match the PDF editor file strip.
6
+ $brand-primary: #5959eb;
7
+ $neutral-fg: #09092d;
8
+ $neutral-alt: #1f1f59;
9
+ $preview-bg: #fafafa;
10
+ $badge-bg: #ccccff;
11
+ $badge-fg: #1717ab;
12
+
5
13
  .assets-grid {
6
14
  display: flex;
7
- gap: 10px;
15
+ gap: 12px;
8
16
  overflow-x: auto;
9
17
  padding: 8px 0;
10
- margin-bottom: 10px;
18
+ margin-bottom: 8px;
11
19
 
12
20
  &:focus {
13
21
  @include focus();
14
22
  }
15
23
 
16
- // Custom scrollbar
17
24
  &::-webkit-scrollbar {
18
25
  height: 6px;
19
26
  }
20
27
 
21
28
  &::-webkit-scrollbar-track {
22
- background: #f0f0f0;
29
+ background: #ebebf1;
23
30
  border-radius: 3px;
24
31
  }
25
32
 
26
33
  &::-webkit-scrollbar-thumb {
27
- background: #c0c0c0;
34
+ background: #c4c4d8;
28
35
  border-radius: 3px;
29
36
 
30
37
  &:hover {
31
- background: #a0a0a0;
38
+ background: #b0b0cd;
32
39
  }
33
40
  }
34
41
  }
@@ -41,20 +48,18 @@
41
48
 
42
49
  &:hover {
43
50
  .asset-preview {
44
- border-color: #c0c0c0;
51
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
45
52
  }
46
53
  }
47
54
 
48
55
  &.selected {
49
56
  .asset-preview {
50
- border-color: #4a90d9;
51
- border-width: 2px;
57
+ border-color: $brand-primary;
52
58
  }
53
59
 
54
60
  .asset-name {
55
- color: #4a90d9;
56
- background-color: rgba(74, 144, 217, 0.1);
57
- padding: 2px 4px;
61
+ color: #fff;
62
+ background-color: $brand-primary;
58
63
  border-radius: 4px;
59
64
  }
60
65
  }
@@ -63,29 +68,30 @@
63
68
  .asset-preview {
64
69
  width: 100px;
65
70
  height: 100px;
66
- border: 1px solid #e0e0e0;
67
- border-radius: 8px;
68
- background-color: #fff;
71
+ border: 4px solid transparent;
72
+ border-radius: 4px;
73
+ background-color: $preview-bg;
69
74
  display: flex;
70
75
  flex-direction: column;
71
76
  align-items: center;
72
77
  justify-content: center;
73
78
  position: relative;
74
- margin-bottom: 8px;
75
- transition: border-color 0.2s ease;
76
79
  overflow: hidden;
80
+ box-sizing: content-box;
81
+ transition: box-shadow 0.2s ease, border-color 0.2s ease;
77
82
  }
78
83
 
79
84
  .file-type-badge {
80
85
  position: absolute;
81
- top: 6px;
82
- left: 6px;
83
- background-color: #e8f4fd;
84
- color: #1976d2;
85
- font-size: 10px;
86
- font-weight: 700;
87
- padding: 2px 6px;
88
- border-radius: 4px;
86
+ top: 4px;
87
+ left: 4px;
88
+ background-color: $badge-bg;
89
+ color: $badge-fg;
90
+ font-size: 11px;
91
+ font-weight: 600;
92
+ line-height: 16px;
93
+ padding: 4px;
94
+ border-radius: 2px;
89
95
  text-transform: lowercase;
90
96
  z-index: 1;
91
97
  }
@@ -94,11 +100,13 @@
94
100
  width: 100%;
95
101
  height: 100%;
96
102
  object-fit: cover;
103
+ border-radius: 4px;
97
104
  }
98
105
 
99
106
  .asset-icon {
100
- font-size: 36px;
101
- color: #9e9e9e;
107
+ font-size: 35px;
108
+ color: $neutral-alt;
109
+ margin-top: 6px;
102
110
 
103
111
  i {
104
112
  display: block;
@@ -106,30 +114,29 @@
106
114
  }
107
115
 
108
116
  .asset-info {
109
- text-align: center;
117
+ width: 100px;
118
+ margin-top: 8px;
110
119
  }
111
120
 
112
121
  .asset-name {
122
+ display: inline-block;
123
+ max-width: 100%;
124
+ box-sizing: border-box;
125
+ vertical-align: top;
113
126
  font-size: 12px;
114
127
  font-weight: 500;
115
- color: #333;
128
+ color: $neutral-fg;
116
129
  white-space: nowrap;
117
130
  overflow: hidden;
118
131
  text-overflow: ellipsis;
119
- max-width: 100px;
120
- margin-bottom: 2px;
121
-
122
- &.selected {
123
- color: #4a90d9;
124
- background-color: rgba(74, 144, 217, 0.1);
125
- padding: 2px 4px;
126
- border-radius: 4px;
127
- }
132
+ padding: 2px 4px;
133
+ border-radius: 4px;
128
134
  }
129
135
 
130
136
  .asset-size {
131
- font-size: 11px;
132
- color: #666;
137
+ font-size: 12px;
138
+ font-weight: 400;
139
+ color: $neutral-alt;
133
140
  }
134
141
 
135
142
  // Old styles
@@ -94,7 +94,11 @@ export default class AssetsList extends React.Component {
94
94
  const isSelected = this.props.selectedAsset.id === asset.id;
95
95
  const baseUrl = this.props.courseDetails.base_url || '';
96
96
  const fileExt = this.getFileExtension(asset.display_name);
97
- const fileSize = this.formatFileSize(asset.file_size);
97
+ const fileSize = this.formatFileSize(asset.file_size || asset.size);
98
+ const previewPath = asset.thumbnail || asset.url;
99
+ const previewSrc = previewPath
100
+ ? (previewPath.indexOf('http') === 0 ? previewPath : `${baseUrl}${previewPath}`)
101
+ : '';
98
102
 
99
103
  return (
100
104
  <div
@@ -102,16 +106,17 @@ export default class AssetsList extends React.Component {
102
106
  className={classNames(styles['asset-grid-item'], { [styles.selected]: isSelected })}
103
107
  id={`asset-list-option-${index}`}
104
108
  aria-selected={isSelected}
109
+ aria-label={asset.display_name}
105
110
  role="option"
106
111
  key={asset.id || asset.display_name}
107
112
  tabIndex="-1"
108
113
  >
109
114
  <div className={styles['asset-preview']}>
110
115
  <span className={styles['file-type-badge']}>{fileExt}</span>
111
- {asset.thumbnail ? (
116
+ {previewSrc ? (
112
117
  <img
113
118
  className={styles['asset-thumbnail']}
114
- src={`${baseUrl}${asset.thumbnail}`}
119
+ src={previewSrc}
115
120
  alt=""
116
121
  />
117
122
  ) : (
@@ -121,7 +126,7 @@ export default class AssetsList extends React.Component {
121
126
  )}
122
127
  </div>
123
128
  <div className={styles['asset-info']}>
124
- <div className={classNames(styles['asset-name'], { [styles.selected]: isSelected })} title={asset.display_name}>
129
+ <div className={styles['asset-name']} title={asset.display_name}>
125
130
  {asset.display_name}
126
131
  </div>
127
132
  {fileSize && (