├── .editorconfig
├── .gitignore
├── LICENSE
├── README.md
├── angular.json
├── e2e
├── app.e2e-spec.ts
├── app.po.ts
└── tsconfig.e2e.json
├── karma.conf.js
├── package-lock.json
├── package.json
├── protractor.conf.js
├── proxy-config.json
├── src
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ └── app.module.ts
├── assets
│ └── .gitkeep
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── main.ts
├── polyfills.ts
├── styles.scss
├── test.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── typings.d.ts
├── tools
└── build.js
├── tsconfig.json
└── tslint.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 4
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 | /.angular
36 |
37 | # e2e
38 | /e2e/*.js
39 | /e2e/*.map
40 |
41 | # System Files
42 | .DS_Store
43 | Thumbs.db
44 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2017 ZTE
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Jigsaw Seed
2 |
3 | 这是组件库[Jigsaw](https://github.com/rdkmaster/jigsaw)的种子工程,适用于开发**桌面端浅色系**的app,建议所有新增的app都以这个工程作为种子开始构建。[具体步骤看这里](http://rdk.zte.com.cn/components/guide/quick-start)。
4 |
5 | **所有可用的种子工程**
6 |
7 | 终端 | 链接
8 | -----|-----
9 | 桌面端 | [仓库](https://github.com/rdkmaster/jigsaw-seed) / [直接下载](https://github.com/rdkmaster/jigsaw-seed/archive/master.zip)
10 | 移动端 | [仓库](https://github.com/rdkmaster/jigsaw-seed-mobile) / [直接下载](https://github.com/rdkmaster/jigsaw-seed-mobile/archive/master.zip)
11 |
12 |
13 | **关于cnpm安装的依赖编译失败的说明**
14 |
15 | 重要提示:
16 | 1. 别用`cnpm`安装依赖,务必使用原生`npm`安装依赖!
17 | 2. 别用`cnpm`安装依赖,务必使用原生`npm`安装依赖!
18 | 3. 别用`cnpm`安装依赖,务必使用原生`npm`安装依赖!
19 |
20 | 虽然不能使用`cnpm`安装依赖,但是可以使用淘宝镜像加速,方法如下:
21 |
22 | ```
23 | cd jigsaw-seed # 请改为实际目录
24 | npm install --registry=https://registry.npm.taobao.org
25 | ```
26 |
27 | > 不能使用`cnpm`安装依赖的原因[在这里](https://github.com/cnpm/cnpmjs.org/issues/1463),感兴趣可以过去点个赞一下,促进cnpm改进。
28 |
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "jigsaw-seed": {
7 | "projectType": "application",
8 | "schematics": {
9 | "@schematics/angular:component": {
10 | "style": "scss"
11 | }
12 | },
13 | "root": "",
14 | "sourceRoot": "src",
15 | "prefix": "app",
16 | "architect": {
17 | "build": {
18 | "builder": "@angular-devkit/build-angular:browser",
19 | "options": {
20 | "outputPath": "dist/jigsaw-seed",
21 | "index": "src/index.html",
22 | "main": "src/main.ts",
23 | "polyfills": "src/polyfills.ts",
24 | "tsConfig": "src/tsconfig.app.json",
25 | "sourceMap": true,
26 | "assets": [
27 | "src/favicon.ico",
28 | "src/assets",
29 | {
30 | "glob": "*.css",
31 | "input": "node_modules/@rdkmaster/jigsaw/prebuilt-themes/",
32 | "output": "/themes/"
33 | },
34 | {
35 | "glob": "*.css",
36 | "input": "node_modules/@rdkmaster/jigsaw/prebuilt-themes/wings-theme/",
37 | "output": "/themes/wings-theme/"
38 | },
39 | {
40 | "glob": "*",
41 | "input": "node_modules/@rdkmaster/icon-font/",
42 | "output": "/"
43 | }
44 | ],
45 | "styles": [
46 | "node_modules/ztree/css/zTreeStyle/zTreeStyle.css",
47 | "node_modules/perfect-scrollbar/css/perfect-scrollbar.css",
48 | "node_modules/@rdkmaster/icon-font/iconfont.css",
49 | "src/styles.scss"
50 | ],
51 | "scripts": [
52 | "node_modules/jquery/dist/jquery.min.js",
53 | "node_modules/moment/min/moment.min.js",
54 | "node_modules/ztree/js/jquery.ztree.all.js",
55 | "node_modules/ztree/js/jquery.ztree.exhide.js",
56 | "node_modules/peity/jquery.peity.min.js",
57 | "node_modules/echarts/dist/echarts.js"
58 | ]
59 | },
60 | "configurations": {
61 | "production": {
62 | "fileReplacements": [
63 | {
64 | "replace": "src/environments/environment.ts",
65 | "with": "src/environments/environment.prod.ts"
66 | }
67 | ],
68 | "optimization": true,
69 | "outputHashing": "all",
70 | "sourceMap": false,
71 | "extractCss": true,
72 | "namedChunks": false,
73 | "aot": true,
74 | "extractLicenses": true,
75 | "vendorChunk": false,
76 | "buildOptimizer": true,
77 | "budgets": [
78 | {
79 | "type": "initial",
80 | "maximumWarning": "2mb",
81 | "maximumError": "5mb"
82 | }
83 | ]
84 | }
85 | }
86 | },
87 | "serve": {
88 | "builder": "@angular-devkit/build-angular:dev-server",
89 | "options": {
90 | "browserTarget": "jigsaw-seed:build"
91 | },
92 | "configurations": {
93 | "production": {
94 | "browserTarget": "jigsaw-seed:build:production"
95 | }
96 | }
97 | },
98 | "extract-i18n": {
99 | "builder": "@angular-devkit/build-angular:extract-i18n",
100 | "options": {
101 | "browserTarget": "jigsaw-seed:build"
102 | }
103 | },
104 | "test": {
105 | "builder": "@angular-devkit/build-angular:karma",
106 | "options": {
107 | "main": "src/test.ts",
108 | "tsConfig": "src/tsconfig.spec.json",
109 | "karmaConfig": "karma.conf.js"
110 | }
111 | },
112 | "lint": {
113 | "builder": "@angular-devkit/build-angular:tslint",
114 | "options": {
115 | "tsConfig": [
116 | "tsconfig.app.json",
117 | "tsconfig.spec.json",
118 | "e2e/tsconfig.json"
119 | ],
120 | "exclude": [
121 | "**/node_modules/**"
122 | ]
123 | }
124 | },
125 | "e2e": {
126 | "builder": "@angular-devkit/build-angular:protractor",
127 | "options": {
128 | "protractorConfig": "e2e/protractor.conf.js",
129 | "devServerTarget": "jigsaw-seed:serve"
130 | },
131 | "configurations": {
132 | "production": {
133 | "devServerTarget": "jigsaw-seed:serve:production"
134 | }
135 | }
136 | }
137 | }
138 | }},
139 | "defaultProject": "jigsaw-seed"
140 | }
141 |
--------------------------------------------------------------------------------
/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { FirstAppPage } from './app.po';
2 |
3 | describe('Jigsaw Seed App', () => {
4 | let page: FirstAppPage;
5 |
6 | beforeEach(() => {
7 | page = new FirstAppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to Jigsaw Seed!!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class FirstAppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('jigsaw-app h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/0.13/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | //require('karma-chrome-launcher'),
11 | require('karma-phantomjs-launcher'),
12 | require('karma-jasmine-html-reporter'),
13 | require('karma-coverage-istanbul-reporter'),
14 | require('@angular-devkit/build-angular/plugins/karma')
15 | ],
16 | client: {
17 | clearContext: false // leave Jasmine Spec Runner output visible in browser
18 | },
19 | coverageIstanbulReporter: {
20 | dir: require('path').join(__dirname, './coverage/jigsaw-app'),
21 | reports: ['html', 'lcovonly', 'text-summary'],
22 | fixWebpackSourcePaths: true
23 | },
24 | reporters: ['progress', 'kjhtml'],
25 | port: 9876,
26 | colors: true,
27 | logLevel: config.LOG_INFO,
28 | autoWatch: true,
29 | browsers: [/*'Chrome', */'PhantomJS'],
30 | singleRun: false
31 | });
32 | };
33 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Jigsaw-Seed",
3 | "version": "1.0.0",
4 | "license": "MIT",
5 | "scripts": {
6 | "ng": "ng",
7 | "start": "node tools/build.js dev",
8 | "build": "node tools/build.js prod",
9 | "test": "ng test",
10 | "lint": "ng lint",
11 | "e2e": "ng e2e"
12 | },
13 | "private": false,
14 | "dependencies": {
15 | "@angular/animations": "~13.3.0",
16 | "@angular/common": "~13.3.0",
17 | "@angular/compiler": "~13.3.0",
18 | "@angular/core": "~13.3.0",
19 | "@angular/forms": "~13.3.0",
20 | "@angular/platform-browser": "~13.3.0",
21 | "@angular/platform-browser-dynamic": "~13.3.0",
22 | "@angular/router": "~13.3.0",
23 | "@ngx-formly/core": "^5.0.0",
24 | "@ngx-formly/schematics": "^5.10.5",
25 | "@ngx-translate/core": "~11.0.1",
26 | "@rdkmaster/icon-font": "^5.0.0",
27 | "@rdkmaster/jigsaw": "^10.9.9",
28 | "core-js": "~3.0.1",
29 | "echarts": "~4.9.0",
30 | "file-saver": "~2.0.1",
31 | "jquery": "~3.5.1",
32 | "jszip": "3.7.0",
33 | "moment": "2.22.2",
34 | "ngx-color-picker": "~8.0.0",
35 | "ngx-perfect-scrollbar": "~8.0.0",
36 | "perfect-scrollbar": "~1.4.0",
37 | "peity": "~3.2.1",
38 | "rxjs": "~6.5.3",
39 | "web-animations-js": "~2.3.2",
40 | "zone.js": "~0.10.2",
41 | "ztree": "~3.5.24"
42 | },
43 | "devDependencies": {
44 | "@angular-devkit/build-angular": "~13.3.11",
45 | "@angular/cli": "^13.3.11",
46 | "@angular/compiler-cli": "^13.4.0",
47 | "@angular/language-service": "^13.4.0",
48 | "@types/jasmine": "~3.3.8",
49 | "@types/node": "~12.11.1",
50 | "codelyzer": "~5.1.2",
51 | "fs-extra": "~3.0.1",
52 | "glob": "~7.1.6",
53 | "jasmine-core": "~3.4.0",
54 | "jasmine-spec-reporter": "~4.2.1",
55 | "karma": "~4.1.0",
56 | "karma-chrome-launcher": "~2.2.0",
57 | "karma-coverage-istanbul-reporter": "~2.0.1",
58 | "karma-jasmine": "~2.0.1",
59 | "karma-jasmine-html-reporter": "~1.4.0",
60 | "karma-phantomjs-launcher": "~1.0.4",
61 | "protractor": "~5.4.0",
62 | "stream": "0.0.2",
63 | "ts-node": "~7.0.0",
64 | "tslint": "~6.1.0",
65 | "typescript": "4.6.4",
66 | "uuid": "~3.4.0"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './e2e/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/proxy-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "/rdk/service/": "http://rdk.zte.com.cn:5812"
3 | }
4 |
--------------------------------------------------------------------------------
/src/app/app.component.css:
--------------------------------------------------------------------------------
1 | .header {
2 | height: 48px;
3 | display: flex;
4 | align-items: center;
5 | position: relative;
6 | }
7 |
8 | .header .name {
9 | font-size: 18px;
10 | color: var(--bg-disabled);
11 | margin-left: 10px;
12 | margin-top: 10px;
13 | }
14 |
15 | .header img {
16 | margin-left: 8px;
17 | height: 32px;
18 | }
19 |
20 | .header jigsaw-button-bar {
21 | position: absolute;
22 | right: 176px;
23 | }
24 |
25 | .header jigsaw-search-input {
26 | position: absolute;
27 | right: 8px;
28 | }
29 |
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
6 |
13 | Jigsaw
14 |