2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
|
(this["webpackJsonpfeature-change-applier"]=this["webpackJsonpfeature-change-applier"]||[]).push([[0],[,,,,,,,,,,,,function(e,t,n){e.exports=n(28)},,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(5),c=n.n(o),u=(n(17),n(18),n(3)),i=(n(19),n(20),function(e){var t=e.lexicon,n=e.dispatch;return r.a.createElement("div",{className:"ProtoLang","data-testid":"ProtoLang"},r.a.createElement("h3",null,"Proto Language Lexicon"),r.a.createElement("br",null),r.a.createElement("form",{"data-testid":"ProtoLang-Lexicon"},r.a.createElement("textarea",{name:"lexicon",cols:"30",rows:"10","data-testid":"ProtoLang-Lexicon__textarea",value:function(){return t?t.map((e="lexeme",function(t){return t[e]})).join("\n"):"";var e}(),onChange:function(e){console.log(e.target.value.split(/\n/).map((function(e){return{lexeme:e.split("#")[0].trim(),epoch:e.split("#")[1]||""}}))),n({type:"SET_LEXICON",value:e.target.value.split(/\n/).map((function(e){return{lexeme:e.split("#")[0].trim(),epoch:e.split("#")[1]||""}}))})}})))}),s=n(4),l=(n(21),function(e){return""===e?[""]:e.split("/").map((function(e){return e.trim()}))}),p=function(e){var t=Object(u.a)(e,3),n=t[0],a=t[1],r=t[2];return{type:"ADD_FEATURE",value:{positivePhones:l(n),negativePhones:l(a),feature:r}}},h=function(e){var t=e.phones,n=e.features,o=e.dispatch,c=Object(a.useState)("aspirated"),i=Object(u.a)(c,2),l=i[0],h=i[1],m=Object(a.useState)("t\u02b0 / p\u02b0 / k\u02b0"),f=Object(u.a)(m,2),v=f[0],g=f[1],d=Object(a.useState)("t / p / k"),E=Object(u.a)(d,2),b=E[0],O=E[1];return r.a.createElement("div",{className:"Features","data-testid":"Features"},r.a.createElement("h3",null,"Phonetic Features"),r.a.createElement("ul",{className:"Features__list","data-testid":"Features-list"},t?r.a.createElement(r.a.Fragment,null,function(e){var t=function(e){return function(t){return t[e]}};return function(e){return e.map((function(e,t){var n=Object.keys(e),a=e[n],o=a.plus,c=a.minus;return r.a.createElement("li",{key:"feature__".concat(n)},r.a.createElement("span",{className:"feature--names-and-phones"},r.a.createElement("span",{className:"feature--feature-name"},"[+ ".concat(n,"]")),r.a.createElement("span",{className:"feature--feature-phones"},o)),r.a.createElement("span",{className:"feature--names-and-phones"},r.a.createElement("span",{className:"feature--feature-name"},"[- ".concat(n,"]")),r.a.createElement("span",{className:"feature--feature-phones"},c)))}))}(function(e){return Object.keys(e).map((function(n){var a=e[n].positive.map(t("grapheme")).join(" / "),r=e[n].negative.map(t("grapheme")).join(" / ");return Object(s.a)({},n,{plus:a,minus:r})}))}(e))}(n)):r.a.createElement(r.a.Fragment,null)),r.a.createElement("form",{className:"Features__form","data-testid":"Features-form"},r.a.createElement("input",{type:"text",name:"feature",value:l,onChange:function(e){return h(e.target.value)}}),r.a.createElement("label",{htmlFor:"positive-phones"},"+",r.a.createElement("input",{id:"positive-phones",type:"text",name:"phonemes",value:v,onChange:function(e){return g(e.target.value)}})),r.a.createElement("label",{htmlFor:"negative-phones"},"-",r.a.createElement("input",{id:"negative-phones",type:"text",name:"phonemes",value:b,onChange:function(e){return O(e.target.value)}})),r.a.createElement("input",{type:"submit",onClick:function(e){return function(e){return function(t){return function(n){return function(a){return e.preventDefault(),t(n(a))}}}}(e)(o)(p)([v,b,l])},value:"Add feature"})))},m=(n(22),n(2)),f=(n(23),function(e){var t=Object(a.useState)(e.epoch?e.epoch:{name:"",changes:[""]}),n=Object(u.a)(t,2),o=n[0],c=n[1],i=function(t,n){n(t),e.updateEpoch(o,e.epochIndex)};return Object(a.useEffect)((function(){e.updateEpoch(o,e.epochIndex)}),[o]),r.a.createElement(r.a.Fragment,null,r.a.createElement("h4",null,o.name),r.a.createElement("form",{className:"SoundChangeSuite__form","data-testid":"".concat(o.name,"_SoundChangeSuite_changes")},r.
|
||
|
//# sourceMappingURL=main.00d4b63c.chunk.js.map
|