Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
76d56d4
added basic config files for the table component
Feb 23, 2026
1d5f5cb
added .content.xml for the table component
Feb 23, 2026
9315681
added edit toolbar for the table component _cq_editConfig.xml
Feb 23, 2026
2a5723e
added table.html
Feb 23, 2026
1b4bfb8
added site clientlibs for the table component
Feb 25, 2026
4b398e0
added basic css and js for the table authoring currently refering the…
Feb 23, 2026
0148204
added basic config files for the tableheader
Feb 25, 2026
ba3063f
added basic config files for the tablerow
Feb 25, 2026
ae06102
added site clientlibs for tableheader
Feb 25, 2026
2b2dff8
added clientlibs folder in the tablerow
Feb 25, 2026
c413719
added the table component in examples folder along with cq_template
Feb 25, 2026
b8ec4bd
added runtime dependencies in the runtime all for the table component
Mar 5, 2026
b35d101
replaced the tr elements from the div elements to fix the selecting i…
Mar 5, 2026
adf8f06
added action configs in the edit toolbar for the table component
Mar 30, 2026
aca5d93
added action configs for the table row and the tableroweditorhook.js …
Mar 30, 2026
8bd6756
removed the add row option from the tableHeaderRow
Mar 31, 2026
a3b60d0
updated the header cells from the textinput to text type in the templ…
Mar 31, 2026
ec7a8d9
added the addCol and deleteCol actions and also there handlers
Mar 31, 2026
e25e3f9
removed cell numbers from dynamic addition of the table cols and rows
Apr 1, 2026
409d474
added the feature of repeatable panels to the table row at runtime
Apr 4, 2026
edce421
added the replace feature for the tablecell to any component which is…
Apr 6, 2026
fe8c783
removed the delete options from the table cells in the table row
Apr 6, 2026
a566d04
in this commit table tags have gone -> repeatable panels not working …
Apr 6, 2026
60fea30
added files to fix the repeatative panels with the table tags
Apr 7, 2026
635b522
fixed the repeatable rows with indexing
May 5, 2026
02fea0c
changed the authoring from divs to tabletags sacirificing the touch u…
Apr 22, 2026
44c0686
fixed the touch ui with the table tags
Apr 22, 2026
7b1b0bd
fixed the tablecell css having controls
Apr 20, 2026
cd324ab
removed the tableeditor.css file
Apr 22, 2026
33a9e0c
added replace feature to the components of the table Header also
May 5, 2026
f871869
fixed the refresh issue by adding authoring dialogs for table row and…
May 8, 2026
3e6c7b7
added cypress tests and collaterals for testing
May 11, 2026
e16098e
added sling folder for collaterals
May 11, 2026
64c5921
fixed the test cases
May 11, 2026
39e5194
fixed the content.xml
May 12, 2026
358e811
fixed the failing testcases
May 13, 2026
1de1eec
updated the year to 2026
May 19, 2026
099a0ec
fixed the short and long description for the table component
May 19, 2026
ae74f82
removed unsupported authoring from the table component
May 19, 2026
7292787
refactored the table.html
May 20, 2026
4224ff8
updated README for the table Component
May 20, 2026
ab85642
Resolved Conflicts
Apr 13, 2026
db233e8
added sorting feature for the table component
Apr 14, 2026
6dcec2f
enabled sorting button during authoring too
Apr 30, 2026
ef40c92
added feature to disable/enable sorting on a particular column of the…
May 5, 2026
fe125df
added authoring options for sorting and column width
May 25, 2026
75df314
added dor support for table component
May 16, 2026
a207098
added dor testing
May 16, 2026
d5373dc
added the feature of merge and split cell during runtime by adding co…
Apr 21, 2026
d8a7ef9
updated README for table, tableheader, tablerow
May 28, 2026
569d399
added the feature for merge row cells and commented out the header ce…
May 28, 2026
3dbac3c
added testing for second phase features
May 31, 2026
c4ca4ec
fixed review comments 1
Jun 4, 2026
798a659
fixed review comments 2
Jun 4, 2026
490826a
fixed cypress tests
Jun 10, 2026
82a1718
fixed coverage
Jun 11, 2026
8db65c3
fixed the sorting behaviour to improve the archaic behavior
Jun 15, 2026
e76b217
fixed cypress testing mergesplit feature
Jun 15, 2026
4b44957
fixed cypress testing
Jun 15, 2026
2379b94
removed css and moved it to canvas theme
Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,13 @@ private FormConstants() {
/** The resource type for date time input field v1 */
public static final String RT_FD_FORM_DATETIME_V1 = RT_FD_FORM_PREFIX + "datetime/v1/datetime";

/** The resource type for table v1 */
public static final String RT_FD_FORM_TABLE_V1 = RT_FD_FORM_PREFIX + "table/v1/table";

/** The resource type for table header v1 */
public static final String RT_FD_FORM_TABLE_HEADER_V1 = RT_FD_FORM_PREFIX + "tableheader/v1/tableheader";

/** The resource type for table row v1 */
public static final String RT_FD_FORM_TABLE_ROW_V1 = RT_FD_FORM_PREFIX + "tablerow/v1/tablerow";

}
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,22 @@ private ReservedProperties() {

public static final String FD_DRAFT_ID = "fd:draftId";

public static final String PN_CQ_ANNOTATIONS = "cq:annotations";

/**
* Comma-separated proportional column widths JCR property, also passed into fd:dor for DOR table rendering (matches
* GuideTableElement key).
*/
public static final String PN_DOR_COLUMN_WIDTHS = "columnWidth";

/** When true, adaptive form table columns can be sorted at runtime (publish). */
public static final String PN_ENABLE_SORTING = "enableSorting";

/** fd:viewType values for table sub-components — used as :type in exported JSON and matched in AF2→AF1 DOR transformer. */
public static final String VT_TABLE = "table";
public static final String VT_TABLE_ROW = "table-row";
public static final String VT_TABLE_HEADER = "table-header";

// Begin: Form submission related properties
public static final String FD_SUBMIT_PROPERTIES = "fd:submit";
public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 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.Exporter;
import org.apache.sling.models.annotations.Model;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_HEADER_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableHeaderImpl extends PanelImpl {

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE_HEADER;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 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 java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Nullable;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy;
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableImpl extends PanelImpl {

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_DOR_COLUMN_WIDTHS)
@Nullable
protected String columnWidth;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_ENABLE_SORTING)
@Nullable
protected Boolean enableSorting;

/**
* When {@code true}, runtime (publish) enables client-side column sorting.
* Omitted from JSON when {@code false} (see {@link JsonInclude.Include#NON_DEFAULT}).
*/
@JsonProperty("enableSorting")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public boolean isEnableSorting() {
return Boolean.TRUE.equals(enableSorting);
}

/**
* Returns the raw comma-separated column width string from JCR (e.g. "1,1,4").
* Used in edit mode as the {@code data-column-widths} attribute.
*/
@JsonIgnore
public String getColumnWidth() {
return columnWidth;
}

/**
* True when {@link #getColumnWidthColStyles()} would return a non-empty list (valid authored widths).
*/
@JsonIgnore
public boolean isColumnWidthsConfigured() {
return !getColumnWidthColStyles().isEmpty();
}

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE;
}

