TSK-1098: All issues related fixes (#3079)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-04-26 14:53:16 +07:00 committed by GitHub
parent 42e320f425
commit f0effc13c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 140 additions and 114 deletions

View File

@ -269,8 +269,9 @@ specifiers:
'@types/xml2js': ~0.4.9
'@typescript-eslint/eslint-plugin': ^5.41.0
'@typescript-eslint/parser': ^5.41.0
autoprefixer: ^10.4.13
autoprefixer: ^10.4.14
body-parser: ~1.19.1
browserslist: 4.21.5
commander: ^8.1.0
comment-json: ^4.2.2
compression: ~1.7.4
@ -358,6 +359,7 @@ specifiers:
ts-loader: ^9.2.5
ts-node: ^10.8.0
typescript: ^4.3.5
update-browserslist-db: ~1.0.11
uuid: ^8.3.2
webpack: ^5.75.0
webpack-bundle-analyzer: ^4.7.0
@ -639,8 +641,9 @@ dependencies:
'@types/xml2js': 0.4.11
'@typescript-eslint/eslint-plugin': 5.42.1_d506b9be61cb4ac2646ecbc6e0680464
'@typescript-eslint/parser': 5.42.1_eslint@8.27.0+typescript@4.8.4
autoprefixer: 10.4.13_postcss@8.4.20
autoprefixer: 10.4.14_postcss@8.4.20
body-parser: 1.19.2
browserslist: 4.21.5
commander: 8.3.0
comment-json: 4.2.3
compression: 1.7.4
@ -728,6 +731,7 @@ dependencies:
ts-loader: 9.4.1_typescript@4.8.4+webpack@5.75.0
ts-node: 10.9.1_867af3484524ae72fe2b1aa24b40f5ee
typescript: 4.8.4
update-browserslist-db: 1.0.11_browserslist@4.21.5
uuid: 8.3.2
webpack: 5.75.0_c5a9b74f1e48ccd7ef01359287c5ad78
webpack-bundle-analyzer: 4.7.0
@ -1588,7 +1592,7 @@ packages:
'@babel/compat-data': 7.20.1
'@babel/core': 7.20.2
'@babel/helper-validator-option': 7.18.6
browserslist: 4.21.4
browserslist: 4.21.5
semver: 6.3.0
dev: false
@ -4263,15 +4267,15 @@ packages:
engines: {node: '>=8.0.0'}
dev: false
/autoprefixer/10.4.13_postcss@8.4.20:
resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==}
/autoprefixer/10.4.14_postcss@8.4.20:
resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
peerDependencies:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.4
caniuse-lite: 1.0.30001431
browserslist: 4.21.5
caniuse-lite: 1.0.30001481
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@ -4555,15 +4559,15 @@ packages:
safe-buffer: 5.2.1
dev: false
/browserslist/4.21.4:
resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==}
/browserslist/4.21.5:
resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001431
caniuse-lite: 1.0.30001481
electron-to-chromium: 1.4.284
node-releases: 2.0.6
update-browserslist-db: 1.0.10_browserslist@4.21.4
node-releases: 2.0.10
update-browserslist-db: 1.0.11_browserslist@4.21.5
dev: false
/bser/2.1.1:
@ -4676,8 +4680,8 @@ packages:
engines: {node: '>=10'}
dev: false
/caniuse-lite/1.0.30001431:
resolution: {integrity: sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==}
/caniuse-lite/1.0.30001481:
resolution: {integrity: sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==}
dev: false
/case-anything/2.1.10:
@ -8812,8 +8816,8 @@ packages:
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
dev: false
/node-releases/2.0.6:
resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==}
/node-releases/2.0.10:
resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==}
dev: false
/normalize-package-data/2.5.0:
@ -11160,13 +11164,13 @@ packages:
engines: {node: '>= 0.8'}
dev: false
/update-browserslist-db/1.0.10_browserslist@4.21.4:
resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==}
/update-browserslist-db/1.0.11_browserslist@4.21.5:
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.21.4
browserslist: 4.21.5
escalade: 3.1.1
picocolors: 1.0.0
dev: false
@ -11454,7 +11458,7 @@ packages:
'@webassemblyjs/wasm-parser': 1.11.1
acorn: 8.8.1
acorn-import-assertions: 1.8.0_acorn@8.8.1
browserslist: 4.21.4
browserslist: 4.21.5
chrome-trace-event: 1.0.3
enhanced-resolve: 5.10.0
es-module-lexer: 0.9.3
@ -12332,7 +12336,7 @@ packages:
dev: false
file:projects/chunter.tgz:
resolution: {integrity: sha512-wH+c+yBSbAi9Tdzq+Q65aAJcx/fcJFuzciJz3xuGUlzTB16OM3DH7uh0it3q7t4gqMeHeT8Wz59Qh3Cdyz3kOw==, tarball: file:projects/chunter.tgz}
resolution: {integrity: sha512-PLpT+CjmijpxhDvt0NO++aFxffhwAfzoHrz5it9UiZ7c65JFgzQYG5ie5hD+Hmfw+cah1ZnJdaYXYSlILqGG9Q==, tarball: file:projects/chunter.tgz}
name: '@rush-temp/chunter'
version: 0.0.0
dependencies:
@ -13372,7 +13376,7 @@ packages:
dev: false
file:projects/model-all.tgz_typescript@4.8.4:
resolution: {integrity: sha512-87yqHGzXy6mKKCUMfPluhQjSGIS+2KEyrCZFZCHsRvK2g+kgTo90YnizNooDOgRplR5RwpZdXezfmTw0RIqjJw==, tarball: file:projects/model-all.tgz}
resolution: {integrity: sha512-GDUSXcKRTyFAyngXarH20LA0+Rkvt8NrBA4XjxTtgLLZwAP9XgGp05/EEvdC4PeIII4SXi1ZRT+iomgLxBG6Jw==, tarball: file:projects/model-all.tgz}
id: file:projects/model-all.tgz
name: '@rush-temp/model-all'
version: 0.0.0
@ -13502,7 +13506,7 @@ packages:
dev: false
file:projects/model-chunter.tgz_typescript@4.8.4:
resolution: {integrity: sha512-JBI3pl+BhdpnN0UM7m+7PbfHcqCdtXZSdoFiyh4rjQJ3dx9BJYJQQmzKrksXI3lnU2Dfz4EF3+HjU+/Yzzy+/Q==, tarball: file:projects/model-chunter.tgz}
resolution: {integrity: sha512-A3vaVqg6UxyHYPeZ1VO+qQDx31GYEUguEiiN5dlmFO0fUPDi/FJ167Br7pNzWyBNqS9FJG1M9HDJ/e2VF0F9OQ==, tarball: file:projects/model-chunter.tgz}
id: file:projects/model-chunter.tgz
name: '@rush-temp/model-chunter'
version: 0.0.0
@ -13672,7 +13676,7 @@ packages:
dev: false
file:projects/model-lead.tgz_typescript@4.8.4:
resolution: {integrity: sha512-aKuKHqirY+PK54vSoUEiII68O+3mFwQXsxjQME66wE68jd2HciJUbLsF/rRp0m9dnPkWhcky3Z/4UEdXgNUR/Q==, tarball: file:projects/model-lead.tgz}
resolution: {integrity: sha512-/Mp4WaiHVnnXPiObn5yaTpZ9lkQAfgMTN4G0/YNE/NE4XzAvOOzx2qYzbgQTfKnNqC13kOM0sHrAnU1XRZmgfQ==, tarball: file:projects/model-lead.tgz}
id: file:projects/model-lead.tgz
name: '@rush-temp/model-lead'
version: 0.0.0
@ -13693,7 +13697,7 @@ packages:
dev: false
file:projects/model-notification.tgz_typescript@4.8.4:
resolution: {integrity: sha512-PYNit09mquq39aOHt+TtpDerqUc1NvMOKSfsPzFZtHAG72Fi1lPLKINUxb006x6OXOQA3T7CDycH5j52D5DavQ==, tarball: file:projects/model-notification.tgz}
resolution: {integrity: sha512-dgwIJZDRFbll9TWe2jiqYNQazIVzeMArLy/BS6Uo/djLHlzdBIp93f6TpFtsI4qdOnPK4Tm466IzHqL73OX1Mw==, tarball: file:projects/model-notification.tgz}
id: file:projects/model-notification.tgz
name: '@rush-temp/model-notification'
version: 0.0.0
@ -13756,7 +13760,7 @@ packages:
dev: false
file:projects/model-recruit.tgz_typescript@4.8.4:
resolution: {integrity: sha512-pXuO7Np9oZZ3n8GFuOxy+lyiiJASQs3YHv2J+ntOx1XAoxUMIN8M6ERC7dcKxdQ675Zi+EdF3vajviioQHhOnw==, tarball: file:projects/model-recruit.tgz}
resolution: {integrity: sha512-Qsm9Wg9d/n8BhxVyrpx9+qrAaZvBagO136YD5obL6Shb+4JYRfk45+S77UnA7iwuFVCOWViwOzdEpO7BH9BCpw==, tarball: file:projects/model-recruit.tgz}
id: file:projects/model-recruit.tgz
name: '@rush-temp/model-recruit'
version: 0.0.0
@ -13860,7 +13864,7 @@ packages:
dev: false
file:projects/model-server-chunter.tgz_typescript@4.8.4:
resolution: {integrity: sha512-Ikxf3SXnCstf4+TzitZ8vblm2txVnP1Mu34oBItQxCTLHtciFN9Ry/286PXbnBeYG05eDYu4wbgKsLv8VuA8/w==, tarball: file:projects/model-server-chunter.tgz}
resolution: {integrity: sha512-Okr3NYRmMxV6rZxCaeGwAuXjvTvGXKII++daDOHyJ6fuShSwZ8riNKrU+Q0t6Ci8gTQ5aUaEfZhyb2zMtQwzcg==, tarball: file:projects/model-server-chunter.tgz}
id: file:projects/model-server-chunter.tgz
name: '@rush-temp/model-server-chunter'
version: 0.0.0
@ -13986,7 +13990,7 @@ packages:
dev: false
file:projects/model-server-lead.tgz_typescript@4.8.4:
resolution: {integrity: sha512-zMjvQ5pzp7LWrId7vT78M+3t0bXp0w9/ilpm4L88DC5XWsRyHhi8R5f6QzhnH4r07r4fvQxn/JHTjJoKMuoQcg==, tarball: file:projects/model-server-lead.tgz}
resolution: {integrity: sha512-tZ0HNHpkQbo2F4isua+9QPP4VDSDP00t41z42iJ6Y0a+j91AZBs/bnvjH7+w0Gw0FpGaVk0pjGCWTaUJvgB9dg==, tarball: file:projects/model-server-lead.tgz}
id: file:projects/model-server-lead.tgz
name: '@rush-temp/model-server-lead'
version: 0.0.0
@ -14007,7 +14011,7 @@ packages:
dev: false
file:projects/model-server-notification.tgz_typescript@4.8.4:
resolution: {integrity: sha512-vnIioLlxuGjd62SSRPPzYN9qmQ+RBNrFmk4HAe5IPS/3yYufRkKmhAs2p8XYZZ+9s/Nwfs3xjMXuq5rPKq1nZA==, tarball: file:projects/model-server-notification.tgz}
resolution: {integrity: sha512-vR7Hk8JT50Qggu+Q/VP7q5HMOmCpdbOrr6MUQdCeYMYzGymxMm71EZ5CGtwGGErBJGU3Dj58zjk0yBp4zBy12Q==, tarball: file:projects/model-server-notification.tgz}
id: file:projects/model-server-notification.tgz
name: '@rush-temp/model-server-notification'
version: 0.0.0
@ -14049,7 +14053,7 @@ packages:
dev: false
file:projects/model-server-recruit.tgz_typescript@4.8.4:
resolution: {integrity: sha512-Tg7lXR1BF+M61cE6CWs/hrYDsNkGdJZCUvEG0zUP5miGOV2lLAAKqwfMdQACFfqtpySczBnm8kOkNoxanx434A==, tarball: file:projects/model-server-recruit.tgz}
resolution: {integrity: sha512-GVxJQAT/rbO5lRgWrNoQcx1atTGreiJKIMB+qFEYmsNA8SnnfIn8+ABl8GKP+PPGMrDZc6a7JwDtkDog/Yb5kA==, tarball: file:projects/model-server-recruit.tgz}
id: file:projects/model-server-recruit.tgz
name: '@rush-temp/model-server-recruit'
version: 0.0.0
@ -14175,7 +14179,7 @@ packages:
dev: false
file:projects/model-server-tracker.tgz_typescript@4.8.4:
resolution: {integrity: sha512-4Is4CVchYN+aiq73acLTCindey+y4PV7FmAF3vpv+8BN8wwGI4/AgYEbeb2n9NMBaBW+QreM4ZKRKw4X3SpgSA==, tarball: file:projects/model-server-tracker.tgz}
resolution: {integrity: sha512-5OkX4SszIwVKZcHi3jFJWkFuC8L/cDf/T8UX1gcbJ5PcrFF7Z8S3bUcYcC5chBlemfKEWuULoqF+pd0C0wr9Cg==, tarball: file:projects/model-server-tracker.tgz}
id: file:projects/model-server-tracker.tgz
name: '@rush-temp/model-server-tracker'
version: 0.0.0
@ -14364,7 +14368,7 @@ packages:
dev: false
file:projects/model-tracker.tgz_typescript@4.8.4:
resolution: {integrity: sha512-H3l3kLahENyh80lS0aXprFv+NdMsNOUl/oDf0+6156P4MNGn2cAt0hROcZ3d4RlfGaDtQhR8PryaezpqBWbyAQ==, tarball: file:projects/model-tracker.tgz}
resolution: {integrity: sha512-JDsdKxWjI6y6XHdC22SAY8b9y3YhLcQl1FlHVJPWVPtvOf9ff1kwOz2VpwrcVY1auonTuQl8jV41/8Vo4rxYjA==, tarball: file:projects/model-tracker.tgz}
id: file:projects/model-tracker.tgz
name: '@rush-temp/model-tracker'
version: 0.0.0
@ -14528,7 +14532,7 @@ packages:
dev: false
file:projects/notification.tgz_b0f6486dcbf7cfbbb61688a1fbe3858f:
resolution: {integrity: sha512-sMQpBtPP00OED4ljaWJ9SXwECcnISHXvUupj6qPMmSlg+T+dydpIQexkEo4sc5SEc02nYJWSgGqhn3xsDCIl8Q==, tarball: file:projects/notification.tgz}
resolution: {integrity: sha512-NV6LQm1QQa0WSxiFPrTHBsBE7VJ3KL/jzfcQRvnPkq0KvFhMY/pLx98/YRNLOusbTdCzIQFyo4BgJpGITU7sNQ==, tarball: file:projects/notification.tgz}
id: file:projects/notification.tgz
name: '@rush-temp/notification'
version: 0.0.0
@ -14924,13 +14928,14 @@ packages:
dev: false
file:projects/prod.tgz_a9366fc5abe1de81e350f3e9b2acb628:
resolution: {integrity: sha512-De20DKz90/YIPUItRJABF7fzduE9+BvaTAoZEx8mrDnIe9AsTt0j7lSG+2Kz+gxLe3F05PGmnItpk651yBFCBA==, tarball: file:projects/prod.tgz}
resolution: {integrity: sha512-ioUmvFSCHtzsg4F1TT/dhwfNGI8saMitK9MQuumfG9cxddPt/OtFqcsBq3J9QkxEIjz/hYwuW7Y6qQolD+P+gQ==, tarball: file:projects/prod.tgz}
id: file:projects/prod.tgz
name: '@rush-temp/prod'
version: 0.0.0
dependencies:
'@types/node': 16.11.68
autoprefixer: 10.4.13_postcss@8.4.20
autoprefixer: 10.4.14_postcss@8.4.20
browserslist: 4.21.5
compression-webpack-plugin: 10.0.0_webpack@5.75.0
cross-env: 7.0.3
css-loader: 5.2.7_webpack@5.75.0
@ -14948,6 +14953,7 @@ packages:
svelte-loader: 3.1.4_svelte@3.55.1
svgo-loader: 3.0.3
ts-loader: 9.4.1_typescript@4.8.4+webpack@5.75.0
update-browserslist-db: 1.0.11_browserslist@4.21.5
webpack: 5.75.0_c5a9b74f1e48ccd7ef01359287c5ad78
webpack-bundle-analyzer: 4.7.0
webpack-cli: 5.0.1_c7e737ad13629c71bcca5ad52285d7b0
@ -15796,7 +15802,7 @@ packages:
dev: false
file:projects/server-task.tgz:
resolution: {integrity: sha512-E2gEtYodyhnWxP5s5ivw3Q9ytGQZRIZuoAPm/sEOJtx8bKoW1RmkpJj0G91HRg67xmGkRXrOZVrHqler9CwYZw==, tarball: file:projects/server-task.tgz}
resolution: {integrity: sha512-jMgo0vMkaMcCVFbHkXwLZ7f0L8QKG5+n5O+Y1LJS6KsJLW6D2hG0om+W0X+VuZXVXKvXYkZ+T26/wdVzAcZAfA==, tarball: file:projects/server-task.tgz}
name: '@rush-temp/server-task'
version: 0.0.0
dependencies:

