forked from tykayn/funky-framadate-front
Compare commits
73 Commits
master
...
166-setup-
Author | SHA1 | Date | |
---|---|---|---|
|
099cba4a55 | ||
|
9d41a73868 | ||
|
645bd6f4d6 | ||
|
b77a97a4c6 | ||
|
6bd1fd9dc5 | ||
|
328bce1187 | ||
|
fd5e895343 | ||
|
db68c29a8d | ||
|
65381ee9ce | ||
|
641a16565f | ||
|
40ddc38848 | ||
|
7f23e23858 | ||
|
43be993243 | ||
|
ee388093ce | ||
|
f718f9c543 | ||
|
b2334a51ba | ||
|
54abce284f | ||
|
218cd92236 | ||
|
971c0b3e81 | ||
|
0fda02584f | ||
|
ab0abd6686 | ||
|
e567106d99 | ||
|
b8496afbb2 | ||
|
061e210404 | ||
|
2bf832a8eb | ||
|
cb90726e82 | ||
|
0eb57aae41 | ||
|
b99efd0f37 | ||
|
ea85d3c851 | ||
|
d4f2e3cad2 | ||
|
816b1e871f | ||
|
434c0f4cf9 | ||
|
54329467c4 | ||
|
4f38c78a2b | ||
|
a726e3ed34 | ||
|
a8ffc53c00 | ||
|
95bbd2a48a | ||
|
ea09c4e854 | ||
|
ad9876633b | ||
|
533ea81301 | ||
|
041c58c368 | ||
|
3c4bc0fe18 | ||
|
4f924ee85c | ||
|
fcd42fcee4 | ||
|
4dd3827eb5 | ||
|
dd31b3551d | ||
|
592dc1dd6e | ||
|
20ee9cd3d9 | ||
|
be433622ab | ||
|
6ba02f50c7 | ||
|
17d48b4bc8 | ||
|
b7998eb46b | ||
|
bae08734f1 | ||
|
3658132ec6 | ||
|
334a93086a | ||
|
283c278eac | ||
|
9e82a9fbea | ||
|
5f80caa748 | ||
|
13d2febf6b | ||
|
7b82d281c4 | ||
|
b754c758f4 | ||
|
112645af2f | ||
|
7aec3068e2 | ||
|
8b74a8d340 | ||
|
2548f0f393 | ||
|
65e84666f0 | ||
|
a1a8ae8d14 | ||
|
96b9910997 | ||
|
0197fbc0b7 | ||
|
8adb37bf21 | ||
|
75c68d7107 | ||
|
0e46016535 | ||
|
5d77266d05 |
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@ -0,0 +1,8 @@
|
||||
.angular/
|
||||
node_modules/
|
||||
dist/
|
||||
docs/
|
||||
e2e/
|
||||
**/*.log
|
||||
**/.DS_Store
|
||||
**/Thumbs.db
|
@ -11,3 +11,6 @@ trim_trailing_whitespace = true
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yaml]
|
||||
indent_style = space
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -35,6 +35,7 @@ speed-measure-plugin*.json
|
||||
.idea
|
||||
|
||||
# misc
|
||||
/.angular/cache
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
|
@ -1,16 +1,19 @@
|
||||
# image: weboaks/node-karma-protractor-chrome
|
||||
image: node:12.22.5
|
||||
# image: node:16
|
||||
include:
|
||||
- "kaniko-build.gitlab-ci.yml"
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
# - pages
|
||||
# - test
|
||||
# - e2e
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
- .yarn
|
||||
# cache:
|
||||
# paths:
|
||||
# - node_modules/
|
||||
# - .yarn
|
||||
|
||||
#pages:
|
||||
# stage: pages
|
||||
@ -37,14 +40,39 @@ cache:
|
||||
# cache:
|
||||
# policy: pull
|
||||
|
||||
build:
|
||||
build-image:
|
||||
stage: build
|
||||
before_script:
|
||||
- yarn
|
||||
tags:
|
||||
- docker
|
||||
extends: .kaniko_build
|
||||
variables:
|
||||
PUSH_IMAGE: "true"
|
||||
REGISTRY_PATH: "${HARBOR_HOST}/${HARBOR_PROJECT}"
|
||||
REGISTRY_IMAGE_PATH: "${REGISTRY_PATH}/${CI_PROJECT_NAME}:develop"
|
||||
only:
|
||||
- develop
|
||||
|
||||
deploy-image:
|
||||
stage: deploy
|
||||
image:
|
||||
name: bitnami/kubectl:latest
|
||||
entrypoint: ['']
|
||||
script:
|
||||
- yarn run build:prod:demobliss
|
||||
cache:
|
||||
policy: pull
|
||||
- kubectl config get-contexts
|
||||
- kubectl config use-context framasoft/framadate/funky-framadate-front:framadate-cluster
|
||||
- kubectl -n framadate rollout restart deployments/frontend-deployment
|
||||
only:
|
||||
- develop
|
||||
|
||||
# build:
|
||||
# image: node:16
|
||||
# stage: build
|
||||
# before_script:
|
||||
# - yarn
|
||||
# script:
|
||||
# - yarn run build:prod
|
||||
# cache:
|
||||
# policy: pull
|
||||
|
||||
#e2e:
|
||||
# stage: e2e
|
||||
|
1
.gitlab/agents/framadate-cluster/config.yaml
Normal file
1
.gitlab/agents/framadate-cluster/config.yaml
Normal file
@ -0,0 +1 @@
|
||||
|
0
.gitlab/agents/framadate-local-cluster/config.yaml
Normal file
0
.gitlab/agents/framadate-local-cluster/config.yaml
Normal file
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# Create stage to build angular application
|
||||
FROM node:18.15.0-alpine AS angular-builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
|
||||
RUN yarn install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn run build:prod
|
||||
|
||||
# Build NGINX Image to serve builded files
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Copy dist folder fro build stage to nginx public folder
|
||||
COPY --from=angular-builder /app/dist/framadate /app
|
||||
|
||||
# Start NgInx service
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
37
angular.json
37
angular.json
@ -22,11 +22,9 @@
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": [
|
||||
"node_modules/prismjs/themes/prism-okaidia.css",
|
||||
"node_modules/fork-awesome/css/fork-awesome.min.css",
|
||||
"node_modules/bulma-switch/dist/css/bulma-switch.min.css",
|
||||
"node_modules/primeicons/primeicons.css",
|
||||
@ -35,11 +33,18 @@
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [
|
||||
"node_modules/chart.js/dist/Chart.min.js",
|
||||
"node_modules/marked/lib/marked.js",
|
||||
"node_modules/chart.js/dist/chart.umd.js",
|
||||
"node_modules/marked/marked.min.js",
|
||||
"node_modules/prismjs/prism.js",
|
||||
"node_modules/prismjs/components/prism-css.min.js"
|
||||
]
|
||||
],
|
||||
"aot": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"buildOptimizer": false,
|
||||
"sourceMap": true,
|
||||
"optimization": false,
|
||||
"namedChunks": true
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@ -52,7 +57,6 @@
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
@ -72,7 +76,8 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": ""
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
@ -95,19 +100,6 @@
|
||||
"builder": "@angular-builders/jest:run",
|
||||
"options": {}
|
||||
},
|
||||
"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": {
|
||||
@ -123,7 +115,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "framadate",
|
||||
"cli": {
|
||||
"analytics": "0ba9c0a9-850f-4c5f-8124-cbe6f4c79ef1"
|
||||
}
|
||||
|
13
compose.yaml
Normal file
13
compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
date-front:
|
||||
image: node:lts-slim
|
||||
entrypoint:
|
||||
- "bash"
|
||||
- "docker/dev/entrypoint.sh"
|
||||
volumes:
|
||||
- '.:/var/www/html/funky-framadate-front'
|
||||
working_dir: '/var/www/html/funky-framadate-front'
|
||||
environment:
|
||||
- "NODE_OPTIONS=--openssl-legacy-provider"
|
||||
ports:
|
||||
- "4200:4200"
|
2
docker/dev/entrypoint.sh
Executable file
2
docker/dev/entrypoint.sh
Executable file
@ -0,0 +1,2 @@
|
||||
yarn install --pure-lockfile
|
||||
yarn start_docker
|
58
docker/nginx/nginx.conf
Normal file
58
docker/nginx/nginx.conf
Normal file
@ -0,0 +1,58 @@
|
||||
worker_processes 1;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /tmp/nginx.pid;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
client_body_temp_path /tmp/client_temp;
|
||||
proxy_temp_path /tmp/proxy_temp_path;
|
||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||
scgi_temp_path /tmp/scgi_temp;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
gzip_vary on;
|
||||
gzip_proxied no-cache no-store private expired auth;
|
||||
gzip_min_length 10240;
|
||||
gzip_types
|
||||
application/javascript
|
||||
application/json
|
||||
font/woff2
|
||||
text/css
|
||||
text/plain;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
location / {
|
||||
root /app;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
location ~* (\.html|\/sw\.js)$ {
|
||||
root /app;
|
||||
expires -1y;
|
||||
add_header Pragma "no-cache";
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|json)$ {
|
||||
root /app;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"target": "es2018",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
|
69
kaniko-build.gitlab-ci.yml
Normal file
69
kaniko-build.gitlab-ci.yml
Normal file
@ -0,0 +1,69 @@
|
||||
# FROM https://gitlab.cern.ch/ci-tools/container-image-ci-templates/
|
||||
|
||||
# Defining the variables which can be overridden while using the template file in .gitlab-ci.yml
|
||||
# REGISTRY_IMAGE_PATH: Defines where the image should be pushed to.
|
||||
# CONTEXT_DIR: Defines the context dir for the image build
|
||||
# DOCKER_FILE_NAME: Defines the name of the Dockerfile
|
||||
# PUSH_IMAGE: If the gitlab step should push the built image
|
||||
# BUILD_ARGS: The build-time variables
|
||||
|
||||
variables:
|
||||
CONTEXT_DIR: ""
|
||||
DOCKER_FILE_NAME: "Dockerfile"
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
PUSH_IMAGE: "false"
|
||||
BUILD_ARGS: ""
|
||||
|
||||
.kaniko_build:
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
image:
|
||||
# Using the official kaniko v1.6 image for the builds
|
||||
name: gcr.io/kaniko-project/executor:v1.6.0-debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- |
|
||||
if [ -z "${REGISTRY_IMAGE_PATH}" ]; then
|
||||
echo "ERROR: CI variable REGISTRY_IMAGE_PATH is mandatory."
|
||||
exit 1
|
||||
fi
|
||||
- REGISTRY=$(echo ${REGISTRY_IMAGE_PATH} | cut -d / -f 1)
|
||||
- >
|
||||
if [ -z "${CONTEXT_DIR}" ]; then
|
||||
KANIKO_CONTEXT_DIR=${CI_PROJECT_DIR}
|
||||
else
|
||||
KANIKO_CONTEXT_DIR=${CI_PROJECT_DIR}/${CONTEXT_DIR}
|
||||
fi
|
||||
- mkdir -p /kaniko/.docker
|
||||
- |
|
||||
if [ -z "$DOCKER_AUTH_CONFIG" ]; then
|
||||
# build the DOCKER_AUTH_CONFIG from user parameters as per https://docs.gitlab.com/ee/ci/docker/using_kaniko.html and internal docs
|
||||
echo "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(printf "%s:%s" "${HARBOR_USERNAME}" "${HARBOR_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||
else
|
||||
echo "${DOCKER_AUTH_CONFIG}" > /kaniko/.docker/config.json
|
||||
fi
|
||||
# build and push the image to the path set in $REGISTRY_IMAGE_PATH variable.
|
||||
- |
|
||||
if [ "$(echo ${PUSH_IMAGE} | tr '[:upper:]' '[:lower:]')" = "true" ]; then
|
||||
PUSH_IMAGE=""
|
||||
else
|
||||
echo "Info: defer pushing image to remote as PUSH_IMAGE is false"
|
||||
PUSH_IMAGE="--no-push"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$BUILD_ARGS" ]; then
|
||||
for arg in $BUILD_ARGS; do
|
||||
KANIKO_BUILD_ARGS="${KANIKO_BUILD_ARGS} --build-arg ${arg}"
|
||||
done
|
||||
fi
|
||||
- /kaniko/executor
|
||||
--cache=true
|
||||
--cache-repo=${REGISTRY_PATH}/cache
|
||||
--context "${KANIKO_CONTEXT_DIR}"
|
||||
--dockerfile "${DOCKER_FILE_PATH}/${DOCKER_FILE_NAME}" ${KANIKO_BUILD_ARGS}
|
||||
--destination "${REGISTRY_IMAGE_PATH}" "${PUSH_IMAGE}"
|
||||
--use-new-run
|
||||
--single-snapshot
|
||||
--snapshotMode=redo
|
||||
--skip-unused-stages
|
88
package.json
88
package.json
@ -3,15 +3,19 @@
|
||||
"version": "0.6.0",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0"
|
||||
"node": ">= 16.13.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"webpack": "^5.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build:prod": "ng build --prod",
|
||||
"build:prod:stats": "ng build --prod --stats-json",
|
||||
"build:prod:gitlabpage": "ng build --prod --baseHref=/framadate/funky-framadate-front/",
|
||||
"build:prod:demobliss": "ng build --prod --baseHref=https://framadate-api.cipherbliss.com --stats-json ",
|
||||
"start_docker": "ng serve --host 0.0.0.0",
|
||||
"build:prod": "ng build --configuration production",
|
||||
"build:prod:stats": "ng build --configuration production --stats-json",
|
||||
"build:prod:gitlabpage": "ng build --configuration production --baseHref=/framadate/funky-framadate-front/",
|
||||
"build:prod:demobliss": "ng build --configuration production --baseHref=https://framadate-api.cipherbliss.com --stats-json ",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:ci": "jest --ci",
|
||||
@ -32,62 +36,65 @@
|
||||
},
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^9.1.1",
|
||||
"@angular/cdk": "^9.2.2",
|
||||
"@angular/common": "^9.0.7",
|
||||
"@angular/compiler": "^9.0.7",
|
||||
"@angular/core": "^9.0.7",
|
||||
"@angular/forms": "^9.0.7",
|
||||
"@angular/localize": "^9.1.1",
|
||||
"@angular/material": "^9.2.4",
|
||||
"@angular/platform-browser": "^9.0.7",
|
||||
"@angular/platform-browser-dynamic": "^9.0.7",
|
||||
"@angular/router": "^9.0.7",
|
||||
"@biesbjerg/ngx-translate-extract": "^7.0.3",
|
||||
"@biesbjerg/ngx-translate-po-http-loader": "^3.1.0",
|
||||
"@fullcalendar/core": "^4.4.0",
|
||||
"@ngx-translate/core": "^12.1.2",
|
||||
"@ngx-translate/http-loader": "^5.0.0",
|
||||
"angular-date-value-accessor": "^1.0.2",
|
||||
"axios": "^0.19.2",
|
||||
"@angular/animations": "^15.2.2",
|
||||
"@angular/cdk": "^15.2.2",
|
||||
"@angular/common": "^15.2.2",
|
||||
"@angular/compiler": "^15.2.2",
|
||||
"@angular/core": "^15.2.2",
|
||||
"@angular/forms": "^15.2.2",
|
||||
"@angular/localize": "^15.2.2",
|
||||
"@angular/material": "^15.2.2",
|
||||
"@angular/platform-browser": "^15.2.2",
|
||||
"@angular/platform-browser-dynamic": "^15.2.2",
|
||||
"@angular/router": "^15.2.2",
|
||||
"@fullcalendar/core": "^6.1.4",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@ngx-translate/http-loader": "^7.0.0",
|
||||
"angular-date-value-accessor": "^3.0.0",
|
||||
"axios": "^1.3.4",
|
||||
"bulma": "^0.9.0",
|
||||
"bulma-switch": "^2.0.0",
|
||||
"chart.js": "^2.9.3",
|
||||
"chart.js": "^4.2.1",
|
||||
"crypto": "^1.0.1",
|
||||
"crypto-js": "^4.0.0",
|
||||
"feather-icons": "^4.28.0",
|
||||
"fork-awesome": "^1.1.7",
|
||||
"ng-keyboard-shortcuts": "^10.1.17",
|
||||
"ng2-charts": "^2.3.0",
|
||||
"ngx-clipboard": "^13.0.0",
|
||||
"ngx-markdown": "^9.0.0",
|
||||
"ngx-webstorage": "^5.0.0",
|
||||
"marked": "^4.2.12",
|
||||
"moment": "^2.29.4",
|
||||
"ng-keyboard-shortcuts": "^13.0.8",
|
||||
"ng2-charts": "^4.1.1",
|
||||
"ngx-clipboard": "^15.1.0",
|
||||
"ngx-markdown": "^15.1.2",
|
||||
"ngx-webstorage": "^11.1.1",
|
||||
"node-forge": "^0.10.0",
|
||||
"primeicons": "^5.0.0",
|
||||
"primeng": "^11.0.0",
|
||||
"primeicons": "^6.0.1",
|
||||
"primeng": "^15.2.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"quill": "^1.3.7",
|
||||
"rxjs": "^6.5.5",
|
||||
"rxjs-compat": "^6.5.5",
|
||||
"short-unique-id": "^3.0.3",
|
||||
"short-unique-id": "^4.4.4",
|
||||
"stream": "^0.0.2",
|
||||
"tslib": "<2.0.0",
|
||||
"zone.js": "^0.10.3"
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/jest": "^9.0.1",
|
||||
"@angular-devkit/build-angular": "^0.901.2",
|
||||
"@angular/cli": "^9.1.2",
|
||||
"@angular/compiler-cli": "^9.1.1",
|
||||
"@angular/language-service": "^9.0.7",
|
||||
"@angular-devkit/build-angular": "^15.2.3",
|
||||
"@angular/cli": "^15.2.3",
|
||||
"@angular/compiler-cli": "^15.2.2",
|
||||
"@angular/language-service": "^15.2.2",
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/preset-env": "^7.9.5",
|
||||
"@babel/preset-typescript": "^7.9.0",
|
||||
"@compodoc/compodoc": "^1.1.11",
|
||||
"@types/crypto-js": "^4.0.0",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/marked": "^4.0.8",
|
||||
"@types/node": "^14.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^3.0.0",
|
||||
"@typescript-eslint/parser": "^3.0.0",
|
||||
"@vendure/ngx-translate-extract": "^8.1.0",
|
||||
"babel-jest": "^26.0.0",
|
||||
"concurrently": "^5.2.0",
|
||||
"eslint": "^7.0.0",
|
||||
@ -104,7 +111,7 @@
|
||||
"ts-jest": "^26.0.0",
|
||||
"ts-mockito": "^2.5.0",
|
||||
"ts-node": "^8.10.1",
|
||||
"typescript": "<3.9.0"
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@ -130,5 +137,8 @@
|
||||
"^.+\\.(ts|html)$": "ts-jest",
|
||||
"^.+\\.jsx?$": "babel-jest"
|
||||
}
|
||||
},
|
||||
"browser": {
|
||||
"crypto": false
|
||||
}
|
||||
}
|
@ -68,7 +68,7 @@ export class DateUtilitiesService {
|
||||
parseInputDateToDateObject(inputDate: Date): Date {
|
||||
const boom = inputDate.toISOString().substring(0, 10).split('-');
|
||||
|
||||
const converted = new Date(boom['0'], boom['1'] - 1, boom['2']);
|
||||
const converted = new Date(+boom['0'], +boom['1'] - 1, +boom['2']);
|
||||
console.log('converted', converted);
|
||||
return converted;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { StorageService } from './storage.service';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { DateChoice, TimeSlices } from '../models/dateChoice.model';
|
||||
@ -31,7 +31,7 @@ import { CommentDTO } from '../models/comment.model';
|
||||
export class PollService implements Resolve<Poll> {
|
||||
public _poll: BehaviorSubject<Poll | undefined> = new BehaviorSubject<Poll | undefined>(undefined);
|
||||
public readonly poll: Observable<Poll | undefined> = this._poll.asObservable();
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
public startDateInterval: string;
|
||||
public endDateInterval: string;
|
||||
public intervalDays: number = 1;
|
||||
@ -68,7 +68,7 @@ export class PollService implements Resolve<Poll> {
|
||||
private _clipboardService: ClipboardService,
|
||||
private translate: TranslateService,
|
||||
@Inject(DOCUMENT) private document: any,
|
||||
private fb: FormBuilder
|
||||
private fb: UntypedFormBuilder
|
||||
) {
|
||||
this.createFormGroup();
|
||||
|
||||
@ -180,7 +180,7 @@ export class PollService implements Resolve<Poll> {
|
||||
description: ['', []],
|
||||
password: ['', []],
|
||||
password_repeat: ['', []],
|
||||
choices: new FormArray([]),
|
||||
choices: new UntypedFormArray([]),
|
||||
whoModifiesAnswers: ['self', [Validators.required]],
|
||||
whoCanChangeAnswers: ['self', [Validators.required]],
|
||||
isAboutDate: [false, [Validators.required]],
|
||||
@ -518,8 +518,8 @@ export class PollService implements Resolve<Poll> {
|
||||
}
|
||||
}
|
||||
|
||||
get choices(): FormArray {
|
||||
return this.form.get('choices') as FormArray;
|
||||
get choices(): UntypedFormArray {
|
||||
return this.form.get('choices') as UntypedFormArray;
|
||||
}
|
||||
|
||||
reinitChoices(): void {
|
||||
@ -547,7 +547,7 @@ export class PollService implements Resolve<Poll> {
|
||||
* make a uniq slug for the current poll creation
|
||||
* @param form
|
||||
*/
|
||||
makeSlug(form: FormGroup): string {
|
||||
makeSlug(form: UntypedFormGroup): string {
|
||||
let str = '';
|
||||
str =
|
||||
form.value.created_at.getFullYear() +
|
||||
|
@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { PollService } from '../../../core/services/poll.service';
|
||||
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||
import { ApiService } from '../../../core/services/api.service';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { Poll } from '../../../core/models/poll.model';
|
||||
|
||||
@Component({
|
||||
@ -12,7 +12,7 @@ import { Poll } from '../../../core/models/poll.model';
|
||||
})
|
||||
export class AdminConsultationComponent implements OnInit {
|
||||
private admin_key: string;
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
public poll: any;
|
||||
|
||||
constructor(
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Poll } from '../../../../core/models/poll.model';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { PollService } from '../../../../core/services/poll.service';
|
||||
|
||||
@ -16,7 +16,7 @@ export class AdvancedConfigComponent implements OnInit {
|
||||
@Input()
|
||||
public poll?: Poll;
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
domain_url: string;
|
||||
display_regen_slug: boolean = environment.display_regen_slug;
|
||||
display_password_clear_button: boolean = environment.display_password_clear_button;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Input } from '@angular/core';
|
||||
import { ToastService } from '../../../../core/services/toast.service';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { UuidService } from '../../../../core/services/uuid.service';
|
||||
import { PollService } from '../../../../core/services/poll.service';
|
||||
import { ApiService } from '../../../../core/services/api.service';
|
||||
@ -19,10 +19,10 @@ export class BaseConfigComponent {
|
||||
@Input()
|
||||
public poll?: Poll;
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private cd: ChangeDetectorRef,
|
||||
private uuidService: UuidService,
|
||||
private toastService: ToastService,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { FormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { UuidService } from '../../../../core/services/uuid.service';
|
||||
import { ToastService } from '../../../../core/services/toast.service';
|
||||
import { PollService } from '../../../../core/services/poll.service';
|
||||
@ -20,7 +20,7 @@ import { environment } from '../../../../../environments/environment';
|
||||
})
|
||||
export class DateSelectComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
displaySeveralHoursChoice = true;
|
||||
allowSeveralHours = true;
|
||||
@ -35,7 +35,7 @@ export class DateSelectComponent implements OnInit {
|
||||
display: any;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private cd: ChangeDetectorRef,
|
||||
private uuidService: UuidService,
|
||||
private toastService: ToastService,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { environment } from '../../../../../../environments/environment';
|
||||
import { DateUtilitiesService } from '../../../../../core/services/date.utilities.service';
|
||||
import { FormArray, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormArray, UntypedFormGroup } from '@angular/forms';
|
||||
import { ToastService } from '../../../../../core/services/toast.service';
|
||||
import { DateChoice } from '../../../../../../../mocks/old-stuff/config/defaultConfigs';
|
||||
|
||||
@ -12,7 +12,7 @@ import { DateChoice } from '../../../../../../../mocks/old-stuff/config/defaultC
|
||||
})
|
||||
export class IntervalComponent implements OnInit {
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
showDateInterval = true;
|
||||
intervalDays: any;
|
||||
intervalDaysDefault = environment.interval_days_default;
|
||||
@ -89,7 +89,7 @@ export class IntervalComponent implements OnInit {
|
||||
}
|
||||
|
||||
get dateChoices() {
|
||||
return this.form.get('dateChoices') as FormArray;
|
||||
return this.form.get('dateChoices') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Input } from '@angular/core';
|
||||
import { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { ToastService } from '../../../../../../core/services/toast.service';
|
||||
import { StorageService } from '../../../../../../core/services/storage.service';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ShortcutsHelpComponent } from '../../../../../shared/components/ui/shortcuts-help/shortcuts-help.component';
|
||||
import { DateChoice } from '../../../../../../core/models/dateChoice.model';
|
||||
import { PollService } from '../../../../../../core/services/poll.service';
|
||||
import { DateUtilitiesService } from '../../../../../../core/services/date.utilities.service';
|
||||
@ -16,11 +15,10 @@ import { TranslateService } from '@ngx-translate/core';
|
||||
selector: 'app-day-list',
|
||||
templateUrl: './day-list.component.html',
|
||||
styleUrls: ['./day-list.component.scss'],
|
||||
entryComponents: [ShortcutsHelpComponent],
|
||||
})
|
||||
export class DayListComponent {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
public dateChoices: DateChoice[] = [];
|
||||
@Input()
|
||||
public hasSeveralHours: boolean;
|
||||
|
@ -15,7 +15,7 @@ export class TimeListComponent implements OnInit {
|
||||
@Input()
|
||||
public timeSlices: TimeSlices[];
|
||||
@Input()
|
||||
public prefix_choice_id = '';
|
||||
public prefix_choice_id: number;
|
||||
|
||||
constructor(
|
||||
@Inject(DOCUMENT) private document: any,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-picker',
|
||||
@ -8,7 +8,7 @@ import { FormGroup } from '@angular/forms';
|
||||
})
|
||||
export class PickerComponent implements OnInit {
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
selectionKind = 'multiple';
|
||||
dateCalendarEnum: any[];
|
||||
today: Date = new Date();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { Poll } from '../../../core/models/poll.model';
|
||||
import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { FormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { UuidService } from '../../../core/services/uuid.service';
|
||||
import { ApiService } from '../../../core/services/api.service';
|
||||
import { ToastService } from '../../../core/services/toast.service';
|
||||
@ -17,10 +17,10 @@ import { environment } from '../../../../environments/environment';
|
||||
export class FormComponent implements OnInit {
|
||||
@Input()
|
||||
public poll?: Poll;
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private cd: ChangeDetectorRef,
|
||||
private uuidService: UuidService,
|
||||
private toastService: ToastService,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Poll } from '../../../../core/models/poll.model';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-kind-select',
|
||||
@ -12,7 +12,7 @@ export class KindSelectComponent implements OnInit {
|
||||
@Input()
|
||||
public poll?: Poll;
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
|
||||
constructor() {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { PollService } from '../../../../../core/services/poll.service';
|
||||
import { environment } from '../../../../../../environments/environment';
|
||||
|
||||
@ -10,7 +10,7 @@ import { environment } from '../../../../../../environments/environment';
|
||||
})
|
||||
export class StepFiveComponent implements OnInit {
|
||||
@Input() step_max: any;
|
||||
@Input() public form: FormGroup;
|
||||
@Input() public form: UntypedFormGroup;
|
||||
poll: any;
|
||||
public environment = environment;
|
||||
advancedDisplayEnabled = environment.advanced_options_display;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { PollService } from '../../../../../core/services/poll.service';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { ConfirmationService } from 'primeng/api';
|
||||
@ -16,7 +16,7 @@ export class StepOneComponent implements OnInit {
|
||||
@Input()
|
||||
step_max: any;
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
public environment = environment;
|
||||
|
||||
constructor(
|
||||
|
@ -30,7 +30,7 @@
|
||||
<!-- [minDate]="minDate"-->
|
||||
<p-calendar
|
||||
[(ngModel)]="pollService.calendar"
|
||||
firstDayOfWeek="1"
|
||||
[firstDayOfWeek]="1"
|
||||
selectionMode="multiple"
|
||||
inputId="multiple"
|
||||
[showButtonBar]="true"
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { FormArray, FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormArray, UntypedFormBuilder } from '@angular/forms';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
||||
import { Router } from '@angular/router';
|
||||
@ -31,7 +31,7 @@ export class StepTwoComponent implements OnInit {
|
||||
intervalDays: any;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private cd: ChangeDetectorRef,
|
||||
private uuidService: UuidService,
|
||||
private toastService: ToastService,
|
||||
@ -48,8 +48,8 @@ export class StepTwoComponent implements OnInit {
|
||||
this.step_max = this.pollService.step_max;
|
||||
}
|
||||
|
||||
get choices(): FormArray {
|
||||
return this.form.get('choices') as FormArray;
|
||||
get choices(): UntypedFormArray {
|
||||
return this.form.get('choices') as UntypedFormArray;
|
||||
}
|
||||
|
||||
addTime() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-text-select',
|
||||
@ -8,7 +8,7 @@ import { FormGroup } from '@angular/forms';
|
||||
})
|
||||
export class TextSelectComponent implements OnInit {
|
||||
@Input()
|
||||
public form: FormGroup;
|
||||
public form: UntypedFormGroup;
|
||||
public choices = [];
|
||||
|
||||
constructor() {}
|
||||
|
@ -1,11 +1,13 @@
|
||||
<div class="text-choices rounded-block" *ngIf="poll.kind == 'text'">
|
||||
<div class="text-choice" *ngFor="let choice of poll.choices_grouped; index as ii">
|
||||
<div class="text-choice" *ngFor="let choice_groupe of poll.choices_grouped; index as ii">
|
||||
<div class="choice-label">
|
||||
{{ choice.date_string }}
|
||||
{{ choice_groupe.date_string }}
|
||||
</div>
|
||||
<div *ngFor="let choice of choice_groupe.choices">
|
||||
<app-choice-table [choice]="choice" [detailledDisplay]="detailledDisplay"></app-choice-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-choices" *ngIf="poll.kind == 'date'">
|
||||
<div class="rounded-block" *ngFor="let group of poll.choices_grouped">
|
||||
<div class="date-label">
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup, ValidationErrors } from '@angular/forms';
|
||||
import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { environment } from '../../../../../../../environments/environment';
|
||||
|
||||
@ -9,7 +9,7 @@ import { environment } from '../../../../../../../environments/environment';
|
||||
styleUrls: ['./errors-list.component.scss'],
|
||||
})
|
||||
export class ErrorsListComponent implements OnInit {
|
||||
@Input() form: FormGroup;
|
||||
@Input() form: UntypedFormGroup;
|
||||
public totalErrors = 0;
|
||||
public firstErrorId = '';
|
||||
public messages = [];
|
||||
|
@ -13,7 +13,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatStepperModule } from '@angular/material/stepper';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ChartsModule } from 'ng2-charts';
|
||||
import { NgChartsModule } from 'ng2-charts';
|
||||
|
||||
import { ChoiceDetailsComponent } from './components/choice-details/choice-details.component';
|
||||
import { CommentsComponent } from './components/comments/comments.component';
|
||||
@ -58,7 +58,7 @@ const COMPONENTS = [
|
||||
FooterComponent,
|
||||
];
|
||||
|
||||
const ANGULAR_MODULES = [CommonModule, ChartsModule, FormsModule, TranslateModule];
|
||||
const ANGULAR_MODULES = [CommonModule, NgChartsModule, FormsModule, TranslateModule];
|
||||
|
||||
const MATERIAL_MODULES = [
|
||||
MatButtonModule,
|
||||
|
@ -4,13 +4,13 @@ export const backendApiUrlsInDev = {
|
||||
local: 'http://localhost:8000/api/v1', // the docker port is this one
|
||||
// local: 'http://www.tk.lan/index.php/api/v1',
|
||||
// local: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
// remote: 'http://localhost:8000/api/v1',
|
||||
remote: 'http://localhost:8000/api/v1',
|
||||
// remote: 'http://www.tk.lan/index.php/api/v1',
|
||||
remote: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
//remote: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||
};
|
||||
export const apiV1 = {
|
||||
// baseHref: 'http://localhost:8000/api/v1', // local "symfony serve" live server
|
||||
baseHref: 'http://www.tk.lan/index.php/api/v1', // local apache2 server
|
||||
baseHref: 'http://localhost:8000/api/v1', // local "symfony serve" live server
|
||||
// baseHref: 'http://www.tk.lan/index.php/api/v1', // local apache2 server
|
||||
// baseHref: 'http://tktest.lan/api/v1',
|
||||
// baseHref: 'https://framadate-api.cipherbliss.com/api/v1', // demo preprod
|
||||
api_new_poll: '/poll/',
|
||||
|
@ -11,7 +11,7 @@ import { poll_conf } from './poll_conf';
|
||||
* 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';
|
||||
import 'zone.js/plugins/zone-error';
|
||||
|
||||
endpoints.baseHref = apiV1.baseHref;
|
||||
|
||||
|
@ -22,16 +22,6 @@ import '@angular/localize/init';
|
||||
* 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
|
||||
@ -59,7 +49,7 @@ import '@angular/localize/init';
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
|
@ -1,12 +1,13 @@
|
||||
// Custom Theming for Angular Material
|
||||
@use '@angular/material' as mat;
|
||||
// For more information: https://material.angular.io/guide/theming
|
||||
@import '~@angular/material/theming';
|
||||
// Plus imports for other components in your app.
|
||||
|
||||
// Include the common styles for Angular Material. We include this here so that you only
|
||||
// have to load a single css file for Angular Material in your app.
|
||||
// Be sure that you only ever include this mixin once!
|
||||
@include mat-core();
|
||||
@include mat.core();
|
||||
@include mat.all-component-typographies();
|
||||
|
||||
// import your custom themes
|
||||
@import 'theme-light.scss';
|
||||
@ -14,14 +15,14 @@
|
||||
@import 'theme-contrast.scss';
|
||||
|
||||
.theme-light {
|
||||
@include angular-material-theme($theme-light);
|
||||
}
|
||||
.theme-dark {
|
||||
@include angular-material-theme($theme-dark);
|
||||
}
|
||||
.theme-contrast {
|
||||
@include angular-material-theme($theme-contrast);
|
||||
@include mat.all-component-colors($theme-light);
|
||||
}
|
||||
// .theme-dark {
|
||||
// @include mat.all-component-colors($theme-dark);
|
||||
// }
|
||||
// .theme-contrast {
|
||||
// @include mat.all-component-colors($theme-contrast);
|
||||
// }
|
||||
|
||||
/*
|
||||
You can add global.scss styles to this file, and also import other style files
|
||||
|
@ -70,12 +70,6 @@ textarea {
|
||||
}
|
||||
|
||||
// radio input structure
|
||||
.mat-checkbox-label,
|
||||
.mat-checkbox-layout .mat-checkbox-label {
|
||||
max-width: 90vw;
|
||||
overflow-x: auto;
|
||||
@extend .clickable;
|
||||
}
|
||||
button,
|
||||
.button {
|
||||
font-family: 'Helvetica';
|
||||
@ -190,16 +184,12 @@ textarea {
|
||||
-moz-border-radius-bottomright: 1em;
|
||||
}
|
||||
|
||||
.mat-error {
|
||||
.mat-mdc-form-field-error {
|
||||
display: block;
|
||||
background: $warning;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
mat-checkbox {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cdk-drag {
|
||||
cursor: pointer;
|
||||
|
||||
@ -373,7 +363,7 @@ label {
|
||||
}
|
||||
|
||||
.people {
|
||||
max-width: $main-column-width/2;
|
||||
max-width: calc($main-column-width / 2);
|
||||
}
|
||||
|
||||
.bar-div {
|
||||
|
@ -1,6 +1,4 @@
|
||||
///**
|
||||
//aimed for visual impaired people
|
||||
// */
|
||||
//__<<ngThemingMigrationEscapedComment0>>__
|
||||
//$main-theme-color: #00003b;
|
||||
//#big_container {
|
||||
// &.theme-high-contrast {
|
||||
|
@ -1,16 +1,25 @@
|
||||
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
||||
@use '@angular/material' as mat;
|
||||
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
||||
// hue. Available color palettes: https://material.io/design/color/
|
||||
$theme-contrast-primary: mat-palette($mat-indigo);
|
||||
$theme-contrast-accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
$theme-contrast-primary: mat.define-palette(mat.$indigo-palette);
|
||||
$theme-contrast-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
|
||||
// The warn palette is optional (defaults to red).
|
||||
$theme-contrast-warn: mat-palette($mat-red);
|
||||
$theme-contrast-warn: mat.define-palette(mat.$red-palette);
|
||||
|
||||
// Create the theme object (a Sass map containing all of the palettes).
|
||||
$theme-contrast: mat-light-theme($theme-contrast-primary, $theme-contrast-accent, $theme-contrast-warn);
|
||||
$theme-contrast: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $theme-contrast-primary,
|
||||
accent: $theme-contrast-accent,
|
||||
warn: $theme-contrast-warn,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Include theme styles for core and each component used in your app.
|
||||
// Alternatively, you can import and @include the theme mixins for each component
|
||||
// that you are using.
|
||||
@include angular-material-theme($theme-contrast);
|
||||
// @include mat.all-component-themes($theme-contrast);
|
||||
|
@ -1,16 +1,25 @@
|
||||
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
||||
@use '@angular/material' as mat;
|
||||
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
||||
// hue. Available color palettes: https://material.io/design/color/
|
||||
$theme-dark-primary: mat-palette($mat-indigo);
|
||||
$theme-dark-accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
$theme-dark-primary: mat.define-palette(mat.$indigo-palette);
|
||||
$theme-dark-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
|
||||
// The warn palette is optional (defaults to red).
|
||||
$theme-dark-warn: mat-palette($mat-red);
|
||||
$theme-dark-warn: mat.define-palette(mat.$red-palette);
|
||||
|
||||
// Create the theme object (a Sass map containing all of the palettes).
|
||||
$theme-dark: mat-dark-theme($theme-dark-primary, $theme-dark-accent, $theme-dark-warn);
|
||||
$theme-dark: mat.define-dark-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $theme-dark-primary,
|
||||
accent: $theme-dark-accent,
|
||||
warn: $theme-dark-warn,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Include theme styles for core and each component used in your app.
|
||||
// Alternatively, you can import and @include the theme mixins for each component
|
||||
// that you are using.
|
||||
@include angular-material-theme($theme-dark);
|
||||
// @include mat.all-component-themes($theme-dark);
|
||||
|
@ -1,16 +1,25 @@
|
||||
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
||||
@use '@angular/material' as mat;
|
||||
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
||||
// hue. Available color palettes: https://material.io/design/color/
|
||||
$theme-light-primary: mat-palette($mat-indigo);
|
||||
$theme-light-accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
$theme-light-primary: mat.define-palette(mat.$indigo-palette);
|
||||
$theme-light-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
|
||||
// The warn palette is optional (defaults to red).
|
||||
$theme-light-warn: mat-palette($mat-red);
|
||||
$theme-light-warn: mat.define-palette(mat.$red-palette);
|
||||
|
||||
// Create the theme object (a Sass map containing all of the palettes).
|
||||
$theme-light: mat-light-theme($theme-light-primary, $theme-light-accent, $theme-light-warn);
|
||||
$theme-light: mat.define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $theme-light-primary,
|
||||
accent: $theme-light-accent,
|
||||
warn: $theme-light-warn,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Include theme styles for core and each component used in your app.
|
||||
// Alternatively, you can import and @include the theme mixins for each component
|
||||
// that you are using.
|
||||
@include angular-material-theme($theme-light);
|
||||
// @include mat.all-component-themes($theme-light);
|
||||
|
@ -7,12 +7,18 @@
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "ESNext",
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "ES5",
|
||||
"types": ["node", "jest"],
|
||||
"typeRoots": ["node_modules/@types"]
|
||||
"target": "ES2022",
|
||||
"types": [
|
||||
"node",
|
||||
"jest"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
|
Loading…
Reference in New Issue
Block a user