nextcloud/dist/files-sidebar.js

3 lines
906 KiB
JavaScript
Raw Normal View History

/*! For license information please see files-sidebar.js.LICENSE.txt */
!function(){var e,o,a,n={10250:function(e,t,o){var a=o(25108);!function(t,o){e.exports=o()}(self,(()=>(()=>{var e={7664:(e,t,o)=>{"use strict";o.d(t,{default:()=>G});var a=o(3089),n=o(2297),i=o(1205),r=o(932),s=o(2734),c=o.n(s),l=o(1441),u=o.n(l);function d(e){return d="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},d(e)}function m(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function p(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function h(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var a=o.call(e,"string");if("object"!==d(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function g(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,a=new Array(t);o<t;o++)a[o]=e[o];return a}var f=".focusable";const A={name:"NcActions",components:{NcButton:a.default,DotsHorizontal:u(),NcPopover:n.default},props:{open:{type:Boolean,default:!1},manualOpen:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},forceName:{type:Boolean,default:!1},menuName:{type:String,default:null},primary:{type:Boolean,default:!1},type:{type:String,validator:function(e){return-1!==["primary","secondary","tertiary","tertiary-no-background","tertiary-on-primary","error","warning","success"].indexOf(e)},default:null},defaultIcon:{type:String,default:""},ariaLabel:{type:String,default:(0,r.t)("Actions")},ariaHidden:{type:Boolean,default:null},placement:{type:String,default:"bottom"},boundariesElement:{type:Element,default:function(){return document.querySelector("body")}},container:{type:[String,Object,Element,Boolean],default:"body"},disabled:{type:Boolean,default:!1},inline:{type:Number,default:0}},emits:["open","update:open","close","focus","blur"],data:function(){return{opened:this.open,focusIndex:0,randomId:"menu-".concat((0,i.Z)())}},computed:{triggerBtnType:function(){return this.type||(this.primary?"primary":this.menuName?"secondary":"tertiary")}},watch:{open:function(e){e!==this.opened&&(this.opened=e)}},methods:{isValidSingleAction:function(e){var t,o,a,n=null!==(t=null==e||null===(o=e.componentOptions)||void 0===o||null===(o=o.Ctor)||void 0===o||null===(o=o.extendOptions)||void 0===o?void 0:o.name)&&void 0!==t?t:null==e||null===(a=e.componentOptions)||void 0===a?void 0:a.tag;return["NcActionButton","NcActionLink","NcActionRouter"].includes(n)},openMenu:function(e){this.opened||(this.opened=!0,this.$emit("update:open",!0),this.$emit("open"))},closeMenu:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.opened&&(this.opened=!1,this.$refs.popover.clearFocusTrap({returnFocus:e}),this.$emit("update:open",!1),this.$
//# sourceMappingURL=files-sidebar.js.map?v=e1df816998d0a5c3b831