Skip to content

Commit 4c1ad0f

Browse files
authored
N°8772 - Form dependencies manager implementation
- Form SDK implementation - Basic Forms - Dynamics Forms - Basic Blocks + Data Model Block - Form Compilation - Turbo integration
1 parent 3955b4e commit 4c1ad0f

File tree

813 files changed

+115275
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

813 files changed

+115275
-521
lines changed

.phpstorm.meta.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* @copyright Copyright (C) 2010-2025 Combodo SAS
5+
* @license http://opensource.org/licenses/AGPL-3.0
6+
*/
7+
8+
namespace PHPSTORM_META
9+
{
10+
override(\MetaModel::NewObject(0), map([
11+
'' => '@',
12+
]));
13+
override(\MetaModel::GetObject(0), map([
14+
'' => '@',
15+
]));
16+
}

application/datamodel.application.xml

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,5 +849,221 @@ Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial att
849849
</methods>
850850
</class>
851851
</classes>
852+
<property_trees _delta="define" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://www.combodo.com/itop-schema/3.3">
853+
<property_tree id="DashletGroupBy" xsi:type="Combodo-PropertyTree">
854+
<extends>Dashlet</extends>
855+
<nodes>
856+
<node id="title">
857+
<label>UI:DashletGroupBy:Prop-Title</label>
858+
<value-type xsi:type="Combodo-ValueType-Label"/><!-- LabelFormBlock -->
859+
</node>
860+
<node id="query">
861+
<label>UI:DashletGroupBy:Prop-Query</label>
862+
<value-type xsi:type="Combodo-ValueType-OQL">
863+
<data-transform>
864+
<xml-node-empty-not-allowed/> <!-- mandatory quoi ! -->
865+
</data-transform>
866+
</value-type>
867+
</node>
868+
<node id="group_by">
869+
<label>UI:DashletGroupBy:Prop-GroupBy</label>
870+
<value-type xsi:type="Combodo-ValueType-ClassAttributeGroupBy"> <!-- par défaut, il proposera le state attribute de la classe -->
871+
<class>{{query.selected_class}}</class>
872+
<data-transform>
873+
<xml-node-empty-not-allowed/>
874+
</data-transform>
875+
</value-type>
876+
</node>
877+
<node id="style"> <!-- possible de le cacher, etc.... celui-ci nous met dedans -->
878+
<label>UI:DashletGroupBy:Prop-Style</label>
879+
<value-type xsi:type="Combodo-ValueType-Choice">
880+
<data-transform>
881+
<xml-node-empty-defaults-to>bars</xml-node-empty-defaults-to>
882+
</data-transform>
883+
<values>
884+
<value id="bars">
885+
<label>UI:DashletGroupByBars:Label</label>
886+
</value>
887+
<value id="pie">
888+
<label>UI:DashletGroupByPie:Label</label>
889+
</value>
890+
<value id="table">
891+
<label>UI:DashletGroupByTable:Label</label>
892+
</value>
893+
</values>
894+
</value-type>
895+
</node>
896+
<node id="aggregation_function">
897+
<label>UI:DashletGroupBy:Prop-Function</label>
898+
<value-type xsi:type="Combodo-ValueType-AggregateFunction"> <!-- par défaut : count -->
899+
<data-transform>
900+
<xml-node-empty-not-allowed/> <!-- mandatory quoi ! -->
901+
</data-transform>
902+
<class>{{query.selected_class}}</class> <!-- pour savoir si il y a des attributs additionnables -->
903+
</value-type>
904+
</node>
905+
<node id="aggregation_attribute">
906+
<label>UI:DashletGroupBy:Prop-FunctionAttribute</label>
907+
<relevance-condition>{{aggregation_function.value != 'count'}}</relevance-condition>
908+
<value-type xsi:type="Combodo-ValueType-ClassAttribute">
909+
<data-transform>
910+
<xml-node-empty-not-allowed/> <!-- mandatory quoi ! -->
911+
</data-transform>
912+
<class>{{query.selected_class}}</class>
913+
<category>numeric</category>
914+
</value-type>
915+
</node>
916+
<node id="order_by">
917+
<label>UI:DashletGroupBy:Prop-OrderField</label>
918+
<value-type xsi:type="Combodo-ValueType-ChoiceFromInput">
919+
<values>
920+
<value id="attribute">
921+
<label>{{aggregation_attribute.label}}</label>
922+
</value>
923+
<value id="function">
924+
<label>{{aggregation_function.label}}</label>
925+
</value>
926+
</values>
927+
</value-type>
928+
</node>
929+
<node id="limit">
930+
<label>UI:DashletGroupBy:Prop-Limit</label>
931+
<relevance-condition>{{order_by.value = 'function'}}</relevance-condition>
932+
<value-type xsi:type="Combodo-ValueType-Integer"/>
933+
</node>
934+
<node id="order_direction">
935+
<label>UI:DashletGroupBy:Prop-OrderDirection</label>
936+
<value-type xsi:type="Combodo-ValueType-Choice">
937+
<data-transform>
938+
<xml-node-empty-not-allowed/>
939+
</data-transform>
940+
<values>
941+
<value id="asc">
942+
<label>UI:DashletGroupBy:Order:asc</label>
943+
</value>
944+
<value id="desc">
945+
<label>UI:DashletGroupBy:Order:desc</label>
946+
</value>
947+
</values>
948+
</value-type>
949+
<display-default>desc</display-default>
950+
</node>
951+
</nodes>
952+
</property_tree>
953+
<property_tree id="DashletBadge" xsi:type="Combodo-PropertyTree">
954+
<extends>Dashlet</extends>
955+
<nodes>
956+
<node id="class">
957+
<label>UI:DashletBadge:Prop-Class</label>
958+
<value-type xsi:type="Combodo-ValueType-Class">
959+
<categories-csv>bizmodel</categories-csv>
960+
</value-type>
961+
</node>
962+
</nodes>
963+
</property_tree>
964+
<property_tree id="DashletHeaderDynamic" xsi:type="Combodo-PropertyTree">
965+
<extends>Dashlet</extends>
966+
<nodes>
967+
<node id="title">
968+
<label>UI:DashletHeaderDynamic:Prop-Title</label>
969+
<value-type xsi:type="Combodo-ValueType-Label">
970+
<not-blank/>
971+
</value-type>
972+
</node>
973+
<node id="icon">
974+
<label>UI:DashletHeaderDynamic:Prop-Icon</label>
975+
<value-type xsi:type="Combodo-ValueType-Icon">
976+
</value-type>
977+
</node>
978+
<node id="subtitle">
979+
<label>UI:DashletHeaderDynamic:Prop-Subtitle</label>
980+
<value-type xsi:type="Combodo-ValueType-Label"/>
981+
</node>
982+
<node id="query">
983+
<label>UI:DashletHeaderDynamic:Prop-Query</label>
984+
<value-type xsi:type="Combodo-ValueType-OQL">
985+
<data-transform>
986+
<xml-node-empty-not-allowed/>
987+
</data-transform>
988+
</value-type>
989+
</node>
990+
<node id="group_by">
991+
<label>UI:DashletHeaderDynamic:Prop-GroupBy</label>
992+
<value-type xsi:type="Combodo-ValueType-ClassAttribute">
993+
<data-transform>
994+
<xml-node-empty-not-allowed/>
995+
</data-transform>
996+
<class>{{query.selected_class}}</class>
997+
<category>enum</category>
998+
</value-type>
999+
</node>
1000+
<node id="values">
1001+
<label>UI:DashletHeaderDynamic:Prop-Values</label>
1002+
<value-type xsi:type="Combodo-ValueType-CollectionOfValues">
1003+
<data-transform>
1004+
<xml-format xsi:type="xml-format-csv"/>
1005+
</data-transform>
1006+
<value-type xsi:type="Combodo-ValueType-ClassAttributeValue">
1007+
<class>{{query.selected_class}}</class>
1008+
<attribute>{{group_by.value}}</attribute>
1009+
</value-type>
1010+
</value-type>
1011+
</node>
1012+
</nodes>
1013+
</property_tree>
1014+
<property_tree id="DashletHeaderStatic" xsi:type="Combodo-PropertyTree">
1015+
<extends>Dashlet</extends>
1016+
<nodes>
1017+
<node id="title">
1018+
<label>UI:DashletHeaderStatic:Prop-Title</label>
1019+
<value-type xsi:type="Combodo-ValueType-Label"/>
1020+
</node>
1021+
<node id="icon">
1022+
<label>UI:DashletHeaderStatic:Prop-Icon</label>
1023+
<value-type xsi:type="Combodo-ValueType-Icon"/>
1024+
</node>
1025+
</nodes>
1026+
</property_tree>
1027+
<property_tree id="DashletObjectList" xsi:type="Combodo-PropertyTree">
1028+
<extends>Dashlet</extends>
1029+
<nodes>
1030+
<node id="title">
1031+
<label>UI:DashletObjectList:Prop-Title</label>
1032+
<value-type xsi:type="Combodo-ValueType-Label">
1033+
</value-type>
1034+
</node>
1035+
<node id="query">
1036+
<label>UI:DashletObjectList:Prop-Query</label>
1037+
<value-type xsi:type="Combodo-ValueType-OQL"/>
1038+
</node>
1039+
<node id="menu">
1040+
<label>UI:DashletObjectList:Prop-Menu</label>
1041+
<value-type xsi:type="Combodo-ValueType-Boolean">
1042+
<on>
1043+
<!-- not so cute, but matches exactly 3.2 implementation of boolean fields -->
1044+
<label>UI:UserManagement:ActionAllowed:Yes</label>
1045+
<value>true</value>
1046+
</on>
1047+
<off>
1048+
<label>UI:UserManagement:ActionAllowed:No</label>
1049+
<value>false</value>
1050+
</off>
1051+
</value-type>
1052+
</node>
1053+
</nodes>
1054+
</property_tree>
1055+
<property_tree id="DashletPlainText" xsi:type="Combodo-PropertyTree">
1056+
<extends>Dashlet</extends>
1057+
<nodes>
1058+
<node id="text">
1059+
<label>UI:DashletPlainText:Prop-Text</label>
1060+
<constraints>
1061+
<not_blank/>
1062+
</constraints>
1063+
<value-type xsi:type="Combodo-ValueType-Text"/>
1064+
</node>
1065+
</nodes>
1066+
</property_tree>
1067+
</property_trees>
8521068
</meta>
8531069
</itop_design>

