Skip to content

Commit 47f2286

Browse files
Adding custom search sample
1 parent 0d865f9 commit 47f2286

20 files changed

+470
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

angular.json

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"syncfusion-pivot-search": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:class": {
10+
"skipTests": true
11+
},
12+
"@schematics/angular:component": {
13+
"skipTests": true
14+
},
15+
"@schematics/angular:directive": {
16+
"skipTests": true
17+
},
18+
"@schematics/angular:guard": {
19+
"skipTests": true
20+
},
21+
"@schematics/angular:interceptor": {
22+
"skipTests": true
23+
},
24+
"@schematics/angular:pipe": {
25+
"skipTests": true
26+
},
27+
"@schematics/angular:resolver": {
28+
"skipTests": true
29+
},
30+
"@schematics/angular:service": {
31+
"skipTests": true
32+
}
33+
},
34+
"root": "",
35+
"sourceRoot": "src",
36+
"prefix": "app",
37+
"architect": {
38+
39+
"build": {
40+
41+
"builder": "@angular-devkit/build-angular:application",
42+
"options": {
43+
"outputPath": "dist/syncfusion-pivot-search",
44+
"index": "src/index.html",
45+
"browser": "src/main.ts",
46+
"polyfills": [
47+
"zone.js"
48+
],
49+
"tsConfig": "tsconfig.app.json",
50+
"assets": [
51+
{
52+
"glob": "**/*",
53+
"input": "public"
54+
}
55+
],
56+
"styles": [
57+
"node_modules/@syncfusion/ej2/material.css",
58+
"src/styles.css"
59+
],
60+
"scripts": []
61+
},
62+
"configurations": {
63+
"production": {
64+
"budgets": [
65+
{
66+
"type": "initial",
67+
"maximumWarning": "500kB",
68+
"maximumError": "1MB"
69+
},
70+
{
71+
"type": "anyComponentStyle",
72+
"maximumWarning": "2kB",
73+
"maximumError": "4kB"
74+
}
75+
],
76+
"outputHashing": "all"
77+
},
78+
"development": {
79+
"optimization": false,
80+
"extractLicenses": false,
81+
"sourceMap": true
82+
}
83+
},
84+
"defaultConfiguration": "production"
85+
},
86+
"serve": {
87+
"builder": "@angular-devkit/build-angular:dev-server",
88+
"configurations": {
89+
"production": {
90+
"buildTarget": "syncfusion-pivot-search:build:production"
91+
},
92+
"development": {
93+
"buildTarget": "syncfusion-pivot-search:build:development"
94+
}
95+
},
96+
"defaultConfiguration": "development"
97+
},
98+
"extract-i18n": {
99+
"builder": "@angular-devkit/build-angular:extract-i18n"
100+
},
101+
"test": {
102+
"builder": "@angular-devkit/build-angular:karma",
103+
"options": {
104+
"polyfills": [
105+
"zone.js",
106+
"zone.js/testing"
107+
],
108+
"tsConfig": "tsconfig.spec.json",
109+
"assets": [
110+
{
111+
"glob": "**/*",
112+
"input": "public"
113+
}
114+
],
115+
"styles": [
116+
"src/styles.css"
117+
],
118+
"scripts": []
119+
}
120+
}
121+
}
122+
}
123+
},
124+
"cli": {
125+
"analytics": "de739796-0e24-4701-a977-fb4dbfe279cd"
126+
}
127+
}

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "syncfusion-pivot-search",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
9+
"test": "ng test"
10+
},
11+
"private": true,
12+
"dependencies": {
13+
"@angular/animations": "^18.2.0",
14+
"@angular/common": "^18.2.0",
15+
"@angular/compiler": "^18.2.0",
16+
"@angular/core": "^18.2.0",
17+
"@angular/forms": "^18.2.0",
18+
"@angular/platform-browser": "^18.2.0",
19+
"@angular/platform-browser-dynamic": "^18.2.0",
20+
"@angular/router": "^18.2.0",
21+
"@syncfusion/ej2": "^28.2.11",
22+
"@syncfusion/ej2-angular-pivotview": "^28.2.11",
23+
"@syncfusion/ej2-angular-dropdowns": "^28.2.11",
24+
"rxjs": "~7.8.0",
25+
"tslib": "^2.3.0",
26+
"zone.js": "~0.14.10"
27+
},
28+
"devDependencies": {
29+
"@angular-devkit/build-angular": "^18.2.14",
30+
"@angular/cli": "^18.2.14",
31+
"@angular/compiler-cli": "^18.2.0",
32+
"@types/jasmine": "~5.1.0",
33+
"jasmine-core": "~5.2.0",
34+
"karma": "~6.4.0",
35+
"karma-chrome-launcher": "~3.2.0",
36+
"karma-coverage": "~2.2.0",
37+
"karma-jasmine": "~5.1.0",
38+
"karma-jasmine-html-reporter": "~2.1.0",
39+
"typescript": "~5.5.2"
40+
}
41+
}

public/favicon.ico

14.7 KB
Binary file not shown.

src/app/app.component.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
h2 {
2+
font-family: Arial, sans-serif;
3+
color: #333;
4+
}
5+
6+
input {
7+
border: 1px solid #ccc;
8+
border-radius: 4px;
9+
font-size: 14px;
10+
}
11+

src/app/app.component.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div style="padding: 20px;">
2+
<h2>Custom Search in Syncfusion Pivot Table</h2>
3+
4+
<!-- Search Input -->
5+
<div style="margin-bottom: 20px;">
6+
<input
7+
type="text"
8+
[(ngModel)]="searchTerm"
9+
(input)="applySearch()"
10+
placeholder="Search by Country (e.g., United)"
11+
style="padding: 8px; width: 300px;"
12+
/>
13+
</div>
14+
15+
<!-- Pivot Table -->
16+
<ejs-pivotview
17+
#pivotview
18+
[dataSourceSettings]="dataSourceSettings"
19+
height="350"
20+
width="100%">
21+
</ejs-pivotview>
22+
</div>

0 commit comments

Comments
 (0)