learningtribes-studio-frontend 1.4.2-alpha.4 → 1.4.2-alpha.6

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 (39) 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 +7 -7
  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/de_DE.json +3 -1
  14. package/dist/i18n/messages/es_419.json +2 -0
  15. package/dist/i18n/messages/fr.json +2 -0
  16. package/dist/i18n/messages/it_IT.json +3 -1
  17. package/dist/i18n/messages/pt_BR.json +3 -1
  18. package/dist/i18n/messages/zh_CN.json +2 -0
  19. package/dist/i18nMessages.min.js +1 -1
  20. package/dist/i18nMessages.min.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/AssetsDropZone/AssetsDropZone.scss +110 -77
  23. package/src/components/AssetsDropZone/AssetsDropZone.test.jsx +3 -1
  24. package/src/components/AssetsDropZone/displayMessages.jsx +12 -2
  25. package/src/components/AssetsDropZone/index.jsx +176 -88
  26. package/src/components/AssetsList/AssetsList.scss +18 -18
  27. package/src/components/AssetsList/AssetsList.test.jsx +125 -145
  28. package/src/components/AssetsList/index.jsx +20 -2
  29. package/src/components/EditImageModal/EditImageModal.scss +2 -0
  30. package/src/components/EditImageModal/EditImageModal.test.jsx +126 -230
  31. package/src/components/EditImageModal/displayMessages.jsx +11 -6
  32. package/src/components/EditImageModal/index.jsx +76 -211
  33. package/src/data/i18n/default/transifex_input.json +5 -2
  34. package/src/data/i18n/locales/de_DE.json +3 -1
  35. package/src/data/i18n/locales/es_419.json +2 -0
  36. package/src/data/i18n/locales/fr.json +2 -0
  37. package/src/data/i18n/locales/it_IT.json +3 -1
  38. package/src/data/i18n/locales/pt_BR.json +3 -1
  39. package/src/data/i18n/locales/zh_CN.json +2 -0
@@ -19,5 +19,7 @@
19
19
  "assetsDropZoneImageSizeRecommandationLabel": "Größenempfehlung: {imageSize}",
20
20
  "assetsDropZoneSupportedFileTypesLabel": "Unterstützte Dateitypen: {filesTypesList}",
21
21
  "assetsTableUploadSuccess": "Datei erfolgreich hochgeladen.",
22
- "assetsTableUploadInProgress": "Die Datei wird hochgeladen."
22
+ "assetsTableUploadInProgress": "Die Datei wird hochgeladen.",
23
+ "editImageModalImageDescriptionDecorative": "Wenn dieses Bild rein dekorativ ist, benötigt es keinen Alternativtext.",
24
+ "editImageModalFileTooLarge": "Die maximale Größe für einen Upload beträgt {max_size} MB. Es wurden keine Dateien hochgeladen."
23
25
  }
@@ -145,6 +145,7 @@
145
145
  "editImageModalFormValidImageDescription": "Añada una descripción para la imagen o especifique que la imagen es solo decorativa.",
146
146
  "editImageModalFormValidImageDimensions": "Las dimensiones de la imagen deben ser números positivos.",
147
147
  "editImageModalImageDescriptionDescription": "Texto alternativo para usuarios que no pueden ver la imagen, como\"El cielo con nubes\".",
148
+ "editImageModalImageDescriptionDecorative": "Si esta imagen es puramente decorativa, no requiere texto alternativo.",
148
149
  "editImageModalImageDescriptionLabel": "Descripción de la imagen (Alt Text)",
149
150
  "editImageModalImageDescriptionLegend": "Descripción de la imagen",
150
151
  "editImageModalDimensionsLegend": "Dimensiones de la imagen",
@@ -161,6 +162,7 @@
161
162
  "editImageModalPreviousPageButton": "Volver atrás",
162
163
  "editImageModalInvalidFileType": "Los archivos deben ser imágenes, formatos como .jpg, .png, y .tiff. Ningún archivo fue subido.",
163
164
  "editImageModalTooManyFiles": "Solo un archivo puede ser subido a la vez.Ningún archivo fue subido.",
165
+ "editImageModalFileTooLarge": "El tamaño máximo que se puede subir es {max_size} MB. No se ha subido ningún archivo.",
164
166
  "paginationAriaLabel": "Asignación de numero de página al contenido",
165
167
  "paginationButtonDisabled": "el botón está desactivado",
166
168
  "paginationNext": "siguiente",
