PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / views / admin / customize / pages / CustomizeStepNew.vue
ameliabooking / v3 / src / views / admin / customize / pages Last commit date
CustomizeCatalog.vue 1 month ago CustomizeCustomerPanel.vue 1 month ago CustomizeEmployeePanel.vue 1 month ago CustomizeEventCalendar.vue 1 month ago CustomizeEventList.vue 1 month ago CustomizeStepNew.vue 2 days ago
CustomizeStepNew.vue
862 lines
1 <template>
2 <div
3 v-if="isLoaded"
4 id="amelia-container"
5 ref="ameliaContainer"
6 class="am-fs__wrapper"
7 :class="{ 'am-collapsed': sidebarCollapsed }"
8 :style="cssVars"
9 >
10 <SideBar
11 v-if="sidebarVisibility && containerWidth > 560"
12 class="am-fs-sb"
13 :class="{ 'am-collapsed': sidebarCollapsed }"
14 :style="{
15 width: !sidebarCollapsed ? '240px' : '72px',
16 paddingBottom: `${sidebarFooterHeight + 16}px`,
17 }"
18 >
19 <template #step-list>
20 <div class="am-fs-sb__step-wrapper" tabindex="0">
21 <template v-if="stepsArray[stepIndex] !== congratulationsStep">
22 <div v-for="step in sidebarSteps" :key="step.label" class="am-fs-sb__step">
23 <div class="am-fs-sb__step-inner">
24 <div class="am-fs-sb__step-icon">
25 <span :class="`am-icon-${step.icon}`"></span>
26 <span
27 v-if="step.key === 'cartStep'"
28 class="am-fs-sb__step-icon__number"
29 :class="sidebarCollapseItemsClass"
30 >
31 3
32 </span>
33 </div>
34 <transition name="fade">
35 <p
36 v-if="!sidebarCollapsed"
37 class="am-fs-sb__step-heading"
38 :class="sidebarCollapseItemsClass"
39 >
40 {{ step.label }}
41 </p>
42 </transition>
43 <div
44 class="am-fs-sb__step-checker"
45 :class="[
46 { 'am-fs-sb__step-checker-selected': step.selected },
47 sidebarCollapseItemsClass,
48 ]"
49 >
50 <transition name="fade">
51 <span v-if="step.finished" class="am-icon-check"></span>
52 </transition>
53 </div>
54 </div>
55 <TransitionGroup
56 tag="span"
57 name="fade"
58 appear
59 class="am-fs-sb__step-selection__wrapper"
60 :class="{
61 'am-fs-sb__step-selection-packages':
62 step.key === packageAppointmentsStep.key && step.stepSelectedData.length > 3,
63 }"
64 >
65 <p
66 v-for="(itemSelected, index) in step.stepSelectedData"
67 :key="itemSelected.position"
68 class="am-fs-sb__step-selection"
69 >
70 <span v-if="step.key !== packageAppointmentsStep.key || index < 3">
71 {{ itemSelected.value }}
72 </span>
73 <span v-else>
74 {{ labelsDisplay('plus_more', 'sidebar') }}
75 </span>
76 </p>
77 </TransitionGroup>
78 </div>
79 </template>
80 <template v-else>
81 <div>
82 <transition name="fade">
83 <AddToCalendar
84 v-if="!sidebarCollapsed"
85 :use-in-sb="true"
86 :calendar-string="labelsDisplay('add_to_calendar', 'congratulations')"
87 ></AddToCalendar>
88 </transition>
89 <div v-if="sidebarCollapsed" class="am-fs-sb__step">
90 <div class="am-fs-sb__step-inner">
91 <div class="am-fs-sb__step-icon">
92 <span class="am-icon-pennant"></span>
93 </div>
94 <div
95 class="am-fs-sb__step-checker am-fs-sb__step-checker-selected"
96 :class="sidebarCollapseItemsClass"
97 >
98 <transition name="fade">
99 <span class="am-icon-check"></span>
100 </transition>
101 </div>
102 </div>
103 </div>
104 </div>
105 </template>
106 </div>
107 </template>
108 <template #support-info>
109 <div ref="sidebarFooterRef" class="am-fs-sb__footer">
110 <div
111 v-if="
112 amCustomize[pageRenderKey].sidebar.options.supportHeading.visibility ||
113 amCustomize[pageRenderKey].sidebar.options.companyPhone.visibility ||
114 amCustomize[pageRenderKey].sidebar.options.companyEmail.visibility
115 "
116 class="am-fs-sb__support"
117 >
118 <transition name="fade">
119 <div
120 v-if="
121 !sidebarCollapsed &&
122 amCustomize[pageRenderKey].sidebar.options.supportHeading.visibility
123 "
124 class="am-fs-sb__support-heading"
125 :class="sidebarCollapseItemsClass"
126 >
127 {{ labelsDisplay('get_in_touch', 'sidebar') }}
128 </div>
129 </transition>
130 <div
131 v-if="amCustomize[pageRenderKey].sidebar.options.companyPhone.visibility"
132 class="am-fs-sb__support-email"
133 >
134 <template v-if="!sidebarCollapsed"> +111222333 </template>
135 <template v-else>
136 <span class="am-icon-phone"></span>
137 </template>
138 </div>
139 <div
140 v-if="amCustomize[pageRenderKey].sidebar.options.companyEmail.visibility"
141 class="am-fs-sb__support-email"
142 >
143 <template v-if="!sidebarCollapsed"> {{ supportEmail }} </template>
144 <template v-else>
145 <span class="am-icon-email"></span>
146 </template>
147 </div>
148 </div>
149 <div
150 class="am-fs-sb__menu"
151 :class="sidebarCollapseItemsClass"
152 @click="sidebarCollapsed = !sidebarCollapsed"
153 >
154 <Transition name="fade">
155 <span v-if="!sidebarCollapsed" class="am-fs-sb__menu-text">
156 {{ labelsDisplay('collapse_menu', 'sidebar') }}
157 </span>
158 </Transition>
159 <span :class="`am-icon-arrow-circle-${sidebarCollapsed ? 'left' : 'right'}`"></span>
160 </div>
161 </div>
162 </template>
163 </SideBar>
164 <MainContent class="am-fs__main">
165 <template v-if="stepsArray[stepIndex] !== congratulationsStep" #header>
166 <MainContentHeader
167 :sidebar-visible="amCustomize.sbsNew.sidebar.options.self.visibility"
168 ></MainContentHeader>
169 </template>
170 <template #step>
171 <component :is="stepsArray[stepIndex]" class="am-fs__main-content"></component>
172 </template>
173 <template #footer>
174 <MainContentFooter
175 :customized-labels="globalStepLabels()"
176 :primary-footer-button-type="
177 amCustomize[pageRenderKey][stepName].options.primaryFooterButton.buttonType
178 "
179 :secondary-footer-button-type="footerButtonType"
180 :second-button-show="
181 !licence.isLite ? stepsArray[stepIndex] === congratulationsStep : false
182 "
183 :add-to-cart-button-show="stepsArray[stepIndex] === cartStep"
184 :add-to-cart-button-type="
185 amCustomize[pageRenderKey].cartStep.options.addToCart.buttonType
186 "
187 :back-to-cart-button-show="
188 !licence.isLite && !licence.isStarter && !licence.isBasic
189 ? stepsArray.indexOf(cartStep) > stepIndex
190 : false
191 "
192 :back-to-cart-button-type="
193 amCustomize[pageRenderKey].cartStep.options.backToCart.buttonType
194 "
195 :back-to-cart-label="dedicatedStepLabel('cancel', 'cartStep')"
196 ></MainContentFooter>
197 </template>
198 </MainContent>
199 </div>
200 </template>
201
202 <script setup>
203 // * Form construction
204 import SideBar from '../../../common/SbsFormConstruction/SideBar/SideBar.vue'
205 import MainContent from '../../../common/SbsFormConstruction/MainContent/MainContent.vue'
206 import MainContentHeader from '../../../common/SbsFormConstruction/MainContent/parts/MainContentHeader.vue'
207 import MainContentFooter from '../../../common/SbsFormConstruction/MainContent/parts/MainContentFooter.vue'
208
209 // * Parts
210 import AddToCalendar from '../steps/parts/AddToCalendar.vue'
211
212 // * Step components
213 import InitStep from '../steps/StepForm/InitStep.vue'
214 import ServiceStep from '../steps/StepForm/ServiceStep.vue'
215 import EmployeeStep from '../steps/StepForm/EmployeeStep.vue'
216 import LocationStep from '../steps/StepForm/LocationStep.vue'
217 import Extras from '../steps/StepForm/Extras.vue'
218 import DateTimeStep from '../steps/StepForm/DateTimeStep.vue'
219 import CartStep from '../steps/StepForm/CartStep.vue'
220 import RecurringStep from '../steps/StepForm/RecurringStep.vue'
221 import RecurringSummary from '../steps/StepForm/RecurringSummary.vue'
222 import InfoStep from '../steps/StepForm/InfoStep.vue'
223 import PaymentStep from '../steps/StepForm/PaymentStep.vue'
224 import Congratulations from '../steps/StepForm/Congratulations.vue'
225 import PackageStep from '../steps/StepForm/PackageStep.vue'
226 import PackageInfoStep from '../steps/StepForm/PackageInfoStep.vue'
227 import PackageAppointmentsStep from '../steps/StepForm/PackageAppointmentsStep.vue'
228 import PackageAppointmentsListStep from '../steps/StepForm/PackageAppointmentsListStep.vue'
229
230 // * Import from Vue
231 import {
232 ref,
233 provide,
234 inject,
235 markRaw,
236 watch,
237 watchEffect,
238 computed,
239 onBeforeMount,
240 onMounted,
241 onUnmounted,
242 nextTick,
243 } from 'vue'
244
245 import { useElementSize } from '@vueuse/core'
246
247 // * Import composables
248 import { defaultCustomizeSettings } from '../../../../assets/js/common/defaultCustomize.js'
249 import { useReactiveCustomize } from '../../../../assets/js/admin/useReactiveCustomize.js'
250 import { getSupportEmail } from '../../../../assets/js/common/whiteLabel.js'
251
252 let loading = ref(false)
253 provide('loading', loading)
254
255 // * Plugin Licence
256 let licence = inject('licence')
257
258 // * Base Urls
259 const baseUrls = inject('baseUrls')
260
261 // * Settings
262 const amSettings = inject('settings')
263 const supportEmail = computed(() => getSupportEmail(amSettings))
264
265 // * Layout
266 let flowLayout = useReactiveCustomize().flowLayout
267
268 // * Bookable Type
269 let bookableType = useReactiveCustomize().bookableType
270 provide('bookableType', bookableType)
271
272 // * Global Labels
273 const amLabels = inject('labels')
274
275 // * Features integrations
276 let features = useReactiveCustomize().features
277 provide('features', features)
278
279 // * Selected Language
280 let langKey = useReactiveCustomize().langKey
281 provide('langKey', langKey)
282
283 // * Step index
284 let { stepIndex } = useReactiveCustomize()
285 provide('stepIndex', stepIndex)
286
287 // * Page Render Key
288 let pageRenderKey = ref('sbsNew')
289 provide('pageRenderKey', pageRenderKey)
290
291 // * Step Name
292 let { stepName } = useReactiveCustomize()
293 provide('stepName', stepName)
294
295 let subStepName = useReactiveCustomize().subStepName
296 provide('subStepName', subStepName)
297
298 // Use the reactive customize composable
299 const { amCustomize } = useReactiveCustomize()
300 provide('customize', amCustomize)
301
302 let amFonts = computed(() => {
303 return amCustomize.value.fonts
304 })
305 provide('amFonts', amFonts)
306
307 let isLoaded = ref(false)
308
309 onMounted(() => {
310 window.customizeComponentLoaded = true
311
312 if (typeof window.stylesInjectedV3 === 'function') {
313 if (window.v3.componentToMount === 'CustomizeStepNew') {
314 window.stylesInjectedV3 = () => {
315 nextTick().then(() => {
316 isLoaded.value = true
317 })
318 }
319 }
320 }
321 })
322
323 onUnmounted(() => {
324 window.customizeComponentLoaded = false
325 // Reset to no-op function
326 window.stylesInjectedV3 = async function () {}
327 })
328
329 // * Form Sidebar Collapse
330 let sidebarCollapsed = ref(false)
331
332 let sidebarCollapseItemsClass = ref('')
333
334 watch(sidebarCollapsed, (current) => {
335 if (current) {
336 setTimeout(() => {
337 sidebarCollapseItemsClass.value = 'am-collapsed'
338 }, 1000)
339 } else {
340 sidebarCollapseItemsClass.value = ''
341 }
342 })
343
344 let sidebarFooterRef = ref(null)
345 const { height: sideFooterHeight } = useElementSize(sidebarFooterRef)
346
347 let sidebarFooterHeight = computed(() => {
348 return sideFooterHeight.value
349 })
350
351 const initStep = markRaw(InitStep)
352 const serviceStep = markRaw(ServiceStep)
353 const employeeStep = markRaw(EmployeeStep)
354 const locationStep = markRaw(LocationStep)
355 const extras = markRaw(Extras)
356 const dateTimeStep = markRaw(DateTimeStep)
357 const cartStep = markRaw(CartStep)
358 const recurringStep = markRaw(RecurringStep)
359 const recurringSummary = markRaw(RecurringSummary)
360 const infoStep = markRaw(InfoStep)
361 const paymentStep = markRaw(PaymentStep)
362 const congratulationsStep = markRaw(Congratulations)
363 const packageStep = markRaw(PackageStep)
364 const packageInfoStep = markRaw(PackageInfoStep)
365 const packageAppointmentsStep = markRaw(PackageAppointmentsStep)
366 const packageAppointmentsListStep = markRaw(PackageAppointmentsListStep)
367
368 let footerButtonType = computed(() => {
369 return amCustomize.value[pageRenderKey.value][stepName.value].options.secondaryFooterButton
370 ? amCustomize.value[pageRenderKey.value][stepName.value].options.secondaryFooterButton
371 .buttonType
372 : 'text'
373 })
374
375 let stepOrder = computed(() => {
376 return amCustomize.value[pageRenderKey.value].order
377 })
378
379 let serviceFlow = computed(() => {
380 let values = []
381
382 if (flowLayout.value === 1) {
383 values.push(initStep)
384 } else {
385 stepOrder.value.forEach((item) => {
386 if (item.id === 'ServiceStep') values.push(serviceStep)
387 if (
388 item.id === 'EmployeeStep' &&
389 (licence.isStarter || licence.isBasic || licence.isPro || licence.isDeveloper)
390 )
391 values.push(employeeStep)
392 if (item.id === 'LocationStep' && (licence.isBasic || licence.isPro || licence.isDeveloper))
393 values.push(locationStep)
394 })
395 }
396
397 if (features.value.extras) {
398 values.push(extras)
399 }
400
401 values.push(dateTimeStep)
402
403 if (features.value.cart) {
404 values.push(cartStep)
405 }
406
407 if (features.value.recurringAppointments) {
408 values.push(recurringStep)
409
410 values.push(recurringSummary)
411 }
412
413 values.push(infoStep)
414
415 values.push(paymentStep)
416
417 values.push(congratulationsStep)
418
419 return values
420 })
421
422 let packageFlow = [
423 packageStep,
424 packageInfoStep,
425 packageAppointmentsStep,
426 packageAppointmentsListStep,
427 infoStep,
428 paymentStep,
429 congratulationsStep,
430 ]
431
432 let stepsArray = computed(() => {
433 if (bookableType.value === 'package') {
434 return packageFlow
435 }
436
437 return serviceFlow.value
438 })
439
440 // * Array of Sidebar steps
441 const sidebarSteps = ref([])
442 provide('sidebarSteps', sidebarSteps)
443
444 // * Monitoring step index for step selection
445 watch(stepIndex, (currStepIndex) => {
446 if (
447 'key' in stepsArray.value[stepIndex.value] &&
448 currStepIndex in sidebarSteps.value &&
449 'selected' in sidebarSteps.value[currStepIndex] &&
450 'finished' in sidebarSteps.value[currStepIndex] &&
451 stepsArray.value[stepIndex.value].key !== 'congratulations'
452 ) {
453 sidebarSteps.value[currStepIndex].selected = true
454 sidebarSteps.value[currStepIndex].finished = true
455 }
456 })
457
458 /**
459 * Collecting and rearranging selected data in form sidebar based on item position in form
460 * @param data
461 */
462 function sidebarDataCollector(data) {
463 // Determines are selected data already exists
464 if (
465 sidebarSteps.value[stepIndex.value].stepSelectedData.filter(
466 (item) => item.reference === data.reference,
467 ).length
468 ) {
469 sidebarSteps.value[stepIndex.value].stepSelectedData.forEach((item, index, array) => {
470 // Handles changing value of existing data
471 if (item.reference === data.reference && data.value) {
472 item.value = data.value
473 }
474
475 // Removes un-selected form data from sidebar array
476 if (item.reference === data.reference && !data.value) {
477 array.splice(index, 1)
478 }
479 })
480 } else {
481 // Handles the selection of new data
482 sidebarSteps.value[stepIndex.value].stepSelectedData.push(data)
483 }
484
485 // Rearranges data in sidebar based on item position in the form
486 sidebarSteps.value[stepIndex.value].stepSelectedData.sort((a, b) => {
487 return a.position - b.position
488 })
489 }
490
491 /**
492 * Function that creates Data Array for SideBar
493 */
494 function sidebarDataCreator() {
495 stepsArray.value.forEach((item, index) => {
496 if ('key' in item && item.key !== 'congratulations') {
497 let stepLabels = amCustomize.value[pageRenderKey.value][item.key].translations
498 let labelKey = item.sidebarData.label
499 let heading =
500 stepLabels && stepLabels[labelKey]
501 ? stepLabels[labelKey][langKey.value]
502 : amLabels[labelKey]
503
504 if (item.name !== 'CongratulationsStep') {
505 let step = {
506 key: item.key,
507 label: heading,
508 icon: item.sidebarData.icon,
509 labelKey: labelKey,
510 stepSelectedData: [],
511 finished: false,
512 selected: index === stepIndex.value,
513 }
514 sidebarSteps.value.splice(index, 0, step)
515 }
516 }
517 })
518 }
519
520 watch([bookableType, flowLayout, stepOrder], () => {
521 sidebarSteps.value = []
522 sidebarDataCreator()
523 stepIndex.value = 0
524 })
525
526 watchEffect(() => {
527 if (pageRenderKey.value === 'sbsNew') {
528 sidebarSteps.value.forEach((item) => {
529 if (
530 amCustomize.value[pageRenderKey.value][item.key].translations &&
531 amCustomize.value[pageRenderKey.value][item.key].translations[item.labelKey] &&
532 amCustomize.value[pageRenderKey.value][item.key].translations[item.labelKey][langKey.value]
533 ) {
534 item.label =
535 amCustomize.value[pageRenderKey.value][item.key].translations[item.labelKey][
536 langKey.value
537 ]
538 } else {
539 item.label = amLabels[item.labelKey]
540 }
541 })
542 }
543 })
544
545 provide('sidebarStepsFunctions', {
546 sidebarDataCollector,
547 })
548
549 // * Component reference
550 let ameliaContainer = ref(null)
551
552 // * Plugin wrapper width
553 let { width: containerWidth } = useElementSize(ameliaContainer)
554 provide('containerWidth', containerWidth)
555
556 watchEffect(() => {
557 if (amCustomize.value.fonts.customFontSelected) {
558 activateCustomFontStyles()
559 } else {
560 importDefaultFonts()
561 }
562 })
563
564 function activateCustomFontStyles() {
565 let head = document.head || document.getElementsByTagName('head')[0]
566 if (head.querySelector('#amCustomFont')) {
567 head.querySelector('#amCustomFont').remove()
568 }
569
570 if (head.querySelector('#amDefaultFontImport')) {
571 head.querySelector('#amDefaultFontImport').remove()
572 }
573
574 let css = `@font-face {font-family: '${amCustomize.value.fonts.fontFamily}'; src: url(${amCustomize.value.fonts.fontUrl});}`
575 let style = document.createElement('style')
576 head.appendChild(style)
577 style.setAttribute('type', 'text/css')
578 style.setAttribute('id', 'amCustomFont')
579 style.appendChild(document.createTextNode(css))
580 }
581
582 function importDefaultFonts() {
583 const head = document.head || document.getElementsByTagName('head')[0]
584 if (head.querySelector('#amDefaultFontImport')) {
585 return
586 }
587
588 const base = baseUrls.value.wpAmeliaPluginURL
589 const style = document.createElement('style')
590 style.setAttribute('type', 'text/css')
591 style.setAttribute('id', 'amDefaultFontImport')
592 style.textContent = `@import url("${base}v3/src/assets/scss/common/fonts/font.css");`
593 head.appendChild(style)
594 }
595
596 let sidebarVisibility = computed(() => {
597 return amCustomize.value.sbsNew.sidebar.options.self.visibility
598 })
599
600 /**
601 * Lifecycle Hooks
602 */
603 onBeforeMount(() => {
604 window.scrollTo({
605 top: 0,
606 left: 0,
607 behavior: 'smooth',
608 })
609 sidebarDataCreator()
610 })
611
612 function globalStepLabels() {
613 let stepLabels = {}
614 let customizedLabels = amCustomize.value[pageRenderKey.value][stepName.value].translations
615 if (customizedLabels && Object.keys(customizedLabels)) {
616 Object.keys(amCustomize.value[pageRenderKey.value][stepName.value].translations).forEach(
617 (label) => {
618 stepLabels[label] =
619 amCustomize.value[pageRenderKey.value][stepName.value].translations[label][langKey.value]
620 },
621 )
622 } else {
623 stepLabels = {}
624 }
625
626 return stepLabels
627 }
628
629 function dedicatedStepLabel(label, stepKey) {
630 let computedLabel = computed(() => {
631 return amCustomize.value[pageRenderKey.value][stepKey].translations &&
632 amCustomize.value[pageRenderKey.value][stepKey].translations[label] &&
633 amCustomize.value[pageRenderKey.value][stepKey].translations[label][langKey.value]
634 ? amCustomize.value[pageRenderKey.value][stepKey].translations[label][langKey.value]
635 : amLabels[label]
636 })
637
638 return computedLabel.value
639 }
640
641 // * Label computed function
642 function labelsDisplay(label, stepKey) {
643 let computedLabel = computed(() => {
644 return amCustomize.value[pageRenderKey.value][stepKey].translations &&
645 amCustomize.value[pageRenderKey.value][stepKey].translations[label] &&
646 amCustomize.value[pageRenderKey.value][stepKey].translations[label][langKey.value]
647 ? amCustomize.value[pageRenderKey.value][stepKey].translations[label][langKey.value]
648 : amLabels[label]
649 })
650
651 return computedLabel.value
652 }
653
654 // * Colors
655 // * Customize colors
656 let amColors = computed(() => {
657 const colors = amCustomize.value[pageRenderKey.value]
658 ? amCustomize.value[pageRenderKey.value].colors
659 : defaultCustomizeSettings[pageRenderKey.value].colors
660
661 return { ...colors }
662 })
663
664 let borderCalculation = computed(() =>
665 containerWidth.value !== 0 && containerWidth.value > 560
666 ? amCustomize.value.sbsNew.sidebar.options.self.visibility || sidebarCollapsed.value
667 : false,
668 )
669
670 provide('amColors', amColors)
671 let cssVars = computed(() => {
672 return {
673 '--am-c-primary': amColors.value.colorPrimary,
674 '--am-c-success': amColors.value.colorSuccess,
675 '--am-c-error': amColors.value.colorError,
676 '--am-c-warning': amColors.value.colorWarning,
677 // input global colors - usage input, textarea, checkbox, radio button, select input, adv select input
678 '--am-c-inp-bgr': amColors.value.colorInpBgr,
679 '--am-c-inp-border': amColors.value.colorInpBorder,
680 '--am-c-inp-text': amColors.value.colorInpText,
681 '--am-c-inp-placeholder': amColors.value.colorInpPlaceHolder,
682 // dropdown global colors - usage select dropdown, adv select dropdown
683 '--am-c-drop-bgr': amColors.value.colorDropBgr,
684 '--am-c-drop-text': amColors.value.colorDropText,
685 // sidebar container colors - left part of the form
686 '--am-c-sb-bgr': amColors.value.colorSbBgr,
687 '--am-c-sb-text': amColors.value.colorSbText,
688 // main container colors - right part of the form
689 '--am-c-main-bgr': amColors.value.colorMainBgr,
690 '--am-c-main-heading-text': amColors.value.colorMainHeadingText,
691 '--am-c-main-text': amColors.value.colorMainText,
692 // button global colors
693 '--am-c-btn-prim': amColors.value.colorBtnPrim,
694 '--am-c-btn-prim-text': amColors.value.colorBtnPrimText,
695 '--am-c-btn-sec': amColors.value.colorBtnSec,
696 '--am-c-btn-sec-text': amColors.value.colorBtnSecText,
697 '--am-font-family': amCustomize.value.fonts.fontFamily,
698 // css properties
699 // -mw- max width
700 // -brad- border-radius
701 '--am-mw-main': amCustomize.value.sbsNew.sidebar.options.self.visibility
702 ? sidebarCollapsed.value
703 ? '592px'
704 : '760px'
705 : '520px',
706 '--am-brad-main': borderCalculation.value ? '0 0.5rem 0.5rem 0' : '0.5rem',
707 }
708 })
709 </script>
710
711 <script>
712 export default {
713 name: 'CustomizeStepNew',
714 }
715 </script>
716
717 <style lang="scss">
718 @import '../../../../assets/scss/common/reset/reset';
719
720 :root {
721 // Colors
722 // shortcuts
723 // -c- color
724 // -bgr- background
725 // -prim- primary
726 // -sec- secondary
727 // primitive colors
728 --am-c-primary: #{$blue-1000};
729 --am-c-success: #{$green-1000};
730 --am-c-error: #{$red-900};
731 --am-c-warning: #{$yellow-1000};
732 // main container colors - right part of the form
733 --am-c-main-bgr: #{$am-white};
734 --am-c-main-heading-text: #{$shade-800};
735 --am-c-main-text: #{$shade-900};
736 // sidebar container colors - left part of the form
737 --am-c-sb-bgr: #17295a;
738 --am-c-sb-text: #{$am-white};
739 // input global colors - usage input, textarea, checkbox, radio button, select input, adv select input
740 --am-c-inp-bgr: #{$blue-900};
741 --am-c-inp-border: #{$shade-250};
742 --am-c-inp-text: #{$shade-900};
743 --am-c-inp-placeholder: #{$shade-500};
744 --am-c-checkbox-border: #{$shade-300};
745 --am-c-checkbox-border-disabled: #{$blue-600};
746 --am-c-checkbox-border-focused: #{$blue-700};
747 --am-c-checkbox-label-disabled: #{$shade-600};
748 // dropdown global colors - usage select dropdown, adv select dropdown
749 --am-c-drop-bgr: #{$am-white};
750 --am-c-drop-text: #{$shade-1000};
751 // button global colors
752 --am-c-btn-prim: #{$blue-900};
753 --am-c-btn-prim-text: #{$am-white};
754 --am-c-btn-sec: #{$am-white};
755 --am-c-btn-sec-text: #{$shade-900};
756
757 // Properties
758 // shortcuts
759 // -h- height
760 // -fs- font size
761 // -rad- border radius
762 --am-h-inp: 40px;
763 --am-fs-inp: 15px;
764 --am-rad-inp: 6px;
765 --am-fs-label: 15px;
766 --am-fs-btn: 15px;
767
768 // Font
769 --am-font-family: 'Amelia Roboto', sans-serif;
770 }
771
772 //@import url('https://fonts.googleapis.com/css2?family=Rampart+One&display=swap');
773 // am -- amelia
774 // fs -- form steps
775 // sb -- sidebar
776 #amelia-app-backend-new {
777 width: 100%;
778
779 * {
780 font-family: var(--am-font-family);
781 font-style: initial;
782 box-sizing: border-box;
783 word-break: break-word;
784 letter-spacing: normal;
785 }
786
787 #amelia-container {
788 &.am-fs {
789 // Container Wrapper
790 &__wrapper {
791 display: flex;
792 justify-content: center;
793 max-width: var(--am-mw-main);
794 height: 560px;
795 width: 100%;
796 box-shadow: 0 30px 40px rgba(0, 0, 0, 0.12);
797 margin: 16px auto 48px;
798 border-radius: 8px;
799 transition: max-width 0.3s ease-in-out;
800
801 &.am-collapsed {
802 transition-delay: 1s;
803 }
804
805 .el-form {
806 &-item {
807 display: block;
808 font-family: var(--am-font-family);
809 font-size: var(--am-fs-label);
810 margin-bottom: 24px;
811
812 &__label {
813 flex: 0 0 auto;
814 text-align: left;
815 font-size: var(--am-fs-label);
816 line-height: 1.3;
817 color: var(--am-c-main-text);
818 box-sizing: border-box;
819 margin: 0;
820
821 &:before {
822 color: var(--am-c-error);
823 }
824 }
825
826 &__content {
827 display: flex;
828 flex-wrap: wrap;
829 align-items: center;
830 flex: 1;
831 position: relative;
832 font-size: var(--am-fs-inp);
833 min-width: 0;
834 }
835
836 &__error {
837 font-size: 12px;
838 color: var(--am-c-error);
839 padding-top: 4px;
840 }
841 }
842 }
843
844 .el-input {
845 &__inner {
846 margin: 0;
847 }
848 }
849
850 .am-display-none {
851 display: none !important;
852 }
853 }
854 }
855 }
856
857 .am-dialog-cs {
858 z-index: 10000 !important;
859 }
860 }
861 </style>
862