Skip to content

Commit 21ebb31

Browse files
committed
Merge branch 'feat/ng-15-upgrade' into 'master'
[front] Angular 15 / RXJS7 Upgrade See merge request minds/front!2168
2 parents cdbeab8 + 39f7da1 commit 21ebb31

File tree

139 files changed

+38150
-50328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+38150
-50328
lines changed

.gitlab-ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cache:
2828
- node_modules/
2929

3030
test:
31-
image: circleci/node:14-browsers
31+
image: circleci/node:16-browsers
3232
stage: test and build
3333
script:
3434
- sudo npm install -g npm@7
@@ -41,7 +41,7 @@ test:
4141

4242
lint:
4343
stage: test and build
44-
image: minds/ci-front:14
44+
image: minds/ci-front:16
4545
script:
4646
- npm i -g prettier@"^1.19.1"
4747
- prettier --check "src/**/*.ts"
@@ -177,7 +177,7 @@ qa:nightly:
177177

178178
build:review:
179179
stage: test and build
180-
image: minds/ci-front:14
180+
image: minds/ci-front:16
181181
before_script:
182182
- sed -ri "s|'VERSION'|'$CI_PIPELINE_ID'|" src/environments/environment.prod.ts
183183
script:
@@ -202,7 +202,7 @@ build:review:
202202

203203
build:production:bundles:
204204
stage: test and build
205-
image: minds/ci-front:14
205+
image: minds/ci-front:16
206206
before_script:
207207
- sed -ri "s|'VERSION'|'$CI_PIPELINE_ID'|" src/environments/environment.prod.ts
208208
script:

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
13.14.0
1+
lts/gallium

angular.json

