From 8fd5f056931b7ce89b69a0ae3a1f6f8516fd2e9b Mon Sep 17 00:00:00 2001 From: TechQuery Date: Mon, 11 Jan 2021 04:31:40 +0800 Subject: [PATCH] [optimize] upgrade Upstream packages --- .github/workflows/main.yml | 21 +++++++------------ package.json | 20 +++++++++--------- source/component/AddressField.tsx | 3 ++- source/page/Admin/User.tsx | 11 +++++----- source/page/Clinic/Edit.tsx | 4 ++-- source/page/Donation/edit.tsx | 8 +++++-- source/page/Factory/edit.tsx | 8 +++++-- source/page/Home.tsx | 2 +- source/page/Hospital/Edit.tsx | 8 +++++-- source/page/Hotel/Edit.tsx | 8 +++++-- source/page/Logistics/Edit.tsx | 12 +++++++---- .../Map/component/HierarchicalVirusMap.tsx | 5 +++-- 12 files changed, 63 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37b9b25..c129438 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,29 +3,24 @@ on: push: branches: - dev - pull_request: - branches: - - dev jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - name: Use Node.js + uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: '14' - name: Install & build run: | npm install npm run build - echo wuhan2020.kaiyuanshe.cn > dist/CNAME - name: Deploy - uses: peaceiris/actions-gh-pages@v2.10.1 - env: - PUBLISH_DIR: ./dist - PUBLISH_BRANCH: gh-pages - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} + uses: peaceiris/actions-gh-pages@v3 with: - forceOrphan: true + publish_dir: ./dist + cname: wuhan2020.kaiyuanshe.cn + personal_token: ${{ secrets.GITHUB_TOKEN }} + force_orphan: true diff --git a/package.json b/package.json index fa69215..5eb2a17 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ }, "main": "source/index.html", "dependencies": { - "boot-cell": "^1.9.1", + "boot-cell": "^1.9.3", "browser-unhandled-rejection": "^1.0.2", - "cell-router": "^2.0.3", + "cell-router": "^2.0.4", "classnames": "^2.2.6", - "clipboard-polyfill": "^3.0.1", + "clipboard-polyfill": "^3.0.2", "echarts": "^4.9.0", "github-web-widget": "^3.0.0-beta.8", "iterable-observer": "^1.0.0-beta.5", @@ -27,24 +27,24 @@ "marked": "^1.2.7", "mobx": "^5.15.7", "mobx-web-cell": "^0.3.4", - "web-cell": "^2.3.0-beta.4", - "web-utility": "^2.2.2", + "web-cell": "^2.3.0-rc.1", + "web-utility": "^2.4.3", "yaml": "^1.10.0" }, "devDependencies": { "@babel/helper-compilation-targets": "^7.12.5", - "@octokit/openapi-types": "^2.0.1", + "@octokit/openapi-types": "^2.2.0", "@types/classnames": "^2.2.11", "@types/echarts": "^4.9.3", "@types/js-base64": "^3.0.0", "@types/marked": "^1.2.1", "@types/yaml": "^1.9.7", - "@typescript-eslint/parser": "^4.11.1", + "@typescript-eslint/parser": "^4.12.0", "autoprefixer": "^9.8.6", "cross-env": "^7.0.3", - "eslint": "^7.16.0", - "husky": "^4.3.6", - "less": "^4.0.0", + "eslint": "^7.17.0", + "husky": "^4.3.7", + "less": "^4.1.0", "lint-staged": "^10.5.3", "parcel-bundler": "^1.12.4", "postcss-modules": "^3.2.2", diff --git a/source/component/AddressField.tsx b/source/component/AddressField.tsx index e60d514..be54d1b 100644 --- a/source/component/AddressField.tsx +++ b/source/component/AddressField.tsx @@ -7,11 +7,12 @@ import { createCell, Fragment } from 'web-cell'; +import type { HTMLFieldProps } from 'web-utility'; import { Field } from 'boot-cell/source/Form/Field'; import { searchAddress, coordsOf } from '../service'; -interface AddressFieldProps extends WebCellProps { +export interface AddressFieldProps extends HTMLFieldProps, WebCellProps { place?: string; province: string; city: string; diff --git a/source/page/Admin/User.tsx b/source/page/Admin/User.tsx index 4187702..bb6afc3 100644 --- a/source/page/Admin/User.tsx +++ b/source/page/Admin/User.tsx @@ -1,14 +1,13 @@ import { component, mixin, createCell } from 'web-cell'; import { observer } from 'mobx-web-cell'; import { SpinnerBox } from 'boot-cell/source/Prompt/Spinner'; -import 'boot-cell/source/Content/EdgeDetector'; -import { EdgeEvent } from 'boot-cell/source/Content/EdgeDetector'; -import { Table, TableRow } from 'boot-cell/source/Content/Table'; import { ToggleField } from 'boot-cell/source/Form/ToggleField'; +import { Button } from 'boot-cell/source/Form/Button'; +import { EdgeEvent, EdgeDetector } from 'boot-cell/source/Content/EdgeDetector'; +import { Table, TableRow } from 'boot-cell/source/Content/Table'; import { User } from '../../service'; import { user } from '../../model'; -import { Button } from 'boot-cell/source/Form/Button'; @observer @component({ @@ -88,7 +87,7 @@ export class UserAdmin extends mixin() { - + @@ -101,7 +100,7 @@ export class UserAdmin extends mixin() {

{noMore ? '没有更多数据了' : '加载更多...'}

- + ); } diff --git a/source/page/Clinic/Edit.tsx b/source/page/Clinic/Edit.tsx index 4c427d8..ee94827 100644 --- a/source/page/Clinic/Edit.tsx +++ b/source/page/Clinic/Edit.tsx @@ -1,4 +1,4 @@ -import { component, mixin, watch, createCell } from 'web-cell'; +import { WebCellProps, component, mixin, watch, createCell } from 'web-cell'; import { FormField } from 'boot-cell/source/Form/FormField'; import { InputGroup } from 'boot-cell/source/Form/InputGroup'; import { Field } from 'boot-cell/source/Form/Field'; @@ -8,7 +8,7 @@ import { Clinic, history, clinic } from '../../model'; import { RouteRoot } from '../data/menu'; import { SessionBox, ContactField } from '../../component'; -interface ClinicEditProps { +export interface ClinicEditProps extends WebCellProps { dataId?: string; } diff --git a/source/page/Donation/edit.tsx b/source/page/Donation/edit.tsx index 3aaa7b3..143c408 100644 --- a/source/page/Donation/edit.tsx +++ b/source/page/Donation/edit.tsx @@ -1,4 +1,4 @@ -import { component, mixin, watch, createCell } from 'web-cell'; +import { WebCellProps, component, mixin, watch, createCell } from 'web-cell'; import { FormField } from 'boot-cell/source/Form/FormField'; import { InputGroup } from 'boot-cell/source/Form/InputGroup'; import { Field } from 'boot-cell/source/Form/Field'; @@ -14,12 +14,16 @@ import { import { Contact } from '../../service'; import { SessionBox, ContactField } from '../../component'; +export interface DonationEditProps extends WebCellProps { + dataId: string; +} + @component({ tagName: 'donation-edit', renderTarget: 'children' }) export class DonationEdit extends mixin< - { dataId: string }, + DonationEditProps, DonationRecipient >() { @watch diff --git a/source/page/Factory/edit.tsx b/source/page/Factory/edit.tsx index 38d8994..7b6262f 100644 --- a/source/page/Factory/edit.tsx +++ b/source/page/Factory/edit.tsx @@ -1,4 +1,4 @@ -import { component, mixin, watch, createCell } from 'web-cell'; +import { component, mixin, watch, createCell, WebCellProps } from 'web-cell'; import { FormField } from 'boot-cell/source/Form/FormField'; import { Button } from 'boot-cell/source/Form/Button'; @@ -14,11 +14,15 @@ import { ContactField } from '../../component'; +export interface FactoryEditProps extends WebCellProps { + dataId: string; +} + @component({ tagName: 'factory-edit', renderTarget: 'children' }) -export class FactoryEdit extends mixin<{ dataId: string }, Factory>() { +export class FactoryEdit extends mixin() { @watch dataId = ''; diff --git a/source/page/Home.tsx b/source/page/Home.tsx index cf05287..686d4a0 100644 --- a/source/page/Home.tsx +++ b/source/page/Home.tsx @@ -13,7 +13,7 @@ export function HomePage() { />
手机号