application/utils.inc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,12 @@ public static function DoPostRequest($sUrl, $aData, $sOptionnalHeaders = null, &
19001900
return $response;
19011901
}
19021902

1903+
public static function QuoteForPHP(string $sValue): string
1904+
{
1905+
$sEscaped = str_replace(['\\', "'"], ['\\\\', "\\'"], $sValue);
1906+
return "'$sEscaped'";
1907+
}
1908+
19031909
/**
19041910
* Get a standard list of character sets
19051911
*

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"symfony/mailer": "^6.4",
3232
"symfony/security-csrf": "^6.4",
3333
"symfony/twig-bundle": "~6.4.0",
34+
"symfony/validator" : "^6.4",
3435
"symfony/yaml": "~6.4.0",
3536
"tecnickcom/tcpdf": "^6.6.0",
3637
"thenetworg/oauth2-azure": "^2.0"

composer.lock

Lines changed: 102 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/designdocument.class.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/**
4242
* Class \Combodo\iTop\DesignDocument
4343
*
44-
* A design document is the DOM tree that modelize behaviors. One of its
44+
* A design document is the DOM tree that models behaviors. One of its
4545
* characteristics is that it can be altered by the mean of the same kind of document.
4646
*
4747
*/

0 commit comments

Comments
 (0)