Fix build cache (#1996)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2022-06-03 23:44:11 +07:00
committed by GitHub
parent 49572cc712
commit 09cc70dfd6
106 changed files with 2685 additions and 3205 deletions
+48 -71
View File
@@ -2,13 +2,17 @@
name: CI
# Controls when the action will run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main, develop ]
branches: [main, develop]
create:
tags:
- v*
@@ -25,6 +29,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v3
env:
@@ -34,8 +41,27 @@ jobs:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Cache PR common
uses: actions/cache@v3
with:
path: ./common/temp
key: ${{ runner.os }}-build-ref-${{ github.ref }}
restore-keys: |
${{ runner.os }}-build-ref-${{ github.ref }}
- name: Cache build results
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Setting model version from git release...
run: node common/scripts/install-run-rush.js bump-model-version
- name: Building...
run: node common/scripts/install-run-rush.js build
- name: Cache build results for next jobs
uses: actions/cache@v3
env:
cache-name: cache-build-results
@@ -56,24 +82,8 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
# Checkout after restore cache
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checking for mis-matching dependencies...
run: node common/scripts/install-run-rush.js check
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Setting model version from git release...
run: node common/scripts/install-run-rush.js bump-model-version
- name: Building...
run: node common/scripts/install-run-rush.js build -p 16 -l
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
svelte-check:
needs: build
runs-on: ubuntu-latest
@@ -103,45 +113,11 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Checking svelte sources...
run: node common/scripts/install-run-rush.js svelte-check
linting:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache build results
uses: actions/cache@v3
env:
cache-name: cache-build-results
with:
path: |
cloud
common
deploy
dev
models
packages
plugins
pods
products
server
server-plugins
templates
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
- name: Linting...
run: node common/scripts/install-run-rush.js lint -p 16
formatting:
needs: build
runs-on: ubuntu-latest
@@ -149,7 +125,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache build results
uses: actions/cache@v3
env:
@@ -171,11 +146,13 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Install...
run: node common/scripts/install-run-rush.js install
- name: Formatting...
run: node common/scripts/install-run-rush.js format -p 16
run: node common/scripts/install-run-rush.js format
- name: Check files formatting
run: |
echo '================================================================'
@@ -183,7 +160,7 @@ jobs:
echo '================================================================'
git diff '*.ts' '*.svelte' | cat
[ -z "$(git diff --name-only '*.ts' '*.svelte' | cat)" ]
echo '================================================================'
echo '================================================================'
test:
needs: build
runs-on: ubuntu-latest
@@ -213,8 +190,8 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.7.0
@@ -259,8 +236,8 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Installing...
run: node common/scripts/install-run-rush.js install
@@ -288,7 +265,7 @@ jobs:
path: ./tests/sanity/playwright-report/
docker-build:
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
needs: [ build, uitest, test, linting, svelte-check ]
needs: [build, uitest, test, svelte-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -316,15 +293,15 @@ jobs:
tests
rush.json
.prettierrc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Setting model version from git release...
run: node common/scripts/install-run-rush.js bump-model-version
- name: Build, to include new model version
run: node common/scripts/install-run-rush.js build -p 16
run: node common/scripts/install-run-rush.js build
- name: Bundle
run: node common/scripts/install-run-rush.js bundle
- name: Docker build
+2228 -2820
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -22,7 +22,7 @@
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint": "^7.32.0",
"ts-node": "~10.5.0",
"ts-node": "^10.8.0",
"esbuild": "^0.12.26",
"@types/node": "~16.11.12",
"@typescript-eslint/parser": "^5.4.0",
+2 -1
View File
@@ -37,7 +37,8 @@ module.exports = {
resolve: {
symlinks: true,
alias: {
svelte: path.resolve('./node_modules', 'svelte')
svelte: path.resolve('./node_modules', 'svelte'),
'@anticrm/platform-rig/profiles/ui/svelte': path.resolve('./node_modules', 'svelte')
},
extensions: ['.mjs', '.js', '.svelte', '.ts'],
mainFields: ['svelte', 'browser', 'module', 'main']
+1 -1
View File
@@ -20,7 +20,7 @@
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint": "^7.32.0",
"ts-node": "~10.5.0",
"ts-node": "^10.8.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"prettier": "^2.4.1",
+2 -2
View File
@@ -27,7 +27,7 @@
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint": "^7.32.0",
"ts-node": "~10.5.0",
"ts-node": "^10.8.0",
"esbuild": "^0.12.26",
"@types/minio": "~7.0.11",
"@types/node": "~16.11.12",
@@ -39,7 +39,7 @@
"@types/ws": "^8.2.1",
"@types/xml2js": "~0.4.9",
"@types/mime-types": "~2.1.1",
"@types/request": "~2.48.8"
"@types/request": "~2.48.8"
},
"dependencies": {
"mongodb": "^4.1.1",
+1 -1
View File
@@ -22,7 +22,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint": "^7.32.0",
"@types/node": "~16.11.12",
"ts-node": "~10.5.0",
"ts-node": "^10.8.0",
"@types/heft-jest": "^1.0.2",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
+3 -3
View File
@@ -159,9 +159,9 @@ export type OmitNever<T extends object> = Omit<T, KeysByType<T, never>>
* @public
*/
export interface PushOptions<T extends object> {
$push?: Partial<OmitNever<ArrayAsElementPosition<T>>>
$pull?: Partial<OmitNever<ArrayAsElement<T>>>
$move?: Partial<OmitNever<ArrayMoveDescriptor<T>>>
$push?: Partial<OmitNever<ArrayAsElementPosition<Required<T>>>>
$pull?: Partial<OmitNever<ArrayAsElement<Required<T>>>>
$move?: Partial<OmitNever<ArrayMoveDescriptor<Required<T>>>>
}
/**
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+1
View File
@@ -13,6 +13,7 @@
// limitations under the License.
//
import '@anticrm/platform-rig/profiles/ui/svelte'
export * from './types'
export { default as Kanban } from './components/Kanban.svelte'
-1
View File
@@ -1,5 +1,4 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/ui/tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"target": "esnext",
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+1
View File
@@ -14,4 +14,5 @@
// limitations under the License.
//
import '@anticrm/platform-rig/profiles/ui/svelte'
export { default as Panel } from './components/Panel.svelte'
@@ -0,0 +1,11 @@
{
"incrementalBuildIgnoredGlobs": ["temp/**"],
"disableBuildCacheForProject": false,
"operationSettings": [
{
"operationName": "build",
"outputFolderNames": ["lib", "dist"]
}
]
}
@@ -99,7 +99,7 @@
*
* DEFAULT VALUE: false
*/
// "skipLibCheck": true,
"skipLibCheck": true
},
/**
@@ -330,6 +330,9 @@
"default": {
"logLevel": "warning"
// "addToApiReportFile": false
},
"ae-wrong-input-file-type": {
"logLevel": "none"
}
// "ae-extra-release-tag": {
@@ -1,11 +1,4 @@
{
"incrementalBuildIgnoredGlobs": ["temp/**"],
"disableBuildCacheForProject": false,
"operationSettings": [
{
"operationName": "build",
"outputFolderNames": ["lib", "dist"]
}
]
"disableBuildCacheForProject": true
}
+4
View File
@@ -0,0 +1,4 @@
declare module "*.svelte" {
const value: any;
export default value;
}
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -46,7 +46,7 @@
</div>
<div class="buttons-group small-gap">
<Button
id={'card-close'}
id="card-close"
focusIndex={10002}
icon={IconClose}
kind={'transparent'}
@@ -55,36 +55,31 @@
}
$: updateSelected(value)
const showSpacesPopup = (ev: MouseEvent) => {
showPopup(
SpacesPopup,
{
_class,
label,
options: { sort: { modifiedOn: -1 } },
selected,
spaceQuery,
create
},
eventToHTMLElement(ev),
(result) => {
if (result) {
value = result._id
mgr?.setFocusPos(focusIndex)
}
}
)
}
</script>
<Tooltip {label} fill={false} direction={labelDirection}>
<Button
{focus}
{focusIndex}
icon={IconFolder}
size={'small'}
kind={'no-border'}
on:click={(ev) => {
showPopup(
SpacesPopup,
{
_class,
label,
options: { sort: { modifiedOn: -1 } },
selected,
spaceQuery,
create
},
eventToHTMLElement(ev),
(result) => {
if (result) {
value = result._id
mgr?.setFocusPos(focusIndex)
}
}
)
}}
>
<Button {focus} {focusIndex} icon={IconFolder} size={'small'} kind={'no-border'} on:click={showSpacesPopup}>
<span slot="content" class="text-sm">
{#if selected}{selected.name}{:else}<Label {label} />{/if}
</span>
-1
View File
@@ -20,7 +20,6 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -6,7 +6,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+2
View File
@@ -13,4 +13,6 @@
// limitations under the License.
//
import '@anticrm/platform-rig/profiles/ui/svelte'
export { default as Theme } from './Theme.svelte'
-5
View File
@@ -1,5 +0,0 @@
declare module '*.svelte' {
import { SvelteComponent } from 'svelte'
const Component: SvelteComponent
export default Component
}
+1
View File
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"moduleResolution": "node",
"target": "esnext",
"module": "esnext",
"declaration": true,
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+5 -3
View File
@@ -5,7 +5,8 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:watch": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +25,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -33,6 +34,7 @@
"dependencies": {
"@anticrm/platform": "~0.6.6",
"@anticrm/theme": "~0.6.0",
"svelte": "^3.47"
"svelte": "^3.47",
"@types/jest": "~28.1.0"
}
}
@@ -1,11 +0,0 @@
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
// It should be published with your NPM package. It should not be tracked by Git.
{
"tsdocVersion": "0.12",
"toolPackages": [
{
"packageName": "@microsoft/api-extractor",
"packageVersion": "7.23.0"
}
]
}
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -98,7 +98,7 @@
...actions.map((a) => ({
label: a.label,
icon: a.icon,
action: async (ctx: any, evt: Event) => {
action: async (_: any, evt: Event) => {
const impl = await getResource(a.action)
await impl(tx.doc as Doc, evt)
}
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -20,7 +20,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.4.1",
"prettier-plugin-svelte": "^2.7.0",
"sass": "^1.37.5",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+19 -7
View File
@@ -13,7 +13,7 @@
// limitations under the License.
//
import core, { Space } from '@anticrm/core'
import core, { Ref, Space } from '@anticrm/core'
import chunter, { ChunterSpace, Channel, ChunterMessage, Message, ThreadMessage, DirectMessage } from '@anticrm/chunter'
import { NotificationClientImpl } from '@anticrm/notification-resources'
import { Resources } from '@anticrm/platform'
@@ -77,20 +77,32 @@ async function UnsubscribeMessage (object: Message): Promise<void> {
}
}
type PinnedChunterSpace = ChunterSpace
async function PinMessage (message: ChunterMessage): Promise<void> {
const client = getClient()
await client.updateDoc<ChunterSpace>(chunter.class.ChunterSpace, core.space.Space, message.space, {
$push: { pinned: message._id }
})
await client.updateDoc<PinnedChunterSpace>(
chunter.class.ChunterSpace,
core.space.Space,
message.space as Ref<PinnedChunterSpace>,
{
$push: { pinned: message._id }
}
)
}
export async function UnpinMessage (message: ChunterMessage): Promise<void> {
const client = getClient()
await client.updateDoc<ChunterSpace>(chunter.class.ChunterSpace, core.space.Space, message.space, {
$pull: { pinned: message._id }
})
await client.updateDoc<PinnedChunterSpace>(
chunter.class.ChunterSpace,
core.space.Space,
message.space as Ref<PinnedChunterSpace>,
{
$pull: { pinned: message._id }
}
)
}
export async function ArchiveChannel (channel: Channel, afterArchive?: () => void): Promise<void> {
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -1,11 +0,0 @@
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
// It should be published with your NPM package. It should not be tracked by Git.
{
"tsdocVersion": "0.12",
"toolPackages": [
{
"packageName": "@microsoft/api-extractor",
"packageVersion": "7.23.0"
}
]
}
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
import '@anticrm/platform-rig/profiles/ui/svelte'
import { Resources } from '@anticrm/platform'
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -45,12 +45,7 @@
updateResultQuery(search)
}}
/>
<Button
label={inventory.string.CategoryCreateLabel}
icon={IconAdd}
kind={'primary'}
on:click={(ev) => showCreateDialog(ev)}
/>
<Button label={inventory.string.CategoryCreateLabel} icon={IconAdd} kind={'primary'} on:click={showCreateDialog} />
</div>
<Scroller>
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -123,6 +123,9 @@
if (prov === undefined) return false
return prov.default
}
const createHandler = (type: Ref<NotificationType>, provider: Ref<NotificationProvider>): ((evt: any) => void) => {
return (evt: any) => change(type, provider, evt.detail)
}
</script>
<div class="antiComponent">
@@ -140,7 +143,7 @@
<ToggleWithLabel
label={provider.label}
on={getStatus(settings, type._id, provider._id)}
on:change={(e) => change(type._id, provider._id, e.detail)}
on:change={createHandler(type._id, provider._id)}
/>
{/each}
{/each}
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -75,6 +75,11 @@
is = editor.editor
}
}
const handleSelection = (e: { detail: Ref<Class<Type<any>>> }) => selectType(e.detail)
const handleChange = (e: any) => {
type = e.detail?.type
index = e.detail?.index
}
</script>
<Card
@@ -95,19 +100,13 @@
{items}
width="8rem"
bind:selected={selectedType}
on:selected={(e) => selectType(e.detail)}
on:selected={handleSelection}
/>
</div>
</div>
{#if is}
<div class="flex mt-4">
<Component
{is}
on:change={(e) => {
type = e.detail?.type
index = e.detail?.index
}}
/>
<Component {is} on:change={handleChange} />
</div>
{/if}
</div>
@@ -79,6 +79,11 @@
is = editor.editor
}
}
const handleSelect = (e: any) => selectType(e.detail)
const handleChange = (e: any) => {
type = e.detail?.type
index = e.detail?.index
}
</script>
<Card
@@ -103,7 +108,7 @@
{items}
width="8rem"
bind:selected={selectedType}
on:selected={(e) => selectType(e.detail)}
on:selected={handleSelect}
/>
{/if}
</div>
@@ -116,10 +121,7 @@
type,
editable: !exist
}}
on:change={(e) => {
type = e.detail?.type
index = e.detail?.index
}}
on:change={handleChange}
/>
</div>
{/if}
@@ -37,17 +37,18 @@
$pull: { enumValues: target }
})
}
const handleKeydown = (evt: KeyboardEvent) => {
if (evt.key === 'Enter') {
add()
}
}
</script>
<div class="flex-grow">
<div class="flex-between mb-4">
<EditBox
placeholder={setting.string.NewValue}
on:keydown={(evt) => {
if (evt.key === 'Enter') {
add()
}
}}
on:keydown={handleKeydown}
kind="large-style"
bind:value={newValue}
maxWidth="18rem"
@@ -58,6 +58,14 @@
)()
}
}
const handleAdd = (e: any) => {
showPopup(integrationType.createComponent, {}, eventToHTMLElement(e), close)
}
const handleReconnect = (e: any) => {
if (integrationType.reconnectComponent) {
showPopup(integrationType.reconnectComponent, {}, eventToHTMLElement(e), reconnect)
}
}
</script>
<div class="flex-col plugin-container">
@@ -74,26 +82,12 @@
<div class="footer">
{#if integration}
{#if integration.disabled && integrationType.reconnectComponent}
<Button
label={setting.string.Reconnect}
kind={'primary'}
on:click={(e) => {
if (integrationType.reconnectComponent) {
showPopup(integrationType.reconnectComponent, {}, eventToHTMLElement(e), reconnect)
}
}}
/>
<Button label={setting.string.Reconnect} kind={'primary'} on:click={handleReconnect} />
{:else}
<Button label={setting.string.Disconnect} on:click={disconnect} />
{/if}
{:else}
<Button
label={setting.string.Add}
kind={'primary'}
on:click={(e) => {
showPopup(integrationType.createComponent, {}, eventToHTMLElement(e), close)
}}
/>
<Button label={setting.string.Add} kind={'primary'} on:click={handleAdd} />
<Link label={'Learn more'} />
{/if}
</div>
@@ -42,16 +42,13 @@
})
}
}
const handleReconnect = (e: MouseEvent) => {
if (type?.reconnectComponent) {
showPopup(type.reconnectComponent, {}, eventToHTMLElement(e), reconnect)
}
}
</script>
<div class="flex-center">
<Button
label={setting.string.Reconnect}
kind={'primary'}
on:click={(e) => {
if (type?.reconnectComponent) {
showPopup(type.reconnectComponent, {}, eventToHTMLElement(e), reconnect)
}
}}
/>
<Button label={setting.string.Reconnect} kind={'primary'} on:click={handleReconnect} />
</div>
@@ -56,6 +56,7 @@
}
)
}
const onDeleteState = (e: any) => deleteState(e.detail)
</script>
<div class="antiComponent">
@@ -74,11 +75,7 @@
</div>
<div class="ac-column max">
{#if template !== undefined}
<Component
is={task.component.KanbanTemplateEditor}
props={{ kanban: template }}
on:delete={(e) => deleteState(e.detail)}
/>
<Component is={task.component.KanbanTemplateEditor} props={{ kanban: template }} on:delete={onDeleteState} />
{/if}
</div>
</div>
@@ -45,36 +45,31 @@
const query: DocumentQuery<Enum> = {}
const mgr = getFocusManager()
const handleClick = (ev: any) => {
showPopup(
EnumPopup,
{
_class,
label,
options: { sort: { modifiedOn: -1 } },
selected: value?._id,
spaceQuery: query,
create
},
eventToHTMLElement(ev),
(result) => {
if (result) {
value = result
mgr?.setFocusPos(focusIndex)
}
}
)
}
</script>
<Tooltip {label} fill={false} direction={labelDirection}>
<Button
{focus}
{focusIndex}
icon={IconFolder}
size={'small'}
kind={'no-border'}
on:click={(ev) => {
showPopup(
EnumPopup,
{
_class,
label,
options: { sort: { modifiedOn: -1 } },
selected: value?._id,
spaceQuery: query,
create
},
eventToHTMLElement(ev),
(result) => {
if (result) {
value = result
mgr?.setFocusPos(focusIndex)
}
}
)
}}
>
<Button {focus} {focusIndex} icon={IconFolder} size={'small'} kind={'no-border'} on:click={handleClick}>
<span slot="content" class="text-sm">
{#if value}{value.name}{:else}<Label {label} />{/if}
</span>
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -89,6 +89,14 @@
await client.createDoc(tags.class.TagElement, tags.space.Tags, tagElement, tagElementId)
dispatch('close')
}
const showColorPopup = (evt: MouseEvent) => {
showPopup(ColorsPopup, {}, eventToHTMLElement(evt), (col) => {
if (col != null) {
color = col
colorSet = true
}
})
}
</script>
<Card
@@ -103,18 +111,7 @@
>
<div class="flex-row-top clear-mins">
<div class="mr-3">
<Button
size={'medium'}
kind={'link-bordered'}
on:click={(evt) => {
showPopup(ColorsPopup, {}, eventToHTMLElement(evt), (col) => {
if (col != null) {
color = col
colorSet = true
}
})
}}
>
<Button size={'medium'} kind={'link-bordered'} on:click={showColorPopup}>
<svelte:fragment slot="content">
<div class="color" style={getTagStyle(getPlatformColor(color))} />
</svelte:fragment>
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
@@ -67,6 +67,7 @@
category = detail.category ?? undefined
selectedTagElements.set(Array.from(detail.elements ?? []).map((it) => it._id))
}
const handleChange = (evt: any) => updateCategory(evt.detail)
</script>
<div class="ac-header full">
@@ -83,11 +84,7 @@
/>
</div>
<Component
is={tags.component.TagsCategoryBar}
props={{ targetClass: _class, category }}
on:change={(evt) => updateCategory(evt.detail)}
/>
<Component is={tags.component.TagsCategoryBar} props={{ targetClass: _class, category }} on:change={handleChange} />
<TableBrowser
{_class}
@@ -42,6 +42,7 @@
onMount(() => {
dispatch('open', { ignoreKeys: ['comments', 'name', 'description', 'number'] })
})
const onChangeDescription = (evt: CustomEvent<any>) => change('description', evt.detail)
</script>
{#if object !== undefined}
@@ -60,7 +61,7 @@
<StyledTextBox
bind:content={object.description}
placeholder={plugin.string.TaskDescriptionPlaceholder}
on:value={(evt) => change('description', evt.detail)}
on:value={onChangeDescription}
/>
</div>
</Grid>
@@ -48,14 +48,7 @@
<div class="mr-2">
<Component is={notification.component.NotificationPresenter} props={{ value: object }} />
</div>
<ActionIcon
label={task.string.More}
action={(evt) => {
showMenu(evt)
}}
icon={IconMoreH}
size={'small'}
/>
<ActionIcon label={task.string.More} action={showMenu} icon={IconMoreH} size={'small'} />
</div>
</div>
<div class="caption-color mb-3 lines-limit-4">{object.name}</div>
@@ -118,6 +118,30 @@
}
$: updateQuery(search, selectedDoneStates)
const handleSelect = (result: any) => {
if (result.type === 'select') {
const res = result.detail
if (res.id === 'AllStates') {
doneStatusesView = false
state = undefined
withoutDone = false
selectedDoneStates.clear()
updateQuery(search, selectedDoneStates)
} else if (res.id === 'DoneStates') {
doneStatusesView = true
state = undefined
selectedDoneStates.clear()
updateQuery(search, selectedDoneStates)
}
}
}
const handleDoneSelect = (result: any) => {
if (result.type === 'select') {
const res = result.detail
if (res.id === 'NoDoneState') noDoneClick()
else doneStateClick(res.id)
}
}
</script>
<div class="header">
@@ -127,37 +151,10 @@
{ id: 'DoneStates', labelIntl: task.string.DoneStates }
]}
multiselect={false}
on:select={(result) => {
if (result.type === 'select') {
const res = result.detail
if (res.id === 'AllStates') {
doneStatusesView = false
state = undefined
withoutDone = false
selectedDoneStates.clear()
updateQuery(search, selectedDoneStates)
} else if (res.id === 'DoneStates') {
doneStatusesView = true
state = undefined
selectedDoneStates.clear()
updateQuery(search, selectedDoneStates)
}
}
}}
on:select={handleSelect}
/>
{#if doneStatusesView}
<TabList
items={itemsDS}
bind:selected={selectedDS}
multiselect
on:select={(result) => {
if (result.type === 'select') {
const res = result.detail
if (res.id === 'NoDoneState') noDoneClick()
else doneStateClick(res.id)
}
}}
/>
<TabList items={itemsDS} bind:selected={selectedDS} multiselect on:select={handleDoneSelect} />
{:else}
<StatesBar bind:state {space} gap={'none'} on:change={() => updateQuery(search, selectedDoneStates)} />
{/if}
@@ -92,6 +92,16 @@
}
)
}
const onContent = (evt: any) => {
listProvider.update(evt.detail)
}
const onObjFocus = (evt: any) => {
listProvider.updateFocus(evt.detail)
}
const handleCheck = (evt: any) => {
listProvider.updateSelection(evt.detail.docs, evt.detail.value)
}
const onContextMenu = (evt: any) => showMenu(evt.detail.evt, evt.detail.objects)
</script>
{#await cardPresenter then presenter}
@@ -111,17 +121,11 @@
{states}
fieldName={'state'}
rankFieldName={'rank'}
on:content={(evt) => {
listProvider.update(evt.detail)
}}
on:obj-focus={(evt) => {
listProvider.updateFocus(evt.detail)
}}
on:content={onContent}
on:obj-focus={onObjFocus}
checked={$selectionStore ?? []}
on:check={(evt) => {
listProvider.updateSelection(evt.detail.docs, evt.detail.value)
}}
on:contextmenu={(evt) => showMenu(evt.detail.evt, evt.detail.objects)}
on:check={handleCheck}
on:contextmenu={onContextMenu}
selection={listProvider.current($focusStore)}
>
<svelte:fragment slot="card" let:object let:dragged>
@@ -42,14 +42,7 @@
},
{ limit: 1 }
)
</script>
<Button
{kind}
{size}
{width}
{justify}
on:click={(ev) => {
const handleClick = (ev: MouseEvent) => {
if (!opened) {
opened = true
showPopup(StatesPopup, { space }, eventToHTMLElement(ev), (result) => {
@@ -60,8 +53,10 @@
opened = false
})
}
}}
>
}
</script>
<Button {kind} {size} {width} {justify} on:click={handleClick}>
<svelte:fragment slot="content">
{#if state}
<StatePresenter value={state} />
@@ -30,8 +30,6 @@
let dueTo: number | null = null
let latestItem: TodoItem | undefined = undefined
$: _space = space
const dispatch = createEventDispatcher()
const client = getClient()
const todoItemsQuery = createQuery()
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -23,7 +23,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"prettier": "^2.4.1",
"svelte-check": "^2.7.0",
@@ -64,6 +64,9 @@
export function submit (): void {
textEditor.submit()
}
const updateTemplate = (evt: any) => {
newTemplate = { title: newTemplate?.title ?? '', message: evt.detail }
}
</script>
<div class="antiComponent">
@@ -119,13 +122,7 @@
</div>
<div class="separator" />
{#if mode !== Mode.View}
<StyledTextEditor
bind:content={newTemplate.message}
bind:this={textEditor}
on:value={(evt) => {
newTemplate = { title: newTemplate?.title ?? '', message: evt.detail }
}}
>
<StyledTextEditor bind:content={newTemplate.message} bind:this={textEditor} on:value={updateTemplate}>
<div class="flex flex-reverse flex-grow">
<div class="ml-2">
<Button
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",
+1 -1
View File
@@ -31,8 +31,8 @@ import type {
UXObject
} from '@anticrm/core'
import { Asset, IntlString, Plugin, plugin, Resource, Status } from '@anticrm/platform'
import type { AnyComponent, AnySvelteComponent, PopupAlignment, PopupPosAlignment } from '@anticrm/ui'
import type { Preference } from '@anticrm/preference'
import type { AnyComponent, AnySvelteComponent, PopupAlignment, PopupPosAlignment } from '@anticrm/ui'
/**
* @public
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
"rigPackageName": "@anticrm/platform-rig",
"rigProfile": "ui"
}
+2 -2
View File
@@ -5,7 +5,7 @@
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "echo 'no build for ui'",
"build": "tsc",
"build:docs": "api-extractor run --local",
"lint": "svelte-check && eslint",
"lint:fix": "eslint --fix src",
@@ -22,7 +22,7 @@
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-svelte3": "~3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"prettier-plugin-svelte": "^2.7.0",
"eslint": "^7.32.0",
"prettier": "^2.4.1",

Some files were not shown because too many files have changed in this diff Show More