Skip to content

Commit 342803c

Browse files
author
ROOT\kumaresan.subramani
committed
Gihub source updation for v16.4.0.52 service pack 1 release
1 parent 1da15cc commit 342803c

File tree

1,400 files changed

+129638
-22053
lines changed

Some content is hidden

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

1,400 files changed

+129638
-22053
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.npmrc
2+
.vscode/
3+
public/
4+
node_modules/
5+
styles/**/*.css
6+
**/*.js
7+
!samples/**/*.js
8+
!src/common/lib/**
9+
units.html
10+
src/**/*-stack.json
11+
!src/sys.js
12+
src/common/api-table
13+
src/common/api-table.json
14+
!src/common/api-table-generator.js
15+
npm-debug.log

ReadMe.md

Lines changed: 129 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,149 @@
1+
# TypeScript Sample Browser
12

3+
Repository for typescript sample browser.
24

3-
## Installing
5+
## Adding New Sample
46

5-
To install all dependent packages, use the below command
7+
Create your new folder in 'src' location and name the folder as control name for example “button” it is control name.
8+
9+
Add your sample order in the `src/common/sampleOrder.json` with corresponding category.
10+
11+
Note: Do not use whitespace at any cause in folder’s name. Use “-” instead of space.
12+
13+
[Refer here](https://bitbucket.org/syncfusion/ej2-sample-browser/src/7740ab838973c7ebb3e970acb5246ff4c89ccd67/src/?at=master)
14+
15+
### Configure the folder and sample
16+
17+
Create the “sample.json” file inside of your control folder. Create your sample html and ts file in same folder also name the html and ts files with same name.
18+
19+
Note: Do not use whitespace at any cause in file’s name. Use “-” instead of space.
20+
21+
[Refer here](https://bitbucket.org/syncfusion/ej2-sample-browser/src/7740ab838973c7ebb3e970acb5246ff4c89ccd67/src/button/?at=master)
22+
23+
### Configure Sample JSON
24+
25+
Configure your sample json file as like below code snippet.
626

727
```
8-
npm install
28+
{
29+
"name": "Button",
30+
"directory": "button",
31+
"category":"Editors",
32+
"samples" : [
33+
{"url":"default", "name": "Default Functionalities", "category":"Button"},
34+
{"url":"api", "name": "API", "category":"Button"},
35+
{"url":"repeatbutton", "name": "Repeat Button", "category":"Button", hideOnDevice:true },
36+
{"url":"events", "name": "Events", "category":"Button"},
37+
{"url":"rtl", "name": "RTL", "category":"Button"}
38+
]
39+
}
40+
941
```
42+
*Note: To exculde a sample in the device you need to set **hideOnDevice** as true for the sample json file.*
43+
44+
**Fields Description:**
45+
46+
_name :_ Its can be any string that you want show as a control name.
47+
48+
_directory :_ Specifies that your sample directory name.
49+
50+
_category :_ Specify that your sample comes under which category.
51+
52+
_samples :_ Specify array of samples are in your control.
53+
54+
_samples.url :_ specifies the file name without extension.
55+
56+
_samples.name :_ Its can be any string that you want show as a sample name.
57+
58+
_samples.category :_ Specify that your sample comes under which category.
59+
60+
## Configure your dependency
1061

11-
## Building
62+
Add your dependency in “package.json” file inside the dependencies.
1263

13-
To compile the source files, use the below command
64+
Note: Here, `'*'` Specifies that install the latest published package form the online. `'*'` is recommended for Syncfusion packages.
1465

1566
```
16-
npm run build
67+
"dependencies": {
68+
"@syncfusion/ej2-base": "*",
69+
"@syncfusion/ej2-buttons": "*",
70+
"@syncfusion/ej2-lists": "*",
71+
"@syncfusion/ej2-grids": "*",
72+
"bootstrap": "^3.3.6",
73+
"crossroads": "^0.12.2",
74+
"hasher": "^1.2.0"
75+
},
76+
1777
```
1878

19-
## Testing
79+
## Run the sample browser
2080

21-
To test the source files, use the below command
81+
We can run the sample browser with two commands
82+
83+
1. **gulp _serve_** – run the sample browser alone.
84+
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.
2285

2386
```
24-
npm run test
87+
D:\dev\typescript\source\ej2-sample-browser>gulp serve
2588
```
2689

27-
## Running
2890

29-
To run the samples, use the below command
91+
**Access URLs:**
92+
93+
Local URL is works only in your machine.
94+
95+
```
96+
http://localhost:3000
97+
```
98+
99+
External URL is works in all locally connected LAN. (You can use to see sample browser in mobile).
30100

31101
```
32-
npm run serve
33-
```
102+
http://your-ip-address:3000
103+
```
104+
105+
Note: Here, The mentioned IP is your local machine IP Address.
106+
107+
# Plunker Guidelines
108+
109+
1. In import statements in html file for a sample the package subdirectory shouldn’t be mentioned. Please refer the link given below.
110+
111+
https://gitlab.syncfusion.com/essential-studio/ej2-samples/blob/development/src/grid/events.ts#L3
112+
113+
2. In Base component dom and util are not available in the customer end. So, please don’t use the same. Please refer the link below.
114+
115+
https://gitlab.syncfusion.com/essential-studio/ej2-samples/blob/development/src/grid/events.ts#L3
116+
117+
3. To add any icon in the samples use base64 font and don’t use any font files like ttf, woff, or svg externally. Please refer the link given below.
118+
119+
https://gitlab.syncfusion.com/essential-studio/ej2-samples/blob/development/src/toolbar/default.html#L5
120+
121+
For example:
122+
```
123+
<style>
124+
@font-face {
125+
font-family: 'temp1';
126+
src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj0gSIMAAAEoAAAAVmNtYXDnEOdVAAABiAAAADZnbHlmazsA9wAAAcgAAAAcaGVhZA3qwqgAAADQAAAANmhoZWEHmQNrAAAArAAAACRobXR4B+gAAAAAAYAAAAAIbG9jYQAOAAAAAAHAAAAABm1heHABDQAPAAABCAAAACBuYW1lv7gVOQAAAeQAAAINcG9zdD4ZCQ8AAAP0AAAANgABAAADUv9qAFoEAAAA//4D6gABAAAAAAAAAAAAAAAAAAAAAgABAAAAAQAAThBvMl8PPPUACwPoAAAAANVxP0wAAAAA1XE/TAAAAAAD6gMrAAAACAACAAAAAAAAAAEAAAACAAMAAQAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQP0AZAABQAAAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5wDnAANS/2oAWgNSAJYAAAABAAAAAAAABAAAAAPoAAAAAAACAAAAAwAAABQAAwABAAAAFAAEACIAAAAEAAQAAQAA5wD//wAA5wD//wAAAAEABAAAAAEAAAAAAAAADgAAAAEAAAAAA+oDKwACAAA3IQECA+j+DMICaQAAAAAAABIA3gABAAAAAAAAAAEAAAABAAAAAAABAAUAAQABAAAAAAACAAcABgABAAAAAAADAAUADQABAAAAAAAEAAUAEgABAAAAAAAFAAsAFwABAAAAAAAGAAUAIgABAAAAAAAKACwAJwABAAAAAAALABIAUwADAAEECQAAAAIAZQADAAEECQABAAoAZwADAAEECQACAA4AcQADAAEECQADAAoAfwADAAEECQAEAAoAiQADAAEECQAFABYAkwADAAEECQAGAAoAqQADAAEECQAKAFgAswADAAEECQALACQBCyB0ZW1wMVJlZ3VsYXJ0ZW1wMXRlbXAxVmVyc2lvbiAxLjB0ZW1wMUZvbnQgZ2VuZXJhdGVkIHVzaW5nIFN5bmNmdXNpb24gTWV0cm8gU3R1ZGlvd3d3LnN5bmNmdXNpb24uY29tACAAdABlAG0AcAAxAFIAZQBnAHUAbABhAHIAdABlAG0AcAAxAHQAZQBtAHAAMQBWAGUAcgBzAGkAbwBuACAAMQAuADAAdABlAG0AcAAxAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAHUAcwBpAG4AZwAgAFMAeQBuAGMAZgB1AHMAaQBvAG4AIABNAGUAdAByAG8AIABTAHQAdQBkAGkAbwB3AHcAdwAuAHMAeQBuAGMAZgB1AHMAaQBvAG4ALgBjAG8AbQAAAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBAgEDAAxhcnJvd2hlYWQtMDEAAAAA) format('truetype');
127+
font-weight: normal;
128+
font-style: normal;
129+
}
130+
#font::after {
131+
content: "\e700";
132+
font-size: large
133+
}
134+
.icon {
135+
font-family: temp1;
136+
}
137+
</style>
138+
<div id="font" class="icon"></div>
139+
```
140+
141+
4. For loading json files in the sample use import statements instead of require. Please refer the link given below.
142+
143+
https://gitlab.syncfusion.com/essential-studio/ej2-samples/blob/development/src/calendar/internationalization.ts#L9
144+
145+
( For example: import * as testJson from '../common/cldr-data/supplemental/numberingSystems.json'; )
146+
147+
5. If a New Component is added to TypeScript Sample Browser it’s package dependency should be added to the config in src/sys.js file.
148+
149+
( For example: https://gitlab.syncfusion.com/essential-studio/ej2-samples/blob/development/src/sys.js#L19 )

0 commit comments

Comments
 (0)