From df6cd877b48a3fb0a242d167847d55ae9dbef68f Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Tue, 3 Dec 2024 14:55:42 +0530 Subject: [PATCH 01/17] scribble initial commit --- .../internal/models/v1/form/ScribbleImpl.java | 49 + .../core/components/models/form/Scribble.java | 36 + .../form/scribble/exporter-scribble.json | 22 + .../components/form/scribble/.content.xml | 7 + .../components/form/scribble/_cq_template.xml | 5 + .../.content.xml | 2 +- .../fd/components/form/scribble/.content.xml | 3 + .../components/form/scribble/v1/.content.xml | 5 + .../form/scribble/v1/scribble/.content.xml | 8 + .../form/scribble/v1/scribble/README.md | 91 ++ .../scribble/_cq_design_dialog/.content.xml | 80 ++ .../v1/scribble/_cq_dialog/.content.xml | 111 ++ .../scribble/v1/scribble/_cq_template.xml | 5 + .../v1/scribble/clientlibs/.content.xml | 3 + .../scribble/clientlibs/editor/.content.xml | 5 + .../v1/scribble/clientlibs/editor/js.txt | 18 + .../clientlibs/editor/js/editDialog.js | 31 + .../v1/scribble/clientlibs/site/.content.xml | 6 + .../v1/scribble/clientlibs/site/css.txt | 18 + .../clientlibs/site/css/scribbleview.css | 414 ++++++++ .../v1/scribble/clientlibs/site/js.txt | 18 + .../clientlibs/site/js/scribbleview.js | 976 ++++++++++++++++++ .../clientlibs/site/resources/iconeraser.svg | 20 + .../clientlibs/site/resources/icontext.svg | 18 + .../site/resources/images/iEBox_brush.png | Bin 0 -> 1694 bytes .../site/resources/images/iEBox_clear.png | Bin 0 -> 2186 bytes .../site/resources/images/iEBox_close.png | Bin 0 -> 1260 bytes .../site/resources/images/iEBox_geo.png | Bin 0 -> 2055 bytes .../site/resources/images/iEBox_keyboard.png | Bin 0 -> 3549 bytes .../site/resources/images/iEBox_no.png | Bin 0 -> 2812 bytes .../site/resources/images/iEBox_ok.png | Bin 0 -> 8242 bytes .../site/resources/images/leftnav.png | Bin 0 -> 290 bytes .../site/resources/images/leftnav_hover.png | Bin 0 -> 291 bytes .../site/resources/images/rightnav.png | Bin 0 -> 295 bytes .../site/resources/images/rightnav_hover.png | Bin 0 -> 316 bytes .../site/resources/images/signature.png | Bin 0 -> 1342 bytes .../form/scribble/v1/scribble/scribble.html | 97 ++ .../form/scribble/v1/scribble/scribble.js | 34 + ui.frontend/package-lock.json | 7 +- .../specs/scribble/scribble.authoring.spec.js | 0 .../specs/scribble/scribble.runtime.spec.js | 0 41 files changed, 2083 insertions(+), 6 deletions(-) create mode 100644 bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java create mode 100644 bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java create mode 100644 bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json create mode 100644 examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml create mode 100644 examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_close.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_geo.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js create mode 100644 ui.tests/test-module/specs/scribble/scribble.authoring.spec.js create mode 100644 ui.tests/test-module/specs/scribble/scribble.runtime.spec.js diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java new file mode 100644 index 0000000000..3a35e4e5de --- /dev/null +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java @@ -0,0 +1,49 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +package com.adobe.cq.forms.core.components.internal.models.v1.form; + +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.models.annotations.Default; +import org.apache.sling.models.annotations.Exporter; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; + +import com.adobe.cq.export.json.ComponentExporter; +import com.adobe.cq.export.json.ExporterConstants; +import com.adobe.cq.forms.core.components.models.form.Scribble; +import com.adobe.cq.forms.core.components.util.AbstractFieldImpl; + +@Model( + adaptables = { SlingHttpServletRequest.class, Resource.class }, + adapters = { Scribble.class, ComponentExporter.class }, + resourceType = "core/fd/components/form/scribble/v1/scribble") +@Exporter( + name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, + extensions = ExporterConstants.SLING_MODEL_EXTENSION) +public class ScribbleImpl extends AbstractFieldImpl implements Scribble { + + @ValueMapValue + @Default(values = "") + private String value; + + @Override + public String getValue() { + return value; + } + +} \ No newline at end of file diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java new file mode 100644 index 0000000000..70995faca6 --- /dev/null +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java @@ -0,0 +1,36 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +package com.adobe.cq.forms.core.components.models.form; + +import org.osgi.annotation.versioning.ConsumerType; + +/** + * Defines the form Scribble Sling Model used for the Scribble component. + * + * @since com.adobe.cq.forms.core.components.models.form 1.0.0 + */ +@ConsumerType +public interface Scribble extends Field { + + /** + * Returns the base64 encoded string of the scribble. + * + * @return Base64 encoded string representing the scribble + * @since com.adobe.cq.forms.core.components.models.form 1.0.0 + */ + String getValue(); +} diff --git a/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json b/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json new file mode 100644 index 0000000000..853f822f58 --- /dev/null +++ b/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json @@ -0,0 +1,22 @@ +{ + "id": "scribble-178a5c65c2", + "fieldType": "text-input", + "name": "scribble1710484027357", + "value": "", + "type": "string", + "label": { + "value": "Scribble" + }, + "events": { + "custom:setProperty": [ + "$event.payload" + ] + }, + "properties": { + "fd:dor": { + "dorExclusion": false + }, + "fd:path": "/content/forms/af/scribbletest/jcr:content/guideContainer/scribble" + }, + ":type": "forms-components-examples/components/form/scribble" +} \ No newline at end of file diff --git a/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml new file mode 100644 index 0000000000..7c7c367660 --- /dev/null +++ b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml @@ -0,0 +1,7 @@ + + diff --git a/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml new file mode 100644 index 0000000000..d88cbc2495 --- /dev/null +++ b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml index 0ef50cf14f..37001a511d 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml @@ -5,4 +5,4 @@ cssProcessor="[default:none,min:none]" jsProcessor="[default:none,min:none]" categories="[core.forms.components.runtime.all]" - embed="[core.forms.components.runtime.base,core.forms.components.container.v2.runtime,core.forms.components.datePicker.v1.runtime,core.forms.components.textinput.v1.runtime,core.forms.components.numberinput.v1.runtime,core.forms.components.panelcontainer.v1.runtime,core.forms.components.radiobutton.v1.runtime,core.forms.components.text.v1.runtime,core.forms.components.checkboxgroup.v1.runtime,core.forms.components.button.v1.runtime,core.forms.components.image.v1.runtime,core.forms.components.dropdown.v1.runtime,core.forms.components.fileinput.v3.runtime,core.forms.components.accordion.v1.runtime,core.forms.components.tabs.v1.runtime,core.forms.components.wizard.v1.runtime,core.forms.components.verticaltabs.v1.runtime,core.forms.components.recaptcha.v1.runtime,core.forms.components.checkbox.v1.runtime,core.forms.components.fragment.v1.runtime,core.forms.components.switch.v1.runtime,core.forms.components.termsandconditions.v1.runtime, core.forms.components.hcaptcha.v1.runtime,core.forms.components.review.v1.runtime, core.forms.components.turnstile.v1.runtime]"/> + embed="[core.forms.components.runtime.base,core.forms.components.container.v2.runtime,core.forms.components.datePicker.v1.runtime,core.forms.components.textinput.v1.runtime,core.forms.components.numberinput.v1.runtime,core.forms.components.panelcontainer.v1.runtime,core.forms.components.radiobutton.v1.runtime,core.forms.components.text.v1.runtime,core.forms.components.checkboxgroup.v1.runtime,core.forms.components.button.v1.runtime,core.forms.components.image.v1.runtime,core.forms.components.dropdown.v1.runtime,core.forms.components.fileinput.v3.runtime,core.forms.components.accordion.v1.runtime,core.forms.components.tabs.v1.runtime,core.forms.components.wizard.v1.runtime,core.forms.components.verticaltabs.v1.runtime,core.forms.components.recaptcha.v1.runtime,core.forms.components.checkbox.v1.runtime,core.forms.components.fragment.v1.runtime,core.forms.components.switch.v1.runtime,core.forms.components.termsandconditions.v1.runtime, core.forms.components.hcaptcha.v1.runtime,core.forms.components.review.v1.runtime, core.forms.components.turnstile.v1.runtime,core.forms.components.scribble.v1.runtime]"/> diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml new file mode 100644 index 0000000000..491392d539 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml @@ -0,0 +1,3 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml new file mode 100644 index 0000000000..84e5adcf4a --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml @@ -0,0 +1,5 @@ + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml new file mode 100644 index 0000000000..be8c13a283 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml @@ -0,0 +1,8 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md new file mode 100644 index 0000000000..8add83ebc1 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md @@ -0,0 +1,91 @@ + +Adaptive Form Scribble (v1) +==== +Adaptive Form Scribble field component written in HTL. + +## Features + +* Provides the following type of input: + * text + * textarea +* Custom constraint messages for the above types +* Styles +* Allows replacing this component with other component (as mentioned below). + +### Use Object +The Form Text component uses the `com.adobe.cq.forms.core.components.models.form.Scribble` Sling Model for its Use-object. + +### Edit Dialog Properties +The following properties are written to JCR for this Form Text component and are expected to be available as `Resource` properties: + +1. `./jcr:title` - defines the label to use for this field +2. `./hideTitle` - if set to `true`, the label of this field will be hidden +3. `./name` - defines the name of the field, which will be submitted with the form data +4. `./default` - defines the default value of the field +5. `./description` - defines a help message that can be rendered in the field as a hint for the user +6. `./required` - if set to `true`, this field will be marked as required, not allowing the form to be submitted until the field has a value +7. `./requiredMessage` - defines the message displayed as tooltip when submitting the form if the value is left empty +8. `./readOnly` - if set to `true`, the filed will be read only + +## Client Libraries +The component provides a `core.forms.components.scribble.v1.runtime` client library category that contains the Javascript runtime for the component. +It should be added to a relevant site client library using the `embed` property. + +It also provides a `core.forms.components.scribble.v1.editor` editor client library category that includes +JavaScript handling for dialog interaction. It is already included by its edit dialog. + +## BEM Description +``` +BLOCK cmp-adaptiveform-scribble + ELEMENT cmp-adaptiveform-scribble__label + ELEMENT cmp-adaptiveform-scribble__label-container + ELEMENT cmp-adaptiveform-scribble__widget + ELEMENT cmp-adaptiveform-scribble__questionmark + ELEMENT cmp-adaptiveform-scribble__shortdescription + ELEMENT cmp-adaptiveform-scribble__longdescription + ELEMENT cmp-adaptiveform-scribble__errormessage +``` + +### Note +By placing the class names `cmp-adaptiveform-scribble__label` and `cmp-adaptiveform-scribble__questionmark` within the `cmp-adaptiveform-scribble__label-container` class, you create a logical grouping of the label and question mark elements. This approach simplifies the process of maintaining a consistent styling for both elements. + +## Replace feature: +We support replace feature that allows replacing Reset Button component to any of the below components: + +* Button +* Date Picker +* Email Input +* Number Input +* Reset Button +* Submit Button +* Telephone Input +* Text Box + +## JavaScript Data Attribute Bindings + +The following attributes must be added for the initialization of the text-input component in the form view: + 1. `data-cmp-is="adaptiveFormScribble"` + 2. `data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"` + + +The following are optional attributes that can be added to the component in the form view: +1. `data-cmp-valid` having a boolean value to indicate whether the field is currently valid or not +2. `data-cmp-required` having a boolean value to indicate whether the field is currently required or not +3. `data-cmp-readonly` having a boolean value to indicate whether the field is currently readonly or not +4. `data-cmp-active` having a boolean value to indicate whether the field is currently active or not +5. `data-cmp-visible` having a boolean value to indicate whether the field is currently visible or not +6. `data-cmp-enabled` having a boolean value to indicate whether the field is currently enabled or not \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml new file mode 100644 index 0000000000..eb2c905da7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml new file mode 100644 index 0000000000..9212c6f7a7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml new file mode 100644 index 0000000000..d88cbc2495 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml new file mode 100644 index 0000000000..491392d539 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml @@ -0,0 +1,3 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml new file mode 100644 index 0000000000..c49111f7c2 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt new file mode 100644 index 0000000000..dd642eaed7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2022 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=js +editDialog.js \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js new file mode 100644 index 0000000000..f1c491a1ae --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js @@ -0,0 +1,31 @@ + +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +(function($) { + "use strict"; + + var EDIT_DIALOG = ".cmp-adaptiveform-scribble__editdialog"; + + $(document).on("dialog-ready", function() { + var $editDialog = $(EDIT_DIALOG); + if ($editDialog.length > 0) { + // Initialize any custom logic for the edit dialog here + // For example, you might want to add event listeners or validators for your dialog fields + } + }); + +})(jQuery); \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml new file mode 100644 index 0000000000..3121bd86f3 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml @@ -0,0 +1,6 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt new file mode 100644 index 0000000000..acabf89b95 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2024 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=css +scribbleview.css diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css new file mode 100644 index 0000000000..9c9fe09474 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css @@ -0,0 +1,414 @@ +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +.cmp-adaptiveform-scribble__widget { + +} +textarea.cmp-adaptiveform-scribble__widget{ + +} + +.cmp-adaptiveform-scribble__label { + +} +.cmp-adaptiveform-scribble__label-container{ + +} + +.cmp-adaptiveform-scribble__longdescription { +} + +.cmp-adaptiveform-scribble__shortdescription { +} + +.cmp-adaptiveform-scribble__questionmark { + +} + +.cmp-adaptiveform-scribble__header { + font-size: 19px; + font-weight: 100; + line-height: 24.7px; + margin-bottom: 10px; +} + +.cmp-adaptiveform-scribble__canvas-signed-container { + position: relative; + border: 1px solid #AAAAAA; + height: 210px; + min-width: 50px; + width: 100%; + border-radius: 0.5rem; +} + +.cmp-adaptiveform-scribble__canvas__main { + width: 100%; +} + +.cmp-adaptiveform-scribble__canvas { + /* Styles for the canvas element where the signature is drawn */ + /* border: 1px solid #616060; + background-color: #f9f9f9; + color: black */ + width: 100%; + height: 200px; + border:1px #AAAAAA dashed; + border-bottom: 0; + -ms-touch-action:pinch-zoom; + touch-action:pinch-zoom; +} + +.cmp-adaptiveform-scribble__signcanvases{ + width: 100%; + background-color: #FFF; +} + + .cmp-adaptiveform-scribble__container { + font-family: Arial, sans-serif; + font-size: 12px; + min-width: 50px; /* Dialog will be no smaller than this */ + width: 36%; + /* Dialog will wrap after this width */ + background: #FFF; + border: solid 2px #999; + color: #000; + padding: 10px; + display: none; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #F8F8F8; + + /* display:none; */; + /* the shadow */ + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + + /* make dialog a non-selectatable thing */ + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + z-index: 99998; + margin: 0; + line-height:0; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.cmp-adaptiveform-scribble__controls { + display: flex; + align-items: center; + justify-content: center; + flex-direction: row; + flex-wrap: wrap; +} + +.cmp-adaptiveform-scribble__control-message { + font-size: 14px; + font-weight: normal; + text-align: center; + line-height: 1.75em; + min-width: 50px; + color: #555555; + cursor: default; + padding: 10px; + margin: 0em; + display: none; +} + +.cmp-adaptiveform-scribble__content { + background: 16px 16px no-repeat ; + margin: 0em; + min-width: 50px; + width: 100%; +} + +.cmp-adaptiveform-scribble__panel { + text-align: center; + margin: 0em 0em 0em 0em; + background-color:black; + -moz-border-top-right-radius: 8px; + -webkit-border-top-right-radius: 8px; + border-top-right-radius: 8px; + -moz-border-top-left-radius: 8px; + -webkit-border-top-left-radius: 8px; + border-top-left-radius: 8px; + overflow:hidden; + background: #AFB0B5; + -ms-touch-action:pinch-zoom; + touch-action:pinch-zoom; +} + +.cmp-adaptiveform-scribble__button { + background:no-repeat; + border-radius: 5px; + width:32px; + height:32px; + border: 1px solid #D5D5D5; + background-size:32px 32px; + margin-right:5px; + background-color: white; + background-position: center; +} +.cmp-adaptiveform-scribble__control-geo{ + background-image:url('../resources/images/iEBox_geo.png'); +} +.cmp-adaptiveform-scribble__control-text{ + background-image:url('../resources/icontext.svg'); +} +.cmp-adaptiveform-scribble__keyboard-sign-box{ + border: 1px dashed#AAAAAA; + display:none;; + margin:0px; + border-radius: 0px 0px 0px 0px; + outline:none; + width: 100%; + height: 200px; +} + +#keyboard_Sign_Box::placeholder { + font: 1rem sans-serif, Georgia; + vertical-align: middle; +} + +.cmp-adaptiveform-scribble__control-brush{ + background-image:url('../resources/images/iEBox_brush.png'); +} + +.cmp-adaptiveform-scribble__control-submit { + width: 77px; + height: 40px; + margin: 5px; + padding: 9px 20px 11px 20px; + border: 1px transparent; + border-radius: 20px; + background-color: #0265DC; + color: white; +} + +.cmp-adaptiveform-scribble__control-clear { + background-image:url('../resources/iconeraser.svg'); +} + +.cmp-adaptiveform-scribble__button-close { + width: 77px; + height: 40px; + font-weight: 700; + padding: 9px 20px 11px 20px; + margin: 5px; + border: 2px solid #4b4b4b; + color: #4b4b4b; + border-radius: 20px; +} + +.cmp-adaptiveform-scribble__controlpanel { + margin-top: 40px; + align-items: center; + display: flex; + justify-content: space-between; +} + +/* @media (max-width: 780px) { */ + + /* .cmp-adaptiveform-scribble__controlpanel { + flex-direction: column; + } */ + /* .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + flex-direction: row; + } + + } */ + + @media (max-width: 460px) { + + .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + display: flex; + flex-direction: column; + justify-content: center; + } + + } + + @media (min-width: 460px) and (max-width: 1155px) { + .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + } + + .cmp-adaptiveform-scribble__controlpanel { + margin-top: 40px; + align-items: center; + justify-content: center; + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + } + +#iEBox_moveframe{ +padding:0px; +margin:0px; + border:0px dotted rgba(0,0,0,0.5); + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + + /* display:none; */; + position:absolute; +} +.disable_button { + filter: grayscale(100%); /* Apply grayscale effect */ + -webkit-filter: grayscale(100%); /* For Safari and older versions of Chrome */ + -moz-filter: grayscale(100%); /* For older versions of Firefox */ + -ms-filter: grayscale(100%); /* For older versions of Internet Explorer */ + -o-filter: grayscale(100%); /* For older versions of Opera */ + cursor: not-allowed; /* Change cursor to indicate disabled state */ + opacity: 0.6; /* Optional: Adjust opacity to give a faded look */ + pointer-events: none; /* Disable all mouse events */ + } +.sc_popUpMenu { + position: absolute; + width:20px; + height:20px; + background:no-repeat; + background-size:20px 20px; + background-image:url('../resources/images/iEBox_no.png'); + left:2px; + top:2px; +} +.cmp-adaptiveform-scribble__brushlist{ + position:absolute; + z-index:99999; + background-color:white; + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + display:none; + bottom: 60px; +} +.cmp-adaptiveform-scribble__brushlist :hover{ + background-color:gray; +} +.cmp-adaptiveform-scribble__caption { + border:4px dashed #AAAAAA; + border-bottom:0px; + border-left:0px; + border-right:0px; + margin-right:4px; + margin-left:1px; + margin-top:0px; + text-align:center; + padding:0px; +} +.cmp-adaptiveform-scribble__caption > legend { + width:auto; + background-color: #FFFFFF; + padding: 2px; +} +.emptyScribble { + background: url('../resources/images/signature.png') no-repeat; +} + +.cmp-adaptiveform-scribble__canvases { + white-space:nowrap; +} + +#msgBox_container { + font-family: Arial, sans-serif; + font-size: 12px; + min-width: 50px; /* Dialog will be no smaller than this */ + max-width: 600px; /* Dialog will wrap after this width */ + background: #FFF; + border: solid 5px #999; + color: #000; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + position: absolute; + top: 50%; + left: 50%; + display: none; + transform: translate(-50%, -50%); +} + +#msgBox_title { + font-size: 14px; + font-weight: bold; + text-align: center; + line-height: 1.75em; + color: #666; + background: #CCC top repeat-x; + border: solid 1px #FFF; + border-bottom: solid 1px #999; + cursor: default; + padding: 0em; + margin: 0em; +} + +#msgBox_content { + background: 16px 16px no-repeat ; + padding: 1em 1.75em; + margin: 0em; +} + +#msgBox_message { + text-align: center; +} + +#msgBox_panel { + text-align: center; + margin: 1em 0em 0em 1em; +} + +#msgBox_prompt { + margin: .5em 0em; +} + +input#msgBox_Ok,input#msgBox_Yes,input#msgBox_No,input#msgBox_Cancel{ + background-color: buttonFace; + padding: 5px 10px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + text-shadow: rgba(0,0,0,.4) 0 1px 0; + color: buttonText; + font-size: 14px; + font-family: Georgia, serif; + text-decoration: none; + vertical-align: middle; + outline:none; + border: 2px outset buttonface; + border-radius: 1rem; + } + + input#msgBox_Ok:focus,input#msgBox_Yes:focus,input#msgBox_No:focus,input#msgBox_Cancel:focus{ + outline:highlight; + } + + input#msgBox_Ok:hover,input#msgBox_Yes:hover,input#msgBox_No:hover,input#msgBox_Cancel:hover{ + outline:none; + border: 2px outset buttonface; + } \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt new file mode 100644 index 0000000000..6c95e73eb7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2024 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=js +scribbleview.js diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js new file mode 100644 index 0000000000..3a6f181c1f --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -0,0 +1,976 @@ +/******************************************************************************* + * Copyright 2023 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +(function() { + "use strict"; + + /** + * class definition for GeoLocationQueryRequest + * encapsulated success and error handlers + */ + class GeoLocQuery { + constructor() { + this._active = false; + } + + init(success, failure) { + this._successHandler = success; + this._errorHandler = failure; + this._active = true; + return this; + } + + _handleSuccess(data) { + if (this._successHandler) { + this._successHandler(data); + } + } + + _handleError(err) { + if (this._errorHandler) { + this._errorHandler(err); + } + } + + query() { + const onSuccess = (pos) => { + if (this._active) { + this._handleSuccess(pos); + } + this._active = false; + }; + + const onError = (err) => { + if (this._active) { + this._handleError(err); + } + this._active = false; + }; + + navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); + } + + cancel() { + this._active = false; + } + } + + + const PNGUtil = (() => { + // Helper function to initialize CRC table + const initCrcTable = () => { + const table = new Uint32Array(256); + for (let n = 0; n < 256; n++) { + let c = n; + for (let k = 0; k < 8; k++) { + c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); + } + table[n] = c; + } + return table; + }; + + // Helper function to convert 32-bit integer to string + const u32IntToStr = (n) => String.fromCharCode( + (n >>> 24) & 0xFF, + (n >>> 16) & 0xFF, + (n >>> 8) & 0xFF, + n & 0xFF + ); + + // Helper function to calculate CRC + const updateCrc = (crc, data) => { + let c = crc; + for (let i = 0; i < data.length; i++) { + c = crcTable[(c ^ data.charCodeAt(i)) & 0xff] ^ (c >>> 8); + } + return c; + }; + + // Helper function to calculate CRC + const CRC = (data) => updateCrc(0xffffffff, data) ^ 0xffffffff; + + // Helper function to prepare text chunk + const prepareTextChunk = (content) => { + const len = content.length; + const lenStr = u32IntToStr(len); + const chunkType = "tEXt"; + const checkSumStr = u32IntToStr(CRC(chunkType + content)); + return lenStr + chunkType + content + checkSumStr; + }; + + // Initialize CRC table + const crcTable = initCrcTable(); + + const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA"; + + // Main API + return { + // Function to check if data is a PNG + _isPng: (b64data) => { + return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); + }, + + // Function to make PNG read-only + _makeReadOnly: (b64data) => { + const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces + const pngctx = { p: 8, d: bindata }; // Skip PNG header + const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); + const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); + return btoa(newdata); + }, + + // Function to decode base64 + _atob: (input) => window.atob ? atob(input) : Base64.decode(input), + + // Function to encode to base64 + _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), + + // Function to check if PNG is read-only + _isReadOnly: (b64data) => { + if (this._isPng(b64data)) { + const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; + const bindata = this._atob(b64data.replace(/\s+/g, '')); + const pngctx = { p: 8, d: bindata }; // Skip PNG header + while (pngctx.p < pngctx.d.length) { + const size = (pngctx.d.charCodeAt(pngctx.p) << 24) | + (pngctx.d.charCodeAt(pngctx.p + 1) << 16) | + (pngctx.d.charCodeAt(pngctx.p + 2) << 8) | + pngctx.d.charCodeAt(pngctx.p + 3); + const type = pngctx.d.slice(pngctx.p + 4, pngctx.p + 8); + pngctx.p += 8; // Move past size and type + if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { + return true; + } + pngctx.p += size + 4; // Move past data and CRC + } + } + return false; + } + }; + })(); + + + + // GeoLocQuery definition ends here + // const PNGUtil = (() => { + // // Helper function to initialize CRC table + // const initCrcTable = () => { + // const table = []; + // let c; + // for (let n = 0; n < 256; n++) { + // c = n; + // for (let k = 0; k < 8; k++) { + // c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); + // } + // table[n] = c; + // } + // return table; + // }; + + // // Helper function to convert 32-bit integer to string + // const u32IntToStr = (n) => String.fromCharCode( + // (n >>> 24) & 0xFF, + // (n >>> 16) & 0xFF, + // (n >>> 8) & 0xFF, + // n & 0xFF + // ); + + // // Helper function to calculate CRC + // const updateCrc = (crc, data) => { + // let c = crc; + // for (let i = 0; i < data.length; i++) { + // c = XOR(crcTable[(XOR(c, data.charCodeAt(i)) & 0xff) >>> 0], c >>> 8); + // } + // return c; + // }; + + // // Helper function to calculate XOR + // const XOR = (a, b) => (a ^ b) >>> 0; + + // // Helper function to calculate CRC + // const CRC = (data) => XOR(updateCrc(0xffffffff, data), 0xffffffff); + + // // Helper function to prepare text chunk + // const prepareTextChunk = (content) => { + // const len = content.length; + // const lenStr = u32IntToStr(len); + // const chunkType = "tEXt"; + // const checkSumStr = u32IntToStr(CRC(chunkType + content)); + // return lenStr + chunkType + content + checkSumStr; + // }; + + // // Initialize CRC table + // const crcTable = initCrcTable(); + + // const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA" + // // Main API + // return { + // // Function to check if data is a PNG + // _isPng: (b64data) => { + // return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); + // }, + + // // Function to make PNG read-only + // _makeReadOnly: (b64data) => { + // const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces + // const pngctx = { p: 8, d: bindata }; // Skip PNG header + // const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); + // const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); + // return btoa(newdata); + // }, + + // // Function to decode base64 + // _atob: (input) => window.atob ? atob(input) : Base64.decode(input), + + // // Function to encode to base64 + // _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), + + // // Function to check if PNG is read-only + // _isReadOnly: (b64data) => { + // if (this._isPng(b64data)) { + // const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; + // const bindata = this._atob(b64data.replace(/\s+/g, '')); + // const pngctx = { p: 8, d: bindata }; // Skip PNG header + // while (pngctx.p < pngctx.d.length) { + // const size = u32IntToStr(pngctx.d.charCodeAt(pngctx.p)); + // const type = pngctx.d.slice(pngctx.p, pngctx.p + 4); + // pngctx.p += 4; // Move past type + // if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { + // return true; + // } + // pngctx.p += size + 4; // Move past data and CRC + // } + // } + // return false; + // } + // }; + // })(); + + class Scribble extends FormView.FormFieldBase { + _geoLocQuery=null; + _signSubmitted=false; + _enforceGeoLoc=!!navigator.userAgent.match(/iPad/i); + _geoCanvId=null; + _geoLocAtBottom=false; + _geoCanvasWidth=696; + _defaultStatus=" "; + existingSign = ''; + existingCanvas = ''; + static NS = FormView.Constants.NS; + static IS = "adaptiveFormScribble"; + static bemBlock = 'cmp-adaptiveform-scribble'; + static selectors = { + self: `[data-${this.NS}-is="${this.IS}"]`, + scribbleContainer: `.${Scribble.bemBlock}__container`, + scribbleContainerPanel: `.${Scribble.bemBlock}__panel`, + keyboardSignBox: `.${Scribble.bemBlock}__keyboard-sign-box`, + scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, + scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, + geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, + canvas: `.${Scribble.bemBlock}__canvas`, + label: `.${Scribble.bemBlock}__label`, + description: `.${Scribble.bemBlock}__longdescription`, + qm: `.${Scribble.bemBlock}__questionmark`, + errorDiv: `.${Scribble.bemBlock}__errormessage`, + tooltipDiv: `.${Scribble.bemBlock}__shortdescription`, + brushControl: `.${Scribble.bemBlock}__control-brush`, + scribbleGeoControl: `.${Scribble.bemBlock}__control-geo`, + clearControl: `.${Scribble.bemBlock}__control-clear`, + scribbleTextControl: `.${Scribble.bemBlock}__control-text`, + scribbleMessage: `.${Scribble.bemBlock}__control-message`, + scribbleSubmitControl: `.${Scribble.bemBlock}__control-submit`, + scribbleBrushList: `.${Scribble.bemBlock}__brushlist`, + signCanvases: `.${Scribble.bemBlock}__signcanvases`, + saveCanvas: `.${Scribble.bemBlock}__control-submit`, + }; + + constructor(params) { + super(params); + this.initializeScribble(); + } + + initializeScribble() { + this.getCanvasContainer().addEventListener('click', () => this.clickHanlder()); + this.initScribbleModal(); + } + + getWidget() { + return this.element.querySelector(Scribble.selectors.canvas); + } + + getTemplate() { + return this.element.querySelector('#template-modal'); + } + + getLabel() { + return this.element.querySelector(Scribble.selectors.label); + } + + getErrorDiv() { + return this.element.querySelector(Scribble.selectors.errorDiv); + } + + getTooltipDiv() { + return this.element.querySelector(Scribble.selectors.tooltipDiv); + } + + getQuestionMarkDiv() { + return this.element.querySelector(Scribble.selectors.qm); + } + + getScribbleControlPanel() { + return document.querySelector(Scribble.selectors.scribbleControlPanel); + } + + getScribbleContainer() { + return document.querySelector(Scribble.selectors.scribbleContainer); + } + + getMessage() { + return document.querySelector(Scribble.selectors.scribbleMessage); + } + + getBrushList() { + return document.querySelector(Scribble.selectors.scribbleBrushList); + } + + getBrush() { + return document.querySelector(Scribble.selectors.brushControl); + } + + getClearControl() { + return document.querySelector(Scribble.selectors.clearControl); + } + + getSaveControl() { + return document.querySelector(Scribble.selectors.saveCanvas); + } + + getTextSignControl() { + return document.querySelector(Scribble.selectors.scribbleTextControl); + } + + getScribbleContainerPanel() { + return document.querySelector(Scribble.selectors.scribbleContainerPanel); + } + + getScribbleContainerCaption() { + return document.querySelector(Scribble.selectors.scribbleContainerCaption); + } + + getKeyboardSignBox() { + return document.querySelector(Scribble.selectors.keyboardSignBox); + } + + getGeoCanvasRight() { + return document.querySelector(Scribble.selectors.geoCanvasRight); + } + + getCanvasContainer() { + return this.element.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + } + + getScribbleCloseButton() { + return this.element.querySelector('.cmp-adaptiveform-scribble__button-close'); + } + + getCanvas() { + return this.element.querySelector(Scribble.selectors.canvas); + } + + getMainCanvas() { + return this.element.querySelector('.cmp-adaptiveform-scribble__canvas__main'); + } + + getSignCanvasesContainer() { + return this.element.querySelector(Scribble.selectors.signCanvases); + } + + getDescription() { + return this.element.querySelector(Scribble.selectors.description); + } + + showMessage(msg){ + if(this._msgTimeout) { clearTimeout(this._msgTimeout); this._msgTimeout=0; } + const scribbleMessage = this.getMessage(); + scribbleMessage.innerHTML = msg; + scribbleMessage.style.display = 'block'; + this._msgTimeout = window.setTimeout(function(){ + scribbleMessage.innerHTML = ''; + },15000); + } + + extractData(datauri){ + var idx; + if(datauri!=null&&datauri.length>0&&datauri.indexOf("data:")==0){ + if((idx=datauri.indexOf(","))>0){ + return datauri.substr(idx+1); + } + } + } + + openClearSignModal() { + document.getElementById('msgBox_container').style.display='inline-block'; + document.getElementById('msgBox_Yes').addEventListener('click', () => { + this.existingSign=''; + this.getMainCanvas().parentNode.replaceChild(this.existingCanvas, this.getMainCanvas()); + this.existingCanvas.getContext('2d').clearRect(0, 0, this.existingCanvas, this.existingCanvas.height); + const geoCnv = this.getGeoCanvasRight(); + if(geoCnv) { + const geoCanvasContext = geoCnv.getContext('2d'); + geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + } + this.enableControls(['brush','geo','clear','text','submit']); + const box = document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + if (box.firstChild) { + box.removeChild(box.firstChild); + document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container').innerHTML = ""; + document.querySelector('.sc_popUpMenu')?.remove(); + document.getElementById('msgBox_container').style.display='none'; + this.getKeyboardSignBox().value = ''; + } + this._signSubmitted = false; + }); + document.getElementById('msgBox_No').addEventListener('click', () => { + document.getElementById('msgBox_container').style.display='none'; + }); + } + + createCanvas() { + const mainCanvas = document.createElement('canvas'); + mainCanvas.classList.add('cmp-adaptiveform-scribble__canvasImage'); + } + + doOk() { + const mainCanvas = document.createElement('canvas'); + // mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas'); + mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas__main'); + const sigCnv = this.getCanvas(); // Get the sign canvas + const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas + let ctx = mainCanvas.getContext('2d'); + if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { + // Set the dimensions of the mainCanvas to accommodate both canvases vertically + mainCanvas.width = Math.max(sigCnv.width, geoCnv.width); + mainCanvas.height = sigCnv.height + geoCnv.height; + ctx = mainCanvas.getContext('2d'); + // Draw the sign canvas on the main canvas + ctx.drawImage(sigCnv, 0, 0); + + // Draw the geo canvas below the sign canvas + ctx.drawImage(geoCnv, 0, sigCnv.height); + } else { + mainCanvas.width = sigCnv.width; + mainCanvas.height = sigCnv.height; + ctx.drawImage(sigCnv, 0, 0); + } + + // if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { + // if (this._geoLocAtBottom) { + // mainCanvas.width = sigCnv.width; + // mainCanvas.height = sigCnv.height + geoCnv.height; + // ctx.drawImage(sigCnv, 0, 0); + // ctx.drawImage(geoCnv, 0, sigCnv.height); + // } else { + // // Create the final image after the submit is clicked + // mainCanvas.width = sigCnv.width;// + geoCnv.width + 10; + // mainCanvas.height = sigCnv.height + geoCnv.height + 10;// Math.max(sigCnv.height, geoCnv.height); + // // mainCanvas.height = Math.max(sigCnv.height, geoCnv.height); + // ctx.drawImage(sigCnv, 0, 0); + // // +10 is added to provide the margin between two images + // ctx.drawImage(geoCnv, 0, 180); + // // ctx.drawImage(geoCnv, sigCnv.width + 10, 0); + // geoCnv.style.display = 'none'; + // } + // } else { + // mainCanvas.width = sigCnv.width; + // mainCanvas.height = sigCnv.height; + // ctx.drawImage(sigCnv, 0, 0); + // } + this.existingCanvas = sigCnv; + sigCnv.height = mainCanvas.height; + sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); + + const newData = mainCanvas.toDataURL("image/png"); + this.existingSign = mainCanvas; + let val; + if ((val = this.extractData(newData))) { + val = PNGUtil._makeReadOnly(val); + this._is_readonly = true; + } + + const img = document.createElement('img'); + img.src = newData; + img.style.width = '100%'; + img.style.height = '200px'; + + const clearSignButton = document.createElement('div'); + clearSignButton.classList.add('sc_popUpMenu'); + + const mainCanvasImageContainer = this.getCanvasContainer(); + mainCanvasImageContainer.appendChild(img); + mainCanvasImageContainer.appendChild(clearSignButton); + + clearSignButton.addEventListener('click', (e) => { + e.stopPropagation(); + this.openClearSignModal(); + }); + + if (this._geoLocQuery) { + this._geoLocQuery.cancel(); // Cancel the current geo loc request + } + + this.closeEditModal(); + this._signSubmitted = true; + } + + handleOk() { + if (this._enforceGeoLoc) { + // Create a new GeoLocQuery instance and initialize it with bound handlers + this._geoLocQuery = new GeoLocQuery().init( + (data) => { + this.geoQuerySuccessHandler(data); + this.doOk(); + }, + (err) => { + this.geoQueryErrorHandler(err); + } + ); + + // Start the geolocation query + this._geoLocQuery.query(); + this.showMessage('fetchGeoLocation'); + } else { + // If geolocation is not enforced, directly proceed with the operation + this.doOk(); + } + } + + geoQueryErrorHandler(err){ + this.showMessage('errorFetchGeoLocation'); + } + + renderBrushList() { + [2,3,4,5,6,7,8,9,10].forEach((brush) => { + var divel = document.createElement('DIV'); + var cnv = document.createElement('CANVAS'); + var ctx = cnv.getContext('2d'); + cnv.style.border='1px solid #AAAAAA'; + cnv.width=100; + cnv.height=20; + cnv.style.backgroundColor='white' + ctx.lineWidth=brush; + ctx.beginPath(); + ctx.moveTo(10,cnv.height/2); + ctx.lineTo(cnv.width-10,cnv.height/2); + ctx.stroke(); + divel.appendChild(cnv); + divel.addEventListener('click', (e) => { + e.stopPropagation(); + this.context.lineWidth=brush; + }) + this.getBrushList().append(divel); + }); + } + + resizeCanvas(percentage) { + const signCanvas = this.getCanvas(); + const ctx = signCanvas.getContext('2d', { willReadFrequently: true }); + const container = this.getCanvasContainer(); + this.getSignCanvasesContainer().style.width = `${percentage}%`; + + // Ensure the canvas has valid dimensions + if (signCanvas.width === 0 || signCanvas.height === 0) { + console.error('Canvas has invalid dimensions.'); + return; + } + + // Save the content of the canvas if it has valid dimensions + let imgData = null; + if (signCanvas.width > 0 && signCanvas.height > 0) { + imgData = ctx.getImageData(0, 0, signCanvas.width, signCanvas.height); + } + + // Calculate the new width based on the percentage of the container's width + const newWidth = container.offsetWidth * (percentage / 100); + + // Set the new width and height of the canvas + signCanvas.width = newWidth; + // signCanvas.height = container.offsetHeight; // Maintain the height + + // Restore the content back to the resized canvas if it has valid content + if (imgData) { + ctx.putImageData(imgData, 0, 0); + } + } + + geoQuerySuccessHandler(position) { + if (position && position.coords) { + this.showMessage(''); + const { latitude, longitude } = position.coords; + const latStr = `Latitude: ${latitude}`; + const longStr = `Longitude: ${longitude}`; + const dateObj = new Date(); + const tZone = (dateObj.getTimezoneOffset() / 60) * -1; + const time = dateObj.getTime(); + const timeStr = `${time}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; + + const signCanvas = this.getSignCanvasesContainer(); + const geoCanvasRight = this.getGeoCanvasRight(); + const container = this.getCanvasContainer(); + + // Set the widths of the canvases + // signCanvas.style.width = '70%'; + geoCanvasRight.style.height = '50px'; + geoCanvasRight.style.width = '200px'; + geoCanvasRight.style.display = 'block'; + // geoCanvasRight.style.display = 'inline-block'; + // geoCanvasRight.style.height = '200px'; + // Adjust the canvas sizes based on the new widths + // this.resizeAndFixCanvas(); + // this.resizeCanvas(70); // Resize the signCanvas to 70% of its container's width + + if (geoCanvasRight) { + const ctx = geoCanvasRight.getContext('2d'); + geoCanvasRight.width = geoCanvasRight.offsetWidth; + geoCanvasRight.height = geoCanvasRight.offsetHeight; + + ctx.font = 'bold 10px Arial'; // Font size and type + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + // Define the position to draw the text + let x = 0; + let y = 15; + + // Draw the text on the canvas + ctx.fillText(latStr, x, y); + ctx.fillText(longStr, x, y + 15); + ctx.fillText(timeStr, x, y + 30); + } + } + } + handleGeo() { + // initiate geolocation + if(navigator.geolocation){ + // Create a new GeoLocQuery instance + this._geoLocQuery = new GeoLocQuery(); + // Initialize with bound success and error handlers + this._geoLocQuery.init( + this.geoQuerySuccessHandler.bind(this), + this.geoQueryErrorHandler.bind(this) + ); + this._geoLocQuery.query(); + this.showMessage('Fetching Geo Location...'); // Geo Location ! + } + } + + // This Function is used to fetch the geolocation. + calculateGeolocation() { + this.handleGeo(); + } + + enableControls(controls) { + controls.forEach(control => { + document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.remove('disable_button'); + }); + } + + disableControl(controls) { + controls.forEach(control => { + document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.add('disable_button'); + }); + } + + dialogCallback(button_val, arg1) { + switch(button_val){ + case "ok": + this.handleOk(); + break; + case "Cancel": + this.handleCancel(); + break; + case "geolocation": + this.calculateGeolocation(); + break; + case "BrushSelect": + this.handleBrushSelect(arg1); + break; + case "brushes": + this.handleBrush(arg1); + break; + case "Text": + this.handleText(); + break; + } + } + + toggleBrushList(event) { + var brushList = this.getBrushList(); + var brushButton = this.getBrush(); + var originalOnSelectStart = document.onselectstart; + + if (getComputedStyle(brushList).display !== 'none') { + brushList.style.display = 'none'; + return; + } + + // Disable text selection + document.onselectstart = function() { + return false; + }; + + // Show the brush list and position it + brushList.style.display = 'block'; + brushList.style.visibility = 'hidden'; + // Make it visible + brushList.style.visibility = 'visible'; + + // Add an event listener for mouse leave + function onMouseLeave() { + brushList.style.display = 'none'; + document.onselectstart = originalOnSelectStart; + brushList.removeEventListener('mouseleave', onMouseLeave); + } + + brushList.addEventListener('mouseleave', onMouseLeave); + } + + + imageClick(event) { + this.dialogCallback(event.srcElement.title); + } + + closeEditModal() { + if(this.getCanvas()) this.getCanvas().style.display = 'block'; + if(!this._signSubmitted) { + this.eraseSignature() + } + this.hideScribbleModal(); + } + + handleBrush(evt){ + this.getKeyboardSignBox().style.display = 'none'; + this.canvas.style.display = "block"; + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.initializeCanvas(); + this.toggleBrushList(evt); + } + + makeDraggable() { + const draggableBar = this.getScribbleContainerPanel(); + const draggableContent = this.getScribbleContainer(); + draggableBar.addEventListener('mousedown', (e) => { + let offsetX = e.clientX - draggableContent.getBoundingClientRect().left; + let offsetY = e.clientY - draggableContent.getBoundingClientRect().top; + function onMouseMove(event) { + draggableContent.style.left = `${event.clientX - offsetX}px`; + draggableContent.style.top = `${event.clientY - offsetY}px`; + } + function onMouseUp() { + document.removeEventListener('mousemove', onMouseMove); + document.removeEventListener('mouseup', onMouseUp); + } + document.addEventListener('mousemove', onMouseMove); + document.addEventListener('mouseup', onMouseUp); + }); + } + + initScribbleModal() { + const eraserIcon = this.getClearControl(); + const textSignIcon = this.getTextSignControl(); + const controlPanel = this.getScribbleControlPanel(); + const toggleBrushListIcon = this.getBrushList(); + const closeEditModal = this.getScribbleCloseButton(); + const keyboardSignBox = this.getKeyboardSignBox(); + const saveButton = this.getSaveControl(); + // this.resizeAndFixCanvas() + + this.renderBrushList() + controlPanel.addEventListener('click', (event) => { + this.imageClick(event); + }) + + saveButton.addEventListener('click', () => { + this.doOk(); + }); + + eraserIcon.addEventListener('click', () => { + this.eraseSignature(); + }) + textSignIcon.addEventListener('click', () =>{ + this.enableSignatureTextBox(); + }) + toggleBrushListIcon.addEventListener('click', (event) => { + this.toggleBrushList(event); + }) + closeEditModal.addEventListener('mousedown', () => { + this.closeEditModal(); + }) + + keyboardSignBox.addEventListener('keyup', () => { + this.enableControls(['clear','submit']); + let sigCanvasFontFamily = "sans-serif, Georgia"; + let sigCanvasFontStyle = "italic"; + keyboardSignBox.style.font=sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; + const value = keyboardSignBox.value; + this.context.font = sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; + this.context.fillText(value,0,this.getCanvas().height/2); + }) + + } + + enableSignatureTextBox() { + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.getKeyboardSignBox().style.display = "inline-block"; + this.getCanvas().style.display = "none"; + } + + eraseSignature() { + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + const geoCnv = this.getGeoCanvasRight(); + if(geoCnv) { + const geoCanvasContext = geoCnv.getContext('2d'); + geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + geoCnv.style.display = 'none'; + } + this.getKeyboardSignBox().value=''; + this.disableControl(['clear','submit']); + } + + + resizeAndFixCanvas() { + const dpr = window.devicePixelRatio || 1; + const imgData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height); + this.canvas.width = this.canvas.offsetWidth * dpr; + this.canvas.height = this.canvas.offsetHeight * dpr; + this.context.putImageData(imgData, 0, 0); + } + + + initializeCanvas() { + this.canvas = this.getCanvas(); + + if(this.existingSign) { + this.getCanvasContainer().style.width = '100%'; + this.getMainCanvas().style.border = '1px solid black'; + this.getKeyboardSignBox().style.display = 'none'; + this.disableControl(['brush','geo','clear','text','submit']); + } else { + this.context = this.canvas.getContext('2d', { willReadFrequently: true }); + this.resizeCanvas(100); + this.resizeAndFixCanvas(); + if (this.canvas) { + this.canvas.style.border = '1px dashed #AAAAAA'; + this.getKeyboardSignBox().style.display = 'none'; + this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); + this.canvas.addEventListener('mousemove', this.draw.bind(this)); + this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); + this.canvas.addEventListener('mousemove', this.draw.bind(this)); + this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); + this.canvas.addEventListener('touchstart', this.startDrawing.bind(this)); + this.canvas.addEventListener('touchmove', this.draw.bind(this)); + this.canvas.addEventListener('touchend', this.stopDrawing.bind(this)); + this.canvas.addEventListener('touchcancel', this.stopDrawing.bind(this)); + this.isDrawing = false; + } + } + // Add event listener for window resize to make the canvas responsive + window.addEventListener('resize', this.resizeAndFixCanvas.bind(this)); + // } + } + + showScribbleModal() { + if(window.getComputedStyle(this.getScribbleContainer()).display !== 'block') { + this.disableControl(['clear','submit']); + } + this.getScribbleContainer().style.display = 'block'; + } + + hideScribbleModal() { + this.getScribbleContainer().style.display = 'none'; + } + + clickHanlder() { + this.showScribbleModal(); + this.initializeCanvas(); + } + + + startDrawing(event) { + // Ensure the context is initialized + if (!this.context) { + console.error('Canvas context is not initialized.'); + return; + } + + // Normalize event coordinates for touch events + const { offsetX, offsetY } = this.getEventCoordinates(event); + + this.isDrawing = true; + this.context.beginPath(); + this.context.moveTo(offsetX, offsetY); + } + + getMousePos(event) { + const rect = this.canvas.getBoundingClientRect(); + const offsetX = event.clientX - rect.left; + const offsetY = event.clientY - rect.top; + return { offsetX, offsetY }; + } + + getEventCoordinates(event) { + const rect = this.canvas.getBoundingClientRect(); + const dpr = window.devicePixelRatio || 1; + if (event.touches && event.touches.length > 0) { + const touch = event.touches[0]; + return { + offsetX: (touch.clientX - rect.left) * dpr, + offsetY: (touch.clientY - rect.top) * dpr + }; + } else { + return { + offsetX: (event.clientX - rect.left) * dpr, + offsetY: (event.clientY - rect.top) * dpr + }; + } + } + + draw(event) { + if (!this.isDrawing) return; + const { offsetX, offsetY } = this.getEventCoordinates(event); + this.context.lineTo(offsetX, offsetY); + this.context.stroke(); + this.enableControls(['clear','submit']); + } + + stopDrawing() { + if (this.isDrawing) { + this.context.closePath(); + this.isDrawing = false; + this._model.value = this.canvas.toDataURL(); + } + } + } + + FormView.Utils.setupField(({element, formContainer}) => { + return new Scribble({element, formContainer}) + }, Scribble.selectors.self); +})(); \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg new file mode 100644 index 0000000000..60826f488d --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg new file mode 100644 index 0000000000..870dc0203f --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png new file mode 100644 index 0000000000000000000000000000000000000000..c96db231de28a5b8e290f7604dc5e51d76f03951 GIT binary patch literal 1694 zcmaJ?c~BE~6y6-15=arLTy|BqWA}5()v7I%S3&3yF|y*enpJQxXLP zQ3t3kj?^(q6=f=-#kN>G#lfSr9_!UXJ5!IMwN_i`wAyy4bc2BXqjYC?_V<4CecyY( z_r9HN&CAVV1x5w}0Kn3yl{)I3cM6Di20l5h?prFR8 zFGqE#-c(mLilzeq1F{qr6UEvbi4n7M^j-|dX|+>q07%bp+V#c?lmHEAxy2@he);SR z2(*}_(ArcjthFmpvqfExqXqT3g~s{{qu2yxtOC=W5=y{|5_-^St+Y8LPAN2_E1}lj zZ7u}PK!^${^t`BIZ62t=a1>1C@KcO1f`CFH2N9$Sg-9~UgApDVrfy*hB9NpCCA>6n z_JXKvxT#E{Q>tcjQIQlf6NFvD<<{2La%%Y;3@_&*VzJn(!Q-V+h!jVijnF$&Y>v1& z1tsb*;ubq$!EB&cQE$Mi2`NNX`uqr1`@F2pG214pVO*!)&P6z|_egUsq7L3j_L^vFT}9Qxi03JF#>a#F*~Rz5P}J7 zEjANY>qwlzYqb)M%|YmGMpUDeLX-l>VlhclGerWPT$!pA^F;`9!nFt% z{J?fKZA(KzjTR!Z5sp}pFcu+5i}!sMRe2BK>!>vAye zBX0xf{=FaBn-{NQ!D+7Rr3FDc*WJ8>hHw*Y=LqBP&m&qxkZ1sOwX8X>)FrTcntk@r zOA}7|>N;gpe!Z>a?Jcr^g6J*Zctjyt!pS3 zN6PploU!3yRb*h!R?M{nW>*}!@o9|dU@SS%wmd#jrBb!)zr1tCb!6&P(JS!Yq5eSi z;Z67+S`~2A_e%OCgGrL3`HFLSTYi=5?oTKUT%BkWtuaI!{rVyU?p7~LP1 z{KW0s=MGZndRWN?M>?*Qj)WgbJGjmRlngP)&4Yd8kvFKU0zchJ+0>Gx!H)O)OoQX) zfIqy;+3=t+zb80`4ph96y}n4>RI^FYzRUMCM^<^#^z(R>5?xU*3VR@`0(~ByuiyJr zGceTJbTRf^0M2IjLIJmY4U0T+xANDe6^ytwvh_T+BQ{{#*Ra;Z2L zv;*ocAZF~fs*F|Qr#r%U?V?r#gNyq7?ULTGq6Uv{Q# z1$oLKJ16a3gT0r$nI1DlS2ul+d`lavm#PnwaYMs?l6IClhHh}AfAt+>@-pqvPwwDr y4BcYaScmIvaze+11=Hlsy*;cS@;3+90Kk*Qp1%_Pm}k9z49)6XWq)Sr#(x0hidw4x literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png new file mode 100644 index 0000000000000000000000000000000000000000..8d73d4ff643a76fd9c386bbc304ce118bfff92b0 GIT binary patch literal 2186 zcmaJ@YgAKL7QP7tnh+qo6Gr43c|;0%0g*(I0D*>)AQQ0y6-yo$l0tGra)AJ%iC}nC zTXgUNSPgF(Ep@QdirSW!4lKnZI6<7mik%=ZymZz%h}}6I%X3*6%Gl06=vQJ{z$FBqTl!*#>7LMIto>#7JQ=1STp( zIgk(%NsIG`p-2F*A3P0U;t#tH@JoINB)kOI?m- zZQZ7k!IuyuH;VjQQE7q{Fb-BjU^q22L_%jUKo*P22n%Pi7{MTu&S28$mX{U62;+pa zILwXUtA}jKrj}-NguH}Txhzo>S%x4g4vkh+R75QbrNZhQ8iUPdTQ!)>5DOwiQ>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Dx7Diwi0~86-p9_=|e`H|8|8ubXnW zp4q85-##^(y*U`Y*4ek*BcVI2^?Mv>PJRpWUz=8J4W6}ii~JJ?KI@>jJ9bl+d<-5< zbtatm2tDD|vqrMsM|o{Kv)EZ&KZYKRz1F=EW2Dgqq8SV+vSpCayRMv-vQS8^PNfAA? z$-WE2Y`R8CKS>YryUZT)us^jFQG$Q`+h(Mp@r1|T?W~{+kcUL{xte# zdqUBd;QmiSa}WEDemvlu*tEF2b2GKPnld(qpKe=Cynmu-4<+2|hlam^rGKKVi3HCE zI{%K({HU}=OB-IsLuD~sn}o5GV^gKJey3bBq45h|onh%o*WmFK#r`Eddup|ZG9P#~ z7qQrQY!t)V>J$8L_uTHq?54rEp)~#$-_)VwHCd`mP^iLs5I_=eAo9 zEvDVuG1N+Q*37zBf{b1JAERKdbqbuS8>A4G+*YxtBE@6IF(65lh~EvDBXlhXwZomdI@@?Q?_EnqaSFtrYjT6G zTamNxx0`*PTdOU!gLPG5SDjZnEk(Sc>-WRYMj?mSFyfh-#$pf&piexJte&eYOG^yv z9f&>6doNh_)Q E4+VVoNB{r; literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png new file mode 100644 index 0000000000000000000000000000000000000000..b07a2a79ed0604972d32ea1c15297d3d9f796dd2 GIT binary patch literal 3549 zcmV<34I=W1P)StO&>uS)ve<0AYj>5AR{$W90N^4L=L-RlQUJ&DC0@ZjPh;=*jPLSYvv5M~MFBAl0-BNIsH z15C~g000{K(ZT*WKal6<?_01!^k@7iDG<<3=fuAC~28EsPoqkpK{9G%|Vj005J}`Hw&=0RYXHq~ibpyyzHQsFW8>#s~laM4*8xut5h5 z!4#~(4xGUqyucR%VFpA%3?#rj5JCpzfE)^;7?wd9RKPme1hudO8l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|KZaslCrYKql3}ITi#2dL#9sr=UM(d|j3Bh{UJ_4TO0Dr(xhU zatf(epT$`RJAu@TzXoK)q0}@WRKdl}1oFoNoZoN2U(lj$eh?(bQXP(50Q@86Y5fTx zK39g;4};`Z8nGGZjb&)WKOwo5*1rzu1LcuSX%<$hDH~0&0%J%Be}IeT@>j#22d5r^ zT4zQ!I6E*LEL zuQVE1A()EYB?mAe*yZu-V%a%Dm&n5zV(H82o0OOU X^8b2uY99PQKg`Jizo+!~zzhEgBUy0p literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png new file mode 100644 index 0000000000000000000000000000000000000000..47d047ddfa08e92084b5ef2d5993ecc247c08930 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM#=yWhy?{3l$YCrFa(7}_cTVOdki(Mh=>$h?_mX=7D>g$CCcB~4dUHj zaLB4kZ<$jPmJ_0J)_K*cnn|k3=gf`>I-az&-^-lT6TVB-)$H=xA`zCkTzf*bUR)FD zIN?&h@aBwnOifGwwR)fb<;&e-QvY(+-`1`=#~T-BPCeVHxm4P@c0#}re!br}k`1ps zTW$TPLt@2_8#ksLv{x_O$!pDa>?l?_mX=7D>g$B}?+2*dLIQ zU8tNgCFerXrAR}QfLTH-SAFvII5sD~aE?%N%@ei{_u@0fS_H&qx%M!nFJqeR#d>uW zli9hM literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png new file mode 100644 index 0000000000000000000000000000000000000000..af4507989cadb1d9373f3b4f28dc633279cdce3e GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!N$PASg|QB0LWo14sv&5Sa(k5C6L3C?&#~t zz_78O`%fY(kk47*5n0T@z%2~Ij105pNB{-*c)B=-Sopu4dYkvK0*|Yt;^LB)JSV$~ zHB$wxyv(y|C$7|yV+zka>fYD#Ncj4#Rs_V?EZ) zW?nOYicrRL`8ThWk32q~B4{Z4^Y)e>$Y?;!)8R%0e*10dpByunfL z=T4&__k@-_hPo5|Y_}%3EDYlRyTrpU$KET((Q>bi8& zR#-mVD}VKmi_G<-JPNJ)k?JzWH-9+`CEF-7tWJs&&dK}h!j}HtVHNY!OUG9^G})J!1177QgFkT0>{0z@@VoJ=(js#)53b&` zcc*zg-zJ`=6z*}ic1>A#>&oOwq`njxg HN@xNAhv{(o literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png new file mode 100644 index 0000000000000000000000000000000000000000..2f99fb15a3605d85710dd7e5cef4bb06e3617bb2 GIT binary patch literal 1342 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`Z0uxV=WNv2R>f&VXVgeL1 zGIoXOb;(aI%}vcKf$2>_=rzTu7nBro3xGDeq!wkCrKY$Q<>xAZy=;|<+bu>o&4cPq z!R;1foO<^MnH=tc!Bhk zM%xX%F~s8}vs53RMLhQ$7dy+XyU>|3i7Wd7@4Qe>{+;df`yJ<`MJMu{+R6LY zF8RJo)!F}oB;q0l?5_llNgu-lyN z?RtOb#hRF@j=D3Z{Hi-3I)ioXgV61No?1n)yw;f`UT};_==z6?Pi}sdTGOPuZTdm3 zaJh%YAKV{_Yo8JGt-e+KfYIjS6K0!c*?`np2N@z5N*Byvd|!F|zN4xHyXl_Pg}gFC zOE?XVc_+-2+q9;M1& literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html new file mode 100644 index 0000000000..effac6f684 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -0,0 +1,97 @@ + + + + + +
+ +
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+

