Skip to content

Commit c54aa8a

Browse files
author
pipeline
committed
v19.1.54 is released
1 parent 7e94ce8 commit c54aa8a

File tree

159 files changed

+5649
-382378
lines changed

Some content is hidden

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

159 files changed

+5649
-382378
lines changed

ReadMe.md

Lines changed: 118 additions & 383 deletions
Large diffs are not rendered by default.

config.json

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"tslint": [
3+
"./src/**/*.ts",
4+
"!./src/**/*.d.ts",
5+
"!./src/common/sampleList.ts",
6+
"!./spec/samplebrowser.spec.ts",
7+
"!./src/maps/MapData/*.ts",
8+
"!./src/common/sampleList.ts",
9+
"!./src/common/locale-string.ts",
10+
"./spec/**/*.ts"
11+
],
12+
"htmllint": [
13+
"./src/**/*.html"
14+
],
15+
"json": [
16+
"./**/*.json"
17+
],
18+
"styles": [
19+
"./styles/**/*.scss"
20+
],
21+
"sasslint": [
22+
"./styles/**/*.scss"
23+
],
24+
"samplejson": [
25+
"./src/**/*sample.json"
26+
],
27+
"watchTs": [
28+
"./src/**/*.ts",
29+
"./spec/**/*.ts"
30+
],
31+
"ts": [
32+
"./src/**/*.ts",
33+
"./spec/**/*.ts"
34+
],
35+
"dedupe": [
36+
"./src/**/*.ts"
37+
],
38+
"styleDependency": [
39+
"ej2"
40+
],
41+
"github": [
42+
"./src/**/*.{html,ts,json}",
43+
"./styles{,/**}",
44+
"./src/**/images{,/**}",
45+
"./src/common/lib{,/**}",
46+
"./src/common/cldr-data{,/**}",
47+
"./src/showcase{,/**}",
48+
"!./src/showcase/**/!(webpack.config)*.{js,json}",
49+
"!./styles/**/!(index)*.css",
50+
"./spec/**/*.ts",
51+
"./*.html",
52+
"./favicon.ico",
53+
"karma.conf.js",
54+
"package.json",
55+
"test-main.js",
56+
"tsconfig.json",
57+
"webpack.config.js",
58+
"!./googlec03dd4bc003151bc.html",
59+
"license"
60+
],
61+
"cssComponent": [
62+
"card",
63+
"avatar",
64+
"badge"
65+
],
66+
"platform": "typescript",
67+
"customNames": [
68+
"textbox",
69+
"uploader",
70+
"preload",
71+
"toolbar",
72+
"ajax",
73+
"popup",
74+
"treeview",
75+
null,
76+
"api",
77+
"maskedtextbox",
78+
"numerictextbox",
79+
"dialog",
80+
"blog",
81+
"draggable",
82+
"swipeable",
83+
"heatmap",
84+
"json",
85+
"tooltip",
86+
"datasource",
87+
"timeline",
88+
"inline",
89+
"drilldown",
90+
"sparkline",
91+
"treemap",
92+
"gauge",
93+
"bpmn",
94+
"fishbone",
95+
"venn",
96+
"custom",
97+
"code",
98+
"embedly",
99+
"image",
100+
"checkbox",
101+
"virtualization",
102+
"newsData",
103+
"tooltip-customization",
104+
"html-template",
105+
"listview",
106+
"customization",
107+
"html",
108+
"datepicker",
109+
"daterangepicker",
110+
"datetimepicker",
111+
"timepicker",
112+
"pareto",
113+
"bollinger",
114+
"doughnut",
115+
"hilo-open-close",
116+
"hilo",
117+
"stacked",
118+
"100",
119+
"iframe",
120+
"html5",
121+
"form",
122+
"validator",
123+
"lineapeninsular",
124+
"econmics",
125+
"Inplace Editor",
126+
"inplace-editor",
127+
"dropdowns",
128+
"skipChunk",
129+
"toast_sound",
130+
"pdf",
131+
"aspnet",
132+
"aspnetmvc",
133+
"javascript",
134+
"rtl",
135+
"rtl-data",
136+
"resizable",
137+
"fileexplorer",
138+
"filemanager",
139+
"kanban",
140+
"olap",
141+
"swimlane",
142+
"template",
143+
"wip",
144+
"validation",
145+
"editing",
146+
"progressbar"
147+
]
148+
}

