Skip to content

Commit be5bae3

Browse files
author
pipeline
committed
v23.1.36 is released
1 parent 4625904 commit be5bae3

File tree

804 files changed

+58220
-35720
lines changed

Some content is hidden

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

804 files changed

+58220
-35720
lines changed

README.md

Lines changed: 203 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,217 @@
1-
# Syncfusion React Component Demo Samples
1+
# React Sample Configuration
22

3-
Welcome to the demo samples repository for Syncfusion React components! This repository contains a collection of sample applications showcasing the usage of various Syncfusion components in a React environment.
3+
## Adding your sample folder
4+
Create new folder in 'src' location and name the folder as control name for example "grid” it is control name.
45

5-
## Prerequisites
6+
_Note: Do not use whitespace at any cause in folder’s name. Use “-” instead of space._
67

7-
- [Node.js](https://nodejs.org/en) - `v10.24.1`
8+
## Adding the sample
89

9-
## Run the samples
10+
Add the sample component tsx file in the sample folder.Below steps are need to be considered on sample creation
1011

11-
To run the sample applications locally, follow these steps
12+
* Sample component must extend the "SampleBase" component class from the path "src/common/sample-base" file.
13+
* Sample tag must be enclosed between the "control-section" div.
14+
* In all samples description is need to be added. Add sample description within the div tag with id as **description**.
1215

13-
1. Install the required dependencies using npm
16+
```javascript
17+
import * as ReactDOM from 'react-dom';
18+
import * as React from 'react';
19+
import { SampleBase } from '../common/sample-base';
20+
export class Default extends SampleBase<{}, {}> {
21+
22+
render() {
23+
return (
24+
<div className = 'control-pane'>
25+
<div className='control-section'>
26+
//sample component tags
27+
</div>
28+
<div id="description">
29+
// sample description
30+
</div>
31+
</div>
32+
)
33+
}
34+
}
1435

15-
```bash
36+
```
37+
Refer the [sample](https://github.com/syncfusion/ej2-react-samples/blob/master/src/grid/default.tsx) for example sample component.
38+
39+
Note: Do not use whitespace at any cause in file’s name. Use “-” instead of space.
40+
41+
## Adding property section
42+
To add the "propertypane” in the sample use tag `PropertyPane` from "common/property-pane" .Configure your sample properties as like below code snippet.
43+
44+
```
45+
<PropertyPane title='Properties'>
46+
<table id="property" title="Properties" className='property-panel-table' style={{ width: '100%' }}>
47+
<tr>
48+
<td style={{ width: '30%' }}>
49+
<div className="col-md-4" style={{ paddingTop: "8px" }}>
50+
GridLines
51+
</div>
52+
</td>
53+
<td style={{ width: '70%', paddingRight: '10px' }}>
54+
<div>
55+
<select id="ddl" name="ddl" onChange={this.change.bind(this)} className="form-control" style={{ padding: "6px" }} ref={d => this.dropElement = d}>
56+
<option value="default">Default</option>
57+
<option value="both">Both</option>
58+
<option value="none">None</option>
59+
<option value="horizontal">Horizontal</option>
60+
<option value="vertical">Vertical</option>
61+
</select>
62+
</div>
63+
</td>
64+
</tr>
65+
</table>
66+
</PropertyPane>
67+
68+
```
69+
Refer the [PropertyPanesample](https://github.com/syncfusion/ej2-react-samples/blob/master/src/grid/adaptive.tsx) for propertyPane example.
70+
71+
## Add Routing for your sample
72+
73+
Create the "config.tsx” file inside of your control folder.Configure your "config.tsx file" file as like below code snippet.
74+
75+
```
76+
export const GridSampleOrder:Object = [
77+
{ 'path': 'grid/default', 'component':'Default', 'name': 'Default Functionalities', 'order': '01', 'category': 'Grid' },
78+
{ 'path': 'grid/gridlines', 'component':'GridLines', 'name': 'GridLines', 'order': '01', 'category': 'Grid', hideOnDevice: true }
79+
]
80+
81+
```
82+
83+
**Fields Description:**
84+
85+
* _path :_ Specifies the sample router path. Path must be same as "sampleFolderName/sampleFileName".
86+
87+
* _component :_ Specifies the name of the sample component.
88+
89+
* _name :_ Specifies the sample name to be displayed.
90+
91+
* _order :_ Specifies the order in which sample to be displayed.
92+
93+
* _category :_ Specifies the sample category.
94+
95+
*Note: set **hideOnDevice** as true if you want to hide a sample in devices.*
96+
97+
## Configure Sample List
98+
99+
Add your samples in “samplelist.tsx” located in “/src/common” folder
100+
1. Import your sampleOrder array from the component config file.
101+
2. Add your samples in samplesList as Like below
102+
103+
```
104+
import * as React from 'react';
105+
import { GridSampleOrder } from '../grid/config';
106+
107+
export let samplesList: any = [
108+
109+
{
110+
'name': 'Grid', 'category': 'Grids', 'order': '02', 'path': 'grid', 'samples': GridSampleOrder
111+
}
112+
];
113+
```
114+
115+
## Adding your control dependency
116+
117+
Add your dependency in “package.json” file inside the dependencies.
118+
119+
Note: Here, '\*' Specifies that install the latest published package form the online. '\*' is recommended for Syncfusion packages.
120+
121+
```
122+
"dependencies": {
123+
"@syncfusion/ej2-react-grids": "*"
124+
},
125+
```
126+
# Using the samples
127+
128+
## Installing
129+
130+
Before installation check `@syncfusion:registry=http://nexus.syncfusion.com/repository/ej2-production/` is available in npmrc file. Then use the below command to install all dependent packages.
131+
132+
```
16133
npm install
17134
```
18135

19-
2. Start the development server using gulp
136+
## Build
137+
138+
Use `npm run build` command to compile the source files. It calls the following tasks synchronously,
139+
140+
1. SEO changes
141+
2. Build
142+
3. Styles ship
143+
4. Site-map generate.
144+
145+
### SEO changes
146+
147+
It will set meta data and description for the h1 tag to show our components first in search engine. Use the below command to run it individual.
20148

21-
```bash
22-
gulp serve
149+
```
150+
gulp SEO-changes
151+
```
152+
153+
### Build
154+
155+
Use the below command to generate scripts, styles, locale and sample lists.
156+
157+
```
158+
gulp build
159+
```
160+
It runs the following tasks synchronously,
161+
162+
1. Scripts
163+
2. Styles
164+
165+
#### **Scripts**
166+
167+
It compiles the Typescript files and use the below command to run this task.
168+
169+
```
170+
gulp scripts
171+
```
172+
173+
#### **Styles**
174+
175+
`gulp styles` command is used to compile default themes. It calls the following two tasks synchronously.
176+
177+
1. Default theme
178+
2. Compile styles
179+
180+
#### Default theme
181+
182+
Use the below command to generate default theme files.
183+
184+
```
185+
gulp default-theme
186+
```
187+
188+
#### Compile Styles
189+
It compiles the scss file to css file. To run this task use the below command,
190+
191+
```
192+
gulp compile-styles
193+
```
194+
195+
### Styles Shipping
196+
197+
It copies css files for themes from node_modules. Use the below command to run it individual.
198+
199+
```
200+
gulp styles-ship
23201
```
24202

25-
3. Open your web browser and navigate to the specified localhost address to view the samples.
203+
### Site map generation
26204

205+
The below command combines sample of all components and store it in sitemap-demos.xml file to index our components, samples, documents in search engine.
206+
207+
```
208+
gulp sitemap-generate
209+
```
210+
211+
## Running the Sample Browser
212+
213+
To run your sample browser you can use any of the following command.
214+
215+
```
216+
gulp serve
217+
```

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ gulp.task('build', gulp.series(function (done) {
159159
}));
160160

161161
gulp.task('react-build', gulp.series(function (done) {
162-
runSequence('create-locale','generate-router','styles','scripts','bundle','cssfile', done);
162+
runSequence('create-locale','generate-router','styles','scripts','bundle','plnkr-json','cssfile', done);
163163
}));
164164

165165
gulp.task('bundle', gulp.series(function () {

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
1414
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
1515
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
16-
})(window,document,'script','dataLayer','GTM-WLQL39J');</script>
16+
})(window,document,'script','dataLayer','GTM-W8WD8WN');</script>
1717
<!-- End Google Tag Manager -->
1818
<meta charset="UTF-8" />
1919
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -56,7 +56,7 @@
5656

5757
<body class='e-view'>
5858
<!-- Google Tag Manager (noscript) -->
59-
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WLQL39J"height="0"width="0"style="display:none;visibility:hidden"></iframe></noscript>
59+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8WD8WN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
6060
<!-- End Google Tag Manager (noscript) -->
6161
<div hidden id="sync-analytics" data-queue="EJ2 - React - Demos"></div>
6262
<aside id='left-sidebar'>

package.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-react-samples",
3-
"version": "22.1.34",
3+
"version": "23.1.36",
44
"description": "Examples of React UI Components",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",
@@ -42,28 +42,32 @@
4242
"@syncfusion/ej2-react-spreadsheet": "*",
4343
"@syncfusion/ej2-react-progressbar": "*",
4444
"@syncfusion/ej2-react-image-editor": "*",
45-
"@types/react": "^18.0.8",
46-
"@types/react-dom": "^18.0.3",
45+
"@types/react": "18.0.8",
46+
"@types/react-dom": "18.0.3",
4747
"@types/history": "4.7.7",
4848
"@types/react-router": "4.0.19",
4949
"@types/moment-timezone": "0.5.7",
5050
"fuse.js": "3.2.0",
51-
"gulp-typescript": "^5.0.1",
52-
"typescript": "^4.5.5",
53-
"moment-timezone": "0.5.13",
51+
"gulp-typescript": "5.0.1",
52+
"typescript": "4.5.5",
53+
"moment-timezone": "0.5.35",
5454
"@microsoft/signalr": "5.0.9",
55-
"react": "^18.1.0",
56-
"react-dom": "^18.1.0",
57-
"react-redux": "^5.0.5",
55+
"react": "18.1.0",
56+
"react-dom": "18.1.0",
57+
"react-redux": "5.0.5",
5858
"react-router": "4.3.1",
5959
"react-router-dom": "4.3.0",
60-
"@types/marked": "^0.3.0",
60+
"@types/marked": "0.3.0",
6161
"@types/codemirror": "0.0.56",
62-
"marked": "^0.3.19",
63-
"codemirror": "^5.65.12",
64-
"tributejs": "^3.7.3"
62+
"marked": "4.0.10",
63+
"codemirror": "5.65.12",
64+
"tributejs": "3.7.3"
6565
},
6666
"devDependencies": {
67+
"@types/react": "^15.0.24",
68+
"@types/react-dom": "^15.5.1",
69+
"@types/react-router": "^4.0.12",
70+
"@types/react-router-dom": "^4.0.5",
6771
"awesome-typescript-loader": "^3.1.3",
6872
"browser-sync": "^2.18.13",
6973
"css-loader": "^0.28.4",
@@ -73,6 +77,7 @@
7377
"graceful-fs": "^4.2.4",
7478
"gulp": "^4.0.2",
7579
"gulp-sass": "^3.1.0",
80+
"gulp-typescript": "3.1.6",
7681
"gulp-webpack": "^1.5.0",
7782
"gulp4-run-sequence": "^1.0.1",
7883
"postcss-loader": "2.0.8",
@@ -82,6 +87,7 @@
8287
"shelljs": "*",
8388
"source-map-loader": "^0.2.1",
8489
"style-loader": "^0.18.2",
90+
"typescript": "2.3.4",
8591
"webpack": "^4.41.5"
8692
},
8793
"scripts": {

sampleName.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,8 @@
871871
"Samples": {
872872
"default":"Default Functionalities",
873873
"simplified": "Simplified Mode",
874-
"resize": "Ribbon Resizing"
874+
"resize": "Ribbon Resizing",
875+
"backstage": "Ribbon Backstage"
875876
}
876877
},
877878
"rich-text-editor": {

src/appbar/config.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
export const AppBarSampleOrder: Object = [
2-
{ 'path': 'appbar/default', 'component': 'Default', 'name': 'Default Functionalities', 'description': 'This sample demonstrates the default functionalities of the Syncfusion React AppBar component platform.', 'order': '01', 'category': 'AppBar', 'api': '{ "AppBar":["mode", "colorMode"] }' },
3-
{ 'path': 'appbar/color', 'component': 'Color', 'name': 'Color', 'description': 'This sample demonstrates the available bar color modes in the Syncfusion React AppBar component platform.', 'order': '01', 'category': 'AppBar', 'api': '{ "AppBar":["colorMode"] }' }
2+
{
3+
'path': 'appbar/default', 'component': 'Default', 'name': 'Default Functionalities', 'description': 'This sample demonstrates the default functionalities of the Syncfusion React AppBar component platform.', 'order': '01', 'category': 'AppBar', 'api': '{ "AppBar":["mode", "colorMode"] }',
4+
'sourceFiles': [
5+
{ 'displayName': 'default.tsx', 'path': 'src/appbar/default.tsx' },
6+
{ 'displayName': 'default.jsx', 'path': 'src/appbar/default.jsx' },
7+
{ 'displayName': 'default.css', 'path': 'src/appbar/default.css' }
8+
]
9+
},
10+
{
11+
'path': 'appbar/color', 'component': 'Color', 'name': 'Color', 'description': 'This sample demonstrates the available bar color modes in the Syncfusion React AppBar component platform.', 'order': '01', 'category': 'AppBar', 'api': '{ "AppBar":["colorMode"] }',
12+
'sourceFiles': [
13+
{ 'displayName': 'color.tsx', 'path': 'src/appbar/color.tsx' },
14+
{ 'displayName': 'color.jsx', 'path': 'src/appbar/color.jsx' },
15+
{ 'displayName': 'color.css', 'path': 'src/appbar/color.css' }
16+
]
17+
}
418
]

0 commit comments

Comments
 (0)