@myissue/vue-website-page-builder 3.4.20 → 3.4.22

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.
Files changed (89) hide show
  1. package/README.md +22 -24
  2. package/dist/vue-website-page-builder.js +1 -1
  3. package/dist/vue-website-page-builder.umd.cjs +1 -1
  4. package/package.json +2 -3
  5. package/src/App.vue +0 -28
  6. package/src/Components/Homepage/Footer.vue +0 -32
  7. package/src/Components/Homepage/Navbar.vue +0 -25
  8. package/src/Components/Layouts/FullWidthElement.vue +0 -34
  9. package/src/Components/Loaders/GlobalLoader.vue +0 -18
  10. package/src/Components/Modals/BuilderComponents.vue +0 -53
  11. package/src/Components/Modals/DynamicModalBuilder.vue +0 -209
  12. package/src/Components/Modals/MediaLibraryModal.vue +0 -61
  13. package/src/Components/Modals/ModalBuilder.vue +0 -117
  14. package/src/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue +0 -121
  15. package/src/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue +0 -188
  16. package/src/Components/PageBuilder/EditorMenu/Editables/Borders.vue +0 -176
  17. package/src/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue +0 -112
  18. package/src/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue +0 -108
  19. package/src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue +0 -541
  20. package/src/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue +0 -203
  21. package/src/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue +0 -96
  22. package/src/Components/PageBuilder/EditorMenu/Editables/LinkEditor.vue +0 -315
  23. package/src/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue +0 -107
  24. package/src/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue +0 -106
  25. package/src/Components/PageBuilder/EditorMenu/Editables/Margin.vue +0 -116
  26. package/src/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue +0 -19
  27. package/src/Components/PageBuilder/EditorMenu/Editables/Padding.vue +0 -117
  28. package/src/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue +0 -123
  29. package/src/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue +0 -123
  30. package/src/Components/PageBuilder/EditorMenu/Editables/Typography.vue +0 -237
  31. package/src/Components/PageBuilder/EditorMenu/EditorAccordion.vue +0 -46
  32. package/src/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue +0 -368
  33. package/src/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue +0 -476
  34. package/src/Components/PageBuilder/Settings/PageBuilderSettings.vue +0 -581
  35. package/src/Components/PageBuilder/ToolbarOption/ToolbarOption.vue +0 -248
  36. package/src/Components/PageBuilder/UndoRedo/UndoRedo.vue +0 -90
  37. package/src/Components/TipTap/TipTap.vue +0 -25
  38. package/src/Components/TipTap/TipTapInput.vue +0 -341
  39. package/src/PageBuilder/PageBuilder.vue +0 -1025
  40. package/src/PageBuilder/Preview.vue +0 -64
  41. package/src/composables/builderInstance.ts +0 -47
  42. package/src/composables/delay.ts +0 -5
  43. package/src/composables/extractCleanHTMLFromPageBuilder.ts +0 -59
  44. package/src/composables/preloadImage.ts +0 -8
  45. package/src/composables/useDebounce.ts +0 -8
  46. package/src/composables/usePageBuilderModal.ts +0 -25
  47. package/src/composables/useTranslations.ts +0 -28
  48. package/src/css/dev-global.css +0 -24
  49. package/src/css/style.css +0 -600
  50. package/src/helpers/isEmptyObject.ts +0 -5
  51. package/src/index.ts +0 -28
  52. package/src/locales/ar.json +0 -170
  53. package/src/locales/de.json +0 -171
  54. package/src/locales/en.json +0 -171
  55. package/src/locales/es.json +0 -171
  56. package/src/locales/fr.json +0 -171
  57. package/src/locales/hi.json +0 -172
  58. package/src/locales/ja.json +0 -171
  59. package/src/locales/pt.json +0 -171
  60. package/src/locales/ru.json +0 -171
  61. package/src/locales/zh-Hans.json +0 -171
  62. package/src/main.ts +0 -14
  63. package/src/plugin.ts +0 -16
  64. package/src/services/LocalStorageManager.ts +0 -25
  65. package/src/services/PageBuilderService.ts +0 -3191
  66. package/src/stores/page-builder-state.ts +0 -498
  67. package/src/stores/shared-store.ts +0 -13
  68. package/src/tailwind-safelist.html +0 -3
  69. package/src/tests/DefaultComponents/DefaultBuilderComponents.vue +0 -284
  70. package/src/tests/DefaultComponents/DefaultMediaLibraryComponent.vue +0 -10
  71. package/src/tests/PageBuilderTest.vue +0 -82
  72. package/src/tests/TestComponents/DemoBuilderComponentsTest.vue +0 -5
  73. package/src/tests/TestComponents/DemoMediaLibraryComponentTest.vue +0 -8
  74. package/src/tests/TestComponents/DemoUnsplash.vue +0 -389
  75. package/src/tests/componentsArray.test.json +0 -62
  76. package/src/tests/pageBuilderService.test.ts +0 -165
  77. package/src/types/global.d.ts +0 -11
  78. package/src/types/index.ts +0 -306
  79. package/src/utils/builder/html-doc-declaration-with-components.ts +0 -7
  80. package/src/utils/builder/tailwaind-colors.ts +0 -503
  81. package/src/utils/builder/tailwind-border-radius.ts +0 -67
  82. package/src/utils/builder/tailwind-border-style-width-color.ts +0 -272
  83. package/src/utils/builder/tailwind-font-sizes.ts +0 -75
  84. package/src/utils/builder/tailwind-font-styles.ts +0 -56
  85. package/src/utils/builder/tailwind-opacities.ts +0 -45
  86. package/src/utils/builder/tailwind-padding-margin.ts +0 -159
  87. package/src/utils/html-elements/component.ts +0 -485
  88. package/src/utils/html-elements/componentHelpers.ts +0 -98
  89. package/src/utils/html-elements/themes.ts +0 -85
