eda.dragdropway.js 292 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158
  1. !function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in p||(p[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==v.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=p[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(v.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=p[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return x[e]||(x[e]={name:e,dependencies:[],exports:{},importers:[]})}function d(r){if(!r.module){var t=r.module=u(r.name),n=r.module.exports,o=r.declare.call(e,function(e,r){if(t.locked=!0,"object"==typeof e)for(var o in e)n[o]=e[o];else n[e]=r;for(var a=0,u=t.importers.length;u>a;a++){var d=t.importers[a];if(!d.locked)for(var i=0;i<d.dependencies.length;++i)d.dependencies[i]===t&&d.setters[i](n)}return t.locked=!1,r},r.name);t.setters=o.setters,t.execute=o.execute;for(var a=0,i=r.normalizedDeps.length;i>a;a++){var l,s=r.normalizedDeps[a],c=p[s],v=x[s];v?l=v.exports:c&&!c.declarative?l=c.esModule:c?(d(c),v=c.module,l=v.exports):l=f(s),v&&v.importers?(v.importers.push(t),t.dependencies.push(v)):t.dependencies.push(null),t.setters[a]&&t.setters[a](l)}}}function i(e){var r,t=p[e];if(t)t.declarative?c(e,[]):t.evaluated||l(t),r=t.module.exports;else if(r=f(e),!r)throw new Error("Unable to load dependency "+e+".");return(!t||t.declarative)&&r&&r.__useDefault?r["default"]:r}function l(r){if(!r.module){var t={},n=r.module={exports:t,id:r.name};if(!r.executingRequire)for(var o=0,a=r.normalizedDeps.length;a>o;o++){var u=r.normalizedDeps[o],d=p[u];d&&l(d)}r.evaluated=!0;var c=r.execute.call(e,function(e){for(var t=0,n=r.deps.length;n>t;t++)if(r.deps[t]==e)return i(r.normalizedDeps[t]);throw new TypeError("Module "+e+" not declared as a dependency.")},t,n);c&&(n.exports=c),t=n.exports,t&&t.__esModule?r.esModule=t:r.esModule=s(t)}}function s(r){if(r===e)return r;var t={};if("object"==typeof r||"function"==typeof r)if(g){var n;for(var o in r)(n=Object.getOwnPropertyDescriptor(r,o))&&h(t,o,n)}else{var a=r&&r.hasOwnProperty;for(var o in r)(!a||r.hasOwnProperty(o))&&(t[o]=r[o])}return t["default"]=r,h(t,"__useDefault",{value:!0}),t}function c(r,t){var n=p[r];if(n&&!n.evaluated&&n.declarative){t.push(r);for(var o=0,a=n.normalizedDeps.length;a>o;o++){var u=n.normalizedDeps[o];-1==v.call(t,u)&&(p[u]?c(u,t):f(u))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}function f(e){if(D[e])return D[e];if("@node/"==e.substr(0,6))return y(e.substr(6));var r=p[e];if(!r)throw"Module "+e+" not present.";return a(e),c(e,[]),p[e]=void 0,r.declarative&&h(r.module.exports,"__esModule",{value:!0}),D[e]=r.declarative?r.module.exports:r.esModule}var p={},v=Array.prototype.indexOf||function(e){for(var r=0,t=this.length;t>r;r++)if(this[r]===e)return r;return-1},g=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(m){g=!1}var h;!function(){try{Object.defineProperty({},"a",{})&&(h=Object.defineProperty)}catch(e){h=function(e,r,t){try{e[r]=t.value||t.get.call(e)}catch(n){}}}}();var x={},y="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,D={"@empty":{}};return function(e,n,o){return function(a){a(function(a){for(var u={_nodeRequire:y,register:r,registerDynamic:t,get:f,set:function(e,r){D[e]=r},newModule:function(e){return e}},d=0;d<n.length;d++)(function(e,r){r&&r.__esModule?D[e]=r:D[e]=s(r)})(n[d],arguments[d]);o(u);var i=f(e[0]);if(e.length>1)for(var d=1;d<e.length;d++)f(e[d]);return i.__useDefault?i["default"]:i})}}}("undefined"!=typeof self?self:global)
  2. (["1"], [], function($__System) {
  3. !function(){var t=$__System;if("undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var s=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");t.set("@@cjs-helpers",t.newModule({getPathVars:function(t){var n,o=t.lastIndexOf("!");n=-1!=o?t.substr(0,o):t;var e=n.split("/");return e.pop(),e=e.join("/"),"file:///"==n.substr(0,8)?(n=n.substr(7),e=e.substr(7),isWindows&&(n=n.substr(1),e=e.substr(1))):s&&n.substr(0,s.length)===s&&(n=n.substr(s.length),e=e.substr(s.length)),{filename:n,dirname:e}}}))}();
  4. $__System.register("2", [], function (_export) {
  5. "use strict";
  6. return {
  7. setters: [],
  8. execute: function () {
  9. _export("default", window.angular);
  10. }
  11. };
  12. });
  13. $__System.register('3', [], function (_export) {
  14. 'use strict';
  15. function formlyConfig(formlyConfigProvider, EasyFormGenFormlyBindingModelsProvider, easyFormDragWayConfigProvider) {
  16. formlyConfigProvider.setType({
  17. name: 'blank',
  18. template: '<div></div>'
  19. });
  20. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  21. id: 'empty',
  22. name: 'no control',
  23. subtitle: 'no control',
  24. group: 'Blank',
  25. formlyType: 'blank',
  26. formlySubtype: '',
  27. formlyLabel: '',
  28. formlyRequired: false,
  29. formlyDesciption: '',
  30. formlyOptions: []
  31. });
  32. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  33. label: '<div class="col-md-12">\n <div class="form-group"> \n <div class="">\n </div>\n </div>\n </div>',
  34. control: 'empty',
  35. cssClass: 'col-xs-12'
  36. }, {
  37. addToGroupCtrl: 'blank'
  38. });
  39. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  40. id: 'Header',
  41. name: 'Header',
  42. subtitle: 'no control',
  43. group: 'Decoration',
  44. formlyType: 'header',
  45. formlySubtype: '',
  46. formlyLabel: '',
  47. formlyRequired: false,
  48. formlyDesciption: '',
  49. formlyOptions: []
  50. });
  51. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  52. label: ['<div class="col-md-12">\n <div class="form-group"> \n <div class="">\n <h2 class="text-center">Header</h2>\n <hr/>\n </div>\n </div>\n </div>'].join(''),
  53. control: 'Header',
  54. cssClass: 'col-xs-12'
  55. }, {
  56. addToGroupCtrl: 'headers'
  57. });
  58. var subTitleTemplate = '\n <div class="row"> \n <div class=""> \n <h4 class="text-center">{{options.templateOptions.placeholder}}<h4> \n <hr/>\n </div>\n </div>';
  59. formlyConfigProvider.setType({
  60. name: 'subTitle',
  61. template: subTitleTemplate
  62. });
  63. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  64. id: 'Subtitle',
  65. name: 'Subtitle',
  66. subtitle: 'no control',
  67. group: 'Decoration',
  68. formlyType: 'subTitle',
  69. formlySubtype: '',
  70. formlyLabel: '',
  71. formlyRequired: false,
  72. formlyDesciption: '',
  73. formlyOptions: []
  74. });
  75. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  76. 'label': '<div class="col-md-12">\n <div class="form-group"> \n <div class="">\n <h4 class="text-center">SubTitle</h4>\n <hr/>\n </div>\n </div>\n </div>',
  77. 'control': 'Subtitle',
  78. 'cssClass': 'col-xs-12'
  79. }, {
  80. addToGroupCtrl: 'headers'
  81. });
  82. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  83. id: 'TextInput',
  84. name: 'Text input',
  85. subtitle: 'Text input',
  86. group: 'input',
  87. formlyType: 'input',
  88. formlySubtype: '',
  89. formlyLabel: '',
  90. formlyRequired: false,
  91. formlyDesciption: '',
  92. formlyOptions: []
  93. });
  94. /**
  95. * drag and drop text input (basic) control template
  96. *
  97. *
  98. * @PARAM 1 : control template object (drag an drop)
  99. * @PARAM 2 : object to indicates in which group of control it will be inserted
  100. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  101. */
  102. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  103. 'label': '<div class="col-md-12">\n <div class="form-group">\n <label for="inputText" class="control-label textControlLabel pull-left">\n title for text input<span class="textControlLabel ng-scope">*</span>\n </label>\n <div class="">\n <input type="text" disabled class="form-control fakeControl" id="inputText" placeholder="basic input">\n <p class="help-block pull-left">Description</p>\n </div>\n </div>\n </div>',
  104. 'control': 'TextInput',
  105. 'cssClass': 'col-xs-12'
  106. }, {
  107. addToGroupCtrl: 'inputs'
  108. });
  109. /**
  110. * Add text input (Password)
  111. *
  112. * note : formly template already exists
  113. * no need to create a custom one
  114. *
  115. * just declare in EasyFormGenFormlyBindingModelsProvider
  116. */
  117. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  118. id: 'Password',
  119. name: 'Password',
  120. subtitle: 'Password',
  121. group: 'input',
  122. formlyType: 'input',
  123. formlySubtype: 'password',
  124. formlyLabel: '',
  125. formlyRequired: false,
  126. formlyDesciption: '',
  127. formlyOptions: []
  128. });
  129. /**
  130. * drag and drop text input — password —control template
  131. *
  132. *
  133. * @PARAM 1 : control template object (drag an drop)
  134. * @PARAM 2 : object to indicates in which group of control it will be inserted
  135. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  136. */
  137. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  138. 'label': '<div class="col-md-12">\n <div class="form-group">\n <label for="inputPass" class="control-label textControlLabel ng-binding pull-left">\n title for password input<span class="textControlLabel ng-scope">*</span>\n </label>\n <div class="">\n <input type="password" disabled class="form-control fakeControl" id="inputPass" placeholder="password input">\n <p class="help-block ng-binding pull-left">Description</p>\n </div>\n </div>\n </div>',
  139. 'control': 'Password',
  140. 'cssClass': 'col-xs-12'
  141. }, {
  142. addToGroupCtrl: 'inputs'
  143. });
  144. /**
  145. * Add angular UI date picker
  146. *
  147. * thx Kent C. Dodds for formly config template (since it was a huge config)
  148. */
  149. var attributes = ['date-disabled', 'custom-class', 'show-weeks', 'starting-day', 'init-date', 'min-mode', 'max-mode', 'format-day', 'format-month', 'format-year', 'format-day-header', 'format-day-title', 'format-month-title', 'year-range', 'shortcut-propagation', 'datepicker-popup', 'show-button-bar', 'current-text', 'clear-text', 'close-text', 'close-on-date-selection', 'datepicker-append-to-body'];
  150. var bindings = ['datepicker-mode', 'min-date', 'max-date'];
  151. var ngModelAttrs = {};
  152. angular.forEach(attributes, function (attr) {
  153. return ngModelAttrs[camelize(attr)] = { attribute: attr };
  154. });
  155. angular.forEach(bindings, function (binding) {
  156. return ngModelAttrs[camelize(binding)] = { bound: binding };
  157. });
  158. function camelize(string) {
  159. string = string.replace(/[\-_\s]+(.)?/g, function (match, chr) {
  160. return chr ? chr.toUpperCase() : '';
  161. });
  162. // Ensure 1st char is always lowercase
  163. return string.replace(/^([A-Z])/, function (match, chr) {
  164. return chr ? chr.toLowerCase() : '';
  165. });
  166. }
  167. var angularUIDatePickerTemplate = '\n <input \n id="{{id}}" \n class="form-control" \n ng-click="open($event)"\n ng-model="model[options.key || index]" is-open="to.isOpen"\n ng-click="to.isOpen = true" \n datepicker-options="to.datepickerOptions"/>';
  168. formlyConfigProvider.setType({
  169. name: 'datepicker',
  170. template: angularUIDatePickerTemplate,
  171. wrapper: ['bootstrapLabel', 'bootstrapHasError'],
  172. controller: ['$scope', function ($scope) {
  173. $scope.open = function ($event) {
  174. $event.preventDefault();
  175. $event.stopPropagation();
  176. $scope.opened = true;
  177. };
  178. }],
  179. defaultOptions: {
  180. ngModelAttrs: ngModelAttrs,
  181. templateOptions: {
  182. addonLeft: {
  183. 'class': 'glyphicon glyphicon-calendar',
  184. onClick: function onClick(options) {
  185. return options.templateOptions.isOpen = !options.templateOptions.isOpen;
  186. }
  187. },
  188. onFocus: function onFocus($viewValue, $modelValue, scope) {
  189. return scope.to.isOpen = !scope.to.isOpen;
  190. },
  191. datepickerOptions: {}
  192. }
  193. }
  194. });
  195. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  196. id: 'Date',
  197. name: 'Date',
  198. subtitle: 'Date',
  199. group: 'input',
  200. formlyType: 'datepicker',
  201. formlySubtype: '',
  202. formlyLabel: '',
  203. formlyRequired: false,
  204. formlyDesciption: '',
  205. formlyOptions: [],
  206. datepickerPopup: 'dd-MMMM-yyyy'
  207. });
  208. /**
  209. * drag and drop text input — date — control template (using angular UI datepicker)
  210. *
  211. *
  212. * @PARAM 1 : control template object (drag an drop)
  213. * @PARAM 2 : object to indicates in which group of control it will be inserted
  214. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  215. */
  216. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  217. label: '\n <div class="col-md-12">\n <div class="form-group">\n <label for="inputDate" class="control-label textControlLabel ng-binding pull-left">\n title for date input<span class="textControlLabel ng-scope">*</span>\n </label>\n <div class="col-xs-12 col-sm-12 col-md-12 demoddDatepicker">\n\t\t\t\t\t<div class="input-group">\n \t\t\t\t\t<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>\n \t\t\t\t\t<input type="text" disabled class="form-control fakeControl">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n <p class="help-block pull-left">description</p>\n </div>\n </div>',
  218. control: 'Date',
  219. cssClass: 'col-xs-12'
  220. }, {
  221. addToGroupCtrl: 'inputs'
  222. });
  223. /**
  224. * Add textarea
  225. *
  226. * note : formly template already exists
  227. * no need to create a custom one
  228. *
  229. * just declare in EasyFormGenFormlyBindingModelsProvider
  230. */
  231. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  232. id: 'Texarea',
  233. name: 'Textarea',
  234. subtitle: 'Textarea',
  235. group: 'Textarea',
  236. formlyType: 'textarea',
  237. formlySubtype: '',
  238. formlyLabel: '',
  239. formlyRequired: false,
  240. formlyDesciption: '',
  241. formlyOptions: []
  242. });
  243. /**
  244. * drag and drop textarea control template
  245. *
  246. *
  247. * @PARAM 1 : control template object (drag an drop)
  248. * @PARAM 2 : object to indicates in which group of control it will be inserted
  249. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  250. */
  251. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  252. 'label': '\n <div class="col-md-12">\n <div class="form-group">\n <label for="textArea" class="control-label \n \t\t\t\t\t\t\ttextControlLabel pull-left">title for textarea <span class="textControlLabel">*</span></label> \n <div class="">\n <textarea disabled class="form-control dragItemtextarea fakeControl" ng-model="model[options.key]" rows="1" id="textArea"></textarea>\n <p class="help-block pull-left">description</p> \n </div>\n </div> \n </div>',
  253. 'control': 'Texarea',
  254. 'cssClass': 'col-xs-12'
  255. }, {
  256. addToGroupCtrl: 'textareas'
  257. });
  258. /**
  259. * Add rich text editor control (using textAngular)
  260. *
  261. */
  262. var richTexEditorTemplate = '\n <text-angular name="{{id}}" \n class="richTextAngular" \n ng-model="model[options.key || index]">\n </text-angular>';
  263. formlyConfigProvider.setType({
  264. name: 'richEditor',
  265. template: richTexEditorTemplate
  266. });
  267. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  268. id: 'RichTextEditor',
  269. name: 'RichTextEditor',
  270. subtitle: 'RichTextEditor',
  271. group: 'Textarea',
  272. formlyType: 'richEditor',
  273. formlySubtype: '',
  274. formlyLabel: '',
  275. formlyRequired: false,
  276. formlyDesciption: '',
  277. formlyOptions: []
  278. });
  279. /**
  280. * drag and drop rich text editor control template (using textAngular)
  281. *
  282. *
  283. * @PARAM 1 : control template object (drag an drop)
  284. * @PARAM 2 : object to indicates in which group of control it will be inserted
  285. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  286. */
  287. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  288. label: '\n <div class="col-md-12">\n <div class="form-group">\n <label for="textArea" class="control-label \n \t\t\t\t\t\t\ttextControlLabel pull-left">title for rich text editor <span class="textControlLabel">*</span></label>\n <div class="">\n <textarea disabled class="form-control dragItemtextarea fakeControl" ng-model="model[options.key]" rows="1" id="textArea"></textarea>\n <p class="help-block">description</p>\n </div>\n </div>\n </div>',
  289. control: 'RichTextEditor',
  290. cssClass: 'col-xs-12'
  291. }, {
  292. addToGroupCtrl: 'textareas'
  293. });
  294. /**
  295. * Add radio
  296. *
  297. * note : formly template already exists
  298. * no need to create a custom one
  299. *
  300. * just declare in EasyFormGenFormlyBindingModelsProvider
  301. */
  302. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  303. id: 'Radio',
  304. name: 'Radio',
  305. subtitle: 'Radio',
  306. options: [],
  307. group: 'Radio',
  308. formlyType: 'radio',
  309. formlySubtype: '',
  310. formlyLabel: '',
  311. formlyRequired: false,
  312. formlyDesciption: '',
  313. formlyOptions: []
  314. });
  315. /**
  316. * drag and drop radio control template (using textAngular)
  317. *
  318. *
  319. * @PARAM 1 : control template object (drag an drop)
  320. * @PARAM 2 : object to indicates in which group of control it will be inserted
  321. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  322. */
  323. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  324. 'label': '\n <div class="col-md-12"> \n <div class="form-group">\n <label for="vertRadio" class="control-label textControlLabel pull-left">title for radio <span class="textControlLabel">*</span></label>\n <div class="interligne"></div>\n <div class="pull-left">\n <div class="radio">\n <label class="fakeCheck">\n <input type="radio" disabled name="optionsRadios" class="fakeCheck" id="optionsRadio-0" value="verticalRadio0" checked="">\n option1\n </label>\n </div>\n <div class="radio">\n <label class="fakeCheck">\n <input type="radio" disabled name="optionsRadios" class="fakeCheck" id="optionsRadio-1" value="verticalRadio1" checked="">\n option2\n </label>\n </div>\n <p class="help-block pull-left">description</p>\n </div>\n </div> \n </div>',
  325. 'control': 'Radio',
  326. 'cssClass': 'col-xs-12'
  327. }, {
  328. addToGroupCtrl: 'radios'
  329. });
  330. /**
  331. * Add checkbox
  332. *
  333. * note : formly template already exists
  334. * no need to create a custom one
  335. *
  336. * just declare in EasyFormGenFormlyBindingModelsProvider
  337. */
  338. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  339. id: 'Checkbox',
  340. name: 'Checkbox',
  341. subtitle: 'Checkbox',
  342. group: 'Checkbox',
  343. formlyType: 'checkbox',
  344. formlySubtype: '',
  345. formlyLabel: '',
  346. formlyRequired: false,
  347. formlyDesciption: '',
  348. formlyOptions: []
  349. });
  350. /**
  351. * drag and drop checkbox control template (using textAngular)
  352. *
  353. *
  354. * @PARAM 1 : control template object (drag an drop)
  355. * @PARAM 2 : object to indicates in which group of control it will be inserted
  356. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  357. */
  358. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  359. label: '\n <div class="col-md-12">\n <div class="checkbox">\n <label class="fakeCheck">\n <input type="checkbox" disabled class="fakeCheck" id="checkBox">\n \t\t<span class="blackText ng-binding">label for checkbox </span>\n \t\t<span class="textControlLabel ng-scope">*</span>\n </label>\n </div>\n <p class="help-block ng-binding">description</p>\n </div>',
  360. control: 'Checkbox',
  361. cssClass: 'col-xs-12'
  362. }, {
  363. addToGroupCtrl: 'checkboxes'
  364. });
  365. /**
  366. * Add basic Select control
  367. *
  368. * using nya-bs-select
  369. */
  370. var basicSelectTemplate = '\n <ol class="nya-bs-select col-sm-12 col-xs-12 col-md-12 col-lg12" \n \t\tng-model="model[options.key || index]" \n \t\tid="{{id}}" \n \t\tdisabled="options.templateOptions.options.length === 0"> \n <li class="nya-bs-option" nya-bs-option="option in options.templateOptions.options"> \n <a>{{option.name}}</a> \n </li>\n </ol> ';
  371. formlyConfigProvider.setType({
  372. name: 'basicSelect',
  373. template: basicSelectTemplate
  374. });
  375. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  376. id: 'BasicSelect',
  377. name: 'Basic select',
  378. subtitle: 'Basic select',
  379. options: [],
  380. group: 'Select',
  381. formlyType: 'basicSelect',
  382. formlySubtype: '',
  383. formlyLabel: '',
  384. formlyRequired: false,
  385. formlyDesciption: '',
  386. formlyOptions: []
  387. });
  388. /**
  389. * drag and drop basic select control template (using textAngular)
  390. *
  391. *
  392. * @PARAM 1 : control template object (drag an drop)
  393. * @PARAM 2 : object to indicates in which group of control it will be inserted
  394. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  395. */
  396. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  397. label: '\n <div class="col-md-12">\n <div class="form-group">\n <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 selectfordemo">\n\n <ol class="nya-bs-select col-xs-12 col-sm-12 col-md-12 col-lg-12 ng-valid btn-group ng-dirty ng-valid-parse ng-touched"\n \tng-model="fakeModelNyaSelectBasic"\n \tdata-live-search="false">\n \n <button class="btn btn-default dropdown-toggle" disabled type="button">\n \t\t <span class="pull-left filter-option">\n \t\t\t <span class="ng-binding">Basic select</span>\n \t\t</span>\n \t\t&nbsp;<span class="caret"></span>\n </button>\n\n </div>\n </div>',
  398. control: 'BasicSelect',
  399. cssClass: 'col-xs-12'
  400. }, {
  401. addToGroupCtrl: 'selects'
  402. });
  403. /**
  404. * Add Grouped Select control
  405. *
  406. * using nya-bs-select
  407. */
  408. var groupedSelectTemplate = '\n <ol class="nya-bs-select col-sm-12 col-xs-12 col-md-12 col-lg12"\n\t\t ng-model="model[options.key || index]"\n data-live-search="true" \n disabled="options.templateOptions.options.length === 0">\n <li nya-bs-option="option in options.templateOptions.options group by option.group">\n <span class="dropdown-header">{{$group}}</span>\n <a>\n <span>{{option.name}}</span>\n <span class="glyphicon glyphicon-ok check-mark"></span>\n </a>\n </li>\n </ol>';
  409. formlyConfigProvider.setType({
  410. name: 'groupedSelect',
  411. template: groupedSelectTemplate
  412. });
  413. EasyFormGenFormlyBindingModelsProvider.addEasyFormControlToList({
  414. id: 'GroupedSelect',
  415. name: 'Grouped Select',
  416. subtitle: 'Grouped Select',
  417. options: [],
  418. group: 'Select',
  419. formlyType: 'groupedSelect',
  420. formlySubtype: '',
  421. formlyLabel: '',
  422. formlyRequired: false,
  423. formlyDesciption: '',
  424. formlyOptions: []
  425. });
  426. /**
  427. * drag and drop grouped select control template (using textAngular)
  428. *
  429. *
  430. * @PARAM 1 : control template object (drag an drop)
  431. * @PARAM 2 : object to indicates in which group of control it will be inserted
  432. * (related to _dragDropConfigModel.containerConfig.decoration in dragDropConfig provider)
  433. */
  434. easyFormDragWayConfigProvider.addControlToDragDropPresentationModel({
  435. label: '\n <div class="col-md-12">\n <div class="form-group">\n <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 selectfordemo">\n <ol class="nya-bs-select col-xs-12 col-sm-12 col-md-12 col-lg-12 ng-valid btn-group ng-dirty ng-valid-parse ng-touched"\n \tng-model="fakeModelNyaSelectBasic"\n \tdata-live-search="false">\n <button class="btn btn-default dropdown-toggle" disabled type="button">\n \t\t <span class="pull-left filter-option">\n \t\t\t <span class="ng-binding">Grouped select</span>\n \t\t</span>\n \t\t&nbsp;<span class="caret"></span>\n </button>\n </div>\n </div>',
  436. control: 'GroupedSelect',
  437. cssClass: 'col-xs-12'
  438. }, {
  439. addToGroupCtrl: 'selects'
  440. });
  441. }
  442. return {
  443. setters: [],
  444. execute: function () {
  445. formlyConfig.$inject = ['formlyConfigProvider', 'EasyFormGenFormlyBindingModelsProvider', 'easyFormDragWayConfigProvider'];
  446. _export('default', formlyConfig);
  447. }
  448. };
  449. });
  450. $__System.registerDynamic("4", [], true, function($__require, exports, module) {
  451. ;
  452. var global = this,
  453. __define = global.define;
  454. global.define = undefined;
  455. module.exports = {
  456. "stepway": {"version": "1.1.0"},
  457. "dragdropway": {"version": "1.1.0"},
  458. "formviewer": {"version": "1.1.0"}
  459. };
  460. global.define = __define;
  461. return module.exports;
  462. });
  463. $__System.register('5', ['4'], function (_export) {
  464. 'use strict';
  465. var easyFormConfig, EASY_FORM_DD_VERSION_NAME, EASY_FORM_DD_VERSION_VALUE;
  466. function dragDropConfigFunct(easyFormDragWayConfigProvider) {
  467. easyFormDragWayConfigProvider.setItemsNotTocount({
  468. //placeholder : '',
  469. itemBeingDragged: 'dndDraggingSource'
  470. });
  471. }
  472. return {
  473. setters: [function (_) {
  474. easyFormConfig = _['default'];
  475. }],
  476. execute: function () {
  477. EASY_FORM_DD_VERSION_NAME = 'easyFormGenVersion';
  478. EASY_FORM_DD_VERSION_VALUE = easyFormConfig.dragdropway.version;
  479. dragDropConfigFunct.$inject = ['easyFormDragWayConfigProvider'];
  480. _export('default', dragDropConfigFunct);
  481. _export('EASY_FORM_DD_VERSION_NAME', EASY_FORM_DD_VERSION_NAME);
  482. _export('EASY_FORM_DD_VERSION_VALUE', EASY_FORM_DD_VERSION_VALUE);
  483. }
  484. };
  485. });
  486. $__System.register('6', [], function (_export) {
  487. 'use strict';
  488. var CORE_MODULES;
  489. return {
  490. setters: [],
  491. execute: function () {
  492. CORE_MODULES = ['textAngular', 'textAngularSetup', 'ngAnimate', 'toaster', 'formly', 'formlyBootstrap', 'ui.bootstrap', 'nya.bootstrap.select', 'mgcrea.ngStrap.affix'
  493. // 'pascalprecht.translate'
  494. ];
  495. _export('default', angular.module('easyFormGen.dragDropWay.core', CORE_MODULES));
  496. }
  497. };
  498. });
  499. $__System.register('7', [], function (_export) {
  500. 'use strict';
  501. var dateFormats, setToday, clearDateTime;
  502. return {
  503. setters: [],
  504. execute: function () {
  505. dateFormats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
  506. setToday = function setToday(datetimePickerModel) {
  507. datetimePickerModel.dt = new Date();
  508. };
  509. clearDateTime = function clearDateTime(datetimePickerModel) {
  510. datetimePickerModel.dt = new Date();
  511. };
  512. _export('dateFormats', dateFormats);
  513. _export('setToday', setToday);
  514. _export('clearDateTime', clearDateTime);
  515. }
  516. };
  517. });
  518. $__System.register('8', ['7', '9', 'a'], function (_export) {
  519. var dateFormats, setToday, clearDateTime, _createClass, _classCallCheck, LEFT_PANEL_CONTROLLER, LEFT_PANEL_CONTROLLERAS, leftPanelController;
  520. return {
  521. setters: [function (_2) {
  522. dateFormats = _2.dateFormats;
  523. setToday = _2.setToday;
  524. clearDateTime = _2.clearDateTime;
  525. }, function (_) {
  526. _createClass = _['default'];
  527. }, function (_a) {
  528. _classCallCheck = _a['default'];
  529. }],
  530. execute: function () {
  531. 'use strict';
  532. LEFT_PANEL_CONTROLLER = 'leftPanelController';
  533. LEFT_PANEL_CONTROLLERAS = 'leftPanelCtrl';
  534. leftPanelController = (function () {
  535. function leftPanelController(toaster, $timeout, $selectOptionMange, controllerModalProxy) {
  536. _classCallCheck(this, leftPanelController);
  537. this.toaster = toaster;
  538. this.$timeout = $timeout;
  539. this.$selectOptionMange = $selectOptionMange;
  540. this.controllerModalProxy = controllerModalProxy;
  541. this.init();
  542. }
  543. _createClass(leftPanelController, [{
  544. key: 'init',
  545. value: function init() {
  546. this.proxyModel = this.controllerModalProxy.proxyModel;
  547. this.proxyModel.selectedControl = this.proxyModel.temporyConfig.selectedControl;
  548. this.basicSelectRowCollection = this.controllerModalProxy.basicSelectRowCollection;
  549. this.newOptionBasicSelect = this.controllerModalProxy.newOptionBasicSelect;
  550. this.groupedSelectRowCollection = this.controllerModalProxy.groupedSelectRowCollection;
  551. this.newOptionGroupedSelect = this.controllerModalProxy.newOptionGroupedSelect;
  552. this.GroupedSelectGroups = this.controllerModalProxy.GroupedSelectGroups;
  553. this.newGroupGroupedSelect = this.controllerModalProxy.newGroupGroupedSelect;
  554. this.groupSelectGroupClick = this.controllerModalProxy.groupSelectGroupClick;
  555. this.radioRowCollection = this.controllerModalProxy.radioRowCollection;
  556. this.newOptionRadio = this.controllerModalProxy.newOptionRadio;
  557. this.demodt = {};
  558. this.demodt.formats = dateFormats;
  559. this.dateOptions = this.getDateOptions();
  560. // this.controllerModalProxy.resetAllTemporyModels();
  561. this.initNyaSelectConformingSelectedControl();
  562. }
  563. }, {
  564. key: 'getDateOptions',
  565. value: function getDateOptions() {
  566. var dateOptions = {
  567. formatYear: 'yy',
  568. startingDay: 1,
  569. showWeeks: true,
  570. initDate: null
  571. };
  572. return dateOptions;
  573. }
  574. }, {
  575. key: 'initNyaSelectConformingSelectedControl',
  576. value: function initNyaSelectConformingSelectedControl() {
  577. //place proxyModel to selection if not none :
  578. if (this.proxyModel.temporyConfig.selectedControl !== 'none') {
  579. for (var i = this.proxyModel.controls.length - 1; i >= 0; i--) {
  580. if (this.proxyModel.controls[i].id === this.proxyModel.temporyConfig.selectedControl) this.modelproxyModel = this.proxyModel.controls[i];
  581. }
  582. if (this.proxyModel.temporyConfig.selectedControl === 'BasicSelect') this.controllerModalProxy.bindBasicSelectFromProxyModel(self.basicSelectRowCollection);
  583. if (this.proxyModel.temporyConfig.selectedControl === 'GroupedSelect') this.controllerModalProxy.bindGroupedSelectFromProxyModel(this.groupedSelectRowCollection, this.GroupedSelectGroups);
  584. if (this.proxyModel.temporyConfig.selectedControl === 'Radio') this.controllerModalProxy.bindRadioFromProxyModel(this.radioRowCollection);
  585. }
  586. }
  587. }, {
  588. key: 'updateSpecialControl',
  589. value: function updateSpecialControl() {
  590. //refresh service data for particular controls as selects and radio
  591. this.proxyModel.basicSelectRowCollection = this.basicSelectRowCollection;
  592. this.proxyModel.newOptionBasicSelect = this.newOptionBasicSelect;
  593. this.proxyModel.groupedSelectRowCollection = this.groupedSelectRowCollection;
  594. this.proxyModel.newOptionGroupedSelect = this.newOptionGroupedSelect;
  595. this.proxyModel.GroupedSelectGroups = this.GroupedSelectGroups;
  596. this.proxyModel.newGroupGroupedSelect = this.newGroupGroupedSelect;
  597. this.proxyModel.groupSelectGroupClick = this.groupSelectGroupClick;
  598. this.proxyModel.radioRowCollection = this.radioRowCollection;
  599. this.proxyModel.newOptionRadio = this.newOptionRadio;
  600. //force apply update proxyModel
  601. this.controllerModalProxy.bindSpecialCtrlTemporyModelsToProxyModel();
  602. return true;
  603. }
  604. }, {
  605. key: 'resetTemporyConfig',
  606. value: function resetTemporyConfig() {
  607. this.proxyModel.temporyConfig = {
  608. formlyLabel: '',
  609. formlyRequired: false,
  610. formlyPlaceholder: '',
  611. formlyDesciption: '',
  612. formlyOptions: []
  613. };
  614. }
  615. }, {
  616. key: 'resetControl',
  617. value: function resetControl() {
  618. this.proxyModel.temporyConfig.formlyLabel = '';
  619. this.proxyModel.temporyConfig.formlyRequired = false;
  620. this.proxyModel.temporyConfig.formlyPlaceholder = '';
  621. this.proxyModel.temporyConfig.formlyDesciption = '';
  622. this.proxyModel.temporyConfig.formlyOptions = [];
  623. this.proxyModel.temporyConfig.datepickerPopup = this.initDatePicker();
  624. }
  625. }, {
  626. key: 'initDatePicker',
  627. value: function initDatePicker() {
  628. this.proxyModel.temporyConfig.datepickerPopup = this.demodt.formats[0];
  629. }
  630. }, {
  631. key: 'selectThisControl',
  632. value: function selectThisControl(controlName) {
  633. this.proxyModel.selectedControl = 'none';
  634. this.resetTemporyConfig();
  635. for (var i = this.proxyModel.controls.length - 1; i >= 0; i--) {
  636. if (this.proxyModel.controls[i].id === controlName) {
  637. this.proxyModel.selectedControl = this.proxyModel.controls[i].id;
  638. }
  639. }
  640. if (this.proxyModel.selectedControl === 'Date') this.initDatePicker();
  641. }
  642. /**
  643. * ==============================================================
  644. * specific controls management
  645. * (display, properties.... : ex : grouped Select)
  646. * ==============================================================
  647. */
  648. }, {
  649. key: 'addNewOptionRadio',
  650. value: function addNewOptionRadio() {
  651. var result = this.$selectOptionMange.addNewOptionRadio(this.radioRowCollection, this.newOptionRadio.saisie);
  652. if (result.resultFlag === false) {
  653. this.toaster.pop({
  654. type: 'warning',
  655. timeout: 2000,
  656. title: result.details,
  657. body: '\'' + this.newOptionRadio.saisie + '\' cannot be added.',
  658. showCloseButton: true
  659. });
  660. }
  661. //reset input
  662. this.newOptionRadio = { saisie: '' };
  663. }
  664. }, {
  665. key: 'removeRadioRow',
  666. value: function removeRadioRow(index) {
  667. var result = this.$selectOptionMange.removeOption(this.radioRowCollection, index);
  668. if (result.resultFlag === false) {
  669. this.toaster.pop({
  670. type: 'warning',
  671. timeout: 2000,
  672. title: result.details,
  673. body: 'Delete was cancelled.',
  674. showCloseButton: true
  675. });
  676. }
  677. }
  678. }, {
  679. key: 'upThisRadioRow',
  680. value: function upThisRadioRow(index) {
  681. var result = this.$selectOptionMange.upthisOption(this.radioRowCollection, index);
  682. if (result.resultFlag === false) {
  683. this.toaster.pop({
  684. type: 'warning',
  685. timeout: 2000,
  686. title: result.details,
  687. body: 'Operation cancelled.',
  688. showCloseButton: true
  689. });
  690. }
  691. }
  692. }, {
  693. key: 'downThisRadioRow',
  694. value: function downThisRadioRow(index) {
  695. var result = this.$selectOptionMange.downthisOption(this.radioRowCollection, index);
  696. if (result.resultFlag === false) {
  697. this.toaster.pop({
  698. type: 'warning',
  699. timeout: 2000,
  700. title: result.details,
  701. body: 'Operation cancelled.',
  702. showCloseButton: true
  703. });
  704. }
  705. }
  706. }, {
  707. key: 'addNewOptionBasicSelect',
  708. value: function addNewOptionBasicSelect() {
  709. var result = this.$selectOptionMange.addNewOptionBasicSelect(this.basicSelectRowCollection, this.newOptionBasicSelect.saisie);
  710. if (result.resultFlag === false) {
  711. this.toaster.pop({
  712. type: 'warning',
  713. timeout: 2000,
  714. title: result.details,
  715. body: '\'' + this.newOptionBasicSelect.saisie + '\' cannot be added.',
  716. showCloseButton: true
  717. });
  718. }
  719. this.newOptionBasicSelect = { saisie: '' }; //reset input
  720. }
  721. }, {
  722. key: 'removeRow',
  723. value: function removeRow(index) {
  724. var result = this.$selectOptionMange.removeOption(this.basicSelectRowCollection, index);
  725. if (result.resultFlag === false) {
  726. this.toaster.pop({
  727. type: 'warning',
  728. timeout: 2000,
  729. title: result.details,
  730. body: 'Delete was cancelled.',
  731. showCloseButton: true
  732. });
  733. }
  734. }
  735. }, {
  736. key: 'upThisRow',
  737. value: function upThisRow(index) {
  738. var result = this.$selectOptionMange.upthisOption(this.basicSelectRowCollection, index);
  739. if (result.resultFlag === false) {
  740. this.toaster.pop({
  741. type: 'warning',
  742. timeout: 2000,
  743. title: result.details,
  744. body: 'Operation cancelled.',
  745. showCloseButton: true
  746. });
  747. }
  748. }
  749. }, {
  750. key: 'downThisRow',
  751. value: function downThisRow(index) {
  752. var result = this.$selectOptionMange.downthisOption(this.basicSelectRowCollection, index);
  753. if (result.resultFlag === false) {
  754. this.toaster.pop({
  755. type: 'warning',
  756. timeout: 2000,
  757. title: result.details,
  758. body: 'Operation cancelled.',
  759. showCloseButton: true
  760. });
  761. }
  762. }
  763. }, {
  764. key: 'showGroupListToChoose',
  765. value: function showGroupListToChoose() {
  766. this.groupSelectGroupClick.showList = !this.groupSelectGroupClick.showList;
  767. }
  768. }, {
  769. key: 'addNewGroupToGroupedSelect',
  770. value: function addNewGroupToGroupedSelect() {
  771. if (this.newGroupGroupedSelect.saisie !== '') {
  772. for (var i = this.GroupedSelectGroups.list.length - 1; i >= 0; i--) {
  773. if (this.GroupedSelectGroups.list[i] === this.newGroupGroupedSelect.saisie) {
  774. this.toaster.pop({
  775. type: 'warning',
  776. timeout: 2000,
  777. title: 'Group already exists',
  778. body: 'No group added.',
  779. showCloseButton: true
  780. });
  781. }
  782. }
  783. this.GroupedSelectGroups.list.push(this.newGroupGroupedSelect.saisie);
  784. } else {
  785. this.toaster.pop({
  786. type: 'warning',
  787. timeout: 2000,
  788. title: 'Not a valid group to add',
  789. body: 'No group added.',
  790. showCloseButton: true
  791. });
  792. }
  793. this.newGroupGroupedSelect.saisie = '';
  794. }
  795. }, {
  796. key: 'addNewOptionGroupedSelect',
  797. value: function addNewOptionGroupedSelect() {
  798. var result = this.$selectOptionMange.addNewOptionGroupedSelect(this.groupedSelectRowCollection, this.newOptionGroupedSelect.saisie, '');
  799. if (result.resultFlag === false) {
  800. this.toaster.pop({
  801. type: 'warning',
  802. timeout: 2000,
  803. title: result.details,
  804. body: '\'' + this.newOptionGroupedSelect.saisie + '\' cannot be added.',
  805. showCloseButton: true
  806. });
  807. }
  808. //bind nya : dont bind here $apply is not done fast enough
  809. //bindGroupedSelectToNya();
  810. //reset input
  811. this.newOptionGroupedSelect = { saisie: '' };
  812. }
  813. }, {
  814. key: 'removeGroupedSelectRow',
  815. value: function removeGroupedSelectRow(index) {
  816. var result = this.$selectOptionMange.removeOption(this.groupedSelectRowCollection, index);
  817. if (result.resultFlag === false) {
  818. this.toaster.pop({
  819. type: 'warning',
  820. timeout: 2000,
  821. title: result.details,
  822. body: 'Delete was cancelled.',
  823. showCloseButton: true
  824. });
  825. }
  826. }
  827. }, {
  828. key: 'upThisGroupedSelectRow',
  829. value: function upThisGroupedSelectRow(index) {
  830. var result = this.$selectOptionMange.upthisOption(this.groupedSelectRowCollection, index);
  831. if (result.resultFlag === false) {
  832. this.toaster.pop({
  833. type: 'warning',
  834. timeout: 2000,
  835. title: result.details,
  836. body: 'Operation cancelled.',
  837. showCloseButton: true
  838. });
  839. }
  840. }
  841. }, {
  842. key: 'downThisGroupedSelectRow',
  843. value: function downThisGroupedSelectRow(index) {
  844. var result = this.$selectOptionMange.downthisOption(this.groupedSelectRowCollection, index);
  845. if (result.resultFlag === false) {
  846. this.toaster.pop({
  847. type: 'warning',
  848. timeout: 2000,
  849. title: result.details,
  850. body: 'Operation cancelled.',
  851. showCloseButton: true
  852. });
  853. }
  854. }
  855. }, {
  856. key: 'today',
  857. value: function today() {
  858. setToday(this.demodt);
  859. }
  860. }, {
  861. key: 'clear',
  862. value: function clear() {
  863. clearDateTime(this.demodt);
  864. }
  865. }, {
  866. key: 'open',
  867. value: function open($event) {
  868. $event.preventDefault();
  869. $event.stopPropagation();
  870. this.demodt.opened = true;
  871. }
  872. }]);
  873. return leftPanelController;
  874. })();
  875. leftPanelController.$inject = ['toaster', '$timeout', '$selectOptionMange', 'controllerModalProxy'];
  876. _export('default', leftPanelController);
  877. _export('LEFT_PANEL_CONTROLLER', LEFT_PANEL_CONTROLLER);
  878. _export('LEFT_PANEL_CONTROLLERAS', LEFT_PANEL_CONTROLLERAS);
  879. }
  880. };
  881. });
  882. $__System.registerDynamic("b", [], true, function($__require, exports, module) {
  883. ;
  884. var global = this,
  885. __define = global.define;
  886. global.define = undefined;
  887. module.exports = "<div id=\"controlEditLeftPanel\">\n\t<div class=\"pull-right\">\n\t\t<button\n type=\"button\"\n class=\"close\"\n ng-click=\"leftPanelCtrl.closeEditPanel()\"\n aria-label=\"Close\">\n\t\t\t<span\n aria-hidden=\"true\">\n &times;\n </span>\n\t\t</button>\n\t</div>\n\t<div class=\"separator10pixel\"></div>\n\t<div ng-switch on=\"leftPanelCtrl.proxyModel.temporyConfig.selectedControl\">\n\t\t<div ng-switch-when=\"none\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-sm-12\">\n\t\t\t\t\t<h5 class=\"text-center texteRouge\">\n <i class=\"fa fa-arrow-up\"></i>\n &nbsp;\n Select a control\n </h5>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div ng-switch-when=\"empty\">\n\t\t\t<left-panel-blank-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Header\">\n\t\t\t<left-panel-header-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Subtitle\">\n\t\t\t<left-panel-subtitle-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"TextInput\">\n\t\t\t<left-panel-text-input-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Password\">\n\t\t\t<left-panel-password-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Date\">\n\t\t\t<left-panel-date-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Texarea\">\n\t\t\t<left-panel-textarea-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"RichTextEditor\">\n\t\t\t<left-panel-rich-text-editor-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Radio\">\n\t\t\t<left-panel-radio-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"Checkbox\">\n\t\t\t<left-panel-check-box-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"BasicSelect\">\n\t\t\t<left-panel-basic-select-control />\n\t\t</div>\n\t\t<div ng-switch-when=\"GroupedSelect\">\n\t\t\t<left-panel-grouped-select-control />\n\t\t</div>\n\t</div>\n\t<button\n class=\"btn btn-primary btn-block pull-right\"\n ng-click=\"leftPanelCtrl.closeEditPanel()\">\n Close\n </button>\n</div>\n";
  888. global.define = __define;
  889. return module.exports;
  890. });
  891. $__System.register('c', ['8', 'b'], function (_export) {
  892. 'use strict';
  893. var LEFT_PANEL_CONTROLLER, LEFT_PANEL_CONTROLLERAS, leftPanelTemplate, LEFT_PANEL_DIRECTIVE;
  894. function leftPanel() {
  895. var directive = {
  896. restrict: 'E',
  897. template: leftPanelTemplate,
  898. scope: {},
  899. controller: LEFT_PANEL_CONTROLLER,
  900. controllerAs: LEFT_PANEL_CONTROLLERAS,
  901. bindToController: {
  902. closeEditPanel: '&',
  903. selectedControl: '&',
  904. saveFromEditPanel: '&'
  905. }
  906. };
  907. return directive;
  908. }
  909. return {
  910. setters: [function (_) {
  911. LEFT_PANEL_CONTROLLER = _.LEFT_PANEL_CONTROLLER;
  912. LEFT_PANEL_CONTROLLERAS = _.LEFT_PANEL_CONTROLLERAS;
  913. }, function (_b) {
  914. leftPanelTemplate = _b['default'];
  915. }],
  916. execute: function () {
  917. LEFT_PANEL_DIRECTIVE = 'leftPanel';
  918. leftPanel.$inject = [];
  919. _export('default', leftPanel);
  920. _export('LEFT_PANEL_DIRECTIVE', LEFT_PANEL_DIRECTIVE);
  921. }
  922. };
  923. });
  924. $__System.register('d', [], function (_export) {
  925. /* global angular */
  926. 'use strict';
  927. var resetModel, validOption;
  928. return {
  929. setters: [],
  930. execute: function () {
  931. resetModel = function resetModel(selectObj) {
  932. var zeroModel = { rows: [] };
  933. angular.copy(zeroModel, selectObj);
  934. };
  935. validOption = function validOption(selectObj, newOptionText) {
  936. var fullResponse = {
  937. resultFlag: false,
  938. details: ''
  939. };
  940. if (typeof newOptionText === 'undefined') {
  941. fullResponse.resultFlag = false;
  942. fullResponse.details = 'Entered option is empty';
  943. return fullResponse;
  944. }
  945. if (newOptionText !== '') {
  946. for (var i = selectObj.rows.length - 1; i >= 0; i--) {
  947. if (selectObj.rows[i].option === newOptionText) {
  948. fullResponse.resultFlag = false;
  949. fullResponse.details = 'Entered option is not unique';
  950. return fullResponse;
  951. }
  952. }
  953. fullResponse.resultFlag = true;
  954. fullResponse.details = '';
  955. return fullResponse;
  956. }
  957. fullResponse.resultFlag = false;
  958. fullResponse.details = 'Entered option is empty';
  959. return fullResponse;
  960. };
  961. _export('resetModel', resetModel);
  962. _export('validOption', validOption);
  963. }
  964. };
  965. });
  966. $__System.register('e', ['9', 'a', 'd'], function (_export) {
  967. var _createClass, _classCallCheck, helpers, LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE, selectOptionMange;
  968. return {
  969. setters: [function (_) {
  970. _createClass = _['default'];
  971. }, function (_a) {
  972. _classCallCheck = _a['default'];
  973. }, function (_d) {
  974. helpers = _d;
  975. }],
  976. execute: function () {
  977. /* global angular */
  978. 'use strict';
  979. LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE = '$selectOptionMange';
  980. selectOptionMange = (function () {
  981. function selectOptionMange() {
  982. _classCallCheck(this, selectOptionMange);
  983. this.init();
  984. }
  985. _createClass(selectOptionMange, [{
  986. key: 'init',
  987. value: function init() {}
  988. }, {
  989. key: 'initModel',
  990. value: function initModel(selectObj) {
  991. helpers.resetModel(selectObj);
  992. }
  993. }, {
  994. key: 'isOptionUnique',
  995. value: function isOptionUnique(selectObj, textValue) {
  996. for (var i = selectObj.rows.length - 1; i >= 0; i--) {
  997. if (selectObj.rows[i].option === textValue) return false;
  998. }
  999. return true;
  1000. }
  1001. }, {
  1002. key: 'isOptionValidFormat',
  1003. value: function isOptionValidFormat(textValue) {
  1004. if (textValue !== '') return true;
  1005. return false;
  1006. }
  1007. }, {
  1008. key: 'addNewOptionRadio',
  1009. value: function addNewOptionRadio(selectObj, newOptionText) {
  1010. var fullResponse = {
  1011. resultFlag: false,
  1012. details: ''
  1013. };
  1014. var checkResult = helpers.validOption(selectObj, newOptionText);
  1015. if (checkResult.resultFlag === true) {
  1016. var newOption = {
  1017. option: newOptionText,
  1018. order: selectObj.rows.length
  1019. };
  1020. selectObj.rows.push(newOption);
  1021. fullResponse.resultFlag = true;
  1022. fullResponse.details = '';
  1023. return fullResponse;
  1024. } else {
  1025. angular.copy(checkResult, fullResponse);
  1026. return fullResponse;
  1027. }
  1028. }
  1029. }, {
  1030. key: 'addNewOptionBasicSelect',
  1031. value: function addNewOptionBasicSelect(selectObj, newOptionText) {
  1032. var fullResponse = {
  1033. resultFlag: false,
  1034. details: ''
  1035. };
  1036. var checkResult = helpers.validOption(selectObj, newOptionText);
  1037. if (checkResult.resultFlag === true) {
  1038. var newOption = {
  1039. option: newOptionText,
  1040. order: selectObj.rows.length
  1041. };
  1042. selectObj.rows.push(newOption);
  1043. fullResponse.resultFlag = true;
  1044. fullResponse.details = '';
  1045. return fullResponse;
  1046. } else {
  1047. angular.copy(checkResult, fullResponse);
  1048. return fullResponse;
  1049. }
  1050. }
  1051. }, {
  1052. key: 'addNewOptionGroupedSelect',
  1053. value: function addNewOptionGroupedSelect(selectObj, newOptionText, newOptionGroup) {
  1054. var fullResponse = {
  1055. resultFlag: false,
  1056. details: ''
  1057. };
  1058. var checkResult = helpers.validOption(selectObj, newOptionText);
  1059. if (checkResult.resultFlag === true) {
  1060. var newOption = {
  1061. option: newOptionText,
  1062. group: newOptionGroup,
  1063. order: selectObj.rows.length
  1064. };
  1065. selectObj.rows.push(newOption);
  1066. fullResponse.resultFlag = true;
  1067. fullResponse.details = '';
  1068. return fullResponse;
  1069. } else {
  1070. angular.copy(checkResult, fullResponse);
  1071. return fullResponse;
  1072. }
  1073. }
  1074. }, {
  1075. key: 'removeOption',
  1076. value: function removeOption(selectObj, AtIndex) {
  1077. var fullResponse = {
  1078. resultFlag: false,
  1079. details: ''
  1080. };
  1081. if (AtIndex !== -1) {
  1082. selectObj.rows.splice(AtIndex, 1);
  1083. fullResponse.resultFlag = true;
  1084. fullResponse.details = '';
  1085. return fullResponse;
  1086. } else {
  1087. fullResponse.resultFlag = false;
  1088. fullResponse.details = 'Option index not valid';
  1089. return fullResponse;
  1090. }
  1091. }
  1092. }, {
  1093. key: 'upthisOption',
  1094. value: function upthisOption(selectObj, indexOption) {
  1095. var fullResponse = {
  1096. resultFlag: false,
  1097. details: ''
  1098. };
  1099. if (indexOption > -1) {
  1100. if (indexOption > 0) {
  1101. if (selectObj.rows[indexOption - 1]) {
  1102. var currentOption = selectObj.rows[indexOption];
  1103. selectObj.rows.splice(indexOption, 1);
  1104. selectObj.rows.splice(indexOption - 1, 0, currentOption);
  1105. fullResponse.resultFlag = true;
  1106. fullResponse.details = '';
  1107. return fullResponse;
  1108. } else {
  1109. fullResponse.resultFlag = false;
  1110. fullResponse.details = 'Can\'t retreive option from option index';
  1111. return fullResponse;
  1112. }
  1113. } else {
  1114. fullResponse.resultFlag = true;
  1115. fullResponse.details = '';
  1116. return fullResponse;
  1117. }
  1118. } else {
  1119. fullResponse.resultFlag = false;
  1120. fullResponse.details = 'Option index not valid';
  1121. return fullResponse;
  1122. }
  1123. }
  1124. }, {
  1125. key: 'downthisOption',
  1126. value: function downthisOption(selectObj, indexOption) {
  1127. var fullResponse = {
  1128. resultFlag: false,
  1129. details: ''
  1130. };
  1131. if (indexOption > -1) {
  1132. if (indexOption < selectObj.rows.length - 1) {
  1133. if (selectObj.rows[indexOption + 1]) {
  1134. var currentOption = selectObj.rows[indexOption];
  1135. selectObj.rows.splice(indexOption, 1);
  1136. selectObj.rows.splice(indexOption + 1, 0, currentOption);
  1137. fullResponse.resultFlag = true;
  1138. fullResponse.details = '';
  1139. return fullResponse;
  1140. } else {
  1141. fullResponse.resultFlag = false;
  1142. fullResponse.details = 'Can\'t retreive option from option index';
  1143. return fullResponse;
  1144. }
  1145. } else {
  1146. fullResponse.resultFlag = true;
  1147. fullResponse.details = '';
  1148. return fullResponse;
  1149. }
  1150. } else {
  1151. fullResponse.resultFlag = false;
  1152. fullResponse.details = 'Option index not valid';
  1153. return fullResponse;
  1154. }
  1155. }
  1156. }]);
  1157. return selectOptionMange;
  1158. })();
  1159. selectOptionMange.$inject = [];
  1160. _export('default', selectOptionMange);
  1161. _export('LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE', LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE);
  1162. }
  1163. };
  1164. });
  1165. $__System.register('f', ['9', 'a'], function (_export) {
  1166. var _createClass, _classCallCheck, CONTROLLER_MODAL_PROXY, INIT_OPTION_MODEL, controllerModalProxy;
  1167. return {
  1168. setters: [function (_2) {
  1169. _createClass = _2['default'];
  1170. }, function (_a) {
  1171. _classCallCheck = _a['default'];
  1172. }],
  1173. execute: function () {
  1174. /// <reference path="../../../../../typings/angularjs/angular.d.ts" />
  1175. /// <reference path="../../../../../typings/lodash/lodash.d.ts" />
  1176. /**
  1177. * TODO :
  1178. * - clean deprecated functions
  1179. * - method 'resetAllTemporyModels' -> remove no use angular.copy to optimize
  1180. */
  1181. 'use strict';
  1182. CONTROLLER_MODAL_PROXY = 'controllerModalProxy';
  1183. INIT_OPTION_MODEL = { rows: [] };
  1184. controllerModalProxy = (function () {
  1185. function controllerModalProxy(EasyFormGenFormlyBindingModels) {
  1186. _classCallCheck(this, controllerModalProxy);
  1187. this.EasyFormGenFormlyBindingModels = EasyFormGenFormlyBindingModels;
  1188. this.init();
  1189. }
  1190. _createClass(controllerModalProxy, [{
  1191. key: 'init',
  1192. value: function init() {
  1193. this.proxyModel = {};
  1194. this.resetProxyModel();
  1195. this.editPanelModel = {
  1196. toggle: false,
  1197. lineIndex: -1,
  1198. columnIndex: -1,
  1199. control: {}
  1200. };
  1201. this.basicSelectRowCollection = angular.copy(INIT_OPTION_MODEL);
  1202. this.newOptionBasicSelect = angular.copy({ saisie: '' });
  1203. this.groupedSelectRowCollection = angular.copy(INIT_OPTION_MODEL);
  1204. this.newOptionGroupedSelect = angular.copy({ saisie: '' });
  1205. this.GroupedSelectGroups = angular.copy({ list: [] });
  1206. this.newGroupGroupedSelect = angular.copy({ saisie: '' });
  1207. this.groupSelectGroupClick = angular.copy({ showList: false });
  1208. this.radioRowCollection = angular.copy(INIT_OPTION_MODEL);
  1209. this.newOptionRadio = angular.copy({ saisie: '' });
  1210. }
  1211. // deprecated in drag and drop version, use initProxyModel insead
  1212. }, {
  1213. key: 'initNyaSelect',
  1214. value: function initNyaSelect(nyaSelectObj) {
  1215. return this.resetNyaSelect(nyaSelectObj);
  1216. }
  1217. }, {
  1218. key: 'initProxyModel',
  1219. value: function initProxyModel(thisProxyModelToInit) {
  1220. return this.resetProxyModel(thisProxyModelToInit);
  1221. }
  1222. // deprecated : in drag and drop version, use "resetProxyModel()""
  1223. }, {
  1224. key: 'resetNyaSelect',
  1225. value: function resetNyaSelect(nyaSelectObj) {
  1226. var newNyaSelectObj = this.EasyFormGenFormlyBindingModels.getEasyFormListControls();
  1227. angular.copy(newNyaSelectObj, nyaSelectObj);
  1228. return true;
  1229. }
  1230. }, {
  1231. key: 'resetProxyModel',
  1232. value: function resetProxyModel() {
  1233. var newProxyModel = this.EasyFormGenFormlyBindingModels.getEasyFormListControls();
  1234. this.proxyModel = angular.copy(newProxyModel);
  1235. return true;
  1236. }
  1237. }, {
  1238. key: 'returnControlFromAddCtrlModalModel',
  1239. value: function returnControlFromAddCtrlModalModel(CtrlModalModel) {
  1240. var modelToReturn = {
  1241. selectedControl: 'none',
  1242. formlyType: 'none',
  1243. formlySubtype: 'none',
  1244. formlyLabel: '',
  1245. formlyRequired: false,
  1246. formlyDesciption: '',
  1247. formlyPlaceholder: '',
  1248. formlyOptions: []
  1249. };
  1250. for (var i = CtrlModalModel.controls.length - 1; i >= 0; i--) {
  1251. if (CtrlModalModel.selectedControl === CtrlModalModel.controls[i].id) {
  1252. modelToReturn.selectedControl = CtrlModalModel.selectedControl;
  1253. modelToReturn.formlyType = CtrlModalModel.controls[i].formlyType;
  1254. modelToReturn.formlySubtype = CtrlModalModel.controls[i].formlySubtype;
  1255. modelToReturn.formlyLabel = CtrlModalModel.controls[i].formlyLabel;
  1256. modelToReturn.formlyRequired = CtrlModalModel.controls[i].formlyRequired;
  1257. modelToReturn.formlyDesciption = CtrlModalModel.controls[i].formlyDesciption;
  1258. modelToReturn.formlyPlaceholder = CtrlModalModel.controls[i].formlyPlaceholder;
  1259. modelToReturn.formlyOptions = CtrlModalModel.controls[i].formlyOptions;
  1260. // particular properties, here ; datetpicker format
  1261. if (CtrlModalModel.controls[i].formlyType === 'datepicker') modelToReturn.datepickerPopup = CtrlModalModel.controls[i].datepickerPopup;
  1262. }
  1263. }
  1264. return modelToReturn;
  1265. }
  1266. }, {
  1267. key: 'validKeyUniqueness',
  1268. value: function validKeyUniqueness(thisKey, configurationObj) {
  1269. var isUnique = true;
  1270. for (var i = configurationObj.lines.length - 1; i >= 0; i--) {
  1271. for (var j = configurationObj.lines[i].columns.length - 1; j >= 0; j--) {
  1272. if (configurationObj.lines[i].columns[j].control.key === thisKey) {
  1273. isUnique = false;
  1274. }
  1275. }
  1276. }
  1277. return isUnique;
  1278. }
  1279. }, {
  1280. key: 'getSelectedProxyModel',
  1281. value: function getSelectedProxyModel(configurationSelectedCtrl) {
  1282. var selectedProxyModelControl = 'none';
  1283. var listProxyModelCTRL = angular.copy(this.EasyFormGenFormlyBindingModels.getEasyFormListControls().controls);
  1284. listProxyModelCTRL.forEach(function (control) {
  1285. if (control.formlyType === configurationSelectedCtrl.type && control.formlySubtype === configurationSelectedCtrl.subtype) {
  1286. selectedProxyModelControl = control.id;
  1287. return selectedProxyModelControl;
  1288. }
  1289. });
  1290. return selectedProxyModelControl;
  1291. }
  1292. // to refresh configuration model from edit panel
  1293. }, {
  1294. key: 'bindConfigurationModelFromProxyModel',
  1295. value: function bindConfigurationModelFromProxyModel(indexLine, numcolumn, configurationObj) {
  1296. var extractedProps = angular.copy(this.proxyModel.temporyConfig);
  1297. configurationObj.lines[indexLine].columns[numcolumn].control.selectedControl = extractedProps.selectedControl;
  1298. configurationObj.lines[indexLine].columns[numcolumn].control.type = extractedProps.formlyType;
  1299. configurationObj.lines[indexLine].columns[numcolumn].control.subtype = extractedProps.formlySubtype;
  1300. // templateOptions
  1301. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions = {
  1302. label: '',
  1303. required: false,
  1304. description: '',
  1305. placeholder: '',
  1306. options: []
  1307. };
  1308. // then bind template option
  1309. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.label = extractedProps.formlyLabel;
  1310. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.required = extractedProps.formlyRequired;
  1311. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.description = extractedProps.formlyDesciption;
  1312. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.placeholder = extractedProps.formlyPlaceholder;
  1313. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.options = extractedProps.formlyOptions;
  1314. // add additionnal — particular — properties : -> datepicker : datepickerPopup
  1315. if (configurationObj.lines[indexLine].columns[numcolumn].control.type === 'datepicker') {
  1316. configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.datepickerPopup = extractedProps.datepickerPopup;
  1317. }
  1318. // unique key (set only first time) in this model is formly control type + Date.now();
  1319. var newKey = configurationObj.lines[indexLine].columns[numcolumn].control.type + '-' + Date.now();
  1320. if (this.validKeyUniqueness(newKey, configurationObj) === true) {
  1321. configurationObj.lines[indexLine].columns[numcolumn].control.key = newKey;
  1322. } else {
  1323. newKey = configurationObj.lines[indexLine].columns[numcolumn].control.type + '-' + Date.now();
  1324. if (this.validKeyUniqueness(newKey, configurationObj) === true) {
  1325. configurationObj.lines[indexLine].columns[numcolumn].control.key = newKey;
  1326. } else {
  1327. newKey = configurationObj.lines[indexLine].columns[numcolumn].control.type + '-' + Date.now();
  1328. }
  1329. }
  1330. configurationObj.lines[indexLine].columns[numcolumn].control.edited = true;
  1331. }
  1332. /**
  1333. * set local proxyModel from Selected control in configuration model
  1334. *
  1335. * replace deprecated "getNyASelectFromSelectedLineColumn"
  1336. * -model is now named "proxyModel"
  1337. * -model is stored in this service
  1338. *
  1339. * -> it has just more sence!
  1340. */
  1341. }, {
  1342. key: 'setProxyModelFromConfigurationSelection',
  1343. value: function setProxyModelFromConfigurationSelection(configurationObj, indexLine, numcolumn) {
  1344. // data send to modal controller
  1345. if (typeof configurationObj.lines[indexLine].columns[numcolumn].control != 'undefined') {
  1346. // determine selected control from indexes and control.type and control.subtype in configuration model
  1347. this.proxyModel.selectedControl = typeof configurationObj.lines[indexLine].columns[numcolumn].control.type != 'undefined' ? this.getSelectedProxyModel(configurationObj.lines[indexLine].columns[numcolumn].control) : 'none';
  1348. this.proxyModel.temporyConfig.selectedControl = typeof configurationObj.lines[indexLine].columns[numcolumn].control.type != 'undefined' ? this.getSelectedProxyModel(configurationObj.lines[indexLine].columns[numcolumn].control) : 'none';
  1349. this.proxyModel.temporyConfig.formlyType = typeof configurationObj.lines[indexLine].columns[numcolumn].control.type != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.type : 'none';
  1350. this.proxyModel.temporyConfig.formlySubtype = typeof configurationObj.lines[indexLine].columns[numcolumn].control.subtype != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.subtype : 'none';
  1351. this.proxyModel.temporyConfig.formlyLabel = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.label != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.label : '';
  1352. this.proxyModel.temporyConfig.formlyRequired = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.required != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.required : '';
  1353. this.proxyModel.temporyConfig.formlyDesciption = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.description != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.description : '';
  1354. this.proxyModel.temporyConfig.formlyPlaceholder = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.placeholder != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.placeholder : '';
  1355. this.proxyModel.temporyConfig.formlyOptions = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.options != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.options : '';
  1356. // particular case : datepicker
  1357. if (this.proxyModel.temporyConfig.selectedControl === 'Date') {
  1358. this.proxyModel.temporyConfig.datepickerPopup = typeof configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.datepickerPopup != 'undefined' ? configurationObj.lines[indexLine].columns[numcolumn].control.templateOptions.datepickerPopup : '';
  1359. }
  1360. // console.info('debug setProxyModelFromConfigurationSelection');
  1361. // console.dir({
  1362. // selectedControl : angular.copy(this.proxyModel.selectedControl ),
  1363. // temporyConfig : angular.copy(this.proxyModel.temporyConfig)
  1364. // });
  1365. }
  1366. return this.proxyModel;
  1367. }
  1368. }, {
  1369. key: 'getProxyModel',
  1370. value: function getProxyModel() {
  1371. return this.proxyModel;
  1372. }
  1373. /**
  1374. * ============================================================
  1375. * following methods for "editPanelModel"
  1376. *
  1377. * Note this model :
  1378. * - to manage side edit control panel
  1379. * ============================================================
  1380. */
  1381. // getter : editPanelModel (whole model => type = object)
  1382. }, {
  1383. key: 'getEditPanelModelAllModel',
  1384. value: function getEditPanelModelAllModel() {
  1385. return this.editPanelModel;
  1386. }
  1387. // setter : editPanelModel (whole model => type = object)
  1388. }, {
  1389. key: 'setEditPanelModelControl',
  1390. value: function setEditPanelModelControl(newEditPanelModel) {
  1391. var successfullDone = false;
  1392. if (typeof newEditPanelModel !== 'undefined') {
  1393. angular.merge(this.editPanelModel, newEditPanelModel);
  1394. successfullDone = true;
  1395. }
  1396. return successfullDone;
  1397. }
  1398. // getter : editPanelModel.columnIndex
  1399. }, {
  1400. key: 'getEditPanelModelColumnIndex',
  1401. value: function getEditPanelModelColumnIndex() {
  1402. return this.editPanelModel.columnIndex;
  1403. }
  1404. // setter : editPanelModel.columnIndex
  1405. }, {
  1406. key: 'setEditPanelModelColumnIndex',
  1407. value: function setEditPanelModelColumnIndex(newColumnIndex) {
  1408. var successfullDone = false;
  1409. if (typeof newColumnIndex !== 'undefined') {
  1410. this.editPanelModel.columnIndex = newColumnIndex;
  1411. successfullDone = true;
  1412. }
  1413. return successfullDone;
  1414. }
  1415. // getter : editPanelModel.lineIndex
  1416. }, {
  1417. key: 'getEditPanelModelLineIndex',
  1418. value: function getEditPanelModelLineIndex() {
  1419. return this.editPanelModel.lineIndex;
  1420. }
  1421. // setter : editPanelModel.lineIndex
  1422. }, {
  1423. key: 'setEditPanelModelLineIndex',
  1424. value: function setEditPanelModelLineIndex(newLineIndex) {
  1425. var successfullDone = false;
  1426. if (typeof newLineIndex !== 'undefined') {
  1427. this.editPanelModel.lineIndex = newLineIndex;
  1428. successfullDone = true;
  1429. }
  1430. return successfullDone;
  1431. }
  1432. // getter : editPanelModel.control
  1433. }, {
  1434. key: 'getEditPanelModelControl',
  1435. value: function getEditPanelModelControl() {
  1436. return this.editPanelModel.control;
  1437. }
  1438. // getter : editPanelModel.toggle
  1439. }, {
  1440. key: 'getEditPanelModelToggle',
  1441. value: function getEditPanelModelToggle() {
  1442. return this.editPanelModel.toggle;
  1443. }
  1444. // setter : editPanelModel.toggle
  1445. }, {
  1446. key: 'setEditPanelModelToggle',
  1447. value: function setEditPanelModelToggle(newToggleValue) {
  1448. var successfullDone = false;
  1449. if (typeof newToggleValue !== 'undefined') {
  1450. this.editPanelModel.toggle = newToggleValue;
  1451. successfullDone = true;
  1452. }
  1453. return successfullDone;
  1454. }
  1455. }, {
  1456. key: 'resetAllTemporyModels',
  1457. value: function resetAllTemporyModels() {
  1458. this.basicSelectRowCollection = angular.copy(INIT_OPTION_MODEL);
  1459. this.newOptionBasicSelect = angular.copy({ saisie: '' });
  1460. this.groupedSelectRowCollection = angular.copy(INIT_OPTION_MODEL);
  1461. this.newOptionGroupedSelect = angular.copy({ saisie: '' });
  1462. this.GroupedSelectGroups = angular.copy({ list: [] });
  1463. this.newGroupGroupedSelect = angular.copy({ saisie: '' });
  1464. this.groupSelectGroupClick = angular.copy({ showList: false });
  1465. this.radioRowCollection = angular.copy(INIT_OPTION_MODEL);
  1466. this.newOptionRadio = angular.copy({ saisie: '' });
  1467. return true;
  1468. }
  1469. /**
  1470. * bindSpecialCtrlTemporyModelsToProxyModel: needed when validating after editing a control
  1471. * tempory models applied to proxyModel if control is one of these
  1472. *
  1473. * example : if selected control is a basic select options
  1474. * -> so its tempory models are bound to proxyModel
  1475. */
  1476. }, {
  1477. key: 'bindSpecialCtrlTemporyModelsToProxyModel',
  1478. value: function bindSpecialCtrlTemporyModelsToProxyModel() {
  1479. if (this.proxyModel.selectedControl === 'BasicSelect') {
  1480. this.bindBasicSelectToProxyModel(this.basicSelectRowCollection);
  1481. }
  1482. if (this.proxyModel.selectedControl === 'GroupedSelect') {
  1483. this.bindGroupedSelectToProxyModel(this.groupedSelectRowCollection);
  1484. }
  1485. if (this.proxyModel.selectedControl === 'Radio') {
  1486. this.bindRadioToProxyModel(this.radioRowCollection);
  1487. }
  1488. }
  1489. // basic select
  1490. }, {
  1491. key: 'bindBasicSelectFromProxyModel',
  1492. value: function bindBasicSelectFromProxyModel(basicSelectRowCollection) {
  1493. if (this.proxyModel.temporyConfig.formlyOptions.length > 0) {
  1494. for (var i = 0; i <= this.proxyModel.temporyConfig.formlyOptions.length - 1; i++) {
  1495. var newOption = {
  1496. 'option': this.proxyModel.temporyConfig.formlyOptions[i].name,
  1497. 'order': i,
  1498. 'group': ''
  1499. };
  1500. basicSelectRowCollection.rows.push(newOption);
  1501. }
  1502. }
  1503. }
  1504. }, {
  1505. key: 'bindBasicSelectToProxyModel',
  1506. value: function bindBasicSelectToProxyModel(basicSelectRowCollection) {
  1507. var resetNyASelectOptions = [];
  1508. this.proxyModel.temporyConfig.formlyOptions = resetNyASelectOptions;
  1509. if (basicSelectRowCollection.rows.length > 0) {
  1510. for (var i = 0; i <= basicSelectRowCollection.rows.length - 1; i++) {
  1511. var newOption = {
  1512. 'name': basicSelectRowCollection.rows[i].option,
  1513. 'value': i,
  1514. 'group': ''
  1515. };
  1516. this.proxyModel.temporyConfig.formlyOptions.push(newOption);
  1517. }
  1518. }
  1519. }
  1520. //* grouped select
  1521. }, {
  1522. key: 'bindGroupedSelectFromProxyModel',
  1523. value: function bindGroupedSelectFromProxyModel(groupedSelectRowCollection, GroupedSelectGroups) {
  1524. if (this.proxyModel.temporyConfig.formlyOptions.length > 0) {
  1525. for (var i = 0; i <= this.proxyModel.temporyConfig.formlyOptions.length - 1; i++) {
  1526. var newOption = {
  1527. 'option': this.proxyModel.temporyConfig.formlyOptions[i].name,
  1528. 'order': i,
  1529. 'group': this.proxyModel.temporyConfig.formlyOptions[i].group
  1530. };
  1531. groupedSelectRowCollection.rows.push(newOption);
  1532. }
  1533. //grouplist : thx to lodash it is easy
  1534. var filteredgroup = _.uniq(_.pluck(groupedSelectRowCollection.rows, 'group'));
  1535. angular.copy(filteredgroup, GroupedSelectGroups.list);
  1536. }
  1537. }
  1538. }, {
  1539. key: 'bindGroupedSelectToProxyModel',
  1540. value: function bindGroupedSelectToProxyModel(groupedSelectRowCollection) {
  1541. this.proxyModel.temporyConfig.formlyOptions = [];
  1542. for (var i = 0; i <= groupedSelectRowCollection.rows.length - 1; i++) {
  1543. var newOption = {
  1544. 'name': groupedSelectRowCollection.rows[i].option,
  1545. 'value': i,
  1546. 'group': groupedSelectRowCollection.rows[i].group
  1547. };
  1548. this.proxyModel.temporyConfig.formlyOptions.push(newOption);
  1549. }
  1550. }
  1551. // radio
  1552. }, {
  1553. key: 'bindRadioFromProxyModel',
  1554. value: function bindRadioFromProxyModel(radioRowCollection) {
  1555. if (this.proxyModel.temporyConfig.formlyOptions.length > 0) {
  1556. for (var i = 0; i <= this.proxyModel.temporyConfig.formlyOptions.length - 1; i++) {
  1557. var newOption = {
  1558. 'option': this.proxyModel.temporyConfig.formlyOptions[i].name,
  1559. 'order': i,
  1560. 'group': ''
  1561. };
  1562. radioRowCollection.rows.push(newOption);
  1563. }
  1564. }
  1565. }
  1566. }, {
  1567. key: 'bindRadioToProxyModel',
  1568. value: function bindRadioToProxyModel(radioRowCollection) {
  1569. var resetproxyModelOptions = [];
  1570. this.proxyModel.temporyConfig.formlyOptions = resetproxyModelOptions;
  1571. if (radioRowCollection.rows.length > 0) {
  1572. for (var i = 0; i <= radioRowCollection.rows.length - 1; i++) {
  1573. var newOption = {
  1574. 'name': radioRowCollection.rows[i].option,
  1575. 'value': i,
  1576. 'group': ''
  1577. };
  1578. this.proxyModel.temporyConfig.formlyOptions.push(newOption);
  1579. }
  1580. }
  1581. }
  1582. }]);
  1583. return controllerModalProxy;
  1584. })();
  1585. controllerModalProxy.$inject = ['EasyFormGenFormlyBindingModels'];
  1586. _export('default', controllerModalProxy);
  1587. _export('CONTROLLER_MODAL_PROXY', CONTROLLER_MODAL_PROXY);
  1588. }
  1589. };
  1590. });
  1591. $__System.registerDynamic("10", [], true, function($__require, exports, module) {
  1592. ;
  1593. var global = this,
  1594. __define = global.define;
  1595. global.define = undefined;
  1596. module.exports = "<div class=\"modal-footer\">\n <button\n class=\"btn btn-danger pull-left\"\n ng-click=\"leftPanelCtrl.resetControl()\">\n <i class=\"fa fa-refresh\"></i>\n &nbsp;\n Reset\n </button>\n <button\n class=\"btn btn-success pull-right\"\n ng-click=\"leftPanelCtrl.updateSpecialControl(); leftPanelCtrl.saveFromEditPanel();\">\n <i class=\"fa fa-floppy-o\"></i>\n &nbsp;\n Save\n </button>\n</div>\n";
  1597. global.define = __define;
  1598. return module.exports;
  1599. });
  1600. $__System.register('11', ['10'], function (_export) {
  1601. 'use strict';
  1602. var leftPanelValidEditFooterTemplate, LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE;
  1603. function leftPanelValidEditFooter() {
  1604. var directive = {
  1605. restrict: 'E',
  1606. template: leftPanelValidEditFooterTemplate
  1607. };
  1608. return directive;
  1609. }
  1610. return {
  1611. setters: [function (_) {
  1612. leftPanelValidEditFooterTemplate = _['default'];
  1613. }],
  1614. execute: function () {
  1615. LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE = 'leftPanelValidEditFooter';
  1616. leftPanelValidEditFooter.$inject = [];
  1617. _export('default', leftPanelValidEditFooter);
  1618. _export('LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE', LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE);
  1619. }
  1620. };
  1621. });
  1622. $__System.registerDynamic("12", [], true, function($__require, exports, module) {
  1623. ;
  1624. var global = this,
  1625. __define = global.define;
  1626. global.define = undefined;
  1627. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\"\n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextplaceholderUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n placeholder :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyPlaceholder\"\n id=\"inputTextplaceholderUpdate\"\n placeholder=\"Add / edit placeholder text here\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"\">\n <label\n for=\"inputTextRequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">&nbsp;</div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"inputTextRequiredUpdate\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextDescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\" \n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"inputTextDescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1628. global.define = __define;
  1629. return module.exports;
  1630. });
  1631. $__System.register('13', ['12'], function (_export) {
  1632. 'use strict';
  1633. var leftPanelTextInputControlTemplate, LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE;
  1634. function leftPanelTextInputControl() {
  1635. var directive = {
  1636. restrict: 'E',
  1637. template: leftPanelTextInputControlTemplate
  1638. };
  1639. return directive;
  1640. }
  1641. return {
  1642. setters: [function (_) {
  1643. leftPanelTextInputControlTemplate = _['default'];
  1644. }],
  1645. execute: function () {
  1646. LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE = 'leftPanelTextInputControl';
  1647. leftPanelTextInputControl.$inject = [];
  1648. _export('default', leftPanelTextInputControl);
  1649. _export('LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE', LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE);
  1650. }
  1651. };
  1652. });
  1653. $__System.registerDynamic("14", [], true, function($__require, exports, module) {
  1654. ;
  1655. var global = this,
  1656. __define = global.define;
  1657. global.define = undefined;
  1658. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\" \n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"\">\n <label\n for=\"RequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">\n &nbsp;\n </div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"RequiredUpdate\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1659. global.define = __define;
  1660. return module.exports;
  1661. });
  1662. $__System.register('15', ['14'], function (_export) {
  1663. 'use strict';
  1664. var leftPanelTextareaControlTemplate, LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE;
  1665. function leftPanelTextareaControl() {
  1666. var directive = {
  1667. restrict: 'E',
  1668. template: leftPanelTextareaControlTemplate
  1669. };
  1670. return directive;
  1671. }
  1672. return {
  1673. setters: [function (_) {
  1674. leftPanelTextareaControlTemplate = _['default'];
  1675. }],
  1676. execute: function () {
  1677. LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE = 'leftPanelTextareaControl';
  1678. leftPanelTextareaControl.$inject = [];
  1679. _export('default', leftPanelTextareaControl);
  1680. _export('LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE', LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE);
  1681. }
  1682. };
  1683. });
  1684. $__System.registerDynamic("16", [], true, function($__require, exports, module) {
  1685. ;
  1686. var global = this,
  1687. __define = global.define;
  1688. global.define = undefined;
  1689. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextDescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Subtitle text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\" \n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"inputSubtitleTextUpdate\"\n placeholder=\"Add / edit subtitle text here\" >\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1690. global.define = __define;
  1691. return module.exports;
  1692. });
  1693. $__System.register('17', ['16'], function (_export) {
  1694. 'use strict';
  1695. var leftPanelSubtitleControlTemplate, LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE;
  1696. function leftPanelSubtitleControl() {
  1697. var directive = {
  1698. restrict: 'E',
  1699. template: leftPanelSubtitleControlTemplate
  1700. };
  1701. return directive;
  1702. }
  1703. return {
  1704. setters: [function (_) {
  1705. leftPanelSubtitleControlTemplate = _['default'];
  1706. }],
  1707. execute: function () {
  1708. LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE = 'leftPanelSubtitleControl';
  1709. leftPanelSubtitleControl.$inject = [];
  1710. _export('default', leftPanelSubtitleControl);
  1711. _export('LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE', LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE);
  1712. }
  1713. };
  1714. });
  1715. $__System.registerDynamic("18", [], true, function($__require, exports, module) {
  1716. ;
  1717. var global = this,
  1718. __define = global.define;
  1719. global.define = undefined;
  1720. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp; Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1721. global.define = __define;
  1722. return module.exports;
  1723. });
  1724. $__System.register('19', ['18'], function (_export) {
  1725. 'use strict';
  1726. var leftPanelRichTextEditorControlTemplate, LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE;
  1727. function leftPanelRichTextEditorControl() {
  1728. var directive = {
  1729. restrict: 'E',
  1730. template: leftPanelRichTextEditorControlTemplate
  1731. };
  1732. return directive;
  1733. }
  1734. return {
  1735. setters: [function (_) {
  1736. leftPanelRichTextEditorControlTemplate = _['default'];
  1737. }],
  1738. execute: function () {
  1739. LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE = 'leftPanelRichTextEditorControl';
  1740. leftPanelRichTextEditorControl.$inject = [];
  1741. _export('default', leftPanelRichTextEditorControl);
  1742. _export('LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE', LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE);
  1743. }
  1744. };
  1745. });
  1746. $__System.registerDynamic("1a", [], true, function($__require, exports, module) {
  1747. ;
  1748. var global = this,
  1749. __define = global.define;
  1750. global.define = undefined;
  1751. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n for=\"radioRowCollection\"\n class=\" control-label greyText editPropertiesLabel\">\n Add new radio :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div>\n <div class=\"form-group\">\n <div class=\"col-sm-9 col-xs-9 col-md-9 col-lg-9\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"inputAddNewRadioOption\"\n placeholder=\"add new radio\"\n ng-model=\"leftPanelCtrl.newOptionRadio.saisie\">\n </div>\n <div class=\"col-sm-3 col-xs-3 col-md-3 col-lg-3\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.addNewOptionRadio()\">\n add\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n for=\"radioRowCollection\"\n class=\" control-label greyText editPropertiesLabel\">\n Edit/Remove radio :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class-\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"container\">\n <div ng-show=\"leftPanelCtrl.radioRowCollection.rows.length === 0\">\n <h5 class=\"text-center greyText\">\n <em>\n - no radio : add new radio values -\n </em>\n </h5>\n </div>\n <table\n ng-if=\"leftPanelCtrl.radioRowCollection.rows.length > 0\"\n class=\"table table-striped\">\n <thead>\n <tr>\n <th st-ratio=\"20\">\n order\n </th>\n <th st-ratio=\"55\">\n option\n </th>\n <th st-ratio=\"25\">\n </th>\n </tr>\n <tr>\n <th st-ratio=\"20\">\n </th>\n <th st-ratio=\"55\">\n <input\n ng-model=\"radioFilter\"\n placeholder=\"search for option\"\n class=\"input-sm form-control\"\n type=\"search\" />\n </th>\n <th st-ratio=\"25\"></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat=\"radioRow in leftPanelCtrl.radioRowCollection.rows | filter:radioFilter as radioRow\">\n <td st-ratio=\"20\">\n {{$index}}\n </td>\n <td st-ratio=\"55\">\n {{radioRow.option}}\n </td>\n <td st-ratio=\"25\">\n <div class=\"pull-right\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.upThisRadioRow($index)\">\n <i class=\"fa fa-arrow-up\"></i>\n </button>\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.downThisRadioRow($index)\">\n <i class=\"fa fa-arrow-down\"></i>\n </button>\n <button\n class=\"btn btn-danger\"\n ng-click=\"leftPanelCtrl.removeRadioRow($index)\">\n <i class=\"fa fa-trash-o\"></i>\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\"\n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"\">\n <label\n for=\"RequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">&nbsp;</div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"RequiredUpdate\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1752. global.define = __define;
  1753. return module.exports;
  1754. });
  1755. $__System.register('1b', ['1a'], function (_export) {
  1756. 'use strict';
  1757. var leftPanelRadioControlTemplate, LEFT_PANEL_RADIO_CONTROL_DIRECTIVE;
  1758. function leftPanelRadioControl() {
  1759. var directive = {
  1760. restrict: 'E',
  1761. template: leftPanelRadioControlTemplate
  1762. };
  1763. return directive;
  1764. }
  1765. return {
  1766. setters: [function (_a) {
  1767. leftPanelRadioControlTemplate = _a['default'];
  1768. }],
  1769. execute: function () {
  1770. LEFT_PANEL_RADIO_CONTROL_DIRECTIVE = 'leftPanelRadioControl';
  1771. leftPanelRadioControl.$inject = [];
  1772. _export('default', leftPanelRadioControl);
  1773. _export('LEFT_PANEL_RADIO_CONTROL_DIRECTIVE', LEFT_PANEL_RADIO_CONTROL_DIRECTIVE);
  1774. }
  1775. };
  1776. });
  1777. $__System.registerDynamic("1c", [], true, function($__require, exports, module) {
  1778. ;
  1779. var global = this,
  1780. __define = global.define;
  1781. global.define = undefined;
  1782. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\" \n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\"\n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\" >\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"placeholderUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n placeholder :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyPlaceholder\"\n id=\"inputTextplaceholderUpdate\"\n placeholder=\"Add / edit placeholder text here\" >\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"\">\n <label\n for=\"RequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">&nbsp;</div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"RequiredUpdate\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\" >\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1783. global.define = __define;
  1784. return module.exports;
  1785. });
  1786. $__System.register('1d', ['1c'], function (_export) {
  1787. 'use strict';
  1788. var leftPanelPasswordControlTemplate, LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE;
  1789. function leftPanelPasswordControl() {
  1790. var directive = {
  1791. restrict: 'E',
  1792. template: leftPanelPasswordControlTemplate
  1793. };
  1794. return directive;
  1795. }
  1796. return {
  1797. setters: [function (_c) {
  1798. leftPanelPasswordControlTemplate = _c['default'];
  1799. }],
  1800. execute: function () {
  1801. LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE = 'leftPanelPasswordControl';
  1802. leftPanelPasswordControl.$inject = [];
  1803. _export('default', leftPanelPasswordControl);
  1804. _export('LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE', LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE);
  1805. }
  1806. };
  1807. });
  1808. $__System.registerDynamic("1e", [], true, function($__require, exports, module) {
  1809. ;
  1810. var global = this,
  1811. __define = global.define;
  1812. global.define = undefined;
  1813. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextDescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Header text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"inputHeaderTextUpdate\"\n placeholder=\"Add / edit header text here\" >\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1814. global.define = __define;
  1815. return module.exports;
  1816. });
  1817. $__System.register('1f', ['1e'], function (_export) {
  1818. 'use strict';
  1819. var leftPanelHeaderControlTemplate, LEFT_PANEL_HEADER_CONTROL_DIRECTIVE;
  1820. function leftPanelHeaderControl() {
  1821. var directive = {
  1822. restrict: 'E',
  1823. template: leftPanelHeaderControlTemplate
  1824. };
  1825. return directive;
  1826. }
  1827. return {
  1828. setters: [function (_e) {
  1829. leftPanelHeaderControlTemplate = _e['default'];
  1830. }],
  1831. execute: function () {
  1832. LEFT_PANEL_HEADER_CONTROL_DIRECTIVE = 'leftPanelHeaderControl';
  1833. leftPanelHeaderControl.$inject = [];
  1834. _export('default', leftPanelHeaderControl);
  1835. _export('LEFT_PANEL_HEADER_CONTROL_DIRECTIVE', LEFT_PANEL_HEADER_CONTROL_DIRECTIVE);
  1836. }
  1837. };
  1838. });
  1839. $__System.registerDynamic("20", [], true, function($__require, exports, module) {
  1840. ;
  1841. var global = this,
  1842. __define = global.define;
  1843. global.define = undefined;
  1844. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n for=\"groupedSelectRowCollection\"\n class=\"control-label greyText editPropertiesLabel\">\n Add new options :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div>\n <div class=\"form-group\">\n <div class=\"col-sm-9 col-xs-9 col-md-9 col-lg-9\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"inputAddNewGroupedOption\"\n placeholder=\"add new option\"\n ng-model=\"leftPanelCtrl.newOptionGroupedSelect.saisie\">\n </div>\n <div class=\"col-sm-3 col-xs-3 col-md-3 col-lg-3\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.addNewOptionGroupedSelect()\">\n add\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n for=\"groupedSelectRowCollection\"\n class=\" control-label greyText editPropertiesLabel\">\n Add new groups :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div>\n <div class=\"form-group\">\n <div class=\"col-sm-9 col-xs-9 col-md-9 col-lg-9\">\n <input\n id=\"inputAddNewGroupGroupedOption\"\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.newGroupGroupedSelect.saisie\"\n placeholder=\"Add new group\">\n </div>\n <div class=\"col-sm-3 col-xs-3 col-md-3 col-lg-3\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.addNewGroupToGroupedSelect()\">\n add\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n class=\" control-label greyText editPropertiesLabel\">\n Edit/Remove options/groups:\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class-\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"container\">\n <div ng-if=\"leftPanelCtrl.groupedSelectRowCollection.rows.length === 0\">\n <h5 class=\"text-center greyText\">\n <em>\n - no option : add new options -\n </em>\n </h5>\n </div>\n <table\n ng-if=\"leftPanelCtrl.groupedSelectRowCollection.rows.length > 0\"\n class=\"table table-striped\">\n <thead>\n <tr>\n <th st-ratio=\"20\">\n order\n </th>\n <th st-ratio=\"25\">\n group\n </th>\n <th st-ratio=\"30\">\n option\n </th>\n <th st-ratio=\"25\"></th>\n </tr>\n <tr>\n <th st-ratio=\"20\"></th>\n <th st-ratio=\"25\"></th>\n <th st-ratio=\"30\">\n <input\n ng-model=\"groupedSelectFilter\"\n placeholder=\"search for option\"\n class=\"input-sm form-control\"\n type=\"search\" />\n </th>\n <th st-ratio=\"25\"></th>\n </tr>\n </thead>\n <tbody>\n <tr\n ng-repeat=\"groupedSelectRow in leftPanelCtrl.groupedSelectRowCollection.rows | filter:groupedSelectFilter as groupedSelectRow\">\n <td st-ratio=\"20\">\n {{$index}}\n </td>\n <td st-ratio=\"25\">\n <div ng-if=\"leftPanelCtrl.groupSelectGroupClick.showList === true\">\n <div ng-if=\"leftPanelCtrl.GroupedSelectGroups.list.length === 0\">\n <p class=\"text-left noGroupText\">\n - add new groups -\n </p>\n </div>\n <div ng-if=\"leftPanelCtrl.GroupedSelectGroups.list.length > 0\">\n <ol\n class=\"nya-bs-select col-sm-12 col-xs-12 col-md-12 col-lg12 editGroupedSelectnyaSelect\"\n ng-model=\"groupedSelectRow.group\"\n id=\"modelGroupedOptionGroupedChoose\"\n disabled=\"leftPanelCtrl.GroupedSelectGroups.list.length === 0\">\n <li\n class=\"nya-bs-option\"\n nya-bs-option=\"GroupedSelectGroup in leftPanelCtrl.GroupedSelectGroups.list\"\n value=\"GroupedSelectGroup\">\n <a>\n {{GroupedSelectGroup}}\n </a>\n </li>\n </ol>\n </div>\n </div>\n <div ng-if=\"leftPanelCtrl.groupSelectGroupClick.showList === false\">\n {{groupedSelectRow.group}}\n </div>\n </td>\n <td st-ratio=\"30\">\n {{groupedSelectRow.option}}\n </td>\n <td st-ratio=\"25\">\n <div class=\"pull-right\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.upThisGroupedSelectRow($index)\">\n <i class=\"fa fa-arrow-up\"></i>\n </button>\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.downThisGroupedSelectRow($index)\">\n <i class=\"fa fa-arrow-down\"></i>\n </button>\n <button\n class=\"btn btn-warning\"\n ng-click=\"leftPanelCtrl.showGroupListToChoose()\">\n <i class=\"fa fa-pencil-square-o\"></i>\n </button>\n <button\n class=\"btn btn-danger\"\n ng-click=\"leftPanelCtrl.removeGroupedSelectRow($index)\">\n <i class=\"fa fa-trash-o\"></i>\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n\t\t\t\t<div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n\t\t\t\t</div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1845. global.define = __define;
  1846. return module.exports;
  1847. });
  1848. $__System.register('21', ['20'], function (_export) {
  1849. 'use strict';
  1850. var leftPanelGroupedSelectControlTemplate, LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE;
  1851. function leftPanelGroupedSelectControl() {
  1852. var directive = {
  1853. restrict: 'E',
  1854. template: leftPanelGroupedSelectControlTemplate
  1855. };
  1856. return directive;
  1857. }
  1858. return {
  1859. setters: [function (_) {
  1860. leftPanelGroupedSelectControlTemplate = _['default'];
  1861. }],
  1862. execute: function () {
  1863. LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE = 'leftPanelGroupedSelectControl';
  1864. leftPanelGroupedSelectControl.$inject = [];
  1865. _export('default', leftPanelGroupedSelectControl);
  1866. _export('LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE', LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE);
  1867. }
  1868. };
  1869. });
  1870. $__System.registerDynamic("22", [], true, function($__require, exports, module) {
  1871. ;
  1872. var global = this,
  1873. __define = global.define;
  1874. global.define = undefined;
  1875. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <label class=\"control-label greyText editPropertiesLabel\">\n Date format :\n </label>\n <div class=\"\">\n <ol\n class=\"nya-bs-select col-sm-12 col-xs-12 col-md-12 col-lg12\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.datepickerPopup\"\n id=\"dateformatSelect\">\n <li\n class=\"nya-bs-option\"\n nya-bs-option=\"dateformat in leftPanelCtrl.demodt.formats\"\n value=\"dateformat\">\n <a>\n {{dateformat}}\n </a>\n </li>\n </ol>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\"\n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"\">\n <label\n for=\"RequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">&nbsp;</div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"RequiredUpdate\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1876. global.define = __define;
  1877. return module.exports;
  1878. });
  1879. $__System.register('23', ['22'], function (_export) {
  1880. 'use strict';
  1881. var leftPanelDateControlTemplate, LEFT_PANEL_DATE_CONTROL_DIRECTIVE;
  1882. function leftPanelDateControl() {
  1883. var directive = {
  1884. restrict: 'E',
  1885. template: leftPanelDateControlTemplate
  1886. };
  1887. return directive;
  1888. }
  1889. return {
  1890. setters: [function (_) {
  1891. leftPanelDateControlTemplate = _['default'];
  1892. }],
  1893. execute: function () {
  1894. LEFT_PANEL_DATE_CONTROL_DIRECTIVE = 'leftPanelDateControl';
  1895. leftPanelDateControl.$inject = [];
  1896. _export('default', leftPanelDateControl);
  1897. _export('LEFT_PANEL_DATE_CONTROL_DIRECTIVE', LEFT_PANEL_DATE_CONTROL_DIRECTIVE);
  1898. }
  1899. };
  1900. });
  1901. $__System.registerDynamic("24", [], true, function($__require, exports, module) {
  1902. ;
  1903. var global = this,
  1904. __define = global.define;
  1905. global.define = undefined;
  1906. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"col-md-12\">\n <label\n for=\"inputTextLabelUpdate\"\n class=\" control-label greyText editPropertiesLabel\">\n Label text :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyLabel\"\n id=\"inputTextLabelUpdate\"\n placeholder=\"Add / edit control label here\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"\">\n <label\n for=\"RequiredUpdate\"\n class=\"col-md-4 control-label greyText editPropertiesLabel\">\n Required :\n </label>\n <div class=\"col-md-8\">\n <div class=\"checkboxCssCorrection\">&nbsp;</div>\n <input\n type=\"checkbox\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyRequired\"\n id=\"RequiredUpdate\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t\t\t<div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n \t\t\t</div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1907. global.define = __define;
  1908. return module.exports;
  1909. });
  1910. $__System.register('25', ['24'], function (_export) {
  1911. 'use strict';
  1912. var leftPanelCheckBoxControlTemplate, LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE;
  1913. function leftPanelCheckBoxControl() {
  1914. var directive = {
  1915. restrict: 'E',
  1916. template: leftPanelCheckBoxControlTemplate
  1917. };
  1918. return directive;
  1919. }
  1920. return {
  1921. setters: [function (_) {
  1922. leftPanelCheckBoxControlTemplate = _['default'];
  1923. }],
  1924. execute: function () {
  1925. LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE = 'leftPanelCheckBoxControl';
  1926. leftPanelCheckBoxControl.$inject = [];
  1927. _export('default', leftPanelCheckBoxControl);
  1928. _export('LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE', LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE);
  1929. }
  1930. };
  1931. });
  1932. $__System.registerDynamic("26", [], true, function($__require, exports, module) {
  1933. ;
  1934. var global = this,
  1935. __define = global.define;
  1936. global.define = undefined;
  1937. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp; \n Edit :\n </h5>\n </div>\n </div> \n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h5 class=\"text-center greyText\">\n Column will be blank\n </h5>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1938. global.define = __define;
  1939. return module.exports;
  1940. });
  1941. $__System.register('27', ['26'], function (_export) {
  1942. 'use strict';
  1943. var leftPanelBlankControlTemplate, LEFT_PANEL_BLANK_CONTROL_DIRECTIVE;
  1944. function leftPanelBlankControl() {
  1945. var directive = {
  1946. restrict: 'E',
  1947. template: leftPanelBlankControlTemplate
  1948. };
  1949. return directive;
  1950. }
  1951. return {
  1952. setters: [function (_) {
  1953. leftPanelBlankControlTemplate = _['default'];
  1954. }],
  1955. execute: function () {
  1956. LEFT_PANEL_BLANK_CONTROL_DIRECTIVE = 'leftPanelBlankControl';
  1957. leftPanelBlankControl.$inject = [];
  1958. _export('default', leftPanelBlankControl);
  1959. _export('LEFT_PANEL_BLANK_CONTROL_DIRECTIVE', LEFT_PANEL_BLANK_CONTROL_DIRECTIVE);
  1960. }
  1961. };
  1962. });
  1963. $__System.registerDynamic("28", [], true, function($__require, exports, module) {
  1964. ;
  1965. var global = this,
  1966. __define = global.define;
  1967. global.define = undefined;
  1968. module.exports = "<div class=\"panel panel-default\">\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h5 class=\"greyText\">\n <i class=\"fa fa-pencil-square-o\"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label\n for=\"basicSelectRowCollection\"\n class=\" control-label greyText editPropertiesLabel\">\n Add new options :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div>\n <div class=\"form-group\">\n <div class=\"col-sm-9 col-xs-9 col-md-9 col-lg-9\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"inputAddNewBasicOption\"\n placeholder=\"add new option\"\n ng-model=\"leftPanelCtrl.newOptionBasicSelect.saisie\">\n </div>\n <div class=\"col-sm-3 col-xs-3 col-md-3 col-lg-3\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.addNewOptionBasicSelect()\">\n add\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12\">\n <label class=\" control-label greyText editPropertiesLabel\">\n Edit/Remove options :\n </label>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"form-group\">\n <div class-\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"container\">\n <div ng-if=\"leftPanelCtrl.basicSelectRowCollection.rows.length === 0\">\n <h5 class=\"text-center greyText\">\n <em>\n - no option : add new options -\n </em>\n </h5>\n </div>\n <table\n ng-if=\"leftPanelCtrl.basicSelectRowCollection.rows.length > 0\"\n class=\"table table-striped\">\n <thead>\n <tr>\n <th st-ratio=\"20\">\n order\n </th>\n <th st-ratio=\"55\">\n option\n </th>\n <th st-ratio=\"25\"></th>\n </tr>\n <tr>\n <th st-ratio=\"20\"></th>\n <th st-ratio=\"55\">\n <input\n ng-model=\"leftPanelCtrl.basicSelectFilter\"\n placeholder=\"search for option\"\n class=\"input-sm form-control\"\n type=\"search\" />\n </th>\n <th st-ratio=\"25\"></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat=\"basicSelectRow in leftPanelCtrl.basicSelectRowCollection.rows | filter:basicSelectFilter as basicSelectRow\">\n <td st-ratio=\"20\">\n {{$index}}\n </td>\n <td st-ratio=\"55\">\n {{basicSelectRow.option}}\n </td>\n <td st-ratio=\"25\">\n <div class=\"pull-right\">\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.upThisRow($index)\">\n <i class=\"fa fa-arrow-up\"></i>\n </button>\n <button\n class=\"btn btn-primary\"\n ng-click=\"leftPanelCtrl.downThisRow($index)\">\n <i class=\"fa fa-arrow-down\"></i>\n </button>\n <button\n class=\"btn btn-danger\"\n ng-click=\"leftPanelCtrl.removeRow($index)\">\n <i class=\"fa fa-trash-o\"></i>\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n <div class=\"marginTopFivepixels\"></div>\n <div class=\"row\">\n <div class=\"form-group\">\n \t<div class=\"col-md-12\">\n <label\n for=\"DescriptionUpdate\"\n class=\"control-label greyText editPropertiesLabel\">\n Description :\n </label>\n <div class=\"\">\n <input\n type=\"text\"\n class=\"form-control\"\n ng-model=\"leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption\"\n id=\"DescriptionUpdate\"\n placeholder=\"Add / edit description here\">\n </div>\n \t</div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n";
  1969. global.define = __define;
  1970. return module.exports;
  1971. });
  1972. $__System.register('29', ['28'], function (_export) {
  1973. 'use strict';
  1974. var leftPanelBasicSelectControlTemplate, LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE;
  1975. function leftPanelBasicSelectControl() {
  1976. var directive = {
  1977. restrict: 'E',
  1978. template: leftPanelBasicSelectControlTemplate
  1979. };
  1980. return directive;
  1981. }
  1982. return {
  1983. setters: [function (_) {
  1984. leftPanelBasicSelectControlTemplate = _['default'];
  1985. }],
  1986. execute: function () {
  1987. LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE = 'leftPanelBasicSelectControl';
  1988. leftPanelBasicSelectControl.$inject = [];
  1989. _export('default', leftPanelBasicSelectControl);
  1990. _export('LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE', LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE);
  1991. }
  1992. };
  1993. });
  1994. $__System.register('2a', ['8', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', 'c', 'e', 'f', '1b', '1d', '1f'], function (_export) {
  1995. /* global angular */
  1996. 'use strict';
  1997. var leftPanelController, LEFT_PANEL_CONTROLLER, leftPanelValidEditFooter, LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE, leftPanelTextInputControl, LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE, leftPanelTextareaControl, LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE, leftPanelSubtitleControl, LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE, leftPanelRichTextEditorControl, LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE, leftPanelGroupedSelectControl, LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE, leftPanelDateControl, LEFT_PANEL_DATE_CONTROL_DIRECTIVE, leftPanelCheckBoxControl, LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE, leftPanelBlankControl, LEFT_PANEL_BLANK_CONTROL_DIRECTIVE, leftPanelBasicSelectControl, LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE, leftPanel, LEFT_PANEL_DIRECTIVE, selectOptionMange, LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE, controllerModalProxy, CONTROLLER_MODAL_PROXY, leftPanelRadioControl, LEFT_PANEL_RADIO_CONTROL_DIRECTIVE, leftPanelPasswordControl, LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE, leftPanelHeaderControl, LEFT_PANEL_HEADER_CONTROL_DIRECTIVE, LEFT_PANEL_MODULE;
  1998. return {
  1999. setters: [function (_) {
  2000. leftPanelController = _['default'];
  2001. LEFT_PANEL_CONTROLLER = _.LEFT_PANEL_CONTROLLER;
  2002. }, function (_2) {
  2003. leftPanelValidEditFooter = _2['default'];
  2004. LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE = _2.LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE;
  2005. }, function (_3) {
  2006. leftPanelTextInputControl = _3['default'];
  2007. LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE = _3.LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE;
  2008. }, function (_4) {
  2009. leftPanelTextareaControl = _4['default'];
  2010. LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE = _4.LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE;
  2011. }, function (_5) {
  2012. leftPanelSubtitleControl = _5['default'];
  2013. LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE = _5.LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE;
  2014. }, function (_6) {
  2015. leftPanelRichTextEditorControl = _6['default'];
  2016. LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE = _6.LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE;
  2017. }, function (_7) {
  2018. leftPanelGroupedSelectControl = _7['default'];
  2019. LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE = _7.LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE;
  2020. }, function (_8) {
  2021. leftPanelDateControl = _8['default'];
  2022. LEFT_PANEL_DATE_CONTROL_DIRECTIVE = _8.LEFT_PANEL_DATE_CONTROL_DIRECTIVE;
  2023. }, function (_9) {
  2024. leftPanelCheckBoxControl = _9['default'];
  2025. LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE = _9.LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE;
  2026. }, function (_10) {
  2027. leftPanelBlankControl = _10['default'];
  2028. LEFT_PANEL_BLANK_CONTROL_DIRECTIVE = _10.LEFT_PANEL_BLANK_CONTROL_DIRECTIVE;
  2029. }, function (_11) {
  2030. leftPanelBasicSelectControl = _11['default'];
  2031. LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE = _11.LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE;
  2032. }, function (_c) {
  2033. leftPanel = _c['default'];
  2034. LEFT_PANEL_DIRECTIVE = _c.LEFT_PANEL_DIRECTIVE;
  2035. }, function (_e) {
  2036. selectOptionMange = _e['default'];
  2037. LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE = _e.LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE;
  2038. }, function (_f) {
  2039. controllerModalProxy = _f['default'];
  2040. CONTROLLER_MODAL_PROXY = _f.CONTROLLER_MODAL_PROXY;
  2041. }, function (_b) {
  2042. leftPanelRadioControl = _b['default'];
  2043. LEFT_PANEL_RADIO_CONTROL_DIRECTIVE = _b.LEFT_PANEL_RADIO_CONTROL_DIRECTIVE;
  2044. }, function (_d) {
  2045. leftPanelPasswordControl = _d['default'];
  2046. LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE = _d.LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE;
  2047. }, function (_f2) {
  2048. leftPanelHeaderControl = _f2['default'];
  2049. LEFT_PANEL_HEADER_CONTROL_DIRECTIVE = _f2.LEFT_PANEL_HEADER_CONTROL_DIRECTIVE;
  2050. }],
  2051. execute: function () {
  2052. LEFT_PANEL_MODULE = 'edaDragDropWay.leftPanel.module';
  2053. _export('default', angular.module(LEFT_PANEL_MODULE, []).directive(LEFT_PANEL_DIRECTIVE, leftPanel).controller(LEFT_PANEL_CONTROLLER, leftPanelController).service(LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE, selectOptionMange).service(CONTROLLER_MODAL_PROXY, controllerModalProxy).directive(LEFT_PANEL_VALID_EDIT_FOOTER_DIRECTIVE, leftPanelValidEditFooter).directive(LEFT_PANEL_TEXT_INPUT_CONTROL_DIRECTIVE, leftPanelTextInputControl).directive(LEFT_PANEL_TEXTAREA_CONTROL_DIRECTIVE, leftPanelTextareaControl).directive(LEFT_PANEL_SUBTITLE_CONTROL_DIRECTIVE, leftPanelSubtitleControl).directive(LEFT_PANEL_RICH_TEXT_EDITOR_CONTROL_DIRECTIVE, leftPanelRichTextEditorControl).directive(LEFT_PANEL_RADIO_CONTROL_DIRECTIVE, leftPanelRadioControl).directive(LEFT_PANEL_PASSWORD_CONTROL_DIRECTIVE, leftPanelPasswordControl).directive(LEFT_PANEL_HEADER_CONTROL_DIRECTIVE, leftPanelHeaderControl).directive(LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE, leftPanelGroupedSelectControl).directive(LEFT_PANEL_DATE_CONTROL_DIRECTIVE, leftPanelDateControl).directive(LEFT_PANEL_CHECKBOX_CONTROL_DIRECTIVE, leftPanelCheckBoxControl).directive(LEFT_PANEL_BLANK_CONTROL_DIRECTIVE, leftPanelBlankControl).directive(LEFT_PANEL_BASIC_SELECT_CONTROL_DIRECTIVE, leftPanelBasicSelectControl));
  2054. }
  2055. };
  2056. });
  2057. $__System.register('2b', ['9', 'a'], function (_export) {
  2058. var _createClass, _classCallCheck, FORM_FIELD_MANAGE_SERVICE, formFieldManage;
  2059. return {
  2060. setters: [function (_) {
  2061. _createClass = _['default'];
  2062. }, function (_a) {
  2063. _classCallCheck = _a['default'];
  2064. }],
  2065. execute: function () {
  2066. 'use strict';
  2067. FORM_FIELD_MANAGE_SERVICE = 'formFieldManage';
  2068. formFieldManage = (function () {
  2069. function formFieldManage(EasyFormGenFormlyBindingModels) {
  2070. _classCallCheck(this, formFieldManage);
  2071. this.EasyFormGenFormlyBindingModels = EasyFormGenFormlyBindingModels;
  2072. this.init();
  2073. }
  2074. _createClass(formFieldManage, [{
  2075. key: 'init',
  2076. value: function init() {}
  2077. /**
  2078. * At initial state : configuration model will contain 1 line, since :
  2079. * -> it is non sense to create a form without a single line (no line = no form at all)
  2080. * -> so it is non sense to force user to add a first line
  2081. *
  2082. * PLEASE NOTE columns array contains objects that look like formly fields one
  2083. */
  2084. }, {
  2085. key: 'initConfigurationEditFromScratch',
  2086. value: function initConfigurationEditFromScratch(configurationModel, addStepWayProperties) {
  2087. var configurationModelInit = this.EasyFormGenFormlyBindingModels.getEasyFormInitialStateConfigurationModel(addStepWayProperties);
  2088. angular.copy(configurationModelInit, configurationModel);
  2089. }
  2090. /**
  2091. * Get an configuration empty (no init line) then empty it with lines array provided in param
  2092. * @param object - configurationModel [configuration model]
  2093. * @param array - lines [an array : lines to apply to an empty configuration model]
  2094. * @param bool - addStepWayProperties [description]
  2095. * @return {object message} [give details on how it happened to caller]
  2096. */
  2097. }, {
  2098. key: 'bindConfigurationLines',
  2099. value: function bindConfigurationLines(configurationModel, lines, addStepWayProperties) {
  2100. if (Object.prototype.toString.call(lines) === '[object Array]') {
  2101. var configurationModelResult = this.EasyFormGenFormlyBindingModels.getEasyFormReloadConfigurationModel(addStepWayProperties);
  2102. configurationModelResult.lines = [].concat(lines);
  2103. angular.copy(configurationModelResult, configurationModel);
  2104. return this.getMessageObject('configuration model is bound', 'lines are bound to configuration model.');
  2105. } else {
  2106. return this.getErrorObject('lines is not an array', 'Checks lines type, it is not an array.');
  2107. }
  2108. }
  2109. /**
  2110. * applyConfigurationToformlyModel :
  2111. * - bind configuration model into formly field model
  2112. * - reset dataModel (formlyfield may have changed so previous dataModel would be false)
  2113. * @param configurationModel
  2114. * @param formlyModel
  2115. * @param formlyDataModel
  2116. */
  2117. }, {
  2118. key: 'applyConfigurationToformlyModel',
  2119. value: function applyConfigurationToformlyModel(configurationModel, formlyModel, formlyDataModel) {
  2120. this.resetFormlyModel(formlyModel);
  2121. this.resetDataModel(formlyDataModel);
  2122. var lineNumber = configurationModel.lines.length;
  2123. for (var i = 0; i < lineNumber; i++) {
  2124. this.AddNColumnControl(formlyModel, configurationModel, i);
  2125. }
  2126. }
  2127. }, {
  2128. key: 'resetFormlyModel',
  2129. value: function resetFormlyModel(formlyModel) {
  2130. var resetformly = [];
  2131. angular.copy(resetformly, formlyModel);
  2132. }
  2133. }, {
  2134. key: 'AddNColumnControl',
  2135. value: function AddNColumnControl(formlyModel, configurationModel, lineIndex) {
  2136. var _this = this;
  2137. var numberOfColumns = configurationModel.lines[lineIndex].columns.length;
  2138. /**
  2139. * push formly model
  2140. * here : only className and empty fieldGroup (controls != header)
  2141. * if header will be reset to set a template (at least we have now indexFormlyModel)
  2142. */
  2143. var rawFormlyModel = {
  2144. className: 'row',
  2145. fieldGroup: []
  2146. };
  2147. //get index formlyModel for this line :
  2148. var indexFormlyModel = formlyModel.push(rawFormlyModel) - 1;
  2149. // iterates through controls in the line
  2150. configurationModel.lines[lineIndex].columns.forEach(function (column) {
  2151. var controlTemplate = {};
  2152. if (typeof controlTemplate !== 'undefined' &&
  2153. // column.control.type !== 'header' &&
  2154. // column.control.type !== 'subTitle' &&
  2155. column.control.type !== 'none') {
  2156. /**
  2157. * controls : getFormlyControlTemplateForNcolumnLine()
  2158. *
  2159. * @PARAM numberOfColumns : integer to deduce cssClss to apply
  2160. * @PARAM column.control.type : to add if needed specific properties (example : datepicker)
  2161. */
  2162. if (column.control.type === 'header' || column.control.type === 'subTitle') {
  2163. var headerTextContent = column.control.templateOptions.description;
  2164. controlTemplate.template = _this.EasyFormGenFormlyBindingModels.getHeaderTemplateForNcolumnLine(numberOfColumns, headerTextContent).template;
  2165. controlTemplate.className = _this.EasyFormGenFormlyBindingModels.getRawHeaderTemplates().selectedClass;
  2166. } else {
  2167. controlTemplate = _this.EasyFormGenFormlyBindingModels.getFormlyControlTemplateForNcolumnLine(numberOfColumns, column.control.type);
  2168. /**
  2169. * NEED REFACTOR HERE
  2170. * should bind properties dynamically
  2171. *
  2172. * TODO need to validate all controls (datepicker may not work)
  2173. * need to refactor
  2174. */
  2175. controlTemplate.className = column.control.className;
  2176. controlTemplate.type = column.control.type;
  2177. controlTemplate.key = column.control.key;
  2178. controlTemplate.templateOptions.type = column.control.templateOptions.type;
  2179. controlTemplate.templateOptions.label = column.control.templateOptions.label;
  2180. controlTemplate.templateOptions.required = column.control.templateOptions.required;
  2181. controlTemplate.templateOptions.placeholder = column.control.templateOptions.placeholder;
  2182. controlTemplate.templateOptions.description = column.control.templateOptions.description;
  2183. controlTemplate.templateOptions.options = [].concat(column.control.templateOptions.options);
  2184. if (typeof controlTemplate.templateOptions.datepickerPopup !== 'undefined') column.control.templateOptions.datepickerPopup = controlTemplate.templateOptions.datepickerPopup;
  2185. }
  2186. /**
  2187. * popuplate properties
  2188. */
  2189. /**
  2190. * push control into formly model in its group
  2191. */
  2192. /**
  2193. * need to catch this random error
  2194. */
  2195. formlyModel[indexFormlyModel].fieldGroup.push(controlTemplate);
  2196. }
  2197. });
  2198. }
  2199. }, {
  2200. key: 'isTemplateOptionDefined',
  2201. value: function isTemplateOptionDefined(obj) {
  2202. return typeof obj.templateOptions !== 'undefined' ? true : false;
  2203. }
  2204. }, {
  2205. key: 'extractTemplateOptionLabel',
  2206. value: function extractTemplateOptionLabel(obj) {
  2207. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.label !== 'undefined' ? obj.templateOptions.label : '' : '';
  2208. }
  2209. }, {
  2210. key: 'extractTemplateOptionDatepickerPopup',
  2211. value: function extractTemplateOptionDatepickerPopup(obj) {
  2212. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.datepickerPopup !== 'undefined' ? obj.templateOptions.datepickerPopup : '' : '';
  2213. }
  2214. }, {
  2215. key: 'extractTemplateOptionRequired',
  2216. value: function extractTemplateOptionRequired(obj) {
  2217. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.required !== 'undefined' ? obj.templateOptions.required : '' : '';
  2218. }
  2219. //radio and select
  2220. }, {
  2221. key: 'extractTemplateOptionOptions',
  2222. value: function extractTemplateOptionOptions(obj) {
  2223. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.options !== 'undefined' ? obj.templateOptions.options : '' : '';
  2224. }
  2225. }, {
  2226. key: 'extractTemplateOptionType',
  2227. value: function extractTemplateOptionType(obj) {
  2228. return typeof obj.subtype !== 'undefined' ? obj.subtype : '';
  2229. }
  2230. }, {
  2231. key: 'extractTemplateOptionPlaceholder',
  2232. value: function extractTemplateOptionPlaceholder(obj) {
  2233. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.placeholder !== 'undefined' ? obj.templateOptions.placeholder : '' : '';
  2234. }
  2235. }, {
  2236. key: 'extractTemplateOptionDescription',
  2237. value: function extractTemplateOptionDescription(obj) {
  2238. return typeof obj.templateOptions !== 'undefined' ? typeof obj.templateOptions.description !== 'undefined' ? obj.templateOptions.description : '' : '';
  2239. }
  2240. // formly model functions
  2241. }, {
  2242. key: 'resetDataModel',
  2243. value: function resetDataModel(obj) {
  2244. var emptyDataModel = {};
  2245. angular.copy(emptyDataModel, obj);
  2246. return true;
  2247. }
  2248. // custom errors
  2249. }, {
  2250. key: 'getErrorObject',
  2251. value: function getErrorObject(errorTitle, errorMessage) {
  2252. var messageObj = {
  2253. noError: false,
  2254. title: '',
  2255. Message: ''
  2256. };
  2257. messageObj.noError = false;
  2258. messageObj.title = errorTitle;
  2259. messageObj.Message = errorMessage;
  2260. return messageObj;
  2261. }
  2262. }, {
  2263. key: 'getMessageObject',
  2264. value: function getMessageObject(messageTitle, messageBody) {
  2265. var messageObj = {
  2266. noError: false,
  2267. title: '',
  2268. Message: ''
  2269. };
  2270. messageObj.noError = true;
  2271. messageObj.title = messageTitle;
  2272. messageObj.Message = messageBody;
  2273. return messageObj;
  2274. }
  2275. }]);
  2276. return formFieldManage;
  2277. })();
  2278. formFieldManage.$inject = ['EasyFormGenFormlyBindingModels'];
  2279. _export('default', formFieldManage);
  2280. _export('FORM_FIELD_MANAGE_SERVICE', FORM_FIELD_MANAGE_SERVICE);
  2281. }
  2282. };
  2283. });
  2284. $__System.register('2c', [], function (_export) {
  2285. 'use strict';
  2286. var initEasyFormListControls, initEasyFormEmptyConfigurationLineModel, initEmptyControlFieldModel, initEasyFormInitialStateConfigurationModel, initEasyFormInitialStateConfigurationModelAddOnForStepWay, initEasyFormReloadConfigurationModel, initHeaderTemplates, initFormlyControlTemplates, initParticularControlProperties;
  2287. return {
  2288. setters: [],
  2289. execute: function () {
  2290. initEasyFormListControls = function initEasyFormListControls() {
  2291. return {
  2292. controls: [],
  2293. selectedControl: 'none',
  2294. temporyConfig: {
  2295. selectedControl: 'none',
  2296. formlyLabel: 'label',
  2297. formlyRequired: false,
  2298. formlyDesciption: '',
  2299. formlyPlaceholder: '',
  2300. formlyOptions: []
  2301. }
  2302. };
  2303. };
  2304. _export('initEasyFormListControls', initEasyFormListControls);
  2305. initEasyFormEmptyConfigurationLineModel = function initEasyFormEmptyConfigurationLineModel() {
  2306. return {
  2307. line: 1,
  2308. activeColumn: 1,
  2309. columns: [{
  2310. numColumn: 1,
  2311. exist: true,
  2312. control: {
  2313. type: 'none',
  2314. key: 'none'
  2315. }
  2316. }]
  2317. };
  2318. };
  2319. _export('initEasyFormEmptyConfigurationLineModel', initEasyFormEmptyConfigurationLineModel);
  2320. initEmptyControlFieldModel = function initEmptyControlFieldModel() {
  2321. return {
  2322. 'control': {
  2323. 'type': 'none',
  2324. 'key': 'none'
  2325. }
  2326. };
  2327. };
  2328. _export('initEmptyControlFieldModel', initEmptyControlFieldModel);
  2329. initEasyFormInitialStateConfigurationModel = function initEasyFormInitialStateConfigurationModel(_easyFormEmptyConfigurationLineModel) {
  2330. // commun all easy form generator ways
  2331. return {
  2332. submitButtonText: 'submit',
  2333. cancelButtonText: 'cancel',
  2334. lines: [].concat(_easyFormEmptyConfigurationLineModel)
  2335. };
  2336. };
  2337. _export('initEasyFormInitialStateConfigurationModel', initEasyFormInitialStateConfigurationModel);
  2338. initEasyFormInitialStateConfigurationModelAddOnForStepWay = function initEasyFormInitialStateConfigurationModelAddOnForStepWay() {
  2339. // specific easy form generator — step way — (not drag and drop way), needed for wizard management
  2340. return {
  2341. activeLine: 1,
  2342. listConfigStep: ['init', 'first', 'second', 'third'],
  2343. stepIndicators: [true, false, false, false],
  2344. configStepCounter: 0
  2345. };
  2346. };
  2347. _export('initEasyFormInitialStateConfigurationModelAddOnForStepWay', initEasyFormInitialStateConfigurationModelAddOnForStepWay);
  2348. initEasyFormReloadConfigurationModel = function initEasyFormReloadConfigurationModel() {
  2349. var reloadConfigModel = initEasyFormInitialStateConfigurationModel();
  2350. reloadConfigModel.lines = [];
  2351. return reloadConfigModel;
  2352. };
  2353. _export('initEasyFormReloadConfigurationModel', initEasyFormReloadConfigurationModel);
  2354. // can't use arrow function here -> 'this' would be bound to caller rather than expected current returned object...
  2355. initHeaderTemplates = function initHeaderTemplates() {
  2356. var headerTemplate = {
  2357. cssClass: ['col-xs-12', 'col-xs-6', 'col-xs-4'],
  2358. textContent: '',
  2359. html_part1: [' <div class="'].join(''),
  2360. selectedClass: '',
  2361. html_part2: ['">', ' <h2 class="text-center">'].join(''),
  2362. html_part3: this.textContent,
  2363. html_part4: [' <h2>', ' <hr/>', ' </div>'].join(''),
  2364. simpleHtml1: ['<h2 class="text-center">'].join(''),
  2365. simpleHtml2: [' <h2>', ' <hr/>'].join('')
  2366. };
  2367. return headerTemplate;
  2368. };
  2369. _export('initHeaderTemplates', initHeaderTemplates);
  2370. initFormlyControlTemplates = function initFormlyControlTemplates() {
  2371. return {
  2372. className: ['col-xs-12', 'col-xs-6', 'col-xs-4'],
  2373. type: '',
  2374. key: '',
  2375. templateOptions: {
  2376. type: '',
  2377. label: '',
  2378. required: '',
  2379. placeholder: '',
  2380. description: '',
  2381. options: ''
  2382. }
  2383. };
  2384. };
  2385. _export('initFormlyControlTemplates', initFormlyControlTemplates);
  2386. initParticularControlProperties = function initParticularControlProperties() {
  2387. return [{
  2388. controlType: 'datepicker',
  2389. properties: [{
  2390. isRoot: false,
  2391. isTemplateOptions: true,
  2392. value: 'datepickerPopup'
  2393. }]
  2394. }];
  2395. };
  2396. _export('initParticularControlProperties', initParticularControlProperties);
  2397. }
  2398. };
  2399. });
  2400. $__System.register('2d', ['2c'], function (_export) {
  2401. 'use strict';
  2402. var helpers, EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER;
  2403. function EasyFormGenFormlyBindingModels() {
  2404. var _easyFormListControls = helpers.initEasyFormListControls();
  2405. var _easyFormEmptyConfigurationLineModel = helpers.initEasyFormEmptyConfigurationLineModel();
  2406. var _emptyControlFieldModel = helpers.initEmptyControlFieldModel();
  2407. var _easyFormInitialStateConfigurationModel = helpers.initEasyFormInitialStateConfigurationModel(_easyFormEmptyConfigurationLineModel);
  2408. var _easyFormInitialStateConfigurationModelAddOnForStepWay = helpers.initEasyFormInitialStateConfigurationModelAddOnForStepWay();
  2409. var _easyFormReloadConfigurationModel = helpers.initEasyFormReloadConfigurationModel();
  2410. var _headerTemplates = helpers.initHeaderTemplates();
  2411. var _formlyControlTemplates = helpers.initFormlyControlTemplates();
  2412. var _particularControlProperties = helpers.initParticularControlProperties();
  2413. this.getAllParticularControlProperties = getAllParticularControlProperties;
  2414. this.addParticularControlProperties = addParticularControlProperties;
  2415. this.getEasyFormListControls = getEasyFormListControls;
  2416. this.addEasyFormControlToList = addEasyFormControlToList;
  2417. this.getHeaderTemplates = getHeaderTemplates;
  2418. this.addHeaderTemplateCssClass = addHeaderTemplateCssClass;
  2419. this.getFormlyControlTemplate = getFormlyControlTemplate;
  2420. this.addformlyControlTemplatesCssClass = addformlyControlTemplatesCssClass;
  2421. this.setFormlyControlTemplate = setFormlyControlTemplate;
  2422. this.$get = getFct;
  2423. function getAllParticularControlProperties() {
  2424. return _particularControlProperties;
  2425. }
  2426. function addParticularControlProperties(newParticularControlProperty) {
  2427. // test object param has waited properties
  2428. if ('controlType' in newParticularControlProperty && 'properties' in newParticularControlProperty) {
  2429. var isAnUpdate = false;
  2430. if (_particularControlProperties.length > 0) {
  2431. _particularControlProperties.forEach(function (controlProp) {
  2432. if (controlProp.controlType === newParticularControlProperty.controlType) {
  2433. controlProp.properties = [].concat(newParticularControlProperty.properties);
  2434. isAnUpdate = true;
  2435. }
  2436. });
  2437. }
  2438. if (!isAnUpdate) {
  2439. _particularControlProperties.push(newParticularControlProperty);
  2440. }
  2441. }
  2442. return _particularControlProperties;
  2443. }
  2444. function getEasyFormListControls() {
  2445. return _easyFormListControls;
  2446. }
  2447. function addEasyFormControlToList(controlDeclaration) {
  2448. if (typeof controlDeclaration !== 'undefined') {
  2449. _easyFormListControls.controls.push(controlDeclaration);
  2450. }
  2451. }
  2452. function getHeaderTemplates() {
  2453. return _headerTemplates;
  2454. }
  2455. function addHeaderTemplateCssClass(cssClassToAdd) {
  2456. if (typeof cssClassToAdd !== 'undefined') {
  2457. _headerTemplates.cssClass.push(cssClassToAdd);
  2458. }
  2459. }
  2460. function getFormlyControlTemplate() {
  2461. return _formlyControlTemplates;
  2462. }
  2463. function addformlyControlTemplatesCssClass(cssClassToAdd) {
  2464. if (typeof cssClassToAdd !== 'undefined') {
  2465. _formlyControlTemplates.className.push(cssClassToAdd);
  2466. }
  2467. }
  2468. function setFormlyControlTemplate(newFormlyControlTemplate) {
  2469. if ('className' in newFormlyControlTemplate && 'type' in newFormlyControlTemplate && 'key' in newFormlyControlTemplate && 'templateOptions' in newFormlyControlTemplate) {
  2470. _formlyControlTemplates = angular.copy(newFormlyControlTemplate);
  2471. }
  2472. return true;
  2473. }
  2474. getFct.$inject = [];
  2475. function getFct() {
  2476. var service = {
  2477. getEasyFormListControls: getEasyFormListControlsFct,
  2478. getEasyFormInitialStateConfigurationModel: getEasyFormInitialStateConfigurationModel,
  2479. getEasyFormReloadConfigurationModel: getEasyFormReloadConfigurationModel,
  2480. getEasyFormEmptyConfigurationLineModel: getEasyFormEmptyConfigurationLineModel,
  2481. getEasyFormConfigurationEmptyControlModel: getEasyFormConfigurationEmptyControlModel,
  2482. getRawHeaderTemplates: getRawHeaderTemplates,
  2483. getHeaderTemplateForNcolumnLine: getHeaderTemplateForNcolumnLine,
  2484. getRawFormlyControlTemplates: getRawFormlyControlTemplates,
  2485. getFormlyControlTemplateForNcolumnLine: getFormlyControlTemplateForNcolumnLine
  2486. };
  2487. return service;
  2488. function getEasyFormListControlsFct() {
  2489. return _easyFormListControls;
  2490. }
  2491. function getEasyFormInitialStateConfigurationModel(addStepWayProperties) {
  2492. var initialConfigurationModel = angular.copy(_easyFormInitialStateConfigurationModel);
  2493. if (typeof addStepWayProperties !== 'undefined') {
  2494. if (addStepWayProperties) {
  2495. // add properties specific to step way
  2496. angular.extend(initialConfigurationModel, _easyFormInitialStateConfigurationModelAddOnForStepWay);
  2497. }
  2498. }
  2499. return initialConfigurationModel;
  2500. }
  2501. function getEasyFormReloadConfigurationModel(addStepWayProperties) {
  2502. var initialConfigurationModel = angular.copy(_easyFormReloadConfigurationModel);
  2503. if (typeof addStepWayProperties !== 'undefined') {
  2504. if (addStepWayProperties) {
  2505. // add properties specific to step way
  2506. angular.extend(initialConfigurationModel, _easyFormInitialStateConfigurationModelAddOnForStepWay);
  2507. }
  2508. }
  2509. return initialConfigurationModel;
  2510. }
  2511. function getEasyFormEmptyConfigurationLineModel() {
  2512. return _easyFormEmptyConfigurationLineModel;
  2513. }
  2514. function getEasyFormConfigurationEmptyControlModel() {
  2515. return _emptyControlFieldModel;
  2516. }
  2517. function getRawHeaderTemplates() {
  2518. return _headerTemplates;
  2519. }
  2520. function getHeaderTemplateForNcolumnLine(nbColInLines, textContent) {
  2521. if (typeof nbColInLines !== 'undefined' && typeof textContent !== 'undefined') {
  2522. if (nbColInLines === parseInt(nbColInLines, 10)) {
  2523. if (nbColInLines <= _headerTemplates.cssClass.length) {
  2524. var headerToReturn = {};
  2525. headerToReturn.className = _headerTemplates.cssClass[nbColInLines - 1];
  2526. // header html property depends this property dont forget to set it before reading html property
  2527. _headerTemplates.textContent = textContent;
  2528. _headerTemplates.selectedClass = headerToReturn.className;
  2529. headerToReturn.template = [_headerTemplates.simpleHtml1, textContent, _headerTemplates.simpleHtml2].join('');
  2530. return headerToReturn;
  2531. }
  2532. }
  2533. }
  2534. }
  2535. function getRawFormlyControlTemplates() {
  2536. return _formlyControlTemplates;
  2537. }
  2538. function getFormlyControlTemplateForNcolumnLine(nbColInLines, controlType) {
  2539. if (typeof nbColInLines !== 'undefined') {
  2540. if (nbColInLines === parseInt(nbColInLines, 10)) {
  2541. if (nbColInLines <= _formlyControlTemplates.className.length) {
  2542. var _ret = (function () {
  2543. var controlToReturn = angular.copy(_formlyControlTemplates);
  2544. controlToReturn.className = _formlyControlTemplates.className[nbColInLines - 1];
  2545. // throw `it should have a bug upper line`;
  2546. /* eslint no-console:0 */
  2547. console.warn('it should have a bug upper line');
  2548. /**
  2549. * check controlType: it may require another particular property
  2550. */
  2551. if (typeof controlType !== 'undefined') {
  2552. _particularControlProperties.forEach(function (controlProp) {
  2553. if (controlProp.controlType === controlType) {
  2554. /**
  2555. * add all properties this controlType has
  2556. *
  2557. * NOTE : dot expression and bracket expression to access object property
  2558. * http://www.ecma-international.org/ecma-262/5.1/#sec-11.2.1
  2559. */
  2560. controlProp.properties.forEach(function (aPropToAdd) {
  2561. if (aPropToAdd.isRoot) controlToReturn[aPropToAdd.value] = '';
  2562. if (aPropToAdd.isTemplateOptions) controlToReturn.templateOptions[aPropToAdd.value] = '';
  2563. });
  2564. }
  2565. });
  2566. }
  2567. return {
  2568. v: controlToReturn
  2569. };
  2570. })();
  2571. if (typeof _ret === 'object') return _ret.v;
  2572. }
  2573. }
  2574. }
  2575. }
  2576. }
  2577. }
  2578. return {
  2579. setters: [function (_c) {
  2580. helpers = _c;
  2581. }],
  2582. execute: function () {
  2583. EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER = 'EasyFormGenFormlyBindingModels';
  2584. EasyFormGenFormlyBindingModels.$inject = [];
  2585. _export('default', EasyFormGenFormlyBindingModels);
  2586. _export('EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER', EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER);
  2587. }
  2588. };
  2589. });
  2590. $__System.register('2e', ['2b', '2d'], function (_export) {
  2591. 'use strict';
  2592. var formFieldManage, FORM_FIELD_MANAGE_SERVICE, EasyFormGenFormlyBindingModels, EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER, FORMLY_PROXY_MODULE;
  2593. return {
  2594. setters: [function (_b) {
  2595. formFieldManage = _b['default'];
  2596. FORM_FIELD_MANAGE_SERVICE = _b.FORM_FIELD_MANAGE_SERVICE;
  2597. }, function (_d) {
  2598. EasyFormGenFormlyBindingModels = _d['default'];
  2599. EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER = _d.EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER;
  2600. }],
  2601. execute: function () {
  2602. FORMLY_PROXY_MODULE = '';
  2603. _export('default', angular.module(FORMLY_PROXY_MODULE, []).service(FORM_FIELD_MANAGE_SERVICE, formFieldManage).provider(EASY_FORM_FORMLY_BINDING_MODEL_PROVIDER, EasyFormGenFormlyBindingModels));
  2604. }
  2605. };
  2606. });
  2607. $__System.register('2f', [], function (_export) {
  2608. 'use strict';
  2609. var DD_CONTENT_COUNTER_DIRECTIVE;
  2610. function ddContentCounter(dragDropItemCounterService, $timeout) {
  2611. var directive = {
  2612. restrict: 'A',
  2613. scope: {
  2614. valueWhenPlaceholder: '@ddValueWhenPlaceholder',
  2615. valueWhendragging: '@ddValueWhenDragging',
  2616. fullModel: '=ddFullModel',
  2617. currentIndex: '@ddContentCounterCurrentIndex',
  2618. parentIndex: '@ddContentCounterParentIndex',
  2619. forceRefresh: '=ddContentCounterForceCssRefresh'
  2620. },
  2621. link: linkfct
  2622. };
  2623. return directive;
  2624. function linkfct($scope, element) {
  2625. var timer = undefined;
  2626. // watch children length change : to update css item class
  2627. $scope.$watch(function () {
  2628. return element[0].children.length;
  2629. }, function (newValue, oldValue) {
  2630. if (newValue !== oldValue) {
  2631. (function () {
  2632. var newRealCount = 0;
  2633. var listClassForThisRow = [];
  2634. for (var i = element[0].children.length - 1; i >= 0; i--) {
  2635. if (dragDropItemCounterService.isHtmlElementToCount(element[0].children[i].classList)) {
  2636. newRealCount++;
  2637. listClassForThisRow.push({ item: i, isReal: true });
  2638. } else {
  2639. listClassForThisRow.push({ item: i, isReal: false });
  2640. }
  2641. }
  2642. $scope.contentRealCount = newRealCount;
  2643. // a timer otherwise won't refresh everytime
  2644. timer = $timeout(function () {
  2645. dragDropItemCounterService.updateLineItemCss($scope.fullModel, listClassForThisRow, $scope.parentIndex, $scope.currentIndex, newRealCount);
  2646. }, 20);
  2647. })();
  2648. }
  2649. });
  2650. $scope.$on('$destroy', function () {
  2651. $timeout.cancel(timer);
  2652. });
  2653. }
  2654. }
  2655. return {
  2656. setters: [],
  2657. execute: function () {
  2658. DD_CONTENT_COUNTER_DIRECTIVE = 'ddContentCounter';
  2659. ddContentCounter.$inject = ['dragDropItemCounterService', '$timeout'];
  2660. _export('default', ddContentCounter);
  2661. _export('DD_CONTENT_COUNTER_DIRECTIVE', DD_CONTENT_COUNTER_DIRECTIVE);
  2662. }
  2663. };
  2664. });
  2665. $__System.register('30', ['9', 'a'], function (_export) {
  2666. var _createClass, _classCallCheck, DRAG_DROP_ITEM_COUNTER_SERVICE, dragDropItemCounterService;
  2667. return {
  2668. setters: [function (_) {
  2669. _createClass = _['default'];
  2670. }, function (_a) {
  2671. _classCallCheck = _a['default'];
  2672. }],
  2673. execute: function () {
  2674. 'use strict';
  2675. DRAG_DROP_ITEM_COUNTER_SERVICE = 'dragDropItemCounterService';
  2676. dragDropItemCounterService = (function () {
  2677. function dragDropItemCounterService(easyFormDragWayConfig) {
  2678. _classCallCheck(this, dragDropItemCounterService);
  2679. this.easyFormDragWayConfig = easyFormDragWayConfig;
  2680. this.init();
  2681. }
  2682. _createClass(dragDropItemCounterService, [{
  2683. key: 'init',
  2684. value: function init() {
  2685. this._modelItemRealCounter = [];
  2686. this._itemsNotToCount = angular.copy(this.easyFormDragWayConfig.getItemsNotToCount());
  2687. }
  2688. }, {
  2689. key: 'getItemsNotToCount',
  2690. value: function getItemsNotToCount() {
  2691. return this._itemsNotToCount;
  2692. }
  2693. }, {
  2694. key: 'getModelItemsRealCounter',
  2695. value: function getModelItemsRealCounter() {
  2696. return this._modelItemRealCounter;
  2697. }
  2698. }, {
  2699. key: 'isHtmlElementToCount',
  2700. value: function isHtmlElementToCount(htmlvalue) {
  2701. var isToCount = true;
  2702. if (htmlvalue.length > 0) {
  2703. angular.forEach(this._itemsNotToCount, function (value) {
  2704. for (var classes = htmlvalue.length - 1; classes >= 0; classes--) {
  2705. if (htmlvalue[classes] === value) isToCount = isToCount && false;
  2706. }
  2707. });
  2708. }
  2709. return isToCount;
  2710. }
  2711. }, {
  2712. key: 'updateLineItemCss',
  2713. value: function updateLineItemCss(fullModel, listCssToApply, columIndex, lineIndex, realCount) {
  2714. if (typeof fullModel !== 'undefined' && typeof listCssToApply !== 'undefined' && typeof columIndex !== 'undefined' && typeof lineIndex !== 'undefined' && typeof realCount !== 'undefined') {
  2715. for (var i = fullModel[columIndex][lineIndex].length - 1; i >= 0; i--) {
  2716. for (var j = 0; j < listCssToApply.length; j++) {
  2717. if (listCssToApply[j].item === i && listCssToApply[j].isReal === true) {
  2718. fullModel[columIndex][lineIndex][i].cssClass = this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(realCount);
  2719. }
  2720. }
  2721. }
  2722. return true;
  2723. }
  2724. }
  2725. }]);
  2726. return dragDropItemCounterService;
  2727. })();
  2728. dragDropItemCounterService.$inject = ['easyFormDragWayConfig'];
  2729. _export('default', dragDropItemCounterService);
  2730. _export('DRAG_DROP_ITEM_COUNTER_SERVICE', DRAG_DROP_ITEM_COUNTER_SERVICE);
  2731. }
  2732. };
  2733. });
  2734. $__System.registerDynamic("31", [], true, function($__require, exports, module) {
  2735. ;
  2736. var global = this,
  2737. __define = global.define;
  2738. global.define = undefined;
  2739. module.exports = "<div ng-click=\"ddDecorContainerCtrl.collapseFct()\">\n <h6\n ng-show=\"ddDecorContainerCtrl.config.isEnabled\"\n class=\"ddDecorContainerCtrl.isCollapsableZone\"\n style=\"cursor:pointer\">\n <button class=\"btn btn-primary btn-xs\">\n <span class=\"{{ddDecorContainerCtrl.currentIconClass()}}\"></span>\n </button>\n &nbsp;\n {{ddDecorContainerCtrl.currentTitle}}\n </h6>\n</div>\n<div collapse=\"ddDecorContainerCtrl.isCollapsed\">\n <div id=\"ddDecorContainerWillTranscludeHere\"></div>\n</div>\n";
  2740. global.define = __define;
  2741. return module.exports;
  2742. });
  2743. $__System.register('32', ['31', '33'], function (_export) {
  2744. /* global angular */
  2745. 'use strict';
  2746. var ddDecorContainerTemplate, DD_DECOR_CONTAINER_CONTROLLER_NAME, DD_DECOR_CONTAINER_CONTROLLERAS_NAME, DD_DECOR_CONTAINER_DIRECTIVE;
  2747. function ddDecorContainer() {
  2748. var directive = {
  2749. restrict: 'A',
  2750. template: ddDecorContainerTemplate,
  2751. scope: {},
  2752. controller: DD_DECOR_CONTAINER_CONTROLLER_NAME,
  2753. controllerAs: DD_DECOR_CONTAINER_CONTROLLERAS_NAME,
  2754. bindToController: {
  2755. 'styleParam': '=ddContainerProperties',
  2756. 'isStillCollapsed': '=ddContainerIsCollpased',
  2757. 'verboseMode': '@ddContainerVerboseMode',
  2758. 'currentIndex': '@ddContainerCurrentIndex',
  2759. 'collpaseAll': '&ddCollapseAll'
  2760. },
  2761. transclude: true,
  2762. link: linkFct
  2763. };
  2764. return directive;
  2765. function linkFct($scope, element, attrs, ctrl, transclude) {
  2766. var verboseModeActive = $scope.ddDecorContainerCtrl.verboseMode;
  2767. var currentIndex = $scope.ddDecorContainerCtrl.currentIndex;
  2768. $scope.ddDecorContainerCtrl.isCollapsed = false;
  2769. $scope.ddDecorContainerCtrl.config.isEnabled = false;
  2770. /**
  2771. * forceCollapse when :
  2772. * dragDropConfigModel.containerConfig.decoration.isCollapsed changed (here bound to $scope.isStillCollapsed)
  2773. */
  2774. $scope.$watch(function () {
  2775. return $scope.ddDecorContainerCtrl.isStillCollapsed;
  2776. }, function (newVal, oldVal) {
  2777. if (newVal !== oldVal) {
  2778. if ($scope.$parent.$parent.$index === 0) $scope.ddDecorContainerCtrl.isCollapsed = newVal;
  2779. }
  2780. });
  2781. /**
  2782. * verbose mode for developments only
  2783. */
  2784. if (verboseModeActive !== '') {
  2785. var verbose = angular.lowercase(verboseModeActive);
  2786. if (verbose === 'true' || verbose === '1') {
  2787. /* eslint no-console:0 */
  2788. console.dir({
  2789. whoAmI: 'I am verbose from ddDecorContainer link',
  2790. verbodeMode: verbose,
  2791. ParentParentIndex: $scope.$parent.$parent.$index,
  2792. ParentIndex: $scope.$parent.$index,
  2793. currentIndex: currentIndex,
  2794. styleParam: $scope.ddDecorContainerCtrl.styleParam,
  2795. columnindex: $scope.$parent.$parent.$parent.$parent.$index
  2796. });
  2797. }
  2798. }
  2799. /**
  2800. * no header (no title, no collapse....)
  2801. */
  2802. //$scope.ddDecorContainerCtrl.config.isEnabled
  2803. if (typeof currentIndex !== 'undefined') {
  2804. if (currentIndex !== '') {
  2805. /**
  2806. * specific 1st column
  2807. */
  2808. if (currentIndex === '0') {
  2809. /**
  2810. * apply title
  2811. */
  2812. if (typeof $scope.ddDecorContainerCtrl.styleParam.title !== 'undefined') {
  2813. $scope.ddDecorContainerCtrl.currentTitle = $scope.ddDecorContainerCtrl.styleParam.title;
  2814. $scope.ddDecorContainerCtrl.config.isEnabled = true;
  2815. $scope.ddDecorContainerCtrl.isCollapsed = true;
  2816. }
  2817. }
  2818. }
  2819. }
  2820. /**
  2821. * prevent transclusion creating child scope
  2822. * want to know more about what I'm talking about : check this nice tip on the subject :
  2823. * http://angular-tips.com/blog/2014/03/transclusion-and-scopes/
  2824. */
  2825. transclude($scope.$parent, function (contentClone) {
  2826. /**
  2827. * transclusion will append content to '<div id="ddDecorContainerWillTranscludeHere"></div>'
  2828. */
  2829. var childDiv = angular.element(element.children()[1]);
  2830. childDiv.append(contentClone);
  2831. });
  2832. }
  2833. }
  2834. return {
  2835. setters: [function (_) {
  2836. ddDecorContainerTemplate = _['default'];
  2837. }, function (_2) {
  2838. DD_DECOR_CONTAINER_CONTROLLER_NAME = _2.DD_DECOR_CONTAINER_CONTROLLER_NAME;
  2839. DD_DECOR_CONTAINER_CONTROLLERAS_NAME = _2.DD_DECOR_CONTAINER_CONTROLLERAS_NAME;
  2840. }],
  2841. execute: function () {
  2842. DD_DECOR_CONTAINER_DIRECTIVE = 'ddDecorContainer';
  2843. _export('default', ddDecorContainer);
  2844. _export('DD_DECOR_CONTAINER_DIRECTIVE', DD_DECOR_CONTAINER_DIRECTIVE);
  2845. }
  2846. };
  2847. });
  2848. $__System.register('33', ['9', 'a'], function (_export) {
  2849. var _createClass, _classCallCheck, DD_DECOR_CONTAINER_CONTROLLER_NAME, DD_DECOR_CONTAINER_CONTROLLERAS_NAME, ddDecorContainerController;
  2850. return {
  2851. setters: [function (_) {
  2852. _createClass = _['default'];
  2853. }, function (_a) {
  2854. _classCallCheck = _a['default'];
  2855. }],
  2856. execute: function () {
  2857. /* global angular */
  2858. 'use strict';
  2859. DD_DECOR_CONTAINER_CONTROLLER_NAME = 'ddDecorContainerController';
  2860. DD_DECOR_CONTAINER_CONTROLLERAS_NAME = 'ddDecorContainerCtrl';
  2861. ddDecorContainerController = (function () {
  2862. function ddDecorContainerController() {
  2863. _classCallCheck(this, ddDecorContainerController);
  2864. this.init();
  2865. }
  2866. _createClass(ddDecorContainerController, [{
  2867. key: 'init',
  2868. value: function init() {
  2869. this.config = angular.extend({}, { isEnabled: false });
  2870. /**
  2871. * TODO (low priority) : make icon css configurable (provider)
  2872. */
  2873. this.icons = angular.extend({}, {
  2874. closedClass: 'glyphicon glyphicon-eye-open',
  2875. opened: 'glyphicon glyphicon-eye-close'
  2876. });
  2877. }
  2878. }, {
  2879. key: 'collapseFct',
  2880. value: function collapseFct() {
  2881. this.collpaseAll({ exceptThisOne: this.styleParam.WhenIndex }); //note : collpaseAll function is boundToController from directive attribute : 'collpaseAll' : '&ddCollapseAll'
  2882. this.isCollapsed = !this.isCollapsed;
  2883. this.isStillCollapsed = this.isCollapsed; //note : isStillCollapsed is boundToController from directive attribute : 'isStillCollapsed' : '=ddContainerIsCollpased',
  2884. }
  2885. }, {
  2886. key: 'currentIconClass',
  2887. value: function currentIconClass() {
  2888. if (this.isCollapsed) {
  2889. return this.icons.closedClass;
  2890. } else {
  2891. return this.icons.opened;
  2892. }
  2893. }
  2894. }]);
  2895. return ddDecorContainerController;
  2896. })();
  2897. _export('default', ddDecorContainerController);
  2898. _export('DD_DECOR_CONTAINER_CONTROLLER_NAME', DD_DECOR_CONTAINER_CONTROLLER_NAME);
  2899. _export('DD_DECOR_CONTAINER_CONTROLLERAS_NAME', DD_DECOR_CONTAINER_CONTROLLERAS_NAME);
  2900. }
  2901. };
  2902. });
  2903. $__System.registerDynamic("34", [], true, function($__require, exports, module) {
  2904. ;
  2905. var global = this,
  2906. __define = global.define;
  2907. global.define = undefined;
  2908. module.exports = "<div class=\"{{styleParam.ApplycssClass}}\">\n <div id=\"visualPanel\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">\n <i class=\"{{currentFontAwesome}}\"></i>&nbsp;\n {{currentTitle}}\n <div ng-show=\"headerConfig.HeaderButtonVisible\">\n <button\n class=\"btn btn-primary btn-xs buttonHeaderAddNewLine center-block\"\n ng-click=\"addNewLineFct();\">\n <span class=\"glyphicon glyphicon-plus\"></span>\n &nbsp;\n add new line\n </button>\n </div>\n </h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-md-12\" ng-transclude>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n";
  2909. global.define = __define;
  2910. return module.exports;
  2911. });
  2912. $__System.register('35', ['34'], function (_export) {
  2913. /* global angular */
  2914. 'use strict';
  2915. var ddDecorDropZoneTemplate, DD_DECOR_DROPZONE_DIRECTIVE;
  2916. function ddDecorDropZone() {
  2917. var directive = {
  2918. restrict: 'A',
  2919. template: ddDecorDropZoneTemplate,
  2920. scope: {
  2921. 'styleParam': '=ddDropZoneProperties',
  2922. 'verboseMode': '@ddDropZoneVerboseMode',
  2923. 'currentIndex': '@ddDropZoneCurrentIndex',
  2924. 'addNewLineFct': '&ddDropZoneAddNewLine'
  2925. },
  2926. transclude: true,
  2927. link: linkfct
  2928. };
  2929. return directive;
  2930. function linkfct($scope) {
  2931. var verboseModeActive = $scope.verboseMode;
  2932. var currentIndex = $scope.currentIndex;
  2933. $scope.headerConfig = {
  2934. HeaderButtonVisible: false,
  2935. affixAttr: 'bs-affix',
  2936. affixEnabled: false
  2937. };
  2938. /**
  2939. * verbose mode : just for dev
  2940. */
  2941. if (verboseModeActive !== '') {
  2942. var verbose = angular.lowercase(verboseModeActive);
  2943. if (verbose === 'true' || verbose === '1') {
  2944. /* eslint no-console:0 */
  2945. console.dir({
  2946. whoAmI: 'I am verbose from ddDecorDropZone link',
  2947. verbodeMode: verbose,
  2948. ParentParentIndex: $scope.$parent.$parent.$index,
  2949. ParentIndex: $scope.$parent.$index,
  2950. currentIndex: currentIndex,
  2951. styleParam: $scope.styleParam
  2952. });
  2953. }
  2954. }
  2955. if (typeof currentIndex !== 'undefined') {
  2956. if (currentIndex !== '') {
  2957. // apply title
  2958. if (typeof $scope.styleParam.title !== 'undefined') $scope.currentTitle = $scope.styleParam.title;
  2959. //apply font-awesome
  2960. if (typeof $scope.styleParam.fontAwesomeIcon !== 'undefined') $scope.currentFontAwesome = $scope.styleParam.fontAwesomeIcon;
  2961. //show add new line button
  2962. if (currentIndex === '1') $scope.headerConfig.HeaderButtonVisible = true;
  2963. }
  2964. }
  2965. }
  2966. }
  2967. return {
  2968. setters: [function (_) {
  2969. ddDecorDropZoneTemplate = _['default'];
  2970. }],
  2971. execute: function () {
  2972. DD_DECOR_DROPZONE_DIRECTIVE = 'ddDecorDropZone';
  2973. ddDecorDropZone.$inject = [];
  2974. _export('default', ddDecorDropZone);
  2975. _export('DD_DECOR_DROPZONE_DIRECTIVE', DD_DECOR_DROPZONE_DIRECTIVE);
  2976. }
  2977. };
  2978. });
  2979. $__System.registerDynamic("36", [], true, function($__require, exports, module) {
  2980. ;
  2981. var global = this,
  2982. __define = global.define;
  2983. global.define = undefined;
  2984. module.exports = "<div>\n <div id=\"itemDirectiveTranscludeHere\"></div>\n</div>\n";
  2985. global.define = __define;
  2986. return module.exports;
  2987. });
  2988. $__System.register('37', ['36'], function (_export) {
  2989. 'use strict';
  2990. var dragdropItemTemplate, DRAG_DROP_DECOR_ITEM;
  2991. function ddDecorItem(easyFormDragWayConfig) {
  2992. var directive = {
  2993. restrict: 'A',
  2994. scope: {
  2995. 'verboseMode': '@ddItemVerboseMode',
  2996. 'currentIndex': '@ddItemCurrentIndex',
  2997. 'parentIndex': '@ddItemParentIndex',
  2998. 'parentParentIndex': '@ddItemParentParentIndex',
  2999. 'lineItemsCount': '@ddItemsCount',
  3000. 'cssClass': '@ddItemCssClass'
  3001. },
  3002. template: dragdropItemTemplate,
  3003. transclude: true,
  3004. link: linkfct
  3005. };
  3006. return directive;
  3007. function linkfct($scope, element, attrs, ctrl, transclude) {
  3008. var verboseModeActive = $scope.verboseMode;
  3009. var currentIndex = $scope.currentIndex;
  3010. var parentIndex = $scope.parentIndex;
  3011. var listClass = easyFormDragWayConfig.getDistinctItemCssClass();
  3012. /**
  3013. * init css class
  3014. */
  3015. angular.forEach(listClass, function (css) {
  3016. return element.removeClass(css);
  3017. });
  3018. element.addClass($scope.cssClass);
  3019. /**
  3020. * update css class
  3021. */
  3022. $scope.$watch('cssClass', function (newValue, oldValue) {
  3023. if (newValue !== oldValue) {
  3024. /**
  3025. * update css class
  3026. */
  3027. angular.forEach(listClass, function (css) {
  3028. return element.removeClass(css);
  3029. });
  3030. element.addClass(newValue);
  3031. }
  3032. });
  3033. /**
  3034. * verbose mode : just for dev
  3035. */
  3036. if (verboseModeActive !== '') {
  3037. var verbose = angular.lowercase(verboseModeActive);
  3038. if (verbose === 'true' || verbose === '1') {
  3039. /* eslint no-console:0 */
  3040. console.dir({
  3041. whoAmI: 'I am verbose from ddDecorItem directive link',
  3042. verbodeMode: verbose,
  3043. ParentParentIndex: $scope.$parent.$parent.$index,
  3044. ParentIndex: parentIndex,
  3045. parentParentIndex: $scope.parentParentIndex,
  3046. currentIndex: currentIndex,
  3047. lineItemsCount: $scope.lineItemsCount
  3048. });
  3049. }
  3050. }
  3051. /**
  3052. * control column : apply css class to item
  3053. */
  3054. if ($scope.parentParentIndex === '0') element.addClass(listClass[0]);
  3055. /**
  3056. * prevent transclusion creating child scope
  3057. *
  3058. *
  3059. * NOTE :if you want to know more about what I'm saying : check this nice tip on the subject :
  3060. * http://angular-tips.com/blog/2014/03/transclusion-and-scopes/
  3061. */
  3062. transclude($scope.$parent, function (contentClone) {
  3063. /**
  3064. * transclusion will append content to '<div id="itemDirectiveTranscludeHere"></div>'
  3065. */
  3066. var childDiv = angular.element(element.children()[0]);
  3067. childDiv.append(contentClone);
  3068. });
  3069. }
  3070. }
  3071. return {
  3072. setters: [function (_) {
  3073. dragdropItemTemplate = _['default'];
  3074. }],
  3075. execute: function () {
  3076. DRAG_DROP_DECOR_ITEM = 'ddDecorItem';
  3077. ddDecorItem.$inject = ['easyFormDragWayConfig'];
  3078. _export('default', ddDecorItem);
  3079. _export('DRAG_DROP_DECOR_ITEM', DRAG_DROP_DECOR_ITEM);
  3080. }
  3081. };
  3082. });
  3083. $__System.register('38', ['9', 'a'], function (_export) {
  3084. var _createClass, _classCallCheck, DRAG_DROP_ITEM_DECOR_SERVICE, dragDropItemDecorationService;
  3085. return {
  3086. setters: [function (_) {
  3087. _createClass = _['default'];
  3088. }, function (_a) {
  3089. _classCallCheck = _a['default'];
  3090. }],
  3091. execute: function () {
  3092. 'use strict';
  3093. DRAG_DROP_ITEM_DECOR_SERVICE = 'dragDropItemDecorationService';
  3094. dragDropItemDecorationService = (function () {
  3095. function dragDropItemDecorationService(easyFormDragWayConfig) {
  3096. _classCallCheck(this, dragDropItemDecorationService);
  3097. this.easyFormDragWayConfig = easyFormDragWayConfig;
  3098. this.init();
  3099. }
  3100. _createClass(dragDropItemDecorationService, [{
  3101. key: 'init',
  3102. value: function init() {
  3103. this._listItemClass = [].concat(this.easyFormDragWayConfig.getListItemCssClass());
  3104. }
  3105. }, {
  3106. key: 'getListClass',
  3107. value: function getListClass() {
  3108. return this._listItemClass;
  3109. }
  3110. }, {
  3111. key: 'getCssClassWhenNumberItemsInRowIs',
  3112. value: function getCssClassWhenNumberItemsInRowIs(thisNumber) {
  3113. return this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(thisNumber);
  3114. }
  3115. }, {
  3116. key: 'applyCssClassWholeLine',
  3117. value: function applyCssClassWholeLine(model, indexColumn, indexLine, numberItems, restrictToThisIndexColumn) {
  3118. if (typeof numberItems !== 'undefined' && typeof indexLine !== 'undefined' && typeof indexColumn !== 'undefined' && typeof model !== 'undefined' && typeof restrictToThisIndexColumn !== 'undefined') {
  3119. if (indexColumn === restrictToThisIndexColumn) {
  3120. for (var i = model[indexColumn][indexLine].length - 1; i >= 0; i--) {
  3121. model[indexColumn][indexLine][i].cssClass = this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(numberItems);
  3122. }
  3123. }
  3124. return true;
  3125. } else {
  3126. return false;
  3127. }
  3128. }
  3129. }, {
  3130. key: 'updateCssClassWholeColumn',
  3131. value: function updateCssClassWholeColumn(model, indexColumn) {
  3132. if (typeof indexColumn !== 'undefined' && typeof model !== 'undefined') {
  3133. for (var cpt = model[indexColumn].length - 1; cpt >= 0; cpt--) {
  3134. for (var i = model[indexColumn][cpt].length - 1; i >= 0; i--) {
  3135. model[indexColumn][cpt][i].cssClass = this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(model[indexColumn][cpt].length);
  3136. }
  3137. }
  3138. return true;
  3139. } else {
  3140. return false;
  3141. }
  3142. }
  3143. }]);
  3144. return dragDropItemDecorationService;
  3145. })();
  3146. dragDropItemDecorationService.$inject = ['easyFormDragWayConfig'];
  3147. _export('default', dragDropItemDecorationService);
  3148. _export('DRAG_DROP_ITEM_DECOR_SERVICE', DRAG_DROP_ITEM_DECOR_SERVICE);
  3149. }
  3150. };
  3151. });
  3152. $__System.registerDynamic("39", [], true, function($__require, exports, module) {
  3153. ;
  3154. var global = this,
  3155. __define = global.define;
  3156. global.define = undefined;
  3157. module.exports = "<div\n ng-class=\"{confirmLineDelete : deleteLine.readyToDelete}\"\n ng-dblclick=\"removeMe($event);\"\n ng-click=\"cancelDelete($event);\">\n <button\n ng-show=\"deleteLine.readyToDelete === true\"\n type=\"button\"\n class=\"btn btn-danger pull-right buttonCloseLine\" >\n <span\n class=\"glyphicon glyphicon-trash\"\n aria-hidden=\"true\">\n </span>\n </button>\n</div>\n<div id=\"lineDirectiveTranscludeHere\"></div>\n";
  3158. global.define = __define;
  3159. return module.exports;
  3160. });
  3161. $__System.register('3a', ['39'], function (_export) {
  3162. /* global angular */
  3163. 'use strict';
  3164. var ddDecorLineTemplate, DRAG_DROP_DECOR_LINE;
  3165. function ddDecorLine($timeout) {
  3166. var directive = {
  3167. restrict: 'A',
  3168. scope: {
  3169. 'verboseMode': '@ddLineVerboseMode',
  3170. 'currentIndex': '@ddLineCurrentIndex',
  3171. 'parentIndex': '@ddLineParentIndex',
  3172. 'removeLine': '&ddRemoveLine'
  3173. },
  3174. template: ddDecorLineTemplate,
  3175. transclude: true,
  3176. link: linkfct
  3177. };
  3178. return directive;
  3179. function linkfct($scope, element, attrs, ctrl, transclude) {
  3180. var verboseModeActive = $scope.verboseMode;
  3181. var currentIndex = $scope.currentIndex;
  3182. var parentIndex = $scope.parentIndex;
  3183. $scope.deleteLine = {};
  3184. $scope.deleteLine.readyToDelete = false;
  3185. $scope.deleteLine.dblClickCount = 0;
  3186. $scope.isCollapsed = false;
  3187. var timer = undefined;
  3188. // verbose mode : just for dev
  3189. if (verboseModeActive !== '') {
  3190. var verbose = angular.lowercase(verboseModeActive);
  3191. if (verbose === 'true' || verbose === '1') {
  3192. /* eslint no-console:0 */
  3193. console.dir({
  3194. whoAmI: 'I am verbose from ddDecorLine directive link',
  3195. verbodeMode: verbose,
  3196. ParentParentIndex: $scope.$parent.$parent.$index,
  3197. ParentIndex: parentIndex,
  3198. currentIndex: currentIndex
  3199. });
  3200. }
  3201. }
  3202. /**
  3203. * removeMe is function related to twice double click sequence to delete a line
  3204. *
  3205. * - addClass / remove/class ; will make line in a shake movement
  3206. * - call "removeLine function to delete the line (if it was rwice double clicked)
  3207. */
  3208. $scope.removeMe = function (event) {
  3209. event.preventDefault();
  3210. event.stopPropagation();
  3211. if ($scope.parentIndex === '1') {
  3212. //2nd dbl click : if is shaking so it is confirmation to delete
  3213. if ($scope.deleteLine.dblClickCount === 1) {
  3214. $scope.deleteLine.dblClickCount = 0;
  3215. $scope.deleteLine.readyToDelete = false;
  3216. /**
  3217. * NOTE : trick in calling parent controller function with input param when directive with isolate scope
  3218. * see : https://thinkster.io/egghead/isolate-scope-am
  3219. *
  3220. * Here should be:
  3221. *
  3222. *-> in html : dd-remove-line="removeThisLine(indexToDelete)
  3223. *-> in controller : $scope.removeThisLine = function(lineIndex){
  3224. *-> so in directive call it : $scope.removeLine({indexToDelete: currentIndex});
  3225. *
  3226. *
  3227. * BUT in this case (repeats, ul> li.... complicated)
  3228. * => works better (if shaking a lot of line in a row it won't mess up)
  3229. *
  3230. *-> in html : dd-remove-line="removeThisLine($index)
  3231. *-> in controller : $scope.removeThisLine = function(lineIndex){
  3232. *-> so in directive call it : $scope.removeLine();
  3233. */
  3234. //$scope.removeLine({indexToDelete: currentIndex});
  3235. $scope.removeLine();
  3236. //console.warn('force timer destruction after delete!');
  3237. $timeout.cancel(timer);
  3238. }
  3239. //1st dbl click : make it shake so ready to delete
  3240. if ($scope.deleteLine.dblClickCount === 0) {
  3241. $scope.deleteLine.dblClickCount = $scope.deleteLine.dblClickCount + 1;
  3242. $scope.deleteLine.readyToDelete = true;
  3243. }
  3244. }
  3245. };
  3246. /**
  3247. * signle event will ever occur
  3248. *
  3249. * to prevent it to interfere with double click sequence
  3250. * -> set a time out (shaking line to delete will automaticallly end shaking after timeout : 2 seconds)
  3251. */
  3252. $scope.cancelDelete = function () {
  3253. //event.preventDefault();
  3254. //event.stopPropagation();
  3255. timer = $timeout(function () {
  3256. $scope.deleteLine.dblClickCount = 0;
  3257. $scope.deleteLine.readyToDelete = false;
  3258. }, 500);
  3259. /**
  3260. * debug
  3261. */
  3262. // timer.then(
  3263. // () =>{
  3264. // console.log( 'Timer resolved!', Date.now() );
  3265. // },
  3266. // () =>{
  3267. // console.log( 'Timer rejected!', Date.now() );
  3268. // }
  3269. // );
  3270. };
  3271. /**
  3272. * timer destruction to prevent from bad UI experience
  3273. */
  3274. $scope.$on('$destroy', function () {
  3275. return $timeout.cancel(timer);
  3276. });
  3277. /**
  3278. * prevent transclusion creating child scope
  3279. *
  3280. *
  3281. * NOTE :if you want to know more about what I'm saying : check this nice tip on the subject :
  3282. * http://angular-tips.com/blog/2014/03/transclusion-and-scopes/
  3283. */
  3284. transclude($scope.$parent, function (contentClone) {
  3285. //transclusion will append content to '<div id="lineDirectiveTranscludeHere"></div>'
  3286. var childDiv = angular.element(element.children()[0]);
  3287. childDiv.append(contentClone);
  3288. });
  3289. }
  3290. }
  3291. return {
  3292. setters: [function (_) {
  3293. ddDecorLineTemplate = _['default'];
  3294. }],
  3295. execute: function () {
  3296. DRAG_DROP_DECOR_LINE = 'ddDecorLine';
  3297. ddDecorLine.$inject = ['$timeout'];
  3298. _export('default', ddDecorLine);
  3299. _export('DRAG_DROP_DECOR_LINE', DRAG_DROP_DECOR_LINE);
  3300. }
  3301. };
  3302. });
  3303. $__System.register('3b', [], function (_export) {
  3304. 'use strict';
  3305. var DRAG_DROP_NO_EDITABLE_CONTROL;
  3306. function ddNoEditableControl() {
  3307. var directive = {
  3308. restrict: 'A',
  3309. link: linkfct
  3310. };
  3311. return directive;
  3312. function linkfct($scope, element) {
  3313. element.on('click', function (event) {
  3314. return event.preventDefault();
  3315. });
  3316. }
  3317. }
  3318. return {
  3319. setters: [],
  3320. execute: function () {
  3321. DRAG_DROP_NO_EDITABLE_CONTROL = 'ddNoEditableControl';
  3322. ddNoEditableControl.$inject = [];
  3323. _export('default', ddNoEditableControl);
  3324. _export('DRAG_DROP_NO_EDITABLE_CONTROL', DRAG_DROP_NO_EDITABLE_CONTROL);
  3325. }
  3326. };
  3327. });
  3328. $__System.register('3c', ['30', '32', '33', '35', '37', '38', '2f', '3a', '3b'], function (_export) {
  3329. /* global angular */
  3330. 'use strict';
  3331. var dragDropItemCounterService, DRAG_DROP_ITEM_COUNTER_SERVICE, ddDecorContainerDirective, DD_DECOR_CONTAINER_DIRECTIVE, ddDecorContainerController, DD_DECOR_CONTAINER_CONTROLLER_NAME, ddDecorDropZone, DD_DECOR_DROPZONE_DIRECTIVE, ddDecorItem, DRAG_DROP_DECOR_ITEM, dragDropItemDecorationService, DRAG_DROP_ITEM_DECOR_SERVICE, ddContentCounter, DD_CONTENT_COUNTER_DIRECTIVE, ddDecorLine, DRAG_DROP_DECOR_LINE, ddNoEditableControl, DRAG_DROP_NO_EDITABLE_CONTROL, DRAGDROP_MODULE;
  3332. return {
  3333. setters: [function (_) {
  3334. dragDropItemCounterService = _['default'];
  3335. DRAG_DROP_ITEM_COUNTER_SERVICE = _.DRAG_DROP_ITEM_COUNTER_SERVICE;
  3336. }, function (_2) {
  3337. ddDecorContainerDirective = _2['default'];
  3338. DD_DECOR_CONTAINER_DIRECTIVE = _2.DD_DECOR_CONTAINER_DIRECTIVE;
  3339. }, function (_3) {
  3340. ddDecorContainerController = _3['default'];
  3341. DD_DECOR_CONTAINER_CONTROLLER_NAME = _3.DD_DECOR_CONTAINER_CONTROLLER_NAME;
  3342. }, function (_4) {
  3343. ddDecorDropZone = _4['default'];
  3344. DD_DECOR_DROPZONE_DIRECTIVE = _4.DD_DECOR_DROPZONE_DIRECTIVE;
  3345. }, function (_5) {
  3346. ddDecorItem = _5['default'];
  3347. DRAG_DROP_DECOR_ITEM = _5.DRAG_DROP_DECOR_ITEM;
  3348. }, function (_6) {
  3349. dragDropItemDecorationService = _6['default'];
  3350. DRAG_DROP_ITEM_DECOR_SERVICE = _6.DRAG_DROP_ITEM_DECOR_SERVICE;
  3351. }, function (_f) {
  3352. ddContentCounter = _f['default'];
  3353. DD_CONTENT_COUNTER_DIRECTIVE = _f.DD_CONTENT_COUNTER_DIRECTIVE;
  3354. }, function (_a) {
  3355. ddDecorLine = _a['default'];
  3356. DRAG_DROP_DECOR_LINE = _a.DRAG_DROP_DECOR_LINE;
  3357. }, function (_b) {
  3358. ddNoEditableControl = _b['default'];
  3359. DRAG_DROP_NO_EDITABLE_CONTROL = _b.DRAG_DROP_NO_EDITABLE_CONTROL;
  3360. }],
  3361. execute: function () {
  3362. DRAGDROP_MODULE = 'edaDragDropWay.dragdrop.module';
  3363. _export('default', angular.module(DRAGDROP_MODULE, []).directive(DD_CONTENT_COUNTER_DIRECTIVE, ddContentCounter).controller(DD_DECOR_CONTAINER_CONTROLLER_NAME, ddDecorContainerController).directive(DD_DECOR_CONTAINER_DIRECTIVE, ddDecorContainerDirective).directive(DD_DECOR_DROPZONE_DIRECTIVE, ddDecorDropZone).directive(DRAG_DROP_DECOR_ITEM, ddDecorItem).service(DRAG_DROP_ITEM_DECOR_SERVICE, dragDropItemDecorationService).directive(DRAG_DROP_NO_EDITABLE_CONTROL, ddNoEditableControl).service(DRAG_DROP_ITEM_COUNTER_SERVICE, dragDropItemCounterService).directive(DRAG_DROP_DECOR_LINE, ddDecorLine));
  3364. }
  3365. };
  3366. });
  3367. $__System.register('3d', [], function (_export) {
  3368. 'use strict';
  3369. var EDA_RIGHT_CLICK_DIRECTIVE;
  3370. function edaRightClick($parse) {
  3371. var directive = {
  3372. restrict: 'A',
  3373. link: linkFct
  3374. };
  3375. return directive;
  3376. function linkFct(scope, element, attrs) {
  3377. var fn = $parse(attrs.edaRightClick);
  3378. var columnIndex = $parse(attrs.edaRightClickColIndex);
  3379. var fctSetRightclicked = $parse(attrs.edaSetRightClicked);
  3380. /**
  3381. * on right click event manage
  3382. * - open edit panel through attrs.edaRightClick function
  3383. * - set rightCliked attribute (to true) to control (in dragDropModel)
  3384. */
  3385. element.on('contextmenu', function (event) {
  3386. scope.$apply(function () {
  3387. event.preventDefault();
  3388. if (columnIndex(scope) === 1) fctSetRightclicked(scope, {}); //right click limited to template column (index = 1)
  3389. if (columnIndex(scope) === 1) fn(scope, { $event: event }); //right click limited to template column (index = 1)
  3390. });
  3391. });
  3392. }
  3393. }
  3394. return {
  3395. setters: [],
  3396. execute: function () {
  3397. EDA_RIGHT_CLICK_DIRECTIVE = 'edaRightClick';
  3398. edaRightClick.$inject = ['$parse'];
  3399. _export('default', edaRightClick);
  3400. _export('EDA_RIGHT_CLICK_DIRECTIVE', EDA_RIGHT_CLICK_DIRECTIVE);
  3401. }
  3402. };
  3403. });
  3404. $__System.register('3e', ['9', 'a'], function (_export) {
  3405. var _createClass, _classCallCheck, EDA_RIGHT_CLICKED_MANAGER_SERVICE, ddItemRightClickedManager;
  3406. return {
  3407. setters: [function (_) {
  3408. _createClass = _['default'];
  3409. }, function (_a) {
  3410. _classCallCheck = _a['default'];
  3411. }],
  3412. execute: function () {
  3413. 'use strict';
  3414. EDA_RIGHT_CLICKED_MANAGER_SERVICE = 'ddItemRightClickedManager';
  3415. ddItemRightClickedManager = (function () {
  3416. function ddItemRightClickedManager() {
  3417. _classCallCheck(this, ddItemRightClickedManager);
  3418. this.init();
  3419. }
  3420. _createClass(ddItemRightClickedManager, [{
  3421. key: 'init',
  3422. value: function init() {}
  3423. /**
  3424. * setUnRightClicked
  3425. * set unSelected (see edaRightClick directive)
  3426. *
  3427. * used in edaEditcontroller when droping control
  3428. */
  3429. }, {
  3430. key: 'setUnRightClicked',
  3431. value: function setUnRightClicked(dragDropModelItem) {
  3432. dragDropModelItem.rightCliked = false;
  3433. }
  3434. /**
  3435. * resetAllDragDropItemSelectedState
  3436. *
  3437. * simply reset (=set to false) all item.rightCliked
  3438. * in edit column (dragable column)
  3439. *
  3440. * used in edaEditPanel when closeEditPanel() called
  3441. */
  3442. }, {
  3443. key: 'resetAllDragDropItemSelectedState',
  3444. value: function resetAllDragDropItemSelectedState(dragDropModel) {
  3445. angular.forEach(dragDropModel[1], function (line) {
  3446. angular.forEach(line, function (item) {
  3447. return item.rightCliked = false;
  3448. });
  3449. });
  3450. }
  3451. }]);
  3452. return ddItemRightClickedManager;
  3453. })();
  3454. ddItemRightClickedManager.$inject = [];
  3455. _export('default', ddItemRightClickedManager);
  3456. _export('EDA_RIGHT_CLICKED_MANAGER_SERVICE', EDA_RIGHT_CLICKED_MANAGER_SERVICE);
  3457. }
  3458. };
  3459. });
  3460. $__System.register('3f', ['3d', '3e'], function (_export) {
  3461. 'use strict';
  3462. var edaRightClick, EDA_RIGHT_CLICK_DIRECTIVE, ddItemRightClickedManager, EDA_RIGHT_CLICKED_MANAGER_SERVICE, EDA_RIGHT_CLICK_MODULE;
  3463. return {
  3464. setters: [function (_d) {
  3465. edaRightClick = _d['default'];
  3466. EDA_RIGHT_CLICK_DIRECTIVE = _d.EDA_RIGHT_CLICK_DIRECTIVE;
  3467. }, function (_e) {
  3468. ddItemRightClickedManager = _e['default'];
  3469. EDA_RIGHT_CLICKED_MANAGER_SERVICE = _e.EDA_RIGHT_CLICKED_MANAGER_SERVICE;
  3470. }],
  3471. execute: function () {
  3472. EDA_RIGHT_CLICK_MODULE = 'eda.right.click.module';
  3473. _export('default', angular.module(EDA_RIGHT_CLICK_MODULE, []).directive(EDA_RIGHT_CLICK_DIRECTIVE, edaRightClick).service(EDA_RIGHT_CLICKED_MANAGER_SERVICE, ddItemRightClickedManager));
  3474. }
  3475. };
  3476. });
  3477. $__System.register('40', ['9', 'a'], function (_export) {
  3478. var _createClass, _classCallCheck, DRAG_DROP_CONFIG_PROXY_SERVICE, ddModelConfModelProxyService;
  3479. return {
  3480. setters: [function (_) {
  3481. _createClass = _['default'];
  3482. }, function (_a) {
  3483. _classCallCheck = _a['default'];
  3484. }],
  3485. execute: function () {
  3486. 'use strict';
  3487. DRAG_DROP_CONFIG_PROXY_SERVICE = 'ddModelConfModelProxyService';
  3488. ddModelConfModelProxyService = (function () {
  3489. function ddModelConfModelProxyService(EasyFormGenFormlyBindingModels,
  3490. // controllerModalProxy,
  3491. easyFormDragWayConfig, $parse) {
  3492. _classCallCheck(this, ddModelConfModelProxyService);
  3493. this.EasyFormGenFormlyBindingModels = EasyFormGenFormlyBindingModels;
  3494. // this.controllerModalProxy = controllerModalProxy;
  3495. // this.dragDropConfig = dragDropConfig;
  3496. this.easyFormDragWayConfig = easyFormDragWayConfig;
  3497. this.$parse = $parse;
  3498. this.init();
  3499. }
  3500. _createClass(ddModelConfModelProxyService, [{
  3501. key: 'init',
  3502. value: function init() {}
  3503. }, {
  3504. key: 'refreshAllConfigurationFromDragAndDropModel',
  3505. value: function refreshAllConfigurationFromDragAndDropModel(configModel, ddModel) {
  3506. var _this = this;
  3507. /**
  3508. * TODO : prevent reset already set props
  3509. *
  3510. * previousConfigurationModel = a backup of configuration model 'configModel 'before resetting it
  3511. * -> dragDrop model contains unique keys of already existing controls : these controls must not be reset / overwritten
  3512. */
  3513. // let previousConfigurationModel = angular.copy(configModel);
  3514. configModel.lines = [];
  3515. // iterates line config model
  3516. angular.forEach(ddModel[1], function (lineValue, keyValue) {
  3517. // add empty line 1st - if line is empty -> it will be enough
  3518. configModel.lines.push(angular.copy(_this.EasyFormGenFormlyBindingModels.getEasyFormEmptyConfigurationLineModel()));
  3519. // update line value field
  3520. _this.applyThisLine(keyValue + 1, keyValue, configModel);
  3521. // iterate through columns and add them if control exists
  3522. angular.forEach(lineValue, function (colValue, colIndex) {
  3523. // push an empty control model but relative to dradrop : model control type - (if datepicker so additionnal properties are added)
  3524. var controlToBind = {
  3525. control: angular.copy(_this.EasyFormGenFormlyBindingModels.getFormlyControlTemplateForNcolumnLine(lineValue.length, _this.getFormlyDetailedControlModelFromDragDropObject(lineValue[colIndex]).formlyType))
  3526. };
  3527. var formlyDetailedControlModel = _this.getFormlyDetailedControlModelFromDragDropObject(lineValue[colIndex]);
  3528. // controls alreadys existed so do not reset it - control to bind is the previous one
  3529. if (typeof colValue.key !== 'undefined') {
  3530. //console.warn('debug dragdropModel show this control key : ' + colValue.key);
  3531. controlToBind.control = angular.copy(colValue.configModelControl);
  3532. //update cssClass depending new position:
  3533. var newClassName = _this.EasyFormGenFormlyBindingModels.getFormlyControlTemplateForNcolumnLine(lineValue.length, _this.getFormlyDetailedControlModelFromDragDropObject(lineValue[colIndex]).formlyType);
  3534. controlToBind.control.className = newClassName.className;
  3535. //test if header nee this one
  3536. controlToBind.control.cssClass = newClassName.className;
  3537. // get control details for this key in backup : previousConfigurationModel
  3538. } else {
  3539. // controls did not exists before : control to bind is a new one
  3540. // bind dragdrop control properties to configuration model through controlToBind var
  3541. _this.bindConfigCtrlModelFromFormlyDetailedCtrlModel(formlyDetailedControlModel, controlToBind, configModel);
  3542. }
  3543. // apply controlToBind var to configuration model control
  3544. if (typeof configModel.lines[keyValue].columns[colIndex] === 'undefined') configModel.lines[keyValue].columns.push(angular.copy(_this.EasyFormGenFormlyBindingModels.getEasyFormConfigurationEmptyControlModel()));
  3545. configModel.lines[keyValue].columns[colIndex].control = angular.copy(controlToBind.control);
  3546. configModel.lines[keyValue].columns[colIndex].numColumn = colIndex + 1;
  3547. configModel.lines[keyValue].columns[colIndex].exist = true;
  3548. });
  3549. });
  3550. return configModel;
  3551. }
  3552. }, {
  3553. key: 'refreshControlsKeys',
  3554. value: function refreshControlsKeys(configModel, dragDropModel) {
  3555. angular.forEach(configModel.lines, function (aConfigLine, aConfigLineIndex) {
  3556. angular.forEach(aConfigLine.columns, function (aConfigControl, aConfigControlIndex) {
  3557. //if last control removed from line - and dragDrop model did not already removed this line
  3558. if (typeof dragDropModel[1][aConfigLineIndex] !== 'undefined') {
  3559. if (dragDropModel[1][aConfigLineIndex].length > 0) {
  3560. dragDropModel[1][aConfigLineIndex][aConfigControlIndex].key = aConfigControl.control.key;
  3561. //need to save all in dragdropModel as it is a reference
  3562. //configModel still needed
  3563. // -> to keep coherence (same back model) between all version of easyForm Generator
  3564. // -> is the back model (can be saved to dataBase)
  3565. dragDropModel[1][aConfigLineIndex][aConfigControlIndex].configModelControl = angular.copy(aConfigControl.control);
  3566. }
  3567. }
  3568. });
  3569. });
  3570. }
  3571. /**
  3572. * drag drop model
  3573. * -> will be used to bind configuration model
  3574. * of no key saved, configuration model controls would be reset each drop events
  3575. *
  3576. * -> matching key : will prevent to reset existing control
  3577. */
  3578. }, {
  3579. key: 'loadDragDropModelFromConfigurationModel',
  3580. value: function loadDragDropModelFromConfigurationModel(configModel, dragDropModel) {
  3581. var _this2 = this;
  3582. //reset dragdrop fields model NOT all dragDropModel!
  3583. dragDropModel[1] = [];
  3584. angular.forEach(configModel.lines, function (aConfigLine, aConfigLineIndex) {
  3585. //add new line
  3586. dragDropModel[1].push([]);
  3587. angular.forEach(aConfigLine.columns, function (aConfigControl) {
  3588. // get control type from configuration.control.selectedControl
  3589. var dragdropControlRef = {
  3590. control: 'empty',
  3591. cssClass: 'col-xs-12',
  3592. label: '<div class="col-md-12"> <div class="form-group"> <div class=""> </div> </div></div>'
  3593. };
  3594. angular.forEach(dragDropModel[0], function (groupOfCtrlRef) {
  3595. angular.forEach(groupOfCtrlRef, function (aCtrlref) {
  3596. if (aCtrlref.control === aConfigControl.control.selectedControl) dragdropControlRef = angular.copy(aCtrlref);
  3597. });
  3598. });
  3599. dragDropModel[1][aConfigLineIndex].push(dragdropControlRef);
  3600. //update class depending number of control per line
  3601. var cssClassToApply = _this2.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(dragDropModel[1][aConfigLineIndex].length);
  3602. angular.forEach(dragDropModel[1][aConfigLineIndex], function (ddControlToUpdate) {
  3603. return ddControlToUpdate.cssClass = cssClassToApply;
  3604. });
  3605. });
  3606. });
  3607. // console.info('bindDragDropModelFromConfigurationModel');
  3608. // console.dir(
  3609. // {
  3610. // 'when' : 'starting',
  3611. // 'configModel is ' : angular.copy(configModel),
  3612. // 'dragDropModel is ' : angular.copy(dragDropModel)
  3613. // }
  3614. // );
  3615. }
  3616. /**
  3617. * returns a control model that is more formly detailed
  3618. * (more formly detailed : see controls property in EasyFormGenFormlyBindingModels._easyFormListControls)
  3619. */
  3620. }, {
  3621. key: 'getFormlyDetailedControlModelFromDragDropObject',
  3622. value: function getFormlyDetailedControlModelFromDragDropObject(dragDrapCtrlModel) {
  3623. var controlModel = {};
  3624. var listControl = this.EasyFormGenFormlyBindingModels.getEasyFormListControls();
  3625. var controlsListGetter = this.$parse('controls');
  3626. angular.forEach(controlsListGetter(listControl), function (ctrlListValue) {
  3627. if (ctrlListValue.id === dragDrapCtrlModel.control) controlModel = ctrlListValue;
  3628. });
  3629. return controlModel;
  3630. }
  3631. /**
  3632. * valid a control key is unique
  3633. *
  3634. * yes... function name already told us that,
  3635. * -> it's just confirmation and to see if
  3636. * you keep focus while reading it ^^
  3637. */
  3638. }, {
  3639. key: 'validKeyUniqueness',
  3640. value: function validKeyUniqueness(thisKey, configurationObj) {
  3641. var isUnique = true;
  3642. for (var i = configurationObj.lines.length - 1; i >= 0; i--) {
  3643. for (var j = configurationObj.lines[i].columns.length - 1; j >= 0; j--) {
  3644. if (typeof configurationObj.lines[i].columns[j].control !== 'undefined') {
  3645. if (configurationObj.lines[i].columns[j].control.key === thisKey) {
  3646. isUnique = false;
  3647. }
  3648. }
  3649. }
  3650. }
  3651. return isUnique;
  3652. }
  3653. }, {
  3654. key: 'createUniqueKey',
  3655. value: function createUniqueKey(baseKeyValue, configurationObj) {
  3656. // unique key (set only first time) in this model is formly control type + Date.now();
  3657. var newKey = baseKeyValue + '-' + Date.now();
  3658. if (this.validKeyUniqueness(newKey, configurationObj) === true) {
  3659. return newKey;
  3660. } else {
  3661. newKey = baseKeyValue + '-' + Date.now();
  3662. if (this.validKeyUniqueness(newKey, configurationObj) === true) {
  3663. return newKey;
  3664. } else {
  3665. newKey = baseKeyValue + '-' + Date.now();
  3666. return newKey;
  3667. }
  3668. }
  3669. }
  3670. }, {
  3671. key: 'applyThisLine',
  3672. value: function applyThisLine(linevalue, lineIndex, configModel) {
  3673. angular.forEach(configModel.lines, function (aLineValue, aLineKey) {
  3674. if (aLineKey === lineIndex) aLineValue.line = linevalue;
  3675. });
  3676. }
  3677. /**
  3678. * bind formly detailed model to configuration control model
  3679. */
  3680. }, {
  3681. key: 'bindConfigCtrlModelFromFormlyDetailedCtrlModel',
  3682. value: function bindConfigCtrlModelFromFormlyDetailedCtrlModel(formlyDetailCtrlModel, configurationCtrlModel, configModel) {
  3683. /**
  3684. * TODO :properties should be served by provider
  3685. * more configurable without pain
  3686. */
  3687. //set selected control :
  3688. this.$parse('control.selectedControl').assign(configurationCtrlModel, this.$parse('selectedControl')(formlyDetailCtrlModel));
  3689. //set type :
  3690. this.$parse('control.type').assign(configurationCtrlModel, this.$parse('formlyType')(formlyDetailCtrlModel));
  3691. //set key :
  3692. this.$parse('control.key').assign(configurationCtrlModel, this.createUniqueKey(this.$parse('control.type')(configurationCtrlModel), configModel));
  3693. //set subtype :
  3694. this.$parse('control.subtype').assign(configurationCtrlModel, this.$parse('formlySubtype')(formlyDetailCtrlModel));
  3695. //set templateOptions.label :
  3696. this.$parse('control.templateOptions.label').assign(configurationCtrlModel, this.$parse('formlyLabel')(formlyDetailCtrlModel));
  3697. //set templateOptions.required :
  3698. this.$parse('control.templateOptions.required').assign(configurationCtrlModel, this.$parse('formlyRequired')(formlyDetailCtrlModel));
  3699. //set templateOptions.required :
  3700. this.$parse('control.templateOptions.description').assign(configurationCtrlModel, this.$parse('formlyDesciption')(formlyDetailCtrlModel));
  3701. //set templateOptions.required :
  3702. this.$parse('control.templateOptions.placeholder').assign(configurationCtrlModel, this.$parse('formlyPlaceholder')(formlyDetailCtrlModel));
  3703. //set templateOptions.required :
  3704. this.$parse('control.templateOptions.options').assign(configurationCtrlModel, this.$parse('formlyOptions')(formlyDetailCtrlModel));
  3705. if (this.$parse('control.type')(configurationCtrlModel) === 'datepicker') {
  3706. this.$parse('control.templateOptions.datepickerPopup').assign(configurationCtrlModel, this.$parse('datepickerPopup')(formlyDetailCtrlModel));
  3707. }
  3708. }
  3709. }]);
  3710. return ddModelConfModelProxyService;
  3711. })();
  3712. ddModelConfModelProxyService.$inject = ['EasyFormGenFormlyBindingModels',
  3713. // 'controllerModalProxy',
  3714. // 'dragDropConfig',
  3715. 'easyFormDragWayConfig', '$parse'];
  3716. _export('default', ddModelConfModelProxyService);
  3717. _export('DRAG_DROP_CONFIG_PROXY_SERVICE', DRAG_DROP_CONFIG_PROXY_SERVICE);
  3718. }
  3719. };
  3720. });
  3721. // dragDropConfig,
  3722. $__System.register('41', ['40'], function (_export) {
  3723. 'use strict';
  3724. var ddModelConfModelProxyService, DRAG_DROP_CONFIG_PROXY_SERVICE, EDA_CONFIG_PROXY_MODULE;
  3725. return {
  3726. setters: [function (_) {
  3727. ddModelConfModelProxyService = _['default'];
  3728. DRAG_DROP_CONFIG_PROXY_SERVICE = _.DRAG_DROP_CONFIG_PROXY_SERVICE;
  3729. }],
  3730. execute: function () {
  3731. EDA_CONFIG_PROXY_MODULE = 'eda.config.proxy.module';
  3732. _export('default', angular.module(EDA_CONFIG_PROXY_MODULE, []).service(DRAG_DROP_CONFIG_PROXY_SERVICE, ddModelConfModelProxyService));
  3733. }
  3734. };
  3735. });
  3736. $__System.register('42', [], function (_export) {
  3737. 'use strict';
  3738. var DNDLIST_DIRECTIVE, TO_INJECT;
  3739. function dndList($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) {
  3740. var directive = {
  3741. link: linkFct
  3742. };
  3743. return directive;
  3744. function linkFct(scope, element, attr) {
  3745. // While an element is dragged over the list, this placeholder element is inserted
  3746. // at the location where the element would be inserted after dropping
  3747. var placeholder = angular.element('<li class="dndPlaceholder"></li>');
  3748. var placeholderNode = placeholder[0];
  3749. var listNode = element[0];
  3750. var horizontal = attr.dndHorizontalList && scope.$eval(attr.dndHorizontalList);
  3751. var externalSources = attr.dndExternalSources && scope.$eval(attr.dndExternalSources);
  3752. /**
  3753. * The dragover event is triggered "every few hundred milliseconds" while an element
  3754. * is being dragged over our list, or over an child element.
  3755. */
  3756. element.on('dragover', function (event) {
  3757. event = event.originalEvent || event;
  3758. if (!isDropAllowed(event)) return true;
  3759. // First of all, make sure that the placeholder is shown
  3760. // This is especially important if the list is empty
  3761. if (placeholderNode.parentNode != listNode) {
  3762. element.append(placeholder);
  3763. }
  3764. if (event.target !== listNode) {
  3765. // Try to find the node direct directly below the list node.
  3766. var listItemNode = event.target;
  3767. while (listItemNode.parentNode !== listNode && listItemNode.parentNode) {
  3768. listItemNode = listItemNode.parentNode;
  3769. }
  3770. if (listItemNode.parentNode === listNode && listItemNode !== placeholderNode) {
  3771. // If the mouse pointer is in the upper half of the child element,
  3772. // we place it before the child element, otherwise below it.
  3773. if (isMouseInFirstHalf(event, listItemNode)) {
  3774. listNode.insertBefore(placeholderNode, listItemNode);
  3775. } else {
  3776. listNode.insertBefore(placeholderNode, listItemNode.nextSibling);
  3777. }
  3778. }
  3779. } else {
  3780. // This branch is reached when we are dragging directly over the list element.
  3781. // Usually we wouldn't need to do anything here, but the IE does not fire it's
  3782. // events for the child element, only for the list directly. Therefore we repeat
  3783. // the positioning algorithm for IE here.
  3784. if (isMouseInFirstHalf(event, placeholderNode, true)) {
  3785. // Check if we should move the placeholder element one spot towards the top.
  3786. // Note that display none elements will have offsetTop and offsetHeight set to
  3787. // zero, therefore we need a special check for them.
  3788. while (placeholderNode.previousElementSibling && (isMouseInFirstHalf(event, placeholderNode.previousElementSibling, true) || placeholderNode.previousElementSibling.offsetHeight === 0)) {
  3789. listNode.insertBefore(placeholderNode, placeholderNode.previousElementSibling);
  3790. }
  3791. } else {
  3792. // Check if we should move the placeholder element one spot towards the bottom
  3793. while (placeholderNode.nextElementSibling && !isMouseInFirstHalf(event, placeholderNode.nextElementSibling, true)) {
  3794. listNode.insertBefore(placeholderNode, placeholderNode.nextElementSibling.nextElementSibling);
  3795. }
  3796. }
  3797. }
  3798. // At this point we invoke the callback, which still can disallow the drop.
  3799. // We can't do this earlier because we want to pass the index of the placeholder.
  3800. if (attr.dndDragover && !invokeCallback(attr.dndDragover, event)) {
  3801. return stopDragover();
  3802. }
  3803. element.addClass('dndDragover');
  3804. event.preventDefault();
  3805. event.stopPropagation();
  3806. return false;
  3807. });
  3808. /**
  3809. * When the element is dropped, we use the position of the placeholder element as the
  3810. * position where we insert the transferred data. This assumes that the list has exactly
  3811. * one child element per array element.
  3812. */
  3813. element.on('drop', function (event) {
  3814. event = event.originalEvent || event;
  3815. if (!isDropAllowed(event)) return true;
  3816. // The default behavior in Firefox is to interpret the dropped element as URL and
  3817. // forward to it. We want to prevent that even if our drop is aborted.
  3818. event.preventDefault();
  3819. // Unserialize the data that was serialized in dragstart. According to the HTML5 specs,
  3820. // the "Text" drag type will be converted to text/plain, but IE does not do that.
  3821. var data = event.dataTransfer.getData('Text') || event.dataTransfer.getData('text/plain');
  3822. var transferredObject;
  3823. try {
  3824. transferredObject = JSON.parse(data);
  3825. } catch (e) {
  3826. return stopDragover();
  3827. }
  3828. // Invoke the callback, which can transform the transferredObject and even abort the drop.
  3829. if (attr.dndDrop) {
  3830. transferredObject = invokeCallback(attr.dndDrop, event, transferredObject);
  3831. if (!transferredObject) {
  3832. return stopDragover();
  3833. }
  3834. }
  3835. // Retrieve the JSON array and insert the transferred object into it.
  3836. var targetArray = scope.$eval(attr.dndList);
  3837. scope.$apply(function () {
  3838. targetArray.splice(getPlaceholderIndex(), 0, transferredObject);
  3839. });
  3840. // In Chrome on Windows the dropEffect will always be none...
  3841. // We have to determine the actual effect manually from the allowed effects
  3842. if (event.dataTransfer.dropEffect === 'none') {
  3843. if (event.dataTransfer.effectAllowed === 'copy' || event.dataTransfer.effectAllowed === 'move') {
  3844. dndDropEffectWorkaround.dropEffect = event.dataTransfer.effectAllowed;
  3845. } else {
  3846. dndDropEffectWorkaround.dropEffect = event.ctrlKey ? 'copy' : 'move';
  3847. }
  3848. } else {
  3849. dndDropEffectWorkaround.dropEffect = event.dataTransfer.dropEffect;
  3850. }
  3851. // Clean up
  3852. stopDragover();
  3853. event.stopPropagation();
  3854. return false;
  3855. });
  3856. /**
  3857. * We have to remove the placeholder when the element is no longer dragged over our list. The
  3858. * problem is that the dragleave event is not only fired when the element leaves our list,
  3859. * but also when it leaves a child element -- so practically it's fired all the time. As a
  3860. * workaround we wait a few milliseconds and then check if the dndDragover class was added
  3861. * again. If it is there, dragover must have been called in the meantime, i.e. the element
  3862. * is still dragging over the list. If you know a better way of doing this, please tell me!
  3863. */
  3864. element.on('dragleave', function (event) {
  3865. event = event.originalEvent || event;
  3866. element.removeClass('dndDragover');
  3867. $timeout(function () {
  3868. if (!element.hasClass('dndDragover')) {
  3869. placeholder.remove();
  3870. }
  3871. }, 100);
  3872. });
  3873. /**
  3874. * Checks whether the mouse pointer is in the first half of the given target element.
  3875. *
  3876. * In Chrome we can just use offsetY, but in Firefox we have to use layerY, which only
  3877. * works if the child element has position relative. In IE the events are only triggered
  3878. * on the listNode instead of the listNodeItem, therefore the mouse positions are
  3879. * relative to the parent element of targetNode.
  3880. */
  3881. function isMouseInFirstHalf(event, targetNode, relativeToParent) {
  3882. var mousePointer = horizontal ? event.offsetX || event.layerX : event.offsetY || event.layerY;
  3883. var targetSize = horizontal ? targetNode.offsetWidth : targetNode.offsetHeight;
  3884. var targetPosition = horizontal ? targetNode.offsetLeft : targetNode.offsetTop;
  3885. targetPosition = relativeToParent ? targetPosition : 0;
  3886. return mousePointer < targetPosition + targetSize / 2;
  3887. }
  3888. /**
  3889. * We use the position of the placeholder node to determine at which position of the array the
  3890. * object needs to be inserted
  3891. */
  3892. function getPlaceholderIndex() {
  3893. return Array.prototype.indexOf.call(listNode.children, placeholderNode);
  3894. }
  3895. /**
  3896. * Checks various conditions that must be fulfilled for a drop to be allowed
  3897. */
  3898. function isDropAllowed(event) {
  3899. // Disallow drop from external source unless it's allowed explicitly.
  3900. if (!dndDragTypeWorkaround.isDragging && !externalSources) return false;
  3901. // Check mimetype. Usually we would use a custom drag type instead of Text, but IE doesn't
  3902. // support that.
  3903. if (!hasTextMimetype(event.dataTransfer.types)) return false;
  3904. // Now check the dnd-allowed-types against the type of the incoming element. For drops from
  3905. // external sources we don't know the type, so it will need to be checked via dnd-drop.
  3906. if (attr.dndAllowedTypes && dndDragTypeWorkaround.isDragging) {
  3907. var allowed = scope.$eval(attr.dndAllowedTypes);
  3908. if (angular.isArray(allowed) && allowed.indexOf(dndDragTypeWorkaround.dragType) === -1) {
  3909. return false;
  3910. }
  3911. }
  3912. // Check whether droping is disabled completely
  3913. if (attr.dndDisableIf && scope.$eval(attr.dndDisableIf)) return false;
  3914. return true;
  3915. }
  3916. /**
  3917. * Small helper function that cleans up if we aborted a drop.
  3918. */
  3919. function stopDragover() {
  3920. placeholder.remove();
  3921. element.removeClass('dndDragover');
  3922. return true;
  3923. }
  3924. /**
  3925. * Invokes a callback with some interesting parameters and returns the callbacks return value.
  3926. */
  3927. function invokeCallback(expression, event, item) {
  3928. return $parse(expression)(scope, {
  3929. event: event,
  3930. index: getPlaceholderIndex(),
  3931. item: item || undefined,
  3932. external: !dndDragTypeWorkaround.isDragging,
  3933. type: dndDragTypeWorkaround.isDragging ? dndDragTypeWorkaround.dragType : undefined
  3934. });
  3935. }
  3936. /**
  3937. * Check if the dataTransfer object contains a drag type that we can handle. In old versions
  3938. * of IE the types collection will not even be there, so we just assume a drop is possible.
  3939. */
  3940. function hasTextMimetype(types) {
  3941. if (!types) return true;
  3942. for (var i = 0; i < types.length; i++) {
  3943. if (types[i] === 'Text' || types[i] === 'text/plain') return true;
  3944. }
  3945. return false;
  3946. }
  3947. }
  3948. }
  3949. return {
  3950. setters: [],
  3951. execute: function () {
  3952. DNDLIST_DIRECTIVE = 'dndList';
  3953. TO_INJECT = ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround'];
  3954. dndList.$inject = TO_INJECT;
  3955. _export('default', dndList);
  3956. _export('DNDLIST_DIRECTIVE', DNDLIST_DIRECTIVE);
  3957. }
  3958. };
  3959. });
  3960. $__System.register('43', [], function (_export) {
  3961. 'use strict';
  3962. var DNDDRAGGABLE_DIRECTIVE, TO_INJECT;
  3963. function dndDraggable($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) {
  3964. var directive = {
  3965. link: linkFct
  3966. };
  3967. return directive;
  3968. function linkFct(scope, element, attr) {
  3969. var _this = this;
  3970. // Set the HTML5 draggable attribute on the element
  3971. element.attr('draggable', 'true');
  3972. // If the dnd-disable-if attribute is set, we have to watch that
  3973. if (attr.dndDisableIf) {
  3974. scope.$watch(attr.dndDisableIf, function (disabled) {
  3975. return element.attr('draggable', !disabled);
  3976. });
  3977. }
  3978. /**
  3979. * When the drag operation is started we have to prepare the dataTransfer object,
  3980. * which is the primary way we communicate with the target element
  3981. */
  3982. element.on('dragstart', function (event) {
  3983. event = event.originalEvent || event;
  3984. // Serialize the data associated with this element. IE only supports the Text drag type
  3985. event.dataTransfer.setData('Text', angular.toJson(scope.$eval(attr.dndDraggable)));
  3986. // Only allow actions specified in dnd-effect-allowed attribute
  3987. event.dataTransfer.effectAllowed = attr.dndEffectAllowed || 'move';
  3988. // Add CSS classes. See documentation above
  3989. element.addClass('dndDragging');
  3990. $timeout(function () {
  3991. element.addClass('dndDraggingSource');
  3992. }, 0);
  3993. // Workarounds for stupid browsers, see description below
  3994. dndDropEffectWorkaround.dropEffect = 'none';
  3995. dndDragTypeWorkaround.isDragging = true;
  3996. // Save type of item in global state. Usually, this would go into the dataTransfer
  3997. // typename, but we have to use "Text" there to support IE
  3998. dndDragTypeWorkaround.dragType = attr.dndType ? scope.$eval(attr.dndType) : undefined;
  3999. // Invoke callback
  4000. $parse(attr.dndDragstart)(scope, { event: event });
  4001. event.stopPropagation();
  4002. });
  4003. /**
  4004. * The dragend event is triggered when the element was dropped or when the drag
  4005. * operation was aborted (e.g. hit escape button). Depending on the executed action
  4006. * we will invoke the callbacks specified with the dnd-moved or dnd-copied attribute.
  4007. */
  4008. element.on('dragend', function (event) {
  4009. event = event.originalEvent || event;
  4010. // Invoke callbacks. Usually we would use event.dataTransfer.dropEffect to determine
  4011. // the used effect, but Chrome has not implemented that field correctly. On Windows
  4012. // it always sets it to 'none', while Chrome on Linux sometimes sets it to something
  4013. // else when it's supposed to send 'none' (drag operation aborted).
  4014. var dropEffect = dndDropEffectWorkaround.dropEffect;
  4015. scope.$apply(function () {
  4016. switch (dropEffect) {
  4017. case 'move':
  4018. $parse(attr.dndMoved)(scope, { event: event });
  4019. break;
  4020. case 'copy':
  4021. $parse(attr.dndCopied)(scope, { event: event });
  4022. break;
  4023. }
  4024. });
  4025. // Clean up
  4026. element.removeClass('dndDragging');
  4027. element.removeClass('dndDraggingSource');
  4028. dndDragTypeWorkaround.isDragging = false;
  4029. event.stopPropagation();
  4030. });
  4031. /**
  4032. * When the element is clicked we invoke the callback function
  4033. * specified with the dnd-selected attribute.
  4034. */
  4035. element.on('click', function (event) {
  4036. event = event.originalEvent || event;
  4037. scope.$apply(function () {
  4038. return $parse(attr.dndSelected)(scope, { event: event });
  4039. });
  4040. event.stopPropagation();
  4041. });
  4042. /**
  4043. * Workaround to make element draggable in IE9
  4044. */
  4045. element.on('selectstart', function () {
  4046. if (_this.dragDrop) _this.dragDrop();
  4047. return false;
  4048. });
  4049. }
  4050. }
  4051. return {
  4052. setters: [],
  4053. execute: function () {
  4054. DNDDRAGGABLE_DIRECTIVE = 'dndDraggable';
  4055. TO_INJECT = ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround'];
  4056. dndDraggable.$inject = TO_INJECT;
  4057. _export('default', dndDraggable);
  4058. _export('DNDDRAGGABLE_DIRECTIVE', DNDDRAGGABLE_DIRECTIVE);
  4059. }
  4060. };
  4061. });
  4062. $__System.register('44', ['42', '43'], function (_export) {
  4063. 'use strict';
  4064. var dndList, DNDLIST_DIRECTIVE, dndDraggable, DNDDRAGGABLE_DIRECTIVE, DRAG_DROP_LIST_MODULE;
  4065. return {
  4066. setters: [function (_) {
  4067. dndList = _['default'];
  4068. DNDLIST_DIRECTIVE = _.DNDLIST_DIRECTIVE;
  4069. }, function (_2) {
  4070. dndDraggable = _2['default'];
  4071. DNDDRAGGABLE_DIRECTIVE = _2.DNDDRAGGABLE_DIRECTIVE;
  4072. }],
  4073. execute: function () {
  4074. DRAG_DROP_LIST_MODULE = 'dndLists.module';
  4075. _export('default', angular.module(DRAG_DROP_LIST_MODULE, []).directive(DNDLIST_DIRECTIVE, dndList).directive(DNDDRAGGABLE_DIRECTIVE, dndDraggable).factory('dndDragTypeWorkaround', function () {
  4076. return {};
  4077. }).factory('dndDropEffectWorkaround', function () {
  4078. return {};
  4079. }));
  4080. }
  4081. };
  4082. });
  4083. $__System.register('45', [], function (_export) {
  4084. 'use strict';
  4085. var PAGE_SLIDE_DIRECTIVE;
  4086. function pageslide() {
  4087. var directive = {
  4088. restrict: 'EAC',
  4089. transclude: false,
  4090. scope: {
  4091. psOpen: '=?',
  4092. psAutoClose: '=?',
  4093. psSide: '@',
  4094. psSpeed: '@',
  4095. psClass: '@',
  4096. psSize: '@',
  4097. psSqueeze: '@',
  4098. psCloak: '@',
  4099. psPush: '@',
  4100. psContainer: '@'
  4101. },
  4102. link: linkFct
  4103. };
  4104. return directive;
  4105. function linkFct($scope, el, attrs) {
  4106. /* Inspect */
  4107. //console.log($scope);
  4108. //console.log(el);
  4109. //console.log(attrs);
  4110. /* Parameters */
  4111. var param = {};
  4112. param.side = $scope.psSide || 'right';
  4113. param.speed = $scope.psSpeed || '0.5';
  4114. param.size = $scope.psSize || '300px';
  4115. param.zindex = 1000; // Override with custom CSS
  4116. param.className = $scope.psClass || 'ng-pageslide';
  4117. param.cloak = $scope.psCloak && $scope.psCloak.toLowerCase() == 'false' ? false : true;
  4118. param.squeeze = Boolean($scope.psSqueeze) || false;
  4119. param.push = Boolean($scope.psPush) || false;
  4120. param.container = $scope.psContainer || false;
  4121. // Apply Class
  4122. el.addClass(param.className);
  4123. /* DOM manipulation */
  4124. var content = null;
  4125. var slider = null;
  4126. var body = param.container ? document.getElementById(param.container) : document.body;
  4127. slider = el[0];
  4128. // Check for div tag
  4129. if (slider.tagName.toLowerCase() !== 'div' && slider.tagName.toLowerCase() !== 'pageslide') throw new Error('Pageslide can only be applied to <div> or <pageslide> elements');
  4130. // Check for content
  4131. if (slider.children.length === 0) throw new Error('You have to content inside the <pageslide>');
  4132. content = angular.element(slider.children);
  4133. /* Append */
  4134. body.appendChild(slider);
  4135. /* Style setup */
  4136. slider.style.zIndex = param.zindex;
  4137. slider.style.position = param.container !== false ? 'absolute' : 'fixed';
  4138. slider.style.width = 0;
  4139. slider.style.height = 0;
  4140. slider.style.overflow = 'hidden';
  4141. slider.style.transitionDuration = param.speed + 's';
  4142. slider.style.webkitTransitionDuration = param.speed + 's';
  4143. slider.style.transitionProperty = 'width, height';
  4144. if (param.squeeze) {
  4145. body.style.position = 'absolute';
  4146. body.style.transitionDuration = param.speed + 's';
  4147. body.style.webkitTransitionDuration = param.speed + 's';
  4148. body.style.transitionProperty = 'top, bottom, left, right';
  4149. }
  4150. switch (param.side) {
  4151. case 'right':
  4152. slider.style.height = attrs.psCustomHeight || '100%';
  4153. slider.style.top = attrs.psCustomTop || '0px';
  4154. slider.style.bottom = attrs.psCustomBottom || '0px';
  4155. slider.style.right = attrs.psCustomRight || '0px';
  4156. break;
  4157. case 'left':
  4158. slider.style.height = attrs.psCustomHeight || '100%';
  4159. slider.style.top = attrs.psCustomTop || '0px';
  4160. slider.style.bottom = attrs.psCustomBottom || '0px';
  4161. slider.style.left = attrs.psCustomLeft || '0px';
  4162. break;
  4163. case 'top':
  4164. slider.style.width = attrs.psCustomWidth || '100%';
  4165. slider.style.left = attrs.psCustomLeft || '0px';
  4166. slider.style.top = attrs.psCustomTop || '0px';
  4167. slider.style.right = attrs.psCustomRight || '0px';
  4168. break;
  4169. case 'bottom':
  4170. slider.style.width = attrs.psCustomWidth || '100%';
  4171. slider.style.bottom = attrs.psCustomBottom || '0px';
  4172. slider.style.left = attrs.psCustomLeft || '0px';
  4173. slider.style.right = attrs.psCustomRight || '0px';
  4174. break;
  4175. }
  4176. /* Closed */
  4177. function psClose(slider, param) {
  4178. if (slider && slider.style.width !== 0 && slider.style.width !== 0) {
  4179. if (param.cloak) content.css('display', 'none');
  4180. switch (param.side) {
  4181. case 'right':
  4182. slider.style.width = '0px';
  4183. if (param.squeeze) body.style.right = '0px';
  4184. if (param.push) {
  4185. body.style.right = '0px';
  4186. body.style.left = '0px';
  4187. }
  4188. break;
  4189. case 'left':
  4190. slider.style.width = '0px';
  4191. if (param.squeeze) body.style.left = '0px';
  4192. if (param.push) {
  4193. body.style.left = '0px';
  4194. body.style.right = '0px';
  4195. }
  4196. break;
  4197. case 'top':
  4198. slider.style.height = '0px';
  4199. if (param.squeeze) body.style.top = '0px';
  4200. if (param.push) {
  4201. body.style.top = '0px';
  4202. body.style.bottom = '0px';
  4203. }
  4204. break;
  4205. case 'bottom':
  4206. slider.style.height = '0px';
  4207. if (param.squeeze) body.style.bottom = '0px';
  4208. if (param.push) {
  4209. body.style.bottom = '0px';
  4210. body.style.top = '0px';
  4211. }
  4212. break;
  4213. }
  4214. }
  4215. $scope.psOpen = false;
  4216. }
  4217. /* Open */
  4218. function psOpen(slider, param) {
  4219. if (slider.style.width !== 0 && slider.style.width !== 0) {
  4220. switch (param.side) {
  4221. case 'right':
  4222. slider.style.width = param.size;
  4223. if (param.squeeze) body.style.right = param.size;
  4224. if (param.push) {
  4225. body.style.right = param.size;
  4226. body.style.left = '-' + param.size;
  4227. }
  4228. break;
  4229. case 'left':
  4230. slider.style.width = param.size;
  4231. if (param.squeeze) body.style.left = param.size;
  4232. if (param.push) {
  4233. body.style.left = param.size;
  4234. body.style.right = '-' + param.size;
  4235. }
  4236. break;
  4237. case 'top':
  4238. slider.style.height = param.size;
  4239. if (param.squeeze) body.style.top = param.size;
  4240. if (param.push) {
  4241. body.style.top = param.size;
  4242. body.style.bottom = '-' + param.size;
  4243. }
  4244. break;
  4245. case 'bottom':
  4246. slider.style.height = param.size;
  4247. if (param.squeeze) body.style.bottom = param.size;
  4248. if (param.push) {
  4249. body.style.bottom = param.size;
  4250. body.style.top = '-' + param.size;
  4251. }
  4252. break;
  4253. }
  4254. setTimeout(function () {
  4255. if (param.cloak) content.css('display', 'block');
  4256. }, param.speed * 1000);
  4257. }
  4258. }
  4259. // function isFunction(functionToCheck) {
  4260. // var getType = {};
  4261. // return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  4262. // }
  4263. /*
  4264. * Watchers
  4265. * */
  4266. $scope.$watch('psOpen', function (value) {
  4267. /* eslint no-extra-boolean-cast:0 */
  4268. if (!!value) {
  4269. // Open
  4270. psOpen(slider, param);
  4271. } else {
  4272. // Close
  4273. psClose(slider, param);
  4274. }
  4275. });
  4276. /*
  4277. * Events
  4278. * */
  4279. $scope.$on('$destroy', function () {
  4280. return body.removeChild(slider);
  4281. });
  4282. if ($scope.psAutoClose) {
  4283. $scope.$on('$locationChangeStart', function () {
  4284. return psClose(slider, param);
  4285. });
  4286. $scope.$on('$stateChangeStart', function () {
  4287. return psClose(slider, param);
  4288. });
  4289. }
  4290. }
  4291. }
  4292. return {
  4293. setters: [],
  4294. execute: function () {
  4295. PAGE_SLIDE_DIRECTIVE = 'pageslide';
  4296. pageslide.$inject = [];
  4297. _export('default', pageslide);
  4298. _export('PAGE_SLIDE_DIRECTIVE', PAGE_SLIDE_DIRECTIVE);
  4299. }
  4300. };
  4301. });
  4302. $__System.register('46', ['45'], function (_export) {
  4303. 'use strict';
  4304. var pageslide, PAGE_SLIDE_DIRECTIVE, PAGE_SLIDE_MODULE;
  4305. return {
  4306. setters: [function (_) {
  4307. pageslide = _['default'];
  4308. PAGE_SLIDE_DIRECTIVE = _.PAGE_SLIDE_DIRECTIVE;
  4309. }],
  4310. execute: function () {
  4311. PAGE_SLIDE_MODULE = 'pageslide.module';
  4312. _export('default', angular.module(PAGE_SLIDE_MODULE, []).directive(PAGE_SLIDE_DIRECTIVE, pageslide));
  4313. }
  4314. };
  4315. });
  4316. $__System.register('47', [], function (_export) {
  4317. 'use strict';
  4318. var LIST_DRAG_DROP_ITEM_CSS_CLASSES, DRAG_DROP_CONFIG_MODEL, DRAG_DROP_PRESENTATION_MODEL, ITEMS_NOT_TO_COUNT_FOR_REAL;
  4319. return {
  4320. setters: [],
  4321. execute: function () {
  4322. LIST_DRAG_DROP_ITEM_CSS_CLASSES = [{
  4323. cssClass: 'col-md-12',
  4324. numberItemPerRow: 0
  4325. }, {
  4326. cssClass: 'col-md-12',
  4327. numberItemPerRow: 1
  4328. }, {
  4329. cssClass: 'col-md-6',
  4330. numberItemPerRow: 2
  4331. }, {
  4332. cssClass: 'col-md-4',
  4333. numberItemPerRow: 3
  4334. }];
  4335. DRAG_DROP_CONFIG_MODEL = {
  4336. dropZoneConfig: {
  4337. decoration: [{
  4338. WhenIndex: 0,
  4339. ApplycssClass: 'col-md-4',
  4340. fontAwesomeIcon: 'fa fa-level-up',
  4341. title: 'Drag control from here : '
  4342. }, {
  4343. WhenIndex: 1,
  4344. ApplycssClass: 'col-md-8',
  4345. fontAwesomeIcon: 'fa fa-level-down',
  4346. title: 'Drop control into here : '
  4347. }],
  4348. verboseMode: false
  4349. },
  4350. containerConfig: {
  4351. decoration: [{
  4352. WhenIndex: 0,
  4353. ApplycssClass: 'col-md-12',
  4354. title: 'Blank : ',
  4355. groupId: 'blank',
  4356. isCollapsed: true
  4357. }, {
  4358. WhenIndex: 1,
  4359. ApplycssClass: 'col-md-12',
  4360. title: 'Headers : ',
  4361. groupId: 'headers',
  4362. isCollapsed: true
  4363. }, {
  4364. WhenIndex: 2,
  4365. ApplycssClass: 'col-md-12',
  4366. title: 'Text inputs : ',
  4367. groupId: 'inputs',
  4368. isCollapsed: true
  4369. }, {
  4370. WhenIndex: 3,
  4371. ApplycssClass: 'col-md-12',
  4372. title: 'Textareas : ',
  4373. groupId: 'textareas',
  4374. isCollapsed: true
  4375. }, {
  4376. WhenIndex: 4,
  4377. ApplycssClass: 'col-md-12',
  4378. title: 'Radios : ',
  4379. groupId: 'radios',
  4380. isCollapsed: true
  4381. }, {
  4382. WhenIndex: 5,
  4383. ApplycssClass: 'col-md-12',
  4384. title: 'Checkboxes : ',
  4385. groupId: 'checkboxes',
  4386. isCollapsed: true
  4387. }, {
  4388. WhenIndex: 6,
  4389. ApplycssClass: 'col-md-12',
  4390. title: 'Selects : ',
  4391. groupId: 'selects',
  4392. isCollapsed: true
  4393. }],
  4394. verboseMode: false,
  4395. collapseEnabled: true,
  4396. collapseCtrl: [{
  4397. atIndex: 0,
  4398. collapse: true
  4399. }, {
  4400. atIndex: 1,
  4401. collapse: true
  4402. }]
  4403. },
  4404. itemConfig: {
  4405. verboseMode: false
  4406. }
  4407. };
  4408. DRAG_DROP_PRESENTATION_MODEL = [
  4409. //1 column here is control selection column
  4410. [], [
  4411. //empty 1st line at initialisation
  4412. []]];
  4413. ITEMS_NOT_TO_COUNT_FOR_REAL = {
  4414. //placeholder : '',
  4415. itemBeingDragged: ''
  4416. };
  4417. _export('LIST_DRAG_DROP_ITEM_CSS_CLASSES', LIST_DRAG_DROP_ITEM_CSS_CLASSES);
  4418. _export('DRAG_DROP_CONFIG_MODEL', DRAG_DROP_CONFIG_MODEL);
  4419. _export('DRAG_DROP_PRESENTATION_MODEL', DRAG_DROP_PRESENTATION_MODEL);
  4420. _export('ITEMS_NOT_TO_COUNT_FOR_REAL', ITEMS_NOT_TO_COUNT_FOR_REAL);
  4421. }
  4422. };
  4423. });
  4424. $__System.register('48', ['47'], function (_export) {
  4425. // TODO : Add here configs from ES5 dragDropConfigProvider
  4426. 'use strict';
  4427. var LIST_DRAG_DROP_ITEM_CSS_CLASSES, DRAG_DROP_CONFIG_MODEL, DRAG_DROP_PRESENTATION_MODEL, ITEMS_NOT_TO_COUNT_FOR_REAL, EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME;
  4428. function easyFormDragWayConfig() {
  4429. var _listDragDropItemCssClasses = [].concat(LIST_DRAG_DROP_ITEM_CSS_CLASSES);
  4430. var _dragDropConfigModel = angular.copy(DRAG_DROP_CONFIG_MODEL);
  4431. var _dragDropPresentationModel = [].concat(DRAG_DROP_PRESENTATION_MODEL);
  4432. var _itemsNotToCountFoReal = angular.copy(ITEMS_NOT_TO_COUNT_FOR_REAL);
  4433. var _configuration = defaultConfig();
  4434. var _controlsList = controlsList();
  4435. // let _defaultLanguage = getDefaultLanguage();
  4436. // let _currentLanguage = initDefaultLanguage();
  4437. var _showPreviewPanel = getDefaultshowPreviewPanel();
  4438. var _showPreviewModels = getDefaultShowPreviewModel();
  4439. /* jshint validthis:true */
  4440. this.$get = easyFormDragDropWayConfigGET;
  4441. this.setModalAnimation = setModalAnimation;
  4442. this.getModalAnimation = getModalAnimation;
  4443. this.configuration = _configuration;
  4444. this.getEnabledControls = getEnabledControls;
  4445. this.disableControl = disableControl;
  4446. this.enableControl = enableControl;
  4447. // this.setLanguage = setLanguage;
  4448. // this.getCurrentLanguage = getCurrentLanguage;
  4449. this.showPreviewPanel = showPreviewPanel;
  4450. this.showPreviewModels = showPreviewModels;
  4451. this.setListItemCssClass = setListItemCssClass;
  4452. this.getItemsNotTocount = getItemsNotTocount;
  4453. this.setItemsNotTocount = setItemsNotTocount;
  4454. this.addControlToDragDropPresentationModel = addControlToDragDropPresentationModel;
  4455. this.getDragDropPresentationModel = getDragDropPresentationModel;
  4456. function setListItemCssClass(fromConfig) {
  4457. _listDragDropItemCssClasses = [].concat(fromConfig);
  4458. }
  4459. function getItemsNotTocount() {
  4460. return _itemsNotToCountFoReal;
  4461. }
  4462. function setItemsNotTocount(fromConfig) {
  4463. _itemsNotToCountFoReal = angular.copy(fromConfig);
  4464. }
  4465. //set default config
  4466. function defaultConfig() {
  4467. var _defaultConfiguration = {
  4468. modalAnimated: false
  4469. };
  4470. return _defaultConfiguration;
  4471. }
  4472. function addControlToDragDropPresentationModel(controlToAdd, groupToAdd) {
  4473. if (typeof controlToAdd !== 'undefined' && typeof groupToAdd !== 'undefined') {
  4474. addToGroupControl(controlToAdd, groupToAdd);
  4475. }
  4476. }
  4477. function getDragDropPresentationModel() {
  4478. return _dragDropPresentationModel;
  4479. }
  4480. //show preview panel by default
  4481. function getDefaultshowPreviewPanel() {
  4482. return true;
  4483. }
  4484. //show preview data, fields models in preview panel
  4485. function getDefaultShowPreviewModel() {
  4486. return true;
  4487. }
  4488. // function getCurrentLanguage(){
  4489. // return _currentLanguage;
  4490. // }
  4491. //list of controls
  4492. function controlsList() {
  4493. var controls = [{ name: 'empty', enabled: true }, { name: 'Header', enabled: true }, { name: 'Subtitle', enabled: true }, { name: 'TextInput', enabled: true }, { name: 'Password', enabled: true }, { name: 'Email', enabled: true }, { name: 'Date', enabled: true }, { name: 'Texarea', enabled: true }, { name: 'RichTextEditor', enabled: true }, { name: 'Radio', enabled: true }, { name: 'Checkbox', enabled: true }, { name: 'BasicSelect', enabled: true }, { name: 'GroupedSelect', enabled: true }];
  4494. return controls;
  4495. }
  4496. function showPreviewPanel(wantToShow) {
  4497. if (angular.isDefined(wantToShow)) {
  4498. if (wantToShow === true) _showPreviewPanel = true;
  4499. if (wantToShow === false) _showPreviewPanel = false;
  4500. }
  4501. }
  4502. function showPreviewModels(wantToShow) {
  4503. if (angular.isDefined(wantToShow)) {
  4504. if (wantToShow === true) _showPreviewModels = true;
  4505. if (wantToShow === false) _showPreviewModels = false;
  4506. }
  4507. }
  4508. // //language : set default to english
  4509. // function getDefaultLanguage(){
  4510. // let lang = 'en';
  4511. // return lang;
  4512. // }
  4513. // function setDefaultLanguage(){
  4514. // _currentLanguage = _defaultLanguage;
  4515. // $translateProvider.preferredLanguage(_currentLanguage);
  4516. // return _currentLanguage;
  4517. // }
  4518. // function setLanguage(language){
  4519. // if (angular.isString(language)) {
  4520. // _currentLanguage = language;
  4521. // $translateProvider.preferredLanguage(language);
  4522. // }else{
  4523. // setDefaultLanguage();
  4524. // }
  4525. // }
  4526. // function initDefaultLanguage(){
  4527. // $translateProvider.useSanitizeValueStrategy('escape'); //security : Enable escaping of HTML
  4528. // $translateProvider.fallbackLanguage(_defaultLanguage); //fallback language to default language
  4529. // $translateProvider.preferredLanguage(_defaultLanguage);
  4530. // return _defaultLanguage;
  4531. // }
  4532. function getEnabledControls() {
  4533. return _controlsList;
  4534. }
  4535. function disableControl(controlName) {
  4536. if (angular.isString(controlName)) {
  4537. angular.forEach(_controlsList, function (aControl) {
  4538. if (aControl.name === controlName) aControl.enabled = false;
  4539. });
  4540. }
  4541. }
  4542. function enableControl(controlName) {
  4543. if (angular.isString(controlName)) {
  4544. angular.forEach(_controlsList, function (aControl) {
  4545. if (aControl.name === controlName) aControl.enabled = true;
  4546. });
  4547. }
  4548. }
  4549. function setModalAnimation(flagConfig) {
  4550. var valueToApply = flagConfig === true ? flagConfig : flagConfig === false ? flagConfig : _configuration.modalAnimated;
  4551. _configuration.modalAnimated = valueToApply;
  4552. }
  4553. function getModalAnimation() {
  4554. return _configuration.modalAnimated;
  4555. }
  4556. //$get implementation :
  4557. // easyFormDragDropWayConfigGET.$inject = ['$translate'];
  4558. // function easyFormDragDropWayConfigGET($translate){
  4559. easyFormDragDropWayConfigGET.$inject = [];
  4560. function easyFormDragDropWayConfigGET() {
  4561. var service = {
  4562. setModalAnimation: setModalAnimationFct,
  4563. getModalAnimationValue: getModalAnimationValue,
  4564. getListEnabledControl: getListEnabledControl,
  4565. // setLanguage : switchLanguage,
  4566. // getCurrentLanguage : getCurrentLanguage,
  4567. isPreviewPanelVisible: isPreviewPanelVisible,
  4568. arePreviewModelsVisible: arePreviewModelsVisible,
  4569. getListItemCssClass: getListItemCssClass,
  4570. getItemsNotToCount: getItemsNotToCount,
  4571. getItemCssDependingNumberItemsInRow: getItemCssDependingNumberItemsInRow,
  4572. getDistinctItemCssClass: getDistinctItemCssClass,
  4573. getDragDropConfigModel: getDragDropConfigModel,
  4574. getDragDropPresentationModel: getDragDropPresentationModel,
  4575. setDragDropConfigContainerDecorationCollapse: setDragDropConfigContainerDecorationCollapse
  4576. };
  4577. return service;
  4578. function getDragDropPresentationModel() {
  4579. return _dragDropPresentationModel;
  4580. }
  4581. function setDragDropConfigContainerDecorationCollapse(dragDropConfigModel, indexValue, isCollapsedBool) {
  4582. if (typeof indexValue !== 'undefined' && typeof isCollapsedBool !== 'undefined') {
  4583. if (indexValue === parseInt(indexValue, 10)) {
  4584. dragDropConfigModel.containerConfig.decoration[indexValue].isCollapsed = isCollapsedBool;
  4585. }
  4586. }
  4587. return true;
  4588. }
  4589. function getDragDropConfigModel() {
  4590. return _dragDropConfigModel;
  4591. }
  4592. function getDistinctItemCssClass() {
  4593. var distinctCssClass = [];
  4594. angular.forEach(_listDragDropItemCssClasses, function (valueRef) {
  4595. var cssClassRef = valueRef.cssClass;
  4596. if (distinctCssClass.length === 0) {
  4597. distinctCssClass.push(cssClassRef);
  4598. } else {
  4599. var canAdd = true;
  4600. angular.forEach(distinctCssClass, function (valueProc) {
  4601. var cssClassProc = valueProc;
  4602. if (cssClassRef === cssClassProc) {
  4603. canAdd = false;
  4604. }
  4605. });
  4606. if (canAdd) distinctCssClass.push(cssClassRef);
  4607. }
  4608. });
  4609. return distinctCssClass;
  4610. }
  4611. function getItemCssDependingNumberItemsInRow(numberOfItems) {
  4612. if (typeof numberOfItems !== 'undefined') {
  4613. var classToReturn = '';
  4614. for (var i = _listDragDropItemCssClasses.length - 1; i >= 0; i--) {
  4615. if (_listDragDropItemCssClasses[i].numberItemPerRow === numberOfItems) {
  4616. classToReturn = _listDragDropItemCssClasses[i].cssClass;
  4617. }
  4618. }
  4619. return classToReturn;
  4620. } else {
  4621. return '';
  4622. }
  4623. }
  4624. function getListItemCssClass() {
  4625. return _listDragDropItemCssClasses;
  4626. }
  4627. function getItemsNotToCount() {
  4628. return _itemsNotToCountFoReal;
  4629. }
  4630. function getModalAnimationValue() {
  4631. return _configuration.modalAnimated;
  4632. }
  4633. function setModalAnimationFct(value) {
  4634. setModalAnimation(value);
  4635. }
  4636. function getListEnabledControl() {
  4637. return angular.copy(_controlsList);
  4638. }
  4639. // function switchLanguage(language){
  4640. // if (angular.isString(language)) {
  4641. // _currentLanguage = language;
  4642. // $translate.use(language);
  4643. // }else{
  4644. // setDefaultLanguage();
  4645. // }
  4646. // }
  4647. function isPreviewPanelVisible() {
  4648. return _showPreviewPanel;
  4649. }
  4650. function arePreviewModelsVisible() {
  4651. return _showPreviewModels;
  4652. }
  4653. }
  4654. /**
  4655. * addToGroupControl : add control to _dragDropPresentationModel
  4656. * @param {[type]} thisControl : control to add
  4657. * @param {[type]} thisGroup : groupId wher this control should be added
  4658. *
  4659. * NOTE : if _dragDropPresentationModel wrong initialized it will create list of group conforming to
  4660. * configModel
  4661. */
  4662. function addToGroupControl(thisControl, thisGroup) {
  4663. /**
  4664. * search group if already exists
  4665. */
  4666. if (_dragDropPresentationModel[0].length > 0) {
  4667. /**
  4668. * case when _dragDropConfigModel.containerConfig.decoration.length is > to _dragDropPresentationModel[0].length
  4669. *
  4670. * for instance : initialization _dragDropPresentationModel[0] in between
  4671. */
  4672. if (_dragDropPresentationModel[0].length < _dragDropConfigModel.containerConfig.decoration.length) {
  4673. var missingGroupNumber = _dragDropConfigModel.containerConfig.decoration.length - _dragDropPresentationModel[0].length;
  4674. for (var i = 0; i < missingGroupNumber; i++) {
  4675. _dragDropPresentationModel[0].push([]);
  4676. }
  4677. }
  4678. /**
  4679. * push control to right index
  4680. * (deduced by _dragDropConfigModel.containerConfig.decoration.WhenIndex value for groupId === thisGroup)
  4681. */
  4682. _dragDropConfigModel.containerConfig.decoration.forEach(function (groupConfig) {
  4683. if (thisGroup.addToGroupCtrl === groupConfig.groupId) {
  4684. _dragDropPresentationModel[0][groupConfig.WhenIndex].push(thisControl);
  4685. }
  4686. });
  4687. } else {
  4688. /**
  4689. * no group no control
  4690. *
  4691. * initialize _dragDropConfigModel.containerConfig.decoration list
  4692. */
  4693. _dragDropConfigModel.containerConfig.decoration.forEach(function () {
  4694. return _dragDropPresentationModel[0].push([]);
  4695. });
  4696. /**
  4697. * push control to right index
  4698. * (deduced by _dragDropConfigModel.containerConfig.decoration.WhenIndex value for groupId === thisGroup)
  4699. */
  4700. _dragDropConfigModel.containerConfig.decoration.forEach(function (groupConfig) {
  4701. if (thisGroup.addToGroupCtrl === groupConfig.groupId) {
  4702. _dragDropPresentationModel[0][groupConfig.WhenIndex].push(thisControl);
  4703. }
  4704. });
  4705. }
  4706. }
  4707. }
  4708. // easyFormDragWayConfig.$inject = ['$translateProvider'];
  4709. return {
  4710. setters: [function (_) {
  4711. LIST_DRAG_DROP_ITEM_CSS_CLASSES = _.LIST_DRAG_DROP_ITEM_CSS_CLASSES;
  4712. DRAG_DROP_CONFIG_MODEL = _.DRAG_DROP_CONFIG_MODEL;
  4713. DRAG_DROP_PRESENTATION_MODEL = _.DRAG_DROP_PRESENTATION_MODEL;
  4714. ITEMS_NOT_TO_COUNT_FOR_REAL = _.ITEMS_NOT_TO_COUNT_FOR_REAL;
  4715. }],
  4716. execute: function () {
  4717. EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME = 'easyFormDragWayConfig';
  4718. easyFormDragWayConfig.$inject = [];
  4719. _export('default', easyFormDragWayConfig);
  4720. _export('EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME', EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME);
  4721. }
  4722. };
  4723. });
  4724. $__System.registerDynamic("49", [], true, function($__require, exports, module) {
  4725. ;
  4726. var global = this,
  4727. __define = global.define;
  4728. global.define = undefined;
  4729. module.exports = "<section id=\"pageWfEdit\">\n <div>\n <div class=\"container\">\n <section id=\"preview\">\n <div id=\"preview-content\">\n\t\t\t\t\t<div class=\"content-container\">\n\t\t\t\t\t\t<toaster-container\n toaster-options=\"{ 'position-class': 'toast-top-full-width', 'extendedTimeout' : 500,'timeOut': 500 }\">\n\t\t\t\t\t\t</toaster-container>\n\t\t\t\t\t\t<tabset justified=\"true\">\n\t\t\t\t\t\t\t<tab\n select=\"vm.tabJustSelected(2)\"\n active=\"vm.tab.editTab.active\"\n heading=\"Edit /Create\">\n <div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tpageslide\n\t\t\t\t\t\t\t\t\t\tps-open=\"vm.editPanelModel.toggle\"\n\t\t\t\t\t\t\t\t\t\tps-side=\"left\"\n\t\t\t\t\t\t\t\t\t\tps-cloak=\"true\"\n\t\t\t\t\t\t\t\t\t\tps-size=\"400px\">\n\t\t\t\t\t\t\t\t\t\t<left-panel\n close-edit-panel=\"vm.closeEditPanel()\"\n save-from-edit-panel=vm.saveFromEditPanel()>\n </left-panel>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"row advancedDemo\">\n\t\t\t\t\t\t\t\t\t\t\t<div ng-repeat=\"containers in vm.dragDropModel\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tdd-decor-drop-zone\n\t\t\t\t\t\t\t\t\t\t\t\t\tdd-drop-zone-properties=\"vm.easyFormDragDropProperties.dropZoneConfig.decoration[$index]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdd-drop-zone-verbose-mode=\"{{vm.easyFormDragDropProperties.dropZoneConfig.verboseMode}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdd-drop-zone-current-index=\"{{$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdd-drop-zone-add-new-line=\"vm.insertNewLine()\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div \tclass=\"dropzone box box-yellow\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-list=\"containers\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-allowed-types=\"['containerType']\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-external-sources=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-dragover=\"vm.dragoverCallbackContainer($parent.$parent.$index, $parent.$index, $index);\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-drop=\"vm.dropCallback(event, index, item, external, type, 'containerType');\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-repeat=\"items in containers\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-draggable=\"items\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-type=\"'containerType'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-effect-allowed=\"copyMove\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-dragstart=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-moved=\"containers.splice($index, 1);\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-disable-if=\"$parent.$index == 0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-copied=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"container-element box box-blue\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-decor-container\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-container-properties=\"vm.easyFormDragDropProperties.containerConfig.decoration[$index]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-container-is-collpased=\"vm.easyFormDragDropProperties.containerConfig.decoration[$index].isCollapsed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-container-verbose-mode=\"{{vm.easyFormDragDropProperties.containerConfig.verboseMode}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-container-current-index=\"{{$parent.$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-collapse-all=\"vm.collapseAllGroupControl(exceptThisOne)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div dd-decor-include-container-here>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-decor-line\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-line-verbose-mode=\"{{vm.easyFormDragDropProperties.containerConfig.verboseMode}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-line-current-index=\"{{$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-line-parent-index=\"{{$parent.$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-remove-line=\"vm.removeThisLine($index)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-list=\"items\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-allowed-types=\"['itemType']\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-horizontal-list=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-external-sources=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-disable-if=\"items.length > 2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-dragover=\"vm.dragoverCallbackItems($parent.$parent.$index, $parent.$index, $index, external);\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-drop=\"vm.dropCallbackItems(event, index, $index,$parent.$index, $parent.$parent.$index, $parent.$parent.$parent.$index, item, external, type, 'itemType');\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"itemlist\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-content-counter\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-value-when-placeholder=\"dndPlaceholder\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-value-when-dragging=\"dndDraggingSource\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-full-model = \"vm.dragDropModel\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-content-counter-current-index=\"{{$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-content-counter-parent-index=\"{{$parent.$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-content-counter-force-css-refresh = \"command.forceRefresh\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-repeat=\"item in items\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-draggable=\"item\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-type=\"'itemType'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-effect-allowed=\"copyMove\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-dragstart=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-moved=\"vm.dndItemMoved($parent.$parent.$index, $parent.$index, $index);\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdnd-copied=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-decor-item\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-item-verbose-mode=\"{{vm.easyFormDragDropProperties.itemConfig.verboseMode}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-item-current-index=\"{{$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-item-parent-index=\"{{$parent.$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-item-parent-parent-index = \"{{$parent.$parent.$index}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-items-count=\"items.length\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-item-css-class=\"{{item.cssClass}}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"itemContent\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdd-no-editable-control\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"rightClickCtrl\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-class=\"{rightClickCtrlSelected : item.rightCliked === true}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\teda-set-right-clicked=\"vm.setRightClicked(previousState, item)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\teda-right-click=\"vm.toggleEditPanel($event, $parent.$index, $index, item)\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\teda-selected-class=\"rightClickCtrlSelected\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\teda-is-selected=\"{{item.rightCliked}}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\teda-right-click-col-index = \"{{$parent.$parent.$index}}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span ng-bind-html=\"item.label | trustThis\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</tab>\n\t\t\t\t\t\t\t<tab\n\t\t\t\t\t\t\t\tselect=\"vm.tabJustSelected(1)\"\n\t\t\t\t\t\t\t\tactive=\"vm.tab.previewTab.active\"\n\t\t\t\t\t\t\t\theading=\"Preview\">\n\t\t\t\t\t\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t\t\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t\t\t\t\t\t<form ng-submit=\"vm.onSubmit()\">\n\t\t\t\t\t\t\t\t\t\t\t<formly-form\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"previewFormlyForm\"\n\t\t\t\t\t\t\t\t\t\t\t\tmodel=\"vm.model\"\n\t\t\t\t\t\t\t\t\t\t\t\tfields=\"vm.wfFormFields\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"pull-right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"btn btn-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{vm.configuration.submitButtonText}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"btn btn-primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"cancel\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{vm.configuration.cancelButtonText}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</formly-form>\n\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"panel-heading heading-preview\"\n\t\t\t\t\t\t\t\t\t\tng-click=\"vm.ihm.preview.customizeFormButtonsExpanded =!vm.ihm.preview.customizeFormButtonsExpanded\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"panel-title\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary btn-xs\" >\n\t\t\t\t\t\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tng-class=\"{'fa-angle-down':!vm.ihm.preview.customizeFormButtonsExpanded, 'fa-angle-up' : vm.ihm.preview.customizeFormButtonsExpanded}\">\n\t\t\t\t\t\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-wrench\"></i>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\tCustomize form buttons\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t\t\t\t\t\t<div collapse=\"vm.ihm.preview.customizeFormButtonsExpanded\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor=\"inputSubmitButtontext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\" greyText control-label\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCustomize Submit button Text :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"inputSubmitButtontext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Submit button text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-model=\"vm.configuration.submitButtonText\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor=\"inputCancelButtontext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\" greyText control-label\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCustomize Cancel button Text :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"inputCancelButtontext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Cancel button text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-model=\"vm.configuration.cancelButtonText\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"panel-heading heading-preview\"\n\t\t\t\t\t\t\t\t\t\tng-click=\"vm.ihm.preview.formlyModelViewExpanded =!vm.ihm.preview.formlyModelViewExpanded\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"panel-title\">\n\t\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary btn-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-class=\"{'fa-angle-down':!vm.ihm.preview.formlyModelViewExpanded, 'fa-angle-up' : vm.ihm.preview.formlyModelViewExpanded}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-eye\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\tDATA MODEL\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t\t\t\t\t\t<div collapse=\"vm.ihm.preview.formlyModelViewExpanded\">\n\t\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t\t{{vm.model | json}}\n\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"panel-heading heading-preview\"\n\t\t\t\t\t\t\t\t\t\tng-click=\"vm.ihm.preview.formlyFieldsViewExpanded =!vm.ihm.preview.formlyFieldsViewExpanded\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"panel-title\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary btn-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tng-class=\"{'fa-angle-down':!vm.ihm.preview.formlyFieldsViewExpanded, 'fa-angle-up' : vm.ihm.preview.formlyFieldsViewExpanded}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-eye\"></i>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\tFIELDS MODEL (ready to save to database one)\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t\t\t\t\t\t<div collapse=\"vm.ihm.preview.formlyFieldsViewExpanded\">\n\t\t\t\t\t\t\t\t\t\t\t<pre>\n\t\t\t\t\t\t\t\t\t\t\t\t{{vm.wfFormFieldsOnlyNeededProperties | json}}\n\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"panel-heading heading-preview\"\n\t\t\t\t\t\t\t\t\t\tng-click=\"vm.ihm.preview.saveThisFormExpanded =!vm.ihm.preview.saveThisFormExpanded\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"panel-title\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary btn-xs\" >\n\t\t\t\t\t\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tng-class=\"{'fa-angle-down':!vm.ihm.preview.saveThisFormExpanded, 'fa-angle-up' : vm.ihm.preview.saveThisFormExpanded}\"></i>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-camera-retro\"></i>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\tSave this form\n\t\t\t\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"panel-body\">\n\t\t\t\t\t\t\t\t\t\t<div collapse=\"vm.ihm.preview.saveThisFormExpanded\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor=\"inputNameFormtext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\" greyText control-label\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tName to this form :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"inputNameFormtext\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter formName\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tng-model=\"vm.configuration.formName\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"btn btn-primary btn-block btn-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\tng-click=\"vm.saveThisForm()\">\n\t\t\t\t\t\t\t\t\t\t\t\tsave this form\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</tab>\n\t\t\t\t\t\t</tabset>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t\t<hr/>\n\t\t\t<section>\n <h6 class=\"text-right\">\n Easy form generator : {{vm.easyFormGeneratorVERSION}} — Erwan DATIN (MacKentoch)\n </h6>\n\t\t\t</section>\n </div>\n </div>\n</section>\n";
  4730. global.define = __define;
  4731. return module.exports;
  4732. });
  4733. $__System.registerDynamic("4a", [], true, function($__require, exports, module) {
  4734. ;
  4735. var global = this,
  4736. __define = global.define;
  4737. global.define = undefined;
  4738. var $Object = Object;
  4739. module.exports = {
  4740. create: $Object.create,
  4741. getProto: $Object.getPrototypeOf,
  4742. isEnum: {}.propertyIsEnumerable,
  4743. getDesc: $Object.getOwnPropertyDescriptor,
  4744. setDesc: $Object.defineProperty,
  4745. setDescs: $Object.defineProperties,
  4746. getKeys: $Object.keys,
  4747. getNames: $Object.getOwnPropertyNames,
  4748. getSymbols: $Object.getOwnPropertySymbols,
  4749. each: [].forEach
  4750. };
  4751. global.define = __define;
  4752. return module.exports;
  4753. });
  4754. $__System.registerDynamic("4b", ["4a"], true, function($__require, exports, module) {
  4755. ;
  4756. var global = this,
  4757. __define = global.define;
  4758. global.define = undefined;
  4759. var $ = $__require('4a');
  4760. module.exports = function defineProperty(it, key, desc) {
  4761. return $.setDesc(it, key, desc);
  4762. };
  4763. global.define = __define;
  4764. return module.exports;
  4765. });
  4766. $__System.registerDynamic("4c", ["4b"], true, function($__require, exports, module) {
  4767. ;
  4768. var global = this,
  4769. __define = global.define;
  4770. global.define = undefined;
  4771. module.exports = {
  4772. "default": $__require('4b'),
  4773. __esModule: true
  4774. };
  4775. global.define = __define;
  4776. return module.exports;
  4777. });
  4778. $__System.registerDynamic("9", ["4c"], true, function($__require, exports, module) {
  4779. "use strict";
  4780. ;
  4781. var global = this,
  4782. __define = global.define;
  4783. global.define = undefined;
  4784. var _Object$defineProperty = $__require('4c')["default"];
  4785. exports["default"] = (function() {
  4786. function defineProperties(target, props) {
  4787. for (var i = 0; i < props.length; i++) {
  4788. var descriptor = props[i];
  4789. descriptor.enumerable = descriptor.enumerable || false;
  4790. descriptor.configurable = true;
  4791. if ("value" in descriptor)
  4792. descriptor.writable = true;
  4793. _Object$defineProperty(target, descriptor.key, descriptor);
  4794. }
  4795. }
  4796. return function(Constructor, protoProps, staticProps) {
  4797. if (protoProps)
  4798. defineProperties(Constructor.prototype, protoProps);
  4799. if (staticProps)
  4800. defineProperties(Constructor, staticProps);
  4801. return Constructor;
  4802. };
  4803. })();
  4804. exports.__esModule = true;
  4805. global.define = __define;
  4806. return module.exports;
  4807. });
  4808. $__System.registerDynamic("a", [], true, function($__require, exports, module) {
  4809. "use strict";
  4810. ;
  4811. var global = this,
  4812. __define = global.define;
  4813. global.define = undefined;
  4814. exports["default"] = function(instance, Constructor) {
  4815. if (!(instance instanceof Constructor)) {
  4816. throw new TypeError("Cannot call a class as a function");
  4817. }
  4818. };
  4819. exports.__esModule = true;
  4820. global.define = __define;
  4821. return module.exports;
  4822. });
  4823. $__System.register('4d', [], function (_export) {
  4824. /* global angular */
  4825. 'use strict';
  4826. var DEBUG_MODEL, initDebugModel, DEFAULT_TAB_MODEL, initTabModel, COLUMN_TEMPLATE, initColumnTemplate, LINE_TEMPLATE, initLineTemplate, DEFAULT_IHM_MODEL, initIhmModel;
  4827. return {
  4828. setters: [],
  4829. execute: function () {
  4830. DEBUG_MODEL = {
  4831. showDebug: false,
  4832. configurationModelNumberofLines: 1
  4833. };
  4834. initDebugModel = function initDebugModel() {
  4835. return angular.copy(DEBUG_MODEL);
  4836. };
  4837. DEFAULT_TAB_MODEL = {
  4838. editTab: {
  4839. active: true
  4840. },
  4841. previewTab: {
  4842. active: false,
  4843. tabVisible: true,
  4844. modelsVisible: true
  4845. }
  4846. };
  4847. initTabModel = function initTabModel(isPreviewPanelVisible, arePreviewModelsVisible) {
  4848. var _tabModel = angular.copy(DEFAULT_TAB_MODEL);
  4849. angular.extend(_tabModel.previewTab, {
  4850. tabVisible: isPreviewPanelVisible,
  4851. modelsVisible: arePreviewModelsVisible
  4852. });
  4853. return _tabModel;
  4854. };
  4855. COLUMN_TEMPLATE = {
  4856. numColumn: -1,
  4857. exist: true,
  4858. control: {
  4859. type: 'none',
  4860. key: 'none',
  4861. subtype: 'none'
  4862. // templateOptions: {
  4863. // label: 'none',
  4864. // placeholder: 'none',
  4865. // required: false,
  4866. // description: 'Descriptive text'
  4867. // }
  4868. }
  4869. };
  4870. initColumnTemplate = function initColumnTemplate() {
  4871. return angular.copy(COLUMN_TEMPLATE);
  4872. };
  4873. LINE_TEMPLATE = {
  4874. line: -1,
  4875. activeColumn: 1,
  4876. columns: [{
  4877. numColumn: 1,
  4878. exist: true,
  4879. control: {
  4880. type: 'none',
  4881. key: 'none'
  4882. // templateOptions: {
  4883. // label: 'none',
  4884. // placeholder: 'none',
  4885. // required: false,
  4886. // description: 'Descriptive text'
  4887. // }
  4888. }
  4889. }]
  4890. };
  4891. initLineTemplate = function initLineTemplate() {
  4892. return angular.copy(LINE_TEMPLATE);
  4893. };
  4894. DEFAULT_IHM_MODEL = {
  4895. preview: {
  4896. formlyModelViewExpanded: true,
  4897. formlyFieldsViewExpanded: true,
  4898. customizeFormButtonsExpanded: true,
  4899. saveThisFormExpanded: true
  4900. }
  4901. };
  4902. initIhmModel = function initIhmModel() {
  4903. return angular.copy(DEFAULT_IHM_MODEL);
  4904. };
  4905. _export('initDebugModel', initDebugModel);
  4906. _export('initTabModel', initTabModel);
  4907. _export('initColumnTemplate', initColumnTemplate);
  4908. _export('initLineTemplate', initLineTemplate);
  4909. _export('initIhmModel', initIhmModel);
  4910. }
  4911. };
  4912. });
  4913. $__System.register('4e', ['9', 'a', '4d'], function (_export) {
  4914. var _createClass, _classCallCheck, initTabModel, initIhmModel, DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER, DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS, edaDragDropWayEasyFormGenCtrl;
  4915. return {
  4916. setters: [function (_) {
  4917. _createClass = _['default'];
  4918. }, function (_a) {
  4919. _classCallCheck = _a['default'];
  4920. }, function (_d) {
  4921. initTabModel = _d.initTabModel;
  4922. initIhmModel = _d.initIhmModel;
  4923. }],
  4924. execute: function () {
  4925. /* global angular */
  4926. ///////////////////////////////////////////////////////////////////////
  4927. // TODO :
  4928. // - check no use methods that come from step way and delete if not needed
  4929. // - check other TODO (a lot of fixes are needed)
  4930. ///////////////////////////////////////////////////////////////////////
  4931. 'use strict';
  4932. DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER = 'edaDragDropWayEasyFormGenCtrl';
  4933. DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS = 'vm';
  4934. edaDragDropWayEasyFormGenCtrl = (function () {
  4935. function edaDragDropWayEasyFormGenCtrl($scope, easyFormGenVersion, $filter, $anchorScroll, toaster, $timeout, $modal, $log, formFieldManage, controllerModalProxy, dragDropItemDecorationService,
  4936. // dragDropConfig,
  4937. ddModelConfModelProxyService, ddItemRightClickedManager, easyFormDragWayConfig) {
  4938. _classCallCheck(this, edaDragDropWayEasyFormGenCtrl);
  4939. this.$scope = $scope;
  4940. this.easyFormGenVersion = easyFormGenVersion;
  4941. this.$filter = $filter;
  4942. this.$anchorScroll = $anchorScroll;
  4943. this.toaster = toaster;
  4944. this.$timeout = $timeout;
  4945. this.$modal = $modal;
  4946. this.$log = $log;
  4947. this.formFieldManage = formFieldManage;
  4948. this.controllerModalProxy = controllerModalProxy;
  4949. this.dragDropItemDecorationService = dragDropItemDecorationService;
  4950. // this.dragDropConfig = dragDropConfig;
  4951. this.ddModelConfModelProxyService = ddModelConfModelProxyService;
  4952. this.ddItemRightClickedManager = ddItemRightClickedManager;
  4953. this.easyFormDragWayConfig = easyFormDragWayConfig;
  4954. this.init();
  4955. }
  4956. _createClass(edaDragDropWayEasyFormGenCtrl, [{
  4957. key: 'init',
  4958. value: function init() {
  4959. this.easyFormGeneratorVERSION = this.easyFormGenVersion;
  4960. this.tab = initTabModel(this.easyFormDragWayConfig.isPreviewPanelVisible(), this.easyFormDragWayConfig.arePreviewModelsVisible());
  4961. this.returnSaveEvent = false;
  4962. this.dataModel = {}; //was vm.model in ES5 version
  4963. this.wfFormFields = [];
  4964. this.wfFormFieldsOnlyNeededProperties = [];
  4965. this.ihm = initIhmModel();
  4966. this.easyFormDragDropProperties = this.easyFormDragWayConfig.getDragDropConfigModel();
  4967. this.dragDropModel = [].concat(this.easyFormDragWayConfig.getDragDropPresentationModel());
  4968. this.numberOfColumns = 1;
  4969. this.MaxNumberOfColumns = 3;
  4970. this.MinNumberOfColumns = 1;
  4971. this.configuration = {};
  4972. this.animationsEnabled = this.easyFormDragWayConfig.getModalAnimationValue();
  4973. this.editPanelModel = { toggle: false };
  4974. this.debugProxyModel = this.controllerModalProxy.ProxyModel;
  4975. this.model = [];
  4976. this.formFieldManage.initConfigurationEditFromScratch(this.configuration, false);
  4977. this.controllerModalProxy.initProxyModel();
  4978. }
  4979. }, {
  4980. key: 'collapseAllGroupControl',
  4981. value: function collapseAllGroupControl(allExceptThisGroupIndex) {
  4982. var _this = this;
  4983. angular.forEach(this.easyFormDragDropProperties.containerConfig.decoration, function (value) {
  4984. if (value.WhenIndex !== allExceptThisGroupIndex) _this.easyFormDragWayConfig.setDragDropConfigContainerDecorationCollapse(_this.easyFormDragDropProperties, value.WhenIndex, true);
  4985. });
  4986. }
  4987. }, {
  4988. key: 'onSubmit',
  4989. value: function onSubmit() {
  4990. this.toaster.pop({
  4991. type: 'info',
  4992. timeout: 2000,
  4993. title: 'should save data model if it were not a static example',
  4994. body: 'data :' + this.$filter('json')(this.dataModel, 4),
  4995. showCloseButton: true
  4996. });
  4997. }
  4998. }, {
  4999. key: 'resetToZeroModel',
  5000. value: function resetToZeroModel() {
  5001. this.configuration.activeLine = 1;
  5002. if (this.configuration.lines.length > 1) this.configuration.lines.splice(1, this.configuration.lines.length - 2);
  5003. return this.countConfigurationModelLines();
  5004. }
  5005. //TO CHECK if does not come from step way :
  5006. }, {
  5007. key: 'countConfigurationModelLines',
  5008. value: function countConfigurationModelLines() {
  5009. return this.configuration.lines.length;
  5010. }
  5011. // //TO CHECK THEN TO DELETE : should come from step way...
  5012. // setActiveLineNumber(lineNumber){
  5013. // if (lineNumber <= this.countConfigurationModelLines()) this.configuration.activeLine = lineNumber;
  5014. // }
  5015. // //TO CHECK THEN TO DELETE : should come from step way...
  5016. // upThisLine(indexLine){
  5017. // if (indexLine > -1) {
  5018. // if (this.configuration.lines[indexLine - 1]) {
  5019. // let currentLineObj = this.configuration.lines[indexLine];
  5020. // this.configuration.lines.splice(indexLine , 1);
  5021. // this.configuration.lines.splice((indexLine - 1), 0, currentLineObj);
  5022. // this.configuration.activeLine = 1;
  5023. // }
  5024. // }
  5025. //
  5026. // this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5027. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5028. // }
  5029. // //TO CHECK THEN TO DELETE : should come from step way...
  5030. // downThisLine(indexLine){
  5031. // if (indexLine > -1) {
  5032. // if (this.configuration.lines[indexLine + 1]) {
  5033. // let currentLineObj = this.configuration.lines[indexLine];
  5034. // this.configuration.lines.splice(indexLine , 1);
  5035. // this.configuration.lines.splice((indexLine + 1), 0, currentLineObj);
  5036. // this.configuration.activeLine = 1;
  5037. // }
  5038. // }
  5039. // this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5040. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5041. // }
  5042. // //TO CHECK THEN TO DELETE : should come from step way...
  5043. // removeThisLine(index){
  5044. // if (index > -1) {
  5045. // if (this.configuration.lines.length > 1) {
  5046. // if (this.configuration.activeLine === index + 1) this.configuration.activeLine = 1;
  5047. // this.configuration.lines.splice(index, 1);
  5048. // }else{
  5049. // this.$timeout(()=>{
  5050. // this.toaster.pop({
  5051. // type : 'warning',
  5052. // title : 'Last line' ,
  5053. // body : 'Can\'t delete the last line',
  5054. // showCloseButton : true
  5055. // });
  5056. // }, 100);
  5057. // }
  5058. // this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5059. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5060. // }
  5061. // }
  5062. // //TO CHECK THEN TO DELETE : should come from step way...
  5063. // increaseNumberOfColumns(){
  5064. // if (this.configuration.lines[this.configuration.activeLine -1].columns.length < this.MaxNumberOfColumns) {
  5065. // let newNumberOfColumns = this.configuration.lines[this.configuration.activeLine -1].columns.push(initColumnTemplate());
  5066. // this.configuration.lines[this.configuration.activeLine -1].columns[newNumberOfColumns - 1].numColumn = newNumberOfColumns;
  5067. // }
  5068. // this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5069. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5070. // }
  5071. // //TO CHECK THEN TO DELETE : should come from step way...
  5072. // decreaseNumberOfColumns(indexLine, indexColumn){
  5073. // if (this.configuration.lines[this.configuration.activeLine -1].columns.length > 1) {
  5074. // this.configuration.lines[this.configuration.activeLine -1].columns.splice(this.configuration.lines[this.configuration.activeLine -1].columns.length -1, 1);
  5075. // }
  5076. // this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5077. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5078. // }
  5079. }, {
  5080. key: 'saveThisForm',
  5081. value: function saveThisForm() {
  5082. if (typeof this.configuration.formName === 'undefined') {
  5083. this.toaster.pop({
  5084. type: 'warning',
  5085. timeout: 2000,
  5086. title: 'Form name is undefined',
  5087. body: 'Form has not been saved.',
  5088. showCloseButton: true
  5089. });
  5090. return false;
  5091. }
  5092. if (this.configuration.formName === '') {
  5093. this.toaster.pop({
  5094. type: 'warning',
  5095. timeout: 2000,
  5096. title: 'Form name is required',
  5097. body: 'Form has not been saved.',
  5098. showCloseButton: true
  5099. });
  5100. return false;
  5101. }
  5102. this.toaster.pop({
  5103. type: 'wait',
  5104. timeout: 10000,
  5105. title: 'Form is being saved',
  5106. body: 'Wait.',
  5107. showCloseButton: true
  5108. });
  5109. this.toaster.clear();
  5110. this.returnSaveEvent = true;
  5111. return true;
  5112. }
  5113. }, {
  5114. key: 'dragoverCallbackContainer',
  5115. value: function dragoverCallbackContainer(parentparentIndex, parentIndex, index) {
  5116. //prevent container in layout column to be drag to control select contianer
  5117. if (index === 0) return false;
  5118. return true;
  5119. }
  5120. }, {
  5121. key: 'dropCallback',
  5122. value: function dropCallback(event, index, item, external, type, allowedType) {
  5123. var _this2 = this;
  5124. if (external) {
  5125. if (allowedType === 'itemType' && !item.label) return false;
  5126. if (allowedType === 'containerType' && !angular.isArray(item)) return false;
  5127. }
  5128. //set a timeout befire binding since ddModel may not be called when already full updated
  5129. var timerRefreshDDToConfig = this.$timeout(function () {
  5130. _this2.configuration = angular.copy(_this2.ddModelConfModelProxyService.refreshAllConfigurationFromDragAndDropModel(_this2.configuration, _this2.dragDropModel));
  5131. _this2.formFieldManage.applyConfigurationToformlyModel(_this2.configuration, _this2.wfFormFields, _this2.dataModel);
  5132. _this2.wfFormFieldsOnlyNeededProperties = angular.copy(_this2.wfFormFields);
  5133. _this2.ddModelConfModelProxyService.refreshControlsKeys(_this2.configuration, _this2.dragDropModel);
  5134. }, 200);
  5135. this.$scope.$on('$destroy', function () {
  5136. return _this2.$timeout.cancel(timerRefreshDDToConfig);
  5137. });
  5138. return item;
  5139. }
  5140. }, {
  5141. key: 'dndItemMoved',
  5142. value: function dndItemMoved(parentParentIndex, parentIndex, itemIndex) {
  5143. //prevent item from first container to disapear when dropped on other container
  5144. if (parentParentIndex > 0) this.dragDropModel[parentParentIndex][parentIndex].splice(itemIndex, 1);
  5145. }
  5146. }, {
  5147. key: 'dragoverCallbackItems',
  5148. value: function dragoverCallbackItems(ParentParentIndex, parentIndex) {
  5149. //prevent items in layout column to be drag to control select
  5150. if (parentIndex === 0) return false;
  5151. return true;
  5152. }
  5153. //TODO : will replace in html : dnd-disable-if="items.length > 2"
  5154. }, {
  5155. key: 'disableItemDropIf',
  5156. value: function disableItemDropIf() {}
  5157. }, {
  5158. key: 'dropCallbackItems',
  5159. value: function dropCallbackItems(event, index, realIndex, parentIndex, parentParentIndex, parentParentParentIndex, item, external, type, allowedType) {
  5160. var _this3 = this;
  5161. if (external) {
  5162. if (allowedType === 'itemType' && !item.label) return false;
  5163. if (allowedType === 'containerType' && !angular.isArray(item)) return false;
  5164. }
  5165. //set a timeout before binding since ddModel may not be called when already full updated
  5166. var timerRefreshDDToConfig = this.$timeout(function () {
  5167. _this3.configuration = angular.copy(_this3.ddModelConfModelProxyService.refreshAllConfigurationFromDragAndDropModel(_this3.configuration, _this3.dragDropModel));
  5168. _this3.formFieldManage.applyConfigurationToformlyModel(_this3.configuration, _this3.wfFormFields, _this3.dataModel);
  5169. _this3.wfFormFieldsOnlyNeededProperties = angular.copy(_this3.wfFormFields);
  5170. // refresh controls key in dragDrop Model to persist already exists controls between refreshes when item drop events
  5171. _this3.ddModelConfModelProxyService.refreshControlsKeys(_this3.configuration, _this3.dragDropModel);
  5172. }, 200);
  5173. // add/set rightCliked property to false (will help edaRightClick directive)
  5174. this.ddItemRightClickedManager.setUnRightClicked(item);
  5175. // timerRefreshDDToConfig timer destruction
  5176. this.$scope.$on('$destroy', function () {
  5177. return _this3.$timeout.cancel(timerRefreshDDToConfig);
  5178. });
  5179. return item;
  5180. }
  5181. }, {
  5182. key: 'saveFromEditPanel',
  5183. value: function saveFromEditPanel() {
  5184. /**
  5185. * TODO :
  5186. * should be called from edit panel
  5187. *
  5188. * AND
  5189. *
  5190. * should call all these methods
  5191. *
  5192. * need to get :
  5193. *
  5194. * - line index
  5195. * - column index
  5196. * - basicSelectRowCollection (from edpitpanelcontroller) --> maybe in controllerModalProxy service
  5197. * - groupedSelectRowCollection (from edpitpanelcontroller) --> maybe in controllerModalProxy service
  5198. * - radioRowCollection (from edpitpanelcontroller) --> maybe in controllerModalProxy service
  5199. */
  5200. this.controllerModalProxy.bindSpecialCtrlTemporyModelsToProxyModel();
  5201. //save config to control
  5202. //controllerModalProxy.applyConfigToSelectedControl(self.proxyModel);
  5203. //return current model to parent controller :
  5204. //update configuration model and formly model
  5205. this.controllerModalProxy.bindConfigurationModelFromProxyModel(this.controllerModalProxy.getEditPanelModelLineIndex(), this.controllerModalProxy.getEditPanelModelColumnIndex(), this.configuration);
  5206. this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5207. this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5208. this.ddModelConfModelProxyService.refreshControlsKeys(this.configuration, this.dragDropModel);
  5209. this.controllerModalProxy.setEditPanelModelToggle(false);
  5210. this.editPanelModel.toggle = this.controllerModalProxy.getEditPanelModelToggle();
  5211. this.ddItemRightClickedManager.resetAllDragDropItemSelectedState(this.dragDropModel);
  5212. }
  5213. }, {
  5214. key: 'closeEditPanel',
  5215. value: function closeEditPanel() {
  5216. // reset all rightClicked control properties to false
  5217. this.ddItemRightClickedManager.resetAllDragDropItemSelectedState(this.dragDropModel);
  5218. /**
  5219. * TODO : refresh configuration model
  5220. * uncomment after update these next 3 lines
  5221. *
  5222. * NOTE : indexLine AND numcolumn should be stored in service and
  5223. * updated when togle sidepanel
  5224. */
  5225. //this.controllerModalProxy.bindConfigurationModelFromProxyModel(indexLine, numcolumn, modalAddCtrlModel, this.configuration);
  5226. //this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5227. //this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5228. this.controllerModalProxy.setEditPanelModelToggle(false);
  5229. this.editPanelModel.toggle = this.controllerModalProxy.getEditPanelModelToggle();
  5230. }
  5231. }, {
  5232. key: 'setRightClicked',
  5233. value: function setRightClicked(previousState, item) {
  5234. item.rightCliked = true;
  5235. }
  5236. }, {
  5237. key: 'toggleEditPanel',
  5238. value: function toggleEditPanel(event, lineIndex, colIndex, item) {
  5239. var _this4 = this;
  5240. this.ddItemRightClickedManager.resetAllDragDropItemSelectedState(this.dragDropModel);
  5241. // already opened (could be another control edit)
  5242. if (this.controllerModalProxy.getEditPanelModelToggle()) {
  5243. // -> immediate close and refresh configuration model + formly model
  5244. this.controllerModalProxy.setEditPanelModelToggle(false);
  5245. this.editPanelModel.toggle = this.controllerModalProxy.getEditPanelModelToggle();
  5246. //TODO : for refreshing
  5247. //this.controllerModalProxy.bindConfigurationModelFromProxyModel(indexLine, numcolumn, modalAddCtrlModel, this.configuration);
  5248. //this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5249. //this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5250. // check if new control right clicked otherwise just toggle side panel
  5251. if (typeof this.controllerModalProxy.getEditPanelModelLineIndex() !== 'undefined' && typeof this.controllerModalProxy.getEditPanelModelColumnIndex() !== 'undefined' && typeof this.controllerModalProxy.getEditPanelModelControl() !== 'undefined') {
  5252. if (this.controllerModalProxy.getEditPanelModelLineIndex() === lineIndex && this.controllerModalProxy.getEditPanelModelColumnIndex() === colIndex && angular.equals(this.controllerModalProxy.getEditPanelModelControl(), item)) {
  5253. //console.info('already opened for SAME ctrl : so close - no re-open');
  5254. } else {
  5255. (function () {
  5256. //console.info('already opened for DIFFERENT ctrl : so re-open');
  5257. item.rightCliked = true;
  5258. // set a timeout before re-opening, 500ms is ok for a ps-size="400px"
  5259. var timerCloseOpenedEditPanel = _this4.$timeout(function () {
  5260. _this4.controllerModalProxy.setEditPanelModelLineIndex(lineIndex);
  5261. _this4.controllerModalProxy.setEditPanelModelColumnIndex(colIndex);
  5262. _this4.controllerModalProxy.setEditPanelModelControl(item);
  5263. // control model passed to Service : controllerModalProxy
  5264. _this4.controllerModalProxy.setProxyModelFromConfigurationSelection(_this4.configuration, lineIndex, colIndex);
  5265. _this4.controllerModalProxy.setEditPanelModelToggle(true);
  5266. _this4.$scope.editPanelModel.toggle = _this4.controllerModalProxy.getEditPanelModelToggle();
  5267. }, 200);
  5268. _this4.$scope.$on('$destroy', function () {
  5269. return _this4.$timeout.cancel(timerCloseOpenedEditPanel);
  5270. });
  5271. })();
  5272. }
  5273. }
  5274. } else {
  5275. // previous state = closed = immediate open
  5276. // console.info('NOT already opened : so open');
  5277. item.rightCliked = true;
  5278. this.controllerModalProxy.setEditPanelModelLineIndex(lineIndex);
  5279. this.controllerModalProxy.setEditPanelModelColumnIndex(colIndex);
  5280. this.controllerModalProxy.setEditPanelModelControl(item);
  5281. // control model passed to Service : controllerModalProxy
  5282. this.controllerModalProxy.setProxyModelFromConfigurationSelection(this.configuration, lineIndex, colIndex);
  5283. this.controllerModalProxy.setEditPanelModelToggle(true);
  5284. this.editPanelModel.toggle = this.controllerModalProxy.getEditPanelModelToggle();
  5285. }
  5286. // console.info('after toggleLeftPanel check :');
  5287. // console.dir({
  5288. // 'this.editPanelModel' : angular.copy(this.editPanelModel),
  5289. // 'controllerModalProxy.editPanelModel' : angular.copy(this.controllerModalProxy.editPanelModel)
  5290. // });
  5291. }
  5292. // // refreshModels : to call after drag and drop events
  5293. // refreshModels(){
  5294. // this.$timeout(()=>{
  5295. // console.info('refreshing models');
  5296. // formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5297. // this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5298. // }, 10);
  5299. // }
  5300. }, {
  5301. key: 'removeThisLine',
  5302. value: function removeThisLine(lineIndex) {
  5303. this.dragDropModel[1].splice(lineIndex, 1);
  5304. }
  5305. //TODO : to fix
  5306. }, {
  5307. key: 'addNewline',
  5308. value: function addNewline() {
  5309. // re-render formfield
  5310. // TODO : to fix
  5311. this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);
  5312. this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);
  5313. }
  5314. }, {
  5315. key: 'insertNewLine',
  5316. value: function insertNewLine() {
  5317. this.addNewline();
  5318. this.dragDropModel[1].push([]);
  5319. }
  5320. }]);
  5321. return edaDragDropWayEasyFormGenCtrl;
  5322. })();
  5323. edaDragDropWayEasyFormGenCtrl.$inject = ['$scope', 'easyFormGenVersion', '$filter', '$anchorScroll', 'toaster', '$timeout', '$modal', '$log', 'formFieldManage', 'controllerModalProxy', 'dragDropItemDecorationService',
  5324. // 'dragDropConfig',
  5325. 'ddModelConfModelProxyService', 'ddItemRightClickedManager', 'easyFormDragWayConfig'];
  5326. _export('default', edaDragDropWayEasyFormGenCtrl);
  5327. _export('DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER', DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER);
  5328. _export('DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS', DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS);
  5329. }
  5330. };
  5331. });
  5332. $__System.register('4f', ['49', '4e'], function (_export) {
  5333. /* global angular */
  5334. //TODO : to bindToController
  5335. //-> then angular 1.4+ will be required...
  5336. //-> check methot to refactor inside rag drop way then common step way and drag drop way
  5337. 'use strict';
  5338. var edaDragDropWayEasyFormGenDirectiveTemplate, DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER, DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS, EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE;
  5339. function edaDragdropWayEasyFormGen($timeout, formFieldManage, ddModelConfModelProxyService,
  5340. // dragDropConfig,
  5341. easyFormDragWayConfig) {
  5342. var directive = {
  5343. restrict: 'E',
  5344. template: edaDragDropWayEasyFormGenDirectiveTemplate,
  5345. scope: {
  5346. edaEasyFormGeneratorModel: '=',
  5347. edaSaveFormEvent: '&edaSaveFormEvent'
  5348. },
  5349. controller: DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER,
  5350. controllerAs: DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS,
  5351. replace: false,
  5352. link: linkFct
  5353. };
  5354. return directive;
  5355. function linkFct(scope) {
  5356. // watch "scope.easyFormGeneratorModel"
  5357. scope.$watch(function () {
  5358. return scope.edaEasyFormGeneratorModel;
  5359. }, function () {
  5360. return loadExistingConfigurationModel();
  5361. }, true);
  5362. // watch "scope.returnSaveEvent"" = catch saving form event
  5363. scope.$watch(function () {
  5364. return scope.returnSaveEvent;
  5365. }, function (newValue) {
  5366. if (newValue === true) {
  5367. var _easyFormGeneratorModel = {
  5368. formName: scope.vm.configuration.formName,
  5369. btnSubmitText: scope.vm.configuration.submitButtonText,
  5370. btnCancelText: scope.vm.configuration.cancelButtonText,
  5371. edaFieldsModel: scope.vm.configuration.lines,
  5372. //just as test
  5373. edaFieldsModelStringified: angular.toJson(scope.vm.configuration.lines),
  5374. formlyFieldsModel: scope.vm.wfFormFieldsOnlyNeededProperties,
  5375. dataModel: scope.vm.dataModel
  5376. };
  5377. scope.edaSaveFormEvent({
  5378. edaEasyFormGeneratorModel: _easyFormGeneratorModel
  5379. });
  5380. //back to false, waiting next save event
  5381. scope.returnSaveEvent = false;
  5382. }
  5383. });
  5384. function returnAttributeConfigurationLinesIfNotEmpty() {
  5385. var edaEasyFormGeneratorModelToReturn = angular.isArray(scope.edaEasyFormGeneratorModel.edaFieldsModel) ? scope.edaEasyFormGeneratorModel.edaFieldsModel.length > 0 ? scope.edaEasyFormGeneratorModel.edaFieldsModel : emptyEdaFieldsModel() : emptyEdaFieldsModel();
  5386. return edaEasyFormGeneratorModelToReturn;
  5387. }
  5388. /**
  5389. * empty fields model : to display at least an empty line
  5390. * otherwise would look like ugly empty line like it were a bug
  5391. */
  5392. function emptyEdaFieldsModel() {
  5393. var emptyModel = [{
  5394. 'line': 1,
  5395. 'activeColumn': 1,
  5396. 'columns': [{
  5397. 'numColumn': 1,
  5398. 'exist': true,
  5399. 'control': {
  5400. 'type': 'none',
  5401. 'key': 'none'
  5402. }
  5403. }]
  5404. }];
  5405. return emptyModel;
  5406. }
  5407. function returnAttributeDataModelIfNotEmpty() {
  5408. var dataModelToReturn = angular.isArray(scope.edaEasyFormGeneratorModel.dataModel) ? scope.edaEasyFormGeneratorModel.dataModel.length > 0 ? scope.edaEasyFormGeneratorModel.dataModel : [] : [];
  5409. return dataModelToReturn;
  5410. }
  5411. function loadExistingConfigurationModel() {
  5412. if (angular.isDefined(scope.edaEasyFormGeneratorModel)) {
  5413. var configlines = returnAttributeConfigurationLinesIfNotEmpty();
  5414. scope.vm.configurationLoaded = {};
  5415. formFieldManage.bindConfigurationLines(scope.vm.configurationLoaded, configlines, false);
  5416. //apply configuration model
  5417. scope.vm.configuration = angular.copy(scope.vm.configurationLoaded);
  5418. //apply ddModel
  5419. ddModelConfModelProxyService.loadDragDropModelFromConfigurationModel(scope.vm.configuration, scope.vm.dragDropModel);
  5420. updateConfigurationClassName(scope.vm.configuration);
  5421. ddModelConfModelProxyService.refreshControlsKeys(scope.vm.configuration, scope.vm.dragDropModel);
  5422. //apply formly model
  5423. formFieldManage.applyConfigurationToformlyModel(scope.vm.configuration, scope.vm.wfFormFields, scope.vm.dataModel);
  5424. scope.vm.wfFormFieldsOnlyNeededProperties = angular.copy(scope.vm.wfFormFields);
  5425. scope.vm.dataModel = returnAttributeDataModelIfNotEmpty();
  5426. scope.vm.configuration.formName = angular.isString(scope.edaEasyFormGeneratorModel.formName) ? scope.edaEasyFormGeneratorModel.formName : '';
  5427. scope.vm.configuration.submitButtonText = angular.isString(scope.edaEasyFormGeneratorModel.btnSubmitText) ? scope.edaEasyFormGeneratorModel.btnSubmitText : 'Submit';
  5428. scope.vm.configuration.cancelButtonText = angular.isString(scope.edaEasyFormGeneratorModel.btnCancelText) ? scope.edaEasyFormGeneratorModel.btnCancelText : 'Cancel';
  5429. }
  5430. }
  5431. function updateConfigurationClassName(configModel) {
  5432. angular.forEach(configModel.lines, function (aline) {
  5433. var cssClassToApply = easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(aline.columns.length);
  5434. angular.forEach(aline.columns, function (aControl) {
  5435. return aControl.control.className = cssClassToApply;
  5436. });
  5437. });
  5438. }
  5439. }
  5440. }
  5441. return {
  5442. setters: [function (_) {
  5443. edaDragDropWayEasyFormGenDirectiveTemplate = _['default'];
  5444. }, function (_e) {
  5445. DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER = _e.DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER;
  5446. DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS = _e.DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLERAS;
  5447. }],
  5448. execute: function () {
  5449. EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE = 'edaDragdropWayEasyFormGen';
  5450. edaDragdropWayEasyFormGen.$inject = ['$timeout', 'formFieldManage', 'ddModelConfModelProxyService',
  5451. // 'dragDropConfig',
  5452. 'easyFormDragWayConfig'];
  5453. _export('default', edaDragdropWayEasyFormGen);
  5454. _export('EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE', EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE);
  5455. }
  5456. };
  5457. });
  5458. $__System.register('50', ['48', '4e', '4f'], function (_export) {
  5459. /* global angular */
  5460. 'use strict';
  5461. var easyFormDragWayConfig, EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME, edaDragDropWayEasyFormGenCtrl, DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER, edaDragdropWayEasyFormGen, EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE, DRAGDROP_MODULE;
  5462. return {
  5463. setters: [function (_) {
  5464. easyFormDragWayConfig = _['default'];
  5465. EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME = _.EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME;
  5466. }, function (_e) {
  5467. edaDragDropWayEasyFormGenCtrl = _e['default'];
  5468. DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER = _e.DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER;
  5469. }, function (_f) {
  5470. edaDragdropWayEasyFormGen = _f['default'];
  5471. EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE = _f.EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE;
  5472. }],
  5473. execute: function () {
  5474. DRAGDROP_MODULE = 'edaDragDropWay.main.module';
  5475. _export('default', angular.module(DRAGDROP_MODULE, []).provider(EASY_FORM_DRAG_DROP_WAY_CONFIG_NAME, easyFormDragWayConfig).controller(DRAG_DROP_WAY_EASY_FORM_GEN_CONTROLLER, edaDragDropWayEasyFormGenCtrl).directive(EDA_DRAGDROP_WAY_EASY_FORM_GEN_DIRECTIVE, edaDragdropWayEasyFormGen));
  5476. }
  5477. };
  5478. });
  5479. $__System.register('51', [], function (_export) {
  5480. 'use strict';
  5481. var TRUST_THIS_FILTER_NAME;
  5482. function trustThis($sce) {
  5483. return function (value, type) {
  5484. return $sce.trustAs(type || 'html', value);
  5485. };
  5486. }
  5487. return {
  5488. setters: [],
  5489. execute: function () {
  5490. TRUST_THIS_FILTER_NAME = 'trustThis';
  5491. trustThis.$inject = ['$sce'];
  5492. _export('default', trustThis);
  5493. _export('TRUST_THIS_FILTER_NAME', TRUST_THIS_FILTER_NAME);
  5494. }
  5495. };
  5496. });
  5497. $__System.register('52', ['51'], function (_export) {
  5498. 'use strict';
  5499. var trustThis, TRUST_THIS_FILTER_NAME, TRUST_THIS_FILTER_MODULE;
  5500. return {
  5501. setters: [function (_) {
  5502. trustThis = _['default'];
  5503. TRUST_THIS_FILTER_NAME = _.TRUST_THIS_FILTER_NAME;
  5504. }],
  5505. execute: function () {
  5506. TRUST_THIS_FILTER_MODULE = 'edaDragDropWay.trustThis.filter';
  5507. _export('default', angular.module(TRUST_THIS_FILTER_MODULE, []).filter(TRUST_THIS_FILTER_NAME, trustThis));
  5508. }
  5509. };
  5510. });
  5511. $__System.register('1', ['2', '3', '5', '6', '41', '44', '46', '50', '52', '2a', '2e', '3c', '3f'], function (_export) {
  5512. 'use strict';
  5513. var formlyConfigFunct, dragDropConfigFunt, EASY_FORM_DD_VERSION_NAME, EASY_FORM_DD_VERSION_VALUE, coreModule, configProxyModule, dragAndDropListModule, pageSlideModule, easyFormDragDropModule, trustThisFilterModule, leftPanelModule, formlyProxyModule, dragdropModule, rightClickModule, DRAG_DROP_WAY_MODULE_NAME, DRAG_DROP_MODULES_INJECT, mainModule;
  5514. return {
  5515. setters: [function (_) {}, function (_2) {
  5516. formlyConfigFunct = _2['default'];
  5517. }, function (_3) {
  5518. dragDropConfigFunt = _3['default'];
  5519. EASY_FORM_DD_VERSION_NAME = _3.EASY_FORM_DD_VERSION_NAME;
  5520. EASY_FORM_DD_VERSION_VALUE = _3.EASY_FORM_DD_VERSION_VALUE;
  5521. }, function (_4) {
  5522. coreModule = _4['default'];
  5523. }, function (_5) {
  5524. configProxyModule = _5['default'];
  5525. }, function (_6) {
  5526. dragAndDropListModule = _6['default'];
  5527. }, function (_7) {
  5528. pageSlideModule = _7['default'];
  5529. }, function (_8) {
  5530. easyFormDragDropModule = _8['default'];
  5531. }, function (_9) {
  5532. trustThisFilterModule = _9['default'];
  5533. }, function (_a) {
  5534. leftPanelModule = _a['default'];
  5535. }, function (_e) {
  5536. formlyProxyModule = _e['default'];
  5537. }, function (_c) {
  5538. dragdropModule = _c['default'];
  5539. }, function (_f) {
  5540. rightClickModule = _f['default'];
  5541. }],
  5542. execute: function () {
  5543. DRAG_DROP_WAY_MODULE_NAME = 'eda.easyformGen.dragDropWay';
  5544. DRAG_DROP_MODULES_INJECT = [coreModule.name, configProxyModule.name, trustThisFilterModule.name, leftPanelModule.name, formlyProxyModule.name, dragdropModule.name, easyFormDragDropModule.name, rightClickModule.name, dragAndDropListModule.name, pageSlideModule.name];
  5545. mainModule = angular.module(DRAG_DROP_WAY_MODULE_NAME, DRAG_DROP_MODULES_INJECT).config(dragDropConfigFunt).config(formlyConfigFunct).value(EASY_FORM_DD_VERSION_NAME, EASY_FORM_DD_VERSION_VALUE);
  5546. _export('default', mainModule);
  5547. }
  5548. };
  5549. });
  5550. })
  5551. (function(factory) {
  5552. factory();
  5553. });
  5554. //# sourceMappingURL=eda.dragdropway.js.map