diff --git a/skills-client-integration/skills-int-client-js/package.json b/skills-client-integration/skills-int-client-js/package.json index 9d438653..7ba85538 100644 --- a/skills-client-integration/skills-int-client-js/package.json +++ b/skills-client-integration/skills-int-client-js/package.json @@ -17,7 +17,7 @@ "author": "SkillTree Team", "dependencies": { "@skilltree/skills-client-js": "3.5.0", - "axios": "1.6.0", + "axios": "1.7.4", "bootstrap": "4.5.2", "jquery": "3.5.1", "js-beautify": "1.13.0" diff --git a/skills-client-integration/skills-int-client-ng/.browserslistrc b/skills-client-integration/skills-int-client-ng/.browserslistrc deleted file mode 100644 index 0ccadaf3..00000000 --- a/skills-client-integration/skills-int-client-ng/.browserslistrc +++ /dev/null @@ -1,18 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. -not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/skills-client-integration/skills-int-client-ng/.editorconfig b/skills-client-integration/skills-int-client-ng/.editorconfig deleted file mode 100644 index 59d9a3a3..00000000 --- a/skills-client-integration/skills-int-client-ng/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# Editor configuration, see https://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.ts] -quote_type = single - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/skills-client-integration/skills-int-client-ng/.gitignore b/skills-client-integration/skills-int-client-ng/.gitignore deleted file mode 100644 index 29da8f89..00000000 --- a/skills-client-integration/skills-int-client-ng/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc -# Only exists if Bazel was run -/bazel-out - -# dependencies -/node_modules - -# profiling files -chrome-profiler-events*.json -speed-measure-plugin*.json - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -.history/* - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db -package-lock.json - -projects/skilltree/skills-client-ng/src/version.js diff --git a/skills-client-integration/skills-int-client-ng/.npmrc b/skills-client-integration/skills-int-client-ng/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-integration/skills-int-client-ng/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-integration/skills-int-client-ng/README.md b/skills-client-integration/skills-int-client-ng/README.md deleted file mode 100644 index 58292d34..00000000 --- a/skills-client-integration/skills-int-client-ng/README.md +++ /dev/null @@ -1,42 +0,0 @@ - -# SkillsIntClientNg - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.2. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/skills-client-integration/skills-int-client-ng/angular.json b/skills-client-integration/skills-int-client-ng/angular.json deleted file mode 100644 index 97b1a6c9..00000000 --- a/skills-client-integration/skills-int-client-ng/angular.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "skills-int-client-ng": { - "projectType": "application", - "schematics": {}, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "allowedCommonJsDependencies": [ - "axios", - "highlight.js", - "lodash/debounce", - "js-beautify" - ], - "preserveSymlinks": true, - "outputPath": "dist/skills-int-client-ng", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "aot": true, - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css", - "./node_modules/bootstrap/dist/css/bootstrap.css", - "./node_modules/highlight.js/styles/github.css" - ], - "scripts": [ - "./node_modules/jquery/dist/jquery.min.js", - "./node_modules/bootstrap/dist/js/bootstrap.min.js" - ] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" - } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "skills-int-client-ng:build" - }, - "configurations": { - "production": { - "browserTarget": "skills-int-client-ng:build:production" - } - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "skills-int-client-ng:serve" - }, - "configurations": { - "production": { - "devServerTarget": "skills-int-client-ng:serve:production" - } - } - } - } - }}, - "defaultProject": "skills-int-client-ng" -} diff --git a/skills-client-integration/skills-int-client-ng/e2e/protractor.conf.js b/skills-client-integration/skills-int-client-ng/e2e/protractor.conf.js deleted file mode 100644 index 792486b0..00000000 --- a/skills-client-integration/skills-int-client-ng/e2e/protractor.conf.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// @ts-check -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); - -/** - * @type { import("protractor").Config } - */ -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - browserName: 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ - spec: { - displayStacktrace: StacktraceOption.PRETTY - } - })); - } -}; \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/e2e/src/app.e2e-spec.ts b/skills-client-integration/skills-int-client-ng/e2e/src/app.e2e-spec.ts deleted file mode 100644 index ecc1a630..00000000 --- a/skills-client-integration/skills-int-client-ng/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { AppPage } from './app.po'; -import { browser, logging } from 'protractor'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getTitleText()).toEqual('skills-int-client-ng app is running!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/skills-client-integration/skills-int-client-ng/e2e/src/app.po.ts b/skills-client-integration/skills-int-client-ng/e2e/src/app.po.ts deleted file mode 100644 index 608556dd..00000000 --- a/skills-client-integration/skills-int-client-ng/e2e/src/app.po.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo(): Promise { - return browser.get(browser.baseUrl) as Promise; - } - - getTitleText(): Promise { - return element(by.css('app-root .content span')).getText() as Promise; - } -} diff --git a/skills-client-integration/skills-int-client-ng/e2e/tsconfig.json b/skills-client-integration/skills-int-client-ng/e2e/tsconfig.json deleted file mode 100644 index 1807fd68..00000000 --- a/skills-client-integration/skills-int-client-ng/e2e/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "outDir": "../out-tsc/e2e", - "module": "commonjs", - "target": "es2018", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/skills-client-integration/skills-int-client-ng/karma.conf.js b/skills-client-integration/skills-int-client-ng/karma.conf.js deleted file mode 100644 index a4f83781..00000000 --- a/skills-client-integration/skills-int-client-ng/karma.conf.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, './coverage/skills-int-client-ng'), - reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/skills-client-integration/skills-int-client-ng/license-add/LICENSE-HEADER.txt b/skills-client-integration/skills-int-client-ng/license-add/LICENSE-HEADER.txt deleted file mode 100644 index 641df477..00000000 --- a/skills-client-integration/skills-int-client-ng/license-add/LICENSE-HEADER.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/skills-client-integration/skills-int-client-ng/license-add/license-add-config.json b/skills-client-integration/skills-int-client-ng/license-add/license-add-config.json deleted file mode 100644 index d7e222d2..00000000 --- a/skills-client-integration/skills-int-client-ng/license-add/license-add-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "ignore": [ ".git", "coverage", ".*/**", ".*", "*.iml", "tsconfig.*", "skills.d.ts", "angular.json", "pom.xml"], - "license": "license-add/LICENSE-HEADER.txt", - "licenseFormats": { - "js": { - "prepend": "/*", - "append": " */", - "eachLine": { - "prepend": " * " - } - }, - "dotfile": { - "eachLine": { - "prepend": "# " - } - }, - "md": { - "prepend": "" - } - }, - "trailingWhitespace": "TRIM" -} diff --git a/skills-client-integration/skills-int-client-ng/ngcc.config.js b/skills-client-integration/skills-int-client-ng/ngcc.config.js deleted file mode 100644 index 05159f2b..00000000 --- a/skills-client-integration/skills-int-client-ng/ngcc.config.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -module.exports = { - packages: { - '@skilltree/skills-client-ng': { - ignorableDeepImportMatchers: [ - /lodash\// - ] - }, - 'ngx-highlightjs': { - ignorableDeepImportMatchers: [ - /highlight/ - ] - }, - } -}; \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/package.json b/skills-client-integration/skills-int-client-ng/package.json deleted file mode 100644 index 26fa42e6..00000000 --- a/skills-client-integration/skills-int-client-ng/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "skills-int-client-ng", - "version": "3.6.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib - Angular", - "author": "SkillTree Team", - "scripts": { - "licenseDepCheck2": "license-checker --production --onlyAllow='MIT;ISC;Apache-2.0;0BSD' --summary", - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3-Clause;Apache-2.0;0BSD;CC-BY-4.0' --summary", - "licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'", - "licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "ng": "ng", - "start": "ng serve --proxy-config proxy.conf.json", - "serve": "npm run start", - "build": "npm run licenseCheck && ng build --configuration production --deploy-url=/angular/", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "dependencies": { - "@angular/animations": "14.3.0", - "@angular/common": "14.3.0", - "@angular/compiler": "14.3.0", - "@angular/core": "14.3.0", - "@angular/forms": "14.3.0", - "@angular/platform-browser": "14.3.0", - "@angular/platform-browser-dynamic": "14.3.0", - "@angular/router": "14.3.0", - "@ng-bootstrap/ng-bootstrap": "13.0.0", - "@popperjs/core": "2.11.8", - "@skilltree/skills-client-ng": "3.6.0", - "@types/js-beautify": "1.11.0", - "axios": "1.6.0", - "bootstrap": "4.5.3", - "highlight.js": "11.3.1", - "jquery": "3.5.1", - "js-beautify": "1.13.0", - "ngx-highlightjs": "4.1.2", - "popper.js": "^1.16.1", - "rxjs": "6.6.3", - "tslib": "2.0.3", - "zone.js": "0.12.0" - }, - "devDependencies": { - "@angular-devkit/build-angular": "14.2.11", - "@angular/cli": "14.2.11", - "@angular/compiler-cli": "14.3.0", - "@types/jasmine": "3.6.0", - "@types/jasminewd2": "2.0.8", - "@types/node": "14.11.8", - "codelyzer": "6.0.1", - "jasmine-core": "3.6.0", - "jasmine-spec-reporter": "6.0.0", - "karma": "6.4.1", - "karma-chrome-launcher": "3.1.0", - "karma-coverage-istanbul-reporter": "3.0.3", - "karma-jasmine": "4.0.1", - "karma-jasmine-html-reporter": "1.5.4", - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "protractor": "7.0.0", - "ts-node": "9.0.0", - "tslint": "6.1.3", - "typescript": "4.6.2" - } -} diff --git a/skills-client-integration/skills-int-client-ng/pom.xml b/skills-client-integration/skills-int-client-ng/pom.xml deleted file mode 100644 index 5dbbe51e..00000000 --- a/skills-client-integration/skills-int-client-ng/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - - skills - skills-client-integration - 3.5.0-SNAPSHOT - - skills-int-client-ng - - - UTF-8 - UTF-8 - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target - - - - install node and npm - - install-node-and-npm - - - ${node.version} - - - - npm install - - npm - - generate-resources - - install - - - - npm run build - - npm - - - run build - - - - - - - - - - - - - - - - - - - - - diff --git a/skills-client-integration/skills-int-client-ng/proxy.conf.json b/skills-client-integration/skills-int-client-ng/proxy.conf.json deleted file mode 100644 index 55aceec9..00000000 --- a/skills-client-integration/skills-int-client-ng/proxy.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "/api": - { - "target": "http://localhost:8090", - "secure": false - } -} \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/src/app/app-routing.module.ts b/skills-client-integration/skills-int-client-ng/src/app/app-routing.module.ts deleted file mode 100644 index ecda9cbc..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app-routing.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { ReportSkillsComponent } from './components/report-skills/report-skills.component'; -import { SkillsDisplayComponent } from './components/skills-display/skills-display.component'; - - -const routes: Routes = [{ - path: '', - redirectTo: 'reportSkills', - pathMatch: 'full' -}, { - path: 'angular/reportSkills', - component: ReportSkillsComponent -}, { - path: 'angular/showSkills', - component: SkillsDisplayComponent -} -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled'})], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/skills-client-integration/skills-int-client-ng/src/app/app.component.css b/skills-client-integration/skills-int-client-ng/src/app/app.component.css deleted file mode 100644 index d24fcdce..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app.component.css +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/skills-client-integration/skills-int-client-ng/src/app/app.component.html b/skills-client-integration/skills-int-client-ng/src/app/app.component.html deleted file mode 100644 index 244d35d1..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app.component.html +++ /dev/null @@ -1,21 +0,0 @@ - -
- -
- -
-
\ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/src/app/app.component.spec.ts b/skills-client-integration/skills-int-client-ng/src/app/app.component.spec.ts deleted file mode 100644 index 3121e0c6..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app.component.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { TestBed, async } from '@angular/core/testing'; -import { RouterTestingModule } from '@angular/router/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ - RouterTestingModule - ], - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'skills-int-client-ng'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('skills-int-client-ng'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement; - expect(compiled.querySelector('.content span').textContent).toContain('skills-int-client-ng app is running!'); - }); -}); diff --git a/skills-client-integration/skills-int-client-ng/src/app/app.component.ts b/skills-client-integration/skills-int-client-ng/src/app/app.component.ts deleted file mode 100644 index 0d39eda7..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'skills-int-client-ng'; -} diff --git a/skills-client-integration/skills-int-client-ng/src/app/app.module.ts b/skills-client-integration/skills-int-client-ng/src/app/app.module.ts deleted file mode 100644 index 300bfd4e..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/app.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { FormsModule } from '@angular/forms'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs'; -import { SkillsLevelModule, SkillsDisplayModule, SkilltreeModule } from '@skilltree/skills-client-ng' - -import { AppComponent } from './app.component'; -import { AppRoutingModule } from './app-routing.module'; -import { NavigationComponent } from './components/navigation/navigation.component'; -import { CodeExampleLayoutComponent } from './components/report-skills/code-example/code-example-layout.component'; -import { ButtonCodeExampleComponent } from './components/report-skills/code-example/button-code-example.component'; -import { InputCodeExampleComponent } from './components/report-skills/code-example/input-code-example.component'; -import { AnySkillCodeExampleComponent } from './components/report-skills/code-example/anyskill-code-example.component'; -import { ExampleService } from './components/report-skills/code-example/example.service'; -import { ReportSkillsComponent } from './components/report-skills/report-skills.component'; -import { SkillsDisplayComponent } from './components/skills-display/skills-display.component'; -import { PlaceholderDirective } from './directives/placeholder.directive'; - -@NgModule({ - declarations: [ - AppComponent, - ReportSkillsComponent, - NavigationComponent, - SkillsDisplayComponent, - CodeExampleLayoutComponent, - ButtonCodeExampleComponent, - AnySkillCodeExampleComponent, - InputCodeExampleComponent, - PlaceholderDirective - ], - imports: [ - BrowserModule, - AppRoutingModule, - NgbModule, - FormsModule, - HighlightModule, - SkillsLevelModule, - SkilltreeModule, - SkillsDisplayModule, - RouterModule.forRoot([ - { path: '', component: ReportSkillsComponent }, - ]) - ], - providers: [ - ExampleService, - { - provide: HIGHLIGHT_OPTIONS, - useValue: { - fullLibraryLoader: () => import('highlight.js'), - } - } - ], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.css b/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.css deleted file mode 100644 index d24fcdce..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.css +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.html b/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.html deleted file mode 100644 index 3eb97f2f..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.html +++ /dev/null @@ -1,35 +0,0 @@ - -
- -
\ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.spec.ts b/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.spec.ts deleted file mode 100644 index 6117ffcc..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { NavigationComponent } from './navigation.component'; - -describe('NavigationComponent', () => { - let component: NavigationComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ NavigationComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(NavigationComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.ts b/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.ts deleted file mode 100644 index 74fa158e..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/navigation/navigation.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -@Component({ - selector: 'app-navigation', - templateUrl: './navigation.component.html', - styleUrls: ['./navigation.component.css'] -}) -export class NavigationComponent implements OnInit { - - constructor(public route: ActivatedRoute) { - } - - ngOnInit(): void { - } - -} diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.css b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.css deleted file mode 100644 index d24fcdce..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.css +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.html b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.html deleted file mode 100644 index eb594400..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.html +++ /dev/null @@ -1,22 +0,0 @@ - -
- -
- -
-
- \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.ts b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.ts deleted file mode 100644 index 68a92e7c..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/anyskill-code-example.component.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import axios from 'axios'; -import { Example } from './example'; -import { SkillsReporter } from '@skilltree/skills-client-ng'; - -@Component({ - selector: 'app-anyskill-code-example', - templateUrl: './anyskill-code-example.component.html', - styleUrls: ['./anyskill-code-example.component.css'] -}) -export class AnySkillCodeExampleComponent implements OnInit { - - @Input() example: Example - placeholder: string = 'Select a skill id'; - skillId: string; - available: string[] = ['']; - - @Output() skillReportSuccess = new EventEmitter(); - - constructor() { - } - - ngOnInit(): void { - this.skillId = this.placeholder; - - axios.get("/api/skills") - .then((result) => { - this.available = result.data as string[]; - }); - } - - hasSelectedSkill() { - return this.skillId && this.skillId !== this.placeholder; - } - - setSelectedSkill(selectedSkill: string) { - this.skillId = selectedSkill; - } - - reportSkill() { - SkillsReporter.reportSkill(this.skillId) - .then((res) => { - this.skillReportSuccess.emit(res); - }) - .catch((res) => { - this.skillReportSuccess.emit(res); - }); - } - - getSampleCode() { - let sampleCode = `SkillsReporter.reportSkill(this.skill) - .then((res) => { - this.reportResult = res; - });`; - sampleCode = 'SkillsReporter.reportSkill(this.skill)\n .then((res) => {\n this.reportResult = res;\n \});'; - return sampleCode; - } -} diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.css b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.css deleted file mode 100644 index d24fcdce..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.css +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.html b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.html deleted file mode 100644 index 4c94b6bb..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.html +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.ts b/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.ts deleted file mode 100644 index 85f8c4e6..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/report-skills/code-example/button-code-example.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { Example } from './example'; - -@Component({ - selector: 'app-button-code-example', - templateUrl: './button-code-example.component.html', - styleUrls: ['./button-code-example.component.css'] -}) -export class ButtonCodeExampleComponent implements OnInit { - - @Input() example: Example - skillId: string - - @Output() skillReportSuccess = new EventEmitter(); - - constructor() { - } - - ngOnInit(): void { - this.skillId = this.example.skillId; - } - - onReporterResponse(event) { - this.skillReportSuccess.emit(event.detail) - } - - getSampleCode() { - let sampleCode = ` -
- -
- - -
- - -
- -
- - -
- - - - Show Source - -
- Skills Display Path: [{{ skillsDisplayRoutePath }}] -
- -
- - -
- -
-
-
-
- Sample Code -
-
-
-
-
-
-
- - diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.spec.ts b/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.spec.ts deleted file mode 100644 index 99fff417..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SkillsDisplayComponent } from './skills-display.component'; - -describe('SkillsDisplayComponent', () => { - let component: SkillsDisplayComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ SkillsDisplayComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SkillsDisplayComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.ts b/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.ts deleted file mode 100644 index 495645e6..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/skills-display.component.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { themes } from './themes' -import { ViewportScroller } from '@angular/common'; -import { js_beautify } from 'js-beautify' - -@Component({ - selector: 'app-skills-display', - templateUrl: './skills-display.component.html', - styleUrls: ['./skills-display.component.css'] -}) -export class SkillsDisplayComponent implements OnInit { - - @ViewChild('skillsDisplay') - skillsDisplay: any; - - - displayOptions: any; - version: number; - selectedTheme: any; - themes: Array = themes; - showSampleCode: boolean = false; - skillsDisplayRoutePath: string = '/'; - - constructor(private route: ActivatedRoute, private router: Router, private viewportScroller: ViewportScroller) { } - - ngOnInit(): void { - this.route.queryParams.subscribe(params => { - this.version = params['skillsVersion'] ? JSON.parse(params['skillsVersion']) : 1000; - this.displayOptions = { - autoScrollStrategy: 'top-of-page', - isSummaryOnly: params['isSummaryOnly'] ? JSON.parse(params['isSummaryOnly']) : false, - internalBackButton: params['internalBackButton'] ? JSON.parse(params['internalBackButton']) : false, - }; - this.selectedTheme = params['themeName'] ? this.findTheme(params['themeName']) : this.themes[0]; - }); - } - navigate() { - this.skillsDisplay.navigate('/subjects/subj0') - } - - findTheme(name: string) { - return this.themes.find((item) => item.name === name); - } - - skillsDisplayRouteChanged = (newPath: string) => { - this.skillsDisplayRoutePath = newPath; - } - - refreshPage() { - setTimeout(() => { - document.location.reload(); - }, 250); - } - - setIsThemeUrlParam(theme) { - this.router.navigate(['angular/showSkills'], { queryParams: { themeName: theme.name }, queryParamsHandling: 'merge' }); - this.refreshPage(); - } - - setIsSummaryOnlyUrlParam() { - this.displayOptions.isSummaryOnly = !this.displayOptions.isSummaryOnly; - this.router.navigate(['angular/showSkills'], { queryParams: { isSummaryOnly: this.displayOptions.isSummaryOnly }, queryParamsHandling: 'merge' }); - this.refreshPage(); - } - - setInternalBackButtonUrlParam() { - this.displayOptions.internalBackButton = !this.displayOptions.internalBackButton; - this.router.navigate(['angular/showSkills'], { queryParams: { internalBackButton: this.displayOptions.internalBackButton }, queryParamsHandling: 'merge' }); - this.refreshPage(); - } - scrollTo(elementId: string) { - this.showSampleCode = true; - setTimeout(() => { - this.viewportScroller.scrollToAnchor(elementId); - }, 250); - } - - getSampleCode() { - let sampleCode = ` - - - - `; - return sampleCode; - } -} diff --git a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/themes.ts b/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/themes.ts deleted file mode 100644 index 3c78ace2..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/components/skills-display/themes.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export const themes : Array = [ - { - name: 'Bright (default)', - theme: { - backgroundColor: '#f7f7f7', - }, - }, - { - name: 'Dark Blue', - theme: { - backgroundColor: '#626d7d', - pageTitleTextColor: 'white', - textSecondaryColor: 'white', - textPrimaryColor: 'white', - stars: { - unearnedColor: '#787886', - earnedColor: 'gold', - }, - progressIndicators: { - beforeTodayColor: '#3e4d44', - earnedTodayColor: '#667da4', - completeColor: '#59ad52', - incompleteColor: '#cdcdcd', - }, - charts: { - axisLabelColor: 'white', - }, - tiles: { - backgroundColor:'#152E4d', - watermarkIconColor: '#a6c5f7', - }, - graphLegendBorderColor: '1px solid grey', - }, - } -]; diff --git a/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.spec.ts b/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.spec.ts deleted file mode 100644 index f1a7b1a9..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { PlaceholderDirective } from './placeholder.directive'; - -describe('PlaceholderDirective', () => { - it('should create an instance', () => { - const directive = new PlaceholderDirective(); - expect(directive).toBeTruthy(); - }); -}); diff --git a/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.ts b/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.ts deleted file mode 100644 index cad94cfe..00000000 --- a/skills-client-integration/skills-int-client-ng/src/app/directives/placeholder.directive.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Directive, ViewContainerRef } from '@angular/core'; - -@Directive({ - selector: '[appPlaceholder]' -}) -export class PlaceholderDirective { - - constructor(public viewContainerRef: ViewContainerRef) { } - -} diff --git a/skills-client-integration/skills-int-client-ng/src/assets/.gitkeep b/skills-client-integration/skills-int-client-ng/src/assets/.gitkeep deleted file mode 100644 index d24fcdce..00000000 --- a/skills-client-integration/skills-int-client-ng/src/assets/.gitkeep +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ diff --git a/skills-client-integration/skills-int-client-ng/src/environments/environment.prod.ts b/skills-client-integration/skills-int-client-ng/src/environments/environment.prod.ts deleted file mode 100644 index 7b1756b9..00000000 --- a/skills-client-integration/skills-int-client-ng/src/environments/environment.prod.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -export const environment = { - production: true -}; diff --git a/skills-client-integration/skills-int-client-ng/src/environments/environment.ts b/skills-client-integration/skills-int-client-ng/src/environments/environment.ts deleted file mode 100644 index bfdfd08c..00000000 --- a/skills-client-integration/skills-int-client-ng/src/environments/environment.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/skills-client-integration/skills-int-client-ng/src/favicon.ico b/skills-client-integration/skills-int-client-ng/src/favicon.ico deleted file mode 100644 index 997406ad..00000000 Binary files a/skills-client-integration/skills-int-client-ng/src/favicon.ico and /dev/null differ diff --git a/skills-client-integration/skills-int-client-ng/src/index.html b/skills-client-integration/skills-int-client-ng/src/index.html deleted file mode 100644 index 86785e7d..00000000 --- a/skills-client-integration/skills-int-client-ng/src/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - SkillsIntClientNg - - - - - - - - diff --git a/skills-client-integration/skills-int-client-ng/src/main.ts b/skills-client-integration/skills-int-client-ng/src/main.ts deleted file mode 100644 index 22b3f172..00000000 --- a/skills-client-integration/skills-int-client-ng/src/main.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import axios from 'axios'; -import { SkillsConfiguration, Logger } from '@skilltree/skills-client-ng' - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} -axios.get("/api/config") - .then((result) => { - SkillsConfiguration.configure(result.data); - }) - .then(() => { - if (( window).Cypress) { - ( window).skillsLogger = Logger; - } - platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - }) diff --git a/skills-client-integration/skills-int-client-ng/src/polyfills.ts b/skills-client-integration/skills-int-client-ng/src/polyfills.ts deleted file mode 100644 index 18a7fd72..00000000 --- a/skills-client-integration/skills-int-client-ng/src/polyfills.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -/*************************************************************************************************** - * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. - */ -// import '@angular/localize/init'; -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/skills-client-integration/skills-int-client-ng/src/styles.css b/skills-client-integration/skills-int-client-ng/src/styles.css deleted file mode 100644 index 781ca169..00000000 --- a/skills-client-integration/skills-int-client-ng/src/styles.css +++ /dev/null @@ -1,16 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -/* You can add global styles to this file, and also import other style files */ diff --git a/skills-client-integration/skills-int-client-ng/src/test.ts b/skills-client-integration/skills-int-client-ng/src/test.ts deleted file mode 100644 index 06cfa737..00000000 --- a/skills-client-integration/skills-int-client-ng/src/test.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; -}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/skills-client-integration/skills-int-client-ng/tsconfig.app.json b/skills-client-integration/skills-int-client-ng/tsconfig.app.json deleted file mode 100644 index 150c4232..00000000 --- a/skills-client-integration/skills-int-client-ng/tsconfig.app.json +++ /dev/null @@ -1,15 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [ "node"] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] -} diff --git a/skills-client-integration/skills-int-client-ng/tsconfig.base.json b/skills-client-integration/skills-int-client-ng/tsconfig.base.json deleted file mode 100644 index f69f6541..00000000 --- a/skills-client-integration/skills-int-client-ng/tsconfig.base.json +++ /dev/null @@ -1,20 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "es2015", - "module": "es2020", - "lib": [ - "es2018", - "dom" - ] - } -} diff --git a/skills-client-integration/skills-int-client-ng/tsconfig.json b/skills-client-integration/skills-int-client-ng/tsconfig.json deleted file mode 100644 index 93118d7b..00000000 --- a/skills-client-integration/skills-int-client-ng/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -/* - This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience. - It is not intended to be used to perform a compilation. - - To learn more about this file see: https://angular.io/config/solution-tsconfig. -*/ -{ - "files": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./e2e/tsconfig.json" - } -] -} diff --git a/skills-client-integration/skills-int-client-ng/tsconfig.spec.json b/skills-client-integration/skills-int-client-ng/tsconfig.spec.json deleted file mode 100644 index 729a6d63..00000000 --- a/skills-client-integration/skills-int-client-ng/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/skills-client-integration/skills-int-client-ng/tslint.json b/skills-client-integration/skills-int-client-ng/tslint.json deleted file mode 100644 index 67bcdea5..00000000 --- a/skills-client-integration/skills-int-client-ng/tslint.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "extends": "tslint:recommended", - "rules": { - "align": { - "options": [ - "parameters", - "statements" - ] - }, - "array-type": false, - "arrow-return-shorthand": true, - "curly": true, - "deprecation": { - "severity": "warning" - }, - "component-class-suffix": true, - "contextual-lifecycle": true, - "directive-class-suffix": true, - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], - "eofline": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": { - "options": [ - "spaces" - ] - }, - "max-classes-per-file": false, - "max-line-length": [ - true, - 140 - ], - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-empty": false, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-non-null-assertion": true, - "no-redundant-jsdoc": true, - "no-switch-case-fall-through": true, - "no-var-requires": false, - "object-literal-key-quotes": [ - true, - "as-needed" - ], - "quotemark": [ - true, - "single" - ], - "semicolon": { - "options": [ - "always" - ] - }, - "space-before-function-paren": { - "options": { - "anonymous": "never", - "asyncArrow": "always", - "constructor": "never", - "method": "never", - "named": "never" - } - }, - "typedef": [ - true, - "call-signature" - ], - "typedef-whitespace": { - "options": [ - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }, - { - "call-signature": "onespace", - "index-signature": "onespace", - "parameter": "onespace", - "property-declaration": "onespace", - "variable-declaration": "onespace" - } - ] - }, - "variable-name": { - "options": [ - "ban-keywords", - "check-format", - "allow-pascal-case" - ] - }, - "whitespace": { - "options": [ - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type", - "check-typecast" - ] - }, - "no-conflicting-lifecycle": true, - "no-host-metadata-property": true, - "no-input-rename": true, - "no-inputs-metadata-property": true, - "no-output-native": true, - "no-output-on-prefix": true, - "no-output-rename": true, - "no-outputs-metadata-property": true, - "template-banana-in-box": true, - "template-no-negated-async": true, - "use-lifecycle-interface": true, - "use-pipe-transform-interface": true - }, - "rulesDirectory": [ - "codelyzer" - ] -} \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react/.env b/skills-client-integration/skills-int-client-react/.env deleted file mode 100644 index 5f323191..00000000 --- a/skills-client-integration/skills-int-client-react/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react/.gitignore b/skills-client-integration/skills-int-client-react/.gitignore deleted file mode 100644 index 4d29575d..00000000 --- a/skills-client-integration/skills-int-client-react/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/skills-client-integration/skills-int-client-react/.npmrc b/skills-client-integration/skills-int-client-react/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-integration/skills-int-client-react/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-integration/skills-int-client-react/README.md b/skills-client-integration/skills-int-client-react/README.md deleted file mode 100644 index c1e1cad8..00000000 --- a/skills-client-integration/skills-int-client-react/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.
-You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.
-Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting - -### Analyzing the Bundle Size - -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size - -### Making a Progressive Web App - -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app - -### Advanced Configuration - -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration - -### Deployment - -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment - -### `npm run build` fails to minify - -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify diff --git a/skills-client-integration/skills-int-client-react/craco.config.js b/skills-client-integration/skills-int-client-react/craco.config.js deleted file mode 100644 index 9d2713a5..00000000 --- a/skills-client-integration/skills-int-client-react/craco.config.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const path = require('path'); - -module.exports = { - webpack: { - alias: { - 'react': path.resolve('./node_modules/react'), - 'react-dom': path.resolve('./node_modules/react-dom'), - }, - }, -}; diff --git a/skills-client-integration/skills-int-client-react/package.json b/skills-client-integration/skills-int-client-react/package.json deleted file mode 100644 index 9df616c7..00000000 --- a/skills-client-integration/skills-int-client-react/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "skills-int-client-react", - "version": "3.5.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib Integration Tests - React", - "homepage": "/react/", - "dependencies": { - "@skilltree/skills-client-react": "3.5.0", - "axios": "1.6.0", - "bootstrap": "4.5.3", - "core-js": "3.6.5", - "highlightjs": "9.16.2", - "js-beautify": "1.13.0", - "prop-types": "15.7.2", - "react": "16.13.1", - "react-bootstrap": "1.3.0", - "react-dom": "16.13.1", - "react-highlight": "0.12.0", - "react-router": "5.2.0", - "react-router-dom": "5.2.0" - }, - "scripts": { - "serve": "PORT=8083 craco start", - "buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-react/ && npm run build && cd ../skills-client-integration/skills-int-client-react/ && npm run serve", - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3;BSD-2-Clause;Apache-2.0' --summary", - "licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'", - "licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "clean": "find node_modules/ -maxdepth 1 ! -name \"@skilltree\" ! -name node_modules -exec rm -rf {} \\;", - "reinstall": "npm run clean && npm install", - "build": "npm run licenseCheck && craco build", - "test": "craco test", - "eject": "craco eject" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "react-scripts": "4.0.3", - "@craco/craco": "6.4.0" - } -} diff --git a/skills-client-integration/skills-int-client-react/pom.xml b/skills-client-integration/skills-int-client-react/pom.xml deleted file mode 100644 index 2d08941a..00000000 --- a/skills-client-integration/skills-int-client-react/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - - skills - skills-client-integration - 3.5.0-SNAPSHOT - - skills-int-client-react - - - UTF-8 - UTF-8 - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target - - - - install node and npm - - install-node-and-npm - - - v12.6.0 - - - - npm install - - npm - - generate-resources - - install - - - - npm run build - - npm - - - run build - - - - - - - - - - - - - - - - - - - - - diff --git a/skills-client-integration/skills-int-client-react/public/favicon.ico b/skills-client-integration/skills-int-client-react/public/favicon.ico deleted file mode 100644 index c2c86b85..00000000 Binary files a/skills-client-integration/skills-int-client-react/public/favicon.ico and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react/public/index.html b/skills-client-integration/skills-int-client-react/public/index.html deleted file mode 100644 index a5cbef59..00000000 --- a/skills-client-integration/skills-int-client-react/public/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - React App - - - -
- - - diff --git a/skills-client-integration/skills-int-client-react/public/logo192.png b/skills-client-integration/skills-int-client-react/public/logo192.png deleted file mode 100644 index fa313abf..00000000 Binary files a/skills-client-integration/skills-int-client-react/public/logo192.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react/public/logo512.png b/skills-client-integration/skills-int-client-react/public/logo512.png deleted file mode 100644 index bd5d4b5e..00000000 Binary files a/skills-client-integration/skills-int-client-react/public/logo512.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react/public/manifest.json b/skills-client-integration/skills-int-client-react/public/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/skills-client-integration/skills-int-client-react/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/skills-client-integration/skills-int-client-react/public/robots.txt b/skills-client-integration/skills-int-client-react/public/robots.txt deleted file mode 100644 index 01b0f9a1..00000000 --- a/skills-client-integration/skills-int-client-react/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * diff --git a/skills-client-integration/skills-int-client-react/src/App.css b/skills-client-integration/skills-int-client-react/src/App.css deleted file mode 100644 index 8602d80d..00000000 --- a/skills-client-integration/skills-int-client-react/src/App.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #09d3ac; -} diff --git a/skills-client-integration/skills-int-client-react/src/App.js b/skills-client-integration/skills-int-client-react/src/App.js deleted file mode 100644 index 3ee1aecc..00000000 --- a/skills-client-integration/skills-int-client-react/src/App.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Navigation from "./skillsDisplay/Navigation"; -import './App.css'; -import { - HashRouter as Router, - Switch, - Route, -} from "react-router-dom"; -import ShowSkills from "./skillsDisplay/ShowSkills"; -import ReportSkill from "./skillsDisplay/ReportSkill"; - -export default function App() { - return ( - -
- -
- - - - - - - - {/* - */} - -
- ); -} diff --git a/skills-client-integration/skills-int-client-react/src/index.css b/skills-client-integration/skills-int-client-react/src/index.css deleted file mode 100644 index 4448f96a..00000000 --- a/skills-client-integration/skills-int-client-react/src/index.css +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; -} diff --git a/skills-client-integration/skills-int-client-react/src/index.js b/skills-client-integration/skills-int-client-react/src/index.js deleted file mode 100644 index 886618a0..00000000 --- a/skills-client-integration/skills-int-client-react/src/index.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import ReactDOM from 'react-dom'; -import axios from 'axios'; -import './index.css'; -import 'bootstrap/dist/css/bootstrap.min.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; -import { SkillsConfiguration, Logger } from '@skilltree/skills-client-react'; - -axios.get("/api/config") - .then((result) => { - SkillsConfiguration.configure(result.data); - }) - .then(() => { - SkillsConfiguration.afterConfigure().then(() => { - if (window.Cypress) { - window.skillsLogger = Logger; - } - ReactDOM.render(, document.getElementById('root')); - }) - }); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/skills-client-integration/skills-int-client-react/src/logo.svg b/skills-client-integration/skills-int-client-react/src/logo.svg deleted file mode 100644 index 2e5df0d3..00000000 --- a/skills-client-integration/skills-int-client-react/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react/src/serviceWorker.js b/skills-client-integration/skills-int-client-react/src/serviceWorker.js deleted file mode 100644 index ad5d377c..00000000 --- a/skills-client-integration/skills-int-client-react/src/serviceWorker.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.' - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/skills-client-integration/skills-int-client-react/src/setupProxy.js b/skills-client-integration/skills-int-client-react/src/setupProxy.js deleted file mode 100644 index d00232b8..00000000 --- a/skills-client-integration/skills-int-client-react/src/setupProxy.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const proxy = require('http-proxy-middleware'); -module.exports = function(app) { - app.use( - '/api', - proxy({ - target: 'http://localhost:8090', - changeOrigin: true, - }) - ); -}; \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react/src/skillsDisplay/Navigation.js b/skills-client-integration/skills-int-client-react/src/skillsDisplay/Navigation.js deleted file mode 100644 index d4e059cb..00000000 --- a/skills-client-integration/skills-int-client-react/src/skillsDisplay/Navigation.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from "react"; -import Navbar from 'react-bootstrap/Navbar'; -import Nav from "react-bootstrap/Nav"; -import Button from "react-bootstrap/Button" -import { SkillsLevel } from '@skilltree/skills-client-react'; - -import { - NavLink -} from "react-router-dom"; - -const Navigation = () => { - - const tmpStyle = { - position:'fixed', - zIndex:1100, - right:0, - left:0, - }; - - return ( -
- - React Integration Examples - - - - - - -
- ); -}; - -export default Navigation; diff --git a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ReportSkill.js b/skills-client-integration/skills-int-client-react/src/skillsDisplay/ReportSkill.js deleted file mode 100644 index 2e1eb110..00000000 --- a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ReportSkill.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { SkillsReporter } from '@skilltree/skills-client-react'; -import axios from 'axios'; - -const beautify = require('js-beautify').js; -let selectedSkillId = ''; - -const ReportSkill = () => { - const reportSkill = (skillId, resultContainer) => { - SkillsReporter.reportSkill(skillId) - .then((response) => { - document.querySelector(resultContainer).innerHTML = JSON.stringify(response, null, 2); - }) - .catch((error) => { - console.error(error); - }); - }; - - const sampleCode = () => { - return beautify(`SkillsReporter.reportSkill(this.skill) - .then((res) => { - this.reportResult = res; - });`, {indent_size: 2, indent_level: 1, end_with_newline: false}) - }; - - const handleInputChange = (inputValue) => { - selectedSkillId = inputValue.target.value; - }; - - const [selectData, setSelectData] = React.useState([]); - - React.useEffect(()=>{ - axios.get("/api/skills") - .then((result) => { - setSelectData(result.data); - if (result.data && result.data.length > 0) { - selectedSkillId = result.data[0]; - } - }); - SkillsReporter.addSuccessHandler((result) => { - document.querySelector('#global-event-result-container').innerHTML = JSON.stringify(result, null, 2); - }); - }, []); - - const style = { - paddingTop: '55px' - }; - - return ( -
-
-

Report Skills Examples

-
Global Event Result:
-
-

-                
-
-
Report Any Skill
-
-
-                    {sampleCode()}
- -
-
-
-
- -
-
- -
-
-
-
Result:
-
-

-                    
-
-
- - -
- -
-
- ) -}; - -export default ReportSkill; diff --git a/skills-client-integration/skills-int-client-react/src/skillsDisplay/SampleCode.js b/skills-client-integration/skills-int-client-react/src/skillsDisplay/SampleCode.js deleted file mode 100644 index 719d826e..00000000 --- a/skills-client-integration/skills-int-client-react/src/skillsDisplay/SampleCode.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Highlight from 'react-highlight'; -import PropTypes from 'prop-types'; - -const beautify = require('js-beautify').js; -const beautifyHtml = require('js-beautify').html; - -const SampleCode = ({options, selectedTheme}) => { - - const sampleCode = () => { - const tags = beautifyHtml(` -
- -
-`,{indent_size: 4, indent_level: 2, end_with_newline: false, "html.format.contentUnformatted": "", "html.format.unformatted": ""}); - - const js = beautify(` -import { SkillsDisplay } from '@skilltree/skills-client-react'; - const selectedThemeObj = ${JSON.stringify(selectedTheme)}; - const MyComponent = () => { - return ( - placeholder - ) - };`, {indent_size: 2, indent_level: 1, end_with_newline: false}); - - const replacedText = js.replace('placeholder', tags); - return replacedText; - }; - - return ( -
-
-
-
- Sample Code -
-
- -
{sampleCode()}
-
-
-
-
-
- ); -}; - -SampleCode.propTypes = { - options: PropTypes.object.isRequired, - selectedTheme: PropTypes.object.isRequired -}; - -export default React.memo(SampleCode); diff --git a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ShowSkills.js b/skills-client-integration/skills-int-client-react/src/skillsDisplay/ShowSkills.js deleted file mode 100644 index 723f350c..00000000 --- a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ShowSkills.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import SkillsDisplayThemeFactory from './ThemeFactory.js'; -import SampleCode from './SampleCode'; -import { SkillsDisplay } from '@skilltree/skills-client-react'; -import DropdownButton from "react-bootstrap/DropdownButton"; -import Dropdown from 'react-bootstrap/Dropdown'; -import Button from 'react-bootstrap/Button'; -import { useHistory } from "react-router-dom"; - -const getThemes = () => { - return Object.values(SkillsDisplayThemeFactory); -}; - -const findTheme = (name) => { - return getThemes().find((item) => item.name === name); -}; - -const scrollToRef = (ref) => window.scrollTo(0, ref.current.offsetTop); - -const handleRouteChanged = (newPath) => { - document.querySelector('#skillsDisplayPath').innerHTML = `Skills Display Path: [${newPath}]`; -}; - -function usePrevious(value){ - const ref = React.useRef(); - React.useEffect(() => { - ref.current = value; - }); - return ref.current; -} - -const ShowSkill = () => { - const history = useHistory(); - - const getUrlParam = (name) => { - const urlSearchParams = new URLSearchParams(history.location.search); - return urlSearchParams.get(name); - }; - - const [selectedTheme, saveSelectedTheme] = React.useState(() => { - const urlTheme = getUrlParam("themeName"); - if(urlTheme) { - return findTheme(urlTheme); - } - return getThemes()[0]; - }); - - const [isSummaryOnly, setIsSummaryOnly] = React.useState(() => { - const urlSummaryOnly = getUrlParam('isSummaryOnly'); - if ( urlSummaryOnly ) { - return JSON.parse(urlSummaryOnly) - } - return false; - }); - - const [internalBackButton, setInternalBackButton] = React.useState(() => { - const urlInternalBackButton = getUrlParam('internalBackButton'); - if ( urlInternalBackButton ) { - return JSON.parse(urlInternalBackButton) - } - return false; - }); - - const [skillsVersion] = React.useState(() => { - const skillsVersion = getUrlParam("skillsVersion"); - if(skillsVersion) { - return skillsVersion; - } - return ''; - }); - - const [options, setOptions] = React.useState({ isSummaryOnly: isSummaryOnly, internalBackButton: internalBackButton, autoScrollStrategy: 'top-offset', scrollTopOffset: 134 }); - - const previousIsSummaryOnly = usePrevious(isSummaryOnly); - const previousInternalBackButton = usePrevious(internalBackButton); - const previousSelectedTheme = usePrevious(selectedTheme); - const previousSkillsVersion = usePrevious(skillsVersion); - - React.useEffect(() => { - const saveUrlParam = (paramsObj) => { - let params = '?'; - Object.keys(paramsObj).forEach((key) =>{ - params+=`${key}=${paramsObj[key]}&`; - }); - params = params.replace(/&$/,''); - history.replace({pathname:history.location.pathname, search: params}); - }; - - if (isSummaryOnly !== previousIsSummaryOnly || internalBackButton !== previousInternalBackButton || selectedTheme !== previousSelectedTheme) { - saveUrlParam({'isSummaryOnly': isSummaryOnly, 'internalBackButton': internalBackButton, 'themeName': selectedTheme.name, 'skillsVersion': skillsVersion}); - } - - }, [isSummaryOnly, internalBackButton, selectedTheme, skillsVersion, previousIsSummaryOnly, previousInternalBackButton, previousSelectedTheme, previousSkillsVersion, history]); - - const sampleCodeRef = React.createRef(); - const skillsDisplayRef = React.createRef(); - const executeScroll = () => scrollToRef(sampleCodeRef); - - const navigate = () => { - skillsDisplayRef.current.navigate('/subjects/subj0'); - }; - - const style = { - paddingTop: '55px' - }; - - return ( -
-
- - - { getThemes().map ( (theme) => { - return saveSelectedTheme(theme)} - key={theme.name} - eventKey={theme.name} {... (selectedTheme.name === theme.name ? {disabled:true} : "")}> - {theme.name} - - })} - - - - - - - - - -
-
- -
-
- -
- -
- -
-
- ); -}; - -export default ShowSkill; diff --git a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ThemeFactory.js b/skills-client-integration/skills-int-client-react/src/skillsDisplay/ThemeFactory.js deleted file mode 100644 index f80a5ae0..00000000 --- a/skills-client-integration/skills-int-client-react/src/skillsDisplay/ThemeFactory.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const exported = { - default: { - name: 'Bright (default)', - theme: { - backgroundColor: '#f7f7f7', - }, - }, - darkBlue: { - name: 'Dark Blue', - theme: { - backgroundColor: '#626d7d', - pageTitleTextColor: 'white', - textSecondaryColor: 'white', - textPrimaryColor: 'white', - stars: { - unearnedColor: '#787886', - earnedColor: 'gold', - }, - progressIndicators: { - beforeTodayColor: '#3e4d44', - earnedTodayColor: '#667da4', - completeColor: '#59ad52', - incompleteColor: '#cdcdcd', - }, - charts: { - axisLabelColor: 'white', - }, - tiles: { - backgroundColor:'#152E4d', - watermarkIconColor: '#a6c5f7', - }, - graphLegendBorderColor: '1px solid grey', - }, - } -}; -export default exported; diff --git a/skills-client-integration/skills-int-client-react17/.env b/skills-client-integration/skills-int-client-react17/.env deleted file mode 100644 index 5f323191..00000000 --- a/skills-client-integration/skills-int-client-react17/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react17/.gitignore b/skills-client-integration/skills-int-client-react17/.gitignore deleted file mode 100644 index b0f5288d..00000000 --- a/skills-client-integration/skills-int-client-react17/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -/skills-int-client-react.iml diff --git a/skills-client-integration/skills-int-client-react17/.npmrc b/skills-client-integration/skills-int-client-react17/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-integration/skills-int-client-react17/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-integration/skills-int-client-react17/README.md b/skills-client-integration/skills-int-client-react17/README.md deleted file mode 100644 index c1e1cad8..00000000 --- a/skills-client-integration/skills-int-client-react17/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.
-You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.
-Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting - -### Analyzing the Bundle Size - -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size - -### Making a Progressive Web App - -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app - -### Advanced Configuration - -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration - -### Deployment - -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment - -### `npm run build` fails to minify - -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify diff --git a/skills-client-integration/skills-int-client-react17/craco.config.js b/skills-client-integration/skills-int-client-react17/craco.config.js deleted file mode 100644 index 9d2713a5..00000000 --- a/skills-client-integration/skills-int-client-react17/craco.config.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const path = require('path'); - -module.exports = { - webpack: { - alias: { - 'react': path.resolve('./node_modules/react'), - 'react-dom': path.resolve('./node_modules/react-dom'), - }, - }, -}; diff --git a/skills-client-integration/skills-int-client-react17/package.json b/skills-client-integration/skills-int-client-react17/package.json deleted file mode 100644 index baf3505e..00000000 --- a/skills-client-integration/skills-int-client-react17/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "skills-int-client-react17", - "version": "3.5.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib Integration Tests - React", - "homepage": "/react17/", - "dependencies": { - "@skilltree/skills-client-react": "3.5.0", - "axios": "1.6.0", - "bootstrap": "5.1.3", - "core-js": "3.6.5", - "highlightjs": "9.16.2", - "js-beautify": "1.14.0", - "prop-types": "15.7.2", - "react": "17.0.2", - "react-bootstrap": "2.0.0", - "react-dom": "17.0.2", - "react-highlight": "0.14.0", - "react-router": "5.2.1", - "react-router-dom": "5.3.0" - }, - "scripts": { - "serve": "PORT=8084 craco start", - "buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-react/ && npm run build && cd ../skills-client-integration/skills-int-client-react/ && npm run serve", - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;0BSD;BSD-3;BSD-2-Clause;Apache-2.0' --summary", - "licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'", - "licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "clean": "find node_modules/ -maxdepth 1 ! -name \"@skilltree\" ! -name node_modules -exec rm -rf {} \\;", - "reinstall": "npm run clean && npm install", - "build": "npm run licenseCheck && craco build", - "test": "craco test", - "eject": "craco eject" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "react-scripts": "4.0.3", - "@craco/craco": "6.4.0" - } -} diff --git a/skills-client-integration/skills-int-client-react17/pom.xml b/skills-client-integration/skills-int-client-react17/pom.xml deleted file mode 100644 index a05c1fe8..00000000 --- a/skills-client-integration/skills-int-client-react17/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - - skills - skills-client-integration - 3.5.0-SNAPSHOT - - skills-int-client-react17 - - - UTF-8 - UTF-8 - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target - - - - install node and npm - - install-node-and-npm - - - v12.6.0 - - - - npm install - - npm - - generate-resources - - install - - - - npm run build - - npm - - - run build - - - - - - - - - - - - - - - - - - - - - diff --git a/skills-client-integration/skills-int-client-react17/public/favicon.ico b/skills-client-integration/skills-int-client-react17/public/favicon.ico deleted file mode 100644 index c2c86b85..00000000 Binary files a/skills-client-integration/skills-int-client-react17/public/favicon.ico and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react17/public/index.html b/skills-client-integration/skills-int-client-react17/public/index.html deleted file mode 100644 index a5cbef59..00000000 --- a/skills-client-integration/skills-int-client-react17/public/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - React App - - - -
- - - diff --git a/skills-client-integration/skills-int-client-react17/public/logo192.png b/skills-client-integration/skills-int-client-react17/public/logo192.png deleted file mode 100644 index fa313abf..00000000 Binary files a/skills-client-integration/skills-int-client-react17/public/logo192.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react17/public/logo512.png b/skills-client-integration/skills-int-client-react17/public/logo512.png deleted file mode 100644 index bd5d4b5e..00000000 Binary files a/skills-client-integration/skills-int-client-react17/public/logo512.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react17/public/manifest.json b/skills-client-integration/skills-int-client-react17/public/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/skills-client-integration/skills-int-client-react17/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/skills-client-integration/skills-int-client-react17/public/robots.txt b/skills-client-integration/skills-int-client-react17/public/robots.txt deleted file mode 100644 index 01b0f9a1..00000000 --- a/skills-client-integration/skills-int-client-react17/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * diff --git a/skills-client-integration/skills-int-client-react17/src/App.css b/skills-client-integration/skills-int-client-react17/src/App.css deleted file mode 100644 index 8602d80d..00000000 --- a/skills-client-integration/skills-int-client-react17/src/App.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #09d3ac; -} diff --git a/skills-client-integration/skills-int-client-react17/src/App.js b/skills-client-integration/skills-int-client-react17/src/App.js deleted file mode 100644 index 3ee1aecc..00000000 --- a/skills-client-integration/skills-int-client-react17/src/App.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Navigation from "./skillsDisplay/Navigation"; -import './App.css'; -import { - HashRouter as Router, - Switch, - Route, -} from "react-router-dom"; -import ShowSkills from "./skillsDisplay/ShowSkills"; -import ReportSkill from "./skillsDisplay/ReportSkill"; - -export default function App() { - return ( - -
- -
- - - - - - - - {/* - */} - -
- ); -} diff --git a/skills-client-integration/skills-int-client-react17/src/index.css b/skills-client-integration/skills-int-client-react17/src/index.css deleted file mode 100644 index 4448f96a..00000000 --- a/skills-client-integration/skills-int-client-react17/src/index.css +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; -} diff --git a/skills-client-integration/skills-int-client-react17/src/index.js b/skills-client-integration/skills-int-client-react17/src/index.js deleted file mode 100644 index 886618a0..00000000 --- a/skills-client-integration/skills-int-client-react17/src/index.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import ReactDOM from 'react-dom'; -import axios from 'axios'; -import './index.css'; -import 'bootstrap/dist/css/bootstrap.min.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; -import { SkillsConfiguration, Logger } from '@skilltree/skills-client-react'; - -axios.get("/api/config") - .then((result) => { - SkillsConfiguration.configure(result.data); - }) - .then(() => { - SkillsConfiguration.afterConfigure().then(() => { - if (window.Cypress) { - window.skillsLogger = Logger; - } - ReactDOM.render(, document.getElementById('root')); - }) - }); - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -serviceWorker.unregister(); diff --git a/skills-client-integration/skills-int-client-react17/src/logo.svg b/skills-client-integration/skills-int-client-react17/src/logo.svg deleted file mode 100644 index 2e5df0d3..00000000 --- a/skills-client-integration/skills-int-client-react17/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react17/src/serviceWorker.js b/skills-client-integration/skills-int-client-react17/src/serviceWorker.js deleted file mode 100644 index ad5d377c..00000000 --- a/skills-client-integration/skills-int-client-react17/src/serviceWorker.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.' - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/skills-client-integration/skills-int-client-react17/src/setupProxy.js b/skills-client-integration/skills-int-client-react17/src/setupProxy.js deleted file mode 100644 index d00232b8..00000000 --- a/skills-client-integration/skills-int-client-react17/src/setupProxy.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const proxy = require('http-proxy-middleware'); -module.exports = function(app) { - app.use( - '/api', - proxy({ - target: 'http://localhost:8090', - changeOrigin: true, - }) - ); -}; \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/Navigation.js b/skills-client-integration/skills-int-client-react17/src/skillsDisplay/Navigation.js deleted file mode 100644 index 8395afb0..00000000 --- a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/Navigation.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from "react"; -import Navbar from 'react-bootstrap/Navbar'; -import Nav from "react-bootstrap/Nav"; -import Button from "react-bootstrap/Button" -import { SkillsLevel } from '@skilltree/skills-client-react'; - -import { - NavLink -} from "react-router-dom"; - -const Navigation = () => { - - const tmpStyle = { - position:'fixed', - zIndex:1100, - right:0, - left:0, - }; - - return ( -
- - React v17 Integration Examples - - - - - - -
- ); -}; - -export default Navigation; diff --git a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ReportSkill.js b/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ReportSkill.js deleted file mode 100644 index 2e1eb110..00000000 --- a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ReportSkill.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { SkillsReporter } from '@skilltree/skills-client-react'; -import axios from 'axios'; - -const beautify = require('js-beautify').js; -let selectedSkillId = ''; - -const ReportSkill = () => { - const reportSkill = (skillId, resultContainer) => { - SkillsReporter.reportSkill(skillId) - .then((response) => { - document.querySelector(resultContainer).innerHTML = JSON.stringify(response, null, 2); - }) - .catch((error) => { - console.error(error); - }); - }; - - const sampleCode = () => { - return beautify(`SkillsReporter.reportSkill(this.skill) - .then((res) => { - this.reportResult = res; - });`, {indent_size: 2, indent_level: 1, end_with_newline: false}) - }; - - const handleInputChange = (inputValue) => { - selectedSkillId = inputValue.target.value; - }; - - const [selectData, setSelectData] = React.useState([]); - - React.useEffect(()=>{ - axios.get("/api/skills") - .then((result) => { - setSelectData(result.data); - if (result.data && result.data.length > 0) { - selectedSkillId = result.data[0]; - } - }); - SkillsReporter.addSuccessHandler((result) => { - document.querySelector('#global-event-result-container').innerHTML = JSON.stringify(result, null, 2); - }); - }, []); - - const style = { - paddingTop: '55px' - }; - - return ( -
-
-

Report Skills Examples

-
Global Event Result:
-
-

-                
-
-
Report Any Skill
-
-
-                    {sampleCode()}
- -
-
-
-
- -
-
- -
-
-
-
Result:
-
-

-                    
-
-
- - -
- -
-
- ) -}; - -export default ReportSkill; diff --git a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/SampleCode.js b/skills-client-integration/skills-int-client-react17/src/skillsDisplay/SampleCode.js deleted file mode 100644 index 719d826e..00000000 --- a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/SampleCode.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Highlight from 'react-highlight'; -import PropTypes from 'prop-types'; - -const beautify = require('js-beautify').js; -const beautifyHtml = require('js-beautify').html; - -const SampleCode = ({options, selectedTheme}) => { - - const sampleCode = () => { - const tags = beautifyHtml(` -
- -
-`,{indent_size: 4, indent_level: 2, end_with_newline: false, "html.format.contentUnformatted": "", "html.format.unformatted": ""}); - - const js = beautify(` -import { SkillsDisplay } from '@skilltree/skills-client-react'; - const selectedThemeObj = ${JSON.stringify(selectedTheme)}; - const MyComponent = () => { - return ( - placeholder - ) - };`, {indent_size: 2, indent_level: 1, end_with_newline: false}); - - const replacedText = js.replace('placeholder', tags); - return replacedText; - }; - - return ( -
-
-
-
- Sample Code -
-
- -
{sampleCode()}
-
-
-
-
-
- ); -}; - -SampleCode.propTypes = { - options: PropTypes.object.isRequired, - selectedTheme: PropTypes.object.isRequired -}; - -export default React.memo(SampleCode); diff --git a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ShowSkills.js b/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ShowSkills.js deleted file mode 100644 index 723f350c..00000000 --- a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ShowSkills.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import SkillsDisplayThemeFactory from './ThemeFactory.js'; -import SampleCode from './SampleCode'; -import { SkillsDisplay } from '@skilltree/skills-client-react'; -import DropdownButton from "react-bootstrap/DropdownButton"; -import Dropdown from 'react-bootstrap/Dropdown'; -import Button from 'react-bootstrap/Button'; -import { useHistory } from "react-router-dom"; - -const getThemes = () => { - return Object.values(SkillsDisplayThemeFactory); -}; - -const findTheme = (name) => { - return getThemes().find((item) => item.name === name); -}; - -const scrollToRef = (ref) => window.scrollTo(0, ref.current.offsetTop); - -const handleRouteChanged = (newPath) => { - document.querySelector('#skillsDisplayPath').innerHTML = `Skills Display Path: [${newPath}]`; -}; - -function usePrevious(value){ - const ref = React.useRef(); - React.useEffect(() => { - ref.current = value; - }); - return ref.current; -} - -const ShowSkill = () => { - const history = useHistory(); - - const getUrlParam = (name) => { - const urlSearchParams = new URLSearchParams(history.location.search); - return urlSearchParams.get(name); - }; - - const [selectedTheme, saveSelectedTheme] = React.useState(() => { - const urlTheme = getUrlParam("themeName"); - if(urlTheme) { - return findTheme(urlTheme); - } - return getThemes()[0]; - }); - - const [isSummaryOnly, setIsSummaryOnly] = React.useState(() => { - const urlSummaryOnly = getUrlParam('isSummaryOnly'); - if ( urlSummaryOnly ) { - return JSON.parse(urlSummaryOnly) - } - return false; - }); - - const [internalBackButton, setInternalBackButton] = React.useState(() => { - const urlInternalBackButton = getUrlParam('internalBackButton'); - if ( urlInternalBackButton ) { - return JSON.parse(urlInternalBackButton) - } - return false; - }); - - const [skillsVersion] = React.useState(() => { - const skillsVersion = getUrlParam("skillsVersion"); - if(skillsVersion) { - return skillsVersion; - } - return ''; - }); - - const [options, setOptions] = React.useState({ isSummaryOnly: isSummaryOnly, internalBackButton: internalBackButton, autoScrollStrategy: 'top-offset', scrollTopOffset: 134 }); - - const previousIsSummaryOnly = usePrevious(isSummaryOnly); - const previousInternalBackButton = usePrevious(internalBackButton); - const previousSelectedTheme = usePrevious(selectedTheme); - const previousSkillsVersion = usePrevious(skillsVersion); - - React.useEffect(() => { - const saveUrlParam = (paramsObj) => { - let params = '?'; - Object.keys(paramsObj).forEach((key) =>{ - params+=`${key}=${paramsObj[key]}&`; - }); - params = params.replace(/&$/,''); - history.replace({pathname:history.location.pathname, search: params}); - }; - - if (isSummaryOnly !== previousIsSummaryOnly || internalBackButton !== previousInternalBackButton || selectedTheme !== previousSelectedTheme) { - saveUrlParam({'isSummaryOnly': isSummaryOnly, 'internalBackButton': internalBackButton, 'themeName': selectedTheme.name, 'skillsVersion': skillsVersion}); - } - - }, [isSummaryOnly, internalBackButton, selectedTheme, skillsVersion, previousIsSummaryOnly, previousInternalBackButton, previousSelectedTheme, previousSkillsVersion, history]); - - const sampleCodeRef = React.createRef(); - const skillsDisplayRef = React.createRef(); - const executeScroll = () => scrollToRef(sampleCodeRef); - - const navigate = () => { - skillsDisplayRef.current.navigate('/subjects/subj0'); - }; - - const style = { - paddingTop: '55px' - }; - - return ( -
-
- - - { getThemes().map ( (theme) => { - return saveSelectedTheme(theme)} - key={theme.name} - eventKey={theme.name} {... (selectedTheme.name === theme.name ? {disabled:true} : "")}> - {theme.name} - - })} - - - - - - - - - -
-
- -
-
- -
- -
- -
-
- ); -}; - -export default ShowSkill; diff --git a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ThemeFactory.js b/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ThemeFactory.js deleted file mode 100644 index 48a10a98..00000000 --- a/skills-client-integration/skills-int-client-react17/src/skillsDisplay/ThemeFactory.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const exportedObj = { - default: { - name: 'Bright (default)', - theme: { - backgroundColor: '#f7f7f7', - }, - }, - darkBlue: { - name: 'Dark Blue', - theme: { - backgroundColor: '#626d7d', - pageTitleTextColor: 'white', - textSecondaryColor: 'white', - textPrimaryColor: 'white', - stars: { - unearnedColor: '#787886', - earnedColor: 'gold', - }, - progressIndicators: { - beforeTodayColor: '#3e4d44', - earnedTodayColor: '#667da4', - completeColor: '#59ad52', - incompleteColor: '#cdcdcd', - }, - charts: { - axisLabelColor: 'white', - }, - tiles: { - backgroundColor:'#152E4d', - watermarkIconColor: '#a6c5f7', - }, - graphLegendBorderColor: '1px solid grey', - }, - } -}; -export default exportedObj; diff --git a/skills-client-integration/skills-int-client-react18/.env b/skills-client-integration/skills-int-client-react18/.env deleted file mode 100644 index 5f323191..00000000 --- a/skills-client-integration/skills-int-client-react18/.env +++ /dev/null @@ -1 +0,0 @@ -BROWSER=none \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react18/.gitignore b/skills-client-integration/skills-int-client-react18/.gitignore deleted file mode 100644 index b0f5288d..00000000 --- a/skills-client-integration/skills-int-client-react18/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -/skills-int-client-react.iml diff --git a/skills-client-integration/skills-int-client-react18/.npmrc b/skills-client-integration/skills-int-client-react18/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-integration/skills-int-client-react18/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-integration/skills-int-client-react18/README.md b/skills-client-integration/skills-int-client-react18/README.md deleted file mode 100644 index c1e1cad8..00000000 --- a/skills-client-integration/skills-int-client-react18/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.
-You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.
-Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting - -### Analyzing the Bundle Size - -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size - -### Making a Progressive Web App - -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app - -### Advanced Configuration - -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration - -### Deployment - -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment - -### `npm run build` fails to minify - -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify diff --git a/skills-client-integration/skills-int-client-react18/craco.config.js b/skills-client-integration/skills-int-client-react18/craco.config.js deleted file mode 100644 index 9d2713a5..00000000 --- a/skills-client-integration/skills-int-client-react18/craco.config.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const path = require('path'); - -module.exports = { - webpack: { - alias: { - 'react': path.resolve('./node_modules/react'), - 'react-dom': path.resolve('./node_modules/react-dom'), - }, - }, -}; diff --git a/skills-client-integration/skills-int-client-react18/package.json b/skills-client-integration/skills-int-client-react18/package.json deleted file mode 100644 index 99e3ed67..00000000 --- a/skills-client-integration/skills-int-client-react18/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "skills-int-client-react18", - "version": "3.5.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib Integration Tests - React", - "homepage": "/react18/", - "dependencies": { - "@skilltree/skills-client-react": "3.5.0", - "axios": "1.6.0", - "bootstrap": "5.1.3", - "core-js": "3.6.5", - "js-beautify": "1.14.0", - "prop-types": "15.7.2", - "react": "18.2.0", - "react-bootstrap": "2.5.0", - "react-dom": "18.2.0", - "react-highlight": "0.14.0", - "react-router": "6.3.0", - "react-router-dom": "6.3.0" - }, - "scripts": { - "serve": "PORT=8085 craco start", - "buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-react/ && npm run build && cd ../skills-client-integration/skills-int-client-react18/ && npm run serve", - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;0BSD;BSD-3;BSD-2-Clause;Apache-2.0' --summary", - "licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'", - "licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "clean": "find node_modules/ -maxdepth 1 ! -name \"@skilltree\" ! -name node_modules -exec rm -rf {} \\;", - "reinstall": "npm run clean && npm install", - "build": "npm run licenseCheck && craco build", - "test": "craco test", - "eject": "craco eject" - }, - "eslintConfig": { - "extends": "react-app" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "react-scripts": "4.0.3", - "@craco/craco": "6.4.5" - } -} diff --git a/skills-client-integration/skills-int-client-react18/pom.xml b/skills-client-integration/skills-int-client-react18/pom.xml deleted file mode 100644 index 40e7e1f5..00000000 --- a/skills-client-integration/skills-int-client-react18/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - - skills - skills-client-integration - 3.5.0-SNAPSHOT - - skills-int-client-react18 - - - UTF-8 - UTF-8 - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target - - - - install node and npm - - install-node-and-npm - - - v12.6.0 - - - - npm install - - npm - - generate-resources - - install - - - - npm run build - - npm - - - run build - - - - - - - - - - - - - - - - - - - - - diff --git a/skills-client-integration/skills-int-client-react18/public/favicon.ico b/skills-client-integration/skills-int-client-react18/public/favicon.ico deleted file mode 100644 index c2c86b85..00000000 Binary files a/skills-client-integration/skills-int-client-react18/public/favicon.ico and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react18/public/index.html b/skills-client-integration/skills-int-client-react18/public/index.html deleted file mode 100644 index a5cbef59..00000000 --- a/skills-client-integration/skills-int-client-react18/public/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - React App - - - -
- - - diff --git a/skills-client-integration/skills-int-client-react18/public/logo192.png b/skills-client-integration/skills-int-client-react18/public/logo192.png deleted file mode 100644 index fa313abf..00000000 Binary files a/skills-client-integration/skills-int-client-react18/public/logo192.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react18/public/logo512.png b/skills-client-integration/skills-int-client-react18/public/logo512.png deleted file mode 100644 index bd5d4b5e..00000000 Binary files a/skills-client-integration/skills-int-client-react18/public/logo512.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-react18/public/manifest.json b/skills-client-integration/skills-int-client-react18/public/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/skills-client-integration/skills-int-client-react18/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/skills-client-integration/skills-int-client-react18/public/robots.txt b/skills-client-integration/skills-int-client-react18/public/robots.txt deleted file mode 100644 index 01b0f9a1..00000000 --- a/skills-client-integration/skills-int-client-react18/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * diff --git a/skills-client-integration/skills-int-client-react18/src/App.css b/skills-client-integration/skills-int-client-react18/src/App.css deleted file mode 100644 index 8602d80d..00000000 --- a/skills-client-integration/skills-int-client-react18/src/App.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #09d3ac; -} diff --git a/skills-client-integration/skills-int-client-react18/src/App.js b/skills-client-integration/skills-int-client-react18/src/App.js deleted file mode 100644 index cadaf00f..00000000 --- a/skills-client-integration/skills-int-client-react18/src/App.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Navigation from "./skillsDisplay/Navigation"; -import './App.css'; -import { - HashRouter as Router, - Routes, - Route, -} from "react-router-dom"; -import ShowSkills from "./skillsDisplay/ShowSkills"; -import ReportSkill from "./skillsDisplay/ReportSkill"; - -export default function App() { - return ( - -
- -
- - } /> - } /> - -
- ); -} diff --git a/skills-client-integration/skills-int-client-react18/src/index.css b/skills-client-integration/skills-int-client-react18/src/index.css deleted file mode 100644 index 4448f96a..00000000 --- a/skills-client-integration/skills-int-client-react18/src/index.css +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; -} diff --git a/skills-client-integration/skills-int-client-react18/src/index.js b/skills-client-integration/skills-int-client-react18/src/index.js deleted file mode 100644 index a03a6476..00000000 --- a/skills-client-integration/skills-int-client-react18/src/index.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import axios from 'axios'; -import './index.css'; -import 'bootstrap/dist/css/bootstrap.min.css'; -import App from './App'; -// import * as serviceWorker from './serviceWorker'; -import { SkillsConfiguration, Logger } from '@skilltree/skills-client-react'; - -SkillsConfiguration.afterConfigure().then(() => { - if (window.Cypress) { - window.skillsLogger = Logger; - } - const container = document.getElementById('root'); - const root = createRoot(container); // createRoot(container!) if you use TypeScript - root.render(); -}) -axios.get("/api/config") - .then((result) => { - SkillsConfiguration.configure(result.data); - }) - -// If you want your app to work offline and load faster, you can change -// unregister() to register() below. Note this comes with some pitfalls. -// Learn more about service workers: https://bit.ly/CRA-PWA -// serviceWorker.unregister(); diff --git a/skills-client-integration/skills-int-client-react18/src/logo.svg b/skills-client-integration/skills-int-client-react18/src/logo.svg deleted file mode 100644 index 2e5df0d3..00000000 --- a/skills-client-integration/skills-int-client-react18/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react18/src/serviceWorker.js b/skills-client-integration/skills-int-client-react18/src/serviceWorker.js deleted file mode 100644 index ad5d377c..00000000 --- a/skills-client-integration/skills-int-client-react18/src/serviceWorker.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// This optional code is used to register a service worker. -// register() is not called by default. - -// This lets the app load faster on subsequent visits in production, and gives -// it offline capabilities. However, it also means that developers (and users) -// will only see deployed updates on subsequent visits to a page, after all the -// existing tabs open on the page have been closed, since previously cached -// resources are updated in the background. - -// To learn more about the benefits of this model and instructions on how to -// opt-in, read https://bit.ly/CRA-PWA - -const isLocalhost = Boolean( - window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); - -export function register(config) { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { - // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebook/create-react-app/issues/2374 - return; - } - - window.addEventListener('load', () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - - if (isLocalhost) { - // This is running on localhost. Let's check if a service worker still exists or not. - checkValidServiceWorker(swUrl, config); - - // Add some additional logging to localhost, pointing developers to the - // service worker/PWA documentation. - navigator.serviceWorker.ready.then(() => { - console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' - ); - }); - } else { - // Is not localhost. Just register service worker - registerValidSW(swUrl, config); - } - }); - } -} - -function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then(registration => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been fetched, - // but the previous service worker will still serve the older - // content until all client tabs are closed. - console.log( - 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' - ); - - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); - - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } - } - } - }; - }; - }) - .catch(error => { - console.error('Error during service worker registration:', error); - }); -} - -function checkValidServiceWorker(swUrl, config) { - // Check if the service worker can be found. If it can't reload the page. - fetch(swUrl) - .then(response => { - // Ensure service worker exists, and that we really are getting a JS file. - const contentType = response.headers.get('content-type'); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf('javascript') === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { - registration.unregister().then(() => { - window.location.reload(); - }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - 'No internet connection found. App is running in offline mode.' - ); - }); -} - -export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { - registration.unregister(); - }); - } -} diff --git a/skills-client-integration/skills-int-client-react18/src/setupProxy.js b/skills-client-integration/skills-int-client-react18/src/setupProxy.js deleted file mode 100644 index d00232b8..00000000 --- a/skills-client-integration/skills-int-client-react18/src/setupProxy.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const proxy = require('http-proxy-middleware'); -module.exports = function(app) { - app.use( - '/api', - proxy({ - target: 'http://localhost:8090', - changeOrigin: true, - }) - ); -}; \ No newline at end of file diff --git a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/Navigation.js b/skills-client-integration/skills-int-client-react18/src/skillsDisplay/Navigation.js deleted file mode 100644 index 862432be..00000000 --- a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/Navigation.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from "react"; -import Navbar from 'react-bootstrap/Navbar'; -import Nav from "react-bootstrap/Nav"; -import Button from "react-bootstrap/Button" -import { SkillsLevel } from '@skilltree/skills-client-react'; - -import { - NavLink -} from "react-router-dom"; - -const Navigation = () => { - - const tmpStyle = { - position:'fixed', - zIndex:1100, - right:0, - left:0, - }; - - return ( -
- - React v18 Integration Examples - - - - - - -
- ); -}; - -export default Navigation; diff --git a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ReportSkill.js b/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ReportSkill.js deleted file mode 100644 index 2e1eb110..00000000 --- a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ReportSkill.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import { SkillsReporter } from '@skilltree/skills-client-react'; -import axios from 'axios'; - -const beautify = require('js-beautify').js; -let selectedSkillId = ''; - -const ReportSkill = () => { - const reportSkill = (skillId, resultContainer) => { - SkillsReporter.reportSkill(skillId) - .then((response) => { - document.querySelector(resultContainer).innerHTML = JSON.stringify(response, null, 2); - }) - .catch((error) => { - console.error(error); - }); - }; - - const sampleCode = () => { - return beautify(`SkillsReporter.reportSkill(this.skill) - .then((res) => { - this.reportResult = res; - });`, {indent_size: 2, indent_level: 1, end_with_newline: false}) - }; - - const handleInputChange = (inputValue) => { - selectedSkillId = inputValue.target.value; - }; - - const [selectData, setSelectData] = React.useState([]); - - React.useEffect(()=>{ - axios.get("/api/skills") - .then((result) => { - setSelectData(result.data); - if (result.data && result.data.length > 0) { - selectedSkillId = result.data[0]; - } - }); - SkillsReporter.addSuccessHandler((result) => { - document.querySelector('#global-event-result-container').innerHTML = JSON.stringify(result, null, 2); - }); - }, []); - - const style = { - paddingTop: '55px' - }; - - return ( -
-
-

Report Skills Examples

-
Global Event Result:
-
-

-                
-
-
Report Any Skill
-
-
-                    {sampleCode()}
- -
-
-
-
- -
-
- -
-
-
-
Result:
-
-

-                    
-
-
- - -
- -
-
- ) -}; - -export default ReportSkill; diff --git a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/SampleCode.js b/skills-client-integration/skills-int-client-react18/src/skillsDisplay/SampleCode.js deleted file mode 100644 index 719d826e..00000000 --- a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/SampleCode.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import Highlight from 'react-highlight'; -import PropTypes from 'prop-types'; - -const beautify = require('js-beautify').js; -const beautifyHtml = require('js-beautify').html; - -const SampleCode = ({options, selectedTheme}) => { - - const sampleCode = () => { - const tags = beautifyHtml(` -
- -
-`,{indent_size: 4, indent_level: 2, end_with_newline: false, "html.format.contentUnformatted": "", "html.format.unformatted": ""}); - - const js = beautify(` -import { SkillsDisplay } from '@skilltree/skills-client-react'; - const selectedThemeObj = ${JSON.stringify(selectedTheme)}; - const MyComponent = () => { - return ( - placeholder - ) - };`, {indent_size: 2, indent_level: 1, end_with_newline: false}); - - const replacedText = js.replace('placeholder', tags); - return replacedText; - }; - - return ( -
-
-
-
- Sample Code -
-
- -
{sampleCode()}
-
-
-
-
-
- ); -}; - -SampleCode.propTypes = { - options: PropTypes.object.isRequired, - selectedTheme: PropTypes.object.isRequired -}; - -export default React.memo(SampleCode); diff --git a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ShowSkills.js b/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ShowSkills.js deleted file mode 100644 index 74052adb..00000000 --- a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ShowSkills.js +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react'; -import SkillsDisplayThemeFactory from './ThemeFactory.js'; -import SampleCode from './SampleCode'; -import { SkillsDisplay } from '@skilltree/skills-client-react'; -import DropdownButton from "react-bootstrap/DropdownButton"; -import Dropdown from 'react-bootstrap/Dropdown'; -import Button from 'react-bootstrap/Button'; -import { useLocation, useNavigate } from 'react-router-dom'; - -const getThemes = () => { - return Object.values(SkillsDisplayThemeFactory); -}; - -const findTheme = (name) => { - return getThemes().find((item) => item.name === name); -}; - -const scrollToRef = (ref) => window.scrollTo(0, ref.current.offsetTop); - -const handleRouteChanged = (newPath) => { - document.querySelector('#skillsDisplayPath').innerHTML = `Skills Display Path: [${newPath}]`; -}; - -function usePrevious(value){ - const ref = React.useRef(); - React.useEffect(() => { - ref.current = value; - }); - return ref.current; -} -const ShowSkill = () => { - const location = useLocation(); - const navigator = useNavigate(); - - const getUrlParam = (name) => { - const urlSearchParams = new URLSearchParams(location.search); - return urlSearchParams.get(name); - }; - - const [selectedTheme, saveSelectedTheme] = React.useState(() => { - const urlTheme = getUrlParam("themeName"); - if(urlTheme) { - return findTheme(urlTheme); - } - return getThemes()[0]; - }); - - const [isSummaryOnly, setIsSummaryOnly] = React.useState(() => { - const urlSummaryOnly = getUrlParam('isSummaryOnly'); - if ( urlSummaryOnly ) { - return JSON.parse(urlSummaryOnly) - } - return false; - }); - - const [internalBackButton, setInternalBackButton] = React.useState(() => { - const urlInternalBackButton = getUrlParam('internalBackButton'); - if ( urlInternalBackButton ) { - return JSON.parse(urlInternalBackButton) - } - return false; - }); - - const [skillsVersion] = React.useState(() => { - const skillsVersion = getUrlParam("skillsVersion"); - if(skillsVersion) { - return skillsVersion; - } - return ''; - }); - - const [options, setOptions] = React.useState({ isSummaryOnly: isSummaryOnly, internalBackButton: internalBackButton, autoScrollStrategy: 'top-offset', scrollTopOffset: 134 }); - - const previousIsSummaryOnly = usePrevious(isSummaryOnly); - const previousInternalBackButton = usePrevious(internalBackButton); - const previousSelectedTheme = usePrevious(selectedTheme); - const previousSkillsVersion = usePrevious(skillsVersion); - - React.useEffect(() => { - const saveUrlParam = (paramsObj) => { - let params = '?'; - Object.keys(paramsObj).forEach((key) =>{ - params+=`${key}=${paramsObj[key]}&`; - }); - params = params.replace(/&$/,''); - navigator({pathname:location.pathname, search: params}, {replace: true}); - }; - - if (isSummaryOnly !== previousIsSummaryOnly || internalBackButton !== previousInternalBackButton || selectedTheme !== previousSelectedTheme) { - saveUrlParam({'isSummaryOnly': isSummaryOnly, 'internalBackButton': internalBackButton, 'themeName': selectedTheme.name, 'skillsVersion': skillsVersion}); - } - - }, [isSummaryOnly, internalBackButton, selectedTheme, skillsVersion, previousIsSummaryOnly, previousInternalBackButton, previousSelectedTheme, previousSkillsVersion, location, navigator]); - - const sampleCodeRef = React.createRef(); - const skillsDisplayRef = React.createRef(); - const executeScroll = () => scrollToRef(sampleCodeRef); - - const navigate = () => { - skillsDisplayRef.current.navigate('/subjects/subj0'); - }; - - const style = { - paddingTop: '55px' - }; - - return ( -
-
- - - { getThemes().map ( (theme) => { - return saveSelectedTheme(theme)} - key={theme.name} - eventKey={theme.name} {... (selectedTheme.name === theme.name ? {disabled:true} : "")}> - {theme.name} - - })} - - - - - - - - - -
-
- -
-
- -
- -
- -
-
- ); -}; - -export default ShowSkill; diff --git a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ThemeFactory.js b/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ThemeFactory.js deleted file mode 100644 index 48a10a98..00000000 --- a/skills-client-integration/skills-int-client-react18/src/skillsDisplay/ThemeFactory.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const exportedObj = { - default: { - name: 'Bright (default)', - theme: { - backgroundColor: '#f7f7f7', - }, - }, - darkBlue: { - name: 'Dark Blue', - theme: { - backgroundColor: '#626d7d', - pageTitleTextColor: 'white', - textSecondaryColor: 'white', - textPrimaryColor: 'white', - stars: { - unearnedColor: '#787886', - earnedColor: 'gold', - }, - progressIndicators: { - beforeTodayColor: '#3e4d44', - earnedTodayColor: '#667da4', - completeColor: '#59ad52', - incompleteColor: '#cdcdcd', - }, - charts: { - axisLabelColor: 'white', - }, - tiles: { - backgroundColor:'#152E4d', - watermarkIconColor: '#a6c5f7', - }, - graphLegendBorderColor: '1px solid grey', - }, - } -}; -export default exportedObj; diff --git a/skills-client-integration/skills-int-client-vue/.browserslistrc b/skills-client-integration/skills-int-client-vue/.browserslistrc deleted file mode 100644 index 20a31246..00000000 --- a/skills-client-integration/skills-int-client-vue/.browserslistrc +++ /dev/null @@ -1,8 +0,0 @@ -> 0.2% -not dead -ff >= 50 -chrome >= 70 -safari >= 9 -opera >= 60 -edge >= 16 -not ie <= 8 diff --git a/skills-client-integration/skills-int-client-vue/.npmrc b/skills-client-integration/skills-int-client-vue/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-integration/skills-int-client-vue/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-integration/skills-int-client-vue/README.md b/skills-client-integration/skills-int-client-vue/README.md deleted file mode 100644 index c8a97d27..00000000 --- a/skills-client-integration/skills-int-client-vue/README.md +++ /dev/null @@ -1,45 +0,0 @@ - - -# skills-example-client-vue - -## Project setup -``` -npm install -``` - -### Compiles and hot-reloads for development -``` -npm run serve -``` - -### Compiles and minifies for production -``` -npm run build -``` - -### Run your tests -``` -npm run test -``` - -### Lints and fixes files -``` -npm run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/skills-client-integration/skills-int-client-vue/babel.config.js b/skills-client-integration/skills-int-client-vue/babel.config.js deleted file mode 100644 index 6b829362..00000000 --- a/skills-client-integration/skills-int-client-vue/babel.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - presets: [ - ['@vue/app', { useBuiltIns: 'entry' }], - ] -} - diff --git a/skills-client-integration/skills-int-client-vue/package.json b/skills-client-integration/skills-int-client-vue/package.json deleted file mode 100644 index 94d3db19..00000000 --- a/skills-client-integration/skills-int-client-vue/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "skills-int-client-vue", - "version": "3.5.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib Integration Tests - Vue", - "scripts": { - "serve": "vue-cli-service serve", - "buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-vue/ && npm run build && cd ../skills-client-integration/skills-int-client-vue/ && npm run serve", - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-2-Clause;BSD-3-Clause;Apache-2.0' --summary", - "licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'", - "licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "build": "npm run licenseCheck && vue-cli-service build", - "lint": "vue-cli-service lint" - }, - "dependencies": { - "@skilltree/skills-client-vue": "3.5.0", - "axios": "1.6.0", - "bootstrap": "4.5.3", - "bootstrap-vue": "2.17.3", - "core-js": "3.2.1", - "highlightjs": "9.16.2", - "js-beautify": "1.13.0", - "vue": "2.6.12", - "vue-highlightjs": "1.3.3", - "vue-multiselect": "2.1.6", - "vue-router": "3.4.6", - "vue-scrollto": "2.19.1", - "vuex": "3.5.1" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "4.5.13", - "@vue/cli-plugin-eslint": "4.5.13", - "@vue/cli-service": "4.5.13", - "babel-eslint": "10.1.0", - "eslint": "6.2.0", - "eslint-plugin-vue": "7.0.1", - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "sass": "1.27.0", - "sass-loader": "10.0.3", - "vue-template-compiler": "2.6.12" - }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/essential", - "eslint:recommended" - ], - "rules": {}, - "parserOptions": { - "parser": "babel-eslint" - } - }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - } -} diff --git a/skills-client-integration/skills-int-client-vue/pom.xml b/skills-client-integration/skills-int-client-vue/pom.xml deleted file mode 100644 index 11578824..00000000 --- a/skills-client-integration/skills-int-client-vue/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - - skills - skills-client-integration - 3.5.0-SNAPSHOT - - skills-int-client-vue - - - UTF-8 - UTF-8 - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target - - - - install node and npm - - install-node-and-npm - - - ${node.version} - - - - npm install - - npm - - generate-resources - - install - - - - npm run build - - npm - - - run build - - - - - - - - - - - - - - - - - - - - - diff --git a/skills-client-integration/skills-int-client-vue/public/index.html b/skills-client-integration/skills-int-client-vue/public/index.html deleted file mode 100644 index a560fc67..00000000 --- a/skills-client-integration/skills-int-client-vue/public/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - Skills Examples - Vue.js - - - -
- - - diff --git a/skills-client-integration/skills-int-client-vue/public/skills.ico b/skills-client-integration/skills-int-client-vue/public/skills.ico deleted file mode 100644 index 59111183..00000000 Binary files a/skills-client-integration/skills-int-client-vue/public/skills.ico and /dev/null differ diff --git a/skills-client-integration/skills-int-client-vue/src/App.vue b/skills-client-integration/skills-int-client-vue/src/App.vue deleted file mode 100644 index 6236f872..00000000 --- a/skills-client-integration/skills-int-client-vue/src/App.vue +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/assets/logo.png b/skills-client-integration/skills-int-client-vue/src/assets/logo.png deleted file mode 100644 index f3d2503f..00000000 Binary files a/skills-client-integration/skills-int-client-vue/src/assets/logo.png and /dev/null differ diff --git a/skills-client-integration/skills-int-client-vue/src/components/CodeExample.vue b/skills-client-integration/skills-int-client-vue/src/components/CodeExample.vue deleted file mode 100644 index 925be731..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/CodeExample.vue +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/CodeExampleLayout.vue b/skills-client-integration/skills-int-client-vue/src/components/CodeExampleLayout.vue deleted file mode 100644 index 5e8b1aeb..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/CodeExampleLayout.vue +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/CustomizableFooter.vue b/skills-client-integration/skills-int-client-vue/src/components/CustomizableFooter.vue deleted file mode 100644 index fc4d086e..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/CustomizableFooter.vue +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/CustomizableHeader.vue b/skills-client-integration/skills-int-client-vue/src/components/CustomizableHeader.vue deleted file mode 100644 index 4948a21d..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/CustomizableHeader.vue +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/HelloWorld.vue b/skills-client-integration/skills-int-client-vue/src/components/HelloWorld.vue deleted file mode 100644 index ec033f80..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/HelloWorld.vue +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/Navigation.vue b/skills-client-integration/skills-int-client-vue/src/components/Navigation.vue deleted file mode 100644 index 68da4b91..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/Navigation.vue +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/ReportAnySkill.vue b/skills-client-integration/skills-int-client-vue/src/components/ReportAnySkill.vue deleted file mode 100644 index 3c5b2c0a..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/ReportAnySkill.vue +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/ReportSkills.vue b/skills-client-integration/skills-int-client-vue/src/components/ReportSkills.vue deleted file mode 100644 index 4833e4ce..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/ReportSkills.vue +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/SkillsFooter.vue b/skills-client-integration/skills-int-client-vue/src/components/SkillsFooter.vue deleted file mode 100644 index ea8d7d87..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/SkillsFooter.vue +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ProxyShowSkills.vue b/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ProxyShowSkills.vue deleted file mode 100644 index 19a0928b..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ProxyShowSkills.vue +++ /dev/null @@ -1,182 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ShowSkills.vue b/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ShowSkills.vue deleted file mode 100644 index 8645d0a5..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ShowSkills.vue +++ /dev/null @@ -1,211 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - - diff --git a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ThemeFactory.js b/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ThemeFactory.js deleted file mode 100644 index ff2cc37f..00000000 --- a/skills-client-integration/skills-int-client-vue/src/components/skillsDisplay/ThemeFactory.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - default: { - name: 'Bright (default)', - theme: { - backgroundColor: '#f7f7f7', - }, - }, - darkBlue: { - name: 'Dark Blue', - theme: { - backgroundColor: '#626d7d', - pageTitleTextColor: 'white', - textSecondaryColor: 'white', - textPrimaryColor: 'white', - stars: { - unearnedColor: '#787886', - earnedColor: 'gold', - }, - progressIndicators: { - beforeTodayColor: '#3e4d44', - earnedTodayColor: '#667da4', - completeColor: '#59ad52', - incompleteColor: '#cdcdcd', - }, - charts: { - axisLabelColor: 'white', - }, - tiles: { - backgroundColor:'#152E4d', - watermarkIconColor: '#a6c5f7', - }, - graphLegendBorderColor: '1px solid grey', - }, - } -} diff --git a/skills-client-integration/skills-int-client-vue/src/main.js b/skills-client-integration/skills-int-client-vue/src/main.js deleted file mode 100644 index 5a8c3ccc..00000000 --- a/skills-client-integration/skills-int-client-vue/src/main.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import Vue from 'vue'; -import BootstrapVue from 'bootstrap-vue'; -import Multiselect from 'vue-multiselect'; -import App from './App.vue'; -import router from './router'; -import axios from 'axios'; -import { SkillsDirective, SkillsConfiguration, Logger } from '@skilltree/skills-client-vue'; -import VueHighlightJS from 'vue-highlightjs' -import store from './store'; - -Vue.config.productionTip = false - -Vue.component('multiselect', Multiselect); - -Vue.use(BootstrapVue); -Vue.use(SkillsDirective); -Vue.use(VueHighlightJS) - -axios.get("/api/config") - .then((result) => { - SkillsConfiguration.configure(result.data); - SkillsConfiguration.configure(result.data); - SkillsConfiguration.configure(result.data); - store.commit('projectId', result.data.projectId); - store.commit('authenticator', result.data.authenticator); - store.commit('proxiedUserId', result.data.proxiedUserId); - store.commit('proxiedProjectId', result.data.proxiedProjectId); - }) - .then(() => { - SkillsConfiguration.afterConfigure().then(() => { - console.log('afterConfigure() - this should only be called once!'); - if (window.Cypress) { - window.skillsLogger = Logger; - } - new Vue({ - render: h => h(App), - router, - store, - }).$mount('#app'); - }) - }); diff --git a/skills-client-integration/skills-int-client-vue/src/router.js b/skills-client-integration/skills-int-client-vue/src/router.js deleted file mode 100644 index 7ad8e05c..00000000 --- a/skills-client-integration/skills-int-client-vue/src/router.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import Vue from 'vue'; -import Router from 'vue-router'; -import ReportSkills from './components/ReportSkills'; -import ShowSkills from './components/skillsDisplay/ShowSkills'; -import ProxyShowSkills from "@/components/skillsDisplay/ProxyShowSkills"; - -Vue.use(Router); - -const router = new Router({ - base: 'vuejs', - routes: [ - { - path: '/', - name: 'ReportSkills', - component: ReportSkills, - }, - { - path: '/showSkills', - name: 'ShowSkills', - component: ShowSkills, - }, - { - path: '/proxyShowSkills', - name: 'ProxyShowSkills', - component: ProxyShowSkills, - } - ] -}); - -export default router; diff --git a/skills-client-integration/skills-int-client-vue/src/store.js b/skills-client-integration/skills-int-client-vue/src/store.js deleted file mode 100644 index 77d498d7..00000000 --- a/skills-client-integration/skills-int-client-vue/src/store.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import Vue from 'vue'; -import Vuex from 'vuex'; - -Vue.use(Vuex); - -export default new Vuex.Store({ - state: { - projectId: '', - authenticator: '', - proxiedUserId: '', - proxiedProjectId: '', - }, - mutations: { - projectId(state, projectId) { - state.projectId = projectId; - }, - authenticator(state, projectSearch) { - state.projectSearch = projectSearch; - }, - proxiedUserId(state, proxiedUserId) { - state.proxiedUserId = proxiedUserId; - }, - proxiedProjectId(state, proxiedProjectId) { - state.proxiedProjectId = proxiedProjectId; - } - }, -}); diff --git a/skills-client-integration/skills-int-client-vue/vue.config.js b/skills-client-integration/skills-int-client-vue/vue.config.js deleted file mode 100644 index dffcb7ed..00000000 --- a/skills-client-integration/skills-int-client-vue/vue.config.js +++ /dev/null @@ -1,91 +0,0 @@ -const path = require('path'); -const fs = require('fs'); - -const resolve = dir => path.join(__dirname, dir); - -const getTarget = () => { - let target = 'http://localhost:8090'; - const proxySslKeyLocation = process.env.WEBPACK_DEV_SERVER_PROXY_TABLE_SSL_KEY_PATH; - const proxyCertKeyLocation = process.env.WEBPACK_DEV_SERVER_PROXY_TABLE_SSL_CERT_PATH; - if (fs.existsSync(proxySslKeyLocation) && fs.existsSync(proxyCertKeyLocation)) { - target = { - host: 'localhost', - port: 9443, - key: fs.readFileSync(proxySslKeyLocation), - cert: fs.readFileSync(proxyCertKeyLocation), - protocol: 'https:' - }; - } - return target; -}; - -const proxyConf = { - target: getTarget(), - secure: false, - changeOrigin: true, - logLevel: 'debug', -}; - -// absolute paths to all symlinked modules inside `nodeModulesPath` -// adapted from https://github.com/webpack/webpack/issues/811#issuecomment-405199263 -const findLinkedModules = (nodeModulesPath) => { - const modules = [] - - fs.readdirSync(nodeModulesPath).forEach(dirname => { - const modulePath = path.resolve(nodeModulesPath, dirname) - const stat = fs.lstatSync(modulePath) - - if (dirname.startsWith('.')) { - // not a module or scope, ignore - } else if (dirname.startsWith('@')) { - // scoped modules - modules.push(...findLinkedModules(modulePath)) - } else if (stat.isSymbolicLink()) { - const realPath = fs.realpathSync(modulePath) - const realModulePath = path.resolve(realPath, 'node_modules') - - modules.push(realModulePath) - } - }) - - return modules -}; - -module.exports = { - devServer: { - host: 'localhost', - port: 8091, - overlay: true, - proxy: { - '/api': proxyConf, - }, - }, - configureWebpack: { - resolve: { - alias: { - '@$': resolve('src'), - }, - // work with npm link - // see https://github.com/webpack/webpack/issues/985 - // see https://github.com/vuejs-templates/webpack/pull/688 - symlinks: false, - modules: [ - // provide absolute path to the main node_modules, - // to avoid webpack searching around and getting confused - // see https://webpack.js.org/configuration/resolve/#resolve-modules - path.resolve('node_modules'), - // include linked node_modules as fallback, in case the deps haven't - // yet propagated to the main node_modules - ...findLinkedModules(path.resolve('node_modules')), - ], - }, - devtool: 'source-map', - }, - publicPath: '/vuejs/', - outputDir: undefined, - assetsDir: 'static', - runtimeCompiler: true, - productionSourceMap: undefined, - parallel: undefined, - css: undefined, -}; diff --git a/skills-client-js/package.json b/skills-client-js/package.json index 22e0c1ec..cd11983e 100644 --- a/skills-client-js/package.json +++ b/skills-client-js/package.json @@ -52,11 +52,11 @@ "xhr-mock": "2.5.1" }, "dependencies": { - "axios": "1.6.2", + "@stomp/stompjs": "6.1.2", + "axios": "^1.7.4", "js-logger": "1.6.1", "postmate": "1.5.2", - "sockjs-client": "1.6.1", - "@stomp/stompjs": "6.1.2" + "sockjs-client": "1.6.1" }, "keywords": [ "SkillTree", diff --git a/skills-client-ng/.editorconfig b/skills-client-ng/.editorconfig deleted file mode 100644 index 59d9a3a3..00000000 --- a/skills-client-ng/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# Editor configuration, see https://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.ts] -quote_type = single - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/skills-client-ng/.gitignore b/skills-client-ng/.gitignore deleted file mode 100644 index a0dc764c..00000000 --- a/skills-client-ng/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc -# Only exists if Bazel was run -/bazel-out - -# dependencies -/node_modules - -# profiling files -chrome-profiler-events*.json -speed-measure-plugin*.json - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -.history/* - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db -package-lock.json diff --git a/skills-client-ng/.npmrc b/skills-client-ng/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/skills-client-ng/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/skills-client-ng/README.md b/skills-client-ng/README.md deleted file mode 100644 index 8c676be8..00000000 --- a/skills-client-ng/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -# SkillTree Angular client library - -

- - Current version - - - npm downloads - - - npm weekly downloads - - - License - -

- -SkillTree is an innovative approach to implementing application training. SkillTree's ``skills-client-ng`` project facilitates rapid integration with the SkillTree service. - -To learn about the SkillTree platform please visit our [Official Documentation](https://code.nsa.gov/skills-docs/). -These pages provide in-depth guidance on the installation, usage and contribution. - -## Installation and Usage - -To learn how to install and use this library please visit [SkillTree's Angular Integration Guide](https://code.nsa.gov/skills-docs/skills-client/angular.html). - diff --git a/skills-client-ng/angular.json b/skills-client-ng/angular.json deleted file mode 100644 index ddaacf99..00000000 --- a/skills-client-ng/angular.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "@skilltree/skills-client-ng": { - "projectType": "library", - "root": "projects/skilltree/skills-client-ng", - "sourceRoot": "projects/skilltree/skills-client-ng/src", - "prefix": "lib", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "tsConfig": "projects/skilltree/skills-client-ng/tsconfig.lib.json", - "project": "projects/skilltree/skills-client-ng/ng-package.json" - }, - "configurations": { - "production": { - "tsConfig": "projects/skilltree/skills-client-ng/tsconfig.lib.prod.json" - } - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "projects/skilltree/skills-client-ng/src/test.ts", - "tsConfig": "projects/skilltree/skills-client-ng/tsconfig.spec.json", - "karmaConfig": "projects/skilltree/skills-client-ng/karma.conf.js" - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/skilltree/skills-client-ng/tsconfig.lib.json", - "projects/skilltree/skills-client-ng/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - } - } - }}, - "defaultProject": "@skilltree/skills-client-ng" -} diff --git a/skills-client-ng/license-add/LICENSE-HEADER.txt b/skills-client-ng/license-add/LICENSE-HEADER.txt deleted file mode 100644 index 641df477..00000000 --- a/skills-client-ng/license-add/LICENSE-HEADER.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/skills-client-ng/license-add/license-add-config.json b/skills-client-ng/license-add/license-add-config.json deleted file mode 100644 index 977e8ac2..00000000 --- a/skills-client-ng/license-add/license-add-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "ignore": [ ".git", "coverage", ".*/**", ".*", "*.iml", "tsconfig.*", "skills.d.ts", "angular.json", "**/version.js"], - "license": "license-add/LICENSE-HEADER.txt", - "licenseFormats": { - "js": { - "prepend": "/*", - "append": " */", - "eachLine": { - "prepend": " * " - } - }, - "dotfile": { - "eachLine": { - "prepend": "# " - } - }, - "md": { - "prepend": "" - } - }, - "trailingWhitespace": "TRIM" -} diff --git a/skills-client-ng/package.json b/skills-client-ng/package.json deleted file mode 100644 index 888044dc..00000000 --- a/skills-client-ng/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "skills-client-ng-parent", - "version": "3.6.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib - Angular", - "author": "SkillTree Team", - "scripts": { - "licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;Apache-2.0;0BSD' --summary", - "licenseHeaderCheck": " npx license-check-and-add check -f license-add/license-add-config.json", - "licenseHeaderAdd": " npx license-check-and-add add -f license-add/license-add-config.json", - "licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ", - "ng": "ng", - "start": "ng serve", - "serve": "ng serve", - "build": "npm run licenseCheck && npm run prepare && ng build --configuration production", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e", - "prepare": "cd projects/skilltree/skills-client-ng && npm run prepare && cd -" - }, - "dependencies": { - "@angular/animations": "14.3.0", - "@angular/common": "14.3.0", - "@angular/compiler": "14.3.0", - "@angular/core": "14.3.0", - "@angular/forms": "14.3.0", - "@angular/platform-browser": "14.3.0", - "@angular/platform-browser-dynamic": "14.3.0", - "@angular/router": "14.3.0", - "@skilltree/skills-client-js": "3.5.0", - "lodash-es": "4.17.21", - "rxjs": "6.6.3", - "tslib": "2.3.0", - "zone.js": "0.12.0" - }, - "devDependencies": { - "@angular-devkit/build-angular": "14.2.11", - "@angular/cli": "14.2.11", - "@angular/compiler-cli": "14.3.0", - "@types/jasmine": "3.6.0", - "@types/jasminewd2": "2.0.8", - "@types/lodash-es": "4.17.4", - "@types/node": "14.11.8", - "codelyzer": "6.0.2", - "jasmine-core": "3.6.0", - "jasmine-spec-reporter": "6.0.0", - "karma": "6.4.1", - "karma-chrome-launcher": "3.1.0", - "karma-coverage-istanbul-reporter": "3.0.3", - "karma-jasmine": "4.0.1", - "karma-jasmine-html-reporter": "1.5.4", - "license-check-and-add": "3.0.4", - "license-checker": "25.0.1", - "ng-packagr": "14.2.2", - "protractor": "7.0.0", - "ts-node": "9.0.0", - "tslint": "6.1.3", - "typescript": "4.6.2" - }, - "keywords": [ - "SkillTree", - "gamification", - "training", - "User Engagement", - "Rapid Integration", - "Angular", - "AngularJS" - ], - "homepage": "https://code.nsa.gov/skills-docs/", - "repository": { - "type": "git", - "url": "git+https://github.com/NationalSecurityAgency/skills-client.git" - }, - "bugs": { - "url": "https://github.com/NationalSecurityAgency/skills-client/issues" - } -} diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/LICENSE.txt b/skills-client-ng/projects/skilltree/skills-client-ng/LICENSE.txt deleted file mode 100644 index d6456956..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/README.md b/skills-client-ng/projects/skilltree/skills-client-ng/README.md deleted file mode 100644 index 8c676be8..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -# SkillTree Angular client library - -

- - Current version - - - npm downloads - - - npm weekly downloads - - - License - -

- -SkillTree is an innovative approach to implementing application training. SkillTree's ``skills-client-ng`` project facilitates rapid integration with the SkillTree service. - -To learn about the SkillTree platform please visit our [Official Documentation](https://code.nsa.gov/skills-docs/). -These pages provide in-depth guidance on the installation, usage and contribution. - -## Installation and Usage - -To learn how to install and use this library please visit [SkillTree's Angular Integration Guide](https://code.nsa.gov/skills-docs/skills-client/angular.html). - diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/karma.conf.js b/skills-client-ng/projects/skilltree/skills-client-ng/karma.conf.js deleted file mode 100644 index 6b6e81d5..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/karma.conf.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../../coverage/skilltree/skills-client-ng'), - reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/ng-package.json b/skills-client-ng/projects/skilltree/skills-client-ng/ng-package.json deleted file mode 100644 index 7654b974..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/ng-package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../../dist/skilltree/skills-client-ng", - "lib": { - "entryFile": "src/public-api.ts" - }, - "allowedNonPeerDependencies": [ - "skilltree", - "lodash" - ] -} diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/ngcc.config.js b/skills-client-ng/projects/skilltree/skills-client-ng/ngcc.config.js deleted file mode 100644 index 38640c30..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/ngcc.config.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2020 SkillTree - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -module.exports = { - ignorableDeepImportMatchers: [ - /lodash.*/, - ] -} \ No newline at end of file diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/package.json b/skills-client-ng/projects/skilltree/skills-client-ng/package.json deleted file mode 100644 index 4a5d8f3e..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@skilltree/skills-client-ng", - "version": "3.6.0", - "license": "Apache-2.0", - "description": "SkillTree Client Lib - Angular", - "author": "SkillTree Team", - "scripts": { - "prepare": "node -e \"console.log('APP_VERSION = \\''+ process.env.npm_package_name + '-' + process.env.npm_package_version +'\\';')\" > src/version.js" - }, - "peerDependencies": { - "@angular/common": "14.3.0", - "@angular/core": "14.3.0" - }, - "dependencies": { - "tslib": "2.0.0", - "@skilltree/skills-client-js": "3.5.0" - }, - "keywords": [ - "SkillTree", - "gamification", - "training", - "User Engagement", - "Rapid Integration", - "Angular", - "AngularJS" - ], - "homepage": "https://code.nsa.gov/skills-docs/", - "repository": { - "type": "git", - "url": "git+https://github.com/NationalSecurityAgency/skills-client.git" - }, - "bugs": { - "url": "https://github.com/NationalSecurityAgency/skills-client/issues" - } -} diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.component.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.component.ts deleted file mode 100644 index bd505f82..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.component.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit, Input, OnDestroy } from '@angular/core'; -// @ts-ignore -import { SkillsDisplayJS } from '@skilltree/skills-client-js' - -@Component({ - selector: 'skills-display', - template: ` -
- `, - styles: [ - ] -}) -export class SkillsDisplayComponent implements OnInit, OnDestroy { - clientDisplay: any - - @Input() options: any; - @Input() version: number; - @Input() theme: string; - @Input() userId: string; - @Input() handleRouteChanged: Function; - constructor() { } - - ngOnInit(): void { - this.clientDisplay = new SkillsDisplayJS({ - options: this.options, - version: this.version, - theme: this.theme, - userId: this.userId, - handleRouteChanged: this.handleRouteChanged, - }); - this.clientDisplay.attachTo(document.getElementById('clientDisplayContainer')); - } - - navigate(path: string): void { - if (this.clientDisplay) { - this.clientDisplay.navigate(path); - } - } - - ngOnDestroy(): void { - if (this.clientDisplay) { - this.clientDisplay.destroy(); - } - } -} diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.module.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.module.ts deleted file mode 100644 index 4d548b83..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-display.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { NgModule } from '@angular/core'; -import { CommonModule } from "@angular/common" -import { SkillsDisplayComponent } from './skills-display.component'; - - - -@NgModule({ - declarations: [SkillsDisplayComponent], - imports: [ - CommonModule - ], - exports: [SkillsDisplayComponent] -}) -export class SkillsDisplayModule { } diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.spec.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.spec.ts deleted file mode 100644 index 725b7449..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { SkillsLevelComponent } from './skills-level.component'; - -describe('SkillsLevelComponent', () => { - let component: SkillsLevelComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ SkillsLevelComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SkillsLevelComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.ts deleted file mode 100644 index 71fb2b89..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Component, OnInit, Input, AfterViewChecked } from '@angular/core'; -// @ts-ignore -import { SkillsConfiguration, SkillsLevelJS } from '@skilltree/skills-client-js' - -@Component({ - selector: 'skills-level', - template: ` -
- -
- `, - styles: [ - ] -}) -export class SkillsLevelComponent implements OnInit { - skillLevelJS: any - skillLevel: string - - @Input() projectId: string; - constructor() { } - - ngOnInit(): void { - SkillsConfiguration.afterConfigure() - .then(() => { - this.skillLevelJS = new SkillsLevelJS(this.getProjectId()); - this.skillLevelJS.attachTo(document.getElementById('skills-level-text-display')); - }); - } - - getProjectId() { - let projectId = this.projectId; - if (!projectId) { - projectId = SkillsConfiguration.getProjectId(); - } - return projectId; - } - - getSkillLevel() { - let skillLevel = null; - if (this.skillLevelJS && this.skillLevelJS.skillLevel !== undefined) { - skillLevel = this.skillLevelJS.skillLevel; - } - return skillLevel; - } - -} diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.components.css b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.components.css deleted file mode 100644 index d2009c8b..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.components.css +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -[hidden] { - display: none !important; -} \ No newline at end of file diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.module.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.module.ts deleted file mode 100644 index 088321b4..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/components/skills-level.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { NgModule } from '@angular/core'; -import { CommonModule } from "@angular/common" -import { SkillsLevelComponent } from './skills-level.component'; - - - -@NgModule({ - declarations: [SkillsLevelComponent], - imports: [ - CommonModule - ], - exports: [SkillsLevelComponent] -}) -export class SkillsLevelModule { } diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.spec.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.spec.ts deleted file mode 100644 index c2d21f03..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { SkilltreeDirective } from './skilltree.directive'; -import { ElementRef } from '@angular/core'; -import { async, TestBed } from '@angular/core/testing'; - -export class MockElementRef extends ElementRef { - constructor() { super(null); } -} - - -describe('SkilltreeDirective', () => { - - it('should create an instance', () => { - const directive = new SkilltreeDirective(new MockElementRef()); - expect(directive).toBeTruthy(); - }); -}); diff --git a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.ts b/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.ts deleted file mode 100644 index 94f89876..00000000 --- a/skills-client-ng/projects/skilltree/skills-client-ng/src/lib/directives/skilltree/skilltree.directive.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2020 SkillTree - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -import { Directive, ElementRef, HostListener, Input, Output, EventEmitter } from '@angular/core'; -import debounce from 'lodash/debounce'; - -import { - SkillsReporter, - SUCCESS_EVENT, - FAILURE_EVENT -} from '@skilltree/skills-client-js'; - - -@Directive({ - selector: '[skilltree]' -}) -export class SkilltreeDirective { - - static readonly BUTTON: string = 'BUTTON'; - static readonly INPUT: string = 'INPUT'; - private nodeName: string - - constructor(private el: ElementRef) { - this.nodeName = el.nativeElement.nodeName; - if (this.nodeName !== SkilltreeDirective.BUTTON && this.nodeName !== SkilltreeDirective.INPUT) { - throw `Unsupported node type [${this.nodeName}], skilltree directive only support