Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit c01f07f

Browse files
authored
Upgrade to v3.0.0 (#367)
* remove empty annotation and review datagrid * upgrade to v3.0.0 * update readme
1 parent 9ea81a8 commit c01f07f

File tree

230 files changed

+28402
-44540
lines changed

Some content is hidden

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

230 files changed

+28402
-44540
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DS_Store
33

44
# annotation-app
5+
annotation-app/.angular
56
annotation-app/node_modules
67
annotation-app/.npmrc
78
annotation-app/chart

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Core features include:
3434
- [User guide](https://github.com/vmware/data-annotator-for-machine-learning/wiki/DAML-User-Guide)
3535
- [Tutorial](https://github.com/vmware/data-annotator-for-machine-learning/wiki/Tutorial:-Using-DAML-to-Label-the-Sentiment-of--VMware-Reddit-and-Twitter-Comments)
3636

37+
## DAML upgrade
38+
39+
- DAML upgrade to v3.0.0 that mainly raise UI/UX to a higher standard
40+
- [DAML v3.0.0 release note](https://github.com/vmware/data-annotator-for-machine-learning/releases/tag/v2.1.0). The latest code saved in branch master.
41+
- [DAML versions older than v3.0.0 releases](https://github.com/vmware/data-annotator-for-machine-learning/releases). The last version v2.1.0 (which still keep our old UI style) before v3.0.0 is saved in branch DAML-v2.1.0.
42+
- As for DAML UI upgrade, our e2e code also updated
43+
- The latest e2e code saved in branch e2e-test.
44+
- The old UI e2e code saved in branch DAML-v2.1.0-e2e.
3745

3846
## What is included
3947

annotation-app/.browserslistrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
1016
Firefox ESR
11-
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.

annotation-app/.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package.json
22
package-lock.json
3-
node_modules
3+
node_modules

annotation-app/.prettierrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"printWidth": 100,
2+
"printWidth": 120,
33
"singleQuote": true,
44
"trailingComma": "all",
55
"tabWidth": 2
6-
}
6+
}

annotation-app/angular.json

Lines changed: 113 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -3,204 +3,166 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"clarity-seed": {
6+
"annotation-app": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
713
"root": "",
814
"sourceRoot": "src",
9-
"projectType": "application",
15+
"prefix": "app",
1016
"architect": {
1117
"build": {
1218
"builder": "@angular-devkit/build-angular:browser",
1319
"options": {
14-
"aot": true,
1520
"outputPath": "dist",
1621
"index": "src/index.html",
1722
"main": "src/main.ts",
18-
"tsConfig": "src/tsconfig.json",
1923
"polyfills": "src/polyfills.ts",
20-
"preserveSymlinks": true,
21-
"allowedCommonJsDependencies": ["lodash", "jwt"],
22-
"assets": ["src/libs", "src/assets"],
24+
"tsConfig": "tsconfig.app.json",
25+
"inlineStyleLanguage": "scss",
26+
"assets": [
27+
"src/favicon.ico",
28+
"src/assets"
29+
],
2330
"styles": [
24-
"node_modules/@clr/icons/clr-icons.min.css",
25-
"node_modules/@clr/ui/clr-ui.min.css",
26-
"node_modules/label-studio/build/static/css/main.css",
27-
"src/styles.css"
31+
"src/styles.scss",
32+
"node_modules/@clr/ui/clr-ui.min.css"
2833
],
2934
"scripts": [
30-
"node_modules/core-js/client/shim.min.js",
31-
"node_modules/mutationobserver-shim/dist/mutationobserver.min.js",
32-
"node_modules/@webcomponents/custom-elements/custom-elements.min.js",
33-
"node_modules/@clr/icons/clr-icons.min.js",
34-
"node_modules/web-animations-js/web-animations.min.js",
3535
"src/libs/userChart.js",
3636
"src/libs/categoryChart.js",
3737
"src/libs/hierarchicalChart.js",
38-
"src/libs/modelChart.js",
39-
"src/libs/feedback.js",
40-
"node_modules/label-studio/build/static/js/main.js"
38+
"src/libs/modelChart.js"
4139
]
4240
},
4341
"configurations": {
4442
"production": {
4543
"budgets": [
44+
{
45+
"type": "initial",
46+
"maximumWarning": "500kb",
47+
"maximumError": "1mb"
48+
},
4649
{
4750
"type": "anyComponentStyle",
48-
"maximumWarning": "6kb"
51+
"maximumWarning": "2kb",
52+
"maximumError": "4kb"
4953
}
5054
],
51-
"optimization": true,
52-
"outputHashing": "all",
53-
"sourceMap": false,
54-
"namedChunks": false,
55-
"aot": true,
56-
"extractLicenses": true,
57-
"vendorChunk": false,
58-
"buildOptimizer": true,
5955
"fileReplacements": [
6056
{
6157
"replace": "src/environments/environment.ts",
6258
"with": "src/environments/environment.prod.ts"
6359
}
64-
]
60+
],
61+
"outputHashing": "all"
62+
},
63+
"development": {
64+
"buildOptimizer": false,
65+
"optimization": false,
66+
"vendorChunk": true,
67+
"extractLicenses": false,
68+
"sourceMap": true,
69+
"namedChunks": true
70+
}
71+
},
72+
"defaultConfiguration": "development"
73+
},
74+
"serve": {
75+
"builder": "@angular-devkit/build-angular:dev-server",
76+
"configurations": {
77+
"production": {
78+
"browserTarget": "annotation-app:build:production"
6579
},
66-
"staging": {
80+
"development": {
81+
"browserTarget": "annotation-app:build:development"
82+
}
83+
},
84+
"defaultConfiguration": "development"
85+
},
86+
"mfe": {
87+
"builder": "ngx-build-plus:build",
88+
"options": {
89+
"singleBundle": true,
90+
"outputPath": "dist",
91+
"index": "src/index.html",
92+
"main": "src/main.ts",
93+
"polyfills": "src/polyfills.ts",
94+
"tsConfig": "tsconfig.app.json",
95+
"inlineStyleLanguage": "scss",
96+
"assets": [
97+
"src/favicon.ico",
98+
"src/assets"
99+
],
100+
"styles": [
101+
"src/styles.scss",
102+
"node_modules/@clr/ui/clr-ui.min.css"
103+
],
104+
"scripts": [
105+
"src/libs/userChart.js",
106+
"src/libs/categoryChart.js",
107+
"src/libs/hierarchicalChart.js",
108+
"src/libs/modelChart.js"
109+
]
110+
},
111+
"configurations": {
112+
"prod": {
113+
"buildOptimizer": false,
114+
"optimization": false,
115+
"vendorChunk": true,
116+
"extractLicenses": false,
117+
"sourceMap": true,
118+
"namedChunks": true,
67119
"fileReplacements": [
68120
{
69121
"replace": "src/environments/environment.ts",
70-
"with": "src/environments/environment.stg.ts"
71-
}
72-
],
73-
"optimization": true,
74-
"outputHashing": "all",
75-
"sourceMap": false,
76-
"namedChunks": false,
77-
"aot": true,
78-
"extractLicenses": true,
79-
"vendorChunk": false,
80-
"buildOptimizer": true,
81-
"budgets": [
82-
{
83-
"type": "initial",
84-
"maximumWarning": "2mb",
85-
"maximumError": "5mb"
86-
},
87-
{
88-
"type": "anyComponentStyle",
89-
"maximumWarning": "6kb"
122+
"with": "src/environments/environment.prod.ts"
90123
}
91124
]
92125
},
93-
"test": {
126+
"dev": {
127+
"buildOptimizer": false,
128+
"optimization": false,
129+
"vendorChunk": true,
130+
"extractLicenses": false,
131+
"sourceMap": true,
132+
"namedChunks": true,
94133
"fileReplacements": [
95134
{
96135
"replace": "src/environments/environment.ts",
97-
"with": "src/environments/environment.test.ts"
136+
"with": "src/environments/environment.dev.ts"
98137
}
99-
],
100-
"optimization": true,
101-
"outputHashing": "all",
102-
"sourceMap": false,
103-
"namedChunks": false,
104-
"aot": true,
105-
"extractLicenses": true,
106-
"vendorChunk": false,
107-
"buildOptimizer": true,
108-
"budgets": [
109-
{
110-
"type": "initial",
111-
"maximumWarning": "2mb",
112-
"maximumError": "5mb"
113-
},
138+
]
139+
},
140+
"stg": {
141+
"buildOptimizer": false,
142+
"optimization": false,
143+
"vendorChunk": true,
144+
"extractLicenses": false,
145+
"sourceMap": true,
146+
"namedChunks": true,
147+
"fileReplacements": [
114148
{
115-
"type": "anyComponentStyle",
116-
"maximumWarning": "6kb"
149+
"replace": "src/environments/environment.ts",
150+
"with": "src/environments/environment.stg.ts"
117151
}
118152
]
119-
}
120-
}
121-
},
122-
"serve": {
123-
"builder": "@angular-devkit/build-angular:dev-server",
124-
"options": {
125-
"browserTarget": "clarity-seed:build"
126-
},
127-
"configurations": {
128-
"production": {
129-
"browserTarget": "clarity-seed:build:production"
130153
},
131-
"staging": {
132-
"browserTarget": "clarity-seed:build:staging"
133-
},
134-
"test": {
135-
"browserTarget": "clarity-seed:build:test"
154+
"development": {
155+
"buildOptimizer": false,
156+
"optimization": false,
157+
"vendorChunk": true,
158+
"extractLicenses": false,
159+
"sourceMap": true,
160+
"namedChunks": true
136161
}
137-
}
138-
},
139-
"extract-i18n": {
140-
"builder": "@angular-devkit/build-angular:extract-i18n",
141-
"options": {
142-
"browserTarget": "clarity-seed:build"
143-
}
144-
},
145-
"test": {
146-
"builder": "@angular-devkit/build-angular:karma",
147-
"options": {
148-
"main": "src/test.ts",
149-
"karmaConfig": "./karma.conf.js",
150-
"scripts": [
151-
"node_modules/core-js/client/shim.min.js",
152-
"node_modules/mutationobserver-shim/dist/mutationobserver.min.js",
153-
"node_modules/@webcomponents/custom-elements/custom-elements.min.js",
154-
"node_modules/@clr/icons/clr-icons.min.js",
155-
"node_modules/web-animations-js/web-animations.min.js"
156-
],
157-
"styles": [
158-
"node_modules/@clr/icons/clr-icons.min.css",
159-
"node_modules/@clr/ui/clr-ui.min.css",
160-
"src/styles.css"
161-
],
162-
"assets": ["src/libs", "src/assets"]
163-
}
164-
},
165-
"lint": {
166-
"builder": "@angular-devkit/build-angular:tslint",
167-
"options": {
168-
"tsConfig": [],
169-
"exclude": []
170-
}
171-
}
172-
}
173-
},
174-
"clarity-seed-e2e": {
175-
"root": "e2e",
176-
"sourceRoot": "e2e",
177-
"projectType": "application",
178-
"architect": {
179-
"e2e": {
180-
"builder": "@angular-devkit/build-angular:protractor",
181-
"options": {
182-
"protractorConfig": "./protractor.config.js",
183-
"devServerTarget": "clarity-seed:serve"
184-
}
185-
},
186-
"lint": {
187-
"builder": "@angular-devkit/build-angular:tslint",
188-
"options": {
189-
"tsConfig": [],
190-
"exclude": []
191-
}
162+
},
163+
"defaultConfiguration": "development"
192164
}
193165
}
194166
}
195-
},
196-
"defaultProject": "clarity-seed",
197-
"schematics": {
198-
"@schematics/angular:component": {
199-
"prefix": "app",
200-
"style": "scss"
201-
},
202-
"@schematics/angular:directive": {
203-
"prefix": "app"
204-
}
205167
}
206-
}
168+
}

annotation-app/build-script.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const fs = require('fs');
2+
const fse = require('fs-extra');
3+
const concat = require('concat');
4+
5+
const bundleFileName = 'micro-bundle-loop.js';
6+
const path = './dist/';
7+
const filesToConcat = [];
8+
9+
const buildFiles = fs.readdirSync(path);
10+
for (const file of buildFiles) {
11+
if ((file.includes('main') || file.includes('src_app_') || file.includes('scripts') || file.includes('vendors-')) && !(file.includes('.map'))) {
12+
filesToConcat.push(path + file);
13+
}
14+
}
15+
16+
(async function build() {
17+
await fse.ensureDir('elements');
18+
await concat(filesToConcat, 'elements/' + bundleFileName);
19+
})();

0 commit comments

Comments
 (0)