67 $mainContainer =
new Div();
68 $mainContainer->setKey(
'main_container');
71 $mainContainer->addInlineStyle(
'background-color', $this->
getConfiguration(
'color')->getValue() .
'5f');
75 $reportHandlersCount = count($this->
getWidgetHandler()->getReportHandlers());
76 $mainContainer->addInlineStyle(
'background-color', $this->
getView()->getReportDefaultColor($reportHandlersCount) .
'5f');
78 $mainContainer->addClass(
'report-configuration-main');
79 $mainContainer->addAssets(array(
80 'css' => array(
'/bitrix/js/report/css/visualconstructor/configmain.css')
83 $fieldListContainer =
new Div();
84 $fieldListContainer->setKey(
'field_list_container');
85 $fieldListContainer->addClass(
'report-configuration-field-list');
88 $reportHandlerSelectContainer =
new Div();
89 $reportHandlerSelectContainer->setKey(
'report_handler_select_container');
90 $reportHandlerSelectContainer->addClass(
'report-configuration-row');
91 $reportHandlerSelectContainer->addClass(
'report-configuration-no-padding-bottom');
92 $categorySelectField = $this->getReportHandlerCategoryField();
93 $reportHandlerSelectField = $this->getReportHandlerSelectField($categorySelectField->getValue());
95 $reportHandlerSelectField->addJsEventListener($categorySelectField, $categorySelectField::JS_EVENT_ON_CHANGE, array(
96 'class' =>
'BX.Report.VisualConstructor.FieldEventHandlers.ReportHandlerSelect',
97 'action' =>
'categorySelected'
99 $reportHandlerSelectField->addAssets(array(
100 'js' => array(
'/bitrix/js/report/js/visualconstructor/fields/reporthandlerselect.js')
109 $viewCompatibleDataType = $this->
getView()->getCompatibleDataType();
111 if (in_array($viewCompatibleDataType, array(
112 Common::MULTIPLE_REPORT_TYPE,
113 Common::MULTIPLE_GROUPED_REPORT_TYPE,
114 Common::MULTIPLE_BI_GROUPED_REPORT_TYPE,
120 $previewBlock = $widgetHandler->getFormElement(
'view_type');
121 $previewBlock->addJsEventListener($groupingField, $groupingField::JS_EVENT_ON_CHANGE, array(
122 'class' =>
'BX.Report.VisualConstructor.FieldEventHandlers.PreviewBlock',
123 'action' =>
'reloadWidgetPreview'
129 $selectListContainer =
new Div();
130 $selectListContainer->setKey(
'report_configuration_select_list');
131 $selectListContainer->addClass(
'report-configuration-row');
132 $selectListContainer->addClass(
'report-configuration-row-list');
160 $groupingField->setLabel(
Loc::getMessage(
'BASE_REPORT_HANDLER_GROUPING'));
162 $whatWillCalculateField->
addJsEventListener($groupingField, $groupingField::JS_EVENT_ON_CHANGE, array(
163 'class' =>
'BX.Report.VisualConstructor.FieldEventHandlers.WhatWillCalculate',
164 'action' =>
'reloadCompatibleCalculatedTypes',
166 $whatWillCalculateField->
addAssets(array(
167 'js' => array(
'/bitrix/js/report/js/visualconstructor/fields/whatwillcalculate.js')
170 return $groupingField;
186 $pseudoReportId =
'_pseudo' . randString(4);
188 foreach ($this->formElementsList as $key => $element)
190 $viewModesWhereFieldAvailable = $element->getCompatibleViewTypes();
191 if ($viewModesWhereFieldAvailable !=
null)
193 $viewKey = $this->
getView()->getKey();
195 $viewProvider->addFilter(
'primary', $viewKey);
196 $viewProvider->addFilter(
'dataType', $viewModesWhereFieldAvailable);
197 $views = $viewProvider->execute()->getResults();
200 $result[$key] = $element;
205 $result[$key] = $element;
455 $dataTypeMap = Common::$reportImplementationTypesMap;
456 $class = get_class($this);
457 $implementedInterfaceList = class_implements($class);
458 $implementedInterfaceList = array_values($implementedInterfaceList);
460 foreach ($dataTypeMap as $reportTypeKey => $settings)
462 if (in_array($settings[
'interface'], $implementedInterfaceList))
464 $result[] = $reportTypeKey;