From 097faf6ce56631d3292768a4a33e4ef0f80d9e1e Mon Sep 17 00:00:00 2001 From: Alex Lavrov <36633600+alexslavr@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:32:13 +0400 Subject: [PATCH] Generate nested options for merged configuration components (#28410) --- package.json | 2 +- .../src/ui/diagram/nested/group-dxi.ts | 14 ++- .../src/ui/form/nested/item-dxi.ts | 104 +++++++++++++++++- packages/devextreme-react/src/bar-gauge.ts | 9 ++ packages/devextreme-react/src/chart.ts | 39 +++++++ packages/devextreme-react/src/data-grid.ts | 5 + packages/devextreme-react/src/diagram.ts | 3 + packages/devextreme-react/src/form.ts | 17 +++ packages/devextreme-react/src/funnel.ts | 9 ++ packages/devextreme-react/src/gantt.ts | 5 + packages/devextreme-react/src/pie-chart.ts | 9 ++ packages/devextreme-react/src/polar-chart.ts | 31 ++++++ .../devextreme-react/src/range-selector.ts | 27 +++++ packages/devextreme-react/src/tree-list.ts | 5 + packages/devextreme-react/src/tree-map.ts | 3 + packages/devextreme-react/src/vector-map.ts | 9 ++ packages/devextreme-vue/src/bar-gauge.ts | 9 ++ packages/devextreme-vue/src/chart.ts | 39 +++++++ packages/devextreme-vue/src/data-grid.ts | 5 + packages/devextreme-vue/src/diagram.ts | 3 + packages/devextreme-vue/src/form.ts | 17 +++ packages/devextreme-vue/src/funnel.ts | 9 ++ packages/devextreme-vue/src/gantt.ts | 5 + packages/devextreme-vue/src/pie-chart.ts | 9 ++ packages/devextreme-vue/src/polar-chart.ts | 31 ++++++ packages/devextreme-vue/src/range-selector.ts | 27 +++++ packages/devextreme-vue/src/tree-list.ts | 5 + packages/devextreme-vue/src/tree-map.ts | 3 + packages/devextreme-vue/src/vector-map.ts | 9 ++ pnpm-lock.yaml | 10 +- 30 files changed, 464 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a64c77c54a2e..19c449e9c6a3 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "axe-core": "4.10.2", "cheerio": "1.0.0-rc.10", "codelyzer": "6.0.2", - "devextreme-internal-tools": "16.0.0-beta.13.1", + "devextreme-internal-tools": "16.0.0-beta.15", "http-server": "14.1.1", "husky": "8.0.3", "jest": "29.7.0", diff --git a/packages/devextreme-angular/src/ui/diagram/nested/group-dxi.ts b/packages/devextreme-angular/src/ui/diagram/nested/group-dxi.ts index be962b9821d2..ab09bfb06dd2 100644 --- a/packages/devextreme-angular/src/ui/diagram/nested/group-dxi.ts +++ b/packages/devextreme-angular/src/ui/diagram/nested/group-dxi.ts @@ -6,7 +6,10 @@ import { NgModule, Host, SkipSelf, - Input + Input, + ContentChildren, + forwardRef, + QueryList } from '@angular/core'; @@ -18,6 +21,7 @@ import { NestedOptionHost, } from 'devextreme-angular/core'; import { CollectionNestedOption } from 'devextreme-angular/core'; +import { DxiDiagramCommandComponent } from './command-dxi'; @Component({ @@ -81,6 +85,14 @@ export class DxiDiagramGroupComponent extends CollectionNestedOption { } + @ContentChildren(forwardRef(() => DxiDiagramCommandComponent)) + get commandsChildren(): QueryList { + return this._getOption('commands'); + } + set commandsChildren(value) { + this.setChildren('commands', value); + } + constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost) { super(); diff --git a/packages/devextreme-angular/src/ui/form/nested/item-dxi.ts b/packages/devextreme-angular/src/ui/form/nested/item-dxi.ts index 89b0e2e8740f..220561624844 100644 --- a/packages/devextreme-angular/src/ui/form/nested/item-dxi.ts +++ b/packages/devextreme-angular/src/ui/form/nested/item-dxi.ts @@ -10,7 +10,10 @@ import { Inject, AfterViewInit, SkipSelf, - Input + Input, + ContentChildren, + forwardRef, + QueryList } from '@angular/core'; import { DOCUMENT } from '@angular/common'; @@ -30,6 +33,17 @@ import { DxTemplateHost } from 'devextreme-angular/core'; import { CollectionNestedOption } from 'devextreme-angular/core'; +import { DxiFormAsyncRuleComponent } from './async-rule-dxi'; +import { DxiFormCompareRuleComponent } from './compare-rule-dxi'; +import { DxiFormCustomRuleComponent } from './custom-rule-dxi'; +import { DxiFormEmailRuleComponent } from './email-rule-dxi'; +import { DxiFormNumericRuleComponent } from './numeric-rule-dxi'; +import { DxiFormPatternRuleComponent } from './pattern-rule-dxi'; +import { DxiFormRangeRuleComponent } from './range-rule-dxi'; +import { DxiFormRequiredRuleComponent } from './required-rule-dxi'; +import { DxiFormStringLengthRuleComponent } from './string-length-rule-dxi'; +import { DxiFormTabComponent } from './tab-dxi'; +import { DxiFormValidationRuleComponent } from './validation-rule-dxi'; @Component({ @@ -302,6 +316,94 @@ export class DxiFormItemComponent extends CollectionNestedOption implements Afte } + @ContentChildren(forwardRef(() => DxiFormAsyncRuleComponent)) + get asyncRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set asyncRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormCompareRuleComponent)) + get compareRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set compareRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormCustomRuleComponent)) + get customRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set customRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormEmailRuleComponent)) + get emailRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set emailRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormNumericRuleComponent)) + get numericRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set numericRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormPatternRuleComponent)) + get patternRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set patternRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormRangeRuleComponent)) + get rangeRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set rangeRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormRequiredRuleComponent)) + get requiredRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set requiredRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormStringLengthRuleComponent)) + get stringLengthRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set stringLengthRulesChildren(value) { + this.setChildren('validationRules', value); + } + + @ContentChildren(forwardRef(() => DxiFormTabComponent)) + get tabsChildren(): QueryList { + return this._getOption('tabs'); + } + set tabsChildren(value) { + this.setChildren('tabs', value); + } + + @ContentChildren(forwardRef(() => DxiFormValidationRuleComponent)) + get validationRulesChildren(): QueryList { + return this._getOption('validationRules'); + } + set validationRulesChildren(value) { + this.setChildren('validationRules', value); + } + constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost, private renderer: Renderer2, diff --git a/packages/devextreme-react/src/bar-gauge.ts b/packages/devextreme-react/src/bar-gauge.ts index 7d9ca13d08fa..3b873c46f29c 100644 --- a/packages/devextreme-react/src/bar-gauge.ts +++ b/packages/devextreme-react/src/bar-gauge.ts @@ -641,6 +641,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -679,6 +682,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + barGaugeTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + font: { optionName: "font", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/chart.ts b/packages/devextreme-react/src/chart.ts index 7d47e475af68..c4b6d8b69dbb 100644 --- a/packages/devextreme-react/src/chart.ts +++ b/packages/devextreme-react/src/chart.ts @@ -1691,6 +1691,9 @@ const _componentConstantLineStyle = (props: IConstantLineStyleProps) => { ...props, elementDescriptor: { OptionName: "constantLineStyle", + ExpectedChildren: { + commonAxisSettingsConstantLineStyleLabel: { optionName: "label", isCollectionItem: false } + }, }, }); }; @@ -2037,6 +2040,13 @@ const _componentHoverStyle = (props: IHoverStyleProps) => { ...props, elementDescriptor: { OptionName: "hoverStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -2067,6 +2077,11 @@ const _componentImage = (props: IImageProps) => { ...props, elementDescriptor: { OptionName: "image", + ExpectedChildren: { + height: { optionName: "height", isCollectionItem: false }, + url: { optionName: "url", isCollectionItem: false }, + width: { optionName: "width", isCollectionItem: false } + }, }, }); }; @@ -2135,6 +2150,14 @@ const _componentLabel = (props: ILabelProps) => { ...props, elementDescriptor: { OptionName: "label", + ExpectedChildren: { + argumentFormat: { optionName: "argumentFormat", isCollectionItem: false }, + border: { optionName: "border", isCollectionItem: false }, + connector: { optionName: "connector", isCollectionItem: false }, + font: { optionName: "font", isCollectionItem: false }, + format: { optionName: "format", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, TemplateProps: [{ tmplOption: "template", render: "render", @@ -2785,6 +2808,13 @@ const _componentSelectionStyle = (props: ISelectionStyleProps) => { ...props, elementDescriptor: { OptionName: "selectionStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -3176,6 +3206,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -3268,6 +3301,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + chartTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + font: { optionName: "font", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/data-grid.ts b/packages/devextreme-react/src/data-grid.ts index ca890b7836e7..a8537858c8cc 100644 --- a/packages/devextreme-react/src/data-grid.ts +++ b/packages/devextreme-react/src/data-grid.ts @@ -1838,6 +1838,11 @@ const _componentHeaderFilter = (props: IHeaderFilterProps) => { ...props, elementDescriptor: { OptionName: "headerFilter", + ExpectedChildren: { + columnHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + dataGridHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + dataGridHeaderFilterTexts: { optionName: "texts", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/diagram.ts b/packages/devextreme-react/src/diagram.ts index 605a72124c85..e4047b6cf0ab 100644 --- a/packages/devextreme-react/src/diagram.ts +++ b/packages/devextreme-react/src/diagram.ts @@ -474,6 +474,9 @@ const _componentGroup = (props: IGroupProps) => { elementDescriptor: { OptionName: "groups", IsCollectionItem: true, + ExpectedChildren: { + command: { optionName: "commands", isCollectionItem: true } + }, }, }); }; diff --git a/packages/devextreme-react/src/form.ts b/packages/devextreme-react/src/form.ts index 4c4a1ca61006..df4b103107cf 100644 --- a/packages/devextreme-react/src/form.ts +++ b/packages/devextreme-react/src/form.ts @@ -453,6 +453,23 @@ const _componentItem = (props: IItemProps) => { elementDescriptor: { OptionName: "items", IsCollectionItem: true, + ExpectedChildren: { + AsyncRule: { optionName: "validationRules", isCollectionItem: true }, + buttonOptions: { optionName: "buttonOptions", isCollectionItem: false }, + colCountByScreen: { optionName: "colCountByScreen", isCollectionItem: false }, + CompareRule: { optionName: "validationRules", isCollectionItem: true }, + CustomRule: { optionName: "validationRules", isCollectionItem: true }, + EmailRule: { optionName: "validationRules", isCollectionItem: true }, + label: { optionName: "label", isCollectionItem: false }, + NumericRule: { optionName: "validationRules", isCollectionItem: true }, + PatternRule: { optionName: "validationRules", isCollectionItem: true }, + RangeRule: { optionName: "validationRules", isCollectionItem: true }, + RequiredRule: { optionName: "validationRules", isCollectionItem: true }, + StringLengthRule: { optionName: "validationRules", isCollectionItem: true }, + tab: { optionName: "tabs", isCollectionItem: true }, + tabPanelOptions: { optionName: "tabPanelOptions", isCollectionItem: false }, + validationRule: { optionName: "validationRules", isCollectionItem: true } + }, TemplateProps: [{ tmplOption: "tabTemplate", render: "tabRender", diff --git a/packages/devextreme-react/src/funnel.ts b/packages/devextreme-react/src/funnel.ts index 7fbb2fabfbf7..6b056272ffa7 100644 --- a/packages/devextreme-react/src/funnel.ts +++ b/packages/devextreme-react/src/funnel.ts @@ -813,6 +813,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -851,6 +854,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false }, + funnelTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/gantt.ts b/packages/devextreme-react/src/gantt.ts index 2f7895c45d0e..8f8fa8c1ee4b 100644 --- a/packages/devextreme-react/src/gantt.ts +++ b/packages/devextreme-react/src/gantt.ts @@ -526,6 +526,11 @@ const _componentHeaderFilter = (props: IHeaderFilterProps) => { ...props, elementDescriptor: { OptionName: "headerFilter", + ExpectedChildren: { + columnHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + ganttHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + texts: { optionName: "texts", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/pie-chart.ts b/packages/devextreme-react/src/pie-chart.ts index 8755a8fda5f7..87f9e7aadc78 100644 --- a/packages/devextreme-react/src/pie-chart.ts +++ b/packages/devextreme-react/src/pie-chart.ts @@ -1262,6 +1262,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -1300,6 +1303,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false }, + pieChartTitleSubtitle: { optionName: "subtitle", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/polar-chart.ts b/packages/devextreme-react/src/polar-chart.ts index d0ac24b8684d..478f49b1624f 100644 --- a/packages/devextreme-react/src/polar-chart.ts +++ b/packages/devextreme-react/src/polar-chart.ts @@ -1366,6 +1366,13 @@ const _componentHoverStyle = (props: IHoverStyleProps) => { ...props, elementDescriptor: { OptionName: "hoverStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -1438,6 +1445,14 @@ const _componentLabel = (props: ILabelProps) => { ...props, elementDescriptor: { OptionName: "label", + ExpectedChildren: { + argumentFormat: { optionName: "argumentFormat", isCollectionItem: false }, + border: { optionName: "border", isCollectionItem: false }, + connector: { optionName: "connector", isCollectionItem: false }, + font: { optionName: "font", isCollectionItem: false }, + format: { optionName: "format", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -2006,6 +2021,13 @@ const _componentSelectionStyle = (props: ISelectionStyleProps) => { ...props, elementDescriptor: { OptionName: "selectionStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -2353,6 +2375,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -2443,6 +2468,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false }, + polarChartTitleSubtitle: { optionName: "subtitle", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/range-selector.ts b/packages/devextreme-react/src/range-selector.ts index 2a5385fec611..04fdcdac92eb 100644 --- a/packages/devextreme-react/src/range-selector.ts +++ b/packages/devextreme-react/src/range-selector.ts @@ -909,6 +909,13 @@ const _componentHoverStyle = (props: IHoverStyleProps) => { ...props, elementDescriptor: { OptionName: "hoverStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -940,6 +947,11 @@ const _componentImage = (props: IImageProps) => { ...props, elementDescriptor: { OptionName: "image", + ExpectedChildren: { + height: { optionName: "height", isCollectionItem: false }, + url: { optionName: "url", isCollectionItem: false }, + width: { optionName: "width", isCollectionItem: false } + }, }, }); }; @@ -1004,6 +1016,14 @@ const _componentLabel = (props: ILabelProps) => { ...props, elementDescriptor: { OptionName: "label", + ExpectedChildren: { + argumentFormat: { optionName: "argumentFormat", isCollectionItem: false }, + border: { optionName: "border", isCollectionItem: false }, + connector: { optionName: "connector", isCollectionItem: false }, + font: { optionName: "font", isCollectionItem: false }, + format: { optionName: "format", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; @@ -1643,6 +1663,13 @@ const _componentSelectionStyle = (props: ISelectionStyleProps) => { ...props, elementDescriptor: { OptionName: "selectionStyle", + ExpectedChildren: { + border: { optionName: "border", isCollectionItem: false }, + color: { optionName: "color", isCollectionItem: false }, + hatching: { optionName: "hatching", isCollectionItem: false }, + pointBorder: { optionName: "border", isCollectionItem: false }, + seriesBorder: { optionName: "border", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/tree-list.ts b/packages/devextreme-react/src/tree-list.ts index 4b5626c2a242..70e4a925d34b 100644 --- a/packages/devextreme-react/src/tree-list.ts +++ b/packages/devextreme-react/src/tree-list.ts @@ -1537,6 +1537,11 @@ const _componentHeaderFilter = (props: IHeaderFilterProps) => { ...props, elementDescriptor: { OptionName: "headerFilter", + ExpectedChildren: { + columnHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + treeListHeaderFilterSearch: { optionName: "search", isCollectionItem: false }, + treeListHeaderFilterTexts: { optionName: "texts", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/tree-map.ts b/packages/devextreme-react/src/tree-map.ts index be9c8e750fc2..b5fee547ac6b 100644 --- a/packages/devextreme-react/src/tree-map.ts +++ b/packages/devextreme-react/src/tree-map.ts @@ -325,6 +325,9 @@ const _componentLabel = (props: ILabelProps) => { ...props, elementDescriptor: { OptionName: "label", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-react/src/vector-map.ts b/packages/devextreme-react/src/vector-map.ts index 6909ebe93a60..154e0617f822 100644 --- a/packages/devextreme-react/src/vector-map.ts +++ b/packages/devextreme-react/src/vector-map.ts @@ -801,6 +801,9 @@ const _componentSubtitle = (props: ISubtitleProps) => { ...props, elementDescriptor: { OptionName: "subtitle", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false } + }, }, }); }; @@ -839,6 +842,12 @@ const _componentTitle = (props: ITitleProps) => { ...props, elementDescriptor: { OptionName: "title", + ExpectedChildren: { + font: { optionName: "font", isCollectionItem: false }, + legendTitleSubtitle: { optionName: "subtitle", isCollectionItem: false }, + margin: { optionName: "margin", isCollectionItem: false }, + vectorMapTitleSubtitle: { optionName: "subtitle", isCollectionItem: false } + }, }, }); }; diff --git a/packages/devextreme-vue/src/bar-gauge.ts b/packages/devextreme-vue/src/bar-gauge.ts index 19070186ed22..e7223b67a20e 100644 --- a/packages/devextreme-vue/src/bar-gauge.ts +++ b/packages/devextreme-vue/src/bar-gauge.ts @@ -705,6 +705,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTitleConfig = { emits: { @@ -738,6 +741,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + barGaugeTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + font: { isCollectionItem: false, optionName: "font" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" } +}; const DxTooltipConfig = { emits: { diff --git a/packages/devextreme-vue/src/chart.ts b/packages/devextreme-vue/src/chart.ts index 1b4b4cce3253..d05ae442f3ec 100644 --- a/packages/devextreme-vue/src/chart.ts +++ b/packages/devextreme-vue/src/chart.ts @@ -1642,6 +1642,9 @@ prepareConfigurationComponentConfig(DxConstantLineStyleConfig); const DxConstantLineStyle = defineComponent(DxConstantLineStyleConfig); (DxConstantLineStyle as any).$_optionName = "constantLineStyle"; +(DxConstantLineStyle as any).$_expectedChildren = { + commonAxisSettingsConstantLineStyleLabel: { isCollectionItem: false, optionName: "label" } +}; const DxCrosshairConfig = { emits: { @@ -1950,6 +1953,13 @@ prepareConfigurationComponentConfig(DxHoverStyleConfig); const DxHoverStyle = defineComponent(DxHoverStyleConfig); (DxHoverStyle as any).$_optionName = "hoverStyle"; +(DxHoverStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxImageConfig = { emits: { @@ -1971,6 +1981,11 @@ prepareConfigurationComponentConfig(DxImageConfig); const DxImage = defineComponent(DxImageConfig); (DxImage as any).$_optionName = "image"; +(DxImage as any).$_expectedChildren = { + height: { isCollectionItem: false, optionName: "height" }, + url: { isCollectionItem: false, optionName: "url" }, + width: { isCollectionItem: false, optionName: "width" } +}; const DxLabelConfig = { emits: { @@ -2038,6 +2053,14 @@ prepareConfigurationComponentConfig(DxLabelConfig); const DxLabel = defineComponent(DxLabelConfig); (DxLabel as any).$_optionName = "label"; +(DxLabel as any).$_expectedChildren = { + argumentFormat: { isCollectionItem: false, optionName: "argumentFormat" }, + border: { isCollectionItem: false, optionName: "border" }, + connector: { isCollectionItem: false, optionName: "connector" }, + font: { isCollectionItem: false, optionName: "font" }, + format: { isCollectionItem: false, optionName: "format" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxLegendConfig = { emits: { @@ -2645,6 +2668,13 @@ prepareConfigurationComponentConfig(DxSelectionStyleConfig); const DxSelectionStyle = defineComponent(DxSelectionStyleConfig); (DxSelectionStyle as any).$_optionName = "selectionStyle"; +(DxSelectionStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxSeriesConfig = { emits: { @@ -2949,6 +2979,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTickConfig = { emits: { @@ -3044,6 +3077,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + chartTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + font: { isCollectionItem: false, optionName: "font" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" } +}; const DxTooltipConfig = { emits: { diff --git a/packages/devextreme-vue/src/data-grid.ts b/packages/devextreme-vue/src/data-grid.ts index 1d89e5c81749..5940ed25f179 100644 --- a/packages/devextreme-vue/src/data-grid.ts +++ b/packages/devextreme-vue/src/data-grid.ts @@ -2142,6 +2142,11 @@ prepareConfigurationComponentConfig(DxHeaderFilterConfig); const DxHeaderFilter = defineComponent(DxHeaderFilterConfig); (DxHeaderFilter as any).$_optionName = "headerFilter"; +(DxHeaderFilter as any).$_expectedChildren = { + columnHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + dataGridHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + dataGridHeaderFilterTexts: { isCollectionItem: false, optionName: "texts" } +}; const DxHideConfig = { emits: { diff --git a/packages/devextreme-vue/src/diagram.ts b/packages/devextreme-vue/src/diagram.ts index 16e10ddd193a..a9cdfba82bb2 100644 --- a/packages/devextreme-vue/src/diagram.ts +++ b/packages/devextreme-vue/src/diagram.ts @@ -600,6 +600,9 @@ const DxGroup = defineComponent(DxGroupConfig); (DxGroup as any).$_optionName = "groups"; (DxGroup as any).$_isCollectionItem = true; +(DxGroup as any).$_expectedChildren = { + command: { isCollectionItem: true, optionName: "commands" } +}; const DxHistoryToolbarConfig = { emits: { diff --git a/packages/devextreme-vue/src/form.ts b/packages/devextreme-vue/src/form.ts index b5160cddc327..de7bd15d3c55 100644 --- a/packages/devextreme-vue/src/form.ts +++ b/packages/devextreme-vue/src/form.ts @@ -560,6 +560,23 @@ const DxItem = defineComponent(DxItemConfig); (DxItem as any).$_optionName = "items"; (DxItem as any).$_isCollectionItem = true; +(DxItem as any).$_expectedChildren = { + AsyncRule: { isCollectionItem: true, optionName: "validationRules" }, + buttonOptions: { isCollectionItem: false, optionName: "buttonOptions" }, + colCountByScreen: { isCollectionItem: false, optionName: "colCountByScreen" }, + CompareRule: { isCollectionItem: true, optionName: "validationRules" }, + CustomRule: { isCollectionItem: true, optionName: "validationRules" }, + EmailRule: { isCollectionItem: true, optionName: "validationRules" }, + label: { isCollectionItem: false, optionName: "label" }, + NumericRule: { isCollectionItem: true, optionName: "validationRules" }, + PatternRule: { isCollectionItem: true, optionName: "validationRules" }, + RangeRule: { isCollectionItem: true, optionName: "validationRules" }, + RequiredRule: { isCollectionItem: true, optionName: "validationRules" }, + StringLengthRule: { isCollectionItem: true, optionName: "validationRules" }, + tab: { isCollectionItem: true, optionName: "tabs" }, + tabPanelOptions: { isCollectionItem: false, optionName: "tabPanelOptions" }, + validationRule: { isCollectionItem: true, optionName: "validationRules" } +}; const DxLabelConfig = { emits: { diff --git a/packages/devextreme-vue/src/funnel.ts b/packages/devextreme-vue/src/funnel.ts index 39e54558cbb6..5c462366e0b0 100644 --- a/packages/devextreme-vue/src/funnel.ts +++ b/packages/devextreme-vue/src/funnel.ts @@ -853,6 +853,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTitleConfig = { emits: { @@ -886,6 +889,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" }, + funnelTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" } +}; const DxTooltipConfig = { emits: { diff --git a/packages/devextreme-vue/src/gantt.ts b/packages/devextreme-vue/src/gantt.ts index 268da0305254..df30b05a2f39 100644 --- a/packages/devextreme-vue/src/gantt.ts +++ b/packages/devextreme-vue/src/gantt.ts @@ -686,6 +686,11 @@ prepareConfigurationComponentConfig(DxHeaderFilterConfig); const DxHeaderFilter = defineComponent(DxHeaderFilterConfig); (DxHeaderFilter as any).$_optionName = "headerFilter"; +(DxHeaderFilter as any).$_expectedChildren = { + columnHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + ganttHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + texts: { isCollectionItem: false, optionName: "texts" } +}; const DxItemConfig = { emits: { diff --git a/packages/devextreme-vue/src/pie-chart.ts b/packages/devextreme-vue/src/pie-chart.ts index 583deed5aba5..1e95c71ce0a5 100644 --- a/packages/devextreme-vue/src/pie-chart.ts +++ b/packages/devextreme-vue/src/pie-chart.ts @@ -1241,6 +1241,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTitleConfig = { emits: { @@ -1274,6 +1277,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" }, + pieChartTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" } +}; const DxTooltipConfig = { emits: { diff --git a/packages/devextreme-vue/src/polar-chart.ts b/packages/devextreme-vue/src/polar-chart.ts index f5b99a0acd52..5bab16e04b5b 100644 --- a/packages/devextreme-vue/src/polar-chart.ts +++ b/packages/devextreme-vue/src/polar-chart.ts @@ -1340,6 +1340,13 @@ prepareConfigurationComponentConfig(DxHoverStyleConfig); const DxHoverStyle = defineComponent(DxHoverStyleConfig); (DxHoverStyle as any).$_optionName = "hoverStyle"; +(DxHoverStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxImageConfig = { emits: { @@ -1408,6 +1415,14 @@ prepareConfigurationComponentConfig(DxLabelConfig); const DxLabel = defineComponent(DxLabelConfig); (DxLabel as any).$_optionName = "label"; +(DxLabel as any).$_expectedChildren = { + argumentFormat: { isCollectionItem: false, optionName: "argumentFormat" }, + border: { isCollectionItem: false, optionName: "border" }, + connector: { isCollectionItem: false, optionName: "connector" }, + font: { isCollectionItem: false, optionName: "font" }, + format: { isCollectionItem: false, optionName: "format" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxLegendConfig = { emits: { @@ -1950,6 +1965,13 @@ prepareConfigurationComponentConfig(DxSelectionStyleConfig); const DxSelectionStyle = defineComponent(DxSelectionStyleConfig); (DxSelectionStyle as any).$_optionName = "selectionStyle"; +(DxSelectionStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxSeriesConfig = { emits: { @@ -2212,6 +2234,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTickConfig = { emits: { @@ -2305,6 +2330,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" }, + polarChartTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" } +}; const DxTooltipConfig = { emits: { diff --git a/packages/devextreme-vue/src/range-selector.ts b/packages/devextreme-vue/src/range-selector.ts index 1df98e6ea235..4bfc04cf619d 100644 --- a/packages/devextreme-vue/src/range-selector.ts +++ b/packages/devextreme-vue/src/range-selector.ts @@ -902,6 +902,13 @@ prepareConfigurationComponentConfig(DxHoverStyleConfig); const DxHoverStyle = defineComponent(DxHoverStyleConfig); (DxHoverStyle as any).$_optionName = "hoverStyle"; +(DxHoverStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxImageConfig = { emits: { @@ -925,6 +932,11 @@ prepareConfigurationComponentConfig(DxImageConfig); const DxImage = defineComponent(DxImageConfig); (DxImage as any).$_optionName = "image"; +(DxImage as any).$_expectedChildren = { + height: { isCollectionItem: false, optionName: "height" }, + url: { isCollectionItem: false, optionName: "url" }, + width: { isCollectionItem: false, optionName: "width" } +}; const DxIndentConfig = { emits: { @@ -993,6 +1005,14 @@ prepareConfigurationComponentConfig(DxLabelConfig); const DxLabel = defineComponent(DxLabelConfig); (DxLabel as any).$_optionName = "label"; +(DxLabel as any).$_expectedChildren = { + argumentFormat: { isCollectionItem: false, optionName: "argumentFormat" }, + border: { isCollectionItem: false, optionName: "border" }, + connector: { isCollectionItem: false, optionName: "connector" }, + font: { isCollectionItem: false, optionName: "font" }, + format: { isCollectionItem: false, optionName: "format" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxLengthConfig = { emits: { @@ -1565,6 +1585,13 @@ prepareConfigurationComponentConfig(DxSelectionStyleConfig); const DxSelectionStyle = defineComponent(DxSelectionStyleConfig); (DxSelectionStyle as any).$_optionName = "selectionStyle"; +(DxSelectionStyle as any).$_expectedChildren = { + border: { isCollectionItem: false, optionName: "border" }, + color: { isCollectionItem: false, optionName: "color" }, + hatching: { isCollectionItem: false, optionName: "hatching" }, + pointBorder: { isCollectionItem: false, optionName: "border" }, + seriesBorder: { isCollectionItem: false, optionName: "border" } +}; const DxSeriesConfig = { emits: { diff --git a/packages/devextreme-vue/src/tree-list.ts b/packages/devextreme-vue/src/tree-list.ts index 5fb2024c6ac0..d67cc79546f4 100644 --- a/packages/devextreme-vue/src/tree-list.ts +++ b/packages/devextreme-vue/src/tree-list.ts @@ -1852,6 +1852,11 @@ prepareConfigurationComponentConfig(DxHeaderFilterConfig); const DxHeaderFilter = defineComponent(DxHeaderFilterConfig); (DxHeaderFilter as any).$_optionName = "headerFilter"; +(DxHeaderFilter as any).$_expectedChildren = { + columnHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + treeListHeaderFilterSearch: { isCollectionItem: false, optionName: "search" }, + treeListHeaderFilterTexts: { isCollectionItem: false, optionName: "texts" } +}; const DxHideConfig = { emits: { diff --git a/packages/devextreme-vue/src/tree-map.ts b/packages/devextreme-vue/src/tree-map.ts index fbef6624a340..aed8e40d263d 100644 --- a/packages/devextreme-vue/src/tree-map.ts +++ b/packages/devextreme-vue/src/tree-map.ts @@ -403,6 +403,9 @@ prepareConfigurationComponentConfig(DxLabelConfig); const DxLabel = defineComponent(DxLabelConfig); (DxLabel as any).$_optionName = "label"; +(DxLabel as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxLoadingIndicatorConfig = { emits: { diff --git a/packages/devextreme-vue/src/vector-map.ts b/packages/devextreme-vue/src/vector-map.ts index 522b709bdc3f..70605f64c7bb 100644 --- a/packages/devextreme-vue/src/vector-map.ts +++ b/packages/devextreme-vue/src/vector-map.ts @@ -898,6 +898,9 @@ prepareConfigurationComponentConfig(DxSubtitleConfig); const DxSubtitle = defineComponent(DxSubtitleConfig); (DxSubtitle as any).$_optionName = "subtitle"; +(DxSubtitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" } +}; const DxTitleConfig = { emits: { @@ -931,6 +934,12 @@ prepareConfigurationComponentConfig(DxTitleConfig); const DxTitle = defineComponent(DxTitleConfig); (DxTitle as any).$_optionName = "title"; +(DxTitle as any).$_expectedChildren = { + font: { isCollectionItem: false, optionName: "font" }, + legendTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" }, + margin: { isCollectionItem: false, optionName: "margin" }, + vectorMapTitleSubtitle: { isCollectionItem: false, optionName: "subtitle" } +}; const DxTooltipConfig = { emits: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3585f071a843..820f770c7481 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 6.0.2 version: 6.0.2(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10)))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.10))(tslint@6.1.3(typescript@5.4.5)) devextreme-internal-tools: - specifier: 16.0.0-beta.13.1 - version: 16.0.0-beta.13.1 + specifier: 16.0.0-beta.15 + version: 16.0.0-beta.15 http-server: specifier: 14.1.1 version: 14.1.1 @@ -8106,8 +8106,8 @@ packages: devextreme-cldr-data@1.0.3: resolution: {integrity: sha512-xd+uWv1KzEhr+ZH/MOWfDei3GFz+NAYyKUR9HgjM9BBwPel7PpMElYp4whM+PtAjziBaTssQnA//ob5c3BovTA==} - devextreme-internal-tools@16.0.0-beta.13.1: - resolution: {integrity: sha512-R8AzHUjJEKqPeig61pMO65pY/vickSjXfitYSHLAmz4HMUSCNTFtITWEUos9I/pbmbQpCZps4xRf+sCyNQID+g==} + devextreme-internal-tools@16.0.0-beta.15: + resolution: {integrity: sha512-o8gjLfjVBHcas5Q62Fvk12ECTR0EzvwXfxMk6uYPx4dN92YGm2PSY6O7AlneYLH4JCogNiyrldxO5pLimqldYg==} engines: {node: '>=12.0.0'} hasBin: true @@ -25372,7 +25372,7 @@ snapshots: devextreme-cldr-data@1.0.3: {} - devextreme-internal-tools@16.0.0-beta.13.1: + devextreme-internal-tools@16.0.0-beta.15: dependencies: dasherize: 2.0.0 deepmerge: 4.3.1