From 9f7ad503ef2191ee79315088b02b0bd25d80b220 Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Fri, 27 Jun 2025 11:50:00 +0200 Subject: [PATCH] Fixes --- .../Custom/PSC/FormBuilder/FormBuilderTS/+ | 64 ++++ .../app/elements/HeadlineElementForm.vue | 3 - .../app/elements/HiddenElementForm.vue | 3 +- .../app/elements/InputElementForm.vue | 1 - .../app/elements/RowElementForm.vue | 14 +- .../app/elements/SelectElementForm.vue | 1 - .../app/elements/TextElementForm.vue | 3 +- .../app/elements/TextareaElementForm.vue | 1 - .../src/components/app/library/Library.vue | 17 ++ .../components/app/properties/TextElement.vue | 5 +- .../app/renderelements/RenderElements.vue | 109 ++++--- .../src/components/ui/switch/Switch.vue | 38 +++ .../src/components/ui/switch/index.ts | 1 + .../FormBuilderTS/src/model/Border.ts | 30 ++ .../FormBuilderTS/src/model/Column.ts | 13 +- .../src/model/HeadlineElement.ts | 1 + .../FormBuilderTS/src/model/HiddenElement.ts | 1 + .../FormBuilderTS/src/model/Row.ts | 11 +- .../FormBuilderTS/src/model/TextElement.ts | 1 + .../FormBuilderTS/src/stores/Items.ts | 62 ++-- .../articletemplates/scripts/100.phtml | 5 +- .../articletemplates/scripts/2.phtml | 278 ++---------------- .../articletemplates/scripts/6.phtml | 72 ++--- .../tailwindcss_wp/layout/default.phtml | 8 +- .../templates/article/show.phtml | 2 +- .../templates/basket/custom.phtml | 3 +- .../templates/basket/finish.phtml | 44 +-- .../templates/basket/index.phtml | 13 +- .../templates/basket/review.phtml | 2 +- .../styles/vorlagen/tailwindcss_wp/js/calc.js | 2 +- 30 files changed, 371 insertions(+), 437 deletions(-) create mode 100644 src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/+ create mode 100644 src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/ui/switch/Switch.vue create mode 100644 src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/ui/switch/index.ts diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/+ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/+ new file mode 100644 index 000000000..ad958838f --- /dev/null +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/+ @@ -0,0 +1,64 @@ +import {v4 as uuidv4} from 'uuid' +import Dependency from './Dependency.ts' + +export default class Border { + uuid: string = ""; + formula: string = ""; + calcValue: string = ""; + calcValue1: string = ""; + calcValue2: string = ""; + calcValue3: string = ""; + calcValue4: string = ""; + calcValue5: string = ""; + calcValue6: string = ""; + calcValue7: string = ""; + calcValue8: string = ""; + calcValue9: string = ""; + calcValue10: string = ""; + flatRate: string = ""; + value: string = ""; + dependencys: Dependency[] = []; + + constructor() { + this.uuid = uuidv4(); + } + + addDependency(dep: Dependeny) + { + this.dependencys.push(dep) + } + + toJSON() { + return { + 'formula': this.formula, + 'calcValue': this.calcValue, + 'calcValue1': this.calcValue1, + 'calcValue2': this.calcValue2, + 'calcValue3': this.calcValue3, + 'calcValue4': this.calcValue4, + 'calcValue5': this.calcValue5, + 'calcValue6': this.calcValue6, + 'calcValue7': this.calcValue7, + 'calcValue8': this.calcValue8, + 'calcValue9': this.calcValue9, + 'calcValue10': this.calcValue10, + 'flatRate': this.flatRate, + 'value': this.value, + 'dependencys': this.dependencys.reduce((result, dep) => { + result.push(dep.toJSON()) + return result + }, []) + } + } + fromJSON(obj) { + this.formula = obj.formula + this.value = obj.value + this.flatRate = obj.flatRate + this.calcValue = obj.calcValue + obj.dependencys.map((d) => { + const dep = new Dependency() + dep.fromJSON(d) + this.dependencys.push(dep) + }) + } +} diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/HeadlineElementForm.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/HeadlineElementForm.vue index 5101ac4c5..a93b116ce 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/HeadlineElementForm.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/HeadlineElementForm.vue @@ -2,7 +2,6 @@ import HeadlineElement from '@/model/HeadlineElement'; import { computed } from 'vue'; import { Input } from '@/components/ui/input' -import { SquareDot } from 'lucide-vue-next'; const props = defineProps({ modelValue: HeadlineElement @@ -17,10 +16,8 @@ const theModel = computed({ -