@@ -1,107 +0,0 @@
1
- <script setup>
2
- import { ref, computed, watch } from 'vue'
3
- import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
- import EditorAccordion from '../EditorAccordion.vue'
5
- import tailwindOpacities from '../../../../utils/builder/tailwind-opacities'
6
- import {
7
- Listbox,
8
- ListboxButton,
9
- ListboxLabel,
10
- ListboxOption,
11
- ListboxOptions,
12
- } from '@headlessui/vue'
13
- import { getPageBuilder } from '../../../../composables/builderInstance'
14
- const pageBuilderService = getPageBuilder()
15
-
16
- // Use shared store instance
17
- const pageBuilderStateStore = sharedPageBuilderStore
18
- const opacityVueModel = ref(null)
19
- const getBackgroundOpacity = computed(() => {
20
- return pageBuilderStateStore.getBackgroundOpacity
21
- })
22
-
23
- watch(
24
- getBackgroundOpacity,
25
- async (newValue) => {
26
- opacityVueModel.value = newValue
27
- await pageBuilderService.initializeElementStyles()
28
- },
29
- { immediate: true },
30
- )
31
- </script>
32
-
33
- <template>
34
- <div class="pbx-my-2 pbx-py-2">
35
- <label for="bg-opacity" class="pbx-myPrimaryInputLabel"> Background Opacity</label>
36
-
37
- <Listbox as="div" v-model="opacityVueModel">
38
- <div class="pbx-relative">
39
- <ListboxButton class="pbx-myPrimarySelect" id="bg-opacity">
40
- <span class="pbx-flex pbx-items-center pbx-gap-2">
41
- <div v-if="opacityVueModel === 'none'">
42
- <div class="pbx-myPrimaryColorPreview pbx-border-none">
43
- <span class="material-symbols-outlined"> ev_shadow </span>
44
- </div>
45
- </div>
46
-
47
- <div
48
- v-if="opacityVueModel !== 'none'"
49
- class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
50
- :class="`${opacityVueModel}`"
51
- ></div>
52
-
53
- <span class="pbx-block pbx-truncate" :class="[opacityVueModel !== 'none' ? '' : '']">{{
54
- opacityVueModel === 'none' ? 'Transparent' : opacityVueModel
55
- }}</span>
56
- </span>
57
- </ListboxButton>
58
-
59
- <transition
60
- leave-active-class="pbx-transition pbx-ease-in pbx-duration-100"
61
- leave-from-class="pbx-opacity-100"
62
- leave-to-class="pbx-opacity-0"
63
- >
64
- <ListboxOptions
65
- class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"
66
- >
67
- <ListboxOption
68
- as="template"
69
- v-for="backgroundOpacity in tailwindOpacities.backgroundOpacities"
70
- @click="pageBuilderService.handleBackgroundOpacity(backgroundOpacity)"
71
- :key="backgroundOpacity"
72
- :value="backgroundOpacity"
73
- v-slot="{ active }"
74
- >
75
- <li
76
- :class="[
77
- active
78
- ? 'pbx-bg-myPrimaryLinkColor text-white'
79
- : 'pbx-text-myPrimaryDarkGrayColor',
80
- 'pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9',
81
- ]"
82
- >
83
- <div class="pbx-flex pbx-items-center">
84
- <div v-if="backgroundOpacity === 'none'">
85
- <div class="pbx-myPrimaryColorPreview pbx-border-none">
86
- <span class="material-symbols-outlined"> ev_shadow </span>
87
- </div>
88
- </div>
89
-
90
- <div
91
- v-if="backgroundOpacity !== 'none'"
92
- class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
93
- :class="`${backgroundOpacity}`"
94
- ></div>
95
- <span v-if="backgroundOpacity === 'none'" class="pbx-ml-3">Transparent</span>
96
- <span v-if="backgroundOpacity !== 'none'" class="pbx-ml-3">{{
97
- backgroundOpacity
98
- }}</span>
99
- </div>
100
- </li>
101
- </ListboxOption>
102
- </ListboxOptions>
103
- </transition>
104
- </div>
105
- </Listbox>
106
- </div>
107
- </template>
@@ -1,106 +0,0 @@
1
- <script setup>
2
- import { ref, computed, watch } from 'vue'
3
- import tailwindOpacities from '../../../../utils/builder/tailwind-opacities'
4
- import {
5
- Listbox,
6
- ListboxButton,
7
- ListboxLabel,
8
- ListboxOption,
9
- ListboxOptions,
10
- } from '@headlessui/vue'
11
- import { sharedPageBuilderStore } from '../../../../stores/shared-store'
12
- import { getPageBuilder } from '../../../../composables/builderInstance'
13
- const pageBuilderService = getPageBuilder()
14
-
15
- // Use shared store instance
16
- const pageBuilderStateStore = sharedPageBuilderStore
17
- const opacityVueModel = ref(null)
18
- const getOpacity = computed(() => {
19
- return pageBuilderStateStore.getOpacity
20
- })
21
-
22
- watch(
23
- getOpacity,
24
- async (newValue) => {
25
- opacityVueModel.value = newValue
26
- await pageBuilderService.initializeElementStyles()
27
- },
28
- { immediate: true },
29
- )
30
- </script>
31
-
32
- <template>
33
- <div class="pbx-my-2 pbx-py-2">
34
- <label for="default-opacity" class="pbx-myPrimaryInputLabel"> Opacity</label>
35
-
36
- <Listbox as="div" v-model="opacityVueModel">
37
- <div class="pbx-relative">
38
- <ListboxButton class="pbx-myPrimarySelect" id="default-opacity">
39
- <span class="pbx-flex pbx-items-center pbx-gap-2">
40
- <div v-if="opacityVueModel === 'none'">
41
- <div class="pbx-myPrimaryColorPreview pbx-border-none">
42
- <span class="material-symbols-outlined"> ev_shadow </span>
43
- </div>
44
- </div>
45
-
46
- <div
47
- v-if="opacityVueModel !== 'none'"
48
- class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
49
- :class="`${opacityVueModel}`"
50
- ></div>
51
-
52
- <span class="pbx-block pbx-truncate" :class="[opacityVueModel !== 'none' ? '' : '']">{{
53
- opacityVueModel === 'none' ? 'Transparent' : opacityVueModel
54
- }}</span>
55
- </span>
56
- </ListboxButton>
57
-
58
- <transition
59
- leave-active-class="pbx-transition pbx-ease-in pbx-duration-100"
60
- leave-from-class="pbx-opacity-100"
61
- leave-to-class="pbx-opacity-0"
62
- >
63
- <ListboxOptions
64
- class="pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"
65
- >
66
- <ListboxOption
67
- as="template"
68
- v-for="elementOpacity in tailwindOpacities.opacities"
69
- @click="pageBuilderService.handleOpacity(elementOpacity)"
70
- :key="elementOpacity"
71
- :value="elementOpacity"
72
- v-slot="{ active }"
73
- >
74
- <li
75
- :class="[
76
- active
77
- ? 'pbx-bg-myPrimaryLinkColor text-white'
78
- : 'pbx-text-myPrimaryDarkGrayColor',
79
- 'pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9',
80
- ]"
81
- >
82
- <div class="pbx-flex pbx-items-center">
83
- <div v-if="elementOpacity === 'none'">
84
- <div class="pbx-myPrimaryColorPreview pbx-border-none">
85
- <span class="material-symbols-outlined"> ev_shadow </span>
86
- </div>
87
- </div>
88
-
89
- <div
90
- v-if="elementOpacity !== 'none'"
91
- class="pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950"
92
- :class="`${elementOpacity}`"
93
- ></div>
94
- <span v-if="elementOpacity === 'none'" class="pbx-ml-3">Transparent</span>
95
- <span v-if="elementOpacity !== 'none'" class="pbx-ml-3">{{
96
- elementOpacity
97
- }}</span>
98
- </div>
99
- </li>
100
- </ListboxOption>
101
- </ListboxOptions>
102
- </transition>
103
- </div>
104
- </Listbox>
105
- </div>
106
- </template>
@@ -1,116 +0,0 @@
1
- <script setup>
2
- import { ref, computed, watch } from 'vue'
3
- import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
- import EditorAccordion from '../EditorAccordion.vue'
5
- import tailwindPaddingPlusMargin from '../../../../utils/builder/tailwind-padding-margin'
6
- import { getPageBuilder } from '../../../../composables/builderInstance'
7
- import { useTranslations } from '../../../../composables/useTranslations'
8
-
9
- const { translate } = useTranslations()
10
- const pageBuilderService = getPageBuilder()
11
-
12
- // Use shared store instance
13
- const pageBuilderStateStore = sharedPageBuilderStore
14
-
15
- const fontVerticalPadding = ref(null)
16
- const fontHorizontalPadding = ref(null)
17
- const fontVerticalMargin = ref(null)
18
- const fontHorizontalMargin = ref(null)
19
- const getFontVerticalPadding = computed(() => {
20
- return pageBuilderStateStore.getFontVerticalPadding
21
- })
22
- const getFontHorizontalPadding = computed(() => {
23
- return pageBuilderStateStore.getFontHorizontalPadding
24
- })
25
- const getFontVerticalMargin = computed(() => {
26
- return pageBuilderStateStore.getFontVerticalMargin
27
- })
28
- const getFontHorizontalMargin = computed(() => {
29
- return pageBuilderStateStore.getFontHorizontalMargin
30
- })
31
-
32
- watch(
33
- getFontVerticalPadding,
34
- async (newValue) => {
35
- fontVerticalPadding.value = newValue
36
- await pageBuilderService.initializeElementStyles()
37
- },
38
- { immediate: true },
39
- )
40
- watch(
41
- getFontHorizontalPadding,
42
- async (newValue) => {
43
- fontHorizontalPadding.value = newValue
44
- await pageBuilderService.initializeElementStyles()
45
- },
46
- { immediate: true },
47
- )
48
- watch(
49
- getFontVerticalMargin,
50
- async (newValue) => {
51
- fontVerticalMargin.value = newValue
52
- await pageBuilderService.initializeElementStyles()
53
- },
54
- { immediate: true },
55
- )
56
- watch(
57
- getFontHorizontalMargin,
58
- async (newValue) => {
59
- fontHorizontalMargin.value = newValue
60
- await pageBuilderService.initializeElementStyles()
61
- },
62
- { immediate: true },
63
- )
64
- </script>
65
- <template>
66
- <EditorAccordion>
67
- <template #title>{{ translate('Margin') }}</template>
68
- <template #content>
69
- <div class="pbx-my-2 pbx-py-2">
70
- <div class="pbx-pt-4 pbx-pb-2 pbx-mb-4">
71
- <p class="pbx-myPrimaryInputLabel pbx-font-medium pbx-italic">
72
- {{ translate('Large Screens Only') }}
73
- </p>
74
- <hr />
75
- </div>
76
- <label for="vertical-margin" class="pbx-myPrimaryInputLabel">{{
77
- translate('Vertical Margin')
78
- }}</label>
79
- <select
80
- id="vertical-margin"
81
- v-model="fontVerticalMargin"
82
- class="pbx-myPrimarySelect"
83
- @change="pageBuilderService.handleVerticalMargin(fontVerticalMargin)"
84
- >
85
- <option disabled value="">{{ translate('Select') }}</option>
86
- <option
87
- v-for="verticalMargin in tailwindPaddingPlusMargin.verticalMargin"
88
- :key="verticalMargin"
89
- >
90
- {{ verticalMargin }}
91
- </option>
92
- </select>
93
- </div>
94
- <hr />
95
- <div class="pbx-my-2 pbx-py-2">
96
- <label for="horizontal-margin" class="pbx-myPrimaryInputLabel">{{
97
- translate('Horizontal Margin')
98
- }}</label>
99
- <select
100
- id="horizontal-margin"
101
- v-model="fontHorizontalMargin"
102
- class="pbx-myPrimarySelect"
103
- @change="pageBuilderService.handleHorizontalMargin(fontHorizontalMargin)"
104
- >
105
- <option disabled value="">{{ translate('Select') }}</option>
106
- <option
107
- v-for="horizontalMargin in tailwindPaddingPlusMargin.horizontalMargin"
108
- :key="horizontalMargin"
109
- >
110
- {{ horizontalMargin }}
111
- </option>
112
- </select>
113
- </div>
114
- </template>
115
- </EditorAccordion>
116
- </template>
@@ -1,19 +0,0 @@
1
- <script setup>
2
- import EditorAccordion from '../EditorAccordion.vue'
3
- import ManageBackgroundOpacity from './ManageBackgroundOpacity.vue'
4
- import ManageOpacity from './ManageOpacity.vue'
5
- import { useTranslations } from '../../../../composables/useTranslations'
6
-
7
- const { translate } = useTranslations()
8
- </script>
9
-
10
- <template>
11
- <EditorAccordion>
12
- <template #title>{{ translate('Opacity & Transparency') }}</template>
13
- <template #content>
14
- <ManageOpacity></ManageOpacity>
15
- <hr />
16
- <ManageBackgroundOpacity></ManageBackgroundOpacity>
17
- </template>
18
- </EditorAccordion>
19
- </template>
@@ -1,117 +0,0 @@
1
- <script setup>
2
- import { ref, computed, watch } from 'vue'
3
- import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
- import EditorAccordion from '../EditorAccordion.vue'
5
- import tailwindPaddingPlusMargin from '../../../../utils/builder/tailwind-padding-margin'
6
- import { getPageBuilder } from '../../../../composables/builderInstance'
7
- import { useTranslations } from '../../../../composables/useTranslations'
8
-
9
- const { translate } = useTranslations()
10
-
11
- const pageBuilderService = getPageBuilder()
12
-
13
- // Use shared store instance
14
- const pageBuilderStateStore = sharedPageBuilderStore
15
-
16
- const fontVerticalPadding = ref(null)
17
- const fontHorizontalPadding = ref(null)
18
- const fontVerticalMargin = ref(null)
19
- const fontHorizontalMargin = ref(null)
20
- const getFontVerticalPadding = computed(() => {
21
- return pageBuilderStateStore.getFontVerticalPadding
22
- })
23
- const getFontHorizontalPadding = computed(() => {
24
- return pageBuilderStateStore.getFontHorizontalPadding
25
- })
26
- const getFontVerticalMargin = computed(() => {
27
- return pageBuilderStateStore.getFontVerticalMargin
28
- })
29
- const getFontHorizontalMargin = computed(() => {
30
- return pageBuilderStateStore.getFontHorizontalMargin
31
- })
32
-
33
- watch(
34
- getFontVerticalPadding,
35
- async (newValue) => {
36
- fontVerticalPadding.value = newValue
37
- await pageBuilderService.initializeElementStyles()
38
- },
39
- { immediate: true },
40
- )
41
- watch(
42
- getFontHorizontalPadding,
43
- async (newValue) => {
44
- fontHorizontalPadding.value = newValue
45
- await pageBuilderService.initializeElementStyles()
46
- },
47
- { immediate: true },
48
- )
49
- watch(
50
- getFontVerticalMargin,
51
- async (newValue) => {
52
- fontVerticalMargin.value = newValue
53
- await pageBuilderService.initializeElementStyles()
54
- },
55
- { immediate: true },
56
- )
57
- watch(
58
- getFontHorizontalMargin,
59
- async (newValue) => {
60
- fontHorizontalMargin.value = newValue
61
- await pageBuilderService.initializeElementStyles()
62
- },
63
- { immediate: true },
64
- )
65
- </script>
66
- <template>
67
- <EditorAccordion>
68
- <template #title>{{ translate('Padding') }}</template>
69
- <template #content>
70
- <div class="pbx-my-2 pbx-py-2">
71
- <div class="pbx-pt-4 pbx-pb-2 pbx-mb-4">
72
- <p class="pbx-myPrimaryInputLabel pbx-font-medium pbx-italic">
73
- {{ translate('Large Screens Only') }}
74
- </p>
75
- <hr />
76
- </div>
77
- <label for="vertical-padding" class="pbx-myPrimaryInputLabel">{{
78
- translate('Vertical Padding')
79
- }}</label>
80
- <select
81
- id="vertical-padding"
82
- v-model="fontVerticalPadding"
83
- class="pbx-myPrimarySelect"
84
- @change="pageBuilderService.handleVerticalPadding(fontVerticalPadding)"
85
- >
86
- <option disabled value="">{{ translate('Select') }}</option>
87
- <option
88
- v-for="verticalPadding in tailwindPaddingPlusMargin.verticalPadding"
89
- :key="verticalPadding"
90
- >
91
- {{ verticalPadding }}
92
- </option>
93
- </select>
94
- </div>
95
- <hr />
96
- <div class="pbx-my-2 pbx-py-2">
97
- <label for="horizontal-padding" class="pbx-myPrimaryInputLabel">{{
98
- translate('Horizontal Padding')
99
- }}</label>
100
- <select
101
- id="horizontal-padding"
102
- v-model="fontHorizontalPadding"
103
- class="pbx-myPrimarySelect"
104
- @change="pageBuilderService.handleHorizontalPadding(fontHorizontalPadding)"
105
- >
106
- <option disabled value="">{{ translate('Select') }}</option>
107
- <option
108
- v-for="horizontalPadding in tailwindPaddingPlusMargin.horizontalPadding"
109
- :key="horizontalPadding"
110
- >
111
- {{ horizontalPadding }}
112
- </option>
113
- </select>
114
- </div>
115
- </template>
116
- </EditorAccordion>
117
- </template>
@@ -1,123 +0,0 @@
1
- <script setup>
2
- import { ref, computed, watch } from 'vue'
3
- import { sharedPageBuilderStore } from '../../../../stores/shared-store'
4
- import EditorAccordion from '../EditorAccordion.vue'
5
- import { getPageBuilder } from '../../../../composables/builderInstance'
6
- import { useTranslations } from '../../../../composables/useTranslations'
7
-
8
- const { translate } = useTranslations()
9
- const pageBuilderService = getPageBuilder()
10
-
11
- const pageBuilderStateStore = sharedPageBuilderStore
12
-
13
- const currentStyles = ref(null)
14
- const getCurrentStyles = computed(() => pageBuilderStateStore.getCurrentStyles)
15
-
16
- watch(
17
- getCurrentStyles,
18
- (newValue) => {
19
- currentStyles.value = newValue
20
- },
21
- { immediate: true },
22
- )
23
-
24
- const inputProperty = ref('')
25
- const inputValue = ref('')
26
- const errorMessage = ref('')
27
- const valueInputRef = ref(null)
28
-
29
- const handleEnterOnProperty = () => {
30
- if (valueInputRef.value) {
31
- valueInputRef.value.focus()
32
- }
33
- }
34
-
35
- const handleAddStyle = async () => {
36
- const property = inputProperty.value.trim()
37
- const value = inputValue.value.trim()
38
-
39
- if (!property || !value) {
40
- errorMessage.value = 'Please enter a property and a value.'
41
- return
42
- }
43
-
44
- if (currentStyles.value && currentStyles.value[property]) {
45
- errorMessage.value = `Property "${property}" already exists. Remove it first to add a new one.`
46
- return
47
- }
48
-
49
- errorMessage.value = '' // Clear error
50
-
51
- pageBuilderService.handleAddStyle(property, value)
52
- await pageBuilderService.initializeElementStyles()
53
-
54
- inputProperty.value = ''
55
- inputValue.value = ''
56
- }
57
- </script>
58
-
59
- <template>
60
- <EditorAccordion>
61
- <template #title>{{ translate('Inline Styles') }}</template>
62
- <template #content>
63
- <p class="pbx-myPrimaryInputLabel pbx-my-4">
64
- {{
65
- translate(
66
- 'These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.',
67
- )
68
- }}
69
- </p>
70
-
71
- <div class="pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4">
72
- <div
73
- v-for="(value, key) in currentStyles"
74
- :key="key"
75
- class="pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium"
76
- @click="
77
- async () => {
78
- pageBuilderService.handleRemoveStyle(key)
79
- await pageBuilderService.initializeElementStyles()
80
- }
81
- "
82
- >
83
- <div class="pbx-flex pbx-items-center pbx-gap-1">
84
- <span class="pbx-mr-1"> {{ key }}: {{ value }}; </span>
85
- </div>
86
- </div>
87
- </div>
88
-
89
- <hr />
90
- <div class="pbx-my-2 pbx-py-2">
91
- <label for="custom-style-property" class="pbx-myPrimaryInputLabel">
92
- {{ translate('Add your own style.') }}
93
- </label>
94
- <div class="pbx-flex pbx-gap-2 pbx-flex-col pbx-item-center">
95
- <input
96
- id="custom-style-property"
97
- v-model="inputProperty"
98
- type="text"
99
- :placeholder="translate('property')"
100
- @keydown.enter.prevent="handleEnterOnProperty"
101
- autocomplete="off"
102
- class="pbx-myPrimaryInput"
103
- />
104
- <input
105
- id="custom-style-value"
106
- ref="valueInputRef"
107
- v-model="inputValue"
108
- type="text"
109
- :placeholder="translate('value')"
110
- @keydown.enter="handleAddStyle"
111
- autocomplete="off"
112
- class="pbx-myPrimaryInput"
113
- />
114
-
115
- <button @click="handleAddStyle" type="button" class="pbx-myPrimaryButton">
116
- {{ translate('Add') }}
117
- </button>
118
- </div>
119
- </div>
120
- <p v-if="errorMessage" class="pbx-myPrimaryInputError">{{ errorMessage }}</p>
121
- </template>
122
- </EditorAccordion>
123
- </template>