Skip to content

Commit

Permalink
Merge branch 'master' into fix-js-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bizz committed Nov 19, 2024
2 parents a5b4658 + 88d170f commit b506412
Show file tree
Hide file tree
Showing 18 changed files with 3,881 additions and 4,659 deletions.
4 changes: 2 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
# For IE 9-11, 11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
IE 11
# IE 11
# IE 9-11
8 changes: 3 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"labels": [ "dependencies" ],
"extends": ["config:recommended"],
"labels": ["dependencies"],
"separateMultipleMajor": true,
"dependencyDashboard": true
"dependencyDashboard": true
}
7 changes: 2 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version-file: .tool-versions

- name: 📦 Install dependencies
run: yarn install
Expand Down Expand Up @@ -60,13 +60,10 @@ jobs:
- name: Repository checkout
uses: actions/checkout@v4

- name: Install AWSCLI
run: pip install --user awscli

- name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version-file: .tool-versions

- name: 📦 Install dependencies
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.20.0
nodejs 18.19.0
12 changes: 6 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
}
],
"optimization": true,
"outputHashing": "all",
"vendorChunk": true,
"sourceMap": true,
"namedChunks": false,
Expand All @@ -83,21 +82,21 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "knowgod:build"
"buildTarget": "knowgod:build"
},
"configurations": {
"production": {
"browserTarget": "knowgod:build:production"
"buildTarget": "knowgod:build:production"
},
"development": {
"browserTarget": "knowgod:build:development"
"buildTarget": "knowgod:build:development"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "knowgod:build"
"buildTarget": "knowgod:build"
}
},
"test": {
Expand Down Expand Up @@ -157,6 +156,7 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
}
}
28 changes: 0 additions & 28 deletions e2e/protractor.conf.js

This file was deleted.

14 changes: 0 additions & 14 deletions e2e/src/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions e2e/src/app.po.ts

This file was deleted.

13 changes: 0 additions & 13 deletions e2e/tsconfig.e2e.json

This file was deleted.