@Override
@JsonIgnore
@NotNull
public Map<String, Object> getDorProperties() {
Map<String, Object> props = new LinkedHashMap<>(super.getDorProperties());
if (columnWidth != null && !columnWidth.isEmpty()) {
// Pass authored proportional widths into fd:dor so DoRTableElement can compute
// proportional XFA column widths (e.g. "1,2,1" → relative pixel widths).
props.put(ReservedProperties.PN_DOR_COLUMN_WIDTHS, columnWidth);
}
return props;
}

/**
* One entry per column for {@code <col style="...">}: {@code width: N%} (no HTL string concatenation).
* For example, proportional {@code "1,1,4"} becomes {@code width: 16%}, {@code width: 16%}, {@code width: 66%}.
* Negative or non-numeric values are treated as 1. The last column absorbs any rounding remainder so widths sum to 100%.
*/
@JsonIgnore
public List<String> getColumnWidthColStyles() {
if (columnWidth == null || columnWidth.isEmpty()) {
return Collections.emptyList();
}
String[] parts = columnWidth.split(",");
int[] values = new int[parts.length];
int sum = 0;
for (int i = 0; i < parts.length; i++) {
try {
values[i] = Integer.parseInt(parts[i].trim());
} catch (NumberFormatException e) {
values[i] = 1;
}
if (values[i] < 0) {
values[i] = 0;
}
sum += values[i];
}
if (sum == 0) {
return Collections.emptyList();
}
List<String> result = new ArrayList<>();
int allocated = 0;
for (int i = 0; i < values.length; i++) {
int pct = (i == values.length - 1)
? (100 - allocated)
: (int) Math.floor((values[i] * 100.0) / sum);
allocated += pct;
result.add("width: " + pct + "%");
}
return result;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 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.Exporter;
import org.apache.sling.models.annotations.Model;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_ROW_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableRowImpl extends PanelImpl {

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE_ROW;
}
}
Loading
Loading