Skip to content

Commit 1742280

Browse files
author
pipeline
committed
v27.1.48 is released
1 parent 6edc86f commit 1742280

File tree

2,219 files changed

+34159
-11327
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,219 files changed

+34159
-11327
lines changed

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"styleDependency": ["ej2"],
66
"github": ["/source/**/*.{css,ts,html,json}", "!/source/**/*.{d.ts,ngfactory.ts,ngstyle.ts,ngsummary.json}", "./styles/images{,/**}", "./styles/{index.css,highlight.css}", "./styles/*.scss", "./dist/zone.min.js", "/source/**/images{,/**}", "/source/common/cldr-data{,/**}", "./index.html", "./favicon.ico", "package.json", "tsconfig-aot.json", "webpack.config.js", "license"],
77
"publishSamples": ["./output/**/*.*"],
8-
"releaseVersion": "26.1.35",
8+
"releaseVersion": "27.1.48",
99
"platform": "angular",
1010
"customNames": [
1111
"listview",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ej2-angular-samples",
3-
"version": "26.1.35",
3+
"version": "27.1.48",
44
"private": true,
55
"dependencies": {
66
"@angular/animations": "17.1.2",
@@ -49,6 +49,7 @@
4949
"@syncfusion/ej2-angular-treegrid": "*",
5050
"@syncfusion/ej2-angular-treemap": "*",
5151
"@syncfusion/ej2-angular-image-editor": "*",
52+
"@syncfusion/ej2-angular-interactive-chat": "*",
5253
"marked": "4.0.10",
5354
"rxjs": "7.8.0"
5455
},

sampleOrder.json

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,15 @@
794794
"api": "API"
795795
}
796796
},
797+
"ai-assistview": {
798+
"ControlName": "AI AssistView",
799+
"Samples": {
800+
"default": "Default Functionalities",
801+
"custom-views": "Custom Views",
802+
"template": "Template",
803+
"dialog": "Dialog"
804+
}
805+
},
797806
"pager": {
798807
"ControlName": "Pager",
799808
"Samples": {
@@ -805,12 +814,22 @@
805814
"pdfviewer": {
806815
"ControlName": "PDF Viewer",
807816
"Samples": {
808-
"default": "Default functionalities",
817+
"default": "Default",
818+
"read-only": "Read-Only",
819+
"document-list": "Document List",
820+
"multi-format-viewer": "Multi-Format Viewer",
821+
"organize-pdf": "Organize Pages",
822+
"redaction": "Redaction",
809823
"custom-toolbar": "Custom Toolbar",
824+
"custom-context-menu":"Context Menu",
810825
"right-to-left": "Right To Left",
811826
"form-filling": "Form Filling",
827+
"form-designer": "Form Designer",
828+
"esigning-form-designer": "eSigning Form Designer",
829+
"esigning-pdf-forms": "eSigning PDF Forms",
830+
"annotations": "Annotations",
812831
"hand-written": "Handwritten Signature",
813-
"form-designer": "Form Designer"
832+
"invisible-signature": "Invisible Signature"
814833
}
815834
},
816835
"pivot-table": {
@@ -931,13 +950,19 @@
931950
"types": "Type",
932951
"insert-emoticons": "Insert Emoticons",
933952
"insert-special-charcters": "Insert Special Characters",
934-
"markdown-editor": "Overview",
935-
"markdown-editor-preview": "Preview",
936-
"markdown-editor-custom-format": "Custom Format",
937953
"reactive-form": "Reactive Form",
938954
"template-driven": "Template Driven"
939955
}
940956
},
957+
"mark-down-editor": {
958+
"ControllerName": "Markdown Editor",
959+
"Samples":{
960+
"overview": "Overview",
961+
"default-functionalities": "Default Functionalities",
962+
"custom-format": "Custom Format",
963+
"mention-integration": "Mention Integration"
964+
}
965+
},
941966
"schedule": {
942967
"ControlName": "Scheduler",
943968
"Samples": {
@@ -1096,10 +1121,21 @@
10961121
"Samples": {
10971122
"default": "Default Functionalities",
10981123
"formula": "Formula",
1124+
"protect-sheet": "Protect Sheet",
1125+
"freeze-panes": "Freeze Panes",
1126+
"data-validation": "Data Validation",
1127+
"hyperlink": "Hyperlink",
10991128
"cell-data-binding": "Cell Data Binding",
11001129
"remote-data-binding": "Remote Data Binding",
11011130
"cell-formatting": "Cell Formatting",
1102-
"number-formatting": "Number Formatting"
1131+
"number-formatting": "Number Formatting",
1132+
"conditional-formatting": "Conditional Formatting",
1133+
"sorting-and-filtering": "Sorting and Filtering",
1134+
"chart": "Chart",
1135+
"image": "Image",
1136+
"cell-template": "Cell Template",
1137+
"note": "Note",
1138+
"print": "Print"
11031139
}
11041140
},
11051141
"stock-chart": {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule, ModuleWithProviders, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2+
import { RouterModule } from '@angular/router';
3+
4+
import { BrowserModule } from '@angular/platform-browser';
5+
import { AIAssistDefaultComponent } from './default.component';
6+
import { AIAssistCustomViewsComponent } from './custom-views.component';
7+
import { AIAssistDialogComponent } from './dialog.component';
8+
import { AIAssistTemplateComponent } from './template.component';
9+
10+
export const aiassistviewAppRoutes: Object[] = [
11+
{ path: ':theme/ai-assistview/default', component: AIAssistDefaultComponent, name: 'Default Functionalities', description: 'Showcases the default combinations of the AiAssistView component.', category: 'AI AssistView', order: '01' },
12+
{ path: ':theme/ai-assistview/custom-views', component: AIAssistCustomViewsComponent, name: 'Custom Views', description: 'Showcases the views combinations of the AiAssistView component.', category: 'AI AssistView', order: '01' },
13+
{ path: ':theme/ai-assistview/template', component: AIAssistTemplateComponent, name: 'Template', description: 'Showcases the template properties of the AiAssistView component.', category: 'AI AssistView', order: '01' },
14+
{ path: ':theme/ai-assistview/dialog', component: AIAssistDialogComponent, name: 'Dialog', description: 'Showcases the default combinations of the AiAssistView component views.', category: 'Integration', order: '02' }
15+
];
16+
17+
export const AIAssistSampleModule: ModuleWithProviders<any> = RouterModule.forChild(aiassistviewAppRoutes);
18+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
.views-aiassistview {
3+
width: max(50%, 500px);
4+
margin: 30px auto;
5+
}
6+
7+
.views-aiassistview .view-container {
8+
margin: 20px auto;
9+
width: 80%;
10+
}
11+
12+
.views-aiassistview .view-container:not(.response-view) {
13+
display: flex;
14+
flex-direction: column;
15+
gap: 15px;
16+
}
17+
18+
.views-aiassistview .view-container .generate-btn,
19+
.views-aiassistview .view-container .suggestions li {
20+
width: fit-content;
21+
}
22+
23+
.views-aiassistview .view-container .suggestions {
24+
list-style-type: none;
25+
padding: 0;
26+
margin: 0;
27+
}
28+
29+
.views-aiassistview .view-container .suggestions li {
30+
padding: 5px 10px;
31+
margin-top: 10px;
32+
cursor: pointer;
33+
}
34+
35+
.views-aiassistview .response-view {
36+
flex-direction: column-reverse;
37+
max-height: 450px;
38+
}
39+
40+
.views-aiassistview .view-container .responseItemContent {
41+
padding: 10px 10px;
42+
margin-top: 10px;
43+
display: flex;
44+
gap: 10px;
45+
font-size: 14px;
46+
line-height: 28px;
47+
}
48+
49+
.views-aiassistview .view-container .responseItemContent .response-header {
50+
font-style: italic;
51+
}
52+
53+
.views-aiassistview .view-container .responseItemContent span {
54+
font-size: 20px;
55+
margin-top: 3px;
56+
}
57+
58+
.views-aiassistview .view-container .responseItemContent:hover {
59+
background: none;
60+
}
61+
62+
.views-aiassistview .view-container .default-response {
63+
flex-direction: row;
64+
}
65+
66+
@media only screen and (max-width: 750px) {
67+
.views-aiassistview,
68+
.views-aiassistview .view-container .generate-btn,
69+
.views-aiassistview .view-container .suggestions li {
70+
width: 100%;
71+
}
72+
73+
.views-aiassistview .view-container {
74+
width: 90%;
75+
}
76+
77+
.views-aiassistview .view-container .suggestions li {
78+
padding: 0px 10px;
79+
white-space: nowrap;
80+
overflow: hidden;
81+
text-overflow: ellipsis;
82+
display: block;
83+
}
84+
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
import { Component, ViewChild, ViewEncapsulation, Inject, AfterViewChecked, ElementRef } from '@angular/core';
2+
import { AIAssistViewModule, AIAssistViewComponent, AIAssistViewAllModule } from '@syncfusion/ej2-angular-interactive-chat';
3+
import { SBDescriptionComponent } from '../common/dp.component';
4+
import { SBActionDescriptionComponent } from '../common/adp.component';
5+
import { Button } from "@syncfusion/ej2-angular-buttons";
6+
import { TextArea } from "@syncfusion/ej2-angular-inputs";
7+
import { defaultPromptResponseData, defaultSuggestions } from './promptResponseData';
8+
9+
@Component({
10+
selector: 'control-content',
11+
templateUrl: 'custom-views.html',
12+
styleUrls: ['custom-views.component.css'],
13+
encapsulation: ViewEncapsulation.None,
14+
standalone: true,
15+
imports: [AIAssistViewModule, AIAssistViewAllModule, SBActionDescriptionComponent, SBDescriptionComponent]
16+
})
17+
export class AIAssistCustomViewsComponent{
18+
constructor(@Inject('sourceFiles') private sourceFiles: any) {
19+
sourceFiles.files = ['custom-views.component.css'];
20+
}
21+
22+
@ViewChild('viewsAIAssistView')
23+
public viewsAIAssistView: AIAssistViewComponent;
24+
25+
public prompts: { [key: string]: string | string[] } [] = defaultPromptResponseData;
26+
27+
public suggestions: string[] = defaultSuggestions;
28+
29+
public viewTemplate: string = '<div class="view-container"><h5>Custom view content</h5></div>';
30+
31+
public promptViewContent = () => {
32+
var suggestionsElem = '';
33+
this.suggestions.forEach((suggestion) => {
34+
suggestionsElem += `<li class="suggestion-item e-card">${suggestion}</li>`;
35+
});
36+
return `<div class="view-container">
37+
<textarea id="promptTextarea"></textarea>
38+
<button id="generateBtn"></button>
39+
<ul class="suggestions">${suggestionsElem}</ul>
40+
</div>`;
41+
};
42+
43+
public responseViewContent = () => {
44+
return `<div class="view-container response-view">
45+
<div class="responseItemContent default-response e-card">
46+
<span class="e-icons e-circle-info"></span>
47+
No prompt provided. Please enter a prompt and click 'Generate Prompt' to see the response.</div>
48+
</div>`;
49+
};
50+
51+
public onCreate = () => {
52+
var textareaObj: TextArea = new TextArea({
53+
placeholder: "Enter your prompt...",
54+
rows: 5,
55+
resizeMode: 'None',
56+
input: (e) => {
57+
generateBtn.disabled = !e.value;
58+
}
59+
});
60+
textareaObj.appendTo('#promptTextarea');
61+
62+
var generateBtn: Button = new Button({ cssClass: 'e-primary generate-btn', content:'Generate Prompt', disabled: true });
63+
generateBtn.appendTo('#generateBtn');
64+
generateBtn.element.addEventListener('click',() => {
65+
var promptValue = textareaObj.value;
66+
if (promptValue) {
67+
textareaObj.value = '';
68+
generateBtn.disabled = true;
69+
this.viewsAIAssistView.activeView = 1;
70+
this.viewsAIAssistView.dataBind();
71+
this.updateResponseView(promptValue);
72+
}
73+
});
74+
75+
this.viewsAIAssistView.element.querySelector('.view-container .suggestions').addEventListener('click',(e) => {
76+
if ((e.target as any).classList.contains('suggestion-item')) {
77+
textareaObj.value = (e.target as any).textContent;
78+
generateBtn.disabled = false;
79+
}
80+
});
81+
};
82+
83+
public updateResponseView = (prompt: string) => {
84+
var responseView = this.viewsAIAssistView.element.querySelector('.view-container');
85+
var separatorElem = '<hr style="height: 1px;margin: 0;">';
86+
var responseItemElem = `<div class="responseItemContent e-card">
87+
<div class="response-header"><b>Prompt:</b> ${prompt}</div>${separatorElem}
88+
<div class="content">
89+
<div class="e-skeleton e-shimmer-wave" style="width: 100%; height: 20px;"></div>
90+
<div class="e-skeleton e-shimmer-wave" style="width: 80%; height: 20px;"></div>
91+
<div class="e-skeleton e-shimmer-wave" style="width: 100%; height: 20px;"></div>
92+
</div>
93+
${separatorElem}
94+
<div class="options">
95+
<button id="copyBtn" class="e-btn e-normal e-skeleton e-shimmer-wave">Copy</button>
96+
</div>
97+
</div>`;
98+
var defaultResponse = responseView.querySelector('.default-response');
99+
if (defaultResponse) {
100+
defaultResponse.remove();
101+
}
102+
responseView.innerHTML = responseItemElem + responseView.innerHTML;
103+
setTimeout(() => {
104+
var foundPrompt = this.prompts.find((promptObj) => promptObj.prompt === prompt);
105+
var defaultResponse = 'For real-time prompt processing, connect the AI AssistView control to your preferred AI service, such as OpenAI or Azure Cognitive Services. Ensure you obtain the necessary API credentials to authenticate and enable seamless integration.';
106+
107+
var response = foundPrompt ? foundPrompt.response : defaultResponse;
108+
responseView.children[0].querySelector('.content').innerHTML = response as string;
109+
var copyBtn = responseView.children[0].querySelector('#copyBtn');
110+
copyBtn.classList.remove('e-skeleton', 'e-shimmer-wave');
111+
copyBtn.addEventListener('click', function(e) {
112+
var textToCopy = (e.target as any).parentElement.parentElement.querySelector('.content').textContent;
113+
navigator.clipboard.writeText(textToCopy).then(function() {
114+
copyBtn.textContent = 'Copied!';
115+
setTimeout(() => {
116+
copyBtn.textContent = 'Copy';
117+
}, 1000);
118+
});
119+
});
120+
121+
}, 2000);
122+
};
123+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div class="control-section">
2+
<div class="views-aiassistview">
3+
<div id="aiAssistView" ejs-aiassistview #viewsAIAssistView (created)="onCreate()">
4+
<e-views>
5+
<e-view type="Assist" name="Prompt" [viewTemplate]="promptViewContent()"></e-view>
6+
<e-view type="Custom" name="Response" [viewTemplate]="responseViewContent()" iconCss="e-icons e-comment-show"></e-view>
7+
<e-view type="Custom" name="Custom" [viewTemplate]="viewTemplate" iconCss="e-icons e-comment-show"></e-view>
8+
</e-views>
9+
</div>
10+
</div>
11+
</div>
12+
13+
<div id="action-description">
14+
<p>This sample demonstrates the different view available for the AI AssistView component.</p>
15+
</div>
16+
<div id="description">
17+
<p>In this example, the AI AssistView component is configured with three distinct views using the <code>views</code> property. Each view displays its own unique content:</p>
18+
<ul>
19+
<li>The <code>prompt</code> view includes a textarea with a <code>Generate</code> button and displays a list of suggestions</li>
20+
<li>The <code>response</code> view shows the generated response with a copy option.</li>
21+
<li>The <code>custom</code> view allows to display the custom content.</li>
22+
</ul>
23+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
.default-aiassistview {
3+
height: 600px;
4+
width: 60vw;
5+
margin: 0 auto;
6+
}
7+
8+
.default-aiassistview .banner-content .e-assistview-icon:before {
9+
font-size: 35px;
10+
}
11+
12+
.default-aiassistview .banner-content {
13+
display: flex;
14+
flex-direction: column;
15+
justify-content: center;
16+
height: 330px;
17+
text-align: center;
18+
}
19+
20+
@media only screen and (max-width: 750px) {
21+
.default-aiassistview {
22+
width: 100%;
23+
}
24+
}

0 commit comments

Comments
 (0)