Clear Signature Confirmation

+
+
+ Are you sure you want to clear signature? +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js new file mode 100644 index 0000000000..dc33ea8b81 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js @@ -0,0 +1,34 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +use(function () { + + var clientlibsArr = ['core.forms.components.base.v1.editor']; + var labelPath = 'core/fd/components/af-commons/v1/fieldTemplates/label.html'; + var shortDescriptionPath = "core/fd/components/af-commons/v1/fieldTemplates/shortDescription.html"; + var longDescriptionPath = "core/fd/components/af-commons/v1/fieldTemplates/longDescription.html"; + var questionMarkPath = "core/fd/components/af-commons/v1/fieldTemplates/questionMark.html" + var errorMessagePath = "core/fd/components/af-commons/v1/fieldTemplates/errorMessage.html"; + + return { + labelPath: labelPath, + shortDescriptionPath: shortDescriptionPath, + longDescriptionPath: longDescriptionPath, + questionMarkPath: questionMarkPath, + errorMessagePath: errorMessagePath, + clientlibs: clientlibsArr + } +}); \ No newline at end of file diff --git a/ui.frontend/package-lock.json b/ui.frontend/package-lock.json index 7a756bd255..c9e0dcd92b 100644 --- a/ui.frontend/package-lock.json +++ b/ui.frontend/package-lock.json @@ -101,8 +101,7 @@ }, "node_modules/@adobe/json-formula": { "version": "0.1.50", - "resolved": "https://registry.npmjs.org/@adobe/json-formula/-/json-formula-0.1.50.tgz", - "integrity": "sha512-dmlLYfbty8NPVIdxvI9cJ+ZdXsrRCFrCdmL1+aR2auEzXJ86rD0bm1qu+S4NOpFiZLKIyx0zvUTykms40vNjsA==", + "license": "Apache-2.0", "engines": { "node": ">=16.0.0" } @@ -11127,9 +11126,7 @@ }, "dependencies": { "@adobe/json-formula": { - "version": "0.1.50", - "resolved": "https://registry.npmjs.org/@adobe/json-formula/-/json-formula-0.1.50.tgz", - "integrity": "sha512-dmlLYfbty8NPVIdxvI9cJ+ZdXsrRCFrCdmL1+aR2auEzXJ86rD0bm1qu+S4NOpFiZLKIyx0zvUTykms40vNjsA==" + "version": "0.1.50" }, "@aemforms/af-core": { "version": "0.22.119", diff --git a/ui.tests/test-module/specs/scribble/scribble.authoring.spec.js b/ui.tests/test-module/specs/scribble/scribble.authoring.spec.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ui.tests/test-module/specs/scribble/scribble.runtime.spec.js b/ui.tests/test-module/specs/scribble/scribble.runtime.spec.js new file mode 100644 index 0000000000..e69de29bb2 From abc7e62a989ca31174d9d4bde1b1c00d635007da Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Tue, 10 Dec 2024 15:27:05 +0530 Subject: [PATCH 02/17] scribble new changes --- .../internal/models/v1/form/ScribbleImpl.java | 2 +- .../v1/scribble/_cq_dialog/.content.xml | 35 +- .../scribble/v1/scribble/_cq_template.xml | 2 +- .../clientlibs/site/css/scribbleview.css | 106 ++- .../v1/scribble/clientlibs/site/js.txt | 1 + .../clientlibs/site/js/GeoLocQuery.js | 64 ++ .../clientlibs/site/js/scribbleview.js | 727 +++++++----------- .../resources/images/SelectionEditIcon.png | Bin 0 -> 7376 bytes .../resources/images/SelectionEraserIcon.png | Bin 0 -> 7517 bytes .../resources/images/SelectionTextIcon.png | Bin 0 -> 6904 bytes .../site/resources/images/clearSign.svg | 8 + .../{iEBox_no.png => clearSignButton.png} | Bin .../site/resources/images/iEBox_ok.png | Bin 8242 -> 0 bytes .../site/resources/images/leftnav.png | Bin 290 -> 0 bytes .../site/resources/images/leftnav_hover.png | Bin 291 -> 0 bytes .../site/resources/images/rightnav.png | Bin 295 -> 0 bytes .../site/resources/images/rightnav_hover.png | Bin 316 -> 0 bytes .../clientlibs/site/resources/images/sign.png | Bin 0 -> 1022 bytes .../site/resources/images/signIcon.png | Bin 0 -> 1664 bytes .../form/scribble/v1/scribble/scribble.html | 38 +- 20 files changed, 443 insertions(+), 540 deletions(-) create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEraserIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSign.svg rename ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/{iEBox_no.png => clearSignButton.png} (100%) delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav_hover.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signIcon.png diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java index 3a35e4e5de..e16b054ceb 100644 --- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java @@ -45,5 +45,5 @@ public class ScribbleImpl extends AbstractFieldImpl implements Scribble { public String getValue() { return value; } - + } \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml index 9212c6f7a7..23687d37c3 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml @@ -28,6 +28,7 @@ - diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml index d88cbc2495..366a2361f6 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml @@ -2,4 +2,4 @@ + fieldType="text-input"/> diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css index 9c9fe09474..17dc119d93 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css @@ -48,7 +48,8 @@ textarea.cmp-adaptiveform-scribble__widget{ .cmp-adaptiveform-scribble__canvas-signed-container { position: relative; border: 1px solid #AAAAAA; - height: 210px; + height: 280px; + padding: 10px; min-width: 50px; width: 100%; border-radius: 0.5rem; @@ -190,7 +191,7 @@ textarea.cmp-adaptiveform-scribble__widget{ } .cmp-adaptiveform-scribble__control-brush{ - background-image:url('../resources/images/iEBox_brush.png'); + background-image:url('../resources/images/signIcon.png'); } .cmp-adaptiveform-scribble__control-submit { @@ -264,7 +265,7 @@ textarea.cmp-adaptiveform-scribble__widget{ } } -#iEBox_moveframe{ +/* #iEBox_moveframe{ padding:0px; margin:0px; border:0px dotted rgba(0,0,0,0.5); @@ -275,10 +276,8 @@ margin:0px; -moz-box-shadow: 10px 10px 5px #888888; -webkit-box-shadow: 10px 10px 5px #888888; box-shadow: 0px 0px 15px #888888; - - /* display:none; */; position:absolute; -} +} */ .disable_button { filter: grayscale(100%); /* Apply grayscale effect */ -webkit-filter: grayscale(100%); /* For Safari and older versions of Chrome */ @@ -289,25 +288,23 @@ margin:0px; opacity: 0.6; /* Optional: Adjust opacity to give a faded look */ pointer-events: none; /* Disable all mouse events */ } -.sc_popUpMenu { +.cmp-adaptiveform-scribble__clear-sign { position: absolute; width:20px; height:20px; background:no-repeat; background-size:20px 20px; - background-image:url('../resources/images/iEBox_no.png'); - left:2px; - top:2px; + background-image:url('../resources/images/clearSignButton.png'); + right: 5px; + top: 5px; } .cmp-adaptiveform-scribble__brushlist{ position:absolute; z-index:99999; background-color:white; - -moz-box-shadow: 10px 10px 5px #888888; - -webkit-box-shadow: 10px 10px 5px #888888; box-shadow: 0px 0px 15px #888888; - display:none; - bottom: 60px; + display: none; + left: 45px; } .cmp-adaptiveform-scribble__brushlist :hover{ background-color:gray; @@ -328,24 +325,19 @@ margin:0px; background-color: #FFFFFF; padding: 2px; } -.emptyScribble { - background: url('../resources/images/signature.png') no-repeat; -} .cmp-adaptiveform-scribble__canvases { white-space:nowrap; } -#msgBox_container { - font-family: Arial, sans-serif; - font-size: 12px; - min-width: 50px; /* Dialog will be no smaller than this */ - max-width: 600px; /* Dialog will wrap after this width */ +.cmp-adaptiveform-scribble__clearsign-container { + font-size: 14px; + padding: 25px; + width: 280px; + height: 148px; background: #FFF; - border: solid 5px #999; + border: solid 1px #E6E6E6; color: #000; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; border-radius: 5px; position: absolute; top: 50%; @@ -354,61 +346,61 @@ margin:0px; transform: translate(-50%, -50%); } -#msgBox_title { +.cmp-adaptiveform-scribble__clearsign-title { font-size: 14px; font-weight: bold; - text-align: center; line-height: 1.75em; - color: #666; - background: #CCC top repeat-x; - border: solid 1px #FFF; - border-bottom: solid 1px #999; + color: #000; cursor: default; - padding: 0em; + padding-bottom: 10px; margin: 0em; } -#msgBox_content { +.cmp-adaptiveform-scribble__clearsign-content { background: 16px 16px no-repeat ; padding: 1em 1.75em; margin: 0em; } -#msgBox_message { - text-align: center; +.cmp-adaptiveform-scribble__clearsign-message { + font-size: 14px; } -#msgBox_panel { - text-align: center; +.cmp-adaptiveform-scribble__clearsign-panel { + text-align: right; margin: 1em 0em 0em 1em; } -#msgBox_prompt { - margin: .5em 0em; +.cmp-adaptiveform-scribble__clearsign-yes{ + width: 54px; + height: 24px; + margin: 5px; + font-size: 12px; + font-weight: 700; + border: 1px transparent; + border-radius: 20px; + background-color: #0265DC; + color: white; } -input#msgBox_Ok,input#msgBox_Yes,input#msgBox_No,input#msgBox_Cancel{ - background-color: buttonFace; - padding: 5px 10px; - -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; - -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; - box-shadow: rgba(0,0,0,1) 0 1px 0; - text-shadow: rgba(0,0,0,.4) 0 1px 0; - color: buttonText; - font-size: 14px; - font-family: Georgia, serif; - text-decoration: none; - vertical-align: middle; - outline:none; - border: 2px outset buttonface; - border-radius: 1rem; + +.cmp-adaptiveform-scribble__clearsign-no{ + width: 54px; + height: 24px; + font-weight: 700; + font-size: 12px; + margin: 5px; + background-color: #FFF; + border: 2px solid #D5D5D5; + color: #4b4b4b; + border-radius: 20px; } - input#msgBox_Ok:focus,input#msgBox_Yes:focus,input#msgBox_No:focus,input#msgBox_Cancel:focus{ +/* .cmp-adaptiveform-scribble__clearsign-yes:focus,.cmp-adaptiveform-scribble__clearsign-no:focus{ outline:highlight; } - input#msgBox_Ok:hover,input#msgBox_Yes:hover,input#msgBox_No:hover,input#msgBox_Cancel:hover{ + .cmp-adaptiveform-scribble__clearsign-yes:hover,.cmp-adaptiveform-scribble__clearsign-no:hover{ outline:none; border: 2px outset buttonface; - } \ No newline at end of file + } */ \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt index 6c95e73eb7..b0b61fbdc3 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt @@ -15,4 +15,5 @@ ############################################################################### #base=js +GeoLocQuery.js scribbleview.js diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js new file mode 100644 index 0000000000..44bc5920d0 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +if(window.GeoLocationQuery === undefined) { + window.GeoLocationQuery = class GeoLocationQuery { + constructor() { + this._active = false; + } + + init(success, failure) { + this._successHandler = success; + this._errorHandler = failure; + this._active = true; + return this; + } + + _handleSuccess(data) { + if (this._successHandler) { + this._successHandler(data); + } + } + + _handleError(err) { + if (this._errorHandler) { + this._errorHandler(err); + } + } + + query() { + const onSuccess = (pos) => { + if (this._active) { + this._handleSuccess(pos); + } + this._active = false; + }; + + const onError = (err) => { + if (this._active) { + this._handleError(err); + } + this._active = false; + }; + + navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); + } + + cancel() { + this._active = false; + } + } +} \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 3a6f181c1f..9097f86659 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2023 Adobe + * Copyright 2024 Adobe * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,62 +14,12 @@ * limitations under the License. ******************************************************************************/ + (function() { "use strict"; - /** - * class definition for GeoLocationQueryRequest - * encapsulated success and error handlers - */ - class GeoLocQuery { - constructor() { - this._active = false; - } - - init(success, failure) { - this._successHandler = success; - this._errorHandler = failure; - this._active = true; - return this; - } - - _handleSuccess(data) { - if (this._successHandler) { - this._successHandler(data); - } - } - - _handleError(err) { - if (this._errorHandler) { - this._errorHandler(err); - } - } - - query() { - const onSuccess = (pos) => { - if (this._active) { - this._handleSuccess(pos); - } - this._active = false; - }; - - const onError = (err) => { - if (this._active) { - this._handleError(err); - } - this._active = false; - }; - - navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); - } - - cancel() { - this._active = false; - } - } - - const PNGUtil = (() => { + const PNGGeneratorUtil = (() => { // Helper function to initialize CRC table const initCrcTable = () => { const table = new Uint32Array(256); @@ -164,110 +114,15 @@ })(); - - // GeoLocQuery definition ends here - // const PNGUtil = (() => { - // // Helper function to initialize CRC table - // const initCrcTable = () => { - // const table = []; - // let c; - // for (let n = 0; n < 256; n++) { - // c = n; - // for (let k = 0; k < 8; k++) { - // c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); - // } - // table[n] = c; - // } - // return table; - // }; - - // // Helper function to convert 32-bit integer to string - // const u32IntToStr = (n) => String.fromCharCode( - // (n >>> 24) & 0xFF, - // (n >>> 16) & 0xFF, - // (n >>> 8) & 0xFF, - // n & 0xFF - // ); - - // // Helper function to calculate CRC - // const updateCrc = (crc, data) => { - // let c = crc; - // for (let i = 0; i < data.length; i++) { - // c = XOR(crcTable[(XOR(c, data.charCodeAt(i)) & 0xff) >>> 0], c >>> 8); - // } - // return c; - // }; - - // // Helper function to calculate XOR - // const XOR = (a, b) => (a ^ b) >>> 0; - - // // Helper function to calculate CRC - // const CRC = (data) => XOR(updateCrc(0xffffffff, data), 0xffffffff); - - // // Helper function to prepare text chunk - // const prepareTextChunk = (content) => { - // const len = content.length; - // const lenStr = u32IntToStr(len); - // const chunkType = "tEXt"; - // const checkSumStr = u32IntToStr(CRC(chunkType + content)); - // return lenStr + chunkType + content + checkSumStr; - // }; - - // // Initialize CRC table - // const crcTable = initCrcTable(); - - // const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA" - // // Main API - // return { - // // Function to check if data is a PNG - // _isPng: (b64data) => { - // return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); - // }, - - // // Function to make PNG read-only - // _makeReadOnly: (b64data) => { - // const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces - // const pngctx = { p: 8, d: bindata }; // Skip PNG header - // const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); - // const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); - // return btoa(newdata); - // }, - - // // Function to decode base64 - // _atob: (input) => window.atob ? atob(input) : Base64.decode(input), - - // // Function to encode to base64 - // _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), - - // // Function to check if PNG is read-only - // _isReadOnly: (b64data) => { - // if (this._isPng(b64data)) { - // const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; - // const bindata = this._atob(b64data.replace(/\s+/g, '')); - // const pngctx = { p: 8, d: bindata }; // Skip PNG header - // while (pngctx.p < pngctx.d.length) { - // const size = u32IntToStr(pngctx.d.charCodeAt(pngctx.p)); - // const type = pngctx.d.slice(pngctx.p, pngctx.p + 4); - // pngctx.p += 4; // Move past type - // if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { - // return true; - // } - // pngctx.p += size + 4; // Move past data and CRC - // } - // } - // return false; - // } - // }; - // })(); + /** + * class definition for GeoLocationQueryRequest + * encapsulated success and error handlers + */ class Scribble extends FormView.FormFieldBase { _geoLocQuery=null; _signSubmitted=false; _enforceGeoLoc=!!navigator.userAgent.match(/iPad/i); - _geoCanvId=null; - _geoLocAtBottom=false; - _geoCanvasWidth=696; - _defaultStatus=" "; existingSign = ''; existingCanvas = ''; static NS = FormView.Constants.NS; @@ -281,21 +136,28 @@ scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, + canvasSignedContainer: `.${Scribble.bemBlock}__canvas-signed-container`, canvas: `.${Scribble.bemBlock}__canvas`, label: `.${Scribble.bemBlock}__label`, description: `.${Scribble.bemBlock}__longdescription`, qm: `.${Scribble.bemBlock}__questionmark`, errorDiv: `.${Scribble.bemBlock}__errormessage`, tooltipDiv: `.${Scribble.bemBlock}__shortdescription`, + scribbleCloseButton: `.${Scribble.bemBlock}__button-close`, brushControl: `.${Scribble.bemBlock}__control-brush`, scribbleGeoControl: `.${Scribble.bemBlock}__control-geo`, clearControl: `.${Scribble.bemBlock}__control-clear`, scribbleTextControl: `.${Scribble.bemBlock}__control-text`, scribbleMessage: `.${Scribble.bemBlock}__control-message`, + clearSignButton: `.${Scribble.bemBlock}__clearsign-yes`, + cancelClearSignButton: `.${Scribble.bemBlock}__clearsign-no`, + clearSignContainer: `.${Scribble.bemBlock}__clearsign-container`, scribbleSubmitControl: `.${Scribble.bemBlock}__control-submit`, scribbleBrushList: `.${Scribble.bemBlock}__brushlist`, signCanvases: `.${Scribble.bemBlock}__signcanvases`, saveCanvas: `.${Scribble.bemBlock}__control-submit`, + canvasSignedImage: `.${Scribble.bemBlock}__canvas-signed-image`, + mainCanvas: `.${Scribble.bemBlock}__canvas__main` }; constructor(params) { @@ -304,16 +166,12 @@ } initializeScribble() { - this.getCanvasContainer().addEventListener('click', () => this.clickHanlder()); + this.getCanvasContainer().addEventListener('click', () => this.scribbleContainerClickHandler()); this.initScribbleModal(); } - + getWidget() { - return this.element.querySelector(Scribble.selectors.canvas); - } - - getTemplate() { - return this.element.querySelector('#template-modal'); + return this.element.querySelector(Scribble.selectors.canvasSignedContainer); } getLabel() { @@ -344,6 +202,18 @@ return document.querySelector(Scribble.selectors.scribbleMessage); } + getClearSignContainer() { + return document.querySelector(Scribble.selectors.clearSignContainer); + } + + getClearSignButton() { + return document.querySelector(Scribble.selectors.clearSignButton); + } + + getCancelClearSignButton() { + return document.querySelector(Scribble.selectors.cancelClearSignButton); + } + getBrushList() { return document.querySelector(Scribble.selectors.scribbleBrushList); } @@ -360,6 +230,10 @@ return document.querySelector(Scribble.selectors.saveCanvas); } + getGeoLocationIcon() { + return document.querySelector(Scribble.selectors.scribbleGeoControl); + } + getTextSignControl() { return document.querySelector(Scribble.selectors.scribbleTextControl); } @@ -381,11 +255,11 @@ } getCanvasContainer() { - return this.element.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + return this.element.querySelector(Scribble.selectors.canvasSignedContainer); } getScribbleCloseButton() { - return this.element.querySelector('.cmp-adaptiveform-scribble__button-close'); + return this.element.querySelector(Scribble.selectors.scribbleCloseButton); } getCanvas() { @@ -393,7 +267,7 @@ } getMainCanvas() { - return this.element.querySelector('.cmp-adaptiveform-scribble__canvas__main'); + return this.element.querySelector(Scribble.selectors.mainCanvas); } getSignCanvasesContainer() { @@ -404,6 +278,10 @@ return this.element.querySelector(Scribble.selectors.description); } + getSignedCanvasImage() { + return document.querySelector(Scribble.selectors.canvasSignedImage); + } + showMessage(msg){ if(this._msgTimeout) { clearTimeout(this._msgTimeout); this._msgTimeout=0; } const scribbleMessage = this.getMessage(); @@ -417,36 +295,54 @@ extractData(datauri){ var idx; if(datauri!=null&&datauri.length>0&&datauri.indexOf("data:")==0){ - if((idx=datauri.indexOf(","))>0){ + if((idx=datauri.indexOf(","))>0) { return datauri.substr(idx+1); } } } openClearSignModal() { - document.getElementById('msgBox_container').style.display='inline-block'; - document.getElementById('msgBox_Yes').addEventListener('click', () => { - this.existingSign=''; - this.getMainCanvas().parentNode.replaceChild(this.existingCanvas, this.getMainCanvas()); - this.existingCanvas.getContext('2d').clearRect(0, 0, this.existingCanvas, this.existingCanvas.height); - const geoCnv = this.getGeoCanvasRight(); - if(geoCnv) { - const geoCanvasContext = geoCnv.getContext('2d'); - geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + const clearSignContainer = this.getClearSignContainer(); + const clearSignButton = this.getClearSignButton(); + const cancelClearSignButton = this.getCancelClearSignButton(); + + clearSignContainer.style.display = 'inline-block'; + + const handleClearSign = () => { + this.existingSign = ''; + const mainCanvas = this.getMainCanvas(); + const existingCanvas = this.existingCanvas; + + if (mainCanvas && existingCanvas) { + mainCanvas.parentNode.replaceChild(existingCanvas, mainCanvas); + const ctx = existingCanvas.getContext('2d'); + ctx.clearRect(0, 0, existingCanvas.width, existingCanvas.height); } - this.enableControls(['brush','geo','clear','text','submit']); - const box = document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); - if (box.firstChild) { - box.removeChild(box.firstChild); - document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container').innerHTML = ""; - document.querySelector('.sc_popUpMenu')?.remove(); - document.getElementById('msgBox_container').style.display='none'; + + const geoCanvas = this.getGeoCanvasRight(); + if (geoCanvas) { + const geoCtx = geoCanvas.getContext('2d'); + geoCtx.clearRect(0, 0, geoCanvas.width, geoCanvas.height); + } + + this.enableControls(['brush', 'geo', 'clear', 'text', 'submit']); + + const signedImage = this.getSignedCanvasImage(); + if (signedImage) { + signedImage.removeAttribute('src'); + signedImage.removeAttribute('style'); + document.querySelector('.cmp-adaptiveform-scribble__clear-sign')?.remove(); + clearSignContainer.style.display = 'none'; this.getKeyboardSignBox().value = ''; } + this._signSubmitted = false; - }); - document.getElementById('msgBox_No').addEventListener('click', () => { - document.getElementById('msgBox_container').style.display='none'; + }; + + clearSignButton.addEventListener('click', handleClearSign); + + cancelClearSignButton.addEventListener('click', () => { + clearSignContainer.style.display = 'none'; }); } @@ -455,108 +351,109 @@ mainCanvas.classList.add('cmp-adaptiveform-scribble__canvasImage'); } - doOk() { + updateValue(value) { + // html sets undefined value as undefined string in input value, hence this check is added + let widgetValue = typeof value === "undefined" ? null : value; + const signedImage = this.getSignedCanvasImage(); + if (signedImage) { + signedImage.src = widgetValue; + super.updateEmptyStatus(); + } + } + + isCanvasEmpty(canvas) { + const ctx = canvas.getContext('2d'); + const width = canvas.width; + const height = canvas.height; + + // Get pixel data from the canvas + const imageData = ctx.getImageData(0, 0, width, height); + + // Check if any pixel is not transparent (not [0, 0, 0, 0] = transparent) + for (let i = 0; i < imageData.data.length; i += 4) { + if (imageData.data[i + 3] > 0) { + return false; // Found non-transparent pixel + } + } + + return true; // No non-transparent pixels found + } + + submitSign() { + if (!this.isCanvasEmpty(this.canvas)) { + const mainCanvas = this.createMainCanvas(); + const sigCnv = this.getCanvas(); // Get the sign canvas + const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas + + this.drawCanvasesOnMainCanvas(mainCanvas, sigCnv, geoCnv); + + this.existingCanvas = sigCnv; + sigCnv.height = mainCanvas.height; + sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); + + const newData = mainCanvas.toDataURL("image/png"); + this.existingSign = mainCanvas; + let val; + if ((val = this.extractData(newData))) { + // const pngGeneratorUtil = PNGGeneratorUtil(); + val = PNGGeneratorUtil._makeReadOnly(val); + this._is_readonly = true; + } + + this.updateSignedImage(newData); + this.setModelValue(newData); + this.addClearSignButton(); + + if (this._geoLocQuery) { + this._geoLocQuery.cancel(); // Cancel the current geo loc request + } + + this.closeEditModal(); + this._signSubmitted = true; + } + } + + createMainCanvas() { const mainCanvas = document.createElement('canvas'); - // mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas'); mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas__main'); - const sigCnv = this.getCanvas(); // Get the sign canvas - const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas - let ctx = mainCanvas.getContext('2d'); + return mainCanvas; + } + + drawCanvasesOnMainCanvas(mainCanvas, sigCnv, geoCnv) { + const ctx = mainCanvas.getContext('2d'); if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { // Set the dimensions of the mainCanvas to accommodate both canvases vertically mainCanvas.width = Math.max(sigCnv.width, geoCnv.width); mainCanvas.height = sigCnv.height + geoCnv.height; - ctx = mainCanvas.getContext('2d'); // Draw the sign canvas on the main canvas ctx.drawImage(sigCnv, 0, 0); - // Draw the geo canvas below the sign canvas - ctx.drawImage(geoCnv, 0, sigCnv.height); + ctx.drawImage(geoCnv, 0, sigCnv.height, geoCnv.width, geoCnv.height); } else { mainCanvas.width = sigCnv.width; mainCanvas.height = sigCnv.height; ctx.drawImage(sigCnv, 0, 0); } - - // if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { - // if (this._geoLocAtBottom) { - // mainCanvas.width = sigCnv.width; - // mainCanvas.height = sigCnv.height + geoCnv.height; - // ctx.drawImage(sigCnv, 0, 0); - // ctx.drawImage(geoCnv, 0, sigCnv.height); - // } else { - // // Create the final image after the submit is clicked - // mainCanvas.width = sigCnv.width;// + geoCnv.width + 10; - // mainCanvas.height = sigCnv.height + geoCnv.height + 10;// Math.max(sigCnv.height, geoCnv.height); - // // mainCanvas.height = Math.max(sigCnv.height, geoCnv.height); - // ctx.drawImage(sigCnv, 0, 0); - // // +10 is added to provide the margin between two images - // ctx.drawImage(geoCnv, 0, 180); - // // ctx.drawImage(geoCnv, sigCnv.width + 10, 0); - // geoCnv.style.display = 'none'; - // } - // } else { - // mainCanvas.width = sigCnv.width; - // mainCanvas.height = sigCnv.height; - // ctx.drawImage(sigCnv, 0, 0); - // } - this.existingCanvas = sigCnv; - sigCnv.height = mainCanvas.height; - sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); - - const newData = mainCanvas.toDataURL("image/png"); - this.existingSign = mainCanvas; - let val; - if ((val = this.extractData(newData))) { - val = PNGUtil._makeReadOnly(val); - this._is_readonly = true; - } - - const img = document.createElement('img'); + } + + updateSignedImage(newData) { + const img = this.getSignedCanvasImage(); img.src = newData; img.style.width = '100%'; - img.style.height = '200px'; - + img.style.height = '250px'; + } + + addClearSignButton() { const clearSignButton = document.createElement('div'); - clearSignButton.classList.add('sc_popUpMenu'); - + clearSignButton.classList.add('cmp-adaptiveform-scribble__clear-sign'); + const mainCanvasImageContainer = this.getCanvasContainer(); - mainCanvasImageContainer.appendChild(img); mainCanvasImageContainer.appendChild(clearSignButton); clearSignButton.addEventListener('click', (e) => { e.stopPropagation(); this.openClearSignModal(); }); - - if (this._geoLocQuery) { - this._geoLocQuery.cancel(); // Cancel the current geo loc request - } - - this.closeEditModal(); - this._signSubmitted = true; - } - - handleOk() { - if (this._enforceGeoLoc) { - // Create a new GeoLocQuery instance and initialize it with bound handlers - this._geoLocQuery = new GeoLocQuery().init( - (data) => { - this.geoQuerySuccessHandler(data); - this.doOk(); - }, - (err) => { - this.geoQueryErrorHandler(err); - } - ); - - // Start the geolocation query - this._geoLocQuery.query(); - this.showMessage('fetchGeoLocation'); - } else { - // If geolocation is not enforced, directly proceed with the operation - this.doOk(); - } } geoQueryErrorHandler(err){ @@ -565,8 +462,8 @@ renderBrushList() { [2,3,4,5,6,7,8,9,10].forEach((brush) => { - var divel = document.createElement('DIV'); - var cnv = document.createElement('CANVAS'); + var divel = document.createElement('div'); + var cnv = document.createElement('canvas'); var ctx = cnv.getContext('2d'); cnv.style.border='1px solid #AAAAAA'; cnv.width=100; @@ -581,6 +478,7 @@ divel.addEventListener('click', (e) => { e.stopPropagation(); this.context.lineWidth=brush; + this.toggleBrushList(); }) this.getBrushList().append(divel); }); @@ -603,14 +501,10 @@ if (signCanvas.width > 0 && signCanvas.height > 0) { imgData = ctx.getImageData(0, 0, signCanvas.width, signCanvas.height); } - // Calculate the new width based on the percentage of the container's width const newWidth = container.offsetWidth * (percentage / 100); - // Set the new width and height of the canvas signCanvas.width = newWidth; - // signCanvas.height = container.offsetHeight; // Maintain the height - // Restore the content back to the resized canvas if it has valid content if (imgData) { ctx.putImageData(imgData, 0, 0); @@ -625,91 +519,80 @@ const longStr = `Longitude: ${longitude}`; const dateObj = new Date(); const tZone = (dateObj.getTimezoneOffset() / 60) * -1; - const time = dateObj.getTime(); - const timeStr = `${time}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; - - const signCanvas = this.getSignCanvasesContainer(); - const geoCanvasRight = this.getGeoCanvasRight(); - const container = this.getCanvasContainer(); - - // Set the widths of the canvases - // signCanvas.style.width = '70%'; - geoCanvasRight.style.height = '50px'; - geoCanvasRight.style.width = '200px'; - geoCanvasRight.style.display = 'block'; - // geoCanvasRight.style.display = 'inline-block'; - // geoCanvasRight.style.height = '200px'; - // Adjust the canvas sizes based on the new widths - // this.resizeAndFixCanvas(); - // this.resizeCanvas(70); // Resize the signCanvas to 70% of its container's width - - if (geoCanvasRight) { - const ctx = geoCanvasRight.getContext('2d'); - geoCanvasRight.width = geoCanvasRight.offsetWidth; - geoCanvasRight.height = geoCanvasRight.offsetHeight; - - ctx.font = 'bold 10px Arial'; // Font size and type - ctx.fillStyle = 'black'; // Text color - ctx.measureText("m").width * 1.5; - ctx.fillStyle = 'black'; // Text color - ctx.measureText("m").width * 1.5; - // Define the position to draw the text - let x = 0; - let y = 15; - - // Draw the text on the canvas - ctx.fillText(latStr, x, y); - ctx.fillText(longStr, x, y + 15); - ctx.fillText(timeStr, x, y + 30); - } + const timeStr = `${dateObj.getTime()}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; + this.updateGeoCanvas(latStr, longStr, timeStr); + } + } + + updateGeoCanvas(latStr, longStr, timeStr) { + const geoCanvasRight = this.getGeoCanvasRight(); + geoCanvasRight.style.height = '50px'; + geoCanvasRight.style.width = '200px'; + geoCanvasRight.style.display = 'block'; + + if (geoCanvasRight) { + const ctx = geoCanvasRight.getContext('2d'); + geoCanvasRight.width = geoCanvasRight.offsetWidth; + geoCanvasRight.height = geoCanvasRight.offsetHeight; + + ctx.font = 'bold 10px Arial'; // Font size and type + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + let x = 0; + let y = 15; + + // Draw the text on the canvas + ctx.fillText(latStr, x, y); + ctx.fillText(longStr, x, y + 15); + ctx.fillText(timeStr, x, y + 30); } } - handleGeo() { - // initiate geolocation - if(navigator.geolocation){ - // Create a new GeoLocQuery instance - this._geoLocQuery = new GeoLocQuery(); - // Initialize with bound success and error handlers + + handleGeoLocation() { + if (navigator.geolocation) { + this._geoLocQuery = new GeoLocationQuery(); this._geoLocQuery.init( this.geoQuerySuccessHandler.bind(this), this.geoQueryErrorHandler.bind(this) ); this._geoLocQuery.query(); - this.showMessage('Fetching Geo Location...'); // Geo Location ! + this.showMessage('Fetching Geo Location...'); } } - // This Function is used to fetch the geolocation. - calculateGeolocation() { - this.handleGeo(); + geoQueryErrorHandler(err) { + this.showMessage('Error fetching geolocation'); } enableControls(controls) { controls.forEach(control => { - document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.remove('disable_button'); + const element = document.querySelector('.' + Scribble.bemBlock + '__control-' + control); + element?.classList.remove('disable_button'); + element.removeAttribute('disabled'); + element.setAttribute('aria-disabled', 'false'); }); } disableControl(controls) { controls.forEach(control => { - document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.add('disable_button'); + const element = document.querySelector('.' + Scribble.bemBlock + '__control-' + control); + element?.classList.add('disable_button'); + element.setAttribute('disabled', 'true'); + element.setAttribute('aria-disabled', 'true'); }); } dialogCallback(button_val, arg1) { switch(button_val){ - case "ok": - this.handleOk(); - break; - case "Cancel": - this.handleCancel(); - break; - case "geolocation": - this.calculateGeolocation(); - break; - case "BrushSelect": - this.handleBrushSelect(arg1); - break; + // case "ok": + // this.handleOk(); + // break; + // case "Cancel": + // this.handleCancel(); + // break; + // case "geolocation": + // this.calculateGeolocation(); + // break; case "brushes": this.handleBrush(arg1); break; @@ -722,34 +605,12 @@ toggleBrushList(event) { var brushList = this.getBrushList(); var brushButton = this.getBrush(); - var originalOnSelectStart = document.onselectstart; - - if (getComputedStyle(brushList).display !== 'none') { - brushList.style.display = 'none'; - return; - } - - // Disable text selection - document.onselectstart = function() { - return false; - }; - - // Show the brush list and position it - brushList.style.display = 'block'; - brushList.style.visibility = 'hidden'; - // Make it visible - brushList.style.visibility = 'visible'; - - // Add an event listener for mouse leave - function onMouseLeave() { + if(getComputedStyle(brushList).display === 'none') { + brushList.style.display = 'block'; + } else { brushList.style.display = 'none'; - document.onselectstart = originalOnSelectStart; - brushList.removeEventListener('mouseleave', onMouseLeave); } - - brushList.addEventListener('mouseleave', onMouseLeave); } - imageClick(event) { this.dialogCallback(event.srcElement.title); @@ -767,91 +628,85 @@ this.getKeyboardSignBox().style.display = 'none'; this.canvas.style.display = "block"; this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.eraseSignature(); this.initializeCanvas(); - this.toggleBrushList(evt); - } - - makeDraggable() { - const draggableBar = this.getScribbleContainerPanel(); - const draggableContent = this.getScribbleContainer(); - draggableBar.addEventListener('mousedown', (e) => { - let offsetX = e.clientX - draggableContent.getBoundingClientRect().left; - let offsetY = e.clientY - draggableContent.getBoundingClientRect().top; - function onMouseMove(event) { - draggableContent.style.left = `${event.clientX - offsetX}px`; - draggableContent.style.top = `${event.clientY - offsetY}px`; - } - function onMouseUp() { - document.removeEventListener('mousemove', onMouseMove); - document.removeEventListener('mouseup', onMouseUp); - } - document.addEventListener('mousemove', onMouseMove); - document.addEventListener('mouseup', onMouseUp); - }); } - initScribbleModal() { const eraserIcon = this.getClearControl(); - const textSignIcon = this.getTextSignControl(); + const textSignIcon = this.getTextSignControl(); const controlPanel = this.getScribbleControlPanel(); - const toggleBrushListIcon = this.getBrushList(); + const toggleBrushListIcon = this.getBrush(); + const brushList = this.getBrushList(); const closeEditModal = this.getScribbleCloseButton(); const keyboardSignBox = this.getKeyboardSignBox(); const saveButton = this.getSaveControl(); - // this.resizeAndFixCanvas() - - this.renderBrushList() - controlPanel.addEventListener('click', (event) => { - this.imageClick(event); - }) - - saveButton.addEventListener('click', () => { - this.doOk(); + const geoLocationIcon = this.getGeoLocationIcon(); + + this.renderBrushList(); + + this.addEventListeners(controlPanel, 'click', this.imageClick.bind(this)); + this.addEventListeners(saveButton, 'click', this.submitSign.bind(this)); + this.addEventListeners(geoLocationIcon, 'click', this.handleGeoLocation.bind(this), true); + this.addEventListeners(eraserIcon, 'click', this.eraseSignature.bind(this), true); + this.addEventListeners(textSignIcon, 'click', this.enableSignatureTextBox.bind(this), true); + this.addEventListeners(toggleBrushListIcon, 'click', this.toggleBrushList.bind(this)); + this.addEventListeners(closeEditModal, 'mousedown', this.closeEditModal.bind(this)); + + keyboardSignBox.addEventListener('input', (event) => { + if (event?.target?.value) { + this.enableControls(['submit', 'clear']); + } else { + this.disableControl(['submit', 'clear']); + } }); - - eraserIcon.addEventListener('click', () => { - this.eraseSignature(); - }) - textSignIcon.addEventListener('click', () =>{ - this.enableSignatureTextBox(); - }) - toggleBrushListIcon.addEventListener('click', (event) => { - this.toggleBrushList(event); - }) - closeEditModal.addEventListener('mousedown', () => { - this.closeEditModal(); - }) - + keyboardSignBox.addEventListener('keyup', () => { - this.enableControls(['clear','submit']); - let sigCanvasFontFamily = "sans-serif, Georgia"; - let sigCanvasFontStyle = "italic"; - keyboardSignBox.style.font=sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; - const value = keyboardSignBox.value; - this.context.font = sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; - this.context.fillText(value,0,this.getCanvas().height/2); - }) - + this.updateKeyboardSignBoxFont(keyboardSignBox); + }); + + document.addEventListener('click', (event) => { + if (!brushList.contains(event.target) && !toggleBrushListIcon.contains(event.target)) { + brushList.style.display = 'none'; + } + }); + } + + addEventListeners(element, eventType, handler, checkDisabled = false) { + if (element) { + element.addEventListener(eventType, (event) => { + if (!checkDisabled || element.getAttribute('disabled') !== 'true') { + handler(event); + } + }); + } + } + + updateKeyboardSignBoxFont(keyboardSignBox) { + const fontFamily = "sans-serif, Georgia"; + const fontStyle = "italic"; + keyboardSignBox.style.font = `${fontStyle} 2rem ${fontFamily}`; + const value = keyboardSignBox.value; + this.context.font = `${fontStyle} 2rem ${fontFamily}`; + this.context.fillText(value, 0, this.getCanvas().height / 2); } enableSignatureTextBox() { - this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.eraseSignature(); this.getKeyboardSignBox().style.display = "inline-block"; this.getCanvas().style.display = "none"; } eraseSignature() { - this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.context?.clearRect(0, 0, this.canvas?.width, this.canvas?.height); const geoCnv = this.getGeoCanvasRight(); if(geoCnv) { - const geoCanvasContext = geoCnv.getContext('2d'); - geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + const geoCanvasContext = geoCnv?.getContext('2d'); + geoCanvasContext?.clearRect(0, 0, geoCnv.width, geoCnv.height); geoCnv.style.display = 'none'; } this.getKeyboardSignBox().value=''; this.disableControl(['clear','submit']); } - resizeAndFixCanvas() { const dpr = window.devicePixelRatio || 1; @@ -860,35 +715,49 @@ this.canvas.height = this.canvas.offsetHeight * dpr; this.context.putImageData(imgData, 0, 0); } - - initializeCanvas() { - this.canvas = this.getCanvas(); + handleCanvasEvent(event) { + switch (event.type) { + case 'mousedown': + case 'touchstart': + this.startDrawing(event); + break; + case 'mousemove': + case 'touchmove': + this.draw(event); + break; + case 'mouseup': + case 'mouseleave': + case 'touchend': + case 'touchcancel': + this.stopDrawing(); + break; + } + } + addCanvasEventListeners() { + const events = ['mousedown', 'mousemove', 'mouseup', 'mouseleave', 'touchstart', 'touchmove', 'touchend', 'touchcancel']; + events.forEach(event => { + this.canvas.addEventListener(event, this.handleCanvasEvent.bind(this)); + }); + } + + initializeCanvas() { if(this.existingSign) { this.getCanvasContainer().style.width = '100%'; this.getMainCanvas().style.border = '1px solid black'; this.getKeyboardSignBox().style.display = 'none'; this.disableControl(['brush','geo','clear','text','submit']); } else { + this.canvas = this.getCanvas(); + this.canvas.style.display = 'block'; this.context = this.canvas.getContext('2d', { willReadFrequently: true }); this.resizeCanvas(100); this.resizeAndFixCanvas(); if (this.canvas) { this.canvas.style.border = '1px dashed #AAAAAA'; this.getKeyboardSignBox().style.display = 'none'; - this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); - this.canvas.addEventListener('mousemove', this.draw.bind(this)); - this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); - this.canvas.addEventListener('mousemove', this.draw.bind(this)); - this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); - this.canvas.addEventListener('touchstart', this.startDrawing.bind(this)); - this.canvas.addEventListener('touchmove', this.draw.bind(this)); - this.canvas.addEventListener('touchend', this.stopDrawing.bind(this)); - this.canvas.addEventListener('touchcancel', this.stopDrawing.bind(this)); + this.addCanvasEventListeners(); this.isDrawing = false; } } @@ -908,12 +777,11 @@ this.getScribbleContainer().style.display = 'none'; } - clickHanlder() { + scribbleContainerClickHandler() { this.showScribbleModal(); this.initializeCanvas(); } - startDrawing(event) { // Ensure the context is initialized if (!this.context) { @@ -965,7 +833,6 @@ if (this.isDrawing) { this.context.closePath(); this.isDrawing = false; - this._model.value = this.canvas.toDataURL(); } } } diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..62657c95c2fb5f7fa74374d0d3aaed51ff43b099 GIT binary patch literal 7376 zcmV;>953UEP);8*(R?LHI-6T ziiDu*OF*pzc}XQmX)7g96w?AyTMDjl3={)4#$WiJJ)Pe=>pyp$xyQtCkIl7jmbA~F zy=V5Ez1PgF@0m&I6F|f-%9d-n9@UeB4s%hY=@PX~2yU(Yvnbvkq%>xs|I zdzZF8J*)EV|F_S5#DD1fKM{PK2fHb*b60@GN=7%WhI^eZ9LfvNq~{$mPw9K^xu?73 zmRqu4cjY?iTJX|KFLh5m@kG{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AN*b|@dx4IBj_b|_EE{aJZG>|Aw(e7rudXUXe*{Jg#!*L97&4!+61*$)5K zKBjJ6p2Ar^jT7^k*68G@pjnG7Zhel2uVUa-WrK6YLO>1Ib8T2m=@XQJglV%giEO3-DjQ^L6%6^4f;H)1-;)HgQ)Gr~u{pJ`X#Yf?*8{ zrwBve?3|s>mI*H@7x|dTYh*oFvZ_>BbyvR#Ko~ttJ_m@R(mg8ACB}QpIfzG?I6*?~?Z)+g-lE)r< zY*3V5%Ebl(S>>p!$w}kXosX=n5v4|oUIwa{!?z5qb&FoBF4X~eokDgkBhWYJ8Fa+= zVCyEIKhd)q2E2OE*mvr}g!XW{Sb0axC*QNZJ@-0$U2mU@<@HP~@7L@9r%8vY^+XyS n%Czs0;`2&pS$Xq$?5FlK`T4e|#6=yp00000NkvXXu0mjfJk^TA literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..7bfe0482aa500a84193aea9b9affb4e652ddd269 GIT binary patch literal 6904 zcmV$^0M>r^LI~Aed^Y?e|7tJI_y6BNcb)&x_y0(6GY<|+T-U*X#CFE8tcH7oE&}X@SJLZ_oTv12&pkIh_0&@} zt_Qm=x)!|t`s>4sFTPmy9M{TIS(Qrx=>q}@e5~Jp|NZxemtTGvq$u6~>X~Pr86JN4;i~eSbuT|B$n`26 z$n_Uf9sRlgpZ|Bp3)Sx4 zU>{zD@TZ@CdU)lPS2!2W{3Z8D+#hh8GTnS4^TJ% zk)dyJeN$PF_ySHy$LN@Z+b?T~`4?p*`tFtXe;%!!hrPdWMi^y!3M^tsngSTc*RyP&s55hrv|fp=yo}H@Sr1F^>C)VJvWlaweq-*_h@DLAG@yV3^a}* zoVtBP2J$sJS4K+4S;A97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KjK@*d=BmM3eM_voS46C%}>n}G;fjZt_PZ_y=r)R{7v0qP83-DjD^L33-@>)1O$Y>(HP2N=m zDiEtkbHpnt*3fW@FpS;K+2v-L@QyN3o0koR-PFyT^^$E5db!>S#F#{~QX@4UlIiI> z2=#bFOvK@@Dc{dQ4r^ccjnoOE)tTa(^ldFI^3sv#Hkpn58zMJ1;#s&NMrl2Pu7|W0 zIxiz{YasWMQ>RY3PrN22xq(2I9c?u^=WM!*kySOK)JWOOK=pFOmVvEq(QDPEI)JEC z$Zll>`sTWZj>H~p!}9Z&^Q?{m-#X~@J8fY?e*|4@yd$Se?AhL5N1dbY_s`|>dM1~T y`|bbBvct4`GL24U`gbV#d7am3dFxkLH~mA9FB!R3)TBfJ0000 + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSignButton.png similarity index 100% rename from ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png rename to ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSignButton.png diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png deleted file mode 100644 index c5c299397cd4696456cb883f73b45ce6f79d9617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8242 zcmeHsdpy(q-~XiOFkD@1Ob!<%Vay>}gj|w2v`aHF=Y%CCD|A4)^1Y|5GAa~FS92I4 zLzc5k)11qxRurp5EplkBobLB$)AfBke*gXM$K$^LxF7c)d3~O*LkvP&x7)-te`X}||cwsOMruoEaj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xhU zatf(epT$`RJAu@TzXoK)q0}@WRKdl}1oFoNoZoN2U(lj$eh?(bQXP(50Q@86Y5fTx zK39g;4};`Z8nGGZjb&)WKOwo5*1rzu1LcuSX%<$hDH~0&0%J%Be}IeT@>j#22d5r^ zT4zQ!I6E*LEL zuQVE1A()EYB?mAe*yZu-V%a%Dm&n5zV(H82o0OOU X^8b2uY99PQKg`Jizo+!~zzhEgBUy0p diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png deleted file mode 100644 index 47d047ddfa08e92084b5ef2d5993ecc247c08930..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM#=yWhy?{3l$YCrFa(7}_cTVOdki(Mh=>$h?_mX=7D>g$CCcB~4dUHj zaLB4kZ<$jPmJ_0J)_K*cnn|k3=gf`>I-az&-^-lT6TVB-)$H=xA`zCkTzf*bUR)FD zIN?&h@aBwnOifGwwR)fb<;&e-QvY(+-`1`=#~T-BPCeVHxm4P@c0#}re!br}k`1ps zTW$TPLt@2_8#ksLv{x_O$!pDa>?l?_mX=7D>g$B}?+2*dLIQ zU8tNgCFerXrAR}QfLTH-SAFvII5sD~aE?%N%@ei{_u@0fS_H&qx%M!nFJqeR#d>uW zli9hM diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png deleted file mode 100644 index af4507989cadb1d9373f3b4f28dc633279cdce3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!N$PASg|QB0LWo14sv&5Sa(k5C6L3C?&#~t zz_78O`%fY(kk47*5n0T@z%2~Ij105pNB{-*c)B=-Sopu4dYkvK0*|Yt;^LB)JSV$~ zHB$wxyv(y|C$7|yV+zka>fYD#Ncj4#Rs_V?EZ) zW?nOYicrRL`8ThWk32q~B4{Z4^Y)e>$Y?;!)8R%0e*10dpByunfL z=T4&__k@-_hPo5|Y_}%3EDYlRyTrpU$KET((Q>bi8& zR#-mVD}VKmi_G<-JPNJ)k?JzWH-9+`CEF-7tWJs&&dK}h!j}HtVHNY!OUG9^G})J!1177QgFkT0>{0z@@VoJ=(js#)53b&` zcc*zg-zJ`=6z*}ic1>A#>&oOwq`njxg HN@xNAhv{(o diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png new file mode 100644 index 0000000000000000000000000000000000000000..8bd6a6118b9018d646029ebcb57dafc7085eb1a2 GIT binary patch literal 1022 zcmVR z^BGB+cz%bpR)_^?m5O#KWczBw(f08ig_Wsy+ zjD4f0w#po^u6TmTSaNy@o5FNModI=-PmRB@`;wyRU)w06PVr=ae?JyJr=M=CF`#bo zWd=O6>F~Aq`q;>;*5>IM1z&G)vHUoSVPiis1SMg+R1AG=w z)-u3%@#Mt@Y=e06A_KNXJgIEJHi;*d4A?gDq_hFsD4vuuU|YqL!fS%O%Zf|Md@RLv zfBwR}khaB>LIZFh()INxdW;N4h^dGM@g#Q&B=^{VnPMs(v=;FsHv;bN?%vvc$>V1> zr6WO;c#>-X#7^u!9ON+*pD?`81a0Dpa|$@ZKOT)nulVNr`uY?GNjD!wF&f1aX9VD& zLc0%wpEEv}zOs>^RXlOt8^i%mgzg{d22DUD7$Fj#Oc-McooE$L@^V0!85{(eHNPMd z=9Bo56bLf|gCH`+a7^sj zrcOM`Btd3x=@C=u-a3}b9*QNNC^6AZjr(C{mEuXp0R93)826n06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t*2#26cjx*wR_Vx7@H4d5Jw5Y49mFF7Hn&K@Zp6GET@m?MFls&1` zIcEhrWOlt4Rblbl8b~OX9tSnb=PN<6s@$v;S1W|B?ALV38sm08AD|2JcbMQR`-+>_ zRqA4iX=B}*Z_@T>(2LqP!Tix9SoCUjAzSRza0a7n%xcffwPJrA3#}Zyvue#6 z$>;JWtyatU8_KnVrYCOqZXFoy&h=5x!tQJ8&CBm$0uL%Rir1iDd@uy{u;++&hhy8_}^#X zi-V*#c6N5;hYufG9`b!tmy{PKkcK!V4SxBOyZHUbGL08O<}XumG#1UhIF3XjVf1u$ zu}i9|s`3^c3p^yhRBvH!p4ZXY*>kVbEk;>+ -
-
+
@@ -52,26 +53,22 @@
-
-

Clear Signature Confirmation

-
-
- Are you sure you want to clear signature? +
+

Clear all?

+
+
+ Are you sure you want to start over?
-
- - +
+ +
From 2ece48e47ea59c103136200e70b16a68b990b041 Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Thu, 19 Dec 2024 16:05:48 +0530 Subject: [PATCH 03/17] scribble component clean up --- .../clientlibs/site/js/scribbleview.js | 69 +++++++------------ .../form/scribble/v1/scribble/scribble.html | 12 ++-- 2 files changed, 31 insertions(+), 50 deletions(-) diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 9097f86659..45e54d1799 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -17,8 +17,6 @@ (function() { "use strict"; - - const PNGGeneratorUtil = (() => { // Helper function to initialize CRC table const initCrcTable = () => { @@ -113,8 +111,6 @@ }; })(); - - /** * class definition for GeoLocationQueryRequest * encapsulated success and error handlers @@ -133,7 +129,6 @@ scribbleContainer: `.${Scribble.bemBlock}__container`, scribbleContainerPanel: `.${Scribble.bemBlock}__panel`, keyboardSignBox: `.${Scribble.bemBlock}__keyboard-sign-box`, - scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, canvasSignedContainer: `.${Scribble.bemBlock}__canvas-signed-container`, @@ -242,10 +237,6 @@ return document.querySelector(Scribble.selectors.scribbleContainerPanel); } - getScribbleContainerCaption() { - return document.querySelector(Scribble.selectors.scribbleContainerCaption); - } - getKeyboardSignBox() { return document.querySelector(Scribble.selectors.keyboardSignBox); } @@ -479,6 +470,7 @@ e.stopPropagation(); this.context.lineWidth=brush; this.toggleBrushList(); + // this.handleBrush(e); }) this.getBrushList().append(divel); }); @@ -582,29 +574,8 @@ }); } - dialogCallback(button_val, arg1) { - switch(button_val){ - // case "ok": - // this.handleOk(); - // break; - // case "Cancel": - // this.handleCancel(); - // break; - // case "geolocation": - // this.calculateGeolocation(); - // break; - case "brushes": - this.handleBrush(arg1); - break; - case "Text": - this.handleText(); - break; - } - } - toggleBrushList(event) { var brushList = this.getBrushList(); - var brushButton = this.getBrush(); if(getComputedStyle(brushList).display === 'none') { brushList.style.display = 'block'; } else { @@ -612,8 +583,29 @@ } } - imageClick(event) { - this.dialogCallback(event.srcElement.title); + controlPanelClickHandler(event) { + const ariaLabel = event.target.getAttribute('aria-label'); + switch(ariaLabel){ + case 'save': + this.submitSign(); + break; + case 'close': + this.closeEditModal(); + break; + case 'clearSign': + this.eraseSignature(); + break; + case 'textSign': + this.enableSignatureTextBox(); + break; + case 'geolocation': + this.handleGeoLocation(); + break; + case 'brushes': + this.handleBrush(event); + this.toggleBrushList(); + break; + } } closeEditModal() { @@ -632,25 +624,14 @@ this.initializeCanvas(); } initScribbleModal() { - const eraserIcon = this.getClearControl(); - const textSignIcon = this.getTextSignControl(); const controlPanel = this.getScribbleControlPanel(); const toggleBrushListIcon = this.getBrush(); const brushList = this.getBrushList(); - const closeEditModal = this.getScribbleCloseButton(); const keyboardSignBox = this.getKeyboardSignBox(); - const saveButton = this.getSaveControl(); - const geoLocationIcon = this.getGeoLocationIcon(); this.renderBrushList(); - this.addEventListeners(controlPanel, 'click', this.imageClick.bind(this)); - this.addEventListeners(saveButton, 'click', this.submitSign.bind(this)); - this.addEventListeners(geoLocationIcon, 'click', this.handleGeoLocation.bind(this), true); - this.addEventListeners(eraserIcon, 'click', this.eraseSignature.bind(this), true); - this.addEventListeners(textSignIcon, 'click', this.enableSignatureTextBox.bind(this), true); - this.addEventListeners(toggleBrushListIcon, 'click', this.toggleBrushList.bind(this)); - this.addEventListeners(closeEditModal, 'mousedown', this.closeEditModal.bind(this)); + this.addEventListeners(controlPanel, 'click', this.controlPanelClickHandler.bind(this)); keyboardSignBox.addEventListener('input', (event) => { if (event?.target?.value) { diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html index b0d4727265..3666669b72 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -64,16 +64,16 @@
- +
- - - + + +
- - + +
From 0778847bd835bc14cf9c46a286cbc950f8b65a83 Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Tue, 3 Dec 2024 14:55:42 +0530 Subject: [PATCH 04/17] scribble initial commit --- .../internal/models/v1/form/ScribbleImpl.java | 49 + .../core/components/models/form/Scribble.java | 36 + .../form/scribble/exporter-scribble.json | 22 + .../components/form/scribble/.content.xml | 7 + .../components/form/scribble/_cq_template.xml | 5 + .../.content.xml | 2 +- .../fd/components/form/scribble/.content.xml | 3 + .../components/form/scribble/v1/.content.xml | 5 + .../form/scribble/v1/scribble/.content.xml | 8 + .../form/scribble/v1/scribble/README.md | 91 ++ .../scribble/_cq_design_dialog/.content.xml | 80 ++ .../v1/scribble/_cq_dialog/.content.xml | 111 ++ .../scribble/v1/scribble/_cq_template.xml | 5 + .../v1/scribble/clientlibs/.content.xml | 3 + .../scribble/clientlibs/editor/.content.xml | 5 + .../v1/scribble/clientlibs/editor/js.txt | 18 + .../clientlibs/editor/js/editDialog.js | 31 + .../v1/scribble/clientlibs/site/.content.xml | 6 + .../v1/scribble/clientlibs/site/css.txt | 18 + .../clientlibs/site/css/scribbleview.css | 414 ++++++++ .../v1/scribble/clientlibs/site/js.txt | 18 + .../clientlibs/site/js/scribbleview.js | 976 ++++++++++++++++++ .../clientlibs/site/resources/iconeraser.svg | 20 + .../clientlibs/site/resources/icontext.svg | 18 + .../site/resources/images/iEBox_brush.png | Bin 0 -> 1694 bytes .../site/resources/images/iEBox_clear.png | Bin 0 -> 2186 bytes .../site/resources/images/iEBox_close.png | Bin 0 -> 1260 bytes .../site/resources/images/iEBox_geo.png | Bin 0 -> 2055 bytes .../site/resources/images/iEBox_keyboard.png | Bin 0 -> 3549 bytes .../site/resources/images/iEBox_no.png | Bin 0 -> 2812 bytes .../site/resources/images/iEBox_ok.png | Bin 0 -> 8242 bytes .../site/resources/images/leftnav.png | Bin 0 -> 290 bytes .../site/resources/images/leftnav_hover.png | Bin 0 -> 291 bytes .../site/resources/images/rightnav.png | Bin 0 -> 295 bytes .../site/resources/images/rightnav_hover.png | Bin 0 -> 316 bytes .../site/resources/images/signature.png | Bin 0 -> 1342 bytes .../form/scribble/v1/scribble/scribble.html | 97 ++ .../form/scribble/v1/scribble/scribble.js | 34 + ui.frontend/package-lock.json | 7 +- .../specs/scribble/scribble.authoring.spec.js | 0 .../specs/scribble/scribble.runtime.spec.js | 0 41 files changed, 2083 insertions(+), 6 deletions(-) create mode 100644 bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java create mode 100644 bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java create mode 100644 bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json create mode 100644 examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml create mode 100644 examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_close.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_geo.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js create mode 100644 ui.tests/test-module/specs/scribble/scribble.authoring.spec.js create mode 100644 ui.tests/test-module/specs/scribble/scribble.runtime.spec.js diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java new file mode 100644 index 0000000000..3a35e4e5de --- /dev/null +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java @@ -0,0 +1,49 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +package com.adobe.cq.forms.core.components.internal.models.v1.form; + +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.models.annotations.Default; +import org.apache.sling.models.annotations.Exporter; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; + +import com.adobe.cq.export.json.ComponentExporter; +import com.adobe.cq.export.json.ExporterConstants; +import com.adobe.cq.forms.core.components.models.form.Scribble; +import com.adobe.cq.forms.core.components.util.AbstractFieldImpl; + +@Model( + adaptables = { SlingHttpServletRequest.class, Resource.class }, + adapters = { Scribble.class, ComponentExporter.class }, + resourceType = "core/fd/components/form/scribble/v1/scribble") +@Exporter( + name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, + extensions = ExporterConstants.SLING_MODEL_EXTENSION) +public class ScribbleImpl extends AbstractFieldImpl implements Scribble { + + @ValueMapValue + @Default(values = "") + private String value; + + @Override + public String getValue() { + return value; + } + +} \ No newline at end of file diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java new file mode 100644 index 0000000000..70995faca6 --- /dev/null +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/Scribble.java @@ -0,0 +1,36 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +package com.adobe.cq.forms.core.components.models.form; + +import org.osgi.annotation.versioning.ConsumerType; + +/** + * Defines the form Scribble Sling Model used for the Scribble component. + * + * @since com.adobe.cq.forms.core.components.models.form 1.0.0 + */ +@ConsumerType +public interface Scribble extends Field { + + /** + * Returns the base64 encoded string of the scribble. + * + * @return Base64 encoded string representing the scribble + * @since com.adobe.cq.forms.core.components.models.form 1.0.0 + */ + String getValue(); +} diff --git a/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json b/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json new file mode 100644 index 0000000000..853f822f58 --- /dev/null +++ b/bundles/af-core/src/test/resources/form/scribble/exporter-scribble.json @@ -0,0 +1,22 @@ +{ + "id": "scribble-178a5c65c2", + "fieldType": "text-input", + "name": "scribble1710484027357", + "value": "", + "type": "string", + "label": { + "value": "Scribble" + }, + "events": { + "custom:setProperty": [ + "$event.payload" + ] + }, + "properties": { + "fd:dor": { + "dorExclusion": false + }, + "fd:path": "/content/forms/af/scribbletest/jcr:content/guideContainer/scribble" + }, + ":type": "forms-components-examples/components/form/scribble" +} \ No newline at end of file diff --git a/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml new file mode 100644 index 0000000000..7c7c367660 --- /dev/null +++ b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/.content.xml @@ -0,0 +1,7 @@ + + diff --git a/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml new file mode 100644 index 0000000000..d88cbc2495 --- /dev/null +++ b/examples/ui.apps/src/main/content/jcr_root/apps/forms-components-examples/components/form/scribble/_cq_template.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml index 0ef50cf14f..37001a511d 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/af-clientlibs/core-forms-components-runtime-all/.content.xml @@ -5,4 +5,4 @@ cssProcessor="[default:none,min:none]" jsProcessor="[default:none,min:none]" categories="[core.forms.components.runtime.all]" - embed="[core.forms.components.runtime.base,core.forms.components.container.v2.runtime,core.forms.components.datePicker.v1.runtime,core.forms.components.textinput.v1.runtime,core.forms.components.numberinput.v1.runtime,core.forms.components.panelcontainer.v1.runtime,core.forms.components.radiobutton.v1.runtime,core.forms.components.text.v1.runtime,core.forms.components.checkboxgroup.v1.runtime,core.forms.components.button.v1.runtime,core.forms.components.image.v1.runtime,core.forms.components.dropdown.v1.runtime,core.forms.components.fileinput.v3.runtime,core.forms.components.accordion.v1.runtime,core.forms.components.tabs.v1.runtime,core.forms.components.wizard.v1.runtime,core.forms.components.verticaltabs.v1.runtime,core.forms.components.recaptcha.v1.runtime,core.forms.components.checkbox.v1.runtime,core.forms.components.fragment.v1.runtime,core.forms.components.switch.v1.runtime,core.forms.components.termsandconditions.v1.runtime, core.forms.components.hcaptcha.v1.runtime,core.forms.components.review.v1.runtime, core.forms.components.turnstile.v1.runtime]"/> + embed="[core.forms.components.runtime.base,core.forms.components.container.v2.runtime,core.forms.components.datePicker.v1.runtime,core.forms.components.textinput.v1.runtime,core.forms.components.numberinput.v1.runtime,core.forms.components.panelcontainer.v1.runtime,core.forms.components.radiobutton.v1.runtime,core.forms.components.text.v1.runtime,core.forms.components.checkboxgroup.v1.runtime,core.forms.components.button.v1.runtime,core.forms.components.image.v1.runtime,core.forms.components.dropdown.v1.runtime,core.forms.components.fileinput.v3.runtime,core.forms.components.accordion.v1.runtime,core.forms.components.tabs.v1.runtime,core.forms.components.wizard.v1.runtime,core.forms.components.verticaltabs.v1.runtime,core.forms.components.recaptcha.v1.runtime,core.forms.components.checkbox.v1.runtime,core.forms.components.fragment.v1.runtime,core.forms.components.switch.v1.runtime,core.forms.components.termsandconditions.v1.runtime, core.forms.components.hcaptcha.v1.runtime,core.forms.components.review.v1.runtime, core.forms.components.turnstile.v1.runtime,core.forms.components.scribble.v1.runtime]"/> diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml new file mode 100644 index 0000000000..491392d539 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/.content.xml @@ -0,0 +1,3 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml new file mode 100644 index 0000000000..84e5adcf4a --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/.content.xml @@ -0,0 +1,5 @@ + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml new file mode 100644 index 0000000000..be8c13a283 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/.content.xml @@ -0,0 +1,8 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md new file mode 100644 index 0000000000..8add83ebc1 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/README.md @@ -0,0 +1,91 @@ + +Adaptive Form Scribble (v1) +==== +Adaptive Form Scribble field component written in HTL. + +## Features + +* Provides the following type of input: + * text + * textarea +* Custom constraint messages for the above types +* Styles +* Allows replacing this component with other component (as mentioned below). + +### Use Object +The Form Text component uses the `com.adobe.cq.forms.core.components.models.form.Scribble` Sling Model for its Use-object. + +### Edit Dialog Properties +The following properties are written to JCR for this Form Text component and are expected to be available as `Resource` properties: + +1. `./jcr:title` - defines the label to use for this field +2. `./hideTitle` - if set to `true`, the label of this field will be hidden +3. `./name` - defines the name of the field, which will be submitted with the form data +4. `./default` - defines the default value of the field +5. `./description` - defines a help message that can be rendered in the field as a hint for the user +6. `./required` - if set to `true`, this field will be marked as required, not allowing the form to be submitted until the field has a value +7. `./requiredMessage` - defines the message displayed as tooltip when submitting the form if the value is left empty +8. `./readOnly` - if set to `true`, the filed will be read only + +## Client Libraries +The component provides a `core.forms.components.scribble.v1.runtime` client library category that contains the Javascript runtime for the component. +It should be added to a relevant site client library using the `embed` property. + +It also provides a `core.forms.components.scribble.v1.editor` editor client library category that includes +JavaScript handling for dialog interaction. It is already included by its edit dialog. + +## BEM Description +``` +BLOCK cmp-adaptiveform-scribble + ELEMENT cmp-adaptiveform-scribble__label + ELEMENT cmp-adaptiveform-scribble__label-container + ELEMENT cmp-adaptiveform-scribble__widget + ELEMENT cmp-adaptiveform-scribble__questionmark + ELEMENT cmp-adaptiveform-scribble__shortdescription + ELEMENT cmp-adaptiveform-scribble__longdescription + ELEMENT cmp-adaptiveform-scribble__errormessage +``` + +### Note +By placing the class names `cmp-adaptiveform-scribble__label` and `cmp-adaptiveform-scribble__questionmark` within the `cmp-adaptiveform-scribble__label-container` class, you create a logical grouping of the label and question mark elements. This approach simplifies the process of maintaining a consistent styling for both elements. + +## Replace feature: +We support replace feature that allows replacing Reset Button component to any of the below components: + +* Button +* Date Picker +* Email Input +* Number Input +* Reset Button +* Submit Button +* Telephone Input +* Text Box + +## JavaScript Data Attribute Bindings + +The following attributes must be added for the initialization of the text-input component in the form view: + 1. `data-cmp-is="adaptiveFormScribble"` + 2. `data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"` + + +The following are optional attributes that can be added to the component in the form view: +1. `data-cmp-valid` having a boolean value to indicate whether the field is currently valid or not +2. `data-cmp-required` having a boolean value to indicate whether the field is currently required or not +3. `data-cmp-readonly` having a boolean value to indicate whether the field is currently readonly or not +4. `data-cmp-active` having a boolean value to indicate whether the field is currently active or not +5. `data-cmp-visible` having a boolean value to indicate whether the field is currently visible or not +6. `data-cmp-enabled` having a boolean value to indicate whether the field is currently enabled or not \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml new file mode 100644 index 0000000000..eb2c905da7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_design_dialog/.content.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml new file mode 100644 index 0000000000..9212c6f7a7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml new file mode 100644 index 0000000000..d88cbc2495 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml new file mode 100644 index 0000000000..491392d539 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/.content.xml @@ -0,0 +1,3 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml new file mode 100644 index 0000000000..c49111f7c2 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/.content.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt new file mode 100644 index 0000000000..dd642eaed7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2022 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=js +editDialog.js \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js new file mode 100644 index 0000000000..f1c491a1ae --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/editor/js/editDialog.js @@ -0,0 +1,31 @@ + +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +(function($) { + "use strict"; + + var EDIT_DIALOG = ".cmp-adaptiveform-scribble__editdialog"; + + $(document).on("dialog-ready", function() { + var $editDialog = $(EDIT_DIALOG); + if ($editDialog.length > 0) { + // Initialize any custom logic for the edit dialog here + // For example, you might want to add event listeners or validators for your dialog fields + } + }); + +})(jQuery); \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml new file mode 100644 index 0000000000..3121bd86f3 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/.content.xml @@ -0,0 +1,6 @@ + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt new file mode 100644 index 0000000000..acabf89b95 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2024 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=css +scribbleview.css diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css new file mode 100644 index 0000000000..9c9fe09474 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css @@ -0,0 +1,414 @@ +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +.cmp-adaptiveform-scribble__widget { + +} +textarea.cmp-adaptiveform-scribble__widget{ + +} + +.cmp-adaptiveform-scribble__label { + +} +.cmp-adaptiveform-scribble__label-container{ + +} + +.cmp-adaptiveform-scribble__longdescription { +} + +.cmp-adaptiveform-scribble__shortdescription { +} + +.cmp-adaptiveform-scribble__questionmark { + +} + +.cmp-adaptiveform-scribble__header { + font-size: 19px; + font-weight: 100; + line-height: 24.7px; + margin-bottom: 10px; +} + +.cmp-adaptiveform-scribble__canvas-signed-container { + position: relative; + border: 1px solid #AAAAAA; + height: 210px; + min-width: 50px; + width: 100%; + border-radius: 0.5rem; +} + +.cmp-adaptiveform-scribble__canvas__main { + width: 100%; +} + +.cmp-adaptiveform-scribble__canvas { + /* Styles for the canvas element where the signature is drawn */ + /* border: 1px solid #616060; + background-color: #f9f9f9; + color: black */ + width: 100%; + height: 200px; + border:1px #AAAAAA dashed; + border-bottom: 0; + -ms-touch-action:pinch-zoom; + touch-action:pinch-zoom; +} + +.cmp-adaptiveform-scribble__signcanvases{ + width: 100%; + background-color: #FFF; +} + + .cmp-adaptiveform-scribble__container { + font-family: Arial, sans-serif; + font-size: 12px; + min-width: 50px; /* Dialog will be no smaller than this */ + width: 36%; + /* Dialog will wrap after this width */ + background: #FFF; + border: solid 2px #999; + color: #000; + padding: 10px; + display: none; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #F8F8F8; + + /* display:none; */; + /* the shadow */ + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + + /* make dialog a non-selectatable thing */ + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + z-index: 99998; + margin: 0; + line-height:0; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.cmp-adaptiveform-scribble__controls { + display: flex; + align-items: center; + justify-content: center; + flex-direction: row; + flex-wrap: wrap; +} + +.cmp-adaptiveform-scribble__control-message { + font-size: 14px; + font-weight: normal; + text-align: center; + line-height: 1.75em; + min-width: 50px; + color: #555555; + cursor: default; + padding: 10px; + margin: 0em; + display: none; +} + +.cmp-adaptiveform-scribble__content { + background: 16px 16px no-repeat ; + margin: 0em; + min-width: 50px; + width: 100%; +} + +.cmp-adaptiveform-scribble__panel { + text-align: center; + margin: 0em 0em 0em 0em; + background-color:black; + -moz-border-top-right-radius: 8px; + -webkit-border-top-right-radius: 8px; + border-top-right-radius: 8px; + -moz-border-top-left-radius: 8px; + -webkit-border-top-left-radius: 8px; + border-top-left-radius: 8px; + overflow:hidden; + background: #AFB0B5; + -ms-touch-action:pinch-zoom; + touch-action:pinch-zoom; +} + +.cmp-adaptiveform-scribble__button { + background:no-repeat; + border-radius: 5px; + width:32px; + height:32px; + border: 1px solid #D5D5D5; + background-size:32px 32px; + margin-right:5px; + background-color: white; + background-position: center; +} +.cmp-adaptiveform-scribble__control-geo{ + background-image:url('../resources/images/iEBox_geo.png'); +} +.cmp-adaptiveform-scribble__control-text{ + background-image:url('../resources/icontext.svg'); +} +.cmp-adaptiveform-scribble__keyboard-sign-box{ + border: 1px dashed#AAAAAA; + display:none;; + margin:0px; + border-radius: 0px 0px 0px 0px; + outline:none; + width: 100%; + height: 200px; +} + +#keyboard_Sign_Box::placeholder { + font: 1rem sans-serif, Georgia; + vertical-align: middle; +} + +.cmp-adaptiveform-scribble__control-brush{ + background-image:url('../resources/images/iEBox_brush.png'); +} + +.cmp-adaptiveform-scribble__control-submit { + width: 77px; + height: 40px; + margin: 5px; + padding: 9px 20px 11px 20px; + border: 1px transparent; + border-radius: 20px; + background-color: #0265DC; + color: white; +} + +.cmp-adaptiveform-scribble__control-clear { + background-image:url('../resources/iconeraser.svg'); +} + +.cmp-adaptiveform-scribble__button-close { + width: 77px; + height: 40px; + font-weight: 700; + padding: 9px 20px 11px 20px; + margin: 5px; + border: 2px solid #4b4b4b; + color: #4b4b4b; + border-radius: 20px; +} + +.cmp-adaptiveform-scribble__controlpanel { + margin-top: 40px; + align-items: center; + display: flex; + justify-content: space-between; +} + +/* @media (max-width: 780px) { */ + + /* .cmp-adaptiveform-scribble__controlpanel { + flex-direction: column; + } */ + /* .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + flex-direction: row; + } + + } */ + + @media (max-width: 460px) { + + .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + display: flex; + flex-direction: column; + justify-content: center; + } + + } + + @media (min-width: 460px) and (max-width: 1155px) { + .cmp-adaptiveform-scribble__controlpanel__controls { + margin-top: 10px; + } + + .cmp-adaptiveform-scribble__controlpanel { + margin-top: 40px; + align-items: center; + justify-content: center; + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + } + +#iEBox_moveframe{ +padding:0px; +margin:0px; + border:0px dotted rgba(0,0,0,0.5); + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + + /* display:none; */; + position:absolute; +} +.disable_button { + filter: grayscale(100%); /* Apply grayscale effect */ + -webkit-filter: grayscale(100%); /* For Safari and older versions of Chrome */ + -moz-filter: grayscale(100%); /* For older versions of Firefox */ + -ms-filter: grayscale(100%); /* For older versions of Internet Explorer */ + -o-filter: grayscale(100%); /* For older versions of Opera */ + cursor: not-allowed; /* Change cursor to indicate disabled state */ + opacity: 0.6; /* Optional: Adjust opacity to give a faded look */ + pointer-events: none; /* Disable all mouse events */ + } +.sc_popUpMenu { + position: absolute; + width:20px; + height:20px; + background:no-repeat; + background-size:20px 20px; + background-image:url('../resources/images/iEBox_no.png'); + left:2px; + top:2px; +} +.cmp-adaptiveform-scribble__brushlist{ + position:absolute; + z-index:99999; + background-color:white; + -moz-box-shadow: 10px 10px 5px #888888; + -webkit-box-shadow: 10px 10px 5px #888888; + box-shadow: 0px 0px 15px #888888; + display:none; + bottom: 60px; +} +.cmp-adaptiveform-scribble__brushlist :hover{ + background-color:gray; +} +.cmp-adaptiveform-scribble__caption { + border:4px dashed #AAAAAA; + border-bottom:0px; + border-left:0px; + border-right:0px; + margin-right:4px; + margin-left:1px; + margin-top:0px; + text-align:center; + padding:0px; +} +.cmp-adaptiveform-scribble__caption > legend { + width:auto; + background-color: #FFFFFF; + padding: 2px; +} +.emptyScribble { + background: url('../resources/images/signature.png') no-repeat; +} + +.cmp-adaptiveform-scribble__canvases { + white-space:nowrap; +} + +#msgBox_container { + font-family: Arial, sans-serif; + font-size: 12px; + min-width: 50px; /* Dialog will be no smaller than this */ + max-width: 600px; /* Dialog will wrap after this width */ + background: #FFF; + border: solid 5px #999; + color: #000; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + position: absolute; + top: 50%; + left: 50%; + display: none; + transform: translate(-50%, -50%); +} + +#msgBox_title { + font-size: 14px; + font-weight: bold; + text-align: center; + line-height: 1.75em; + color: #666; + background: #CCC top repeat-x; + border: solid 1px #FFF; + border-bottom: solid 1px #999; + cursor: default; + padding: 0em; + margin: 0em; +} + +#msgBox_content { + background: 16px 16px no-repeat ; + padding: 1em 1.75em; + margin: 0em; +} + +#msgBox_message { + text-align: center; +} + +#msgBox_panel { + text-align: center; + margin: 1em 0em 0em 1em; +} + +#msgBox_prompt { + margin: .5em 0em; +} + +input#msgBox_Ok,input#msgBox_Yes,input#msgBox_No,input#msgBox_Cancel{ + background-color: buttonFace; + padding: 5px 10px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + text-shadow: rgba(0,0,0,.4) 0 1px 0; + color: buttonText; + font-size: 14px; + font-family: Georgia, serif; + text-decoration: none; + vertical-align: middle; + outline:none; + border: 2px outset buttonface; + border-radius: 1rem; + } + + input#msgBox_Ok:focus,input#msgBox_Yes:focus,input#msgBox_No:focus,input#msgBox_Cancel:focus{ + outline:highlight; + } + + input#msgBox_Ok:hover,input#msgBox_Yes:hover,input#msgBox_No:hover,input#msgBox_Cancel:hover{ + outline:none; + border: 2px outset buttonface; + } \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt new file mode 100644 index 0000000000..6c95e73eb7 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt @@ -0,0 +1,18 @@ +############################################################################### +# Copyright 2024 Adobe +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +#base=js +scribbleview.js diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js new file mode 100644 index 0000000000..3a6f181c1f --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -0,0 +1,976 @@ +/******************************************************************************* + * Copyright 2023 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +(function() { + "use strict"; + + /** + * class definition for GeoLocationQueryRequest + * encapsulated success and error handlers + */ + class GeoLocQuery { + constructor() { + this._active = false; + } + + init(success, failure) { + this._successHandler = success; + this._errorHandler = failure; + this._active = true; + return this; + } + + _handleSuccess(data) { + if (this._successHandler) { + this._successHandler(data); + } + } + + _handleError(err) { + if (this._errorHandler) { + this._errorHandler(err); + } + } + + query() { + const onSuccess = (pos) => { + if (this._active) { + this._handleSuccess(pos); + } + this._active = false; + }; + + const onError = (err) => { + if (this._active) { + this._handleError(err); + } + this._active = false; + }; + + navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); + } + + cancel() { + this._active = false; + } + } + + + const PNGUtil = (() => { + // Helper function to initialize CRC table + const initCrcTable = () => { + const table = new Uint32Array(256); + for (let n = 0; n < 256; n++) { + let c = n; + for (let k = 0; k < 8; k++) { + c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); + } + table[n] = c; + } + return table; + }; + + // Helper function to convert 32-bit integer to string + const u32IntToStr = (n) => String.fromCharCode( + (n >>> 24) & 0xFF, + (n >>> 16) & 0xFF, + (n >>> 8) & 0xFF, + n & 0xFF + ); + + // Helper function to calculate CRC + const updateCrc = (crc, data) => { + let c = crc; + for (let i = 0; i < data.length; i++) { + c = crcTable[(c ^ data.charCodeAt(i)) & 0xff] ^ (c >>> 8); + } + return c; + }; + + // Helper function to calculate CRC + const CRC = (data) => updateCrc(0xffffffff, data) ^ 0xffffffff; + + // Helper function to prepare text chunk + const prepareTextChunk = (content) => { + const len = content.length; + const lenStr = u32IntToStr(len); + const chunkType = "tEXt"; + const checkSumStr = u32IntToStr(CRC(chunkType + content)); + return lenStr + chunkType + content + checkSumStr; + }; + + // Initialize CRC table + const crcTable = initCrcTable(); + + const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA"; + + // Main API + return { + // Function to check if data is a PNG + _isPng: (b64data) => { + return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); + }, + + // Function to make PNG read-only + _makeReadOnly: (b64data) => { + const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces + const pngctx = { p: 8, d: bindata }; // Skip PNG header + const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); + const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); + return btoa(newdata); + }, + + // Function to decode base64 + _atob: (input) => window.atob ? atob(input) : Base64.decode(input), + + // Function to encode to base64 + _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), + + // Function to check if PNG is read-only + _isReadOnly: (b64data) => { + if (this._isPng(b64data)) { + const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; + const bindata = this._atob(b64data.replace(/\s+/g, '')); + const pngctx = { p: 8, d: bindata }; // Skip PNG header + while (pngctx.p < pngctx.d.length) { + const size = (pngctx.d.charCodeAt(pngctx.p) << 24) | + (pngctx.d.charCodeAt(pngctx.p + 1) << 16) | + (pngctx.d.charCodeAt(pngctx.p + 2) << 8) | + pngctx.d.charCodeAt(pngctx.p + 3); + const type = pngctx.d.slice(pngctx.p + 4, pngctx.p + 8); + pngctx.p += 8; // Move past size and type + if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { + return true; + } + pngctx.p += size + 4; // Move past data and CRC + } + } + return false; + } + }; + })(); + + + + // GeoLocQuery definition ends here + // const PNGUtil = (() => { + // // Helper function to initialize CRC table + // const initCrcTable = () => { + // const table = []; + // let c; + // for (let n = 0; n < 256; n++) { + // c = n; + // for (let k = 0; k < 8; k++) { + // c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); + // } + // table[n] = c; + // } + // return table; + // }; + + // // Helper function to convert 32-bit integer to string + // const u32IntToStr = (n) => String.fromCharCode( + // (n >>> 24) & 0xFF, + // (n >>> 16) & 0xFF, + // (n >>> 8) & 0xFF, + // n & 0xFF + // ); + + // // Helper function to calculate CRC + // const updateCrc = (crc, data) => { + // let c = crc; + // for (let i = 0; i < data.length; i++) { + // c = XOR(crcTable[(XOR(c, data.charCodeAt(i)) & 0xff) >>> 0], c >>> 8); + // } + // return c; + // }; + + // // Helper function to calculate XOR + // const XOR = (a, b) => (a ^ b) >>> 0; + + // // Helper function to calculate CRC + // const CRC = (data) => XOR(updateCrc(0xffffffff, data), 0xffffffff); + + // // Helper function to prepare text chunk + // const prepareTextChunk = (content) => { + // const len = content.length; + // const lenStr = u32IntToStr(len); + // const chunkType = "tEXt"; + // const checkSumStr = u32IntToStr(CRC(chunkType + content)); + // return lenStr + chunkType + content + checkSumStr; + // }; + + // // Initialize CRC table + // const crcTable = initCrcTable(); + + // const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA" + // // Main API + // return { + // // Function to check if data is a PNG + // _isPng: (b64data) => { + // return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); + // }, + + // // Function to make PNG read-only + // _makeReadOnly: (b64data) => { + // const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces + // const pngctx = { p: 8, d: bindata }; // Skip PNG header + // const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); + // const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); + // return btoa(newdata); + // }, + + // // Function to decode base64 + // _atob: (input) => window.atob ? atob(input) : Base64.decode(input), + + // // Function to encode to base64 + // _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), + + // // Function to check if PNG is read-only + // _isReadOnly: (b64data) => { + // if (this._isPng(b64data)) { + // const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; + // const bindata = this._atob(b64data.replace(/\s+/g, '')); + // const pngctx = { p: 8, d: bindata }; // Skip PNG header + // while (pngctx.p < pngctx.d.length) { + // const size = u32IntToStr(pngctx.d.charCodeAt(pngctx.p)); + // const type = pngctx.d.slice(pngctx.p, pngctx.p + 4); + // pngctx.p += 4; // Move past type + // if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { + // return true; + // } + // pngctx.p += size + 4; // Move past data and CRC + // } + // } + // return false; + // } + // }; + // })(); + + class Scribble extends FormView.FormFieldBase { + _geoLocQuery=null; + _signSubmitted=false; + _enforceGeoLoc=!!navigator.userAgent.match(/iPad/i); + _geoCanvId=null; + _geoLocAtBottom=false; + _geoCanvasWidth=696; + _defaultStatus=" "; + existingSign = ''; + existingCanvas = ''; + static NS = FormView.Constants.NS; + static IS = "adaptiveFormScribble"; + static bemBlock = 'cmp-adaptiveform-scribble'; + static selectors = { + self: `[data-${this.NS}-is="${this.IS}"]`, + scribbleContainer: `.${Scribble.bemBlock}__container`, + scribbleContainerPanel: `.${Scribble.bemBlock}__panel`, + keyboardSignBox: `.${Scribble.bemBlock}__keyboard-sign-box`, + scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, + scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, + geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, + canvas: `.${Scribble.bemBlock}__canvas`, + label: `.${Scribble.bemBlock}__label`, + description: `.${Scribble.bemBlock}__longdescription`, + qm: `.${Scribble.bemBlock}__questionmark`, + errorDiv: `.${Scribble.bemBlock}__errormessage`, + tooltipDiv: `.${Scribble.bemBlock}__shortdescription`, + brushControl: `.${Scribble.bemBlock}__control-brush`, + scribbleGeoControl: `.${Scribble.bemBlock}__control-geo`, + clearControl: `.${Scribble.bemBlock}__control-clear`, + scribbleTextControl: `.${Scribble.bemBlock}__control-text`, + scribbleMessage: `.${Scribble.bemBlock}__control-message`, + scribbleSubmitControl: `.${Scribble.bemBlock}__control-submit`, + scribbleBrushList: `.${Scribble.bemBlock}__brushlist`, + signCanvases: `.${Scribble.bemBlock}__signcanvases`, + saveCanvas: `.${Scribble.bemBlock}__control-submit`, + }; + + constructor(params) { + super(params); + this.initializeScribble(); + } + + initializeScribble() { + this.getCanvasContainer().addEventListener('click', () => this.clickHanlder()); + this.initScribbleModal(); + } + + getWidget() { + return this.element.querySelector(Scribble.selectors.canvas); + } + + getTemplate() { + return this.element.querySelector('#template-modal'); + } + + getLabel() { + return this.element.querySelector(Scribble.selectors.label); + } + + getErrorDiv() { + return this.element.querySelector(Scribble.selectors.errorDiv); + } + + getTooltipDiv() { + return this.element.querySelector(Scribble.selectors.tooltipDiv); + } + + getQuestionMarkDiv() { + return this.element.querySelector(Scribble.selectors.qm); + } + + getScribbleControlPanel() { + return document.querySelector(Scribble.selectors.scribbleControlPanel); + } + + getScribbleContainer() { + return document.querySelector(Scribble.selectors.scribbleContainer); + } + + getMessage() { + return document.querySelector(Scribble.selectors.scribbleMessage); + } + + getBrushList() { + return document.querySelector(Scribble.selectors.scribbleBrushList); + } + + getBrush() { + return document.querySelector(Scribble.selectors.brushControl); + } + + getClearControl() { + return document.querySelector(Scribble.selectors.clearControl); + } + + getSaveControl() { + return document.querySelector(Scribble.selectors.saveCanvas); + } + + getTextSignControl() { + return document.querySelector(Scribble.selectors.scribbleTextControl); + } + + getScribbleContainerPanel() { + return document.querySelector(Scribble.selectors.scribbleContainerPanel); + } + + getScribbleContainerCaption() { + return document.querySelector(Scribble.selectors.scribbleContainerCaption); + } + + getKeyboardSignBox() { + return document.querySelector(Scribble.selectors.keyboardSignBox); + } + + getGeoCanvasRight() { + return document.querySelector(Scribble.selectors.geoCanvasRight); + } + + getCanvasContainer() { + return this.element.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + } + + getScribbleCloseButton() { + return this.element.querySelector('.cmp-adaptiveform-scribble__button-close'); + } + + getCanvas() { + return this.element.querySelector(Scribble.selectors.canvas); + } + + getMainCanvas() { + return this.element.querySelector('.cmp-adaptiveform-scribble__canvas__main'); + } + + getSignCanvasesContainer() { + return this.element.querySelector(Scribble.selectors.signCanvases); + } + + getDescription() { + return this.element.querySelector(Scribble.selectors.description); + } + + showMessage(msg){ + if(this._msgTimeout) { clearTimeout(this._msgTimeout); this._msgTimeout=0; } + const scribbleMessage = this.getMessage(); + scribbleMessage.innerHTML = msg; + scribbleMessage.style.display = 'block'; + this._msgTimeout = window.setTimeout(function(){ + scribbleMessage.innerHTML = ''; + },15000); + } + + extractData(datauri){ + var idx; + if(datauri!=null&&datauri.length>0&&datauri.indexOf("data:")==0){ + if((idx=datauri.indexOf(","))>0){ + return datauri.substr(idx+1); + } + } + } + + openClearSignModal() { + document.getElementById('msgBox_container').style.display='inline-block'; + document.getElementById('msgBox_Yes').addEventListener('click', () => { + this.existingSign=''; + this.getMainCanvas().parentNode.replaceChild(this.existingCanvas, this.getMainCanvas()); + this.existingCanvas.getContext('2d').clearRect(0, 0, this.existingCanvas, this.existingCanvas.height); + const geoCnv = this.getGeoCanvasRight(); + if(geoCnv) { + const geoCanvasContext = geoCnv.getContext('2d'); + geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + } + this.enableControls(['brush','geo','clear','text','submit']); + const box = document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + if (box.firstChild) { + box.removeChild(box.firstChild); + document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container').innerHTML = ""; + document.querySelector('.sc_popUpMenu')?.remove(); + document.getElementById('msgBox_container').style.display='none'; + this.getKeyboardSignBox().value = ''; + } + this._signSubmitted = false; + }); + document.getElementById('msgBox_No').addEventListener('click', () => { + document.getElementById('msgBox_container').style.display='none'; + }); + } + + createCanvas() { + const mainCanvas = document.createElement('canvas'); + mainCanvas.classList.add('cmp-adaptiveform-scribble__canvasImage'); + } + + doOk() { + const mainCanvas = document.createElement('canvas'); + // mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas'); + mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas__main'); + const sigCnv = this.getCanvas(); // Get the sign canvas + const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas + let ctx = mainCanvas.getContext('2d'); + if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { + // Set the dimensions of the mainCanvas to accommodate both canvases vertically + mainCanvas.width = Math.max(sigCnv.width, geoCnv.width); + mainCanvas.height = sigCnv.height + geoCnv.height; + ctx = mainCanvas.getContext('2d'); + // Draw the sign canvas on the main canvas + ctx.drawImage(sigCnv, 0, 0); + + // Draw the geo canvas below the sign canvas + ctx.drawImage(geoCnv, 0, sigCnv.height); + } else { + mainCanvas.width = sigCnv.width; + mainCanvas.height = sigCnv.height; + ctx.drawImage(sigCnv, 0, 0); + } + + // if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { + // if (this._geoLocAtBottom) { + // mainCanvas.width = sigCnv.width; + // mainCanvas.height = sigCnv.height + geoCnv.height; + // ctx.drawImage(sigCnv, 0, 0); + // ctx.drawImage(geoCnv, 0, sigCnv.height); + // } else { + // // Create the final image after the submit is clicked + // mainCanvas.width = sigCnv.width;// + geoCnv.width + 10; + // mainCanvas.height = sigCnv.height + geoCnv.height + 10;// Math.max(sigCnv.height, geoCnv.height); + // // mainCanvas.height = Math.max(sigCnv.height, geoCnv.height); + // ctx.drawImage(sigCnv, 0, 0); + // // +10 is added to provide the margin between two images + // ctx.drawImage(geoCnv, 0, 180); + // // ctx.drawImage(geoCnv, sigCnv.width + 10, 0); + // geoCnv.style.display = 'none'; + // } + // } else { + // mainCanvas.width = sigCnv.width; + // mainCanvas.height = sigCnv.height; + // ctx.drawImage(sigCnv, 0, 0); + // } + this.existingCanvas = sigCnv; + sigCnv.height = mainCanvas.height; + sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); + + const newData = mainCanvas.toDataURL("image/png"); + this.existingSign = mainCanvas; + let val; + if ((val = this.extractData(newData))) { + val = PNGUtil._makeReadOnly(val); + this._is_readonly = true; + } + + const img = document.createElement('img'); + img.src = newData; + img.style.width = '100%'; + img.style.height = '200px'; + + const clearSignButton = document.createElement('div'); + clearSignButton.classList.add('sc_popUpMenu'); + + const mainCanvasImageContainer = this.getCanvasContainer(); + mainCanvasImageContainer.appendChild(img); + mainCanvasImageContainer.appendChild(clearSignButton); + + clearSignButton.addEventListener('click', (e) => { + e.stopPropagation(); + this.openClearSignModal(); + }); + + if (this._geoLocQuery) { + this._geoLocQuery.cancel(); // Cancel the current geo loc request + } + + this.closeEditModal(); + this._signSubmitted = true; + } + + handleOk() { + if (this._enforceGeoLoc) { + // Create a new GeoLocQuery instance and initialize it with bound handlers + this._geoLocQuery = new GeoLocQuery().init( + (data) => { + this.geoQuerySuccessHandler(data); + this.doOk(); + }, + (err) => { + this.geoQueryErrorHandler(err); + } + ); + + // Start the geolocation query + this._geoLocQuery.query(); + this.showMessage('fetchGeoLocation'); + } else { + // If geolocation is not enforced, directly proceed with the operation + this.doOk(); + } + } + + geoQueryErrorHandler(err){ + this.showMessage('errorFetchGeoLocation'); + } + + renderBrushList() { + [2,3,4,5,6,7,8,9,10].forEach((brush) => { + var divel = document.createElement('DIV'); + var cnv = document.createElement('CANVAS'); + var ctx = cnv.getContext('2d'); + cnv.style.border='1px solid #AAAAAA'; + cnv.width=100; + cnv.height=20; + cnv.style.backgroundColor='white' + ctx.lineWidth=brush; + ctx.beginPath(); + ctx.moveTo(10,cnv.height/2); + ctx.lineTo(cnv.width-10,cnv.height/2); + ctx.stroke(); + divel.appendChild(cnv); + divel.addEventListener('click', (e) => { + e.stopPropagation(); + this.context.lineWidth=brush; + }) + this.getBrushList().append(divel); + }); + } + + resizeCanvas(percentage) { + const signCanvas = this.getCanvas(); + const ctx = signCanvas.getContext('2d', { willReadFrequently: true }); + const container = this.getCanvasContainer(); + this.getSignCanvasesContainer().style.width = `${percentage}%`; + + // Ensure the canvas has valid dimensions + if (signCanvas.width === 0 || signCanvas.height === 0) { + console.error('Canvas has invalid dimensions.'); + return; + } + + // Save the content of the canvas if it has valid dimensions + let imgData = null; + if (signCanvas.width > 0 && signCanvas.height > 0) { + imgData = ctx.getImageData(0, 0, signCanvas.width, signCanvas.height); + } + + // Calculate the new width based on the percentage of the container's width + const newWidth = container.offsetWidth * (percentage / 100); + + // Set the new width and height of the canvas + signCanvas.width = newWidth; + // signCanvas.height = container.offsetHeight; // Maintain the height + + // Restore the content back to the resized canvas if it has valid content + if (imgData) { + ctx.putImageData(imgData, 0, 0); + } + } + + geoQuerySuccessHandler(position) { + if (position && position.coords) { + this.showMessage(''); + const { latitude, longitude } = position.coords; + const latStr = `Latitude: ${latitude}`; + const longStr = `Longitude: ${longitude}`; + const dateObj = new Date(); + const tZone = (dateObj.getTimezoneOffset() / 60) * -1; + const time = dateObj.getTime(); + const timeStr = `${time}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; + + const signCanvas = this.getSignCanvasesContainer(); + const geoCanvasRight = this.getGeoCanvasRight(); + const container = this.getCanvasContainer(); + + // Set the widths of the canvases + // signCanvas.style.width = '70%'; + geoCanvasRight.style.height = '50px'; + geoCanvasRight.style.width = '200px'; + geoCanvasRight.style.display = 'block'; + // geoCanvasRight.style.display = 'inline-block'; + // geoCanvasRight.style.height = '200px'; + // Adjust the canvas sizes based on the new widths + // this.resizeAndFixCanvas(); + // this.resizeCanvas(70); // Resize the signCanvas to 70% of its container's width + + if (geoCanvasRight) { + const ctx = geoCanvasRight.getContext('2d'); + geoCanvasRight.width = geoCanvasRight.offsetWidth; + geoCanvasRight.height = geoCanvasRight.offsetHeight; + + ctx.font = 'bold 10px Arial'; // Font size and type + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + // Define the position to draw the text + let x = 0; + let y = 15; + + // Draw the text on the canvas + ctx.fillText(latStr, x, y); + ctx.fillText(longStr, x, y + 15); + ctx.fillText(timeStr, x, y + 30); + } + } + } + handleGeo() { + // initiate geolocation + if(navigator.geolocation){ + // Create a new GeoLocQuery instance + this._geoLocQuery = new GeoLocQuery(); + // Initialize with bound success and error handlers + this._geoLocQuery.init( + this.geoQuerySuccessHandler.bind(this), + this.geoQueryErrorHandler.bind(this) + ); + this._geoLocQuery.query(); + this.showMessage('Fetching Geo Location...'); // Geo Location ! + } + } + + // This Function is used to fetch the geolocation. + calculateGeolocation() { + this.handleGeo(); + } + + enableControls(controls) { + controls.forEach(control => { + document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.remove('disable_button'); + }); + } + + disableControl(controls) { + controls.forEach(control => { + document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.add('disable_button'); + }); + } + + dialogCallback(button_val, arg1) { + switch(button_val){ + case "ok": + this.handleOk(); + break; + case "Cancel": + this.handleCancel(); + break; + case "geolocation": + this.calculateGeolocation(); + break; + case "BrushSelect": + this.handleBrushSelect(arg1); + break; + case "brushes": + this.handleBrush(arg1); + break; + case "Text": + this.handleText(); + break; + } + } + + toggleBrushList(event) { + var brushList = this.getBrushList(); + var brushButton = this.getBrush(); + var originalOnSelectStart = document.onselectstart; + + if (getComputedStyle(brushList).display !== 'none') { + brushList.style.display = 'none'; + return; + } + + // Disable text selection + document.onselectstart = function() { + return false; + }; + + // Show the brush list and position it + brushList.style.display = 'block'; + brushList.style.visibility = 'hidden'; + // Make it visible + brushList.style.visibility = 'visible'; + + // Add an event listener for mouse leave + function onMouseLeave() { + brushList.style.display = 'none'; + document.onselectstart = originalOnSelectStart; + brushList.removeEventListener('mouseleave', onMouseLeave); + } + + brushList.addEventListener('mouseleave', onMouseLeave); + } + + + imageClick(event) { + this.dialogCallback(event.srcElement.title); + } + + closeEditModal() { + if(this.getCanvas()) this.getCanvas().style.display = 'block'; + if(!this._signSubmitted) { + this.eraseSignature() + } + this.hideScribbleModal(); + } + + handleBrush(evt){ + this.getKeyboardSignBox().style.display = 'none'; + this.canvas.style.display = "block"; + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.initializeCanvas(); + this.toggleBrushList(evt); + } + + makeDraggable() { + const draggableBar = this.getScribbleContainerPanel(); + const draggableContent = this.getScribbleContainer(); + draggableBar.addEventListener('mousedown', (e) => { + let offsetX = e.clientX - draggableContent.getBoundingClientRect().left; + let offsetY = e.clientY - draggableContent.getBoundingClientRect().top; + function onMouseMove(event) { + draggableContent.style.left = `${event.clientX - offsetX}px`; + draggableContent.style.top = `${event.clientY - offsetY}px`; + } + function onMouseUp() { + document.removeEventListener('mousemove', onMouseMove); + document.removeEventListener('mouseup', onMouseUp); + } + document.addEventListener('mousemove', onMouseMove); + document.addEventListener('mouseup', onMouseUp); + }); + } + + initScribbleModal() { + const eraserIcon = this.getClearControl(); + const textSignIcon = this.getTextSignControl(); + const controlPanel = this.getScribbleControlPanel(); + const toggleBrushListIcon = this.getBrushList(); + const closeEditModal = this.getScribbleCloseButton(); + const keyboardSignBox = this.getKeyboardSignBox(); + const saveButton = this.getSaveControl(); + // this.resizeAndFixCanvas() + + this.renderBrushList() + controlPanel.addEventListener('click', (event) => { + this.imageClick(event); + }) + + saveButton.addEventListener('click', () => { + this.doOk(); + }); + + eraserIcon.addEventListener('click', () => { + this.eraseSignature(); + }) + textSignIcon.addEventListener('click', () =>{ + this.enableSignatureTextBox(); + }) + toggleBrushListIcon.addEventListener('click', (event) => { + this.toggleBrushList(event); + }) + closeEditModal.addEventListener('mousedown', () => { + this.closeEditModal(); + }) + + keyboardSignBox.addEventListener('keyup', () => { + this.enableControls(['clear','submit']); + let sigCanvasFontFamily = "sans-serif, Georgia"; + let sigCanvasFontStyle = "italic"; + keyboardSignBox.style.font=sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; + const value = keyboardSignBox.value; + this.context.font = sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; + this.context.fillText(value,0,this.getCanvas().height/2); + }) + + } + + enableSignatureTextBox() { + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.getKeyboardSignBox().style.display = "inline-block"; + this.getCanvas().style.display = "none"; + } + + eraseSignature() { + this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + const geoCnv = this.getGeoCanvasRight(); + if(geoCnv) { + const geoCanvasContext = geoCnv.getContext('2d'); + geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + geoCnv.style.display = 'none'; + } + this.getKeyboardSignBox().value=''; + this.disableControl(['clear','submit']); + } + + + resizeAndFixCanvas() { + const dpr = window.devicePixelRatio || 1; + const imgData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height); + this.canvas.width = this.canvas.offsetWidth * dpr; + this.canvas.height = this.canvas.offsetHeight * dpr; + this.context.putImageData(imgData, 0, 0); + } + + + initializeCanvas() { + this.canvas = this.getCanvas(); + + if(this.existingSign) { + this.getCanvasContainer().style.width = '100%'; + this.getMainCanvas().style.border = '1px solid black'; + this.getKeyboardSignBox().style.display = 'none'; + this.disableControl(['brush','geo','clear','text','submit']); + } else { + this.context = this.canvas.getContext('2d', { willReadFrequently: true }); + this.resizeCanvas(100); + this.resizeAndFixCanvas(); + if (this.canvas) { + this.canvas.style.border = '1px dashed #AAAAAA'; + this.getKeyboardSignBox().style.display = 'none'; + this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); + this.canvas.addEventListener('mousemove', this.draw.bind(this)); + this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); + this.canvas.addEventListener('mousemove', this.draw.bind(this)); + this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); + this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); + this.canvas.addEventListener('touchstart', this.startDrawing.bind(this)); + this.canvas.addEventListener('touchmove', this.draw.bind(this)); + this.canvas.addEventListener('touchend', this.stopDrawing.bind(this)); + this.canvas.addEventListener('touchcancel', this.stopDrawing.bind(this)); + this.isDrawing = false; + } + } + // Add event listener for window resize to make the canvas responsive + window.addEventListener('resize', this.resizeAndFixCanvas.bind(this)); + // } + } + + showScribbleModal() { + if(window.getComputedStyle(this.getScribbleContainer()).display !== 'block') { + this.disableControl(['clear','submit']); + } + this.getScribbleContainer().style.display = 'block'; + } + + hideScribbleModal() { + this.getScribbleContainer().style.display = 'none'; + } + + clickHanlder() { + this.showScribbleModal(); + this.initializeCanvas(); + } + + + startDrawing(event) { + // Ensure the context is initialized + if (!this.context) { + console.error('Canvas context is not initialized.'); + return; + } + + // Normalize event coordinates for touch events + const { offsetX, offsetY } = this.getEventCoordinates(event); + + this.isDrawing = true; + this.context.beginPath(); + this.context.moveTo(offsetX, offsetY); + } + + getMousePos(event) { + const rect = this.canvas.getBoundingClientRect(); + const offsetX = event.clientX - rect.left; + const offsetY = event.clientY - rect.top; + return { offsetX, offsetY }; + } + + getEventCoordinates(event) { + const rect = this.canvas.getBoundingClientRect(); + const dpr = window.devicePixelRatio || 1; + if (event.touches && event.touches.length > 0) { + const touch = event.touches[0]; + return { + offsetX: (touch.clientX - rect.left) * dpr, + offsetY: (touch.clientY - rect.top) * dpr + }; + } else { + return { + offsetX: (event.clientX - rect.left) * dpr, + offsetY: (event.clientY - rect.top) * dpr + }; + } + } + + draw(event) { + if (!this.isDrawing) return; + const { offsetX, offsetY } = this.getEventCoordinates(event); + this.context.lineTo(offsetX, offsetY); + this.context.stroke(); + this.enableControls(['clear','submit']); + } + + stopDrawing() { + if (this.isDrawing) { + this.context.closePath(); + this.isDrawing = false; + this._model.value = this.canvas.toDataURL(); + } + } + } + + FormView.Utils.setupField(({element, formContainer}) => { + return new Scribble({element, formContainer}) + }, Scribble.selectors.self); +})(); \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg new file mode 100644 index 0000000000..60826f488d --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/iconeraser.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg new file mode 100644 index 0000000000..870dc0203f --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/icontext.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_brush.png new file mode 100644 index 0000000000000000000000000000000000000000..c96db231de28a5b8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ANDe6^ytwvh_T+BQ{{#*Ra;Z2L zv;*ocAZF~fs*F|Qr#r%U?V?r#gNyq7?ULTGq6Uv{Q# z1$oLKJ16a3gT0r$nI1DlS2ul+d`lavm#PnwaYMs?l6IClhHh}AfAt+>@-pqvPwwDr y4BcYaScmIvaze+11=Hlsy*;cS@;3+90Kk*Qp1%_Pm}k9z49)6XWq)Sr#(x0hidw4x literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_clear.png new file mode 100644 index 0000000000000000000000000000000000000000..8d73d4ff643a76fd9c386bbc304ce118bfff92b0 GIT binary patch literal 2186 zcmaJ@YgAKL7QP7tnh+qo6Gr43c|;0%0g*(I0D*>)AQQ0y6-yo$l0tGra)AJ%iC}nC zTXgUNSPgF(Ep@QdirSW!4lKnZI6<7mik%=ZymZz%h}}6I%X3*6%Gl06=vQJ{z$FBqTl!*#>7LMIto>#7JQ=1STp( zIgk(%NsIG`p-2F*A3P0U;t#tH@JoINB)kOI?m- zZQZ7k!IuyuH;VjQQE7q{Fb-BjU^q22L_%jUKo*P22n%Pi7{MTu&S28$mX{U62;+pa zILwXUtA}jKrj}-NguH}Txhzo>S%x4g4vkh+R75QbrNZhQ8iUPdTQ!)>5DOwiQ>;Wp z+7P8?{i*^F(n!>D6(Wa~pjA;Mh6|7=vZd1Bj-XJzmQ`wAwaL;jnpUKuF{pIwkye2M z!T*OU6tB@5L;hN(q$6iy~VTsB*cK!(#Db<5?^=j~yDpV8n;V zgvEy@Y>Z%rhOuIpOjh_Rmj_D<6p#{GUpa)h&yAtjpK7wFIw?4=F8fS6gfyb7_kf0Blzh zc`>Ql3Gwoa7tuEF>VjQ9satRfxVq18Y47mu;jDZx+xA-59WgY@KJbhlc&G2$;oaDb6@|V`-A}$fUc5VNpjzhR&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HCE zI{%K({HU}=OB-IsLuD~sn}o5GV^gKJey3bBq45h|onh%o*WmFK#r`Eddup|ZG9P#~ z7qQrQY!t)V>J$8L_uTHq?54rEp)~#$-_)VwHCd`mP^iLs5I_=eAo9 zEvDVuG1N+Q*37zBf{b1JAERKdbqbuS8>A4G+*YxtBE@6IF(65lh~EvDBXlhXwZomdI@@?Q?_EnqaSFtrYjT6G zTamNxx0`*PTdOU!gLPG5SDjZnEk(Sc>-WRYMj?mSFyfh-#$pf&piexJte&eYOG^yv z9f&>6doNh_)Q E4+VVoNB{r; literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_keyboard.png new file mode 100644 index 0000000000000000000000000000000000000000..b07a2a79ed0604972d32ea1c15297d3d9f796dd2 GIT binary patch literal 3549 zcmV<34I=W1P)StO&>uS)ve<0AYj>5AR{$W90N^4L=L-RlQUJ&DC0@ZjPh;=*jPLSYvv5M~MFBAl0-BNIsH z15C~g000{K(ZT*WKal6<?_01!^k@7iDG<<3=fuAC~28EsPoqkpK{9G%|Vj005J}`Hw&=0RYXHq~ibpyyzHQsFW8>#s~laM4*8xut5h5 z!4#~(4xGUqyucR%VFpA%3?#rj5JCpzfE)^;7?wd9RKPme1hudO8lVxH;SjXJF*pt9 z;1XPc>u?taU>Kgl7`%oF1VP9M6Ja4bh!J9r*dopd7nzO(B4J20l7OTj>4+3jBE`sZ zqynizYLQ(?Bl0bB6giDtK>Co|$RIL`{EECsF_eL_Q3KQhbwIhO9~z3rpmWi5G!I>X zmZEFX8nhlgfVQHi(M#xcbO3#dj$?q)F%D*o*1Pf{>6$SWH+$s3q(pv=X`qR|$iJF~TPzlc-O$C3+J1 z#CT#lv5;6stS0Uu9wDA3UMCI{Uz12A4#|?_P6{CkNG+sOq(0IRX`D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git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png new file mode 100644 index 0000000000000000000000000000000000000000..47d047ddfa08e92084b5ef2d5993ecc247c08930 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM#=yWhy?{3l$YCrFa(7}_cTVOdki(Mh=>$h?_mX=7D>g$CCcB~4dUHj zaLB4kZ<$jPmJ_0J)_K*cnn|k3=gf`>I-az&-^-lT6TVB-)$H=xA`zCkTzf*bUR)FD zIN?&h@aBwnOifGwwR)fb<;&e-QvY(+-`1`=#~T-BPCeVHxm4P@c0#}re!br}k`1ps zTW$TPLt@2_8#ksLv{x_O$!pDa>?l?_mX=7D>g$B}?+2*dLIQ zU8tNgCFerXrAR}QfLTH-SAFvII5sD~aE?%N%@ei{_u@0fS_H&qx%M!nFJqeR#d>uW zli9hM literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png new file mode 100644 index 0000000000000000000000000000000000000000..af4507989cadb1d9373f3b4f28dc633279cdce3e GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!N$PASg|QB0LWo14sv&5Sa(k5C6L3C?&#~t zz_78O`%fY(kk47*5n0T@z%2~Ij105pNB{-*c)B=-Sopu4dYkvK0*|Yt;^LB)JSV$~ zHB$wxyv(y|C$7|yV+zka>fYD#Ncj4#Rs_V?EZ) zW?nOYicrRL`8ThWk32q~B4{Z4^Y)e>$Y?;!)8R%0e*10dpByunfL z=T4&__k@-_hPo5|Y_}%3EDYlRyTrpU$KET((Q>bi8& zR#-mVD}VKmi_G<-JPNJ)k?JzWH-9+`CEF-7tWJs&&dK}h!j}HtVHNY!OUG9^G})J!1177QgFkT0>{0z@@VoJ=(js#)53b&` zcc*zg-zJ`=6z*}ic1>A#>&oOwq`njxg HN@xNAhv{(o literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signature.png new file mode 100644 index 0000000000000000000000000000000000000000..2f99fb15a3605d85710dd7e5cef4bb06e3617bb2 GIT binary patch literal 1342 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`Z0uxV=WNv2R>f&VXVgeL1 zGIoXOb;(aI%}vcKf$2>_=rzTu7nBro3xGDeq!wkCrKY$Q<>xAZy=;|<+bu>o&4cPq z!R;1foO<^MnH=tc!Bhk zM%xX%F~s8}vs53RMLhQ$7dy+XyU>|3i7Wd7@4Qe>{+;df`yJ<`MJMu{+R6LY zF8RJo)!F}oB;q0l?5_llNgu-lyN z?RtOb#hRF@j=D3Z{Hi-3I)ioXgV61No?1n)yw;f`UT};_==z6?Pi}sdTGOPuZTdm3 zaJh%YAKV{_Yo8JGt-e+KfYIjS6K0!c*?`np2N@z5N*Byvd|!F|zN4xHyXl_Pg}gFC zOE?XVc_+-2+q9;M1& literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html new file mode 100644 index 0000000000..effac6f684 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -0,0 +1,97 @@ + + + + + +
+ +
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+

Clear Signature Confirmation

+
+
+ Are you sure you want to clear signature? +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js new file mode 100644 index 0000000000..dc33ea8b81 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.js @@ -0,0 +1,34 @@ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ Copyright 2024 Adobe + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + +use(function () { + + var clientlibsArr = ['core.forms.components.base.v1.editor']; + var labelPath = 'core/fd/components/af-commons/v1/fieldTemplates/label.html'; + var shortDescriptionPath = "core/fd/components/af-commons/v1/fieldTemplates/shortDescription.html"; + var longDescriptionPath = "core/fd/components/af-commons/v1/fieldTemplates/longDescription.html"; + var questionMarkPath = "core/fd/components/af-commons/v1/fieldTemplates/questionMark.html" + var errorMessagePath = "core/fd/components/af-commons/v1/fieldTemplates/errorMessage.html"; + + return { + labelPath: labelPath, + shortDescriptionPath: shortDescriptionPath, + longDescriptionPath: longDescriptionPath, + questionMarkPath: questionMarkPath, + errorMessagePath: errorMessagePath, + clientlibs: clientlibsArr + } +}); \ No newline at end of file diff --git a/ui.frontend/package-lock.json b/ui.frontend/package-lock.json index 06a1836a81..9f038be84d 100644 --- a/ui.frontend/package-lock.json +++ b/ui.frontend/package-lock.json @@ -101,8 +101,7 @@ }, "node_modules/@adobe/json-formula": { "version": "0.1.50", - "resolved": "https://registry.npmjs.org/@adobe/json-formula/-/json-formula-0.1.50.tgz", - "integrity": "sha512-dmlLYfbty8NPVIdxvI9cJ+ZdXsrRCFrCdmL1+aR2auEzXJ86rD0bm1qu+S4NOpFiZLKIyx0zvUTykms40vNjsA==", + "license": "Apache-2.0", "engines": { "node": ">=16.0.0" } @@ -11127,9 +11126,7 @@ }, "dependencies": { "@adobe/json-formula": { - "version": "0.1.50", - "resolved": "https://registry.npmjs.org/@adobe/json-formula/-/json-formula-0.1.50.tgz", - "integrity": "sha512-dmlLYfbty8NPVIdxvI9cJ+ZdXsrRCFrCdmL1+aR2auEzXJ86rD0bm1qu+S4NOpFiZLKIyx0zvUTykms40vNjsA==" + "version": "0.1.50" }, "@aemforms/af-core": { "version": "0.22.124", diff --git a/ui.tests/test-module/specs/scribble/scribble.authoring.spec.js b/ui.tests/test-module/specs/scribble/scribble.authoring.spec.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ui.tests/test-module/specs/scribble/scribble.runtime.spec.js b/ui.tests/test-module/specs/scribble/scribble.runtime.spec.js new file mode 100644 index 0000000000..e69de29bb2 From 0715f9734993b68db395c2fc5aac6cc753215099 Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Tue, 10 Dec 2024 15:27:05 +0530 Subject: [PATCH 05/17] scribble new changes --- .../internal/models/v1/form/ScribbleImpl.java | 2 +- .../v1/scribble/_cq_dialog/.content.xml | 35 +- .../scribble/v1/scribble/_cq_template.xml | 2 +- .../clientlibs/site/css/scribbleview.css | 106 ++- .../v1/scribble/clientlibs/site/js.txt | 1 + .../clientlibs/site/js/GeoLocQuery.js | 64 ++ .../clientlibs/site/js/scribbleview.js | 727 +++++++----------- .../resources/images/SelectionEditIcon.png | Bin 0 -> 7376 bytes .../resources/images/SelectionEraserIcon.png | Bin 0 -> 7517 bytes .../resources/images/SelectionTextIcon.png | Bin 0 -> 6904 bytes .../site/resources/images/clearSign.svg | 8 + .../{iEBox_no.png => clearSignButton.png} | Bin .../site/resources/images/iEBox_ok.png | Bin 8242 -> 0 bytes .../site/resources/images/leftnav.png | Bin 290 -> 0 bytes .../site/resources/images/leftnav_hover.png | Bin 291 -> 0 bytes .../site/resources/images/rightnav.png | Bin 295 -> 0 bytes .../site/resources/images/rightnav_hover.png | Bin 316 -> 0 bytes .../clientlibs/site/resources/images/sign.png | Bin 0 -> 1022 bytes .../site/resources/images/signIcon.png | Bin 0 -> 1664 bytes .../form/scribble/v1/scribble/scribble.html | 38 +- 20 files changed, 443 insertions(+), 540 deletions(-) create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEraserIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSign.svg rename ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/{iEBox_no.png => clearSignButton.png} (100%) delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav_hover.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png delete mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav_hover.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/signIcon.png diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java index 3a35e4e5de..e16b054ceb 100644 --- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java +++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/ScribbleImpl.java @@ -45,5 +45,5 @@ public class ScribbleImpl extends AbstractFieldImpl implements Scribble { public String getValue() { return value; } - + } \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml index 9212c6f7a7..23687d37c3 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_dialog/.content.xml @@ -28,6 +28,7 @@ - diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml index d88cbc2495..366a2361f6 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/_cq_template.xml @@ -2,4 +2,4 @@ + fieldType="text-input"/> diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css index 9c9fe09474..17dc119d93 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css @@ -48,7 +48,8 @@ textarea.cmp-adaptiveform-scribble__widget{ .cmp-adaptiveform-scribble__canvas-signed-container { position: relative; border: 1px solid #AAAAAA; - height: 210px; + height: 280px; + padding: 10px; min-width: 50px; width: 100%; border-radius: 0.5rem; @@ -190,7 +191,7 @@ textarea.cmp-adaptiveform-scribble__widget{ } .cmp-adaptiveform-scribble__control-brush{ - background-image:url('../resources/images/iEBox_brush.png'); + background-image:url('../resources/images/signIcon.png'); } .cmp-adaptiveform-scribble__control-submit { @@ -264,7 +265,7 @@ textarea.cmp-adaptiveform-scribble__widget{ } } -#iEBox_moveframe{ +/* #iEBox_moveframe{ padding:0px; margin:0px; border:0px dotted rgba(0,0,0,0.5); @@ -275,10 +276,8 @@ margin:0px; -moz-box-shadow: 10px 10px 5px #888888; -webkit-box-shadow: 10px 10px 5px #888888; box-shadow: 0px 0px 15px #888888; - - /* display:none; */; position:absolute; -} +} */ .disable_button { filter: grayscale(100%); /* Apply grayscale effect */ -webkit-filter: grayscale(100%); /* For Safari and older versions of Chrome */ @@ -289,25 +288,23 @@ margin:0px; opacity: 0.6; /* Optional: Adjust opacity to give a faded look */ pointer-events: none; /* Disable all mouse events */ } -.sc_popUpMenu { +.cmp-adaptiveform-scribble__clear-sign { position: absolute; width:20px; height:20px; background:no-repeat; background-size:20px 20px; - background-image:url('../resources/images/iEBox_no.png'); - left:2px; - top:2px; + background-image:url('../resources/images/clearSignButton.png'); + right: 5px; + top: 5px; } .cmp-adaptiveform-scribble__brushlist{ position:absolute; z-index:99999; background-color:white; - -moz-box-shadow: 10px 10px 5px #888888; - -webkit-box-shadow: 10px 10px 5px #888888; box-shadow: 0px 0px 15px #888888; - display:none; - bottom: 60px; + display: none; + left: 45px; } .cmp-adaptiveform-scribble__brushlist :hover{ background-color:gray; @@ -328,24 +325,19 @@ margin:0px; background-color: #FFFFFF; padding: 2px; } -.emptyScribble { - background: url('../resources/images/signature.png') no-repeat; -} .cmp-adaptiveform-scribble__canvases { white-space:nowrap; } -#msgBox_container { - font-family: Arial, sans-serif; - font-size: 12px; - min-width: 50px; /* Dialog will be no smaller than this */ - max-width: 600px; /* Dialog will wrap after this width */ +.cmp-adaptiveform-scribble__clearsign-container { + font-size: 14px; + padding: 25px; + width: 280px; + height: 148px; background: #FFF; - border: solid 5px #999; + border: solid 1px #E6E6E6; color: #000; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; border-radius: 5px; position: absolute; top: 50%; @@ -354,61 +346,61 @@ margin:0px; transform: translate(-50%, -50%); } -#msgBox_title { +.cmp-adaptiveform-scribble__clearsign-title { font-size: 14px; font-weight: bold; - text-align: center; line-height: 1.75em; - color: #666; - background: #CCC top repeat-x; - border: solid 1px #FFF; - border-bottom: solid 1px #999; + color: #000; cursor: default; - padding: 0em; + padding-bottom: 10px; margin: 0em; } -#msgBox_content { +.cmp-adaptiveform-scribble__clearsign-content { background: 16px 16px no-repeat ; padding: 1em 1.75em; margin: 0em; } -#msgBox_message { - text-align: center; +.cmp-adaptiveform-scribble__clearsign-message { + font-size: 14px; } -#msgBox_panel { - text-align: center; +.cmp-adaptiveform-scribble__clearsign-panel { + text-align: right; margin: 1em 0em 0em 1em; } -#msgBox_prompt { - margin: .5em 0em; +.cmp-adaptiveform-scribble__clearsign-yes{ + width: 54px; + height: 24px; + margin: 5px; + font-size: 12px; + font-weight: 700; + border: 1px transparent; + border-radius: 20px; + background-color: #0265DC; + color: white; } -input#msgBox_Ok,input#msgBox_Yes,input#msgBox_No,input#msgBox_Cancel{ - background-color: buttonFace; - padding: 5px 10px; - -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; - -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; - box-shadow: rgba(0,0,0,1) 0 1px 0; - text-shadow: rgba(0,0,0,.4) 0 1px 0; - color: buttonText; - font-size: 14px; - font-family: Georgia, serif; - text-decoration: none; - vertical-align: middle; - outline:none; - border: 2px outset buttonface; - border-radius: 1rem; + +.cmp-adaptiveform-scribble__clearsign-no{ + width: 54px; + height: 24px; + font-weight: 700; + font-size: 12px; + margin: 5px; + background-color: #FFF; + border: 2px solid #D5D5D5; + color: #4b4b4b; + border-radius: 20px; } - input#msgBox_Ok:focus,input#msgBox_Yes:focus,input#msgBox_No:focus,input#msgBox_Cancel:focus{ +/* .cmp-adaptiveform-scribble__clearsign-yes:focus,.cmp-adaptiveform-scribble__clearsign-no:focus{ outline:highlight; } - input#msgBox_Ok:hover,input#msgBox_Yes:hover,input#msgBox_No:hover,input#msgBox_Cancel:hover{ + .cmp-adaptiveform-scribble__clearsign-yes:hover,.cmp-adaptiveform-scribble__clearsign-no:hover{ outline:none; border: 2px outset buttonface; - } \ No newline at end of file + } */ \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt index 6c95e73eb7..b0b61fbdc3 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js.txt @@ -15,4 +15,5 @@ ############################################################################### #base=js +GeoLocQuery.js scribbleview.js diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js new file mode 100644 index 0000000000..44bc5920d0 --- /dev/null +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/GeoLocQuery.js @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2024 Adobe + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +if(window.GeoLocationQuery === undefined) { + window.GeoLocationQuery = class GeoLocationQuery { + constructor() { + this._active = false; + } + + init(success, failure) { + this._successHandler = success; + this._errorHandler = failure; + this._active = true; + return this; + } + + _handleSuccess(data) { + if (this._successHandler) { + this._successHandler(data); + } + } + + _handleError(err) { + if (this._errorHandler) { + this._errorHandler(err); + } + } + + query() { + const onSuccess = (pos) => { + if (this._active) { + this._handleSuccess(pos); + } + this._active = false; + }; + + const onError = (err) => { + if (this._active) { + this._handleError(err); + } + this._active = false; + }; + + navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); + } + + cancel() { + this._active = false; + } + } +} \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 3a6f181c1f..9097f86659 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2023 Adobe + * Copyright 2024 Adobe * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,62 +14,12 @@ * limitations under the License. ******************************************************************************/ + (function() { "use strict"; - /** - * class definition for GeoLocationQueryRequest - * encapsulated success and error handlers - */ - class GeoLocQuery { - constructor() { - this._active = false; - } - - init(success, failure) { - this._successHandler = success; - this._errorHandler = failure; - this._active = true; - return this; - } - - _handleSuccess(data) { - if (this._successHandler) { - this._successHandler(data); - } - } - - _handleError(err) { - if (this._errorHandler) { - this._errorHandler(err); - } - } - - query() { - const onSuccess = (pos) => { - if (this._active) { - this._handleSuccess(pos); - } - this._active = false; - }; - - const onError = (err) => { - if (this._active) { - this._handleError(err); - } - this._active = false; - }; - - navigator.geolocation.getCurrentPosition(onSuccess, onError, { timeout: 10000 }); - } - - cancel() { - this._active = false; - } - } - - const PNGUtil = (() => { + const PNGGeneratorUtil = (() => { // Helper function to initialize CRC table const initCrcTable = () => { const table = new Uint32Array(256); @@ -164,110 +114,15 @@ })(); - - // GeoLocQuery definition ends here - // const PNGUtil = (() => { - // // Helper function to initialize CRC table - // const initCrcTable = () => { - // const table = []; - // let c; - // for (let n = 0; n < 256; n++) { - // c = n; - // for (let k = 0; k < 8; k++) { - // c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); - // } - // table[n] = c; - // } - // return table; - // }; - - // // Helper function to convert 32-bit integer to string - // const u32IntToStr = (n) => String.fromCharCode( - // (n >>> 24) & 0xFF, - // (n >>> 16) & 0xFF, - // (n >>> 8) & 0xFF, - // n & 0xFF - // ); - - // // Helper function to calculate CRC - // const updateCrc = (crc, data) => { - // let c = crc; - // for (let i = 0; i < data.length; i++) { - // c = XOR(crcTable[(XOR(c, data.charCodeAt(i)) & 0xff) >>> 0], c >>> 8); - // } - // return c; - // }; - - // // Helper function to calculate XOR - // const XOR = (a, b) => (a ^ b) >>> 0; - - // // Helper function to calculate CRC - // const CRC = (data) => XOR(updateCrc(0xffffffff, data), 0xffffffff); - - // // Helper function to prepare text chunk - // const prepareTextChunk = (content) => { - // const len = content.length; - // const lenStr = u32IntToStr(len); - // const chunkType = "tEXt"; - // const checkSumStr = u32IntToStr(CRC(chunkType + content)); - // return lenStr + chunkType + content + checkSumStr; - // }; - - // // Initialize CRC table - // const crcTable = initCrcTable(); - - // const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA" - // // Main API - // return { - // // Function to check if data is a PNG - // _isPng: (b64data) => { - // return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); - // }, - - // // Function to make PNG read-only - // _makeReadOnly: (b64data) => { - // const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces - // const pngctx = { p: 8, d: bindata }; // Skip PNG header - // const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); - // const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); - // return btoa(newdata); - // }, - - // // Function to decode base64 - // _atob: (input) => window.atob ? atob(input) : Base64.decode(input), - - // // Function to encode to base64 - // _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), - - // // Function to check if PNG is read-only - // _isReadOnly: (b64data) => { - // if (this._isPng(b64data)) { - // const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; - // const bindata = this._atob(b64data.replace(/\s+/g, '')); - // const pngctx = { p: 8, d: bindata }; // Skip PNG header - // while (pngctx.p < pngctx.d.length) { - // const size = u32IntToStr(pngctx.d.charCodeAt(pngctx.p)); - // const type = pngctx.d.slice(pngctx.p, pngctx.p + 4); - // pngctx.p += 4; // Move past type - // if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { - // return true; - // } - // pngctx.p += size + 4; // Move past data and CRC - // } - // } - // return false; - // } - // }; - // })(); + /** + * class definition for GeoLocationQueryRequest + * encapsulated success and error handlers + */ class Scribble extends FormView.FormFieldBase { _geoLocQuery=null; _signSubmitted=false; _enforceGeoLoc=!!navigator.userAgent.match(/iPad/i); - _geoCanvId=null; - _geoLocAtBottom=false; - _geoCanvasWidth=696; - _defaultStatus=" "; existingSign = ''; existingCanvas = ''; static NS = FormView.Constants.NS; @@ -281,21 +136,28 @@ scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, + canvasSignedContainer: `.${Scribble.bemBlock}__canvas-signed-container`, canvas: `.${Scribble.bemBlock}__canvas`, label: `.${Scribble.bemBlock}__label`, description: `.${Scribble.bemBlock}__longdescription`, qm: `.${Scribble.bemBlock}__questionmark`, errorDiv: `.${Scribble.bemBlock}__errormessage`, tooltipDiv: `.${Scribble.bemBlock}__shortdescription`, + scribbleCloseButton: `.${Scribble.bemBlock}__button-close`, brushControl: `.${Scribble.bemBlock}__control-brush`, scribbleGeoControl: `.${Scribble.bemBlock}__control-geo`, clearControl: `.${Scribble.bemBlock}__control-clear`, scribbleTextControl: `.${Scribble.bemBlock}__control-text`, scribbleMessage: `.${Scribble.bemBlock}__control-message`, + clearSignButton: `.${Scribble.bemBlock}__clearsign-yes`, + cancelClearSignButton: `.${Scribble.bemBlock}__clearsign-no`, + clearSignContainer: `.${Scribble.bemBlock}__clearsign-container`, scribbleSubmitControl: `.${Scribble.bemBlock}__control-submit`, scribbleBrushList: `.${Scribble.bemBlock}__brushlist`, signCanvases: `.${Scribble.bemBlock}__signcanvases`, saveCanvas: `.${Scribble.bemBlock}__control-submit`, + canvasSignedImage: `.${Scribble.bemBlock}__canvas-signed-image`, + mainCanvas: `.${Scribble.bemBlock}__canvas__main` }; constructor(params) { @@ -304,16 +166,12 @@ } initializeScribble() { - this.getCanvasContainer().addEventListener('click', () => this.clickHanlder()); + this.getCanvasContainer().addEventListener('click', () => this.scribbleContainerClickHandler()); this.initScribbleModal(); } - + getWidget() { - return this.element.querySelector(Scribble.selectors.canvas); - } - - getTemplate() { - return this.element.querySelector('#template-modal'); + return this.element.querySelector(Scribble.selectors.canvasSignedContainer); } getLabel() { @@ -344,6 +202,18 @@ return document.querySelector(Scribble.selectors.scribbleMessage); } + getClearSignContainer() { + return document.querySelector(Scribble.selectors.clearSignContainer); + } + + getClearSignButton() { + return document.querySelector(Scribble.selectors.clearSignButton); + } + + getCancelClearSignButton() { + return document.querySelector(Scribble.selectors.cancelClearSignButton); + } + getBrushList() { return document.querySelector(Scribble.selectors.scribbleBrushList); } @@ -360,6 +230,10 @@ return document.querySelector(Scribble.selectors.saveCanvas); } + getGeoLocationIcon() { + return document.querySelector(Scribble.selectors.scribbleGeoControl); + } + getTextSignControl() { return document.querySelector(Scribble.selectors.scribbleTextControl); } @@ -381,11 +255,11 @@ } getCanvasContainer() { - return this.element.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); + return this.element.querySelector(Scribble.selectors.canvasSignedContainer); } getScribbleCloseButton() { - return this.element.querySelector('.cmp-adaptiveform-scribble__button-close'); + return this.element.querySelector(Scribble.selectors.scribbleCloseButton); } getCanvas() { @@ -393,7 +267,7 @@ } getMainCanvas() { - return this.element.querySelector('.cmp-adaptiveform-scribble__canvas__main'); + return this.element.querySelector(Scribble.selectors.mainCanvas); } getSignCanvasesContainer() { @@ -404,6 +278,10 @@ return this.element.querySelector(Scribble.selectors.description); } + getSignedCanvasImage() { + return document.querySelector(Scribble.selectors.canvasSignedImage); + } + showMessage(msg){ if(this._msgTimeout) { clearTimeout(this._msgTimeout); this._msgTimeout=0; } const scribbleMessage = this.getMessage(); @@ -417,36 +295,54 @@ extractData(datauri){ var idx; if(datauri!=null&&datauri.length>0&&datauri.indexOf("data:")==0){ - if((idx=datauri.indexOf(","))>0){ + if((idx=datauri.indexOf(","))>0) { return datauri.substr(idx+1); } } } openClearSignModal() { - document.getElementById('msgBox_container').style.display='inline-block'; - document.getElementById('msgBox_Yes').addEventListener('click', () => { - this.existingSign=''; - this.getMainCanvas().parentNode.replaceChild(this.existingCanvas, this.getMainCanvas()); - this.existingCanvas.getContext('2d').clearRect(0, 0, this.existingCanvas, this.existingCanvas.height); - const geoCnv = this.getGeoCanvasRight(); - if(geoCnv) { - const geoCanvasContext = geoCnv.getContext('2d'); - geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + const clearSignContainer = this.getClearSignContainer(); + const clearSignButton = this.getClearSignButton(); + const cancelClearSignButton = this.getCancelClearSignButton(); + + clearSignContainer.style.display = 'inline-block'; + + const handleClearSign = () => { + this.existingSign = ''; + const mainCanvas = this.getMainCanvas(); + const existingCanvas = this.existingCanvas; + + if (mainCanvas && existingCanvas) { + mainCanvas.parentNode.replaceChild(existingCanvas, mainCanvas); + const ctx = existingCanvas.getContext('2d'); + ctx.clearRect(0, 0, existingCanvas.width, existingCanvas.height); } - this.enableControls(['brush','geo','clear','text','submit']); - const box = document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container'); - if (box.firstChild) { - box.removeChild(box.firstChild); - document.querySelector('.cmp-adaptiveform-scribble__canvas-signed-container').innerHTML = ""; - document.querySelector('.sc_popUpMenu')?.remove(); - document.getElementById('msgBox_container').style.display='none'; + + const geoCanvas = this.getGeoCanvasRight(); + if (geoCanvas) { + const geoCtx = geoCanvas.getContext('2d'); + geoCtx.clearRect(0, 0, geoCanvas.width, geoCanvas.height); + } + + this.enableControls(['brush', 'geo', 'clear', 'text', 'submit']); + + const signedImage = this.getSignedCanvasImage(); + if (signedImage) { + signedImage.removeAttribute('src'); + signedImage.removeAttribute('style'); + document.querySelector('.cmp-adaptiveform-scribble__clear-sign')?.remove(); + clearSignContainer.style.display = 'none'; this.getKeyboardSignBox().value = ''; } + this._signSubmitted = false; - }); - document.getElementById('msgBox_No').addEventListener('click', () => { - document.getElementById('msgBox_container').style.display='none'; + }; + + clearSignButton.addEventListener('click', handleClearSign); + + cancelClearSignButton.addEventListener('click', () => { + clearSignContainer.style.display = 'none'; }); } @@ -455,108 +351,109 @@ mainCanvas.classList.add('cmp-adaptiveform-scribble__canvasImage'); } - doOk() { + updateValue(value) { + // html sets undefined value as undefined string in input value, hence this check is added + let widgetValue = typeof value === "undefined" ? null : value; + const signedImage = this.getSignedCanvasImage(); + if (signedImage) { + signedImage.src = widgetValue; + super.updateEmptyStatus(); + } + } + + isCanvasEmpty(canvas) { + const ctx = canvas.getContext('2d'); + const width = canvas.width; + const height = canvas.height; + + // Get pixel data from the canvas + const imageData = ctx.getImageData(0, 0, width, height); + + // Check if any pixel is not transparent (not [0, 0, 0, 0] = transparent) + for (let i = 0; i < imageData.data.length; i += 4) { + if (imageData.data[i + 3] > 0) { + return false; // Found non-transparent pixel + } + } + + return true; // No non-transparent pixels found + } + + submitSign() { + if (!this.isCanvasEmpty(this.canvas)) { + const mainCanvas = this.createMainCanvas(); + const sigCnv = this.getCanvas(); // Get the sign canvas + const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas + + this.drawCanvasesOnMainCanvas(mainCanvas, sigCnv, geoCnv); + + this.existingCanvas = sigCnv; + sigCnv.height = mainCanvas.height; + sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); + + const newData = mainCanvas.toDataURL("image/png"); + this.existingSign = mainCanvas; + let val; + if ((val = this.extractData(newData))) { + // const pngGeneratorUtil = PNGGeneratorUtil(); + val = PNGGeneratorUtil._makeReadOnly(val); + this._is_readonly = true; + } + + this.updateSignedImage(newData); + this.setModelValue(newData); + this.addClearSignButton(); + + if (this._geoLocQuery) { + this._geoLocQuery.cancel(); // Cancel the current geo loc request + } + + this.closeEditModal(); + this._signSubmitted = true; + } + } + + createMainCanvas() { const mainCanvas = document.createElement('canvas'); - // mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas'); mainCanvas.classList.add('cmp-adaptiveform-scribble__canvas__main'); - const sigCnv = this.getCanvas(); // Get the sign canvas - const geoCnv = this.getGeoCanvasRight(); // Get the geo canvas - let ctx = mainCanvas.getContext('2d'); + return mainCanvas; + } + + drawCanvasesOnMainCanvas(mainCanvas, sigCnv, geoCnv) { + const ctx = mainCanvas.getContext('2d'); if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { // Set the dimensions of the mainCanvas to accommodate both canvases vertically mainCanvas.width = Math.max(sigCnv.width, geoCnv.width); mainCanvas.height = sigCnv.height + geoCnv.height; - ctx = mainCanvas.getContext('2d'); // Draw the sign canvas on the main canvas ctx.drawImage(sigCnv, 0, 0); - // Draw the geo canvas below the sign canvas - ctx.drawImage(geoCnv, 0, sigCnv.height); + ctx.drawImage(geoCnv, 0, sigCnv.height, geoCnv.width, geoCnv.height); } else { mainCanvas.width = sigCnv.width; mainCanvas.height = sigCnv.height; ctx.drawImage(sigCnv, 0, 0); } - - // if (geoCnv && geoCnv.width > 0 && geoCnv.height > 0) { - // if (this._geoLocAtBottom) { - // mainCanvas.width = sigCnv.width; - // mainCanvas.height = sigCnv.height + geoCnv.height; - // ctx.drawImage(sigCnv, 0, 0); - // ctx.drawImage(geoCnv, 0, sigCnv.height); - // } else { - // // Create the final image after the submit is clicked - // mainCanvas.width = sigCnv.width;// + geoCnv.width + 10; - // mainCanvas.height = sigCnv.height + geoCnv.height + 10;// Math.max(sigCnv.height, geoCnv.height); - // // mainCanvas.height = Math.max(sigCnv.height, geoCnv.height); - // ctx.drawImage(sigCnv, 0, 0); - // // +10 is added to provide the margin between two images - // ctx.drawImage(geoCnv, 0, 180); - // // ctx.drawImage(geoCnv, sigCnv.width + 10, 0); - // geoCnv.style.display = 'none'; - // } - // } else { - // mainCanvas.width = sigCnv.width; - // mainCanvas.height = sigCnv.height; - // ctx.drawImage(sigCnv, 0, 0); - // } - this.existingCanvas = sigCnv; - sigCnv.height = mainCanvas.height; - sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); - - const newData = mainCanvas.toDataURL("image/png"); - this.existingSign = mainCanvas; - let val; - if ((val = this.extractData(newData))) { - val = PNGUtil._makeReadOnly(val); - this._is_readonly = true; - } - - const img = document.createElement('img'); + } + + updateSignedImage(newData) { + const img = this.getSignedCanvasImage(); img.src = newData; img.style.width = '100%'; - img.style.height = '200px'; - + img.style.height = '250px'; + } + + addClearSignButton() { const clearSignButton = document.createElement('div'); - clearSignButton.classList.add('sc_popUpMenu'); - + clearSignButton.classList.add('cmp-adaptiveform-scribble__clear-sign'); + const mainCanvasImageContainer = this.getCanvasContainer(); - mainCanvasImageContainer.appendChild(img); mainCanvasImageContainer.appendChild(clearSignButton); clearSignButton.addEventListener('click', (e) => { e.stopPropagation(); this.openClearSignModal(); }); - - if (this._geoLocQuery) { - this._geoLocQuery.cancel(); // Cancel the current geo loc request - } - - this.closeEditModal(); - this._signSubmitted = true; - } - - handleOk() { - if (this._enforceGeoLoc) { - // Create a new GeoLocQuery instance and initialize it with bound handlers - this._geoLocQuery = new GeoLocQuery().init( - (data) => { - this.geoQuerySuccessHandler(data); - this.doOk(); - }, - (err) => { - this.geoQueryErrorHandler(err); - } - ); - - // Start the geolocation query - this._geoLocQuery.query(); - this.showMessage('fetchGeoLocation'); - } else { - // If geolocation is not enforced, directly proceed with the operation - this.doOk(); - } } geoQueryErrorHandler(err){ @@ -565,8 +462,8 @@ renderBrushList() { [2,3,4,5,6,7,8,9,10].forEach((brush) => { - var divel = document.createElement('DIV'); - var cnv = document.createElement('CANVAS'); + var divel = document.createElement('div'); + var cnv = document.createElement('canvas'); var ctx = cnv.getContext('2d'); cnv.style.border='1px solid #AAAAAA'; cnv.width=100; @@ -581,6 +478,7 @@ divel.addEventListener('click', (e) => { e.stopPropagation(); this.context.lineWidth=brush; + this.toggleBrushList(); }) this.getBrushList().append(divel); }); @@ -603,14 +501,10 @@ if (signCanvas.width > 0 && signCanvas.height > 0) { imgData = ctx.getImageData(0, 0, signCanvas.width, signCanvas.height); } - // Calculate the new width based on the percentage of the container's width const newWidth = container.offsetWidth * (percentage / 100); - // Set the new width and height of the canvas signCanvas.width = newWidth; - // signCanvas.height = container.offsetHeight; // Maintain the height - // Restore the content back to the resized canvas if it has valid content if (imgData) { ctx.putImageData(imgData, 0, 0); @@ -625,91 +519,80 @@ const longStr = `Longitude: ${longitude}`; const dateObj = new Date(); const tZone = (dateObj.getTimezoneOffset() / 60) * -1; - const time = dateObj.getTime(); - const timeStr = `${time}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; - - const signCanvas = this.getSignCanvasesContainer(); - const geoCanvasRight = this.getGeoCanvasRight(); - const container = this.getCanvasContainer(); - - // Set the widths of the canvases - // signCanvas.style.width = '70%'; - geoCanvasRight.style.height = '50px'; - geoCanvasRight.style.width = '200px'; - geoCanvasRight.style.display = 'block'; - // geoCanvasRight.style.display = 'inline-block'; - // geoCanvasRight.style.height = '200px'; - // Adjust the canvas sizes based on the new widths - // this.resizeAndFixCanvas(); - // this.resizeCanvas(70); // Resize the signCanvas to 70% of its container's width - - if (geoCanvasRight) { - const ctx = geoCanvasRight.getContext('2d'); - geoCanvasRight.width = geoCanvasRight.offsetWidth; - geoCanvasRight.height = geoCanvasRight.offsetHeight; - - ctx.font = 'bold 10px Arial'; // Font size and type - ctx.fillStyle = 'black'; // Text color - ctx.measureText("m").width * 1.5; - ctx.fillStyle = 'black'; // Text color - ctx.measureText("m").width * 1.5; - // Define the position to draw the text - let x = 0; - let y = 15; - - // Draw the text on the canvas - ctx.fillText(latStr, x, y); - ctx.fillText(longStr, x, y + 15); - ctx.fillText(timeStr, x, y + 30); - } + const timeStr = `${dateObj.getTime()}: ${(dateObj.getMonth() + 1)}/${dateObj.getDate()}/${dateObj.getFullYear()} ${dateObj.getHours()}:${dateObj.getMinutes()}:${dateObj.getSeconds()}${tZone > 0 ? ' +' : ' '}${tZone}`; + this.updateGeoCanvas(latStr, longStr, timeStr); + } + } + + updateGeoCanvas(latStr, longStr, timeStr) { + const geoCanvasRight = this.getGeoCanvasRight(); + geoCanvasRight.style.height = '50px'; + geoCanvasRight.style.width = '200px'; + geoCanvasRight.style.display = 'block'; + + if (geoCanvasRight) { + const ctx = geoCanvasRight.getContext('2d'); + geoCanvasRight.width = geoCanvasRight.offsetWidth; + geoCanvasRight.height = geoCanvasRight.offsetHeight; + + ctx.font = 'bold 10px Arial'; // Font size and type + ctx.fillStyle = 'black'; // Text color + ctx.measureText("m").width * 1.5; + let x = 0; + let y = 15; + + // Draw the text on the canvas + ctx.fillText(latStr, x, y); + ctx.fillText(longStr, x, y + 15); + ctx.fillText(timeStr, x, y + 30); } } - handleGeo() { - // initiate geolocation - if(navigator.geolocation){ - // Create a new GeoLocQuery instance - this._geoLocQuery = new GeoLocQuery(); - // Initialize with bound success and error handlers + + handleGeoLocation() { + if (navigator.geolocation) { + this._geoLocQuery = new GeoLocationQuery(); this._geoLocQuery.init( this.geoQuerySuccessHandler.bind(this), this.geoQueryErrorHandler.bind(this) ); this._geoLocQuery.query(); - this.showMessage('Fetching Geo Location...'); // Geo Location ! + this.showMessage('Fetching Geo Location...'); } } - // This Function is used to fetch the geolocation. - calculateGeolocation() { - this.handleGeo(); + geoQueryErrorHandler(err) { + this.showMessage('Error fetching geolocation'); } enableControls(controls) { controls.forEach(control => { - document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.remove('disable_button'); + const element = document.querySelector('.' + Scribble.bemBlock + '__control-' + control); + element?.classList.remove('disable_button'); + element.removeAttribute('disabled'); + element.setAttribute('aria-disabled', 'false'); }); } disableControl(controls) { controls.forEach(control => { - document.querySelector('.' + Scribble.bemBlock + '__control-' + control)?.classList.add('disable_button'); + const element = document.querySelector('.' + Scribble.bemBlock + '__control-' + control); + element?.classList.add('disable_button'); + element.setAttribute('disabled', 'true'); + element.setAttribute('aria-disabled', 'true'); }); } dialogCallback(button_val, arg1) { switch(button_val){ - case "ok": - this.handleOk(); - break; - case "Cancel": - this.handleCancel(); - break; - case "geolocation": - this.calculateGeolocation(); - break; - case "BrushSelect": - this.handleBrushSelect(arg1); - break; + // case "ok": + // this.handleOk(); + // break; + // case "Cancel": + // this.handleCancel(); + // break; + // case "geolocation": + // this.calculateGeolocation(); + // break; case "brushes": this.handleBrush(arg1); break; @@ -722,34 +605,12 @@ toggleBrushList(event) { var brushList = this.getBrushList(); var brushButton = this.getBrush(); - var originalOnSelectStart = document.onselectstart; - - if (getComputedStyle(brushList).display !== 'none') { - brushList.style.display = 'none'; - return; - } - - // Disable text selection - document.onselectstart = function() { - return false; - }; - - // Show the brush list and position it - brushList.style.display = 'block'; - brushList.style.visibility = 'hidden'; - // Make it visible - brushList.style.visibility = 'visible'; - - // Add an event listener for mouse leave - function onMouseLeave() { + if(getComputedStyle(brushList).display === 'none') { + brushList.style.display = 'block'; + } else { brushList.style.display = 'none'; - document.onselectstart = originalOnSelectStart; - brushList.removeEventListener('mouseleave', onMouseLeave); } - - brushList.addEventListener('mouseleave', onMouseLeave); } - imageClick(event) { this.dialogCallback(event.srcElement.title); @@ -767,91 +628,85 @@ this.getKeyboardSignBox().style.display = 'none'; this.canvas.style.display = "block"; this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.eraseSignature(); this.initializeCanvas(); - this.toggleBrushList(evt); - } - - makeDraggable() { - const draggableBar = this.getScribbleContainerPanel(); - const draggableContent = this.getScribbleContainer(); - draggableBar.addEventListener('mousedown', (e) => { - let offsetX = e.clientX - draggableContent.getBoundingClientRect().left; - let offsetY = e.clientY - draggableContent.getBoundingClientRect().top; - function onMouseMove(event) { - draggableContent.style.left = `${event.clientX - offsetX}px`; - draggableContent.style.top = `${event.clientY - offsetY}px`; - } - function onMouseUp() { - document.removeEventListener('mousemove', onMouseMove); - document.removeEventListener('mouseup', onMouseUp); - } - document.addEventListener('mousemove', onMouseMove); - document.addEventListener('mouseup', onMouseUp); - }); } - initScribbleModal() { const eraserIcon = this.getClearControl(); - const textSignIcon = this.getTextSignControl(); + const textSignIcon = this.getTextSignControl(); const controlPanel = this.getScribbleControlPanel(); - const toggleBrushListIcon = this.getBrushList(); + const toggleBrushListIcon = this.getBrush(); + const brushList = this.getBrushList(); const closeEditModal = this.getScribbleCloseButton(); const keyboardSignBox = this.getKeyboardSignBox(); const saveButton = this.getSaveControl(); - // this.resizeAndFixCanvas() - - this.renderBrushList() - controlPanel.addEventListener('click', (event) => { - this.imageClick(event); - }) - - saveButton.addEventListener('click', () => { - this.doOk(); + const geoLocationIcon = this.getGeoLocationIcon(); + + this.renderBrushList(); + + this.addEventListeners(controlPanel, 'click', this.imageClick.bind(this)); + this.addEventListeners(saveButton, 'click', this.submitSign.bind(this)); + this.addEventListeners(geoLocationIcon, 'click', this.handleGeoLocation.bind(this), true); + this.addEventListeners(eraserIcon, 'click', this.eraseSignature.bind(this), true); + this.addEventListeners(textSignIcon, 'click', this.enableSignatureTextBox.bind(this), true); + this.addEventListeners(toggleBrushListIcon, 'click', this.toggleBrushList.bind(this)); + this.addEventListeners(closeEditModal, 'mousedown', this.closeEditModal.bind(this)); + + keyboardSignBox.addEventListener('input', (event) => { + if (event?.target?.value) { + this.enableControls(['submit', 'clear']); + } else { + this.disableControl(['submit', 'clear']); + } }); - - eraserIcon.addEventListener('click', () => { - this.eraseSignature(); - }) - textSignIcon.addEventListener('click', () =>{ - this.enableSignatureTextBox(); - }) - toggleBrushListIcon.addEventListener('click', (event) => { - this.toggleBrushList(event); - }) - closeEditModal.addEventListener('mousedown', () => { - this.closeEditModal(); - }) - + keyboardSignBox.addEventListener('keyup', () => { - this.enableControls(['clear','submit']); - let sigCanvasFontFamily = "sans-serif, Georgia"; - let sigCanvasFontStyle = "italic"; - keyboardSignBox.style.font=sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; - const value = keyboardSignBox.value; - this.context.font = sigCanvasFontStyle + " 2rem " + sigCanvasFontFamily; - this.context.fillText(value,0,this.getCanvas().height/2); - }) - + this.updateKeyboardSignBoxFont(keyboardSignBox); + }); + + document.addEventListener('click', (event) => { + if (!brushList.contains(event.target) && !toggleBrushListIcon.contains(event.target)) { + brushList.style.display = 'none'; + } + }); + } + + addEventListeners(element, eventType, handler, checkDisabled = false) { + if (element) { + element.addEventListener(eventType, (event) => { + if (!checkDisabled || element.getAttribute('disabled') !== 'true') { + handler(event); + } + }); + } + } + + updateKeyboardSignBoxFont(keyboardSignBox) { + const fontFamily = "sans-serif, Georgia"; + const fontStyle = "italic"; + keyboardSignBox.style.font = `${fontStyle} 2rem ${fontFamily}`; + const value = keyboardSignBox.value; + this.context.font = `${fontStyle} 2rem ${fontFamily}`; + this.context.fillText(value, 0, this.getCanvas().height / 2); } enableSignatureTextBox() { - this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.eraseSignature(); this.getKeyboardSignBox().style.display = "inline-block"; this.getCanvas().style.display = "none"; } eraseSignature() { - this.context.clearRect(0, 0, this.canvas?.width, this.canvas?.height); + this.context?.clearRect(0, 0, this.canvas?.width, this.canvas?.height); const geoCnv = this.getGeoCanvasRight(); if(geoCnv) { - const geoCanvasContext = geoCnv.getContext('2d'); - geoCanvasContext.clearRect(0, 0, geoCnv.width, geoCnv.height); + const geoCanvasContext = geoCnv?.getContext('2d'); + geoCanvasContext?.clearRect(0, 0, geoCnv.width, geoCnv.height); geoCnv.style.display = 'none'; } this.getKeyboardSignBox().value=''; this.disableControl(['clear','submit']); } - resizeAndFixCanvas() { const dpr = window.devicePixelRatio || 1; @@ -860,35 +715,49 @@ this.canvas.height = this.canvas.offsetHeight * dpr; this.context.putImageData(imgData, 0, 0); } - - initializeCanvas() { - this.canvas = this.getCanvas(); + handleCanvasEvent(event) { + switch (event.type) { + case 'mousedown': + case 'touchstart': + this.startDrawing(event); + break; + case 'mousemove': + case 'touchmove': + this.draw(event); + break; + case 'mouseup': + case 'mouseleave': + case 'touchend': + case 'touchcancel': + this.stopDrawing(); + break; + } + } + addCanvasEventListeners() { + const events = ['mousedown', 'mousemove', 'mouseup', 'mouseleave', 'touchstart', 'touchmove', 'touchend', 'touchcancel']; + events.forEach(event => { + this.canvas.addEventListener(event, this.handleCanvasEvent.bind(this)); + }); + } + + initializeCanvas() { if(this.existingSign) { this.getCanvasContainer().style.width = '100%'; this.getMainCanvas().style.border = '1px solid black'; this.getKeyboardSignBox().style.display = 'none'; this.disableControl(['brush','geo','clear','text','submit']); } else { + this.canvas = this.getCanvas(); + this.canvas.style.display = 'block'; this.context = this.canvas.getContext('2d', { willReadFrequently: true }); this.resizeCanvas(100); this.resizeAndFixCanvas(); if (this.canvas) { this.canvas.style.border = '1px dashed #AAAAAA'; this.getKeyboardSignBox().style.display = 'none'; - this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); - this.canvas.addEventListener('mousemove', this.draw.bind(this)); - this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mousedown', this.startDrawing.bind(this)); - this.canvas.addEventListener('mousemove', this.draw.bind(this)); - this.canvas.addEventListener('mouseup', this.stopDrawing.bind(this)); - this.canvas.addEventListener('mouseleave', this.stopDrawing.bind(this)); - this.canvas.addEventListener('touchstart', this.startDrawing.bind(this)); - this.canvas.addEventListener('touchmove', this.draw.bind(this)); - this.canvas.addEventListener('touchend', this.stopDrawing.bind(this)); - this.canvas.addEventListener('touchcancel', this.stopDrawing.bind(this)); + this.addCanvasEventListeners(); this.isDrawing = false; } } @@ -908,12 +777,11 @@ this.getScribbleContainer().style.display = 'none'; } - clickHanlder() { + scribbleContainerClickHandler() { this.showScribbleModal(); this.initializeCanvas(); } - startDrawing(event) { // Ensure the context is initialized if (!this.context) { @@ -965,7 +833,6 @@ if (this.isDrawing) { this.context.closePath(); this.isDrawing = false; - this._model.value = this.canvas.toDataURL(); } } } diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionEditIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..62657c95c2fb5f7fa74374d0d3aaed51ff43b099 GIT binary patch literal 7376 zcmV;>953UEP);8*(R?LHI-6T ziiDu*OF*pzc}XQmX)7g96w?AyTMDjl3={)4#$WiJJ)Pe=>pyp$xyQtCkIl7jmbA~F zy=V5Ez1PgF@0m&I6F|f-%9d-n9@UeB4s%hY=@PX~2yU(Yvnbvkq%>xs|I zdzZF8J*)EV|F_S5#DD1fKM{PK2fHb*b60@GN=7%WhI^eZ9LfvNq~{$mPw9K^xu?73 zmRqu4cjY?iTJX|KFLh5m@kG{hTq{pyRYvv2x|JsXqu$rkS>L#K@7`|r?%g?lH>c*) z&kD}!32)&%uYCB^F1~yUAK*yfW9|OiZ@=9=`|PtIMd|uix7~JIcg;1|WR>Tvd+|9z ztXFAAuDzJ*XwU8cw9oU-I>$y1-Usg`f=(}Qh zfV%mQ2yKJwo6>y5CvZaAN5>%C{;Gx;pD82IcdNAhb8qc9?Cpgk!YI=suY9~A{N%}# zHmX9Jp4XK$by~U{R&lA9XENo;Q-hU!=ytl~l1mKHs)sY>%X2+>Tq}=je~((0|0&m5 zoq@(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?z5qb&FoBF4X~eokDgkBhWYJ8Fa+= zVCyEIKhd)q2E2OE*mvr}g!XW{Sb0axC*QNZJ@-0$U2mU@<@HP~@7L@9r%8vY^+XyS n%Czs0;`2&pS$Xq$?5FlK`T4e|#6=yp00000NkvXXu0mjfJk^TA literal 0 HcmV?d00001 diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/SelectionTextIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..7bfe0482aa500a84193aea9b9affb4e652ddd269 GIT binary patch literal 6904 zcmV$^0M>r^LI~Aed^Y?e|7tJI_y6BNcb)&x_y0(6GY<|+T-U*X#CFE8tcH7oE&}X@SJLZ_oTv12&pkIh_0&@} zt_Qm=x)!|t`s>4sFTPmy9M{TIS(Qrx=>q}@e5~Jp|NZxemtTGvq$u6~>X~Pr86JN4;i~eSbuT|B$n`26 z$n_Uf9sRlgpZ|Bp3)Sx4 zU>{zD@TZ@CdU)lPS2!2W{3Z8D+#hh8GTnS4^TJ% zk)dyJeN$PF_ySHy$LN@Z+b?T~`4?p*`tFtXe;%!!hrPdWMi^y!3M^tsngSTc*RyP&s55hrv|fp=yo}H@Sr1F^>C)VJvWlaweq-*_h@DLAG@yV3^a}* zoVtBP2J$sJS4K+4S;A97<96p=2g4U3zVG=ReIL}j)k}CeeOUBn{}{lo8!|PtuUxq@ z95`^m|A6%A)2BWE*s){nUC5_=zL(4O&u~q8Yinybd-iNYPJTYut#_bNtqku_^`2@t zHCS#Ot{EZgNEAT2W+quy8erxASaw2Ve1eR8m=>)cf9!PBUTmb72lDBC>djnBy6|U? z9z8mI{`u!4NaAewJWUz$NZWHQpZob9*GG;V84X$O8PeqId3|%v=LUJCIqQEpTbVH$ zYM@a#E?l_4yLsn{QR3gmH}b7?yfpd;Azo+Dm3w_iOFNLgb_C?!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p!}9Z&^Q?{m-#X~@J8fY?e*|4@yd$Se?AhL5N1dbY_s`|>dM1~T y`|bbBvct4`GL24U`gbV#d7am3dFxkLH~mA9FB!R3)TBfJ0000 + + + + + + + diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSignButton.png similarity index 100% rename from ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_no.png rename to ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/clearSignButton.png diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/iEBox_ok.png deleted file mode 100644 index c5c299397cd4696456cb883f73b45ce6f79d9617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8242 zcmeHsdpy(q-~XiOFkD@1Ob!<%Vay>}gj|w2v`aHF=Y%CCD|A4)^1Y|5GAa~FS92I4 zLzc5k)11qxRurp5EplkBobLB$)AfBke*gXM$K$^LxF7c)d3~O*LkvP&x7)-te`X}||cwsOMruoEaj~(%}|L5UR%KO0^h5M6?QQQH)A7#HNU9gW_ z+nqa50#mzS?{=e2f0?*e{^0MCYt0yyS{2W--qp*>HrdFAd&GN8k+v8`8nNGKq>x|V zDV==V^5G7DnHz3nbMAX%o+!gB_6$z`6N0B@$Vs8Ach`uXeQK9~U&Z$<)wR0(Ejgh6 zs^FIhLnD($!RVBsk$IWmt`E(nTQ~NFAt&TRn)Ub~zjv0aaUz^DaVA*dQ5Ab`7b|JV z+xM&n&mM$XrwFvFkr_FTLOKZR*&NF);pBZtwSM>ihDB-C`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? z*GrqBKQoA2uCticPzUdq%A5bq6h1C7pt-YqH5{UwPRcZ3yo@fpsX@O3bAQZ}*tw6#<&l6GzV z2V3biyA6R$_p*`(EYB;O*idk4yT2z4o567!m~FhImSBp;7v*r){h$2*>cb`XxNl{D zoL>@w-}26=rr8>bzh0y$*eTXsPcX}*#*0(p>mmMvY$Wa4&S!ii zWn(*M`LlDq!}Z(iU-l(jago0E0Lwg!)Rpgxr+AZ7FN}ggTGJGhcqhYb-{=fd&vK>PhbT25PIaZbHQ{t6VarLzG@W62quXa+1p&rz{rE@50YhUaJXBy_NP4is{leUn7}`8}w#0 ziQSktNn%igCEO>)-$pU_D#MXXElIV4={FDim?VZXOI!}0QJ>j63ZR5pJJ;WBq7qFg zSb^Wah`v7;gxtV)X-BUW*ZB**taai>w|3PAF$`L}^jxJd4#_l?VR9??+IGRfMjwXP2BeaJ3hf;fgAu$M&&d;F|EH%4Wb0?IREKwiEH#vsESZpPu6-rWcqi>T zbsJJo+^h?P4!9^DP5l_!CX&eE|&k;MBBMK*Q~#gLBbs&bnM< z+I1r2up2l$0uC~vscBci(Tq3Ju2&vM>Ly$wF&GWNVDwm9=U4}Sb>u-%qXDp307dIT ziUe>w7-fJ(q#5mcDfB54iq!Knq$$FNy%^g;17R^>i;jX6SkUczfYr!$q~4Wu@y888 z{ISDA6N(^w(2Efj0|KZaslCrYKql3}ITi#2dL#9sr=UM(d|j3Bh{UJ_4TO0Dr(xhU zatf(epT$`RJAu@TzXoK)q0}@WRKdl}1oFoNoZoN2U(lj$eh?(bQXP(50Q@86Y5fTx zK39g;4};`Z8nGGZjb&)WKOwo5*1rzu1LcuSX%<$hDH~0&0%J%Be}IeT@>j#22d5r^ zT4zQ!I6E*LEL zuQVE1A()EYB?mAe*yZu-V%a%Dm&n5zV(H82o0OOU X^8b2uY99PQKg`Jizo+!~zzhEgBUy0p diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/leftnav.png deleted file mode 100644 index 47d047ddfa08e92084b5ef2d5993ecc247c08930..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM#=yWhy?{3l$YCrFa(7}_cTVOdki(Mh=>$h?_mX=7D>g$CCcB~4dUHj zaLB4kZ<$jPmJ_0J)_K*cnn|k3=gf`>I-az&-^-lT6TVB-)$H=xA`zCkTzf*bUR)FD zIN?&h@aBwnOifGwwR)fb<;&e-QvY(+-`1`=#~T-BPCeVHxm4P@c0#}re!br}k`1ps zTW$TPLt@2_8#ksLv{x_O$!pDa>?l?_mX=7D>g$B}?+2*dLIQ zU8tNgCFerXrAR}QfLTH-SAFvII5sD~aE?%N%@ei{_u@0fS_H&qx%M!nFJqeR#d>uW zli9hM diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/rightnav.png deleted file mode 100644 index af4507989cadb1d9373f3b4f28dc633279cdce3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!N$PASg|QB0LWo14sv&5Sa(k5C6L3C?&#~t zz_78O`%fY(kk47*5n0T@z%2~Ij105pNB{-*c)B=-Sopu4dYkvK0*|Yt;^LB)JSV$~ zHB$wxyv(y|C$7|yV+zka>fYD#Ncj4#Rs_V?EZ) zW?nOYicrRL`8ThWk32q~B4{Z4^Y)e>$Y?;!)8R%0e*10dpByunfL z=T4&__k@-_hPo5|Y_}%3EDYlRyTrpU$KET((Q>bi8& zR#-mVD}VKmi_G<-JPNJ)k?JzWH-9+`CEF-7tWJs&&dK}h!j}HtVHNY!OUG9^G})J!1177QgFkT0>{0z@@VoJ=(js#)53b&` zcc*zg-zJ`=6z*}ic1>A#>&oOwq`njxg HN@xNAhv{(o diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/resources/images/sign.png new file mode 100644 index 0000000000000000000000000000000000000000..8bd6a6118b9018d646029ebcb57dafc7085eb1a2 GIT binary patch literal 1022 zcmVR z^BGB+cz%bpR)_^?m5O#KWczBw(f08ig_Wsy+ zjD4f0w#po^u6TmTSaNy@o5FNModI=-PmRB@`;wyRU)w06PVr=ae?JyJr=M=CF`#bo zWd=O6>F~Aq`q;>;*5>IM1z&G)vHUoSVPiis1SMg+R1AG=w z)-u3%@#Mt@Y=e06A_KNXJgIEJHi;*d4A?gDq_hFsD4vuuU|YqL!fS%O%Zf|Md@RLv zfBwR}khaB>LIZFh()INxdW;N4h^dGM@g#Q&B=^{VnPMs(v=;FsHv;bN?%vvc$>V1> zr6WO;c#>-X#7^u!9ON+*pD?`81a0Dpa|$@ZKOT)nulVNr`uY?GNjD!wF&f1aX9VD& zLc0%wpEEv}zOs>^RXlOt8^i%mgzg{d22DUD7$Fj#Oc-McooE$L@^V0!85{(eHNPMd z=9Bo56bLf|gCH`+a7^sj zrcOM`Btd3x=@C=u-a3}b9*QNNC^6AZjr(C{mEuXp0R93)826n06VX!^NvIR}i;W({ zn;g`NCz1h~Z=L64m0#ijoQ^KV^te0~||JM-wX%AXR@Ai4Y~6E>Zf4 zY|X3~;HducV8&lyzwg~{_uN${XlBI#%F= zmX$?Rf@3b&WSePbyPCo&PRl4^TI6zU9_84~edoUayZ`!z z+|SpGg+x!oG&M%v7x){yk${eenJ@sd17@R9laMt&#+SteV3Q*N;vE1CBPsDa05T{5 ze24^qb`*e_sV8be>Bz*_^$pp>_HU*QQ>A(m<5b^-X1{l;31pFb~1ZF`_;~W$K zyZ8V-&RL5@!#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ZHUbGL08O<}XumG#1UhIF3XjVf1u$ zu}i9|s`3^c3p^yhRBvH!p4ZXY*>kVbEk;>+
-
-
+
@@ -52,26 +53,22 @@
-
-

Clear Signature Confirmation

-
-
- Are you sure you want to clear signature? +
+

Clear all?

+
+
+ Are you sure you want to start over?
-
- - +
+ +
From e635548dc25a77aa3631bb910ce6f70fa8c9e784 Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Thu, 19 Dec 2024 16:05:48 +0530 Subject: [PATCH 06/17] scribble component clean up --- .../clientlibs/site/js/scribbleview.js | 69 +++++++------------ .../form/scribble/v1/scribble/scribble.html | 12 ++-- 2 files changed, 31 insertions(+), 50 deletions(-) diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 9097f86659..45e54d1799 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -17,8 +17,6 @@ (function() { "use strict"; - - const PNGGeneratorUtil = (() => { // Helper function to initialize CRC table const initCrcTable = () => { @@ -113,8 +111,6 @@ }; })(); - - /** * class definition for GeoLocationQueryRequest * encapsulated success and error handlers @@ -133,7 +129,6 @@ scribbleContainer: `.${Scribble.bemBlock}__container`, scribbleContainerPanel: `.${Scribble.bemBlock}__panel`, keyboardSignBox: `.${Scribble.bemBlock}__keyboard-sign-box`, - scribbleContainerCaption: `.${Scribble.bemBlock}__caption`, scribbleControlPanel: `.${Scribble.bemBlock}__controlpanel`, geoCanvasRight: `.${Scribble.bemBlock}__geocanvasright`, canvasSignedContainer: `.${Scribble.bemBlock}__canvas-signed-container`, @@ -242,10 +237,6 @@ return document.querySelector(Scribble.selectors.scribbleContainerPanel); } - getScribbleContainerCaption() { - return document.querySelector(Scribble.selectors.scribbleContainerCaption); - } - getKeyboardSignBox() { return document.querySelector(Scribble.selectors.keyboardSignBox); } @@ -479,6 +470,7 @@ e.stopPropagation(); this.context.lineWidth=brush; this.toggleBrushList(); + // this.handleBrush(e); }) this.getBrushList().append(divel); }); @@ -582,29 +574,8 @@ }); } - dialogCallback(button_val, arg1) { - switch(button_val){ - // case "ok": - // this.handleOk(); - // break; - // case "Cancel": - // this.handleCancel(); - // break; - // case "geolocation": - // this.calculateGeolocation(); - // break; - case "brushes": - this.handleBrush(arg1); - break; - case "Text": - this.handleText(); - break; - } - } - toggleBrushList(event) { var brushList = this.getBrushList(); - var brushButton = this.getBrush(); if(getComputedStyle(brushList).display === 'none') { brushList.style.display = 'block'; } else { @@ -612,8 +583,29 @@ } } - imageClick(event) { - this.dialogCallback(event.srcElement.title); + controlPanelClickHandler(event) { + const ariaLabel = event.target.getAttribute('aria-label'); + switch(ariaLabel){ + case 'save': + this.submitSign(); + break; + case 'close': + this.closeEditModal(); + break; + case 'clearSign': + this.eraseSignature(); + break; + case 'textSign': + this.enableSignatureTextBox(); + break; + case 'geolocation': + this.handleGeoLocation(); + break; + case 'brushes': + this.handleBrush(event); + this.toggleBrushList(); + break; + } } closeEditModal() { @@ -632,25 +624,14 @@ this.initializeCanvas(); } initScribbleModal() { - const eraserIcon = this.getClearControl(); - const textSignIcon = this.getTextSignControl(); const controlPanel = this.getScribbleControlPanel(); const toggleBrushListIcon = this.getBrush(); const brushList = this.getBrushList(); - const closeEditModal = this.getScribbleCloseButton(); const keyboardSignBox = this.getKeyboardSignBox(); - const saveButton = this.getSaveControl(); - const geoLocationIcon = this.getGeoLocationIcon(); this.renderBrushList(); - this.addEventListeners(controlPanel, 'click', this.imageClick.bind(this)); - this.addEventListeners(saveButton, 'click', this.submitSign.bind(this)); - this.addEventListeners(geoLocationIcon, 'click', this.handleGeoLocation.bind(this), true); - this.addEventListeners(eraserIcon, 'click', this.eraseSignature.bind(this), true); - this.addEventListeners(textSignIcon, 'click', this.enableSignatureTextBox.bind(this), true); - this.addEventListeners(toggleBrushListIcon, 'click', this.toggleBrushList.bind(this)); - this.addEventListeners(closeEditModal, 'mousedown', this.closeEditModal.bind(this)); + this.addEventListeners(controlPanel, 'click', this.controlPanelClickHandler.bind(this)); keyboardSignBox.addEventListener('input', (event) => { if (event?.target?.value) { diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html index b0d4727265..3666669b72 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -64,16 +64,16 @@
- +
- - - + + +
- - + +
From f8538c1297e4eaf770bd611496433aa2600a3970 Mon Sep 17 00:00:00 2001 From: Pavitra Khatri Date: Wed, 7 May 2025 11:49:54 +0530 Subject: [PATCH 07/17] Refactored code --- .../clientlibs/site/css/scribbleview.css | 366 ------------------ .../clientlibs/site/js/scribbleview.js | 20 +- .../form/scribble/v1/scribble/scribble.html | 2 +- 3 files changed, 13 insertions(+), 375 deletions(-) diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css index 17dc119d93..92f4ae37ca 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/css/scribbleview.css @@ -38,369 +38,3 @@ textarea.cmp-adaptiveform-scribble__widget{ } -.cmp-adaptiveform-scribble__header { - font-size: 19px; - font-weight: 100; - line-height: 24.7px; - margin-bottom: 10px; -} - -.cmp-adaptiveform-scribble__canvas-signed-container { - position: relative; - border: 1px solid #AAAAAA; - height: 280px; - padding: 10px; - min-width: 50px; - width: 100%; - border-radius: 0.5rem; -} - -.cmp-adaptiveform-scribble__canvas__main { - width: 100%; -} - -.cmp-adaptiveform-scribble__canvas { - /* Styles for the canvas element where the signature is drawn */ - /* border: 1px solid #616060; - background-color: #f9f9f9; - color: black */ - width: 100%; - height: 200px; - border:1px #AAAAAA dashed; - border-bottom: 0; - -ms-touch-action:pinch-zoom; - touch-action:pinch-zoom; -} - -.cmp-adaptiveform-scribble__signcanvases{ - width: 100%; - background-color: #FFF; -} - - .cmp-adaptiveform-scribble__container { - font-family: Arial, sans-serif; - font-size: 12px; - min-width: 50px; /* Dialog will be no smaller than this */ - width: 36%; - /* Dialog will wrap after this width */ - background: #FFF; - border: solid 2px #999; - color: #000; - padding: 10px; - display: none; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; - border-radius: 10px; - background-color: #F8F8F8; - - /* display:none; */; - /* the shadow */ - -moz-box-shadow: 10px 10px 5px #888888; - -webkit-box-shadow: 10px 10px 5px #888888; - box-shadow: 0px 0px 15px #888888; - - /* make dialog a non-selectatable thing */ - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - z-index: 99998; - margin: 0; - line-height:0; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} - -.cmp-adaptiveform-scribble__controls { - display: flex; - align-items: center; - justify-content: center; - flex-direction: row; - flex-wrap: wrap; -} - -.cmp-adaptiveform-scribble__control-message { - font-size: 14px; - font-weight: normal; - text-align: center; - line-height: 1.75em; - min-width: 50px; - color: #555555; - cursor: default; - padding: 10px; - margin: 0em; - display: none; -} - -.cmp-adaptiveform-scribble__content { - background: 16px 16px no-repeat ; - margin: 0em; - min-width: 50px; - width: 100%; -} - -.cmp-adaptiveform-scribble__panel { - text-align: center; - margin: 0em 0em 0em 0em; - background-color:black; - -moz-border-top-right-radius: 8px; - -webkit-border-top-right-radius: 8px; - border-top-right-radius: 8px; - -moz-border-top-left-radius: 8px; - -webkit-border-top-left-radius: 8px; - border-top-left-radius: 8px; - overflow:hidden; - background: #AFB0B5; - -ms-touch-action:pinch-zoom; - touch-action:pinch-zoom; -} - -.cmp-adaptiveform-scribble__button { - background:no-repeat; - border-radius: 5px; - width:32px; - height:32px; - border: 1px solid #D5D5D5; - background-size:32px 32px; - margin-right:5px; - background-color: white; - background-position: center; -} -.cmp-adaptiveform-scribble__control-geo{ - background-image:url('../resources/images/iEBox_geo.png'); -} -.cmp-adaptiveform-scribble__control-text{ - background-image:url('../resources/icontext.svg'); -} -.cmp-adaptiveform-scribble__keyboard-sign-box{ - border: 1px dashed#AAAAAA; - display:none;; - margin:0px; - border-radius: 0px 0px 0px 0px; - outline:none; - width: 100%; - height: 200px; -} - -#keyboard_Sign_Box::placeholder { - font: 1rem sans-serif, Georgia; - vertical-align: middle; -} - -.cmp-adaptiveform-scribble__control-brush{ - background-image:url('../resources/images/signIcon.png'); -} - -.cmp-adaptiveform-scribble__control-submit { - width: 77px; - height: 40px; - margin: 5px; - padding: 9px 20px 11px 20px; - border: 1px transparent; - border-radius: 20px; - background-color: #0265DC; - color: white; -} - -.cmp-adaptiveform-scribble__control-clear { - background-image:url('../resources/iconeraser.svg'); -} - -.cmp-adaptiveform-scribble__button-close { - width: 77px; - height: 40px; - font-weight: 700; - padding: 9px 20px 11px 20px; - margin: 5px; - border: 2px solid #4b4b4b; - color: #4b4b4b; - border-radius: 20px; -} - -.cmp-adaptiveform-scribble__controlpanel { - margin-top: 40px; - align-items: center; - display: flex; - justify-content: space-between; -} - -/* @media (max-width: 780px) { */ - - /* .cmp-adaptiveform-scribble__controlpanel { - flex-direction: column; - } */ - /* .cmp-adaptiveform-scribble__controlpanel__controls { - margin-top: 10px; - flex-direction: row; - } - - } */ - - @media (max-width: 460px) { - - .cmp-adaptiveform-scribble__controlpanel__controls { - margin-top: 10px; - display: flex; - flex-direction: column; - justify-content: center; - } - - } - - @media (min-width: 460px) and (max-width: 1155px) { - .cmp-adaptiveform-scribble__controlpanel__controls { - margin-top: 10px; - } - - .cmp-adaptiveform-scribble__controlpanel { - margin-top: 40px; - align-items: center; - justify-content: center; - display: flex; - flex-direction: row; - flex-wrap: wrap; - } - } - -/* #iEBox_moveframe{ -padding:0px; -margin:0px; - border:0px dotted rgba(0,0,0,0.5); - -moz-border-radius: 10px; - -webkit-border-radius: 10px; - border-radius: 10px; - - -moz-box-shadow: 10px 10px 5px #888888; - -webkit-box-shadow: 10px 10px 5px #888888; - box-shadow: 0px 0px 15px #888888; - position:absolute; -} */ -.disable_button { - filter: grayscale(100%); /* Apply grayscale effect */ - -webkit-filter: grayscale(100%); /* For Safari and older versions of Chrome */ - -moz-filter: grayscale(100%); /* For older versions of Firefox */ - -ms-filter: grayscale(100%); /* For older versions of Internet Explorer */ - -o-filter: grayscale(100%); /* For older versions of Opera */ - cursor: not-allowed; /* Change cursor to indicate disabled state */ - opacity: 0.6; /* Optional: Adjust opacity to give a faded look */ - pointer-events: none; /* Disable all mouse events */ - } -.cmp-adaptiveform-scribble__clear-sign { - position: absolute; - width:20px; - height:20px; - background:no-repeat; - background-size:20px 20px; - background-image:url('../resources/images/clearSignButton.png'); - right: 5px; - top: 5px; -} -.cmp-adaptiveform-scribble__brushlist{ - position:absolute; - z-index:99999; - background-color:white; - box-shadow: 0px 0px 15px #888888; - display: none; - left: 45px; -} -.cmp-adaptiveform-scribble__brushlist :hover{ - background-color:gray; -} -.cmp-adaptiveform-scribble__caption { - border:4px dashed #AAAAAA; - border-bottom:0px; - border-left:0px; - border-right:0px; - margin-right:4px; - margin-left:1px; - margin-top:0px; - text-align:center; - padding:0px; -} -.cmp-adaptiveform-scribble__caption > legend { - width:auto; - background-color: #FFFFFF; - padding: 2px; -} - -.cmp-adaptiveform-scribble__canvases { - white-space:nowrap; -} - -.cmp-adaptiveform-scribble__clearsign-container { - font-size: 14px; - padding: 25px; - width: 280px; - height: 148px; - background: #FFF; - border: solid 1px #E6E6E6; - color: #000; - border-radius: 5px; - position: absolute; - top: 50%; - left: 50%; - display: none; - transform: translate(-50%, -50%); -} - -.cmp-adaptiveform-scribble__clearsign-title { - font-size: 14px; - font-weight: bold; - line-height: 1.75em; - color: #000; - cursor: default; - padding-bottom: 10px; - margin: 0em; -} - -.cmp-adaptiveform-scribble__clearsign-content { - background: 16px 16px no-repeat ; - padding: 1em 1.75em; - margin: 0em; -} - -.cmp-adaptiveform-scribble__clearsign-message { - font-size: 14px; -} - -.cmp-adaptiveform-scribble__clearsign-panel { - text-align: right; - margin: 1em 0em 0em 1em; -} - -.cmp-adaptiveform-scribble__clearsign-yes{ - width: 54px; - height: 24px; - margin: 5px; - font-size: 12px; - font-weight: 700; - border: 1px transparent; - border-radius: 20px; - background-color: #0265DC; - color: white; -} - - -.cmp-adaptiveform-scribble__clearsign-no{ - width: 54px; - height: 24px; - font-weight: 700; - font-size: 12px; - margin: 5px; - background-color: #FFF; - border: 2px solid #D5D5D5; - color: #4b4b4b; - border-radius: 20px; - } - -/* .cmp-adaptiveform-scribble__clearsign-yes:focus,.cmp-adaptiveform-scribble__clearsign-no:focus{ - outline:highlight; - } - - .cmp-adaptiveform-scribble__clearsign-yes:hover,.cmp-adaptiveform-scribble__clearsign-no:hover{ - outline:none; - border: 2px outset buttonface; - } */ \ No newline at end of file diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 45e54d1799..1d7087b3d1 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2024 Adobe + * Copyright 2025 Adobe * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -328,6 +328,7 @@ } this._signSubmitted = false; + this.setModelValue(null); }; clearSignButton.addEventListener('click', handleClearSign); @@ -346,7 +347,7 @@ // html sets undefined value as undefined string in input value, hence this check is added let widgetValue = typeof value === "undefined" ? null : value; const signedImage = this.getSignedCanvasImage(); - if (signedImage) { + if (signedImage && widgetValue) { signedImage.src = widgetValue; super.updateEmptyStatus(); } @@ -431,7 +432,7 @@ const img = this.getSignedCanvasImage(); img.src = newData; img.style.width = '100%'; - img.style.height = '250px'; + img.style.height = '150px'; } addClearSignButton() { @@ -484,7 +485,6 @@ // Ensure the canvas has valid dimensions if (signCanvas.width === 0 || signCanvas.height === 0) { - console.error('Canvas has invalid dimensions.'); return; } @@ -667,7 +667,7 @@ const fontStyle = "italic"; keyboardSignBox.style.font = `${fontStyle} 2rem ${fontFamily}`; const value = keyboardSignBox.value; - this.context.font = `${fontStyle} 2rem ${fontFamily}`; + this.context.font = `${fontStyle} 10rem ${fontFamily}`; this.context.fillText(value, 0, this.getCanvas().height / 2); } @@ -691,10 +691,15 @@ resizeAndFixCanvas() { const dpr = window.devicePixelRatio || 1; - const imgData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height); + let imgData = null; + if (this.canvas.width > 0 && this.canvas.height > 0) { + imgData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height); + } this.canvas.width = this.canvas.offsetWidth * dpr; this.canvas.height = this.canvas.offsetHeight * dpr; - this.context.putImageData(imgData, 0, 0); + if (imgData) { + this.context.putImageData(imgData, 0, 0); + } } handleCanvasEvent(event) { @@ -766,7 +771,6 @@ startDrawing(event) { // Ensure the context is initialized if (!this.context) { - console.error('Canvas context is not initialized.'); return; } diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html index 3666669b72..3f11ae1e0f 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -38,7 +38,7 @@ data-sly-test.widgetId="${'{0}-{1}' @ format=[scribble.id, 'widget']}">
-
+
From 2b509c822a0e764e0c84b4efbba3dc0e34da22e6 Mon Sep 17 00:00:00 2001 From: Rajat Khurana Date: Fri, 9 May 2025 13:43:02 +0530 Subject: [PATCH 08/17] Image format fixed for DOR support --- .../clientlibs/site/js/scribbleview.js | 112 ++---------------- .../form/scribble/v1/scribble/scribble.html | 2 +- 2 files changed, 8 insertions(+), 106 deletions(-) diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js index 1d7087b3d1..1fb81045c3 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/clientlibs/site/js/scribbleview.js @@ -17,100 +17,6 @@ (function() { "use strict"; - const PNGGeneratorUtil = (() => { - // Helper function to initialize CRC table - const initCrcTable = () => { - const table = new Uint32Array(256); - for (let n = 0; n < 256; n++) { - let c = n; - for (let k = 0; k < 8; k++) { - c = (c & 1) ? (0xedb88320 ^ (c >>> 1)) : (c >>> 1); - } - table[n] = c; - } - return table; - }; - - // Helper function to convert 32-bit integer to string - const u32IntToStr = (n) => String.fromCharCode( - (n >>> 24) & 0xFF, - (n >>> 16) & 0xFF, - (n >>> 8) & 0xFF, - n & 0xFF - ); - - // Helper function to calculate CRC - const updateCrc = (crc, data) => { - let c = crc; - for (let i = 0; i < data.length; i++) { - c = crcTable[(c ^ data.charCodeAt(i)) & 0xff] ^ (c >>> 8); - } - return c; - }; - - // Helper function to calculate CRC - const CRC = (data) => updateCrc(0xffffffff, data) ^ 0xffffffff; - - // Helper function to prepare text chunk - const prepareTextChunk = (content) => { - const len = content.length; - const lenStr = u32IntToStr(len); - const chunkType = "tEXt"; - const checkSumStr = u32IntToStr(CRC(chunkType + content)); - return lenStr + chunkType + content + checkSumStr; - }; - - // Initialize CRC table - const crcTable = initCrcTable(); - - const _LC_Scribble_MetaDataKey = "LC_SCIBBLE_METADATA"; - - // Main API - return { - // Function to check if data is a PNG - _isPng: (b64data) => { - return b64data && b64data.replace(/\s+/g, "").startsWith("iVBORw0KGgo"); - }, - - // Function to make PNG read-only - _makeReadOnly: (b64data) => { - const bindata = atob(b64data.replace(/\s+/g, '')); // remove white spaces - const pngctx = { p: 8, d: bindata }; // Skip PNG header - const metadataChunk = prepareTextChunk(_LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"); - const newdata = pngctx.d.substring(0, pngctx.p) + metadataChunk + pngctx.d.substring(pngctx.p); - return btoa(newdata); - }, - - // Function to decode base64 - _atob: (input) => window.atob ? atob(input) : Base64.decode(input), - - // Function to encode to base64 - _btoa: (input) => window.btoa ? btoa(input) : Base64.encode(input), - - // Function to check if PNG is read-only - _isReadOnly: (b64data) => { - if (this._isPng(b64data)) { - const testStr = _LC_Scribble_MetaDataKey + String.fromCharCode(0) + "true"; - const bindata = this._atob(b64data.replace(/\s+/g, '')); - const pngctx = { p: 8, d: bindata }; // Skip PNG header - while (pngctx.p < pngctx.d.length) { - const size = (pngctx.d.charCodeAt(pngctx.p) << 24) | - (pngctx.d.charCodeAt(pngctx.p + 1) << 16) | - (pngctx.d.charCodeAt(pngctx.p + 2) << 8) | - pngctx.d.charCodeAt(pngctx.p + 3); - const type = pngctx.d.slice(pngctx.p + 4, pngctx.p + 8); - pngctx.p += 8; // Move past size and type - if (type === "tEXt" && pngctx.d.indexOf(testStr, pngctx.p) === pngctx.p) { - return true; - } - pngctx.p += size + 4; // Move past data and CRC - } - } - return false; - } - }; - })(); - /** * class definition for GeoLocationQueryRequest * encapsulated success and error handlers @@ -348,7 +254,7 @@ let widgetValue = typeof value === "undefined" ? null : value; const signedImage = this.getSignedCanvasImage(); if (signedImage && widgetValue) { - signedImage.src = widgetValue; + signedImage.src = `data:image/png;base64,${widgetValue}`; super.updateEmptyStatus(); } } @@ -383,17 +289,13 @@ sigCnv.height = mainCanvas.height; sigCnv.parentNode.replaceChild(mainCanvas, sigCnv); - const newData = mainCanvas.toDataURL("image/png"); + let submitData = mainCanvas.toDataURL("image/png"); this.existingSign = mainCanvas; - let val; - if ((val = this.extractData(newData))) { - // const pngGeneratorUtil = PNGGeneratorUtil(); - val = PNGGeneratorUtil._makeReadOnly(val); - this._is_readonly = true; - } + + submitData = submitData.replace(/^data:image\/png;base64,/, ''); - this.updateSignedImage(newData); - this.setModelValue(newData); + this.updateSignedImage(submitData); + this.setModelValue(submitData); this.addClearSignButton(); if (this._geoLocQuery) { @@ -430,7 +332,7 @@ updateSignedImage(newData) { const img = this.getSignedCanvasImage(); - img.src = newData; + img.src = `data:image/png;base64,${newData}`; img.style.width = '100%'; img.style.height = '150px'; } diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html index 3f11ae1e0f..7ba95be628 100644 --- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html +++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/scribble/v1/scribble/scribble.html @@ -53,7 +53,7 @@