@@ -145,6 +145,7 @@
145
145
  "editImageModalFormValidImageDescription": "Ajouter une description de l'image ou précisez que l'image est purement décorative.",
146
146
  "editImageModalFormValidImageDimensions": "Les dimensions de l'images doivent être en nombres positifs.",
147
147
  "editImageModalImageDescriptionDescription": "Texte alternatif pour les utilisateurs qui ne peuvent voir l'image, exemple « Ciel avec des nuages ».",
148
+ "editImageModalImageDescriptionDecorative": "Si cette image est purement décorative, elle ne nécessite pas de texte alternatif.",
148
149
  "editImageModalImageDescriptionLabel": "Description de l'image (Alt Text)",
149
150
  "editImageModalImageDescriptionLegend": "Description de l'Image",
150
151
  "editImageModalDimensionsLegend": "Dimensions de l'image",
@@ -161,6 +162,7 @@
161
162
  "editImageModalPreviousPageButton": "Retour",
162
163
  "editImageModalInvalidFileType": "Les fichiers doivent être des images, du type .jpg, png, et .tiff. Aucun fichier n'a été chargé.",
163
164
  "editImageModalTooManyFiles": "Un seul ficher peut être chargé à la fois. Aucun fichier n'a été chargé.",
165
+ "editImageModalFileTooLarge": "La taille maximale d'un fichier pouvant être téléversé est de {max_size} Mo. Aucun fichier n'a été téléversé.",
164
166
  "paginationAriaLabel": "Pagination du contenu.",
165
167
  "paginationButtonDisabled": "le bouton est désactivé",
166
168
  "paginationNext": "suivant",
@@ -19,5 +19,7 @@
19
19
  "assetsDropZoneSupportedFileTypesLabel": "Tipi di file supportati: {filesTypesList}",
20
20
  "assetsDropZoneImageSizeRecommandationLabel": "Raccomandazione delle dimensioni: {imageSize}",
21
21
  "assetsTableUploadSuccess": "File caricato con successo.",
22
- "assetsTableUploadInProgress": "Il file viene caricato."
22
+ "assetsTableUploadInProgress": "Il file viene caricato.",
23
+ "editImageModalImageDescriptionDecorative": "Se questa immagine è puramente decorativa, non richiede un testo alternativo.",
24
+ "editImageModalFileTooLarge": "La dimensione massima per un caricamento è {max_size} MB. Nessun file è stato caricato."
23
25
  }
@@ -19,5 +19,7 @@
19
19
  "assetsDropZoneSupportedFileTypesLabel": "Tipos de arquivo suportados: {filesTypesList}",
20
20
  "assetsDropZoneImageSizeRecommandationLabel": "Recomendação de tamanho: {imageSize}",
21
21
  "assetsTableUploadSuccess": "Arquivo carregado com sucesso.",
22
- "assetsTableUploadInProgress": "O arquivo está sendo carregado."
22
+ "assetsTableUploadInProgress": "O arquivo está sendo carregado.",
23
+ "editImageModalImageDescriptionDecorative": "Se esta imagem for meramente decorativa, não requer texto alternativo.",
24
+ "editImageModalFileTooLarge": "O tamanho máximo para um carregamento é {max_size} MB. Nenhum arquivo foi carregado."
23
25
  }
@@ -144,6 +144,7 @@
144
144
  "editImageModalFormValidImageDescription": "添加图片描述或指定图片仅为装饰。",
145
145
  "editImageModalFormValidImageDimensions": "图片长宽比例必须是正数。",
146
146
  "editImageModalImageDescriptionDescription": "无法查看图片的用户可选择使用文本,如“有云的天空”。",
147
+ "editImageModalImageDescriptionDecorative": "如果此图像仅为装饰性用途,则无需填写替代文本。",
147
148
  "editImageModalImageDescriptionLabel": "图片描述(替代文本)",
148
149
  "editImageModalImageDescriptionLegend": "图片描述",
149
150
  "editImageModalDimensionsLegend": "图片长宽比例",
@@ -160,6 +161,7 @@
160
161
  "editImageModalPreviousPageButton": "返回",
161
162
  "editImageModalInvalidFileType": "文件必须是图片,例如 .jpg,.png 和 .tiff 文件。没有文件被上传。",
162
163
  "editImageModalTooManyFiles": "一次只能上传一个文件。没有文件被上传。",
164
+ "editImageModalFileTooLarge": "一次上传文件不超过{max_size} MB。未上传任何文件。",
163
165
  "paginationAriaLabel": "内容分页",
164
166
  "paginationButtonDisabled": "按钮已禁用",
