From 18bcd8944d05c6df49f77c7f58271036c1f2b919 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Sat, 11 Sep 2021 21:09:39 +0200 Subject: [PATCH] introduce `@anticrm/panel` package Signed-off-by: Andrey Platov --- common/config/rush/pnpm-lock.yaml | 57 ++++++++++++++++++- packages/panel/package.json | 25 ++++++++ packages/panel/postcss.config.js | 5 ++ .../src/components/Panel.svelte | 0 packages/panel/src/index.ts | 17 ++++++ packages/panel/svelte.config.js | 5 ++ packages/panel/tsconfig.json | 15 +++++ packages/presentation/src/index.ts | 1 - plugins/recruit-resources/package.json | 3 +- .../src/components/EditCandidate.svelte | 3 +- rush.json | 5 ++ 11 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 packages/panel/package.json create mode 100644 packages/panel/postcss.config.js rename packages/{presentation => panel}/src/components/Panel.svelte (100%) create mode 100644 packages/panel/src/index.ts create mode 100644 packages/panel/svelte.config.js create mode 100644 packages/panel/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d66f9b8b42..3342c8f8ae 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -39,6 +39,7 @@ specifiers: '@rush-temp/model-view': file:./projects/model-view.tgz '@rush-temp/model-workbench': file:./projects/model-workbench.tgz '@rush-temp/mongo': file:./projects/mongo.tgz + '@rush-temp/panel': file:./projects/panel.tgz '@rush-temp/platform': file:./projects/platform.tgz '@rush-temp/platform-rig': file:./projects/platform-rig.tgz '@rush-temp/pod-account': file:./projects/pod-account.tgz @@ -119,6 +120,7 @@ specifiers: sass-loader: ^12.1.0 simplytyped: ^3.3.0 style-loader: ^3.2.1 + svelte-check: ^2.2.5 svelte-preprocess: ^4.7.4 svgo-loader: ^3.0.0 toposort: ^2.0.2 @@ -169,6 +171,7 @@ dependencies: '@rush-temp/model-view': file:projects/model-view.tgz_6c259fadfeb3a4b20890aefe87070b8b '@rush-temp/model-workbench': file:projects/model-workbench.tgz_6c259fadfeb3a4b20890aefe87070b8b '@rush-temp/mongo': file:projects/mongo.tgz_6c259fadfeb3a4b20890aefe87070b8b + '@rush-temp/panel': file:projects/panel.tgz_c38cf1a7a413db8918b0b4754c21e4c5 '@rush-temp/platform': file:projects/platform.tgz_6c259fadfeb3a4b20890aefe87070b8b '@rush-temp/platform-rig': file:projects/platform-rig.tgz_6ab28797e7a22071465f7d680ae81ae5 '@rush-temp/pod-account': file:projects/pod-account.tgz_6c259fadfeb3a4b20890aefe87070b8b @@ -249,6 +252,7 @@ dependencies: sass-loader: 12.1.0_sass@1.37.5+webpack@5.48.0 simplytyped: 3.3.0_typescript@4.3.5 style-loader: 3.2.1_webpack@5.48.0 + svelte-check: 2.2.5_8d5e7d8774dfc5d41599a7408187eba0 svelte-preprocess: 4.7.4_50400bf9937d80c38e5edf397791f1b6 svgo-loader: 3.0.0 toposort: 2.0.2 @@ -8196,6 +8200,34 @@ packages: - sugarss dev: false + /svelte-check/2.2.5_8d5e7d8774dfc5d41599a7408187eba0: + resolution: {integrity: sha512-EstDoqxjqWStWELh7Z0qytqUDl/ikdNEr21dveNc4fUDnhnqO2F2jHEufqoNnC3GfBji3GIUHvoXsp/I5lMbCg==} + hasBin: true + peerDependencies: + svelte: ^3.24.0 + dependencies: + chalk: 4.1.2 + chokidar: 3.4.3 + glob: 7.1.7 + import-fresh: 3.3.0 + minimist: 1.2.5 + sade: 1.7.4 + source-map: 0.7.3 + svelte-preprocess: 4.7.4_50400bf9937d80c38e5edf397791f1b6 + typescript: 4.3.5 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - node-sass + - postcss + - postcss-load-config + - pug + - sass + - stylus + - sugarss + dev: false + /svelte-dev-helper/1.1.9: resolution: {integrity: sha1-fRh9tcbNu9ZNdaMvkbiZi94yc8M=} dev: false @@ -10035,6 +10067,29 @@ packages: - typescript dev: false + file:projects/panel.tgz_c38cf1a7a413db8918b0b4754c21e4c5: + resolution: {integrity: sha512-S2iwMIfXT+j9Nr0QPUxF6KK1xAZhcMMO9kmGDaiRMHmcHIPGVh/mzpS+LiyDOqVpSzr99s1MgR2gL5VO9CVbeA==, tarball: file:projects/panel.tgz} + id: file:projects/panel.tgz + name: '@rush-temp/panel' + version: 0.0.0 + dependencies: + sass: 1.37.5 + svelte: 3.42.1 + svelte-loader: 3.1.2_svelte@3.42.1 + svelte-preprocess: 4.7.4_c407529626dbb58d14a718f48c7fa84c + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - node-sass + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - typescript + dev: false + file:projects/platform-rig.tgz_6ab28797e7a22071465f7d680ae81ae5: resolution: {integrity: sha512-VwGZVPcf2apIoa4sxQkIvW90B4otxf7ayw1jlTiZKQsQfwnLRKXvInMbIIAP0zCPRWIZdXXBYpUDm3dOJ/2bYQ==, tarball: file:projects/platform-rig.tgz} id: file:projects/platform-rig.tgz @@ -10475,7 +10530,7 @@ packages: dev: false file:projects/ui.tgz_c38cf1a7a413db8918b0b4754c21e4c5: - resolution: {integrity: sha512-0c3Kif2z3qzO+oqkrK7BCL5USvkS4YwBBOzFIFW+RK2fiEeAQJydTYSm8hcgpBHDi1+GhuFKxZt3/ok7HVqBjg==, tarball: file:projects/ui.tgz} + resolution: {integrity: sha512-aNedEBeCrIE78QZzx+gTq/2Ui7Ba5Kh7QAvW+U2ineXL8cBnjhMl9mf8eD3YwQyEx6qCGy0PAMaEYKFedoWWAQ==, tarball: file:projects/ui.tgz} id: file:projects/ui.tgz name: '@rush-temp/ui' version: 0.0.0 diff --git a/packages/panel/package.json b/packages/panel/package.json new file mode 100644 index 0000000000..0b6200ddb6 --- /dev/null +++ b/packages/panel/package.json @@ -0,0 +1,25 @@ +{ + "name": "@anticrm/panel", + "version": "0.6.0", + "main": "src/index.ts", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "", + "build:docs": "api-extractor run --local", + "test": "jest", + "lint": "eslint src", + "lint:fix": "eslint --fix src", + "format": "prettier --write 'src/**/*.{ts*,js*,yml}' && eslint --fix src" + }, + "devDependencies": { + "svelte-loader":"^3.1.2", + "sass":"^1.37.5", + "svelte-preprocess":"^4.7.4" + }, + "dependencies": { + "@anticrm/ui": "~0.6.0", + "@anticrm/text-editor": "~0.6.0", + "svelte": "^3.37.0" + } +} diff --git a/packages/panel/postcss.config.js b/packages/panel/postcss.config.js new file mode 100644 index 0000000000..88752c6cb0 --- /dev/null +++ b/packages/panel/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +} diff --git a/packages/presentation/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte similarity index 100% rename from packages/presentation/src/components/Panel.svelte rename to packages/panel/src/components/Panel.svelte diff --git a/packages/panel/src/index.ts b/packages/panel/src/index.ts new file mode 100644 index 0000000000..b041fd4e07 --- /dev/null +++ b/packages/panel/src/index.ts @@ -0,0 +1,17 @@ +// +// Copyright © 2020, 2021 Anticrm Platform Contributors. +// Copyright © 2021 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +export { default as Panel } from './components/Panel.svelte' diff --git a/packages/panel/svelte.config.js b/packages/panel/svelte.config.js new file mode 100644 index 0000000000..944a06f73e --- /dev/null +++ b/packages/panel/svelte.config.js @@ -0,0 +1,5 @@ +const sveltePreprocess = require('svelte-preprocess') + +module.exports = { + preprocess: sveltePreprocess() +}; \ No newline at end of file diff --git a/packages/panel/tsconfig.json b/packages/panel/tsconfig.json new file mode 100644 index 0000000000..cabe5aefad --- /dev/null +++ b/packages/panel/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "target": "esnext", + "module": "esnext", + "declaration": true, + "outDir": "./lib", + "strict": true, + "esModuleInterop": true, + "lib": [ + "esnext", + "dom" + ] + } +} \ No newline at end of file diff --git a/packages/presentation/src/index.ts b/packages/presentation/src/index.ts index d44aed3cf1..d5cccbc911 100644 --- a/packages/presentation/src/index.ts +++ b/packages/presentation/src/index.ts @@ -23,4 +23,3 @@ export { default as MessageViewer } from './components/MessageViewer.svelte' export { default as AttributeEditor } from './components/AttributeEditor.svelte' export { default as Card } from './components/Card.svelte' export { default as Channels } from './components/Channels.svelte' -export { default as Panel } from './components/Panel.svelte' diff --git a/plugins/recruit-resources/package.json b/plugins/recruit-resources/package.json index 9d730ea4b3..c21c3551a4 100644 --- a/plugins/recruit-resources/package.json +++ b/plugins/recruit-resources/package.json @@ -29,6 +29,7 @@ "@anticrm/chunter": "~0.6.0", "@anticrm/contact": "~0.6.0", "@anticrm/login": "~0.6.0", - "deep-equal": "^2.0.5" + "deep-equal": "^2.0.5", + "@anticrm/panel": "~0.6.0" } } diff --git a/plugins/recruit-resources/src/components/EditCandidate.svelte b/plugins/recruit-resources/src/components/EditCandidate.svelte index 937a942d38..cb7c5bdb20 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -17,7 +17,8 @@ import { createEventDispatcher } from 'svelte' import type { Ref, Space, Doc } from '@anticrm/core' import { Tabs } from '@anticrm/ui' - import { getClient, Panel } from '@anticrm/presentation' + import { getClient } from '@anticrm/presentation' + import { Panel } from '@anticrm/panel' import type { Candidate } from '@anticrm/recruit' import DialogHeader from './DialogHeader.svelte' import Contact from './icons/Contact.svelte' diff --git a/rush.json b/rush.json index 4d31f81df1..e9b5275d9c 100644 --- a/rush.json +++ b/rush.json @@ -761,5 +761,10 @@ "projectFolder": "pods/account", "shouldPublish": false }, + { + "packageName": "@anticrm/panel", + "projectFolder": "packages/panel", + "shouldPublish": true + }, ] }