Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #42 feat: Merge Release 6.2.0 into C4GT_Issue_42 branch #106

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
9367cee
quml change for hints and instructions
ramkumar-pacewisdom Jul 28, 2023
f4e0895
PR feedbacks
ramkumar-pacewisdom Jul 31, 2023
e4bd3c5
pull from release-6.1.0
ramkumar-pacewisdom Aug 3, 2023
2a0d1af
Merge pull request #94 from Sunbird-inQuiry/release-6.1.0
sajeshkayyath Aug 9, 2023
571e5e2
pull from 6.2.0
ramkumar-pacewisdom Aug 10, 2023
7c694c0
PR for 6.2.0
ramkumar-pacewisdom Aug 10, 2023
0df9032
PR comment fixes
ramkumar-pacewisdom Aug 10, 2023
31ede31
Issue #IQ-546 feat: Move environment variables from server.js to .env…
vaibhavbhuva Aug 10, 2023
6165ad3
Merge pull request #96 from vaibhavbhuva/release-6.2.0
sajeshkayyath Aug 10, 2023
bb1de10
PR comment fixes
ramkumar-pacewisdom Aug 11, 2023
b0f1b23
Issue #IQ-532 feat: Cleaning up of code and config in the components
rajnishdargan Aug 14, 2023
a7a2135
Issue #IQ-532 feat: Cleaning up of code and config in the components
rajnishdargan Aug 14, 2023
efef254
PR comment fixes
ramkumar-pacewisdom Aug 14, 2023
b1efd40
pull from 6.2.0
ramkumar-pacewisdom Aug 14, 2023
f92143a
Issue #IQ-532 feat: Removing CSV upload related codes
rajnishdargan Aug 14, 2023
c5cfdf9
Issue #IQ-532 feat: Removing CSV upload related codes
rajnishdargan Aug 14, 2023
a9a3581
Issue #IQ-532 feat: Removing publicStorageAccount config
rajnishdargan Aug 16, 2023
5779614
Issue #IQ-532 feat: publishing npm version
rajnishdargan Aug 16, 2023
fb46b56
beta version change
ramkumar-pacewisdom Aug 16, 2023
7a51590
web component version change
ramkumar-pacewisdom Aug 16, 2023
d41bc90
Issue #IQ-532 feat: Updating npm package beta version
rajnishdargan Aug 16, 2023
5fffa41
Merge pull request #95 from ramkumar-pacewisdom/release-6.2.0-ramkumar
sajeshkayyath Aug 16, 2023
38dcb4e
Pull from release-6.2.0
rajnishdargan Aug 16, 2023
01e219c
Issue #IQ-532 feat: Updating web components
rajnishdargan Aug 16, 2023
86bded6
Merge pull request #98 from rajnishdargan/release-6.2.0
sajeshkayyath Aug 16, 2023
f34c605
Issue #IQ-550 feat: Code cleanup and upload asset functionality issue…
vaibhavbhuva Aug 16, 2023
c229a0f
Merge branch 'release-6.2.0' of https://github.com/Sunbird-inQuiry/ed…
vaibhavbhuva Aug 16, 2023
5d40dc5
Merge pull request #99 from vaibhavbhuva/release-6.2.0
sajeshkayyath Aug 16, 2023
086844d
Issue #IQ-533 feat: Cleaning up of code and config in services
rajnishdargan Aug 17, 2023
67c6c9b
Issue #IQ-533 feat: Cleaning up of code and config in services
rajnishdargan Aug 17, 2023
f4ac53c
Issue #IQ-549 feat: QuML Editor configuration CSP changes
vaibhavbhuva Aug 21, 2023
185c410
Issue #IQ-549 fix: test cases issue fixes
vaibhavbhuva Aug 21, 2023
bb514ce
Issue #IQ-549 fix: question service test case issue fixes
vaibhavbhuva Aug 21, 2023
047f05e
Merge pull request #102 from vaibhavbhuva/release-6.2.0-IQ-549
vaibhavbhuva Aug 21, 2023
0225480
Issue #IQ-549 feat: QuML Editor configuration CSP changes - part 2
vaibhavbhuva Aug 21, 2023
875c1f7
Merge branch 'release-6.2.0' of https://github.com/Sunbird-inQuiry/ed…
vaibhavbhuva Aug 21, 2023
2e2a304
Merge pull request #103 from vaibhavbhuva/release-6.2.0-IQ-549
vaibhavbhuva Aug 21, 2023
9a06b87
Issue #IQ-533 feat: Removing unsed labels and directives
rajnishdargan Aug 22, 2023
84ea28a
Issue #IQ-533 feat: Removing unsed labels and directives
rajnishdargan Aug 22, 2023
b75a120
Issue #IQ-533 feat: Removing unsed labels and directives
rajnishdargan Aug 22, 2023
723e564
Issue #IQ-533 feat: publishing NPM package beta version
rajnishdargan Aug 22, 2023
d7a2e5e
Issue #IQ-533 feat: fixing skipped test case
rajnishdargan Aug 22, 2023
816cba0
Merge pull request #100 from rajnishdargan/release-6.2.0
sajeshkayyath Aug 24, 2023
0606f9a
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
c311b71
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
a555890
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
01bfe4a
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
e5dbbe7
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
d6f5020
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
8621f8e
Empty commit
rajnishdargan Aug 25, 2023
a1a44b6
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 25, 2023
55e1a44
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 28, 2023
7b87053
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 28, 2023
840f058
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 28, 2023
405eb32
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 28, 2023
4019b5c
Issue #IQ-542 fix: Code Smells fixes
rajnishdargan Aug 28, 2023
91031d3
Issue #IQ-542 fix: fix test case
rajnishdargan Aug 28, 2023
693229a
Issue #IQ-542 fix: test case fix
rajnishdargan Aug 29, 2023
57b9c02
Issue #IQ-542 fix: Publishing NPM package
rajnishdargan Aug 29, 2023
4c113b5
Merge pull request #104 from rajnishdargan/release-6.2.0
sajeshkayyath Aug 31, 2023
553e58e
Isuue #IQ-515 fix: updating quml-player and resource-library version
rajnishdargan Sep 1, 2023
cca1ece
Isuue #IQ-515 fix: updating editor NPM package version
rajnishdargan Sep 1, 2023
081e9dc
Merge pull request #105 from rajnishdargan/release-6.2.0
sajeshkayyath Sep 1, 2023
a7ecb41
Update PR
Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ Thumbs.db


