Skip to content

Commit 1b9d257

Browse files
author
ROOT\kumaresan.subramani
committed
Gihub source updation for v16.4.0.52 service pack 1 release
1 parent 9c6209f commit 1b9d257

File tree

2,441 files changed

+285079
-3641
lines changed

Some content is hidden

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

2,441 files changed

+285079
-3641
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.npmrc
2+
.vscode/
3+
dist/
4+
node_modules/
5+
src/**/*.min.js
6+
src/**/*-plnkr.json
7+
src/common/search-index.js
8+
samples/*
9+
src/common/api-table
10+
src/common/api-table.json
11+
!src/common/api-table-generator.js
12+
!styles/highlight.css

README.md

Lines changed: 90 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,105 @@
1+
# JavaScript Sample Browser
12

3+
## Adding New Sample
24

3-
## Installing
5+
Create your new folder in 'src' location and name the folder as control name. Example: “button” or "list-view".
46

5-
To install all dependent packages, use the below command
7+
Add your sample order in the `src/common/sampleOrder.json` with corresponding category.
8+
9+
**Note:** Do not use whitespace at any cause in the folder’s name. Use “-” instead of space.
10+
11+
12+
### Configure the folder and sample
13+
14+
Create the “sample.json” file inside of your control folder. Create your sample html and js file in same folder also the html and js files should have the same names.
15+
16+
**Note:** Do not use whitespace at any cause in the file’s name. Use “-” instead of space.
17+
18+
19+
### Configure Sample JSON
20+
21+
Configure your sample json file as like below code snippet.
622

723
```
8-
npm install
24+
{
25+
"name": "Grid",
26+
"directory": "grid",
27+
"category": "Grid",
28+
"samples": [
29+
{ "url": "localdata", "name": "Local Data", "category": "Data Binding" },
30+
{ "url": "remotedata", "name": "Remote Data", "category": "Data Binding" },
31+
{ "url": "autowrap", "name": "AutoWrap Column Cells", "category": "Columns" },
32+
{ "url": "showhide", "name": "Show or Hide Column", "category": "Columns" }
33+
],
34+
"dataSourcePath": "src/grid/datasource.js"
35+
}
936
```
37+
**Note:** To exculde a sample in the device you need to set `hideOnDevice` as true for the sample json file.
38+
39+
**Fields Description:**
40+
41+
* _name :_ It can be any string that you want to show a component name.
42+
43+
* _directory :_ Specifies that your sample's directory name.
44+
45+
* _category :_ Specify that your sample comes under which category.
46+
47+
* _dataSourcePath :_ Specify that your data source file Path (Optional).
48+
49+
* _samples :_ Specify array of samples in your control.
50+
51+
* _samples.url :_ specifies the file name without extension.
52+
53+
* _samples.name :_ It can be any string that you want to show a sample name.
54+
55+
* _samples.category :_ Specify that your sample comes under which category.
56+
57+
58+
## Adding datasource components
1059

11-
## Building
60+
To add datasource file for the component, you need to include the `dataSourcePath` option which need to map the datasource file path in the component's sample.json.
1261

13-
To compile the source files, use the below command
62+
refer the below link for config
63+
64+
https://gitlab.syncfusion.com/essential-studio/ej2-javascript-samples/blob/7a32bea49aca215fdef1fe432e4135fa07ff3c83/src/grid/sample.json#L9
65+
66+
The sample datasource file need to store the json in window variable.
67+
68+
Each component's datasource window variable name must be unique.
69+
70+
For example datasource for grid must be stored as `window.gridData`.
71+
72+
Refer the below below datasource file for further reference
73+
74+
https://gitlab.syncfusion.com/essential-studio/ej2-javascript-samples/blob/19761f5590b4af5b2ea1cb90bed33d8dfa496de9/src/grid/datasource.js
75+
76+
**Note:** Each component should include one datasource file only.
77+
78+
## Run the sample browser
79+
80+
We can run the sample browser with two commands
81+
82+
1. **gulp _serve_** – run the sample browser alone.
83+
2. **gulp _watch_** – run the sample browser and monitor typescript as well. This will help at development time. If any changes detect means it will automatically compile and browser will reloaded.
1484

1585
```
16-
npm run build
86+
gulp serve
1787
```
1888

19-
## Running
2089

21-
To run the samples, use the below command
90+
**Access URLs:**
91+
92+
Local URL is works only in your machine.
2293

2394
```
24-
npm run serve
25-
```
95+
http://localhost:3000
96+
```
97+
98+
External URL is works in all locally connected LAN. (You can use to see sample browser in mobile).
99+
100+
```
101+
http://your-ip-address:3000
102+
```
103+
104+
**Note:** Here, The mentioned IP is your local machine IP Address.
105+

config.json

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,98 @@
11
{
2-
"htmllint": ["./src/**/*.html"],
3-
"json": ["./**/*.json"],
4-
"samplejson": ["./src/**/*sample.json"],
5-
"dedupe": ["./src/**/*.js"],
6-
"watchSample": ["./src/**/*.js"],
7-
"jshint": ["./src/**/*.js", "!./src/**/*.min.js", "!./src/common/samplelist.js", "!./src/common/api-table-generator.js","!./src/common/search-index.js"],
8-
"github": ["./src/**/*.{html,ts,json}", "./styles{,/**}", "./src/**/images{,/**}", "./src/common/lib{,/**}", "./src/common/cldr-data{,/**}", "./src/showcase{,/**}", "!./src/showcase/**/!(webpack.config)*.{js,json}", "!./styles/**/!(index)*.css", "./spec/**/*.ts", "./*.html", "./favicon.ico", "karma.conf.js", "package.json", "test-main.js", "tsconfig.json", "webpack.config.js", "!./googlec03dd4bc003151bc.html", "license"]
2+
"htmllint": [
3+
"./src/**/*.html"
4+
],
5+
"json": [
6+
"./**/*.json"
7+
],
8+
"samplejson": [
9+
"./src/**/*sample.json"
10+
],
11+
"dedupe": [],
12+
"watchSample": [
13+
"./src/**/*.js"
14+
],
15+
"jshint": [
16+
"./src/**/*.js",
17+
"!./src/common/lib/**/*.*",
18+
"!./src/**/*.min.js",
19+
"!./src/common/samplelist.js",
20+
"!./src/common/api-table-generator.js",
21+
"!./src/common/search-index.js"
22+
],
23+
"github": [
24+
"./src/**/*.{html,ts,json}",
25+
"./styles{,/**}",
26+
"./src/**/images{,/**}",
27+
"./src/common/lib{,/**}",
28+
"./src/common/cldr-data{,/**}",
29+
"./src/showcase{,/**}",
30+
"!./src/showcase/**/!(webpack.config)*.{js,json}",
31+
"!./styles/**/!(index)*.css",
32+
"./spec/**/*.ts",
33+
"./*.html",
34+
"./favicon.ico",
35+
"karma.conf.js",
36+
"package.json",
37+
"test-main.js",
38+
"tsconfig.json",
39+
"webpack.config.js",
40+
"!./googlec03dd4bc003151bc.html",
41+
"license"
42+
],
43+
"platform": "javascript",
44+
"customNames": [
45+
"toolbar",
46+
"ajax",
47+
"popup",
48+
"treeview",
49+
null,
50+
"textbox",
51+
"uploader",
52+
"preload",
53+
"api",
54+
"maskedtextbox",
55+
"numerictextbox",
56+
"dialog",
57+
"blog",
58+
"draggable",
59+
"swipeable",
60+
"inline",
61+
"datasource",
62+
"tooltip",
63+
"bpmn",
64+
"fishbone",
65+
"venn",
66+
"drilldown",
67+
"lineapenisular",
68+
"usa",
69+
"sparkline",
70+
"treemap",
71+
"bollinger",
72+
"100",
73+
"hilo",
74+
"doughnut",
75+
"custom",
76+
"code",
77+
"embedly",
78+
"image",
79+
"rtl",
80+
"tooltip-customization",
81+
"ajaxcontent",
82+
"html-template",
83+
"smartposition",
84+
"listview",
85+
"html",
86+
"customization",
87+
"virtualization",
88+
"datepicker",
89+
"daterangepicker",
90+
"datetimepicker",
91+
"timepicker",
92+
"gauge",
93+
"smithchart",
94+
"pareto",
95+
"checkbox",
96+
"uml"
97+
]
998
}

0 commit comments

Comments
 (0)