@dialpad/dialtone 9.177.1 → 9.178.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dialtone-default-theme.css +75 -0
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +75 -0
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/tokens-docs.json +1 -1
- package/dist/tokens/doc.json +116900 -116900
- package/dist/vue3/{attachment_carousel-DMKCJe7S.cjs → attachment_carousel-BHxR7A76.cjs} +1 -1
- package/dist/vue3/{attachment_carousel-DMKCJe7S.cjs.map → attachment_carousel-BHxR7A76.cjs.map} +1 -1
- package/dist/vue3/{attachment_carousel-gV6IHYgP.js → attachment_carousel-CouFqFMw.js} +1 -1
- package/dist/vue3/{attachment_carousel-gV6IHYgP.js.map → attachment_carousel-CouFqFMw.js.map} +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -0
- package/dist/vue3/components/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/components/resizable/composables/computeLayout.d.ts +35 -0
- package/dist/vue3/components/resizable/composables/computeLayout.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/constraintResolver.d.ts +22 -0
- package/dist/vue3/components/resizable/composables/constraintResolver.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/index.d.ts +16 -0
- package/dist/vue3/components/resizable/composables/index.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableAnnouncements.d.ts +6 -0
- package/dist/vue3/components/resizable/composables/useResizableAnnouncements.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableCalculations.d.ts +14 -0
- package/dist/vue3/components/resizable/composables/useResizableCalculations.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableDrag.d.ts +42 -0
- package/dist/vue3/components/resizable/composables/useResizableDrag.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableGroup.d.ts +25 -0
- package/dist/vue3/components/resizable/composables/useResizableGroup.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableKeyboard.d.ts +41 -0
- package/dist/vue3/components/resizable/composables/useResizableKeyboard.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableOffset.d.ts +15 -0
- package/dist/vue3/components/resizable/composables/useResizableOffset.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizablePanelControls.d.ts +46 -0
- package/dist/vue3/components/resizable/composables/useResizablePanelControls.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizablePanelState.d.ts +9 -0
- package/dist/vue3/components/resizable/composables/useResizablePanelState.d.ts.map +1 -0
- package/dist/vue3/components/resizable/composables/useResizableStorage.d.ts +12 -0
- package/dist/vue3/components/resizable/composables/useResizableStorage.d.ts.map +1 -0
- package/dist/vue3/components/resizable/index.d.ts +6 -0
- package/dist/vue3/components/resizable/index.d.ts.map +1 -0
- package/dist/vue3/components/resizable/resizable.vue.d.ts +69 -0
- package/dist/vue3/components/resizable/resizable.vue.d.ts.map +1 -0
- package/dist/vue3/components/resizable/resizable_constants.d.ts +103 -0
- package/dist/vue3/components/resizable/resizable_constants.d.ts.map +1 -0
- package/dist/vue3/components/resizable/resizable_handle.vue.d.ts +22 -0
- package/dist/vue3/components/resizable/resizable_handle.vue.d.ts.map +1 -0
- package/dist/vue3/components/resizable/resizable_panel.vue.d.ts +44 -0
- package/dist/vue3/components/resizable/resizable_panel.vue.d.ts.map +1 -0
- package/dist/vue3/components/resizable/resizable_utils.d.ts +15 -0
- package/dist/vue3/components/resizable/resizable_utils.d.ts.map +1 -0
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/components/scroller/scroller.vue.d.ts +6 -8
- package/dist/vue3/components/scroller/scroller.vue.d.ts.map +1 -1
- package/dist/vue3/components/split_button/split_button.vue.d.ts +4 -4
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +56 -51
- package/dist/vue3/index.d.ts +1 -0
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +1 -1
- package/dist/vue3/lib/attachment-carousel/index.cjs +1 -1
- package/dist/vue3/lib/attachment-carousel/index.js +1 -1
- package/dist/vue3/lib/editor/editor.cjs +1 -1
- package/dist/vue3/lib/editor/editor.js +1 -1
- package/dist/vue3/lib/message-input/index.cjs +1 -1
- package/dist/vue3/lib/message-input/index.js +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.js +1 -1
- package/dist/vue3/lib/resizable/index.cjs +1 -0
- package/dist/vue3/lib/resizable/index.js +5 -0
- package/dist/vue3/lib/resizable/resizable-handle.cjs +1 -0
- package/dist/vue3/lib/resizable/resizable-handle.js +2 -0
- package/dist/vue3/lib/resizable/resizable-panel.cjs +2 -0
- package/dist/vue3/lib/resizable/resizable-panel.cjs.map +1 -0
- package/dist/vue3/lib/resizable/resizable-panel.js +132 -0
- package/dist/vue3/lib/resizable/resizable-panel.js.map +1 -0
- package/dist/vue3/lib/resizable/resizable.cjs +1 -0
- package/dist/vue3/lib/resizable/resizable.js +2 -0
- package/dist/vue3/lib/rich-text-editor/index.cjs +1 -1
- package/dist/vue3/lib/rich-text-editor/index.js +1 -1
- package/dist/vue3/lib/rich-text-editor/markdownRenderer.cjs +1 -7
- package/dist/vue3/lib/rich-text-editor/markdownRenderer.js +2 -62
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/vue3/lib/scroller/index.cjs +1 -1
- package/dist/vue3/lib/scroller/index.js +1 -1
- package/dist/vue3/lib/scroller/scroller.cjs +1 -1
- package/dist/vue3/lib/scroller/scroller.js +1 -1
- package/dist/vue3/lib/toast/index.cjs +1 -1
- package/dist/vue3/lib/toast/index.js +1 -1
- package/dist/vue3/lib/toast/toast.cjs +1 -1
- package/dist/vue3/lib/toast/toast.js +1 -1
- package/dist/vue3/markdownRenderer-DCgGQseq.cjs +31 -0
- package/dist/vue3/markdownRenderer-DCgGQseq.cjs.map +1 -0
- package/dist/vue3/markdownRenderer-D_P94RyM.js +322 -0
- package/dist/vue3/markdownRenderer-D_P94RyM.js.map +1 -0
- package/dist/vue3/{message_input-VmltTreF.cjs → message_input-AWgvtwMV.cjs} +2 -2
- package/dist/vue3/{message_input-VmltTreF.cjs.map → message_input-AWgvtwMV.cjs.map} +1 -1
- package/dist/vue3/{message_input-tVB6JYJm.js → message_input-CHlTsBGK.js} +2 -2
- package/dist/vue3/{message_input-tVB6JYJm.js.map → message_input-CHlTsBGK.js.map} +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.js +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.d.ts +2 -0
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.d.ts +2 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/resizable-D4-peBOl.js +960 -0
- package/dist/vue3/resizable-D4-peBOl.js.map +1 -0
- package/dist/vue3/resizable-aOVGO_Os.cjs +2 -0
- package/dist/vue3/resizable-aOVGO_Os.cjs.map +1 -0
- package/dist/vue3/resizable_handle-BlKBiWnx.js +307 -0
- package/dist/vue3/resizable_handle-BlKBiWnx.js.map +1 -0
- package/dist/vue3/resizable_handle-RIKS8frB.cjs +2 -0
- package/dist/vue3/resizable_handle-RIKS8frB.cjs.map +1 -0
- package/dist/vue3/resizable_utils-BComtrMV.js +131 -0
- package/dist/vue3/resizable_utils-BComtrMV.js.map +1 -0
- package/dist/vue3/resizable_utils-DhuzXRdP.cjs +2 -0
- package/dist/vue3/resizable_utils-DhuzXRdP.cjs.map +1 -0
- package/dist/vue3/{rich_text_editor-CtCGNkSD.js → rich_text_editor-Ba67C4Uk.js} +421 -454
- package/dist/vue3/rich_text_editor-Ba67C4Uk.js.map +1 -0
- package/dist/vue3/rich_text_editor-DMP5eTlf.cjs +10 -0
- package/dist/vue3/rich_text_editor-DMP5eTlf.cjs.map +1 -0
- package/dist/vue3/{scroller-Ckquh-PU.js → scroller-BGVDh3sq.js} +1 -1
- package/dist/vue3/{scroller-Ckquh-PU.js.map → scroller-BGVDh3sq.js.map} +1 -1
- package/dist/vue3/{scroller-06ayn-64.cjs → scroller-CjAsgjl9.cjs} +1 -1
- package/dist/vue3/{scroller-06ayn-64.cjs.map → scroller-CjAsgjl9.cjs.map} +1 -1
- package/dist/vue3/{toast-B1zeUPtg.js → toast-DvPN-bCi.js} +1 -1
- package/dist/vue3/{toast-B1zeUPtg.js.map → toast-DvPN-bCi.js.map} +1 -1
- package/dist/vue3/{toast-0QfP90_3.cjs → toast-d8_zmgkL.cjs} +1 -1
- package/dist/vue3/{toast-0QfP90_3.cjs.map → toast-d8_zmgkL.cjs.map} +1 -1
- package/dist/vue3/useResizableCalculations-BDITle3Q.cjs +2 -0
- package/dist/vue3/useResizableCalculations-BDITle3Q.cjs.map +1 -0
- package/dist/vue3/useResizableCalculations-DAajatT4.js +80 -0
- package/dist/vue3/useResizableCalculations-DAajatT4.js.map +1 -0
- package/package.json +1 -1
- package/dist/vue3/lib/rich-text-editor/markdownRenderer.cjs.map +0 -1
- package/dist/vue3/lib/rich-text-editor/markdownRenderer.js.map +0 -1
- package/dist/vue3/rich_text_editor-CEwKDuzw.cjs +0 -10
- package/dist/vue3/rich_text_editor-CEwKDuzw.cjs.map +0 -1
- package/dist/vue3/rich_text_editor-CtCGNkSD.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-B1zeUPtg.js","names":[],"sources":["../components/toast/layouts/toast_layout_default.vue","../components/toast/layouts/toast_layout_alternate_icon.vue","../components/toast/layouts/toast_layout_alternate.vue","../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue3';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAyDA,IAAK,IAAU;CACb,MAAM;CAEN,YAAY;EACV,cAAA;EACA,iBAAA;EACA,gBAAA;EACD;CAED,cAAc;CAEd,OAAO;EACL,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAMD,SAAS;GACP,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAMD,WAAW;GACT,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAKD,OAAO;GACL,MAAM;GACN,SAAS;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAY,SAAS,EAAK;GAEpC;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAa,SAAS,EAAK;GAErC;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EACF;CAED,OAAO,CAAC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AAM;;EAEnC;CACF;;aA7PC,EAiCY,EAhCL,EAAA,eAAc,EADrB,EAiCY;EA/BT,YAAU,EAAA;EACV,YAAU,EAAA;EACV,cAAY,EAAA;EACZ,OAAO,EAAA;EACP,SAAS,EAAA;EACT,MAAM,EAAA;EACN,MAAM,EAAA;EACN,WAAW,EAAA;EACX,cAAY,EAAA;EACZ,aAAW,EAAA;EACX,eAAa,EAAA;IACN,EAAA,QAAM,EACb,SAAO,EAAA,aAAW,CAAA,EAAA;EAGR,MAAI,QACO,CAApB,EAAoB,EAAA,QAAA,OAAA,CAAA,CAAA;EAEX,eAAa,QAGO,CAA7B,EAA6B,EAAA,QAAA,gBAAA,CAAA,CAAA;EAOpB,QAAM,QACO,CAAtB,EAAsB,EAAA,QAAA,SAAA,CAAA,CAAA;mBAHjB,CAFP,EAEO,EAAA,QAAA,WAAA,EAAA,QAAA,CAAA,EAAA,EADF,EAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"toast-DvPN-bCi.js","names":[],"sources":["../components/toast/layouts/toast_layout_default.vue","../components/toast/layouts/toast_layout_alternate_icon.vue","../components/toast/layouts/toast_layout_alternate.vue","../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue3';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAyDA,IAAK,IAAU;CACb,MAAM;CAEN,YAAY;EACV,cAAA;EACA,iBAAA;EACA,g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1,2 +1,2 @@
|
|
|
1
1
|
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`./lib/icon/icon-constants.cjs`),r=require(`./lib/notice/notice-constants.cjs`),i=require(`./lib/notice/notice-icon.cjs`),a=require(`./lib/notice/notice-content.cjs`),o=require(`./lib/notice/notice-action.cjs`),s=require(`./lib/toast/toast-constants.cjs`);let c=require(`vue`),l=require(`@dialpad/dialtone-icons/vue3`);var u={name:`ToastLayoutDefault`,components:{DtNoticeIcon:i.default,DtNoticeContent:a.default,DtNoticeAction:o.default},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return e.default.getUniqueString()}},contentId:{type:String,default(){return e.default.getUniqueString()}},title:{type:String,default:``},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>s.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>r.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},emits:[`close`],computed:{kindClass(){return{error:`d-toast--error`,info:`d-toast--info`,success:`d-toast--success`,warning:`d-toast--warning`,base:`d-toast--base`}[this.kind]},toastListeners(){return e.extractVueListeners(this.$attrs)}}},d=[`aria-hidden`],f={class:`d-toast__dialog`};function p(e,t,n,r,i,a){let o=(0,c.resolveComponent)(`dt-notice-icon`),s=(0,c.resolveComponent)(`dt-notice-content`),l=(0,c.resolveComponent)(`dt-notice-action`);return n.isShown?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`d-toast`,a.kindClass,e.$attrs.class,{"d-toast--important":n.important}]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,c.createElementVNode)(`div`,f,[n.hideIcon?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createBlock)(o,(0,c.mergeProps)({key:0,kind:n.kind},a.toastListeners),{default:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`])),(0,c.createVNode)(s,(0,c.mergeProps)({"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},a.toastListeners),{titleOverride:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`titleOverride`)]),default:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`default`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)(n.message),1)])]),_:3},16,[`title-id`,`content-id`,`title`,`role`]),(0,c.createVNode)(l,(0,c.mergeProps)({"hide-action":n.hideAction,"hide-close":n.hideClose},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),{default:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`action`)]),_:3},16,[`hide-action`,`hide-close`])])],10,d)):(0,c.createCommentVNode)(``,!0)}var m=t.t(u,[[`render`,p]]),h=new Map([[`info`,l.DtIconInfo],[`success`,l.DtIconInfo],[`warning`,l.DtIconAlertTriangle],[`error`,l.DtIconInfo],[`base`,l.DtIconBell],[`gradient`,l.DtIconSparkle]]),g={compatConfig:{MODE:3},name:`DtToastLayoutAlternateIcon`,components:{DtIconInfo:l.DtIconInfo,DtIconAlertTriangle:l.DtIconAlertTriangle,DtIconBell:l.DtIconBell,DtIconSparkle:l.DtIconSparkle},props:{kind:{type:String,default:`base`,validate(e){return s.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:String,default:`400`,validator:e=>Object.keys(n.ICON_SIZE_MODIFIERS).includes(e)}},computed:{defaultIcon(){return h.get(this.kind)}}},_={"aria-hidden":`true`,class:`d-toast-layout-alternate__icon`};function v(e,t,n,r,i,a){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,_,[(0,c.renderSlot)(e.$slots,`default`,{},()=>[a.defaultIcon?((0,c.openBlock)(),(0,c.createBlock)((0,c.resolveDynamicComponent)(a.defaultIcon),{key:0,size:n.size},null,8,[`size`])):(0,c.createCommentVNode)(``,!0)])])}var y=t.t(g,[[`render`,v]]),b={name:`ToastLayoutAlternate`,components:{DtNoticeAction:o.default,DtNoticeContent:a.default,DtToastLayoutAlternateIcon:y},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return e.default.getUniqueString()}},contentId:{type:String,default(){return e.default.getUniqueString()}},title:{type:String,default:``},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>s.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>s.TOAST_ALTERNATE_KINDS.includes(e)},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1}},computed:{kindClass(){return{error:`d-toast-alternate--error`,info:`d-toast-alternate--info`,success:`d-toast-alternate--success`,warning:`d-toast-alternate--warning`,gradient:`d-toast-alternate--gradient`}[this.kind]},toastListeners(){return e.extractVueListeners(this.$attrs)}}},x=[`aria-hidden`],S={class:`d-toast-alternate__dialog`},C={class:`d-toast-alternate__header`},w={class:`d-toast-alternate__content`};function T(e,t,n,r,i,a){let o=(0,c.resolveComponent)(`dt-toast-layout-alternate-icon`),s=(0,c.resolveComponent)(`dt-notice-content`),l=(0,c.resolveComponent)(`dt-notice-action`);return n.isShown?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`d-toast-alternate`,e.$attrs.class,a.kindClass]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,c.createElementVNode)(`div`,S,[(0,c.createElementVNode)(`div`,C,[n.hideIcon?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createBlock)(o,(0,c.mergeProps)({key:0,kind:n.kind,size:`200`},a.toastListeners),{default:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`])),(0,c.createVNode)(s,(0,c.mergeProps)({"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},a.toastListeners),{titleOverride:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`titleOverride`)]),_:3},16,[`title-id`,`content-id`,`title`,`role`]),(0,c.createVNode)(l,(0,c.mergeProps)({"hide-action":!0,"hide-close":n.hideClose,"button-size":`xs`},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),null,16,[`hide-close`])]),(0,c.createElementVNode)(`div`,w,[(0,c.renderSlot)(e.$slots,`default`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)(n.message),1)])])])],10,x)):(0,c.createCommentVNode)(``,!0)}var E=t.t(b,[[`render`,T]]),D={compatConfig:{MODE:3},name:`DtToast`,components:{ToastLayoutDefault:m,ToastLayoutAlternate:E},inheritAttrs:!1,props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:`status`},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},hideClose:{type:Boolean,default:void 0},hideIcon:{type:Boolean,default:void 0},hideAction:{type:Boolean,default:void 0},duration:{type:Number,default:null,validator:e=>e>=s.TOAST_MIN_DURATION},layout:{type:String,default:`default`,validator:e=>s.TOAST_LAYOUTS.includes(e)}},emits:[`close`,`update:show`],data(){return{isShown:!1,minDuration:s.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout===`alternate`?E:m}},watch:{show:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},unmounted(){clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit(`update:show`,!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit(`close`),this.$emit(`update:show`,!1)}}};function O(e,t,n,r,i,a){return(0,c.openBlock)(),(0,c.createBlock)((0,c.resolveDynamicComponent)(a.selectedLayout),(0,c.mergeProps)({"is-shown":i.isShown,"title-id":n.titleId,"content-id":n.contentId,title:n.title,message:n.message,role:n.role,kind:n.kind,important:n.important,"hide-close":n.hideClose,"hide-icon":n.hideIcon,"hide-action":n.hideAction},e.$attrs,{onClose:a.handleClose}),{icon:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`icon`)]),titleOverride:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`titleOverride`)]),action:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`action`)]),default:(0,c.withCtx)(()=>[(0,c.renderSlot)(e.$slots,`default`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)(n.message),1)])]),_:3},16,[`is-shown`,`title-id`,`content-id`,`title`,`message`,`role`,`kind`,`important`,`hide-close`,`hide-icon`,`hide-action`,`onClose`])}var k=t.t(D,[[`render`,O]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
|
|
2
|
-
//# sourceMappingURL=toast-
|
|
2
|
+
//# sourceMappingURL=toast-d8_zmgkL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-0QfP90_3.cjs","names":[],"sources":["../components/toast/layouts/toast_layout_default.vue","../components/toast/layouts/toast_layout_alternate_icon.vue","../components/toast/layouts/toast_layout_alternate.vue","../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue3';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"mappings":"2cAyDA,IAAK,EAAU,CACb,KAAM,qBAEN,WAAY,CACV,aAAA,EAA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AY,EAAA,UACZ,MAAO,EAAA,MACP,QAAS,EAAA,QACT,KAAM,EAAA,KACN,KAAM,EAAA,KACN,UAAW,EAAA,UACX,aAAY,EAAA,UACZ,YAAW,EAAA,SACX,cAAa,EAAA,YACN,EAAA,OAAM,CACb,QAAO,EAAA,YAAW,CAAA,CAAA,CAGR,MAAA,EAAA,EAAA,aACW,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,OAAA,CAAA,CAAA,CAEX,eAAA,EAAA,EAAA,aAGoB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,gBAAA,CAAA,CAAA,CAOpB,QAAA,EAAA,EAAA,aACa,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,2BAHjB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,EAAA,KAAA,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBADF,EAAA,QAAO,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"toast-d8_zmgkL.cjs","names":[],"sources":["../components/toast/layouts/toast_layout_default.vue","../components/toast/layouts/toast_layout_alternate_icon.vue","../components/toast/layouts/toast_layout_alternate.vue","../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport { TOAST_ROLES } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue3';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"mappings":"2cAyDA,IAAK,EAAU,CACb,KAAM,qBAEN,WAAY,CACV,aAAA,EAAA,QACA,gBAAA,EAAA,QACA,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A,MACP,QAAS,EAAA,QACT,KAAM,EAAA,KACN,KAAM,EAAA,KACN,UAAW,EAAA,UACX,aAAY,EAAA,UACZ,YAAW,EAAA,SACX,cAAa,EAAA,YACN,EAAA,OAAM,CACb,QAAO,EAAA,YAAW,CAAA,CAAA,CAGR,MAAA,EAAA,EAAA,aACW,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,OAAA,CAAA,CAAA,CAEX,eAAA,EAAA,EAAA,aAGoB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,gBAAA,CAAA,CAAA,CAOpB,QAAA,EAAA,EAAA,aACa,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,2BAHjB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,EAAA,KAAA,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBADF,EAAA,QAAO,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./resizable_utils-DhuzXRdP.cjs`);function t(e,t,n){let r=e;return t!==void 0&&(r=Math.max(r,t)),n!==void 0&&(r=Math.min(r,n)),r}function n(e,n,r=`system`){return t(e,r===`user`?n.userMinSizePixels:n.systemMinSizePixels??n.userMinSizePixels,r===`user`?n.userMaxSizePixels:n.systemMaxSizePixels??n.userMaxSizePixels)}function r(t,n){return{userMinSizePixels:t.userMinSize?e.o(t.userMinSize,n):void 0,userMaxSizePixels:t.userMaxSize?e.o(t.userMaxSize,n):void 0}}function i(e,t){return e===void 0||t===void 0?e:Math.max(e,t)}function a(e,t){return e===void 0||t===void 0?e:Math.min(e,t)}function o(t,n,r,o){let s=t.systemMinSize?e.o(t.systemMinSize,n):r,c=t.systemMaxSize?e.o(t.systemMaxSize,n):o;return{systemMinSizePixels:i(s,r),systemMaxSizePixels:a(c,o)}}function s(t,n){let{userMinSizePixels:i,userMaxSizePixels:a}=r(t,n),{systemMinSizePixels:s,systemMaxSizePixels:c}=o(t,n,i,a);return{userMinSizePixels:i,userMaxSizePixels:a,systemMinSizePixels:s,systemMaxSizePixels:c,collapseSizePixels:t.collapseSize?e.o(t.collapseSize,n,{clampToContainer:!1}):void 0}}function c(e){function n(e,t,n){return t.resizable===!1||n.resizable===!1?{constrainedCursorPosition:e,beforePanelSize:t.pixelSize||0,afterPanelSize:n.pixelSize||0,isValidResize:!1}:null}function r(e,n){return t(e,n.userMinSizePixels,n.userMaxSizePixels)}function i(e,t,n){let r=e.userMinSizePixels;if(r===void 0||!n)return t;let i=n.findIndex(t=>t.id===e.id),a=n.slice(i+1).reduce((e,t)=>e+(t.pixelSize||0),0);return t-r-a}function a(e,t,n,r){if(!r)return t-e;let i=r.findIndex(e=>e.id===n.id),a=r.slice(i+1).reduce((e,t)=>e+(t.pixelSize||0),0);return t-e-a}function o(e,t,o,s,c,l,u){let d=n(e,t,o);if(d)return d;let f=u||0,p=e-f,m=s-e,h=r(p,t),g=r(m,o),_=i(o,s,l),v=f+h,y=Math.min(v,_),b;return y<v?(b=y,h=b-f,g=a(b,s,o,l)):(b=v,g=a(b,s,o,l)),{constrainedCursorPosition:b,beforePanelSize:h,afterPanelSize:g,isValidResize:h>=10&&g>=10}}return{processResizeMove:o}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
2
|
+
//# sourceMappingURL=useResizableCalculations-BDITle3Q.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizableCalculations-BDITle3Q.cjs","names":[],"sources":["../components/resizable/composables/constraintResolver.ts","../components/resizable/composables/useResizableCalculations.ts"],"sourcesContent":["/**\n * Constraint Resolver\n *\n * Pure functions for resolving the constraint hierarchy for resizable panels.\n * No DOM access, no Vue reactivity, no side effects.\n *\n * @see computeLayout.ts\n * @see ../resizable_constants.ts\n */\n\nimport type { ResizablePanelConfig } from '../resizable_constants';\nimport { parseSizeToPixels } from '../resizable_utils';\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\n/**\n * Result of constraint hierarchy calculation.\n * User limits are absolute boundaries; system limits are the operating range within user limits.\n */\nexport interface ConstraintHierarchy {\n // User drag limits (absolute boundaries)\n userMinSizePixels?: number;\n userMaxSizePixels?: number;\n // System scaling limits (operating range within user limits)\n systemMinSizePixels?: number;\n systemMaxSizePixels?: number;\n // Auto-collapse threshold (container width, not panel width)\n collapseSizePixels?: number;\n}\n\n// ============================================================================\n// CLAMPING PRIMITIVE\n// ============================================================================\n\n/**\n * Clamp a value to optional min/max bounds.\n * Single source of truth for all constraint clamping in the resizable system.\n */\nexport function clampSize(value: number, min?: number, max?: number): number {\n let result = value;\n if (min !== undefined) result = Math.max(result, min);\n if (max !== undefined) result = Math.min(result, max);\n return result;\n}\n\n/**\n * Resolve effective min/max for a given constraint tier, then clamp.\n * - 'user' tier: uses userMin/userMax only\n * - 'system' tier: uses systemMin/systemMax, falling back to userMin/userMax\n */\nexport function clampToTier(\n value: number,\n constraints: ConstraintHierarchy,\n tier: 'user' | 'system' = 'system'\n): number {\n const min = tier === 'user'\n ? constraints.userMinSizePixels\n : (constraints.systemMinSizePixels ?? constraints.userMinSizePixels);\n const max = tier === 'user'\n ? constraints.userMaxSizePixels\n : (constraints.systemMaxSizePixels ?? constraints.userMaxSizePixels);\n return clampSize(value, min, max);\n}\n\n// ============================================================================\n// INTERNAL HELPERS\n// ============================================================================\n\n/**\n * Resolve user constraints (drag limits) from panel config.\n */\nexport function resolveUserConstraints(\n panelConfig: ResizablePanelConfig,\n containerSize: number\n): { userMinSizePixels?: number; userMaxSizePixels?: number } {\n return {\n userMinSizePixels: panelConfig.userMinSize ? parseSizeToPixels(panelConfig.userMinSize, containerSize) : undefined,\n userMaxSizePixels: panelConfig.userMaxSize ? parseSizeToPixels(panelConfig.userMaxSize, containerSize) : undefined,\n };\n}\n\n/**\n * Clamp system min to be at least user min.\n * System constraints that exceed user boundaries are silently clamped\n * since this is expected behavior during constraint resolution.\n */\nexport function clampSystemMin(systemMin: number | undefined, userMin: number | undefined): number | undefined {\n if (systemMin === undefined || userMin === undefined) return systemMin;\n return Math.max(systemMin, userMin);\n}\n\n/**\n * Clamp system max to be at most user max.\n * System constraints that exceed user boundaries are silently clamped\n * since this is expected behavior during constraint resolution.\n */\nexport function clampSystemMax(systemMax: number | undefined, userMax: number | undefined): number | undefined {\n if (systemMax === undefined || userMax === undefined) return systemMax;\n return Math.min(systemMax, userMax);\n}\n\n/**\n * Resolve system constraints with fallback to user constraints.\n * System limits are silently clamped to stay within user limits.\n */\nexport function resolveSystemConstraints(\n panelConfig: ResizablePanelConfig,\n containerSize: number,\n userMinSizePixels?: number,\n userMaxSizePixels?: number\n): { systemMinSizePixels?: number; systemMaxSizePixels?: number } {\n // Calculate system limits from props, or fall back to user limits\n const rawSystemMin = panelConfig.systemMinSize\n ? parseSizeToPixels(panelConfig.systemMinSize, containerSize)\n : userMinSizePixels;\n const rawSystemMax = panelConfig.systemMaxSize\n ? parseSizeToPixels(panelConfig.systemMaxSize, containerSize)\n : userMaxSizePixels;\n\n // Validate and clamp system limits within user limits\n const systemMinSizePixels = clampSystemMin(rawSystemMin, userMinSizePixels);\n const systemMaxSizePixels = clampSystemMax(rawSystemMax, userMaxSizePixels);\n\n return { systemMinSizePixels, systemMaxSizePixels };\n}\n\n// ============================================================================\n// PUBLIC API\n// ============================================================================\n\n/**\n * Calculate the complete constraint hierarchy for a panel.\n *\n * This separates user drag limits from system scaling limits:\n * - User limits (userMinSize/userMaxSize) are absolute boundaries for user dragging\n * - System limits (systemMinSize/systemMaxSize) are the operating range for viewport resize\n * - System limits must be within user limits (clamped silently if not)\n *\n * @param panelConfig - Panel configuration\n * @param containerSize - Current container size in pixels\n * @returns Complete constraint hierarchy with all pixel values\n */\nexport function calculateConstraintHierarchy(\n panelConfig: ResizablePanelConfig,\n containerSize: number\n): ConstraintHierarchy {\n // Resolve user constraints (drag limits)\n const { userMinSizePixels, userMaxSizePixels } = resolveUserConstraints(panelConfig, containerSize);\n\n // Resolve system constraints (viewport resize limits) with fallback to user limits\n const { systemMinSizePixels, systemMaxSizePixels } = resolveSystemConstraints(\n panelConfig,\n containerSize,\n userMinSizePixels,\n userMaxSizePixels\n );\n\n // Calculate collapse threshold (container width trigger, NOT a panel size)\n // Don't clamp to container - this threshold is compared AGAINST the container width\n const collapseSizePixels = panelConfig.collapseSize\n ? parseSizeToPixels(panelConfig.collapseSize, containerSize, { clampToContainer: false })\n : undefined;\n\n return {\n userMinSizePixels,\n userMaxSizePixels,\n systemMinSizePixels,\n systemMaxSizePixels,\n collapseSizePixels,\n };\n}\n","import { MIN_PANEL_SIZE_PX } from '../resizable_constants';\nimport type { ResizablePanelState } from '../resizable_constants';\nimport { clampSize } from './constraintResolver';\n\n// ============================================================================\n// RESIZE HANDLING\n// ============================================================================\n\nexport interface ResizeHandler {\n processResizeMove: (\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n handleId?: string,\n allPanels?: ResizablePanelState[],\n beforePanelLeft?: number\n ) => ResizeMoveResult;\n}\n\nexport interface ResizeMoveResult {\n constrainedCursorPosition: number;\n beforePanelSize: number;\n afterPanelSize: number;\n isValidResize: boolean;\n}\n\nexport function useResizeHandling(containerSize?: () => number) {\n function checkPanelsResizable(\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState\n ): ResizeMoveResult | null {\n if (beforePanel.resizable === false || afterPanel.resizable === false) {\n return {\n constrainedCursorPosition: rawCursorPosition,\n beforePanelSize: beforePanel.pixelSize || 0,\n afterPanelSize: afterPanel.pixelSize || 0,\n isValidResize: false,\n };\n }\n return null;\n }\n\n function applyPanelConstraints(proposedSize: number, panel: ResizablePanelState): number {\n return clampSize(proposedSize, panel.userMinSizePixels, panel.userMaxSizePixels);\n }\n\n function calculateMaxCursorForAfterPanel(\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n allPanels?: ResizablePanelState[]\n ): number {\n const minPixels = afterPanel.userMinSizePixels;\n\n if (minPixels === undefined || !allPanels) {\n return containerSizeValue;\n }\n\n const afterPanelIndex = allPanels.findIndex(p => p.id === afterPanel.id);\n const panelsAfterThis = allPanels.slice(afterPanelIndex + 1);\n const totalFixedSpaceAfter = panelsAfterThis.reduce((sum, panel) => sum + (panel.pixelSize || 0), 0);\n\n return containerSizeValue - minPixels - totalFixedSpaceAfter;\n }\n\n function calculateAfterPanelSize(\n cursorPosition: number,\n containerSizeValue: number,\n afterPanel: ResizablePanelState,\n allPanels?: ResizablePanelState[]\n ): number {\n if (!allPanels) {\n return containerSizeValue - cursorPosition;\n }\n\n const afterPanelIndex = allPanels.findIndex(p => p.id === afterPanel.id);\n const panelsAfterThis = allPanels.slice(afterPanelIndex + 1);\n const totalFixedSpaceAfter = panelsAfterThis.reduce((sum, panel) => sum + (panel.pixelSize || 0), 0);\n\n return containerSizeValue - cursorPosition - totalFixedSpaceAfter;\n }\n\n function processResizeMove(\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n handleId?: string,\n allPanels?: ResizablePanelState[],\n beforePanelLeft?: number\n ): ResizeMoveResult {\n const nonResizableResult = checkPanelsResizable(rawCursorPosition, beforePanel, afterPanel);\n if (nonResizableResult) return nonResizableResult;\n\n const beforeLeft = beforePanelLeft || 0;\n const proposedBeforeSize = rawCursorPosition - beforeLeft;\n const proposedAfterSize = containerSizeValue - rawCursorPosition;\n\n let constrainedBeforeSize = applyPanelConstraints(proposedBeforeSize, beforePanel);\n let constrainedAfterSize = applyPanelConstraints(proposedAfterSize, afterPanel);\n\n const maxCursorForAfterPanel = calculateMaxCursorForAfterPanel(afterPanel, containerSizeValue, allPanels);\n const beforePanelCursor = beforeLeft + constrainedBeforeSize;\n const effectiveCursor = Math.min(beforePanelCursor, maxCursorForAfterPanel);\n\n let constrainedCursorPosition;\n\n if (effectiveCursor < beforePanelCursor) {\n constrainedCursorPosition = effectiveCursor;\n constrainedBeforeSize = constrainedCursorPosition - beforeLeft;\n constrainedAfterSize = calculateAfterPanelSize(\n constrainedCursorPosition,\n containerSizeValue,\n afterPanel,\n allPanels\n );\n } else {\n constrainedCursorPosition = beforePanelCursor;\n constrainedAfterSize = calculateAfterPanelSize(\n constrainedCursorPosition,\n containerSizeValue,\n afterPanel,\n allPanels\n );\n }\n\n return {\n constrainedCursorPosition,\n beforePanelSize: constrainedBeforeSize,\n afterPanelSize: constrainedAfterSize,\n isValidResize: constrainedBeforeSize >= MIN_PANEL_SIZE_PX && constrainedAfterSize >= MIN_PANEL_SIZE_PX,\n };\n }\n\n return {\n processResizeMove,\n };\n}\n"],"mappings":"kDAwCA,SAAgB,EAAU,EAAe,EAAc,EAAsB,CAC3E,IAAI,EAAS,EAGb,OAFI,IAAQ,IAAA,KAAW,EAAS,KAAK,IAAI,EAAQ,EAAI,EACjD,IAAQ,IAAA,KAAW,EAAS,KAAK,IAAI,EAAQ,EAAI,EAC9C,EAQT,SAAgB,EACd,EACA,EACA,EAA0B,SAClB,CAOR,OAAO,EAAU,EANL,IAAS,OACjB,EAAY,kBACX,EAAY,qBAAuB,EAAY,kBACxC,IAAS,OACjB,EAAY,kBACX,EAAY,qBAAuB,EAAY,kBACnB,CAUnC,SAAgB,EACd,EACA,EAC4D,CAC5D,MAAO,CACL,kBAAmB,EAAY,YAAc,EAAA,EAAkB,EAAY,YAAa,EAAc,CAAG,IAAA,GACzG,kBAAmB,EAAY,YAAc,EAAA,EAAkB,EAAY,YAAa,EAAc,CAAG,IAAA,GAC1G,CAQH,SAAgB,EAAe,EAA+B,EAAiD,CAE7G,OADI,IAAc,IAAA,IAAa,IAAY,IAAA,GAAkB,EACtD,KAAK,IAAI,EAAW,EAAQ,CAQrC,SAAgB,EAAe,EAA+B,EAAiD,CAE7G,OADI,IAAc,IAAA,IAAa,IAAY,IAAA,GAAkB,EACtD,KAAK,IAA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GAAK,EAAE,KAAO,EAAW,GAAG,CAElE,EADkB,EAAU,MAAM,EAAkB,EAAE,CACf,QAAQ,EAAK,IAAU,GAAO,EAAM,WAAa,GAAI,EAAE,CAEpG,OAAO,EAAqB,EAAiB,EAG/C,SAAS,EACP,EACA,EACA,EACA,EACA,EACA,EACA,EACkB,CAClB,IAAM,EAAqB,EAAqB,EAAmB,EAAa,EAAW,CAC3F,GAAI,EAAoB,OAAO,EAE/B,IAAM,EAAa,GAAmB,EAChC,EAAqB,EAAoB,EACzC,EAAoB,EAAqB,EAE3C,EAAwB,EAAsB,EAAoB,EAAY,CAC9E,EAAuB,EAAsB,EAAmB,EAAW,CAEzE,EAAyB,EAAgC,EAAY,EAAoB,EAAU,CACnG,EAAoB,EAAa,EACjC,EAAkB,KAAK,IAAI,EAAmB,EAAuB,CAEvE,EAqBJ,OAnBI,EAAkB,GACpB,EAA4B,EAC5B,EAAwB,EAA4B,EACpD,EAAuB,EACrB,EACA,EACA,EACA,EACD,GAED,EAA4B,EAC5B,EAAuB,EACrB,EACA,EACA,EACA,EACD,EAGI,CACL,4BACA,gBAAiB,EACjB,eAAgB,EAChB,cAAe,GAAA,IAA8C,GAAA,GAC9D,CAGH,MAAO,CACL,oBACD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { o as e } from "./resizable_utils-BComtrMV.js";
|
|
2
|
+
//#region components/resizable/composables/constraintResolver.ts
|
|
3
|
+
function t(e, t, n) {
|
|
4
|
+
let r = e;
|
|
5
|
+
return t !== void 0 && (r = Math.max(r, t)), n !== void 0 && (r = Math.min(r, n)), r;
|
|
6
|
+
}
|
|
7
|
+
function n(e, n, r = "system") {
|
|
8
|
+
return t(e, r === "user" ? n.userMinSizePixels : n.systemMinSizePixels ?? n.userMinSizePixels, r === "user" ? n.userMaxSizePixels : n.systemMaxSizePixels ?? n.userMaxSizePixels);
|
|
9
|
+
}
|
|
10
|
+
function r(t, n) {
|
|
11
|
+
return {
|
|
12
|
+
userMinSizePixels: t.userMinSize ? e(t.userMinSize, n) : void 0,
|
|
13
|
+
userMaxSizePixels: t.userMaxSize ? e(t.userMaxSize, n) : void 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function i(e, t) {
|
|
17
|
+
return e === void 0 || t === void 0 ? e : Math.max(e, t);
|
|
18
|
+
}
|
|
19
|
+
function a(e, t) {
|
|
20
|
+
return e === void 0 || t === void 0 ? e : Math.min(e, t);
|
|
21
|
+
}
|
|
22
|
+
function o(t, n, r, o) {
|
|
23
|
+
let s = t.systemMinSize ? e(t.systemMinSize, n) : r, c = t.systemMaxSize ? e(t.systemMaxSize, n) : o;
|
|
24
|
+
return {
|
|
25
|
+
systemMinSizePixels: i(s, r),
|
|
26
|
+
systemMaxSizePixels: a(c, o)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function s(t, n) {
|
|
30
|
+
let { userMinSizePixels: i, userMaxSizePixels: a } = r(t, n), { systemMinSizePixels: s, systemMaxSizePixels: c } = o(t, n, i, a);
|
|
31
|
+
return {
|
|
32
|
+
userMinSizePixels: i,
|
|
33
|
+
userMaxSizePixels: a,
|
|
34
|
+
systemMinSizePixels: s,
|
|
35
|
+
systemMaxSizePixels: c,
|
|
36
|
+
collapseSizePixels: t.collapseSize ? e(t.collapseSize, n, { clampToContainer: !1 }) : void 0
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region components/resizable/composables/useResizableCalculations.ts
|
|
41
|
+
function c(e) {
|
|
42
|
+
function n(e, t, n) {
|
|
43
|
+
return t.resizable === !1 || n.resizable === !1 ? {
|
|
44
|
+
constrainedCursorPosition: e,
|
|
45
|
+
beforePanelSize: t.pixelSize || 0,
|
|
46
|
+
afterPanelSize: n.pixelSize || 0,
|
|
47
|
+
isValidResize: !1
|
|
48
|
+
} : null;
|
|
49
|
+
}
|
|
50
|
+
function r(e, n) {
|
|
51
|
+
return t(e, n.userMinSizePixels, n.userMaxSizePixels);
|
|
52
|
+
}
|
|
53
|
+
function i(e, t, n) {
|
|
54
|
+
let r = e.userMinSizePixels;
|
|
55
|
+
if (r === void 0 || !n) return t;
|
|
56
|
+
let i = n.findIndex((t) => t.id === e.id), a = n.slice(i + 1).reduce((e, t) => e + (t.pixelSize || 0), 0);
|
|
57
|
+
return t - r - a;
|
|
58
|
+
}
|
|
59
|
+
function a(e, t, n, r) {
|
|
60
|
+
if (!r) return t - e;
|
|
61
|
+
let i = r.findIndex((e) => e.id === n.id), a = r.slice(i + 1).reduce((e, t) => e + (t.pixelSize || 0), 0);
|
|
62
|
+
return t - e - a;
|
|
63
|
+
}
|
|
64
|
+
function o(e, t, o, s, c, l, u) {
|
|
65
|
+
let d = n(e, t, o);
|
|
66
|
+
if (d) return d;
|
|
67
|
+
let f = u || 0, p = e - f, m = s - e, h = r(p, t), g = r(m, o), _ = i(o, s, l), v = f + h, y = Math.min(v, _), b;
|
|
68
|
+
return y < v ? (b = y, h = b - f, g = a(b, s, o, l)) : (b = v, g = a(b, s, o, l)), {
|
|
69
|
+
constrainedCursorPosition: b,
|
|
70
|
+
beforePanelSize: h,
|
|
71
|
+
afterPanelSize: g,
|
|
72
|
+
isValidResize: h >= 10 && g >= 10
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return { processResizeMove: o };
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { s as n, n as r, c as t };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=useResizableCalculations-DAajatT4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizableCalculations-DAajatT4.js","names":[],"sources":["../components/resizable/composables/constraintResolver.ts","../components/resizable/composables/useResizableCalculations.ts"],"sourcesContent":["/**\n * Constraint Resolver\n *\n * Pure functions for resolving the constraint hierarchy for resizable panels.\n * No DOM access, no Vue reactivity, no side effects.\n *\n * @see computeLayout.ts\n * @see ../resizable_constants.ts\n */\n\nimport type { ResizablePanelConfig } from '../resizable_constants';\nimport { parseSizeToPixels } from '../resizable_utils';\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\n/**\n * Result of constraint hierarchy calculation.\n * User limits are absolute boundaries; system limits are the operating range within user limits.\n */\nexport interface ConstraintHierarchy {\n // User drag limits (absolute boundaries)\n userMinSizePixels?: number;\n userMaxSizePixels?: number;\n // System scaling limits (operating range within user limits)\n systemMinSizePixels?: number;\n systemMaxSizePixels?: number;\n // Auto-collapse threshold (container width, not panel width)\n collapseSizePixels?: number;\n}\n\n// ============================================================================\n// CLAMPING PRIMITIVE\n// ============================================================================\n\n/**\n * Clamp a value to optional min/max bounds.\n * Single source of truth for all constraint clamping in the resizable system.\n */\nexport function clampSize(value: number, min?: number, max?: number): number {\n let result = value;\n if (min !== undefined) result = Math.max(result, min);\n if (max !== undefined) result = Math.min(result, max);\n return result;\n}\n\n/**\n * Resolve effective min/max for a given constraint tier, then clamp.\n * - 'user' tier: uses userMin/userMax only\n * - 'system' tier: uses systemMin/systemMax, falling back to userMin/userMax\n */\nexport function clampToTier(\n value: number,\n constraints: ConstraintHierarchy,\n tier: 'user' | 'system' = 'system'\n): number {\n const min = tier === 'user'\n ? constraints.userMinSizePixels\n : (constraints.systemMinSizePixels ?? constraints.userMinSizePixels);\n const max = tier === 'user'\n ? constraints.userMaxSizePixels\n : (constraints.systemMaxSizePixels ?? constraints.userMaxSizePixels);\n return clampSize(value, min, max);\n}\n\n// ============================================================================\n// INTERNAL HELPERS\n// ============================================================================\n\n/**\n * Resolve user constraints (drag limits) from panel config.\n */\nexport function resolveUserConstraints(\n panelConfig: ResizablePanelConfig,\n containerSize: number\n): { userMinSizePixels?: number; userMaxSizePixels?: number } {\n return {\n userMinSizePixels: panelConfig.userMinSize ? parseSizeToPixels(panelConfig.userMinSize, containerSize) : undefined,\n userMaxSizePixels: panelConfig.userMaxSize ? parseSizeToPixels(panelConfig.userMaxSize, containerSize) : undefined,\n };\n}\n\n/**\n * Clamp system min to be at least user min.\n * System constraints that exceed user boundaries are silently clamped\n * since this is expected behavior during constraint resolution.\n */\nexport function clampSystemMin(systemMin: number | undefined, userMin: number | undefined): number | undefined {\n if (systemMin === undefined || userMin === undefined) return systemMin;\n return Math.max(systemMin, userMin);\n}\n\n/**\n * Clamp system max to be at most user max.\n * System constraints that exceed user boundaries are silently clamped\n * since this is expected behavior during constraint resolution.\n */\nexport function clampSystemMax(systemMax: number | undefined, userMax: number | undefined): number | undefined {\n if (systemMax === undefined || userMax === undefined) return systemMax;\n return Math.min(systemMax, userMax);\n}\n\n/**\n * Resolve system constraints with fallback to user constraints.\n * System limits are silently clamped to stay within user limits.\n */\nexport function resolveSystemConstraints(\n panelConfig: ResizablePanelConfig,\n containerSize: number,\n userMinSizePixels?: number,\n userMaxSizePixels?: number\n): { systemMinSizePixels?: number; systemMaxSizePixels?: number } {\n // Calculate system limits from props, or fall back to user limits\n const rawSystemMin = panelConfig.systemMinSize\n ? parseSizeToPixels(panelConfig.systemMinSize, containerSize)\n : userMinSizePixels;\n const rawSystemMax = panelConfig.systemMaxSize\n ? parseSizeToPixels(panelConfig.systemMaxSize, containerSize)\n : userMaxSizePixels;\n\n // Validate and clamp system limits within user limits\n const systemMinSizePixels = clampSystemMin(rawSystemMin, userMinSizePixels);\n const systemMaxSizePixels = clampSystemMax(rawSystemMax, userMaxSizePixels);\n\n return { systemMinSizePixels, systemMaxSizePixels };\n}\n\n// ============================================================================\n// PUBLIC API\n// ============================================================================\n\n/**\n * Calculate the complete constraint hierarchy for a panel.\n *\n * This separates user drag limits from system scaling limits:\n * - User limits (userMinSize/userMaxSize) are absolute boundaries for user dragging\n * - System limits (systemMinSize/systemMaxSize) are the operating range for viewport resize\n * - System limits must be within user limits (clamped silently if not)\n *\n * @param panelConfig - Panel configuration\n * @param containerSize - Current container size in pixels\n * @returns Complete constraint hierarchy with all pixel values\n */\nexport function calculateConstraintHierarchy(\n panelConfig: ResizablePanelConfig,\n containerSize: number\n): ConstraintHierarchy {\n // Resolve user constraints (drag limits)\n const { userMinSizePixels, userMaxSizePixels } = resolveUserConstraints(panelConfig, containerSize);\n\n // Resolve system constraints (viewport resize limits) with fallback to user limits\n const { systemMinSizePixels, systemMaxSizePixels } = resolveSystemConstraints(\n panelConfig,\n containerSize,\n userMinSizePixels,\n userMaxSizePixels\n );\n\n // Calculate collapse threshold (container width trigger, NOT a panel size)\n // Don't clamp to container - this threshold is compared AGAINST the container width\n const collapseSizePixels = panelConfig.collapseSize\n ? parseSizeToPixels(panelConfig.collapseSize, containerSize, { clampToContainer: false })\n : undefined;\n\n return {\n userMinSizePixels,\n userMaxSizePixels,\n systemMinSizePixels,\n systemMaxSizePixels,\n collapseSizePixels,\n };\n}\n","import { MIN_PANEL_SIZE_PX } from '../resizable_constants';\nimport type { ResizablePanelState } from '../resizable_constants';\nimport { clampSize } from './constraintResolver';\n\n// ============================================================================\n// RESIZE HANDLING\n// ============================================================================\n\nexport interface ResizeHandler {\n processResizeMove: (\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n handleId?: string,\n allPanels?: ResizablePanelState[],\n beforePanelLeft?: number\n ) => ResizeMoveResult;\n}\n\nexport interface ResizeMoveResult {\n constrainedCursorPosition: number;\n beforePanelSize: number;\n afterPanelSize: number;\n isValidResize: boolean;\n}\n\nexport function useResizeHandling(containerSize?: () => number) {\n function checkPanelsResizable(\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState\n ): ResizeMoveResult | null {\n if (beforePanel.resizable === false || afterPanel.resizable === false) {\n return {\n constrainedCursorPosition: rawCursorPosition,\n beforePanelSize: beforePanel.pixelSize || 0,\n afterPanelSize: afterPanel.pixelSize || 0,\n isValidResize: false,\n };\n }\n return null;\n }\n\n function applyPanelConstraints(proposedSize: number, panel: ResizablePanelState): number {\n return clampSize(proposedSize, panel.userMinSizePixels, panel.userMaxSizePixels);\n }\n\n function calculateMaxCursorForAfterPanel(\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n allPanels?: ResizablePanelState[]\n ): number {\n const minPixels = afterPanel.userMinSizePixels;\n\n if (minPixels === undefined || !allPanels) {\n return containerSizeValue;\n }\n\n const afterPanelIndex = allPanels.findIndex(p => p.id === afterPanel.id);\n const panelsAfterThis = allPanels.slice(afterPanelIndex + 1);\n const totalFixedSpaceAfter = panelsAfterThis.reduce((sum, panel) => sum + (panel.pixelSize || 0), 0);\n\n return containerSizeValue - minPixels - totalFixedSpaceAfter;\n }\n\n function calculateAfterPanelSize(\n cursorPosition: number,\n containerSizeValue: number,\n afterPanel: ResizablePanelState,\n allPanels?: ResizablePanelState[]\n ): number {\n if (!allPanels) {\n return containerSizeValue - cursorPosition;\n }\n\n const afterPanelIndex = allPanels.findIndex(p => p.id === afterPanel.id);\n const panelsAfterThis = allPanels.slice(afterPanelIndex + 1);\n const totalFixedSpaceAfter = panelsAfterThis.reduce((sum, panel) => sum + (panel.pixelSize || 0), 0);\n\n return containerSizeValue - cursorPosition - totalFixedSpaceAfter;\n }\n\n function processResizeMove(\n rawCursorPosition: number,\n beforePanel: ResizablePanelState,\n afterPanel: ResizablePanelState,\n containerSizeValue: number,\n handleId?: string,\n allPanels?: ResizablePanelState[],\n beforePanelLeft?: number\n ): ResizeMoveResult {\n const nonResizableResult = checkPanelsResizable(rawCursorPosition, beforePanel, afterPanel);\n if (nonResizableResult) return nonResizableResult;\n\n const beforeLeft = beforePanelLeft || 0;\n const proposedBeforeSize = rawCursorPosition - beforeLeft;\n const proposedAfterSize = containerSizeValue - rawCursorPosition;\n\n let constrainedBeforeSize = applyPanelConstraints(proposedBeforeSize, beforePanel);\n let constrainedAfterSize = applyPanelConstraints(proposedAfterSize, afterPanel);\n\n const maxCursorForAfterPanel = calculateMaxCursorForAfterPanel(afterPanel, containerSizeValue, allPanels);\n const beforePanelCursor = beforeLeft + constrainedBeforeSize;\n const effectiveCursor = Math.min(beforePanelCursor, maxCursorForAfterPanel);\n\n let constrainedCursorPosition;\n\n if (effectiveCursor < beforePanelCursor) {\n constrainedCursorPosition = effectiveCursor;\n constrainedBeforeSize = constrainedCursorPosition - beforeLeft;\n constrainedAfterSize = calculateAfterPanelSize(\n constrainedCursorPosition,\n containerSizeValue,\n afterPanel,\n allPanels\n );\n } else {\n constrainedCursorPosition = beforePanelCursor;\n constrainedAfterSize = calculateAfterPanelSize(\n constrainedCursorPosition,\n containerSizeValue,\n afterPanel,\n allPanels\n );\n }\n\n return {\n constrainedCursorPosition,\n beforePanelSize: constrainedBeforeSize,\n afterPanelSize: constrainedAfterSize,\n isValidResize: constrainedBeforeSize >= MIN_PANEL_SIZE_PX && constrainedAfterSize >= MIN_PANEL_SIZE_PX,\n };\n }\n\n return {\n processResizeMove,\n };\n}\n"],"mappings":";;AAwCA,SAAgB,EAAU,GAAe,GAAc,GAAsB;CAC3E,IAAI,IAAS;AAGb,QAFI,MAAQ,KAAA,MAAW,IAAS,KAAK,IAAI,GAAQ,EAAI,GACjD,MAAQ,KAAA,MAAW,IAAS,KAAK,IAAI,GAAQ,EAAI,GAC9C;;AAQT,SAAgB,EACd,GACA,GACA,IAA0B,UAClB;AAOR,QAAO,EAAU,GANL,MAAS,SACjB,EAAY,oBACX,EAAY,uBAAuB,EAAY,mBACxC,MAAS,SACjB,EAAY,oBACX,EAAY,uBAAuB,EAAY,kBACnB;;AAUnC,SAAgB,EACd,GACA,GAC4D;AAC5D,QAAO;EACL,mBAAmB,EAAY,cAAc,EAAkB,EAAY,aAAa,EAAc,GAAG,KAAA;EACzG,mBAAmB,EAAY,cAAc,EAAkB,EAAY,aAAa,EAAc,GAAG,KAAA;EAC1G;;AAQH,SAAgB,EAAe,GAA+B,GAAiD;AAE7G,QADI,MAAc,KAAA,KAAa,MAAY,KAAA,IAAkB,IACtD,KAAK,IAAI,GAAW,EAAQ;;AAQrC,SAAgB,EAAe,GAA+B,GAAiD;AAE7G,QADI,MAAc,KAAA,KAAa,MAAY,KAAA,IAAkB,IACtD,KAAK,IAAI,GAAW,EAAQ;;AAOrC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E,IADkB,EAAU,MAAM,IAAkB,EAAE,CACf,QAAQ,GAAK,MAAU,KAAO,EAAM,aAAa,IAAI,EAAE;AAEpG,SAAO,IAAqB,IAAiB;;CAG/C,SAAS,EACP,GACA,GACA,GACA,GACA,GACA,GACA,GACkB;EAClB,IAAM,IAAqB,EAAqB,GAAmB,GAAa,EAAW;AAC3F,MAAI,EAAoB,QAAO;EAE/B,IAAM,IAAa,KAAmB,GAChC,IAAqB,IAAoB,GACzC,IAAoB,IAAqB,GAE3C,IAAwB,EAAsB,GAAoB,EAAY,EAC9E,IAAuB,EAAsB,GAAmB,EAAW,EAEzE,IAAyB,EAAgC,GAAY,GAAoB,EAAU,EACnG,IAAoB,IAAa,GACjC,IAAkB,KAAK,IAAI,GAAmB,EAAuB,EAEvE;AAqBJ,SAnBI,IAAkB,KACpB,IAA4B,GAC5B,IAAwB,IAA4B,GACpD,IAAuB,EACrB,GACA,GACA,GACA,EACD,KAED,IAA4B,GAC5B,IAAuB,EACrB,GACA,GACA,GACA,EACD,GAGI;GACL;GACA,iBAAiB;GACjB,gBAAgB;GAChB,eAAe,KAAA,MAA8C,KAAA;GAC9D;;AAGH,QAAO,EACL,sBACD"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdownRenderer.cjs","names":[],"sources":["../../../components/rich_text_editor/markdownRenderer.js"],"sourcesContent":["import { renderToMarkdown } from '@tiptap/static-renderer/pm/markdown';\n\n// The pm/markdown renderer passes children as string[] (one entry per child node),\n// not as a pre-joined string. Normalize to a string before processing.\nconst joinChildren = (children) => Array.isArray(children) ? children.join('') : (children || '');\n\n// Move leading/trailing spaces outside mark delimiters so parsers like CommonMark\n// don't reject them (e.g. \"** bold **\" → \" **bold** \").\nconst wrapMark = (text, open, close) => {\n const trimmed = text.trim();\n if (!trimmed) return text;\n const leading = text.slice(0, text.length - text.trimStart().length);\n const trailing = text.slice(text.trimEnd().length);\n return `${leading}${open}${trimmed}${close}${trailing}`;\n};\n\n/**\n * Renders a TipTap/ProseMirror JSON document to a markdown string.\n *\n * Uses @tiptap/static-renderer with custom mappings to preserve the output\n * format of the legacy jsonToMarkdownConverter, including Dialtone-specific\n * node types (mention, channel, emoji, variable, slash-commands).\n *\n * @param {import('@tiptap/core').JSONContent} jsonContent - TipTap JSON document\n * @param {import('@tiptap/core').Extensions} extensions - Active editor extensions\n * @returns {string}\n */\nexport function renderEditorToMarkdown (jsonContent, extensions) {\n const output = renderToMarkdown({\n extensions,\n content: jsonContent,\n options: {\n nodeMapping: {\n // Override blockquote: built-in omits trailing newline (causes lazy continuation).\n // Since we replace the built-in entirely, we must add the '> ' prefix ourselves.\n blockquote ({ children }) {\n const text = joinChildren(children).trim();\n const quoted = text\n .split('\\n')\n .map(line => line ? `> ${line}` : '>')\n .join('\\n');\n return quoted + '\\n';\n },\n\n // Override codeBlock: built-in passes null language through literally\n codeBlock ({ node, children }) {\n const lang = node.attrs?.language || '';\n return `\\`\\`\\`${lang}\\n${joinChildren(children)}\\n\\`\\`\\`\\n`;\n },\n\n // Custom Dialtone node types\n mention ({ node }) {\n const id = node.attrs?.id || '';\n const contactKey = node.attrs?.contactKey || '';\n const name = node.attrs?.name || '';\n return `<!-- @mention: {\"id\": \"${id}\", \"contactKey\": \"${contactKey}\", \"name\": \"${name}\"} -->`;\n },\n\n channel ({ node }) {\n const id = node.attrs?.id || '';\n const channelKey = node.attrs?.channelKey || '';\n const name = node.attrs?.name || '';\n const locked = String(node.attrs?.locked ?? '');\n return `<!-- @channel: {\"id\": \"${id}\", \"channelKey\": \"${channelKey}\", \"name\": \"${name}\", \"locked\": \"${locked}\"} -->`;\n },\n\n 'slash-commands' ({ node }) {\n return `/${node.attrs?.command || ''}`;\n },\n\n emoji ({ node }) {\n return node.attrs?.code || '';\n },\n\n variable ({ node }) {\n const id = node.attrs?.id || '';\n const altText = node.attrs?.altText || '';\n return `{{${id}=${altText}}}`;\n },\n },\n\n markMapping: {\n bold ({ children }) {\n return wrapMark(joinChildren(children), '**', '**');\n },\n\n // Override italic: use * instead of built-in _ and fix boundary spaces\n italic ({ children }) {\n return wrapMark(joinChildren(children), '*', '*');\n },\n\n strike ({ children }) {\n return wrapMark(joinChildren(children), '~~', '~~');\n },\n\n code ({ children }) {\n return wrapMark(joinChildren(children), '`', '`');\n },\n\n link ({ mark, children }) {\n const text = joinChildren(children);\n const href = mark.attrs?.href || '';\n const trimmed = text.trim();\n const leading = text.slice(0, text.length - text.trimStart().length);\n const trailing = text.slice(text.trimEnd().length);\n return `${leading}[${trimmed}](${href})${trailing}`;\n },\n\n // Override underline: pass-through (no markdown equivalent, matches legacy no-op)\n underline ({ children }) {\n return joinChildren(children);\n },\n },\n },\n });\n // Collapse 3+ consecutive newlines to 2 (CommonMark ignores extra blank\n // lines between blocks), and strip the leading newline that the built-in\n // paragraph renderer always prepends to the first node.\n return output.replace(/\\n{3,}/g, '\\n\\n').replace(/^\\n+|\\n+$/g, '');\n}\n"],"mappings":"4JAIA,IAAM,EAAgB,GAAa,MAAM,QAAQ,EAAS,CAAG,EAAS,KAAK,GAAG,CAAI,GAAY,GAIxF,GAAY,EAAM,EAAM,IAAU,CACtC,IAAM,EAAU,EAAK,MAAM,CAI3B,OAHK,EAGE,GAFS,EAAK,MAAM,EAAG,EAAK,OAAS,EAAK,WAAW,CAAC,OAAO,GAEhD,IAAO,IAAU,IADpB,EAAK,MAAM,EAAK,SAAS,CAAC,OAAO,GAF7B,GAiBvB,SAAgB,EAAwB,EAAa,EAAY,CA2F/D,OAAA,EAAA,EAAA,kBA1FgC,CAC9B,aACA,QAAS,EACT,QAAS,CACP,YAAa,CAGX,WAAY,CAAE,YAAY,CAMxB,OALa,EAAa,EAAS,CAAC,MAAM,CAEvC,MAAM;EAAK,CACX,IAAI,GAAQ,EAAO,KAAK,IAAS,IAAI,CACrC,KAAK;EAAK,CACG;GAIlB,UAAW,CAAE,OAAM,YAAY,CAE7B,MAAO,SADM,EAAK,OAAO,UAAY,GAChB,IAAI,EA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AAC,QAAQ,aAAc,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdownRenderer.js","names":[],"sources":["../../../components/rich_text_editor/markdownRenderer.js"],"sourcesContent":["import { renderToMarkdown } from '@tiptap/static-renderer/pm/markdown';\n\n// The pm/markdown renderer passes children as string[] (one entry per child node),\n// not as a pre-joined string. Normalize to a string before processing.\nconst joinChildren = (children) => Array.isArray(children) ? children.join('') : (children || '');\n\n// Move leading/trailing spaces outside mark delimiters so parsers like CommonMark\n// don't reject them (e.g. \"** bold **\" → \" **bold** \").\nconst wrapMark = (text, open, close) => {\n const trimmed = text.trim();\n if (!trimmed) return text;\n const leading = text.slice(0, text.length - text.trimStart().length);\n const trailing = text.slice(text.trimEnd().length);\n return `${leading}${open}${trimmed}${close}${trailing}`;\n};\n\n/**\n * Renders a TipTap/ProseMirror JSON document to a markdown string.\n *\n * Uses @tiptap/static-renderer with custom mappings to preserve the output\n * format of the legacy jsonToMarkdownConverter, including Dialtone-specific\n * node types (mention, channel, emoji, variable, slash-commands).\n *\n * @param {import('@tiptap/core').JSONContent} jsonContent - TipTap JSON document\n * @param {import('@tiptap/core').Extensions} extensions - Active editor extensions\n * @returns {string}\n */\nexport function renderEditorToMarkdown (jsonContent, extensions) {\n const output = renderToMarkdown({\n extensions,\n content: jsonContent,\n options: {\n nodeMapping: {\n // Override blockquote: built-in omits trailing newline (causes lazy continuation).\n // Since we replace the built-in entirely, we must add the '> ' prefix ourselves.\n blockquote ({ children }) {\n const text = joinChildren(children).trim();\n const quoted = text\n .split('\\n')\n .map(line => line ? `> ${line}` : '>')\n .join('\\n');\n return quoted + '\\n';\n },\n\n // Override codeBlock: built-in passes null language through literally\n codeBlock ({ node, children }) {\n const lang = node.attrs?.language || '';\n return `\\`\\`\\`${lang}\\n${joinChildren(children)}\\n\\`\\`\\`\\n`;\n },\n\n // Custom Dialtone node types\n mention ({ node }) {\n const id = node.attrs?.id || '';\n const contactKey = node.attrs?.contactKey || '';\n const name = node.attrs?.name || '';\n return `<!-- @mention: {\"id\": \"${id}\", \"contactKey\": \"${contactKey}\", \"name\": \"${name}\"} -->`;\n },\n\n channel ({ node }) {\n const id = node.attrs?.id || '';\n const channelKey = node.attrs?.channelKey || '';\n const name = node.attrs?.name || '';\n const locked = String(node.attrs?.locked ?? '');\n return `<!-- @channel: {\"id\": \"${id}\", \"channelKey\": \"${channelKey}\", \"name\": \"${name}\", \"locked\": \"${locked}\"} -->`;\n },\n\n 'slash-commands' ({ node }) {\n return `/${node.attrs?.command || ''}`;\n },\n\n emoji ({ node }) {\n return node.attrs?.code || '';\n },\n\n variable ({ node }) {\n const id = node.attrs?.id || '';\n const altText = node.attrs?.altText || '';\n return `{{${id}=${altText}}}`;\n },\n },\n\n markMapping: {\n bold ({ children }) {\n return wrapMark(joinChildren(children), '**', '**');\n },\n\n // Override italic: use * instead of built-in _ and fix boundary spaces\n italic ({ children }) {\n return wrapMark(joinChildren(children), '*', '*');\n },\n\n strike ({ children }) {\n return wrapMark(joinChildren(children), '~~', '~~');\n },\n\n code ({ children }) {\n return wrapMark(joinChildren(children), '`', '`');\n },\n\n link ({ mark, children }) {\n const text = joinChildren(children);\n const href = mark.attrs?.href || '';\n const trimmed = text.trim();\n const leading = text.slice(0, text.length - text.trimStart().length);\n const trailing = text.slice(text.trimEnd().length);\n return `${leading}[${trimmed}](${href})${trailing}`;\n },\n\n // Override underline: pass-through (no markdown equivalent, matches legacy no-op)\n underline ({ children }) {\n return joinChildren(children);\n },\n },\n },\n });\n // Collapse 3+ consecutive newlines to 2 (CommonMark ignores extra blank\n // lines between blocks), and strip the leading newline that the built-in\n // paragraph renderer always prepends to the first node.\n return output.replace(/\\n{3,}/g, '\\n\\n').replace(/^\\n+|\\n+$/g, '');\n}\n"],"mappings":";;AAIA,IAAM,KAAgB,MAAa,MAAM,QAAQ,EAAS,GAAG,EAAS,KAAK,GAAG,GAAI,KAAY,IAIxF,KAAY,GAAM,GAAM,MAAU;CACtC,IAAM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