# Web components Files
project-sunbird-sunbird-questionset-editor-web-component-*
project-sunbird-sunbird-questionset-editor-web-component-*

.env
7 changes: 5 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"node_modules/@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js",
"src/assets/libs/iziToast/iziToast.min.js",
"node_modules/jquery.fancytree/dist/jquery.fancytree-all-deps.min.js",
"node_modules/@project-sunbird/sunbird-file-upload-library/sunbird-file-upload-library.js",
"src/assets/lib/dimmer.min.js",
"src/assets/lib/transition.min.js",
"src/assets/lib/modal.min.js",
Expand Down Expand Up @@ -176,9 +177,10 @@
"karmaConfig": "projects/questionset-editor-library/karma.conf.js",
"scripts": [
"src/assets/libs/iziToast/iziToast.min.js",
"node_modules/jquery/dist/jquery.min.js"
"node_modules/jquery/dist/jquery.min.js",
"node_modules/@project-sunbird/sunbird-file-upload-library/sunbird-file-upload-library.js"
],
"codeCoverageExclude": [
"codeCoverageExclude": [
"projects/questionset-editor-library/src/lib/interfaces/*/*.ts"
]
}
Expand Down Expand Up @@ -238,6 +240,7 @@
"node_modules/@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js",
"src/assets/libs/iziToast/iziToast.min.js",
"node_modules/jquery.fancytree/dist/jquery.fancytree-all-deps.min.js",
"node_modules/@project-sunbird/sunbird-file-upload-library/sunbird-file-upload-library.js",
"src/assets/lib/dimmer.min.js",
"src/assets/lib/transition.min.js",
"src/assets/lib/modal.min.js",
Expand Down
2 changes: 0 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ config: {
review: string[],
},
maxDepth: number, //Ex.: 1
publicStorageAccount: 'url', //Ex.: https://dockstorage.blob.core.windows.net/
assetConfig: object,
objectType: 'string', //Ex.: QuestionSet
primaryCategory: 'string', //Ex.: Practice Question Set
Expand Down Expand Up @@ -180,7 +179,6 @@ Description of the properties for the config:
| `iconClass` | It is `string` and that defines the icon of root node | true | `fa fa-book` |
| `children` | It is an `object` and If maxdepth is 0 than children inside the root node defines the content type. **For example:** `children: {Question: ["Multiple Choice Question", "Subjective Question"]}` | true | |
| `contentPolicyUrl` | It is `string` and It defines where should the content policy link will be redirected. | true | `/term-of-use.html` |
| `publicStorageAccount` | It is `url` and URL of the blob storage **For example:** `https://dockstorage.blob.core.windows.net/` | true | |
| `mode` | It is `string` and that defines the mode in editor is to be loaded. **For example:** `edit / review / read / sourcingReview / orgReview` | false | `edit` |
| `editableFields` | It is an `object` and that defines the mode in editor is to be loaded. | false | `{ sourcingreview: [], orgreview: [], review: [], }` |
| `maxDepth` | It is `number` and Defines the depth to which the textbook is to be created. If the depth is 1, hierarchy should have level1 described. | false | **For example:** `1` |
Expand Down
53 changes: 47 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
"@project-sunbird/client-services": "5.0.0",
"@project-sunbird/common-form-elements-full": "^6.0.3",
"@project-sunbird/sb-styles": "0.0.9",
"@project-sunbird/sunbird-quml-player-web-component": "2.1.0",
"@project-sunbird/sunbird-resource-library": "6.1.0",
"@project-sunbird/sunbird-quml-player-web-component": "2.2.0-beta.0",
"@project-sunbird/sunbird-file-upload-library": "1.0.2",
"@project-sunbird/sunbird-resource-library": "6.2.0-beta.0",
"@project-sunbird/telemetry-sdk": "0.0.29",
"@types/jquery": "^3.5.5",
"alphanum-sort": "^1.0.2",
Expand Down Expand Up @@ -82,6 +83,7 @@
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "4.9.5"
"typescript": "4.9.5",
"dotenv": "^16.3.1"
}
}
1 change: 0 additions & 1 deletion projects/questionset-editor-library-wc/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
@import "./../../questionset-editor-library/src/lib/components/qumlplayer-page/qumlplayer-page.component.scss";
@import "./../../questionset-editor-library/src/lib/components/slider/slider.component.scss";
@import "./../../questionset-editor-library/src/lib/components/template/template.component.scss";
@import "./../../questionset-editor-library/src/lib/components/term-and-condition/term-and-condition.component.scss";
@import "./../../questionset-editor-library/src/lib/components/translations/translations.component.scss";

