@xen-orchestra/web-core 0.58.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/css/_colors.pcss +1 -1
- package/lib/components/card/VtsCardRowKeyValue.vue +1 -1
- package/lib/components/cell-object/VtsCellObject.vue +1 -1
- package/lib/components/cell-text/VtsCellText.vue +1 -1
- package/lib/components/console/VtsActionsConsole.vue +1 -1
- package/lib/components/console/VtsClipboardConsole.vue +1 -1
- package/lib/components/console/VtsLayoutConsole.vue +1 -1
- package/lib/components/console/VtsRemoteConsole.vue +1 -1
- package/lib/components/copy-button/VtsCopyButton.vue +1 -1
- package/lib/components/delete-button/VtsDeleteButton.vue +1 -1
- package/lib/components/icon/VtsIcon.vue +1 -1
- package/lib/components/input-wrapper/VtsInputWrapper.vue +3 -3
- package/lib/components/key-value-pair/VtsKeyValuePair.vue +1 -1
- package/lib/components/layout/VtsContentSidePanel.vue +2 -2
- package/lib/components/linear-chart/VtsLinearChart.vue +1 -1
- package/lib/components/menu/MenuItem.vue +2 -2
- package/lib/components/menu/MenuList.vue +2 -2
- package/lib/components/menu/MenuSeparator.vue +1 -1
- package/lib/components/modal/VtsActionModal.vue +57 -13
- package/lib/components/modal/VtsBlockedModal.vue +7 -7
- package/lib/components/modal/VtsDeleteModal.vue +20 -15
- package/lib/components/modal/VtsErrorModal.vue +10 -6
- package/lib/components/object-icon/VtsObjectIcon.vue +3 -1
- package/lib/components/panel/VtsPanel.vue +1 -1
- package/lib/components/panel/VtsSidePanel.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilder.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilderButton.vue +17 -11
- package/lib/components/query-builder/VtsQueryBuilderFilter.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderGroup.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderModal.vue +13 -8
- package/lib/components/query-builder/VtsQueryBuilderRow.vue +1 -1
- package/lib/components/relative-time/VtsRelativeTime.vue +2 -2
- package/lib/components/space-card/VtsSpaceCard.vue +11 -7
- package/lib/components/sr-connection-modal/VtsSrConnectionModal.vue +77 -0
- package/lib/components/stacked-bar-with-legend/VtsStackedBarWithLegend.vue +1 -1
- package/lib/components/state-hero/VtsStateHero.vue +1 -1
- package/lib/components/status/VtsStatus.vue +1 -1
- package/lib/components/tab/TabItem.vue +2 -2
- package/lib/components/tab/TabList.vue +1 -1
- package/lib/components/table/VtsTable.vue +3 -3
- package/lib/components/table/cells/VtsCollapsedListCell.vue +1 -1
- package/lib/components/table/cells/VtsLinkCell.vue +2 -2
- package/lib/components/table/cells/VtsStatusCell.vue +3 -3
- package/lib/components/table/cells/VtsTagCell.vue +2 -2
- package/lib/components/table/cells/VtsTextCell.vue +1 -1
- package/lib/components/tag/VtsTag.vue +1 -1
- package/lib/components/task/VtsQuickTaskButton.vue +1 -1
- package/lib/components/task/VtsQuickTaskTabBar.vue +1 -1
- package/lib/components/tooltip-list/VtsTooltipList.vue +1 -1
- package/lib/components/tree/VtsTreeList.vue +1 -1
- package/lib/components/tree/VtsTreeLoadingItem.vue +1 -1
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +1 -1
- package/lib/components/ui/alarm-item/UiAlarmItem.vue +2 -2
- package/lib/components/ui/alert/UiAlert.vue +1 -1
- package/lib/components/ui/button/UiButton.vue +2 -2
- package/lib/components/ui/button-icon/UiButtonIcon.vue +1 -1
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +1 -1
- package/lib/components/ui/checkbox/UiCheckbox.vue +201 -189
- package/lib/components/ui/chip/UiChip.vue +1 -1
- package/lib/components/ui/counter/UiCounter.vue +1 -1
- package/lib/components/ui/drawer/UiDrawer.vue +37 -54
- package/lib/components/ui/dropdown/UiDropdown.vue +2 -2
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +1 -1
- package/lib/components/ui/head-bar/UiHeadBar.vue +1 -1
- package/lib/components/ui/info/UiInfo.vue +1 -1
- package/lib/components/ui/input/UiInput.vue +2 -2
- package/lib/components/ui/label/UiLabel.vue +1 -1
- package/lib/components/ui/legend/UiLegend.vue +2 -2
- package/lib/components/ui/legend-title/UiLegendTitle.vue +1 -1
- package/lib/components/ui/link/UiLink.vue +2 -2
- package/lib/components/ui/loader/UiLoader.vue +1 -1
- package/lib/components/ui/modal/UiModal.vue +17 -5
- package/lib/components/ui/object-link/UiObjectLink.vue +1 -1
- package/lib/components/ui/panel-card/UiPanelCard.vue +20 -0
- package/lib/components/ui/progress-bar/UiProgressBar.vue +1 -1
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +2 -2
- package/lib/components/ui/quick-task-panel/UiQuickTaskPanel.vue +1 -1
- package/lib/components/ui/radio-button/UiRadioButton.vue +2 -2
- package/lib/components/ui/stacked-bar/StackedBarSegment.vue +2 -2
- package/lib/components/ui/stacked-bar/UiStackedBar.vue +1 -1
- package/lib/components/ui/tag/UiTag.vue +1 -1
- package/lib/components/ui/task-item/UiTaskItem.vue +1 -1
- package/lib/components/ui/text-area/UiTextarea.vue +1 -1
- package/lib/components/ui/toaster/UiToaster.vue +1 -1
- package/lib/components/ui/toggle/UiToggle.vue +1 -1
- package/lib/components/ui/tooltip/UiTooltip.vue +2 -2
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +6 -2
- package/lib/components/ui/user-link/UiUserLink.vue +1 -1
- package/lib/components/ui/user-logo/UiUserLogo.vue +1 -1
- package/lib/components/{vif-connection-toggle-modal/VtsVifConnectionToggleModal.vue → vif-connection-modal/VtsVifConnectionModal.vue} +15 -10
- package/lib/composables/chart-theme.composable.ts +1 -1
- package/lib/composables/context.composable.ts +1 -1
- package/lib/composables/default-tab.composable.ts +1 -1
- package/lib/composables/disabled.composable.ts +1 -1
- package/lib/composables/hide-route-query.composable.ts +1 -1
- package/lib/composables/link-component.composable.ts +1 -1
- package/lib/composables/modals/use-action-modal.ts +11 -0
- package/lib/composables/modals/use-blocked-modal.ts +10 -0
- package/lib/composables/modals/use-delete-modal.ts +11 -0
- package/lib/composables/pagination.composable.ts +2 -2
- package/lib/composables/route-query/types.ts +1 -1
- package/lib/composables/route-query.composable.ts +5 -5
- package/lib/composables/sort-route-query.composable.ts +1 -1
- package/lib/composables/tab-list.composable.ts +1 -1
- package/lib/composables/table/create-base-definition.ts +1 -1
- package/lib/composables/table/create-define-column.ts +6 -6
- package/lib/composables/table/create-sorting-definition.ts +2 -2
- package/lib/composables/table/create-visibility-definition.ts +2 -2
- package/lib/composables/table/type.ts +1 -1
- package/lib/composables/table.composable.ts +4 -4
- package/lib/composables/tree-filter.composable.ts +1 -1
- package/lib/directives/tooltip.directive.ts +2 -2
- package/lib/i18n.ts +4 -0
- package/lib/icons/index.ts +1 -1
- package/lib/locales/ar.json +1 -0
- package/lib/locales/cs.json +54 -6
- package/lib/locales/de.json +0 -2
- package/lib/locales/en.json +91 -9
- package/lib/locales/es.json +0 -1
- package/lib/locales/fi.json +20 -1
- package/lib/locales/fr.json +95 -13
- package/lib/locales/nb-NO.json +0 -1
- package/lib/locales/nl.json +81 -6
- package/lib/locales/pt-BR.json +1 -1
- package/lib/locales/pt.json +0 -1
- package/lib/locales/sk.json +54 -6
- package/lib/locales/sv.json +38 -2
- package/lib/locales/zh-Hans.json +0 -4
- package/lib/packages/form-select/use-form-select-controller.ts +1 -1
- package/lib/packages/job/define-job.ts +5 -5
- package/lib/packages/job/index.ts +4 -4
- package/lib/packages/job/use-job-store.ts +2 -2
- package/lib/packages/menu/action.ts +1 -1
- package/lib/packages/menu/context.ts +1 -1
- package/lib/packages/menu/index.ts +10 -10
- package/lib/packages/menu/job.ts +3 -3
- package/lib/packages/menu/link.ts +1 -1
- package/lib/packages/menu/router-link.ts +1 -1
- package/lib/packages/menu/toggle-target.ts +1 -1
- package/lib/packages/query-builder/group/build-root-group.ts +1 -1
- package/lib/packages/query-builder/node/handle-comparison-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-glob-pattern-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-null-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-property-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-property-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-regexp-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-string-or-number-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-truthy-property-node.ts +1 -1
- package/lib/packages/query-builder/use-query-builder.ts +2 -2
- package/lib/packages/remote-resource/define-remote-resource.ts +1 -1
- package/lib/packages/threshold/use-threshold.ts +1 -1
- package/lib/packages/tree/branch-definition.ts +2 -2
- package/lib/packages/tree/branch.ts +8 -2
- package/lib/packages/tree/build-nodes.ts +3 -3
- package/lib/packages/tree/define-branch.ts +2 -2
- package/lib/packages/tree/define-leaf.ts +2 -2
- package/lib/packages/tree/define-tree.ts +3 -3
- package/lib/packages/tree/leaf-definition.ts +1 -1
- package/lib/packages/tree/leaf.ts +2 -2
- package/lib/packages/tree/tree-node-base.ts +2 -2
- package/lib/packages/tree/tree-node-definition-base.ts +1 -1
- package/lib/packages/tree/types.ts +6 -6
- package/lib/packages/tree/use-tree.ts +2 -2
- package/lib/stores/panel.store.ts +1 -1
- package/lib/stores/tooltip.store.ts +2 -2
- package/lib/tables/column-definitions/action-column.ts +2 -2
- package/lib/tables/column-definitions/button-column.ts +3 -3
- package/lib/tables/column-definitions/button-icon-column.ts +2 -2
- package/lib/tables/column-definitions/date-column.ts +3 -3
- package/lib/tables/column-definitions/info-column.ts +3 -3
- package/lib/tables/column-definitions/input-column.ts +3 -3
- package/lib/tables/column-definitions/link-column.ts +2 -2
- package/lib/tables/column-definitions/literal-column.ts +3 -3
- package/lib/tables/column-definitions/number-column.ts +2 -2
- package/lib/tables/column-definitions/percent-column.ts +2 -2
- package/lib/tables/column-definitions/progress-bar-column.ts +2 -2
- package/lib/tables/column-definitions/select-column.ts +2 -2
- package/lib/tables/column-definitions/status-column.ts +2 -2
- package/lib/tables/column-definitions/tag-column.ts +3 -3
- package/lib/tables/column-sets/backup-issue-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-schedule-columns.ts +1 -1
- package/lib/tables/column-sets/backup-log-columns.ts +1 -1
- package/lib/tables/column-sets/host-columns.ts +3 -3
- package/lib/tables/column-sets/network-columns.ts +2 -2
- package/lib/tables/column-sets/pif-columns.ts +2 -2
- package/lib/tables/column-sets/server-columns.ts +1 -1
- package/lib/tables/column-sets/sr-columns.ts +3 -3
- package/lib/tables/column-sets/vdi-columns.ts +2 -0
- package/lib/tables/column-sets/vif-columns.ts +1 -1
- package/lib/tables/column-sets/vif-network-columns.ts +1 -1
- package/lib/tables/column-sets/vm-backup-archive-columns.ts +3 -3
- package/lib/tables/column-sets/vm-backup-run-colums.ts +2 -2
- package/lib/tables/column-sets/vm-columns.ts +1 -1
- package/lib/types/object.type.ts +11 -1
- package/lib/utils/create-subscribable-store-context.util.ts +2 -2
- package/lib/utils/download-bugtools.utils.ts +1 -1
- package/lib/utils/if-else.utils.ts +2 -2
- package/lib/utils/injection-keys.util.ts +0 -2
- package/lib/utils/progress.util.ts +1 -1
- package/lib/utils/to-array.utils.ts +1 -1
- package/package.json +1 -1
- package/lib/components/drawer/VtsDrawer.vue +0 -89
- package/lib/components/drawer/VtsDrawerButton.vue +0 -22
- package/lib/components/drawer/VtsDrawerCancelButton.vue +0 -33
- package/lib/components/drawer/VtsDrawerConfirmButton.vue +0 -32
- package/lib/components/drawer/VtsDrawerList.vue +0 -34
- package/lib/components/modal/VtsModal.vue +0 -82
- package/lib/components/modal/VtsModalButton.vue +0 -35
- package/lib/components/modal/VtsModalCancelButton.vue +0 -37
- package/lib/components/modal/VtsModalConfirmButton.vue +0 -21
- package/lib/components/modal/VtsModalList.vue +0 -34
- package/lib/packages/drawer/DrawerProvider.vue +0 -17
- package/lib/packages/drawer/README.md +0 -189
- package/lib/packages/drawer/create-drawer-opener.ts +0 -119
- package/lib/packages/drawer/drawer.store.ts +0 -22
- package/lib/packages/drawer/types.ts +0 -93
- package/lib/packages/drawer/use-drawer.ts +0 -53
- package/lib/packages/modal/ModalProvider.vue +0 -17
- package/lib/packages/modal/README.md +0 -253
- package/lib/packages/modal/create-modal-opener.ts +0 -106
- package/lib/packages/modal/modal.store.ts +0 -22
- package/lib/packages/modal/types.ts +0 -91
- package/lib/packages/modal/use-modal.ts +0 -53
|
@@ -4,9 +4,9 @@ import UiButton, {
|
|
|
4
4
|
type ButtonVariant,
|
|
5
5
|
type ButtonSize,
|
|
6
6
|
} from '@core/components/ui/button/UiButton.vue'
|
|
7
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
8
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
9
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
7
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
8
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
9
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
10
10
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
11
11
|
import { h, toValue, type MaybeRefOrGetter } from 'vue'
|
|
12
12
|
|
|
@@ -4,8 +4,8 @@ import UiButtonIcon, {
|
|
|
4
4
|
} from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
5
5
|
import UiTableCell from '@core/components/ui/table-cell/UiTableCell.vue'
|
|
6
6
|
import type { IconName } from '@core/icons'
|
|
7
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
8
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
7
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
8
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
9
9
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
10
10
|
import { h, type MaybeRefOrGetter, toValue } from 'vue'
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import VtsRelativeTime from '@core/components/relative-time/VtsRelativeTime.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
4
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
4
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
5
5
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
6
6
|
import type { DateLike } from '@vueuse/shared'
|
|
7
7
|
import { h } from 'vue'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { InfoAccent } from '@core/components/ui/info/UiInfo.vue'
|
|
2
2
|
import UiInfo from '@core/components/ui/info/UiInfo.vue'
|
|
3
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
4
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
5
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
3
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
4
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
5
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
6
6
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
7
7
|
import { h } from 'vue'
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UiInput, { type InputType } from '@core/components/ui/input/UiInput.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
4
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
4
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
5
5
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
6
6
|
import { h, toValue, type MaybeRefOrGetter, type Ref } from 'vue'
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VtsLinkCell, { type VtsLinkCellProps } from '@core/components/table/cells/VtsLinkCell.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
import { h } from 'vue'
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
2
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
1
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
2
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
|
|
6
6
|
export const useLiteralColumn = defineColumn((config?: HeaderConfig) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VtsNumberCell from '@core/components/table/cells/VtsNumberCell.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
import { h } from 'vue'
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VtsNumberCell from '@core/components/table/cells/VtsNumberCell.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
import { h } from 'vue'
|
|
6
6
|
import { useI18n } from 'vue-i18n'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VtsProgressBarCell from '@core/components/table/cells/VtsProgressBarCell.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
import { h } from 'vue'
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import VtsSelect from '@core/components/select/VtsSelect.vue'
|
|
2
2
|
import type { FormSelectId } from '@core/packages/form-select/types.ts'
|
|
3
3
|
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
4
|
-
import { renderBodyCell } from '@core/tables/helpers/render-body-cell'
|
|
5
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
4
|
+
import { renderBodyCell } from '@core/tables/helpers/render-body-cell.ts'
|
|
5
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
6
6
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
7
7
|
import { h } from 'vue'
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VtsStatusCell, { type StatusCellProps } from '@core/components/table/cells/VtsStatusCell.vue'
|
|
2
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
3
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
2
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
3
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
4
4
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
5
5
|
import { h } from 'vue'
|
|
6
6
|
import { useI18n } from 'vue-i18n'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import VtsTagCell from '@core/components/table/cells/VtsTagCell.vue'
|
|
2
2
|
import type { TagAccent } from '@core/components/ui/tag/UiTag.vue'
|
|
3
|
-
import { defineColumn } from '@core/packages/table/define-column'
|
|
4
|
-
import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
|
|
3
|
+
import { defineColumn } from '@core/packages/table/define-column.ts'
|
|
4
|
+
import { renderHeadCell } from '@core/tables/helpers/render-head-cell.ts'
|
|
5
5
|
import type { HeaderConfig } from '@core/tables/types.ts'
|
|
6
|
-
import type { MaybeArray } from '@core/types/utility.type'
|
|
6
|
+
import type { MaybeArray } from '@core/types/utility.type.ts'
|
|
7
7
|
import { h } from 'vue'
|
|
8
8
|
|
|
9
9
|
export const useTagColumn = defineColumn((config?: HeaderConfig) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
2
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
3
3
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
4
4
|
import { useI18n } from 'vue-i18n'
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useCollapsedListColumn } from '@core/tables/column-definitions/collapsed-list-column.ts'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
4
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
5
5
|
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
6
6
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
2
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
3
3
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
4
4
|
import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
|
|
5
5
|
import { useI18n } from 'vue-i18n'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useDateColumn } from '@core/tables/column-definitions/date-column.ts'
|
|
3
3
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
4
|
-
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column'
|
|
4
|
+
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
5
5
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
6
6
|
import { useI18n } from 'vue-i18n'
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
-
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
|
+
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
5
5
|
import { useTagColumn } from '@core/tables/column-definitions/tag-column.ts'
|
|
6
|
-
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column'
|
|
6
|
+
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column.ts'
|
|
7
7
|
import { useI18n } from 'vue-i18n'
|
|
8
8
|
|
|
9
9
|
export const useHostColumns = defineColumns(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
4
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
5
5
|
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
6
6
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
7
7
|
import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
|
|
8
|
-
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column'
|
|
8
|
+
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column.ts'
|
|
9
9
|
import { useI18n } from 'vue-i18n'
|
|
10
10
|
|
|
11
11
|
export const useNetworkColumns = defineColumns(() => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
4
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
5
|
-
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column'
|
|
5
|
+
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
6
6
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
7
7
|
import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
|
|
8
8
|
import { useI18n } from 'vue-i18n'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
3
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
4
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
5
5
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
6
6
|
import { useI18n } from 'vue-i18n'
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
|
-
import { useActionColumn } from '@core/tables/column-definitions/action-column'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
2
|
+
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
4
|
import { useLiteralColumn } from '@core/tables/column-definitions/literal-column.ts'
|
|
5
5
|
import { useProgressBarColumn } from '@core/tables/column-definitions/progress-bar-column.ts'
|
|
6
|
-
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column'
|
|
6
|
+
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column.ts'
|
|
7
7
|
import { useI18n } from 'vue-i18n'
|
|
8
8
|
|
|
9
9
|
export const useSrColumns = defineColumns(() => {
|
|
@@ -4,6 +4,7 @@ import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
|
4
4
|
import { useLiteralColumn } from '@core/tables/column-definitions/literal-column.ts'
|
|
5
5
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
6
6
|
import { useProgressBarColumn } from '@core/tables/column-definitions/progress-bar-column.ts'
|
|
7
|
+
import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
|
|
7
8
|
import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column.ts'
|
|
8
9
|
import { useI18n } from 'vue-i18n'
|
|
9
10
|
|
|
@@ -17,5 +18,6 @@ export const useVdiColumns = defineColumns(() => {
|
|
|
17
18
|
size: useNumberColumn({ headerLabel: () => t('size') }),
|
|
18
19
|
format: useLiteralColumn({ headerLabel: () => t('format') }),
|
|
19
20
|
actions: useActionColumn({}),
|
|
21
|
+
selectItem: useSelectItemColumn(),
|
|
20
22
|
}
|
|
21
23
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
3
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
4
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
5
5
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
6
6
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
7
7
|
import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
3
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
4
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
5
5
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
6
6
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
7
7
|
import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
|
-
import { useDateColumn } from '@core/tables/column-definitions/date-column'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
-
import { useNumberColumn } from '@core/tables/column-definitions/number-column'
|
|
2
|
+
import { useDateColumn } from '@core/tables/column-definitions/date-column.ts'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
|
+
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
5
5
|
import { useI18n } from 'vue-i18n'
|
|
6
6
|
|
|
7
7
|
export const useBackupArchiveColumns = defineColumns(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
|
-
import { useDateColumn } from '@core/tables/column-definitions/date-column'
|
|
3
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
2
|
+
import { useDateColumn } from '@core/tables/column-definitions/date-column.ts'
|
|
3
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
4
4
|
import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
|
|
5
5
|
import { useI18n } from 'vue-i18n'
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineColumns } from '@core/packages/table/define-columns.ts'
|
|
2
2
|
import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
|
|
3
3
|
import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
|
|
4
|
-
import { useLinkColumn } from '@core/tables/column-definitions/link-column'
|
|
4
|
+
import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
|
|
5
5
|
import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
|
|
6
6
|
import { useTagColumn } from '@core/tables/column-definitions/tag-column.ts'
|
|
7
7
|
import { useI18n } from 'vue-i18n'
|
package/lib/types/object.type.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
export type ObjectType = 'vm' | 'host'
|
|
2
2
|
|
|
3
3
|
export type VmActions = 'reboot' | 'shutdown' | 'force-reboot' | 'force-shutdown'
|
|
4
|
-
export type HostActions =
|
|
4
|
+
export type HostActions =
|
|
5
|
+
| 'enable'
|
|
6
|
+
| 'disable'
|
|
7
|
+
| 'shutdown'
|
|
8
|
+
| 'start'
|
|
9
|
+
| 'forget'
|
|
10
|
+
| 'disable-and-evacuate-vms'
|
|
11
|
+
| 'reboot'
|
|
12
|
+
| 'force-reboot'
|
|
13
|
+
| 'smart-reboot'
|
|
14
|
+
| 'restart-toolstack'
|
|
5
15
|
|
|
6
16
|
export type VmBlockedOperations =
|
|
7
17
|
| 'clean_shutdown'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SubscribableStoreConfig, Subscribe, SubscribeContext } from '@core/types/subscribable-store.type'
|
|
2
|
-
import { ifElse } from '@core/utils/if-else.utils'
|
|
1
|
+
import type { SubscribableStoreConfig, Subscribe, SubscribeContext } from '@core/types/subscribable-store.type.ts'
|
|
2
|
+
import { ifElse } from '@core/utils/if-else.utils.ts'
|
|
3
3
|
import { computed, onBeforeUnmount, readonly, type Ref, ref, toValue } from 'vue'
|
|
4
4
|
|
|
5
5
|
export function createSubscribableStoreContext<TContext>(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MaybeArray, VoidFunction } from '@core/types/utility.type'
|
|
2
|
-
import { toArray } from '@core/utils/to-array.utils'
|
|
1
|
+
import type { MaybeArray, VoidFunction } from '@core/types/utility.type.ts'
|
|
2
|
+
import { toArray } from '@core/utils/to-array.utils.ts'
|
|
3
3
|
import { watch, type WatchOptions, type WatchSource } from 'vue'
|
|
4
4
|
|
|
5
5
|
export interface IfElseOptions extends Pick<WatchOptions, 'immediate' | 'flush'> {}
|
|
@@ -23,6 +23,4 @@ export const IK_DISABLED = Symbol('IK_DISABLED') as InjectionKey<ComputedRef<boo
|
|
|
23
23
|
|
|
24
24
|
export const IK_INPUT_WRAPPER_CONTROLLER = Symbol('IK_INPUT_WRAPPER_CONTROLLER') as InjectionKey<InputWrapperController>
|
|
25
25
|
|
|
26
|
-
export const IK_MODAL_ACCENT = Symbol('IK_MODAL_ACCENT') as InjectionKey<ComputedRef<ModalAccent>>
|
|
27
|
-
|
|
28
26
|
export const IK_OVERLAY_ACCENT = Symbol('IK_OVERLAY_ACCENT') as InjectionKey<ComputedRef<ModalAccent>>
|
|
@@ -8,7 +8,7 @@ import type { ThresholdConfig } from '@core/packages/threshold/type.ts'
|
|
|
8
8
|
import { formatSize } from '@core/utils/size.util.ts'
|
|
9
9
|
import { computed, type ComputedRef, type MaybeRefOrGetter, type Reactive, toValue } from 'vue'
|
|
10
10
|
import { useI18n } from 'vue-i18n'
|
|
11
|
-
import { toComputed } from './to-computed.util'
|
|
11
|
+
import { toComputed } from './to-computed.util.ts'
|
|
12
12
|
|
|
13
13
|
export function defaultProgressThresholds(tooltip?: string): ThresholdConfig<ProgressBarThresholdPayload> {
|
|
14
14
|
return {
|
package/package.json
CHANGED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<UiDrawer
|
|
3
|
-
:is-open="effectiveIsOpen"
|
|
4
|
-
:is-dismissible="dismissible"
|
|
5
|
-
v-on="{ dismiss: handleDismiss, afterLeave: onAfterLeave }"
|
|
6
|
-
>
|
|
7
|
-
<template v-if="slots.title" #title>
|
|
8
|
-
<slot name="title" />
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<template #content>
|
|
12
|
-
<slot name="content" />
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<template v-if="slots.buttons" #buttons>
|
|
16
|
-
<slot name="buttons" />
|
|
17
|
-
</template>
|
|
18
|
-
</UiDrawer>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="ts" setup>
|
|
22
|
-
import UiDrawer from '@core/components/ui/drawer/UiDrawer.vue'
|
|
23
|
-
import { IK_DRAWER } from '@core/packages/drawer/types.ts'
|
|
24
|
-
import { useMagicKeys, whenever } from '@vueuse/core'
|
|
25
|
-
import { computed, inject, onMounted, ref } from 'vue'
|
|
26
|
-
|
|
27
|
-
const {
|
|
28
|
-
dismissible,
|
|
29
|
-
isOpen = undefined,
|
|
30
|
-
current,
|
|
31
|
-
} = defineProps<{
|
|
32
|
-
dismissible?: boolean
|
|
33
|
-
isOpen?: boolean
|
|
34
|
-
current?: boolean
|
|
35
|
-
}>()
|
|
36
|
-
|
|
37
|
-
const emit = defineEmits<{
|
|
38
|
-
dismiss: []
|
|
39
|
-
}>()
|
|
40
|
-
|
|
41
|
-
const slots = defineSlots<{
|
|
42
|
-
content(): any
|
|
43
|
-
title?(): any
|
|
44
|
-
buttons?(): any
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const drawer = inject(IK_DRAWER, undefined)
|
|
48
|
-
|
|
49
|
-
const internalVisible = ref(false)
|
|
50
|
-
|
|
51
|
-
onMounted(() => {
|
|
52
|
-
if (isOpen === undefined) {
|
|
53
|
-
internalVisible.value = true
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const effectiveIsOpen = computed(() => isOpen ?? internalVisible.value)
|
|
58
|
-
|
|
59
|
-
let afterLeaveCallback: (() => void) | undefined
|
|
60
|
-
|
|
61
|
-
function onAfterLeave() {
|
|
62
|
-
afterLeaveCallback?.()
|
|
63
|
-
afterLeaveCallback = undefined
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const handleDismiss = computed(() => {
|
|
67
|
-
if (!dismissible) {
|
|
68
|
-
return undefined
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return () => {
|
|
72
|
-
if (isOpen !== undefined) {
|
|
73
|
-
emit('dismiss')
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
afterLeaveCallback = () => drawer?.value.onCancel()
|
|
78
|
-
internalVisible.value = false
|
|
79
|
-
}
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
const { escape } = useMagicKeys()
|
|
83
|
-
|
|
84
|
-
whenever(escape, () => {
|
|
85
|
-
if (dismissible && current) {
|
|
86
|
-
handleDismiss.value?.()
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
</script>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<UiButton :accent :busy="drawer?.isBusy.value" :variant size="medium">
|
|
3
|
-
<slot />
|
|
4
|
-
</UiButton>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import UiButton, { type ButtonAccent, type ButtonVariant } from '@core/components/ui/button/UiButton.vue'
|
|
9
|
-
import { IK_DRAWER } from '@core/packages/drawer/types.ts'
|
|
10
|
-
import { inject } from 'vue'
|
|
11
|
-
|
|
12
|
-
const { accent = 'brand' } = defineProps<{
|
|
13
|
-
variant: ButtonVariant
|
|
14
|
-
accent?: ButtonAccent
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
defineSlots<{
|
|
18
|
-
default(): any
|
|
19
|
-
}>()
|
|
20
|
-
|
|
21
|
-
const drawer = inject(IK_DRAWER)
|
|
22
|
-
</script>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsDrawerButton variant="secondary" @click="handleClick()">
|
|
3
|
-
<slot>{{ t('cancel') }}</slot>
|
|
4
|
-
</VtsDrawerButton>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsDrawerButton from '@core/components/drawer/VtsDrawerButton.vue'
|
|
9
|
-
import { IK_DRAWER } from '@core/packages/drawer/types.ts'
|
|
10
|
-
import { inject } from 'vue'
|
|
11
|
-
import { useI18n } from 'vue-i18n'
|
|
12
|
-
|
|
13
|
-
const { onClick } = defineProps<{
|
|
14
|
-
onClick?: () => void
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
defineSlots<{
|
|
18
|
-
default?(): any
|
|
19
|
-
}>()
|
|
20
|
-
|
|
21
|
-
const { t } = useI18n()
|
|
22
|
-
|
|
23
|
-
const drawer = inject(IK_DRAWER)
|
|
24
|
-
|
|
25
|
-
function handleClick() {
|
|
26
|
-
if (onClick) {
|
|
27
|
-
onClick()
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
drawer?.value.onCancel()
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsDrawerButton :accent variant="primary" @click="handleClick()">
|
|
3
|
-
<slot />
|
|
4
|
-
</VtsDrawerButton>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsDrawerButton from '@core/components/drawer/VtsDrawerButton.vue'
|
|
9
|
-
import type { ButtonAccent } from '@core/components/ui/button/UiButton.vue'
|
|
10
|
-
import { IK_DRAWER } from '@core/packages/drawer/types.ts'
|
|
11
|
-
import { inject } from 'vue'
|
|
12
|
-
|
|
13
|
-
const { onClick, accent = 'brand' } = defineProps<{
|
|
14
|
-
onClick?: () => void
|
|
15
|
-
accent?: ButtonAccent
|
|
16
|
-
}>()
|
|
17
|
-
|
|
18
|
-
defineSlots<{
|
|
19
|
-
default(): any
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const drawer = inject(IK_DRAWER)
|
|
23
|
-
|
|
24
|
-
function handleClick() {
|
|
25
|
-
if (onClick) {
|
|
26
|
-
onClick()
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
drawer?.value.onConfirm()
|
|
31
|
-
}
|
|
32
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="drawerStore.drawers.length > 0" class="vts-drawer-list">
|
|
3
|
-
<DrawerProvider v-for="(drawer, index) of drawerStore.drawers" :key="drawer.id" :drawer>
|
|
4
|
-
<component
|
|
5
|
-
:is="drawer.component"
|
|
6
|
-
class="drawer-component"
|
|
7
|
-
v-bind="drawer.props"
|
|
8
|
-
:current="index === drawerStore.drawers.length - 1"
|
|
9
|
-
@confirm="drawer.onConfirm"
|
|
10
|
-
@cancel="drawer.onCancel"
|
|
11
|
-
/>
|
|
12
|
-
</DrawerProvider>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import { useDrawerStore } from '@core/packages/drawer/drawer.store.ts'
|
|
18
|
-
import DrawerProvider from '@core/packages/drawer/DrawerProvider.vue'
|
|
19
|
-
|
|
20
|
-
const drawerStore = useDrawerStore()
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<style lang="postcss" scoped>
|
|
24
|
-
.vts-drawer-list {
|
|
25
|
-
position: fixed;
|
|
26
|
-
inset: 0;
|
|
27
|
-
background-color: var(--color-opacity-primary);
|
|
28
|
-
z-index: 1020;
|
|
29
|
-
|
|
30
|
-
.drawer-component:not(:last-child) {
|
|
31
|
-
filter: brightness(0.8);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</style>
|