@myissue/vue-website-page-builder 3.4.20 → 3.4.21
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/README.md +22 -24
- package/dist/vue-website-page-builder.js +1 -1
- package/dist/vue-website-page-builder.umd.cjs +1 -1
- package/package.json +2 -3
- package/src/App.vue +0 -28
- package/src/Components/Homepage/Footer.vue +0 -32
- package/src/Components/Homepage/Navbar.vue +0 -25
- package/src/Components/Layouts/FullWidthElement.vue +0 -34
- package/src/Components/Loaders/GlobalLoader.vue +0 -18
- package/src/Components/Modals/BuilderComponents.vue +0 -53
- package/src/Components/Modals/DynamicModalBuilder.vue +0 -209
- package/src/Components/Modals/MediaLibraryModal.vue +0 -61
- package/src/Components/Modals/ModalBuilder.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +0 -121
- package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +0 -188
- package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +0 -176
- package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +0 -112
- package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +0 -108
- package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +0 -541
- package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +0 -203
- package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +0 -96
- package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +0 -315
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +0 -107
- package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +0 -106
- package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +0 -116
- package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +0 -19
- package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +0 -117
- package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +0 -123
- package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +0 -237
- package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +0 -46
- package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +0 -368
- package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +0 -476
- package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +0 -581
- package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +0 -248
- package/src/Components/PageBuilder/UndoRedo/UndoRedo.vue +0 -90
- package/src/Components/TipTap/TipTap.vue +0 -25
- package/src/Components/TipTap/TipTapInput.vue +0 -341
- package/src/PageBuilder/PageBuilder.vue +0 -1025
- package/src/PageBuilder/Preview.vue +0 -64
- package/src/composables/builderInstance.ts +0 -47
- package/src/composables/delay.ts +0 -5
- package/src/composables/extractCleanHTMLFromPageBuilder.ts +0 -59
- package/src/composables/preloadImage.ts +0 -8
- package/src/composables/useDebounce.ts +0 -8
- package/src/composables/usePageBuilderModal.ts +0 -25
- package/src/composables/useTranslations.ts +0 -28
- package/src/css/dev-global.css +0 -24
- package/src/css/style.css +0 -600
- package/src/helpers/isEmptyObject.ts +0 -5
- package/src/index.ts +0 -28
- package/src/locales/ar.json +0 -170
- package/src/locales/de.json +0 -171
- package/src/locales/en.json +0 -171
- package/src/locales/es.json +0 -171
- package/src/locales/fr.json +0 -171
- package/src/locales/hi.json +0 -172
- package/src/locales/ja.json +0 -171
- package/src/locales/pt.json +0 -171
- package/src/locales/ru.json +0 -171
- package/src/locales/zh-Hans.json +0 -171
- package/src/main.ts +0 -14
- package/src/plugin.ts +0 -16
- package/src/services/LocalStorageManager.ts +0 -25
- package/src/services/PageBuilderService.ts +0 -3191
- package/src/stores/page-builder-state.ts +0 -498
- package/src/stores/shared-store.ts +0 -13
- package/src/tailwind-safelist.html +0 -3
- package/src/tests/DefaultComponents/DefaultBuilderComponents.vue +0 -284
- package/src/tests/DefaultComponents/DefaultMediaLibraryComponent.vue +0 -10
- package/src/tests/PageBuilderTest.vue +0 -82
- package/src/tests/TestComponents/DemoBuilderComponentsTest.vue +0 -5
- package/src/tests/TestComponents/DemoMediaLibraryComponentTest.vue +0 -8
- package/src/tests/TestComponents/DemoUnsplash.vue +0 -389
- package/src/tests/componentsArray.test.json +0 -62
- package/src/tests/pageBuilderService.test.ts +0 -165
- package/src/types/global.d.ts +0 -11
- package/src/types/index.ts +0 -306
- package/src/utils/builder/html-doc-declaration-with-components.ts +0 -7
- package/src/utils/builder/tailwaind-colors.ts +0 -503
- package/src/utils/builder/tailwind-border-radius.ts +0 -67
- package/src/utils/builder/tailwind-border-style-width-color.ts +0 -272
- package/src/utils/builder/tailwind-font-sizes.ts +0 -75
- package/src/utils/builder/tailwind-font-styles.ts +0 -56
- package/src/utils/builder/tailwind-opacities.ts +0 -45
- package/src/utils/builder/tailwind-padding-margin.ts +0 -159
- package/src/utils/html-elements/component.ts +0 -485
- package/src/utils/html-elements/componentHelpers.ts +0 -98
- package/src/utils/html-elements/themes.ts +0 -85
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myissue/vue-website-page-builder",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.21",
|
|
4
4
|
"description": "Vue 3 page builder component with drag & drop functionality.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/vue-website-page-builder.umd.cjs",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"!dist/*.ico",
|
|
16
16
|
"!dist/browserconfig.xml",
|
|
17
17
|
"!dist/robots.txt",
|
|
18
|
-
"src",
|
|
19
18
|
"README.md",
|
|
20
19
|
"LICENSE"
|
|
21
20
|
],
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
},
|
|
65
64
|
"scripts": {
|
|
66
65
|
"dev": "vite",
|
|
67
|
-
"build": "run-p type-check \"build-only {@}\" --",
|
|
66
|
+
"build": "run-p type-check \"build-only { @}\" --",
|
|
68
67
|
"build:lib": "vue-tsc --declaration --emitDeclarationOnly --outDir dist && vite build --mode lib",
|
|
69
68
|
"preview": "vite preview",
|
|
70
69
|
"build-only": "vite build",
|
package/src/App.vue
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted, computed } from 'vue'
|
|
3
|
-
import Navbar from './Components/Homepage/Navbar.vue'
|
|
4
|
-
import PageBuilderTest from './tests/PageBuilderTest.vue'
|
|
5
|
-
import Footer from './Components/Homepage/Footer.vue'
|
|
6
|
-
import { useTranslations } from './composables/useTranslations'
|
|
7
|
-
import { sharedPageBuilderStore } from './stores/shared-store'
|
|
8
|
-
|
|
9
|
-
const { loadTranslations } = useTranslations()
|
|
10
|
-
|
|
11
|
-
const pageBuilderStateStore = sharedPageBuilderStore
|
|
12
|
-
|
|
13
|
-
const getCurrentLanguage = computed(() => {
|
|
14
|
-
return pageBuilderStateStore.getCurrentLanguage
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
onMounted(async () => {
|
|
18
|
-
const language = getCurrentLanguage.value || 'en'
|
|
19
|
-
await loadTranslations(language)
|
|
20
|
-
})
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<div>
|
|
25
|
-
<Footer></Footer>
|
|
26
|
-
<PageBuilderTest></PageBuilderTest>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const version = __APP_VERSION__
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<template>
|
|
6
|
-
<div
|
|
7
|
-
class="pbx-flex pbx-justify-between pbx-gap-2 lg:pbx-px-12 pbx-mx-2 pbx-py-3 pbx-border-t pbx-border-t-gray-900"
|
|
8
|
-
>
|
|
9
|
-
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-medium pbx-underline">
|
|
10
|
-
<a
|
|
11
|
-
href="https://www.npmjs.com/package/@myissue/vue-website-page-builder"
|
|
12
|
-
target="_blank"
|
|
13
|
-
class="pbx-myPrimaryLink pbx-text-myPrimaryDarkGrayColor"
|
|
14
|
-
>
|
|
15
|
-
Install via npm
|
|
16
|
-
</a>
|
|
17
|
-
</p>
|
|
18
|
-
|
|
19
|
-
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-medium pbx-underline">
|
|
20
|
-
<a
|
|
21
|
-
href="https://github.com/myissue-org/vue-website-page-builder"
|
|
22
|
-
target="_blank"
|
|
23
|
-
class="pbx-myPrimaryLink pbx-text-myPrimaryDarkGrayColor"
|
|
24
|
-
>
|
|
25
|
-
View on GitHub
|
|
26
|
-
</a>
|
|
27
|
-
</p>
|
|
28
|
-
<p class="pbx-myPrimaryParagraph pbx-text-xs pbx-font-medium pbx-underline">
|
|
29
|
-
<span class="pbx-text-myPrimaryDarkGrayColor">{{ version }}</span>
|
|
30
|
-
</p>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const emit = defineEmits(['handleButton'])
|
|
3
|
-
|
|
4
|
-
// first button function
|
|
5
|
-
const handleButton = function () {
|
|
6
|
-
emit('handleButton')
|
|
7
|
-
}
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<nav
|
|
12
|
-
class="pbx-px-6 pbx-py-6 pbx-mx-auto pbx-flex pbx-items-center pbx-justify-between pbx-bg-gray-50 lg:pbx-h-[10vh] pbx-h-[10vh]"
|
|
13
|
-
aria-label="Global"
|
|
14
|
-
>
|
|
15
|
-
<img class="pbx-h-6" src="/logo/logo.svg" alt="Logo" />
|
|
16
|
-
|
|
17
|
-
<div class="pbx-flex lg:pbx-gap-x-12 pbx-myPrimaryGap">
|
|
18
|
-
<div
|
|
19
|
-
class="pbx-text-lg pbx-font-medium pbx-text-myPrimaryDarkGrayColor pbx-flex pbx-gap-2 pbx-items-center"
|
|
20
|
-
>
|
|
21
|
-
Page Builder
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</nav>
|
|
25
|
-
</template>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
defineProps({
|
|
3
|
-
descriptionArea: {
|
|
4
|
-
Type: Boolean,
|
|
5
|
-
required: true,
|
|
6
|
-
default: true,
|
|
7
|
-
},
|
|
8
|
-
headerArea: {
|
|
9
|
-
Type: Boolean,
|
|
10
|
-
default: true,
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<!-- chimp start -->
|
|
17
|
-
<div class="pbx-myPrimaryWidthScreenModule">
|
|
18
|
-
<template v-if="headerArea">
|
|
19
|
-
<div class="pbx-myPrimaryContentSection">
|
|
20
|
-
<h2 class="pbx-mySecondaryHeader">
|
|
21
|
-
<slot name="title" />
|
|
22
|
-
</h2>
|
|
23
|
-
<template v-if="descriptionArea === true">
|
|
24
|
-
<p class="pbx-myPrimaryParagraph pbx-font-normal">
|
|
25
|
-
<slot name="description" />
|
|
26
|
-
</p>
|
|
27
|
-
</template>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
<div class="pbx-myPrimaryContentSection">
|
|
31
|
-
<slot name="content" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="pbx-bg-white pbx-flex pbx-justify-center pbx-items-center min-pbx-h-screen pbx-h-screen pbx-w-screen pbx-fixed pbx-inset-0 pbx-z-[10000]"
|
|
4
|
-
>
|
|
5
|
-
<div class="pbx-absolute pbx-top-1/3">
|
|
6
|
-
<div class="pbx-flex pbx-items-center pbx-justify-center pbx-mt-4">
|
|
7
|
-
<div
|
|
8
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
9
|
-
>
|
|
10
|
-
<span
|
|
11
|
-
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
12
|
-
>Loading...</span
|
|
13
|
-
>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import ModalBuilder from '../Modals/ModalBuilder.vue'
|
|
3
|
-
import DefaultBuilderComponents from '../../tests/DefaultComponents/DefaultBuilderComponents.vue'
|
|
4
|
-
import { inject } from 'vue'
|
|
5
|
-
const customMediaComponent = inject('CustomMediaComponent')
|
|
6
|
-
|
|
7
|
-
defineProps({
|
|
8
|
-
firstButtonText: {
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
title: {
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
show: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
CustomBuilderComponents: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: null,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
const emit = defineEmits(['firstModalButtonSearchComponentsFunction'])
|
|
25
|
-
|
|
26
|
-
// first button function
|
|
27
|
-
const firstButtonBuilder = function () {
|
|
28
|
-
emit('firstModalButtonSearchComponentsFunction')
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<ModalBuilder
|
|
34
|
-
:title="title"
|
|
35
|
-
maxWidth="6xl"
|
|
36
|
-
:showModalBuilder="show"
|
|
37
|
-
@closeMainModalBuilder="firstButtonBuilder"
|
|
38
|
-
minHeight=""
|
|
39
|
-
maxHeight=""
|
|
40
|
-
>
|
|
41
|
-
<div class="pbx-w-full pbx-inset-x-0 pbx-bg-white pbx-overflow-x-auto lg:pbx-pt-2 pbx-pt-2">
|
|
42
|
-
<div>
|
|
43
|
-
<!-- Only show custom search component if provided -->
|
|
44
|
-
<div v-if="CustomBuilderComponents">
|
|
45
|
-
<component :is="CustomBuilderComponents" />
|
|
46
|
-
</div>
|
|
47
|
-
<div v-else>
|
|
48
|
-
<DefaultBuilderComponents :customMediaComponent="customMediaComponent" />
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</ModalBuilder>
|
|
53
|
-
</template>
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import ModalBuilder from './ModalBuilder.vue'
|
|
3
|
-
|
|
4
|
-
defineProps({
|
|
5
|
-
showDynamicModalBuilder: {
|
|
6
|
-
type: Boolean,
|
|
7
|
-
default: false,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
simpleModal: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: false,
|
|
13
|
-
required: false,
|
|
14
|
-
},
|
|
15
|
-
disabled: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false,
|
|
18
|
-
required: false,
|
|
19
|
-
},
|
|
20
|
-
isLoading: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false,
|
|
23
|
-
required: false,
|
|
24
|
-
},
|
|
25
|
-
disabledWhichButton: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: '',
|
|
28
|
-
required: false,
|
|
29
|
-
},
|
|
30
|
-
maxWidth: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: false,
|
|
33
|
-
default: '2xl',
|
|
34
|
-
},
|
|
35
|
-
gridColumnAmount: {
|
|
36
|
-
type: Number,
|
|
37
|
-
required: true,
|
|
38
|
-
},
|
|
39
|
-
type: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: true,
|
|
42
|
-
},
|
|
43
|
-
title: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: true,
|
|
46
|
-
},
|
|
47
|
-
description: {
|
|
48
|
-
required: true,
|
|
49
|
-
},
|
|
50
|
-
firstButtonText: {
|
|
51
|
-
type: String,
|
|
52
|
-
},
|
|
53
|
-
secondButtonText: {
|
|
54
|
-
type: String,
|
|
55
|
-
},
|
|
56
|
-
thirdButtonText: {
|
|
57
|
-
type: String,
|
|
58
|
-
},
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
const emit = defineEmits([
|
|
62
|
-
'firstModalButtonFunctionDynamicModalBuilder',
|
|
63
|
-
'secondModalButtonFunctionDynamicModalBuilder',
|
|
64
|
-
'thirdModalButtonFunctionDynamicModalBuilder',
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
// first button function
|
|
68
|
-
const firstButtonBuilder = function () {
|
|
69
|
-
emit('firstModalButtonFunctionDynamicModalBuilder')
|
|
70
|
-
}
|
|
71
|
-
// second button function
|
|
72
|
-
const secondButtonBuilder = function () {
|
|
73
|
-
emit('secondModalButtonFunctionDynamicModalBuilder')
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// third button function
|
|
77
|
-
const thirdButtonBuilder = function () {
|
|
78
|
-
emit('thirdModalButtonFunctionDynamicModalBuilder')
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<template>
|
|
83
|
-
<ModalBuilder
|
|
84
|
-
:title="title"
|
|
85
|
-
:showModalBuilder="showDynamicModalBuilder"
|
|
86
|
-
:type="type"
|
|
87
|
-
@closeMainModalBuilder="firstButtonBuilder"
|
|
88
|
-
:maxWidth="maxWidth"
|
|
89
|
-
>
|
|
90
|
-
<slot name="content" />
|
|
91
|
-
|
|
92
|
-
<div
|
|
93
|
-
class="pbx-min-h-32 pbx-h-max pbx-font-sans pbx-w-full pbx-relative pbx-inline-block pbx-align-bottom pbx-text-left pbx-overflow-hidden pbx-transform pbx-transition-all sm:pbx-align-middle"
|
|
94
|
-
>
|
|
95
|
-
<div :class="{ 'pbx-pr-4 pbx-pb-4': !simpleModal }">
|
|
96
|
-
<template v-if="simpleModal !== true">
|
|
97
|
-
<div v-html="description" class="pbx-myPrimaryParagraph pbx-mb-6"></div>
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<slot name="header"></slot>
|
|
101
|
-
|
|
102
|
-
<slot></slot>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<div
|
|
107
|
-
class="pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-mt-4 pbx-flex pbx-items-center pbx-justify-end"
|
|
108
|
-
>
|
|
109
|
-
<div
|
|
110
|
-
v-if="simpleModal !== true && !isLoading"
|
|
111
|
-
class="pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center"
|
|
112
|
-
>
|
|
113
|
-
<slot name="footer" />
|
|
114
|
-
<div
|
|
115
|
-
:class="{
|
|
116
|
-
'sm:pbx-grid-cols-1': gridColumnAmount === 1,
|
|
117
|
-
'sm:pbx-grid-cols-2': gridColumnAmount === 2,
|
|
118
|
-
'sm:pbx-grid-cols-3': gridColumnAmount === 3,
|
|
119
|
-
}"
|
|
120
|
-
class="sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"
|
|
121
|
-
>
|
|
122
|
-
<button
|
|
123
|
-
v-if="firstButtonText"
|
|
124
|
-
ref="firstButtonRef"
|
|
125
|
-
class="pbx-mySecondaryButton"
|
|
126
|
-
type="button"
|
|
127
|
-
@click="firstButtonBuilder"
|
|
128
|
-
>
|
|
129
|
-
{{ firstButtonText }}
|
|
130
|
-
</button>
|
|
131
|
-
|
|
132
|
-
<button
|
|
133
|
-
v-if="secondButtonText"
|
|
134
|
-
class="pbx-myPrimaryButton pbx-bg-yellow-300 hover:pbx-bg-yellow-400 pbx-text-myPrimaryDarkGrayColor hover:pbx-text-myPrimaryDarkGrayColor focus:pbx-ring-yellow-400 pbx-w-full"
|
|
135
|
-
type="button"
|
|
136
|
-
@click="secondButtonBuilder"
|
|
137
|
-
>
|
|
138
|
-
{{ secondButtonText }}
|
|
139
|
-
</button>
|
|
140
|
-
|
|
141
|
-
<button
|
|
142
|
-
v-if="thirdButtonText"
|
|
143
|
-
class="pbx-myPrimaryButton pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor pbx-w-full"
|
|
144
|
-
:class="[
|
|
145
|
-
type === 'danger' || type === 'delete'
|
|
146
|
-
? 'pbx-bg-red-600 focus-visible:pbx-ring-red-600 focus:pbx-ring-red-600 hover:pbx-bg-red-600'
|
|
147
|
-
: 'pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-myPrimaryLinkColor focus:pbx-ring-myPrimaryLinkColor hover:pbx-bg-myPrimaryLinkColor',
|
|
148
|
-
]"
|
|
149
|
-
type="button"
|
|
150
|
-
@click="thirdButtonBuilder"
|
|
151
|
-
>
|
|
152
|
-
{{ thirdButtonText }}
|
|
153
|
-
</button>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<template v-if="isLoading">
|
|
158
|
-
<div class="pbx-flex pbx-items-center pbx-my-2 pbx-py-4 pbx-px-2 pbx-justify-end">
|
|
159
|
-
<div
|
|
160
|
-
class="pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"
|
|
161
|
-
>
|
|
162
|
-
<span
|
|
163
|
-
class="!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"
|
|
164
|
-
>Loading...</span
|
|
165
|
-
>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</template>
|
|
169
|
-
</div>
|
|
170
|
-
</ModalBuilder>
|
|
171
|
-
</template>
|
|
172
|
-
|
|
173
|
-
<style scope>
|
|
174
|
-
/*
|
|
175
|
-
Enter and leave animations can use different
|
|
176
|
-
durations and timing functions.
|
|
177
|
-
*/
|
|
178
|
-
.slide-fade-enter-active {
|
|
179
|
-
transition: all 0.3s ease-out;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.slide-fade-leave-active {
|
|
183
|
-
transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.slide-fade-enter-from,
|
|
187
|
-
.slide-fade-leave-to {
|
|
188
|
-
transform: translateX(20px);
|
|
189
|
-
opacity: 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.bounce-enter-active {
|
|
193
|
-
animation: bounce-in 0.5s;
|
|
194
|
-
}
|
|
195
|
-
.bounce-leave-active {
|
|
196
|
-
animation: bounce-in 0.5s reverse;
|
|
197
|
-
}
|
|
198
|
-
@keyframes bounce-in {
|
|
199
|
-
0% {
|
|
200
|
-
transform: scale(0);
|
|
201
|
-
}
|
|
202
|
-
50% {
|
|
203
|
-
transform: scale(1.25);
|
|
204
|
-
}
|
|
205
|
-
100% {
|
|
206
|
-
transform: scale(1);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
</style>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { provide } from 'vue'
|
|
3
|
-
import DefaultMediaLibraryComponent from '../../tests/DefaultComponents/DefaultMediaLibraryComponent.vue'
|
|
4
|
-
import ModalBuilder from './ModalBuilder.vue'
|
|
5
|
-
|
|
6
|
-
defineProps({
|
|
7
|
-
title: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
description: {
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
firstButtonText: {
|
|
15
|
-
type: String,
|
|
16
|
-
},
|
|
17
|
-
secondButtonText: {
|
|
18
|
-
type: String,
|
|
19
|
-
},
|
|
20
|
-
thirdButtonText: {
|
|
21
|
-
type: String,
|
|
22
|
-
},
|
|
23
|
-
open: {
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
customMediaComponent: {
|
|
27
|
-
type: Object,
|
|
28
|
-
default: null,
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const emit = defineEmits(['firstMediaButtonFunction'])
|
|
33
|
-
|
|
34
|
-
// first button function
|
|
35
|
-
const firstButton = function () {
|
|
36
|
-
emit('firstMediaButtonFunction')
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Provide close function for custom components
|
|
40
|
-
const closeMediaLibraryModal = () => {
|
|
41
|
-
firstButton()
|
|
42
|
-
}
|
|
43
|
-
provide('closeMediaLibraryModal', closeMediaLibraryModal)
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<ModalBuilder
|
|
48
|
-
:title="title"
|
|
49
|
-
:showModalBuilder="open"
|
|
50
|
-
@closeMainModalBuilder="firstButton"
|
|
51
|
-
maxWidth="6xl"
|
|
52
|
-
>
|
|
53
|
-
<!-- Show only custom media component if provided -->
|
|
54
|
-
<div v-if="customMediaComponent" class="pbx-w-full">
|
|
55
|
-
<component :is="customMediaComponent" />
|
|
56
|
-
</div>
|
|
57
|
-
<div v-else>
|
|
58
|
-
<DefaultMediaLibraryComponent />
|
|
59
|
-
</div>
|
|
60
|
-
</ModalBuilder>
|
|
61
|
-
</template>
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
title: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: true,
|
|
8
|
-
},
|
|
9
|
-
showModalBuilder: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false,
|
|
12
|
-
},
|
|
13
|
-
type: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: 'success',
|
|
16
|
-
},
|
|
17
|
-
maxWidth: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '2xl',
|
|
20
|
-
},
|
|
21
|
-
minHeight: {
|
|
22
|
-
type: String,
|
|
23
|
-
},
|
|
24
|
-
maxHeight: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
noBackgroundOpacity: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const emit = defineEmits(['closeMainModalBuilder'])
|
|
33
|
-
|
|
34
|
-
const handleClose = () => {
|
|
35
|
-
emit('closeMainModalBuilder')
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const maxWidthClass = computed(() => {
|
|
39
|
-
return {
|
|
40
|
-
sm: 'lg:pbx-max-w-sm',
|
|
41
|
-
md: 'lg:pbx-max-w-md',
|
|
42
|
-
lg: 'lg:pbx-max-w-lg',
|
|
43
|
-
xl: 'lg:pbx-max-w-xl',
|
|
44
|
-
'2xl': 'lg:pbx-max-w-2xl',
|
|
45
|
-
'3xl': 'lg:pbx-max-w-3xl',
|
|
46
|
-
'4xl': 'lg:pbx-max-w-4xl',
|
|
47
|
-
'5xl': 'lg:pbx-max-w-5xl',
|
|
48
|
-
'6xl': 'lg:pbx-max-w-6xl',
|
|
49
|
-
'7xl': 'lg:pbx-max-w-7xl',
|
|
50
|
-
full: 'lg:pbx-max-w-full', // 100% width
|
|
51
|
-
screen: 'lg:w-screen sm:pbx-max-w-none', // truly full screen
|
|
52
|
-
}[props.maxWidth]
|
|
53
|
-
})
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<teleport to="body">
|
|
58
|
-
<div class="pbx-font-sans">
|
|
59
|
-
<!-- Modal -->
|
|
60
|
-
<div
|
|
61
|
-
v-if="showModalBuilder"
|
|
62
|
-
class="pbx-fixed pbx-inset-0 pbx-z-40 pbx-flex pbx-items-center pbx-justify-center pbx-mx-4"
|
|
63
|
-
role="dialog"
|
|
64
|
-
aria-modal="true"
|
|
65
|
-
aria-labelledby="dialog-title"
|
|
66
|
-
>
|
|
67
|
-
<!-- Backdrop -->
|
|
68
|
-
<div
|
|
69
|
-
class="pbx-fixed pbx-inset-0 pbx-bg-black/50 pbx-transition-opacity"
|
|
70
|
-
:class="[noBackgroundOpacity ? 'pbx-bg-black/100' : '']"
|
|
71
|
-
@click="handleClose"
|
|
72
|
-
></div>
|
|
73
|
-
|
|
74
|
-
<div
|
|
75
|
-
class="pbx-relative pbx-inline-block pbx-bg-white pbx-rounded-xl pbx-text-left pbx-shadow-xl pbx-transform pbx-transition-all pbx-max-w-[96vh] lg:pbx-max-h-[98vh] pbx-max-h-[85vh] pbx-overflow-y-auto pbx-w-full"
|
|
76
|
-
:class="[
|
|
77
|
-
maxWidthClass ? maxWidthClass : '',
|
|
78
|
-
minHeight ? minHeight : '',
|
|
79
|
-
maxHeight ? maxHeight : '',
|
|
80
|
-
]"
|
|
81
|
-
>
|
|
82
|
-
<div
|
|
83
|
-
class="pbx-h-16 pbx-px-4 pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 pbx-mb-2 pbx-flex pbx-items-center pbx-justify-between"
|
|
84
|
-
:class="[
|
|
85
|
-
type === 'success' ? 'pbx-bg-white' : '',
|
|
86
|
-
type === 'warning' ? 'pbx-bg-white' : '',
|
|
87
|
-
type === 'danger' ? 'pbx-bg-white' : '',
|
|
88
|
-
type === 'delete' ? 'pbx-bg-white' : '',
|
|
89
|
-
]"
|
|
90
|
-
>
|
|
91
|
-
<h3
|
|
92
|
-
as="h3"
|
|
93
|
-
class="pbx-myQuaternaryHeader pbx-my-0 pbx-py-0"
|
|
94
|
-
:class="[
|
|
95
|
-
type === 'success' ? 'pbx-text-black' : '',
|
|
96
|
-
type === 'warning' ? 'pbx-text-black' : '',
|
|
97
|
-
type === 'danger' ? 'pbx-text-black' : '',
|
|
98
|
-
type === 'delete' ? 'pbx-text-black' : '',
|
|
99
|
-
]"
|
|
100
|
-
>
|
|
101
|
-
{{ title }}
|
|
102
|
-
</h3>
|
|
103
|
-
<div
|
|
104
|
-
class="pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black"
|
|
105
|
-
@click="handleClose"
|
|
106
|
-
>
|
|
107
|
-
<span class="material-symbols-outlined"> close </span>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="pbx-px-4 pbx-min-h-32">
|
|
111
|
-
<slot></slot>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</teleport>
|
|
117
|
-
</template>
|