f7cloud_client/apps/photos/js/NcActionButton-CuVNJJtW-78GF8FR5.chunk.mjs.map
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

1 line
14 KiB
Plaintext

{"version":3,"file":"NcActionButton-CuVNJJtW-78GF8FR5.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/actionGlobal-DqVa7c7G.mjs","../node_modules/@nextcloud/vue/dist/chunks/actionText-fFcUPi2g.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcActionButton-CuVNJJtW.mjs"],"sourcesContent":["const ActionGlobalMixin = {\n beforeUpdate() {\n this.text = this.getText();\n },\n data() {\n return {\n // $slots are not reactive.\n // We need to update the content manually\n text: this.getText()\n };\n },\n computed: {\n isLongText() {\n return this.text && this.text.trim().length > 20;\n }\n },\n methods: {\n getText() {\n return this.$slots.default ? this.$slots.default[0].text.trim() : \"\";\n }\n }\n};\nexport {\n ActionGlobalMixin as A\n};\n//# sourceMappingURL=actionGlobal-DqVa7c7G.mjs.map\n","import { A as ActionGlobalMixin } from \"./actionGlobal-DqVa7c7G.mjs\";\nconst GetParent = function(context, name) {\n let parent = context.$parent;\n while (parent) {\n if (parent.$options.name === name) {\n return parent;\n }\n parent = parent.$parent;\n }\n};\nconst ActionTextMixin = {\n mixins: [ActionGlobalMixin],\n props: {\n /**\n * Icon to show with the action, can be either a CSS class or an URL\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * The main text content of the entry.\n */\n name: {\n type: String,\n default: \"\"\n },\n /**\n * The title attribute of the element.\n */\n title: {\n type: String,\n default: \"\"\n },\n /**\n * Whether we close the Actions menu after the click\n */\n closeAfterClick: {\n type: Boolean,\n default: false\n },\n /**\n * Aria label for the button. Not needed if the button has text.\n */\n ariaLabel: {\n type: String,\n default: null\n },\n /**\n * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n * otherwise root element will inherit incorrect aria-hidden.\n */\n ariaHidden: {\n type: Boolean,\n default: null\n }\n },\n emits: [\n \"click\"\n ],\n computed: {\n /**\n * Check if icon prop is an URL\n * @return {boolean} Whether the icon prop is an URL\n */\n isIconUrl() {\n try {\n return !!new URL(this.icon, this.icon.startsWith(\"/\") ? window.location.origin : void 0);\n } catch (error) {\n return false;\n }\n }\n },\n methods: {\n onClick(event) {\n this.$emit(\"click\", event);\n if (this.closeAfterClick) {\n const parent = GetParent(this, \"NcActions\");\n if (parent && parent.closeMenu) {\n parent.closeMenu(false);\n }\n }\n }\n }\n};\nexport {\n ActionTextMixin as A\n};\n//# sourceMappingURL=actionText-fFcUPi2g.mjs.map\n","import '../assets/NcActionButton-CuV1ITDb.css';\nimport { m as mdiChevronRight, a as mdiCheck } from \"./mdi-VRLMiqbd.mjs\";\nimport { A as ActionTextMixin } from \"./actionText-fFcUPi2g.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-Cb-cPj1R.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = {\n name: \"NcActionButton\",\n components: {\n NcIconSvgWrapper\n },\n mixins: [ActionTextMixin],\n inject: {\n isInSemanticMenu: {\n from: \"NcActions:isSemanticMenu\",\n default: false\n }\n },\n props: {\n /**\n * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n * otherwise root element will inherit incorrect aria-hidden.\n */\n ariaHidden: {\n type: Boolean,\n default: null\n },\n /**\n * disabled state of the action button\n */\n disabled: {\n type: Boolean,\n default: false\n },\n /**\n * If this is a menu, a chevron icon will\n * be added at the end of the line\n */\n isMenu: {\n type: Boolean,\n default: false\n },\n /**\n * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n * This extends the native HTML button type attribute.\n */\n type: {\n type: String,\n default: \"button\",\n validator: (behavior) => [\"button\", \"checkbox\", \"radio\", \"reset\", \"submit\"].includes(behavior)\n },\n /**\n * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n * For checkbox and toggle button behavior - boolean value.\n * For radio button behavior - could be a boolean checked or a string with the value of the button.\n * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n *\n * **This is not availabe for `type='submit'` or `type='reset'`**\n *\n * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n * For `type='radio'` `null` is equal to `false`\n */\n modelValue: {\n type: [Boolean, String],\n default: null\n },\n /**\n * The value used for the `modelValue` when this component is used with radio behavior\n * Similar to the `value` attribute of `<input type=\"radio\">`\n */\n value: {\n type: String,\n default: null\n },\n /**\n * Small underlying text content of the entry\n */\n description: {\n type: String,\n default: \"\"\n }\n },\n setup() {\n return {\n mdiCheck,\n mdiChevronRight\n };\n },\n computed: {\n /**\n * determines if the action is focusable\n *\n * @return {boolean} is the action focusable ?\n */\n isFocusable() {\n return !this.disabled;\n },\n /**\n * The current \"checked\" or \"pressed\" state for the model behavior\n */\n isChecked() {\n if (this.type === \"radio\" && typeof this.modelValue !== \"boolean\") {\n return this.modelValue === this.value;\n }\n return this.modelValue;\n },\n /**\n * The native HTML type to set on the button\n */\n nativeType() {\n if (this.type === \"submit\" || this.type === \"reset\") {\n return this.type;\n }\n return \"button\";\n },\n /**\n * HTML attributes to bind to the <button>\n */\n buttonAttributes() {\n const attributes = {};\n if (this.isInSemanticMenu) {\n attributes.role = \"menuitem\";\n if (this.type === \"radio\") {\n attributes.role = \"menuitemradio\";\n attributes[\"aria-checked\"] = this.isChecked ? \"true\" : \"false\";\n } else if (this.type === \"checkbox\" || this.nativeType === \"button\" && this.modelValue !== null) {\n attributes.role = \"menuitemcheckbox\";\n attributes[\"aria-checked\"] = this.modelValue === null ? \"mixed\" : this.modelValue ? \"true\" : \"false\";\n }\n } else if (this.modelValue !== null && this.nativeType === \"button\") {\n attributes[\"aria-pressed\"] = this.modelValue ? \"true\" : \"false\";\n }\n return attributes;\n }\n },\n methods: {\n /**\n * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n * @param {MouseEvent} event The click event\n */\n handleClick(event) {\n this.onClick(event);\n if (this.modelValue !== null || this.type !== \"button\") {\n if (this.type === \"radio\") {\n if (typeof this.modelValue !== \"boolean\") {\n if (!this.isChecked) {\n this.$emit(\"update:modelValue\", this.value);\n }\n } else {\n this.$emit(\"update:modelValue\", !this.isChecked);\n }\n } else {\n this.$emit(\"update:modelValue\", !this.isChecked);\n }\n }\n }\n }\n};\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n return _c(\"li\", { staticClass: \"action\", class: { \"action--disabled\": _vm.disabled }, attrs: { \"role\": _vm.isInSemanticMenu && \"presentation\" } }, [_c(\"button\", _vm._b({ class: [\"action-button button-vue\", {\n \"action-button--active\": _vm.isChecked,\n focusable: _vm.isFocusable\n }], attrs: { \"aria-label\": _vm.ariaLabel, \"disabled\": _vm.disabled, \"title\": _vm.title, \"type\": _vm.nativeType }, on: { \"click\": _vm.handleClick } }, \"button\", _vm.buttonAttributes, false), [_vm._t(\"icon\", function() {\n return [_c(\"span\", { staticClass: \"action-button__icon\", class: [_vm.isIconUrl ? \"action-button__icon--url\" : _vm.icon], style: { backgroundImage: _vm.isIconUrl ? `url(${_vm.icon})` : null }, attrs: { \"aria-hidden\": \"true\" } })];\n }), _c(\"span\", { staticClass: \"action-button__longtext-wrapper\" }, [_vm.name ? _c(\"strong\", { staticClass: \"action-button__name\" }, [_vm._v(\" \" + _vm._s(_vm.name) + \" \")]) : _vm._e(), _vm.isLongText ? _c(\"span\", { staticClass: \"action-button__longtext\", domProps: { \"textContent\": _vm._s(_vm.text) } }) : _c(\"span\", { staticClass: \"action-button__text\" }, [_vm._v(\" \" + _vm._s(_vm.text) + \" \")]), _vm.description ? _c(\"span\", { staticClass: \"action-button__description\", domProps: { \"textContent\": _vm._s(_vm.description) } }) : _vm._e()]), _vm.isMenu ? _c(\"NcIconSvgWrapper\", { staticClass: \"action-button__menu-icon\", attrs: { \"directional\": \"\", \"path\": _vm.mdiChevronRight } }) : _vm.isChecked ? _c(\"NcIconSvgWrapper\", { staticClass: \"action-button__pressed-icon\", attrs: { \"path\": _vm.mdiCheck } }) : _vm.isChecked === false ? _c(\"span\", { staticClass: \"action-button__pressed-icon material-design-icon\" }) : _vm._e(), _vm._e()], 2)]);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"02eeec54\"\n);\nconst NcActionButton = __component__.exports;\nexport {\n NcActionButton as N\n};\n//# sourceMappingURL=NcActionButton-CuVNJJtW.mjs.map\n"],"names":["ActionGlobalMixin","GetParent","context","name","parent","ActionTextMixin","event","_sfc_main","NcIconSvgWrapper","behavior","mdiCheck","mdiChevronRight","attributes","_sfc_render","_vm","_c","_sfc_staticRenderFns","__component__","normalizeComponent","NcActionButton"],"mappings":"sEAAK,MAACA,EAAoB,CACxB,cAAe,CACb,KAAK,KAAO,KAAK,QAAS,CAC3B,EACD,MAAO,CACL,MAAO,CAGL,KAAM,KAAK,QAAO,CACnB,CACF,EACD,SAAU,CACR,YAAa,CACX,OAAO,KAAK,MAAQ,KAAK,KAAK,KAAI,EAAG,OAAS,EACpD,CACG,EACD,QAAS,CACP,SAAU,CACR,OAAO,KAAK,OAAO,QAAU,KAAK,OAAO,QAAQ,CAAC,EAAE,KAAK,KAAM,EAAG,EACxE,CACA,CACA,ECpBMC,EAAY,SAASC,EAASC,EAAM,CACxC,IAAIC,EAASF,EAAQ,QACrB,KAAOE,GAAQ,CACb,GAAIA,EAAO,SAAS,OAASD,EAC3B,OAAOC,EAETA,EAASA,EAAO,OACpB,CACA,EACMC,EAAkB,CACtB,OAAQ,CAACL,CAAi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