learningtribes-studio-frontend 1.4.2-alpha.0 → 1.4.2-alpha.1
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.
- package/dist/accessibilityPolicy.min.js +2 -2
- package/dist/assets.min.css +1 -1
- package/dist/assets.min.js +1 -1
- package/dist/assets.min.js.map +1 -1
- package/dist/common.min.css +2 -2
- package/dist/common.min.js +9 -9
- package/dist/common.min.js.map +1 -1
- package/dist/courseHealthCheck.min.js +1 -1
- package/dist/courseOutlineHealthCheck.min.js +1 -1
- package/dist/editImageModal.min.css +1 -1
- package/dist/editImageModal.min.js +1 -1
- package/dist/editImageModal.min.js.map +1 -1
- package/dist/i18n/messages/ar.json +0 -3
- package/dist/i18n/messages/es_419.json +0 -3
- package/dist/i18n/messages/fr.json +0 -3
- package/dist/i18n/messages/zh_CN.json +0 -3
- package/dist/i18nMessages.min.js +1 -1
- package/dist/i18nMessages.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AssetsDropZone/AssetsDropZone.scss +19 -21
- package/src/components/AssetsDropZone/index.jsx +1 -1
- package/src/components/EditImageModal/EditImageModal.scss +9 -2
- package/src/components/EditImageModal/EditImageModal.test.jsx +9 -160
- package/src/components/EditImageModal/displayMessages.jsx +0 -15
- package/src/components/EditImageModal/index.jsx +5 -60
- package/src/data/i18n/default/transifex_input.json +0 -3
- package/src/data/i18n/locales/ar.json +0 -3
- package/src/data/i18n/locales/es_419.json +0 -3
- package/src/data/i18n/locales/fr.json +0 -3
- 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 文件。没有文件被上传。",
|
package/dist/i18nMessages.min.js
CHANGED
|
@@ -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([
|
|
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([
|
|
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
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.drop-zone-compact {
|
|
8
|
-
border: 1px dashed #
|
|
8
|
+
border: 1px dashed #e0e0e0;
|
|
9
9
|
border-radius: 8px;
|
|
10
|
-
padding:
|
|
11
|
-
background-color: #
|
|
12
|
-
transition: all 0.
|
|
10
|
+
padding: 20px;
|
|
11
|
+
background-color: #fff;
|
|
12
|
+
transition: all 0.3s ease;
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
|
|
15
15
|
&:hover {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
[data-identifier="asset-drop-zone-icon"] {
|
|
21
|
-
color: #
|
|
22
|
-
margin-bottom:
|
|
21
|
+
color: #9e9e9e;
|
|
22
|
+
margin-bottom: 8px;
|
|
23
23
|
|
|
24
24
|
span {
|
|
25
25
|
font-size: 32px;
|
|
@@ -46,10 +46,6 @@
|
|
|
46
46
|
|
|
47
47
|
.drop-zone {
|
|
48
48
|
@extend .drop-zone-compact;
|
|
49
|
-
|
|
50
|
-
@media (min-width: map-get($grid-breakpoints, 'md')) {
|
|
51
|
-
padding: 30px 20px;
|
|
52
|
-
}
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
.drop-active {
|
|
@@ -60,22 +56,24 @@
|
|
|
60
56
|
|
|
61
57
|
.upload-prompt {
|
|
62
58
|
text-align: center;
|
|
63
|
-
margin-bottom:
|
|
59
|
+
margin-bottom: 4px;
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
font-weight: 600;
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
.upload-link {
|
|
67
65
|
background: none;
|
|
68
66
|
border: none;
|
|
69
67
|
color: #4a90d9;
|
|
70
|
-
font-size:
|
|
71
|
-
font-weight:
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
font-weight: 600;
|
|
72
70
|
cursor: pointer;
|
|
73
71
|
padding: 0;
|
|
74
72
|
text-decoration: none;
|
|
75
73
|
|
|
76
74
|
&:hover {
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
color: #4a90d9;
|
|
76
|
+
text-decoration: none;
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
&:focus {
|
|
@@ -85,15 +83,15 @@
|
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
.upload-text {
|
|
88
|
-
color: #
|
|
89
|
-
font-size:
|
|
86
|
+
color: #666;
|
|
87
|
+
font-size: 16px;
|
|
90
88
|
font-weight: 400;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
.size-limit {
|
|
94
92
|
text-align: center;
|
|
95
|
-
color: #
|
|
96
|
-
font-size:
|
|
93
|
+
color: #999;
|
|
94
|
+
font-size: 14px;
|
|
97
95
|
margin-bottom: 0;
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -114,10 +112,10 @@
|
|
|
114
112
|
.drop-zone-compact,
|
|
115
113
|
.drop-zone {
|
|
116
114
|
padding: 20px 16px;
|
|
117
|
-
|
|
115
|
+
|
|
118
116
|
[data-identifier="asset-drop-zone-icon"] {
|
|
119
117
|
margin-bottom: 8px;
|
|
120
|
-
|
|
118
|
+
|
|
121
119
|
span {
|
|
122
120
|
font-size: 28px;
|
|
123
121
|
}
|
|
@@ -68,7 +68,7 @@ export default class AssetsDropZone extends React.Component {
|
|
|
68
68
|
<div className={styles['center-text']} data-identifier="asset-drop-zone-icon">
|
|
69
69
|
<span
|
|
70
70
|
aria-hidden
|
|
71
|
-
className={'far fa-
|
|
71
|
+
className={'far fa-images '+classNames(
|
|
72
72
|
styles['center-text'],
|
|
73
73
|
FontAwesomeStyles['fa-3x'])}
|
|
74
74
|
/>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
.modal-dialog {
|
|
9
9
|
max-width: $modal-lg;
|
|
10
|
+
margin: 40px auto;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
// --- Copied from: https://github.com/edx/paragon/blob/master/src/Fieldset/Fieldset.scss
|
|
@@ -17,6 +18,12 @@
|
|
|
17
18
|
width: auto;
|
|
18
19
|
margin-bottom: 0;
|
|
19
20
|
}
|
|
21
|
+
|
|
22
|
+
fieldset {
|
|
23
|
+
border: none;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
.form-control.is-invalid.is-invalid-nodanger {
|
|
@@ -109,8 +116,8 @@
|
|
|
109
116
|
font-size: 14px;
|
|
110
117
|
|
|
111
118
|
&:focus {
|
|
112
|
-
border-color: #
|
|
113
|
-
box-shadow:
|
|
119
|
+
border-color: #e0e0e0;
|
|
120
|
+
box-shadow: none;
|
|
114
121
|
}
|
|
115
122
|
}
|
|
116
123
|
|
|
@@ -47,9 +47,6 @@ const getImageDescriptionFieldset = editImageModal =>
|
|
|
47
47
|
(getFormContainer(editImageModal).find(Fieldset).at(0));
|
|
48
48
|
const getImageDescriptionInput = editImageModal =>
|
|
49
49
|
(getImageDescriptionFieldset(editImageModal).find(InputText));
|
|
50
|
-
const getImageDescriptionInputCheckBox = editImageModal =>
|
|
51
|
-
(getImageDescriptionFieldset(editImageModal).find(CheckBox));
|
|
52
|
-
|
|
53
50
|
const getImageDimensionsFieldset = editImageModal =>
|
|
54
51
|
(getFormContainer(editImageModal).find(Fieldset).at(1));
|
|
55
52
|
const getImageDimensionsWidthInput = editImageModal =>
|
|
@@ -488,36 +485,6 @@ describe('EditImageModal', () => {
|
|
|
488
485
|
});
|
|
489
486
|
});
|
|
490
487
|
|
|
491
|
-
describe('a image description CheckBox with', () => {
|
|
492
|
-
it('a CheckBox', () => {
|
|
493
|
-
expect(getImageDescriptionInputCheckBox(editImageModal)).toHaveLength(1);
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
it('correct initial props', () => {
|
|
497
|
-
const imageDescriptionInputCheckbox =
|
|
498
|
-
getImageDescriptionInputCheckBox(editImageModal);
|
|
499
|
-
|
|
500
|
-
expect(imageDescriptionInputCheckbox.prop('id')).toEqual('isDecorative');
|
|
501
|
-
expect(imageDescriptionInputCheckbox.prop('id')).toEqual('isDecorative');
|
|
502
|
-
|
|
503
|
-
expect(shallowWithIntl(imageDescriptionInputCheckbox.prop('label')).prop('message'))
|
|
504
|
-
.toEqual(messages.editImageModalImageIsDecorativeCheckboxLabel);
|
|
505
|
-
|
|
506
|
-
expect(imageDescriptionInputCheckbox.prop('checked')).toEqual(false);
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
it('a Learn More link in description', () => {
|
|
510
|
-
/*
|
|
511
|
-
Due to Enzyme issue #1213, we must wrap React Fragments in a div in order
|
|
512
|
-
to succesfully shallow them. Once Enzyme introduces support for React Fragments,
|
|
513
|
-
we can remove the extraneous div.
|
|
514
|
-
*/
|
|
515
|
-
const imageDescriptionInputCheckBoxDescriptionMessages = shallowWithIntl(<div>{getImageDescriptionInputCheckBox(editImageModal).prop('description')}</div>).find(WrappedMessage);
|
|
516
|
-
expect(imageDescriptionInputCheckBoxDescriptionMessages.at(1).prop('children')().type).toEqual('a');
|
|
517
|
-
expect(imageDescriptionInputCheckBoxDescriptionMessages.at(1).prop('message'))
|
|
518
|
-
.toEqual(messages.editImageModalLearnMore);
|
|
519
|
-
});
|
|
520
|
-
});
|
|
521
488
|
});
|
|
522
489
|
|
|
523
490
|
describe('an imageDimensions Fieldset with', () => {
|
|
@@ -620,7 +587,6 @@ describe('EditImageModal', () => {
|
|
|
620
587
|
expect(editImageModal.state('imageDimensions')).toEqual({});
|
|
621
588
|
expect(editImageModal.state('imageSource')).toEqual('');
|
|
622
589
|
expect(editImageModal.state('imageStyle')).toEqual('');
|
|
623
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(false);
|
|
624
590
|
expect(editImageModal.state('isImageDescriptionValid')).toEqual(true);
|
|
625
591
|
expect(editImageModal.state('isImageLoaded')).toEqual(false);
|
|
626
592
|
expect(editImageModal.state('isImageLoading')).toEqual(false);
|
|
@@ -648,7 +614,6 @@ describe('EditImageModal', () => {
|
|
|
648
614
|
expect(editImageModal.state('imageDimensions')).toEqual({});
|
|
649
615
|
expect(editImageModal.state('imageSource')).toEqual('');
|
|
650
616
|
expect(editImageModal.state('imageStyle')).toEqual('');
|
|
651
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(false);
|
|
652
617
|
expect(editImageModal.state('isImageDescriptionValid')).toEqual(true);
|
|
653
618
|
expect(editImageModal.state('isImageLoaded')).toEqual(false);
|
|
654
619
|
expect(editImageModal.state('isImageLoading')).toEqual(false);
|
|
@@ -672,7 +637,6 @@ describe('EditImageModal', () => {
|
|
|
672
637
|
expect(editImageModal.state('imageDimensions')).toEqual({});
|
|
673
638
|
expect(editImageModal.state('imageSource')).toEqual('');
|
|
674
639
|
expect(editImageModal.state('imageStyle')).toEqual('');
|
|
675
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(false);
|
|
676
640
|
expect(editImageModal.state('isImageDescriptionValid')).toEqual(true);
|
|
677
641
|
expect(editImageModal.state('isImageLoaded')).toEqual(false);
|
|
678
642
|
expect(editImageModal.state('isImageLoading')).toEqual(false);
|
|
@@ -712,7 +676,6 @@ describe('EditImageModal', () => {
|
|
|
712
676
|
});
|
|
713
677
|
expect(editImageModal.state('imageStyle')).toEqual(sampleText);
|
|
714
678
|
expect(editImageModal.state('imageSource')).toEqual(sampleText);
|
|
715
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(false);
|
|
716
679
|
expect(editImageModal.state('isImageDescriptionValid')).toEqual(true);
|
|
717
680
|
expect(editImageModal.state('isImageLoaded')).toEqual(true);
|
|
718
681
|
expect(editImageModal.state('isImageLoading')).toEqual(false);
|
|
@@ -956,23 +919,6 @@ describe('EditImageModal', () => {
|
|
|
956
919
|
expect(editImageModal.state('currentValidationMessages')).toEqual({});
|
|
957
920
|
});
|
|
958
921
|
|
|
959
|
-
it('this.state.currentValidationMessages has correct validation messages when invalid form submitted', () => {
|
|
960
|
-
getInsertImageButton(editImageModal).simulate('click');
|
|
961
|
-
|
|
962
|
-
expect(editImageModal.state('currentValidationMessages').imageDescription.props.message).toEqual(messages.editImageModalFormValidImageDescription);
|
|
963
|
-
});
|
|
964
|
-
|
|
965
|
-
it('this.state.currentValidationMessages has correct validation message when invalid image description submitted', () => {
|
|
966
|
-
editImageModal.setState({
|
|
967
|
-
imageSource: sampleText,
|
|
968
|
-
});
|
|
969
|
-
|
|
970
|
-
getInsertImageButton(editImageModal).simulate('click');
|
|
971
|
-
|
|
972
|
-
expect(editImageModal.state('currentValidationMessages')).not.toHaveProperty('imageDimensions');
|
|
973
|
-
expect(editImageModal.state('currentValidationMessages').imageDescription.props.message).toEqual(messages.editImageModalFormValidImageDescription);
|
|
974
|
-
});
|
|
975
|
-
|
|
976
922
|
it('this.state.currentValidationMessages has correct validation message when invalid image dimensions submitted', () => {
|
|
977
923
|
editImageModal.setState({
|
|
978
924
|
imageSource: sampleText,
|
|
@@ -1008,7 +954,7 @@ describe('EditImageModal', () => {
|
|
|
1008
954
|
expect(editImageModal.state('currentValidationMessages')).not.toHaveProperty('imageDescription');
|
|
1009
955
|
});
|
|
1010
956
|
|
|
1011
|
-
it('status alert has correct validation
|
|
957
|
+
it('status alert has correct validation message when invalid dimensions submitted', () => {
|
|
1012
958
|
editImageModal.setState({
|
|
1013
959
|
imageDimensions: {
|
|
1014
960
|
height: (-1 * sampleImgData.naturalHeight),
|
|
@@ -1021,9 +967,8 @@ describe('EditImageModal', () => {
|
|
|
1021
967
|
editImageModal.update();
|
|
1022
968
|
|
|
1023
969
|
const statusAlertListItems = shallowWithIntl(getStatusAlert(editImageModal).prop('dialog')).find('div ul.bullet-list li a');
|
|
1024
|
-
expect(statusAlertListItems).toHaveLength(
|
|
1025
|
-
expect(statusAlertListItems.at(0).find(WrappedMessage).prop('message')).toEqual(messages.
|
|
1026
|
-
expect(statusAlertListItems.at(1).find(WrappedMessage).prop('message')).toEqual(messages.editImageModalFormValidImageDimensions);
|
|
970
|
+
expect(statusAlertListItems).toHaveLength(1);
|
|
971
|
+
expect(statusAlertListItems.at(0).find(WrappedMessage).prop('message')).toEqual(messages.editImageModalFormValidImageDimensions);
|
|
1027
972
|
});
|
|
1028
973
|
|
|
1029
974
|
it('validation messages are hyperlinks that navigate to appropriate form elements', () => {
|
|
@@ -1040,32 +985,8 @@ describe('EditImageModal', () => {
|
|
|
1040
985
|
editImageModal.update();
|
|
1041
986
|
|
|
1042
987
|
const statusAlertListItems = shallowWithIntl(getStatusAlert(editImageModal).prop('dialog')).find('div ul.bullet-list li a');
|
|
1043
|
-
expect(statusAlertListItems).toHaveLength(2);
|
|
1044
|
-
expect(statusAlertListItems.at(0).prop('href')).toEqual('#imageDescription');
|
|
1045
|
-
expect(statusAlertListItems.at(1).prop('href')).toEqual('#imageWidth');
|
|
1046
|
-
});
|
|
1047
|
-
|
|
1048
|
-
it('status alert has correct validation message when invalid image description submitted', () => {
|
|
1049
|
-
editImageModal.setState({
|
|
1050
|
-
imageSource: sampleText,
|
|
1051
|
-
});
|
|
1052
|
-
|
|
1053
|
-
getModalBody(editImageModal).find('img').simulate('load', { target: { ...sampleImgData } });
|
|
1054
|
-
|
|
1055
|
-
getInsertImageButton(editImageModal).simulate('click');
|
|
1056
|
-
|
|
1057
|
-
editImageModal.update();
|
|
1058
|
-
|
|
1059
|
-
const statusAlert = getStatusAlert(editImageModal);
|
|
1060
|
-
|
|
1061
|
-
const validationMessages = shallowWithIntl(statusAlert.prop('dialog')).find(WrappedMessage);
|
|
1062
|
-
expect(validationMessages).toHaveLength(2);
|
|
1063
|
-
expect(validationMessages.at(0).prop('message')).toEqual(messages.editImageModalFormErrorMissingFields);
|
|
1064
|
-
expect(validationMessages.at(1).prop('message')).toEqual(messages.editImageModalFormValidImageDescription);
|
|
1065
|
-
|
|
1066
|
-
const statusAlertListItems = shallowWithIntl(statusAlert.prop('dialog')).find('div ul.bullet-list li a');
|
|
1067
988
|
expect(statusAlertListItems).toHaveLength(1);
|
|
1068
|
-
expect(statusAlertListItems.at(0).
|
|
989
|
+
expect(statusAlertListItems.at(0).prop('href')).toEqual('#imageWidth');
|
|
1069
990
|
});
|
|
1070
991
|
|
|
1071
992
|
it('status alert has correct validation message when invalid image dimensions submitted', () => {
|
|
@@ -1340,79 +1261,6 @@ describe('EditImageModal', () => {
|
|
|
1340
1261
|
expect(editImageModal.state('imageDescription')).toEqual(sampleText);
|
|
1341
1262
|
});
|
|
1342
1263
|
|
|
1343
|
-
it('sets this.state.isImageDecorative with value on checkbox onChange', () => {
|
|
1344
|
-
const isImageDecoractiveCheckBox = getImageDescriptionInputCheckBox(editImageModal);
|
|
1345
|
-
|
|
1346
|
-
isImageDecoractiveCheckBox.simulate('change', true);
|
|
1347
|
-
|
|
1348
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(true);
|
|
1349
|
-
|
|
1350
|
-
isImageDecoractiveCheckBox.simulate('change', false);
|
|
1351
|
-
|
|
1352
|
-
expect(editImageModal.state('isImageDecorative')).toEqual(false);
|
|
1353
|
-
});
|
|
1354
|
-
|
|
1355
|
-
it('sends this.state.isImageDecorative as checkbox checked prop to image description checkbox', () => {
|
|
1356
|
-
editImageModal.setState({
|
|
1357
|
-
isImageDecorative: true,
|
|
1358
|
-
});
|
|
1359
|
-
|
|
1360
|
-
expect(getImageDescriptionInputCheckBox(editImageModal).prop('checked')).toEqual(true);
|
|
1361
|
-
|
|
1362
|
-
editImageModal.setState({
|
|
1363
|
-
isImageDecorative: false,
|
|
1364
|
-
});
|
|
1365
|
-
|
|
1366
|
-
expect(getImageDescriptionInputCheckBox(editImageModal).prop('checked')).toEqual(false);
|
|
1367
|
-
});
|
|
1368
|
-
|
|
1369
|
-
it('toggles image description input disabled prop via checkbox', () => {
|
|
1370
|
-
getImageDescriptionInputCheckBox(editImageModal).simulate('change', true);
|
|
1371
|
-
|
|
1372
|
-
editImageModal.update();
|
|
1373
|
-
|
|
1374
|
-
expect(getImageDescriptionInput(editImageModal).prop('disabled')).toEqual(true);
|
|
1375
|
-
|
|
1376
|
-
getImageDescriptionInputCheckBox(editImageModal).simulate('change', false);
|
|
1377
|
-
|
|
1378
|
-
editImageModal.update();
|
|
1379
|
-
|
|
1380
|
-
expect(getImageDescriptionInput(editImageModal).prop('disabled')).toEqual(false);
|
|
1381
|
-
});
|
|
1382
|
-
|
|
1383
|
-
it('returns correct feedback for invalid description (uses initial state)', () => {
|
|
1384
|
-
const feedback = editImageModal.instance().validateImageDescription();
|
|
1385
|
-
|
|
1386
|
-
expect(feedback.isValid).toEqual(false);
|
|
1387
|
-
expect(shallowWithIntl(feedback.validationMessage).prop('message'))
|
|
1388
|
-
.toEqual(messages.editImageModalFormValidImageDescription);
|
|
1389
|
-
expect(shallowWithIntl(feedback.dangerIconDescription).prop('message'))
|
|
1390
|
-
.toEqual(messages.editImageModalFormError);
|
|
1391
|
-
});
|
|
1392
|
-
|
|
1393
|
-
it('returns correct feedback for valid description (with non-empty description)', () => {
|
|
1394
|
-
editImageModal.setState({
|
|
1395
|
-
imageDescription: sampleText,
|
|
1396
|
-
});
|
|
1397
|
-
|
|
1398
|
-
const feedback = editImageModal.instance().validateImageDescription();
|
|
1399
|
-
|
|
1400
|
-
expect(feedback.isValid).toEqual(true);
|
|
1401
|
-
expect(feedback.validationMessage).toBeUndefined();
|
|
1402
|
-
expect(feedback.dangerIconDescription).toBeUndefined();
|
|
1403
|
-
});
|
|
1404
|
-
|
|
1405
|
-
it('returns correct feedback for valid description (with checked checkbox)', () => {
|
|
1406
|
-
editImageModal.setState({
|
|
1407
|
-
isImageDecorative: true,
|
|
1408
|
-
});
|
|
1409
|
-
|
|
1410
|
-
const feedback = editImageModal.instance().validateImageDescription();
|
|
1411
|
-
|
|
1412
|
-
expect(feedback.isValid).toEqual(true);
|
|
1413
|
-
expect(feedback.validationMessage).toBeUndefined();
|
|
1414
|
-
expect(feedback.dangerIconDescription).toBeUndefined();
|
|
1415
|
-
});
|
|
1416
1264
|
});
|
|
1417
1265
|
|
|
1418
1266
|
describe('Image Dimensions Fieldset', () => {
|
|
@@ -1789,10 +1637,11 @@ describe('EditImageModal', () => {
|
|
|
1789
1637
|
expect(dispatchEventSpy.mock.calls[0][0].detail.alt).toEqual(sampleText);
|
|
1790
1638
|
});
|
|
1791
1639
|
|
|
1792
|
-
it('sends empty string in submitForm event
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1640
|
+
it('sends empty string in submitForm event when description is empty', () => {
|
|
1641
|
+
editImageModal.setState({
|
|
1642
|
+
imageDescription: '',
|
|
1643
|
+
imageSource: sampleText,
|
|
1644
|
+
});
|
|
1796
1645
|
|
|
1797
1646
|
getInsertImageButton(editImageModal).simulate('click');
|
|
1798
1647
|
|
|
@@ -66,16 +66,6 @@ const messages = defineMessages({
|
|
|
66
66
|
defaultMessage: 'Height',
|
|
67
67
|
description: 'Label for the text input box for an image\'s height,',
|
|
68
68
|
},
|
|
69
|
-
editImageModalImageIsDecorativeCheckboxDescription: {
|
|
70
|
-
id: 'editImageModalImageIsDecorativeCheckboxDescription',
|
|
71
|
-
defaultMessage: 'This image is a background or other image that does not require alternative text.',
|
|
72
|
-
description: 'Description for a checkbox that explains what it means for an image to be decorative',
|
|
73
|
-
},
|
|
74
|
-
editImageModalImageIsDecorativeCheckboxLabel: {
|
|
75
|
-
id: 'editImageModalImageIsDecorativeCheckboxLabel',
|
|
76
|
-
defaultMessage: 'This image is decorative only',
|
|
77
|
-
description: 'Label for a checkbox that denotes that an image is decorative',
|
|
78
|
-
},
|
|
79
69
|
editImageModalImagePreviewText: {
|
|
80
70
|
id: 'editImageModalImagePreviewText',
|
|
81
71
|
defaultMessage: 'Image Preview',
|
|
@@ -116,11 +106,6 @@ const messages = defineMessages({
|
|
|
116
106
|
defaultMessage: 'Edit Image Settings',
|
|
117
107
|
description: 'Title of the modal used for editing image settings',
|
|
118
108
|
},
|
|
119
|
-
editImageModalImageOrFields: {
|
|
120
|
-
id: 'editImageModalImageOrFields',
|
|
121
|
-
defaultMessage: 'or',
|
|
122
|
-
description: 'Describes two choices,',
|
|
123
|
-
},
|
|
124
109
|
editImageModalNextPageButton: {
|
|
125
110
|
id: 'editImageModalNextPageButton',
|
|
126
111
|
defaultMessage: 'Next',
|