diff --git a/CHANGELOG.md b/CHANGELOG.md index 5caaace23..e48e42727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to `twill` will be documented in this file. +## 2.8.0 (2022-04-19) + +### Added + +No new features were added in the final release. Please check rc and beta tags to see a full +list of new features and fixes. + +### Fixed + +- Improved language label display [`#1592`](https://github.com/area17/twill/pull/1592) +- Fixed regression in translatable settings [`#1598`](https://github.com/area17/twill/pull/1598) +- Fixed capsule database path [`#1583`](https://github.com/area17/twill/pull/1583) +- Fixed activity log morph size [`#1565`](https://github.com/area17/twill/pull/1565) + +### Docs + +- Added repeater guide [`#1576`](https://github.com/area17/twill/pull/1576) + ## 2.8.0-rc.2 (2022-04-08) ### Added diff --git a/dist/assets/admin/js/chunk-common.2eb1ecb0.js b/dist/assets/admin/js/chunk-common.2eb1ecb0.js deleted file mode 100644 index 85d2f5418..000000000 --- a/dist/assets/admin/js/chunk-common.2eb1ecb0.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"0042":function(e,t,i){"use strict";i("d525")},"030e":function(e,t,i){"use strict";i("5440")},"0429":function(e,t,i){"use strict";i.d(t,"h",(function(){return n["g"]})),i.d(t,"j",(function(){return a["a"]})),i.d(t,"f",(function(){return r["i"]})),i.d(t,"c",(function(){return s["e"]})),i.d(t,"b",(function(){return m})),i.d(t,"l",(function(){return y})),i.d(t,"i",(function(){return O})),i.d(t,"g",(function(){return b["b"]})),i.d(t,"d",(function(){return I})),i.d(t,"n",(function(){return $})),i.d(t,"m",(function(){return G})),i.d(t,"e",(function(){return me})),i.d(t,"k",(function(){return ge})),i.d(t,"a",(function(){return _e}));var n=i("5589"),a=i("22f7"),r=i("9788"),s=i("d675"),o="addBlock",l="moveBlock",c="deleteBlock",u="duplicateBlock",d="reorderBlocks",f="activateBlock",h="addBlockPreview",p="updateBlockPreviewLoading",m={ADD_BLOCK:o,MOVE_BLOCK:l,DELETE_BLOCK:c,DUPLICATE_BLOCK:u,REORDER_BLOCKS:d,ACTIVATE_BLOCK:f,ADD_BLOCK_PREVIEW:h,UPDATE_PREVIEW_LOADING:p},b=i("9aba"),g=[r["f"],r["d"],r["a"],r["b"],r["c"],r["e"],b["a"],n["e"],n["f"],n["d"],n["a"],n["b"],n["c"],s["d"],s["b"],s["a"],s["c"]],v=[b["a"]],y={REFRESH_BLOCK_PREVIEW:g,REFRESH_BLOCK_PREVIEW_ALL:v},_="updateModalAction",w="updateModalMode",O={UPDATE_MODAL_ACTION:_,UPDATE_MODAL_MODE:w},E="addToBucket",T="deleteFromBucket",S="toggleFeaturedInBucket",A="reorderBucketList",C="updateBucketsDataSource",D="updateBucketsData",P="updateBucketsFilter",x="updateBucketsDataOffset",k="updateBucketsDataPage",M="updateBucketsMaxPage",I={ADD_TO_BUCKET:E,DELETE_FROM_BUCKET:T,TOGGLE_FEATURED_IN_BUCKET:S,REORDER_BUCKET_LIST:A,UPDATE_BUCKETS_DATASOURCE:C,UPDATE_BUCKETS_DATA:D,UPDATE_BUCKETS_FILTER:P,UPDATE_BUCKETS_DATA_OFFSET:x,UPDATE_BUCKETS_DATA_PAGE:k,UPDATE_BUCKETS_MAX_PAGE:M},L="loadingRevision",j="updateRevision",R="updateRevisionContent",N="updatePreviewContent",B="updateAllRevision",$={LOADING_REV:L,UPDATE_REV:j,UPDATE_REV_CONTENT:R,UPDATE_REV_CURRENT_CONTENT:N,UPDATE_REV_ALL:B},F="updatePublishStartDate",U="updatePublishEndDate",V="updatePublishState",q="updatePublishSubmit",W="updatePublishVisibility",H="updateReviewProcess",z="updateSaveType",K="updateHasUnsavedChanges",G={UPDATE_PUBLISH_START_DATE:F,UPDATE_PUBLISH_END_DATE:U,UPDATE_PUBLISH_STATE:V,UPDATE_PUBLISH_VISIBILITY:W,UPDATE_REVIEW_PROCESS:H,UPDATE_PUBLISH_SUBMIT:q,UPDATE_SAVE_TYPE:z,UPDATE_HAS_UNSAVED_CHANGES:K},Y="updateDatableData",X="updateDatableBulk",J="replaceDatableBulk",Q="addDatableColumn",Z="removeDatableColumn",ee="updateDatableOffset",te="updateDatablePage",ie="updateDatableMaxPage",ne="updateDatableNavigation",ae="updateDatableVisibility",re="updateDatableSort",se="publishDatatable",oe="featureDatatable",le="updateDatableFilter",ce="updateDatableFilterStatus",ue="clearDatableFilter",de="updateDatableMessage",fe="updateDatableLoading",he="updateDatatableNestedDatas",pe="updateDatableTracker",me={UPDATE_DATATABLE_DATA:Y,UPDATE_DATATABLE_BULK:X,REPLACE_DATATABLE_BULK:J,ADD_DATATABLE_COLUMN:Q,REMOVE_DATATABLE_COLUMN:Z,UPDATE_DATATABLE_OFFSET:ee,UPDATE_DATATABLE_PAGE:te,UPDATE_DATATABLE_MAXPAGE:ie,UPDATE_DATATABLE_NAV:ne,UPDATE_DATATABLE_VISIBLITY:ae,UPDATE_DATATABLE_SORT:re,PUBLISH_DATATABLE:se,FEATURE_DATATABLE:oe,UPDATE_DATATABLE_FILTER:le,UPDATE_DATATABLE_FILTER_STATUS:ce,CLEAR_DATATABLE_FILTER:ue,UPDATE_DATATABLE_MESSAGE:de,UPDATE_DATATABLE_LOADING:fe,UPDATE_DATATABLE_NESTED:he,UPDATE_DATATABLE_TRACKER:pe},be="updateParent",ge={UPDATE_PARENT:be},ve=(i("f99e"),"emptyAttributes"),ye="updateAttributes",_e={EMPTY_OPTIONS:ve,UPDATE_OPTIONS:ye}},"05a8":function(e,t,i){},"07f4":function(e,t,i){"use strict";i("9d7d")},"0a8f":function(e,t,i){"use strict";t["a"]={modal:"s--modal",overlay:"s--overlay",editor:"s--in-editor",search:"s--search"}},"0de3":function(e,t,i){},"0e7b":function(e,t,i){},1071:function(e,t,i){"use strict";i("fc07")},"10ba":function(e,t,i){"use strict";i("858a")},"11ed":function(e,t,i){},1249:function(e,t,i){"use strict";var n=i("63ea"),a=i.n(n);t["a"]={props:{min:{type:Number,default:0},max:{type:Number,default:0},disabled:{type:Boolean,default:!1},selected:{type:Array,default:function(){return[]}}},data:function(){return{currentValue:this.selected}},watch:{selected:function(e){this.currentValue=e}},computed:{checkedValue:{get:function(){return this.currentValue},set:function(e){a()(e,this.currentValue)||(this.currentValue=e,"undefined"!==typeof this.saveIntoStore&&this.saveIntoStore(e),this.$emit("change",e))}}},methods:{isMax:function(e){return e.length>this.max&&this.max>0},isMin:function(e){return e.length0}}}},"14bd":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"dropdown",class:e.dropdownClasses,attrs:{"aria-title":e.title}},[e.fixed?i("div",{ref:"dropdown__cta"},[e._t("default")],2):e._t("default"),i("transition",{attrs:{name:"fade_move_dropdown"}},[e.active?i("div",{ref:"dropdown__position",staticClass:"dropdown__position"},[i("div",{staticClass:"dropdown__content",style:e.offsetStyle,attrs:{"data-dropdown-content":""}},[i("div",{staticClass:"dropdown__inner"},[e.arrow?i("span",{staticClass:"dropdown__arrow"}):e._e(),i("div",{staticClass:"dropdown__scroller",style:e.innerStyle},[e.title?i("span",{staticClass:"dropdown__title f--small"},[e._v(e._s(e.title))]):e._e(),e._t("dropdown__content")],2)])])]):e._e()])],2)},a=[],r={name:"A17Dropdown",props:{title:{type:String,default:""},position:{type:String,default:"bottom"},width:{type:String,default:"auto"},maxWidth:{type:Number,default:300},maxHeight:{type:Number,default:0},minWidth:{type:Number,default:0},arrow:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},offset:{type:Number,default:5},sideOffset:{type:Number,default:0},fixed:{type:Boolean,default:!1}},data:function(){return{currentPosition:this.position,currentHeight:100,currentMaxWidth:this.maxWidth,active:!1,originScrollPostion:null,scrollOffset:75}},computed:{dropdownClasses:function(){return{"dropdown--active":this.active,"dropdown--arrow":this.arrow,"dropdown--bottom":this.isPosition("bottom"),"dropdown--top":this.isPosition("top"),"dropdown--left":this.isPosition("left"),"dropdown--right":this.isPosition("right"),"dropdown--center":this.isPosition("center"),"dropdown--full":"full"===this.width,"dropdown--fixed":this.fixed}},offsetStyle:function(){return{"margin-top":this.isPosition("bottom")?this.offset+"px":"","margin-bottom":this.isPosition("top")?this.offset+"px":"",transform:this.sideOffset?"translateX("+this.sideOffset+"px)":"","max-width":this.currentMaxWidth>0&&"full"!==this.width?this.currentMaxWidth+"px":"","min-width":this.minWidth>0?this.minWidth+"px":""}},innerStyle:function(){return{"max-height":this.maxHeight>0?this.maxHeight+"px":"",overflow:this.maxHeight>0?"hidden":"","overflow-y":this.maxHeight>0?"scroll":""}}},methods:{isPosition:function(e){return-1!==this.currentPosition.indexOf(e)},reposition:function(){var e=this.$el.getBoundingClientRect().top+this.$el.offsetHeight+window.pageYOffset+this.offset,t=this.$el.getBoundingClientRect().top+window.pageYOffset-this.offset,i=window.pageYOffset+window.innerHeight;this.currentPosition!==this.position&&(this.currentPosition=this.position),this.isPosition("bottom")?e+this.currentHeight>i&&(this.currentPosition=this.currentPosition.replace(/bottom/i,"top")):this.isPosition("top")&&t-this.currentHeightwindow.innerWidth?window.innerWidth-e.left:this.maxWidth:this.isPosition("right")?this.currentMaxWidth=this.maxWidth+(window.innerWidth-e.right)>window.innerWidth?window.innerWidth-(window.innerWidth-e.right):this.maxWidth:this.currentMaxWidth=this.maxWidth>window.innerWidth?window.innerWidth:this.maxWidth},setFixedPosition:function(){var e=this.$refs.dropdown__cta.getBoundingClientRect();this.isPosition("top")?this.$refs.dropdown__position.style.bottom=Math.round(window.innerHeight-e.bottom+e.height)+"px":this.$refs.dropdown__position.style.top=Math.round(e.top+e.height)+"px",this.isPosition("left")?this.$refs.dropdown__position.style.left=Math.round(e.left)+"px":this.isPosition("right")?this.$refs.dropdown__position.style.right=Math.round(window.innerWidth-e.right)+"px":this.$refs.dropdown__position.style.left=Math.round(e.left+e.width/2)+"px"},closeFromDoc:function(e){var t=e.target;if("scroll"===e.type){if(this.$el.querySelector("[data-dropdown-content]").contains(t))return;var i=window.pageYOffset||document.documentElement.scrollTop;if(i>this.originScrollPostion-this.scrollOffset&&ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i-1)e.selected[i].splice(e.indexToReplace,1,c()(t[0]));else if(n)t.forEach((function(t){e.selected[i].push(c()(t))}));else{var a={};a[i]=t,e.selected=Object.assign({},e.selected,a)}e.indexToReplace=-1}})),O(n,u["h"].DESTROY_SPECIFIC_MEDIA,(function(e,t){e.selected[t.name]&&(e.selected[t.name].splice(t.index,1),0===e.selected[t.name].length&&a["a"].delete(e.selected,t.name)),e.connector=null})),O(n,u["h"].DESTROY_MEDIAS,(function(e,t){e.selected[t]&&a["a"].delete(e.selected,t),e.connector=null})),O(n,u["h"].REORDER_MEDIAS,(function(e,t){var i={};i[t.name]=t.medias,e.selected=Object.assign({},e.selected,i)})),O(n,u["h"].PROGRESS_UPLOAD_MEDIA,(function(e,t){var i=e.loading.filter((function(e){return e.id===t.id}));i.length?(i[0].error=!1,i[0].progress=t.progress):e.loading.unshift({id:t.id,name:t.name,progress:t.progress,replacementId:t.replacementId,isReplacement:t.isReplacement})})),O(n,u["h"].PROGRESS_UPLOAD,(function(e,t){e.uploadProgress=t})),O(n,u["h"].DONE_UPLOAD_MEDIA,(function(e,t){e.loading.forEach((function(i,n){i.id===t.id&&e.loading.splice(n,1)}))})),O(n,u["h"].ERROR_UPLOAD_MEDIA,(function(e,t){e.loading.forEach((function(i,n){i.id===t.id&&(a["a"].set(e.loading[n],"progress",0),a["a"].set(e.loading[n],"error",!0),a["a"].set(e.loading[n],"errorMessage",t.errorMessage))}))})),O(n,u["h"].UPDATE_MEDIA_CONNECTOR,(function(e,t){e.connector=t&&""!==t?t:null})),O(n,u["h"].UPDATE_MEDIA_MODE,(function(e,t){e.strict=t})),O(n,u["h"].UPDATE_MEDIA_TYPE,(function(e,t){t&&""!==t&&(e.type=t)})),O(n,u["h"].RESET_MEDIA_TYPE,(function(e){e.type=e.types[0].value})),O(n,u["h"].UPDATE_MEDIA_MAX,(function(e,t){e.max=Math.max(0,t)})),O(n,u["h"].UPDATE_MEDIA_FILESIZE_MAX,(function(e,t){e.filesizeMax=Math.max(0,t)})),O(n,u["h"].UPDATE_MEDIA_WIDTH_MIN,(function(e,t){e.widthMin=Math.max(0,t)})),O(n,u["h"].UPDATE_MEDIA_HEIGHT_MIN,(function(e,t){e.heightMin=Math.max(0,t)})),O(n,u["h"].SET_MEDIA_METADATAS,(function(e,t){var i=t.media.context,n=e.selected[i],r=t.value;function s(e){return r.locale?(e.metadatas.custom[r.id]||(e.metadatas.custom[r.id]={}),e.metadatas.custom[r.id][r.locale]=r.value):e.metadatas.custom[r.id]=r.value,e}if(t.media.hasOwnProperty("index")){var o=s(c()(n[t.media.index]));a["a"].set(n,t.media.index,o)}})),O(n,u["h"].DESTROY_MEDIA_CONNECTOR,(function(e){e.connector=null})),O(n,u["h"].SET_MEDIA_CROP,(function(e,t){var i=t.key,n=t.index,r=e.selected[i][n];function s(e){for(var i in e.crops||(e.crops={}),t.values){var n={};n.name=t.values[i].name||i,n.x=t.values[i].x,n.y=t.values[i].y,n.width=t.values[i].width,n.height=t.values[i].height,e.crops[i]=n}return e}var o=s(c()(r));a["a"].set(e.selected[i],n,o)})),O(n,u["h"].ADD_MEDIAS,(function(e,t){var i=t.medias;e.selected=Object.assign({},e.selected,i)})),n),C=O({},d["a"].DUPLICATE_BLOCK,(function(e,t){return w(o.a.mark((function i(){var n,a,r,s,l,c,d;return o.a.wrap((function(i){while(1)switch(i.prev=i.next){case 0:n=e.commit,a=e.getters,r=t.block,s=t.id,l=y({},a.mediasByBlockId(r.id)),c=Object.keys(l),d={},c.forEach((function(e){return d[e.replace(r.id,s)]=f(l[e])})),n(u["h"].ADD_MEDIAS,{medias:d});case 7:case"end":return i.stop()}}),i)})))()})),D={state:T,getters:S,mutations:A,actions:C};function P(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var x={success:null,info:null,warning:null,error:null},k={notifByVariant:function(e){return function(t){return e[t]}},notified:function(e){return 0===Object.keys(e).filter((function(t){return null!==e[t]})).length}},M=(E={},P(E,u["j"].SET_NOTIF,(function(e,t){e[t.variant]=t.message})),P(E,u["j"].CLEAR_NOTIF,(function(e,t){e[t]&&(e[t]=null)})),E),I={state:x,getters:k,mutations:M};a["a"].use(r["a"]);var L=!1;t["a"]=new r["a"].Store({modules:{notification:I,mediaLibrary:D},strict:L})},"159c":function(e,t,i){"use strict";t["a"]={methods:{openEditor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$root.$refs.editor&&this.$root.$refs.editor.open(e,t)}}}},"16d1":function(e,t,i){},"16f9":function(e,t,i){"use strict";var n=i("bfa9"),a=function(){var e=document.querySelectorAll("[data-medialib-btn]");function t(){window["TWILL"].vm&&window["TWILL"].vm.openFreeMediaLibrary()}e.length&&Object(n["a"])(e,(function(e){e.addEventListener("click",(function(i){i.preventDefault(),t(),e.blur()}))}))};t["a"]=a},1800:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"itemlist"},[i("table",{staticClass:"itemlist__table"},[i("tbody",[e._l(e.itemsLoading,(function(t,n){return i("tr",{directives:[{name:"show",rawName:"v-show",value:!t.isReplacement,expression:"!item.isReplacement"}],key:t.id,staticClass:"itemlist__row"},[i("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":t.error},attrs:{colspan:e.columnsNumber}},[t.error?i("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):i("span",{staticClass:"itemlist__progress"},[i("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(n)})])])])})),e._l(e.allItems,(function(t,n){return i("tr",{key:t.endpointType+"_"+t.id,staticClass:"itemlist__row",class:{"s--picked":e.isSelected(t,e.keysToCheck),"s--disabled":t.disabled||!!e.replacingMediaIds[t.id]},on:{click:[function(i){return i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:(i.preventDefault(),e.toggleSelection(t))},function(i){return i.shiftKey?i.ctrlKey||i.altKey||i.metaKey?null:(i.preventDefault(),e.shiftToggleSelection(t)):null}]}},[t.isReplacement?t.isReplacement?[i("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":t.error},attrs:{colspan:e.columnsNumber}},[t.error?i("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):i("span",{staticClass:"itemlist__progress"},[i("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(n,"allItems")})])])]:e._e():[t.hasOwnProperty("id")?i("td",{staticClass:"itemlist__cell itemlist__cell--btn"},[i("a17-checkbox",{attrs:{name:"item_list",value:t.endpointType+"_"+t.id,initialValue:e.checkedItems,theme:"bold",disabled:t.disabled}})],1):e._e(),t.hasOwnProperty("thumbnail")?i("td",{staticClass:"itemlist__cell itemlist__cell--thumb"},[i("img",{attrs:{src:t.thumbnail}})]):e._e(),t.hasOwnProperty("name")?i("td",{staticClass:"itemlist__cell itemlist__cell--name"},[t.hasOwnProperty("renderHtml")?i("div",{domProps:{innerHTML:e._s(t.name)}}):i("div",[e._v(e._s(t.name))])]):e._e(),e._l(e.extraColumns,(function(n,a){return i("td",{key:a,staticClass:"itemlist__cell",class:e.rowClass(n)},["size"===n?[e._v(e._s(e._f("uppercase")(t[n])))]:[e._v(e._s(t[n]))]],2)}))]],2)}))],2)])])},a=[],r=i("4e53"),s=i("df63"),o={name:"A17Itemlist",props:{keysToCheck:{type:Array,default:function(){return["id"]}}},mixins:[s["a"]],filters:r["a"],computed:{allItems:function(){var e=this;return this.items.map((function(t){if(e.replacingMediaIds[t.id]){var i=e.itemsLoading.find((function(e){return e.replacementId===t.id}));return i||t}return t}))},columnsNumber:function(){if(!this.items.length)return 0;var e=this.extraColumns.length,t=this.items[0];return t.hasOwnProperty("id")&&e++,t.hasOwnProperty("name")&&e++,t.hasOwnProperty("thumbnail")&&e++,e},extraColumns:function(){if(!this.items.length)return[];var e=this.items[0];return Object.keys(e).filter((function(t){return!["id","name","thumbnail","src","original","edit","crop","deleteUrl","updateUrl","updateBulkUrl","deleteBulkUrl","endpointType","filesizeInMb"].includes(t)&&"string"===typeof e[t]}))},checkedItems:function(){var e=[];return this.selectedItems.length&&this.selectedItems.forEach((function(t){e.push(t.endpointType+"_"+t.id)})),e}},methods:{rowClass:function(e){return"itemlist__cell--"+e},loadingProgress:function(e,t){var i=t?this[t]:this.itemsLoading;return{width:i[e].progress?i[e].progress+"%":"0%"}}}},l=o,c=(i("72f9"),i("2877")),u=Object(c["a"])(l,n,a,!1,null,"1df2ac14",null);t["a"]=u.exports},"1a47":function(e,t,i){"use strict";i("f0e3")},"1a8d":function(e,t,i){"use strict";var n=i("0429");t["a"]={props:{type:{type:String,default:"image"}},methods:{openMediaLibrary:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.name,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(n["h"].UPDATE_MEDIA_CONNECTOR,t),this.$store.commit(n["h"].UPDATE_MEDIA_TYPE,this.type),this.$store.commit(n["h"].UPDATE_REPLACE_INDEX,i),this.$store.commit(n["h"].UPDATE_MEDIA_MAX,e),this.$store.commit(n["h"].UPDATE_MEDIA_MODE,!0),this.$store.commit(n["h"].UPDATE_MEDIA_FILESIZE_MAX,this.filesizeMax||0),this.$store.commit(n["h"].UPDATE_MEDIA_WIDTH_MIN,this.widthMin||0),this.$store.commit(n["h"].UPDATE_MEDIA_HEIGHT_MIN,this.heightMin||0),this.$root.$refs.mediaLibrary&&this.$root.$refs.mediaLibrary.open()}}}},"1ad4":function(e,t,i){},"1c33":function(e,t,i){"use strict";i("b4c0")},"1c72":function(e,t,i){},"1d38":function(e,t,i){"use strict";i("afcd")},"1df8":function(e,t,i){},"22f7":function(e,t,i){"use strict";var n="setNotification",a="clearNotification";t["a"]={SET_NOTIF:n,CLEAR_NOTIF:a}},2569:function(e,t,i){"use strict";i.d(t,"d",(function(){return d})),i.d(t,"a",(function(){return f})),i.d(t,"c",(function(){return h})),i.d(t,"b",(function(){return p}));var n=i("dc1c"),a=i("6ffc"),r=i("0227"),s=i("b579"),o=i("26df"),l=i("dee5"),c=i("228d"),u=i("f80c"),d={en:{"date-fns":i("52cf")},"zh-Hans":{"date-fns":i("f2d3"),flatpickr:n["Mandarin"]},ru:{"date-fns":i("9f3f"),flatpickr:a["Russian"]},fr:{"date-fns":i("2ca0"),flatpickr:r["French"]},pl:{"date-fns":i("07ac"),flatpickr:s["Polish"]},de:{"date-fns":i("6e0c"),flatpickr:o["German"]},nl:{"date-fns":i("8424"),flatpickr:l["Dutch"]},pt:{"date-fns":i("81d9"),flatpickr:c["Portuguese"]},tr:{"date-fns":i("dd95"),flatpickr:u["Turkish"]}};function f(){return window["TWILL"].twillLocalization.locale}function h(){return 2===new Intl.DateTimeFormat(f(),{hour:"numeric"}).formatToParts(new Date(2020,0,1,13)).find((function(e){return"hour"===e.type})).value.length}function p(){return h()?"HH:mm":"hh:mm A"}},2732:function(e,t,i){"use strict";i("b057")},2881:function(e,t,i){"use strict";i("753c")},"2c83":function(e,t,i){"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=function(e){var t,i={el:document,offset:0,duration:250,easing:"linear"},a=Date.now(),r=0,s=!1,o={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},l=window.requestAnimationFrame;for(var c in e)"undefined"!==typeof e[c]&&(i[c]=e[c]);function u(e,t){return e1?i("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"input__lang",attrs:{"data-tooltip-title":e.$trans("fields.generic.switch-language")},on:{click:e.onClickLocale}},[e._v(e._s(e.displayedLocale))]):e._e(),e.note?i("span",{staticClass:"input__note f--small"},[e._v(e._s(e.note))]):e._e()]):e._e(),e.addNew?i("a",{staticClass:"input__add",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openAddModal(t)}}},[i("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}}),e._v(" "),i("span",{staticClass:"f--link-underlined--o"},[e._v("Add New")])]):e._e(),e._t("default"),e.error&&e.errorMessage?i("span",{staticClass:"input__errorMessage f--small",domProps:{innerHTML:e._s(e.errorMessage)}}):e._e(),e.otherLocalesError?i("span",{staticClass:"input__errorMessage f--small"},[e._v(e._s(e.errorMessageLocales))]):e._e()],2)},k=[],M={name:"A17InputFrame",mixins:[_["a"],O["a"],T["a"]],props:{addNew:{type:String,default:""}},computed:{textfieldClasses:function(){return{"input--error":this.error,"input--small":"small"===this.size}}},methods:{openAddModal:function(){this.$parent.$refs.addModal&&this.$parent.$refs.addModal.open()}}},I=M,L=(i("dcef"),Object(l["a"])(I,x,k,!1,null,"74021712",null)),j=L.exports,R=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,required:e.required}},[i("div",{staticClass:"form__field",class:e.textfieldClasses},[i("input",{attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.name,disabled:e.disabled,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,maxlength:"7"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}),i("a17-dropdown",{ref:"colorDropdown",staticClass:"form__field--color",attrs:{position:"bottom-right",arrow:!0,offset:15,minWidth:300,clickable:!0,sideOffset:15},on:{close:e.saveIntoStore}},[i("span",{staticClass:"form__field--colorBtn",style:e.bcgStyle,on:{click:function(t){return e.$refs.colorDropdown.toggle()}}}),i("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[i("a17-colorpicker",{attrs:{color:e.value},on:{change:e.updateValueFromPicker}})],1)])],1)])},N=[],B=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"colorpicker"},[i("div",{staticClass:"colorpicker__color"},[i("div",{ref:"satContainer",staticClass:"colorpicker__saturation",style:{background:e.bgColor},on:{mousedown:function(t){return e.handleMouseDown("saturation")}}},[i("div",{staticClass:"colorpicker__saturation--white"}),i("div",{staticClass:"colorpicker__saturation--black"}),i("div",{staticClass:"colorpicker__saturation-pointer",style:{top:e.satPointerTop,left:e.satPointerLeft}},[i("div",{staticClass:"colorpicker__saturation-circle"})])]),i("div",{staticClass:"colorpicker__hue colorpicker__hue--vertical"},[i("div",{ref:"hueContainer",staticClass:"colorpicker__hue-container",on:{mousedown:function(t){return e.handleMouseDown("hue")}}},[i("div",{staticClass:"colorpicker__hue-pointer",style:{top:e.huePointerTop,left:e.huePointerLeft}},[i("div",{staticClass:"colorpicker__hue-picker"})])])])])])},$=[],F=i("66cb"),U=i.n(F),V=i("0f32"),q=i.n(V),W={name:"a17ColorPicker",props:{color:{type:String,required:!0},direction:{type:String,default:"vertical"}},data:function(){return{currentColor:U()(this.color),currentColorHue:U()(this.color).toHsv().h,currentTarget:"",pullDirection:""}},computed:{bgColor:function(){return"hsl(".concat(this.currentColorHue,", 100%, 50%)")},satPointerTop:function(){return-100*this.currentColor.toHsv().v+1+100+"%"},satPointerLeft:function(){return 100*this.currentColor.toHsv().s+"%"},huePointerTop:function(){return"vertical"===this.direction?0===this.currentColorHue&&"right"===this.pullDirection?0:-100*this.currentColorHue/360+100+"%":0},huePointerLeft:function(){return"vertical"===this.direction?0:0===this.currentColorHue&&"right"===this.pullDirection?"100%":100*this.currentColorHue/360+"%"}},methods:{throttle:q()((function(e,t){e(t)}),20,{leading:!0,trailing:!1}),satHandleChange:function(e,t){!t&&e.preventDefault();var i=this.$refs.satContainer;if(i){var n=i.clientWidth,a=i.clientHeight,r=i.getBoundingClientRect().left+window.pageXOffset,s=i.getBoundingClientRect().top+window.pageYOffset,o=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),c=o-r,u=l-s;c<0?c=0:c>n?c=n:u<0?u=0:u>a&&(u=a);var d=c/n,f=-u/a+1;f=f>0?f:0,f=f>1?1:f,this.throttle(this.onChange,{h:this.currentColorHue,s:d,v:f,a:this.currentColor.toHsv().a})}},hueHandleChange:function(e,t){!t&&e.preventDefault();var i,n,a=this.$refs.hueContainer,r=a.clientWidth,s=a.clientHeight,o=a.getBoundingClientRect().left+window.pageXOffset,l=a.getBoundingClientRect().top+window.pageYOffset,c=e.pageX||(e.touches?e.touches[0].pageX:0),u=e.pageY||(e.touches?e.touches[0].pageY:0),d=c-o,f=u-l;"vertical"===this.direction?f<0?i=360:f>s?i=0:(n=-100*f/s+100,i=360*n/100):d<0?i=0:d>r?i=360:(n=100*d/r,i=360*n/100),this.currentColorHue!==i&&this.throttle(this.onChange,{h:i,s:this.currentColor.toHsl().s,l:this.currentColor.toHsl().l,a:this.currentColor.toHsl().a,source:"hsl"})},handleMouseDown:function(e){this.currentTarget=e,"saturation"===this.currentTarget?(window.addEventListener("mousemove",this.satHandleChange),window.addEventListener("mouseup",this.satHandleChange)):(window.addEventListener("mousemove",this.hueHandleChange),window.addEventListener("mouseup",this.hueHandleChange)),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp:function(e){this.unbindEventListeners()},unbindEventListeners:function(){"saturation"===this.currentTarget?(window.removeEventListener("mousemove",this.satHandleChange),window.removeEventListener("mouseup",this.satHandleChange)):(window.removeEventListener("mousemove",this.hueHandleChange),window.removeEventListener("mouseup",this.hueHandleChange)),window.removeEventListener("mouseup",this.handleMouseUp)},onChange:function(e){this.currentColor=U()(e),this.currentColorHue=e.h,this.$emit("change",this.currentColor.toHexString())}}},H=W,z=(i("b773"),Object(l["a"])(H,B,$,!1,null,null,null)),K=z.exports,G={name:"a17ColorField",mixins:[_["a"],O["a"],w["a"]],props:{name:{type:String,required:!0},initialValue:{default:""},defaultValue:{default:""}},components:{"a17-colorpicker":K},data:function(){return{focused:!1,value:this.initialValue}},mounted:function(){""===this.value&&""!==this.defaultValue&&this.updateValue(this.defaultValue)},computed:{bcgStyle:function(){return{"background-color":""!==this.value?this.value:"transparent"}},textfieldClasses:function(){return{"s--focus":this.focused,"s--disabled":this.disabled}}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)},updateValueFromPicker:function(e){this.value!==e&&(this.value=e)},updateValue:function(e){this.value!==e&&(this.value=e,this.saveIntoStore())},onBlur:function(e){var t=e.target.value;this.updateValue(t),this.focused=!1},onFocus:function(){this.focused=!0},onInput:function(){}}},Y=G,X=(i("60d1"),Object(l["a"])(Y,R,N,!1,null,"2b36e193",null)),J=X.exports,Q=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,"label-for":e.uniqId,required:e.required},on:{localize:e.updateLocale}},[i("div",{staticClass:"input__field",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[e.hasPrefix?i("span",{staticClass:"input__prefix"},[e._v(e._s(e.prefix))]):e._e(),"textarea"===e.type?i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"clone",staticClass:"input__clone",attrs:{rows:e.rows,disabled:"true"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}):e._e(),"textarea"===e.type?i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"input",attrs:{name:e.name,id:e.uniqId,placeholder:e.placeholder,disabled:e.disabled,required:e.required,readonly:e.readonly,rows:e.rows,autofocus:e.autofocus},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:[function(t){t.target.composing||(e.value=t.target.value)},e.onInput]}}):e._e(),"number"==e.type?i("input",{ref:"input",attrs:{type:"number",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"text"==e.type?i("input",{ref:"input",attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"email"==e.type?i("input",{ref:"input",attrs:{type:"email",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,pattern:"[^@\\s]+@[^@\\s]+\\.[^@\\s]+"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"password"==e.type?i("input",{ref:"input",attrs:{type:"password",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"url"===e.type?i("input",{ref:"input",attrs:{type:"url",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),e.hasMaxlength?i("span",{staticClass:"input__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()])])},Z=[],ee=i("b047"),te=i.n(ee),ie={name:"A17Textfield",mixins:[y["a"],_["a"],O["a"],T["a"],w["a"]],props:{name:{type:String,required:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},initialValue:{default:""},rows:{type:Number,default:5}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},textfieldClasses:function(){return{"input__field--textarea":"textarea"===this.type,"input__field--small":"small"===this.size&&"textarea"===!this.type,"s--focus":this.focused,"s--disabled":this.disabled}},hasMaxlength:function(){return this.maxlength>0},hasPrefix:function(){return""!==this.prefix},displayedMaxlength:function(){return!!this.hasMaxlength&&this.maxlength},limitClasses:function(){return{"input__limit--red":this.counter<.1*this.maxlength}}},data:function(){return{value:this.initialValue,lastSavedValue:this.initialValue,focused:!1,counter:0}},watch:{initialValue:function(){this.updateValue(this.initialValue)}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&this.updateValue(e)},updateValue:function(e){this.value=e,this.updateCounter(e)},updateAndSaveValue:function(e){this.updateValue(e),this.lastSavedValue=this.value,this.saveIntoStore()},updateCounter:function(e){this.maxlength>0&&(this.counter=this.maxlength-(e?e.toString().length:0))},onFocus:function(e){this.focused=!0,this.resizeTextarea(),this.$emit("focus")},onBlur:function(e){var t=e.target.value;this.updateAndSaveValue(t),this.focused=!1,this.$emit("blur",t)},onInput:function(e){this.preventSubmit(),this._onInputInternal(e)},_onInputInternal:te()((function(e){var t=e.target.value;this.updateAndSaveValue(t),this.$emit("change",t),this.allowSubmit()}),250),resizeTextarea:function(){if("textarea"===this.type){var e=this.$refs.clone,t=15;if(e){var i=e.scrollHeight;this.$refs.input.style.minHeight="".concat(i+t,"px")}}}},mounted:function(){this.updateCounter(this.value),"textarea"===this.type&&(this.resizeTextarea(),this.$watch("value",this.resizeTextarea),this.$nextTick((function(){window.addEventListener("resize",this.resizeTextarea)})))},beforeDestroy:function(){"textarea"===this.type&&window.removeEventListener("resize",this.resizeTextarea)}},ne=ie,ae=(i("7f29"),Object(l["a"])(ne,Q,Z,!1,null,"71218911",null)),re=ae.exports,se=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"form__input form__input--hidden"},[i("input",{attrs:{type:"hidden",name:e.name,id:e.uniqId},domProps:{value:e.value}})])},oe=[],le={name:"A17HiddenField",mixins:[y["a"],_["a"],w["a"]],props:{name:{type:String,required:!0},initialValue:{default:""}},computed:{uniqId:function(){return this.name+"-"+this.randKey}},data:function(){return{value:this.initialValue}},watch:{initialValue:function(){this.value=this.initialValue}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)}}},ce=le,ue=Object(l["a"])(ce,se,oe,!1,null,null,null),de=ue.exports,fe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,required:e.required},on:{localize:e.updateLocale}},[i("div",{staticClass:"wysiwyg__outer",class:e.textfieldClasses},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{name:e.name,type:"hidden"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),e.editSource?[i("div",{directives:[{name:"show",rawName:"v-show",value:!e.activeSource,expression:"!activeSource"}],staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[i("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[i("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?i("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.activeSource,expression:"activeSource"}],staticClass:"form__field form__field--textarea",attrs:{dir:e.dirLocale}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],style:e.textareaHeight,attrs:{placeholder:e.placeholder,autofocus:e.autofocus},domProps:{value:e.value},on:{change:e.updateSourcecode,input:function(t){t.target.composing||(e.value=t.target.value)}}})]),i("a17-button",{staticClass:"wysiwyg__button",attrs:{variant:"ghost"},on:{click:e.toggleSourcecode}},[e._v("Source code")])]:[i("div",{staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[i("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[i("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?i("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()])]],2)])},he=[],pe=i("2f62"),me=(i("8096"),i("14e1"),i("a753"),i("9339")),be=i.n(me);function ge(e){return ge="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function ve(e,t,i){return ve="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=ye(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(i):a.value}},ve(e,t,i||e)}function ye(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=Pe(e),null===e)break;return e}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){for(var i=0;i