debug.log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[0317/111950:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004
2+
[0317/111950:ERROR:node_debugger.cc(86)] Cannot start debugger server

error.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

googlec03dd4bc003151bc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-site-verification: googlec03dd4bc003151bc.html

gulpfile.js

Lines changed: 178 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ var path = require('path');
55
var shelljs = global.shelljs || require('shelljs');
66
var webpackGulp = require('webpack-stream');
77
var webpack = require('webpack');
8+
var platform = 'typescript';
9+
var sampleList;
10+
var commonConfig = require('./config.json');
811

912
gulp.task('scripts', function (done) {
1013
var ts = require('gulp-typescript');
@@ -55,8 +58,182 @@ gulp.task('whole-bundle', function (done) {
5558

5659
gulp.task('build', function(done){
5760
var runSequence = require('run-sequence');
58-
runSequence('scripts', 'whole-bundle', done);
61+
runSequence('create-locale', 'scripts', 'whole-bundle', done);
5962
})
63+
var jsoncombine = require('gulp-jsoncombine');
64+
var elasticlunr = require('elasticlunr');
65+
var sampleOrder = '';
66+
var sampleList;
67+
68+
gulp.task('combine-samplelists', function (done) {
69+
combineSampleList(platform, false, done);
70+
});
71+
72+
function combineSampleList(platform, done) {
73+
var filename = platform === 'javascript' ? 'samplelist.js' : 'sampleList.ts';
74+
sampleOrder = JSON.parse(fs.readFileSync(`./src/common/sampleOrder.json`));
75+
var sampleListPath = `./src/common/`;
76+
if (sampleList && sampleList.length) {
77+
var controls = getControls();
78+
sampleOrder = getSampleOrder(controls);
79+
}
80+
return gulp.src(commonConfig.samplejson)
81+
.pipe(jsoncombine(`${filename}`, function (data) {
82+
var result = [];
83+
var subCategory = [];
84+
var intId = 0;
85+
var curDirectory = '';
86+
var addUID = function (pid, dt) {
87+
for (var i = 0; i < dt.length; i++) {
88+
dt[i].uid = pid + i;
89+
if (dt[i].hasOwnProperty('samples')) {
90+
curDirectory = dt[i].directory;
91+
subCategory = [];
92+
addUID('00' + intId + i, dt[i].samples);
93+
intId++;
94+
} else {
95+
var index = subCategory.indexOf(dt[i].category);
96+
if (index !== -1) {
97+
dt[i].order = index;
98+
} else {
99+
subCategory.push(dt[i].category);
100+
dt[i].order = subCategory.length - 1;
101+
}
102+
}
103+
}
104+
};
105+
var orderKeys = Object.keys(sampleOrder);
106+
for (var i = 0; i < orderKeys.length; i++) {
107+
console.log('Category : ' + orderKeys[i]);
108+
var components = sampleOrder[orderKeys[i]];
109+
for (var j = 0; j < components.length; j++) {
110+
console.log('Component : ' + components[j]);
111+
var currentData = getSamples(data, components[j]);
112+
currentData.order = i;
113+
result.push(currentData);
114+
}
115+
}
116+
addUID('0', result);
117+
generateSearchIndex(result, sampleListPath, platform);
118+
var configProps = JSON.parse(fs.readFileSync('./config.json', 'utf8'));
119+
var commonChunkSkip = configProps.cssComponent || [];
120+
var sList = `${platform === 'javascript' ?
121+
'window.samplesList =' : 'export let samplesList : any ='}` + JSON.stringify(result) + ';\n\n' +
122+
`${platform === 'typescript' ? `\n\n export let skipCommonChunk: string[] = ${JSON.stringify(commonChunkSkip)};` : ''}`;
123+
return new Buffer(sList);
124+
125+
}))
126+
.pipe(gulp.dest(sampleListPath))
127+
.on('error', function (e) {
128+
done(e);
129+
process.exit(1);
130+
});
131+
}
132+
133+
function getSamples(data, component) {
134+
var dataList = Object.keys(data);
135+
for (var i = 0; i < dataList.length; i++) {
136+
var currentData = data[dataList[i]];
137+
if (component === currentData.name) {
138+
return currentData;
139+
}
140+
}
141+
}
142+
143+
function generateSearchIndex(sampleArray, samplelistpath, platform) {
144+
var searchindexpath = platform === 'javascript' ? `${samplelistpath}search-index.js` :
145+
`${samplelistpath}search-index.json`;
146+
elasticlunr.clearStopWords();
147+
var instance = elasticlunr(function () {
148+
this.addField('component');
149+
this.addField('name');
150+
this.setRef('uid');
151+
});
152+
for (let sampleCollection of sampleArray) {
153+
var component = sampleCollection.name;
154+
var directory = sampleCollection.directory;
155+
var puid = sampleCollection.uid;
156+
var hideOnDevice = sampleCollection.hideOnDevice;
157+
for (let sample of sampleCollection.samples) {
158+
sample.component = component;
159+
sample.dir = directory;
160+
sample.parentId = puid;
161+
sample.hideOnDevice = hideOnDevice;
162+
instance.addDoc(sample);
163+
}
164+
}
165+
fs.writeFileSync(searchindexpath, `${platform === 'javascript' ? 'window.searchIndex =' : ''}` + JSON.stringify(instance.toJSON()));
166+
}
167+
168+
gulp.task('create-locale', function (done) {
169+
createLocale(platform, done);
170+
});
171+
172+
function createLocale(platform, done) {
173+
var fileExt = platform === 'javascript' ? '.js' : '.ts';
174+
var localePath = `${platform === 'javascript' ? `./dist` : `./src/common`}`;
175+
if (!fs.existsSync(localePath)) {
176+
shelljs.mkdir('-p', localePath);
177+
}
178+
var localeJson = glob.sync('./src/**/locale.json', {
179+
silent: true
180+
});
181+
if (localeJson.length) {
182+
// baseUtil;
183+
var obj = {};
184+
for (var i = 0; i < localeJson.length; i++) {
185+
var compentLocale = JSON.parse(fs.readFileSync(localeJson[i]));
186+
obj = extend({}, obj, compentLocale, true);
187+
}
188+
fs.writeFileSync(`${localePath}/locale-string${fileExt}`,
189+
`${platform === 'javascript' ? 'window.Locale=' : 'export let Locale: Object='}` + JSON.stringify(obj) + ';');
190+
done();
191+
} else {
192+
fs.writeFileSync(`${localePath}/locale-string${fileExt}`,
193+
`${platform === 'javascript' ? 'window.Locale=' : 'export let Locale: Object={}'}`);
194+
done();
195+
}
196+
}
197+
198+
function extend(copied, first, second, deep) {
199+
var result = copied || {};
200+
var length = arguments.length;
201+
if (deep) {
202+
length = length - 1;
203+
}
204+
var _loop_1 = function (i) {
205+
if (!arguments_1[i]) {
206+
return 'continue';
207+
}
208+
var obj1 = arguments_1[i];
209+
Object.keys(obj1).forEach(function (key) {
210+
var src = result[key];
211+
var copy = obj1[key];
212+
var clone;
213+
if (deep && isObject(copy)) {
214+
clone = isObject(src) ? src : {};
215+
result[key] = extend({}, clone, copy, true);
216+
}
217+
else {
218+
result[key] = copy;
219+
}
220+
});
221+
};
222+
var arguments_1 = arguments;
223+
for (var i = 1; i < length; i++) {
224+
_loop_1(i);
225+
}
226+
return result;
227+
}
228+
229+
function isObject(obj) {
230+
var objCon = {};
231+
return (!isNullOrUndefined(obj) && obj.constructor === objCon.constructor);
232+
}
233+
234+
function isNullOrUndefined(value) {
235+
return value === undefined || value === null;
236+
}
60237

61238
gulp.task('serve', ['build'], function (done) {
62239
var browserSync = require('browser-sync');
@@ -69,5 +246,3 @@ gulp.task('serve', ['build'], function (done) {
69246
};
70247
bs.init(options, done);
71248
});
72-
73-

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<link href="src/common/lib/content/bootstrap.min.css" rel="stylesheet" />
2222
<link href="src/common/lib/highlightjs/styles/default.css" rel="stylesheet" />
2323
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet"></link>
24-
<style rel="stylesheet" id="themelink"></style>
24+
<!-- Theme Reference -->
25+
<link id="themelink" href="styles/material.css" rel="stylesheet" />
2526
<link href="styles/index.css" rel="stylesheet" />
2627
<link href="src/common/lib/content/codemirror.css" rel="stylesheet"></link>
2728
<script src="src/skipChunk.js" type="text/javascript"></script>
@@ -153,7 +154,7 @@
153154
<span class='sb-download-text'>FREE TRIAL</span>
154155
</button>
155156
</a>
156-
<a href='https://www.npmjs.com/search?q=ej2-typescript' target="_blank">
157+
<a href='https://www.npmjs.com/search?q=ej2-typescript' target="_blank" style=" display: none; ">
157158
<button class='sb-npm-btn'>
158159
<img class="npm-svg" src="styles/images/NPM.svg" alt="npm icon"><span class="doc-npm-link">Install NPM</span>
159160
</button>

0 commit comments

Comments
 (0)