diff --git a/doc/en/components/bullet-graph.md b/doc/en/components/bullet-graph.md index 91e63c485..fc10393b7 100644 --- a/doc/en/components/bullet-graph.md +++ b/doc/en/components/bullet-graph.md @@ -257,6 +257,80 @@ Performance value is the primary measure displayed by the component and it is vi `sample="/gauges/bullet-graph/measures", height="125", alt="{Platform} bullet graph measures"` +## Highlight Value + +The bullet graph's performance value can be further modified to show progress represented as a highlighted value. This will make the `Value` appear with a lower opacity. A good example is if `Value` is 50 and `HighlightValue` is set to 25. This would represent a performance of 50% regardless of what the value of `TargetValue` is set to. To enable this first set `HighlightValueDisplayMode` to Overlay and then apply a `HighlightValue` to something lower than `Value`. + +```html + + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/bullet-graph/highlight-needle", height="125", alt="{Platform} bullet graph highlight needle"` ## Comparative Ranges The ranges are visual elements that highlight a specified range of values on a scale. Their purpose is to visually communicate the qualitative state of the performance bar measure, illustrating at the same time the degree to which it resides within that state. diff --git a/doc/en/components/charts/chart-overview.md b/doc/en/components/charts/chart-overview.md index 5702cb178..3a1bc5c3e 100644 --- a/doc/en/components/charts/chart-overview.md +++ b/doc/en/components/charts/chart-overview.md @@ -51,7 +51,7 @@ We make {Platform} Category and Financial Chart easier to use, the good news you The {Platform} Bar Chart, or Bar Graph is among the most common category chart types used to quickly compare frequency, count, total, or average of data in different categories with data encoded by horizontal bars of equal width and differing lengths. They are ideal for showing variations in the value of an item over time, data distribution, sorted data ranking (high to low, worst to best). Data is represented using a collection of rectangles that extend from the left to right of the chart towards the values of data points. Learn more about our [bar chart](types/bar-chart.md) -`sample="/charts/data-chart/bar-chart-multiple-sources", height="600", alt="{Platform} Bar Chart Multiple Sources"` +`sample="/charts/data-chart/bar-chart-multiple-sources", img-src="https://static.infragistics.com/marketing/Website/products/Ignite-UI-for-Angular/ignite-ui-angular-bar-chart", height="600", alt="{Platform} Bar Chart Multiple Sources"` diff --git a/doc/en/components/charts/features/chart-data-filtering.md b/doc/en/components/charts/features/chart-data-filtering.md new file mode 100644 index 000000000..5b6e0ff95 --- /dev/null +++ b/doc/en/components/charts/features/chart-data-filtering.md @@ -0,0 +1,53 @@ +--- +title: {Platform} Chart Data Filtering | Data Visualization | Infragistics +_description: Infragistics' {Platform} Chart Data Filtering +_keywords: {Platform} Charts, Filtering, Infragistics +mentionedTypes: ["CategoryChart"] +namespace: Infragistics.Controls.Charts +--- + +# {Platform} Chart Data Filtering + +Data Filtering allows you to query large data in order to analyze and plot small subset of data entries via filter expressions, all without having to manually modify the datasource bound to the chart. + +A complete list of valid expressions and keywords to form a query string can be found here: + +[Filter expressions](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris) + +> NOTE: Any incorrect filter applied will result with an empty chart. + +## {Platform} Chart Data Filter Example + +The following example depicts a [Column Chart](../types/column-chart.md) of annual birth rates across several decades. The drop-down allows you to select a decade, which inserts an expression via the `InitialFilter` property, to update the chart visual and thus filtering out the other decades out. + +`sample="/charts/category-chart/data-filter", height="500", alt="{Platform} Data Filter Example"` + +
+ +The `InitialFilter` property is a string that requires the following syntax in order to filter properly. The value requires sets of parenthesesthat include both the filter expression definition, column and value associated with the record(s) filtering in. + +eg. To show all countries that start with the letter B: + +"(startswith(Country, 'B'))" + +eg. Concatenating more than one expression: + +"(startswith(Country, 'B') and endswith(Country, 'L') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))" + + +## Additional Resources + +You can find more information about related chart features in these topics: + +- [Chart Annotations](chart-annotations.md) +- [Chart Highlighting](chart-highlighting.md) +- [Chart Tooltips](chart-tooltips.md) + +## API References + +The following is a list of API members mentioned in the above sections: + +- `CategoryChart` +- `IsTransitionInEnabled` +- `TransitionInDuration` +- `TransitionInMode` \ No newline at end of file diff --git a/doc/en/components/charts/types/treemap-chart.md b/doc/en/components/charts/types/treemap-chart.md index 82823a569..5cb120461 100644 --- a/doc/en/components/charts/types/treemap-chart.md +++ b/doc/en/components/charts/types/treemap-chart.md @@ -2,7 +2,7 @@ title: {Platform} Treemap | Data Visualization Tools | Orientation | Layout | Data Binding | Infragistics _description: Use Infragistics' {Platform} Treemap control show relative weighting of data points at more than one level supporting strip, squarified, and slice-and-dice algorithms. Learn about {ProductName} treemap! _keywords: {Platform} Tree Map, Treemap, layout, orientation, {ProductName}, Infragistics -mentionedTypes: ["Treemap", "TreemapOrientation", "TreemapLayoutType"] +mentionedTypes: ["Treemap", "TreemapOrientation", "TreemapLayoutType", "TreemapHighlightingMode", "TreemapHighlightedValueDisplayMode"] namespace: Infragistics.Controls.Charts --- # {Platform} Treemap @@ -94,7 +94,23 @@ In the following example, the treemap demonstrates the ability of changing the l `sample="/charts/tree-map/styling", height="600", alt="{Platform} Treemap Styling"` +### {Platform} Treemap Highlighting +In the following example, the treemap demonstrates the ability of node highlighting. There are two options for this feature. Each node can individually brighten, by decreasing its opacity, or cause all other nodes to trigger the same effect. To enable this feature, set `HighlightingMode`to Brighten or FadeOthers. + +`sample="/charts/tree-map/highlighting", height="600", alt="{Platform} Treemap Highlighting"` + +## {Platform} Treemap Percent based highlighting + +- `HighlightedItemsSource`: Specifies the datasource to read highlighted values from. If null, then highlighted values are read from the ItemsSource property. +- `HighlightedValueMemberPath`: Specifies the name of the property in the datasource where the highlighted values are read. +- `HighlightedValueOpacity`: Controls the opacity of the normal value behind the highlighted value. +- `HighlightedValuesDisplayMode`: Enables or disables highlighted values. + - Auto: The treemap decides what mode to use. + - Overlay: The treemap displays highlighted values over top the normal value with a slight opacity applied to the normal value. + - Hidden: The treemap does not show highlighted values. + +`sample="/charts/tree-map/highlighting-percent-based", height="600", alt="{Platform} Treemap Percent based Highlighting"`
@@ -111,4 +127,6 @@ The following is a list of API members mentioned in the above sections: - `Treemap` - `LayoutOrientation` +- `HighlightedValuesDisplayMode` +- `HighlightedValueMemberPath` - `LayoutType` diff --git a/doc/en/components/general-changelog-dv-blazor.md b/doc/en/components/general-changelog-dv-blazor.md index f8d4cca52..9dcc4a5c0 100644 --- a/doc/en/components/general-changelog-dv-blazor.md +++ b/doc/en/components/general-changelog-dv-blazor.md @@ -2,7 +2,7 @@ title: {Platform} What's New | {ProductName} | Infragistics _description: Learn about new features in the {ProductName}. _keywords: Changelog, What's New, {ProductName}, Infragistics -mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "Infragistics.Controls.DataGridCellEventArgs", "Infragistics.Controls.GridBaseDirective", "MaskInput", "Shape", "RoundShape", "XamRadialGauge"] +mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "Infragistics.Controls.DataGridCellEventArgs", "Infragistics.Controls.GridBaseDirective", "MaskInput", "Shape", "RoundShape", "XamRadialGauge, XamLinearGauge, XamBulletGraph, XamTreemap", "XamRadialChart"] sharedComponents: ["Grid", "TreeGrid", "HierarchicalGrid"] namespace: Infragistics.Controls.Charts --- @@ -10,6 +10,25 @@ namespace: Infragistics.Controls.Charts All notable changes for each version of {ProductName} are documented on this page. +## **{PackageVerChanges-23-2-APR2}** + +### {PackageCharts} (Charts) + +Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data. + +- `XamBulletGraph` + - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time. +- `XamLinearGauge` + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamRadialGauge` + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamTreemap` + - Now exposes a `HighlightingMode` property that allows you to configure the mouse-over highlighting of the items in the tree map. This property takes two options: `Brighten` where the highlight will apply to the item that you hover the mouse over only, and `FadeOthers` where the highlight of the hovered item will remain the same, but everything else will fade out. This highlight is animated, and can be controlled using the `HighlightingTransitionDuration` property. + +## **{PackageVerChanges-23-2-APR}** + +- `Bug Fixes` + ## **{PackageVerChanges-23-2-MAR}** ### New Components @@ -31,7 +50,12 @@ All notable changes for each version of {ProductName} are documented on this pag - `Select`, `Dropdown` - exposed `selectedItem`, `items` and `groups` getters - `XamRadialGauge` + - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position. - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamRadialChart` + - New Label Mode + The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area. ### General diff --git a/doc/en/components/general-changelog-dv-react.md b/doc/en/components/general-changelog-dv-react.md index 54937e4cf..28204b91b 100644 --- a/doc/en/components/general-changelog-dv-react.md +++ b/doc/en/components/general-changelog-dv-react.md @@ -2,7 +2,7 @@ title: {Platform} What's New | {ProductName} | Infragistics _description: Learn about new features in the {ProductName}. _keywords: Changelog, What's New, {ProductName}, Infragistics -mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Grid", "GridSelectionMode", DataGridCellEventArgs, DataGridSelectionMode, DataSourceSummaryOperand, "XamRadialGauge"] +mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Grid", "GridSelectionMode", DataGridCellEventArgs, DataGridSelectionMode, DataSourceSummaryOperand, "XamRadialGauge", "XamRadialChart"] namespace: Infragistics.Controls.Charts --- # {ProductName} Changelog @@ -11,14 +11,29 @@ All notable changes for each version of {ProductName} are documented on this pag ## **{PackageVerChanges-23-2-MAR}** +### {PackageCharts} + + - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data. + +- `XamRadialChart` + - New Label Mode + The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area. + ### {PackageGrids} - New [`HierarchicalGrid`](grids/hierarchical-grid/overview.md) component ### {PackageGauges} -- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) - +- `XamRadialGauge` + - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position. + - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamLinearGauge` + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamBulletGraph` + - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time. + ### {PackageCommon} - New `Textarea` component diff --git a/doc/en/components/general-changelog-dv-wc.md b/doc/en/components/general-changelog-dv-wc.md index b635b5f10..d03e13944 100644 --- a/doc/en/components/general-changelog-dv-wc.md +++ b/doc/en/components/general-changelog-dv-wc.md @@ -2,7 +2,7 @@ title: {Platform} What's New | {ProductName} | Infragistics _description: Learn about new features in the {ProductName}. _keywords: Changelog, What's New, {ProductName}, Infragistics -mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "XamRadialGauge"] +mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "XamRadialGauge", "XamRadialChart"] namespace: Infragistics.Controls.Charts --- # {ProductName} Changelog @@ -11,9 +11,24 @@ All notable changes for each version of {ProductName} are documented on this pag ## **{PackageVerChanges-23-2-MAR}** +### {PackageCharts} + + - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data. + +- `XamRadialChart` + - New Label Mode + The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area. + ### {PackageGauges} -- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) +- `XamRadialGauge` + - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position. + - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamLinearGauge` + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamBulletGraph` + - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time. ### {PackageGrids} diff --git a/doc/en/components/general-changelog-dv.md b/doc/en/components/general-changelog-dv.md index 09522d6ec..eb8c6cc6b 100644 --- a/doc/en/components/general-changelog-dv.md +++ b/doc/en/components/general-changelog-dv.md @@ -2,7 +2,7 @@ title: {Platform} What's New | {ProductName} | Infragistics _description: Learn about new features in the {ProductName}. _keywords: Changelog, What's New, {ProductName}, Infragistics -mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "XamRadialGauge"] +mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "XamRadialGauge", "XamRadialChart"] namespace: Infragistics.Controls.Charts --- # {ProductName} Changelog @@ -17,9 +17,24 @@ All notable changes for each version of {ProductName} are documented on this pag ## **{PackageVerChanges-23-2-MAR}** +### {PackageCharts} + + - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data. + +- `XamRadialChart` + - New Label Mode + The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area. + ### {PackageGauges} -- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) +- `XamRadialGauge` + - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position. + - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling) + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamLinearGauge` + - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear. +- `XamBulletGraph` + - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time. ## **{PackageVerChanges-23-2-JAN}** diff --git a/doc/en/components/grids/_shared/advanced-filtering.md b/doc/en/components/grids/_shared/advanced-filtering.md index 671f1df66..f33291016 100644 --- a/doc/en/components/grids/_shared/advanced-filtering.md +++ b/doc/en/components/grids/_shared/advanced-filtering.md @@ -39,68 +39,91 @@ To enable the advanced filtering, the `AllowAdvancedFiltering` input property sh ``` + + +```html + + + +``` +```ts +constructor() { + let grid = document.getElementById("grid") as IgcGridComponent; + grid.data = this.data +} +``` + +```tsx + + + +``` + ```razor <{ComponentSelector} Data=data AutoGenerate="true" AllowAdvancedFiltering="true"> ``` + -```razor - - - -``` - - - ```html -<{ComponentSelector} id="grid" auto-generate="true" allow-advanced-filtering="true"> + - + ``` ```ts constructor() { - let grid = (document.getElementById("grid") as IgcGridComponent); - grid.data = this.data + let treeGrid = document.getElementById("treeGrid") as IgcTreeGridComponent; + treeGrid.data = this.data } ``` - -```html - - - +```tsx + + + ``` +```razor + + + +``` + + +```html + + + +``` ```ts constructor() { - let grid = document.getElementById("grid") as IgcTreeGridComponent; - grid.data = this.data + let hierarchicalGrid = document.getElementById("hierarchicalGrid") as IgcHierarchicalGridComponent; + hierarchicalGrid.data = this.data } ``` - + - - -```html -<{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowAdvancedFiltering="true"> - - - - - - + + +```razor + + + ``` - + + + ```tsx -<{ComponentSelector} data={nwindData} autoGenerate="false" ref={gridRef} allowAdvancedFiltering="true"> + - + ``` + The advanced filtering generates a `FilteringExpressionsTree` which is stored in the `AdvancedFilteringExpressionsTree` input property. You could use the `AdvancedFilteringExpressionsTree` property to set an initial state of the advanced filtering. @@ -543,27 +566,22 @@ Don't forget to include the themes in the same way as it was demonstrated above. In addition to the predefined themes, the grid could be further customized by setting some of the available [CSS properties](../theming.md). In case you would like to change some of the colors, you need to set a class for the grid first: + ```html - -``` - -```razor - +<{ComponentSelector} class="grid"> ``` + - - - -```html - + +```tsx +<{ComponentSelector} className="grid"> ``` + ```razor - +<{ComponentSelector} class="grid"> ``` - - Then set the related CSS properties to this class: ```css diff --git a/doc/en/components/grids/_shared/cell-editing.md b/doc/en/components/grids/_shared/cell-editing.md index e9fbe6b23..5e16e8c52 100644 --- a/doc/en/components/grids/_shared/cell-editing.md +++ b/doc/en/components/grids/_shared/cell-editing.md @@ -84,7 +84,9 @@ public updateCell() { ``` ```razor -this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel') +@code { + this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel'); +} ``` @@ -96,7 +98,9 @@ public updateCell() { ``` ```razor -this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel') +@code { + this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel'); +} ``` @@ -116,9 +120,11 @@ public updateCell() { ```razor -private UpdateCell() { - IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel"); - cell.Update(70); +@code { + private UpdateCell() { + IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel"); + cell.Update(70); + } } ``` @@ -145,9 +151,11 @@ public updateCell() { ``` ```razor -private UpdateCell() { - IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age"); - cell.Update(9999); +@code { + private UpdateCell() { + IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age"); + cell.Update(9999); + } } ``` @@ -163,9 +171,11 @@ public updateCell() { ``` ```razor -private UpdateCell() { - IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel"); - cell.Update(70); +@code { + private UpdateCell() { + IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel"); + cell.Update(70); + } } ``` @@ -232,6 +242,8 @@ This code is used in the sample below which implements an [SelectComponent](../s If you want to provide a custom template which will be applied to a cell, you can pass such template either to the cell itself, or to its header. First create the column as you usually would: + + @@ -252,7 +264,7 @@ If you want to provide a custom template which will be applied to a cell, you ca @@ -260,6 +272,19 @@ If you want to provide a custom template which will be applied to a cell, you ca ``` + +```razor + + +``` + + and pass the template: ```razor @@ -294,7 +319,6 @@ igRegisterScript("WebGridCellEditCellTemplate", (ctx) => { field="Race" data-type="string" editable="true" - name="column1" id="column1"> ``` @@ -342,73 +366,88 @@ public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { field="Category" data-type="string" editable="true" - name="column1" id="column1"> ``` and pass the templates to this column in the index.ts file: -```typescript +```ts + constructor() { - var treeGrid = document.getElementById('treeGrid') as {ComponentName}Component; + var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent; var column1 = document.getElementById('column1') as IgcColumnComponent; - treeGrid.data = this.ordersTreeData; - column1.inlineEditorTemplate = this.webTreeGridCellEditCellTemplate; + treeGrid.data = this.webGridCellEditSampleRoleplay; + column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; + column2.inlineEditorTemplate = this.webGridCellEditCellTemplate; + column3.inlineEditorTemplate = this.webGridCellEditCellTemplate; } +public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { + let cellValues: any = []; + let uniqueValues: any = []; + for(const i of (this.webGridCellEditSampleRoleplay as any)){ + const field: string = ctx.cell.column.field; + if(uniqueValues.indexOf(i[field]) === -1 ) + { + cellValues.push(html`${(i[field])}`); + uniqueValues.push(i[field]); + } + } + return html` + ctx.cell.editValue = e.detail.value}> + ${cellValues} + + `; +} ``` + + + +```html + + +``` + +and pass the templates to this column in the index.ts file: - ```ts constructor() { - var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent; - var column1 = document.getElementById('column1') as IgcColumnComponent; - var column2 = document.getElementById('column2') as IgcColumnComponent; - var column3 = document.getElementById('column3') as IgcColumnComponent; - - treeGrid.data = this.webGridCellEditSampleRoleplay; - column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; - column2.inlineEditorTemplate = this.webGridCellEditCellTemplate; - column3.inlineEditorTemplate = this.webGridCellEditCellTemplate; -} - -private _webGridCellEditSampleRoleplay: WebGridCellEditSampleRoleplay = null; -public get webGridCellEditSampleRoleplay(): WebGridCellEditSampleRoleplay { - if (this._webGridCellEditSampleRoleplay == null) - { - this._webGridCellEditSampleRoleplay = new WebGridCellEditSampleRoleplay(); - } + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent; + var column1 = document.getElementById('column1') as IgcColumnComponent; - return this._webGridCellEditSampleRoleplay; + hierarchicalGrid.data = this.singersData; + column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; } public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { - let cellValues: any = []; - let uniqueValues: any = []; - for(const i of (this.webGridCellEditSampleRoleplay as any)){ - const field: string = ctx.cell.column.field; - if(uniqueValues.indexOf(i[field]) === -1 ) - { - cellValues.push(html`${(i[field])}`); - uniqueValues.push(i[field]); - } + let cellValues: any = []; + let uniqueValues: any = []; + for(const i of (this.singersData as any)){ + const field: string = ctx.cell.column.field; + if(uniqueValues.indexOf(i[field]) === -1 ) + { + cellValues.push(html`${(i[field])}`); + uniqueValues.push(i[field]); } - return html` - ctx.cell.editValue = e.detail.value}> - ${cellValues} - - `; + } + return html` + ctx.cell.editValue = e.detail.value}> + ${cellValues} + + `; } ``` - + - - If you want to provide a custom template which will be applied to a cell, you can pass such template either to the cell itself, or to its header. First create the column as you usually would: @@ -448,13 +487,9 @@ const webGridCellEditCellTemplate = useCallback((ctx: IgrCellTemplateContext) => useEffect(() => { const column1 = grid1Ref.current.getColumnByName('column1'); - const column2 = grid1Ref.current.getColumnByName('column2'); - const column3 = grid1Ref.current.getColumnByName('column3'); grid1Ref.current.data = webGridCellEditSampleRoleplay; column1.inlineEditorTemplate = webGridCellEditCellTemplate; - column2.inlineEditorTemplate = webGridCellEditCellTemplate; - column3.inlineEditorTemplate = webGridCellEditCellTemplate; }, [webGridCellEditSampleRoleplay, webGridCellEditCellTemplate]); @@ -621,9 +656,11 @@ this.grid.addRow(record); ```razor -//Assuming we have a `GetNewRecord` method returning the new row data. -const record = this.GetNewRecord(); -this.GridRef.AddRow(record); +@code { + //Assuming we have a `GetNewRecord` method returning the new row data. + const record = this.GetNewRecord(); + this.GridRef.AddRow(record); +} ``` @@ -661,7 +698,14 @@ public addRow() { // Adding a new record // Assuming we have a `getNewRecord` method returning the new row data const record = this.getNewRecord(); - this.hierarchicalGrid.addRow(record, 1); + this.hierarchicalGrid.addRow(record); +} +``` +```razor +@code { + //Assuming we have a `GetNewRecord` method returning the new row data. + const record = this.GetNewRecord(); + this.HierarchicalGridRef.AddRow(record); } ``` @@ -708,18 +752,20 @@ row.update(newData); ```razor -// Updating the whole row -this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID); +@code { + // Updating the whole row + this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID); -// Just a particular cell through the Grid API -this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + // Just a particular cell through the Grid API + this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); -// Directly using the cell `update` method -this.selectedCell.Update(newData); + // Directly using the cell `update` method + this.selectedCell.Update(newData); -// Directly using the row `update` method -const row = this.grid.GetRowByKey(rowID); -row.Update(newData); + // Directly using the row `update` method + IgbRowType row = this.grid.GetRowByKey(rowID); + row.Update(newData); +} ``` @@ -740,18 +786,20 @@ row.update(newData); ``` ```razor -// Updating the whole row -this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); +@code { + // Updating the whole row + this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); -// Just a particular cell through the Tree Grid API -this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + // Just a particular cell through the Tree Grid API + this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); -// Directly using the cell `update` method -this.selectedCell.Update(newData); + // Directly using the cell `update` method + this.selectedCell.Update(newData); -// Directly using the row `update` method -const row = this.treeGrid.GetRowByKey(rowID); -row.Update(newData); + // Directly using the row `update` method + IgbRowType row = this.treeGrid.GetRowByKey(rowID); + row.Update(newData); +} ``` @@ -771,6 +819,23 @@ this.selectedCell.update(newData); const row = this.hierarchicalGrid.getRowByKey(rowID); row.update(newData); ``` + +```razor +@code { + // Updating the whole row + this.hierarchicalGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); + + // Just a particular cell through the Tree Grid API + this.hierarchicalGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + + // Directly using the cell `update` method + this.selectedCell.Update(newData); + + // Directly using the row `update` method + IgbRowType row = this.hierarchicalGrid.GetRowByKey(rowID); + row.Update(newData); +} +``` ### Deleting data from the {ComponentTitle} @@ -795,16 +860,18 @@ row.delete(); grid1Ref.current.deleteRow(selectedCell.cellID.rowID); // Delete row through row object const row = grid1Ref.current.getRowByIndex(rowIndex); -row.delete(); +row.del(); ``` ```razor -// Delete row through Grid API -this.grid.DeleteRow(this.selectedCell.cellID.rowID); -// Delete row through row object -const row = this.grid.GetRowByIndex(rowIndex); -row.Delete(); +@code { + // Delete row through Grid API + this.grid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.grid.GetRowByIndex(rowIndex); + row.Del(); +} ``` @@ -819,15 +886,18 @@ row.delete(); ``` ```razor -// Delete row through Tree Grid API -this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID); -// Delete row through row object -const row = this.treeGrid.GetRowByIndex(rowIndex); -row.Delete(); +@code { + // Delete row through Tree Grid API + this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.treeGrid.GetRowByIndex(rowIndex); + row.Del(); +} ``` + ```typescript // Delete row through Grid API this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); @@ -835,6 +905,27 @@ this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); const row = this.hierarchicalGrid.getRowByIndex(rowIndex); row.delete(); ``` + + + +```typescript +// Delete row through Grid API +this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); +// Delete row through row object +const row = this.hierarchicalGrid.getRowByIndex(rowIndex); +row.del(); +``` + + +```razor +@code { + // Delete row through Grid API + this.hierarchicalGrid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.hierarchicalGrid.GetRowByIndex(rowIndex); + row.Del(); +} +``` These can be wired to user interactions, not necessarily related to the `{ComponentName}` for example, a button click: @@ -902,6 +993,7 @@ constructor() { ```ts constructor() { var hGrid = document.getElementById('hGrid') as IgcHierarchicalGridComponent; + this.webHierarchicalGridCellEdit = this.webHierarchicalGridCellEdit.bind(this); hGrid.addEventListener("cellEdit", this.webHierarchicalGridCellEdit); } ``` @@ -1039,31 +1131,68 @@ Here, we are validating two columns. If the user tries to set an invalid value f ```typescript -export class MyHGridEventsComponent { - public handleCellEdit(event: IGridEditEventArgs) { - const today = new Date(); - const column = event.column; - if (column.field === 'Debut') { - if (event.newValue > today.getFullYear()) { - this.toast.message = 'The debut date must be in the past!'; - this.toast.open(); - event.cancel = true; - } - } else if (column.field === 'LaunchDate') { - if (event.newValue > new Date()) { - this.toast.message = 'The launch date must be in the past!'; - this.toast.open(); - event.cancel = true; - } +public webHierarchicalGridCellEdit(event: CustomEvent): void { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); } } } ``` +```razor +*** In JavaScript *** +igRegisterScript("HandleCellEdit", (ev) => { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); + } + } +}, false); +``` + Here, we are validating two columns. If the user tries to change an artist's **Debut** year or an album's **Launch Date**, the grid will not allow any dates that are greater than today. + + +```tsx +public handleCellEdit(sender: IgrHierarchicalGrid, event: IgrGridEditEventArgs): void { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); + } + } +} +``` + + + The result of the above validation being applied to our `{ComponentName}` can be seen in the below demo: `sample="/{ComponentSample}/editing-events", height="650", alt="{Platform} {ComponentTitle} Editing Event Example"` @@ -1107,6 +1236,10 @@ Then set the related CSS properties for that class: ``` +```tsx + +``` + Then set the related CSS properties for that class: ```css @@ -1117,6 +1250,29 @@ Then set the related CSS properties for that class: ``` + +```html + +``` + +```razor + +``` + +```tsx + +``` + +Then set the related CSS properties for that class: + +```css +.hierarchicalGrid { + --ig-grid-edit-mode-color: orange; + --ig-grid-cell-editing-background: lightblue; +} +``` + + ### Styling Example `sample="/{ComponentSample}/cell-editing-styling", height="650", alt="{Platform} {ComponentTitle} Cell Editing Styling Example"` diff --git a/doc/en/components/grids/_shared/cell-selection.md b/doc/en/components/grids/_shared/cell-selection.md index 35ce4c5e4..c9b55c2f6 100644 --- a/doc/en/components/grids/_shared/cell-selection.md +++ b/doc/en/components/grids/_shared/cell-selection.md @@ -7,7 +7,7 @@ sharedComponents: ["Grid", "TreeGrid", "HierarchicalGrid"] namespace: Infragistics.Controls --- -# {Platform} Cell Selection +# {Platform} {ComponentTitle} Cell Selection The {ProductName} Cell Selection in {Platform} {ComponentTitle} enables rich data select capabilities and offers powerful API in the `{ComponentName}` component. The {Platform} {ComponentTitle} supports three selection modes: @@ -21,7 +21,7 @@ In the `{ComponentName}` you can specify the cell selection mode on grid level. Let's dive deeper into each of these options. -## {Platform} Cell Selection Example +## {Platform} {ComponentTitle} Cell Selection Example The sample below demonstrates the three types of `{ComponentName}`'s **cell selection** behavior. Use the buttons below to enable each of the available selection modes. A brief description will be provided on each button interaction through a snackbar message box. @@ -93,7 +93,7 @@ If you want to disable cell selection you can just set `CellSelection` to **none Below are the methods that you can use in order to select ranges, clear selection or get selected cells data. - + ### Select range @@ -111,7 +111,29 @@ const range = { rowStart: 2, rowEnd: 2, columnStart: 1, columnEnd: 1 }; gridRef.current.selectRange(range); ``` - + + +```razor +<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true> + +@code { + private {ComponentSelector} grid; + + private async void SetSelection() + { + IgbGridSelectionRange selectionRange = new IgbGridSelectionRange(); + selectionRange.ColumnStart = 1; + selectionRange.ColumnEnd = 1; + selectionRange.RowStart = 2; + selectionRange.RowEnd = 2; + + this.grid.SelectRange(new IgbGridSelectionRange[] {}); + } +} +``` + + + ### Clear cell selection @@ -144,10 +166,10 @@ gridRef.current.clearCellSelection(); `GetSelectedData` will return array of the selected data in Dictionary format. Examples below: ```razor - +<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true> @code { - private IgbGrid grid; + private {ComponentSelector} grid; private async void GetSelectedData() { @@ -300,6 +322,35 @@ Then set the related CSS properties for that class: + + + +```ts + +``` + + +```tsx + +``` + +```razor + +``` + +Then set the related CSS properties for that class: + +```css +.hGrid { + --ig-grid-cell-selected-text-color: #fff; + --ig-grid-cell-active-border-color: #f2c43c; + --ig-grid-cell-selected-background: #0062a3; + --ig-grid-cell-editing-background: #0062a3; +} +``` + + + ### Demo `sample="/{ComponentSample}/cell-selection-style", height="620", alt="{Platform} {ComponentTitle} Cell Selection Styling Example"` @@ -384,7 +435,7 @@ With the custom theme applied, the selected grid cells are highlighted with our ## Additional Resources - + * [Selection](selection.md) * [Row Selection](row-selection.md) * [Filtering](filtering.md) diff --git a/doc/en/components/grids/_shared/collapsible-column-groups.md b/doc/en/components/grids/_shared/collapsible-column-groups.md index 49dce41e5..7209d1ddc 100644 --- a/doc/en/components/grids/_shared/collapsible-column-groups.md +++ b/doc/en/components/grids/_shared/collapsible-column-groups.md @@ -214,12 +214,21 @@ public indTemplate = (ctx: IgcColumnTemplateContext) => { ``` ```tsx - function collapsibleIndicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) { + + + + + + + + + +function indicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) { return (
- +
) - } +} ``` diff --git a/doc/en/components/grids/_shared/column-resizing.md b/doc/en/components/grids/_shared/column-resizing.md index 7d6da03a5..88e64184c 100644 --- a/doc/en/components/grids/_shared/column-resizing.md +++ b/doc/en/components/grids/_shared/column-resizing.md @@ -113,7 +113,7 @@ public onResize(event) { ``` ```tsx -function onResize(grid: IgrGridBaseDirective, event: IgrColumnMovingEventArgs) { +function onResize(grid: IgrGridBaseDirective, event: IgrColumnResizeEventArgs) { IgrColumn col = event.detail.column; string pWidth = event.detail.prevWidth; string nWidth = event.detail.newWidth; @@ -151,16 +151,27 @@ constructor() { treeGrid.data = this.data; treeGrid.columnResized = this.onResize; } -``` - -```typescript public onResize(event) { this.col = event.column; this.pWidth = event.prevWidth; this.nWidth = event.newWidth; } ``` + + +```tsx +function onResize(grid: IgrGridBaseDirective, event: IgrColumnResizeEventArgs) { + IgrColumn col = event.detail.column; + string pWidth = event.detail.prevWidth; + string nWidth = event.detail.newWidth; +} + +<{ComponentSelector} data={data} autoGenerate="false" primaryKey="ID" foreignKey="ParentID" columnResized={onResize}> + + + +``` ```razor <{ComponentSelector} Data=data AutoGenerate=false ColumnResized="onResize" PrimaryKey="ID" ForeignKey="ParentID"> @@ -214,7 +225,7 @@ public onResize(event) { ```tsx -function onResize(grid: IgrGridBaseDirective, event: IgrColumnMovingEventArgs) { +function onResize(grid: IgrGridBaseDirective, event: IgrColumnResizeEventArgs) { IgrColumn col = event.detail.column; string pWidth = event.detail.prevWidth; string nWidth = event.detail.newWidth; @@ -309,6 +320,14 @@ This means that the following configuration is possible: ``` +```tsx +<{ComponentSelector} data={data} autoGenerate="false" primaryKey="ID" foreignKey="ParentID" columnResized={onResize}> + + + + +``` + @@ -527,8 +546,8 @@ constructor() { ``` ```tsx - const column = grid.getColumnByName('ID'); - column.autosize(); +const column = grid.getColumnByName('ID'); +column.autosize(); ``` ```razor @@ -750,7 +769,6 @@ Then set the related CSS property for that class: ## Additional Resources - * [Virtualization and Performance](virtualization.md) * [Paging](paging.md) * [Filtering](filtering.md) @@ -759,7 +777,6 @@ Then set the related CSS property for that class: * [Column Moving](column-moving.md) * [Column Pinning](column-pinning.md) * [Selection](selection.md) - Our community is active and always welcoming to new ideas. diff --git a/doc/en/components/grids/_shared/column-types.md b/doc/en/components/grids/_shared/column-types.md index 5fae37101..22bbb5b62 100644 --- a/doc/en/components/grids/_shared/column-types.md +++ b/doc/en/components/grids/_shared/column-types.md @@ -11,14 +11,14 @@ namespace: Infragistics.Controls The {Platform} {ComponentTitle} provides a default handling of *number*, *string*, *date*, *boolean*, *currency* and *percent* column data types, based on which the appearance of the default and editing templates will be present. - + ## {Platform} {ComponentTitle} Column Types Example `sample="/{ComponentSample}/column-data-types", height="550", alt="{Platform} {ComponentTitle} column data types"` - + ## {Platform} {ComponentTitle} Default Template @@ -524,7 +524,7 @@ public editCellTemplate = (ctx: IgcCellTemplateContext) => { ``` ```tsx -function editCellTemplate(ctx: IgrCellTemplateContext) { +function editCellTemplate(ctx: { dataContext: IgrCellTemplateContext }) { return ( <> @@ -624,4 +624,3 @@ public init(column: IgxColumnComponent) { * For custom templates you can see [cell editing topic](cell-editing.md#cell-editing-templates) * [Editing](editing.md) * [Summaries](summaries.md) - diff --git a/doc/en/components/grids/_shared/conditional-cell-styling.md b/doc/en/components/grids/_shared/conditional-cell-styling.md index dc9f71d08..377a6d067 100644 --- a/doc/en/components/grids/_shared/conditional-cell-styling.md +++ b/doc/en/components/grids/_shared/conditional-cell-styling.md @@ -32,8 +32,8 @@ You can conditionally style the `{ComponentName}` rows by setting the `RowClasse ```razor - - +<{ComponentSelector} AutoGenerate="true" Id="grid" Data="CustomersData" Name="grid" RowClassesScript="RowClassesHandler" @ref="grid"> + ``` @@ -44,7 +44,7 @@ You can conditionally style the `{ComponentName}` rows by setting the `RowClasse ```ts constructor() { - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; + var grid = this.grid = document.getElementById('grid') as {ComponentName}; grid.rowClasses = this.rowClasses; } ``` @@ -89,14 +89,14 @@ igRegisterScript("RowClassesHandler", () => { ```ts public rowClasses = { - activeRow: (row) => row.index === 0 + activeRow: (row: IgcRowType) => row.index === 0 } ``` ```tsx const rowClasses = { - activeRow: (row) => row.index === 0 + activeRow: (row: IgrRowType) => row.index === 0 } ``` @@ -122,9 +122,21 @@ The `{ComponentName}` control exposes the `RowStyles` property which allows cond > The callback signature for both `RowStyles` and `RowClasses` is: + ```ts (row: RowType) => boolean ``` + + + +```ts +(row: IgcRowType) => boolean +``` + + +```tsx +(row: IgrRowType) => boolean +``` ```razor (row) => boolean @@ -191,7 +203,7 @@ constructor() { - + ```typescript public background = (row: RowType) => row.data.data['Title'] === 'CEO' ? '#6c757d' : row.data.data['Title'].includes('President') ? '#adb5bd' : row.data.data['Title'].includes('Director') ? '#ced4da' : @@ -207,9 +219,53 @@ public rowStyles = { color: (row: RowType) => row.data.data['Title'] === 'CEO' ? '#fff' : null }; ``` + + + +```typescript +public rowStyles = { + 'background': (row: IgcRowType) => row.data['Title'] === 'CEO' ? '#6c757d' : + row.data['Title'].includes('President') ? '#adb5bd' : + row.data['Title'].includes('Director') ? '#ced4da' : + row.data['Title'].includes('Manager') ? '#dee2e6' : + row.data['Title'].includes('Lead') ? '#e9ecef' : + row.data['Title'].includes('Senior') ? '#f8f9fa' : null, + 'border-left': (row: IgcRowType) => row.data.data['Title'] === 'CEO' || row.data.data['Title'].includes('President') ? + '2px solid' : null, + 'border-color': (row: IgcRowType) => row.data.data['Title'] === 'CEO' ? '#495057' : null, + color: (row: IgcRowType) => row.data.data['Title'] === 'CEO' ? '#fff' : null +}; +``` + ```razor -Add treegrid styles +igRegisterScript("WebTreeGridRowStylesHandler", () => { + return { + 'background': (row) => row.data['Title'] === 'CEO' ? '#6c757d' : + row.data['Title'].includes('President') ? '#adb5bd' : + row.data['Title'].includes('Director') ? '#ced4da' : + row.data['Title'].includes('Manager') ? '#dee2e6' : + row.data['Title'].includes('Lead') ? '#e9ecef' : + row.data['Title'].includes('Senior') ? '#f8f9fa' : null, + 'border-left': (row) => row.data['Title'] === 'CEO' || row.data['Title'].includes('President') ? '2px solid' : null, + 'border-color': (row) => row.data['Title'] === 'CEO' ? '#495057' : null, + 'color': (row) => row.data['Title'] === 'CEO' ? '#fff' : null + }; +}, true); +``` + +```tsx +const rowStyles = { + 'background': (row: IgrRowType) => row.data['Title'] === 'CEO' ? '#6c757d' : + row.data['Title'].includes('President') ?'#adb5bd' : + row.data['Title'].includes('Director') ? '#ced4da' : + row.data['Title'].includes('Manager') ? '#dee2e6' : + row.data['Title'].includes('Lead') ? '#e9ecef' : + row.data['Title'].includes('Senior') ? '#f8f9fa' : null, + 'border-left': (row: IgrRowType) => row.data['Title'] === 'CEO' || row.data['Title'].includes('President') ? '2px solid' : null, + 'border-color': (row: IgrRowType) => row.data['Title'] === 'CEO' ? '#495057' : null, + 'color': (row: IgrRowType) => row.data['Title'] === 'CEO' ? '#fff' : null +}; ``` @@ -219,6 +275,9 @@ Add treegrid styles width="100%" height="550px" [rowStyles]="rowStyles"> ``` + + + ```html @@ -230,10 +289,16 @@ constructor() { treeGrid.rowStyles = this.rowStyles; } ``` - + ```razor -Add treegrid markup + + +``` + +```tsx + + ``` @@ -252,7 +317,18 @@ public childRowStyles = { ``` ```razor -Add Hierarchical styles +igRegisterScript("WebGridRowStylesHandler", () => { + return { + background:(row: RowType) => row.data['HasGrammyAward'] ? '#eeddd3' : '#f0efeb', + 'border-left': (row: RowType) => row.data['HasGrammyAward'] ? '2px solid #dda15e' : null + }; +}, true); + +igRegisterScript("WebGridChildRowStylesHandler", () => { + return { + 'border-left': (row: RowType) => row.data['BillboardReview'] > 70 ? '3.5px solid #dda15e' : null + }; +}, true); ``` ```html @@ -264,13 +340,17 @@ Add Hierarchical styles ``` ```razor -Add Hierarchical markup + + + + ``` ```html - - + > ``` @@ -282,6 +362,14 @@ constructor() { rowIsland1.rowStyles = this.childRowStyles; } ``` + +```tsx + + + + +``` @@ -327,6 +415,27 @@ constructor() { + +```html + +``` +```ts +constructor() { + var grammyNominations = document.getElementById('grammyNominations') as IgcColumnComponent; + grammyNominations.cellClasses = this.grammyNominationsCellClassesHandler; +} +``` + +```razor + +``` + +```tsx + +``` + + + @@ -338,38 +447,32 @@ constructor() { ``` + + + ```html - + ``` ```ts constructor() { - var UnitPrice = this.UnitPrice = document.getElementById('UnitPrice') as IgcColumnComponent; - UnitPrice.cellClasses = this.priceClasses; - UnitPrice.bodyTemplate = this.unitPriceTemplate; -} -public unitPriceTemplate = (ctx: IgcCellTemplateContext) => { - return html` - ${if (ctx.cell.value == 0)} - - - ${if (ctx.cell.value != 0)} - ${ctx.cell.value} - `; + var unitPrice = this.UnitPrice = document.getElementById('unitPrice') as IgcColumnComponent; + unitPrice.cellClasses = this.unitPriceCellClasses; } ``` - + ```razor -Add tree grid example + + ``` - - - -```razor -add example +```tsx + + ``` - + + The `CellClasses` input accepts an object literal, containing key-value pairs, where the key is the name of the CSS class, while the value is either a callback function that returns a boolean, or boolean value. @@ -444,27 +547,86 @@ igRegisterScript("CellClassesHandler", () => { - - + + ```typescript -private upPriceCondition = (rowData: any, columnKey: any): boolean => { - return rowData[columnKey] > 25; +public grammyNominationsCellClassesHandler = { + downFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] < 5, + upFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] >= 6 +}; +``` + + +```tsx +public grammyNominationsCellClassesHandler = { + downFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] < 5, + upFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] >= 6 +}; +``` + +```razor +igRegisterScript("GrammyNominationsCellClassesHandler", () => { + return { + downFont: (rowData, columnKey) => rowData[columnKey] < 5, + upFont: (rowData, columnKey) => rowData[columnKey] >= 6 + }; +}, true); +``` +```css +.upFont { + color: green !important; } +.downFont { + color: red !important; +} +``` + + + + + +```typescript private downPriceCondition = (rowData: any, columnKey: any): boolean => { - return rowData[columnKey] <= 25; + return rowData[columnKey] <= 5; } -public priceClasses = { +private upPriceCondition = (rowData: any, columnKey: any): boolean => { + return rowData[columnKey] > 5; +} + +public unitPriceCellClasses = { downPrice: this.downPriceCondition, upPrice: this.upPriceCondition }; ``` + ```razor -Add treegrid example +igRegisterScript("UnitPriceCellClassesHandler", () => { + return { + downPrice: (rowData, columnKey) => rowData[columnKey] <= 5, + upPrice: (rowData, columnKey) => rowData[columnKey] > 5, + }; +}, true); +``` + +```tsx +function upPriceCondition(rowData: any, columnKey: any): boolean { + return rowData[columnKey] > 5; +} + +function downPriceCondition(rowData: any, columnKey: any): boolean { + return rowData[columnKey] <= 5; +} + +const unitPriceCellClasses = { + downPrice: downPriceCondition, + upPrice: upPriceCondition +}; ``` + ```scss ::ng-deep { .upPrice { @@ -476,15 +638,19 @@ Add treegrid example } } ``` + - - - +```css +.upPrice { + color: red !important; +} -```razor -Add hierarchical grid example +.downPrice { + color: green !important; +} ``` - + + Use **::ng-deep** or **ViewEncapsulation.None** to force the custom styles down through the current component and its children. @@ -511,10 +677,6 @@ Use **::ng-deep** or **ViewEncapsulation.None** to force the custom styles down Columns expose the `CellStyles` property which allows conditional styling of the column cells. Similar to `CellClasses` it accepts an object literal where the keys are style properties and the values are expressions for evaluation. Also, you can apply regular styling with ease (without any conditions). -In the [sample above](#demo) we've created: -- Two different styles that will be applied based on the column index. -- You will also change the **text color** based on even/odd rows. - Let's define our styles: @@ -537,6 +699,7 @@ public evenColStyles = { + ```razor igRegisterScript("WebGridCellStylesHandler", () => { return { @@ -553,6 +716,7 @@ igRegisterScript("WebGridCellStylesHandler", () => { }; }, true); ``` + ```ts public webGridCellStylesHandler = { @@ -676,6 +840,204 @@ constructor() { ```tsx ``` + + + + +```ts +public webTreeGridCellStylesHandler = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "UnitPrice") { + if (cellValue > 10) return "#dc3545"; + if (cellValue < 5) return "#28a745"; + if (cellValue >= 5 && cellValue <= 10) return "#17a2b8"; + } + } +} +``` +```html + + +``` +```ts +constructor() { + var col1 = document.getElementById('col1') as IgcColumnComponent; + col1.cellStyles = this.webTreeGridCellStylesHandler; +} +``` + + +```razor +igRegisterScript("WebTreeGridCellStylesHandler", () => { + return { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "UnitPrice") { + if (cellValue > 10) return "#dc3545"; + if (cellValue < 5) return "#28a745"; + if (cellValue >= 5 && cellValue <= 10) return "#17a2b8"; + } + } + }; +}, true); +``` +```razor + + +``` + +```tsx +const webTreeGridCellStyles = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "UnitPrice") { + if (cellValue > 10) return "#dc3545"; + if (cellValue < 5) return "#28a745"; + if (cellValue >= 5 && cellValue <= 10) return "#17a2b8"; + } + } +} +``` +```tsx + +``` + + + +```razor +igRegisterScript("CellStylesHandler", () => { + return { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } + }; +}, true); +``` + + +```ts +public cellStylesHandler = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } +} +``` + + +```tsx +const cellStylesHandler = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } +} +``` + + +On `ngOnInit` we will add the `CellStyles` configuration for each column of the predefined `Columns` collection, which is used to create the `{ComponentName}` columns dynamically. + +```ts +public ngOnInit() { + this.data = athletesData; + this.columns = [ + { field: 'Id' }, + { field: 'Position' }, + { field: 'Name' }, + { field: 'AthleteNumber' }, + { field: 'CountryName' } + ]; + + this.applyCSS(); +} + +public applyCSS() { + this.columns.forEach((column, index) => { + column.cellStyles = (index % 2 === 0 ? this.evenColStyles : this.oddColStyles); + }); +} + +public updateCSS(css: string) { + this.oddColStyles = {...this.oddColStyles, ...JSON.parse(css)}; + this.evenColStyles = {...this.evenColStyles, ...JSON.parse(css)}; + this.applyCSS(); +} +``` + +```html + + + + +``` + +Define a `popin` animation + +```scss +// component.scss +@keyframes popin { + 0% { + opacity: 0.1; + transform: scale(.75, .75); + filter: blur(3px) invert(1); + } + + 50% { + opacity: .5; + filter: blur(1px); + } + + 100% { + transform: scale(1, 1); + opacity: 1; + filter: none; + } +} +``` + + + +```razor + + +``` + +```html + + +``` + +```ts +constructor() { + var col1 = document.getElementById('col1') as IgcColumnComponent; + col1.cellStyles = this.cellStylesHandler; +} +``` + + +```tsx + +``` + + ### Demo @@ -711,16 +1073,16 @@ public editDone(evt) { ``` ```html - +<{ComponentSelector} id="grid1" height="500px" width="100%" > - +<{ComponentSelector}> ``` ```ts constructor() { - var grid = this.grid = document.getElementById('grid1') as IgcGridComponent; + var grid = this.grid = document.getElementById('grid1') as {ComponentName}; var Col1 = this.Col1 = document.getElementById('Col1') as IgcColumnComponent; var Col2 = this.Col2 = document.getElementById('Col2') as IgcColumnComponent; var Col3 = this.Col3 = document.getElementById('Col3') as IgcColumnComponent; @@ -746,11 +1108,11 @@ function editDone(grid, evt) { backgroundClasses = {...backgroundClasses}; } - +<{ComponentSelector} id="grid1" height="500px" width="100%" onCellEdit={editDone}> - + ``` ## API References diff --git a/doc/en/components/grids/_shared/display-density.md b/doc/en/components/grids/_shared/display-density.md index c920e36ab..55143d930 100644 --- a/doc/en/components/grids/_shared/display-density.md +++ b/doc/en/components/grids/_shared/display-density.md @@ -49,7 +49,6 @@ As you can see in the demo above, the `{ComponentName}` provides three density o ``` - or @@ -84,6 +83,7 @@ Let's now continue with our sample and see in action how the `DisplayDensity` is ``` + ```razor
``` + ```typescript @ViewChild(IgxButtonGroupComponent) public buttonGroup: IgxButtonGroupComponent; @@ -159,6 +160,57 @@ public ngOnInit() { } ``` + +```razor +
+ + + + +
+``` + +```html +
+ + + + +
+``` + +```tsx + + + + +``` + + Now we can add the markup. @@ -494,27 +546,6 @@ Now we can add the markup. ``` - -```ts -constructor() { - var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; - propertyEditor.componentRenderer = this.renderer; - propertyEditor.target = this.grid; - grid.data = this.data; -} - -private _componentRenderer: ComponentRenderer = null; -public get renderer(): ComponentRenderer { - if (this._componentRenderer == null) { - this._componentRenderer = new ComponentRenderer(); - var context = this._componentRenderer.context; - PropertyEditorPanelDescriptionModule.register(context); - WebGridDescriptionModule.register(context); - } - return this._componentRenderer; -} -``` @@ -656,26 +687,6 @@ public get renderer(): ComponentRenderer { ``` -```ts -constructor() { - var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcTreeGridComponent; - propertyEditor.componentRenderer = this.renderer; - propertyEditor.target = this.grid; - grid.data = this.data; -} - -private _componentRenderer: ComponentRenderer = null; -public get renderer(): ComponentRenderer { - if (this._componentRenderer == null) { - this._componentRenderer = new ComponentRenderer(); - var context = this._componentRenderer.context; - PropertyEditorPanelDescriptionModule.register(context); - WebGridDescriptionModule.register(context); - } - return this._componentRenderer; -} -``` @@ -709,6 +720,7 @@ public get renderer(): ComponentRenderer { + @@ -721,6 +733,123 @@ public get renderer(): ComponentRenderer { ``` ```razor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` ```html @@ -763,6 +892,7 @@ public get renderer(): ComponentRenderer { + @@ -773,10 +903,68 @@ public get renderer(): ComponentRenderer { ``` + +```tsx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + + + +Finally, let's provide the necessary logic in order to actually apply the density: + + + +```typescript +@ViewChild('grid', { read: {ComponentName} }) +public grid: {ComponentName}; + +public selectDensity(event) { + this.density = this.displayDensities[event.index].label; +} +``` + + + ```ts constructor() { var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcHierarchicalGridComponent; + var grid = this.grid = document.getElementById('grid') as {ComponentName}; propertyEditor.componentRenderer = this.renderer; propertyEditor.target = this.grid; grid.data = this.data; @@ -793,20 +981,7 @@ public get renderer(): ComponentRenderer { return this._componentRenderer; } ``` - - -Finally, let's provide the necessary logic in order to actually apply the density: - - -```typescript -@ViewChild('grid', { read: {ComponentName} }) -public grid: {ComponentName}; - -public selectDensity(event) { - this.density = this.displayDensities[event.index].label; -} -``` - + ```razor @code { @@ -822,7 +997,39 @@ public selectDensity(event) { private IgbPropertyEditorPanel propertyEditor; private IgbPropertyEditorPropertyDescription displayDensityEditor; - private IgbGrid grid; + private {ComponentSelector} grid; +} +``` + +```tsx +private propertyEditor: IgrPropertyEditorPanel +private propertyEditorRef(r: IgrPropertyEditorPanel) { + this.propertyEditor = r; + this.setState({}); +} +private displayDensityEditor: IgrPropertyEditorPropertyDescription +private grid: {ComponentName} +private gridRef(r: {ComponentName}) { + this.grid = r; + this.setState({}); +} + +constructor(props: any) { + super(props); + + this.propertyEditorRef = this.propertyEditorRef.bind(this); + this.gridRef = this.gridRef.bind(this); +} + +private _componentRenderer: ComponentRenderer = null; + public get renderer(): ComponentRenderer { + if (this._componentRenderer == null) { + this._componentRenderer = new ComponentRenderer(); + var context = this._componentRenderer.context; + PropertyEditorPanelDescriptionModule.register(context); + WebHierarchicalGridDescriptionModule.register(context); + } + return this._componentRenderer; } ``` diff --git a/doc/en/components/grids/_shared/editing.md b/doc/en/components/grids/_shared/editing.md index d8d095b51..089e8d2a5 100644 --- a/doc/en/components/grids/_shared/editing.md +++ b/doc/en/components/grids/_shared/editing.md @@ -61,14 +61,14 @@ In the `{ComponentName}`, if you set `RowEditable` property to true, and the `Ed - For custom templates you can see [Cell Editing topic](cell-editing.md#{PlatformLower}-grid-cell-editing-and-edit-templates-example) - + All available column data types could be found in the official [Column types topic](column-types.md#default-template). - + ### Event Arguments and Sequence - + The grid exposes a wide array of events that provide greater control over the editing experience. These events are fired during the [**Row Editing**](row-editing.md) and [**Cell Editing**](cell-editing.md) lifecycle - when starting, committing or canceling the editing action. - + | Event | Description | Arguments | Cancellable | | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ----------- | @@ -107,6 +107,7 @@ As seen from the table, all interactions, except resizing a column, will end the Example how to commit new values, if user tries to sort the column while a cell/row is in edit mode: + ```html @@ -178,6 +179,76 @@ function onSorting(grid: IgrGridBaseDirective, event: IgrSortingEventArgs) { ``` + + + + +```html + + +``` + + + +```html +<{ComponentSelector} id="hierarchicalGrid" primary-key="ProductID" > + +``` + +```ts +constructor() { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}Component; + hierarchicalGrid.data = this.data; + hierarchicalGrid.addEventListener("sorting", this.onSorting); +} + +public onSorting(event: IgcSortingEventArgs) { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}Component; + hierarchicalGrid.endEdit(true); +} +``` + + + +```typescript +public onSorting(event: ISortingEventArgs) { + this.hierarchicalGrid.endEdit(true); +} +``` + + +```razor +<{ComponentSelector} + Id="hierarchicalGrid" + SortingScript="SortingHandler" + RowEditable="true"> + + +//In JavaScript +function SortingHandler() { + hierarchicalGrid.endEdit(true); +} +igRegisterScript("SortingHandler", SortingHandler, false); +``` + + + +```tsx + + +``` + + + + +```tsx +public onSorting(grid: IgrGridBaseDirective, event: IgrSortingEventArgs) { + hierarchicalGrid.endEdit(true); +} +``` + + + ## API References diff --git a/doc/en/components/grids/_shared/excel-style-filtering.md b/doc/en/components/grids/_shared/excel-style-filtering.md index add0cb724..717265882 100644 --- a/doc/en/components/grids/_shared/excel-style-filtering.md +++ b/doc/en/components/grids/_shared/excel-style-filtering.md @@ -41,8 +41,8 @@ To turn on the `{ComponentName}` component's Excel-style filtering, two inputs s ```tsx - - +<{ComponentSelector} data={nwindData} autoGenerate="true" allowFiltering="true" filterMode={FilterMode.ExcelStyleFilter}> + ``` @@ -81,16 +81,13 @@ Sorting, pinning and hiding features can be removed from the filter menu using t ``` ```razor - - - - - - - + + + + + + + ``` ```html @@ -109,7 +106,7 @@ Sorting, pinning and hiding features can be removed from the filter menu using t ``` ```tsx - + @@ -155,7 +152,7 @@ In the sample below **Product Name** and **Discontinued** columns have all four ``` ```razor - + @@ -192,7 +189,7 @@ In the sample below 'Product Name' and 'Discontinued' columns have all three fea ```html - @@ -203,67 +200,48 @@ In the sample below 'Product Name' and 'Discontinued' columns have all three fea - - - - - - - - - - - - - - - - - - - - - - + + + ``` -```razor -Add blazor snippets here -``` - ```html - + - - + - - - - - - - - - - - - - - - - - - - - - - + + + ``` +```tsx + + + + + + + {/* ... */} + +``` + +```razor + + + + + + + @* ... *@ + +``` + In the sample below 'Artist' column have all three features enabled, 'Debut' have all three disabled, 'Grammy Nominations' has only pinning and hiding. @@ -292,9 +270,7 @@ If you want to further customize the Excel style filter menu, you can use the `E The following code demonstrates how to customize the Excel style filter menu using the `ExcelStyleHeaderIconTemplate`: ```razor -<{ComponentSelector} - Name="grid" - @ref="grid" +<{ComponentSelector} Data="Data" AllowFiltering="true" FilterMode="FilterMode.ExcelStyleFilter" @@ -308,6 +284,7 @@ igRegisterScript("WebGridFilterAltIconTemplate", (ctx) => { }, false); ``` + ```ts constructor() { var grid = this.grid = document.getElementById('grid') as {ComponentName}Component; @@ -318,6 +295,7 @@ public webGridFilterAltIconTemplate = (ctx: IgcCellTemplateContext) => { return html`Continued` } ``` + ```tsx const webGridFilterAltIconTemplate = ({dataContext: IgrCellTemplateContext}) => { @@ -332,15 +310,9 @@ const webGridFilterAltIconTemplate = ({dataContext: IgrCellTemplateContext}) => ); } -function App() { - return ( - <> - - - <> - ) -} +<{ComponentSelector} autoGenerate="true" allowFiltering="true" filterMode="excelStyleFilter" + excelStyleHeaderIconTemplate={webGridFilterAltIconTemplate}> + ``` @@ -1054,7 +1026,7 @@ In case you would like to change some of the colors, you need to set a class for ``` ```tsx - +<{ComponentSelector} className="grid"> ``` ```razor diff --git a/doc/en/components/grids/_shared/filtering.md b/doc/en/components/grids/_shared/filtering.md index b9deacb4b..39fc77124 100644 --- a/doc/en/components/grids/_shared/filtering.md +++ b/doc/en/components/grids/_shared/filtering.md @@ -59,25 +59,23 @@ Property `Filterable` enables you to specify the following options: ``` - ```html <{ComponentSelector} id="grid1" auto-generate="false" allow-filtering="true"> -<{ComponentSelector}> + ``` - - ```tsx <{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowFiltering="true"> ``` - -To enable the [Advanced filtering](advanced-filtering.md) however, you need to set the `AllowAdvancedFiltering` input property to **true**. + +To enable the [Advanced filtering](advanced-filtering.md) however, you need to set the `AllowAdvancedFiltering` input property to **true**.7 + ```html @@ -129,6 +127,7 @@ The filtering feature is enabled for the `{ComponentName}` component by setting ``` + ```html <{ComponentSelector} auto-generate="false" allow-filtering="true"> @@ -148,7 +147,6 @@ The filtering feature is enabled for the `{ComponentName}` component by setting ``` - @@ -371,6 +369,8 @@ this.grid.filteringLogic = FilteringLogic.OR; ```tsx +import { FilteringLogic } from "igniteui-react-grids"; + <{ComponentName} filteringLogic={FilteringLogic.Or}> ``` @@ -580,20 +580,16 @@ constructor() { - - + + ``` ```ts constructor() { - var artist = this.artist = document.getElementById('Artist') as IgcColumnComponent; - var hasGrammyAward = this.hasGrammyAward = document.getElementById('HasGrammyAward') as IgcColumnComponent; - - this._bind = () => { - artist.bodyTemplate = this.caseSensitiveFilteringOperand; - hasGrammyAward.bodyTemplate = this.booleanFilteringOperand; - } - this._bind(); + var artist = document.getElementById('Artist') as IgcColumnComponent; + var hasGrammyAward = document.getElementById('HasGrammyAward') as IgcColumnComponent; + artist.filters = this.caseSensitiveFilteringOperand; + hasGrammyAward.filters = this.booleanFilteringOperand; } ``` @@ -651,18 +647,18 @@ In addition to the predefined themes, the grid could be further customized by se In case you would like to change some of the colors, you need to set a class for the grid first: -```ts +```html <{ComponentSelector} class="grid"> ``` ```razor -<{ComponentSelector} Class="grid"> +<{ComponentSelector} Class="grid"> ``` ```tsx - +<{ComponentSelector} className="grid"> ``` diff --git a/doc/en/components/grids/_shared/paging.md b/doc/en/components/grids/_shared/paging.md index 8ae335fc2..efea885d6 100644 --- a/doc/en/components/grids/_shared/paging.md +++ b/doc/en/components/grids/_shared/paging.md @@ -34,7 +34,7 @@ The following example represents `{ComponentName}` pagination and exposes the op ```razor -<{ComponentSelector} @ref=grid Width="100%" Height="500px" Data=marketData DisplayDensity="DisplayDensity.Cosy"> +<{ComponentSelector} @ref=grid Width="100%" Height="500px" Data=Data DisplayDensity="DisplayDensity.Cosy"> ``` @@ -102,12 +102,13 @@ The `Paginator` component is used along with the `{ComponentName}` component in ```razor -<{ComponentSelector} @ref=grid Data=marketData DisplayDensity="DisplayDensity.Compact"> +<{ComponentSelector} @ref=grid Data=Data DisplayDensity="DisplayDensity.Compact"> ``` + ```html <{ComponentSelector} id="grid"> @@ -117,7 +118,7 @@ The `Paginator` component is used along with the `{ComponentName}` component in ```ts constructor() { - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; + var grid = this.grid = document.getElementById('grid') as {ComponentName}; var paginator = this.paginator = document.getElementById('paginator') as IgcPaginatorComponent; const selectOptions = [5, 15, 20, 50]; grid.data = this.data; @@ -127,6 +128,7 @@ constructor() { paginator.displayDensity = grid.displayDensity; } ``` + ```tsx const selectOptions = [5, 15, 20, 50]; @@ -395,7 +397,7 @@ Don't forget to include the themes in the same way as it was demonstrated above. ## Additional Resources - + * [Virtualization and Performance](virtualization.md) @@ -406,7 +408,8 @@ Don't forget to include the themes in the same way as it was demonstrated above. * [Column Pinning](column-pinning.md) * [Column Resizing](column-resizing.md) * [Selection](selection.md) - + + Our community is active and always welcoming to new ideas. diff --git a/doc/en/components/grids/_shared/row-adding.md b/doc/en/components/grids/_shared/row-adding.md index 7073307c0..f64c9b0c8 100644 --- a/doc/en/components/grids/_shared/row-adding.md +++ b/doc/en/components/grids/_shared/row-adding.md @@ -139,6 +139,7 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru + ```html <{ComponentSelector} id="treeGrid" primary-key="ID" foreign-key="ParentID" row-editable="true"> @@ -153,9 +154,11 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` + + ```tsx <{ComponentSelector} autoGenerate="false" primaryKey="ID" foreignKey="ParentID" rowEditable="true"> @@ -168,8 +171,10 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` + + ```razor <{ComponentSelector} AutoGenerate="false" Id="treegrid" PrimaryKey="ID" ForeignKey="ParentID" RowEditable="true"> @@ -182,12 +187,12 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` - - + + ```html <{ComponentSelector} igxPreventDocumentScroll [data]="localdata" [autoGenerate]="false" [primaryKey]="'Debut'" [rowEditable]="true"> @@ -225,9 +230,11 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` + + ```html <{ComponentSelector} id="hGrid" auto-generate="false" primary-key="Debut" row-editable="true"> @@ -264,8 +271,11 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` + + + ```razor <{ComponentSelector} AutoGenerate="false" Id="hGrid" PrimaryKey="Debut" RowEditable="true"> @@ -302,8 +312,148 @@ Then define a `{ComponentName}` with bound data source, `RowEditable` set to tru ``` + + + + +```tsx +<{ComponentSelector} + autoGenerate="false" + data={this.singersData} + id="hGrid" + primaryKey="ID" + rowEditable="true" + ref={this.hierarchicalGrid1Ref}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + > **Note**: > Setting primary key is mandatory for row adding operations. @@ -459,6 +609,7 @@ After a new row is added through the row adding UI, its position and/or visibili Customizing the text of the row adding overlay is possible using the `RowAddTextDirective`. + ```html <{ComponentSelector} [data]="data" [primaryKey]="'ProductID'" [autoGenerate]="false" [rowEditable]="true"> @@ -466,24 +617,31 @@ Customizing the text of the row adding overlay is possible using the `RowAddText ``` + + ```ts this.grid.rowAddTextTemplate = (ctx: IgcGridEmptyTemplateContext) => { return html`Adding Row`; } ``` + + ```tsx gridRef.current.rowAddTextTemplate = (ctx: IgrGridEmptyTemplateContext) => { return ('Adding Row'); } -``` +``` + + + ```razor <{ComponentSelector} Data="data" PrimaryKey="ProductID" AutoGenerate="false" RowEditable="true" RowAddTextTemplate="addTextTemplate"> @@ -494,7 +652,9 @@ gridRef.current.rowAddTextTemplate = (ctx: IgrGridEmptyTemplateContext) => { return @Adding Row; }; } -``` +``` + + ### Customizing Buttons diff --git a/doc/en/components/grids/_shared/row-drag.md b/doc/en/components/grids/_shared/row-drag.md index 4a1201d9a..7cc488327 100644 --- a/doc/en/components/grids/_shared/row-drag.md +++ b/doc/en/components/grids/_shared/row-drag.md @@ -316,27 +316,47 @@ The drag handle icon can be templated using the grid's `DragIndicatorIconTemplat To do so, we can use the `DragIndicatorIcon` to pass a template inside of the `{ComponentSelector}`'s body: - -```html -<{ComponentSelector}> - - drag_handle - - + + +```tsx + function dragIndicatorIconTemplate(ctx: IgrGridEmptyTemplateContext) { + return ( + <> + + + ); + } + + + ``` - + + +```razor + + + +private RenderFragment dragIndicatorIconTemplate = (context) => +{ + return @
+ +
; +}; +``` + + ```html -<{ComponentSelector} row-draggable="true"> +<{ComponentSelector} row-draggable="true" id="grid"> -`` +``` ```ts constructor() { - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; - grid.dragIndicatorIcon = this.dragIndicatorIconTemplate; + var grid = this.grid = document.getElementById('grid') as IgcHierarchicalGridComponent; + grid.dragIndicatorIconTemplate = this.dragIndicatorIconTemplate; } public dragIndicatorIconTemplate = (ctx: IgcGridEmptyTemplateContext) => { @@ -346,6 +366,54 @@ public dragIndicatorIconTemplate = (ctx: IgcGridEmptyTemplateContext) => { + + + + +```tsx + function dragIndicatorIconTemplate(ctx: IgrGridEmptyTemplateContext) { + return ( + <> + + + ); + } + + + +``` + + +```razor + + + +private RenderFragment dragIndicatorIconTemplate = (context) => +{ + return @
+ +
; +}; +``` + + + + + + +```html +<{ComponentSelector}> + + drag_handle + + +``` + + + + + + ```tsx function dragIndicatorIconTemplate(ctx: IgrGridEmptyTemplateContext) { return ( @@ -370,6 +438,7 @@ private RenderFragment dragIndicatorIconTemplate =
; }; ``` + Once we've set the new icon template, we also need to adjust the **DEFAULT** icon in our **DragIcon enum**, so it's properly change by the `ChangeIcon` method: @@ -471,6 +540,91 @@ Since all of the actions will be happening _inside_ of the grid's body, that's w With the help of the grid's row drag events you can create a grid that allows you to reorder rows by dragging them. + + + + +```html + + +``` + +```ts +constructor() { + var hGrid = this.grihGridd = document.getElementById('hGrid') as IgcHierarchicalGridComponent; + hGrid.addEventListener("rowDragEnd", this.webHierarchicalGridReorderRowHandler) +} +``` + + +```tsx + + +``` + +```razor + + +// In JavaScript +igRegisterScript("WebHierarchicalGridReorderRowHandler", (args) => { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0]; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +}, false); + +function getCurrentRowIndex(rowList, cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + + + + + + +```html + + +``` + +```ts +constructor() { + var tGrid = this.tGrid = document.getElementById('tGrid') as IgcTreeGridComponent; + tGrid.addEventListener("rowDragStart", this.webTreeGridReorderRowStartHandler); + tGrid.addEventListener("rowDragEnd", this.webTreeGridReorderRowHandler); +} +``` + + +```tsx + + +``` + +```razor + +``` + + + + + ```html @@ -486,11 +640,16 @@ constructor() { ``` + + ```tsx ``` + + + ```razor @@ -520,6 +679,9 @@ function getCurrentRowIndex(rowList, cursorPosition) { return -1; } ``` + + + @@ -619,6 +781,7 @@ function getCurrentRowIndex(rowList: any[], cursorPosition) { + ```typescript @@ -688,9 +851,194 @@ export class TreeGridRowReorderComponent { ``` + + + + + +```tsx +public webTreeGridReorderRowStartHandler(args){ + const draggedRow = args.detail.dragData; + if(draggedRow.expanded){ + draggedRow.expanded = false; + } + } + + public webTreeGridReorderRowHandler(args): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = this.treeGrid; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + const draggedRow = args.detail.dragData.data; + const childRows = this.findChildRows(grid.data, draggedRow); + //remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); + // reinsert the child rows + childRows.reverse().forEach(childRow => { + grid.data.splice(currRowIndex + 1, 0, childRow); + }); + } + + private findChildRows(rows: any[], parent: any): any[] { + const childRows: any[] = []; + rows.forEach(row => { + if (row.ParentID === parent.ID) { + childRows.push(row); + // Recursively find children of current row + const grandchildren = this.findChildRows(rows, row); + childRows.push(...grandchildren); + } + }); + return childRows; + } + + public getCurrentRowIndex(rowList: any[], cursorPosition: any) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; + } +``` + + + + + + + +```ts +public webTreeGridReorderRowStartHandler(args: CustomEvent): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = this.treeGrid; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + const draggedRow = args.detail.dragData.data; + const childRows = this.findChildRows(grid.data, draggedRow); + //remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); + // reinsert the child rows + childRows.reverse().forEach(childRow => { + grid.data.splice(currRowIndex + 1, 0, childRow); + }); + } + + private findChildRows(rows: any[], parent: any): any[] { + const childRows: any[] = []; + rows.forEach(row => { + if (row.ParentID === parent.ID) { + childRows.push(row); + // Recursively find children of current row + const grandchildren = this.findChildRows(rows, row); + childRows.push(...grandchildren); + } + }); + return childRows; + } + + public getCurrentRowIndex(rowList: any[], cursorPosition: any) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; + } +``` + + + + + + + +```razor +//in JavaScript +igRegisterScript("WebTreeGridReorderRowStartHandler", (args) => { + const draggedRow = args.detail.dragElement; + const row = this.treeGrid.getRowByIndex(draggedRow.getAttribute('data-rowindex')); + if (row.expanded) { + row.expanded = false; + } +}, false); + +igRegisterScript("WebTreeGridReorderRowHandler", (args) => { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-tree-grid")[0]; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + const draggedRow = args.detail.dragData.data; + const childRows = this.findChildRows(grid.data, draggedRow); + //remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); + // reinsert the child rows + childRows.reverse().forEach(childRow => { + grid.data.splice(currRowIndex + 1, 0, childRow); + }); +}, false); + +function findChildRows(rows, parent) { + const childRows = []; + rows.forEach(row => { + if (row.ParentID === parent.ID) { + childRows.push(row); + // Recursively find children of current row + const grandchildren = this.findChildRows(rows, row); + childRows.push(...grandchildren); + } + }); + return childRows; +} + +function getCurrentRowIndex(rowList, cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + + + + ```typescript export class HGridRowReorderComponent { public rowDragStart(args: any): void { @@ -742,6 +1090,98 @@ export class HGridRowReorderComponent { } ``` + + + +```tsx + public webHierarchicalGridReorderRowHandler(sender: IgrHierarchicalGrid, args: IgrRowDragEndEventArgs): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = this.hierarchicalGrid; + grid.collapseAll(); + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); + } + + public getCurrentRowIndex(rowList: any[], cursorPosition: any) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; + } +``` + + + +```typescript +public webGridReorderRowHandler(args: CustomEvent): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0] as any; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +} +public getCurrentRowIndex(rowList: any[], cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + + +```razor + + +//In JavaScript +igRegisterScript("WebGridReorderRowHandler", (args) => { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0]; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +}, false); + +function getCurrentRowIndex(rowList, cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + With these few easy steps, you've configured a grid that allows reordering rows via drag/drop! You can see the above code in action in the following demo. diff --git a/doc/en/components/grids/_shared/row-pinning.md b/doc/en/components/grids/_shared/row-pinning.md index 197fe650b..43103e2cd 100644 --- a/doc/en/components/grids/_shared/row-pinning.md +++ b/doc/en/components/grids/_shared/row-pinning.md @@ -31,7 +31,7 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with ``` - + ```razor <{ComponentSelector} Width="100%"   Height="100%" @@ -55,8 +55,10 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with ``` + + ```html <{ComponentSelector} auto-generate="false"> @@ -66,8 +68,10 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with ``` + + ```tsx <{ComponentSelector}> @@ -77,6 +81,7 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with ``` + ## Row Pinning API @@ -146,6 +151,7 @@ public rowPinning(event) { ``` + ```tsx function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) { event.detail.insertAtIndex = 0; @@ -154,6 +160,7 @@ function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) { <{ComponentSelector} autoGenerate="true" rowPinning={rowPinning}> ``` + ```razor <{ComponentSelector} Width="100%" @@ -175,7 +182,6 @@ function rowPinningHandler(event) { igRegisterScript("rowPinningHandler", rowPinningHandler, false); ``` - ## Pinning Position @@ -225,7 +231,16 @@ grid.pinning = { rows: RowPinningPosition.Bottom }; } } ``` - + + +```tsx +<{ComponentSelector} id="dataGrid" autoGenerate="true"> + + +var grid = document.getElementById("dataGrid") as {ComponentSelector}; +grid.pinning = { rows: RowPinningPosition.Bottom }; +``` + ## Custom Row Pinning UI @@ -236,6 +251,7 @@ You can define your custom UI and change the pin state of the rows via the relat Let's say that instead of an action strip you would like to show a pin icon in every row allowing the end-user to click and change a particular row's pin state. This can be done by adding an extra column with a cell template containing the custom icon. + ```razor @@ -270,7 +286,6 @@ igRegisterScript("WebGridRowPinCellTemplate", (ctx) => { ``` -On click of the custom icon the pin state of the related row can be changed using the row's API methods. ```typescript public togglePinning(row: IgxGridRow, event) { @@ -305,10 +320,12 @@ public pinCellTemplate = (ctx: IgcCellTemplateContext) => { return html` this.togglePinning(index)}>📌`; } ``` + + ```tsx function cellPinCellTemplate(ctx: IgrCellTemplateContext) { - const index = ctx.dataContext.cell.id.rowIndex; + const index = ctx.dataContext.cell.row.index; return ( <> toggleRowPin(index)}>📌 @@ -321,9 +338,106 @@ function cellPinCellTemplate(ctx: IgrCellTemplateContext) { ``` + -On click of the custom icon the pin state of the related row can be changed using the row's API methods. + + + +```razor + + +// In Javascript + +igRegisterScript("WebHierarchicalGridRowPinCellTemplate", (ctx) => { + var html = window.igTemplating.html; + window.toggleRowPin = function toggleRowPin(row) { + row.pinned = !row.pinned; + } + const row = ctx.cell.row; + return html`
+ 📌 +
`; +}, false); +``` + + +```html +<{ComponentSelector} [data]="data" [primaryKey]="'ID'" [autoGenerate]="false"> + + + + {{cell.row.pinned ? 'lock' : 'lock_open'}} + + + + + + + + +``` + + +```typescript +public togglePinning(row: IgxGridRow, event) { + event.preventDefault(); + if (row.pinned) { + row.unpin(); + } else { + row.pin(); + } +} +``` + + + +```html +<{ComponentSelector} id="grid" primary-key="ID" auto-generate="false"> + + + + +``` + +```typescript +constructor() { + var grid = document.getElementById('grid') as {ComponentName}Component; + var column = document.getElementById('column1') as IgcColumnComponent; + grid.data = this.data; + column.bodyTemplate = this.pinCellTemplate; +} + +public pinCellTemplate = (ctx: IgcCellTemplateContext) => { + const row = ctx.cell.row; + return html` this.togglePinning(row)}>📌`; +} +``` + + + +```tsx +function cellPinCellTemplate(ctx: IgrCellTemplateContext) { + const row = ctx.dataContext.cell.row; + return ( + <> + toggleRowPin(row)}>📌 + + ); +} + +<{ComponentSelector} primaryKey="ID" autoGenerate="false"> + + + + +``` + + + + + +On click of the custom icon the pin state of the related row can be changed using the row's API methods. ```typescript public togglePinning(index: number) { @@ -339,6 +453,24 @@ function toggleRowPin(index: number) { grid.getRowByIndex(index).pinned = !grid.getRowByIndex(index).pinned; } ``` + + + +On click of the custom icon the pin state of the related row can be changed using the row's API methods. + +```typescript +public togglePinning(row: IgcRowType) { + row.pinned = !row.pinned; +} +``` + + +```tsx +function toggleRowPin(row: IgrRowType) { + row.pinned = !row.pinned; +} +``` + #### Demo diff --git a/doc/en/components/grids/_shared/row-selection.md b/doc/en/components/grids/_shared/row-selection.md index 11c9ee7bb..ee9fd7391 100644 --- a/doc/en/components/grids/_shared/row-selection.md +++ b/doc/en/components/grids/_shared/row-selection.md @@ -72,13 +72,12 @@ Single row selection can now be easily set up, the only thing you need to do, is ``` ```ts constructor() { - const grid = document.getElementById('grid') as IgcGridComponent; + const grid = document.getElementById('grid') as {ComponentName}Component; grid.data = this.data; grid.addEventListener("rowSelectionChanging", this.handleRowSelection); } ``` - -```typescript +```ts public handleRowSelection(args: IgcRowSelectionEventArgs) { if (args.detail.added.length && args.detail.added[0] === 3) { args.detail.cancel = true; @@ -185,6 +184,12 @@ To enable cascade row selection in the `{ComponentName}` just set the `RowSelect ``` +```tsx + + +``` + In this mode a parent's selection state entirely depends on the selection state of its children. When a parent has some selected and some deselected children, its checkbox is in an indeterminate state. @@ -223,6 +228,7 @@ The code snippet below can be used to select one or multiple rows simultaneously ``` + ```razor <{ComponentSelector} Width="100%" Id="grid" @@ -235,7 +241,7 @@ The code snippet below can be used to select one or multiple rows simultaneously Select @code { - public IgbGrid grid; + public {ComponentSelector} grid; private async void Select() { object[] array = new object[] { 1,2, 5 }; @@ -243,6 +249,7 @@ The code snippet below can be used to select one or multiple rows simultaneously } } ``` + ```html @@ -260,7 +267,7 @@ constructor() { document.getElementById("select").addEventListener("click", this.onClickSelect); } public onClickSelect() { - const grid = document.getElementById("grid") as IgcGridComponent; + const grid = document.getElementById("grid") as {ComponentName}Component; grid.selectRows([1,2,5], true); } ``` @@ -306,7 +313,7 @@ If you need to deselect rows programmatically, you can use the `DeselectRows` me Deselect @code { - public IgbGrid grid; + public {ComponentSelector} grid; private async void Deselect() { object[] array = new object[] { 1, 2, 5 }; @@ -330,7 +337,7 @@ constructor() { document.getElementById("deselect").addEventListener("click", this.onClickDeselect); } public onClickDeselect() { - const grid = document.getElementById("grid") as IgcGridComponent; + const grid = document.getElementById("grid") as {ComponentName}Component; grid.deselectRows([1,2,5]); } ``` @@ -369,9 +376,15 @@ When there is some change in the row selection `RowSelectionChanging` event is e ``` + +```html +<{ComponentSelector} id="grid"> + +``` + ```ts constructor() { - const grid = document.getElementById('grid') as IgcGridComponent; + const grid = document.getElementById('grid') as {ComponentName}Component; grid.data = this.data; grid.addEventListener("rowSelectionChanging", this.handleRowSelectionChange); } @@ -380,6 +393,7 @@ public handleRowSelectionChange(args) { args.detail.cancel = true; // this will cancel the row selection } ``` + ```tsx function handleRowSelectionChange(args: IgrRowSelectionEventArgs) { @@ -425,7 +439,7 @@ If you need to see which rows are currently selected, you can get their row IDs ```typescript public getSelectedRows() { - const grid = document.getElementById('grid') as IgcGridComponent; + const grid = document.getElementById('grid') as {ComponentName}Component; const currentSelection = grid.selectedRows; // return array of row IDs } ``` @@ -442,7 +456,7 @@ public getSelectedRows() { Get selected @code { - public IgbGrid grid; + public {ComponentSelector} grid; private async void GetSelected() { var selected = this.grid.SelectedRows; @@ -470,10 +484,9 @@ Additionally, assigning row IDs to `SelectedRows` will allow you to change the g ```ts - public mySelectedRows = [1, 2, 3]; // an array of row IDs constructor() { - const grid = document.getElementById('grid') as IgcGridComponent; + const grid = document.getElementById('grid') as {ComponentName}Component; grid.data = this.data; grid.selectedRows = this.mySelectedRows; } @@ -592,6 +605,7 @@ The `rowID` property can be used to get a reference of an `{ComponentSelector}` ``` + ```ts public rowSelectorTemplate = (ctx: IgcRowSelectorTemplateContext) => { return html` @@ -684,7 +698,7 @@ auto-generate="true"> ```ts constructor() { - const grid = document.getElementById('grid') as IgcGridComponent; + const grid = document.getElementById('grid') as {ComponentName}Component; grid.data = this.data; grid.headSelectorTemplate = this.headSelectorTemplate; } @@ -744,8 +758,7 @@ This demo shows the usage of custom header and row selectors. The latter uses `R - - + ### Excel Style Row Selectors Demo @@ -756,9 +769,7 @@ This demo uses custom templates to resemble Excel-like header and row selectors. `sample="/{ComponentSample}/row-selection-template-excel", height="550", alt="{Platform} {ComponentTitle} Selection Template Excel Example"` - - - + ### Conditional Selection Demo @@ -767,7 +778,6 @@ This demo prevents some rows from being selected using the `RowSelectionChanging `sample="/{ComponentSample}/conditional-row-selectors", height="550", alt="{Platform} {ComponentTitle} Conditional Row Selectors Example"` - ## API References * `{ComponentName}` @@ -776,7 +786,7 @@ This demo prevents some rows from being selected using the `RowSelectionChanging ## Additional Resources - + * [Selection](selection.md) * [Cell selection](cell-selection.md) * [Paging](paging.md) @@ -787,7 +797,7 @@ This demo prevents some rows from being selected using the `RowSelectionChanging * [Column Pinning](column-pinning.md) * [Column Resizing](column-resizing.md) * [Virtualization and Performance](virtualization.md) - + Our community is active and always welcoming to new ideas. diff --git a/doc/en/components/grids/_shared/search.md b/doc/en/components/grids/_shared/search.md index db3a662c3..fe336ac57 100644 --- a/doc/en/components/grids/_shared/search.md +++ b/doc/en/components/grids/_shared/search.md @@ -23,6 +23,7 @@ The following example represents `{ComponentName}` with search input box that al Let's start by creating our grid and binding it to our data. We will also add some custom styles for the components we will be using! + ```html @@ -75,9 +76,65 @@ Let's start by creating our grid and binding it to our data. We will also add so ``` + + + + +```html + + + + + + + +``` + + + +```html + + + + + + + +``` +```ts +private treeGrid: IgcTreeGridComponent; + +constructor() { + this.treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent; + this.treeGrid.data = new EmployeesFlatData(); +} +``` + + +```tsx + + + + + + + +``` + +```razor + + + + + + + +``` + Great, and now let's prepare for the search API of our `{ComponentName}`! We can create a few properties, which can be used for storing the currently searched text and whether the search is case sensitive and/or by an exact match. + ```typescript @@ -119,6 +176,43 @@ const exactMatchChipRef = useRef(null); const iconButtonNextRef = useRef(null); const [searchText, setSearchText] = useState('') ``` + + + + +```ts +private treeGrid: IgcTreeGridComponent; + +private searchBox: IgcInputComponent; + +private icon: IgcIconComponent; +private nextIconButton: IgcIconButtonComponent; +private prevIconButton: IgcIconButtonComponent; + +private caseSensitiveChip: IgcChipComponent; +private exactMatchChip: IgcChipComponent; +``` + + +```razor +private IgbTreeGrid treeGrid; + +public string searchText = ""; +public bool caseSensitive = false; +public bool exactMatch = false; +``` + +```tsx +const gridRef = useRef(null); +const searchIconRef = useRef(null); +const clearIconRef = useRef(null); +const iconButtonNextRef = useRef(null); +const iconButtonPrevRef = useRef(null); +const caseSensitiveChipRef = useRef(null); +const exactMatchChipRef = useRef(null); +const [searchText, setSearchText] = useState(''); +``` + ### {Platform} Search Box Input @@ -149,6 +243,7 @@ When searching by an exact match, the search API will highlight as results only The methods from above return a **number** value (the number of times the `{ComponentName}` contains the given string). + ```html @@ -177,14 +272,56 @@ constructor() { public nextSearch(){ this.grid.findNext(this.searchBox.value, false, false); } +``` + + +```tsx +function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) { + setSearchText(event.detail); +} + +function nextSearch() { + gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected); +} + + + + +``` + + + +```html + + ``` +```ts +constructor() { + this.searchBox = document.getElementById('searchBox') as IgcInputComponent; + this.caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent; + this.exactMatchChip = document.getElementById('exactMatchChip') as IgcChipComponent; +} +public nextSearch() { + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); +} +``` +```razor + + +public void NextSearch() +{ + this.treeGrid.FindNext(this.searchText, this.caseSensitive, this.exactMatch); +} +``` + ```tsx function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) { setSearchText(event.detail); + gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected); } function nextSearch() { @@ -195,6 +332,7 @@ function nextSearch() { ``` + @@ -232,6 +370,7 @@ In order to freely search and navigate among our search results, let's create a ``` + ```razor @@ -279,6 +418,55 @@ public nextSearch() { } ``` + + + + +```html + + +``` +```ts +constructor() { + this.nextIconButton = document.getElementById('nextIconBtn') as IgcIconButtonComponent; + this.prevIconButton = document.getElementById('prevIconBtn') as IgcIconButtonComponent; + this.nextIconButton.addEventListener("click", this.nextSearch); + this.prevIconButton.addEventListener("click", this.prevSearch); +} + +public prevSearch() { + this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); +} + +public nextSearch() { + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); +} +``` + + +```razor + + + + + + + +@code { + private IgbTreeGrid treeGrid; + + public void PrevSearch() + { + this.treeGrid.FindPrevAsync(this.searchText, this.caseSensitive, this.exactMatch); + } + + public void NextSearch() + { + this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch); + } +} +``` + ```tsx function prevSearch() { @@ -319,6 +507,7 @@ public searchKeyDown(ev) { ``` + ```html @@ -389,6 +578,78 @@ We can also allow the users to navigate the results by using the keyboard's + + + +```html + + +``` +```ts +constructor() { + this.searchBox = document.getElementById('searchBox') as IgcInputComponent; + + this.searchBox.addEventListener("keydown", (evt) => { this.onSearchKeydown(evt); }); + this.searchBox.addEventListener("igcInput", (evt) => { + this.treeGrid.findNext(evt.detail, this.caseSensitiveChip.selected, this.exactMatchChip.selected); + }); +} + +public onSearchKeydown(evt: KeyboardEvent) { + if (evt.key === 'Enter' || evt.key === 'ArrowDown') { + evt.preventDefault(); + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); + } else if (evt.key === 'ArrowUp') { + evt.preventDefault(); + this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); + } +} +``` + + +```tsx +function searchKeyDown(e: KeyboardEvent) { + if (e.key === 'Enter' || e.key === 'ArrowDown') { + e.preventDefault(); + gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected); + } else if (e.key === 'ArrowUp') { + e.preventDefault(); + gridRef.current.findPrev(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected); + } +} + +function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) { + setSearchText(event.detail); + gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected); +} + +
+ +
+``` + +```razor + + +@code { + private void OnSearchKeyDown(KeyboardEventArgs evt) + { + if (evt.Key == "Enter" || evt.Key == "ArrowDown") { + this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch); + } else if (evt.Key == "ArrowUp") { + this.treeGrid.FindPrevAsync(this.searchText, this.caseSensitive, this.exactMatch); + } + } + + public void OnValueChanging(string newValue) + { + this.searchText = newValue; + this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch); + } +} +``` + ### Case Sensitive and Exact Match @@ -420,6 +681,7 @@ public updateExactSearch() { ``` + Now let's allow the user to choose whether the search should be case sensitive and/or by an exact match. For this purpose we can use simple checkbox inputs and bind to its `change` event where we can use the checkbox `checked` state. @@ -448,6 +710,32 @@ public updateSearch() { } ``` + + + + +Now let's allow the user to choose whether the search should be case sensitive and/or by an exact match. For this purpose we can use simple selectable `Chips` and bind to the `igcSelect` event to determine when the user interacts with them. + +```html +Case Sensitive +Exact Match +``` + +```ts +constructor() { + this.caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent; + this.exactMatchChip = document.getElementById('exactMatchChip') as IgcChipComponent; + + this.caseSensitiveChip.addEventListener("igcSelect", (evt) => { + this.treeGrid.findNext(this.searchBox.value, evt.detail, this.exactMatchChip.selected); + }); + this.exactMatchChip.addEventListener("igcSelect", (evt) => { + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, evt.detail); + }); +} +``` + + @@ -487,10 +775,10 @@ function updateSearch() { } -Case Sensitive + Case Sensitive -Exact Match + Exact Match ``` @@ -530,6 +818,7 @@ import { defineComponents, IgcInputComponent, IgcChipComponent, IgcIconComponent defineComponents(IgcInputComponent, IgcChipComponent, IgcIconComponent, IgcIconButtonComponent); ``` + ```tsx import { IgrGridModule } from "igniteui-react-grids"; import { IgrChipModule } from "igniteui-react"; @@ -537,6 +826,17 @@ import { IgrChipModule } from "igniteui-react"; const mods: any[] = [IgrGridModule, IgrChipModule]; mods.forEach((m) => m.register()); ``` + + + +```tsx +import { IgrTreeGridModule } from "igniteui-react-grids"; +import { IgrChipModule, IgrIconButtonModule, IgrInputModule } from "igniteui-react"; + +const mods: any[] = [IgrTreeGridModule, IgrChipModule, IgrIconButtonModule, IgrInputModule]; +mods.forEach((m) => m.register()); +``` + @@ -544,6 +844,7 @@ To do this, let's go and grab the `Input`, `Icon`, `IconButton` and the `Chip` m + ```razor // eg. Program.cs register the following: builder.Services.AddIgniteUIBlazor( @@ -552,13 +853,27 @@ builder.Services.AddIgniteUIBlazor( typeof(IgbIconButtonModule), typeof(IgbIconModule) ); - +``` + + +```razor +// eg. Program.cs register the following: +builder.Services.AddIgniteUIBlazor( + typeof(IgbTreeGridModule), + typeof(IgbInputModule), + typeof(IgbIconButtonModule), + typeof(IgbIconModule) +); +``` + +```razor @code { private IgbIcon searchIconRef { get; set; } const string searchIcon = ""; const string prevIcon = ""; const string nextIcon = ""; const string clearIcon = ""; + protected override void OnAfterRender(bool firstRender) { if (this.searchIconRef != null && firstRender) @@ -571,7 +886,7 @@ builder.Services.AddIgniteUIBlazor( this.searchIconRef.RegisterIconFromTextAsync("clear", clearIcon, "material"); })); } - + } } ``` @@ -599,6 +914,16 @@ We will wrap all of our components inside an [InputGroup](../input-group.md). On ``` + +```typescript +public clearSearch() { + this.searchText = ''; + this.@@igObjectRef.clearSearch(); +} +``` + + + ```html @@ -613,15 +938,6 @@ We will wrap all of our components inside an [InputGroup](../input-group.md). On ``` - -```typescript -public clearSearch() { - this.searchText = ''; - this.@@igObjectRef.clearSearch(); -} -``` - - ```typescript constructor() { @@ -636,75 +952,140 @@ constructor() { ``` +```tsx +const prevIconText = + ""; +const nextIconText = + ""; +const clearIconText = + ""; + +useEffect(() => { + if (clearIconRef?.current) { + clearIconRef.current.registerIconFromText("clear", clearIconText, "material"); + } + if (iconButtonPrevRef?.current) { + iconButtonPrevRef.current.registerIconFromText("prev", prevIconText, "material"); + } + if (iconButtonNextRef?.current) { + iconButtonNextRef.current.registerIconFromText("next", nextIconText, "material"); + } +}, []); + + +
+ + +
+
+ + Case Sensitive + + + Exact Match + +
+
+ + + + +
+
+``` + We will wrap all of our components inside an `Input`. On the left we will toggle between a search and a delete/clear icon (depending on whether the search input is empty or not). In the center, we will position the input itself. In addition, whenever the delete icon is clicked, we will update our `SearchText` and invoke the `{ComponentName}`'s `ClearSearch` method to clear the highlights. + -```razor - - @if (searchText.Length == 0) - { - - } - @if (searchText.Length > 0) - { - - } + -
- - Case Sensitive - - - Exact Match - +We will wrap all of our components inside an `Input`. On the left we will toggle between a search and a delete/clear icon (depending on whether the search input is empty or not). In the center, we will position the input itself. In addition, whenever the delete icon is clicked, we will update our `SearchText` and invoke the `{ComponentName}`'s `ClearSearch` method to clear the highlights. + +```html + + +
+ Case Sensitive + Exact Match
-
- - - - - - +
+ +
- + +``` -@code { + +```typescript +constructor() { + const prevIconText = ""; + const nextIconText = ""; + const searchIconText = ""; + const clearIconText = ""; - public void clearSearch() - { - this.searchText = ""; - this.grid.ClearSearchAsync(); - } + registerIconFromText('prev', prevIconText, 'material'); + registerIconFromText('next', nextIconText, 'material'); + registerIconFromText('search', searchIconText, 'material'); + registerIconFromText('clear', clearIconText, 'material'); + + this.icon = document.getElementById('icon') as IgcIconComponent; + this.searchBox = document.getElementById('searchBox') as IgcInputComponent; + + this.searchBox.addEventListener('igcInput', (evt) => { + this.icon.name = evt.detail ? 'clear' : 'search'; + }); + this.icon.addEventListener('click', this.clearSearch); +} + +public clearSearch() { + this.searchBox.value = ''; + this.icon.name = 'search'; + this.treeGrid.clearSearch(); } ``` + ```tsx const prevIconText = ""; const nextIconText = ""; +const searchIconText = + ""; const clearIconText = ""; useEffect(() => { - if (clearIconRef?.current) { - clearIconRef.current.registerIconFromText("clear", clearIconText, "material"); + if (searchIconRef?.current) { + searchIconRef.current.registerIconFromText("search", searchIconText, "material"); + searchIconRef.current.registerIconFromText("clear", clearIconText, "material"); } if (iconButtonPrevRef?.current) { - iconButtonPrevRef.current.registerIconFromText("prev", prevIconText, "material"); + iconButtonPrevRef.current.registerIconFromText("prev", prevIconText,"material"); } if (iconButtonNextRef?.current) { iconButtonNextRef.current.registerIconFromText("next", nextIconText, "material"); } }, []); +function clearSearch() { + setSearchText(''); + gridRef.current.clearSearch(); +} +
- - + {searchText.length === 0 ? ( + + + ) : ( + + + )}
@@ -722,6 +1103,46 @@ useEffect(() => {
``` + + +```razor + + @if (searchText.Length == 0) + { + + } + @if (searchText.Length > 0) + { + + } + +
+ + Case Sensitive + + + Exact Match + +
+
+ + + + + + +
+
+ +@code { + + public void clearSearch() + { + this.searchText = ""; + this.grid.ClearSearchAsync(); + } +} +``` On the right in our input group, let's create three separate containers with the following purposes: @@ -792,6 +1213,7 @@ public showResults() {
``` + ```ts constructor() { const input = document.getElementById("searchBox") as IgcInputComponent; @@ -804,18 +1226,42 @@ public updateSearch() { grid.findNext(input.value, caseSensitiveChip.selected, exactMatchChip.selected); } ``` + + + +```ts +constructor() { + this.caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent; + this.exactMatchChip = document.getElementById('exactMatchChip') as IgcChipComponent; + + this.caseSensitiveChip.addEventListener('igcSelect', (evt) => { + this.treeGrid.findNext(this.searchBox.value, evt.detail, this.exactMatchChip.selected); + }); + this.exactMatchChip.addEventListener('igcSelect', (evt) => { + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, evt.detail); + }); +} +``` + ```tsx
- - Case Sensitive + + Case Sensitive - - Exact Match + + Exact Match
+ +function handleCaseSensitiveChange(chip: IgrChip, event: IgrComponentBoolValueChangedEventArgs) { + gridRef.current.findNext(searchText, event.detail, exactMatchChipRef.current.selected); +} +function handleExactMatchChange(chip: IgrChip, event: IgrComponentBoolValueChangedEventArgs) { + gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, event.detail); +} ``` ```razor @@ -876,7 +1322,10 @@ constructor() { nextIconButton.addEventListener("click", this.nextSearch); prevIconButton.addEventListener("click", this.prevSearch); } +``` + +```ts public nextSearch() { const grid = document.getElementById('grid') as IgcGridComponent; const caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent; @@ -891,6 +1340,20 @@ public prevSearch() { grid.findPrev(input.value, caseSensitiveChip.selected, exactMatchChip.selected); } ``` + + + +```ts +public prevSearch() { + this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); +} + +public nextSearch() { + this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected); +} +``` + + ```tsx @@ -977,7 +1440,6 @@ Additional components with relative APIs that were used: ## Additional Resources - * [Virtualization and Performance](virtualization.md) * [Filtering](filtering.md) * [Paging](paging.md) @@ -987,7 +1449,6 @@ Additional components with relative APIs that were used: * [Column Pinning](column-pinning.md) * [Column Resizing](column-resizing.md) * [Selection](selection.md) - Our community is active and always welcoming to new ideas. diff --git a/doc/en/components/grids/_shared/summaries.md b/doc/en/components/grids/_shared/summaries.md index c2597e482..bb9dbb9b9 100644 --- a/doc/en/components/grids/_shared/summaries.md +++ b/doc/en/components/grids/_shared/summaries.md @@ -42,6 +42,7 @@ All available column data types could be found in the official [Column types top `{ComponentName}` summaries are enabled per-column by setting `HasSummary` property to **true**. It is also important to keep in mind that the summaries for each column are resolved according to the column data type. In the `{ComponentName}` the default column data type is `string`, so if you want `number` or `date` specific summaries you should specify the `DataType` property as `number` or `date`. Note that the summary values will be displayed localized, according to the grid `Locale` and column `PipeArgs`. + ```html <{ComponentSelector} #grid1 [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)"> @@ -87,9 +88,76 @@ All available column data types could be found in the official [Column types top ``` + + + + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)"> + + + + + + + +``` + + +```razor +<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID"> + + + + + + + + + + + + +``` + + +```html + + + + + + + + + + + + + +``` + + +```tsx + + + + + + + + + + + + + +``` + The other way to enable/disable summaries for a specific column or a list of columns is to use the public method `EnableSummaries`/`DisableSummaries` of the `{ComponentName}`. + ```html <{ComponentSelector} #grid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)" > @@ -185,6 +253,101 @@ function disableSummary() { ``` + + + + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px"> + + + + + + + + +``` + + + +```html + + + + + + + + + +``` +```ts +constructor() { + var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}; + var enableBtn = this.enableBtn = document.getElementById('enableBtn') as HTMLButtonElement; + var disableBtn = this.disableBtn = document.getElementById('disableBtn') as HTMLButtonElement; + hierarchicalGrid.data = this.data; + enableBtn.addEventListener("click", this.enableSummary); + disableBtn.addEventListener("click", this.disableSummary); +} +``` + + + +```typescript +public enableSummary() { + this.hierarchicalGrid.enableSummaries([ + {fieldName: 'GrammyNominations'}, + {fieldName: 'GrammyAwards'} + ]); +} +public disableSummary() { + this.hierarchicalGrid.disableSummaries(['GrammyNominations']); +} +``` + + +```razor +<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID"> + + + + + + + +@code { + public async void DisableSummaries() + { + object[] disabledSummaries = { "GrammyNominations" }; + await this.hierarchicalGrid.DisableSummariesAsync(disabledSummaries); + } +} +``` + +```tsx +function enableSummary() { + hierarchicalGridRef.current.enableSummaries([ + {fieldName: 'GrammyNominations'}, + {fieldName: 'GrammyAwards'} + ]); +} +function disableSummary() { + hierarchicalGridRef.current.disableSummaries(['GrammyNominations']); +} + + + + + + + + + + +``` + ## Custom {ComponentTitle} Summaries @@ -298,7 +461,7 @@ See [Custom summaries, which access all data](#custom-summaries-which-access-all > [!Note] > In order to calculate the summary row height properly, the {ComponentTitle} needs the `Operate` method to always return an array of `SummaryResult` with the proper length even when the data is empty. - + And now let's add our custom summary to the column `UnitsInStock`. We will achieve that by setting the Summaries` property to the class we create below. ```html @@ -361,6 +524,67 @@ igRegisterScript("WebGridCustomSummary", (event) => { } }, false); ``` + + + +And now let's add our custom summary to the column `GrammyAwards`. We will achieve that by setting the Summaries` property to the class we create below. + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px"> + + + + + + +``` + + + +```html + + + + + + + +``` +```ts +constructor() { + var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}; + var grammyAwards = this.grammyAwards = document.getElementById('grammyAwards') as IgcColumnComponent; + hierarchicalGrid.data = this.data; + grammyAwards.summaries = this.mySummary; +} +``` + + +```typescript +export class HierarchicalGridComponent implements OnInit { + mySummary = MySummary; +} +``` + +```razor +<{ComponentSelector} + AutoGenerate="true" + Name="hierarchicalGrid" + @ref="hierarchicalGrid" + Data="SingersData" + PrimaryKey="ID" + ColumnInitScript="WebHierarchicalGridCustomSummary"> + + +// In Javascript +igRegisterScript("WebHierarchicalGridCustomSummary", (event) => { + if (event.detail.field === "GrammyAwards") { + event.detail.summaries = WebHierarchicalGridSummary; + } +}, false); +``` + + ### Custom summaries, which access all data Now you can access all {ComponentTitle} data inside the custom column summary. Two additional optional parameters are introduced in the SummaryOperand `Operate` method. @@ -409,6 +633,7 @@ class WebGridDiscontinuedSummary { } ``` + `sample="/{ComponentSample}/data-summaries-custom", height="650", alt="{Platform} {ComponentTitle} data summary custom"` @@ -420,6 +645,11 @@ class WebGridDiscontinuedSummary { `sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} data summary options"` + + + +`sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} data summary options"` + @@ -488,14 +718,8 @@ When a default summary is defined, the height of the summary area is calculated - - `sample="/{ComponentSample}/data-summary-template", height="650", alt="{Platform} {ComponentTitle} data summary template"` - - - - ## Formatting summaries By default, summary results, produced by the built-in summary operands, are localized and formatted according to the grid `Locale` and column `PipeArgs`. When using custom operands, the `Locale` and `PipeArgs` are not applied. If you want to change the default appearance of the summary results, you may format them using the `SummaryFormatter` property. @@ -536,20 +760,36 @@ constructor() { } ``` - - ```razor -igRegisterScript("SummaryFormatter", (summary, summaryOperand) => { - return summary.summaryResult + " rows"; -}, false); +igRegisterScript("SummaryFormatter", (summary) => { + const result = summary.summaryResult; + if (summaryOperand instanceof IgcDateSummaryOperand && summary.key !== "count" && result !== null && result !== undefined) { + const format = new Intl.DateTimeFormat("en", { year: "numeric" }); + return format.format(new Date(result)); + } + return result; +}, true); ``` -`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} data summary formatter"` - +```tsx +public summaryFormatter( + summary: IgrSummaryResult, + summaryOperand: IgrSummaryOperand + ): string { + const result = summary.summaryResult; + if (summary.key !== "count" && result !== null && result !== undefined) { + const format = new Intl.DateTimeFormat("en", { year: "numeric" }); + return format.format(new Date(result)); + } + return result; + } + + +``` - +`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} data summary formatter"` @@ -630,6 +870,7 @@ The summary rows can be navigated with the following keyboard interactions: In addition to the predefined themes, the grid could be further customized by setting some of the available [CSS properties](../theming.md). In case you would like to change some of the colors, you need to set a class for the grid first: + ```html <{ComponentSelector} class="grid"> ``` @@ -657,7 +898,37 @@ Then set the related CSS properties for that class: ### Demo `sample="/{ComponentSample}/groupby-summary-styling", height="710", alt="{Platform} {ComponentTitle} groupby summary styling"` + + + +```html +<{ComponentSelector} id="hierarchicalGrid"> +``` + +```razor +<{ComponentSelector} id="hierarchicalGrid"> +``` + +```tsx +<{ComponentSelector} id="hierarchicalGrid"> + +``` + +Then set the related CSS properties for that class: + +```css +#hierarchicalGrid { + --ig-grid-summary-background-color:#e0f3ff; + --ig-grid-summary-focus-background-color: rgba( #94d1f7, .3 ); + --ig-grid-summary-label-color: rgb(228, 27, 117); + --ig-grid-summary-result-color: black; +} +``` + +### Demo +`sample="/{ComponentSample}/data-summary-options-styling", height="710", alt="{Platform} {ComponentTitle} groupby summary styling"` + diff --git a/doc/en/components/grids/_shared/toolbar.md b/doc/en/components/grids/_shared/toolbar.md index b34313e6d..6b046f285 100644 --- a/doc/en/components/grids/_shared/toolbar.md +++ b/doc/en/components/grids/_shared/toolbar.md @@ -18,11 +18,19 @@ The {ProductName} Toolbar in is a container for UI operations in the {Platform} The toolbar and the predefined UI components support {Platform} events and expose API for developers. - + ## {Platform} Toolbar Grid Example +`sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} Toolbar Example"` + + + + +## {Platform} Toolbar Grid Example `sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} Toolbar Example"` + + The predefined `Actions` and `Title` UI components are added inside the `GridToolbar` and this is all needed to have a toolbar providing default interactions with the corresponding Grid features: @@ -59,7 +67,7 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo - Grid Toolbar + Grid Toolbar @@ -118,6 +126,7 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo ``` + ```html @@ -132,6 +141,11 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo ``` + + + + + ```html @@ -146,6 +160,45 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo ``` + + + + +```tsx + + + + Hierarchical Grid Toolbar + + + + + + + + + +``` + + + + + +```razor + + + Hierarchical Grid Toolbar + + + + + + + + +``` + + > [!Note] > As seen in the code snippet above, the predefined `Actions` UI components are wrapped in the `GridToolbarActions` container. This way, the toolbar title is aligned to the left of the toolbar and the actions are aligned to the right of the toolbar. @@ -196,6 +249,7 @@ Of course, each of these UIs can be added independently of each other, or may no ``` + ```html @@ -203,6 +257,11 @@ Of course, each of these UIs can be added independently of each other, or may no ``` + + + + + ```html @@ -210,13 +269,37 @@ Of course, each of these UIs can be added independently of each other, or may no ``` + -For a comprehensive look over each of the default UI components, continue reading the **Features** section below. + + +```razor + + + + +``` + + + +```tsx + + + + +``` + + +For a comprehensive look over each of the default UI components, continue reading the **Features** section below. + + + ## Toolbar with Child Grids + Due to certain limitations in how the child grids of an IgxHierarchicalGrid are implemented and how DI scope works, there is a caveat when using the toolbar in the scope of child grids. When defining a toolbar component inside the `igx-row-island` tags, always make sure to use the IgxGridToolbar and pass the provided grid instance as an input property to the toolbar itself. This will make sure you always have the correct grid instance in the scope of your template: @@ -236,8 +319,85 @@ This will make sure you always have the correct grid instance in the scope of yo ``` + + + +Due to certain limitations in how the child grids of an `{ComponentSelector}` are implemented and how DI scope works, to define a toolbar component inside the `{RowIslandSelector}`, use the `ToolbarTemplate` input property. This allows child grids to create their own separate toolbar instances: + + + + + +```ts +constructor() { + var rowIsland1 = document.getElementById('rowIsland1') as IgcRowIslandComponent; + rowIsland1.toolbarTemplate = this.rowIslandToolbarTemplate; +} + +public rowIslandToolbarTemplate = () => { + return html` + + + + + + + `; +} +``` + +```html + + ... + + + +``` + +```razor + + ... + + + + +//In JavaScript: +igRegisterScript("RowIslandToolbarTemplate", () => { + var html = window.igTemplating.html; + return html` + + + + + + + `; +}, false); +``` + +```tsx +function rowIslandToolbarTemplate = () => { + return ( + + + + + + + + + ); +} + + + ... + + + +``` + ## Features @@ -249,8 +409,15 @@ These features can be enabled independently from each other by following a patte Listed below are the main features of the toolbar with example code for each of them. + `sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} toolbar sample 2"` + + + +`sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} toolbar sample 2"` + + ### Title @@ -259,29 +426,47 @@ Setting a title for the toolbar in your grid is achieved by using the `GridToolb Users can provide anything from simple text to more involved templates. + + ```html Grid toolbar title ``` + + + + ```html Grid toolbar title ``` + + + + ```tsx - Grid toolbar title + + Grid toolbar title + ``` + + + + ```razor Grid toolbar title ``` + + ### Actions @@ -290,6 +475,8 @@ The `GridToolbarActions` is where users can place actions/interactions in relati As with the title portion of the toolbar, users can provide anything inside that template part, including the default toolbar interaction components. + + ```html @@ -299,15 +486,11 @@ toolbar interaction components. ``` + + -```razor - - - - - -``` - + + ```html @@ -315,15 +498,33 @@ toolbar interaction components. ``` + + + + +```razor + + + + + +``` + + + + + ```tsx - ``` + + + Each action now exposes a way to change the overlay settings of the actions dialog by using the `OverlaySettings` input. For example: @@ -386,6 +587,8 @@ The `GridToolbarPinning` component provides the default UI for interacting with The component is setup to work out of the box with the parent grid containing the toolbar as well as several input properties for customizing the UI, such as the component title, the placeholder for the component input and the height of the dropdown itself. + + ```html @@ -398,15 +601,11 @@ The component is setup to work out of the box with the parent grid containing th ``` + + -```razor - - - - - -``` - + + ```html @@ -418,7 +617,23 @@ The component is setup to work out of the box with the parent grid containing th ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -426,12 +641,16 @@ The component is setup to work out of the box with the parent grid containing th ``` + + ### Column Hiding The `GridToolbarHiding` provides the default UI for interacting with column hiding. Exposes the same input properties for customizing the UI, such as the component title, the placeholder for the component input and the height of the dropdown itself. + + ```html @@ -444,15 +663,11 @@ title, the placeholder for the component input and the height of the dropdown it ``` + + -```razor - - - - - -``` - + + ```html @@ -464,7 +679,23 @@ title, the placeholder for the component input and the height of the dropdown it ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -472,11 +703,15 @@ title, the placeholder for the component input and the height of the dropdown it ``` + + ### Advanced Filtering Toolbar Advanced Filtering component provides the default UI for the Advanced Filtering feature. The component exposes a way to change the default text of the button. + + ```html @@ -484,15 +719,11 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi ``` + + -```razor - - - - - -``` - + + ```html @@ -500,7 +731,23 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi ``` + + + + +```razor + + + + + +``` + + + + + ```tsx @@ -508,6 +755,8 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi ``` + + ### Data Exporting @@ -550,6 +799,8 @@ These range from changing the display text, to enabling/disabling options in the Here is a snippet showing some of the options which can be customized through the {Platform} template: + + ```html @@ -566,15 +817,11 @@ Here is a snippet showing some of the options which can be customized through th ``` + + -```razor - - - - - -``` - + + ```html @@ -583,7 +830,23 @@ Here is a snippet showing some of the options which can be customized through th ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -591,6 +854,8 @@ Here is a snippet showing some of the options which can be customized through th ``` + + In addition to changing the exported filename, the user can further configure the exporter options by waiting for the `ToolbarExporting` event and customizing the options entry in the event properties. @@ -601,6 +866,8 @@ In addition to changing the exported filename, the user can further configure th The following code snippet demonstrates subscribing to the toolbar exporting event and configuring the exporter options: + + ```html <{ComponentSelector} (toolbarExporting)="configureExport($event)" > @@ -691,6 +958,64 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { }); }, false); ``` + + + + + + +```html +<{ComponentSelector} id="hierarchicalGrid"> +``` +```ts +constructor() { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent; + hierarchicalGrid.addEventListener("toolbarExporting", this.configureExport); +} + +public configureExport(evt: CustomEvent) { + const args = evt.detail; + const options: IgcExporterOptionsBase = args.options; + if (options) { + options.fileName = `Report_${new Date().toDateString()}`; + (args.exporter as any).columnExporting.subscribe((columnArgs: any) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); + } +} +``` + + +```tsx +function configureExport(evt: IgrGridToolbarExportEventArgs) { + const args = evt.detail; + const options: IgrExporterOptionsBase = args.options; + + options.fileName = `Report_${new Date().toDateString()}`; + (args.exporter as any).columnExporting.subscribe((columnArgs: any) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); +} + +<{ComponentSelector} toolbarExporting={configureExport}> + +``` + +```razor +<{ComponentSelector} ToolbarExportingScript="ConfigureExport"> + +// In Javascript +igRegisterScript("ConfigureExport", (evt) => { + const args = evt.detail; + const options = args.options; + options.fileName = `Report_${new Date().toDateString()}`; + args.exporter.columnExporting.subscribe((columnArgs) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); +}, false); +``` + + The following sample demonstrates how to customize the exported files: @@ -698,7 +1023,6 @@ The following sample demonstrates how to customize the exported files: - ## Exporting Indicator @@ -713,17 +1037,22 @@ The sample belows uses has significant amount of data, in order to increase the `sample="/{ComponentSample}/data-exporting-indicator", height="370", alt="{Platform} {ComponentTitle} data exporting indicator"` - + ## Custom Content + + > [!Note] > This replaces the old toolbar template directive. If you are migrating from a version before v11 our migrations will handle the moving of the template content. However, we do not handle the bindings in the template, so make sure to double check the modified template files after the migration completes. + + If the actions part of the toolbar component is not sufficient for a particular use case, the toolbar itself has a general content projection where users can provide additional UI. If the user needs the respective grid instance for API calls or bindings, they can create a template reference variable. Here is a sample snippet: + ```html <{ComponentSelector} #gridRef> @@ -742,9 +1071,11 @@ Here is a sample snippet: ``` + + ```html <{ComponentSelector} id="grid"> @@ -758,13 +1089,52 @@ Here is a sample snippet: ``` + + + +```tsx +<{ComponentSelector}> + + + title + + {/* + Everything between the toolbar tags except the default toolbar components + will be projected as custom content. + */} + + + + +``` + + + + + +```razor +<{ComponentSelector}> + + title + @* + Everything between the toolbar tags except the default toolbar components + will be projected as custom content. + *@ + + + + +``` + + + The following sample demonstrates how to add an additional button to the toolbar to clear the sorting set by clicking on the columns' headers: `sample="/{ComponentSample}/toolbar-sample-4", height="420", alt="{Platform} {ComponentTitle} toolbar sample 4"` - + @@ -920,6 +1290,15 @@ The last step is to **include** the newly created themes. + + +## Known Limitations + +> [!Note] +> Currently, defining a toolbar component inside the {RowIslandSelector} is not supported. + + + ## API References The Grid Toolbar service has a few more APIs to explore, which are listed below. diff --git a/doc/en/components/grids/_shared/virtualization.md b/doc/en/components/grids/_shared/virtualization.md index 989f3d1cc..0bc8ae18f 100644 --- a/doc/en/components/grids/_shared/virtualization.md +++ b/doc/en/components/grids/_shared/virtualization.md @@ -12,11 +12,13 @@ namespace: Infragistics.Controls In {ProductName}, the `{ComponentName}` control virtualizes its content both vertically and horizontally. + + ## {Platform} {ComponentTitle} Virtualization and Performance Example `sample="/{ComponentSample}/data-performance-virtualization", height="550", alt="{Platform} {ComponentTitle} Virtualization and Performance Example"` - + ## Enabling Virtualization @@ -58,7 +60,6 @@ Without information about the sizes of the container and the items before render ## Additional Resources - * [Paging](paging.md) * [Filtering](filtering.md) * [Sorting](sorting.md) @@ -67,7 +68,6 @@ Without information about the sizes of the container and the items before render * [Column Pinning](column-pinning.md) * [Column Resizing](column-resizing.md) * [Selection](selection.md) - Our community is active and always welcoming to new ideas. diff --git a/doc/en/components/grids/data-grid.md b/doc/en/components/grids/data-grid.md index b31cd760b..6867821c3 100644 --- a/doc/en/components/grids/data-grid.md +++ b/doc/en/components/grids/data-grid.md @@ -60,7 +60,7 @@ namespace: Infragistics.Controls In this {ProductName} Grid example, you can see how users can do both basic and excel-style filtering, live-data sorting, and use grid summaries as well as cell templating. The demo also includes paging set to display 10 items per page. -`sample="/{GridSample}/overview", height="700", alt="{Platform} grid example"` +`sample="/{GridSample}/overview", img-src="https://static.infragistics.com/marketing/Website/products/ignite-ui-blazor/ignite-ui-blazor-client-grid", height="700", alt="{Platform} grid example"` @@ -70,7 +70,7 @@ In this {ProductName} Grid example, you can see how users can do both basic and ### Dependencies -To get started with the {Platform} Data Grid, first you need to install the {ProductName} package. +To get started with the {Platform} Data Grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages. @@ -92,15 +92,20 @@ Afterwards, you may start implementing the control by adding the following names ``` - -When installing the {Platform} grid package, the core, inputs and layout packages must also be installed. + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} -npm install --save {PackageLayouts} ``` + + + You also need to include the following import to use the grid: diff --git a/doc/en/components/grids/hierarchical-grid/load-on-demand.md b/doc/en/components/grids/hierarchical-grid/load-on-demand.md index f9f749745..2de0d97ca 100644 --- a/doc/en/components/grids/hierarchical-grid/load-on-demand.md +++ b/doc/en/components/grids/hierarchical-grid/load-on-demand.md @@ -10,7 +10,7 @@ namespace: Infragistics.Controls The Ignite UI for {Platform} `HierarchicalGrid` allows fast rendering by requesting the minimum amount of data to be retrieved from the server so that the user can see the result in view and interact with the visible data as quickly as possible. Initially only the root grid’s data is retrieved and rendered, only after the user expands a row containing a child grid, he will receive the data for that particular child grid. This mechanism, also known as Load on Demand, can be easily configured to work with any remote data. -This topic demonstrates how to configure Load on Demand by creating a Remote Service Provider that communicates with an already available remote oData v4 Service. Here's the working demo and later we will go through it step by step and describe the process of creating it. +This topic demonstrates how to configure Load on Demand by creating a Remote Service Provider that communicates with an already available remote service. Here's the working demo and later we will go through it step by step and describe the process of creating it. ## {Platform} Hierarchical Grid Load On Demand Example @@ -28,26 +28,25 @@ We will be communicating with our backend service over HTTP protocol using the X ```typescript public getData(dataState): Observable { return this.http.get(this.buildUrl(dataState)).pipe( - map(response => response['value']), + map(response => response), ); } ``` -As you can see `this.http` will be a reference to our `HttpCLient` module, and `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return an Observable, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. +As you can see `this.http` will be a reference to our `HttpCLient` module, and `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response and return an Observable, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. We will be communicating with our backend service over HTTP protocol using the [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) global function the browsers provide. That way in order to get our data we will need this simple method in our service: ```ts -function getData(dataState) { +export function getData(dataState: any): any { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data['value']); + .then((result) => result.json()); } ``` -As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. +As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. @@ -56,17 +55,16 @@ We will be communicating with our backend service over HTTP protocol using the [ ```razor function getData(dataState) { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data['value']); + .then((result) => result.json()); } ``` -As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. +As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid. #### Building our request url -Next we will define how we should build our URL for the GET request. This is where we will be able to get the data for our main grid but also for any child grid inside it. We will use the `Customers` data from [here](https://services.odata.org/V4/Northwind/Northwind.svc/) for our root level and use `Order` and `Order_Details` for the lower levels. The model will differ per application but we will use the following one: +Next we will define how we should build our URL for the GET request. This is where we will be able to get the data for our main grid but also for any child grid inside it. We will use the `Customers` data from [here](https://data-northwind.indigo.design/swagger/index.html) for our root level and use `Orders` and `Details` for the lower levels. The model will differ per application but we will use the following one: @@ -87,14 +85,10 @@ export interface IDataState { public buildUrl(dataState: IDataState): string { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${this.url}${qS}`; @@ -119,14 +113,10 @@ const dataState: { function buildUrl(dataState: any) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${URL}${qS}`; @@ -150,17 +140,13 @@ const dataState: { function buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } - return `${URL}${qS}`; + return `${DATA_URL}${qS}`; } ``` @@ -185,27 +171,23 @@ export interface IDataState { @Injectable() export class RemoteLoDService { - url = `https://services.odata.org/V4/Northwind/Northwind.svc/`; + public url = `https://data-northwind.indigo.design/`; constructor(private http: HttpClient) { } public getData(dataState: IDataState): Observable { return this.http.get(this.buildUrl(dataState)).pipe( - map((response) => response['value']) + map((response) => response) ); } public buildUrl(dataState: IDataState): string { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${this.url}${qS}`; @@ -218,25 +200,20 @@ export class RemoteLoDService { Finally, this is how our remote service would look like: ```ts -const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; +const URL = `https://data-northwind.indigo.design/`; -export function getData(dataState?: any): any { +export function getData(dataState: any): any { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState: any) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${URL}${qS}`; @@ -248,28 +225,23 @@ function buildUrl(dataState: any) { Finally, this is how our remote service would look like: ```razor -const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; +const DATA_URL = `https://data-northwind.indigo.design/`; -function getData(dataState): any { +function getData(dataState) { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } - return `${URL}${qS}`; + return `${DATA_URL}${qS}`; } ``` @@ -280,28 +252,28 @@ Next we will setup our hierarchical grid and connect it to our remote service pr #### Template defining -First we will define our hierarchical grid template with the levels of hierarchy that we expect to have. We know that our root grid `PrimaryKey` for the customers is their `CustomerID`, for their orders on the first level - `OrderID` and respectively for order details - `ProductID`. Knowing each database table and their keys allows us to define our initial template: +First we will define our hierarchical grid template with the levels of hierarchy that we expect to have. We know that our root grid `PrimaryKey` for the customers is their `customerId`, for their orders on the first level - `orderId` and respectively for order details - `productId`. Knowing each database table and their keys allows us to define our initial template: ```html - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + @@ -310,25 +282,25 @@ First we will define our hierarchical grid template with the levels of hierarchy ```html - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + ``` @@ -336,25 +308,25 @@ First we will define our hierarchical grid template with the levels of hierarchy ```tsx - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + ``` @@ -362,24 +334,24 @@ First we will define our hierarchical grid template with the levels of hierarchy ```razor - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -432,24 +404,24 @@ The template file, with these changes added, would look like this: ```html - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + @@ -458,25 +430,25 @@ The template file, with these changes added, would look like this: ```html - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + ``` @@ -486,11 +458,11 @@ constructor() { const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); ordersRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "CustomerID"); + this.gridCreated(event, "Customers"); }); orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "OrderID"); + this.gridCreated(event, "Orders"); }); } ``` @@ -498,38 +470,38 @@ constructor() { ```tsx - - - - - - - + + + + + + + gridCreated(rowIsland, e, "CustomerID")} + childDataKey="Orders" + primaryKey="orderId" + gridCreated={( + rowIsland: IgrRowIsland, + e: IgrGridCreatedEventArgs + ) => gridCreated(rowIsland, e, "Customers")} > - - - - - + + + + + gridCreated(rowIsland, e, "OrderID")} + childDataKey="Details" + primaryKey="productId" + gridCreated={( + rowIsland: IgrRowIsland, + e: IgrGridCreatedEventArgs + ) => gridCreated(rowIsland, e, "Orders")} > - - - - + + + + @@ -538,24 +510,24 @@ constructor() { ```razor - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -719,7 +691,7 @@ function gridCreated(rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, _p ```razor igRegisterScript("OnGridCreated", (args) => { const context = args.detail; - const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID"; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; const dataState = { key: context.owner.childDataKey, parentID: context.parentID, @@ -802,11 +774,11 @@ constructor() { const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); ordersRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "CustomerID"); + this.gridCreated(event, "Customers"); }); orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "OrderID"); + this.gridCreated(event, "Orders"); }); hierarchicalGrid.isLoading = true; @@ -891,7 +863,7 @@ igRegisterScript("OnGridRendered", () => { igRegisterScript("OnGridCreated", (args) => { const context = args.detail; - const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID"; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; const dataState = { key: context.owner.childDataKey, parentID: context.parentID, diff --git a/doc/en/components/grids/hierarchical-grid/overview.md b/doc/en/components/grids/hierarchical-grid/overview.md index 6bc5b02c1..e7c8f8a84 100644 --- a/doc/en/components/grids/hierarchical-grid/overview.md +++ b/doc/en/components/grids/hierarchical-grid/overview.md @@ -20,7 +20,7 @@ In this {Platform} grid example you can see how users can visualize hierarchical ### Dependencies -To get started with the {Platform} hierarchical grid, first you need to install the {ProductName} package. +To get started with the {Platform} hierarchical grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages. @@ -43,16 +43,20 @@ Afterwards, you may start implementing the control by adding the following names - - -When installing the {Platform} hierarchical grid package, the core package must also be installed. + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} -npm install --save {PackageLayouts} ``` + + + You also need to include the following import to use the grid: @@ -252,9 +256,9 @@ Most applications are designed to load as little data as possible initially, whi ```html - - - + + + @@ -303,27 +307,23 @@ export class HierarchicalGridLoDSampleComponent implements AfterViewInit { @Injectable() export class RemoteLoDService { - public url = `https://services.odata.org/V4/Northwind/Northwind.svc/`; + public url = `https://data-northwind.indigo.design/`; constructor(private http: HttpClient) { } - public getData(dataState?: any): Observable { + public getData(dataState: any): Observable { return this.http.get(this.buildUrl(dataState)).pipe( - map((response) => response["value"]) + map((response) => response) ); } public buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${this.url}${qS}`; @@ -334,9 +334,9 @@ export class RemoteLoDService { ```html - - - + + + ``` @@ -349,13 +349,16 @@ export class HierarchicalGridLoadOnDemand { const hierarchicalGrid = document.getElementById("hGrid") as IgcHierarchicalGridComponent; const ordersRowIsland = document.getElementById("ordersRowIsland"); const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); + ordersRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "CustomerID"); + this.gridCreated(event, "Customers"); }); orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "OrderID"); + this.gridCreated(event, "Orders"); }); + hierarchicalGrid.isLoading = true; + getData({ parentID: null, rootLevel: true, key: "Customers" }).then((data: any) => { hierarchicalGrid.isLoading = false; hierarchicalGrid.data = data; @@ -386,7 +389,8 @@ export class HierarchicalGridLoadOnDemand { import { getData } from "./remoteService"; export default function Sample() { - const hierarchicalGrid = useRef(null); + const hierarchicalGrid = useRef(null); + function gridCreated( rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, @@ -406,6 +410,7 @@ export default function Sample() { context.grid.markForCheck(); }); } + useEffect(() => { hierarchicalGrid.current.isLoading = true; getData({ parentID: null, rootLevel: true, key: "Customers" }).then( @@ -420,28 +425,28 @@ export default function Sample() { return ( gridCreated(rowIsland, e, "CustomerID")} + ) => gridCreated(rowIsland, e, "Customers")} > gridCreated(rowIsland, e, "OrderID")} + ) => gridCreated(rowIsland, e, "Orders")} > @@ -451,24 +456,20 @@ export default function Sample() { ```ts -const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; -export function getData(dataState?: any): any { +const URL = `https://data-northwind.indigo.design/`; + +export function getData(dataState: any): any { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState: any) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${URL}${qS}`; @@ -477,10 +478,10 @@ function buildUrl(dataState: any) { ```razor - - - + + @@ -498,7 +499,7 @@ igRegisterScript("OnGridRendered", () => { igRegisterScript("OnGridCreated", (args) => { const context = args.detail; - const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID"; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; const dataState = { key: context.owner.childDataKey, parentID: context.parentID, @@ -513,24 +514,20 @@ igRegisterScript("OnGridCreated", (args) => { }); }, false) -const DATA_URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; +const DATA_URL = `https://data-northwind.indigo.design/`; + function getData(dataState) { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${DATA_URL}${qS}`; diff --git a/doc/en/components/grids/tree-grid/overview.md b/doc/en/components/grids/tree-grid/overview.md index 6c82d4ae6..4a2c2bc31 100644 --- a/doc/en/components/grids/tree-grid/overview.md +++ b/doc/en/components/grids/tree-grid/overview.md @@ -23,7 +23,7 @@ In this example, you can see how users can manipulate hierarchical or flat data. ### Dependencies -To get started with the {Platform} tree grid, first you need to install the {ProductName} package. +To get started with the {Platform} tree grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages. @@ -48,13 +48,18 @@ Afterwards, you may start implementing the control by adding the following names -When installing the {Platform} tree grid package, the core package must also be installed. + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} ``` + diff --git a/doc/en/components/inputs/combo/features.md b/doc/en/components/inputs/combo/features.md index 0569e39fc..c4cb5b94b 100644 --- a/doc/en/components/inputs/combo/features.md +++ b/doc/en/components/inputs/combo/features.md @@ -43,8 +43,38 @@ You will also need to link an additional CSS file to apply the styling to the `S + + +```tsx +import { IgrComboModule, IgrCombo, IgrSwitchModule, IgrSwitch } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrComboModule.register(); +IgrSwitchModule.register(); +``` + + + Then, we will add event handlers to all switch components so that we can control the combo features by toggling the switches: +```tsx +const comboRef = useRef(null); +const switchCaseSensitiveRef = useRef(null); + +const disableFiltering = (switchComponent: IgrSwitch) => { + comboRef.current.disableFiltering = + switchCaseSensitiveRef.current.disabled = switchComponent.checked; +}; + +const showCaseSensitiveIcon = (switchComponent: IgrSwitch) => { + comboRef.current.caseSensitiveIcon = switchComponent.checked; +}; + +const disableCombo = (switchComponent: IgrSwitch) => { + comboRef.current.disabled = switchComponent.checked; +}; +``` + ```ts let combo = document.getElementById('combo') as IgcComboComponent; @@ -126,6 +156,12 @@ switchGroup.addEventListener("igcChange", () => { } ``` +```tsx +const enableGrouping = (switchComponent: IgrSwitch) => { + comboRef.current.groupKey = switchComponent.checked ? "country" : undefined; +}; +``` + ## Features ### Filtering @@ -142,12 +178,17 @@ Filtering options can be further enhanced by enabling the search case sensitivit ``` +```tsx + +``` + #### Filtering Options The {ProductName} `ComboBox` component exposes one more filtering property that allows passing configuration of both `FilterKey` and `CaseSensitive` options. The `FilterKey` indicates which data source field should be used for filtering the list of options. The `CaseSensitive` option indicates if the filtering should be case-sensitive or not. The following code snippet shows how to filter the cities from our data source by country instead of name. We are also making the filtering case-sensitive by default: + ```ts const options = { filterKey: 'country', @@ -156,6 +197,18 @@ const options = { combo.filteringOptions = options; ``` + + + +```tsx +const options = { + filterKey: 'country', + caseSensitive: true +}; + +comboRef.current.filteringOptions = options; +``` + ### Grouping @@ -169,6 +222,10 @@ Defining a `GroupKey` option will group the items, according to the provided key ``` +```tsx + +``` + > [!Note] > The `GroupKey` property will only have effect if your data source consists of complex objects. @@ -184,6 +241,10 @@ The ComboBox component also exposes an option for setting whether groups should ``` +```tsx + +``` + ### Label The `Combo` label can be set easily using the `Label` property: @@ -196,6 +257,10 @@ The `Combo` label can be set easily using the `Label` property: ``` +```tsx + +``` + ### Placeholder A placeholder text can be specified for both the ComboBox component input and the search input placed inside the dropdown menu: @@ -208,6 +273,10 @@ A placeholder text can be specified for both the ComboBox component input and th ``` +```tsx + +``` + ### Autofocus If you want your ComboBox to be automatically focused on page load you can use the following code: @@ -220,6 +289,10 @@ If you want your ComboBox to be automatically focused on page load you can use t ``` +```tsx + +``` + ### Search Input Focus The ComboBox search input is focused by default. To disable this feature and move the focus to the list of options use the `AutofocusList` property as shown below: @@ -232,6 +305,10 @@ The ComboBox search input is focused by default. To disable this feature and mov ``` +```tsx + +``` + ### Required The ComboBox can be marked as required by setting the required property. @@ -244,6 +321,10 @@ The ComboBox can be marked as required by setting the required property. ``` +```tsx + +``` + ### Disable ComboBox You can disable the ComboBox using the `Disabled` property: @@ -256,6 +337,10 @@ You can disable the ComboBox using the `Disabled` property: ``` +```tsx + +``` + ## API Reference diff --git a/doc/en/components/inputs/combo/overview.md b/doc/en/components/inputs/combo/overview.md index eaceff02c..3a51aa942 100644 --- a/doc/en/components/inputs/combo/overview.md +++ b/doc/en/components/inputs/combo/overview.md @@ -58,6 +58,25 @@ You will also need to link an additional CSS file to apply the styling to the `C ``` + + +First, you need to the install the corresponding {ProductName} npm package by running the following command: + +```cmd +npm install igniteui-react +``` + +You will then need to import the {Platform} `ComboBox`, its necessary CSS, and register its module, like so: + +```tsx +import { IgrComboModule, IgrCombo } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrComboModule.register(); +``` + + + >[!WARNING] > The `Combo` component doesn't work with the standard `
` element. Use `Form` instead. @@ -119,6 +138,26 @@ export class Sample { } ``` +```tsx +interface City { + id: string; + name: string; +} + +const cities: City[] = [ + { name: "London", id: "UK01" }, + { name: "Sofia", id: "BG01" }, + { name: "New York", id: "NY01" }, +]; + + +``` + ### Data value and display properties When the combo is bound to a list of complex data (i.e. objects), we need to specify a property that the control will use to handle item selection. The component exposes the following properties: @@ -148,6 +187,16 @@ console.log(combo.value); combo.value = ['NY01', 'UK01']; ``` +```tsx +const comboRef = useRef(null); + +// Given the overview example from above this will return ['BG01'] +console.log(comboRef.current.value); + +// Change the selected items to New York and London +comboRef.current.value = ['NY01', 'UK01']; +``` + ### Selection API The combo component exposes APIs that allow you to change the currently selected items. @@ -155,11 +204,13 @@ The combo component exposes APIs that allow you to change the currently selected Besides selecting items from the list of options by user interaction, you can select items programmatically. This is done via the `select` and `deselect` methods. You can pass an array of items to both methods. If the methods are called with no arguments all items will be selected/deselected depending on which method is called. If you have specified a `ValueKey` for your combo component, then you should pass the value keys of the items you would like to select/deselect: #### Select/deselect some items: + ```ts // Select/deselect items by their IDs as valueKey is set to 'id' combo.select(['BG01', 'BG02', 'BG03', 'BG04']); combo.deselect(['BG01', 'BG02', 'BG03', 'BG04']); ``` + ```razor +```tsx +// Select/deselect items by their IDs as valueKey is set to 'id' +comboRef.current.select(["UK01", "UK02", "UK03", "UK04", "UK05"]); +comboRef.current.deselect(["UK01", "UK02", "UK03", "UK04", "UK05"]); +``` + + #### Select/deselect all items: + ```ts // Select/deselect all items combo.select(); combo.deselect(); ``` + ```razor @code { @@ -210,13 +271,31 @@ combo.deselect(); } ``` + +```tsx +// Select/deselect all items +comboRef.current.select([]); +comboRef.current.deselect([]); +``` + + If the `ValueKey` property is omitted, you will have to list the items you wish to select/deselect as objects references: + ```ts // Select/deselect values by object references when no valueKey is provided combo.select([cities[1], cities[5]]); combo.deselect([cities[1], cities[5]]); ``` + + + +```tsx +// Select/deselect values by object references when no valueKey is provided +comboRef.current.select([cities[1], cities[5]]); +comboRef.current.deselect([cities[1], cities[5]]); +``` + `sample="/inputs/combo/selection", height="380", alt="{Platform} Combo Selection Example"` diff --git a/doc/en/components/inputs/combo/single-selection.md b/doc/en/components/inputs/combo/single-selection.md index 958472d79..24f662e5e 100644 --- a/doc/en/components/inputs/combo/single-selection.md +++ b/doc/en/components/inputs/combo/single-selection.md @@ -21,6 +21,10 @@ To enable single-selection and quick filtering, set the `SingleSelect` property ``` +```tsx + +``` + `sample="/inputs/combo/simplified", height="400", alt="{Platform} Single Selection Combo Example"`
@@ -35,10 +39,12 @@ Here's how to select/deselect an item programmatically in a single selection com #### Selecting items: + ```ts // select the item matching the 'BG01' value of the value key field. combo.select('BG01'); ``` + ```razor @@ -50,14 +56,23 @@ combo.select('BG01'); } ``` + +```tsx +// select the item matching the 'BG01' value of the value key field. +comboRef.current.select('BG01'); +``` + + To deselect an item without making a new selection, call the `deselect` method. #### Deselecting items: + ```ts // deselect the item matching the 'BG01' value of the value key field. combo.deselect('BG01'); ``` + ```razor @@ -69,6 +84,13 @@ combo.deselect('BG01'); } ``` + +```tsx +// deselect the item matching the 'BG01' value of the value key field. +comboRef.current.deselect('BG01'); +``` + + ## Disabled features Naturally, some configuration options will have no effect in a single selection ComboBox. diff --git a/doc/en/components/inputs/combo/templates.md b/doc/en/components/inputs/combo/templates.md index 13ad32ee6..196d6b855 100644 --- a/doc/en/components/inputs/combo/templates.md +++ b/doc/en/components/inputs/combo/templates.md @@ -21,6 +21,7 @@ The {ProductName} ComboBox component allows defining custom templates for differ The `itemTemplate` is a custom template that if defined should be used when rendering items in the list of options. + ```ts import { ComboItemTemplate } from 'igniteui-webcomponents'; @@ -32,6 +33,7 @@ const itemTemplate: ComboItemTemplate = ({ item }) => { combo.itemTempate = itemTemplate; ``` + To template your items in a Blazor app, you need to define a template in a separate JavaScript file. Let's create a new file under the `wwwroot` directory called `templates.js`. @@ -62,13 +64,31 @@ Then in our application we can refer to the template we declared via the `ItemTe ```razor ``` - + +```tsx + + +function renderItemTemplate(props: { dataContext: any}): any { + return ( + {props.dataContext.name} [{props.dataContext.id}] + ); +} +``` + + ### Group Header Template The `groupHeaderTemplate` is a custom template that if defined should be used when rendering group headers in the list of options. + ```ts import { ComboItemTemplate } from 'igniteui-webcomponents'; @@ -78,6 +98,7 @@ const groupHeaderTemplate: ComboItemTemplate = ({ item }) => { combo.groupHeaderTemplate = groupHeaderTemplate; ``` + First define the group header template: @@ -97,9 +118,26 @@ Then in our application we can refer to the template we declared via the `GroupH ```razor ``` - + +```tsx + + +function renderGroupHeaderTemplate(props: { dataContext: any}): any { + return ( + Country of {props.dataContext.country} + ); +} +``` + + ## Slots Other than custom templates, the {ProductName} ComboBox component exposes several slots that allow users to pass custom content to different combo parts. @@ -120,6 +158,14 @@ To render a custom header above the list of options pass content to the `header`
``` +```tsx + +
+ Header content goes here +
+
+``` + ### Footer Slot To render a custom footer below the list of options pass content to the `footer` slot: @@ -137,6 +183,14 @@ To render a custom footer below the list of options pass content to the `footer` ``` +```tsx + +
+ Footer content goes here +
+
+``` + ### Empty List Slot To render a custom content when the filtering operation returns no result, use the `empty` slot: @@ -152,6 +206,12 @@ To render a custom content when the filtering operation returns no result, use t ``` +```tsx + +
¯\_(ツ)_/¯
+
+``` + ### Toggle Icon Slot The toggle icon in the combo input can also be modified via the `toggle-icon` slot: @@ -167,6 +227,14 @@ The toggle icon in the combo input can also be modified via the `toggle-icon` sl ``` +```tsx + + + + + +``` + ### Clear Icon Slot The clear icon can be changed via the `clear-icon` slot: @@ -182,6 +250,14 @@ The clear icon can be changed via the `clear-icon` slot: ``` +```tsx + + + + + +``` + ## API Reference diff --git a/doc/en/components/inputs/date-time-input.md b/doc/en/components/inputs/date-time-input.md index 8092b0385..4d13bd7b2 100644 --- a/doc/en/components/inputs/date-time-input.md +++ b/doc/en/components/inputs/date-time-input.md @@ -33,14 +33,44 @@ For a complete introduction to the {ProductName}, read the [*Getting Started*](. + + +First, you need to the install the corresponding {ProductName} npm package by running the following command: + +```cmd +npm install igniteui-react +``` + +You will then need to import the `DateTimeInput`, its necessary CSS, and register its module, like so: + +```tsx +import { IgrDateTimeInput, IgrDateTimeInputModule } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; +IgrDateTimeInputModule.register(); +``` + + + Before using the `DateTimeInput`, you need to register it as follows: +```razor +// in Program.cs file + +builder.Services.AddIgniteUIBlazor(typeof(IgbDateTimeInputModule)); +``` + +You will also need to link an additional CSS file to apply the styling to the `DateTimeInput` component. The following needs to be placed in the **wwwroot/index.html** file in a **Blazor Web Assembly** project or the **Pages/_Host.cshtml** file in a **Blazor Server** project: + +```razor + +``` + ### Value binding -The easiest way to set the value of the `DateTimeInput` component is by passing a Date object to the `value` property: +The easiest way to set the value of the `DateTimeInput` component is by passing a Date object to the `Value` property: ```typescript const input = document.querySelector('igc-date-time-input') as IgcDateTimeInputComponent; @@ -49,12 +79,27 @@ const date = new Date(); input.value = date; ``` +```tsx +public dateTimeInputRef(input: IgrDateTimeInput) { + if (!input) { return; } + input.value = new Date(); +} +``` + +```razor + + + +``` + + + The `DateTimeInput` also accepts [ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format) strings. The string can be a full `ISO` string, in the format `YYYY-MM-DDTHH:mm:ss.sssZ` or it could be separated into date-only and time-only portions. ##### Date-only -If a date-only string is bound to the `value` property of the component, it needs to be in the format `YYYY-MM-DD`. The `inputFormat` is still used when typing values in the input and it does not have to be in the same format. Additionally, when binding a date-only string, the directive will prevent time shifts by coercing the time to be `T00:00:00`. +If a date-only string is bound to the `Value` property of the component, it needs to be in the format `YYYY-MM-DD`. The `InputFormat` is still used when typing values in the input and it does not have to be in the same format. Additionally, when binding a date-only string, the directive will prevent time shifts by coercing the time to be `T00:00:00`. ##### Time-only Time-only strings are normally not defined in the `ECMA` specification, however to allow the directive to be integrated in scenarios which require time-only solutions, it supports the 24 hour format - `HH:mm:ss`. The 12 hour format is not supported. @@ -64,6 +109,8 @@ If a full `ISO` string is bound, the directive will parse it only if all element All falsy values, including `InvalidDate` will be parsed as `null`. Incomplete date-only, time-only, or full `ISO` strings will be parsed as `InvalidDate`. + + ### Keyboard Navigation The `DateTimeInput` has intuitive keyboard navigation that makes it easy to increment, decrement, or jump through different `DateParts` among others without having to touch the mouse. @@ -84,10 +131,10 @@ The `DateTimeInput` has intuitive keyboard navigation that makes it easy to incr The `DateTimeInput` supports different display and input formats. -It uses [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) which allows it to support predefined format options, such as `long` and `short`, `medium` and `full`. Additionally, it can also accept a custom string constructed from supported characters, such as `dd-MM-yy`. Also, if no `displayFormat` is provided, the component will use the `inputFormat` as such. +It uses [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) which allows it to support predefined format options, such as `long` and `short`, `medium` and `full`. Additionally, it can also accept a custom string constructed from supported characters, such as `dd-MM-yy`. Also, if no `DisplayFormat` is provided, the component will use the `InputFormat` as such. ### Input Format -The table bellow shows formats that are supported by the component's `inputFormat`: +The table bellow shows formats that are supported by the component's `InputFormat`: |Format|Description| |-------|----------| @@ -105,12 +152,22 @@ The table bellow shows formats that are supported by the component's `inputForma | `mm` | Minutes with an explicitly set leading zero. | | `tt` | AM/PM section for 12-hour format. | -To set a specific input format, pass it as a string to the `DateTimeInput`. This will set both the expected user input format and the `mask`. Additionally, the `inputFormat` is locale based, so if none is provided, the editor will default to `dd/MM/yyyy`. +To set a specific input format, pass it as a string to the `DateTimeInput`. This will set both the expected user input format and the `mask`. Additionally, the `InputFormat` is locale based, so if none is provided, the editor will default to `dd/MM/yyyy`. ```html ``` +```tsx + +``` + +```razor + + + +``` + If all went well, you should see the following in your browser: `sample="/inputs/date-time-input/input-format-display-format", height="150", alt="{Platform} Date Time Input Input Format Display Format Example"` @@ -170,16 +227,33 @@ Furthermore, users can construct a displayFormat string using the supported symb ## Min/max value -You can specify `minValue` and `maxValue` properties to restrict input and control the validity of the component. Just like the `value` property, they can be of type `string`. +You can specify `Min` and `Max` properties to restrict input and control the validity of the component. Just like the `Value` property, they can be of type `string`. ```ts const input = document.querySelector('igc-date-time-input') as IgcDateTimeInputComponent; -input.minValue = new Date(2021, 0, 1); +input.min = new Date(2021, 0, 1); ``` ```html - + +``` + +```tsx +public dateTimeInputRef(input: IgrDateTimeInput) { + if (!input) { return; } + input.min = new Date(2021, 0, 1); +} +``` + +```tsx + +``` + +```razor + + + ``` If all went well, the component will be `invalid` if the value is greater or lower than the given dates. Check out the example below: @@ -188,11 +262,15 @@ If all went well, the component will be `invalid` if the value is greater or low ## Step up/down -The `DateTimeInput` exposes public `stepUp` and `stepDown` methods. They increment or decrement a specific `DatePart` of the currently set date and time and can be used in a couple of ways. +The `DateTimeInput` exposes public `StepUp` and `StepDown` methods. They increment or decrement a specific `DatePart` of the currently set date and time and can be used in a couple of ways. + +In the first scenario, if no specific DatePart is passed to the method, a default DatePart will increment or decrement, based on the specified `InputFormat` and the internal component implementation. In the second scenario, you can explicitly specify what DatePart to manipulate as it may suite different requirements. Also, both methods accept an optional `delta` parameter of type number which can be used to set the stepUp/stepDown step. + + -In the first scenario, if no specific DatePart is passed to the method, a default DatePart will increment or decrement, based on the specified `inputFormat` and the internal component implementation. In the second scenario, you can explicitly specify what DatePart to manipulate as it may suite different requirements. Also, both methods accept an optional `delta` parameter of type number which can be used to set the stepUp/stepDown step. +Additionally, `SpinDelta` is a property that can be used to apply a different delta to each date time segment. It will be applied when spinning with the keyboard, mouse wheel or with the `StepUp` and `StepDown` methods, as long as they don't have the delta parameter provided since it will take precedence over `SpinDelta`. -Additionally, `spinDelta` is a property that can be used to apply a different delta to each date time segment. It will be applied when spinning with the keyboard, mouse wheel or with the `stepUp` and `stepDown` methods, as long as they don't have the delta parameter provided since it will take precedence over `spinDelta`. + ```ts const input = document.getElementById('dateTimeInput') as IgcDateTimeInputComponent; diff --git a/doc/en/components/layouts/tabs.md b/doc/en/components/layouts/tabs.md index d7a11d6e0..443c25be9 100644 --- a/doc/en/components/layouts/tabs.md +++ b/doc/en/components/layouts/tabs.md @@ -29,8 +29,24 @@ npm install {PackageWebComponents} + + +First, you need to the install the corresponding {ProductName} npm package by running the following command: + +```cmd +npm install igniteui-react +``` + + + Before using the `Tabs`, you need to register it as follows: +```tsx +import { IgrTabsModule, IgrTabs, IgrTab, IgrTabPanel} from "igniteui-react"; + +IgrTabsModule.register(); +``` + ```razor // in Program.cs file @@ -70,6 +86,17 @@ Simple `Tabs` declaration is done as follows: ``` +```tsx + + Tab 1 + Tab 2 + Tab 3 + Panel 1 + Panel 2 + Panel 3 + +``` + ### Selection The `Tabs` emits `Change` event when the user selects an item either by key press or click. The `Select` method allows you to select a tab by specifying its panel as string value. @@ -90,6 +117,10 @@ A tab is disabled by setting the `Disabled` attribute: Tab 1 ``` +```tsx +Tab 1 +``` + ### Alignment The `Alignment` property controls how {Platform} tabs are positioned. It accepts the following values: @@ -131,7 +162,7 @@ Each tab has default slot to display information - icon, text or both and `prefi -### Styling +## Styling The `Tabs` component exposes CSS parts for all of its elements: diff --git a/doc/en/components/linear-gauge.md b/doc/en/components/linear-gauge.md index 0e4c63f30..fd5e6cf19 100644 --- a/doc/en/components/linear-gauge.md +++ b/doc/en/components/linear-gauge.md @@ -254,6 +254,87 @@ This is the primary measure displayed by the linear gauge component and is visua `sample="/gauges/linear-gauge/needle", height="125", alt="{Platform} linear gauge needle"` +## Highlight Needle + +The linear gauge can be modified to show a second needle. This will make the main needle's `Value` appear with a lower opacity. To enable this first set `HighlightValueDisplayMode` to Overlay and then apply a `HighlightValue`. + +```html + + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/linear-gauge/highlight-needle", height="125", alt="{Platform} linear gauge highlight needle"` ## Ranges The ranges are visual elements that highlight a specified range of values on a scale. Their purpose is to visually communicate the qualitative state of the performance bar measure, illustrating at the same times the degree to which it resides within that state. diff --git a/doc/en/components/radial-gauge.md b/doc/en/components/radial-gauge.md index f2936624a..5c931f98d 100644 --- a/doc/en/components/radial-gauge.md +++ b/doc/en/components/radial-gauge.md @@ -649,6 +649,75 @@ You can enable an interactive mode of the gauge (using `IsNeedleDraggingEnabled` `sample="/gauges/radial-gauge/needle", height="320", alt="{Platform} radial gauge needle"` +## Highlight Needle + +The radial gauge can be modified to show a second needle. This will make the main needle's `Value` appear with a lower opacity. To enable this first set `HighlightValueDisplayMode` to Overlay and then apply a `HighlightValue`. + +```html + + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/radial-gauge/highlight-needle", height="320", alt="{Platform} radial gauge highlight needle"` ## Summary For your convenience, all above code snippets are combined into one code block below that you can easily copy to your project and see the radial gauge with all features and visuals enabled. diff --git a/doc/jp/components/bullet-graph.md b/doc/jp/components/bullet-graph.md index 0f483f953..f212854d2 100644 --- a/doc/jp/components/bullet-graph.md +++ b/doc/jp/components/bullet-graph.md @@ -258,9 +258,83 @@ MaximumValue="55" TargetValue="43"> `sample="/gauges/bullet-graph/measures", height="125", alt="{Platform} ブレット グラフ メジャー"` +## ハイライト値 + +バレット グラフのパフォーマンス値をさらに変更して、進捗状況をハイライト値として表示することもできます。これにより、`Value` が低い不透明度で表示されます。良い例としては、`Value` が 50 で、`HighlightValue` が 25 に設定されている場合です。これは、`TargetValue` の値が何に設定されているかに関係なく、50% のパフォーマンスを表します。これを有効にするには、まず `HighlightValueDisplayMode` を Overlay に設定し、次に `HighlightValue` を `Value` よりも低い値に適用します。 + +```html + + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/bullet-graph/highlight-needle", height="125", alt="{Platform} バレット グラフの針のハイライト"` ## 比較範囲 -範囲はスケールで指定した値の範囲を強調表示する視覚的な要素です。その目的は、パフォーマンス バー メジャーの質的状態を視覚で伝えると同時に、その状態をレベルとして示すことにあります。 +範囲はスケールで指定した値の範囲をハイライト表示する視覚的な要素です。その目的は、パフォーマンス バー メジャーの質的状態を視覚で伝えると同時に、その状態をレベルとして示すことにあります。 ```html ## スケール -スケールはゲージで値の全範囲を強調表示する視覚的な要素です。外観やスケールの図形のカスタマイズ、更にスケールを反転 (`IsScaleInverted` プロパティを使用) させて、すべてのラベルを左から右ではなく、右から左へ描画することもできます。 +スケールはゲージで値の全範囲をハイライト表示する視覚的な要素です。外観やスケールの図形のカスタマイズ、更にスケールを反転 (`IsScaleInverted` プロパティを使用) させて、すべてのラベルを左から右ではなく、右から左へ描画することもできます。 ```html
-## 強調表示 +## ハイライト表示 -線、列、マーカーなどのビジュアルに、マウスをデータ項目の上に置いたときに強調表示して、フォーカスを合わせます。この機能は、すべてのチャート タイプで有効になっています。この機能の詳細については、[チャート強調表示](features/chart-highlighting.md)トピックを参照してください。 +線、列、マーカーなどのビジュアルに、マウスをデータ項目の上に置いたときにハイライト表示して、フォーカスを合わせます。この機能は、すべてのチャート タイプで有効になっています。この機能の詳細については、[チャートのハイライト表示](features/chart-highlighting.md)トピックを参照してください。 -`sample="/charts/category-chart/column-chart-with-highlighting", height="500", alt="{Platform} 強調表示の例"` +`sample="/charts/category-chart/column-chart-with-highlighting", height="500", alt="{Platform} ハイライト表示の例"` diff --git a/doc/jp/components/charts/chart-overview.md b/doc/jp/components/charts/chart-overview.md index 172f4c279..488a2f4c2 100644 --- a/doc/jp/components/charts/chart-overview.md +++ b/doc/jp/components/charts/chart-overview.md @@ -52,7 +52,7 @@ _language: ja {Platform} 棒チャート (棒グラフ) は、さまざまなカテゴリのデータの頻度、カウント、合計、または平均を、同じ幅と異なる長さの水平棒でエンコードされたデータとすばやく比較するために使用される最も一般的なカテゴリ チャート タイプの 1 つです。これらは、時間の経過に伴う項目の価値の変動、データ分布、ソートされたデータのランキング (高から低、最悪から最高) を表示するのに理想的です。データは、チャートの左から右にデータ ポイントの値に向かって伸びる長方形のコレクションを使用して表されます。[棒チャート](types/bar-chart.md)の詳細をご覧ください。 -`sample="/charts/data-chart/bar-chart-multiple-sources", height="600", alt="{Platform} 複数ソースの棒チャート"` +`sample="/charts/data-chart/bar-chart-multiple-sources", img-src="https://static.infragistics.com/marketing/Website/products/Ignite-UI-for-Angular/ignite-ui-angular-bar-chart", height="600", alt="{Platform} 複数ソースの棒チャート"` @@ -172,7 +172,7 @@ _language: ja ### {Platform} 散布図 -{Platform} 散布図は、デカルト (X、Y) 座標系を使用してデータをプロットすることにより、2 つの値間の関係を示すために使用されます。各データ ポイントは、X 軸と Y 軸上のデータ値の交点として描画されます。散布図は、不均一な間隔またはデータのクラスターに注意を向けます。予測結果の収集データの標準偏差を強調表示し、科学データや統計データをプロットするためによく使用されます。{Platform} 散布図は、データがバインド前に時系列になっていない場合でも、X 軸と Y 軸でデータを時系列に整理してプロットします。[散布図](types/scatter-chart.md)の詳細をご覧ください。 +{Platform} 散布図は、デカルト (X、Y) 座標系を使用してデータをプロットすることにより、2 つの値間の関係を示すために使用されます。各データ ポイントは、X 軸と Y 軸上のデータ値の交点として描画されます。散布図は、不均一な間隔またはデータのクラスターに注意を向けます。予測結果の収集データの標準偏差をハイライト表示し、科学データや統計データをプロットするためによく使用されます。{Platform} 散布図は、データがバインド前に時系列になっていない場合でも、X 軸と Y 軸でデータを時系列に整理してプロットします。[散布図](types/scatter-chart.md)の詳細をご覧ください。 `sample="/charts/data-chart/scatter-point-chart", height="600", alt="{Platform} 散布マーカー チャート"` @@ -274,7 +274,7 @@ alt="{Platform} チャート インタラクティブなパニングとズーム ### マーカー、ツールチップ、およびテンプレート -10 個の[マーカー タイプ](features/chart-markers.md)のいずれかを使用するか、独自の[マーカー-テンプレート](features/chart-markers.md#{PlatformLower}-チャート-マーカーのテンプレート)を作成して、データを強調表示するか、シンプルな[ツールチップ](features/chart-tooltips.md)または[カスタム ツールチップ](features/chart-tooltips.md#{PlatformLower}-チャート-ツールチップ-テンプレート)を使用した多軸および複数系列のチャートで、データにコンテキストと意味を追加します。 +10 個の[マーカー タイプ](features/chart-markers.md)のいずれかを使用するか、独自の[マーカー-テンプレート](features/chart-markers.md#{PlatformLower}-チャート-マーカーのテンプレート)を作成して、データをハイライト表示するか、シンプルな[ツールチップ](features/chart-tooltips.md)または[カスタム ツールチップ](features/chart-tooltips.md#{PlatformLower}-チャート-ツールチップ-テンプレート)を使用した多軸および複数系列のチャートで、データにコンテキストと意味を追加します。 {Platform} チャート マーカー、ツールチップ、およびテンプレート diff --git a/doc/jp/components/charts/features/chart-animations.md b/doc/jp/components/charts/features/chart-animations.md index bb580ed57..40dceff84 100644 --- a/doc/jp/components/charts/features/chart-animations.md +++ b/doc/jp/components/charts/features/chart-animations.md @@ -28,7 +28,7 @@ _language: ja 関連するチャートタイプの詳細については、以下のトピックを参照してください。 - [チャート注釈](chart-annotations.md) -- [チャート強調表示](chart-highlighting.md) +- [チャートのハイライト表示](chart-highlighting.md) - [チャート ツールチップ](chart-tooltips.md) ## API リファレンス diff --git a/doc/jp/components/charts/features/chart-data-filtering b/doc/jp/components/charts/features/chart-data-filtering new file mode 100644 index 000000000..5b6e0ff95 --- /dev/null +++ b/doc/jp/components/charts/features/chart-data-filtering @@ -0,0 +1,53 @@ +--- +title: {Platform} Chart Data Filtering | Data Visualization | Infragistics +_description: Infragistics' {Platform} Chart Data Filtering +_keywords: {Platform} Charts, Filtering, Infragistics +mentionedTypes: ["CategoryChart"] +namespace: Infragistics.Controls.Charts +--- + +# {Platform} Chart Data Filtering + +Data Filtering allows you to query large data in order to analyze and plot small subset of data entries via filter expressions, all without having to manually modify the datasource bound to the chart. + +A complete list of valid expressions and keywords to form a query string can be found here: + +[Filter expressions](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris) + +> NOTE: Any incorrect filter applied will result with an empty chart. + +## {Platform} Chart Data Filter Example + +The following example depicts a [Column Chart](../types/column-chart.md) of annual birth rates across several decades. The drop-down allows you to select a decade, which inserts an expression via the `InitialFilter` property, to update the chart visual and thus filtering out the other decades out. + +`sample="/charts/category-chart/data-filter", height="500", alt="{Platform} Data Filter Example"` + +
+ +The `InitialFilter` property is a string that requires the following syntax in order to filter properly. The value requires sets of parenthesesthat include both the filter expression definition, column and value associated with the record(s) filtering in. + +eg. To show all countries that start with the letter B: + +"(startswith(Country, 'B'))" + +eg. Concatenating more than one expression: + +"(startswith(Country, 'B') and endswith(Country, 'L') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))" + + +## Additional Resources + +You can find more information about related chart features in these topics: + +- [Chart Annotations](chart-annotations.md) +- [Chart Highlighting](chart-highlighting.md) +- [Chart Tooltips](chart-tooltips.md) + +## API References + +The following is a list of API members mentioned in the above sections: + +- `CategoryChart` +- `IsTransitionInEnabled` +- `TransitionInDuration` +- `TransitionInMode` \ No newline at end of file diff --git a/doc/jp/components/charts/features/chart-highlight-filter.md b/doc/jp/components/charts/features/chart-highlight-filter.md index 56df8a586..980892708 100644 --- a/doc/jp/components/charts/features/chart-highlight-filter.md +++ b/doc/jp/components/charts/features/chart-highlight-filter.md @@ -1,46 +1,46 @@ --- -title: {Platform} チャート強調表示フィルター | データ可視化 | インフラジスティックス -_description: Infragistics の {Platform} チャート強調表示フィルター -_keywords: {Platform} Charts, Highlighting, Filtering, Infragistics, {Platform} チャート, 強調表示, フィルターリング, インフラジスティックス +title: {Platform} チャートのハイライト表示フィルター | データ可視化 | インフラジスティックス +_description: Infragistics の {Platform} チャートのハイライト表示フィルター +_keywords: {Platform} Charts, Highlighting, Filtering, Infragistics, {Platform} チャート, ハイライト表示, フィルターリング, インフラジスティックス mentionedTypes: ["CategoryChart", "XamDataChart", "Series", "HighlightedValuesDisplayMode"] namespace: Infragistics.Controls.Charts _language: ja --- -# {Platform} Chart 強調表示フィルター +# {Platform} チャートのハイライト表示フィルター -{ProductName} Chart コンポーネントは、プロットされたデータのサブセットを表示できるようにすることで、これらのチャートにプロットされた系列の視覚化を強化できるデータ強調表示オーバーレイをサポートしています。これを有効にすると、列シリーズおよびエリア シリーズ タイプの場合は不透明度を下げて全体セットが表示され、線シリーズ タイプの場合は破線が表示されることで、データのサブセットが強調表示されます。これは、データセットの目標値と実際の値などを視覚化するのに役立ちます。以下の例で、この機能を説明します。 +{ProductName} チャート コンポーネントは、プロットされたデータのサブセットを表示できるようにすることで、これらのチャートにプロットされた系列の視覚化を強化できるデータハイライト表示オーバーレイをサポートしています。これを有効にすると、列シリーズおよびエリア シリーズ タイプの場合は不透明度を下げて全体セットが表示され、線シリーズ タイプの場合は破線が表示されることで、データのサブセットがハイライト表示されます。これは、データセットの目標値と実際の値などを視覚化するのに役立ちます。以下の例で、この機能を説明します。 -`sample="/charts/data-chart/chart-highlight-filter-multiple-series", height="500", alt="{Platform} 強調表示フィルターの例"` +`sample="/charts/data-chart/chart-highlight-filter-multiple-series", height="500", alt="{Platform} ハイライト表示フィルターの例"` -データ強調表示機能は `XamDataChart` および `CategoryChart` でサポートされていますが、これらのコントロールの動作の性質上、それぞれ異なる方法で構成されることに注意してください。ただし、この機能で変わらない点は、強調表示を表示したい場合は `HighlightedValuesDisplayMode` プロパティを `Overlay` に設定する必要があることです。以下では、強調表示フィルター機能のさまざまな設定について説明します。 +データハイライト表示機能は `XamDataChart` および `CategoryChart` でサポートされていますが、これらのコントロールの動作の性質上、それぞれ異なる方法で構成されることに注意してください。ただし、この機能で変わらない点は、ハイライト表示を表示したい場合は `HighlightedValuesDisplayMode` プロパティを `Overlay` に設定する必要があることです。以下では、ハイライト表示フィルター機能のさまざまな設定について説明します。 -## DataChart での強調表示フィルターの使用 +## DataChart でのハイライト表示フィルターの使用 -`XamDataChart` では、強調表示フィルター API の多くは主に、強調表示するデータのサブセットを表すコレクションに `HighlightedItemsSource` プロパティを設定することによって、シリーズ自体で発生します。`HighlightedItemsSource` 内の項目の数は、強調表示するシリーズの `ItemsSource` にバインドされているデータの数と一致する必要があります。カテゴリ シリーズの場合は、デフォルトで強調表示パスとして定義した `ValueMemberPath` が使用されます。このページの上部にあるサンプルでは、​​`XamDataChart` の `HighlightedItemsSource` を使用してオーバーレイを表示しています。 +`XamDataChart` では、ハイライト表示フィルター API の多くは主に、ハイライト表示するデータのサブセットを表すコレクションに `HighlightedItemsSource` プロパティを設定することによって、シリーズ自体で発生します。`HighlightedItemsSource` 内の項目の数は、ハイライト表示するシリーズの `ItemsSource` にバインドされているデータの数と一致する必要があります。カテゴリ シリーズの場合は、デフォルトでハイライト表示パスとして定義した `ValueMemberPath` が使用されます。このページの上部にあるサンプルでは、​​`XamDataChart` の `HighlightedItemsSource` を使用してオーバーレイを表示しています。 -シリーズの `HighlightedItemsSource` と `ItemsSource` の間でスキーマが一致しない場合は、シリーズの `HighlightedValueMemberPath` プロパティを使用してこれを構成できます。さらに、シリーズ自体の `ItemsSource` を強調表示ソースとして使用し、サブセットを表すデータ項目にパスを設定したい場合は、これを行うことができます。これは、`HighlightedItemsSource` を提供せずに、`HighlightedValueMemberPath` プロパティをそのパスに設定するだけで行われます。 +シリーズの `HighlightedItemsSource` と `ItemsSource` の間でスキーマが一致しない場合は、シリーズの `HighlightedValueMemberPath` プロパティを使用してこれを構成できます。さらに、シリーズ自体の `ItemsSource` をハイライト表示ソースとして使用し、サブセットを表すデータ項目にパスを設定したい場合は、これを行うことができます。これは、`HighlightedItemsSource` を提供せずに、`HighlightedValueMemberPath` プロパティをそのパスに設定するだけで行われます。 列およびエリア シリーズ の場合の不透明度の低減は、シリーズの `HighlightedValuesFadeOpacity` プロパティを設定することで構成できます。オーバーレイをまったく表示したくない場合は、`HighlightedValuesDisplayMode` プロパティを `Hidden` に設定することもできます。 -強調表示フィルターによって表示されるシリーズの部分は、チャートの凡例レイヤーとツールチップ レイヤーに個別に表示されます。`HighlightedTitleSuffix` を設定することで、ツールチップと凡例に表示されるタイトルを構成できます。これにより、指定した値がシリーズの `Title` の末尾に追加されます。 +ハイライト表示フィルターによって表示されるシリーズの部分は、チャートの凡例レイヤーとツールチップ レイヤーに個別に表示されます。`HighlightedTitleSuffix` を設定することで、ツールチップと凡例に表示されるタイトルを構成できます。これにより、指定した値がシリーズの `Title` の末尾に追加されます。 -次の例は、`HighlightedValueMemberPath` を使用した `XamDataChart` コントロール内のデータ強調表示オーバーレイ機能の使用法を示しています。 +次の例は、`HighlightedValueMemberPath` を使用した `XamDataChart` コントロール内のデータハイライト表示オーバーレイ機能の使用法を示しています。 -`sample="/charts/data-chart/chart-highlight-filter", height="500", alt="{Platform} 強調表示フィルターの例"` +`sample="/charts/data-chart/chart-highlight-filter", height="500", alt="{Platform} ハイライト表示フィルターの例"` -## CategoryChart での強調表示フィルターの使用 +## CategoryChart でのハイライト表示フィルターの使用 -`CategoryChart` 強調表示フィルターは、`InitialHighlightFilter` プロパティを設定することによってチャート上で発生します。`CategoryChart` は、デフォルトで、基になるデータ項目のすべてのプロパティを考慮します。そのため、データのサブセットをフィルタリングできるようにデータをグループ化および集計できるように、チャート上でも `InitialGroups` を定義する必要があります。`InitialGroups` を基になるデータ項目の値パスに設定して、重複した値を持つパスでグループ化することができます。 +`CategoryChart` ハイライト表示フィルターは、`InitialHighlightFilter` プロパティを設定することによってチャート上で発生します。`CategoryChart` は、デフォルトで、基になるデータ項目のすべてのプロパティを考慮します。そのため、データのサブセットをフィルタリングできるようにデータをグループ化および集計できるように、チャート上でも `InitialGroups` を定義する必要があります。`InitialGroups` を基になるデータ項目の値パスに設定して、重複した値を持つパスでグループ化することができます。 `XamDataChart` と同様に、`HighlightedValuesDisplayMode` プロパティも `CategoryChart` で公開されます。オーバーレイを表示したくない場合は、このプロパティを `Hidden` に設定できます。 -以下の例は、`CategoryChart` コントロール内でのデータ強調表示オーバーレイ機能の使用法を示しています。 +以下の例は、`CategoryChart` コントロール内でのデータハイライト表示オーバーレイ機能の使用法を示しています。 -`sample="/charts/category-chart/chart-highlight-filter", height="500", alt="{Platform} 強調表示フィルターの例"` +`sample="/charts/category-chart/chart-highlight-filter", height="500", alt="{Platform} ハイライト表示フィルターの例"` + + +```html + + + +``` +```ts +constructor() { + let grid = document.getElementById("grid") as IgcGridComponent; + grid.data = this.data +} +``` + +```tsx + + + +``` + ```razor <{ComponentSelector} Data=data AutoGenerate="true" AllowAdvancedFiltering="true"> ``` + -```razor - - - -``` - - - ```html -<{ComponentSelector} id="grid" auto-generate="true" allow-advanced-filtering="true"> + - + ``` ```ts constructor() { - let grid = (document.getElementById("grid") as IgcGridComponent); - grid.data = this.data + let treeGrid = document.getElementById("treeGrid") as IgcTreeGridComponent; + treeGrid.data = this.data } ``` - -```html - - - +```tsx + + + ``` +```razor + + + +``` + + +```html + + + +``` ```ts constructor() { - let grid = document.getElementById("grid") as IgcTreeGridComponent; - grid.data = this.data + let hierarchicalGrid = document.getElementById("hierarchicalGrid") as IgcHierarchicalGridComponent; + hierarchicalGrid.data = this.data } ``` - + - - -```html -<{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowAdvancedFiltering="true"> - - - - - - + + +```razor + + + ``` - + + + ```tsx -<{ComponentSelector} data={nwindData} autoGenerate="false" ref={gridRef} allowAdvancedFiltering="true"> + - + ``` + 高度なフィルタリングは、`AdvancedFilteringExpressionsTree` 入力プロパティに保存される `FilteringExpressionsTree` を生成します。`AdvancedFilteringExpressionsTree` プロパティを使用して、高度なフィルタリングの初期状態を設定できます。 @@ -197,6 +220,7 @@ componentDidMount() { ```--> + `{ComponentName}` ツールバーを表示したくない場合は、`OpenAdvancedFilteringDialog` および `CloseAdvancedFilteringDialog` メソッドを使用して、高度なフィルタリング ダイアログをコーディングを使用して開いたり閉じたりできます。 > [!Note] @@ -543,27 +567,22 @@ $custom-drop-down: drop-down-theme( 定義済みのテーマに加えて、利用可能な [CSS プロパティ](../theming.md)のいくつかを設定することで、グリッドをさらにカスタマイズできます。 一部の色を変更したい場合は、最初にグリッドのクラスを設定する必要があります。 + ```html - -``` - -```razor - +<{ComponentSelector} class="grid"> ``` + - - - -```html - + +```tsx +<{ComponentSelector} className="grid"> ``` + ```razor - +<{ComponentSelector} class="grid"> ``` - - 次に、そのクラスに関連する CSS プロパティを設定します。 ```css diff --git a/doc/jp/components/grids/_shared/cell-editing.md b/doc/jp/components/grids/_shared/cell-editing.md index 5af1ba25e..039e1a196 100644 --- a/doc/jp/components/grids/_shared/cell-editing.md +++ b/doc/jp/components/grids/_shared/cell-editing.md @@ -85,7 +85,9 @@ public updateCell() { ``` ```razor -this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel') +@code { + this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel'); +} ``` @@ -97,7 +99,9 @@ public updateCell() { ``` ```razor -this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel') +@code { + this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel'); +} ``` @@ -117,9 +121,11 @@ public updateCell() { ```razor -private UpdateCell() { - IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel"); - cell.Update(70); +@code { + private UpdateCell() { + IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel"); + cell.Update(70); + } } ``` @@ -146,9 +152,11 @@ public updateCell() { ``` ```razor -private UpdateCell() { - IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age"); - cell.Update(9999); +@code { + private UpdateCell() { + IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age"); + cell.Update(9999); + } } ``` @@ -164,9 +172,11 @@ public updateCell() { ``` ```razor -private UpdateCell() { - IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel"); - cell.Update(70); +@code { + private UpdateCell() { + IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel"); + cell.Update(70); + } } ``` @@ -233,6 +243,8 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => { セルに適用されるカスタム テンプレートを提供する場合は、そのテンプレートをセル自体またはそのヘッダーに渡すことができます。まず、通常どおりに列を作成します。 + + @@ -253,7 +265,7 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => { @@ -261,6 +273,19 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => { ``` + +```razor + + +``` + + そしてテンプレートを渡します: ```razor @@ -295,7 +320,6 @@ igRegisterScript("WebGridCellEditCellTemplate", (ctx) => { field="Race" data-type="string" editable="true" - name="column1" id="column1"> ``` @@ -343,73 +367,88 @@ public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { field="Category" data-type="string" editable="true" - name="column1" id="column1"> ``` そして、テンプレートを index.ts ファイルのこの列に渡します。 -```typescript +```ts + constructor() { - var treeGrid = document.getElementById('treeGrid') as {ComponentName}Component; + var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent; var column1 = document.getElementById('column1') as IgcColumnComponent; - treeGrid.data = this.ordersTreeData; - column1.inlineEditorTemplate = this.webTreeGridCellEditCellTemplate; + treeGrid.data = this.webGridCellEditSampleRoleplay; + column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; + column2.inlineEditorTemplate = this.webGridCellEditCellTemplate; + column3.inlineEditorTemplate = this.webGridCellEditCellTemplate; } +public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { + let cellValues: any = []; + let uniqueValues: any = []; + for(const i of (this.webGridCellEditSampleRoleplay as any)){ + const field: string = ctx.cell.column.field; + if(uniqueValues.indexOf(i[field]) === -1 ) + { + cellValues.push(html`${(i[field])}`); + uniqueValues.push(i[field]); + } + } + return html` + ctx.cell.editValue = e.detail.value}> + ${cellValues} + + `; +} ``` + + + +```html + + +``` + +そして、テンプレートを index.ts ファイルのこの列に渡します。 - ```ts constructor() { - var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent; - var column1 = document.getElementById('column1') as IgcColumnComponent; - var column2 = document.getElementById('column2') as IgcColumnComponent; - var column3 = document.getElementById('column3') as IgcColumnComponent; - - treeGrid.data = this.webGridCellEditSampleRoleplay; - column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; - column2.inlineEditorTemplate = this.webGridCellEditCellTemplate; - column3.inlineEditorTemplate = this.webGridCellEditCellTemplate; -} - -private _webGridCellEditSampleRoleplay: WebGridCellEditSampleRoleplay = null; -public get webGridCellEditSampleRoleplay(): WebGridCellEditSampleRoleplay { - if (this._webGridCellEditSampleRoleplay == null) - { - this._webGridCellEditSampleRoleplay = new WebGridCellEditSampleRoleplay(); - } + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent; + var column1 = document.getElementById('column1') as IgcColumnComponent; - return this._webGridCellEditSampleRoleplay; + hierarchicalGrid.data = this.singersData; + column1.inlineEditorTemplate = this.webGridCellEditCellTemplate; } public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => { - let cellValues: any = []; - let uniqueValues: any = []; - for(const i of (this.webGridCellEditSampleRoleplay as any)){ - const field: string = ctx.cell.column.field; - if(uniqueValues.indexOf(i[field]) === -1 ) - { - cellValues.push(html`${(i[field])}`); - uniqueValues.push(i[field]); - } + let cellValues: any = []; + let uniqueValues: any = []; + for(const i of (this.singersData as any)){ + const field: string = ctx.cell.column.field; + if(uniqueValues.indexOf(i[field]) === -1 ) + { + cellValues.push(html`${(i[field])}`); + uniqueValues.push(i[field]); } - return html` - ctx.cell.editValue = e.detail.value}> - ${cellValues} - - `; + } + return html` + ctx.cell.editValue = e.detail.value}> + ${cellValues} + + `; } ``` - + - - セルに適用されるカスタム テンプレートを提供する場合は、そのテンプレートをセル自体またはそのヘッダーに渡すことができます。まず、通常どおりに列を作成します。 @@ -449,19 +488,15 @@ const webGridCellEditCellTemplate = useCallback((ctx: IgrCellTemplateContext) => useEffect(() => { const column1 = grid1Ref.current.getColumnByName('column1'); - const column2 = grid1Ref.current.getColumnByName('column2'); - const column3 = grid1Ref.current.getColumnByName('column3'); grid1Ref.current.data = webGridCellEditSampleRoleplay; column1.inlineEditorTemplate = webGridCellEditCellTemplate; - column2.inlineEditorTemplate = webGridCellEditCellTemplate; - column3.inlineEditorTemplate = webGridCellEditCellTemplate; }, [webGridCellEditSampleRoleplay, webGridCellEditCellTemplate]); ``` -上記のサンプルは、さらに参照するためにここにあります。 + 上記のサンプルは、こちらで参照できます。 @@ -622,9 +657,11 @@ this.grid.addRow(record); ```razor -//Assuming we have a `GetNewRecord` method returning the new row data. -const record = this.GetNewRecord(); -this.GridRef.AddRow(record); +@code { + //Assuming we have a `GetNewRecord` method returning the new row data. + const record = this.GetNewRecord(); + this.GridRef.AddRow(record); +} ``` @@ -662,7 +699,14 @@ public addRow() { // Adding a new record // Assuming we have a `getNewRecord` method returning the new row data const record = this.getNewRecord(); - this.hierarchicalGrid.addRow(record, 1); + this.hierarchicalGrid.addRow(record); +} +``` +```razor +@code { + //Assuming we have a `GetNewRecord` method returning the new row data. + const record = this.GetNewRecord(); + this.HierarchicalGridRef.AddRow(record); } ``` @@ -709,18 +753,20 @@ row.update(newData); ```razor -// Updating the whole row -this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID); +@code { + // Updating the whole row + this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID); -// Just a particular cell through the Grid API -this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + // Just a particular cell through the Grid API + this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); -// Directly using the cell `update` method -this.selectedCell.Update(newData); + // Directly using the cell `update` method + this.selectedCell.Update(newData); -// Directly using the row `update` method -const row = this.grid.GetRowByKey(rowID); -row.Update(newData); + // Directly using the row `update` method + IgbRowType row = this.grid.GetRowByKey(rowID); + row.Update(newData); +} ``` @@ -741,18 +787,20 @@ row.update(newData); ``` ```razor -// Updating the whole row -this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); +@code { + // Updating the whole row + this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); -// Just a particular cell through the Tree Grid API -this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + // Just a particular cell through the Tree Grid API + this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); -// Directly using the cell `update` method -this.selectedCell.Update(newData); + // Directly using the cell `update` method + this.selectedCell.Update(newData); -// Directly using the row `update` method -const row = this.treeGrid.GetRowByKey(rowID); -row.Update(newData); + // Directly using the row `update` method + IgbRowType row = this.treeGrid.GetRowByKey(rowID); + row.Update(newData); +} ``` @@ -772,6 +820,23 @@ this.selectedCell.update(newData); const row = this.hierarchicalGrid.getRowByKey(rowID); row.update(newData); ``` + +```razor +@code { + // Updating the whole row + this.hierarchicalGrid.UpdateRow(newData, this.selectedCell.cellID.rowID); + + // Just a particular cell through the Tree Grid API + this.hierarchicalGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field); + + // Directly using the cell `update` method + this.selectedCell.Update(newData); + + // Directly using the row `update` method + IgbRowType row = this.hierarchicalGrid.GetRowByKey(rowID); + row.Update(newData); +} +``` ### {ComponentTitle} からデータを削除 @@ -796,16 +861,18 @@ row.delete(); grid1Ref.current.deleteRow(selectedCell.cellID.rowID); // Delete row through row object const row = grid1Ref.current.getRowByIndex(rowIndex); -row.delete(); +row.del(); ``` ```razor -// Delete row through Grid API -this.grid.DeleteRow(this.selectedCell.cellID.rowID); -// Delete row through row object -const row = this.grid.GetRowByIndex(rowIndex); -row.Delete(); +@code { + // Delete row through Grid API + this.grid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.grid.GetRowByIndex(rowIndex); + row.Del(); +} ``` @@ -820,15 +887,18 @@ row.delete(); ``` ```razor -// Delete row through Tree Grid API -this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID); -// Delete row through row object -const row = this.treeGrid.GetRowByIndex(rowIndex); -row.Delete(); +@code { + // Delete row through Tree Grid API + this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.treeGrid.GetRowByIndex(rowIndex); + row.Del(); +} ``` + ```typescript // Delete row through Grid API this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); @@ -836,6 +906,27 @@ this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); const row = this.hierarchicalGrid.getRowByIndex(rowIndex); row.delete(); ``` + + + +```typescript +// Delete row through Grid API +this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID); +// Delete row through row object +const row = this.hierarchicalGrid.getRowByIndex(rowIndex); +row.del(); +``` + + +```razor +@code { + // Delete row through Grid API + this.hierarchicalGrid.DeleteRow(this.selectedCell.cellID.rowID); + // Delete row through row object + IgbRowType row = this.hierarchicalGrid.GetRowByIndex(rowIndex); + row.Del(); +} +``` `{ComponentName}` に関係なく、ボタンのクリックなどのユーザー インタラクションに関連付けできます。 @@ -903,6 +994,7 @@ constructor() { ```ts constructor() { var hGrid = document.getElementById('hGrid') as IgcHierarchicalGridComponent; + this.webHierarchicalGridCellEdit = this.webHierarchicalGridCellEdit.bind(this); hGrid.addEventListener("cellEdit", this.webHierarchicalGridCellEdit); } ``` @@ -1032,7 +1124,7 @@ igRegisterScript("HandleCellEdit", (ev) => { -ここでは、2 つの列を検証しています。ユーザーが従業員の**Age (年齢、18歳未満)** または **Hire Date (雇用日、将来の日付)** に無効な値を設定しようとすると、編集がキャンセルされ (値は送信されません)、エラー メッセージ付きのトースターが表示されます。 +ここでは、2 つの列を検証しています。ユーザーが従業員の **Age (年齢、18 歳未満)** または **Hire Date (雇用日、将来の日付)** に無効な値を設定しようとすると、編集がキャンセルされ (値は送信されません)、エラー メッセージ付きのトースターが表示されます。 @@ -1040,31 +1132,68 @@ igRegisterScript("HandleCellEdit", (ev) => { ```typescript -export class MyHGridEventsComponent { - public handleCellEdit(event: IGridEditEventArgs) { - const today = new Date(); - const column = event.column; - if (column.field === 'Debut') { - if (event.newValue > today.getFullYear()) { - this.toast.message = 'The debut date must be in the past!'; - this.toast.open(); - event.cancel = true; - } - } else if (column.field === 'LaunchDate') { - if (event.newValue > new Date()) { - this.toast.message = 'The launch date must be in the past!'; - this.toast.open(); - event.cancel = true; - } +public webHierarchicalGridCellEdit(event: CustomEvent): void { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); } } } ``` +```razor +*** In JavaScript *** +igRegisterScript("HandleCellEdit", (ev) => { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); + } + } +}, false); +``` + ここでは、2 つの列を検証しています。ユーザーがアーティストの **Debut (デビュー)** 年またはアルバムの **Launch Date (発売日)** を変更しようとした際に、グリッドは今日よりも後の日付を許可しません。 + + +```tsx +public handleCellEdit(sender: IgrHierarchicalGrid, event: IgrGridEditEventArgs): void { + const today = new Date(); + const column = event.detail.column; + if (column.field === 'Debut') { + if (event.detail.newValue > today.getFullYear()) { + event.detail.cancel = true; + alert('The debut date must be in the past!'); + } + } else if (column.field === 'LaunchDate') { + if (event.detail.newValue > today) { + event.detail.cancel = true; + alert('The launch date must be in the past!'); + } + } +} +``` + + + 以下は、上記の検証が `{ComponentName}` に適用された結果のデモです。 `sample="/{ComponentSample}/editing-events", height="650", alt="{Platform} {ComponentTitle} 編集イベントの例"` @@ -1108,6 +1237,10 @@ export class MyHGridEventsComponent { ``` +```tsx + +``` + 次に、そのクラスに関連する CSS プロパティを設定します。 ```css @@ -1118,6 +1251,29 @@ export class MyHGridEventsComponent { ``` + +```html + +``` + +```razor + +``` + +```tsx + +``` + +次に、そのクラスに関連する CSS プロパティを設定します。 + +```css +.hierarchicalGrid { + --ig-grid-edit-mode-color: orange; + --ig-grid-cell-editing-background: lightblue; +} +``` + + ### スタイル設定の例 `sample="/{ComponentSample}/cell-editing-styling", height="650", alt="{Platform} {ComponentTitle} セル編集のスタイル設定の例"` diff --git a/doc/jp/components/grids/_shared/cell-selection.md b/doc/jp/components/grids/_shared/cell-selection.md index 6595fea17..c4e23197d 100644 --- a/doc/jp/components/grids/_shared/cell-selection.md +++ b/doc/jp/components/grids/_shared/cell-selection.md @@ -8,9 +8,9 @@ namespace: Infragistics.Controls _language: ja --- -# {Platform} セルの選択 +# {Platform} {ComponentTitle} セルの選択 -{Platform} {ComponentTitle} の {ProductName} セル選択により、豊富なデータ選択機能が有効になり、グリッド コンポーネントで強力な API が提供されます。 {Platform} {ComponentTitle} は、次の 3 つの選択モードをサポートしています。 +{Platform} {ComponentTitle} の {ProductName} セル選択により、豊富なデータ選択機能が有効になり、`{ComponentName}` コンポーネントで強力な API が提供されます。 {Platform} {ComponentTitle} は、次の 3 つの選択モードをサポートしています。 - {ComponentTitle} 複数セルの選択 - {ComponentTitle} 単一選択 @@ -32,7 +32,7 @@ _language: ja ## 選択タイプ -### {ComponentTitle} 複数セルの選択 +### {Platform} {ComponentTitle} 複数セルの選択 これは、親グリッドと子グリッドの両方でのデフォルトのセル選択モードです。セルの選択は一度に 1 つのグリッドで行うことができますが、クロス グリッド範囲の選択を行うことか、複数のグリッドでセルを選択することはできないことに注意してください。範囲選択およびマウス ドラッグ機能に関連する各キーの組み合わせは、同じグリッドでのみ使用できます。 @@ -94,7 +94,7 @@ _language: ja 以下は、範囲の選択、選択の解除、または選択したセル データを取得する方法です。 - + ### 範囲の選択 @@ -112,7 +112,29 @@ const range = { rowStart: 2, rowEnd: 2, columnStart: 1, columnEnd: 1 }; gridRef.current.selectRange(range); ``` - + + +```razor +<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true> + +@code { + private {ComponentSelector} grid; + + private async void SetSelection() + { + IgbGridSelectionRange selectionRange = new IgbGridSelectionRange(); + selectionRange.ColumnStart = 1; + selectionRange.ColumnEnd = 1; + selectionRange.RowStart = 2; + selectionRange.RowEnd = 2; + + this.grid.SelectRange(new IgbGridSelectionRange[] {}); + } +} +``` + + + ### セル選択のクリア @@ -145,10 +167,10 @@ gridRef.current.clearCellSelection(); `GetSelectedData` は、選択されたデータの配列をディクショナリで返します。以下は例です。 ```razor - +<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true> @code { - private IgbGrid grid; + private {ComponentSelector} grid; private async void GetSelectedData() { @@ -301,6 +323,35 @@ expectedData = [ + + + +```ts + +``` + + +```tsx + +``` + +```razor + +``` + +Then set the related CSS properties for that class: + +```css +.hGrid { + --ig-grid-cell-selected-text-color: #fff; + --ig-grid-cell-active-border-color: #f2c43c; + --ig-grid-cell-selected-background: #0062a3; + --ig-grid-cell-editing-background: #0062a3; +} +``` + + + ### デモ `sample="/{ComponentSample}/cell-selection-style", height="620", alt="{Platform} {ComponentTitle} セル選択のスタイル設定の例"` @@ -366,7 +417,7 @@ $custom-grid-theme: grid-theme( ``` -カスタム テーマを適用すると、選択したグリッドセルが選択した色で強調表示されます。 +カスタム テーマを適用すると、選択したグリッドセルが選択した色でハイライト表示されます。 ### デモ `sample="/{ComponentSample}/multi-cell-selection-style", height="620", alt="{Platform} {ComponentTitle} 複数セル選択の例"` @@ -382,9 +433,10 @@ $custom-grid-theme: grid-theme( * `{ComponentName}` + ## その他のリソース - + * [選択](selection.md) * [行選択](row-selection.md) * [フィルタリング](filtering.md) diff --git a/doc/jp/components/grids/_shared/collapsible-column-groups.md b/doc/jp/components/grids/_shared/collapsible-column-groups.md index b191c9138..c35a9fabd 100644 --- a/doc/jp/components/grids/_shared/collapsible-column-groups.md +++ b/doc/jp/components/grids/_shared/collapsible-column-groups.md @@ -215,12 +215,21 @@ public indTemplate = (ctx: IgcColumnTemplateContext) => { ``` ```tsx - function collapsibleIndicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) { + + + + + + + + + +function indicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) { return (
- +
) - } +} ``` diff --git a/doc/jp/components/grids/_shared/column-hiding.md b/doc/jp/components/grids/_shared/column-hiding.md index 5e390be68..077824f12 100644 --- a/doc/jp/components/grids/_shared/column-hiding.md +++ b/doc/jp/components/grids/_shared/column-hiding.md @@ -26,6 +26,7 @@ _language: ja `{ComponentName}` を作成してからデータをバインドします。列でフィルタリングとソートも有効にします。 + ```html @@ -85,6 +86,53 @@ _language: ja ``` + + + +```html + + + + + + + +``` + +```html + + + + + + + +``` + +```tsx + + + + + + + +``` + + + + +```razor +<{ComponentSelector} AutoGenerate="false" Data="SingersData" PrimaryKey="ID" AllowFiltering="true" Name="hierarchicalGrid1" @ref="hierarchicalGrid1"> + + + + + + +``` + + ## ツールバーの列非表示 UI @@ -92,6 +140,7 @@ _language: ja これには、`{ComponentName}` 内に `GridToolbarActions` と `GridToolbarHiding` の両方を設定することだけです。ツールバーにタイトルを追加するには、`GridToolbarTitle` を設定し、{ComponentTitle} のラッパーにカスタム スタイルを設定します。 + ```html @@ -131,11 +180,70 @@ _language: ja ``` + + + + +```html + + + + + + + +``` + + + + + +```html + + + + + + + +``` + + + + + +```razor +<{ComponentSelector} Data="SingersData"> + + + + + + + +``` + + + + + +```tsx + + + + + + + +``` + + `{ComponentName}` にはツールバーの列非表示 UI に便利なプロパティがあります。 `Title` プロパティを使用して、ツールバーのドロップダウン ボタンに表示されるタイトルを設定します。 + ```html @@ -175,6 +283,63 @@ _language: ja ``` + + + + +```html + + + + + + + +``` + + + + + +```razor +<{ComponentSelector} Data=SingersData> + + + + + + +``` + + + + + +```html + + + + + + + +``` + + + + + +```tsx + + + + + + + +``` + + @@ -332,9 +497,11 @@ export class AppModule {} ``` + ### 列の非表示の無効化 列の `DisableHiding` プロパティを true に設定すると、ユーザーが列非表示 UI によって列を非表示にできません。 + ```html @@ -362,6 +529,53 @@ export class AppModule {} ``` + + + +```html + + + + + + + + +``` + +```html + + + + + + + + +``` + +```tsx + + + + + + + + +``` + +```razor +<{ComponentSelector}> + + + + + + + +``` + 列非表示 UI コンポーネントは以下のようになります。 @@ -519,6 +733,7 @@ $custom-button: button-theme( グリッドは、利用可能な [CSS 変数](../theming.md)の一部を設定することでさらにカスタマイズできます。 これを実現するために、最初にグリッドに割り当てるクラスを使用します。 + ```html <{ComponentSelector} class="grid"> ``` @@ -530,9 +745,25 @@ $custom-button: button-theme( ```tsx <{ComponentSelector} className="grid"> ``` + + + +```html +<{ComponentSelector} class="hierarchical-grid"> +``` + +```razor +<{ComponentSelector} class="hierarchical-grid"> +``` + +```tsx +<{ComponentSelector} className="hierarchical-grid"> +``` + 次に、関連するコンポーネントに関連する CSS 変数を設定します。スタイルも `igx-column-actions` にのみ適用するので、グリッドの残りの部分は影響を受けません。 + ```css .grid igx-column-actions { /* Main Column Actions styles */ @@ -564,6 +795,41 @@ $custom-button: button-theme( --ig-button-disabled-foreground: #ffcd0f; } ``` + + + +```css +#hierarchicalGrid { + /* Main Column Actions styles */ + --ig-column-actions-background-color: #292826; + --ig-column-actions-title-color: #ffcd0f; + + /* Checkbox styles */ + --ig-checkbox-tick-color: #292826; + --ig-checkbox-label-color: #ffcd0f; + --ig-checkbox-empty-color: #ffcd0f; + --ig-checkbox-fill-color: #ffcd0f; + + /* Input styles */ + --ig-input-group-idle-text-color: white; + --ig-input-group-filled-text-color: #ffcd0f; + --ig-input-group-focused-text-color: #ffcd0f; + --ig-input-group-focused-border-color: #ffcd0f; + --ig-input-group-focused-secondary-color: #ffcd0f; + + /* Buttons styles */ + --ig-button-foreground: #292826; + --ig-button-background: #ffcd0f; + --ig-button-hover-background: #404040; + --ig-button-hover-foreground: #ffcd0f; + --ig-button-focus-background: #ffcd0f; + --ig-button-focus-foreground: black; + --ig-button-focus-visible-background: #ffcd0f; + --ig-button-focus-visible-foreground: black; + --ig-button-disabled-foreground: #ffcd0f; +} +``` + ### デモ @@ -581,14 +847,14 @@ $custom-button: button-theme( * `ColumnActionsComponent` - + このトピックでは、`{ComponentName}` のツールバーの定義済みの列非表示 UI の使用方法について学びました。以下は、列非表示 UI のその他の API です。 * `ColumnActionsComponent` その他のコンポーネント (またはそのいずれか) で使用した API: - + `Column` プロパティ: * `DisableHiding` @@ -627,6 +893,7 @@ $custom-button: button-theme( * [列のサイズ変更](column-resizing.md) * [選択](selection.md) + コミュニティに参加して新しいアイデアをご提案ください。 * [{ProductName} **フォーラム (英語)**]({ForumsLink}) diff --git a/doc/jp/components/grids/_shared/column-moving.md b/doc/jp/components/grids/_shared/column-moving.md index 3b2b0e9ee..1b840101a 100644 --- a/doc/jp/components/grids/_shared/column-moving.md +++ b/doc/jp/components/grids/_shared/column-moving.md @@ -65,6 +65,7 @@ function headerTemplate(ctx: IgrCellTemplateContext) { ## 概要 **列移動**機能は各列レベルで有効にできます。つまり、`{ComponentName}` に移動可能な列または移動不可の列の両方を含むことができます。`{ComponentName}` の `Moving` 入力によって制御されます。 + ```html @@ -88,6 +89,45 @@ function headerTemplate(ctx: IgrCellTemplateContext) { ``` + + + + + +```html +<{ComponentSelector} [moving]="true"> + ... + <{RowIslandSelector} [moving]="true"> + +``` + + +```razor +<{ComponentSelector} Moving=true> + ... + <{RowIslandSelector} Moving=true> + +``` + + +```html +<{ComponentSelector} moving="true"> + ... + <{RowIslandSelector} moving="true"> + +``` + + + +```tsx +<{ComponentSelector} moving="true"> + ... + <{RowIslandSelector} moving="true"> + +``` + + + ## API ドラッグアンドドロップ機能に加えて、列の移動機能には、プログラムで列を移動/並べ替えできる API メソッドも用意されています。 @@ -170,6 +210,7 @@ public onColumnMovingEnd(event) { ``` + ```tsx function onColumnMovingEnd(grid: IgrGridBaseDirective, event: IgrColumnMovingEventArgs) { if (event.detail.source.field === "Category" && event.detail.target.field === "Change On Year(%)") { @@ -182,6 +223,8 @@ function onColumnMovingEnd(grid: IgrGridBaseDirective, event: IgrColumnMovingEve ``` + + ```razor <{ComponentSelector} ShowGroupArea="true" @ref='Grid' Width="100%" Height="100%" AllowFiltering=true diff --git a/doc/jp/components/grids/_shared/column-resizing.md b/doc/jp/components/grids/_shared/column-resizing.md index 915d7bae0..e0608b311 100644 --- a/doc/jp/components/grids/_shared/column-resizing.md +++ b/doc/jp/components/grids/_shared/column-resizing.md @@ -182,18 +182,21 @@ public onResize(event) { + ```html - - + ``` + + ```html - - + ``` ```ts @@ -202,18 +205,40 @@ constructor() { hierarchicalGrid.data = this.data; hierarchicalGrid.columnResized = this.onResize; } -``` -```typescript public onResize(event) { this.col = event.column; this.pWidth = event.prevWidth; this.nWidth = event.newWidth; } ``` + + +```tsx +function onResize(grid: IgrGridBaseDirective, event: IgrColumnMovingEventArgs) { + IgrColumn col = event.detail.column; + string pWidth = event.detail.prevWidth; + string nWidth = event.detail.newWidth; +} + +<{ComponentSelector} id="hierarchicalGrid" autoGenerate="false" columnResized={onResize}> + + +``` ```razor -TO DO! +<{ComponentSelector} Data=data AutoGenerate=false ColumnResized="onResize"> + + + +@code { + private void onResize(IgbColumnResizeEventArgs args) + { + IgbColumnType col = args.Detail.Column; + string pWidth = args.Detail.PrevWidth; + string nWidth = args.Detail.NewWidth; + } +} ``` @@ -251,7 +276,7 @@ TO DO! ``` ```tsx - + @@ -307,7 +332,20 @@ TO DO! ``` ```razor -TO DO! +<{ComponentSelector} Data=data ColumnResized="onResize" AutoGenerate=false Height="600px" Width="100%"> + + + + +``` + +```tsx +<{ComponentSelector} id="hierarchicalGrid" columnResized={onResize} autoGenerate="false" + height="600px" width="100%"> + + + + ``` @@ -327,6 +365,8 @@ TO DO! 列の最小幅および最大幅の構成も可能です。`Column` の `MinWidth` および `MaxWidth`入力によって制御されます。この場合、サイズ変更インジケーターのドラッグ操作が制限されます。列が `MinWidth` および `MaxWidth` によって定義される範囲以外にサイズ変更できないことをユーザーに通知します。 + + ```html @@ -338,17 +378,43 @@ TO DO! ```tsx + minWidth="60px" maxWidth="230px"> ``` ```razor ``` + + + +```html + +``` + +```html + +``` + +```tsx + +``` + +```razor + +``` + + + 列幅の最小値と最大値のタイプ (ピクセルまたはパーセンテージ) を混在させることができます。最小値と最大値がパーセンテージに設定されている場合、それぞれの列サイズはピクセルと同様の正確なサイズに制限されます。 つまり、次の構成が可能です。 + + ```html @@ -360,15 +426,41 @@ TO DO! ```tsx + minWidth="60px" maxWidth="230px"> ``` ```razor ``` + + + +```html + +``` + +```html + +``` + +```tsx + +``` + +```razor + +``` + + + または + + ```html @@ -380,19 +472,45 @@ TO DO! ```tsx + minWidth="5%" maxWidth="15%"> ``` ```razor ``` + + + +```html + +``` + +```html + +``` + +```tsx + +``` + +```razor + +``` + + + ## ダブルクリックで列の自動サイズ調整 各列ヘッダーの右側をダブルクリックして列を**自動サイズ**調整することができます。列は、現在表示されているヘッダーを含む一番長いセル値にサイズ設定されます。この動作はデフォルトで有効なため、追加で構成する必要はありません。ただし、`MaxWidth` がその列に設定され、新しい幅が `MaxWidth` 値より大きい場合、列は自動サイズ調整されません。この場合、列が `MaxWidth` 値に設定されます。 また、`Column` の `Autosize` メソッドで列を動的に自動でサイズ変更できます。 + + ```typescript @ViewChild('@@igObjectRef') @@igObjectRef: {ComponentName}; @@ -418,7 +536,7 @@ constructor() { @code { private {ComponentSelector} gridRef; - protected void OnInitialize() + private void AutosizeColumn() { IgbColumn column = gridRef.Columns.Where((col) => { return col.Field == "ID"; }).FirstOrDefault(); column.Autosize(false); @@ -426,6 +544,44 @@ constructor() { } ``` + + + + +```typescript +@ViewChild('@@igObjectRef') @@igObjectRef: {ComponentName}; + +let column = this.@@igObjectRef.columnList.filter(c => c.field === 'Artist')[0]; +column.autosize(); +``` + + +```typescript +constructor() { + var column = this.column = document.getElementById('Artist') as IgcColumnComponent; + column.autosize(); +} +``` + +```tsx +const column = grid.getColumnByName('Artist'); +column.autosize(); +``` + +```razor +@code { + private {ComponentSelector} gridRef; + + private void AutosizeColumn() + { + IgbColumn column = gridRef.Columns.Where((col) => { return col.Field == "Artist"; }).FirstOrDefault(); + column.Autosize(false); + } +} +``` + + + ## 初期化時に列を自動サイズ調整 `Width` を 'auto' に設定することで、初期化時に各列を自動サイズに設定できます。 @@ -451,6 +607,7 @@ constructor() { このアプローチは、初期化後の自動サイズ変更よりもパフォーマンスが最適化されており、特に多数の列のサイズを自動サイズ設定する必要がある場合に推奨されます。 `sample="/{ComponentSample}/column-auto-sizing", height="550", alt="{Platform} {ComponentTitle} 列のサイズ変更の例"` + ## スタイル設定 diff --git a/doc/jp/components/grids/_shared/column-selection.md b/doc/jp/components/grids/_shared/column-selection.md index 93f7a61b5..55561faac 100644 --- a/doc/jp/components/grids/_shared/column-selection.md +++ b/doc/jp/components/grids/_shared/column-selection.md @@ -10,7 +10,7 @@ _language: ja # {Platform} {ComponentTitle} 列選択の概要 -{Platform} {ComponentTitle} の {ProductName} 列選択機能は、シングルクリックで列全体を選択して強調表示する、簡略化された Excel のような方法を提供します。これは `columnSelection` 入力を通じて有効にできます。豊富な API のおかげで、この機能により、選択状態の操作、選択された部分からのデータ抽出、データ分析操作、視覚化が簡単に行えます。 +{Platform} {ComponentTitle} の {ProductName} 列選択機能は、シングルクリックで列全体を選択してハイライト表示する、簡略化された Excel のような方法を提供します。これは `columnSelection` 入力を通じて有効にできます。豊富な API のおかげで、この機能により、選択状態の操作、選択された部分からのデータ抽出、データ分析操作、視覚化が簡単に行えます。 ## {Platform} {ComponentTitle} 列選択の例 diff --git a/doc/jp/components/grids/_shared/column-types.md b/doc/jp/components/grids/_shared/column-types.md index f73b58b61..f3a185eb8 100644 --- a/doc/jp/components/grids/_shared/column-types.md +++ b/doc/jp/components/grids/_shared/column-types.md @@ -12,14 +12,14 @@ _language: ja {Platform} {ComponentTitle} は、デフォルトおよび編集テンプレートの外観に基づいて、number (数値)、string (文字列)、date (日付)、boolean (ブール値)、currency (通貨) および percent (パーセント) 列のデータ型のデフォルト処理を提供します。 - + ## {Platform} {ComponentTitle} 列タイプの例 -`sample="/{ComponentSample}/column-data-types", height="550", alt="{Platform} {ComponentTitle} column data types"` +`sample="/{ComponentSample}/column-data-types", height="550", alt="{Platform} {ComponentTitle} 列のデータ タイプ"` - + ## {Platform} {ComponentTitle} デフォルト テンプレート @@ -68,15 +68,10 @@ public formatOptions = this.options; ``` ```ts -private _formatOptions: any | null = null; public get formatOptions(): any { - if (this._formatOptions == null) - { - var columnPipeArgs: any = {}; - columnPipeArgs.digitsInfo = "1.4-4"; - this._formatOptions = columnPipeArgs; - } - return this._formatOptions; + return { + digitsInfo: "1.4-4" + }; } constructor() { @@ -139,16 +134,11 @@ public formatOptions = this.options; ``` ```ts -private _formatDateOptions: any | null = null; public get formatDateOptions(): any { - if (this._formatDateOptions == null) - { - var columnPipeArgs: any = {}; - columnPipeArgs2.format = "long"; - columnPipeArgs2.timezone = "UTC+0"; - this._formatDateOptions = columnPipeArgs; - } - return this._formatDateOptions; + return { + format: "long", + timezone: "UTC+0" + }; } constructor() { @@ -287,9 +277,7 @@ const timeFormats = [ ``` ```tsx - - - + ``` 列に `AutoGenerate` を使用すると、グリッドは最初のデータ レコードの値を分析します。値が文字列型で、画像拡張子 (gif、jpg、jpeg、tiff、png、webp、bmp) で終わる URL のパターンと一致する場合、列は自動的に `dataType === GridColumnDataType.Image` としてマークされ、デフォルトの画像テンプレートが描画されます。 @@ -368,17 +356,12 @@ public formatOptions = this.options; ``` ```ts -private _formatOptions: any | null = null; - public get formatOptions(): any { - if (this._formatOptions == null) - { - var columnPipeArgs: any = {}; - columnPipeArgs.digitsInfo = "1.4-4"; - columnPipeArgs.display = "symbol-narrow"; - this._formatOptions = columnPipeArgs; - } - return this._formatOptions; - } +public get formatOptions(): any { + return { + digitsInfo: '3.4-4', + display: 'symbol-narrow' + }; +} constructor() { var column = document.getElementById('column') as IgcColumnComponent; @@ -405,7 +388,8 @@ formatOptions.display = "symbol-narrow"; *display - デフォルトの en-US ロケールの場合、USD コードは省略記号 $ または記号 US$ で表すことができます。 -セルの値を編集すると、**通貨記号**がサフィックスまたはプレフィックスとして表示されます。詳細については、公式の[セル編集トピック](cell-editing.md#セル編集と編集テンプレートの例)を参照してください。 +セルの値を編集すると、**通貨記号**がサフィックスまたはプレフィックスとして表示されます。詳細については、公式の[セル編集トピック](cell-editing.md#セル編集と編集テンプレートの例)を参照してください。 + > 注: 上/下矢印キーを使用する場合、値は digitsInfo - minFractionDigits (小数点以下の最小桁数。デフォルトは 0 です。) に基づいてステップで増減します。 @@ -465,16 +449,18 @@ public formatPercentOptions = this.options; ``` ```ts -private _formatPercentOptions: any | null = null; - public get formatPercentOptions(): any { - if (this._formatPercentOptions == null) - { - var columnPipeArgs: any = {}; - columnPipeArgs.digitsInfo = "2.2-3"; - this._formatPercentOptions = columnPipeArgs; - } - return this._formatPercentOptions; - } +public get formatPercentOptions(): any { + return { + /** + * Decimal representation options, specified by a string in the following format: + * `{minIntegerDigits}`.`{minFractionDigits}`-`{maxFractionDigits}`. + * `minIntegerDigits`: The minimum number of integer digits before the decimal point. Default is 1. + * `minFractionDigits`: The minimum number of digits after the decimal point. Default is 0. + * `maxFractionDigits`: The maximum number of digits after the decimal point. Default is 3. + */ + digitsInfo: '2.2-3' + }; +} constructor() { var column = document.getElementById('column') as IgcColumnComponent; @@ -483,6 +469,13 @@ constructor() { ``` ```tsx +/** +* Decimal representation options, specified by a string in the following format: +* `{minIntegerDigits}`.`{minFractionDigits}`-`{maxFractionDigits}`. +* `minIntegerDigits`: The minimum number of integer digits before the decimal point. Default is 1. +* `minFractionDigits`: The minimum number of digits after the decimal point. Default is 0. +* `maxFractionDigits`: The maximum number of digits after the decimal point. Default is 3. +*/ const formatOptions = new IgrColumnPipeArgs(); formatOptions.digitsInfo = "2.2-3"; @@ -501,22 +494,23 @@ formatOptions.digitsInfo = "2.2-3"; カスタム テンプレートと列フォーマッタの定義は、列データ型セットより常に優先されます。 ### カスタム テンプレート - + ```html - +<{ComponentSelector} #grid1 [data]="data | async" [autoGenerate]="false"> {{ value | currency:'USD':'symbol':'1.0-0'}} - + ``` + ```html - +<{ComponentSelector} id="grid1" auto-generate="false"> - + ``` ```ts @@ -539,9 +533,9 @@ function editCellTemplate(ctx: IgrCellTemplateContext) { ); } - +<{ComponentSelector} autoGenerate="false"> - + ``` ```razor @@ -560,10 +554,10 @@ function editCellTemplate(ctx: IgrCellTemplateContext) { ### 列の書式設定 ```html - +<{ComponentSelector} id="grid1" auto-generate="false"> - + ``` ```ts @@ -582,9 +576,9 @@ function formatCurrency(value: number) { return `$ ${value.toFixed(0)}`; } - +<{ComponentSelector} autoGenerate="false"> - + ``` ```razor diff --git a/doc/jp/components/grids/_shared/conditional-cell-styling.md b/doc/jp/components/grids/_shared/conditional-cell-styling.md index 3a6b93170..6d616410f 100644 --- a/doc/jp/components/grids/_shared/conditional-cell-styling.md +++ b/doc/jp/components/grids/_shared/conditional-cell-styling.md @@ -10,7 +10,7 @@ _language: ja # {Platform} {ComponentTitle} の条件付きセルのスタイル設定 -{Platform} {ComponentTitle} の {ProductName} コンポーネントを使用すると、行またはセル レベルでカスタム スタイルを設定できます。`{ComponentName}` 条件付きセルのスタイル設定機能は、特定の基準を満たすデータを視覚的に強調または強調表示するために使用され、ユーザーがグリッド内の重要な情報や傾向を簡単に識別できるようにします。 +{Platform} {ComponentTitle} の {ProductName} コンポーネントを使用すると、行またはセル レベルでカスタム スタイルを設定できます。`{ComponentName}` 条件付きセルのスタイル設定機能は、特定の基準を満たすデータを視覚的に強調またはハイライト表示するために使用され、ユーザーがグリッド内の重要な情報や傾向を簡単に識別できるようにします。 ## {ComponentTitle} 条件付き行のスタイル設定 @@ -33,8 +33,8 @@ _language: ja ```razor - - +<{ComponentSelector} AutoGenerate="true" Id="grid" Data="CustomersData" Name="grid" RowClassesScript="RowClassesHandler" @ref="grid"> + ``` @@ -45,7 +45,7 @@ _language: ja ```ts constructor() { - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; + var grid = this.grid = document.getElementById('grid') as {ComponentName}; grid.rowClasses = this.rowClasses; } ``` @@ -253,7 +253,18 @@ public childRowStyles = { ``` ```razor -Add Hierarchical styles +igRegisterScript("WebGridRowStylesHandler", () => { + return { + background:(row: RowType) => row.data['HasGrammyAward'] ? '#eeddd3' : '#f0efeb', + 'border-left': (row: RowType) => row.data['HasGrammyAward'] ? '2px solid #dda15e' : null + }; +}, true); + +igRegisterScript("WebGridChildRowStylesHandler", () => { + return { + 'border-left': (row: RowType) => row.data['BillboardReview'] > 70 ? '3.5px solid #dda15e' : null + }; +}, true); ``` ```html @@ -265,13 +276,17 @@ Add Hierarchical styles ``` ```razor -Add Hierarchical markup + + + + ``` ```html - - + > ``` @@ -283,12 +298,20 @@ constructor() { rowIsland1.rowStyles = this.childRowStyles; } ``` + +```tsx + + + + +``` ### デモ -`sample="/{ComponentSample}/row-styles", height="620", alt="{Platform} {ComponentTitle} row styles"` +`sample="/{ComponentSample}/row-styles", height="620", alt="{Platform} {ComponentTitle} 行のスタイル設定"` ## {ComponentTitle} 条件付きセルのスタイル設定 @@ -328,6 +351,27 @@ constructor() { + +```html + +``` +```ts +constructor() { + var grammyNominations = document.getElementById('grammyNominations') as IgcColumnComponent; + grammyNominations.cellClasses = this.grammyNominationsCellClassesHandler; +} +``` + +```razor + +``` + +```tsx + +``` + + + @@ -365,12 +409,6 @@ Add tree grid example - -```razor -add example -``` - - `CellClasses` 入力は、キーと値のペアを含むオブジェクト リテラルを受け取ります。キーは CSS クラスの名前です。値はブール値を返すコールバック関数またはブール値です。 @@ -445,6 +483,43 @@ igRegisterScript("CellClassesHandler", () => { + + +```typescript +public grammyNominationsCellClassesHandler = { + downFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] < 5, + upFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] >= 6 +}; +``` + + +```tsx +public grammyNominationsCellClassesHandler = { + downFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] < 5, + upFont: (rowData: any, columnKey: any): boolean => rowData[columnKey] >= 6 +}; +``` + +```razor +igRegisterScript("GrammyNominationsCellClassesHandler", () => { + return { + downFont: (rowData, columnKey) => rowData[columnKey] < 5, + upFont: (rowData, columnKey) => rowData[columnKey] >= 6 + }; +}, true); +``` +```css +.upFont { + color: green !important; +} + +.downFont { + color: red !important; +} +``` + + + ```typescript @@ -480,13 +555,6 @@ Add treegrid example - - -```razor -Add hierarchical grid example -``` - - **::ng-deep** または **ViewEncapsulation.None** を使用してカスタム スタイルを現在のコンポーネントとその子コンポーネントに適用します。 @@ -512,10 +580,6 @@ Add hierarchical grid example 列の `CellStyles` プロパティを公開。列セルの条件付きスタイリングが可能になりました。`CellClasses` と同様、キーがスタイル プロパティであり、値が評価用の式であるオブジェクト リテラルを受け取ります。また、通常のスタイリングを簡単に適用できます (条件なし)。 -[上記のサンプル](#デモ)で作成した項目: -- 列インデックスに基づいて適用される 2 つの異なるスタイル。 -- また、偶数/奇数行に基づいて**テキストの色**を変更します。 - 次にスタイルを定義します。 @@ -538,6 +602,7 @@ public evenColStyles = { + ```razor igRegisterScript("WebGridCellStylesHandler", () => { return { @@ -554,6 +619,7 @@ igRegisterScript("WebGridCellStylesHandler", () => { }; }, true); ``` + ```ts public webGridCellStylesHandler = { @@ -677,6 +743,142 @@ constructor() { ```tsx ``` + + + +```razor +igRegisterScript("CellStylesHandler", () => { + return { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } + }; +}, true); +``` + + +```ts +public cellStylesHandler = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } +} +``` + + +```tsx +const cellStylesHandler = { + background: (rowData, columnKey, cellValue, rowIndex) => rowIndex % 2 === 0 ? "#EFF4FD" : null, + color: (rowData, columnKey, cellValue, rowIndex) => { + if (columnKey === "Debut") { + return cellValue > 2000 ? "#28a745" : "#dc3545"; + } + return undefined; + } +} +``` + + +`ngOnInit` で、`{ComponentName}` 列を動的に作成するために使用される事前定義 `Columns` コレクションの各列に `CellStyles` 構成を追加します。 + +```ts +public ngOnInit() { + this.data = athletesData; + this.columns = [ + { field: 'Id' }, + { field: 'Position' }, + { field: 'Name' }, + { field: 'AthleteNumber' }, + { field: 'CountryName' } + ]; + + this.applyCSS(); +} + +public applyCSS() { + this.columns.forEach((column, index) => { + column.cellStyles = (index % 2 === 0 ? this.evenColStyles : this.oddColStyles); + }); +} + +public updateCSS(css: string) { + this.oddColStyles = {...this.oddColStyles, ...JSON.parse(css)}; + this.evenColStyles = {...this.evenColStyles, ...JSON.parse(css)}; + this.applyCSS(); +} +``` + +```html + + + + +``` + +`popin` アニメーションの定義: + +```scss +// component.scss +@keyframes popin { + 0% { + opacity: 0.1; + transform: scale(.75, .75); + filter: blur(3px) invert(1); + } + + 50% { + opacity: .5; + filter: blur(1px); + } + + 100% { + transform: scale(1, 1); + opacity: 1; + filter: none; + } +} +``` + + + +```razor + + +``` + +```html + + +``` + +```ts +constructor() { + var col1 = document.getElementById('col1') as IgcColumnComponent; + col1.cellStyles = this.cellStylesHandler; +} +``` + + +```tsx + +``` + + ### デモ @@ -712,16 +914,16 @@ public editDone(evt) { ``` ```html - +<{ComponentSelector} id="grid1" height="500px" width="100%" > - +<{ComponentSelector}> ``` ```ts constructor() { - var grid = this.grid = document.getElementById('grid1') as IgcGridComponent; + var grid = this.grid = document.getElementById('grid1') as {ComponentName}; var Col1 = this.Col1 = document.getElementById('Col1') as IgcColumnComponent; var Col2 = this.Col2 = document.getElementById('Col2') as IgcColumnComponent; var Col3 = this.Col3 = document.getElementById('Col3') as IgcColumnComponent; @@ -747,11 +949,11 @@ function editDone(grid, evt) { backgroundClasses = {...backgroundClasses}; } - +<{ComponentSelector} id="grid1" height="500px" width="100%" onCellEdit={editDone}> - + ``` ## API リファレンス @@ -779,6 +981,7 @@ function editDone(grid, evt) { * [表示密度](display-density.md) + コミュニティに参加して新しいアイデアをご提案ください。 * [{ProductName} **フォーラム (英語)**]({ForumsLink}) diff --git a/doc/jp/components/grids/_shared/display-density.md b/doc/jp/components/grids/_shared/display-density.md index 008002bdf..c9b60241d 100644 --- a/doc/jp/components/grids/_shared/display-density.md +++ b/doc/jp/components/grids/_shared/display-density.md @@ -11,7 +11,6 @@ _language: ja # {Platform} {ComponentTitle} 表示密度 {Platform} {ComponentTitle} の {ProductName} 表示密度を使用すると、ユーザーは `{ComponentName}` 内のデータの間隔とレイアウトを制御できます。[密度](https://material.io/design/layout/applying-density.html)を変更することで、大量のコンテンツを操作するときのユーザー エクスペリエンスを大幅に向上させることができます。次の 3 つの表示密度オプションから選択できます。 - - Cozy - Comfortable - Compact @@ -51,8 +50,7 @@ _language: ja ``` - -or +または ```typescript @@ -86,6 +84,7 @@ gridRef.current.displayDensity = 'cosy'; ``` + ```razor
``` + ```typescript @ViewChild(IgxButtonGroupComponent) public buttonGroup: IgxButtonGroupComponent; @@ -161,6 +161,57 @@ public ngOnInit() { } ``` + +```razor +
+ + + + +
+``` + +```html +
+ + + + +
+``` + +```tsx + + + + +``` + + マークアップを追加します。 @@ -496,27 +547,6 @@ public ngOnInit() { ``` - -```ts -constructor() { - var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcGridComponent; - propertyEditor.componentRenderer = this.renderer; - propertyEditor.target = this.grid; - grid.data = this.data; -} - -private _componentRenderer: ComponentRenderer = null; -public get renderer(): ComponentRenderer { - if (this._componentRenderer == null) { - this._componentRenderer = new ComponentRenderer(); - var context = this._componentRenderer.context; - PropertyEditorPanelDescriptionModule.register(context); - WebGridDescriptionModule.register(context); - } - return this._componentRenderer; -} -``` @@ -658,26 +688,6 @@ public get renderer(): ComponentRenderer { ``` -```ts -constructor() { - var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcTreeGridComponent; - propertyEditor.componentRenderer = this.renderer; - propertyEditor.target = this.grid; - grid.data = this.data; -} - -private _componentRenderer: ComponentRenderer = null; -public get renderer(): ComponentRenderer { - if (this._componentRenderer == null) { - this._componentRenderer = new ComponentRenderer(); - var context = this._componentRenderer.context; - PropertyEditorPanelDescriptionModule.register(context); - WebGridDescriptionModule.register(context); - } - return this._componentRenderer; -} -``` @@ -711,6 +721,7 @@ public get renderer(): ComponentRenderer { + @@ -723,6 +734,123 @@ public get renderer(): ComponentRenderer { ``` ```razor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` ```html @@ -765,6 +893,7 @@ public get renderer(): ComponentRenderer { + @@ -775,10 +904,68 @@ public get renderer(): ComponentRenderer { ``` + +```tsx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + + + +最後に密度を適用するためのロジックを実装します。 + + + +```typescript +@ViewChild('grid', { read: {ComponentName} }) +public grid: {ComponentName}; + +public selectDensity(event) { + this.density = this.displayDensities[event.index].label; +} +``` + + + ```ts constructor() { var propertyEditor = this.propertyEditor = document.getElementById('PropertyEditor') as IgcPropertyEditorPanelComponent; - var grid = this.grid = document.getElementById('grid') as IgcHierarchicalGridComponent; + var grid = this.grid = document.getElementById('grid') as {ComponentName}; propertyEditor.componentRenderer = this.renderer; propertyEditor.target = this.grid; grid.data = this.data; @@ -795,20 +982,7 @@ public get renderer(): ComponentRenderer { return this._componentRenderer; } ``` - - -最後に密度を適用するためのロジックを実装します。 - - -```typescript -@ViewChild('grid', { read: {ComponentName} }) -public grid: {ComponentName}; - -public selectDensity(event) { - this.density = this.displayDensities[event.index].label; -} -``` - + ```razor @code { @@ -824,7 +998,39 @@ public selectDensity(event) { private IgbPropertyEditorPanel propertyEditor; private IgbPropertyEditorPropertyDescription displayDensityEditor; - private IgbGrid grid; + private {ComponentSelector} grid; +} +``` + +```tsx +private propertyEditor: IgrPropertyEditorPanel +private propertyEditorRef(r: IgrPropertyEditorPanel) { + this.propertyEditor = r; + this.setState({}); +} +private displayDensityEditor: IgrPropertyEditorPropertyDescription +private grid: {ComponentName} +private gridRef(r: {ComponentName}) { + this.grid = r; + this.setState({}); +} + +constructor(props: any) { + super(props); + + this.propertyEditorRef = this.propertyEditorRef.bind(this); + this.gridRef = this.gridRef.bind(this); +} + +private _componentRenderer: ComponentRenderer = null; + public get renderer(): ComponentRenderer { + if (this._componentRenderer == null) { + this._componentRenderer = new ComponentRenderer(); + var context = this._componentRenderer.context; + PropertyEditorPanelDescriptionModule.register(context); + WebHierarchicalGridDescriptionModule.register(context); + } + return this._componentRenderer; } ``` @@ -891,7 +1097,8 @@ public selectDensity(event) { * [検索](search.md) + コミュニティに参加して新しいアイデアをご提案ください。 * [{ProductName} **フォーラム (英語)**]({ForumsLink}) -* [{ProductName} **GitHub (英語)**]({GithubLink}) \ No newline at end of file +* [{ProductName} **GitHub (英語)**]({GithubLink}) diff --git a/doc/jp/components/grids/_shared/editing.md b/doc/jp/components/grids/_shared/editing.md index 2e0e9b08a..76ca0d18d 100644 --- a/doc/jp/components/grids/_shared/editing.md +++ b/doc/jp/components/grids/_shared/editing.md @@ -62,14 +62,14 @@ _language: ja - カスタム テンプレートについては、[セル編集トピック](cell-editing.md#セル編集テンプレート)を参照してください。 - + すべての利用可能な列データ型は、公式の[列タイプトピック](column-types.md#デフォルトのテンプレート)にあります。 - + ### イベントの引数とシーケンス - + グリッドは、編集エクスペリエンスをより詳細に制御できる広範なイベントを公開します。これらのイベントは、[**行の編集**](row-editing.md)および[**セルの編集**](cell-editing.md)のライフサイクル - 編集の開始、コミット、またはキャンセル時に発生します。 - + | イベント | 説明 | 引数 | キャンセル可能 | | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ----------- | @@ -108,6 +108,7 @@ _language: ja たとえば、ユーザーがセル/行が編集モードのときに列をソートしようとする場合に、新しい値をコミットする方法を示します: + ```html @@ -179,6 +180,76 @@ function onSorting(grid: IgrGridBaseDirective, event: IgrSortingEventArgs) { ``` + + + + +```html + + +``` + + + +```html +<{ComponentSelector} id="hierarchicalGrid" primary-key="ProductID" > + +``` + +```ts +constructor() { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}Component; + hierarchicalGrid.data = this.data; + hierarchicalGrid.addEventListener("sorting", this.onSorting); +} + +public onSorting(event: IgcSortingEventArgs) { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}Component; + hierarchicalGrid.endEdit(true); +} +``` + + + +```typescript +public onSorting(event: ISortingEventArgs) { + this.hierarchicalGrid.endEdit(true); +} +``` + + +```razor +<{ComponentSelector} + Id="hierarchicalGrid" + SortingScript="SortingHandler" + RowEditable="true"> + + +//In JavaScript +function SortingHandler() { + hierarchicalGrid.endEdit(true); +} +igRegisterScript("SortingHandler", SortingHandler, false); +``` + + + +```tsx + + +``` + + + + +```tsx +public onSorting(grid: IgrGridBaseDirective, event: IgrSortingEventArgs) { + hierarchicalGrid.endEdit(true); +} +``` + + + ## API リファレンス diff --git a/doc/jp/components/grids/_shared/excel-style-filtering.md b/doc/jp/components/grids/_shared/excel-style-filtering.md index 475e0797f..ad6efa6d3 100644 --- a/doc/jp/components/grids/_shared/excel-style-filtering.md +++ b/doc/jp/components/grids/_shared/excel-style-filtering.md @@ -42,8 +42,8 @@ _language: ja ```tsx - - +<{ComponentSelector} data={nwindData} autoGenerate="true" allowFiltering="true" filterMode={FilterMode.ExcelStyleFilter}> + ``` @@ -82,16 +82,13 @@ _language: ja ``` ```razor - - - - - - - + + + + + + + ``` ```html @@ -110,7 +107,7 @@ _language: ja ``` ```tsx - + @@ -156,7 +153,7 @@ _language: ja ``` ```razor - + @@ -193,7 +190,7 @@ _language: ja ```html - @@ -204,67 +201,48 @@ _language: ja - - - - - - - - - - - - - - - - - - - - - - + + + ``` -```razor -Add blazor snippets here -``` - ```html - + - - + - - - - - - - - - - - - - - - - - - - - - - + + + ``` +```tsx + + + + + + + {/* ... */} + +``` + +```razor + + + + + + + @* ... *@ + +``` + 下のサンプルでは、「Artist」 列では 3 つの機能がすべて有効化され、「Debut」 では 3 つすべてが無効化され、「Grammy Nominations」 ではピン固定と非表示のみが設定されています。 @@ -293,9 +271,7 @@ Excel スタイル フィルター メニューをさらにカスタマイズす 次のコードは、`ExcelStyleHeaderIconTemplate` を使用して Excel スタイル フィルター メニューをカスタマイズする方法を示しています。 ```razor -<{ComponentSelector} - Name="grid" - @ref="grid" +<{ComponentSelector} Data="Data" AllowFiltering="true" FilterMode="FilterMode.ExcelStyleFilter" @@ -309,6 +285,7 @@ igRegisterScript("WebGridFilterAltIconTemplate", (ctx) => { }, false); ``` + ```ts constructor() { var grid = this.grid = document.getElementById('grid') as {ComponentName}Component; @@ -319,6 +296,7 @@ public webGridFilterAltIconTemplate = (ctx: IgcCellTemplateContext) => { return html`Continued` } ``` + ```tsx const webGridFilterAltIconTemplate = ({dataContext: IgrCellTemplateContext}) => { @@ -333,15 +311,9 @@ const webGridFilterAltIconTemplate = ({dataContext: IgrCellTemplateContext}) => ); } -function App() { - return ( - <> - - - <> - ) -} +<{ComponentSelector} autoGenerate="true" allowFiltering="true" filterMode="excelStyleFilter" + excelStyleHeaderIconTemplate={webGridFilterAltIconTemplate}> + ``` @@ -725,7 +697,7 @@ Add snippet for blazor ### デモ -`sample="/{ComponentSample}/external-outlet", height="700", alt="{Platform} {ComponentTitle} external outlet"` +`sample="/{ComponentSample}/external-outlet", height="700", alt="{Platform} {ComponentTitle} 表示要素が重なる場合のアウトレット"` @@ -1055,7 +1027,7 @@ $custom-drop-down: drop-down-theme( ``` ```tsx - +<{ComponentSelector} className="grid"> ``` ```razor diff --git a/doc/jp/components/grids/_shared/export-excel.md b/doc/jp/components/grids/_shared/export-excel.md index eadabef7b..274ec3738 100644 --- a/doc/jp/components/grids/_shared/export-excel.md +++ b/doc/jp/components/grids/_shared/export-excel.md @@ -124,6 +124,7 @@ public exportButtonHandler() { + ```ts constructor() { var gridToolbarExporter1 = document.getElementById('gridToolbarExporter1') as IgcGridToolbarExporterComponent; @@ -134,6 +135,22 @@ public webGridExportEventFreezeHeaders(args: any): void { args.detail.options.freezeHeaders = true; } ``` + + + + + +```ts +constructor() { + var hGridToolbarExporter = document.getElementById('hGridToolbarExporter') as IgcGridToolbarExporterComponent; + hGridToolbarExporter.addEventListener("exportStarted", this.webGridExportEventFreezeHeaders); +} + +public webGridExportEventFreezeHeaders(args: CustomEvent): void { + args.detail.options.freezeHeaders = true; +} +``` + ```tsx @@ -148,21 +165,56 @@ function exportEventFreezeHeaders(grid: IgrGridBaseDirective, args: IgrExporterE ``` + + +```tsx +function exportEventFreezeHeaders(sender: IgrGridToolbarExporter, args: IgrExporterEventEventArgs) { + args.detail.options.freezeHeaders = true; +} + + + + + + +``` + + + ```razor <{ComponentSelector}> + ExportExcel="true" ExportStartedScript="WebGridExportEventFreezeHeaders"> -igRegisterScript("WebGridExportEventMultiColumnHeaders", (ev) => { - ev.detail.options.ignoreMultiColumnHeaders = false; +igRegisterScript("WebGridExportEventFreezeHeaders", (ev) => { + ev.detail.options.freezeHeaders = false; }, false); ``` + + +```razor + <{ComponentSelector}> + + + + + + + + +igRegisterScript("WebHierarchicalGridExportEventFreezeHeaders", (ev) => { + ev.detail.options.freezeHeaders = false; +}, false); +``` + + ```razor diff --git a/doc/jp/components/grids/_shared/filtering.md b/doc/jp/components/grids/_shared/filtering.md index 0b29bb24a..cc385b985 100644 --- a/doc/jp/components/grids/_shared/filtering.md +++ b/doc/jp/components/grids/_shared/filtering.md @@ -60,23 +60,19 @@ _language: ja ``` - ```html <{ComponentSelector} id="grid1" auto-generate="false" allow-filtering="true"> -<{ComponentSelector}> + ``` - - ```tsx <{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowFiltering="true"> ``` - [高度なフィルタリング](advanced-filtering.md) を有効にするには、`AllowAdvancedFiltering` 入力プロパティを **true** に設定します。 @@ -580,20 +576,16 @@ constructor() { - - + + ``` ```ts constructor() { - var artist = this.artist = document.getElementById('Artist') as IgcColumnComponent; - var hasGrammyAward = this.hasGrammyAward = document.getElementById('HasGrammyAward') as IgcColumnComponent; - - this._bind = () => { - artist.bodyTemplate = this.caseSensitiveFilteringOperand; - hasGrammyAward.bodyTemplate = this.booleanFilteringOperand; - } - this._bind(); + var artist = document.getElementById('Artist') as IgcColumnComponent; + var hasGrammyAward = document.getElementById('HasGrammyAward') as IgcColumnComponent; + artist.filters = this.caseSensitiveFilteringOperand; + hasGrammyAward.filters = this.booleanFilteringOperand; } ``` @@ -651,18 +643,18 @@ public matchingRecordsOnlyStrategy = new TreeGridMatchingRecordsOnlyFilteringStr 一部の色を変更したい場合は、最初にグリッドのクラスを設定する必要があります。 -```ts +```html <{ComponentSelector} class="grid"> ``` ```razor -<{ComponentSelector} Class="grid"> +<{ComponentSelector} Class="grid"> ``` ```tsx - +<{ComponentSelector} className="grid"> ``` diff --git a/doc/jp/components/grids/_shared/multi-column-headers.md b/doc/jp/components/grids/_shared/multi-column-headers.md index 7a1be0165..848163187 100644 --- a/doc/jp/components/grids/_shared/multi-column-headers.md +++ b/doc/jp/components/grids/_shared/multi-column-headers.md @@ -118,24 +118,76 @@ _language: ja ```html - + - - - - + + + + - - + + ``` ```razor -TO-DO H-GRID CODE SNIPPET +<{ComponentSelector} Data="HierarchicalCustomers" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID" Moving="true" AllowFiltering="true"> + + + + + + + + + + + + + + +``` + + +```html + + + + + + + + + + + + + + + +``` + + +```tsx + + + + + + + + + + + + + + + ``` @@ -260,7 +312,7 @@ TO-DO H-GRID CODE SNIPPET ```html - + @@ -271,7 +323,44 @@ TO-DO H-GRID CODE SNIPPET ``` ```razor -TO-DO H-GRID CODE SNIPPET +<{ComponentSelector} Data="HierarchicalCustomers" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID" Moving="true" AllowFiltering="true"> + + + + + + + + + +``` + + +```html + + + + + + + + + + +``` + + +```tsx + + + + + + + + + + ``` @@ -286,7 +375,7 @@ TO-DO H-GRID CODE SNIPPET ```html <{ComponentSelector} [data]="data" height="600px" [allowFiltering]="true"> - + @@ -398,7 +487,44 @@ TO-DO H-GRID CODE SNIPPET ``` ```razor -TO-DO H-GRID CODE SNIPPET +<{ComponentSelector} Data="HierarchicalCustomers" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID" Moving="true" AllowFiltering="true"> + + + + + + + + + +``` + + +```html + + + + + + + + + + +``` + + +```tsx + + + + + + + + + + ``` diff --git a/doc/jp/components/grids/_shared/row-actions.md b/doc/jp/components/grids/_shared/row-actions.md index 13999c1cf..010e38639 100644 --- a/doc/jp/components/grids/_shared/row-actions.md +++ b/doc/jp/components/grids/_shared/row-actions.md @@ -79,6 +79,22 @@ import { IgxActionStripModule } from 'igniteui-angular'; ``` + +```razor + + @foreach (var c in columns) + { + + + } + + + + + +``` + + ```html @@ -100,9 +116,22 @@ import { IgxActionStripModule } from 'igniteui-angular'; ``` + + +```html + + + + + + + +``` + + ```tsx <{ComponentSelector} id="grid" rowEditable="true" primaryKey="ID"> @@ -113,6 +142,20 @@ import { IgxActionStripModule } from 'igniteui-angular'; ``` + + + +```tsx + + + + + + + + +``` + > [!Note] @@ -139,6 +182,7 @@ import { IgxActionStripModule } from 'igniteui-angular'; ``` + ```razor
<{ComponentSelector} Data=northwindEmployees> @@ -157,11 +201,33 @@ import { IgxActionStripModule } from 'igniteui-angular';
``` + - + +```razor +
+ + + + + edit + + @if (!IsDeleted(actionstrip.Context)) + { + + delete + + } + + +
+``` + + + ```html <{ComponentSelector}> @@ -170,17 +236,42 @@ import { IgxActionStripModule } from 'igniteui-angular'; ``` + + + +```html + + + + + + +``` + + ```tsx <{ComponentSelector}> - + ``` + + + +```tsx + + + + + + +``` + `sample="/{ComponentSample}/action-strip", height="600", alt="{Platform} {ComponentTitle} アクション ストリップの例"` diff --git a/doc/jp/components/grids/_shared/row-adding.md b/doc/jp/components/grids/_shared/row-adding.md index e556c92c5..b14ed86b0 100644 --- a/doc/jp/components/grids/_shared/row-adding.md +++ b/doc/jp/components/grids/_shared/row-adding.md @@ -186,9 +186,8 @@ export class AppModule {} - - + ```html <{ComponentSelector} igxPreventDocumentScroll [data]="localdata" [autoGenerate]="false" [primaryKey]="'Debut'" [rowEditable]="true"> @@ -226,9 +225,11 @@ export class AppModule {}
``` + + ```html <{ComponentSelector} id="hGrid" auto-generate="false" primary-key="Debut" row-editable="true"> @@ -265,8 +266,11 @@ export class AppModule {} ``` + + + ```razor <{ComponentSelector} AutoGenerate="false" Id="hGrid" PrimaryKey="Debut" RowEditable="true"> @@ -303,8 +307,148 @@ export class AppModule {} ``` + + + + +```tsx +<{ComponentSelector} + autoGenerate="false" + data={this.singersData} + id="hGrid" + primaryKey="ID" + rowEditable="true" + ref={this.hierarchicalGrid1Ref}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + > **注**: > プライマリ キーは行追加操作で必須です。 @@ -460,6 +604,7 @@ this.treeGrid.beginAddRowByIndex(null); // Spawns the add row UI as the fi 行追加オーバーレイのテキストのカスタマイズは、`RowAddTextDirective` を使用して可能です。 + ```html <{ComponentSelector} [data]="data" [primaryKey]="'ProductID'" [autoGenerate]="false" [rowEditable]="true"> @@ -467,24 +612,41 @@ this.treeGrid.beginAddRowByIndex(null); // Spawns the add row UI as the fi ``` + + ```ts this.grid.rowAddTextTemplate = (ctx: IgcGridEmptyTemplateContext) => { return html`Adding Row`; } ``` + + +```tsx +gridRef.current.rowAddTextTemplate = (ctx: IgrGridEmptyTemplateContext) => { + return ('Adding Row'); +} +``` + + + + + ```tsx gridRef.current.rowAddTextTemplate = (ctx: IgrGridEmptyTemplateContext) => { return ('Adding Row'); } ``` + + + ```razor <{ComponentSelector} Data="data" PrimaryKey="ProductID" AutoGenerate="false" RowEditable="true" RowAddTextTemplate="addTextTemplate"> @@ -496,6 +658,8 @@ gridRef.current.rowAddTextTemplate = (ctx: IgrGridEmptyTemplateContext) => { }; } ``` + + ### ボタンのカスタマイズ diff --git a/doc/jp/components/grids/_shared/row-drag.md b/doc/jp/components/grids/_shared/row-drag.md index 759066bf0..b22285d3d 100644 --- a/doc/jp/components/grids/_shared/row-drag.md +++ b/doc/jp/components/grids/_shared/row-drag.md @@ -317,6 +317,58 @@ public rowDragGhostTemplate = (ctx: IgcGridRowDragGhostContext) => { そのためには、`DragIndicatorIcon` を使用して `{ComponentSelector}` の本体内にテンプレートを渡すことができます。 + + +```tsx + function dragIndicatorIconTemplate(ctx: IgrGridEmptyTemplateContext) { + return ( + <> + + + ); + } + + + +``` + + +```razor + + + +private RenderFragment dragIndicatorIconTemplate = (context) => +{ + return @
+ +
; +}; +``` + + + + + +```html +<{ComponentSelector} row-draggable="true" id="grid"> + +``` + +```ts +constructor() { + var grid = this.grid = document.getElementById('grid') as IgcHierarchicalGridComponent; + grid.dragIndicatorIconTemplate = this.dragIndicatorIconTemplate; +} + +public dragIndicatorIconTemplate = (ctx: IgcGridEmptyTemplateContext) => { + return html``; +} +``` + + + + + ```html <{ComponentSelector}> @@ -327,6 +379,8 @@ public rowDragGhostTemplate = (ctx: IgcGridRowDragGhostContext) => { ``` + + ```html @@ -371,6 +425,7 @@ private RenderFragment dragIndicatorIconTemplate =
; }; ``` + 新しいアイコン テンプレートの設定後、**DragIcon enum** の **DEFAULT** アイコンも調整する必要があるため、`ChangeIcon` メソッドによって適切に変更されます。 @@ -450,10 +505,13 @@ enum DragIcon { > [!Note] > 上記のデモで使用されている行ドラッグ ゴーストに適用されるクラスは ::ng-deep 修飾子を使用しています。これは、行ドラッグが内部グリッド機能であり、CSS カプセル化のためにアプリケーション レベルでアクセスできないためです。 + + ### 行の並べ替えデモ + グリッドの行ドラッグ イベントと `Drop` ディレクティブを使用して、ドラッグよる行の並べ替えるが可能なグリッドを作成できます。 すべてのアクションはグリッド本体の**内側**で発生するため、ここで `Drop` ディレクティブをアタッチする必要があります: @@ -468,6 +526,62 @@ enum DragIcon { グリッドの行ドラッグ イベントを使用して、ドラッグよる行の並べ替えるが可能なグリッドを作成できます。 + + + + +```html + + +``` + +```ts +constructor() { + var hGrid = this.grihGridd = document.getElementById('hGrid') as IgcHierarchicalGridComponent; + hGrid.addEventListener("rowDragEnd", this.webHierarchicalGridReorderRowHandler) +} +``` + + +```tsx + + +``` + +```razor + + +// In JavaScript +igRegisterScript("WebHierarchicalGridReorderRowHandler", (args) => { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0]; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +}, false); + +function getCurrentRowIndex(rowList, cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + + + + ```html @@ -483,11 +597,16 @@ constructor() { ``` + + ```tsx ``` + + + ```razor @@ -517,6 +636,9 @@ function getCurrentRowIndex(rowList, cursorPosition) { return -1; } ``` + + + @@ -688,6 +810,8 @@ export class TreeGridRowReorderComponent { + + ```typescript export class HGridRowReorderComponent { public rowDragStart(args: any): void { @@ -739,6 +863,98 @@ export class HGridRowReorderComponent { } ``` + + + +```tsx + public webHierarchicalGridReorderRowHandler(sender: IgrHierarchicalGrid, args: IgrRowDragEndEventArgs): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = this.hierarchicalGrid; + grid.collapseAll(); + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); + } + + public getCurrentRowIndex(rowList: any[], cursorPosition: any) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; + } +``` + + + +```typescript +public webGridReorderRowHandler(args: CustomEvent): void { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0] as any; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +} +public getCurrentRowIndex(rowList: any[], cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + + +```razor + + +//In JavaScript +igRegisterScript("WebGridReorderRowHandler", (args) => { + const ghostElement = args.detail.dragDirective.ghostElement; + const dragElementPos = ghostElement.getBoundingClientRect(); + const grid = document.getElementsByTagName("igc-hierarchical-grid")[0]; + const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row")); + const currRowIndex = this.getCurrentRowIndex(rows, + { x: dragElementPos.x, y: dragElementPos.y }); + if (currRowIndex === -1) { return; } + // remove the row that was dragged and place it onto its new location + grid.deleteRow(args.detail.dragData.key); + grid.data.splice(currRowIndex, 0, args.detail.dragData.data); +}, false); + +function getCurrentRowIndex(rowList, cursorPosition) { + for (const row of rowList) { + const rowRect = row.getBoundingClientRect(); + if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY && + cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) { + // return the index of the targeted row + return parseInt(row.attributes["data-rowindex"].value); + } + } + return -1; +} +``` + + これらの簡単な手順で、ドラッグ/ドロップで行を並べ替えることができるグリッドを構成しました! 次のデモで、上記コードの動作を確認できます。 diff --git a/doc/jp/components/grids/_shared/row-editing.md b/doc/jp/components/grids/_shared/row-editing.md index a44c5efba..791268bd2 100644 --- a/doc/jp/components/grids/_shared/row-editing.md +++ b/doc/jp/components/grids/_shared/row-editing.md @@ -43,6 +43,8 @@ export class AppModule {} 次に `{ComponentName}` をバインドしたデータソースで定義し、`RowEditable` を true に設定してバインドします。 + + ```html <{ComponentSelector} [data]="data" [primaryKey]="'ProductID'" width="100%" height="500px" [rowEditable]="true"> @@ -106,8 +108,6 @@ function unitsInStockCellTemplate(ctx: IgrCellTemplateContext) { ``` - - ```razor <{ComponentSelector} Width="100%"   Height="100%" @@ -137,6 +137,306 @@ function unitsInStockCellTemplate(ctx: IgrCellTemplateContext) { } } ``` + + + + +```html +<{ComponentSelector} [data]="data" [primaryKey]="'ProductID'" width="100%" height="500px" [rowEditable]="true"> + + + + + + + + + + + +``` + + + +```html + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +```ts +constructor() { + var grid = document.getElementById('hierarchicalGrid') as {ComponentName}Component; + grid.data = this.data; +} +``` + + + +```tsx + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + + + +```razor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + + > [!Note] > プライマリキーは行編集操作で必須です。 @@ -233,14 +533,14 @@ export class {ComponentName}RowEditSampleComponent { ``` - ```razor +```razor igRegisterScript("RowEditTextTemplate", (ctx) => { var html = window.igTemplating.html; return html`
Changes: ${ctx.implicit}
`; }, false); - ``` +``` ```ts public rowEditTextTemplate = (ctx: IgcGridRowEditTextTemplateContext) => { @@ -248,6 +548,8 @@ public rowEditTextTemplate = (ctx: IgcGridRowEditTextTemplateContext) => { } ``` + + ```tsx function rowEditTextTemplate(ctx: IgrGridRowEditTextTemplateContext) { return ( @@ -257,6 +559,8 @@ function rowEditTextTemplate(ctx: IgrGridRowEditTextTemplateContext) { ); } ``` + + ### ボタンのカスタマイズ @@ -266,14 +570,14 @@ function rowEditTextTemplate(ctx: IgrGridRowEditTextTemplateContext) { キーボード ナビゲーションにボタンを含める場合、各ボタンに `RowEditTabStopDirective` が必要です。 - ```html +```html - ``` +``` - ```razor +```razor igRegisterScript("RowEditActionsTemplate", (ctx) => { var html = window.igTemplating.html; window.endRowEdit = ctx.implicit; @@ -282,7 +586,7 @@ function rowEditTextTemplate(ctx: IgrGridRowEditTextTemplateContext) { `; }, false); - ``` +``` ```ts public rowEditActionsTemplate = (ctx: IgcGridRowEditActionsTemplateContext) => { @@ -294,6 +598,8 @@ public rowEditActionsTemplate = (ctx: IgcGridRowEditActionsTemplateContext) => { } ``` + + ```tsx function rowEditActionsTemplate(ctx: IgrGridRowEditActionsTemplateContext) { const endRowEdit = ctx.dataContext.implicit; @@ -305,6 +611,8 @@ function rowEditActionsTemplate(ctx: IgrGridRowEditActionsTemplateContext) { ); } ``` + + diff --git a/doc/jp/components/grids/_shared/row-pinning.md b/doc/jp/components/grids/_shared/row-pinning.md index f9a51e526..5d35ac24a 100644 --- a/doc/jp/components/grids/_shared/row-pinning.md +++ b/doc/jp/components/grids/_shared/row-pinning.md @@ -32,7 +32,7 @@ _language: ja ``` - + ```razor <{ComponentSelector} Width="100%"   Height="100%" @@ -56,8 +56,10 @@ _language: ja ``` + + ```html <{ComponentSelector} auto-generate="false"> @@ -67,8 +69,10 @@ _language: ja ``` + + ```tsx <{ComponentSelector}> @@ -78,6 +82,7 @@ _language: ja ``` + ## 行のピン固定 API @@ -147,6 +152,7 @@ public rowPinning(event) { ``` + ```tsx function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) { event.detail.insertAtIndex = 0; @@ -155,6 +161,7 @@ function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) { <{ComponentSelector} autoGenerate="true" rowPinning={rowPinning}> ``` + ```razor <{ComponentSelector} Width="100%" @@ -176,7 +183,6 @@ function rowPinningHandler(event) { igRegisterScript("rowPinningHandler", rowPinningHandler, false); ``` - ## ピン固定の位置 @@ -226,7 +232,16 @@ grid.pinning = { rows: RowPinningPosition.Bottom }; } } ``` - + + +```tsx + <{ComponentSelector} id="dataGrid" autoGenerate="true"> + + + var hierarchicalGrid = document.getElementById("dataGrid") as IgrGrid; + hierarchicalGrid.pinning = { rows: RowPinningPosition.Bottom }; +``` + ## カスタム行ピン固定 UI @@ -237,6 +252,7 @@ grid.pinning = { rows: RowPinningPosition.Bottom }; アクション ストリップの代わりに、すべての行にピンのアイコンを表示し、エンドユーザーが特定の行のピン状態をクリックして変更できます。 カスタム アイコンを含むセル テンプレートの列を追加することで実行できます。 + ```razor @@ -271,7 +287,6 @@ igRegisterScript("WebGridRowPinCellTemplate", (ctx) => { ``` -カスタムアイコンをクリックすると、関連する行のピン状態は、行の API メソッドを使用して変更できます。 ```typescript public togglePinning(row: IgxGridRow, event) { @@ -306,7 +321,9 @@ public pinCellTemplate = (ctx: IgcCellTemplateContext) => { return html` this.togglePinning(index)}>📌`; } ``` + + ```tsx function cellPinCellTemplate(ctx: IgrCellTemplateContext) { const index = ctx.dataContext.cell.id.rowIndex; @@ -322,9 +339,106 @@ function cellPinCellTemplate(ctx: IgrCellTemplateContext) { ``` + -カスタムアイコンをクリックすると、関連する行のピン状態は、行の API メソッドを使用して変更できます。 + + + +```razor + + +// In Javascript + +igRegisterScript("WebHierarchicalGridRowPinCellTemplate", (ctx) => { + var html = window.igTemplating.html; + window.toggleRowPin = function toggleRowPin(row) { + row.pinned = !row.pinned; + } + const row = ctx.cell.row; + return html`
+ 📌 +
`; +}, false); +``` + + +```html +<{ComponentSelector} [data]="data" [primaryKey]="'ID'" [autoGenerate]="false"> + + + + {{cell.row.pinned ? 'lock' : 'lock_open'}} + + + + + + + + +``` + + +```typescript +public togglePinning(row: IgxGridRow, event) { + event.preventDefault(); + if (row.pinned) { + row.unpin(); + } else { + row.pin(); + } +} +``` + + +```html +<{ComponentSelector} id="grid" primary-key="ID" auto-generate="false"> + + + + +``` + +```typescript +constructor() { + var grid = document.getElementById('grid') as {ComponentName}Component; + var column = document.getElementById('column1') as IgcColumnComponent; + + grid.data = this.data; + column.bodyTemplate = this.pinCellTemplate; +} + +public pinCellTemplate = (ctx: IgcCellTemplateContext) => { + const row = ctx.cell.row; + return html` this.togglePinning(row)}>📌`; +} +``` + + + +```tsx +function cellPinCellTemplate(ctx: IgrCellTemplateContext) { + const row = ctx.dataContext.cell.row; + return ( + <> + toggleRowPin(row)}>📌 + + ); +} + +<{ComponentSelector} primaryKey="ID" autoGenerate="false"> + + + + +``` + + + + + +カスタムアイコンをクリックすると、関連する行のピン状態は、行の API メソッドを使用して変更できます。 ```typescript public togglePinning(index: number) { @@ -340,6 +454,24 @@ function toggleRowPin(index: number) { grid.getRowByIndex(index).pinned = !grid.getRowByIndex(index).pinned; } ``` + + + +カスタムアイコンをクリックすると、関連する行のピン状態は、行の API メソッドを使用して変更できます。 + +```typescript +public togglePinning(row: IgcRowType) { + row.pinned = !row.pinned; +} +``` + + +```tsx +function toggleRowPin(row: IgrRowType) { + row.pinned = !row.pinned; +} +``` + #### デモ diff --git a/doc/jp/components/grids/_shared/row-selection.md b/doc/jp/components/grids/_shared/row-selection.md index e25cf0438..49d995219 100644 --- a/doc/jp/components/grids/_shared/row-selection.md +++ b/doc/jp/components/grids/_shared/row-selection.md @@ -10,7 +10,7 @@ _language: ja # {Platform} {ComponentTitle} 行の選択 -{Platform} {ComponentTitle} の {ProductName} 行選択機能を使用すると、ユーザーは 1 つまたは複数のデータ行を対話的に選択、強調表示、または選択解除できます。`{ComponentName}` 内に使用可能な選択モードがいくつかあります。 +{Platform} {ComponentTitle} の {ProductName} 行選択機能を使用すると、ユーザーは 1 つまたは複数のデータ行を対話的に選択、ハイライト表示、または選択解除できます。`{ComponentName}` 内に使用可能な選択モードがいくつかあります。 - None (なし) 選択 - Multiple (複数) 選択 - Single (単一) 選択 @@ -25,7 +25,7 @@ _language: ja -以下のサンプルは、`{ComponentName}` の 3 種類の**行選択**動作を示しています。以下のボタンを使用して、利用可能な各選択モードを有効にします。スナックバーのメッセージ ボックスを介して、各ボタンの操作に関する簡単な説明が提供されます。スイッチ ボタンを使用して、行セレクター チェックボックスを非表示または表示します。 +以下のサンプルは、`{ComponentName}` の 3 種類の**行選択**動作を示しています。以下のドロップダウンを使用して、利用可能な各選択モードを有効にします。チェックボックスを使用して、行セレクター チェックボックスを非表示または表示します。 diff --git a/doc/jp/components/grids/_shared/search.md b/doc/jp/components/grids/_shared/search.md index 2fc37df71..0f558c357 100644 --- a/doc/jp/components/grids/_shared/search.md +++ b/doc/jp/components/grids/_shared/search.md @@ -125,7 +125,7 @@ const [searchText, setSearchText] = useState('') -検索入力を作成します。input 要素を取得することで、その現在の値を取得できます。これにより、`{ComponentName}` の `FindNext` メソッドと `FindPrev` メソッドを使用して、`SearchText` が出現するすべての箇所を強調表示し、(呼び出したメソッドに応じて) 次 / 前の箇所にスクロールできるようになります。 +検索入力を作成します。input 要素を取得することで、その現在の値を取得できます。これにより、`{ComponentName}` の `FindNext` メソッドと `FindPrev` メソッドを使用して、`SearchText` が出現するすべての箇所をハイライト表示し、(呼び出したメソッドに応じて) 次 / 前の箇所にスクロールできるようになります。 @@ -137,7 +137,7 @@ const [searchText, setSearchText] = useState('') -検索入力を作成します。`searchText` を新しく作成したinput要素の `value` プロパティにバインドし、`inputOccured` イベントをサブスクライブすることで、ユーザーによるすべての `searchText` の変更を検出できます。これにより、`{ComponentName}` の `findNext` メソッドと `findPrev` メソッドを使用して、`searchText` が出現するすべての箇所を強調表示し、(呼び出したメソッドに応じて) 次 / 前の箇所にスクロールできるようになります。 +検索入力を作成します。`searchText` を新しく作成したinput要素の `value` プロパティにバインドし、`inputOccured` イベントをサブスクライブすることで、ユーザーによるすべての `searchText` の変更を検出できます。これにより、`{ComponentName}` の `findNext` メソッドと `findPrev` メソッドを使用して、`searchText` が出現するすべての箇所をハイライト表示し、(呼び出したメソッドに応じて) 次 / 前の箇所にスクロールできるようになります。 `FindNext` と `FindPrev` メソッドの両方に 3 つの引数があります。 @@ -146,7 +146,7 @@ const [searchText, setSearchText] = useState('') - (オプション) `CaseSensitive`: **boolean** (検索で完全一致するかどうか、デフォルト値は false)。 - (オプション) `ExactMatch`: **boolean** (検索で完全一致するかどうか、デフォルト値は false)。 -完全一致で検索した場合、検索 API は `SearchText` と完全一致 (大文字小文字の区別を含む) するセル値のみ結果として強調表示します。たとえば、文字列 'software' と 'Software' は大文字小文字を区別しない場合は完全一致となります。 +完全一致で検索した場合、検索 API は `SearchText` と完全一致 (大文字小文字の区別を含む) するセル値のみ結果としてハイライト表示します。たとえば、文字列 'software' と 'Software' は大文字小文字を区別しない場合は完全一致となります。 上記のメソッドは **number** 値を返します (`{ComponentName}` で指定した文字列が含まれる回数)。 @@ -496,7 +496,7 @@ function updateSearch() { ### 保持 -`{ComponentName}` のフィルターやソート、レコードの追加や削除をする場合を想定します。そのような処理の後、現在の検索が自動的に更新されて `SearchText` に一致するテキストが保持されます。更に検索がページングで動作し、`{ComponentName}` の `PerPage` プロパティの変更時も強調表示が保持されます。 +`{ComponentName}` のフィルターやソート、レコードの追加や削除をする場合を想定します。そのような処理の後、現在の検索が自動的に更新されて `SearchText` に一致するテキストが保持されます。更に検索がページングで動作し、`{ComponentName}` の `PerPage` プロパティの変更時もハイライト表示が保持されます。 ### アイコンの追加 @@ -579,7 +579,7 @@ builder.Services.AddIgniteUIBlazor( -[InputGroup](../input-group.md) 内のすべてのコンポーネントをラップします。左側で検索と 削除/クリア アイコンを切り替えます (検索入力が空かどうかに基づきます)。中央に入力を配置します。更に削除アイコンがクリックされたときに `SearchText` を更新し、`{ComponentName}` の `ClearSearch` メソッドを呼び出して強調表示をクリアします。 +[InputGroup](../input-group.md) 内のすべてのコンポーネントをラップします。左側で検索と 削除/クリア アイコンを切り替えます (検索入力が空かどうかに基づきます)。中央に入力を配置します。更に削除アイコンがクリックされたときに `SearchText` を更新し、`{ComponentName}` の `ClearSearch` メソッドを呼び出してハイライト表示をクリアします。 @@ -638,7 +638,7 @@ constructor() { -`Input` 内のすべてのコンポーネントをラップします。左側で検索と 削除/クリア アイコンを切り替えます (検索入力が空かどうかに基づきます)。中央に入力を配置します。更に削除アイコンがクリックされたときに `SearchText` を更新し、`{ComponentName}` の `ClearSearch` メソッドを呼び出して強調表示をクリアします。 +`Input` 内のすべてのコンポーネントをラップします。左側で検索と 削除/クリア アイコンを切り替えます (検索入力が空かどうかに基づきます)。中央に入力を配置します。更に削除アイコンがクリックされたときに `SearchText` を更新し、`{ComponentName}` の `ClearSearch` メソッドを呼び出してハイライト表示をクリアします。 @@ -938,8 +938,8 @@ function nextSearch() { |制限|説明| |--- |--- | -|テンプレートを使用したセル内の検索|検索機能の強調表示が、デフォルトのセルテンプレートに対してのみ機能する問題。カスタム セル テンプレートを含む列がある場合、強調表示が機能しないため、列フォーマッタなどの代替アプローチを使用するか、`Searchable` (検索可能な) プロパティを false に設定します。| -|セル テキストが切れる問題| セル内のテキストが長すぎるために検索テキストが省略記号によって切れている場合も、セルまでスクロールして一致カウントに含まれますが、強調表示はされません。 | +|テンプレートを使用したセル内の検索|検索機能のハイライト表示が、デフォルトのセルテンプレートに対してのみ機能する問題。カスタム セル テンプレートを含む列がある場合、ハイライト表示が機能しないため、列フォーマッタなどの代替アプローチを使用するか、`Searchable` (検索可能な) プロパティを false に設定します。| +|セル テキストが切れる問題| セル内のテキストが長すぎるために検索テキストが省略記号によって切れている場合も、セルまでスクロールして一致カウントに含まれますが、ハイライト表示はされません。 | ## API リファレンス diff --git a/doc/jp/components/grids/_shared/selection.md b/doc/jp/components/grids/_shared/selection.md index 7327cd4fb..80a509756 100644 --- a/doc/jp/components/grids/_shared/selection.md +++ b/doc/jp/components/grids/_shared/selection.md @@ -36,9 +36,9 @@ _language: ja ## {Platform} {ComponentTitle} 選択のオプション - + {ProductName} `{ComponentName}` コンポーネントは、[行選択](row-selection.md)、[セル選択](cell-selection.md)、[列選択](column-selection.md)の 3 つの選択モードを提供します。デフォルトでは、`{ComponentName}` で**複数セル選択**モードのみが有効になっています。選択モードの変更または有効化は、`RowSelection`、`CellSelection` または `Selectable` プロパティを使用します。 - + ### {Platform} {ComponentTitle} 行選択 @@ -48,11 +48,11 @@ _language: ja - `Single` - `{ComponentName}` 内の 1 行のみの選択が利用可能になります。 - `Multiple` - 複数行の選択は、Ctrl + クリックSpace キー を押して行セレクターを使用することにより、複数行の選択が可能になります。 - + - `MultipleCascade` - これはカスケード選択のモードであり、ユーザーがユーザーの操作で選択したレコードの下のツリー内のすべての子が選択されます。このモードでは、親の選択状態はその子の選択状態に完全に依存します。 - + > 詳細については、[行選択トピック](row-selection.md)を参照してください。 diff --git a/doc/jp/components/grids/_shared/sorting.md b/doc/jp/components/grids/_shared/sorting.md index e75fcbad0..c1a65b98a 100644 --- a/doc/jp/components/grids/_shared/sorting.md +++ b/doc/jp/components/grids/_shared/sorting.md @@ -78,6 +78,7 @@ import { SortingDirection } from 'igniteui-webcomponents-grids'; import { SortingDirection } from "igniteui-react-grids"; ``` + ```typescript @@ -136,13 +137,74 @@ gridRef.current.sort([ { fieldName: 'Price', dir: SortingDirection.Desc } ]); ``` + + + + +```typescript + +// Perform a case insensitive ascending sort on the ProductName column. +this.hierarchicalGrid.sort({ fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }); + +// Perform sorting on both the ProductName and Price columns. +this.hierarchicalGrid.sort([ + { fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'Price', dir: SortingDirection.Desc } +]); +``` + + + +```typescript + +// Perform a case insensitive ascending sort on the ProductName column. +this.hierarchicalGrid.sort([{ fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }]); + +// Perform sorting on both the ProductName and Price columns. +this.hierarchicalGrid.sort([ + { fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'Price', dir: SortingDirection.Desc } +]); +``` + + +```razor +@code { + this.hierarchicalGrid.SortAsync(new IgbSortingExpression[] + { + new IgbSortingExpression + { + FieldName = "CompanyName", + Dir = SortingDirection.Asc + }, + new IgbSortingExpression + { + FieldName = "Country", + Dir = SortingDirection.Asc + } + }); +} +``` + +```tsx +// Perform a case insensitive ascending sort on the ProductName column. +hierarchicalGridRef.current.sort([{ fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }]); + +// Perform sorting on both the ProductName and Price columns. +hierarchicalGridRef.current.sort([ + { fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'Price', dir: SortingDirection.Desc } +]); +``` + > [!Note] > Sorting は、`DefaultSortingStrategy` アルゴリズムを使用して実行されます。`Column` または `ISortingExpression` は、代替アルゴリズムとして `ISortingStrategy` のカスタム実装を使用できます。たとえば複雑なテンプレート列や画像列にユーザー定義のソートを定義する必要がある場合に便利です。 フィルター動作と同様に、ソート状態をクリアするには `ClearSort` メソッドを使用します。 + ```typescript // Removes the sorting state from the ProductName column @@ -170,6 +232,37 @@ gridRef.current.clearSort(); this.grid.ClearSortAsync(""); } ``` + + + + +```typescript +// Removes the sorting state from the ProductName column +this.hierarchicalGrid.clearSort('ProductName'); + +// Removes the sorting state from every column in the {ComponentTitle} +this.hierarchicalGrid.clearSort(); +``` + + +```tsx +// Removes the sorting state from the ProductName column +hierarchicalGridRef.current.clearSort('ProductName'); + +// Removes the sorting state from every column in the {ComponentTitle} +hierarchicalGridRef.current.clearSort(); +``` + +```razor +@code { + @*Removes the sorting state from the Title column*@ + this.hierarchicalGrid.ClearSortAsync("Title"); + + @*Removes the sorting state from every column in the Grid*@ + this.hierarchicalGrid.ClearSortAsync(""); +} +``` + > [!Note] > `{ComponentName}` の `SortStrategy` は `Column` の `SortStrategy` と比較して異なるタイプです。異なるスコープで機能し、異なるパラメーターを公開するためです。 @@ -181,6 +274,7 @@ gridRef.current.clearSort(); `{ComponentName}` でソート状態を初期設定するには、ソート式の配列を `{ComponentName}` の `SortingExpressions` プロパティに渡します。 + ```typescript public ngOnInit() { @@ -228,6 +322,57 @@ useEffect(() => { ]; }, []) ``` + + + + +```typescript +public ngOnInit() { + this.hierarchicalGrid.sortingExpressions = [ + { fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'Price', dir: SortingDirection.Desc } + ]; +} +``` + + +```razor +@code { + protected override void OnAfterRender(bool first) + { + if (first) + { + this.hierarchicalGrid.SortingExpressions = new IgbSortingExpression[]{ + new IgbSortingExpression() + { + FieldName = "Title", + Dir = SortingDirection.Asc + }}; + } + } +} +``` + + +```typescript +public connectedCallback() { + this.hierarchicalGrid.sortingExpressions = [ + { fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'Price', dir: SortingDirection.Desc } + ]; +} +``` + + +```tsx +useEffect(() => { + hierarchicalGridRef.current.sortingExpressions = [ + { fieldName: 'UnitsInStock', dir: SortingDirection.Asc, ignoreCase: true }, + { fieldName: 'ProductName', dir: SortingDirection.Desc } + ]; +}, []) +``` + > [!Note] > `string` 型の値が `DataType` `Date` の列で使用される場合、`{ComponentName}` が値を `Date` オブジェクトに解析しないため `{ComponentName}` `Sorting` が正しく動作しません。`string` オブジェクトを使用する場合、値を `Date` オブジェクトに解析するためのロジックをアプリケーション レベルで実装する必要があります。 @@ -239,7 +384,6 @@ useEffect(() => { `{ComponentName}` はリモート仮想化をサポートします。詳細については、[{ComponentTitle} リモート データ操作](remote-data-operations.md)で説明されています。 - ## ソート インジケーター テンプレート @@ -255,10 +399,11 @@ useEffect(() => { ``` -- `SortHeaderIconTemplate` – ソートが適用されない場合にソート アイコンを再テンプレート化します。 +- `SortHeaderIconTemplate` – ソートが適用されない場合にソート アイコンを再テンプレート化します。 - + + ```razor <{ComponentSelector} SortHeaderIconTemplate="SortDefaultTemplate"> @@ -269,8 +414,10 @@ useEffect(() => { }; } ``` - + + + ```ts constructor() { var grid = this.grid = document.getElementById('grid') as {ComponentName}Component; @@ -282,7 +429,10 @@ public sortHeaderIconTemplate = (ctx: IgcGridHeaderTemplateContext) => { return html``; } ``` + + + ```tsx function sortHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { return ( @@ -292,8 +442,10 @@ function sortHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { ); } - +<{ComponentSelector} sortHeaderIconTemplate={sortHeaderIconTemplate}> ``` + + @@ -309,8 +461,8 @@ function sortHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { - `SortAscendingHeaderIconTemplate` – 列が昇順にソートされたときにソート アイコンを再テンプレート化します。 - - + + ```razor <{ComponentSelector} SortAscendingHeaderIconTemplate="SortAscendingTemplate"> @@ -321,8 +473,10 @@ function sortHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { }; } ``` - + + + ```ts constructor() { var grid = this.grid = document.getElementById('grid') as {ComponentName}Component; @@ -334,7 +488,10 @@ public sortAscendingHeaderIconTemplate = (ctx: IgcGridHeaderTemplateContext) => return html``; } ``` + + + ```tsx function sortAscendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { return ( @@ -344,8 +501,10 @@ function sortAscendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { ); } - +<{ComponentSelector} sortAscendingHeaderIconTemplate={sortAscendingHeaderIconTemplate}> ``` + + @@ -361,7 +520,8 @@ function sortAscendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { - `SortDescendingHeaderIconTemplate` – 列が降順にソートされたときにソート アイコンを再テンプレート化します。 - + + ```razor <{ComponentSelector} SortDescendingHeaderIconTemplate="SortDescendingTemplate"> @@ -372,8 +532,10 @@ function sortAscendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { }; } ``` - + + + ```ts constructor() { var grid = this.grid = document.getElementById('grid') as {ComponentName}Component; @@ -385,7 +547,10 @@ public sortDescendingHeaderIconTemplate = (ctx: IgcGridHeaderTemplateContext) => return html``; } ``` + + + ```tsx function sortDescendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { return ( @@ -395,8 +560,10 @@ function sortDescendingHeaderIconTemplate(ctx: IgrGridHeaderTemplateContext) { ); } - +<{ComponentSelector} sortDescendingHeaderIconTemplate={sortDescendingHeaderIconTemplate}> ``` + + diff --git a/doc/jp/components/grids/_shared/summaries.md b/doc/jp/components/grids/_shared/summaries.md index e80c83bc3..4d10525c7 100644 --- a/doc/jp/components/grids/_shared/summaries.md +++ b/doc/jp/components/grids/_shared/summaries.md @@ -43,6 +43,7 @@ _language: ja `HasSummary` プロパティを **true** に設定すると `{ComponentName}` 集計が列レベルで有効になります。各列の集計は列のデータ型に基づいて解決されます。`{ComponentName}` のデフォルトの列データ型は `string` のため、`number` または `date` 固有の集計を適用するには、`DataType` プロパティを `number` または `date` に設定します。集計値は、グリッドの `Locale` および列 `PipeArgs` に従ってローカライズされて表示されます。 + ```html <{ComponentSelector} #grid1 [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)"> @@ -88,9 +89,76 @@ _language: ja ``` + + + + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)"> + + + + + + + +``` + + +```razor +<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID"> + + + + + + + + + + + + +``` + + +```html + + + + + + + + + + + + + +``` + + +```tsx + + + + + + + + + + + + + +``` + 特定の列や列のリストを有効または無効にする他の方法として `{ComponentName}` のパブリック メソッド `EnableSummaries`/`DisableSummaries` を使用する方法があります。 + ```html <{ComponentSelector} #grid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)" > @@ -186,6 +254,101 @@ function disableSummary() { ``` + + + + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px"> + + + + + + + + +``` + + + +```html + + + + + + + + + +``` +```ts +constructor() { + var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}; + var enableBtn = this.enableBtn = document.getElementById('enableBtn') as HTMLButtonElement; + var disableBtn = this.disableBtn = document.getElementById('disableBtn') as HTMLButtonElement; + hierarchicalGrid.data = this.data; + enableBtn.addEventListener("click", this.enableSummary); + disableBtn.addEventListener("click", this.disableSummary); +} +``` + + + +```typescript +public enableSummary() { + this.hierarchicalGrid.enableSummaries([ + {fieldName: 'GrammyNominations'}, + {fieldName: 'GrammyAwards'} + ]); +} +public disableSummary() { + this.hierarchicalGrid.disableSummaries(['GrammyNominations']); +} +``` + + +```razor +<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID"> + + + + + + + +@code { + public async void DisableSummaries() + { + object[] disabledSummaries = { "GrammyNominations" }; + await this.hierarchicalGrid.DisableSummariesAsync(disabledSummaries); + } +} +``` + +```tsx +function enableSummary() { + hierarchicalGridRef.current.enableSummaries([ + {fieldName: 'GrammyNominations'}, + {fieldName: 'GrammyAwards'} + ]); +} +function disableSummary() { + hierarchicalGridRef.current.disableSummaries(['GrammyNominations']); +} + + + + + + + + + + +``` + ## カスタム {ComponentTitle} 集計 @@ -299,7 +462,7 @@ interface IgcSummaryResult { > [!Note] > 集計行の高さを適切に計算するには、データが空の場合でも、{ComponentTitle} が常に適切な長さの `SummaryResult` の配列を返す `Operate` メソッドを必要とします。 - + 次に、カスタム集計を列 `UnitsInStock` に追加しましょう。次に、カスタム集計を列 `UnitsInStock` に追加しましょう。 ```html @@ -362,6 +525,67 @@ igRegisterScript("WebGridCustomSummary", (event) => { } }, false); ``` + + + +次に、カスタム集計を列 `GrammyAwards` に追加しましょう。これを実現するには、以下で作成するクラスに `Summaries` プロパティを設定します。 + +```html +<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px"> + + + + + + +``` + + + +```html + + + + + + + +``` +```ts +constructor() { + var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName}; + var grammyAwards = this.grammyAwards = document.getElementById('grammyAwards') as IgcColumnComponent; + hierarchicalGrid.data = this.data; + grammyAwards.summaries = this.mySummary; +} +``` + + +```typescript +export class HierarchicalGridComponent implements OnInit { + mySummary = MySummary; +} +``` + +```razor +<{ComponentSelector} + AutoGenerate="true" + Name="hierarchicalGrid" + @ref="hierarchicalGrid" + Data="SingersData" + PrimaryKey="ID" + ColumnInitScript="WebHierarchicalGridCustomSummary"> + + +// In Javascript +igRegisterScript("WebHierarchicalGridCustomSummary", (event) => { + if (event.detail.field === "GrammyAwards") { + event.detail.summaries = WebHierarchicalGridSummary; + } +}, false); +``` + + ### すべてのデータにアクセスするカスタム集計 カスタム列集計内のすべての {ComponentTitle} データにアクセスできます。SummaryOperand `Operate` メソッドには、2 つの追加のオプション パラメーターが導入されています。 @@ -410,6 +634,7 @@ class WebGridDiscontinuedSummary { } ``` + `sample="/{ComponentSample}/data-summaries-custom", height="650", alt="{Platform} {ComponentTitle} データ集計カスタム"` @@ -421,6 +646,11 @@ class WebGridDiscontinuedSummary { `sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} データ集計オプション"` + + + +`sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} データ集計オプション"` + @@ -489,14 +719,8 @@ igRegisterScript("SummaryTemplate", (ctx) => { - - `sample="/{ComponentSample}/data-summary-template", height="650", alt="{Platform} {ComponentTitle} データ集計のテンプレート"` - - - - ## 集計のフォーマット デフォルトでは、組み込みの集計オペランドによって生成される集計結果は、グリッド `Locale` および列 `PipeArgs` に従ってローカライズおよびフォーマットされます。カスタム オペランドを使用する場合、`Locale` と `PipeArgs` は適用されません。集計結果のデフォルトの外観を変更する場合は、`SummaryFormatter` プロパティを使用してフォーマットできます。 @@ -537,20 +761,36 @@ constructor() { } ``` - - ```razor -igRegisterScript("SummaryFormatter", (summary, summaryOperand) => { - return summary.summaryResult + " rows"; -}, false); +igRegisterScript("SummaryFormatter", (summary) => { + const result = summary.summaryResult; + if (summaryOperand instanceof IgcDateSummaryOperand && summary.key !== "count" && result !== null && result !== undefined) { + const format = new Intl.DateTimeFormat("en", { year: "numeric" }); + return format.format(new Date(result)); + } + return result; +}, true); ``` -`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} データ集計のフォーマッタ"` - +```tsx +public summaryFormatter( + summary: IgrSummaryResult, + summaryOperand: IgrSummaryOperand + ): string { + const result = summary.summaryResult; + if (summary.key !== "count" && result !== null && result !== undefined) { + const format = new Intl.DateTimeFormat("en", { year: "numeric" }); + return format.format(new Date(result)); + } + return result; + } + + +``` - +`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} データ集計のフォーマッタ"` @@ -631,6 +871,7 @@ igRegisterScript("SummaryFormatter", (summary, summaryOperand) => { 定義済みのテーマに加えて、利用可能な [CSS プロパティ](../theming.md)のいくつかを設定することで、グリッドをさらにカスタマイズできます。 一部の色を変更したい場合は、最初にグリッドのクラスを設定する必要があります。 + ```html <{ComponentSelector} class="grid"> ``` @@ -658,7 +899,37 @@ igRegisterScript("SummaryFormatter", (summary, summaryOperand) => { ### デモ `sample="/{ComponentSample}/groupby-summary-styling", height="710", alt="{Platform} {ComponentTitle} グループ化集計のスタイル設定"` + + + +```html +<{ComponentSelector} id="hierarchicalGrid"> +``` + +```razor +<{ComponentSelector} id="hierarchicalGrid"> +``` + +```tsx +<{ComponentSelector} id="hierarchicalGrid"> + +``` + +次に、そのクラスに関連する CSS プロパティを設定します。 + +```css +#hierarchicalGrid { + --ig-grid-summary-background-color:#e0f3ff; + --ig-grid-summary-focus-background-color: rgba( #94d1f7, .3 ); + --ig-grid-summary-label-color: rgb(228, 27, 117); + --ig-grid-summary-result-color: black; +} +``` + +### デモ +`sample="/{ComponentSample}/data-summary-options-styling", height="710", alt="{Platform} {ComponentTitle} グループ化集計のスタイル設定"` + diff --git a/doc/jp/components/grids/_shared/toolbar.md b/doc/jp/components/grids/_shared/toolbar.md index 2ca0b4afc..cd4cbac24 100644 --- a/doc/jp/components/grids/_shared/toolbar.md +++ b/doc/jp/components/grids/_shared/toolbar.md @@ -19,10 +19,19 @@ _language: ja ツールバーと事前定義された UI コンポーネントは、{Platform} イベントをサポートし、開発者向けに API を公開します。 + ## {Platform} ツールバー グリッドの例 +`sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} ツールバーの例"` + + + + +## {Platform} Toolbar Grid Example `sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} ツールバーの例"` + + 事前定義された `Actions` および `Title` UI コンポーネントが `GridToolbar` 内に追加されます。これはすべて、対応するグリッド機能とのデフォルトのインタラクションを提供するツールバーを持つために必要です。 @@ -59,7 +68,7 @@ _language: ja - Grid Toolbar + Grid Toolbar @@ -118,6 +127,7 @@ _language: ja ``` + ```html @@ -132,6 +142,11 @@ _language: ja
``` + + + + + ```html @@ -146,6 +161,45 @@ _language: ja ``` + + + + +```tsx + + + + Hierarchical Grid Toolbar + + + + + + + + + +``` + + + + + +```razor + + + Hierarchical Grid Toolbar + + + + + + + + +``` + + > [!Note] > 上記のコード スニペットに示されているように、事前定義された `Actions` UI コンポーネントは `GridToolbarActions` にラップされています。このように、ツールバーのタイトルはツールバーの左側に配置され、アクションはツールバーの右側に配置されます。 @@ -196,6 +250,7 @@ _language: ja ``` + ```html @@ -203,6 +258,11 @@ _language: ja
``` + + + + + ```html @@ -210,13 +270,37 @@ _language: ja ``` + -デフォルトの各 UI コンポーネントの詳細については、以下の**機能**セクションを読み続けてください。 + + +```razor + + + + +``` + + + +```tsx + + + + +``` + + +デフォルトの各 UI コンポーネントの詳細については、以下の**機能**セクションを読み続けてください。 + + + ## 子グリッド付きのツールバー + IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動作には特定の制限があるため、子グリッドのスコープでツールバーを使用する場合は注意が必要です。 `igx-row-island` タグ内でツールバー コンポーネントを定義するときは、必ず IgxGridToolbar を使用し、提供されたグリッド インスタンスを入力プロパティとしてツールバー自体に渡すようにしてください。 これにより、テンプレートのスコープ内に常に正しいグリッド インスタンスが含まれるようになります。 @@ -236,8 +320,85 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 ``` + + + +`{ComponentSelector}` の子グリッドの実装方法および DI スコープの動作には制限があるため、`{RowIslandSelector}` 内でツールバー コンポーネントを定義するには、`ToolbarTemplate` 入力プロパティを使用します。これにより、子グリッドが独立したツールバー インスタンスを作成することができます。 + + + +```ts +constructor() { + var rowIsland1 = document.getElementById('rowIsland1') as IgcRowIslandComponent; + rowIsland1.toolbarTemplate = this.rowIslandToolbarTemplate; +} + +public rowIslandToolbarTemplate = () => { + return html` + + + + + + + `; +} +``` + +```html + + ... + + + +``` + + + +```razor + + ... + + + + +//In JavaScript: +igRegisterScript("RowIslandToolbarTemplate", () => { + var html = window.igTemplating.html; + return html` + + + + + + + `; +}, false); +``` + +```tsx +function rowIslandToolbarTemplate = () => { + return ( + + + + + + + + + ); +} + + + ... + + + +``` + ## 機能 @@ -249,8 +410,15 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 以下にリストされているのは、ツールバーの主な機能と、それぞれのサンプル コードです。 + `sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} ツールバー サンプル 2"` + + + +`sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} ツールバー サンプル 2"` + + ### Title (タイトル) @@ -259,29 +427,47 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 ユーザーは、単純なテキストからより複雑なテンプレートまで、どんなものでも提供できます。 + + ```html Grid toolbar title ``` + + + + ```html Grid toolbar title ``` + + + + ```tsx - Grid toolbar title + + Grid toolbar title + ``` + + + + ```razor Grid toolbar title ``` + + ### 操作 @@ -289,6 +475,8 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 `GridToolbarActions` は、ユーザーが親グリッドに関連して操作 / インタラクションを配置できる特定のコンテナを公開します。 ツールバーのタイトル部分と同様に、ユーザーは、デフォルトのツールバー インタラクション コンポーネントを含め、そのテンプレート部分内にどんなものでも提供できます。 + + ```html @@ -298,15 +486,11 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 ``` + + -```razor - - - - - -``` - + + ```html @@ -314,15 +498,33 @@ IgxHierarchicalGrid の子グリッドの実装方法と DI スコープの動 ``` + + + + + +```razor + + + + + +``` + + + + ```tsx - ``` + + + 各アクションは、`OverlaySettings` 入力を使用して、アクション ダイアログのオーバーレイ設定を変更する方法を公開するようになりました。例: @@ -385,6 +587,8 @@ constructor() { コンポーネントは、ツールバーを含む親グリッドと、コンポーネントのタイトル、コンポーネント入力のプレースホルダー、ドロップダウン自体の高さなど、UI をカスタマイズするためのいくつかの入力プロパティを使用して、そのまま動作します。 + + ```html @@ -397,15 +601,11 @@ constructor() { ``` + + -```razor - - - - - -``` - + + ```html @@ -417,7 +617,23 @@ constructor() { ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -425,11 +641,15 @@ constructor() { ``` + + ### 列の非表示 `GridToolbarHiding` は、列非表示を操作するためのデフォルトの UI を提供します。コンポーネントのタイトル、コンポーネント入力のプレースホルダー、ドロップダウン自体の高さなど、UI をカスタマイズするための同じ入力プロパティを公開します。 + + ```html @@ -442,15 +662,11 @@ constructor() { ``` + + -```razor - - - - - -``` - + + ```html @@ -462,7 +678,23 @@ constructor() { ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -470,11 +702,15 @@ constructor() { ``` + + ### 高度なフィルタリング ツールバーの高度なフィルタリング コンポーネントは、高度なフィルタリング機能のデフォルトの UI を提供します。コンポーネントは、ボタンのデフォルトのテキストを変更する方法を公開します。 + + ```html @@ -482,15 +718,11 @@ constructor() { ``` + + -```razor - - - - - -``` - + + ```html @@ -498,7 +730,23 @@ constructor() { ``` + + + + +```razor + + + + + +``` + + + + + ```tsx @@ -506,6 +754,8 @@ constructor() { ``` + + ### データのエクスポート @@ -547,6 +797,8 @@ export class AppModule { ... } これは、{Platform} テンプレートを介してカスタマイズできるいくつかのオプションを示すスニペットです。 + + ```html @@ -563,15 +815,11 @@ export class AppModule { ... } ``` + + -```razor - - - - - -``` - + + ```html @@ -580,7 +828,23 @@ export class AppModule { ... } ``` + + + + + +```razor + + + + + +``` + + + + ```tsx @@ -588,6 +852,8 @@ export class AppModule { ... } ``` + + エクスポートされたファイル名を変更することに加えて、ユーザーは `ToolbarExporting` イベントを待機し、イベント プロパティのオプション エントリをカスタマイズすることで、エクスポーター オプションをさらに構成できます。 @@ -598,6 +864,8 @@ export class AppModule { ... } 次のコード スニペットは、ツールバーのエクスポート イベントのサブスクライブとエクスポーター オプションの構成を示しています。 + + ```html <{ComponentSelector} (toolbarExporting)="configureExport($event)" > @@ -688,6 +956,64 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { }); }, false); ``` + + + + + + +```html +<{ComponentSelector} id="hierarchicalGrid"> +``` +```ts +constructor() { + var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent; + hierarchicalGrid.addEventListener("toolbarExporting", this.configureExport); +} + +public configureExport(evt: CustomEvent) { + const args = evt.detail; + const options: IgcExporterOptionsBase = args.options; + if (options) { + options.fileName = `Report_${new Date().toDateString()}`; + (args.exporter as any).columnExporting.subscribe((columnArgs: any) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); + } +} +``` + + +```tsx +function configureExport(evt: IgrGridToolbarExportEventArgs) { + const args = evt.detail; + const options: IgrExporterOptionsBase = args.options; + + options.fileName = `Report_${new Date().toDateString()}`; + (args.exporter as any).columnExporting.subscribe((columnArgs: any) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); +} + +<{ComponentSelector} toolbarExporting={configureExport}> + +``` + +```razor +<{ComponentSelector} ToolbarExportingScript="ConfigureExport"> + +// In Javascript +igRegisterScript("ConfigureExport", (evt) => { + const args = evt.detail; + const options = args.options; + options.fileName = `Report_${new Date().toDateString()}`; + args.exporter.columnExporting.subscribe((columnArgs) => { + columnArgs.cancel = columnArgs.header === 'Photo'; + }); +}, false); +``` + + 以下のサンプルは、エクスポート ファイルをカスタマイズする方法を示します。 @@ -695,7 +1021,6 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { - ## エクスポート インジケーター @@ -710,17 +1035,22 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { `sample="/{ComponentSample}/data-exporting-indicator", height="370", alt="{Platform} {ComponentTitle} データ エクスポート インジケーター"` - + ## カスタム コンテンツ + + > [!Note] > これは、古いツールバー テンプレート ディレクティブを置き換えます。v11 より前のバージョンから移行する場合は、マイグレーションによってテンプレート コンテンツの移動が処理されます。ただし、テンプレート内のバインディングは処理しないため、マイグレーションの完了後に、変更されたテンプレート ファイルを再確認してください。 + + ツールバー コンポーネントのアクション部分が特定のユース ケースに十分でない場合、ツールバー自体には、ユーザーが追加の UI を提供できる一般的なコンテンツ プロジェクションがあります。ユーザーが API 呼び出しまたはバインディングにそれぞれのグリッド インスタンスを必要とする場合は、テンプレート参照変数を作成できます。 サンプル スニペットは次のとおりです。 + ```html <{ComponentSelector} #gridRef> @@ -739,9 +1069,11 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { ``` + + ```html <{ComponentSelector} id="grid"> @@ -755,13 +1087,52 @@ igRegisterScript("WebGridToolbarExporting", (evt) => { ``` + + + +```tsx +<{ComponentSelector}> + + + title + + {/* + Everything between the toolbar tags except the default toolbar components + will be projected as custom content. + */} + + + + +``` + + + + + +```razor +<{ComponentSelector}> + + title + @* + Everything between the toolbar tags except the default toolbar components + will be projected as custom content. + *@ + + + + +``` + + + 以下のサンプルは、列ヘッダーをクリックして並べ替えセットをクリアするためのボタンをツールバーに追加する方法です。 `sample="/{ComponentSample}/toolbar-sample-4", height="420", alt="{Platform} {ComponentTitle} ツールバー サンプル 4"` - + @@ -917,6 +1288,15 @@ $dark-input-group-theme: input-group-theme( + + +## 既知の制限 + +> [!Note] +> 現在、{RowIslandSelector} 内でのツールバー コンポーネントの定義はサポートされていません。 + + + ## API リファレンス 以下は、Grid Toolbar サービスのその他の API です。 diff --git a/doc/jp/components/grids/data-grid.md b/doc/jp/components/grids/data-grid.md index 7705b5ed7..ff682b633 100644 --- a/doc/jp/components/grids/data-grid.md +++ b/doc/jp/components/grids/data-grid.md @@ -61,7 +61,7 @@ _language: ja この {ProductName} Grid の例では、ユーザーが基本スタイルと Excel スタイルの両方のフィルタリング、ライブ データのソート、およびグリッド集計とセル テンプレートの使用を実行する方法を確認できます。デモには、1 ページあたり 10 項目を表示するように設定されたページングも含まれています。 -`sample="/{GridSample}/overview", height="700", alt="{Platform} grid の例"` +`sample="/{GridSample}/overview", img-src="https://static.infragistics.com/marketing/Website/products/ignite-ui-blazor/ignite-ui-blazor-client-grid", height="700", alt="{Platform} grid の例"` @@ -71,7 +71,7 @@ _language: ja ### 依存関係 -{Platform} Data Grid を初期化するには、{ProductName} パッケージをインストールする必要があります。 +{Platform} Data Grid を初期化するには、{PackageCommon} パッケージ`{PackageGrids}` パッケージ`{PackageCommon}` と `{PackageGrids}` パッケージをインストールする必要があります。 @@ -93,15 +93,20 @@ IgniteUI.Blazor パッケージの追加については、以下のトピック ``` - -{Platform} グリッドのパッケージをインストールするときに、core (コア)、inputs (入力)、および layouts (レイアウト) パッケージもインストールする必要があります。 + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} -npm install --save {PackageLayouts} ``` + + + グリッドを使用するには、次のインポートも含める必要があります。 diff --git a/doc/jp/components/grids/data-grid/cell-selection.md b/doc/jp/components/grids/data-grid/cell-selection.md index cfff43a43..7cb3f810c 100644 --- a/doc/jp/components/grids/data-grid/cell-selection.md +++ b/doc/jp/components/grids/data-grid/cell-selection.md @@ -1,6 +1,6 @@ --- title: {Platform} データ グリッド | セル選択 | 選択 | インフラジスティックス -_description: インフラジスティックスの {Platform} データ グリッドのセルおよび行選択を使用して、テーブルの領域を強調表示します。{ProductName} テーブルの単一行選択または複数行選択を設定する方法について説明します。 +_description: インフラジスティックスの {Platform} データ グリッドのセルおよび行選択を使用して、テーブルの領域をハイライト表示します。{ProductName} テーブルの単一行選択または複数行選択を設定する方法について説明します。 _keywords: {Platform} Table, Data Grid, cell selection, {ProductName}, Infragistics, {Platform} テーブル, データ グリッド, セル選択, インフラジスティックス mentionedTypes: ['Infragistics.Controls.Grid.Implementation.Grid', 'Infragistics.Controls.Grid.Implementation.GridSelectionMode'] namespace: Infragistics.Controls diff --git a/doc/jp/components/grids/data-grid/overview.md b/doc/jp/components/grids/data-grid/overview.md index e7826094d..b9ab16918 100644 --- a/doc/jp/components/grids/data-grid/overview.md +++ b/doc/jp/components/grids/data-grid/overview.md @@ -464,7 +464,7 @@ Blazor データ グリッドの作成について詳しくは、このチュー - [パフォーマンス](performance.md) - [行のピン固定](row-pinning.md) - [行グループ](row-grouping.md) -- [行の強調表示](row-highlighting.md) +- [行のハイライト表示](row-highlighting.md) diff --git a/doc/jp/components/grids/data-grid/row-highlighting.md b/doc/jp/components/grids/data-grid/row-highlighting.md index 73ff58d62..962c6a380 100644 --- a/doc/jp/components/grids/data-grid/row-highlighting.md +++ b/doc/jp/components/grids/data-grid/row-highlighting.md @@ -1,7 +1,7 @@ --- -title: {Platform} Data Grid | 行の強調表示 | インフラジスティックス -_description: マウスオーバーでインフラジスティックス {Platform} データ グリッドの行強調表示の構成。{ProductName} テーブルの行強調表示を設定する方法について説明します。 -_keywords: {Platform} Table, Data Grid, row highlighting, {ProductName}, Infragistics, {Platform} テーブル, データ グリッド, 行の強調表示, インフラジスティックス +title: {Platform} Data Grid | 行のハイライト表示 | インフラジスティックス +_description: マウスオーバーでインフラジスティックス {Platform} データ グリッドの行ハイライト表示の構成。{ProductName} テーブルの行ハイライト表示を設定する方法について説明します。 +_keywords: {Platform} Table, Data Grid, row highlighting, {ProductName}, Infragistics, {Platform} テーブル, データ グリッド, 行のハイライト表示, インフラジスティックス mentionedTypes: ['Infragistics.Controls.Grid.Implementation.Grid', 'Infragistics.Controls.Grid.Implementation.Column'] namespace: Infragistics.Controls _canonicalLink: {CanonicalLinkToGridMain} @@ -15,14 +15,14 @@ _language: ja -# {Platform} Grid 強調表示 +# {Platform} Grid ハイライト表示 -{ProductName} Data Table / Data Grid は、行の強調表示の構成をサポートします。 +{ProductName} Data Table / Data Grid は、行のハイライト表示の構成をサポートします。 -## {Platform} Grid 強調表示の例 +## {Platform} Grid ハイライト表示の例 -`sample="/grids/data-grid/row-highlighting", height="600", alt="{Platform} Grid 強調表示の例"` +`sample="/grids/data-grid/row-highlighting", height="600", alt="{Platform} Grid ハイライト表示の例"` @@ -30,13 +30,13 @@ _language: ja ## 概要 -{Platform} データ内のレコードの強調表示は、{Platform} グリッド の `IsRowHoverEnabled` ブール値プロパティを設定して切り替えることができます。これはデフォルトで有効になっていることに注意してください。 +{Platform} データ内のレコードのハイライト表示は、{Platform} グリッド の `IsRowHoverEnabled` ブール値プロパティを設定して切り替えることができます。これはデフォルトで有効になっていることに注意してください。 さらに、`RowHoverBackground` 文字列プロパティを 16 進数値に設定して色を設定できます。 ## コード スニペット -以下は、{Platform} データ グリッドで行の強調表示を有効にし、青色を適用する方法を示します。 +以下は、{Platform} データ グリッドで行のハイライト表示を有効にし、青色を適用する方法を示します。 ```tsx ` 定義を含む詳細ビュー内のグリッドをテンプレート化する際に親グリッドもそれらの列をレンダリングします。 | これは、ネストされたグリッドで autoGenerate=true を使用して回避できます。これらの列の要素を変更する必要がある場合、`ColumnInit` イベントを使用できます。| | 詳細テンプレートは Excel にエクスポートされません。| 詳細テンプレートにはあらゆる種類のコンテンツが含まれているため、Excel にエクスポートすることはできません。| -| 検索機能は、詳細テンプレートの要素を強調表示しません。 | | +| 検索機能は、詳細テンプレートの要素をハイライト表示しません。 | | ## API リファレンス diff --git a/doc/jp/components/grids/hierarchical-grid/load-on-demand.md b/doc/jp/components/grids/hierarchical-grid/load-on-demand.md new file mode 100644 index 000000000..b738911db --- /dev/null +++ b/doc/jp/components/grids/hierarchical-grid/load-on-demand.md @@ -0,0 +1,898 @@ +--- +title: {Platform} 階層グリッド | 最速の {Platform} 階層テーブル | インフラジスティックス +_description: {ProductName} Hierarchical Grid は、展開された各子グリッドでロードオンデマンドに必要なツールを提供します。データ量が大幅に軽減されてユーザがデータを必要な場合のみ取得されます。 +_keywords: {Platform} hierarchical grid, igniteui for {Platform}, infragistics, {Platform} 階層グリッド, インフラジスティックス +mentionedTypes: [{ComponentApiMembers}] +namespace: Infragistics.Controls +_language: ja +--- + +# Hierarchical Grid ロードオンデマンド + +Ignite UI for {Platform} `HierarchicalGrid` は、要求するサーバーからのデータを最低限にすることによりすばやく描画できます。このため、ユーザーがビューで結果を確認でき、表示データをインタラクティブに操作できます。初期時にグリッドのデータのみが取得されて描画され、ユーザーが子グリッドを含む行を拡張した後のみ、特定の子グリッドのデータを取得します。このメカニズムは、ロードオンデマンドであらゆるリモートデータとの設定が簡単にできます。 + +このトピックは、既に利用可能なリモート サービスと通信してリモート サービス プロバイダーを作成し、ロードオンデマンドを設定する方法を説明します。以下は、デモと作成手順を示します。 + +## {Platform} Hierarchical Grid ロードオンデマンドの例 + +`sample="/{HierarchicalGridSample}/data-performance-virtualization", height="700", alt="{Platform} Hierarchical Grid ロードオンデマンドの例"` + +### リモート サービス プロバイダー + +はじめにサービス プロバイダーを準備して階層グリッドに必要なデータを取得します。 + +#### 基本データの取得 + + +ブラウザーが提供する XMLHttpRequest インターフェイス を使用した HTTP プロトコルでバックエンドサービスと通信します。簡易的なクライアント HTTP API を提供する Angular の [`HttpClient`](https://angular.io/api/common/http/HttpClient) モジュールを使用してより簡単に行うことができます。データを取得にはサービスのシンプルなメソッドが必要となります。 + +```typescript +public getData(dataState): Observable { + return this.http.get(this.buildUrl(dataState)).pipe( + map(response => response), + ); +} +``` + +`this.http` は、`HttpCLient` モジュールの参照となり、`buildUrl()` は取得したデータに基づいて url を生成するメソッドになります。実行された非同期のため、返信をマップし、Observable を返します。それにより後でサブスクライブし、アプリケーションで処理を進めてグリッドへ渡すことができます。 + + + +ブラウザーが提供する [`fetch()`](https://developer.mozilla.org/ja/docs/Web/API/fetch) グローバル関数を使用した HTTP プロトコルでバックエンドサービスと通信します。データを取得にはサービスのシンプルなメソッドが必要となります。 + +```ts +export function getData(dataState: any): any { + return fetch(buildUrl(dataState)) + .then((result) => result.json()); +} +``` + +`buildUrl()` は取得したデータに基づいて url を生成するメソッドになります。実行された非同期のため、Promise を返します。それにより後でサブスクライブし、アプリケーションで処理を進めてグリッドへ渡すことができます。 + + + +ブラウザーが提供する [`fetch()`](https://developer.mozilla.org/ja-JP/docs/Web/API/fetch) グローバル関数を使用した HTTP プロトコルでバックエンドサービスと通信します。データを取得にはサービスのシンプルなメソッドが必要となります。 + +```razor +function getData(dataState) { + return fetch(buildUrl(dataState)) + .then((result) => result.json()); +} +``` + +`buildUrl()` は取得したデータに基づいて url を生成するメソッドになります。実行された非同期のため、Promise を返します。それにより後でサブスクライブし、アプリケーションで処理を進めてグリッドへ渡すことができます。 + + +#### 要求 URL のビルド + +次に GET 要求の URL をビルドする方法を定義します。メイン グリッドのデータを取得できますが含まれる子グリッドのデータも取得できます。ルート レベルに[こちら](https://data-northwind.indigo.design/swagger/index.html)の `Customers` データを使用し、それ以外のレベルには `Orders` と `Details` を使用します。このモデルはアプリケーションごとに異なりますが、ここでは以下を使用します。 + + + +はじめに必要となるのはグリッドのデータ、親業のプライマリキーとその一意の ID をどこから取得するかを決定するテーブルの `key` が必要です。 + + +インターフェイス `IDataState` でこれらすべてを定義します。例: + +```typescript +export interface IDataState { + key: string; + parentID: any; + parentKey: string; + rootLevel: boolean; +} + +//... +public buildUrl(dataState: IDataState): string { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${this.url}${qS}`; +} +//... +``` + + + +これらすべてを `dataState` オブジェクトで定義します。例: + +```ts +const dataState: { + key: string; + parentID: any; + parentKey: string; + rootLevel: boolean; +} = { + //... +}; + +function buildUrl(dataState: any) { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${URL}${qS}`; +} +``` + + + +これらすべてを `dataState` オブジェクトで定義します。例: + +```razor +const dataState: { + key: string; + parentID: any; + parentKey: string; + rootLevel: boolean; +} = { + //... +}; + +function buildUrl(dataState) { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${DATA_URL}${qS}`; +} +``` + + +#### 結果 + + +最後に `remote-lod.service.ts` は以下のようになります。 + +```typescript +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +export interface IDataState { + key: string; + parentID: any; + parentKey: string; + rootLevel: boolean; +} + +@Injectable() +export class RemoteLoDService { + public url = `https://data-northwind.indigo.design/`; + + constructor(private http: HttpClient) { } + + public getData(dataState: IDataState): Observable { + return this.http.get(this.buildUrl(dataState)).pipe( + map((response) => response) + ); + } + + public buildUrl(dataState: IDataState): string { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${this.url}${qS}`; + } +} +``` + + + +最後に、リモート サービスは以下のようになります。 + +```ts +const URL = `https://data-northwind.indigo.design/`; + +export function getData(dataState: any): any { + return fetch(buildUrl(dataState)) + .then((result) => result.json()); +} + +function buildUrl(dataState: any) { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${URL}${qS}`; +} +``` + + + +最後に、リモート サービスは以下のようになります。 + +```razor +const DATA_URL = `https://data-northwind.indigo.design/`; + +function getData(dataState) { + return fetch(buildUrl(dataState)) + .then((result) => result.json()); +} + +function buildUrl(dataState) { + let qS = ""; + if (dataState) { + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; + } + } + return `${DATA_URL}${qS}`; +} +``` + + +### 階層グリッドの`設定 + +次に階層グリッドを設定してリモート サービス プロバイダーに接続します。 + +#### テンプレートの地祇 + +最初に階層グリッド テンプレートを必要な階層レベルで定義します。customers のルート グリッド `PrimaryKey` は最初のレベルの orders の `customerId` です。`orderId` と各 order 詳細の `productId` です。各データベース テーブルとキーで初期テンプレートを定義します。 + + +```html + + + + + + + + + + + + + + + + + + + + + +``` + + + +```html + + + + + + + + + + + + + + + + + + + + + +``` + + + +```tsx + + + + + + + + + + + + + + + + + + + + + +``` + + + +```razor + + + + + + + + + + + + + + + + + + + + + +``` + + +ルート レベル階層グリッドと最終的にはその子のデータがテンプレートに必要となります。 + + +`#hGrid` 参照が使用できるため、コードでサービスからデータ取得後にルート グリッドのデータを簡単に設定できます。 + + + +`id="hGrid"` 参照が使用できるため、コードでサービスからデータ取得後にルート グリッドのデータを簡単に設定できます。 + + + +`ref={hierarchicalGrid}` 参照が使用できるため、コードでサービスからデータ取得後にルート グリッドのデータを簡単に設定できます。 + + + +`Id="hGrid"` 参照が使用できるため、コードでサービスからデータ取得後にルート グリッドのデータを簡単に設定できます。 + + +展開されている子にデータを設定する方法は異なります。行がはじめて展開されたときに新し子 `HierarchicalGrid` が描画がされるため、データを設定するために新しく作成されたグリッドの参照を取得する必要があります。各 `RowIsland` コンポーネントに `GridCreated` イベントがあり、特定の子アイランドに新しい子グリッドが作成されたときに発生します。新しいグリッドの参照を取得するために使用でき、サービスからデータを要求して適用します。 + +サービスをビルドしているためルートレベルの場合に情報のみが必要なため、すべてのアイランドに 1 メソッドを使用できます。このすべての情報には、イベント引数から直接またはイベントをトリガーする行アイランドからアクセスできます。 + + +`gridCreated` を使用するメソッドに名前を付けます。 + + + +`OnGridCreated` を使用するメソッドに名前を付けます。 + + + +`GridCreated` イベントは `parentID` プロパティ、`owner` として行アイランドへの参照、新しい子 `grid` プロパティを提供するため、最初の引数として渡されます。親行の `primaryKey` についての情報はありませんが、バインドした行アイランドに基づいて 2 番目の引数として簡単に渡すことができます。 + + + +`GridCreated` イベントは行アイランド、`parentID` プロパティ、および新しい子グリッド プロパティへの参照を提供するため、これは最初と 2 番目の引数として渡されます。親行の `primaryKey` についての情報はありませんが、バインドした行アイランドに基づいて 2 番目の引数として簡単に渡すことができます。 + + + +`GridCreated` イベントは `parentID` プロパティ、`owner` として行アイランドへの参照、新しい子 `grid` プロパティを提供するため、最初の引数として渡されます。親行の `primaryKey` についての情報しかありませんが、行アイランドの `ChildDataKey` に基づいてそれを簡単に判断できます。 + + +変更を加えたテンプレート ファイルは以下のようになります。 + + +```html + + + + + + + + + + + + + + + + + + + + + +``` + + + +```html + + + + + + + + + + + + + + + + + + + + + +``` +```ts +constructor() { + const ordersRowIsland = document.getElementById("ordersRowIsland"); + const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); + + ordersRowIsland.addEventListener("gridCreated", (event: any) => { + this.gridCreated(event, "Customers"); + }); + + orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { + this.gridCreated(event, "Orders"); + }); +} +``` + + + +```tsx + + + + + + + + gridCreated(rowIsland, e, "Customers")} + > + + + + + + gridCreated(rowIsland, e, "Orders")} + > + + + + + + + +``` + + + +```razor + + + + + + + + + + + + + + + + + + + + + +``` + + +#### サービスへ接続 + +最後の手順の 1 つとして、以前作成したサービスに階層グリッドを接続することです。 + + +`Injectable` として定義するため、プロバイダーとしてアプリケーションへ渡すことができます。`ViewChild` クエリをデータに設定してルートグリッドへの参照も取得します。 + +```typescript +@Component({ + providers: [RemoteLoDService], + selector: "app-hierarchical-grid-lod", + styleUrls: ["./hierarchical-grid-lod.component.scss"], + templateUrl: "./hierarchical-grid-lod.component.html" +}) +export class HierarchicalGridLoDSampleComponent { + @ViewChild("hGrid") + public hGrid: IgxHierarchicalGridComponent; + + constructor(private remoteService: RemoteLoDService) { } +} +``` + +グリッドがサービスのデータを要求して割り当てる前に描画されることを確認するために、ライフサイクル フックを使用します。親がないため、`rootLevel` は **true** でそのキーのみをサービスの `getData` へ渡すことができます。サブスクライブする必要のある observable を返します。 + +```typescript +public ngAfterViewInit() { + this.remoteService.getData({ parentID: null, rootLevel: true, key: "Customers" }).subscribe((data) => { + this.hGrid.data = data; + this.hGrid.cdr.detectChanges(); + }); +} +``` + + + +ルート グリッドへの参照を取得して、そのデータを設定します。親がないため、`rootLevel` は **true** でそのキーのみをサービスの `getData` へ渡すことができます。サブスクライブする必要のある Promise を返します。 + +```ts +constructor() { + const hierarchicalGrid = document.getElementById("hGrid") as IgcHierarchicalGridComponent; + + getData({ parentID: null, rootLevel: true, key: "Customers" }).then((data: any) => { + hierarchicalGrid.data = data; + hierarchicalGrid.markForCheck(); + }); +} +``` + + + +`useRef` React フックを介してルート グリッドへの参照を取得し、そのデータを設定します。 + +```tsx +const hierarchicalGrid = useRef(null); +``` + +グリッドがサービスのデータを要求して割り当てる前に描画されることを確認するために、`useEffect` React フックを使用します。親がないため、`rootLevel` は **true** でそのキーのみをサービスの `getData` へ渡すことができます。サブスクライブする必要のある Promise を返します。 + +```tsx +useEffect(() => { + getData({ parentID: null, rootLevel: true, key: "Customers" }).then( + (data: any) => { + hierarchicalGrid.current.data = data; + hierarchicalGrid.current.markForCheck(); + } + ); +}, []); +``` + + + +ルート グリッドへの参照を取得して、そのデータを設定します。グリッドがサービスのデータを要求して割り当てる前に描画されることを確認するために、`Rendered` イベントを使用します。親がないため、`rootLevel` は **true** でそのキーのみをサービスの `getData` へ渡すことができます。サブスクライブする必要のある Promise を返します。 + +```razor +igRegisterScript("OnGridRendered", () => { + const grid = document.getElementById("hGrid"); + + getData({ parentID: null, rootLevel: true, key: "Customers" }).then( + (data) => { + grid.data = data; + grid.markForCheck(); + }); +}, false) +``` + + + +次に作成した新しい子グリッドのデータを要求する `gridCreated` メソッドを作成する必要があります。 + + + +次に作成した新しい子グリッドのデータを要求する `OnGridCreated` メソッドを作成する必要があります。 + + +ルート レベル グリッド データの取得と同様に、ここでは`parentID` や `parentKey` などの情報を渡す必要があります。`rootLevel` はいずれの子も **false** です。 + + +```typescript +public gridCreated(event: IGridCreatedEventArgs, _parentKey: string) { + const dataState = { + key: event.owner.key, + parentID: event.parentID, + parentKey: _parentKey, + rootLevel: false + }; + this.remoteService.getData(dataState).subscribe( + (data) => { + event.grid.data = data; + event.grid.cdr.detectChanges(); + } + ); +} +``` + + + +```ts +public gridCreated(event: CustomEvent, _parentKey: string) { + const context = event.detail; + const dataState = { + key: context.owner.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false + }; + + getData(dataState).then((data: any[]) => { + context.grid.data = data; + context.grid.markForCheck(); + }); +} +``` + + + +```tsx +function gridCreated(rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, _parentKey: string) { + const context = event.detail; + const dataState = { + key: rowIsland.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false, + }; + + getData(dataState).then((data: any[]) => { + context.grid.data = data; + context.grid.markForCheck(); + }); +} +``` + + + +```razor +igRegisterScript("OnGridCreated", (args) => { + const context = args.detail; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; + const dataState = { + key: context.owner.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false, + }; + + getData(dataState).then((data) => { + context.grid.data = data; + context.grid.markForCheck(); + }); +}, false) +``` + + +これにより、アプリケーションの設定はほぼ完了です。最後の手順は、空グリッドを表示する代わりにユーザーにデータがまだ読み込み中であることを通知してユーザー エクスペリエンスを向上します。`HierarchicalGrid` は、グリッドが空のときに表示できるインジケーターの読み込みサポートします。新しいデータが取得されると読み込みインジケーターが非表示となりデータが描画されます。 + +#### 読み込み通知の設定 + +`HierarchicalGrid` は、`IsLoading` プロパティを **true** に設定して読み込みインジケーターを表示できます。データが読み込まれるまでルートグリッドにあらかじめ設定しますが、新しい子グリッドを作成する際にも必要です。テンプレートで常に **true** に設定できますが、**false** に設定してサービスが空配列を返した場合は非表示にしてデータのないグリッドを表示できます。 + +以下は構成の最終バージョンです。 + + +```typescript +import { AfterViewInit, Component, ViewChild } from "@angular/core"; +import { + IGridCreatedEventArgs, + IgxHierarchicalGridComponent, + IgxRowIslandComponent +} from "igniteui-angular"; +import { RemoteLoDService } from "../services/remote-lod.service"; + +@Component({ + providers: [RemoteLoDService], + selector: "app-hierarchical-grid-lod", + styleUrls: ["./hierarchical-grid-lod.component.scss"], + templateUrl: "./hierarchical-grid-lod.component.html" +}) +export class HierarchicalGridLoDSampleComponent implements AfterViewInit { + @ViewChild("hGrid") + public hGrid: IgxHierarchicalGridComponent; + + constructor(private remoteService: RemoteLoDService) { } + + public ngAfterViewInit() { + this.hGrid.isLoading = true; + this.remoteService.getData({ parentID: null, rootLevel: true, key: "Customers" }).subscribe((data) => { + this.hGrid.isLoading = false; + this.hGrid.data = data; + this.hGrid.cdr.detectChanges(); + }); + } + + public gridCreated(event: IGridCreatedEventArgs, _parentKey: string) { + const dataState = { + key: event.owner.key, + parentID: event.parentID, + parentKey: _parentKey, + rootLevel: false + }; + event.grid.isLoading = true; + this.remoteService.getData(dataState).subscribe( + (data) => { + event.grid.isLoading = false; + event.grid.data = data; + event.grid.cdr.detectChanges(); + } + ); + } +} +``` + + + +```ts +constructor() { + const hierarchicalGrid = document.getElementById("hGrid") as IgcHierarchicalGridComponent; + const ordersRowIsland = document.getElementById("ordersRowIsland"); + const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); + + ordersRowIsland.addEventListener("gridCreated", (event: any) => { + this.gridCreated(event, "Customers"); + }); + + orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { + this.gridCreated(event, "Orders"); + }); + + hierarchicalGrid.isLoading = true; + + getData({ parentID: null, rootLevel: true, key: "Customers" }).then((data: any) => { + hierarchicalGrid.isLoading = false; + hierarchicalGrid.data = data; + hierarchicalGrid.markForCheck(); + }); +} + +public gridCreated(event: CustomEvent, _parentKey: string) { + const context = event.detail; + const dataState = { + key: context.owner.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false + }; + + context.grid.isLoading = true; + + getData(dataState).then((data: any[]) => { + context.grid.isLoading = false; + context.grid.data = data; + context.grid.markForCheck(); + }); +} +``` + + + +```tsx +const hierarchicalGrid = useRef(null); + +useEffect(() => { + hierarchicalGrid.current.isLoading = true; + + getData({ parentID: null, rootLevel: true, key: "Customers" }).then( + (data: any) => { + hierarchicalGrid.current.isLoading = false; + hierarchicalGrid.current.data = data; + hierarchicalGrid.current.markForCheck(); + } + ); +}, []); + +function gridCreated(rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, _parentKey: string) { + const context = event.detail; + const dataState = { + key: rowIsland.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false, + }; + + context.grid.isLoading = true; + + getData(dataState).then((data: any[]) => { + context.grid.isLoading = false; + context.grid.data = data; + context.grid.markForCheck(); + }); +} +``` + + + +```razor +igRegisterScript("OnGridRendered", () => { + const grid = document.getElementById("hGrid"); + + grid.isLoading = true; + + getData({ parentID: null, rootLevel: true, key: "Customers" }).then( + (data) => { + grid.isLoading = false; + grid.data = data; + grid.markForCheck(); + }); +}, false) + +igRegisterScript("OnGridCreated", (args) => { + const context = args.detail; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; + const dataState = { + key: context.owner.childDataKey, + parentID: context.parentID, + parentKey: _parentKey, + rootLevel: false, + }; + + context.grid.isLoading = true; + + getData(dataState).then((data) => { + context.grid.isLoading = false; + context.grid.data = data; + context.grid.markForCheck(); + }); +}, false) +``` + + +### API リファレンス + +* `HierarchicalGrid` +* `RowIsland` + +### その他のリソース + +* [Hierarchical Grid コンポーネント](overview.md) + +コミュニティに参加して新しいアイデアをご提案ください。 + +* [{ProductName} **フォーラム (英語)**]({ForumsLink}) +* [{ProductName} **GitHub (英語)**]({GithubLink}) \ No newline at end of file diff --git a/doc/jp/components/grids/hierarchical-grid/overview.md b/doc/jp/components/grids/hierarchical-grid/overview.md index 030928622..1ba27b97b 100644 --- a/doc/jp/components/grids/hierarchical-grid/overview.md +++ b/doc/jp/components/grids/hierarchical-grid/overview.md @@ -21,7 +21,7 @@ _language: ja ### 依存関係 -{Platform} 階層グリッドを初期化するには、{ProductName} パッケージをインストールする必要があります。 +{Platform} 階層グリッドを初期化するには、{PackageCommon} パッケージ`{PackageGrids}` パッケージ`{PackageCommon}` と `{PackageGrids}` パッケージをインストールする必要があります。 @@ -44,16 +44,22 @@ IgniteUI.Blazor パッケージの追加については、以下のトピック - + -{Platform} 階層グリッドのパッケージをインストールするときは、core パッケージもインストールする必要があります。 + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} -npm install --save {PackageLayouts} ``` + + + グリッドを使用するには、次のインポートも含める必要があります。 @@ -253,9 +259,9 @@ public class SingersData : List ```html - - - + + + @@ -304,27 +310,23 @@ export class HierarchicalGridLoDSampleComponent implements AfterViewInit { @Injectable() export class RemoteLoDService { - public url = `https://services.odata.org/V4/Northwind/Northwind.svc/`; + public url = `https://data-northwind.indigo.design/`; constructor(private http: HttpClient) { } - public getData(dataState?: any): Observable { + public getData(dataState: any): Observable { return this.http.get(this.buildUrl(dataState)).pipe( - map((response) => response["value"]) + map((response) => response) ); } public buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${this.url}${qS}`; @@ -335,9 +337,9 @@ export class RemoteLoDService { ```html - - - + + + ``` @@ -350,13 +352,16 @@ export class HierarchicalGridLoadOnDemand { const hierarchicalGrid = document.getElementById("hGrid") as IgcHierarchicalGridComponent; const ordersRowIsland = document.getElementById("ordersRowIsland"); const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland"); + ordersRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "CustomerID"); + this.gridCreated(event, "Customers"); }); orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => { - this.gridCreated(event, "OrderID"); + this.gridCreated(event, "Orders"); }); + hierarchicalGrid.isLoading = true; + getData({ parentID: null, rootLevel: true, key: "Customers" }).then((data: any) => { hierarchicalGrid.isLoading = false; hierarchicalGrid.data = data; @@ -387,7 +392,8 @@ export class HierarchicalGridLoadOnDemand { import { getData } from "./remoteService"; export default function Sample() { - const hierarchicalGrid = useRef(null); + const hierarchicalGrid = useRef(null); + function gridCreated( rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, @@ -407,6 +413,7 @@ export default function Sample() { context.grid.markForCheck(); }); } + useEffect(() => { hierarchicalGrid.current.isLoading = true; getData({ parentID: null, rootLevel: true, key: "Customers" }).then( @@ -421,28 +428,28 @@ export default function Sample() { return ( gridCreated(rowIsland, e, "CustomerID")} + ) => gridCreated(rowIsland, e, "Customers")} > gridCreated(rowIsland, e, "OrderID")} + ) => gridCreated(rowIsland, e, "Orders")} > @@ -452,24 +459,20 @@ export default function Sample() { ```ts -const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; -export function getData(dataState?: any): any { +const URL = `https://data-northwind.indigo.design/`; + +export function getData(dataState: any): any { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState: any) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${URL}${qS}`; @@ -478,10 +481,10 @@ function buildUrl(dataState: any) { ```razor - - - + + @@ -499,7 +502,7 @@ igRegisterScript("OnGridRendered", () => { igRegisterScript("OnGridCreated", (args) => { const context = args.detail; - const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID"; + const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders"; const dataState = { key: context.owner.childDataKey, parentID: context.parentID, @@ -514,24 +517,20 @@ igRegisterScript("OnGridCreated", (args) => { }); }, false) -const DATA_URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`; +const DATA_URL = `https://data-northwind.indigo.design/`; + function getData(dataState) { return fetch(buildUrl(dataState)) - .then((result) => result.json()) - .then((data) => data["value"]); + .then((result) => result.json()); } function buildUrl(dataState) { let qS = ""; if (dataState) { - qS += `${dataState.key}?`; - - if (!dataState.rootLevel) { - if (typeof dataState.parentID === "string") { - qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`; - } else { - qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`; - } + if (dataState.rootLevel) { + qS += `${dataState.key}`; + } else { + qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`; } } return `${DATA_URL}${qS}`; diff --git a/doc/jp/components/grids/theming.md b/doc/jp/components/grids/theming.md index 5c6aee6d4..77cda3b2f 100644 --- a/doc/jp/components/grids/theming.md +++ b/doc/jp/components/grids/theming.md @@ -92,7 +92,7 @@ _language: ja | --body-summaries-text-color | 色 | 本体に配置される集計グループのテキストの色。 | | --root-summaries-background | 色 | フッターに配置される集計グループの背景色。 | | --root-summaries-text-color | 色 | フッターに配置される集計グループのテキストの色。 | -| --row-highlight | 色 | グリッド行の強調表示の色。 | +| --row-highlight | 色 | グリッド行のハイライト表示の色。 | | --row-ghost-background | 色 | ドラッグされている行の背景色。 | | --row-drag-color | 色 | ドラッグ ハンドルの色。 | | --drop-area-border-radius | 0 ~ 1 の数 | ドロップ領域に使用される境界半径。0 ~ 1 の任意の小数、ピクセル、またはパーセントを指定できます。 | diff --git a/doc/jp/components/grids/tree-grid/overview.md b/doc/jp/components/grids/tree-grid/overview.md index 32ced937b..f504b38b6 100644 --- a/doc/jp/components/grids/tree-grid/overview.md +++ b/doc/jp/components/grids/tree-grid/overview.md @@ -24,7 +24,7 @@ _language: ja ### 依存関係 -{Platform} ツリー グリッドを初期化するには、{ProductName} パッケージをインストールする必要があります。 +{Platform} ツリー グリッドを初期化するには、{PackageCommon} パッケージ`{PackageGrids}` パッケージ`{PackageCommon}` と `{PackageGrids}` パッケージをインストールする必要があります。 @@ -49,13 +49,18 @@ IgniteUI.Blazor パッケージの追加については、以下のトピック -{Platform} ツリー グリッドのパッケージをインストールするときは、core パッケージもインストールする必要があります。 + +```cmd +npm install --save {PackageGrids} +``` + + ```cmd -npm install --save {PackageCore} +npm install --save {PackageCommon} npm install --save {PackageGrids} -npm install --save {PackageInputs} ``` + diff --git a/doc/jp/components/inputs/combo/features.md b/doc/jp/components/inputs/combo/features.md index 4ee7bdd38..1aaad9e5b 100644 --- a/doc/jp/components/inputs/combo/features.md +++ b/doc/jp/components/inputs/combo/features.md @@ -44,8 +44,38 @@ builder.Services.AddIgniteUIBlazor(typeof(IgbSwitchModule)); + + +```tsx +import { IgrComboModule, IgrCombo, IgrSwitchModule, IgrSwitch } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrComboModule.register(); +IgrSwitchModule.register(); +``` + + + 次に、スイッチを切り替えてコンボ機能を制御できるように、すべてのスイッチ コンポーネントにイベント ハンドラーを追加します。 +```tsx +const comboRef = useRef(null); +const switchCaseSensitiveRef = useRef(null); + +const disableFiltering = (switchComponent: IgrSwitch) => { + comboRef.current.disableFiltering = + switchCaseSensitiveRef.current.disabled = switchComponent.checked; +}; + +const showCaseSensitiveIcon = (switchComponent: IgrSwitch) => { + comboRef.current.caseSensitiveIcon = switchComponent.checked; +}; + +const disableCombo = (switchComponent: IgrSwitch) => { + comboRef.current.disabled = switchComponent.checked; +}; +``` + ```ts let combo = document.getElementById('combo') as IgcComboComponent; @@ -127,6 +157,12 @@ switchGroup.addEventListener("igcChange", () => { } ``` +```tsx +const enableGrouping = (switchComponent: IgrSwitch) => { + comboRef.current.groupKey = switchComponent.checked ? "country" : undefined; +}; +``` + ## 機能 ### フィルタリング @@ -143,12 +179,17 @@ switchGroup.addEventListener("igcChange", () => { ``` +```tsx + +``` + #### フィルタリング オプション {ProductName} `ComboBox` コンポーネントは、`FilterKey` オプションと `CaseSensitive` オプションの両方の構成を渡すことができるフィルター プロパティをもう 1 つ公開しています。`FilterKey` は、オプションのリストをフィルタリングするためにどのデータ ソース フィールドを使用する必要があるかを示します。`CaseSensitive` オプションは、フィルタリングで大文字と小文字を区別するかどうかを示します。 次のコード スニペットは、名前ではなく国でデータ ソースから都市をフィルター処理する方法を示しています。また、デフォルトで大文字と小文字を区別するフィルタリングを行います。 + ```ts const options = { filterKey: 'country', @@ -157,6 +198,18 @@ const options = { combo.filteringOptions = options; ``` + + + +```tsx +const options = { + filterKey: 'country', + caseSensitive: true +}; + +comboRef.current.filteringOptions = options; +``` + ### グループ化 @@ -170,6 +223,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + > [!Note] > `GroupKey` プロパティは、データ ソースが複雑なオブジェクトで構成されている場合にのみ有効です。 @@ -185,6 +242,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + ### ラベル `Combo` ラベルは、`Label` プロパティを使用して簡単に設定できます。 @@ -197,6 +258,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + ### プレースホルダー コンボボックス コンポーネント入力とドロップダウン メニュー内に配置された検索入力の両方に、プレースホルダー テキストを指定できます。 @@ -209,6 +274,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + ### オートフォーカス コンボボックスをページの読み込みに自動的にフォーカスさせたい場合は、次のコードを使用できます。 @@ -221,6 +290,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + ### 検索入力のフォーカス コンボボックスの検索入力はデフォルトでフォーカスされています。この機能を無効にしてフォーカスをオプションのリストに移動するには、以下に示すように `AutofocusList` プロパティを使用します。 @@ -233,6 +306,10 @@ combo.filteringOptions = options; ``` +```tsx + +``` + ### 必須 required プロパティを設定することで、コンボボックスを必須としてマークできます。 @@ -245,6 +322,10 @@ required プロパティを設定することで、コンボボックスを必 ``` +```tsx + +``` + ### コンボボックスを無効にする `Disabled` プロパティを使用してコンボボックスを無効にできます。 @@ -257,6 +338,10 @@ required プロパティを設定することで、コンボボックスを必 ``` +```tsx + +``` + ## API リファレンス diff --git a/doc/jp/components/inputs/combo/overview.md b/doc/jp/components/inputs/combo/overview.md index a5a9f0068..61bc59d9e 100644 --- a/doc/jp/components/inputs/combo/overview.md +++ b/doc/jp/components/inputs/combo/overview.md @@ -59,6 +59,25 @@ builder.Services.AddIgniteUIBlazor(typeof(IgbComboModule)); ``` + + +まず、次のコマンドを実行して、対応する {ProductName} npm パッケージをインストールする必要があります: + +```cmd +npm install igniteui-react +``` + +次に、以下のように、{Platform} `ComboBox` とそれに必要な CSS をインポートし、そのモジュールを登録する必要があります: + +```tsx +import { IgrComboModule, IgrCombo } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; + +IgrComboModule.register(); +``` + + + >[!WARNING] > `Combo` コンポーネントは標準の `` 要素では機能しません。代わりに `Form` を使用してください。 @@ -120,6 +139,26 @@ export class Sample { } ``` +```tsx +interface City { + id: string; + name: string; +} + +const cities: City[] = [ + { name: "London", id: "UK01" }, + { name: "Sofia", id: "BG01" }, + { name: "New York", id: "NY01" }, +]; + + +``` + ### データ値と表示プロパティ コンボは複雑なデータ (オブジェクト) の配列にバインドされている場合、コントロールが項目の選択を処理するために使用するプロパティを指定する必要があります。コンポーネントは以下のプロパティを公開します: @@ -149,6 +188,16 @@ console.log(combo.value); combo.value = ['NY01', 'UK01']; ``` +```tsx +const comboRef = useRef(null); + +// Given the overview example from above this will return ['BG01'] +console.log(comboRef.current.value); + +// Change the selected items to New York and London +comboRef.current.value = ['NY01', 'UK01']; +``` + ### 選択 API コンボ コンポーネントは、現在選択されている項目を変更できる API を公開します。 @@ -156,11 +205,13 @@ combo.value = ['NY01', 'UK01']; ユーザーの操作によってオプションのリストから項目を選択する以外に、プログラムで項目を選択することもできます。これは、`select` および `deselect` メソッドを介して行われます。項目の配列をこれらのメソッドに渡すことができます。メソッドが引数なしで呼び出された場合、呼び出されたメソッドに応じて、すべての項目が選択 / 選択解除されます。コンボ コンポーネントに `ValueKey` を指定した場合は、選択 / 選択解除する項目の値キーを渡す必要があります。 #### 一部の項目を選択 / 選択解除: + ```ts // Select/deselect items by their IDs as valueKey is set to 'id' combo.select(['BG01', 'BG02', 'BG03', 'BG04']); combo.deselect(['BG01', 'BG02', 'BG03', 'BG04']); ``` + ```razor +```tsx +// Select/deselect items by their IDs as valueKey is set to 'id' +comboRef.current.select(["UK01", "UK02", "UK03", "UK04", "UK05"]); +comboRef.current.deselect(["UK01", "UK02", "UK03", "UK04", "UK05"]); +``` + + #### すべての項目を選択 / 選択解除: + ```ts // Select/deselect all items combo.select(); combo.deselect(); ``` + ```razor @code { @@ -211,15 +272,33 @@ combo.deselect(); } ``` + +```tsx +// Select/deselect all items +comboRef.current.select([]); +comboRef.current.deselect([]); +``` + + `ValueKey` プロパティを省略した場合は、オブジェクト参照として選択 / 選択解除する項目を列挙する必要があります。 + ```ts // Select/deselect values by object references when no valueKey is provided combo.select([cities[1], cities[5]]); combo.deselect([cities[1], cities[5]]); ``` + + + +```tsx +// Select/deselect values by object references when no valueKey is provided +comboRef.current.select([cities[1], cities[5]]); +comboRef.current.deselect([cities[1], cities[5]]); +``` + -`sample="/inputs/combo/selection", height="400", alt="{Platform} Combo 選択の例"` +`sample="/inputs/combo/selection", height="380", alt="{Platform} Combo 選択の例"` diff --git a/doc/jp/components/inputs/combo/single-selection.md b/doc/jp/components/inputs/combo/single-selection.md index 0ec80bd4d..39a254093 100644 --- a/doc/jp/components/inputs/combo/single-selection.md +++ b/doc/jp/components/inputs/combo/single-selection.md @@ -8,7 +8,7 @@ _language: ja # {Platform} 単一選択 ComboBox -{Platform} `ComboBox` は、単一選択モードと、メインの入力プロンプトを介した項目リストのクイック フィルタリングをサポートしています。ユーザーは、数文字タイプすることで、オプションのリストに探している項目を表示できます。Enter キーを押すと、最初に強調表示された一致が選択されます。 +{Platform} `ComboBox` は、単一選択モードと、メインの入力プロンプトを介した項目リストのクイック フィルタリングをサポートしています。ユーザーは、数文字タイプすることで、オプションのリストに探している項目を表示できます。Enter キーを押すと、最初にハイライト表示された一致が選択されます。 ## {Platform} 単一選択の例 @@ -22,6 +22,10 @@ _language: ja ``` +```tsx + +``` + `sample="/inputs/combo/simplified", height="400", alt="{Platform} 単一選択コンボの例"`
@@ -36,10 +40,12 @@ _language: ja #### 項目の選択: + ```ts // select the item matching the 'BG01' value of the value key field. combo.select('BG01'); ``` + ```razor @@ -51,14 +57,23 @@ combo.select('BG01'); } ``` + +```tsx +// select the item matching the 'BG01' value of the value key field. +comboRef.current.select('BG01'); +``` + + 新たに選択せずに項目の選択を解除するには、`deselect` メソッドを呼び出します。 #### 項目の選択解除: + ```ts // deselect the item matching the 'BG01' value of the value key field. combo.deselect('BG01'); ``` + ```razor @@ -70,6 +85,13 @@ combo.deselect('BG01'); } ``` + +```tsx +// deselect the item matching the 'BG01' value of the value key field. +comboRef.current.deselect('BG01'); +``` + + ## 無効な機能 当然のことながら、一部の構成オプションは単一選択 ComboBox では効果がありません。 diff --git a/doc/jp/components/inputs/combo/templates.md b/doc/jp/components/inputs/combo/templates.md index 9286e2e11..266dcb53d 100644 --- a/doc/jp/components/inputs/combo/templates.md +++ b/doc/jp/components/inputs/combo/templates.md @@ -22,6 +22,7 @@ _language: ja `itemTemplate` はカスタム テンプレートであり、定義されている場合は、オプションのリスト内の項目を描画するときに使用する必要があります。 + ```ts import { ComboItemTemplate } from 'igniteui-webcomponents'; @@ -33,6 +34,7 @@ const itemTemplate: ComboItemTemplate = ({ item }) => { combo.itemTempate = itemTemplate; ``` + Blazor アプリで項目をテンプレート化するには、別の JavaScript ファイルでテンプレートを定義する必要があります。`wwwroot` ディレクトリの下に `templates.js` という名前の新しいファイルを作成します。 @@ -66,10 +68,29 @@ igRegisterScript("ComboItemTemplate", itemTemplate, false); + +```tsx + + +function renderItemTemplate(props: { dataContext: any}): any { + return ( + {props.dataContext.name} [{props.dataContext.id}] + ); +} +``` + + ### Group Header Template (グループ ヘッダー テンプレート) `groupHeaderTemplate` はカスタム テンプレートであり、定義されている場合は、オプションのリストでグループ ヘッダーを描画するときに使用する必要があります。 + ```ts import { ComboItemTemplate } from 'igniteui-webcomponents'; @@ -79,6 +100,7 @@ const groupHeaderTemplate: ComboItemTemplate = ({ item }) => { combo.groupHeaderTemplate = groupHeaderTemplate; ``` + まず、グループ ヘッダー テンプレートを定義します。 @@ -101,6 +123,24 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false) + +```tsx + + +function renderGroupHeaderTemplate(props: { dataContext: any}): any { + return ( + Country of {props.dataContext.country} + ); +} +``` + + ## スロット カスタム テンプレート以外に、{ProductName} コンボボックス コンポーネントは、ユーザーがカスタム コンテンツをさまざまなコンボ パーツに渡すことを可能にするいくつかのスロットを公開します。 @@ -121,6 +161,14 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false)
``` +```tsx + +
+ Header content goes here +
+
+``` + ### フッター スロット オプションのリストの下にカスタム フッターをレンダリングするには、コンテンツを `footer` スロットに渡します。 @@ -138,6 +186,14 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false)
``` +```tsx + +
+ Footer content goes here +
+
+``` + ### 空のリスト スロット フィルタリング操作で結果が返されない場合にカスタム コンテンツをレンダリングするには、`empty` スロットを使用します。 @@ -153,6 +209,12 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false)
``` +```tsx + +
¯\_(ツ)_/¯
+
+``` + ### トグル アイコン スロット コンボ入力のトグル アイコンは、`toggle-icon` スロットを介して変更することもできます。 @@ -168,6 +230,14 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false)
``` +```tsx + + + + + +``` + ### クリア アイコン スロット クリア アイコンは、`clear-icon` スロットを介して変更できます。 @@ -183,6 +253,14 @@ igRegisterScript('ComboGroupHeaderTemplate', groupHeaderTemplate, false)
``` +```tsx + + + + + +``` + ## API リファレンス diff --git a/doc/jp/components/inputs/date-time-input.md b/doc/jp/components/inputs/date-time-input.md index b0d2ffbe9..9c5696e69 100644 --- a/doc/jp/components/inputs/date-time-input.md +++ b/doc/jp/components/inputs/date-time-input.md @@ -34,14 +34,44 @@ defineComponents(IgcDateTimeInput); + + +まず、次のコマンドを実行して、対応する {ProductName} npm パッケージをインストールする必要があります: + +```cmd +npm install igniteui-react +``` + +次に、以下のように、`DateTimeInput` とそれに必要な CSS をインポートし、そのモジュールを登録する必要があります: + +```tsx +import { IgrDateTimeInput, IgrDateTimeInputModule } from 'igniteui-react'; +import 'igniteui-webcomponents/themes/light/bootstrap.css'; +IgrDateTimeInputModule.register(); +``` + + + `DateTimeInput` を使用する前に、次のように登録する必要があります: +```razor +// in Program.cs file + +builder.Services.AddIgniteUIBlazor(typeof(IgbDateTimeInputModule)); +``` + +また、`DateTimeInput` コンポーネントにスタイルを適用するために、追加の CSS ファイルをリンクする必要があります。以下は、**Blazor WebAssembly** プロジェクトの **wwwroot/index.html** ファイルまたは **Blazor Server** プロジェクトの **Pages/_Host.cshtml** ファイルに配置する必要があります: + +```razor + +``` + ### 値バインディング -`DateTimeInput` コンポーネントの値を設定する最も簡単な方法は、Date オブジェクトを `value` プロパティに渡すことです。 +`DateTimeInput` コンポーネントの値を設定する最も簡単な方法は、Date オブジェクトを `Value` プロパティに渡すことです。 ```typescript const input = document.querySelector('igc-date-time-input') as IgcDateTimeInputComponent; @@ -50,21 +80,38 @@ const date = new Date(); input.value = date; ``` +```tsx +public dateTimeInputRef(input: IgrDateTimeInput) { + if (!input) { return; } + input.value = new Date(); +} +``` + +```razor + + + +``` + + + `DateTimeInput` は、[ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format) 文字列も受け入れます。 文字列は、`YYYY-MM-DDTHH:mm:ss.sssZ` の形式の完全な `ISO` 文字列にすることも、日付のみと時間のみの部分に分割することもできます。 ##### 日付のみ -日付のみの文字列がコンポーネントの `value` プロパティにバインドされている場合は、`YYYY-MM-DD` の形式である必要があります。`inputFormat` は、入力に値を入力するときに引き続き使用され、同じ形式である必要はありません。さらに、日付のみの文字列をバインドする場合、ディレクティブは時刻を `T00:00:00` に強制することにより、時刻のずれを防ぎます。 +日付のみの文字列がコンポーネントの `Value` プロパティにバインドされている場合は、`YYYY-MM-DD` の形式である必要があります。`InputFormat` は、入力に値を入力するときに引き続き使用され、同じ形式である必要はありません。さらに、日付のみの文字列をバインドする場合、ディレクティブは時刻を `T00:00:00` に強制することにより、時刻のずれを防ぎます。 ##### 時刻のみ 時刻のみの文字列は通常、`ECMA` 仕様では定義されていませんが、時刻のみのソリューションを必要とするシナリオにディレクティブを統合できるようにするために、24 時間形式 (`HH:mm:ss`) をサポートしています。12 時間形式はサポートされていません。 ##### 完全な ISO 文字列 -完全な ISO 文字列がバインドされている場合、ディレクティブは、[Date.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date_time_string_format) に必要なすべての要素が提供されている場合にのみそれを解析します。 +完全な ISO 文字列がバインドされている場合、ディレクティブは、[Date.parse](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date_time_string_format) に必要なすべての要素が提供されている場合にのみそれを解析します。 `InvalidDate` を含むすべての falsy の値は、`null` として解析されます。不完全な日付のみ、時間のみ、または完全な `ISO` 文字列は、`InvalidDate` として解析されます。 + + ### キーボード ナビゲーション `DateTimeInput` には直感的なキーボード ナビゲーションがあり、マウスに触れることなく、さまざまな `DatePart` を簡単に増分、減分、またはジャンプできます。 @@ -85,10 +132,10 @@ input.value = date; `DateTimeInput` は、さまざまな表示形式と入力形式をサポートしています。 -[Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) を使用して、`long` と `short`、`medium` と `full` などの事前定義された書式オプションをサポートできるようにします。さらに、`dd-MM-yy` などのサポートされている文字から構築されたカスタム文字列を受け入れることもできます。また、`displayFormat` が指定されていない場合、コンポーネントは `inputFormat` をそのまま使用します。 +[Intl.DateTimeFormat](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) を使用して、`long` と `short`、`medium` と `full` などの事前定義された書式オプションをサポートできるようにします。さらに、`dd-MM-yy` などのサポートされている文字から構築されたカスタム文字列を受け入れることもできます。また、`DisplayFormat` が指定されていない場合、コンポーネントは `InputFormat` をそのまま使用します。 ### 入力書式 -次の表は、コンポーネントの `inputFormat` でサポートされている形式を示しています。 +次の表は、コンポーネントの `InputFormat` でサポートされている形式を示しています。 |書式|説明| |-------|----------| @@ -106,12 +153,22 @@ input.value = date; | `mm` | 先行ゼロが明示的に設定された分。 | | `tt` | 12 時間形式の AM/PM セクション。 | -特定の入力形式を設定するには、それを文字列として `DateTimeInput` に渡します。これにより、予想されるユーザー入力形式と `mask` の両方が設定されます。さらに、`inputFormat` はロケール ベースであるため、何も指定されていない場合、エディターはデフォルトで `dd/MM/yyyy` になります。 +特定の入力形式を設定するには、それを文字列として `DateTimeInput` に渡します。これにより、予想されるユーザー入力形式と `mask` の両方が設定されます。さらに、`InputFormat` はロケール ベースであるため、何も指定されていない場合、エディターはデフォルトで `dd/MM/yyyy` になります。 ```html ``` +```tsx + +``` + +```razor + + + +``` + 以下は結果です: `sample="/inputs/date-time-input/input-format-display-format", height="150", alt="{Platform} 日時入力の表示書式の例"` @@ -166,34 +223,55 @@ input.value = date; | | `tttt` | 長い | noon | | | `ttttt` | 狭い | n | -> 注: -多くのロケールは、指定された書式に関係なく、同じ期間文字列を使用します。また、12 時間制を使用した場合にのみ効果があります。 +> [!Note] +> 多くのロケールは、指定された書式に関係なく、同じ期間文字列を使用します。また、12 時間制を使用した場合にのみ効果があります。 ## 最小値 / 最大値 -`minValue` および `maxValue` プロパティを指定して、コンポーネントの入力を制限し、有効性を制御できます。`value` プロパティと同様に、`string` 型にすることができます。 +`Min` および `Max` プロパティを指定して、コンポーネントの入力を制限し、有効性を制御できます。`Value` プロパティと同様に、`string` 型にすることができます。 ```ts const input = document.querySelector('igc-date-time-input') as IgcDateTimeInputComponent; -input.minValue = new Date(2021, 0, 1); +input.min = new Date(2021, 0, 1); ``` ```html - + ``` -すべてがうまくいった場合、値が指定された日付よりも大きいか小さい場合、コンポーネントは`無効`になります。以下の例をご覧ください: +```tsx +public dateTimeInputRef(input: IgrDateTimeInput) { + if (!input) { return; } + input.min = new Date(2021, 0, 1); +} +``` + +```tsx + +``` + +```razor + + + +``` + +すべてがうまくいった場合、値が指定された日付よりも大きいか小さい場合、コンポーネントは `invalid` になります。以下の例をご覧ください: `sample="/inputs/date-time-input/min-max-value", height="150", alt="{Platform} 日時入力最小 / 最大値の例"` ## ステップアップ / ステップダウン -`DateTimeInput` は、公開な `stepUp` メソッドと `stepDown` メソッドを公開します。現在設定されている日付と時刻の特定の `DatePart` を増減し、いくつかの方法で使用できます。 +`DateTimeInput` は、公開な `StepUp` メソッドと `StepDown` メソッドを公開します。現在設定されている日付と時刻の特定の `DatePart` を増減し、いくつかの方法で使用できます。 + +最初のシナリオでは、特定の DatePart がメソッドに渡されない場合、指定した `InputFormat` および内部コンポーネントの実装に基づいてデフォルトの DatePart が増減します。2 番目のシナリオでは、さまざまな要件を満たすために操作する DatePart を明示的に指定できます。また、どちらのメソッドも、stepUp/stepDown ステップを設定するために使用できるタイプ番号のオプションの `delta` パラメーターを受け入れます。 + + -最初のシナリオでは、特定の DatePart がメソッドに渡されない場合、指定した `inputFormat` および内部コンポーネントの実装に基づいてデフォルトの DatePart が増減します。2 番目のシナリオでは、さまざまな要件を満たすために操作する DatePart を明示的に指定できます。また、どちらのメソッドも、stepUp/stepDown ステップを設定するために使用できるタイプ番号のオプションの `delta` パラメーターを受け入れます。 +さらに、`SpinDelta` は、各日時セグメントに異なる delta を適用するために使用できるプロパティです。キーボード、マウス ホイール、または `StepUp` メソッドと `StepDown` メソッドを使用してスピンする場合に適用されます。ただし、`SpinDelta` よりも優先されるため、delta パラメーターが提供されていない場合に限ります。 -さらに、`spinDelta` は、各日時セグメントに異なる delta を適用するために使用できるプロパティです。キーボード、マウス ホイール、または `stepUp` メソッドと `stepDown` メソッドを使用してスピンする場合に適用されます。ただし、`spinDelta` よりも優先されるため、delta パラメーターが提供されていない場合に限ります。 + ```ts const input = document.getElementById('dateTimeInput') as IgcDateTimeInputComponent; diff --git a/doc/jp/components/layouts/accordion.md b/doc/jp/components/layouts/accordion.md index 4912792fd..298771eac 100644 --- a/doc/jp/components/layouts/accordion.md +++ b/doc/jp/components/layouts/accordion.md @@ -80,7 +80,7 @@ builder.Services.AddIgniteUIBlazor(typeof(IgbAccordionModule)); -また、追加の CSS ファイルをリンクして、スタイルを `Accordion` コンポーネントに適用する必要があります。以下は、**Blazor Web Assembly** プロジェクトの **wwwroot/index.html** ファイルまたは **Blazor Server** プロジェクトの **Pages/_Host.cshtml**フ ァイルに配置する必要があります: +また、追加の CSS ファイルをリンクして、スタイルを `Accordion` コンポーネントに適用する必要があります。以下は、**Blazor Web Assembly** プロジェクトの **wwwroot/index.html** ファイルまたは **Blazor Server** プロジェクトの **Pages/_Host.cshtml** ファイルに配置する必要があります: ```razor diff --git a/doc/jp/components/layouts/dock-manager.md b/doc/jp/components/layouts/dock-manager.md index 58daf93b3..9488a3b22 100644 --- a/doc/jp/components/layouts/dock-manager.md +++ b/doc/jp/components/layouts/dock-manager.md @@ -286,7 +286,7 @@ const layout: IgcDockManagerLayout = { ### アクティブ ペイン -ドック マネージャー コンポーネントは、フォーカスを含むコンテンツ ペインを強調表示し、`ActivePane` プロパティで公開します。プロパティを設定することによってアクティブ ペインをプログラムで変更できます。`ActivePaneChanged` イベントにサブスクライブして、`ActivePane` プロパティの変更をリッスンすることもできます。 +ドック マネージャー コンポーネントは、フォーカスを含むコンテンツ ペインをハイライト表示し、`ActivePane` プロパティで公開します。プロパティを設定することによってアクティブ ペインをプログラムで変更できます。`ActivePaneChanged` イベントにサブスクライブして、`ActivePane` プロパティの変更をリッスンすることもできます。 ```ts this.dockManager.addEventListener('activePaneChanged', ev => { @@ -626,7 +626,7 @@ igc-dockmanager::part(content-pane) { ## ローカライズ -ドック マネージャー コンポーネントは、コンテキスト メニュー、ツールチップ、および aria 属性で使用される文字列のローカライズをサポートします。デフォルトでは、ドック マネージャー はその親の [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) 属性を検索してページの言語を検出します。[lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) 属性が設定されていないか、ドック マネージャーがサポートしない値に設定されている場合、デフォルトの言語は [英語 (en)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsEN) です。ドック マネージャーは、[英語 (en)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsEN)、[日本語 (jp)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsJP)、[韓国語 (ko)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsKO)、[スペイン語 (es)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsES) の組み込みローカライズ文字列を提供します。その他の言語のリソース文字列を提供するには、[addResourceStrings]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#addResourceStrings) メソッドを使用します。 +ドック マネージャー コンポーネントは、コンテキスト メニュー、ツールチップ、および aria 属性で使用される文字列のローカライズをサポートします。デフォルトでは、ドック マネージャー はその親の [lang](https://developer.mozilla.org/ja/docs/Web/HTML/Global_attributes/lang) 属性を検索してページの言語を検出します。[lang](https://developer.mozilla.org/ja/docs/Web/HTML/Global_attributes/lang) 属性が設定されていないか、ドック マネージャーがサポートしない値に設定されている場合、デフォルトの言語は [英語 (en)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsEN) です。ドック マネージャーは、[英語 (en)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsEN)、[日本語 (jp)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsJP)、[韓国語 (ko)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsKO)、[スペイン語 (es)]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#IgcDockManagerResourceStringsES) の組み込みローカライズ文字列を提供します。その他の言語のリソース文字列を提供するには、[addResourceStrings]({environment:infragisticsBaseUrl}/products/ignite-ui/dock-manager/docs/typescript/latest/index.html#addResourceStrings) メソッドを使用します。 ```ts import { addResourceStrings } from 'igniteui-dockmanager'; @@ -639,7 +639,7 @@ const dockManagerStringsFr: IgcDockManagerResourceStrings = { addResourceStrings('fr', dockManagerStringsFr); ``` -ドック マネージャーは、文字列を変更できる `ResourceStrings` プロパティを公開します。`ResourceStrings` プロパティを設定すると、ドック マネージャーはどの [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) 属性が設定されていても文字列を使用します。 +ドック マネージャーは、文字列を変更できる `ResourceStrings` プロパティを公開します。`ResourceStrings` プロパティを設定すると、ドック マネージャーはどの [lang](https://developer.mozilla.org/ja/docs/Web/HTML/Global_attributes/lang) 属性が設定されていても文字列を使用します。 diff --git a/doc/jp/components/layouts/stepper.md b/doc/jp/components/layouts/stepper.md index 69daa0c90..6c31f0b76 100644 --- a/doc/jp/components/layouts/stepper.md +++ b/doc/jp/components/layouts/stepper.md @@ -66,7 +66,7 @@ builder.Services.AddIgniteUIBlazor( -また、追加の CSS ファイルをリンクして、スタイルを `Stepper` コンポーネントに適用する必要があります。以下は、**Blazor WebAssembly** プロジェクトの **wwwroot/index.html** ファイルまたは **Blazor Server** プロジェクトの **Pages/_Host.cshtml**フ ァイルに配置する必要があります: +また、追加の CSS ファイルをリンクして、スタイルを `Stepper` コンポーネントに適用する必要があります。以下は、**Blazor WebAssembly** プロジェクトの **wwwroot/index.html** ファイルまたは **Blazor Server** プロジェクトの **Pages/_Host.cshtml** ファイルに配置する必要があります: ```razor diff --git a/doc/jp/components/layouts/tabs.md b/doc/jp/components/layouts/tabs.md index 345a2a93f..8aace8288 100644 --- a/doc/jp/components/layouts/tabs.md +++ b/doc/jp/components/layouts/tabs.md @@ -21,6 +21,7 @@ _language: ja ## {ProductName} でタブを使用する方法 + まず、次のコマンドを実行して {ProductName} をインストールする必要があります: ```cmd @@ -29,8 +30,24 @@ npm install {PackageWebComponents} + + +まず、次のコマンドを実行して、対応する {ProductName} npm パッケージをインストールする必要があります: + +```cmd +npm install igniteui-react +``` + + + `Tabs` を使用する前に、次のように登録する必要があります: +```tsx +import { IgrTabsModule, IgrTabs, IgrTab, IgrTabPanel} from "igniteui-react"; + +IgrTabsModule.register(); +``` + ```razor // in Program.cs file @@ -70,6 +87,17 @@ defineComponents(IgcTabsComponent); ``` +```tsx + + Tab 1 + Tab 2 + Tab 3 + Panel 1 + Panel 2 + Panel 3 + +``` + ### 選択 ユーザーがキーを押すかクリックして項目を選択すると、`Tabs` は `Change` イベントを発行します。`Select` メソッドを使用すると、パネルを文字列値として指定してタブを選択できます。 @@ -90,6 +118,10 @@ defineComponents(IgcTabsComponent); Tab 1 ``` +```tsx +Tab 1 +``` + ### 配置 `Alignment` プロパティは、{Platform} タブの配置方法を制御します。プロパティは以下の値を含みます: @@ -131,7 +163,7 @@ defineComponents(IgcTabsComponent); -### スタイル設定 +## スタイル設定 `Tabs` コンポーネントは、そのすべての要素の CSS パーツを公開します。 diff --git a/doc/jp/components/linear-gauge.md b/doc/jp/components/linear-gauge.md index fcb7f3de6..4e4b8e2f1 100644 --- a/doc/jp/components/linear-gauge.md +++ b/doc/jp/components/linear-gauge.md @@ -253,11 +253,92 @@ ModuleManager.register( ``` -`sample="/gauges/linear-gauge/needle", height="125", alt="{Platform} linear gauge needle"` +`sample="/gauges/linear-gauge/needle", height="125", alt="{Platform} リニア ゲージのneedle"` +## 針のハイライト + +リニア ゲージを変更して、2 番目の針を表示できます。これにより、メイン針の `Value` の不透明度が低く表示されます。これを有効にするには、まず `HighlightValueDisplayMode` を Overlay に設定し、次に `HighlightValue` を適用します。 + +```html + + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/linear-gauge/highlight-needle", height="125", alt="{Platform} リニア ゲージの針のハイライト"` ## 範囲 -範囲はスケールで指定した値の範囲を強調表示する視覚的な要素です。その目的は、パフォーマンス バー メジャーの質的状態を視覚で伝えると同時に、その状態をレベルとして示すことにあります。 +範囲はスケールで指定した値の範囲をハイライト表示する視覚的な要素です。その目的は、パフォーマンス バー メジャーの質的状態を視覚で伝えると同時に、その状態をレベルとして示すことにあります。 ```html ``` -`sample="/gauges/linear-gauge/tickmarks", height="125", alt="{Platform} linear gauge tickmarks"` +`sample="/gauges/linear-gauge/tickmarks", height="125", alt="{Platform} リニア ゲージの目盛"` ## ラベル @@ -488,7 +569,7 @@ ModuleManager.register( ``` -`sample="/gauges/linear-gauge/labels", height="125", alt="{Platform} linear gauge labels"` +`sample="/gauges/linear-gauge/labels", height="125", alt="{Platform} リニア ゲージのラベル"` ## バッキング @@ -547,11 +628,11 @@ ModuleManager.register( ``` -`sample="/gauges/linear-gauge/backing", height="125", alt="{Platform} linear gauge backing"` +`sample="/gauges/linear-gauge/backing", height="125", alt="{Platform} リニア ゲージのバッキング"` ## スケール -スケールはゲージで値の全範囲を強調表示する視覚的な要素です。外観やスケールの図形のカスタマイズ、更にスケールを反転 (`IsScaleInverted` プロパティを使用) させて、すべてのラベルを左から右ではなく、右から左へ描画することもできます。 +スケールはゲージで値の全範囲をハイライト表示する視覚的な要素です。外観やスケールの図形のカスタマイズ、更にスケールを反転 (`IsScaleInverted` プロパティを使用) させて、すべてのラベルを左から右ではなく、右から左へ描画することもできます。 ```html + +``` + +```tsx + +``` + +```html + + +``` + +```razor + + +``` + +`sample="/gauges/radial-gauge/highlight-needle", height="320", alt="{Platform} ラジアル ゲージの針のハイライト"` ## まとめ 上記すべてのコード スニペットを以下のコード ブロックにまとめています。プロジェクトに簡単にコピーしてブレットグラフのすべての機能を再現できます。 diff --git a/doc/jp/components/scheduling/calendar.md b/doc/jp/components/scheduling/calendar.md index 4b3a41b8f..7378df0f4 100644 --- a/doc/jp/components/scheduling/calendar.md +++ b/doc/jp/components/scheduling/calendar.md @@ -252,7 +252,7 @@ this.calendar.disabledDates = [{ type: DateRangeType.Between, dateRange: range } ### 特定の日付 -`SpecialDates` プロパティは、`DisabledDates` とほぼ同じ構成原則を使用しています。特別な日付は強調表示されたルック アンド フィールを持ち、無効な日付とは異なり、選択することができます。 +`SpecialDates` プロパティは、`DisabledDates` とほぼ同じ構成原則を使用しています。特別な日付はハイライト表示されたルック アンド フィールを持ち、無効な日付とは異なり、選択することができます。 Calendar に特別な日付を追加しましょう。これを行うために、`DateRangeDescriptor` を作成し、現在の月の 3 日から 8 日までの日付を渡します。 diff --git a/doc/jp/components/spreadsheet-conditional-formatting.md b/doc/jp/components/spreadsheet-conditional-formatting.md index 4bd132bf3..ce6f93094 100644 --- a/doc/jp/components/spreadsheet-conditional-formatting.md +++ b/doc/jp/components/spreadsheet-conditional-formatting.md @@ -7,7 +7,7 @@ _language: ja --- # {Platform} Spreadsheet の条件付き書式設定 -{Platform} Spreadsheet コンポーネントは、ワークシートのセルに条件付き書式を設定できます。これにより、条件に基づいてデータのさまざまな部分を強調表示できます。 +{Platform} Spreadsheet コンポーネントは、ワークシートのセルに条件付き書式を設定できます。これにより、条件に基づいてデータのさまざまな部分をハイライト表示できます。 ## {Platform} Spreadsheet の条件付き書式設定の例 diff --git a/doc/jp/images/hgrid-database.jpg b/doc/jp/images/hgrid-database.jpg new file mode 100644 index 000000000..bf1a3bb3d Binary files /dev/null and b/doc/jp/images/hgrid-database.jpg differ diff --git a/doc/kr/components/charts/chart-overview.md b/doc/kr/components/charts/chart-overview.md index e941e70b6..b75bbdefb 100644 --- a/doc/kr/components/charts/chart-overview.md +++ b/doc/kr/components/charts/chart-overview.md @@ -39,7 +39,7 @@ Built with a modular design of axis, markers, series, legend, and annotation lay The {Platform} Bar Chart, or Bar Graph is among the most common category chart types used to quickly compare frequency, count, total, or average of data in different categories with data encoded by horizontal bars of equal width and differing lengths. They are ideal for showing variations in the value of an item over time, data distribution, sorted data ranking (high to low, worst to best). Data is represented using a collection of rectangles that extend from the left to right of the chart towards the values of data points. Learn more about our [bar chart](types/bar-chart.md) -`sample="/charts/data-chart/bar-chart-multiple-sources", height="600", alt="{Platform} Bar Chart Multiple Sources"` +`sample="/charts/data-chart/bar-chart-multiple-sources", img-src="https://static.infragistics.com/marketing/Website/products/Ignite-UI-for-Angular/ignite-ui-angular-bar-chart" height="600", alt="{Platform} Bar Chart Multiple Sources"` diff --git a/doc/kr/components/charts/features/chart-data-filtering b/doc/kr/components/charts/features/chart-data-filtering new file mode 100644 index 000000000..5b6e0ff95 --- /dev/null +++ b/doc/kr/components/charts/features/chart-data-filtering @@ -0,0 +1,53 @@ +--- +title: {Platform} Chart Data Filtering | Data Visualization | Infragistics +_description: Infragistics' {Platform} Chart Data Filtering +_keywords: {Platform} Charts, Filtering, Infragistics +mentionedTypes: ["CategoryChart"] +namespace: Infragistics.Controls.Charts +--- + +# {Platform} Chart Data Filtering + +Data Filtering allows you to query large data in order to analyze and plot small subset of data entries via filter expressions, all without having to manually modify the datasource bound to the chart. + +A complete list of valid expressions and keywords to form a query string can be found here: + +[Filter expressions](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris) + +> NOTE: Any incorrect filter applied will result with an empty chart. + +## {Platform} Chart Data Filter Example + +The following example depicts a [Column Chart](../types/column-chart.md) of annual birth rates across several decades. The drop-down allows you to select a decade, which inserts an expression via the `InitialFilter` property, to update the chart visual and thus filtering out the other decades out. + +`sample="/charts/category-chart/data-filter", height="500", alt="{Platform} Data Filter Example"` + +
+ +The `InitialFilter` property is a string that requires the following syntax in order to filter properly. The value requires sets of parenthesesthat include both the filter expression definition, column and value associated with the record(s) filtering in. + +eg. To show all countries that start with the letter B: + +"(startswith(Country, 'B'))" + +eg. Concatenating more than one expression: + +"(startswith(Country, 'B') and endswith(Country, 'L') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))" + + +## Additional Resources + +You can find more information about related chart features in these topics: + +- [Chart Annotations](chart-annotations.md) +- [Chart Highlighting](chart-highlighting.md) +- [Chart Tooltips](chart-tooltips.md) + +## API References + +The following is a list of API members mentioned in the above sections: + +- `CategoryChart` +- `IsTransitionInEnabled` +- `TransitionInDuration` +- `TransitionInMode` \ No newline at end of file diff --git a/docConfig.json b/docConfig.json index d8db92ca9..98658a710 100644 --- a/docConfig.json +++ b/docConfig.json @@ -469,7 +469,9 @@ { "name": "{PackageVerChanges-23-2}", "value": "23.2.97 (December 2023)"}, { "name": "{PackageVerChanges-23-2-JAN}","value": "23.2.110 (January 2024)"}, { "name": "{PackageVerChanges-23-2-MAR}", "value": "23.2.189 (March 2024)" }, - { "name": "{PackageVerLatest}", "value": "23.2.189"}, + { "name": "{PackageVerChanges-23-2-APR}", "value": "23.2.191 (April 2024)" }, + { "name": "{PackageVerChanges-23-2-APR2}", "value": "23.2.204" }, + { "name": "{PackageVerLatest}", "value": "23.2.204"}, { "name": "{RepoSamples}", "value": "https://github.com/IgniteUI/igniteui-blazor-examples/tree/master/samples"}, { "name": "{RepoBrowser}", "value": "https://github.com/IgniteUI/igniteui-blazor-examples/tree/master/browser"}, diff --git a/docfx/en/components/toc.json b/docfx/en/components/toc.json index da9e9d443..197d15aa9 100644 --- a/docfx/en/components/toc.json +++ b/docfx/en/components/toc.json @@ -371,7 +371,7 @@ "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Collapsible Column Groups", "href": "grids/hierarchical-grid/collapsible-column-groups.md", "status": "NEW" @@ -407,13 +407,13 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Conditional Styling", "href": "grids/hierarchical-grid/conditional-cell-styling.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Display Density", "href": "grids/hierarchical-grid/display-density.md", "status": "NEW" @@ -425,13 +425,13 @@ "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Cell Editing", "href": "grids/hierarchical-grid/cell-editing.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Row Adding", "href": "grids/hierarchical-grid/row-adding.md", "status": "NEW" @@ -451,19 +451,19 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Filtering", "href": "grids/hierarchical-grid/filtering.md", "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Advanced Filtering", "href": "grids/hierarchical-grid/advanced-filtering.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Excel Style Filtering", "href": "grids/hierarchical-grid/excel-style-filtering.md", "status": "NEW" @@ -501,13 +501,13 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Row Dragging", "href": "grids/hierarchical-grid/row-drag.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Row Pinning", "href": "grids/hierarchical-grid/row-pinning.md", "status": "NEW" @@ -519,13 +519,13 @@ "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Cell Selection", "href": "grids/hierarchical-grid/cell-selection.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Column Selection", "href": "grids/hierarchical-grid/column-selection.md", "status": "NEW" @@ -557,13 +557,19 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Summaries", "href": "grids/hierarchical-grid/summaries.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], + "name": "Toolbar", + "href": "grids/hierarchical-grid/toolbar.md", + "status": "NEW" + }, + { + "exclude": ["Angular"], "name": "Virtualization and performance", "href": "grids/hierarchical-grid/virtualization.md", "status": "NEW" @@ -615,10 +621,10 @@ ] }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Tree Grid", "href": "grids/tree-grid/overview.md", - "status": "", + "status": ["NEW_REACT"], "items": [ { "exclude": ["Angular", "React"], @@ -642,16 +648,16 @@ "href": "grids/tree-grid/collapsible-column-groups.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Column Types", "href": "grids/tree-grid/column-types.md", - "status": "" + "status": ["NEW_REACT"] }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Conditional Styling", "href": "grids/tree-grid/conditional-cell-styling.md", - "status": "" + "status": "NEW" }, { "exclude": ["Angular", "React"], @@ -676,9 +682,10 @@ "href": "grids/tree-grid/column-pinning.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Column Resizing", - "href": "grids/tree-grid/column-resizing.md" + "href": "grids/tree-grid/column-resizing.md", + "status": ["NEW_REACT"] }, { "exclude": ["Angular", "React"], @@ -710,7 +717,7 @@ "status": "" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Filtering", "href": "grids/tree-grid/filtering.md", "status": "" @@ -734,10 +741,10 @@ "status": "" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Paging", "href": "grids/tree-grid/paging.md", - "status": "" + "status": "NEW" }, { "exclude": ["Angular", "React", "WebComponents", "Blazor"], @@ -752,13 +759,13 @@ "status": "" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Row Adding", "href": "grids/tree-grid/row-adding.md", - "status": "" + "status": "NEW" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Row Dragging", "href": "grids/tree-grid/row-drag.md", "status": "" @@ -770,22 +777,22 @@ "status": "" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Row Pinning", "href": "grids/tree-grid/row-pinning.md", "status": "" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Row Selection", "href": "grids/tree-grid/row-selection.md", - "status": "" + "status": "NEW" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Search", "href": "grids/tree-grid/search.md", - "status": "" + "status": "NEW" }, { "exclude": ["Angular", "React", "WebComponents", "Blazor"], @@ -818,10 +825,10 @@ "status": "" }, { - "exclude": ["Angular", "React", "WebComponents", "Blazor"], + "exclude": ["Angular"], "name": "Virtualization and performance", "href": "grids/tree-grid/virtualization.md", - "status": "" + "status": "NEW" }, { "exclude": ["Angular", "React", "Blazor"], @@ -1242,6 +1249,11 @@ "name": "Chart Data Aggregations", "href": "charts/features/chart-data-aggregations.md" }, + { + "name": "Chart Data Filtering", + "href": "charts/features/chart-data-filtering.md", + "status": "NEW" + }, { "name": "Chart Data Legend", "href": "charts/features/chart-data-legend.md", @@ -1517,7 +1529,7 @@ "status": "" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Tabs", "href": "layouts/tabs.md", "status": "" @@ -1649,7 +1661,7 @@ "href": "inputs/chip.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Combo Box", "href": "inputs/combo/overview.md", "items": [ @@ -1687,12 +1699,6 @@ "name": "Icon Button", "href": "inputs/icon-button.md" }, - { - "exclude": ["Angular"], - "name": "Multi-Column Combo Box", - "href": "editors/multi-column-combobox.md", - "status": "" - }, { "exclude": ["Angular"], "name": "Input", @@ -1704,7 +1710,7 @@ "href": "inputs/mask-input.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "Date Time Input", "href": "inputs/date-time-input.md" }, @@ -2016,5 +2022,11 @@ "status": "" } ] + }, + { + "exclude": ["Angular"], + "name": "Multi-Column Combo Box", + "href": "editors/multi-column-combobox.md", + "status": "" } ] diff --git a/docfx/jp/components/toc.json b/docfx/jp/components/toc.json index 616657dfe..da30d4f55 100644 --- a/docfx/jp/components/toc.json +++ b/docfx/jp/components/toc.json @@ -369,19 +369,19 @@ "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "縮小可能な列グループ", "href": "grids/hierarchical-grid/collapsible-column-groups.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "列の非表示", "href": "grids/hierarchical-grid/column-hiding.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "列の移動", "href": "grids/hierarchical-grid/column-moving.md", "status": "NEW" @@ -393,49 +393,49 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "列のサイズ変更", "href": "grids/hierarchical-grid/column-resizing.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "列のタイプ", "href": "grids/hierarchical-grid/column-types.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "条件付きスタイル設定", "href": "grids/hierarchical-grid/conditional-cell-styling.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "表示密度", "href": "grids/hierarchical-grid/display-density.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "編集", "href": "grids/hierarchical-grid/editing.md", "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "セルの編集", "href": "grids/hierarchical-grid/cell-editing.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "行の追加", "href": "grids/hierarchical-grid/row-adding.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "行の編集", "href": "grids/hierarchical-grid/row-editing.md", "status": "NEW" @@ -443,19 +443,25 @@ ] }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], + "name": "Excel へエクスポート", + "href": "grids/hierarchical-grid/export-excel.md", + "status": "NEW" + }, + { + "exclude": ["Angular"], "name": "フィルタリング", "href": "grids/hierarchical-grid/filtering.md", "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "高度なフィルタリング", "href": "grids/hierarchical-grid/advanced-filtering.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "Excel スタイル フィルタリング", "href": "grids/hierarchical-grid/excel-style-filtering.md", "status": "NEW" @@ -463,7 +469,7 @@ ] }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "複数列ヘッダー", "href": "grids/hierarchical-grid/multi-column-headers.md", "status": "NEW" @@ -487,13 +493,13 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "行の操作", "href": "grids/hierarchical-grid/row-actions.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "行のドラッグ", "href": "grids/hierarchical-grid/row-drag.md", "status": "NEW" @@ -505,25 +511,25 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "選択", "href": "grids/hierarchical-grid/selection.md", "status": "NEW", "items": [ { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "セルの選択", "href": "grids/hierarchical-grid/cell-selection.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "列の選択", "href": "grids/hierarchical-grid/column-selection.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "行の選択", "href": "grids/hierarchical-grid/row-selection.md", "status": "NEW" @@ -531,13 +537,13 @@ ] }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "サイズ設定", "href": "grids/hierarchical-grid/sizing.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "ソート", "href": "grids/hierarchical-grid/sorting.md", "status": "NEW" @@ -549,13 +555,19 @@ "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], "name": "集計", "href": "grids/hierarchical-grid/summaries.md", "status": "NEW" }, { - "exclude": ["Angular", "Blazor", "React", "WebComponents"], + "exclude": ["Angular"], + "name": "ツールバー", + "href": "grids/hierarchical-grid/toolbar.md", + "status": "NEW" + }, + { + "exclude": ["Angular"], "name": "仮想化とパフォーマンス", "href": "grids/hierarchical-grid/virtualization.md", "status": "NEW" @@ -565,6 +577,12 @@ "name": "キーボード ナビゲーション", "href": "grids/hierarchical-grid/keyboard-navigation.md", "status": "NEW" + }, + { + "exclude": ["Angular"], + "name": "ロードオンデマンド", + "href": "grids/hierarchical-grid/load-on-demand.md", + "status": "NEW" } ] }, @@ -1228,6 +1246,11 @@ "name": "チャートのデータ集計", "href": "charts/features/chart-data-aggregations.md" }, + { + "name": "", + "href": "charts/features/chart-data-filtering.md", + "status": "NEW" + }, { "name": "チャートのデータ凡例", "href": "charts/features/chart-data-legend.md", @@ -1503,7 +1526,7 @@ "status": "" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "タブ", "href": "layouts/tabs.md", "status": "" @@ -1635,7 +1658,7 @@ "href": "inputs/chip.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "コンボ ボックス", "href": "inputs/combo/overview.md", "items": [ @@ -1673,12 +1696,6 @@ "name": "アイコン ボタン", "href": "inputs/icon-button.md" }, - { - "exclude": ["Angular"], - "name": "複数列コンボ ボックス", - "href": "editors/multi-column-combobox.md", - "status": "" - }, { "exclude": ["Angular"], "name": "入力", @@ -1690,7 +1707,7 @@ "href": "inputs/mask-input.md" }, { - "exclude": ["Angular", "React"], + "exclude": ["Angular"], "name": "日時入力", "href": "inputs/date-time-input.md" }, @@ -2002,5 +2019,11 @@ "status": "" } ] + }, + { + "exclude": ["Angular"], + "name": "複数列コンボ ボックス", + "href": "editors/multi-column-combobox.md", + "status": "" } ] diff --git a/package-lock.json b/package-lock.json index 83d7c5aeb..27050b3e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "gulp-sass": "^5.1.0", "gulp-shell": "^0.7.1", "gulp-yaml": "^2.0.4", - "igniteui-docfx-template": "3.6.0", + "igniteui-docfx-template": "^3.7.5", "js-yaml": "^4.1.0", "mocha": "^10.2.0", "remark": "^13.0.0", @@ -3856,9 +3856,9 @@ } }, "node_modules/igniteui-docfx-template": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/igniteui-docfx-template/-/igniteui-docfx-template-3.6.0.tgz", - "integrity": "sha512-VZhV3QI1iJaW/AGcKuPeGZ/fLKQlpTAB05Q+pZ9j5nvzBdBcrx67Hdc2K0d6NchNWBYSnwnWD/62CcpyQTWkiQ==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/igniteui-docfx-template/-/igniteui-docfx-template-3.7.5.tgz", + "integrity": "sha512-0wJY0C6+7JQ25i9huWEyrm6cZH3odhDZIzTnTdskL/iYHZbLS3ajdBNGf4j7DaKeWmjSTq2lykDwwiY6rsUixQ==", "dev": true, "dependencies": { "@stackblitz/sdk": "^1.5.3", @@ -5795,6 +5795,8 @@ }, "node_modules/npm/node_modules/@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -5811,6 +5813,8 @@ }, "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", + "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", "dev": true, "inBundle": true, "license": "ISC" @@ -5882,6 +5886,8 @@ }, "node_modules/npm/node_modules/@npmcli/disparity-colors": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-3.0.0.tgz", + "integrity": "sha512-5R/z157/f20Fi0Ou4ZttL51V0xz0EdPEOauFtPCEYOLInDBRCj1/TxOJ5aGTrtShxEshN2d+hXb9ZKSi5RLBcg==", "dev": true, "inBundle": true, "license": "ISC", @@ -5894,6 +5900,8 @@ }, "node_modules/npm/node_modules/@npmcli/fs": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, "inBundle": true, "license": "ISC", @@ -5926,6 +5934,8 @@ }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -5985,6 +5995,8 @@ }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz", + "integrity": "sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==", "dev": true, "inBundle": true, "license": "ISC", @@ -5994,6 +6006,8 @@ }, "node_modules/npm/node_modules/@npmcli/node-gyp": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "dev": true, "inBundle": true, "license": "ISC", @@ -6015,6 +6029,8 @@ }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "dev": true, "inBundle": true, "license": "ISC", @@ -6064,6 +6080,8 @@ }, "node_modules/npm/node_modules/@tootallnate/once": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, "inBundle": true, "license": "MIT", @@ -6085,6 +6103,8 @@ }, "node_modules/npm/node_modules/abbrev": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -6094,6 +6114,8 @@ }, "node_modules/npm/node_modules/abort-controller": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dev": true, "inBundle": true, "license": "MIT", @@ -6185,6 +6207,8 @@ }, "node_modules/npm/node_modules/archy": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true, "inBundle": true, "license": "MIT" @@ -6212,6 +6236,8 @@ }, "node_modules/npm/node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -6269,6 +6295,8 @@ }, "node_modules/npm/node_modules/buffer": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, "funding": [ { @@ -6293,6 +6321,8 @@ }, "node_modules/npm/node_modules/builtins": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -6355,6 +6385,8 @@ }, "node_modules/npm/node_modules/ci-info": { "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, "funding": [ { @@ -6370,6 +6402,8 @@ }, "node_modules/npm/node_modules/cidr-regex": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-3.1.1.tgz", + "integrity": "sha512-RBqYd32aDwbCMFJRL6wHOlDNYJsPNTt8vC82ErHF5vKt8QQzxm1FrkW8s/R5pVrXMf17sba09Uoy91PKiddAsw==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -6393,6 +6427,8 @@ }, "node_modules/npm/node_modules/cli-columns": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-4.0.0.tgz", + "integrity": "sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -6406,6 +6442,8 @@ }, "node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "inBundle": true, "license": "MIT", @@ -6432,6 +6470,8 @@ }, "node_modules/npm/node_modules/cmd-shim": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", + "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -6474,6 +6514,8 @@ }, "node_modules/npm/node_modules/columnify": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", + "integrity": "sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -6511,6 +6553,8 @@ }, "node_modules/npm/node_modules/cssesc": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "inBundle": true, "license": "MIT", @@ -6523,6 +6567,8 @@ }, "node_modules/npm/node_modules/debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -6540,14 +6586,14 @@ }, "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/defaults": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, "inBundle": true, "license": "MIT", @@ -6577,6 +6623,8 @@ }, "node_modules/npm/node_modules/diff": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, "inBundle": true, "license": "BSD-3-Clause", @@ -6594,6 +6642,8 @@ }, "node_modules/npm/node_modules/encoding": { "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, "inBundle": true, "license": "MIT", @@ -6623,6 +6673,8 @@ }, "node_modules/npm/node_modules/event-target-shim": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -6632,6 +6684,8 @@ }, "node_modules/npm/node_modules/events": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -6641,6 +6695,8 @@ }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true, "inBundle": true, "license": "MIT", @@ -6697,6 +6753,8 @@ }, "node_modules/npm/node_modules/glob": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -6767,6 +6825,8 @@ }, "node_modules/npm/node_modules/hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dev": true, "inBundle": true, "license": "ISC", @@ -6779,12 +6839,16 @@ }, "node_modules/npm/node_modules/http-cache-semantics": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true, "inBundle": true, "license": "BSD-2-Clause" }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, "inBundle": true, "license": "MIT", @@ -6799,6 +6863,8 @@ }, "node_modules/npm/node_modules/https-proxy-agent": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "inBundle": true, "license": "MIT", @@ -6838,6 +6904,8 @@ }, "node_modules/npm/node_modules/ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -6892,8 +6960,6 @@ }, "node_modules/npm/node_modules/infer-owner": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "dev": true, "inBundle": true, "license": "ISC" @@ -6920,6 +6986,8 @@ }, "node_modules/npm/node_modules/ini": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -6929,6 +6997,8 @@ }, "node_modules/npm/node_modules/init-package-json": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-5.0.0.tgz", + "integrity": "sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw==", "dev": true, "inBundle": true, "license": "ISC", @@ -6947,12 +7017,16 @@ }, "node_modules/npm/node_modules/ip": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/ip-regex": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -6962,6 +7036,8 @@ }, "node_modules/npm/node_modules/is-cidr": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-4.0.2.tgz", + "integrity": "sha512-z4a1ENUajDbEl/Q6/pVBpTR1nBjjEE1X7qb7bmWYanNnPoKAvUCPFKeXV6Fe4mgTkWKBqiHIcwsI3SndiO5FeA==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -7013,6 +7089,8 @@ }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7050,12 +7128,16 @@ }, "node_modules/npm/node_modules/just-diff-apply": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", + "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-7.0.2.tgz", + "integrity": "sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw==", "dev": true, "inBundle": true, "license": "ISC", @@ -7124,6 +7206,8 @@ }, "node_modules/npm/node_modules/libnpmhook": { "version": "9.0.3", + "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-9.0.3.tgz", + "integrity": "sha512-wMZe58sI7KLhg0+nUWZW5KdMfjNNcOIIbkoP19BDHYoUF9El7eeUWkGNxUGzpHkPKiGoQ1z/v6CYin4deebeuw==", "dev": true, "inBundle": true, "license": "ISC", @@ -7184,6 +7268,8 @@ }, "node_modules/npm/node_modules/libnpmsearch": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-6.0.2.tgz", + "integrity": "sha512-p+5BF19AvnVg8mcIQhy6yWhI6jHQRVMYaIaKeITEfYAffWsqbottA/WZdMtHL76hViC6SFM1WdclM1w5eAIa1g==", "dev": true, "inBundle": true, "license": "ISC", @@ -7196,6 +7282,8 @@ }, "node_modules/npm/node_modules/libnpmteam": { "version": "5.0.3", + "resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-5.0.3.tgz", + "integrity": "sha512-7XOGhi45s+ml6TyrhJUTyrErcoDMKGKfEtiTEco4ofU7BGGAUOalVztKMVLLJgJOOXdIAIlzCHqkTXEuSiyCiA==", "dev": true, "inBundle": true, "license": "ISC", @@ -7209,6 +7297,8 @@ }, "node_modules/npm/node_modules/libnpmversion": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/libnpmversion/-/libnpmversion-4.0.2.tgz", + "integrity": "sha512-n1X70mFHv8Piy4yos+MFWUARSkTbyV5cdsHScaIkuwYvRAF/s2VtYScDzWB4Oe8uNEuGNdjiRR1E/Dh1tMvv6g==", "dev": true, "inBundle": true, "license": "ISC", @@ -7225,6 +7315,8 @@ }, "node_modules/npm/node_modules/lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "inBundle": true, "license": "ISC", @@ -7260,6 +7352,8 @@ }, "node_modules/npm/node_modules/minimatch": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", + "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", "dev": true, "inBundle": true, "license": "ISC", @@ -7478,6 +7572,8 @@ }, "node_modules/npm/node_modules/mute-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", "dev": true, "inBundle": true, "license": "ISC", @@ -7487,6 +7583,8 @@ }, "node_modules/npm/node_modules/negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7533,12 +7631,16 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "dev": true, "inBundle": true, "license": "ISC", @@ -7623,6 +7725,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "inBundle": true, "license": "ISC", @@ -7635,8 +7739,6 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/fs-minipass": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, "inBundle": true, "license": "ISC", @@ -7649,6 +7751,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dev": true, "inBundle": true, "license": "ISC", @@ -7729,6 +7833,8 @@ }, "node_modules/npm/node_modules/node-gyp/node_modules/minipass": { "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, "inBundle": true, "license": "ISC", @@ -7868,6 +7974,8 @@ }, "node_modules/npm/node_modules/normalize-package-data": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -7883,6 +7991,8 @@ }, "node_modules/npm/node_modules/npm-audit-report": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-4.0.0.tgz", + "integrity": "sha512-k2o5476sLrp94b6Gl819YzlS7LAdb8lgE6yQCysBEji5E3WoUdRve6tiVMLKAPPdLfItU4kOSUycWS5HFTrbug==", "dev": true, "inBundle": true, "license": "ISC", @@ -7895,6 +8005,8 @@ }, "node_modules/npm/node_modules/npm-bundled": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -7928,6 +8040,8 @@ }, "node_modules/npm/node_modules/npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "dev": true, "inBundle": true, "license": "ISC", @@ -7943,6 +8057,8 @@ }, "node_modules/npm/node_modules/npm-packlist": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -7970,6 +8086,8 @@ }, "node_modules/npm/node_modules/npm-profile": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-7.0.1.tgz", + "integrity": "sha512-VReArOY/fCx5dWL66cbJ2OMogTQAVVQA//8jjmjkarboki3V7UJ0XbGFW+khRwiAJFQjuH0Bqr/yF7Y5RZdkMQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -8001,6 +8119,8 @@ }, "node_modules/npm/node_modules/npm-user-validate": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-2.0.0.tgz", + "integrity": "sha512-sSWeqAYJ2dUPStJB+AEj0DyLRltr/f6YNcvCA7phkB8/RMLMnVsQ41GMwHo/ERZLYNDsyB2wPm7pZo1mqPOl7Q==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -8010,6 +8130,8 @@ }, "node_modules/npm/node_modules/npmlog": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-7.0.1.tgz", + "integrity": "sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg==", "dev": true, "inBundle": true, "license": "ISC", @@ -8123,6 +8245,8 @@ }, "node_modules/npm/node_modules/proc-log": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "dev": true, "inBundle": true, "license": "ISC", @@ -8132,6 +8256,8 @@ }, "node_modules/npm/node_modules/process": { "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true, "inBundle": true, "license": "MIT", @@ -8152,8 +8278,6 @@ }, "node_modules/npm/node_modules/promise-call-limit": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz", - "integrity": "sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -8186,6 +8310,8 @@ }, "node_modules/npm/node_modules/promzard": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.0.tgz", + "integrity": "sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==", "dev": true, "inBundle": true, "license": "ISC", @@ -8198,6 +8324,8 @@ }, "node_modules/npm/node_modules/qrcode-terminal": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", "dev": true, "inBundle": true, "bin": { @@ -8218,6 +8346,8 @@ }, "node_modules/npm/node_modules/read-cmd-shim": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", + "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -8242,6 +8372,8 @@ }, "node_modules/npm/node_modules/read-package-json-fast": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "dev": true, "inBundle": true, "license": "ISC", @@ -8310,8 +8442,6 @@ }, "node_modules/npm/node_modules/rimraf/node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "inBundle": true, "license": "ISC", @@ -8398,6 +8528,8 @@ }, "node_modules/npm/node_modules/signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "inBundle": true, "license": "ISC" @@ -8421,6 +8553,8 @@ }, "node_modules/npm/node_modules/smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8431,6 +8565,8 @@ }, "node_modules/npm/node_modules/socks": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8445,6 +8581,8 @@ }, "node_modules/npm/node_modules/socks-proxy-agent": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "dev": true, "inBundle": true, "license": "MIT", @@ -8605,18 +8743,24 @@ }, "node_modules/npm/node_modules/text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/tiny-relative-date": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz", + "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/treeverse": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", + "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -8639,6 +8783,8 @@ }, "node_modules/npm/node_modules/unique-filename": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, "inBundle": true, "license": "ISC", @@ -8651,6 +8797,8 @@ }, "node_modules/npm/node_modules/unique-slug": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -8683,6 +8831,8 @@ }, "node_modules/npm/node_modules/validate-npm-package-name": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -8695,8 +8845,6 @@ }, "node_modules/npm/node_modules/walk-up-path": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", "dev": true, "inBundle": true, "license": "ISC" @@ -8729,6 +8877,8 @@ }, "node_modules/npm/node_modules/wide-align": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "inBundle": true, "license": "ISC", @@ -15031,9 +15181,9 @@ } }, "igniteui-docfx-template": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/igniteui-docfx-template/-/igniteui-docfx-template-3.6.0.tgz", - "integrity": "sha512-VZhV3QI1iJaW/AGcKuPeGZ/fLKQlpTAB05Q+pZ9j5nvzBdBcrx67Hdc2K0d6NchNWBYSnwnWD/62CcpyQTWkiQ==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/igniteui-docfx-template/-/igniteui-docfx-template-3.7.5.tgz", + "integrity": "sha512-0wJY0C6+7JQ25i9huWEyrm6cZH3odhDZIzTnTdskL/iYHZbLS3ajdBNGf4j7DaKeWmjSTq2lykDwwiY6rsUixQ==", "dev": true, "requires": { "@stackblitz/sdk": "^1.5.3", @@ -16483,6 +16633,8 @@ "dependencies": { "@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "bundled": true, "dev": true, "optional": true @@ -16494,6 +16646,8 @@ }, "@isaacs/string-locale-compare": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", + "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", "bundled": true, "dev": true }, @@ -16553,6 +16707,8 @@ }, "@npmcli/disparity-colors": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-3.0.0.tgz", + "integrity": "sha512-5R/z157/f20Fi0Ou4ZttL51V0xz0EdPEOauFtPCEYOLInDBRCj1/TxOJ5aGTrtShxEshN2d+hXb9ZKSi5RLBcg==", "bundled": true, "dev": true, "requires": { @@ -16561,6 +16717,8 @@ }, "@npmcli/fs": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "bundled": true, "dev": true, "requires": { @@ -16585,6 +16743,8 @@ }, "@npmcli/installed-package-contents": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", "bundled": true, "dev": true, "requires": { @@ -16625,11 +16785,15 @@ }, "@npmcli/name-from-folder": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz", + "integrity": "sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==", "bundled": true, "dev": true }, "@npmcli/node-gyp": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "bundled": true, "dev": true }, @@ -16643,6 +16807,8 @@ }, "@npmcli/promise-spawn": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "bundled": true, "dev": true, "requires": { @@ -16676,6 +16842,8 @@ }, "@tootallnate/once": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "bundled": true, "dev": true }, @@ -16689,11 +16857,15 @@ }, "abbrev": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", "bundled": true, "dev": true }, "abort-controller": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "bundled": true, "dev": true, "requires": { @@ -16757,6 +16929,8 @@ }, "archy": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "bundled": true, "dev": true }, @@ -16778,6 +16952,8 @@ }, "base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "bundled": true, "dev": true }, @@ -16811,6 +16987,8 @@ }, "buffer": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "bundled": true, "dev": true, "requires": { @@ -16820,6 +16998,8 @@ }, "builtins": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "bundled": true, "dev": true, "requires": { @@ -16866,11 +17046,15 @@ }, "ci-info": { "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "bundled": true, "dev": true }, "cidr-regex": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/cidr-regex/-/cidr-regex-3.1.1.tgz", + "integrity": "sha512-RBqYd32aDwbCMFJRL6wHOlDNYJsPNTt8vC82ErHF5vKt8QQzxm1FrkW8s/R5pVrXMf17sba09Uoy91PKiddAsw==", "bundled": true, "dev": true, "requires": { @@ -16886,6 +17070,8 @@ }, "cli-columns": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-4.0.0.tgz", + "integrity": "sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ==", "bundled": true, "dev": true, "requires": { @@ -16895,6 +17081,8 @@ }, "cli-table3": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "bundled": true, "dev": true, "requires": { @@ -16911,6 +17099,8 @@ }, "cmd-shim": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", + "integrity": "sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==", "bundled": true, "dev": true }, @@ -16940,6 +17130,8 @@ }, "columnify": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", + "integrity": "sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==", "bundled": true, "dev": true, "requires": { @@ -16970,11 +17162,15 @@ }, "cssesc": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "bundled": true, "dev": true }, "debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "bundled": true, "dev": true, "requires": { @@ -16983,8 +17179,6 @@ "dependencies": { "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "bundled": true, "dev": true } @@ -16992,6 +17186,8 @@ }, "defaults": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "bundled": true, "dev": true, "requires": { @@ -17012,6 +17208,8 @@ }, "diff": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "bundled": true, "dev": true }, @@ -17024,6 +17222,8 @@ }, "encoding": { "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "bundled": true, "dev": true, "optional": true, @@ -17047,16 +17247,22 @@ }, "event-target-shim": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "bundled": true, "dev": true }, "events": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "bundled": true, "dev": true }, "fastest-levenshtein": { "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "bundled": true, "dev": true }, @@ -17099,6 +17305,8 @@ }, "glob": { "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "bundled": true, "dev": true, "requires": { @@ -17150,6 +17358,8 @@ }, "hosted-git-info": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "bundled": true, "dev": true, "requires": { @@ -17158,11 +17368,15 @@ }, "http-cache-semantics": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "bundled": true, "dev": true }, "http-proxy-agent": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "bundled": true, "dev": true, "requires": { @@ -17173,6 +17387,8 @@ }, "https-proxy-agent": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "bundled": true, "dev": true, "requires": { @@ -17203,6 +17419,8 @@ }, "ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "bundled": true, "dev": true }, @@ -17230,8 +17448,6 @@ }, "infer-owner": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "bundled": true, "dev": true }, @@ -17255,11 +17471,15 @@ }, "ini": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", "bundled": true, "dev": true }, "init-package-json": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-5.0.0.tgz", + "integrity": "sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw==", "bundled": true, "dev": true, "requires": { @@ -17274,16 +17494,22 @@ }, "ip": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", "bundled": true, "dev": true }, "ip-regex": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", "bundled": true, "dev": true }, "is-cidr": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/is-cidr/-/is-cidr-4.0.2.tgz", + "integrity": "sha512-z4a1ENUajDbEl/Q6/pVBpTR1nBjjEE1X7qb7bmWYanNnPoKAvUCPFKeXV6Fe4mgTkWKBqiHIcwsI3SndiO5FeA==", "bundled": true, "dev": true, "requires": { @@ -17321,6 +17547,8 @@ }, "json-parse-even-better-errors": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "bundled": true, "dev": true }, @@ -17345,11 +17573,15 @@ }, "just-diff-apply": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", + "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", "bundled": true, "dev": true }, "libnpmaccess": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-7.0.2.tgz", + "integrity": "sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw==", "bundled": true, "dev": true, "requires": { @@ -17402,6 +17634,8 @@ }, "libnpmhook": { "version": "9.0.3", + "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-9.0.3.tgz", + "integrity": "sha512-wMZe58sI7KLhg0+nUWZW5KdMfjNNcOIIbkoP19BDHYoUF9El7eeUWkGNxUGzpHkPKiGoQ1z/v6CYin4deebeuw==", "bundled": true, "dev": true, "requires": { @@ -17446,6 +17680,8 @@ }, "libnpmsearch": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-6.0.2.tgz", + "integrity": "sha512-p+5BF19AvnVg8mcIQhy6yWhI6jHQRVMYaIaKeITEfYAffWsqbottA/WZdMtHL76hViC6SFM1WdclM1w5eAIa1g==", "bundled": true, "dev": true, "requires": { @@ -17454,6 +17690,8 @@ }, "libnpmteam": { "version": "5.0.3", + "resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-5.0.3.tgz", + "integrity": "sha512-7XOGhi45s+ml6TyrhJUTyrErcoDMKGKfEtiTEco4ofU7BGGAUOalVztKMVLLJgJOOXdIAIlzCHqkTXEuSiyCiA==", "bundled": true, "dev": true, "requires": { @@ -17463,6 +17701,8 @@ }, "libnpmversion": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/libnpmversion/-/libnpmversion-4.0.2.tgz", + "integrity": "sha512-n1X70mFHv8Piy4yos+MFWUARSkTbyV5cdsHScaIkuwYvRAF/s2VtYScDzWB4Oe8uNEuGNdjiRR1E/Dh1tMvv6g==", "bundled": true, "dev": true, "requires": { @@ -17475,6 +17715,8 @@ }, "lru-cache": { "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "bundled": true, "dev": true }, @@ -17502,6 +17744,8 @@ }, "minimatch": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", + "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", "bundled": true, "dev": true, "requires": { @@ -17662,11 +17906,15 @@ }, "mute-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", "bundled": true, "dev": true }, "negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "bundled": true, "dev": true }, @@ -17698,11 +17946,15 @@ }, "abbrev": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "bundled": true, "dev": true }, "are-we-there-yet": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "bundled": true, "dev": true, "requires": { @@ -17770,6 +18022,8 @@ }, "minimatch": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "bundled": true, "dev": true, "requires": { @@ -17780,8 +18034,6 @@ }, "fs-minipass": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "bundled": true, "dev": true, "requires": { @@ -17790,6 +18042,8 @@ }, "gauge": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "bundled": true, "dev": true, "requires": { @@ -17851,6 +18105,8 @@ }, "minipass": { "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "bundled": true, "dev": true, "requires": { @@ -17941,6 +18197,8 @@ }, "normalize-package-data": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "bundled": true, "dev": true, "requires": { @@ -17952,6 +18210,8 @@ }, "npm-audit-report": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-4.0.0.tgz", + "integrity": "sha512-k2o5476sLrp94b6Gl819YzlS7LAdb8lgE6yQCysBEji5E3WoUdRve6tiVMLKAPPdLfItU4kOSUycWS5HFTrbug==", "bundled": true, "dev": true, "requires": { @@ -17960,6 +18220,8 @@ }, "npm-bundled": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "bundled": true, "dev": true, "requires": { @@ -17981,6 +18243,8 @@ }, "npm-package-arg": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "bundled": true, "dev": true, "requires": { @@ -17992,6 +18256,8 @@ }, "npm-packlist": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "bundled": true, "dev": true, "requires": { @@ -18011,6 +18277,8 @@ }, "npm-profile": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-7.0.1.tgz", + "integrity": "sha512-VReArOY/fCx5dWL66cbJ2OMogTQAVVQA//8jjmjkarboki3V7UJ0XbGFW+khRwiAJFQjuH0Bqr/yF7Y5RZdkMQ==", "bundled": true, "dev": true, "requires": { @@ -18034,11 +18302,15 @@ }, "npm-user-validate": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-2.0.0.tgz", + "integrity": "sha512-sSWeqAYJ2dUPStJB+AEj0DyLRltr/f6YNcvCA7phkB8/RMLMnVsQ41GMwHo/ERZLYNDsyB2wPm7pZo1mqPOl7Q==", "bundled": true, "dev": true }, "npmlog": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-7.0.1.tgz", + "integrity": "sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg==", "bundled": true, "dev": true, "requires": { @@ -18121,11 +18393,15 @@ }, "proc-log": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "bundled": true, "dev": true }, "process": { "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "bundled": true, "dev": true }, @@ -18138,8 +18414,6 @@ }, "promise-call-limit": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz", - "integrity": "sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q==", "bundled": true, "dev": true }, @@ -18163,6 +18437,8 @@ }, "promzard": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.0.tgz", + "integrity": "sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==", "bundled": true, "dev": true, "requires": { @@ -18171,6 +18447,8 @@ }, "qrcode-terminal": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", "bundled": true, "dev": true }, @@ -18184,6 +18462,8 @@ }, "read-cmd-shim": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", + "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", "bundled": true, "dev": true }, @@ -18200,6 +18480,8 @@ }, "read-package-json-fast": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", "bundled": true, "dev": true, "requires": { @@ -18248,8 +18530,6 @@ }, "glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "bundled": true, "dev": true, "requires": { @@ -18315,6 +18595,8 @@ }, "signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "bundled": true, "dev": true }, @@ -18330,11 +18612,15 @@ }, "smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "bundled": true, "dev": true }, "socks": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "bundled": true, "dev": true, "requires": { @@ -18344,6 +18630,8 @@ }, "socks-proxy-agent": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "bundled": true, "dev": true, "requires": { @@ -18471,16 +18759,22 @@ }, "text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "bundled": true, "dev": true }, "tiny-relative-date": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz", + "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==", "bundled": true, "dev": true }, "treeverse": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", + "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", "bundled": true, "dev": true }, @@ -18495,6 +18789,8 @@ }, "unique-filename": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "bundled": true, "dev": true, "requires": { @@ -18503,6 +18799,8 @@ }, "unique-slug": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "bundled": true, "dev": true, "requires": { @@ -18529,6 +18827,8 @@ }, "validate-npm-package-name": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "bundled": true, "dev": true, "requires": { @@ -18537,8 +18837,6 @@ }, "walk-up-path": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", "bundled": true, "dev": true }, @@ -18562,6 +18860,8 @@ }, "wide-align": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "bundled": true, "dev": true, "requires": { diff --git a/package.json b/package.json index 72db6f750..b3dbe4b4d 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "gulp-sass": "^5.1.0", "gulp-shell": "^0.7.1", "gulp-yaml": "^2.0.4", - "igniteui-docfx-template": "3.6.0", + "igniteui-docfx-template": "3.7.5", "js-yaml": "^4.1.0", "mocha": "^10.2.0", "remark": "^13.0.0", diff --git a/src/ext/MarkdownTransformer.ts b/src/ext/MarkdownTransformer.ts index b86124528..66d95fe03 100644 --- a/src/ext/MarkdownTransformer.ts +++ b/src/ext/MarkdownTransformer.ts @@ -1087,6 +1087,10 @@ function transformSamples(options: any) { sample.alt = part.replace('alt=', "").split('"').join('').trim(); } + if (part.indexOf('img-src=') >= 0) { + sample.imgSrc = part.replace('img-src=', "").split('"').join('').trim(); + } + if (part.indexOf('height=') >= 0) { sample.height = part.replace('height=', "").split('"').join('').replace('px', "").trim(); } @@ -1135,6 +1139,9 @@ function transformSamples(options: any) { // generating var str = ''; str += '