diff --git a/angular.json b/angular.json index c02c7deb3..46e957943 100644 --- a/angular.json +++ b/angular.json @@ -33,12 +33,12 @@ }, { "glob": "**/*", - "input": "node_modules/@project-sunbird/sunbird-quml-player-web-component/assets/", + "input": "node_modules/compass-quml-player-web-component/assets/", "output": "/assets/" } ], "styles": [ - "node_modules/@project-sunbird/sunbird-quml-player-web-component/styles.css", + "node_modules/compass-quml-player-web-component/styles.css", "node_modules/@project-sunbird/sb-styles/assets/_styles.scss", "src/styles.scss", "src/assets/lib/semantic/semantic.min.css", @@ -46,7 +46,7 @@ "node_modules/font-awesome/css/font-awesome.css" ], "scripts": [ - "node_modules/@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js", + "node_modules/compass-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", "src/assets/lib/dimmer.min.js", @@ -222,12 +222,12 @@ }, { "glob": "**/*", - "input": "node_modules/@project-sunbird/sunbird-quml-player-web-component/assets/", + "input": "node_modules/compass-quml-player-web-component/assets/", "output": "/assets/" } ], "styles": [ - "node_modules/@project-sunbird/sunbird-quml-player-web-component/styles.css", + "node_modules/compass-quml-player-web-component/styles.css", "projects/questionset-editor-library-wc/src/styles.scss", "node_modules/@project-sunbird/sb-styles/assets/_styles.scss", "src/assets/lib/semantic/semantic.min.css", @@ -235,7 +235,7 @@ "node_modules/font-awesome/css/font-awesome.css" ], "scripts": [ - "node_modules/@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js", + "node_modules/compass-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", "src/assets/lib/dimmer.min.js", diff --git a/package.json b/package.json index 39c6c3fda..8355c4758 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,14 @@ "@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": "file:../../Sunbird-inQuiry-player/player/project-sunbird-sunbird-quml-player-web-component-2.1.0-beta.0.tgz", - "@project-sunbird/sunbird-resource-library": "file:../../Sunbird-inQuiry-resource-library/sunbird-resource-library/project-sunbird-sunbird-resource-library-6.1.0-beta.0.tgz", + "@project-sunbird/sunbird-quml-player-web-component": "^2.1.0-beta.0", + "@project-sunbird/sunbird-resource-library": "^6.1.0-beta.1", "@project-sunbird/telemetry-sdk": "0.0.29", "@types/jquery": "^3.5.5", "alphanum-sort": "^1.0.2", "async": "^3.2.4", + "compass-quml-player-web-component": "^0.0.2", + "compass-resource-library": "^0.0.1", "concat": "^1.0.3", "core-js": "^2.5.4", "export-to-csv": "^0.2.1", @@ -47,7 +49,7 @@ "gulp": "^4.0.2", "gulp-svgmin": "^3.0.0", "jquery": "^3.5.1", - "jquery.fancytree": "^2.37.0", + "jquery.fancytree": "^2.38.3", "karma-mocha-reporter": "^2.2.5", "lodash-es": "^4.17.21", "mathjax-full": "^3.1.2", diff --git a/projects/questionset-editor-library/package.json b/projects/questionset-editor-library/package.json index 8e3cb9ea1..da6b4a901 100644 --- a/projects/questionset-editor-library/package.json +++ b/projects/questionset-editor-library/package.json @@ -1,6 +1,6 @@ { "name": "compass-collection-editor", - "version": "0.0.1", + "version": "0.0.4", "dependencies": { "tslib": "^2.0.0" }, diff --git a/projects/questionset-editor-library/src/lib/components/editor/editor.component.ts b/projects/questionset-editor-library/src/lib/components/editor/editor.component.ts index 2850aa5ad..0ee0b89b4 100755 --- a/projects/questionset-editor-library/src/lib/components/editor/editor.component.ts +++ b/projects/questionset-editor-library/src/lib/components/editor/editor.component.ts @@ -564,6 +564,7 @@ export class EditorComponent implements OnInit, OnDestroy, AfterViewInit { editorConfig: this.editorConfig, searchFormConfig: this.questionlibraryInput.searchFormConfig }; + this.questionlibraryInput.collection.eval = this.treeService.getEval(); this.pageId = 'question_library'; console.log(this.questionlibraryInput); }).catch(((error: string) => { diff --git a/projects/questionset-editor-library/src/lib/questionset-editor-library.module.ts b/projects/questionset-editor-library/src/lib/questionset-editor-library.module.ts index e2f5303eb..e45116b76 100644 --- a/projects/questionset-editor-library/src/lib/questionset-editor-library.module.ts +++ b/projects/questionset-editor-library/src/lib/questionset-editor-library.module.ts @@ -29,7 +29,8 @@ import { SliderComponent } from './components/slider/slider.component'; import { TranslationsComponent } from './components/translations/translations.component'; import { PublishChecklistComponent } from './components/publish-checklist/publish-checklist.component'; import { RelationalMetadataComponent } from './components/relational-metadata/relational-metadata.component'; -import { ResourceLibraryModule } from '@project-sunbird/sunbird-resource-library'; +// import { ResourceLibraryModule } from '@project-sunbird/sunbird-resource-library'; +import { ResourceLibraryModule } from 'compass-resource-library'; import { AppLoaderComponent } from './components/app-loader/app-loader.component'; import { AssignPageNumberComponent } from './components/assign-page-number/assign-page-number.component'; import { PlainTreeComponent } from './components/plain-tree/plain-tree.component'; diff --git a/projects/questionset-editor-library/src/lib/services/config/editor.config.json b/projects/questionset-editor-library/src/lib/services/config/editor.config.json index 4709c7529..98ebdfe26 100644 --- a/projects/questionset-editor-library/src/lib/services/config/editor.config.json +++ b/projects/questionset-editor-library/src/lib/services/config/editor.config.json @@ -25,6 +25,8 @@ "server":{"mode":"server"}, "client":{"mode":"client"}, "editorModeCheck":"server", + "serverSearch": "{\"mode\":\"server\"}", + "clientSearch": "{\"mode\":\"client\"}", "questionSet": { "maxQuestionsLimit": "500" }, diff --git a/projects/questionset-editor-library/src/lib/services/tree/tree.service.ts b/projects/questionset-editor-library/src/lib/services/tree/tree.service.ts index 524ccfc14..35d9869f5 100755 --- a/projects/questionset-editor-library/src/lib/services/tree/tree.service.ts +++ b/projects/questionset-editor-library/src/lib/services/tree/tree.service.ts @@ -272,6 +272,11 @@ export class TreeService { $(this.treeNativeElement).fancytree('getRootNode').getFirstChild().data.eval = evalMode; } + getEval() { + return $(this.treeNativeElement).fancytree('getRootNode').getFirstChild().data?.eval == this.configService.editorConfig.server || + $(this.treeNativeElement).fancytree('getRootNode').getFirstChild().data.metadata?.eval.mode == this.configService.editorConfig.server.mode ? this.configService.editorConfig.serverSearch : this.configService.editorConfig.clientSearch + } + overrideEvaluable(nodeId){ const firstNode = this.getFirstChild() if(this.getFirstChild().data.metadata.mode) {