f7cloud_client/apps/photos/js/NcDialog-CKgpZOiy-Yt0iPUKp.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":"NcDialog-CKgpZOiy-Yt0iPUKp.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcDialog-CKgpZOiy.mjs"],"sourcesContent":["import '../assets/NcDialog-BPI0CJvw.css';\nimport { useElementSize } from \"@vueuse/core\";\nimport { defineComponent, ref, computed } from \"vue\";\nimport NcModal from \"../Components/NcModal.mjs\";\nimport { N as NcDialogButton } from \"./NcDialogButton-CROAi1Ll.mjs\";\nimport { G as GenRandomId } from \"./GenRandomId-CMooMQt0.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = defineComponent({\n name: \"NcDialog\",\n components: {\n NcDialogButton,\n NcModal\n },\n props: {\n /** Name of the dialog (the heading) */\n name: {\n type: String,\n required: true\n },\n /** Text of the dialog */\n message: {\n type: String,\n default: \"\"\n },\n /** Additional elements to add to the focus trap */\n additionalTrapElements: {\n type: Array,\n validator: (arr) => {\n return Array.isArray(arr) && arr.every(\n (element) => typeof element === \"string\" || element instanceof HTMLElement\n );\n },\n default: () => []\n },\n /**\n * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n * @default 'body'\n */\n container: {\n type: String,\n required: false,\n default: \"body\"\n },\n /**\n * Whether the dialog should be shown\n * @default true\n */\n open: {\n type: Boolean,\n default: true\n },\n /**\n * Size of the underlying NcModal\n * @default 'small'\n * @type {'small'|'normal'|'large'|'full'}\n */\n size: {\n type: String,\n required: false,\n default: \"small\",\n validator: (value) => typeof value === \"string\" && [\"small\", \"normal\", \"large\", \"full\"].includes(value)\n },\n /**\n * Buttons to display\n * @default []\n */\n buttons: {\n type: Array,\n required: false,\n default: () => [],\n validator: (value) => Array.isArray(value) && value.every((element) => typeof element === \"object\")\n },\n /**\n * Do not show the close button for the dialog.\n * @default false\n */\n noClose: {\n type: Boolean,\n default: false\n },\n /**\n * Set to false to no show a close button on the dialog\n * @deprecated - Use `noClose` instead. Will be removed in v9.\n * @default true\n */\n canClose: {\n type: Boolean,\n default: true\n },\n /**\n * Close the dialog if the user clicked outside of the dialog\n * Only relevant if `canClose` is set to true.\n */\n closeOnClickOutside: {\n type: Boolean,\n default: false\n },\n /**\n * Make the dialog wrapper a HTML form element.\n * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n * Please note that when using the property the `navigation` should not be used.\n */\n isForm: {\n type: Boolean,\n default: false\n },\n /**\n * Declare if hiding the modal should be animated\n * @default false\n */\n outTransition: {\n type: Boolean,\n default: false\n },\n /**\n * Optionally pass additional classes which will be set on the navigation for custom styling\n * @default ''\n * @example\n * ```html\n * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n * <!-- ... -->\n * <style lang=\"scss\">\n * :deep(.mydialog-navigation) {\n * flex-direction: row-reverse;\n * }\n * </style>\n * ```\n */\n navigationClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n },\n /**\n * aria-label for the dialog navigation.\n * Use it when you want to provide a more meaningful label than the dialog name.\n *\n * By default, navigation is labeled by the dialog name.\n */\n navigationAriaLabel: {\n type: String,\n required: false,\n default: \"\"\n },\n /**\n * aria-labelledby for the dialog navigation.\n * Use it when you have an implicit navigation label (e.g. a heading).\n *\n * By default, navigation is labeled by the dialog name.\n */\n navigationAriaLabelledby: {\n type: String,\n required: false,\n default: \"\"\n },\n /**\n * Optionally pass additional classes which will be set on the content wrapper for custom styling\n * @default ''\n */\n contentClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n },\n /**\n * Optionally pass additional classes which will be set on the dialog itself\n * (the default `class` attribute will be set on the modal wrapper)\n * @default ''\n */\n dialogClasses: {\n type: [String, Array, Object],\n required: false,\n default: \"\"\n }\n },\n emits: [\"closing\", \"update:open\", \"submit\"],\n setup(props, { emit, slots }) {\n const wrapper = ref();\n const { width: dialogWidth } = useElementSize(wrapper, { width: 900 });\n const isNavigationCollapsed = computed(() => dialogWidth.value < 876);\n const hasNavigation = computed(() => slots?.navigation !== void 0);\n const navigationId = GenRandomId();\n const navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || void 0);\n const navigationAriaLabelledbyAttr = computed(() => {\n if (props.navigationAriaLabel) {\n return void 0;\n }\n return props.navigationAriaLabelledby || navigationId;\n });\n const dialogElement = ref();\n const dialogTagName = computed(() => props.isForm && !hasNavigation.value ? \"form\" : \"div\");\n const dialogListeners = computed(\n () => dialogTagName.value === \"form\" ? {\n /**\n * @param {SubmitEvent} event Form submit event\n */\n submit(event) {\n event.preventDefault();\n emit(\"submit\", event);\n },\n /**\n * @param {Event} event Form submit event\n */\n reset(event) {\n event.preventDefault();\n emit(\"reset\", event);\n }\n } : {}\n );\n const showModal = ref(true);\n function handleButtonClose(button, result) {\n if (button.nativeType === \"submit\" && dialogTagName.value === \"form\" && !dialogElement.value.reportValidity()) {\n return;\n }\n handleClosing(result);\n window.setTimeout(() => handleClosed(), 300);\n }\n const handleClosing = (result) => {\n showModal.value = false;\n emit(\"closing\", result);\n };\n const handleClosed = () => {\n showModal.value = true;\n emit(\"update:open\", false);\n };\n const modalProps = computed(() => ({\n noClose: props.noClose || !props.canClose,\n container: props.container === void 0 ? \"body\" : props.container,\n // we do not pass the name as we already have the name as the headline\n // name: props.name,\n // But we need to set the correct label id so the dialog is labelled\n labelId: navigationId,\n size: props.size,\n show: props.open && showModal.value,\n outTransition: props.outTransition,\n closeOnClickOutside: props.closeOnClickOutside,\n additionalTrapElements: props.additionalTrapElements\n }));\n return {\n dialogElement,\n dialogListeners,\n dialogTagName,\n handleButtonClose,\n handleClosing,\n handleClosed,\n hasNavigation,\n navigationId,\n navigationAriaLabelAttr,\n navigationAriaLabelledbyAttr,\n isNavigationCollapsed,\n modalProps,\n wrapper\n };\n }\n});\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n _vm._self._setupProxy;\n return _vm.open ? _c(\"NcModal\", _vm._b({ staticClass: \"dialog__modal\", attrs: { \"enable-slideshow\": false, \"enable-swipe\": false }, on: { \"close\": _vm.handleClosed, \"update:show\": function($event) {\n return _vm.handleClosing();\n } } }, \"NcModal\", _vm.modalProps, false), [_c(\"h2\", { staticClass: \"dialog__name\", attrs: { \"id\": _vm.navigationId }, domProps: { \"textContent\": _vm._s(_vm.name) } }), _c(_vm.dialogTagName, _vm._g({ ref: \"dialogElement\", tag: \"component\", staticClass: \"dialog\", class: _vm.dialogClasses }, _vm.dialogListeners), [_c(\"div\", { ref: \"wrapper\", class: [\"dialog__wrapper\", { \"dialog__wrapper--collapsed\": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c(\"nav\", { staticClass: \"dialog__navigation\", class: _vm.navigationClasses, attrs: { \"aria-label\": _vm.navigationAriaLabelAttr, \"aria-labelledby\": _vm.navigationAriaLabelledbyAttr } }, [_vm._t(\"navigation\", null, { \"isCollapsed\": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c(\"div\", { staticClass: \"dialog__content\", class: _vm.contentClasses }, [_vm._t(\"default\", function() {\n return [_c(\"p\", { staticClass: \"dialog__text\" }, [_vm._v(\" \" + _vm._s(_vm.message) + \" \")])];\n })], 2)]), _c(\"div\", { staticClass: \"dialog__actions\" }, [_vm._t(\"actions\", function() {\n return _vm._l(_vm.buttons, function(button, idx) {\n return _c(\"NcDialogButton\", _vm._b({ key: idx, on: { \"click\": (_, result) => _vm.handleButtonClose(button, result) } }, \"NcDialogButton\", button, false));\n });\n })], 2)])], 1) : _vm._e();\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n \"1aa5fbdd\"\n);\nconst NcDialog = __component__.exports;\nexport {\n NcDialog as N\n};\n//# sourceMappingURL=NcDialog-CKgpZOiy.mjs.map\n"],"names":["_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","dialogElement","dialogTagName","dialogListeners","event","showModal","handleButtonClose","button","result","handleClosing","handleClosed","modalProps","_sfc_render","_vm","_c","$event","idx","_","_sfc_staticRenderFns","__component__","normalizeComponent","NcDialog"],"mappings":"qJAOA,MAAMA,EAAYC,EAAgB,CAChC,KAAM,WACN,WAAY,CACV,eAAAC,EACA,QAAAC,CACD,EACD,MAAO,CAEL,KAAM,CACJ,KAAM,OACN,SAAU,EACX,EAED,QAAS,CACP,KAAM,OACN,QAAS,EACV,EAED,uBAAwB,CACtB,KAAM,MACN,UAAYC,GACH,MAAM,QAAQA,CAAG,GAAKA,EAAI,MAC9BC,GAAY,OAAOA,GAAY,UAAYA,aAAmB,WAChE,EAEH,QAAS,IAAM,CAAA,CAChB,EAKD,UAAW,CACT,KAAM,OACN,SAAU,GACV,QAAS,MACV,EAKD,KAAM,CACJ,KAAM,QACN,QAAS,EACV,EAMD,KAAM,CACJ,KAAM,OACN,SAAU,GACV,QAAS,QACT,UAAYC,GAAU,OAAOA,GAAU,UAAY,CAAC,QAAS,SAAU,QAAS,MAAM,EAAE,SAASA,CAAK,CACvG,EAKD,QAAS,CACP,KAAM,MACN,SAAU,GACV,QAAS,IAAM,CAAE,EACjB,UAAYA,GAAU,MAAM,QAAQA,CAAK,GAAKA,EAAM,MAAOD,GAAY,OAAOA,GAAY,QAAQ,CACnG,EAKD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAMD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAKD,oBAAqB,CACnB,KAAM,QACN,QAAS,EACV,EAMD,OAAQ,CACN,KAAM,QACN,QAAS,EACV,EAKD,cAAe,CACb,KAAM,QACN,QAAS,EACV,EAeD,kBAAmB,CACjB,KAAM,CAAC,OAAQ,M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