-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@
362362
}
363363
}
364364
},
365-
"defaultProject": "minds",
366365
"schematics": {
367366
"@schematics/angular:component": {
368367
"prefix": "m",

build/ng-bundles.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ npx gulp build.sass --deploy-url="/static/en/"
1515
npx gulp generate-ngsw-appData
1616

1717
# Build front
18-
npm run build -- --stats-json --outputPath=$BROWSER_PATH
18+
npm run build minds -- --stats-json --output-path=$BROWSER_PATH
1919
if [ "$?" != "0" ]; then exit 1; fi
2020

2121
# Build embed
22-
npm run build:embed -- --stats-json --outputPath=$EMBED_PATH
22+
npm run build:embed -- --stats-json --output-path=$EMBED_PATH
2323
if [ "$?" != "0" ]; then exit 1; fi
2424

2525
# Build SSR
26-
npm run build:ssr -- --outputPath=$SERVER_PATH
26+
npm run build:ssr -- --output-path=$SERVER_PATH
2727
if [ "$?" != "0" ]; then exit 1; fi
2828

2929
# Build Storybook

containers/ci-front/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14-alpine
1+
FROM node:16-alpine
22

33
# We need git and libsass
44

@@ -8,11 +8,11 @@ RUN apk add --no-cache \
88

99
# Update NPM
1010

11-
RUN npm install -g npm@7
11+
RUN npm install -g npm@9.4.0
1212

1313
# Ensure we have typescript and angular
1414

1515
RUN npm install -g typescript @angular/cli
1616

1717
# Gitlab CI has limited memory
18-
ENV NODE_OPTIONS="--max_old_space_size=1024"
18+
ENV NODE_OPTIONS="--max_old_space_size=1024"

containers/server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
###
22
# Before running this container, ensure the server is built
33
###
4-
FROM node:14-alpine
4+
FROM node:16-alpine
55

66
RUN apk update && apk upgrade --no-cache
77

documentation.json

+139-17
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@
5252
"type": "object",
5353
"defaultValue": "{\n onClick: action('toggle'),\n}"
5454
},
55+
{
56+
"name": "actionsData",
57+
"ctype": "miscellaneous",
58+
"subtype": "variable",
59+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
60+
"deprecated": false,
61+
"deprecationMessage": "",
62+
"type": "object",
63+
"defaultValue": "{\n onClickButton: action('onAction'),\n}"
64+
},
5565
{
5666
"name": "ActionSolid",
5767
"ctype": "miscellaneous",
@@ -208,7 +218,7 @@
208218
"name": "Basic",
209219
"ctype": "miscellaneous",
210220
"subtype": "variable",
211-
"file": "src/app/modules/forms/stories/radio.stories.ts",
221+
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
212222
"deprecated": false,
213223
"deprecationMessage": "",
214224
"type": "",
@@ -218,7 +228,7 @@
218228
"name": "Basic",
219229
"ctype": "miscellaneous",
220230
"subtype": "variable",
221-
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
231+
"file": "src/app/modules/forms/stories/radio.stories.ts",
222232
"deprecated": false,
223233
"deprecationMessage": "",
224234
"type": "",
@@ -266,6 +276,26 @@
266276
"rawdescription": "Borderless",
267277
"description": "<p>Borderless</p>\n"
268278
},
279+
{
280+
"name": "CustomSteps",
281+
"ctype": "miscellaneous",
282+
"subtype": "variable",
283+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
284+
"deprecated": false,
285+
"deprecationMessage": "",
286+
"type": "",
287+
"defaultValue": "Template.bind({})"
288+
},
289+
{
290+
"name": "Default",
291+
"ctype": "miscellaneous",
292+
"subtype": "variable",
293+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
294+
"deprecated": false,
295+
"deprecationMessage": "",
296+
"type": "",
297+
"defaultValue": "Template.bind({})"
298+
},
269299
{
270300
"name": "Disabled",
271301
"ctype": "miscellaneous",
@@ -502,6 +532,16 @@
502532
"type": "",
503533
"defaultValue": "Template.bind({})"
504534
},
535+
{
536+
"name": "Template",
537+
"ctype": "miscellaneous",
538+
"subtype": "variable",
539+
"file": "src/app/common/read-more/v2/read-more.stories.ts",
540+
"deprecated": false,
541+
"deprecationMessage": "",
542+
"type": "Story<ReadMoreComponent>",
543+
"defaultValue": "(args: any) => ({\n props: args,\n})"
544+
},
505545
{
506546
"name": "Template",
507547
"ctype": "miscellaneous",
@@ -636,11 +676,11 @@
636676
"name": "Template",
637677
"ctype": "miscellaneous",
638678
"subtype": "variable",
639-
"file": "src/app/common/read-more/v2/read-more.stories.ts",
679+
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
640680
"deprecated": false,
641681
"deprecationMessage": "",
642-
"type": "Story<ReadMoreComponent>",
643-
"defaultValue": "(args: any) => ({\n props: args,\n})"
682+
"type": "Story<any>",
683+
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__row--input\">\n <label for=\"story\" class=\"m-form__customInputWrapper__checkbox\">\n <ng-container\n >Check me</ng-container\n >\n <input\n type=\"checkbox\"\n id=\"story\"\n name=\"story\"\n formControlName=\"story\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__checkbox\"></span>\n </label>\n </div>\n </div>\n `,\n})"
644684
},
645685
{
646686
"name": "Template",
@@ -656,11 +696,11 @@
656696
"name": "Template",
657697
"ctype": "miscellaneous",
658698
"subtype": "variable",
659-
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
699+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
660700
"deprecated": false,
661701
"deprecationMessage": "",
662-
"type": "Story<any>",
663-
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__row--input\">\n <label for=\"story\" class=\"m-form__customInputWrapper__checkbox\">\n <ng-container\n >Check me</ng-container\n >\n <input\n type=\"checkbox\"\n id=\"story\"\n name=\"story\"\n formControlName=\"story\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__checkbox\"></span>\n </label>\n </div>\n </div>\n `,\n})"
702+
"type": "Story<FormInputSliderV2Component>",
703+
"defaultValue": "(\n args: FormInputSliderV2Component\n) => ({\n props: {\n ...args,\n },\n template: `\n <m-formInput__sliderV2\n [(ngModel)]=\"value\"\n [steps]=\"steps\"\n >\n </m-formInput__sliderV2>\n `,\n})"
664704
},
665705
{
666706
"name": "Template",
@@ -977,6 +1017,48 @@
9771017
"defaultValue": "(args: ToggleComponent) => ({\n props: {\n ...args,\n toggle: actionsData.onClick,\n },\n template: `\n <span>{{leftValue}}</span>\n <span>\n <m-toggle\n [leftValue]=\"leftValue\"\n [rightValue]=\"RightValue\"\n [mModel]=\"mModel\"\n (mModelChange)=\"mModel = $event\"\n ></m-toggle>\n </span>\n <span>{{rightValue}}</span>\n <hr>\n <div>TODO: enable toggle action</div>\n `,\n})"
9781018
}
9791019
],
1020+
"src/app/common/components/slider/v2/slider.stories.ts": [
1021+
{
1022+
"name": "actionsData",
1023+
"ctype": "miscellaneous",
1024+
"subtype": "variable",
1025+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
1026+
"deprecated": false,
1027+
"deprecationMessage": "",
1028+
"type": "object",
1029+
"defaultValue": "{\n onClickButton: action('onAction'),\n}"
1030+
},
1031+
{
1032+
"name": "CustomSteps",
1033+
"ctype": "miscellaneous",
1034+
"subtype": "variable",
1035+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
1036+
"deprecated": false,
1037+
"deprecationMessage": "",
1038+
"type": "",
1039+
"defaultValue": "Template.bind({})"
1040+
},
1041+
{
1042+
"name": "Default",
1043+
"ctype": "miscellaneous",
1044+
"subtype": "variable",
1045+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
1046+
"deprecated": false,
1047+
"deprecationMessage": "",
1048+
"type": "",
1049+
"defaultValue": "Template.bind({})"
1050+
},
1051+
{
1052+
"name": "Template",
1053+
"ctype": "miscellaneous",
1054+
"subtype": "variable",
1055+
"file": "src/app/common/components/slider/v2/slider.stories.ts",
1056+
"deprecated": false,
1057+
"deprecationMessage": "",
1058+
"type": "Story<FormInputSliderV2Component>",
1059+
"defaultValue": "(\n args: FormInputSliderV2Component\n) => ({\n props: {\n ...args,\n },\n template: `\n <m-formInput__sliderV2\n [(ngModel)]=\"value\"\n [steps]=\"steps\"\n >\n </m-formInput__sliderV2>\n `,\n})"
1060+
}
1061+
],
9801062
"src/app/common/components/thumbs/thumbs-up.stories.ts": [
9811063
{
9821064
"name": "ActiveState",
@@ -1317,12 +1399,12 @@
13171399
"defaultValue": "(\n args: UserAggregatorComponent\n) => ({\n props: args,\n})"
13181400
}
13191401
],
1320-
"src/app/modules/forms/stories/radio.stories.ts": [
1402+
"src/app/modules/forms/stories/checkbox.stories.ts": [
13211403
{
13221404
"name": "Basic",
13231405
"ctype": "miscellaneous",
13241406
"subtype": "variable",
1325-
"file": "src/app/modules/forms/stories/radio.stories.ts",
1407+
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
13261408
"deprecated": false,
13271409
"deprecationMessage": "",
13281410
"type": "",
@@ -1332,19 +1414,19 @@
13321414
"name": "Template",
13331415
"ctype": "miscellaneous",
13341416
"subtype": "variable",
1335-
"file": "src/app/modules/forms/stories/radio.stories.ts",
1417+
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
13361418
"deprecated": false,
13371419
"deprecationMessage": "",
13381420
"type": "Story<any>",
1339-
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__field--radio\">\n <div class=\"m-form__row--label\">\n <label>\n Choose one\n </label>\n </div>\n <div class=\"m-form__row--input\">\n <ng-container *ngFor=\"let opt of opts\">\n <label\n [for]=\"opt\"\n class=\"m-form__customInputWrapper__radio\"\n >{{ opt }}\n <input\n type=\"radio\"\n [id]=\"opt\"\n name=\"opt\"\n [value]=\"opt\"\n formControlName=\"opts\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__radio\"></span>\n </label>\n </ng-container>\n </div>\n </div>\n </div>\n `,\n})"
1421+
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__row--input\">\n <label for=\"story\" class=\"m-form__customInputWrapper__checkbox\">\n <ng-container\n >Check me</ng-container\n >\n <input\n type=\"checkbox\"\n id=\"story\"\n name=\"story\"\n formControlName=\"story\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__checkbox\"></span>\n </label>\n </div>\n </div>\n `,\n})"
13401422
}
13411423
],
1342-
"src/app/modules/forms/stories/checkbox.stories.ts": [
1424+
"src/app/modules/forms/stories/radio.stories.ts": [
13431425
{
13441426
"name": "Basic",
13451427
"ctype": "miscellaneous",
13461428
"subtype": "variable",
1347-
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
1429+
"file": "src/app/modules/forms/stories/radio.stories.ts",
13481430
"deprecated": false,
13491431
"deprecationMessage": "",
13501432
"type": "",
@@ -1354,11 +1436,11 @@
13541436
"name": "Template",
13551437
"ctype": "miscellaneous",
13561438
"subtype": "variable",
1357-
"file": "src/app/modules/forms/stories/checkbox.stories.ts",
1439+
"file": "src/app/modules/forms/stories/radio.stories.ts",
13581440
"deprecated": false,
13591441
"deprecationMessage": "",
13601442
"type": "Story<any>",
1361-
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__row--input\">\n <label for=\"story\" class=\"m-form__customInputWrapper__checkbox\">\n <ng-container\n >Check me</ng-container\n >\n <input\n type=\"checkbox\"\n id=\"story\"\n name=\"story\"\n formControlName=\"story\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__checkbox\"></span>\n </label>\n </div>\n </div>\n `,\n})"
1443+
"defaultValue": "(args: any) => ({\n props: args,\n template: `\n <div class=\"m-formWrapper\">\n <div class=\"m-form__field--radio\">\n <div class=\"m-form__row--label\">\n <label>\n Choose one\n </label>\n </div>\n <div class=\"m-form__row--input\">\n <ng-container *ngFor=\"let opt of opts\">\n <label\n [for]=\"opt\"\n class=\"m-form__customInputWrapper__radio\"\n >{{ opt }}\n <input\n type=\"radio\"\n [id]=\"opt\"\n name=\"opt\"\n [value]=\"opt\"\n formControlName=\"opts\"\n class=\"form-control\"\n />\n <span class=\"m-form__customInput__radio\"></span>\n </label>\n </ng-container>\n </div>\n </div>\n </div>\n `,\n})"
13621444
}
13631445
],
13641446
"src/app/modules/channels/v2/mutual-subscriptions/mutual-subscriptions.stories.ts": [
@@ -1588,7 +1670,7 @@
15881670
},
15891671
"routes": [],
15901672
"coverage": {
1591-
"count": 9,
1673+
"count": 8,
15921674
"status": "low",
15931675
"files": [
15941676
{
@@ -2011,6 +2093,46 @@
20112093
"coverageCount": "0/1",
20122094
"status": "low"
20132095
},
2096+
{
2097+
"filePath": "src/app/common/components/slider/v2/slider.stories.ts",
2098+
"type": "variable",
2099+
"linktype": "miscellaneous",
2100+
"linksubtype": "variable",
2101+
"name": "actionsData",
2102+
"coveragePercent": 0,
2103+
"coverageCount": "0/1",
2104+
"status": "low"
2105+
},
2106+
{
2107+
"filePath": "src/app/common/components/slider/v2/slider.stories.ts",
2108+
"type": "variable",
2109+
"linktype": "miscellaneous",
2110+
"linksubtype": "variable",
2111+
"name": "CustomSteps",
2112+
"coveragePercent": 0,
2113+
"coverageCount": "0/1",
2114+
"status": "low"
2115+
},
2116+
{
2117+
"filePath": "src/app/common/components/slider/v2/slider.stories.ts",
2118+
"type": "variable",
2119+
"linktype": "miscellaneous",
2120+
"linksubtype": "variable",
2121+
"name": "Default",
2122+
"coveragePercent": 0,
2123+
"coverageCount": "0/1",
2124+
"status": "low"
2125+
},
2126+
{
2127+
"filePath": "src/app/common/components/slider/v2/slider.stories.ts",
2128+
"type": "variable",
2129+
"linktype": "miscellaneous",
2130+
"linksubtype": "variable",
2131+
"name": "Template",
2132+
"coveragePercent": 0,
2133+
"coverageCount": "0/1",
2134+
"status": "low"
2135+
},
20142136
{
20152137
"filePath": "src/app/common/components/tabs/tabs.stories.ts",
20162138
"type": "variable",

ngsw-config.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@
2020
"installMode": "lazy",
2121
"updateMode": "lazy",
2222
"resources": {
23-
"files": ["/assets/**"]
23+
"files": [
24+
"/assets/**"
25+
]
2426
}
2527
}
2628
],
2729
"dataGroups": [
2830
{
2931
"name": "api",
30-
"urls": ["https://**/api/v**", "http://localhost:8080/api/**"],
32+
"urls": [
33+
"https://**/api/v**",
34+
"http://localhost:8080/api/**"
35+
],
3136
"cacheConfig": {
3237
"maxSize": 50,
3338
"maxAge": "1h",
@@ -44,5 +49,8 @@
4449
"!/embed/**",
4550
"!/storybook",
4651
"!/storybook/**"
47-
]
52+
],
53+
"appData": {
54+
"commit": "undefined-undefined"
55+
}
4856
}

0 commit comments

Comments
 (0)