mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
UBERF-9028: Remove unused Svelte components (#7559)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
<!--
|
||||
// Copyright © 2024 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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M29.25 6.76009C28.6926 6.20073 28.0302 5.75691 27.3009 5.45408C26.5716 5.15125 25.7897 4.99536 25 4.99536C24.2103 4.99536 23.4284 5.15125 22.6991 5.45408C22.278 5.62893 21.8792 5.85078 21.5101 6.11473C21.0614 6.43557 21.0693 7.07943 21.4594 7.46948C21.8499 7.86 22.4827 7.85006 22.9575 7.56802C23.1218 7.47041 23.2933 7.38446 23.4707 7.31099C23.9571 7.1095 24.4785 7.0058 25.005 7.0058C25.5315 7.0058 26.0528 7.1095 26.5393 7.31099C27.0257 7.51247 27.4677 7.8078 27.84 8.18009C28.2123 8.55239 28.5076 8.99437 28.7091 9.4808C28.9106 9.96723 29.0143 10.4886 29.0143 11.0151C29.0143 11.5416 28.9106 12.063 28.7091 12.5494C28.5076 13.0358 28.2123 13.4778 27.84 13.8501L19.84 21.8501C19.0894 22.602 18.0709 23.0249 17.0085 23.0259C15.9461 23.0268 14.9269 22.6057 14.175 21.8551C13.4231 21.1045 13.0001 20.086 12.9992 19.0236C12.9983 17.9612 13.4194 16.942 14.17 16.1901L14.8803 15.4747C15.2675 15.0848 15.2659 14.4538 14.8787 14.0639C14.4886 13.671 13.8519 13.6682 13.4604 14.0597L12.75 14.7701C12.1906 15.3275 11.7468 15.9899 11.444 16.7192C11.1411 17.4485 10.9852 18.2304 10.9852 19.0201C10.9852 19.8098 11.1411 20.5917 11.444 21.321C11.7468 22.0503 12.1906 22.7127 12.75 23.2701C13.8815 24.3871 15.41 25.0093 17 25.0001C17.7927 25.0034 18.5782 24.8495 19.3111 24.5474C20.044 24.2453 20.7098 23.801 21.27 23.2401L29.27 15.2401C30.3909 14.1124 31.0184 12.586 31.0147 10.996C31.0109 9.40595 30.3762 7.88244 29.25 6.76009Z"
|
||||
/>
|
||||
<path
|
||||
d="M4.18997 24.8201C3.81656 24.4484 3.52026 24.0066 3.31807 23.5201C3.11589 23.0336 3.01181 22.5119 3.01181 21.9851C3.01181 21.4582 3.11589 20.9366 3.31807 20.4501C3.52026 19.9635 3.81656 19.5218 4.18997 19.1501L12.19 11.1501C12.5616 10.7767 13.0034 10.4804 13.4899 10.2782C13.9765 10.076 14.4981 9.97193 15.025 9.97193C15.5518 9.97193 16.0735 10.076 16.56 10.2782C17.0465 10.4804 17.4883 10.7767 17.86 11.1501C18.231 11.5247 18.5231 11.97 18.7189 12.4595C18.9147 12.9491 19.0103 13.4729 19 14.0001C19.003 14.5289 18.9012 15.0531 18.7004 15.5423C18.4995 16.0314 18.2037 16.476 17.83 16.8501L16.4072 18.293C16.0213 18.6843 16.0289 19.319 16.4175 19.7076C16.808 20.0981 17.4466 20.1035 17.8371 19.713L19.25 18.3001C20.3785 17.1716 21.0124 15.641 21.0124 14.0451C21.0124 12.4492 20.3785 10.9186 19.25 9.79009C18.1215 8.6616 16.5909 8.02761 14.995 8.02761C13.399 8.02761 11.8685 8.6616 10.74 9.79009L2.73997 17.7901C2.17911 18.3477 1.73401 19.0107 1.43029 19.7409C1.12657 20.4711 0.970215 21.2542 0.970215 22.0451C0.970215 22.836 1.12657 23.619 1.43029 24.3493C1.73401 25.0795 2.17911 25.7425 2.73997 26.3001C3.87879 27.4086 5.41087 28.02 6.99997 28.0001C8.26594 28.0013 9.49169 27.607 10.5118 26.8852C10.964 26.5652 10.961 25.9211 10.5693 25.5294C10.1781 25.1383 9.54699 25.1519 9.0717 25.435C8.90786 25.5325 8.73689 25.6185 8.56 25.692C8.07349 25.8942 7.55182 25.9983 7.02497 25.9983C6.49812 25.9983 5.97645 25.8942 5.48994 25.692C5.00342 25.4898 4.56164 25.1935 4.18997 24.8201Z"
|
||||
/>
|
||||
</svg>
|
||||
@@ -1,32 +0,0 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
export let style: 'normal' | 'circle' = 'normal'
|
||||
export let fill: string = 'var(--dark-color)'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
{#if style === 'circle'}
|
||||
<path
|
||||
d="M12,2c-2,0-3.9,0.6-5.6,1.7C4.8,4.8,3.5,6.3,2.8,8.2C2,10,1.8,12,2.2,14s1.3,3.7,2.7,5.1c1.4,1.4,3.2,2.4,5.1,2.7c1.9,0.4,4,0.2,5.8-0.6c1.8-0.8,3.4-2,4.5-3.7C21.4,15.9,22,14,22,12c0-1.3-0.3-2.6-0.8-3.8C20.7,7,20,5.9,19.1,4.9c-0.9-0.9-2-1.7-3.2-2.2C14.6,2.3,13.3,2,12,2z M12,20c-1.6,0-3.1-0.5-4.4-1.3c-1.3-0.9-2.3-2.1-2.9-3.6S3.8,12,4.2,10.4c0.3-1.6,1.1-3,2.2-4.1s2.5-1.9,4.1-2.2C12,3.8,13.6,4,15.1,4.6c1.5,0.6,2.7,1.6,3.6,2.9C19.5,8.9,20,10.4,20,12c0,2.1-0.8,4.2-2.3,5.7C16.2,19.2,14.1,20,12,20z M16,11H8c-0.3,0-0.5,0.1-0.7,0.3C7.1,11.5,7,11.7,7,12s0.1,0.5,0.3,0.7C7.5,12.9,7.7,13,8,13h8c0.3,0,0.5-0.1,0.7-0.3S17,12.3,17,12s-0.1-0.5-0.3-0.7S16.3,11,16,11z"
|
||||
/>
|
||||
{:else}
|
||||
<path
|
||||
d="M16,11H8c-0.3,0-0.5,0.1-0.7,0.3S7,11.7,7,12s0.1,0.5,0.3,0.7S7.7,13,8,13h8c0.3,0,0.5-0.1,0.7-0.3S17,12.3,17,12s-0.1-0.5-0.3-0.7S16.3,11,16,11z"
|
||||
/>
|
||||
{/if}
|
||||
</svg>
|
||||
@@ -1,111 +0,0 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Ref } from '@hcengineering/core'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import setting from '@hcengineering/setting'
|
||||
import task, { ProjectTypeDescriptor } from '@hcengineering/task'
|
||||
import { Icon, IconChevronDown, Label } from '@hcengineering/ui'
|
||||
|
||||
export let descriptor: ProjectTypeDescriptor | undefined
|
||||
export let descriptorId: Ref<ProjectTypeDescriptor> | undefined
|
||||
let categories: ProjectTypeDescriptor[] = []
|
||||
const query = createQuery()
|
||||
$: query.query(task.class.ProjectTypeDescriptor, {}, (result) => {
|
||||
categories = result
|
||||
if (descriptorId !== undefined) {
|
||||
descriptor = categories.find((p) => p._id === descriptorId)
|
||||
}
|
||||
})
|
||||
|
||||
$: if (descriptor === undefined && categories.length > 0) {
|
||||
descriptor = categories.filter((f) => f.icon)[0]
|
||||
}
|
||||
|
||||
function select (item: ProjectTypeDescriptor): void {
|
||||
descriptor = item
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex-between trans-title header mb-3">
|
||||
<Label label={setting.string.Categories} />
|
||||
</div>
|
||||
<div class="flex-col overflow-y-auto">
|
||||
{#each categories as f (f._id)}
|
||||
{#if f.icon}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="flex-between item"
|
||||
class:selected={f._id === descriptor?._id}
|
||||
on:click={() => {
|
||||
select(f)
|
||||
}}
|
||||
>
|
||||
<div class="icon flex-no-shrink mr-4">
|
||||
<Icon icon={f.icon} size={'small'} />
|
||||
</div>
|
||||
<div class="flex-grow flex-col">
|
||||
<div class="fs-title overflow-label">
|
||||
<Label label={f.name} />
|
||||
</div>
|
||||
<div class="text-sm content-dark-color overflow-label">
|
||||
<Label label={f.description} />
|
||||
</div>
|
||||
</div>
|
||||
{#if f._id === descriptor?._id}
|
||||
<div class="caption-color ml-4">
|
||||
<slot name="tools">
|
||||
<Icon icon={IconChevronDown} size={'small'} />
|
||||
</slot>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<slot name="content" categoryId={f._id} />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.header {
|
||||
min-height: 1.75rem;
|
||||
}
|
||||
.item {
|
||||
padding: 0.25rem 0.25rem 0.25rem 0.25rem;
|
||||
// background-color: var(--theme-button-default);
|
||||
border: 1px solid var(--theme-button-border);
|
||||
border-radius: 0.75rem;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--theme-button-hovered);
|
||||
}
|
||||
&.selected {
|
||||
background-color: var(--theme-button-pressed);
|
||||
cursor: auto;
|
||||
}
|
||||
}
|
||||
.item + .item {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -1,53 +0,0 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@hcengineering/platform'
|
||||
import { Label } from '@hcengineering/ui'
|
||||
|
||||
export let label: IntlString
|
||||
</script>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="overflow-label label"><Label {label} /></div>
|
||||
<div class="content"><slot /></div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.card-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 2rem 1.75rem 1.75rem;
|
||||
border-radius: 0.75rem;
|
||||
background: var(--popup-bg-color);
|
||||
box-shadow: var(--popup-shadow);
|
||||
|
||||
.label {
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 1.25rem;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
font-size: 0.75rem;
|
||||
color: var(--dark-color);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-shrink: 0;
|
||||
flex-grow: 1;
|
||||
height: fit-content;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,61 +0,0 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import task from '../../plugin'
|
||||
import { IconDelete, IconEdit, Label } from '@hcengineering/ui'
|
||||
import view from '@hcengineering/view'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let onDelete: () => void
|
||||
export let showDelete = true
|
||||
export let onUpdate: () => void
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
</script>
|
||||
|
||||
<div class="antiPopup">
|
||||
<div class="ap-space x2" />
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="ap-menuItem hoverable flex-row-center"
|
||||
on:click={() => {
|
||||
dispatch('close')
|
||||
onUpdate()
|
||||
}}
|
||||
>
|
||||
<div class="mr-2">
|
||||
<IconEdit size={'small'} />
|
||||
</div>
|
||||
<Label label={view.string.Rename} />
|
||||
</div>
|
||||
{#if showDelete}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="ap-menuItem hoverable flex-row-center redlight"
|
||||
on:click={() => {
|
||||
dispatch('close')
|
||||
onDelete()
|
||||
}}
|
||||
>
|
||||
<div class="mr-2">
|
||||
<IconDelete size={'small'} />
|
||||
</div>
|
||||
<Label label={task.string.Delete} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="ap-space x2" />
|
||||
</div>
|
||||
Reference in New Issue
Block a user