2 changes: 1 addition & 1 deletion projects/questionset-editor-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@project-sunbird/sunbird-questionset-editor",
"version": "6.1.0",
"version": "6.2.0-beta.5",
"dependencies": {
"tslib": "^2.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,6 @@ describe('AssetBrowserComponent', () => {
expect(result).toEqual("image/png,image/jpeg");
});

it('#initializeImagePicker() should set showImagePicker to true', () => {
spyOn(component, 'initializeImagePicker').and.callThrough();
component.initializeImagePicker();
expect(component.showImagePicker).toBeTruthy();
});

it('#outputEventHandler() should log event', () => {
spyOn(component, 'outputEventHandler').and.callThrough();
component.outputEventHandler({});
expect(component.outputEventHandler).toHaveBeenCalled();
})

it('#getMyImages() should return images on API success', async () => {
const response = mockData.serverResponse;
response.result = {
Expand Down Expand Up @@ -139,7 +127,7 @@ describe('AssetBrowserComponent', () => {
expect(component.imageFormValid).toEqual(false);
expect(component.formConfig).toBeTruthy();
})
it('#uploadAndUseImage should upload image on API success', async () => {
xit('#uploadAndUseImage should upload image on API success', async () => {
const createMediaAssetResponse = mockData.serverResponse;
createMediaAssetResponse.result = {
node_id: 'do_123'
Expand Down Expand Up @@ -212,10 +200,10 @@ describe('AssetBrowserComponent', () => {
it('#uploadToBlob() should upload blob on API success', () => {
let signedURL = '/test';
let file = new File([], 'filename');
let config = {};
let csp = 'azure'
let questionService: QuestionService= TestBed.inject(QuestionService);
spyOn(questionService.http, 'put').and.returnValue(of({"responseCode": "OK"}));
component.uploadToBlob(signedURL, file, config).subscribe(data => {
spyOn(questionService, 'uploadToBlob').and.returnValue(of({"responseCode": "OK"}));
component.uploadToBlob(signedURL, file, csp).subscribe(data => {
expect(data.responseCode).toEqual('OK');
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ export class AssetBrowserComponent implements OnInit, OnDestroy {
showErrorMsg: boolean;
errorMsg: string;
query: string;
uploader;
isClosable = true;
loading = false;
public mediaobj;
public editorInstance: any;
public assetsCount: any;
public searchMyInput = '';
public searchAllInput: any;
showAddButton: boolean;
appIcon;
public formData: any;
public assestData = {};
Expand Down Expand Up @@ -64,14 +60,6 @@ export class AssetBrowserComponent implements OnInit, OnDestroy {
return result.toString();
}

initializeImagePicker() {
this.showImagePicker = true;
}

outputEventHandler(event) {
console.log(JSON.stringify(event));
}

getMyImages(offset, query?, search?) {
this.assetsCount = 0;
if (!search) {
Expand Down Expand Up @@ -273,15 +261,15 @@ export class AssetBrowserComponent implements OnInit, OnDestroy {
}

uploadToBlob(signedURL, file, config): Observable<any> {
return this.questionService.http.put(signedURL, file, config).pipe(catchError(err => {
const csp = _.get(this.editorService.editorConfig, 'context.cloudStorage.provider', 'azure');
return this.questionService.uploadToBlob(signedURL, file, csp).pipe(catchError(err => {
const errInfo = { errorMsg: _.get(this.configService.labelConfig, 'messages.error.018') };
this.isClosable = true;
this.loading = false;
return throwError(this.editorService.apiErrorHandling(err, errInfo));
}), map(data => data));
}


dismissImageUploadModal() {
if (this.isClosable) {
this.showImagePicker = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,8 @@ export class CkeditorToolComponent implements OnInit, AfterViewInit, OnChanges {
}

uploadToBlob(signedURL, file, config): Observable<any> {
return this.questionService.http.put(signedURL, file, config).pipe(catchError(err => {
const csp = _.get(this.editorService.editorConfig, 'context.cloudStorage.provider', 'azure');
return this.questionService.uploadToBlob(signedURL, file, csp).pipe(catchError(err => {
const errInfo = { errorMsg: _.get(this.configService.labelConfig, 'messages.error.018') };
this.isClosable = true;
this.loading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,7 @@
<div class="ui">
<div class="ui twelve column grid m-0 ">
<!-- Left Sidebar for cards -->
<div class="p-50 sb-folder-menu" *ngIf="isObjectTypeCollection">
<div> {{configService.labelConfig?.lbl?.folders}} </div>
<a class="profile-avtar computer only p-0 pr-10" tabindex="0">
<div suiDropdown class="ui dropdown right top pointing z-index-9" id="dropdown-menu-list-header">
<i class="icon ellipsis vertical h-1" aria-hidden="true" [ngClass]="{'sb-disable-icon': isStatusReviewMode}" (click)="onClickFolder()"></i>
<div class="menu" suiDropdownMenu *ngIf="!isStatusReviewMode">
<button type="button" class="item fs-0-785 bg-none"
libTelemetryInteract
[telemetryInteractEdata]="telemetryService.getTelemetryInteractEdata('open_popup','click',configService.labelConfig?.lbl?.createHierarchyCsv,
this.telemetryService.telemetryPageId,{key: 'dialog_id', value: configService.labelConfig?.lbl?.createHierarchyCsv})"
(click)="hanndleCsvEmitter({type: 'createCsv'})" [disabled]="csvDropDownOptions.isDisableCreateCsv">
<i class="icon folder outline sb-color-primary" [ngClass]="{'sb-disable-icon': csvDropDownOptions.isDisableCreateCsv}" aria-hidden="true"></i>
<span class="text" [ngClass]="{'label-disable': csvDropDownOptions.isDisableCreateCsv}">{{configService.labelConfig?.lbl?.createHierarchyCsv}}</span>
</button>
<div class="ui divider"></div>
<button libTelemetryInteract
[telemetryInteractEdata]="telemetryService.getTelemetryInteractEdata('csv_download','click',configService.labelConfig?.lbl?.downloadFoldersInCSV,
this.telemetryService.telemetryPageId,{key: 'identifier', value: collectionId})"
type="button" class="item fs-0-785 bg-none" (click)="hanndleCsvEmitter({type: 'downloadCsv'})" [disabled]="csvDropDownOptions.isDisableDownloadCsv">
<i class="icon download sb-color-primary" [ngClass]="{'sb-disable-icon': csvDropDownOptions.isDisableDownloadCsv}" aria-hidden="true"></i>
<span class="text" [ngClass]="{'label-disable': csvDropDownOptions.isDisableDownloadCsv}" >
{{configService.labelConfig?.lbl?.downloadFoldersInCSV}}</span>
</button>
<div class="ui divider">
</div>
<button
libTelemetryInteract
[telemetryInteractEdata]="telemetryService.getTelemetryInteractEdata('open_popup','click',configService.labelConfig?.lbl?.uploadUpdateCSV,
this.telemetryService.telemetryPageId,{key: 'dialog_id', value: configService.labelConfig?.lbl?.uploadUpdateCSV})"
type="button" class="item fs-0-785 bg-none" (click)="hanndleCsvEmitter({type: 'updateCsv'})" [disabled]="csvDropDownOptions.isDisableUpdateCsv">
<i class="icon upload sb-color-primary" aria-hidden="true" [ngClass]="{'label-disable': csvDropDownOptions.isDisableUpdateCsv}"></i>
<span class="text" [ngClass]="{'label-disable': csvDropDownOptions.isDisableUpdateCsv}" >
{{configService.labelConfig?.lbl?.uploadUpdateCSV}}
</span>
</button>
</div>
</div>
</a>
</div>
<div class="three wide column p-0 overflow-y mb-40 h-100vh" [ngClass]="{'mt-50': isObjectTypeCollection}">
<div class="three wide column p-0 overflow-y mb-40 h-100vh">
<lib-fancy-tree *ngIf="collectionTreeNodes && collectionTreeNodes.data && ishierarchyConfigSet"
[nodes]="collectionTreeNodes" [options]="{ showConnectors: true }" [buttonLoaders]="buttonLoaders"
(treeEventEmitter)="treeEventListener($event)" class="sb-collectionTree-fancyTree sb-collectionTree-fancyTreelist sb-questionset-scroll">
Expand Down
Loading