View File

@ -32,13 +32,15 @@
"@types/node": "~16.11.12",
"webpack-bundle-analyzer": "^4.7.0",
"svgo-loader": "^3.0.0",
"autoprefixer": "^10.4.13",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.20",
"postcss-loader": "^7.0.2",
"postcss-load-config": "^4.0.1",
"compression-webpack-plugin": "^10.0.0",
"html-webpack-plugin": "^5.5.0",
"fork-ts-checker-webpack-plugin": "~7.3.0"
"fork-ts-checker-webpack-plugin": "~7.3.0",
"update-browserslist-db": "~1.0.11",
"browserslist": "4.21.5"
},
"dependencies": {
"@hcengineering/platform": "^0.6.8",

View File

@ -78,9 +78,9 @@ import {
import { KeyBinding, ViewOptionsModel } from '@hcengineering/view'
import tracker from './plugin'
import { generateClassNotificationTypes } from '@hcengineering/model-notification'
import presentation from '@hcengineering/model-presentation'
import { defaultPriorities, issuePriorities } from '@hcengineering/tracker-resources/src/types'
import { generateClassNotificationTypes } from '@hcengineering/model-notification'
export { trackerId } from '@hcengineering/tracker'
export { trackerOperation } from './migration'
@ -230,6 +230,9 @@ export class TIssue extends TAttachedDoc implements Issue {
@Prop(Collection(tags.class.TagReference), tracker.string.Labels)
labels?: number
@Prop(TypeRef(core.class.Space), tracker.string.Project)
@Index(IndexKind.Indexed)
@ReadOnly()
declare space: Ref<Project>
@Prop(TypeDate(DateRangeMode.DATETIME), tracker.string.DueDate)
@ -900,6 +903,10 @@ export function createModel (builder: Builder): void {
component: view.component.ValueFilter
})
builder.mixin(tracker.class.Project, core.class.Class, view.mixin.AttributeFilter, {
component: view.component.ValueFilter
})
builder.mixin(tracker.class.TypeIssuePriority, core.class.Class, view.mixin.AttributePresenter, {
presenter: tracker.component.PriorityRefPresenter
})
@ -1002,7 +1009,19 @@ export function createModel (builder: Builder): void {
label: tracker.string.MyIssues,
icon: tracker.icon.MyIssues,
component: tracker.component.MyIssues
}
} //,
// {
// id: 'all-issues',
// position: 'top',
// label: tracker.string.AllIssues,
// icon: tracker.icon.Issues,
// component: tracker.component.IssuesView,
// componentProps: {
// query: { '$lookup.space.archived': false },
// space: undefined,
// title: tracker.string.AllIssues
// }
// }
// {
// id: 'views',
// position: 'top',
@ -1319,7 +1338,7 @@ export function createModel (builder: Builder): void {
})
builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.ClassFilters, {
filters: []
filters: ['space']
})
builder.mixin(tracker.class.IssueTemplate, core.class.Class, view.mixin.ClassFilters, {

View File

@ -392,7 +392,7 @@
}
delayCall(() => {
if (divBox === undefined) {
if (divBox == null) {
return
}
const tempEls = divBox.querySelectorAll('.categoryHeader')

View File

@ -106,20 +106,30 @@ export function tableToCSV (tableId: string, separator = ','): string {
*/
export const networkStatus = writable<number>(0)
let attractorMx = 0
let attractorMy = 0
let attractorMx: number | undefined
let attractorMy: number | undefined
let mousePos: { x: number, y: number } | undefined
window.addEventListener('mousemove', (event) => {
mousePos = { x: event.clientX, y: event.clientY }
})
/**
* perform mouse movement checks and call method if they was
*/
export function mouseAttractor (op: () => void, diff = 5): (evt: MouseEvent) => void {
return (evt: MouseEvent) => {
const dx = evt.clientX - attractorMx
const dy = evt.clientY - attractorMy
attractorMx = evt.clientX
attractorMy = evt.clientY
if (Math.sqrt(dx * dx + dy * dy) > diff) {
op()
if (mousePos !== undefined && attractorMy !== undefined && attractorMx !== undefined) {
const dx = mousePos.x - attractorMx
const dy = mousePos.y - attractorMy
if (Math.sqrt(dx * dx + dy * dy) > diff) {
attractorMx = evt.clientX
attractorMy = evt.clientY
op()
}
} else {
attractorMx = evt.clientX
attractorMy = evt.clientY
}
}
}

View File

@ -23,4 +23,4 @@
$: query = { space: currentSpace }
</script>
<IssuesView {query} space={currentSpace} title={tracker.string.AllIssues} />
<IssuesView {query} space={currentSpace} title={tracker.string.Issues} />

View File

@ -44,7 +44,7 @@
if (result.detail !== undefined) {
if (viewlet?._id === result.detail.id) return
viewlet = viewlets.find((vl) => vl._id === result.detail.id)
console.log('set viewlet by issue headed')
if (viewlet) setActiveViewletId(viewlet._id)
}
}}

View File

@ -24,6 +24,7 @@
getEventPositionElement,
Label,
Loading,
mouseAttractor,
resizeObserver,
showPopup,
Spinner
@ -277,7 +278,7 @@
class:checking={checkedSet.has(object._id)}
class:fixed={row === selection}
class:selected={row === selection}
on:mouseenter={() => onRow(object)}
on:mouseenter={mouseAttractor(() => onRow(object))}
on:focus={() => {}}
bind:this={refs[row]}
on:contextmenu|preventDefault={(ev) => {

View File

@ -14,12 +14,12 @@
-->
<script lang="ts">
import { Class, Doc, DocumentQuery, FindOptions, Ref, Space } from '@hcengineering/core'
import { getResource, IntlString } from '@hcengineering/platform'
import { IntlString, getResource } from '@hcengineering/platform'
import { createQuery, getClient } from '@hcengineering/presentation'
import { AnyComponent } from '@hcengineering/ui'
import { BuildModelKey, ViewOptionModel, ViewOptions, ViewQueryOption } from '@hcengineering/view'
import { createEventDispatcher } from 'svelte'
import { buildConfigLookup, LoadingProps } from '../../utils'
import { buildConfigLookup } from '../../utils'
import ListCategories from './ListCategories.svelte'
export let _class: Ref<Class<Doc>>
@ -29,7 +29,6 @@
export let baseMenuClass: Ref<Class<Doc>> | undefined = undefined
export let config: (string | BuildModelKey)[]
export let selectedObjectIds: Doc[] = []
export let loadingProps: LoadingProps | undefined = undefined
export let createItemDialog: AnyComponent | undefined = undefined
export let createItemLabel: IntlString | undefined = undefined
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
@ -100,15 +99,6 @@
listCategories?.select(offset, of)
}
const getLoadingElementsLength = (props: LoadingProps | undefined, options?: FindOptions<Doc>) => {
if (!props) return undefined
if (options?.limit && options.limit > 0) {
return Math.min(options.limit, props.length)
}
return props.length
}
let dragItem: {
doc?: Doc
revert?: () => void
@ -128,7 +118,6 @@
{selection}
query={resultQuery}
{lookup}
loadingPropsLength={getLoadingElementsLength(loadingProps, options)}
{baseMenuClass}
{config}
{viewOptions}

View File

@ -36,7 +36,6 @@
export let space: Ref<Space> | undefined
export let query: DocumentQuery<Doc> | undefined
export let lookup: Lookup<Doc>
export let loadingPropsLength: number | undefined
export let baseMenuClass: Ref<Class<Doc>> | undefined
export let config: (string | BuildModelKey)[]
export let selectedObjectIds: Doc[] = []
@ -237,6 +236,7 @@
{viewOptions}
{groupByKey}
{lookup}
index={i}
{config}
{itemModels}
{_class}
@ -248,7 +248,6 @@
{newObjectProps}
{createItemDialog}
{createItemLabel}
{loadingPropsLength}
{viewOptionsConfig}
on:check
on:uncheckAll
@ -271,7 +270,6 @@
let:_class
let:space
let:lookup
let:loadingPropsLength
let:baseMenuClass
let:config
let:selectedObjectIds
@ -292,7 +290,6 @@
{_class}
{space}
{lookup}
{loadingPropsLength}
{baseMenuClass}
{config}
{selectedObjectIds}

View File

@ -19,7 +19,6 @@
import { DocWithRank, calcRank } from '@hcengineering/task'
import {
AnyComponent,
CheckBox,
ExpandCollapse,
Spinner,
getEventPositionElement,
@ -28,6 +27,7 @@
} from '@hcengineering/ui'
import { AttributeModel, BuildModelKey, ViewOptionModel, ViewOptions } from '@hcengineering/view'
import { createEventDispatcher, tick } from 'svelte'
import { fade } from 'svelte/transition'
import { FocusSelection, focusStore } from '../../selection'
import Menu from '../Menu.svelte'
import ListHeader from './ListHeader.svelte'
@ -44,7 +44,6 @@
export let items: Doc[]
export let createItemDialog: AnyComponent | undefined
export let createItemLabel: IntlString | undefined
export let loadingPropsLength: number | undefined
export let selectedObjectIds: Doc[]
export let itemModels: AttributeModel[]
export let extraHeaders: AnyComponent[] | undefined
@ -63,16 +62,18 @@
revert?: () => void
}
export let listDiv: HTMLDivElement
export let index: number
$: lastLevel = level + 1 >= viewOptions.groupBy.length
const autoFoldLimit = 20
const defaultLimit = 20
const singleCategoryLimit = 200
const singleCategoryLimit = 50
$: initialLimit = !lastLevel ? undefined : singleCat ? singleCategoryLimit : defaultLimit
$: limit = initialLimit
let collapsed = true
let wasLoaded = false
const dispatch = createEventDispatcher()
@ -106,7 +107,22 @@
})
}
$: limited = limitGroup(items, limit)
let limited: Doc[] = []
let loading = false
function nop (op: () => void, timeout: number) {
op()
}
$: {
loading = true
;(limited.length > 0 ? nop : setTimeout)(() => {
limited = limitGroup(items, limit)
loading = false
}, index * 2)
}
$: selectedObjectIdsSet = new Set<Ref<Doc>>(selectedObjectIds.map((it) => it._id))
$: _newObjectProps = (doc: Doc) => {
@ -320,6 +336,7 @@
</script>
<div
in:fade|local={{ duration: 50 }}
bind:this={div}
class="category-container"
class:zero-container={level === 0}
@ -361,7 +378,6 @@
{_class}
{space}
{lookup}
{loadingPropsLength}
{baseMenuClass}
{config}
{selectedObjectIds}
@ -377,8 +393,8 @@
dragItem
dragstart={dragStartHandler}
/>
{:else if itemModels && (!collapsed || dragItemIndex !== undefined)}
{#if limited}
{:else if itemModels && (!collapsed || wasLoaded || dragItemIndex !== undefined)}
{#if limited && !loading}
{#each limited as docObject, i (docObject._id)}
<ListItem
bind:this={listItems[i]}
@ -404,22 +420,14 @@
on:focus={() => {}}
on:mouseover={mouseAttractor(() => handleRowFocused(docObject))}
{props}
on:on-mount={() => {
wasLoaded = true
}}
/>
{/each}
{/if}
{:else if loadingPropsLength !== undefined}
{#each Array(Math.max(loadingPropsLength, limit ?? 0)) as _, rowIndex}
<div class="listGrid row">
<div class="flex-center clear-mins h-full">
<div class="gridElement">
<CheckBox checked={false} />
<div class="ml-4">
<Spinner size="small" />
</div>
</div>
</div>
</div>
{/each}
{:else if loading}
<Spinner size="small" />
{/if}
</ExpandCollapse>
</div>

View File

@ -18,7 +18,7 @@
import { getClient, updateAttribute } from '@hcengineering/presentation'
import { CheckBox, Component, deviceOptionsStore as deviceInfo, IconCircles, tooltip } from '@hcengineering/ui'
import { AttributeModel } from '@hcengineering/view'
import { createEventDispatcher } from 'svelte'
import { createEventDispatcher, onMount } from 'svelte'
import { FixedColumn } from '../..'
import view from '../../plugin'
@ -82,6 +82,9 @@
if (m.props?.listProps?.compression) noCompressed = i
})
}
onMount(() => {
dispatch('on-mount')
})
</script>
<div

View File

@ -2,16 +2,9 @@
import { Class, Doc, DocumentQuery, FindOptions, Ref, Space } from '@hcengineering/core'
import { IntlString } from '@hcengineering/platform'
import { AnyComponent, Scroller } from '@hcengineering/ui'
import { BuildModelKey, Viewlet, ViewOptions } from '@hcengineering/view'
import { BuildModelKey, ViewOptions, Viewlet } from '@hcengineering/view'
import { onMount } from 'svelte'
import {
ActionContext,
ListSelectionProvider,
LoadingProps,
SelectDirection,
focusStore,
selectionStore
} from '../..'
import { ActionContext, ListSelectionProvider, SelectDirection, focusStore, selectionStore } from '../..'
import List from './List.svelte'
@ -21,7 +14,6 @@
export let options: FindOptions<Doc> | undefined = undefined
export let viewlet: Viewlet
export let config: (string | BuildModelKey)[]
export let loadingProps: LoadingProps | undefined = undefined
export let createItemDialog: AnyComponent | undefined
export let createItemLabel: IntlString | undefined
export let viewOptions: ViewOptions
@ -61,7 +53,6 @@
{query}
{config}
{options}
{loadingProps}
{createItemDialog}
{createItemLabel}
{viewOptions}

View File

@ -63,16 +63,16 @@ panelstore.subscribe((val) => {
export function updateFocus (selection?: FocusSelection): void {
focusStore.update((cur) => {
const now = Date.now()
if (selection === undefined || now - ((cur as any).now ?? 0) >= 50) {
cur.focus = selection?.focus
cur.provider = selection?.provider
;(cur as any).now = now
previewDocument.update((old) => {
if (old !== undefined) {
return selection?.focus
}
})
}
cur.focus = selection?.focus
cur.provider = selection?.provider
;(cur as any).now = now
previewDocument.update((old) => {
if (old !== undefined) {
return selection?.focus
}
})
return cur
})

View File

@ -78,7 +78,7 @@ export interface SpecialNavModel {
label: IntlString
icon?: Asset
component: AnyComponent
componentProps?: Record<string, string>
componentProps?: Record<string, any>
// If not top and bottom, position will be sorted alphabetically.
position?: 'top' | 'bottom' | string // undefined == 'top
visibleIf?: Resource<(spaces: Space[]) => Promise<boolean>>