55 changes: 26 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,66 @@
"start:dev": "ng serve --configuration development",
"build": "ng build --configuration production",
"build:dev": "ng build --configuration development",
"test": "ng test",
"test": "ng test --watch=false",
"lint": "npx eslint 'src/**/*.{js,ts}' --quiet --fix",
"e2e": "ng e2e",
"prettier:check": "prettier '{{src,embed}/**/*.{js,json,ts,tsx,html},./*.{js,json,ts,tsx,yml,html}}' --list-different",
"prettier:write": "prettier '{{src,embed}/**/*.{js,json,ts,tsx,html},./*.{js,json,ts,tsx,yml,html}}' --write",
"precommit": "pretty-quick --staged"
},
"private": true,
"dependencies": {
"@angular/animations": "^13.4.0",
"@angular/common": "^13.4.0",
"@angular/compiler": "^13.4.0",
"@angular/core": "^13.4.0",
"@angular/forms": "^13.4.0",
"@angular/platform-browser": "^13.4.0",
"@angular/platform-browser-dynamic": "^13.4.0",
"@angular/router": "^13.4.0",
"@angular/animations": "^17.3.12",
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/forms": "^17.3.12",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@cruglobal/godtools-shared": "1.0.1",
"@rails/actioncable": "^7.0.0",
"core-js": "^2.5.4",
"core-js": "^3.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.0",
"lottie-web": "5.12.2",
"ngx-lottie": "8.3.0",
"ngx-toastr": "13.2.1",
"ngx-lottie": "^8.3.0",
"ngx-toastr": "^17.0.2",
"rxjs": "^6.6.7",
"ts-clipboard": "^1.0.17",
"tslib": "^2.0.0",
"tslib": "^2.6.2",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.11",
"@angular-devkit/build-angular": "^17.3.11",
"@angular-eslint/builder": "16.1.0",
"@angular-eslint/eslint-plugin": "16.1.0",
"@angular-eslint/eslint-plugin-template": "16.1.0",
"@angular-eslint/schematics": "16.1.0",
"@angular-eslint/template-parser": "16.1.0",
"@angular/cli": "~13.3.11",
"@angular/compiler-cli": "^13.4.0",
"@angular/language-service": "^13.4.0",
"@angular/cli": "^17.3.11",
"@angular/compiler-cli": "^17.3.12",
"@angular/language-service": "^17.3.12",
"@types/jasmine": "~3.10.0",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^18.0.0",
"@types/text-encoding": "0.0.35",
"@types/xml2js": "^0.4.8",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"eslint": "^8.33.0",
"husky": "^8.0.0",
"jasmine-core": "~4.6.0",
"jasmine-spec-reporter": "~6.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^1.7.0",
"prettier": "^3.0.0",
"pretty-quick": "^3.1.0",
"protractor": "~7.0.0",
"stream": "^0.0.2",
"stream": "^0.0.3",
"timers": "^0.1.1",
"ts-node": "~9.1.1",
"typescript": "4.6.4"
"typescript": "^5.2.2"
}
}
9 changes: 6 additions & 3 deletions src/app/_tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ const standardTypeValues = () => {
const createText = (text: string): Text => {
return {
text: text,
textAlign: null,
textColor: null,
textAlign: {
name: 'START',
ordinal: 0
},
textColor: '#000000',
textScale: null,
_textStyles: null,
_textStyles: [],
minimumLines: null,
startImage: null,
startImageSize: null,
Expand Down
3 changes: 1 addition & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ export function playerFactory() {
FormsModule,
RouterModule.forRoot(appRoutes, {
anchorScrolling: 'enabled',
scrollPositionRestoration: 'enabled', // Scrolls to top when fragment is removed
relativeLinkResolution: 'legacy'
scrollPositionRestoration: 'enabled' // Scrolls to top when fragment is removed
}),
BrowserAnimationsModule,
ToastrModule.forRoot({
Expand Down
28 changes: 21 additions & 7 deletions src/app/page/component/content-text/content-text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,28 @@ export class ContentTextComponent implements OnChanges {
}

private init(): void {
const styles = {};
this.text?.textStyles?.forEach((style) => {
if (style.name === 'BOLD') styles['font-weight'] = 'bold';
if (style.name === 'ITALIC') styles['font-style'] = 'italic';
if (style.name === 'UNDERLINE') styles['text-decoration'] = 'underline';
});
const styles = {
'font-weight': this.text.textStyles?.some(
(style) => style.name === 'BOLD'
)
? 'bold'
: '',
'font-style': this.text.textStyles?.some(
(style) => style.name === 'ITALIC'
)
? 'italic'
: '',
'text-decoration': this.text.textStyles?.some(
(style) => style.name === 'UNDERLINE'
)
? 'underline'
: '',
'text-align': this.text.textAlign.name || '',
color: this.text.textColor || ''
};

this.textColor = this.text?.textColor || null;
this.styles = styles;
this.textColor = this.text.textColor || null;
const text = parseTextAddBrTags(this.text.text);
this.textValue = text || '';
this.ready = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
id="toolContent"
[ngClass]="{
tc: (isFirstPage$ | async) || (isLastPage$ | async),
tc: isLastPage$ | async,
firstPage: isFirstPage$ | async,
lastPage: isLastPage$ | async,
hasPageHeader: hasPageHeader
Expand Down
32 changes: 16 additions & 16 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es/symbol';
import 'core-js/es/object';
import 'core-js/es/function';
import 'core-js/es/parse-int';
import 'core-js/es/parse-float';
import 'core-js/es/number';
import 'core-js/es/math';
import 'core-js/es/string';
import 'core-js/es/date';
import 'core-js/es/array';
import 'core-js/es/regexp';
import 'core-js/es/map';
import 'core-js/es/weak-map';
import 'core-js/es/set';

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
// import 'core-js/es/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';
import 'core-js/es/reflect';

/**
* By default, zone.js will patch all possible macroTask and DomEvents
Expand Down
4 changes: 0 additions & 4 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ TestBed.initTestEnvironment(
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"declaration": false,
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "es2015",
"target": "ES2022",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"]
}
Expand Down
Loading

0 comments on commit b506412

Please sign in to comment.