diff --git a/dist/nova-translatable.js b/dist/nova-translatable.js index bd837fd..79aa855 100644 --- a/dist/nova-translatable.js +++ b/dist/nova-translatable.js @@ -1 +1 @@ -(()=>{"use strict";var e={533:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".translatable-field .flex.border-t[data-v-60cefbbd]{border-style:none!important}",""]);const o=a},81:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".translatable-field:not(:last-child) .field-wrapper[data-v-4d4c0050]{border-style:solid!important}",""]);const o=a},656:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".nova-translatable-locale-tabs{padding-top:.25rem;position:relative;z-index:2}.nova-translatable-locale-tabs .locale-tag{border-bottom:2px solid transparent}.nova-translatable-locale-tabs .locale-tag.-active{border-color:rgba(var(--colors-primary-500));color:rgba(var(--colors-primary-500))}.nova-translatable-locale-tabs .locale-tag.-error{border-color:rgba(var(--colors-red-500));color:rgba(var(--colors-red-500))}.nova-translatable-locale-tabs .locale-tag.-error.-active{color:rgba(var(--colors-primary-500))}",""]);const o=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o{var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),l=[];function i(e){for(var t=-1,r=0;r{t.Z=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0,(()=>{const e=Vue;var t={key:0,class:"translatable-field pt-2",ref:"main"};const n=LaravelNova;function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,l=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:void 0,t=null!=e?e:void 0;return void 0!==t?"nova-translatable-".concat(t,"@setAllLocale"):"nova-translatable@setAllLocale"}}};var u=["dusk","onClick","onDblclick"];const d={props:["attribute","locales","activeLocale","displayType","detail","errors","errorAttributes","localesWithErrors"],computed:{listClasses:function(){return"column"===this.displayType?["flex","flex-col"]:[]}},methods:{hasError:function(e){if(Array.isArray(this.localesWithErrors)&&this.localesWithErrors.includes(e))return!0;if(!this.errors||!this.errorAttributes)return!1;var t=this.errorAttributes[e];return this.errors.has(t)},getDuskKey:function(e){return this.attribute?"".concat(this.attribute,".").concat(e,".locale.tab"):this.errorAttributes&&this.errorAttributes[e]?"".concat(this.errorAttributes[e],".locale.tab"):e+".locale.tab"}}};var f=r(379),v=r.n(f),p=r(656),b={insert:"head",singleton:!1};v()(p.Z,b);p.Z.locals;var h=r(744);const y=(0,h.Z)(d,[["render",function(t,r,n,a,o,l){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)(["nova-translatable-locale-tabs flex select-none",{"px-8":!this.detail}])},["none"!=n.displayType?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,class:(0,e.normalizeClass)(["ml-auto",l.listClasses])},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(n.locales,(function(r){return(0,e.openBlock)(),(0,e.createElementBlock)("a",{key:r.key,dusk:l.getDuskKey(r.key),class:(0,e.normalizeClass)(["locale-tag ml-3 cursor-pointer font-bold text-80 text-sm",{"-active":r.key===n.activeLocale,"-error":l.hasError(r.key)}]),onClick:function(){return t.$emit("tabClick",r.key)},onDblclick:function(){return t.$emit("doubleClick",r.key)}},(0,e.toDisplayString)(r.name),43,u)})),128))],2)):(0,e.createCommentVNode)("",!0)],2)),[[e.vShow,n.locales.length>1]])}]]);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw a}}return o}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=k(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){i=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(i)throw o}}}}function k(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";var e={533:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".translatable-field .flex.border-t[data-v-60cefbbd]{border-style:none!important}",""]);const o=a},616:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".translatable-field:not(:last-child) .field-wrapper[data-v-2bb70dfa]{border-style:solid!important}",""]);const o=a},656:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(645),a=r.n(n)()((function(e){return e[1]}));a.push([e.id,".nova-translatable-locale-tabs{padding-top:.25rem;position:relative;z-index:2}.nova-translatable-locale-tabs .locale-tag{border-bottom:2px solid transparent}.nova-translatable-locale-tabs .locale-tag.-active{border-color:rgba(var(--colors-primary-500));color:rgba(var(--colors-primary-500))}.nova-translatable-locale-tabs .locale-tag.-error{border-color:rgba(var(--colors-red-500));color:rgba(var(--colors-red-500))}.nova-translatable-locale-tabs .locale-tag.-error.-active{color:rgba(var(--colors-primary-500))}",""]);const o=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o{var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),l=[];function i(e){for(var t=-1,r=0;r{t.Z=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0,(()=>{const e=Vue;var t={key:0,class:"translatable-field pt-2",ref:"main"};const n=LaravelNova;function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,l=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:void 0,t=null!=e?e:void 0;return void 0!==t?"nova-translatable-".concat(t,"@setAllLocale"):"nova-translatable@setAllLocale"}}};var u=["dusk","onClick","onDblclick"];const d={props:["attribute","locales","activeLocale","displayType","detail","errors","errorAttributes","localesWithErrors"],computed:{listClasses:function(){return"column"===this.displayType?["flex","flex-col"]:[]}},methods:{hasError:function(e){if(Array.isArray(this.localesWithErrors)&&this.localesWithErrors.includes(e))return!0;if(!this.errors||!this.errorAttributes)return!1;var t=this.errorAttributes[e];return this.errors.has(t)},getDuskKey:function(e){return this.attribute?"".concat(this.attribute,".").concat(e,".locale.tab"):this.errorAttributes&&this.errorAttributes[e]?"".concat(this.errorAttributes[e],".locale.tab"):e+".locale.tab"}}};var f=r(379),v=r.n(f),p=r(656),b={insert:"head",singleton:!1};v()(p.Z,b);p.Z.locals;var h=r(744);const y=(0,h.Z)(d,[["render",function(t,r,n,a,o,l){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)(["nova-translatable-locale-tabs flex select-none",{"px-8":!this.detail}])},["none"!=n.displayType?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,class:(0,e.normalizeClass)(["ml-auto",l.listClasses])},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(n.locales,(function(r){return(0,e.openBlock)(),(0,e.createElementBlock)("a",{key:r.key,dusk:l.getDuskKey(r.key),class:(0,e.normalizeClass)(["locale-tag ml-3 cursor-pointer font-bold text-80 text-sm",{"-active":r.key===n.activeLocale,"-error":l.hasError(r.key)}]),onClick:function(){return t.$emit("tabClick",r.key)},onDblclick:function(){return t.$emit("doubleClick",r.key)}},(0,e.toDisplayString)(r.name),43,u)})),128))],2)):(0,e.createCommentVNode)("",!0)],2)),[[e.vShow,n.locales.length>1]])}]]);function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw a}}return o}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=k(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){i=!0,o=e},f:function(){try{l||null==r.return||r.return()}finally{if(i)throw o}}}}function k(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r