165
167
  "paginationNext": "下一个",
@@ -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([436,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([434,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([436,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([434,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.4",
3
+ "version": "1.4.2-alpha.6",
4
4
  "description": "The frontend for the Open edX platform",
5
5
  "repository": "Learningtribes/studio-frontend",
6
6
  "scripts": {
@@ -1,106 +1,139 @@
1
1
  @import 'edx-bootstrap';
2
2
 
3
- // Matches the shared upload widget used by the Uploads page and PDF editor.
3
+ // Matches the shared upload widget used by the image modal.
4
4
  $upload-border: #ebebf1;
5
5
  $upload-brand: #5959eb;
6
6
  $upload-prompt-primary: #3535cd;
7
7
  $upload-prompt-secondary: #1f1f59;
8
8
  $upload-icon: #4c4c8e;
9
9
 
10
- .center-text {
11
- text-align: center !important;
12
- }
10
+ .assets-drop-zone {
11
+ .center-text {
12
+ text-align: center !important;
13
+ }
13
14
 
14
- .drop-zone-compact {
15
- border: 1px dashed $upload-border;
16
- border-radius: 8px;
17
- padding: 20px;
18
- display: flex;
19
- flex-direction: column;
20
- align-items: center;
21
- justify-content: center;
22
- text-align: center;
23
- cursor: pointer;
24
- background-color: #fff;
25
- transition: all 0.3s ease;
26
-
27
- &:hover {
28
- border-color: $upload-brand;
29
- background-color: #fff;
15
+ .drop-zone {
16
+ border: $dark dashed 1px;
17
+ padding: 0;
18
+
19
+ button {
20
+ white-space: normal;
21
+ margin-top: $spacer;
22
+ margin-bottom: $spacer;
23
+ }
24
+
25
+ h2 {
26
+ text-align: center !important;
27
+ font-weight: $font-weight-bold;
28
+ font-size: $font-size-lg;
29
+ margin-bottom: 0;
30
+ }
31
+
32
+ p {
33
+ font-size: $font-size-sm;
34
+ margin-bottom: $spacer * 0.5;
35
+ }
36
+
37
+ @media (min-width: map-get($grid-breakpoints, 'md')) {
38
+ padding: $spacer;
39
+
40
+ h2 {
41
+ margin-bottom: inherit;
42
+ }
43
+ }
44
+
45
+ &.drop-active {
46
+ outline: $dark dashed 2px;
47
+ background-color: rgba($primary, 0.2);
48
+ }
30
49
  }
31
- }
32
50
 
33
- .drop-zone {
34
- @extend .drop-zone-compact;
35
- }
51
+ .drop-zone-compact {
52
+ border: 1px dashed $upload-border;
53
+ border-radius: 8px;
54
+ padding: 20px;
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: center;
58
+ justify-content: center;
59
+ text-align: center;
60
+ cursor: pointer;
61
+ background-color: #fff;
62
+ transition: all 0.3s ease;
36
63
 
37
- .drop-active {
38
- outline: none;
39
- border-color: $upload-brand;
40
- background-color: #fff;
41
- }
64
+ &:hover {
65
+ border-color: $upload-brand;
66
+ background-color: #fff;
67
+ }
42
68
 
43
- .upload-icon {
44
- font-size: 32px;
45
- width: 32px;
46
- height: 32px;
47
- color: $upload-icon;
48
- margin-bottom: 8px;
49
- line-height: 1;
69
+ &.drop-active {
70
+ outline: none;
71
+ border-color: $upload-brand;
72
+ background-color: #fff;
73
+ }
74
+ }
50
75
 
51
- i {
76
+ .upload-icon {
52
77
  font-size: 32px;
78
+ width: 32px;
79
+ height: 32px;
80
+ color: $upload-icon;
81
+ margin-bottom: 8px;
53
82
  line-height: 1;
54
- display: block;
55
- font-style: normal;
83
+
84
+ i {
85
+ font-size: 32px;
86
+ line-height: 1;
87
+ display: block;
88
+ font-style: normal;
89
+ }
56
90
  }
57
- }
58
91
 
59
- .upload-prompt {
60
- font-size: 16px;
61
- font-weight: 600;
62
- margin-bottom: 4px;
63
- }
92
+ .upload-prompt {
93
+ font-size: 16px;
94
+ font-weight: 600;
95
+ margin-bottom: 4px;
96
+ }
64
97
 
65
- .upload-prompt-primary {
66
- color: $upload-prompt-primary;
67
- cursor: pointer;
68
- }
98
+ .upload-prompt-primary {
99
+ color: $upload-prompt-primary;
100
+ cursor: pointer;
101
+ }
69
102
 
70
- .upload-prompt-secondary {
71
- color: $upload-prompt-secondary;
72
- font-size: 16px;
73
- font-weight: 600;
74
- }
103
+ .upload-prompt-secondary {
104
+ color: $upload-prompt-secondary;
105
+ font-size: 16px;
106
+ font-weight: 600;
107
+ }
75
108
 
76
- .upload-info {
77
- font-size: 14px;
78
- color: $upload-prompt-secondary;
79
- }
109
+ .upload-info {
110
+ font-size: 14px;
111
+ color: $upload-prompt-secondary;
112
+ }
80
113
 
81
- .supported-files-types {
82
- color: #727272;
83
- font-size: 12px !important;
84
- font-weight: 400;
85
- }
114
+ .supported-files-types {
115
+ color: #727272;
116
+ font-size: 12px !important;
117
+ font-weight: 400;
118
+ }
86
119
 
87
- .image-size-recommendation {
88
- color: #727272;
89
- font-size: 12px !important;
90
- font-weight: 400;
91
- }
120
+ .image-size-recommendation {
121
+ color: #727272;
122
+ font-size: 12px !important;
123
+ font-weight: 400;
124
+ }
92
125
 
93
- // Collapsed zone in image modal
94
- .collapsedZoneStyle {
95
- .drop-zone-compact,
96
- .drop-zone {
97
- padding: 20px 16px;
126
+ &.collapsedZoneStyle {
127
+ .drop-zone-compact,
128
+ .drop-zone {
129
+ padding: 20px 16px;
98
130
 
99
- [data-identifier="asset-drop-zone-icon"] {
100
- margin-bottom: 8px;
131
+ [data-identifier="asset-drop-zone-icon"] {
132
+ margin-bottom: 8px;
101
133
 
102
- span {
103
- font-size: 28px;
134
+ span {
135
+ font-size: 28px;
136
+ }
104
137
  }
105
138
  }
106
139
  }
@@ -27,7 +27,7 @@ describe('<AssetsDropZone />', () => {
27
27
 
28
28
  describe('renders', () => {
29
29
  it('contains file browser button', () => {
30
- expect(wrapper.find('[data-identifier="asset-drop-zone-browse-button"]').text()).toEqual('Click to upload');
30
+ expect(wrapper.find('[data-identifier="asset-drop-zone-browse-button"]').text()).toEqual('Select from your computer');
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);
@@ -42,6 +42,8 @@ describe('<AssetsDropZone />', () => {
42
42
  compactStyle: true,
43
43
  });
44
44
  expect(wrapper.find(dropZoneID).at(0).hasClass('drop-zone-compact')).toEqual(true);
45
+ expect(wrapper.find('[data-identifier="asset-drop-zone-browse-button"]').text()).toEqual('Click to upload');
46
+ expect(wrapper.find('[data-identifier="asset-drop-zone-header"]').text()).toEqual(' or drag and drop');
45
47
  });
46
48
  });
47
49
 
@@ -8,14 +8,24 @@ const messages = defineMessages({
8
8
  },
9
9
  assetsDropZoneBrowseLabel: {
10
10
  id: 'assetsDropZoneBrowseLabel',
11
- defaultMessage: 'Click to upload',
11
+ defaultMessage: 'Select from your computer',
12
12
  description: 'Upload label for the "Browse" button',
13
13
  },
14
14
  assetsDropZoneHeader: {
15
15
  id: 'assetsDropZoneHeader',
16
- defaultMessage: 'or drag and drop',
16
+ defaultMessage: 'Drag & Drop',
17
17
  description: 'Upload with dropzone section heading',
18
18
  },
19
+ assetsDropZoneClickToUpload: {
20
+ id: 'assetsDropZoneClickToUpload',
21
+ defaultMessage: 'Click to upload',
22
+ description: 'Primary prompt on the compact image upload zone',
23
+ },
24
+ assetsDropZoneOrDragAndDrop: {
25
+ id: 'assetsDropZoneOrDragAndDrop',
26
+ defaultMessage: 'or drag and drop',
27
+ description: 'Secondary prompt on the compact image upload zone',
28
+ },
19
29
  assetsDropZoneMaxFileSizeLabel: {
20
30
  id: 'assetsDropZoneMaxFileSizeLabel',
21
31
  defaultMessage: 'Size limit: {maxFileSizeMB} MB',